shaka-player 3.2.3 → 3.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 (47) hide show
  1. package/.github/workflows/build_and_test.yaml +73 -0
  2. package/.github/workflows/release.yaml +53 -0
  3. package/CHANGELOG.md +13 -1
  4. package/build/checkversion.py +1 -1
  5. package/build/test.py +6 -0
  6. package/dist/controls.css +1 -1
  7. package/dist/deps.js +3 -3
  8. package/dist/locales.js +30 -30
  9. package/dist/shaka-player.compiled.d.ts +2 -1
  10. package/dist/shaka-player.compiled.debug.d.ts +2 -1
  11. package/dist/shaka-player.compiled.debug.externs.js +17 -12
  12. package/dist/shaka-player.compiled.debug.js +95 -93
  13. package/dist/shaka-player.compiled.debug.map +4 -4
  14. package/dist/shaka-player.compiled.externs.js +17 -12
  15. package/dist/shaka-player.compiled.js +610 -608
  16. package/dist/shaka-player.compiled.map +3 -3
  17. package/dist/shaka-player.ui.d.ts +4 -12
  18. package/dist/shaka-player.ui.debug.d.ts +4 -12
  19. package/dist/shaka-player.ui.debug.externs.js +19 -23
  20. package/dist/shaka-player.ui.debug.js +109 -108
  21. package/dist/shaka-player.ui.debug.map +4 -4
  22. package/dist/shaka-player.ui.externs.js +19 -23
  23. package/dist/shaka-player.ui.js +774 -773
  24. package/dist/shaka-player.ui.map +3 -3
  25. package/karma.conf.js +19 -15
  26. package/lib/ads/ad_manager.js +1 -0
  27. package/lib/cast/cast_proxy.js +3 -0
  28. package/lib/cast/cast_receiver.js +3 -0
  29. package/lib/dash/dash_parser.js +31 -19
  30. package/lib/hls/manifest_text_parser.js +1 -0
  31. package/lib/media/region_observer.js +39 -33
  32. package/lib/media/region_timeline.js +17 -19
  33. package/lib/media/streaming_engine.js +1 -1
  34. package/lib/net/networking_engine.js +4 -0
  35. package/lib/offline/storage.js +8 -9
  36. package/lib/player.js +25 -9
  37. package/lib/util/fake_event_target.js +21 -1
  38. package/package.json +3 -6
  39. package/test/dash/dash_parser_live_unit.js +43 -0
  40. package/test/dash/dash_parser_manifest_unit.js +2 -1
  41. package/test/hls/hls_parser_unit.js +74 -0
  42. package/test/media/region_observer_unit.js +40 -5
  43. package/test/media/region_timeline_unit.js +40 -22
  44. package/test/test/util/util.js +10 -7
  45. package/test/ui/text_displayer_layout_unit.js +8 -7
  46. package/ui/controls.js +3 -0
  47. package/ui/localization.js +12 -36
@@ -13,39 +13,39 @@ var q;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:
13
13
  function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var da=ca(this);function ea(a,b){if(b)a:{for(var c=da,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];if(!(f in c))break a;c=c[f]}d=d[d.length-1];e=c[d];f=b(e);f!=e&&null!=f&&ba(c,d,{configurable:!0,writable:!0,value:f})}}
14
14
  ea("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
15
15
  ea("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 fa(aa(this))}})}return a});function fa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
- function r(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=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ka="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},la;
16
+ function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ha(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ka="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},la;
17
17
  if("function"==typeof Object.setPrototypeOf)la=Object.setPrototypeOf;else{var ma;a:{var na={a:!0},oa={};try{oa.__proto__=na;ma=oa.a;break a}catch(a){}ma=!1}la=ma?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var pa=la;
18
18
  function qa(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(pa)pa(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.zi=b.prototype}function ra(){this.A=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.o=0;this.D=this.i=null}function sa(a){if(a.A)throw new TypeError("Generator is already running");a.A=!0}ra.prototype.B=function(a){this.h=a};
19
- function ta(a,b){a.i={Te:b,cf:!0};a.g=a.o||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ra.prototype.C=function(a){this.g=a};function z(a){a.g=0}function A(a,b,c){a.o=b;void 0!=c&&(a.j=c)}function ua(a){a.o=0;a.j=2}function va(a,b,c){a.g=b;a.o=c||0}function E(a,b){a.o=b||0;var c=a.i.Te;a.i=null;return c}function xa(a){a.D=[a.i];a.o=0;a.j=0}
19
+ function ta(a,b){a.i={Te:b,cf:!0};a.g=a.o||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ra.prototype.C=function(a){this.g=a};function z(a){a.g=0}function A(a,b,c){a.o=b;void 0!=c&&(a.j=c)}function ua(a){a.o=0;a.j=2}function va(a,b,c){a.g=b;a.o=c||0}function E(a,b){a.o=b||0;var c=a.i.Te;a.i=null;return c}function wa(a){a.D=[a.i];a.o=0;a.j=0}
20
20
  function ya(a,b){var c=a.D.splice(0)[0];(c=a.i=a.i||c)?c.cf?a.g=a.o||a.j:void 0!=c.C&&a.j<c.C?(a.g=c.C,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new ra;this.h=a}function Aa(a,b){sa(a.g);var c=a.g.l;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ca(a)}
21
21
  function Ba(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.A=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Ca(a)}a.g.l=null;d.call(a.g,f);return Ca(a)}
22
22
  function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.A=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.A=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.cf)throw b.Te;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
23
  function Da(a){this.next=function(b){sa(a.g);a.g.l?b=Ba(a,a.g.l.next,b,a.g.B):(a.g.B(b),b=Ca(a));return b};this["throw"]=function(b){sa(a.g);a.g.l?b=Ba(a,a.g.l["throw"],b,a.g.B):(ta(a.g,b),b=Ca(a));return b};this["return"]=function(b){return Aa(a,b)};this[Symbol.iterator]=function(){return this}}function Ga(a,b){var c=new Da(new za(b));pa&&a.prototype&&pa(c,a.prototype);return c}
24
- function Ha(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 H(a){return Ha(new Da(new za(a)))}
24
+ function Ia(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 H(a){return Ia(new Da(new za(a)))}
25
25
  ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.A=!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.K),reject:g(this.l)}};b.prototype.K=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.O(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.I(g):this.o(g)}};
27
- b.prototype.I=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.R(h,g):this.o(g)};b.prototype.l=function(g){this.B(2,g)};b.prototype.o=function(g){this.B(1,g)};b.prototype.B=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.L();this.D()};b.prototype.L=function(){var g=this;e(function(){if(g.H()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.H=
27
+ b.prototype.I=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.Z(h,g):this.o(g)};b.prototype.l=function(g){this.B(2,g)};b.prototype.o=function(g){this.B(1,g)};b.prototype.B=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.L();this.D()};b.prototype.L=function(){var g=this;e(function(){if(g.H()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.H=
28
28
  function(){if(this.A)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.D=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
29
- b.prototype.O=function(g){var h=this.j();g.bd(h.resolve,h.reject)};b.prototype.R=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,t){return"function"==typeof p?function(v){try{l(p(v))}catch(y){m(y)}}:t}var l,m,n=new b(function(p,t){l=p;m=t});this.bd(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.bd=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
29
+ b.prototype.O=function(g){var h=this.j();g.bd(h.resolve,h.reject)};b.prototype.Z=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,t){return"function"==typeof p?function(v){try{l(p(v))}catch(y){m(y)}}:t}var l,m,n=new b(function(p,t){l=p;m=t});this.bd(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.bd=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.A=!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=r(g),m=l.next();!m.done;m=l.next())d(m.value).bd(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){p[v]=y;t--;0==t&&l(p)}}var p=[],t=0;do p.push(void 0),t++,d(k.value).bd(n(p.length-1),m),k=h.next();
31
31
  while(!k.done)})};return b});function Ja(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
32
  ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(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
- ea("Map",function(a){function b(){var h={};return h.pb=h.next=h.head=h}function c(h,k){var l=h.g;return fa(function(){if(l){for(;l.head!=h.g;)l=l.pb;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,Aa:p}}return{id:l,
36
- list:m,index:-1,Aa:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=r(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(r([[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.Aa?l.Aa.value=k:(l.Aa={next:this.g,pb:this.g.pb,head:this.g,key:h,value:k},l.list.push(l.Aa),this.g.pb.next=l.Aa,this.g.pb=l.Aa,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.Aa&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.Aa.pb.next=h.Aa.next,h.Aa.next.pb=h.Aa.pb,
38
- h.Aa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.pb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).Aa};e.prototype.get=function(h){return(h=d(this,h).Aa)&&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(),
35
+ ea("Map",function(a){function b(){var h={};return h.rb=h.next=h.head=h}function c(h,k){var l=h.g;return fa(function(){if(l){for(;l.head!=h.g;)l=l.rb;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,Ba:p}}return{id:l,
36
+ list:m,index:-1,Ba:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=r(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(r([[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.Ba?l.Ba.value=k:(l.Ba={next:this.g,rb:this.g.rb,head:this.g,key:h,value:k},l.list.push(l.Ba),this.g.rb.next=l.Ba,this.g.rb=l.Ba,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.Ba&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.Ba.rb.next=h.Ba.next,h.Ba.next.rb=h.Ba.rb,
38
+ h.Ba.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.rb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).Ba};e.prototype.get=function(h){return(h=d(this,h).Ba)&&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});function Ka(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}ea("Array.prototype.keys",function(a){return a?a:function(){return Ka(this,function(b){return b})}});
40
40
  ea("Set",function(a){function b(c){this.g=new Map;if(c){c=r(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(r([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
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});ea("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});
43
43
  function La(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{xa:e,Af:f}}return{xa:-1,Af:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return La(this,b,c).xa}});ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
44
- ea("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 Ma(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+""}
45
- ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ma(this,b,"includes").indexOf(b,c||0)}});ea("Array.prototype.find",function(a){return a?a:function(b,c){return La(this,b,c).Af}});ea("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Ma(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}});
44
+ ea("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 Na(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+""}
45
+ ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Na(this,b,"includes").indexOf(b,c||0)}});ea("Array.prototype.find",function(a){return a?a:function(b,c){return La(this,b,c).Af}});ea("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Na(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}});
46
46
  var Oa="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};ea("Object.assign",function(a){return a||Oa});ea("Array.prototype.values",function(a){return a?a:function(){return Ka(this,function(b,c){return c})}});
47
47
  ea("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});ea("Array.prototype.entries",function(a){return a?a:function(){return Ka(this,function(b,c){return[b,c]})}});
48
- ea("String.prototype.repeat",function(a){return a?a:function(b){var c=Ma(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(b,d)&&c.push(b[d]);return c}});ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
48
+ ea("String.prototype.repeat",function(a){return a?a:function(b){var c=Na(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(b,d)&&c.push(b[d]);return c}});ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
49
49
  ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(b,d)&&c.push([d,b[d]]);return c}});var Pa=this||self;function J(a,b){var c=a.split("."),d=Pa;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
50
50
  @license
51
51
  Shaka Player
@@ -53,8 +53,9 @@ ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(
53
53
  SPDX-License-Identifier: Apache-2.0
54
54
  */
55
55
  function M(a,b){if(b)if(b instanceof Map)for(var c=r(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}
56
- function Qa(a){var b=new M(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}M.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};M.prototype.stopImmediatePropagation=function(){this.g=!0};M.prototype.stopPropagation=function(){};J("shaka.util.FakeEvent",M);function Ra(){}function Sa(){}function Ta(){}function Ua(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];Va.has(a)||(Va.add(a),Ta.apply(Ra,ia(c)))}function Wa(){}function Xa(){}function Ya(){}function Za(){}var Va=new Set;
57
- if(window.console&&window.console.log.bind){var $a={},ab=($a[1]=console.error.bind(console),$a[2]=console.warn.bind(console),$a[3]=console.info.bind(console),$a[4]=console.log.bind(console),$a[5]=console.debug.bind(console),$a[6]=console.debug.bind(console),$a);Ta=ab[2];Sa=ab[1]};function cb(){this.g={}}q=cb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function db(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function eb(){this.Yc=new cb;this.Xc=this}eb.prototype.addEventListener=function(a,b){this.Yc.push(a,b)};eb.prototype.removeEventListener=function(a,b){this.Yc.remove(a,b)};eb.prototype.dispatchEvent=function(a){var b=this.Yc.get(a.type)||[],c=this.Yc.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Xc;a.currentTarget=this.Xc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};function fb(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function gb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}function hb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(b(d.value))return!0;return!1}function ib(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())e=e.value,b(e)&&c.push(e);return c}
56
+ function Qa(a){var b=new M(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}M.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};M.prototype.stopImmediatePropagation=function(){this.g=!0};M.prototype.stopPropagation=function(){};J("shaka.util.FakeEvent",M);function Ra(){}function Sa(){}function Ta(){}function Ua(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];Va.has(a)||(Va.add(a),Ta.apply(Ra,ha(c)))}function Wa(){}function Xa(){}function Ya(){}function Za(){}var Va=new Set;
57
+ if(window.console&&window.console.log.bind){var $a={},ab=($a[1]=console.error.bind(console),$a[2]=console.warn.bind(console),$a[3]=console.info.bind(console),$a[4]=console.log.bind(console),$a[5]=console.debug.bind(console),$a[6]=console.debug.bind(console),$a);Ta=ab[2];Sa=ab[1]};function cb(){this.g={}}q=cb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function db(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function eb(){this.Z=new cb;this.Yc=this}eb.prototype.addEventListener=function(a,b){this.Z&&this.Z.push(a,b)};eb.prototype.removeEventListener=function(a,b){this.Z&&this.Z.remove(a,b)};eb.prototype.dispatchEvent=function(a){if(!this.Z)return!0;var b=this.Z.get(a.type)||[],c=this.Z.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Yc;a.currentTarget=this.Yc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
58
+ eb.prototype.release=function(){this.Z=null};function fb(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function gb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}function hb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(b(d.value))return!0;return!1}function ib(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())e=e.value,b(e)&&c.push(e);return c}
58
59
  var kb=function jb(a){var c;return Ga(jb,function(d){1==d.g&&(c=0);if(3!=d.g)return c<a?u(d,c,3):d.C(0);c++;return d.C(2)})},nb=function lb(a){var c,d,e,f,g,h;return Ga(lb,function(k){1==k.g&&(c=-1,e=d=void 0,f=r(a),g=f.next());if(5!=k.g){if(g.done)return-1==c?k.C(0):u(k,{xa:c,Kg:d,item:e,next:void 0},0);h=g.value;return 0<=c?u(k,{xa:c,item:e,Kg:d,next:h},5):k.C(5)}c++;d=e;e=h;g=f.next();return k.C(2)})};/*
59
60
  @license
60
61
  Copyright 2008 The Closure Library Authors
@@ -65,21 +66,21 @@ var ob=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]
65
66
  Copyright 2006 The Closure Library Authors
66
67
  SPDX-License-Identifier: Apache-2.0
67
68
  */
68
- function pb(a){var b;a instanceof pb?(qb(this,a.Ya),this.Sb=a.Sb,this.$a=a.$a,rb(this,a.jc),this.Ra=a.Ra,sb(this,a.g.clone()),this.Gb=a.Gb):a&&(b=String(a).match(ob))?(qb(this,b[1]||"",!0),this.Sb=tb(b[2]||""),this.$a=tb(b[3]||"",!0),rb(this,b[4]),this.Ra=tb(b[5]||"",!0),sb(this,b[6]||"",!0),this.Gb=tb(b[7]||"")):this.g=new ub(null)}q=pb.prototype;q.Ya="";q.Sb="";q.$a="";q.jc=null;q.Ra="";q.Gb="";
69
- q.toString=function(){var a=[],b=this.Ya;b&&a.push(vb(b,wb,!0),":");if(b=this.$a){a.push("//");var c=this.Sb;c&&a.push(vb(c,wb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.jc;null!=b&&a.push(":",String(b))}if(b=this.Ra)this.$a&&"/"!=b.charAt(0)&&a.push("/"),a.push(vb(b,"/"==b.charAt(0)?xb:yb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Gb)&&a.push("#",vb(b,zb));return a.join("")};
70
- q.resolve=function(a){var b=this.clone();"data"===b.Ya&&(b=new pb);var c=!!a.Ya;c?qb(b,a.Ya):c=!!a.Sb;c?b.Sb=a.Sb:c=!!a.$a;c?b.$a=a.$a:c=null!=a.jc;var d=a.Ra;if(c)rb(b,a.jc);else if(c=!!a.Ra){if("/"!=d.charAt(0))if(this.$a&&!this.Ra)d="/"+d;else{var e=b.Ra.lastIndexOf("/");-1!=e&&(d=b.Ra.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(""):".."==
71
- 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.Ra=d:c=""!==a.g.toString();c?sb(b,a.g.clone()):c=!!a.Gb;c&&(b.Gb=a.Gb);return b};q.clone=function(){return new pb(this)};function qb(a,b,c){a.Ya=c?tb(b,!0):b;a.Ya&&(a.Ya=a.Ya.replace(/:$/,""))}function rb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.jc=b}else a.jc=null}function sb(a,b,c){b instanceof ub?a.g=b:(c||(b=vb(b,Ab)),a.g=new ub(b))}
69
+ function pb(a){var b;a instanceof pb?(qb(this,a.Ya),this.Tb=a.Tb,this.ab=a.ab,rb(this,a.kc),this.Ra=a.Ra,sb(this,a.g.clone()),this.Hb=a.Hb):a&&(b=String(a).match(ob))?(qb(this,b[1]||"",!0),this.Tb=tb(b[2]||""),this.ab=tb(b[3]||"",!0),rb(this,b[4]),this.Ra=tb(b[5]||"",!0),sb(this,b[6]||"",!0),this.Hb=tb(b[7]||"")):this.g=new ub(null)}q=pb.prototype;q.Ya="";q.Tb="";q.ab="";q.kc=null;q.Ra="";q.Hb="";
70
+ q.toString=function(){var a=[],b=this.Ya;b&&a.push(vb(b,wb,!0),":");if(b=this.ab){a.push("//");var c=this.Tb;c&&a.push(vb(c,wb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.kc;null!=b&&a.push(":",String(b))}if(b=this.Ra)this.ab&&"/"!=b.charAt(0)&&a.push("/"),a.push(vb(b,"/"==b.charAt(0)?xb:yb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Hb)&&a.push("#",vb(b,zb));return a.join("")};
71
+ q.resolve=function(a){var b=this.clone();"data"===b.Ya&&(b=new pb);var c=!!a.Ya;c?qb(b,a.Ya):c=!!a.Tb;c?b.Tb=a.Tb:c=!!a.ab;c?b.ab=a.ab:c=null!=a.kc;var d=a.Ra;if(c)rb(b,a.kc);else if(c=!!a.Ra){if("/"!=d.charAt(0))if(this.ab&&!this.Ra)d="/"+d;else{var e=b.Ra.lastIndexOf("/");-1!=e&&(d=b.Ra.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(""):".."==
72
+ 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.Ra=d:c=""!==a.g.toString();c?sb(b,a.g.clone()):c=!!a.Hb;c&&(b.Hb=a.Hb);return b};q.clone=function(){return new pb(this)};function qb(a,b,c){a.Ya=c?tb(b,!0):b;a.Ya&&(a.Ya=a.Ya.replace(/:$/,""))}function rb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.kc=b}else a.kc=null}function sb(a,b,c){b instanceof ub?a.g=b:(c||(b=vb(b,Ab)),a.g=new ub(b))}
72
73
  function tb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function vb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Bb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Bb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var wb=/[#\/\?@]/g,yb=/[#\?:]/g,xb=/[#\?]/g,Ab=/[#\?@]/g,zb=/#/g;function ub(a){this.g=a||null}q=ub.prototype;q.Oa=null;q.dd=null;
73
74
  q.add=function(a,b){if(!this.Oa&&(this.Oa={},this.dd=0,this.g))for(var c=this.g.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.g=null;(c=this.Oa.hasOwnProperty(a)&&this.Oa[a])||(this.Oa[a]=c=[]);c.push(b);this.dd++;return this};
74
- q.toString=function(){if(this.g)return this.g;if(!this.Oa)return"";var a=[],b;for(b in this.Oa)for(var c=encodeURIComponent(b),d=this.Oa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new ub;a.g=this.g;if(this.Oa){var b={},c;for(c in this.Oa)b[c]=this.Oa[c].concat();a.Oa=b;a.dd=this.dd}return a};function O(a,b,c,d){for(var e=[],f=3;f<arguments.length;++f)e[f-3]=arguments[f];this.severity=a;this.category=b;this.code=c;this.data=e;this.handled=!1}O.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};J("shaka.util.Error",O);O.Severity={RECOVERABLE:1,CRITICAL:2};O.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
75
- O.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,
75
+ q.toString=function(){if(this.g)return this.g;if(!this.Oa)return"";var a=[],b;for(b in this.Oa)for(var c=encodeURIComponent(b),d=this.Oa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new ub;a.g=this.g;if(this.Oa){var b={},c;for(c in this.Oa)b[c]=this.Oa[c].concat();a.Oa=b;a.dd=this.dd}return a};function N(a,b,c,d){for(var e=[],f=3;f<arguments.length;++f)e[f-3]=arguments[f];this.severity=a;this.category=b;this.code=c;this.data=e;this.handled=!1}N.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};J("shaka.util.Error",N);N.Severity={RECOVERABLE:1,CRITICAL:2};N.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
76
+ N.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,
76
77
  TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,
77
78
  MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,
78
79
  HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,
79
80
  HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,
80
81
  ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,
81
82
  STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function Cb(a,b){this.g=a;this.h=b}Cb.prototype.toString=function(){return"v"+this.g+"."+this.h};function Db(a,b){var c=new Cb(4,0),d=Eb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Fb(a,b,c,d){Ta([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Gb(a,b,c,d){Sa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Eb=null;function Hb(a,b){return a.concat(b)}function Ib(){}function Jb(a){return null!=a}function Kb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(Db("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){Db("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Mb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new pb(d)});return a.map(function(d){return new pb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Hb,[]).map(function(d){return d.toString()})}function Nb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
82
- function Ob(a,b){if(1==b.length)return b[0];var c=Pb(a,b);if(null!=c)return c;throw new O(2,4,4025,b);}function Pb(a,b){for(var c=r(Qb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Rb?"":null}var Rb="text",Sb={ib:"video",Bb:"audio",qa:Rb,vc:"image",jh:"application"},Qb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Tb(a,b){a=Ub(a);b=Ub(b);return a.split("-")[0]==b.split("-")[0]}function Vb(a,b){a=Ub(a);b=Ub(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Wb(a,b){a=Ub(a);b=Ub(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Ub(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Xb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Yb(a,b){a=Ub(a);b=Ub(b);return b==a?4:Vb(b,a)?3:Wb(b,a)?2:Vb(a,b)?1:0}
83
+ function Ob(a,b){if(1==b.length)return b[0];var c=Pb(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function Pb(a,b){for(var c=r(Qb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Rb?"":null}var Rb="text",Sb={ib:"video",Cb:"audio",ra:Rb,wc:"image",jh:"application"},Qb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Tb(a,b){a=Ub(a);b=Ub(b);return a.split("-")[0]==b.split("-")[0]}function Vb(a,b){a=Ub(a);b=Ub(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Wb(a,b){a=Ub(a);b=Ub(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Ub(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Xb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Yb(a,b){a=Ub(a);b=Ub(b);return b==a?4:Vb(b,a)?3:Wb(b,a)?2:Vb(a,b)?1:0}
83
84
  function Zb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Xb.get(a)||a}function $b(a){return a.language?Ub(a.language):a.audio&&a.audio.language?Ub(a.audio.language):a.video&&a.video.language?Ub(a.video.language):"und"}
84
85
  function ac(a,b){for(var c=Ub(a),d=new Set,e=r(b),f=e.next();!f.done;f=e.next())d.add(Ub(f.value));e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Vb(f,c))return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Wb(f,c))return f;d=r(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Vb(c,f))return f;return null}
85
86
  var Xb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
@@ -87,14 +88,13 @@ var Xb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
87
88
  "is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
88
89
  "mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
89
90
  "sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
90
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function bc(a){this.l=Ub(a);this.j=new Map;this.h=new Set;this.i=new Map;this.g=new eb}q=bc.prototype;q.addEventListener=function(a,b,c){this.g.addEventListener(a,b,c)};q.removeEventListener=function(a,b,c){this.g.removeEventListener(a,b,c||void 0)};q.dispatchEvent=function(a){return this.g.dispatchEvent(a)};
91
- q.Me=function(a){var b=this;this.h.clear();a=r(a);for(var c=a.next();!c.done;c=a.next())this.h.add(Ub(c.value));cc(this);a=ib(this.h,function(d){return!b.i.has(d)});a.length&&this.g.dispatchEvent(new M("unknown-locales",(new Map).set("locales",a)));a=ib(this.h,function(d){return b.i.has(d)});a=(new Map).set("locales",a.length?a:[this.l]);this.g.dispatchEvent(new M("locale-changed",a))};
92
- q.ka=function(a,b,c){a=Ub(a);void 0===c&&(c=dc);var d=this.i.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=dc||d.set(f,e)});this.i.set(a,d);cc(this);this.g.dispatchEvent(new M("locale-updated"));return this};q.Tg=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.j.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.h)).set("missing",a);this.g.dispatchEvent(new M("unknown-localization",a));return""};
93
- function cc(a){for(var b=a.i,c=a.l,d=a.h,e=new Set,f={},g=r(d),h=g.next();!h.done;f={Xb:f.Xb},h=g.next()){f.Xb=h.value;e.add(f.Xb);e.add(Zb(f.Xb));h=ib(b.keys(),function(l){return function(m){var n=l.Xb,p=Zb(m),t=Zb(n);return m!=p&&n!=t&&p==t}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=ib(b.keys(),function(l){return function(m){return Zb(m)==l.Xb}}(f));h.sort();k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=r(e);for(h=e.next();!h.done;h=e.next())(h=
94
- b.get(h.value))&&c.push(h);c.reverse();a.j.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.j.set(m,l)});b=a.j.keys();e=new Set;c=r(a.h);for(h=c.next();!h.done;h=c.next())h=a.i.get(h.value)||new Map,ec(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.g.dispatchEvent(new M("missing-localizations",d)))}function ec(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}J("shaka.ui.Localization",bc);
95
- bc.prototype.resolve=bc.prototype.resolve;bc.prototype.resolveDictionary=bc.prototype.Tg;bc.prototype.insert=bc.prototype.ka;bc.prototype.changeLocale=bc.prototype.Me;bc.prototype.dispatchEvent=bc.prototype.dispatchEvent;bc.prototype.removeEventListener=bc.prototype.removeEventListener;bc.prototype.addEventListener=bc.prototype.addEventListener;var dc=1;bc.ConflictResolution={USE_OLD:0,USE_NEW:dc};bc.UNKNOWN_LOCALES="unknown-locales";bc.UNKNOWN_LOCALIZATION="unknown-localization";
96
- bc.MISSING_LOCALIZATIONS="missing-localizations";bc.LOCALE_CHANGED="locale-changed";bc.LOCALE_UPDATED="locale-updated";var fc={Nh:"OFF",Kh:"MUTE",Th:"PLAY",Xh:"REWIND",Bh:"FAST_FORWARD",mi:"UNMUTE",pi:"VOLUME",ph:"CAST",sh:"ENTER_PICTURE_IN_PICTURE",Eh:"LOOP",Dh:"LANGUAGE",li:"UNDETERMINED_LANGUAGE",Vh:"REPLAY",oh:"CAPTIONS",kh:"AUTO_QUALITY",xh:"EXIT_PICTURE_IN_PICTURE",wh:"EXIT_LOOP_MODE",hh:"AD_TIME",Ie:"LIVE",Uh:"PLAYBACK_RATE",Zh:"SEEK",ih:"AIRPLAY",Sh:"PICTURE_IN_PICTURE",vh:"EXIT_FULL_SCREEN",Mh:"NOT_APPLICABLE",gh:"AD_DURATION",Oh:"ON",ai:"SKIP_TO_LIVE",rh:"ENTER_LOOP_MODE",AD_PROGRESS:"AD_PROGRESS",Wh:"RESOLUTION",
97
- Jh:"MULTIPLE_LANGUAGES",Cf:"SUBTITLE_FORCED",Ih:"MORE_SETTINGS",Ch:"FULL_SCREEN",Rh:"PAUSE",ni:"UNRECOGNIZED_LANGUAGE",BACK:"BACK",$h:"SKIP_AD"};function gc(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}function hc(a,b,c){var d=Math.pow(a.i,b);c=c*(1-d)+d*a.g;isNaN(c)||(a.g=c,a.h+=b)}function ic(a){return a.g/(1-Math.pow(a.i,a.h))};function jc(){this.h=new gc(2);this.i=new gc(5);this.g=0}jc.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(ic(this.h),ic(this.i))};function kc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function lc(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function mc(a,b,c){c||(c=kc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Ed:d.Ed},e=a.next()){d.Ed=e.value;e=b.findIndex(function(f){return function(g){return c(f.Ed,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
91
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function bc(a){eb.call(this);this.j=Ub(a);this.i=new Map;this.g=new Set;this.h=new Map}qa(bc,eb);q=bc.prototype;q.release=function(){eb.prototype.release.call(this)};
92
+ q.Me=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Ub(c.value));cc(this);a=ib(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new M("unknown-locales",(new Map).set("locales",a)));a=ib(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new M("locale-changed",a))};
93
+ q.ka=function(a,b,c){a=Ub(a);void 0===c&&(c=dc);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=dc||d.set(f,e)});this.h.set(a,d);cc(this);this.dispatchEvent(new M("locale-updated"));return this};q.Tg=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new M("unknown-localization",a));return""};
94
+ function cc(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=r(d),h=g.next();!h.done;f={Yb:f.Yb},h=g.next()){f.Yb=h.value;e.add(f.Yb);e.add(Zb(f.Yb));h=ib(b.keys(),function(l){return function(m){var n=l.Yb,p=Zb(m),t=Zb(n);return m!=p&&n!=t&&p==t}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=ib(b.keys(),function(l){return function(m){return Zb(m)==l.Yb}}(f));h.sort();k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=r(e);for(h=e.next();!h.done;h=e.next())(h=
95
+ b.get(h.value))&&c.push(h);c.reverse();a.i.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=r(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,ec(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new M("missing-localizations",d)))}function ec(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}J("shaka.ui.Localization",bc);
96
+ bc.prototype.resolve=bc.prototype.resolve;bc.prototype.resolveDictionary=bc.prototype.Tg;bc.prototype.insert=bc.prototype.ka;bc.prototype.changeLocale=bc.prototype.Me;bc.prototype.release=bc.prototype.release;var dc=1;bc.ConflictResolution={USE_OLD:0,USE_NEW:dc};bc.UNKNOWN_LOCALES="unknown-locales";bc.UNKNOWN_LOCALIZATION="unknown-localization";bc.MISSING_LOCALIZATIONS="missing-localizations";bc.LOCALE_CHANGED="locale-changed";bc.LOCALE_UPDATED="locale-updated";var fc={Cf:"SUBTITLE_FORCED",li:"UNDETERMINED_LANGUAGE",Dh:"LANGUAGE",vh:"EXIT_FULL_SCREEN",Rh:"PAUSE",Uh:"PLAYBACK_RATE",pi:"VOLUME",wh:"EXIT_LOOP_MODE",hh:"AD_TIME",mi:"UNMUTE",oh:"CAPTIONS",xh:"EXIT_PICTURE_IN_PICTURE",BACK:"BACK",Jh:"MULTIPLE_LANGUAGES",gh:"AD_DURATION",Ch:"FULL_SCREEN",AD_PROGRESS:"AD_PROGRESS",sh:"ENTER_PICTURE_IN_PICTURE",Ih:"MORE_SETTINGS",ai:"SKIP_TO_LIVE",Ie:"LIVE",Eh:"LOOP",Nh:"OFF",Vh:"REPLAY",Zh:"SEEK",Oh:"ON",ih:"AIRPLAY",rh:"ENTER_LOOP_MODE",kh:"AUTO_QUALITY",ni:"UNRECOGNIZED_LANGUAGE",
97
+ $h:"SKIP_AD",Bh:"FAST_FORWARD",Th:"PLAY",Wh:"RESOLUTION",ph:"CAST",Xh:"REWIND",Mh:"NOT_APPLICABLE",Kh:"MUTE",Sh:"PICTURE_IN_PICTURE"};function gc(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}function hc(a,b,c){var d=Math.pow(a.i,b);c=c*(1-d)+d*a.g;isNaN(c)||(a.g=c,a.h+=b)}function ic(a){return a.g/(1-Math.pow(a.i,a.h))};function jc(){this.h=new gc(2);this.i=new gc(5);this.g=0}jc.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(ic(this.h),ic(this.i))};function kc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function lc(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function mc(a,b,c){c||(c=kc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Ed:d.Ed},e=a.next()){d.Ed=e.value;e=b.findIndex(function(f){return function(g){return c(f.Ed,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
98
98
  function nc(a,b,c){c||(c=kc);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function oc(a,b,c){this.startTime=a;this.direction=pc;this.endTime=b;this.payload=c;this.region=new qc;this.position=null;this.positionAlign=rc;this.size=0;this.textAlign=sc;this.writingMode=tc;this.lineInterpretation=uc;this.line=null;this.lineHeight="";this.lineAlign=vc;this.displayAlign=wc;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=xc;this.fontStyle=yc;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
99
99
  [];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}oc.prototype.clone=function(){var a=new oc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
100
100
  function zc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!nc(a.nestedCues,b.nestedCues,zc))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!nc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}J("shaka.text.Cue",oc);var rc="auto";
@@ -102,21 +102,21 @@ oc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:rc};v
102
102
  oc.lineInterpretation={LINE_NUMBER:uc,PERCENTAGE:1};var vc="start",Cc={CENTER:"center",START:vc,END:"end"};oc.lineAlign=Cc;var Dc={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};oc.defaultTextColor=Dc;var Ec={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};oc.defaultTextBackgroundColor=Ec;var xc=400;oc.fontWeight={NORMAL:xc,BOLD:700};
103
103
  var yc="normal",Fc={NORMAL:yc,ITALIC:"italic",OBLIQUE:"oblique"};oc.fontStyle=Fc;oc.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function qc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Gc;this.scroll=Hc}J("shaka.text.CueRegion",qc);var Gc=1;qc.units={PX:0,PERCENTAGE:Gc,LINES:2};var Hc="";qc.scrollMode={NONE:Hc,UP:"up"};function Ic(){}function Jc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Kc(a)==Kc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Lc(a),d=Lc(b),e=r(kb(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}function Kc(a){return a instanceof ArrayBuffer?a:a.buffer}function Mc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
104
104
  function Lc(a,b,c){c=void 0===c?Infinity:c;return Nc(a,void 0===b?0:b,c,Uint8Array)}function Oc(a,b,c){c=void 0===c?Infinity:c;return Nc(a,void 0===b?0:b,c,DataView)}function Nc(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Kc(a),b,Math.min(b+Math.max(c,0),e)-b)}J("shaka.util.BufferUtils",Ic);Ic.toDataView=Oc;Ic.toUint8=Lc;Ic.toArrayBuffer=Mc;Ic.equal=Jc;function Pc(){}J("shaka.dependencies",Pc);Pc.has=function(a){return Qc.has(a)};Pc.add=function(a,b){if(!Rc[a])throw Error(a+" is not supported");Qc.set(a,function(){return b})};var Rc={muxjs:"muxjs"};Pc.Allowed=Rc;var Qc=new Map([["muxjs",function(){return window.muxjs}]]);function Sc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Sc.prototype.resolve=function(){};Sc.prototype.reject=function(){};function Tc(a){this.h=a;this.g=void 0}Tc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Uc(){}function Vc(a){if(!a)return"";a=Lc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=(new TextDecoder).decode(a);a.includes("\ufffd")&&Sa('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!');return a}
105
- function Wc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new O(2,2,2004);var d=Math.floor(a.byteLength/2);c=new Uint16Array(d);a=Oc(a);d=r(kb(d));for(var e=d.next();!e.done;e=d.next())e=e.value,c[e]=a.getUint16(2*e,b);return Xc.value()(c)}
106
- function Yc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Lc(a);if(239==c[0]&&187==c[1]&&191==c[2])return Vc(c);if(254==c[0]&&255==c[1])return Wc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Wc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Wc(a,!1);if(0==c[1]&&0==c[3])return Wc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Vc(a);throw new O(2,2,2003);}function Zc(a){var b=new TextEncoder;return Mc(b.encode(a))}
105
+ function Wc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(2,2,2004);var d=Math.floor(a.byteLength/2);c=new Uint16Array(d);a=Oc(a);d=r(kb(d));for(var e=d.next();!e.done;e=d.next())e=e.value,c[e]=a.getUint16(2*e,b);return Xc.value()(c)}
106
+ function Yc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Lc(a);if(239==c[0]&&187==c[1]&&191==c[2])return Vc(c);if(254==c[0]&&255==c[1])return Wc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Wc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Wc(a,!1);if(0==c[1]&&0==c[3])return Wc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Vc(a);throw new N(2,2,2003);}function Zc(a){var b=new TextEncoder;return Mc(b.encode(a))}
107
107
  function $c(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=r(nb(a)),f=e.next();!f.done;f=e.next())f=f.value,d.setUint16(2*f.xa,f.item.charCodeAt(0),b);return c}J("shaka.util.StringUtils",Uc);Uc.resetFromCharCode=function(){Xc.g=void 0};Uc.toUTF16=$c;Uc.toUTF8=Zc;Uc.fromBytesAutoDetect=Yc;Uc.fromUTF16=Wc;Uc.fromUTF8=Vc;
108
- var Xc=new Tc(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={sb:65536};0<b.sb;b={sb:b.sb},b.sb/=2)if(a(b.sb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.sb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.sb));return e}}(b);return null});function ad(){}function bd(a){a=Lc(a);a=Xc.value()(a);return btoa(a)}function cd(a,b){b=void 0==b?!0:b;var c=bd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function dd(a){var b=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));a=new Uint8Array(b.length);b=r(nb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.xa]=c.item.charCodeAt(0);return a}
108
+ var Xc=new Tc(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={ub:65536};0<b.ub;b={ub:b.ub},b.ub/=2)if(a(b.ub))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.ub)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.ub));return e}}(b);return null});function ad(){}function bd(a){a=Lc(a);a=Xc.value()(a);return btoa(a)}function cd(a,b){b=void 0==b?!0:b;var c=bd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function dd(a){var b=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));a=new Uint8Array(b.length);b=r(nb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.xa]=c.item.charCodeAt(0);return a}
109
109
  function ed(a){var b=a.length/2,c=new Uint8Array(b);b=r(kb(b));for(var d=b.next();!d.done;d=b.next())d=d.value,c[d]=window.parseInt(a.substr(2*d,2),16);return c}function fd(a){var b=Lc(a);a="";b=r(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}
110
110
  function gd(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];var d=0,e=r(b);for(c=e.next();!c.done;c=e.next())d+=c.value.byteLength;d=new Uint8Array(d);e=0;b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,d.set(Lc(c),e),e+=c.byteLength;return d}J("shaka.util.Uint8ArrayUtils",ad);ad.concat=gd;ad.toHex=fd;ad.fromHex=ed;ad.fromBase64=dd;ad.toBase64=cd;ad.toStandardBase64=bd;
111
- ad.equal=function(a,b){Db("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Jc(a,b)};function hd(){var a=this;this.A=Qc.get("muxjs")();this.g=new this.A.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.o=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.o.push(gd(b.initSegment,b.data))});this.g.on("done",function(){var b={data:gd.apply(ad,ia(a.o)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}hd.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
111
+ ad.equal=function(a,b){Db("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Jc(a,b)};function hd(){var a=this;this.A=Qc.get("muxjs")();this.g=new this.A.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.o=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.o.push(gd(b.initSegment,b.data))});this.g.on("done",function(){var b={data:gd.apply(ad,ha(a.o)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}hd.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
112
112
  function id(a,b){if(!Qc.get("muxjs")()||!jd(a))return!1;if(b)return MediaSource.isTypeSupported(kd(b,a));var c=kd("audio",a),d=kd("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function jd(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
113
- function kd(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 ld(a,b){a.l=!0;a.h=new Sc;a.o=[];a.j=[];a.i=[];var c=Lc(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new O(2,3,3018));return a.h};function md(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function nd(a,b,c){a=md(a,b);return Qc.get("muxjs")()&&jd(a)?kd(c,a):a}function od(a){a=a.split(".");var b=a[0];a.pop();return b}function pd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function qd(a){this.A=null;this.i=a;this.j=this.D=0;this.l=Infinity;this.h=this.g=null;this.B="";this.o=new Map}function rd(a){return sd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}qd.prototype.destroy=function(){this.i=this.A=null;this.o.clear();return Promise.resolve()};
113
+ function kd(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 ld(a,b){a.l=!0;a.h=new Sc;a.o=[];a.j=[];a.i=[];var c=Lc(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function md(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function nd(a,b,c){a=md(a,b);return Qc.get("muxjs")()&&jd(a)?kd(c,a):a}function od(a){a=a.split(".");var b=a[0];a.pop();return b}function pd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function qd(a){this.A=null;this.i=a;this.j=this.D=0;this.l=Infinity;this.h=this.g=null;this.B="";this.o=new Map}function rd(a){return sd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}qd.prototype.destroy=function(){this.i=this.A=null;this.o.clear();return Promise.resolve()};
114
114
  function td(a,b,c,d){var e,f,g;return H(function(h){if(1==h.g)return u(h,Promise.resolve(),2);if(!a.A||!a.i)return h["return"]();if(null==c||null==d)return a.A.parseInit(Lc(b)),h["return"]();e={periodStart:a.D,segmentStart:c,segmentEnd:d};f=a.A.parseMedia(Lc(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.l});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.l);z(h)})}
115
115
  qd.prototype.remove=function(a,b){var c=this;return H(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));z(d)})};function ud(a,b,c){a.j=b;a.l=c}function vd(a,b,c){a.B=b;if(b=a.o.get(b))for(var d=r(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)}
116
116
  function wd(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new oc(c.startTime,c.endTime,c.text)});return b}function xd(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())xd(a,d.value,c)}
117
117
  function yd(a,b,c,d,e){var f=c+" "+d,g=new Map;b=r(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,[]);xd(a,k,e);k.startTime>=a.j&&k.startTime<a.l&&(g.get(h).get(f).push(k),h==a.B&&a.i.append([k]))}e=r(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=r(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,
118
- a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.l))}J("shaka.text.TextEngine",qd);qd.prototype.destroy=qd.prototype.destroy;qd.findParser=function(a){return sd[a]};qd.unregisterParser=function(a){delete sd[a]};qd.registerParser=function(a,b){sd[a]=b};var sd={};function zd(a){this.h=a;this.g=null}zd.prototype.T=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};zd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function P(a){this.h=a;this.g=null}P.prototype.Da=function(){this.stop();this.h();return this};P.prototype.T=function(a){var b=this;this.stop();this.g=(new zd(function(){b.h()})).T(a);return this};P.prototype.oa=function(a){var b=this;this.stop();this.g=(new zd(function(){b.g.T(a);b.h()})).T(a);return this};P.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};J("shaka.util.Timer",P);P.prototype.stop=P.prototype.stop;P.prototype.tickEvery=P.prototype.oa;P.prototype.tickAfter=P.prototype.T;
119
- P.prototype.tickNow=P.prototype.Da;function Ad(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Bd(a){return""!=Cd().canPlayType(a)}function Dd(){return Ed("Tizen")}function Fd(){return Ed("CrKey")}function Gd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Dd()}function Hd(){if(!Gd())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}
118
+ a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.l))}J("shaka.text.TextEngine",qd);qd.prototype.destroy=qd.prototype.destroy;qd.findParser=function(a){return sd[a]};qd.unregisterParser=function(a){delete sd[a]};qd.registerParser=function(a,b){sd[a]=b};var sd={};function zd(a){this.h=a;this.g=null}zd.prototype.T=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};zd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function P(a){this.h=a;this.g=null}P.prototype.Ea=function(){this.stop();this.h();return this};P.prototype.T=function(a){var b=this;this.stop();this.g=(new zd(function(){b.h()})).T(a);return this};P.prototype.oa=function(a){var b=this;this.stop();this.g=(new zd(function(){b.g.T(a);b.h()})).T(a);return this};P.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};J("shaka.util.Timer",P);P.prototype.stop=P.prototype.stop;P.prototype.tickEvery=P.prototype.oa;P.prototype.tickAfter=P.prototype.T;
119
+ P.prototype.tickNow=P.prototype.Ea;function Ad(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Bd(a){return""!=Cd().canPlayType(a)}function Dd(){return Ed("Tizen")}function Fd(){return Ed("CrKey")}function Gd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Dd()}function Hd(){if(!Gd())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}
120
120
  function Ed(a){return(navigator.userAgent||"").includes(a)}function Cd(){if(Id)return Id;Jd||(Jd=new P(function(){Id=null}));(Id=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Id=document.createElement("video"));Jd.T(1);return Id}var Jd=null,Id=null;function Kd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Ld(f,b,c);f=Md(f,d);b=Nd(f);b=Od(b);var g=Pd(b,e);a.variants=a.variants.filter(function(h){return Qd(h)==g?!0:!1})}function Nd(a){var b=new cb;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Qd(c);b.push(d,c)}return b}
121
121
  function Od(a){var b=0,c=new Map,d=a.size();db(a,function(e,f){for(var g=r(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new cb);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
122
122
  function Ld(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={Pd:d.Pd},e=b.next())if(d.Pd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Pd)}}(d)),e.length){a=e;break}d={};c=r(c);for(b=c.next();!b.done;d={Bd:d.Bd},b=c.next())if(d.Bd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Bd)}}(d)),b.length){a=b;break}return a}
@@ -144,7 +144,7 @@ audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayo
144
144
  function ne(a){var b=oe(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function pe(a){var b=oe(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
145
145
  function oe(a){return{id:le(a),active:!1,type:"",bandwidth:0,language:Ub(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null}}
146
146
  function qe(a){return a.allowedByApplication&&a.allowedByKeySystem}function re(a){return a.filter(function(b){return qe(b)})}
147
- function Md(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=r(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ia(e))):d.get(Math.min.apply(Math,ia(c)))}
147
+ function Md(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=r(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ha(e))):d.get(Math.min.apply(Math,ha(c)))}
148
148
  function se(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=ac(Ub(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Ub(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=te(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(Hb,[]);return a.length?
149
149
  te(e,a[0]):e}function te(a,b){return a.filter(function(c){return c.roles.includes(b)})}function fe(a){var b=[];a.audio&&b.push(ue(a.audio));a.video&&b.push(ue(a.video));return b.join(", ")}
150
150
  function ue(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"}var me=0,Rd="smooth",Sd="powerEfficient",Ud="bandwidth";function ve(){var a=this;this.j=null;this.h=!1;this.g=new jc;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.s.useNetworkInformation&&a.h){a.g=new jc;var b=a.chooseVariant();b&&a.j(b)}});this.i=[];this.o=1;this.A=!1;this.s=this.l=null}q=ve.prototype;q.stop=function(){this.j=null;this.h=!1;this.i=[];this.o=1;this.l=null};q.init=function(a){this.j=a};
@@ -152,78 +152,78 @@ q.chooseVariant=function(){var a=we(this.s.restrictions,this.i),b=this.g.getBand
152
152
  q.disable=function(){this.h=!1};q.segmentDownloaded=function(a,b){var c=this.g;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.g+=b;hc(c.h,e,d);hc(c.i,e,d)}if(null!=this.l&&this.h)a:{if(!this.A){if(!(128E3<=this.g.g))break a;this.A=!0}else if(Date.now()-this.l<1E3*this.s.switchInterval)break a;c=this.chooseVariant();this.g.getBandwidthEstimate(xe(this));c&&this.j(c)}};q.getBandwidthEstimate=function(){return this.g.getBandwidthEstimate(this.s.defaultBandwidthEstimate)};q.setVariants=function(a){this.i=a};
153
153
  q.playbackRateChanged=function(a){this.o=a};q.configure=function(a){this.s=a};function xe(a){var b=a.s.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.s.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function we(a,b){a&&(b=b.filter(function(c){return Xd(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}J("shaka.abr.SimpleAbrManager",ve);ve.prototype.configure=ve.prototype.configure;
154
154
  ve.prototype.playbackRateChanged=ve.prototype.playbackRateChanged;ve.prototype.setVariants=ve.prototype.setVariants;ve.prototype.getBandwidthEstimate=ve.prototype.getBandwidthEstimate;ve.prototype.segmentDownloaded=ve.prototype.segmentDownloaded;ve.prototype.disable=ve.prototype.disable;ve.prototype.enable=ve.prototype.enable;ve.prototype.chooseVariant=ve.prototype.chooseVariant;ve.prototype.init=ve.prototype.init;ve.prototype.stop=ve.prototype.stop;function ye(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=r(b),d=c.next();!d.done;d=c.next())this.add(d.value)}ye.prototype.add=function(a){return ze(this.h,a)?(this.g.add(a),!0):!1};
155
- function ze(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&Be(c,d)&&Ce(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(Be(c,d)&&Ce(c.roles,d.roles)));return c?!1:!0}ye.prototype.values=function(){return this.g.values()};
156
- function Be(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(g){return od(g)}),d=b.codecs.split(",").map(function(g){return od(g)});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=r(kb(c.length)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}
155
+ function ze(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&Ae(c,d)&&Ce(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(Ae(c,d)&&Ce(c.roles,d.roles)));return c?!1:!0}ye.prototype.values=function(){return this.g.values()};
156
+ function Ae(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(g){return od(g)}),d=b.codecs.split(",").map(function(g){return od(g)});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=r(kb(c.length)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}
157
157
  function Ce(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=r(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function De(a){this.g=a;this.h=new Ee(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}De.prototype.create=function(a){var b=this,c=a.filter(function(d){return ze(b.g,d)});return c.length?new ye(c[0],c):this.h.create(a)};function Ee(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
158
158
  Ee.prototype.create=function(a){var b=[];b=Fe(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Ge(b,this.j);a.length&&(b=a);this.g&&(a=Md(b,this.g),a.length&&(b=a));this.h&&(a=He(b,this.h),a.length&&(b=a));a=new ye(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,ze(a.h,c)&&a.add(c);return a};function Fe(a,b){var c=Ub(b),d=ac(c,a.map(function(e){return $b(e)}));return d?a.filter(function(e){return d==$b(e)}):[]}
159
159
  function Ge(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function He(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Ie(){this.g=Je;this.h=(new Map).set(Je,2).set(Ke,1)}function Le(a,b,c){a.h.set(Je,c).set(Ke,b)}var Ke=0,Je=1;function Me(a,b){var c=Ne();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.A=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.o=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
160
- function Oe(a){var b,c;return H(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new O(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.A);return u(d,new Promise(function(e){(new P(e)).T(c/1E3)}),2)}a.h*=a.o;z(d)})}function Ne(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Pe(a,b){this.promise=a;this.i=b;this.g=!1}function Qe(a){return new Pe(Promise.reject(a),function(){return Promise.resolve()})}function Re(){var a=Promise.reject(new O(2,7,7001));a["catch"](function(){});return new Pe(a,function(){return Promise.resolve()})}function Se(a){return new Pe(Promise.resolve(a),function(){return Promise.resolve()})}function Te(a){return new Pe(a,function(){return a["catch"](function(){})})}Pe.prototype.abort=function(){this.g=!0;return this.i()};
160
+ function Oe(a){var b,c;return H(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new N(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.A);return u(d,new Promise(function(e){(new P(e)).T(c/1E3)}),2)}a.h*=a.o;z(d)})}function Ne(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Pe(a,b){this.promise=a;this.i=b;this.g=!1}function Qe(a){return new Pe(Promise.reject(a),function(){return Promise.resolve()})}function Re(){var a=Promise.reject(new N(2,7,7001));a["catch"](function(){});return new Pe(a,function(){return Promise.resolve()})}function Se(a){return new Pe(Promise.resolve(a),function(){return Promise.resolve()})}function Te(a){return new Pe(a,function(){return a["catch"](function(){})})}Pe.prototype.abort=function(){this.g=!0;return this.i()};
161
161
  function Ue(a){return new Pe(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Pe.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
162
- Pe.prototype.ra=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Ve(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Sc,g=new O(2,7,7001);this.promise.then(c(!0),c(!1));return new Pe(f,function(){return d()})};
163
- function Ve(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()}}}J("shaka.util.AbortableOperation",Pe);Pe.prototype.chain=Pe.prototype.ra;Pe.prototype["finally"]=Pe.prototype["finally"];Pe.all=Ue;Pe.prototype.abort=Pe.prototype.abort;Pe.notAbortable=Te;Pe.completed=Se;Pe.aborted=Re;Pe.failed=Qe;function We(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 Xe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ye(){this.g=[]}function Ze(a,b){a.g.push(b["finally"](function(){lc(a.g,b)}))}Ye.prototype.destroy=function(){for(var a=[],b=r(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 $e(a){eb.call(this);this.i=!1;this.l=new Ye;this.g=new Set;this.h=new Set;this.j=a||null;this.o=!1}qa($e,eb);q=$e.prototype;q.ve=function(a){this.o=a};function af(a,b,c,d){c=c||bf;var e=cf[a];if(!e||c>=e.priority)cf[a]={priority:c,Jg:b,Lg:void 0===d?!1:d}}q.Mg=function(a){this.g.add(a)};q.bh=function(a){this.g["delete"](a)};q.Kf=function(){this.g.clear()};q.Ng=function(a){this.h.add(a)};q.dh=function(a){this.h["delete"](a)};q.Lf=function(){this.h.clear()};
164
- function df(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();return this.l.destroy()};
165
- q.request=function(a,b){var c=this,d=new ef;if(this.i){var e=Promise.reject(new O(2,7,7001));e["catch"](function(){});return new ff(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?We(b.retryParameters):Ne();b.uris=We(b.uris);e=gf(this,a,b);var f=e.ra(function(){return hf(c,a,b,new Me(b.retryParameters,!1),0,null,d)}),g=f.ra(function(n){return jf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
166
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.ra(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.yg||!c.j||t.fromCache||a!=kf||c.j(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new ff(m.promise,function(){return m.abort()},d);Ze(this.l,e);return e};
167
- function gf(a,b,c){var d=Se(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Kd:e.Kd},f=a.next())e.Kd=f.value,d=d.ra(function(g){return function(){c.body&&(c.body=Mc(c.body));return g.Kd(b,c)}}(e));return d.ra(void 0,function(g){if(g instanceof O&&7001==g.code)throw g;throw new O(2,1,1006,g);})}
168
- function hf(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new pb(c.uris[e]),k=h.Ya,l=!1;k||(k=location.protocol,k=k.slice(0,-1),qb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=cf[k])?k.Jg:null;if(!m)return Qe(new O(2,1,1E3,h));var n=k.Lg,p=null,t=null,v=!1,y;return Te(Oe(d)).ra(function(){if(a.i)return Re();y=Date.now();var x=m(c.uris[e],c,b,function(D,B,F){p&&p.stop();t&&t.T(C/1E3);a.j&&b==kf&&(a.j(D,B),l=!0,g.g=F)});if(!n)return x;var w=c.retryParameters.connectionTimeout;
169
- w&&(p=new P(function(){v=!0;x.abort()}),p.T(w/1E3));var C=c.retryParameters.stallTimeout;C&&(t=new P(function(){v=!0;x.abort()}));return x}).ra(function(x){p&&p.stop();t&&t.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-y);return{response:x,yg:l}},function(x){p&&p.stop();t&&t.stop();if(a.i)return Re();v&&(x=new O(1,1,1003,c.uris[e],b));if(x instanceof O){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity){var w=(new Map).set("error",x);w=new M("retry",w);a.dispatchEvent(w);e=(e+1)%c.uris.length;
170
- return hf(a,b,c,d,e,x,g)}}throw x;})}function jf(a,b,c){var d=Se(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Ld:e.Ld},f=a.next())e.Ld=f.value,d=d.ra(function(g){return function(){var h=c.response;h.data&&(h.data=Mc(h.data));return g.Ld(b,h)}}(e));return d.ra(function(){return c},function(g){var h=2;if(g instanceof O){if(7001==g.code)throw g;h=g.severity}throw new O(h,1,1007,g);})}J("shaka.net.NetworkingEngine",$e);$e.prototype.request=$e.prototype.request;$e.prototype.destroy=$e.prototype.destroy;
162
+ Pe.prototype.sa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Ve(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Sc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Pe(f,function(){return d()})};
163
+ function Ve(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()}}}J("shaka.util.AbortableOperation",Pe);Pe.prototype.chain=Pe.prototype.sa;Pe.prototype["finally"]=Pe.prototype["finally"];Pe.all=Ue;Pe.prototype.abort=Pe.prototype.abort;Pe.notAbortable=Te;Pe.completed=Se;Pe.aborted=Re;Pe.failed=Qe;function We(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 Xe(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ye(){this.g=[]}function Ze(a,b){a.g.push(b["finally"](function(){lc(a.g,b)}))}Ye.prototype.destroy=function(){for(var a=[],b=r(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 $e(a){eb.call(this);this.i=!1;this.l=new Ye;this.g=new Set;this.h=new Set;this.j=a||null;this.o=!1}qa($e,eb);q=$e.prototype;q.ve=function(a){this.o=a};function af(a,b,c,d){c=c||bf;var e=cf[a];if(!e||c>=e.priority)cf[a]={priority:c,Jg:b,Lg:void 0===d?!1:d}}q.Mg=function(a){this.g.add(a)};q.bh=function(a){this.g["delete"](a)};q.Kf=function(){this.g.clear()};q.Ng=function(a){this.h.add(a)};q.dh=function(a){this.h["delete"](a)};q.Lf=function(){this.h.clear()};
164
+ function df(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();eb.prototype.release.call(this);return this.l.destroy()};
165
+ q.request=function(a,b){var c=this,d=new ef;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new ff(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?We(b.retryParameters):Ne();b.uris=We(b.uris);e=gf(this,a,b);var f=e.sa(function(){return hf(c,a,b,new Me(b.retryParameters,!1),0,null,d)}),g=f.sa(function(n){return jf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
166
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.sa(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.yg||!c.j||t.fromCache||a!=kf||c.j(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new ff(m.promise,function(){return m.abort()},d);Ze(this.l,e);return e};
167
+ function gf(a,b,c){var d=Se(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Kd:e.Kd},f=a.next())e.Kd=f.value,d=d.sa(function(g){return function(){c.body&&(c.body=Mc(c.body));return g.Kd(b,c)}}(e));return d.sa(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
168
+ function hf(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new pb(c.uris[e]),k=h.Ya,l=!1;k||(k=location.protocol,k=k.slice(0,-1),qb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=cf[k])?k.Jg:null;if(!m)return Qe(new N(2,1,1E3,h));var n=k.Lg,p=null,t=null,v=!1,y;return Te(Oe(d)).sa(function(){if(a.i)return Re();y=Date.now();var x=m(c.uris[e],c,b,function(D,B,F){p&&p.stop();t&&t.T(C/1E3);a.j&&b==kf&&(a.j(D,B),l=!0,g.g=F)});if(!n)return x;var w=c.retryParameters.connectionTimeout;
169
+ w&&(p=new P(function(){v=!0;x.abort()}),p.T(w/1E3));var C=c.retryParameters.stallTimeout;C&&(t=new P(function(){v=!0;x.abort()}));return x}).sa(function(x){p&&p.stop();t&&t.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-y);return{response:x,yg:l}},function(x){p&&p.stop();t&&t.stop();if(a.i)return Re();v&&(x=new N(1,1,1003,c.uris[e],b));if(x instanceof N){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity){var w=(new Map).set("error",x);w=new M("retry",w);a.dispatchEvent(w);e=(e+1)%c.uris.length;
170
+ return hf(a,b,c,d,e,x,g)}}throw x;})}function jf(a,b,c){var d=Se(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Ld:e.Ld},f=a.next())e.Ld=f.value,d=d.sa(function(g){return function(){var h=c.response;h.data&&(h.data=Mc(h.data));return g.Ld(b,h)}}(e));return d.sa(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);})}J("shaka.net.NetworkingEngine",$e);$e.prototype.request=$e.prototype.request;$e.prototype.destroy=$e.prototype.destroy;
171
171
  $e.makeRequest=df;$e.defaultRetryParameters=function(){return Ne()};$e.prototype.clearAllResponseFilters=$e.prototype.Lf;$e.prototype.unregisterResponseFilter=$e.prototype.dh;$e.prototype.registerResponseFilter=$e.prototype.Ng;$e.prototype.clearAllRequestFilters=$e.prototype.Kf;$e.prototype.unregisterRequestFilter=$e.prototype.bh;$e.prototype.registerRequestFilter=$e.prototype.Mg;$e.unregisterScheme=function(a){delete cf[a]};$e.registerScheme=af;$e.prototype.setForceHTTPS=$e.prototype.ve;
172
- function ef(){this.g=0}$e.NumBytesRemainingClass=ef;function ff(a,b,c){Pe.call(this,a,b);this.h=c}qa(ff,Pe);$e.PendingRequest=ff;var kf=1;$e.RequestType={MANIFEST:0,SEGMENT:kf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var bf=3;$e.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:bf};var cf={};function lf(a){this.g=!1;this.h=new Sc;this.i=a}lf.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 mf(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function nf(){this.g=new cb}q=nf.prototype;q.release=function(){this.Qb();this.g=null};q.m=function(a,b,c,d){this.g&&(a=new of(a,b,c,d),this.g.push(b,a))};q.Pa=function(a,b,c,d){function e(g){f.Sa(a,b,e);c(g)}var f=this;this.m(a,b,e,d)};q.Sa=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Sa(),this.g.remove(b,e))}};
173
- q.Qb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.Sa();this.g.g={}}};J("shaka.util.EventManager",nf);nf.prototype.removeAll=nf.prototype.Qb;nf.prototype.unlisten=nf.prototype.Sa;nf.prototype.listenOnce=nf.prototype.Pa;nf.prototype.listen=nf.prototype.m;nf.prototype.release=nf.prototype.release;function of(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=pf(a,d);this.target.addEventListener(b,c,this.g)}
172
+ function ef(){this.g=0}$e.NumBytesRemainingClass=ef;function ff(a,b,c){Pe.call(this,a,b);this.h=c}qa(ff,Pe);$e.PendingRequest=ff;var kf=1;$e.RequestType={MANIFEST:0,SEGMENT:kf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var bf=3;$e.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:bf};var cf={};function lf(a){this.g=!1;this.h=new Sc;this.i=a}lf.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 mf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function nf(){this.g=new cb}q=nf.prototype;q.release=function(){this.Rb();this.g=null};q.m=function(a,b,c,d){this.g&&(a=new of(a,b,c,d),this.g.push(b,a))};q.Pa=function(a,b,c,d){function e(g){f.Sa(a,b,e);c(g)}var f=this;this.m(a,b,e,d)};q.Sa=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Sa(),this.g.remove(b,e))}};
173
+ q.Rb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ha(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.Sa();this.g.g={}}};J("shaka.util.EventManager",nf);nf.prototype.removeAll=nf.prototype.Rb;nf.prototype.unlisten=nf.prototype.Sa;nf.prototype.listenOnce=nf.prototype.Pa;nf.prototype.listen=nf.prototype.m;nf.prototype.release=nf.prototype.release;function of(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=pf(a,d);this.target.addEventListener(b,c,this.g)}
174
174
  of.prototype.Sa=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function pf(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 qf(a)?b:b.capture||!1}
175
- function qf(a){var b=rf;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}rf=b}return b||!1}var rf=void 0;function sf(){}function tf(a){a=Yc(a);return(new pb(a)).$a}function uf(a,b,c){function d(h){Oc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Lc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new O(2,6,6015);var e;"string"==typeof b?e=$c(b,!0):e=b;a=Yc(a);a=$c(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}J("shaka.util.FairPlayUtils",sf);sf.initDataTransform=uf;sf.defaultGetContentId=tf;function vf(a){for(var b=new Map,c=r(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=r(a),d=c.next();!d.done;d=c.next()){var e=r(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){var c=this;b=void 0===b?1:b;this.G=a;this.D=new Set;this.g=this.o=null;this.ha=this.X=!1;this.H=0;this.i=null;this.h=new nf;this.j=new Map;this.B=[];this.A=new Sc;this.s=null;this.l=function(d){c.A.reject(d);a.onError(d)};this.ia=new Map;this.ba=new Map;this.O=new P(function(){return zf(c)});this.K=!1;this.I=[];this.L=!1;this.ea=(new P(function(){Af(c)})).oa(b);this.A["catch"](function(){});this.M=new lf(function(){return Bf(c)});this.R=!1}q=yf.prototype;q.destroy=function(){return this.M.destroy()};
176
- function Bf(a){return H(function(b){switch(b.g){case 1:return a.h.release(),a.h=null,a.A.reject(),a.ea.stop(),a.ea=null,a.O.stop(),a.O=null,u(b,Cf(a),2);case 2:if(!a.g){b.C(3);break}A(b,4);return u(b,a.g.setMediaKeys(null),6);case 6:va(b,5);break;case 4:E(b);case 5:a.g=null;case 3:a.i=null,a.D.clear(),a.o=null,a.B=[],a.s=null,a.l=function(){},a.G=null,a.R=!1,z(b)}})}q.configure=function(a){this.s=a};function Df(a,b,c){a.ha=!0;a.B=[];a.K=c;return Ef(a,b)}
175
+ function qf(a){var b=rf;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}rf=b}return b||!1}var rf=void 0;function sf(){}function tf(a){a=Yc(a);return(new pb(a)).ab}function uf(a,b,c){function d(h){Oc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Lc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=$c(b,!0):e=b;a=Yc(a);a=$c(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}J("shaka.util.FairPlayUtils",sf);sf.initDataTransform=uf;sf.defaultGetContentId=tf;function vf(a){for(var b=new Map,c=r(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=r(a),d=c.next();!d.done;d=c.next()){var e=r(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){var c=this;b=void 0===b?1:b;this.G=a;this.D=new Set;this.g=this.o=null;this.ha=this.S=!1;this.H=0;this.i=null;this.h=new nf;this.j=new Map;this.B=[];this.A=new Sc;this.s=null;this.l=function(d){c.A.reject(d);a.onError(d)};this.ia=new Map;this.ba=new Map;this.O=new P(function(){return zf(c)});this.K=!1;this.I=[];this.L=!1;this.ea=(new P(function(){Af(c)})).oa(b);this.A["catch"](function(){});this.M=new lf(function(){return Bf(c)});this.Z=!1}q=yf.prototype;q.destroy=function(){return this.M.destroy()};
176
+ function Bf(a){return H(function(b){switch(b.g){case 1:return a.h.release(),a.h=null,a.A.reject(),a.ea.stop(),a.ea=null,a.O.stop(),a.O=null,u(b,Cf(a),2);case 2:if(!a.g){b.C(3);break}A(b,4);return u(b,a.g.setMediaKeys(null),6);case 6:va(b,5);break;case 4:E(b);case 5:a.g=null;case 3:a.i=null,a.D.clear(),a.o=null,a.B=[],a.s=null,a.l=function(){},a.G=null,a.Z=!1,z(b)}})}q.configure=function(a){this.s=a};function Df(a,b,c){a.ha=!0;a.B=[];a.K=c;return Ef(a,b)}
177
177
  function Ff(a,b,c){a.B=c;a.K=0<c.length;return Ef(a,b)}function Gf(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 Hf(a,g,[])}
178
178
  function Ef(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;return H(function(x){if(1==x.g){if(c=If(a))for(d=r(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.s.servers),Jf(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Kf(l),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,Lf(t,vf(a.s.servers),vf(a.s.advanced||{}));return u(x,
179
- ce(b,a.K,a.R),2)}v=g||Object.keys(a.s.servers).length;if(!v)return a.X=!0,x["return"](Promise.resolve());y=Hf(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}
180
- q.xc=function(a){var b=this,c,d;return H(function(e){if(1==e.g){if(!b.o)return b.h.Pa(a,"encrypted",function(){b.l(new O(2,6,6010))}),e["return"]();b.g=a;b.h.Pa(b.g,"play",function(){for(var f=r(b.I),g=f.next();!g.done;g=f.next())Mf(b,g.value);b.L=!0;b.I=[]});"webkitCurrentPlaybackTargetIsWireless"in b.g&&b.h.m(b.g,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Cf(b)});c=b.g.setMediaKeys(b.o);c=c["catch"](function(f){return Promise.reject(new O(2,6,6003,f.message))});return u(e,
179
+ ce(b,a.K,a.Z),2)}v=g||Object.keys(a.s.servers).length;if(!v)return a.S=!0,x["return"](Promise.resolve());y=Hf(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}
180
+ q.yc=function(a){var b=this,c,d;return H(function(e){if(1==e.g){if(!b.o)return b.h.Pa(a,"encrypted",function(){b.l(new N(2,6,6010))}),e["return"]();b.g=a;b.h.Pa(b.g,"play",function(){for(var f=r(b.I),g=f.next();!g.done;g=f.next())Mf(b,g.value);b.L=!0;b.I=[]});"webkitCurrentPlaybackTargetIsWireless"in b.g&&b.h.m(b.g,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Cf(b)});c=b.g.setMediaKeys(b.o);c=c["catch"](function(f){return Promise.reject(new N(2,6,6003,f.message))});return u(e,
181
181
  c,2)}mf(b.M);Nf(b);b.i.initData.length||b.B.length||(d=function(f){return Of(b,f.initDataType,Lc(f.initData))},b.h.m(b.g,"encrypted",d));z(e)})};
182
- function Pf(a){var b,c,d,e,f;return H(function(g){switch(g.g){case 1:if(!a.o||!a.i)return g["return"]();if(!a.i.serverCertificateUri||a.i.serverCertificate&&a.i.serverCertificate.length){g.C(2);break}b=df([a.i.serverCertificateUri],a.s.retryParameters);A(g,3);c=a.G.Ob.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.i.serverCertificate=Lc(d.data);va(g,4);break;case 3:throw e=E(g),new O(2,6,6017,e);case 4:if(a.M.g)return g["return"]();case 2:if(!a.i.serverCertificate||!a.i.serverCertificate.length)return g["return"]();
183
- A(g,6);return u(g,a.o.setServerCertificate(a.i.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=E(g),new O(2,6,6004,f.message);}})}function Qf(a,b){var c,d,e;return H(function(f){if(1==f.g)return u(f,Rf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.j.get(c))e.fb=new Sc,d.push(e.fb);d.push(c.remove());return u(f,Promise.all(d),3)}a.j["delete"](c);z(f)})}
182
+ function Pf(a){var b,c,d,e,f;return H(function(g){switch(g.g){case 1:if(!a.o||!a.i)return g["return"]();if(!a.i.serverCertificateUri||a.i.serverCertificate&&a.i.serverCertificate.length){g.C(2);break}b=df([a.i.serverCertificateUri],a.s.retryParameters);A(g,3);c=a.G.Pb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.i.serverCertificate=Lc(d.data);va(g,4);break;case 3:throw e=E(g),new N(2,6,6017,e);case 4:if(a.M.g)return g["return"]();case 2:if(!a.i.serverCertificate||!a.i.serverCertificate.length)return g["return"]();
183
+ A(g,6);return u(g,a.o.setServerCertificate(a.i.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=E(g),new N(2,6,6004,f.message);}})}function Qf(a,b){var c,d,e;return H(function(f){if(1==f.g)return u(f,Rf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.j.get(c))e.gb=new Sc,d.push(e.gb);d.push(c.remove());return u(f,Promise.all(d),3)}a.j["delete"](c);z(f)})}
184
184
  function Nf(a){for(var b=(a.i?a.i.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Of(a,d.initDataType,d.initData);c=r(a.B);for(d=c.next();!d.done;d=c.next())Rf(a,d.value);b.length||a.B.length||a.A.resolve();return a.A}function Of(a,b,c){var d=a.j.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Jc(c,e.value.initData)&&!Ed("Tizen 2"))return;Sf(a,b,c,a.i.sessionType)}function Tf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
185
- function Uf(a){a=a.j.keys();a=fb(a,function(b){return b.sessionId});return Array.from(a)}q.Bc=function(){var a=Infinity,b=this.j.keys();b=r(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};q.hd=function(){return wf(this.ba)};
186
- function Hf(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y;return H(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=Vf(a,c,d);x.C(2);break}return u(x,Yf(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new O(2,6,6001);mf(a.M);A(x,4);a.D.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.D.add(n.contentType.toLowerCase());p=r(k);for(m=p.next();!m.done;m=p.next())t=m.value,a.D.add(t.contentType.toLowerCase());if(c.length){var w=
187
- f.keySystem;var C=d.get(f.keySystem);var D=[],B=[],F=[],G=[],I=new Set;Zf(C,D,F,B,G,I);var N=a.K?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:D[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||N,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:I};C=r(C);for(D=C.next();!D.done;D=
185
+ function Uf(a){a=a.j.keys();a=fb(a,function(b){return b.sessionId});return Array.from(a)}q.Cc=function(){var a=Infinity,b=this.j.keys();b=r(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};q.hd=function(){return wf(this.ba)};
186
+ function Hf(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y;return H(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=Vf(a,c,d);x.C(2);break}return u(x,Wf(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new N(2,6,6001);mf(a.M);A(x,4);a.D.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.D.add(n.contentType.toLowerCase());p=r(k);for(m=p.next();!m.done;m=p.next())t=m.value,a.D.add(t.contentType.toLowerCase());if(c.length){var w=
187
+ f.keySystem;var C=d.get(f.keySystem);var D=[],B=[],F=[],G=[],I=new Set;Zf(C,D,F,B,G,I);var O=a.K?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:D[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||O,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:I};C=r(C);for(D=C.next();!D.done;D=
188
188
  C.next())D=D.value,D.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=D.distinctiveIdentifierRequired),D.persistentStateRequired&&(w.persistentStateRequired=D.persistentStateRequired);C=w}else C=f.keySystem,w=b.get(f.keySystem),D=[],B=[],F=[],G=[],I=new Set,Zf(w.drmInfos,D,F,B,G,I),C={keySystem:C,licenseServerUri:D[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
189
- w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:I};a.i=C;if(!a.i.licenseServerUri)throw new O(2,6,6012,a.i.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,mf(a.M),a.o=v,a.X=!0,u(x,Pf(a),7);case 7:mf(a.M);va(x,0);break;case 4:y=E(x);mf(a.M,y);a.i=null;a.D.clear();if(y instanceof O)throw y;throw new O(2,6,6002,y.message);}})}
190
- function Vf(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(Kf(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new O(2,6,6E3);d={};a=r(a.s.preferredKeySystems);for(e=a.next();!e.done;d={Id:d.Id},e=a.next())for(d.Id=e.value,f=r(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
189
+ w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:I};a.i=C;if(!a.i.licenseServerUri)throw new N(2,6,6012,a.i.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,mf(a.M),a.o=v,a.S=!0,u(x,Pf(a),7);case 7:mf(a.M);va(x,0);break;case 4:y=E(x);mf(a.M,y);a.i=null;a.D.clear();if(y instanceof N)throw y;throw new N(2,6,6002,y.message);}})}
190
+ function Vf(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(Kf(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new N(2,6,6E3);d={};a=r(a.s.preferredKeySystems);for(e=a.next();!e.done;d={Id:d.Id},e=a.next())for(d.Id=e.value,f=r(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
191
191
  l.Id}}(d)))return e.keySystemAccess;a=r([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=r(b),e=f.next();!e.done;e=f.next()){var g=r(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=r(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
192
- function Yf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,x;return H(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new O(2,6,6E3);d=r(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=r(a.s.preferredKeySystems);h=g.next();case 2:if(h.done){w.C(4);break}k=h.value;if(!b.has(k)){w.C(3);break}l=b.get(k);A(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
192
+ function Wf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,x;return H(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new N(2,6,6E3);d=r(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=r(a.s.preferredKeySystems);h=g.next();case 2:if(h.done){w.C(4);break}k=h.value;if(!b.has(k)){w.C(3);break}l=b.get(k);A(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
193
193
  w.h,w["return"](c);case 6:E(w);case 7:mf(a.M);case 3:h=g.next();w.C(2);break;case 4:m=r([!0,!1]),n=m.next();case 9:if(n.done){w.C(11);break}p=n.value;t=r(b.keys());h=t.next();case 12:if(h.done){n=m.next();w.C(9);break}v=h.value;y=b.get(v);x=y.drmInfos.some(function(C){return!!C.licenseServerUri});if(x!=p){w.C(13);break}A(w,15);return u(w,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=w.h,w["return"](c);case 15:E(w);case 16:mf(a.M);case 13:h=t.next();w.C(12);break;case 11:return w["return"](c)}})}
194
194
  function If(a){a=vf(a.s.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=ed(f),h=ed(e);g={kty:"oct",kid:cd(g,!1),k:cd(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Lc(Zc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
195
195
  serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
196
- function Rf(a,b){var c,d,e,f,g;return H(function(h){switch(h.g){case 1:try{c=a.o.createSession("persistent-license")}catch(k){return d=new O(2,6,6005,k.message),a.l(d),h["return"](Promise.reject(d))}a.h.m(c,"message",function(k){a.g&&a.s.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.L?a.I.push(k):Mf(a,k)});a.h.m(c,"keystatuseschange",function(k){return $f(a,k)});e={initData:null,loaded:!1,ie:Infinity,fb:null,type:"persistent-license"};a.j.set(c,e);A(h,2);return u(h,c.load(b),4);case 4:f=h.h;mf(a.M);
197
- if(!f)return a.j["delete"](c),a.l(new O(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;ag(a)&&a.A.resolve();return h["return"](c);case 2:g=E(h),mf(a.M,g),a.j["delete"](c),a.l(new O(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
198
- function Sf(a,b,c,d){try{var e=a.o.createSession(d)}catch(f){a.l(new O(2,6,6005,f.message));return}a.h.m(e,"message",function(f){a.g&&a.s.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.L?a.I.push(f):Mf(a,f)});a.h.m(e,"keystatuseschange",function(f){return $f(a,f)});a.j.set(e,{initData:c,loaded:!1,ie:Infinity,fb:null,type:d});try{c=a.s.initDataTransform(c,b,a.i)}catch(f){b=f;f instanceof O||(b=new O(2,6,6016,f));a.l(b);return}a.s.logLicenseExchange&&cd(c);e.generateRequest(b,c)["catch"](function(f){if(!a.M.g){a.j["delete"](e);
199
- 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.l(new O(2,6,6006,f.message,f,h))}})}function bg(a,b,c){"skd"==b&&(b=c.serverCertificate,c=tf(a),a=uf(a,c,b));return a}
200
- function Mf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;H(function(x){switch(x.g){case 1:return c=b.target,a.s.logLicenseExchange&&cd(b.message),d=a.j.get(c),e=a.i.licenseServerUri,f=a.s.advanced[a.i.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=df([e],a.s.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Tf(a.i.keySystem)&&cg(g),h=Date.now(),A(x,2),l=a.G.Ob.request(2,g),u(x,
201
- l.promise,4);case 4:k=x.h;va(x,3);break;case 2:return m=E(x),n=new O(2,6,6007,m),a.l(n),d&&d.fb&&d.fb.reject(n),x["return"]();case 3:if(a.M.g)return x["return"]();a.H+=(Date.now()-h)/1E3;a.s.logLicenseExchange&&cd(k.data);A(x,5);return u(x,c.update(k.data),7);case 7:va(x,6);break;case 5:return p=E(x),t=new O(2,6,6008,p.message),a.l(t),d&&d.fb&&d.fb.reject(t),x["return"]();case 6:v=new M("drmsessionupdate"),a.G.onEvent(v),d&&(d.fb&&d.fb.resolve(),y=new P(function(){d.loaded=!0;ag(a)&&a.A.resolve()}),
196
+ function Rf(a,b){var c,d,e,f,g;return H(function(h){switch(h.g){case 1:try{c=a.o.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.l(d),h["return"](Promise.reject(d))}a.h.m(c,"message",function(k){a.g&&a.s.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.L?a.I.push(k):Mf(a,k)});a.h.m(c,"keystatuseschange",function(k){return $f(a,k)});e={initData:null,loaded:!1,ie:Infinity,gb:null,type:"persistent-license"};a.j.set(c,e);A(h,2);return u(h,c.load(b),4);case 4:f=h.h;mf(a.M);
197
+ if(!f)return a.j["delete"](c),a.l(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;ag(a)&&a.A.resolve();return h["return"](c);case 2:g=E(h),mf(a.M,g),a.j["delete"](c),a.l(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
198
+ function Sf(a,b,c,d){try{var e=a.o.createSession(d)}catch(f){a.l(new N(2,6,6005,f.message));return}a.h.m(e,"message",function(f){a.g&&a.s.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.L?a.I.push(f):Mf(a,f)});a.h.m(e,"keystatuseschange",function(f){return $f(a,f)});a.j.set(e,{initData:c,loaded:!1,ie:Infinity,gb:null,type:d});try{c=a.s.initDataTransform(c,b,a.i)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.l(b);return}a.s.logLicenseExchange&&cd(c);e.generateRequest(b,c)["catch"](function(f){if(!a.M.g){a.j["delete"](e);
199
+ 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.l(new N(2,6,6006,f.message,f,h))}})}function bg(a,b,c){"skd"==b&&(b=c.serverCertificate,c=tf(a),a=uf(a,c,b));return a}
200
+ function Mf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;H(function(x){switch(x.g){case 1:return c=b.target,a.s.logLicenseExchange&&cd(b.message),d=a.j.get(c),e=a.i.licenseServerUri,f=a.s.advanced[a.i.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=df([e],a.s.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Tf(a.i.keySystem)&&cg(g),h=Date.now(),A(x,2),l=a.G.Pb.request(2,g),u(x,
201
+ l.promise,4);case 4:k=x.h;va(x,3);break;case 2:return m=E(x),n=new N(2,6,6007,m),a.l(n),d&&d.gb&&d.gb.reject(n),x["return"]();case 3:if(a.M.g)return x["return"]();a.H+=(Date.now()-h)/1E3;a.s.logLicenseExchange&&cd(k.data);A(x,5);return u(x,c.update(k.data),7);case 7:va(x,6);break;case 5:return p=E(x),t=new N(2,6,6008,p.message),a.l(t),d&&d.gb&&d.gb.reject(t),x["return"]();case 6:v=new M("drmsessionupdate"),a.G.onEvent(v),d&&(d.gb&&d.gb.resolve(),y=new P(function(){d.loaded=!0;ag(a)&&a.A.resolve()}),
202
202
  y.T(dg)),z(x)}})}function cg(a){var b=Wc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=dd(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
203
- function $f(a,b){var c=b.target,d=a.j.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Tf(a.i.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Oc(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=fd(h);a.ia.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.fb&&(a.j["delete"](c),c.close()["catch"](function(){}));
204
- ag(a)&&(a.A.resolve(),a.O.T(eg))}function zf(a){var b=a.ia,c=a.ba;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.l(new O(2,6,6014));a.G.od(wf(c))}
203
+ function $f(a,b){var c=b.target,d=a.j.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Tf(a.i.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Oc(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=fd(h);a.ia.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.gb&&(a.j["delete"](c),c.close()["catch"](function(){}));
204
+ ag(a)&&(a.A.resolve(),a.O.T(eg))}function zf(a){var b=a.ia,c=a.ba;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.l(new N(2,6,6014));a.G.od(wf(c))}
205
205
  function fg(){var a,b,c,d,e,f,g,h;return H(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
206
206
  c],f=new Map,g=function(l){var m,n,p;return H(function(t){switch(t.g){case 1:return A(t,2),u(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Ed("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:E(t),f.set(l,null),z(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](wf(f))})}
207
207
  function gg(a){var b;return H(function(c){if(1==c.g)return b=new Promise(function(d,e){(new P(e)).T(hg)}),A(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);E(c);z(c)})}
208
208
  function Cf(a){var b;return H(function(c){b=Array.from(a.j.entries());a.j.clear();return u(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return H(function(g){if(1==g.g)return A(g,2),a.ha||a.B.includes(e.sessionId)||"persistent-license"!==f.type?u(g,gg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);E(g);z(g)})})),0)})}
209
- function ig(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={Wa:f.Wa},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Wa=[];f.Wa=f.Wa.concat(e.initData||[]);f.Wa=f.Wa.concat(h.initData||[]);f.Wa=f.Wa.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Wa.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
209
+ function ig(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={Wa:f.Wa},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Wa=[];f.Wa=f.Wa.concat(e.initData||[]);f.Wa=f.Wa.concat(h.initData||[]);f.Wa=f.Wa.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Wa.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ha(e.keyIds),ha(h.keyIds))):
210
210
  e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
211
211
  initData:f.Wa,keyIds:g});break}}return c}function Kf(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Af(a){a.j.forEach(function(b,c){var d=b.ie,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.ie=e)})}function ag(a){a=a.j.values();return gb(a,function(b){return b.loaded})}
212
212
  function Jf(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=r(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
213
- function Zf(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Ia:g.Ia},h=a.next()){g.Ia=h.value;b.includes(g.Ia.licenseServerUri)||b.push(g.Ia.licenseServerUri);d.includes(g.Ia.serverCertificateUri)||d.push(g.Ia.serverCertificateUri);g.Ia.serverCertificate&&(c.some(function(m){return function(n){return Jc(n,m.Ia.serverCertificate)}}(g))||c.push(g.Ia.serverCertificate));if(g.Ia.initData){h={};for(var k=r(g.Ia.initData),l=k.next();!l.done;h={Tc:h.Tc},l=k.next())h.Tc=l.value,e.some(function(m){return function(n){var p=
214
- m.Tc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Jc(n.initData,p.initData)}}(h))||e.push(h.Tc)}if(g.Ia.keyIds)for(h=r(g.Ia.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
213
+ function Zf(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Ja:g.Ja},h=a.next()){g.Ja=h.value;b.includes(g.Ja.licenseServerUri)||b.push(g.Ja.licenseServerUri);d.includes(g.Ja.serverCertificateUri)||d.push(g.Ja.serverCertificateUri);g.Ja.serverCertificate&&(c.some(function(m){return function(n){return Jc(n,m.Ja.serverCertificate)}}(g))||c.push(g.Ja.serverCertificate));if(g.Ja.initData){h={};for(var k=r(g.Ja.initData),l=k.next();!l.done;h={Uc:h.Uc},l=k.next())h.Uc=l.value,e.some(function(m){return function(n){var p=
214
+ m.Uc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Jc(n.initData,p.initData)}}(h))||e.push(h.Uc)}if(g.Ja.keyIds)for(h=r(g.Ja.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
215
215
  function Lf(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
216
- (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var hg=1,dg=5,eg=.5,jg=new Tc(function(){return Mc(new Uint8Array([0]))});function kg(){}function lg(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g){if(d&&(e=mg[d.toLowerCase()]))return k["return"](e);if(f=ng(a))if(g=og[f])return k["return"](g);return d?k.C(2):u(k,pg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=mg[d]))return k["return"](h);throw new O(2,4,4E3,a);})}
216
+ (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var hg=1,dg=5,eg=.5,jg=new Tc(function(){return Mc(new Uint8Array([0]))});function kg(){}function lg(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g){if(d&&(e=mg[d.toLowerCase()]))return k["return"](e);if(f=ng(a))if(g=og[f])return k["return"](g);return d?k.C(2):u(k,pg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=mg[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
217
217
  function pg(a,b,c){var d,e,f;return H(function(g){if(1==g.g)return d=df([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function ng(a){a=(new pb(a)).Ra.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}J("shaka.media.ManifestParser",kg);kg.unregisterParserByMime=function(a){delete mg[a]};kg.registerParserByMime=function(a,b){mg[a]=b};
218
- kg.registerParserByExtension=function(a,b){og[a]=b};var mg={},og={};function qg(a,b){this.V=Oc(a);this.h=b==rg;this.g=0}q=qg.prototype;q.Ha=function(){return this.g<this.V.byteLength};q.ma=function(){return this.g};q.cg=function(){return this.V.byteLength};q.na=function(){try{var a=this.V.getUint8(this.g);this.g+=1;return a}catch(b){throw sg();}};q.kc=function(){try{var a=this.V.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw sg();}};q.S=function(){try{var a=this.V.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw sg();}};
219
- q.lf=function(){try{var a=this.V.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw sg();}};q.lc=function(){try{if(this.h){var a=this.V.getUint32(this.g,!0);var b=this.V.getUint32(this.g+4,!0)}else b=this.V.getUint32(this.g,!1),a=this.V.getUint32(this.g+4,!1)}catch(c){throw sg();}if(2097151<b)throw new O(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.zb=function(a){if(this.g+a>this.V.byteLength)throw sg();var b=Lc(this.V,this.g,a);this.g+=a;return b};
220
- q.skip=function(a){if(this.g+a>this.V.byteLength)throw sg();this.g+=a};q.nf=function(a){if(this.g<a)throw sg();this.g-=a};q.seek=function(a){if(0>a||a>this.V.byteLength)throw sg();this.g=a};q.Nc=function(){for(var a=this.g;this.Ha()&&0!=this.V.getUint8(this.g);)this.g+=1;a=Lc(this.V,a,this.g-a);this.g+=1;return Vc(a)};function sg(){return new O(2,3,3E3)}J("shaka.util.DataViewReader",qg);qg.prototype.readTerminatedString=qg.prototype.Nc;qg.prototype.seek=qg.prototype.seek;qg.prototype.rewind=qg.prototype.nf;
221
- qg.prototype.skip=qg.prototype.skip;qg.prototype.readBytes=qg.prototype.zb;qg.prototype.readUint64=qg.prototype.lc;qg.prototype.readInt32=qg.prototype.lf;qg.prototype.readUint32=qg.prototype.S;qg.prototype.readUint16=qg.prototype.kc;qg.prototype.readUint8=qg.prototype.na;qg.prototype.getLength=qg.prototype.cg;qg.prototype.getPosition=qg.prototype.ma;qg.prototype.hasMoreData=qg.prototype.Ha;var rg=1;qg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:rg};function tg(){this.i=[];this.h=[];this.g=!1}q=tg.prototype;q.box=function(a,b){var c=ug(a);this.i[c]=vg;this.h[c]=b;return this};q.Y=function(a,b){var c=ug(a);this.i[c]=wg;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new qg(a,0);for(this.g=!1;a.Ha()&&!this.g;)this.qd(0,a,b,c)};
222
- q.qd=function(a,b,c,d){var e=b.ma();if(d&&e+8>b.V.byteLength)this.g=!0;else{var f=b.S(),g=b.S(),h=!1;switch(f){case 0:f=b.V.byteLength-e;break;case 1:if(d&&b.ma()+8>b.V.byteLength){this.g=!0;return}f=b.lc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==wg){if(d&&b.ma()+4>b.V.byteLength){this.g=!0;return}m=b.S();l=m>>>24;m&=16777215}g=e+f;c&&g>b.V.byteLength&&(g=b.V.byteLength);d&&g>b.V.byteLength?this.g=!0:(d=g-b.ma(),b=0<d?b.zb(d):new Uint8Array(0),b=new qg(b,0),k({parser:this,partialOkay:c||
223
- !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.ma(),b.V.byteLength-b.ma()))}};function xg(a){for(var b=yg(a);a.reader.Ha()&&!a.parser.g;)a.parser.qd(a.start+b,a.reader,a.partialOkay)}function zg(a){var b=yg(a),c=a.reader.S();c=r(kb(c));for(var d=c.next();!d.done&&(a.parser.qd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d=c.next());}function Ag(a){return function(b){a(b.reader.zb(b.reader.V.byteLength-b.reader.ma()))}}
218
+ kg.registerParserByExtension=function(a,b){og[a]=b};var mg={},og={};function qg(a,b){this.V=Oc(a);this.h=b==rg;this.g=0}q=qg.prototype;q.Ia=function(){return this.g<this.V.byteLength};q.ma=function(){return this.g};q.cg=function(){return this.V.byteLength};q.na=function(){try{var a=this.V.getUint8(this.g);this.g+=1;return a}catch(b){throw sg();}};q.lc=function(){try{var a=this.V.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw sg();}};q.R=function(){try{var a=this.V.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw sg();}};
219
+ q.lf=function(){try{var a=this.V.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw sg();}};q.mc=function(){try{if(this.h){var a=this.V.getUint32(this.g,!0);var b=this.V.getUint32(this.g+4,!0)}else b=this.V.getUint32(this.g,!1),a=this.V.getUint32(this.g+4,!1)}catch(c){throw sg();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Ab=function(a){if(this.g+a>this.V.byteLength)throw sg();var b=Lc(this.V,this.g,a);this.g+=a;return b};
220
+ q.skip=function(a){if(this.g+a>this.V.byteLength)throw sg();this.g+=a};q.nf=function(a){if(this.g<a)throw sg();this.g-=a};q.seek=function(a){if(0>a||a>this.V.byteLength)throw sg();this.g=a};q.Oc=function(){for(var a=this.g;this.Ia()&&0!=this.V.getUint8(this.g);)this.g+=1;a=Lc(this.V,a,this.g-a);this.g+=1;return Vc(a)};function sg(){return new N(2,3,3E3)}J("shaka.util.DataViewReader",qg);qg.prototype.readTerminatedString=qg.prototype.Oc;qg.prototype.seek=qg.prototype.seek;qg.prototype.rewind=qg.prototype.nf;
221
+ qg.prototype.skip=qg.prototype.skip;qg.prototype.readBytes=qg.prototype.Ab;qg.prototype.readUint64=qg.prototype.mc;qg.prototype.readInt32=qg.prototype.lf;qg.prototype.readUint32=qg.prototype.R;qg.prototype.readUint16=qg.prototype.lc;qg.prototype.readUint8=qg.prototype.na;qg.prototype.getLength=qg.prototype.cg;qg.prototype.getPosition=qg.prototype.ma;qg.prototype.hasMoreData=qg.prototype.Ia;var rg=1;qg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:rg};function tg(){this.i=[];this.h=[];this.g=!1}q=tg.prototype;q.box=function(a,b){var c=ug(a);this.i[c]=vg;this.h[c]=b;return this};q.X=function(a,b){var c=ug(a);this.i[c]=wg;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new qg(a,0);for(this.g=!1;a.Ia()&&!this.g;)this.qd(0,a,b,c)};
222
+ q.qd=function(a,b,c,d){var e=b.ma();if(d&&e+8>b.V.byteLength)this.g=!0;else{var f=b.R(),g=b.R(),h=!1;switch(f){case 0:f=b.V.byteLength-e;break;case 1:if(d&&b.ma()+8>b.V.byteLength){this.g=!0;return}f=b.mc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==wg){if(d&&b.ma()+4>b.V.byteLength){this.g=!0;return}m=b.R();l=m>>>24;m&=16777215}g=e+f;c&&g>b.V.byteLength&&(g=b.V.byteLength);d&&g>b.V.byteLength?this.g=!0:(d=g-b.ma(),b=0<d?b.Ab(d):new Uint8Array(0),b=new qg(b,0),k({parser:this,partialOkay:c||
223
+ !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.ma(),b.V.byteLength-b.ma()))}};function xg(a){for(var b=yg(a);a.reader.Ia()&&!a.parser.g;)a.parser.qd(a.start+b,a.reader,a.partialOkay)}function zg(a){var b=yg(a),c=a.reader.R();c=r(kb(c));for(var d=c.next();!d.done&&(a.parser.qd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d=c.next());}function Ag(a){return function(b){a(b.reader.Ab(b.reader.V.byteLength-b.reader.ma()))}}
224
224
  function ug(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Bg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function yg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}J("shaka.util.Mp4Parser",tg);tg.headerSize=yg;tg.typeToString=Bg;tg.allData=Ag;tg.sampleDescription=zg;tg.children=xg;tg.prototype.parseNext=tg.prototype.qd;tg.prototype.parse=tg.prototype.parse;tg.prototype.stop=tg.prototype.stop;
225
- tg.prototype.fullBox=tg.prototype.Y;tg.prototype.box=tg.prototype.box;var vg=0,wg=1;function Cg(a){function b(){d=!0}function c(l){f.push(l);xg(l)}a=Lc(a);var d=!1,e,f=[],g=[];(new tg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).Y("stsd",function(l){e=l;f.push(l);zg(l)}).Y("encv",b).Y("enca",b).Y("avc1",function(l){g.push({box:l,Kc:1701733238})}).Y("avc3",function(l){g.push({box:l,Kc:1701733238})}).Y("ac-3",function(l){g.push({box:l,Kc:1701733217})}).Y("ec-3",function(l){g.push({box:l,Kc:1701733217})}).Y("mp4a",function(l){g.push({box:l,Kc:1701733217})}).parse(a);
226
- if(d)return a;if(0==g.length||!e)throw Za(fd(a)),new O(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=Dg(a,e,k.box,f,k.Kc);return a}
225
+ tg.prototype.fullBox=tg.prototype.X;tg.prototype.box=tg.prototype.box;var vg=0,wg=1;function Cg(a){function b(){d=!0}function c(l){f.push(l);xg(l)}a=Lc(a);var d=!1,e,f=[],g=[];(new tg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).X("stsd",function(l){e=l;f.push(l);zg(l)}).X("encv",b).X("enca",b).X("avc1",function(l){g.push({box:l,Lc:1701733238})}).X("avc3",function(l){g.push({box:l,Lc:1701733238})}).X("ac-3",function(l){g.push({box:l,Lc:1701733217})}).X("ec-3",function(l){g.push({box:l,Lc:1701733217})}).X("mp4a",function(l){g.push({box:l,Lc:1701733217})}).parse(a);
226
+ if(d)return a;if(0==g.length||!e)throw Za(fd(a)),new N(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=Dg(a,e,k.box,f,k.Lc);return a}
227
227
  function Dg(a,b,c,d,e){var f=Eg.value(),g=a.subarray(c.start,c.start+c.size),h=Oc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Oc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Fg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Ed("Xbox One")?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,Fg(e,d.start,d.size+k.byteLength);k=Oc(e,b.start);b=yg(b);
228
228
  a=k.getUint32(b);k.setUint32(b,a+1);return e}function Fg(a,b,c){a=Oc(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Eg=new Tc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Gg(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Hg(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],t=-1,v=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){t=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){v=y;break}if(-1===
229
229
  t||-1===v)p=Ig(d,e),a.nestedCues.push(p);else{for(;t<=v;t++)if(y=p[t]){var x=y.l,w=y.i,C=y.j,D=y.h;if(x!=h||w!=k||C!=l||D!=m)n.payload&&a.nestedCues.push(n),n=Hg(d,e,x,w,C,D),h=x,k=w,l=C,m=D;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Ig(d,e),a.nestedCues.push(n));n=Hg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
@@ -233,662 +233,663 @@ var Pg=0,Rg=1,Tg=2,Vg=3,Qg=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[9
233
233
  [35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Wg=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
234
234
  [39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function Yg(a,b){this.h=Zg;this.A=new Kg(a,b);this.i=new Kg(a,b);this.l=new Kg(a,b);this.g=this.i;this.j=0;this.o=null}function $g(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==ah&&a.h!==bh&&(e=Mg(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Ng(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Ng(c,0,15),d.g=15);a.h=ah;d.h=b;return e}function ch(a){a.h=dh;a.g=a.l;a.g.h=0}function eh(a){Ua("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.A;a.h=bh}
235
235
  var Zg=0,dh=1,ah=3,bh=4,fh="black green blue cyan red yellow magenta black".split(" "),gh="white green blue cyan red yellow magenta white_italics".split(" ");function hh(){this.l=!1;this.H=this.K=0;this.I=ih;this.i=[];this.g=this.h=this.j=0;this.D=this.A=!1;this.B="white";this.o="black";jh(this)}function jh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(kh())}function kh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function lh(a,b){mh(a)&&(a.i[a.h][a.g]=new Jg(b,a.D,a.A,a.o,a.B),a.g++)}function mh(a){var b=a.g<a.H&&0<=a.g;return a.h<a.K&&0<=a.h&&b}hh.prototype.isVisible=function(){return this.l};
236
- function nh(a,b,c){var d=new oc(a.j,b,"");d.textAlign=a.I===oh?"left":a.I===ph?"right":sc;if(c=Gg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var oh=0,ph=1,ih=2;function qh(){this.i=[];this.h=null;this.g=0}function rh(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 sh(a.h)),a.h=null,a.g=0))}function sh(a){this.g=0;this.h=a}sh.prototype.Ha=function(){return this.g<this.h.length};sh.prototype.ma=function(){return this.g};function th(a){if(!a.Ha())throw new O(2,2,3E3);return a.h[a.g++]}sh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new O(2,2,3E3);this.g+=a};function uh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
236
+ function nh(a,b,c){var d=new oc(a.j,b,"");d.textAlign=a.I===oh?"left":a.I===ph?"right":sc;if(c=Gg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var oh=0,ph=1,ih=2;function qh(){this.i=[];this.h=null;this.g=0}function rh(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 sh(a.h)),a.h=null,a.g=0))}function sh(a){this.g=0;this.h=a}sh.prototype.Ia=function(){return this.g<this.h.length};sh.prototype.ma=function(){return this.g};function th(a){if(!a.Ia())throw new N(2,2,3E3);return a.h[a.g++]}sh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function uh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
237
237
  function vh(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=th(b).value;b=null;c=r(wh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=nh(e,d,a.i)),jh(e);return b}if(137===c)for(b=th(b).value,b=r(wh(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=th(b).value;b=null;c=r(wh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=nh(e,d,a.i)),e.l=!1;return b}if(139===c){c=th(b).value;
238
238
  b=null;c=r(wh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=nh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=th(b).value,xh(a,b,d);if(143===c)return d=xh(a,255,d),yh(a),d;if(144===c)b.skip(1),d=th(b).value,a.g&&(a.g.A=0<(d&128),a.g.D=0<(d&64));else if(145===c)d=th(b).value,c=th(b).value,b.skip(1),a.g&&(b=zh((c&48)>>4,(c&12)>>2,c&3),a.g.B=zh((d&48)>>4,(d&12)>>2,d&3),a.g.o=b);else if(146===c)d=th(b).value,b=th(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
239
239
  b.skip(1),d=th(b).value,b.skip(1),a.g&&(a.g.I=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new hh;f.j=d;a.h[c]=f}d=th(b).value;th(b);th(b);f=th(b).value;var g=th(b).value;b=th(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.D=!1,b.A=!1,b.B="white",b.o="black");b=a.h[c];b.l=0<(d&32);b.K=(f&15)+1;b.H=(g&63)+1;a.g=a.h[c]}}}return null}
240
240
  var wh=function Ah(a,b){var d,e;return Ga(Ah,function(f){1==f.g&&(d=0);if(5!=f.g)return 8>d?(e=1===(b&1))&&a.h[d]?u(f,d,5):f.C(5):f.C(0);b>>=1;d++;return f.C(2)})};function xh(a,b,c){var d=null;b=r(wh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=nh(f,c,a.i));a.h[e]=null}return d}function yh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function zh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Bh[a<<2|b<<1|c]}
241
241
  var Ch=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"]]),Bh="black blue green cyan red magenta yellow white".split(" ");function Dh(){this.h=[];this.g=[];this.i=new qh;this.l=0;this.B=new Map([["CC1",new Yg(0,0)],["CC2",new Yg(0,1)],["CC3",new Yg(1,0)],["CC4",new Yg(1,1)]]);this.A=this.o=0;this.j=new Map;Eh(this)}function Eh(a){a.o=0;a.A=0;a=r(a.B.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.o=null,Lg(b.i),Lg(b.l),Lg(b.A)}
242
- function Fh(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=r(a.h),e=d.next();!e.done;e=d.next())(e=Gh(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())rh(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=Hh(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
243
- function Gh(a,b){var c=b.type;if(16===(b.Ua&112)){var d=b.Ua>>3&1;0===c?a.o=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.o)+1));if(255===b.Ua&&255===b.kb||!b.Ua&&!b.kb||!Ih(b.Ua)||!Ih(b.kb))return 45<=++a.l&&Eh(a),null;a.l=0;b.Ua&=127;b.kb&=127;if(!b.Ua&&!b.kb)return null;d=null;if(16===(b.Ua&112))a:{var e=b.Ua;d=b.kb;if(c.o===(e<<8|d))c.o=null;else if(c.o=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=gh[f]:7===f&&(h=!0);
242
+ function Fh(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=r(a.h),e=d.next();!e.done;e=d.next())(e=Gh(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())rh(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=Hh(a,e.value),c.push.apply(c,ha(e));a.i.i=[];a.h=[];a.g=[];return c}
243
+ function Gh(a,b){var c=b.type;if(16===(b.Ua&112)){var d=b.Ua>>3&1;0===c?a.o=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.o)+1));if(255===b.Ua&&255===b.mb||!b.Ua&&!b.mb||!Ih(b.Ua)||!Ih(b.mb))return 45<=++a.l&&Eh(a),null;a.l=0;b.Ua&=127;b.mb&=127;if(!b.Ua&&!b.mb)return null;d=null;if(16===(b.Ua&112))a:{var e=b.Ua;d=b.mb;if(c.o===(e<<8|d))c.o=null;else if(c.o=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=gh[f]:7===f&&(h=!0);
244
244
  d=1===(d&1);if(c.h!==bh){f=c.g;if(c.h===ah&&e!==f.g){var k=1+e-f.h;Xg(f,k,1+f.g-f.h,f.h);Ng(f,0,k-1);Ng(f,e+1,15-e)}f.g=e;c.g.o=d;c.g.j=h;c.g.l=g;c.g.A="black"}}else if(17===(e&247)&&32===(d&240))c.g.o=!1,c.g.j=!1,c.g.l="white",Og(c.g,Pg,32),g=!1,e=gh[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.o=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=fh[(d&14)>>1]),c.g.A=g;else if(17===(e&247)&&48===(d&240))Og(c.g,Rg,d);else if(18===
245
- (e&246)&&32===(d&224))Og(c.g,e&1?Vg:Tg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.kb){case 32:ch(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=$g(c,2,d);break;case 38:e=$g(c,3,d);break;case 39:e=$g(c,4,d);break;case 40:Og(c.g,Pg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Lg(c.A);eh(c);break;case 43:eh(c);break;case 44:e=c.i;g=null;c.h!==bh&&(g=Mg(e,c.j,d));Ng(e,0,15);e=g;break;case 45:e=c.g;c.h!==ah?e=null:(g=Mg(e,c.j,d),h=e.g-e.h+1,Xg(e,h-1,h,e.h),Ng(e,
246
- 0,h-1),Ng(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Ng(c.l,0,15);break;case 47:e=null,c.h!==bh&&(e=Mg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,ch(c),c.j=d}d=e;break a}d=null}else e=b.kb,Og(c.g,Pg,b.Ua),Og(c.g,Pg,e);return d}
247
- function Hh(a,b){var c=[];try{for(;b.Ha();){var d=th(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=th(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new uh(e));for(var g=a.j.get(e),h=b.ma();b.ma()-h<f;){e=b;var k=th(e),l=k.value,m=k.pts;if(16===l){var n=th(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!mh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.H-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=nh(t,p,g.i));if(t.h+1>=t.K){p=t;for(var v=0,y=1;15>y;y++,
245
+ (e&246)&&32===(d&224))Og(c.g,e&1?Vg:Tg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.mb){case 32:ch(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=$g(c,2,d);break;case 38:e=$g(c,3,d);break;case 39:e=$g(c,4,d);break;case 40:Og(c.g,Pg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Lg(c.A);eh(c);break;case 43:eh(c);break;case 44:e=c.i;g=null;c.h!==bh&&(g=Mg(e,c.j,d));Ng(e,0,15);e=g;break;case 45:e=c.g;c.h!==ah?e=null:(g=Mg(e,c.j,d),h=e.g-e.h+1,Xg(e,h-1,h,e.h),Ng(e,
246
+ 0,h-1),Ng(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Ng(c.l,0,15);break;case 47:e=null,c.h!==bh&&(e=Mg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,ch(c),c.j=d}d=e;break a}d=null}else e=b.mb,Og(c.g,Pg,b.Ua),Og(c.g,Pg,e);return d}
247
+ function Hh(a,b){var c=[];try{for(;b.Ia();){var d=th(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=th(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new uh(e));for(var g=a.j.get(e),h=b.ma();b.ma()-h<f;){e=b;var k=th(e),l=k.value,m=k.pts;if(16===l){var n=th(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!mh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.H-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=nh(t,p,g.i));if(t.h+1>=t.K){p=t;for(var v=0,y=1;15>y;y++,
248
248
  v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=kh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=nh(t,p,g.i));t.i[t.h]=kh();t.g=0;break;case 12:t.isVisible()&&(e=nh(t,p,g.i)),jh(t),p=t,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=vh(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?lh(g.g,"\u266a"):lh(g.g,
249
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&lh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Ch.has(e)){var w=Ch.get(e);lh(g.g,w)}else lh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?lh(g.g,"_"):lh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(C){if(C instanceof O&&3E3===C.code)Ua("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function Ih(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Jh(){}var Lh=function Kh(a,b){var d,e,f,g;return Ga(Kh,function(h){if(1==h.g){for(var k=b,l=0,m=0;m<k.length;)2==l&&3==k[m]?(l=0,k=[].concat(ia(k)),k.splice(m,1),k=new Uint8Array(k)):0==k[m]?l++:l=0,m++;d=k;e=0}if(4!=h.g){if(!(e<d.length))return h.C(0);for(f=0;255==d[e];)f+=255,e++;f+=d[e++];for(g=0;255==d[e];)g+=255,e++;g+=d[e++];return 4!=f?h.C(4):u(h,d.subarray(e,e+g),4)}e+=g;return h.C(2)})};function Mh(a,b){var c=null,d=null,e=a.S();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.S());b&16&&(d=a.S());return{trackId:e,Re:c,Nf:d}}function Nh(a,b){return{Qd:1==b?a.lc():a.S()}}function Oh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.S()}}
250
- function Ph(a,b,c){var d=a.S(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=r(kb(d)),g=f.next();!g.done;g=f.next())g={oe:null,sampleSize:null,td:null},c&256&&(g.oe=a.S()),c&512&&(g.sampleSize=a.S()),c&1024&&a.skip(4),c&2048&&(g.td=0==b?a.S():a.lf()),e.push(g);return{xi:d,pf:e}};function Qh(){this.j=new Jh;this.i=new Map;this.h=this.g=0}
251
- Qh.prototype.init=function(a){var b=this,c=[],d=[];(new tg).box("moov",xg).box("mvex",xg).Y("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.S();f=f.S();b.g=e;b.h=f}).box("trak",xg).Y("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.S();c.push(e)}).box("mdia",xg).Y("mdhd",function(e){e=Oh(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new O(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
252
- Qh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new tg).box("moof",xg).box("traf",xg).Y("trun",function(k){f=Ph(k.reader,k.version,k.flags).pf}).Y("tfhd",function(k){k=Mh(k.reader,k.flags);d=k.Re||b.g;e=k.Nf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).Y("tfdt",function(k){g=Nh(k.reader,k.version).Qd}).box("mdat",function(k){if(null===g)throw new O(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,t=f,v=0,y=p;for(t.length&&(y=t[0].sampleSize||p);k.Ha();){var x=k.S();if(6==
253
- (k.na()&31)){var w=0;t.length>v&&(w=t[v].td||0);w=(l+w)/m;for(var C=r(Lh(b.j,k.zb(x-1))),D=C.next();!D.done;D=C.next())c.push({Ig:D.value,pts:w})}else k.skip(x-1);y-=x+4;0==y&&(l=t.length>v?l+(t[v].oe||n):l+n,v++,y=t.length>v?t[v].sampleSize||p:p)}}).parse(a,!1);return c};function Rh(){this.h=new Qh;this.g=new Dh}Rh.prototype.init=function(a){this.h.init(a)};
254
- function Sh(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Lc(e.Ig);if(0<f.length&&(d=a.g,e=e.pts,f=new qg(f,0),181===f.na()&&49===f.kc()&&1195456820===f.S()&&3===f.na())){var g=f.na();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.na(),l=(k&4)>>2,m=f.na(),n=f.na();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Ua:m,kb: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 Fh(a.g)}
249
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&lh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Ch.has(e)){var w=Ch.get(e);lh(g.g,w)}else lh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?lh(g.g,"_"):lh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(C){if(C instanceof N&&3E3===C.code)Ua("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function Ih(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Jh(){}var Lh=function Kh(a,b){var d,e,f,g;return Ga(Kh,function(h){if(1==h.g){for(var k=b,l=0,m=0;m<k.length;)2==l&&3==k[m]?(l=0,k=[].concat(ha(k)),k.splice(m,1),k=new Uint8Array(k)):0==k[m]?l++:l=0,m++;d=k;e=0}if(4!=h.g){if(!(e<d.length))return h.C(0);for(f=0;255==d[e];)f+=255,e++;f+=d[e++];for(g=0;255==d[e];)g+=255,e++;g+=d[e++];return 4!=f?h.C(4):u(h,d.subarray(e,e+g),4)}e+=g;return h.C(2)})};function Mh(a,b){var c=null,d=null,e=a.R();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.R());b&16&&(d=a.R());return{trackId:e,Re:c,Nf:d}}function Nh(a,b){return{Qd:1==b?a.mc():a.R()}}function Oh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.R()}}
250
+ function Ph(a,b,c){var d=a.R(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=r(kb(d)),g=f.next();!g.done;g=f.next())g={oe:null,sampleSize:null,td:null},c&256&&(g.oe=a.R()),c&512&&(g.sampleSize=a.R()),c&1024&&a.skip(4),c&2048&&(g.td=0==b?a.R():a.lf()),e.push(g);return{xi:d,pf:e}};function Qh(){this.j=new Jh;this.i=new Map;this.h=this.g=0}
251
+ Qh.prototype.init=function(a){var b=this,c=[],d=[];(new tg).box("moov",xg).box("mvex",xg).X("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.R();f=f.R();b.g=e;b.h=f}).box("trak",xg).X("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.R();c.push(e)}).box("mdia",xg).X("mdhd",function(e){e=Oh(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new N(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
252
+ Qh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new tg).box("moof",xg).box("traf",xg).X("trun",function(k){f=Ph(k.reader,k.version,k.flags).pf}).X("tfhd",function(k){k=Mh(k.reader,k.flags);d=k.Re||b.g;e=k.Nf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).X("tfdt",function(k){g=Nh(k.reader,k.version).Qd}).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,t=f,v=0,y=p;for(t.length&&(y=t[0].sampleSize||p);k.Ia();){var x=k.R();if(6==
253
+ (k.na()&31)){var w=0;t.length>v&&(w=t[v].td||0);w=(l+w)/m;for(var C=r(Lh(b.j,k.Ab(x-1))),D=C.next();!D.done;D=C.next())c.push({Ig:D.value,pts:w})}else k.skip(x-1);y-=x+4;0==y&&(l=t.length>v?l+(t[v].oe||n):l+n,v++,y=t.length>v?t[v].sampleSize||p:p)}}).parse(a,!1);return c};function Rh(){this.h=new Qh;this.g=new Dh}Rh.prototype.init=function(a){this.h.init(a)};
254
+ function Sh(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Lc(e.Ig);if(0<f.length&&(d=a.g,e=e.pts,f=new qg(f,0),181===f.na()&&49===f.lc()&&1195456820===f.R()&&3===f.na())){var g=f.na();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.na(),l=(k&4)>>2,m=f.na(),n=f.na();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Ua:m,mb: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 Fh(a.g)}
255
255
  ;function Th(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Uh(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function Vh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=r(Wh(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}
256
256
  function Xh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Wh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Wh(a){if(!a)return[];for(var b=[],c=r(kb(a.length)),d=c.next();!d.done;d=c.next())d=d.value,b.push({start:a.start(d),end:a.end(d)});return b};function Yh(a,b,c,d){var e=this;this.g=a;this.o=c;this.j={};this.K={};this.i=null;this.L=d||function(){};this.l={};this.h=new nf;this.B={};this.D=b;this.H=new Sc;this.A=Zh(this,this.H);this.M=new lf(function(){return $h(e)});this.I=""}function Zh(a,b){var c=new MediaSource;a.h.Pa(c,"sourceopen",function(){URL.revokeObjectURL(a.I);b.resolve()});a.I=ai(c);a.g.src=a.I;return c}q=Yh.prototype;q.destroy=function(){return this.M.destroy()};
257
- function $h(a){var b,c,d,e,f,g,h,k;return H(function(l){if(1==l.g){b=[];for(c in a.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p["catch"](Ib)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new O(2,7,7003,void 0));a.i&&b.push(a.i.destroy());a.o&&b.push(a.o.destroy());for(k in a.B)b.push(a.B[k].destroy());return u(l,Promise.all(b),2)}a.h&&(a.h.release(),a.h=null);a.g&&(a.g.removeAttribute("src"),a.g.load(),a.g=null);a.A=null;a.i=null;a.o=null;a.j={};a.B={};a.D=null;a.l=
257
+ function $h(a){var b,c,d,e,f,g,h,k;return H(function(l){if(1==l.g){b=[];for(c in a.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p["catch"](Ib)),f=r(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.i&&b.push(a.i.destroy());a.o&&b.push(a.o.destroy());for(k in a.B)b.push(a.B[k].destroy());return u(l,Promise.all(b),2)}a.h&&(a.h.release(),a.h=null);a.g&&(a.g.removeAttribute("src"),a.g.load(),a.g=null);a.A=null;a.i=null;a.o=null;a.j={};a.B={};a.D=null;a.l=
258
258
  {};z(l)})}
259
- q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){if(1==m.g)return d=Sb,u(m,c.H,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={Ma:e.Ma},g=f.next())e.Ma=g.value,h=a.get(e.Ma),k=md(h.mimeType,h.codecs),e.Ma==d.qa?bi(c,k):(!b&&MediaSource.isTypeSupported(k)||!id(k,e.Ma)||(c.B[e.Ma]=new hd,k=kd(e.Ma,k)),l=c.A.addSourceBuffer(k),c.h.m(l,"error",function(n){return function(){c.l[n.Ma][0].p.reject(new O(2,3,3014,c.g.error?c.g.error.code:0))}}(e)),c.h.m(l,"updateend",function(n){return function(){return ci(c,n.Ma)}}(e)),
259
+ q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){if(1==m.g)return d=Sb,u(m,c.H,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={Ma:e.Ma},g=f.next())e.Ma=g.value,h=a.get(e.Ma),k=md(h.mimeType,h.codecs),e.Ma==d.ra?bi(c,k):(!b&&MediaSource.isTypeSupported(k)||!id(k,e.Ma)||(c.B[e.Ma]=new hd,k=kd(e.Ma,k)),l=c.A.addSourceBuffer(k),c.h.m(l,"error",function(n){return function(){c.l[n.Ma][0].p.reject(new N(2,3,3014,c.g.error?c.g.error.code:0))}}(e)),c.h.m(l,"updateend",function(n){return function(){return ci(c,n.Ma)}}(e)),
260
260
  c.j[e.Ma]=l,c.K[e.Ma]=k,c.l[e.Ma]=[]);z(m)})};function bi(a,b){a.i||(a.i=new qd(a.o));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.i.A=Kb(sd[b]))}function di(a){return a.A?"ended"==a.A.readyState:!0}function ei(a,b){if(b==Rb)var c=a.i.g;else c=fi(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function gi(a,b){return b==Rb?a.i.h:Th(fi(a,b))}
261
261
  function hi(a,b,c){if(b==Rb)return a=a.i,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=fi(a,b);return Vh(a,c)}q.fd=function(){var a={total:Wh(this.g.buffered),audio:Wh(fi(this,"audio")),video:Wh(fi(this,"video")),text:[]};if(this.i){var b=this.i.g,c=this.i.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function fi(a,b){try{return a.j[b].buffered}catch(c){return null}}
262
- function ii(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return H(function(v){if(1==v.g){g=Sb;if(b==g.qa)return u(v,td(a.i,c,d,e),0);if(a.B[b])return u(v,ld(a.B[b],c),10);if(f)return a.i||bi(a,"text/vtt"),null==d&&null==e?a.D.init(c):(h=Sh(a.D,c),h.length&&(k=a.j[g.ib].timestampOffset,yd(a.i,h,d,e,k))),c=ji(a,c,d,b),u(v,ki(a,b,function(){a.j[b].appendBuffer(c)}),0);c=ji(a,c,d,b);return u(v,ki(a,b,function(){a.j[b].appendBuffer(c)}),0)}l=v.h;a.i||bi(a,"text/vtt");l.metadata&&(m=a.j[b].timestampOffset,a.L(l.metadata,
263
- m,e));l.captions&&l.captions.length&&(n=a.j[g.ib].timestampOffset,p=wd(l.captions),yd(a.i,p,d,e,n));t=l.data;t=ji(a,t,d,b);return u(v,ki(a,b,function(){a.j[b].appendBuffer(t)}),0)})}function li(a,b){var c=gi(a,"video")||0;vd(a.i,b,c)}function mi(a){a.i&&vd(a.i,"",0)}q.remove=function(a,b,c){var d=this,e;return H(function(f){e=Sb;return a==e.qa?u(f,d.i.remove(b,c),0):u(f,ki(d,a,function(){c<=b?ci(d,a):d.j[a].remove(b,c)}),0)})};
264
- function ni(a,b){var c;return H(function(d){c=Sb;return b==c.qa?a.i?u(d,a.i.remove(0,Infinity),0):d["return"]():u(d,ki(a,b,function(){var e=a.A.duration;0>=e?ci(a,b):a.j[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return H(function(d){c=Sb;return a==c.qa?d["return"]():u(d,ki(b,a,function(){b.g.currentTime-=.001;ci(b,a)}),0)})};
265
- function oi(a,b,c,d,e){var f;return H(function(g){f=Sb;return b==f.qa?(a.i.D=c,ud(a.i,d,e),g["return"]()):u(g,Promise.all([ki(a,b,function(){var h=a.j[b].appendWindowStart,k=a.j[b].appendWindowEnd;a.j[b].abort();a.j[b].appendWindowStart=h;a.j[b].appendWindowEnd=k;ci(a,b)}),ki(a,b,function(){var h=c;0>h&&(h+=.001);a.j[b].timestampOffset=h;ci(a,b)}),ki(a,b,function(){a.j[b].appendWindowStart=0;a.j[b].appendWindowEnd=e;a.j[b].appendWindowStart=d;ci(a,b)})]),0)})}
266
- q.endOfStream=function(a){var b=this;return H(function(c){return u(c,pi(b,function(){di(b)||(a?b.A.endOfStream(a):b.A.endOfStream())}),0)})};q.eb=function(a){var b=this;return H(function(c){return u(c,pi(b,function(){b.A.duration=a}),0)})};q.getDuration=function(){return this.A.duration};function ci(a,b){var c=a.l[b][0];c&&(c.p.resolve(),qi(a,b))}function ki(a,b,c){mf(a.M);c={start:c,p:new Sc};a.l[b].push(c);1==a.l[b].length&&ri(a,b);return c.p}
267
- function pi(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:mf(a.M);c=[];d={};for(e in a.j)d.sc=new Sc,f={start:function(l){return function(){return l.sc.resolve()}}(d),p:d.sc},a.l[e].push(f),c.push(d.sc),1==a.l[e].length&&f.start(),d={sc:d.sc};A(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=E(k),g;case 3:try{b()}catch(l){throw new O(2,3,3015,l);}finally{for(h in a.j)qi(a,h)}z(k)}})}function qi(a,b){a.l[b].shift();ri(a,b)}
268
- function ri(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new O(2,3,3017,b)):c.p.reject(new O(2,3,3015,d)),qi(a,b)}}function ji(a,b,c,d){var e=a.g.mediaKeys;null==c&&e&&(Dd()||Ed("Xbox One"))&&"mp4"==a.K[d].split(";")[0].split("/")[1]&&(b=Cg(b));return b}var ai=window.URL.createObjectURL;function si(a,b,c){this.Ga=a;this.Ca=b;this.wa=c}si.prototype.Fc=function(){return this.Ca};si.prototype.Ac=function(){return this.wa};function ti(a,b){return a&&b?a.Fc()==b.Fc()&&a.Ac()==b.Ac()&&nc(a.Ga(),b.Ga()):a==b}J("shaka.media.InitSegmentReference",si);si.prototype.getEndByte=si.prototype.Ac;si.prototype.getStartByte=si.prototype.Fc;
269
- function ui(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.Ca=d;this.wa=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}q=ui.prototype;q.Ga=function(){return this.j()};q.og=function(){return this.startTime};q.$f=function(){return this.endTime};q.Fc=function(){return this.Ca};q.Ac=function(){return this.wa};q.vg=function(){return this.tilesLayout};
270
- q.ug=function(){return this.i};J("shaka.media.SegmentReference",ui);ui.prototype.getTileDuration=ui.prototype.ug;ui.prototype.getTilesLayout=ui.prototype.vg;ui.prototype.getEndByte=ui.prototype.Ac;ui.prototype.getStartByte=ui.prototype.Fc;ui.prototype.getEndTime=ui.prototype.$f;ui.prototype.getStartTime=ui.prototype.og;ui.prototype.getUris=ui.prototype.Ga;function Q(a,b,c){this.j=a;this.rd=b;this.o=this.l=Infinity;this.g=1;this.h=this.i=null;this.A=0;this.B=!0;this.D=0;this.H=void 0===c?!0:c;this.I=0}q=Q.prototype;q.getDuration=function(){return this.l};q.ig=function(){return this.g};q.eb=function(a){this.l=a};q.mg=function(){return this.j};q.sf=function(a){this.A=a};q.Qc=function(a){this.B=a};q.ze=function(a){this.o=a};q.Zg=function(a){this.rd=a};q.Zf=function(){return this.rd};
271
- q.hc=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.ee(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.j&&this.H&&(this.j=(Date.now()+this.A)/1E3-this.h-this.g)}};q.ee=function(a){this.i=null==this.i?a:Math.min(this.i,a)};q.ce=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.i&&(this.i+=a);null!=this.h&&(this.h+=a)};q.Z=function(){return Infinity==this.l&&!this.B};
272
- q.Lb=function(){return Infinity!=this.l&&!this.B};q.xb=function(){return Math.max(this.D,this.Hb()-this.o)};q.vf=function(a){this.D=a};q.Hb=function(){return this.Z()||this.Lb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.j)+this.I,this.l):this.h||this.l};q.Ec=function(a){var b=Math.max(this.i,this.D);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Hb()-this.o+a,this.mb()))};q.dc=function(){return this.Ec(0)};
273
- q.mb=function(){return Math.max(0,this.Hb()-(this.Z()||this.Lb()?this.rd:0))};q.zf=function(){return null==this.j||null!=this.h&&this.H?!1:!0};q.rf=function(a){this.I=a};J("shaka.media.PresentationTimeline",Q);Q.prototype.setAvailabilityTimeOffset=Q.prototype.rf;Q.prototype.usingPresentationStartTime=Q.prototype.zf;Q.prototype.getSeekRangeEnd=Q.prototype.mb;Q.prototype.getSeekRangeStart=Q.prototype.dc;Q.prototype.getSafeSeekRangeStart=Q.prototype.Ec;Q.prototype.getSegmentAvailabilityEnd=Q.prototype.Hb;
274
- Q.prototype.setUserSeekStart=Q.prototype.vf;Q.prototype.getSegmentAvailabilityStart=Q.prototype.xb;Q.prototype.isInProgress=Q.prototype.Lb;Q.prototype.isLive=Q.prototype.Z;Q.prototype.offset=Q.prototype.offset;Q.prototype.notifyMaxSegmentDuration=Q.prototype.ce;Q.prototype.notifyMinSegmentStartTime=Q.prototype.ee;Q.prototype.notifySegments=Q.prototype.hc;Q.prototype.getDelay=Q.prototype.Zf;Q.prototype.setDelay=Q.prototype.Zg;Q.prototype.setSegmentAvailabilityDuration=Q.prototype.ze;
275
- Q.prototype.setStatic=Q.prototype.Qc;Q.prototype.setClockOffset=Q.prototype.sf;Q.prototype.getPresentationStartTime=Q.prototype.mg;Q.prototype.setDuration=Q.prototype.eb;Q.prototype.getMaxSegmentDuration=Q.prototype.ig;Q.prototype.getDuration=Q.prototype.getDuration;function vi(a,b){this.j=a;this.o=wi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.A=b;this.i=function(){}}vi.prototype.release=function(){this.j=null;this.i=function(){}};function xi(a,b){a.i=b}function Ai(a){this.g=a}function wi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(Wh(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 Bi(a,b,c,d,e){var f=this;this.g=a;this.D=b;this.s=c;this.B=e;this.h=new nf;this.A=!1;this.H=a.readyState;this.j=!1;this.i=d;this.o=!1;this.h.m(a,"waiting",function(){return Ci(f)});this.l=(new P(function(){Ci(f)})).oa(.25)}Bi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.l&&(this.l.stop(),this.l=null);this.i&&(this.i.release(),this.i=null);this.g=this.D=this.B=null};Bi.prototype.je=function(){this.o=!0;Ci(this)};
276
- function Ci(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.A)return}else a.A=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.H&&(a.j=!1,a.H=a.g.readyState);var b;if(!(b=!a.i)){b=a.i;var c=b.j,d=wi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.o!=d)b.l=f,b.g=e,b.o=d,b.h=!1;e=f-b.l;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.s.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=Xh(b,g,a.s.gapDetectionThreshold);if(!(null==
277
- c||0==c&&!a.o||(d=b.start(c),d>=a.D.mb()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new M("largegap",g),g.cancelable=!0,a.B(g),a.s.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Di(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ei.value().get(b),c.Pa(a,b,d))}var Ei=new Tc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Fi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.o=!1;this.h=new nf;this.i=new Gi(a);Di(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Hi(d,d.j)})}Fi.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 Ii(a){return a.o?a.g.currentTime:a.j}function Ji(a,b){0<a.g.readyState?Ki(a.i,b):Di(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Hi(a,a.j)})}
262
+ function ii(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return H(function(v){if(1==v.g){g=Sb;if(b==g.ra)return u(v,td(a.i,c,d,e),0);if(a.B[b])return u(v,ld(a.B[b],c),10);if(f)return a.i||bi(a,"text/vtt"),null==d&&null==e?a.D.init(c):(h=Sh(a.D,c),h.length&&(k=a.j[g.ib].timestampOffset,yd(a.i,h,d,e,k))),c=ji(a,c,d,b),u(v,ki(a,b,function(){a.j[b].appendBuffer(c)}),0);c=ji(a,c,d,b);return u(v,ki(a,b,function(){a.j[b].appendBuffer(c)}),0)}l=v.h;a.i||bi(a,"text/vtt");l.metadata&&(m=a.j[b].timestampOffset,a.L(l.metadata,
263
+ m,e));l.captions&&l.captions.length&&(n=a.j[g.ib].timestampOffset,p=wd(l.captions),yd(a.i,p,d,e,n));t=l.data;t=ji(a,t,d,b);return u(v,ki(a,b,function(){a.j[b].appendBuffer(t)}),0)})}function li(a,b){var c=gi(a,"video")||0;vd(a.i,b,c)}function mi(a){a.i&&vd(a.i,"",0)}q.remove=function(a,b,c){var d=this,e;return H(function(f){e=Sb;return a==e.ra?u(f,d.i.remove(b,c),0):u(f,ki(d,a,function(){c<=b?ci(d,a):d.j[a].remove(b,c)}),0)})};
264
+ function ni(a,b){var c;return H(function(d){c=Sb;return b==c.ra?a.i?u(d,a.i.remove(0,Infinity),0):d["return"]():u(d,ki(a,b,function(){var e=a.A.duration;0>=e?ci(a,b):a.j[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return H(function(d){c=Sb;return a==c.ra?d["return"]():u(d,ki(b,a,function(){b.g.currentTime-=.001;ci(b,a)}),0)})};
265
+ function oi(a,b,c,d,e){var f;return H(function(g){f=Sb;return b==f.ra?(a.i.D=c,ud(a.i,d,e),g["return"]()):u(g,Promise.all([ki(a,b,function(){var h=a.j[b].appendWindowStart,k=a.j[b].appendWindowEnd;a.j[b].abort();a.j[b].appendWindowStart=h;a.j[b].appendWindowEnd=k;ci(a,b)}),ki(a,b,function(){var h=c;0>h&&(h+=.001);a.j[b].timestampOffset=h;ci(a,b)}),ki(a,b,function(){a.j[b].appendWindowStart=0;a.j[b].appendWindowEnd=e;a.j[b].appendWindowStart=d;ci(a,b)})]),0)})}
266
+ q.endOfStream=function(a){var b=this;return H(function(c){return u(c,pi(b,function(){di(b)||(a?b.A.endOfStream(a):b.A.endOfStream())}),0)})};q.fb=function(a){var b=this;return H(function(c){return u(c,pi(b,function(){b.A.duration=a}),0)})};q.getDuration=function(){return this.A.duration};function ci(a,b){var c=a.l[b][0];c&&(c.p.resolve(),qi(a,b))}function ki(a,b,c){mf(a.M);c={start:c,p:new Sc};a.l[b].push(c);1==a.l[b].length&&ri(a,b);return c.p}
267
+ function pi(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:mf(a.M);c=[];d={};for(e in a.j)d.tc=new Sc,f={start:function(l){return function(){return l.tc.resolve()}}(d),p:d.tc},a.l[e].push(f),c.push(d.tc),1==a.l[e].length&&f.start(),d={tc:d.tc};A(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=E(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.j)qi(a,h)}z(k)}})}function qi(a,b){a.l[b].shift();ri(a,b)}
268
+ function ri(a,b){var c=a.l[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)),qi(a,b)}}function ji(a,b,c,d){var e=a.g.mediaKeys;null==c&&e&&(Dd()||Ed("Xbox One"))&&"mp4"==a.K[d].split(";")[0].split("/")[1]&&(b=Cg(b));return b}var ai=window.URL.createObjectURL;function si(a,b,c){this.Ha=a;this.Da=b;this.wa=c}si.prototype.Gc=function(){return this.Da};si.prototype.Bc=function(){return this.wa};function ti(a,b){return a&&b?a.Gc()==b.Gc()&&a.Bc()==b.Bc()&&nc(a.Ha(),b.Ha()):a==b}J("shaka.media.InitSegmentReference",si);si.prototype.getEndByte=si.prototype.Bc;si.prototype.getStartByte=si.prototype.Gc;
269
+ function ui(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.Da=d;this.wa=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}q=ui.prototype;q.Ha=function(){return this.j()};q.og=function(){return this.startTime};q.$f=function(){return this.endTime};q.Gc=function(){return this.Da};q.Bc=function(){return this.wa};q.vg=function(){return this.tilesLayout};
270
+ q.ug=function(){return this.i};J("shaka.media.SegmentReference",ui);ui.prototype.getTileDuration=ui.prototype.ug;ui.prototype.getTilesLayout=ui.prototype.vg;ui.prototype.getEndByte=ui.prototype.Bc;ui.prototype.getStartByte=ui.prototype.Gc;ui.prototype.getEndTime=ui.prototype.$f;ui.prototype.getStartTime=ui.prototype.og;ui.prototype.getUris=ui.prototype.Ha;function Q(a,b,c){this.j=a;this.rd=b;this.o=this.l=Infinity;this.g=1;this.h=this.i=null;this.A=0;this.B=!0;this.D=0;this.H=void 0===c?!0:c;this.I=0}q=Q.prototype;q.getDuration=function(){return this.l};q.ig=function(){return this.g};q.fb=function(a){this.l=a};q.mg=function(){return this.j};q.sf=function(a){this.A=a};q.Rc=function(a){this.B=a};q.ze=function(a){this.o=a};q.Zg=function(a){this.rd=a};q.Zf=function(){return this.rd};
271
+ q.ic=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.ee(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.j&&this.H&&(this.j=(Date.now()+this.A)/1E3-this.h-this.g)}};q.ee=function(a){this.i=null==this.i?a:Math.min(this.i,a)};q.ce=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.i&&(this.i+=a);null!=this.h&&(this.h+=a)};q.Y=function(){return Infinity==this.l&&!this.B};
272
+ q.Mb=function(){return Infinity!=this.l&&!this.B};q.pb=function(){return Math.max(this.D,this.Ib()-this.o)};q.vf=function(a){this.D=a};q.Ib=function(){return this.Y()||this.Mb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.j)+this.I,this.l):this.h||this.l};q.Fc=function(a){var b=Math.max(this.i,this.D);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Ib()-this.o+a,this.ob()))};q.ec=function(){return this.Fc(0)};
273
+ q.ob=function(){return Math.max(0,this.Ib()-(this.Y()||this.Mb()?this.rd:0))};q.zf=function(){return null==this.j||null!=this.h&&this.H?!1:!0};q.rf=function(a){this.I=a};J("shaka.media.PresentationTimeline",Q);Q.prototype.setAvailabilityTimeOffset=Q.prototype.rf;Q.prototype.usingPresentationStartTime=Q.prototype.zf;Q.prototype.getSeekRangeEnd=Q.prototype.ob;Q.prototype.getSeekRangeStart=Q.prototype.ec;Q.prototype.getSafeSeekRangeStart=Q.prototype.Fc;Q.prototype.getSegmentAvailabilityEnd=Q.prototype.Ib;
274
+ Q.prototype.setUserSeekStart=Q.prototype.vf;Q.prototype.getSegmentAvailabilityStart=Q.prototype.pb;Q.prototype.isInProgress=Q.prototype.Mb;Q.prototype.isLive=Q.prototype.Y;Q.prototype.offset=Q.prototype.offset;Q.prototype.notifyMaxSegmentDuration=Q.prototype.ce;Q.prototype.notifyMinSegmentStartTime=Q.prototype.ee;Q.prototype.notifySegments=Q.prototype.ic;Q.prototype.getDelay=Q.prototype.Zf;Q.prototype.setDelay=Q.prototype.Zg;Q.prototype.setSegmentAvailabilityDuration=Q.prototype.ze;
275
+ Q.prototype.setStatic=Q.prototype.Rc;Q.prototype.setClockOffset=Q.prototype.sf;Q.prototype.getPresentationStartTime=Q.prototype.mg;Q.prototype.setDuration=Q.prototype.fb;Q.prototype.getMaxSegmentDuration=Q.prototype.ig;Q.prototype.getDuration=Q.prototype.getDuration;function vi(a,b){this.j=a;this.o=wi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.A=b;this.i=function(){}}vi.prototype.release=function(){this.j=null;this.i=function(){}};function xi(a,b){a.i=b}function yi(a){this.g=a}function wi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(Wh(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 zi(a,b,c,d,e){var f=this;this.g=a;this.D=b;this.s=c;this.B=e;this.h=new nf;this.A=!1;this.H=a.readyState;this.j=!1;this.i=d;this.o=!1;this.h.m(a,"waiting",function(){return Ai(f)});this.l=(new P(function(){Ai(f)})).oa(.25)}zi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.l&&(this.l.stop(),this.l=null);this.i&&(this.i.release(),this.i=null);this.g=this.D=this.B=null};zi.prototype.je=function(){this.o=!0;Ai(this)};
276
+ function Ai(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.A)return}else a.A=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.H&&(a.j=!1,a.H=a.g.readyState);var b;if(!(b=!a.i)){b=a.i;var c=b.j,d=wi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.o!=d)b.l=f,b.g=e,b.o=d,b.h=!1;e=f-b.l;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.s.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=Xh(b,g,a.s.gapDetectionThreshold);if(!(null==
277
+ c||0==c&&!a.o||(d=b.start(c),d>=a.D.ob()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new M("largegap",g),g.cancelable=!0,a.B(g),a.s.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Di(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ei.value().get(b),c.Pa(a,b,d))}var Ei=new Tc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Fi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.o=!1;this.h=new nf;this.i=new Gi(a);Di(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Hi(d,d.j)})}Fi.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 Ii(a){return a.o?a.g.currentTime:a.j}function Ji(a,b){0<a.g.readyState?Ki(a.i,b):Di(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Hi(a,a.j)})}
278
278
  function Hi(a,b){.001>Math.abs(a.g.currentTime-b)?Li(a):(a.h.Pa(a.g,"seeking",function(){Li(a)}),Ki(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Li(a){a.o=!0;a.h.m(a.g,"seeking",function(){return a.l()})}function Gi(a){var b=this;this.h=a;this.o=10;this.l=this.j=this.i=0;this.g=new P(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Gi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
279
279
  function Ki(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.o;a.h.currentTime=b;a.g.oa(.1)};function Mi(a){function b(){null==c.i||0==c.i?c.j=!0:(c.h.Pa(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.i))}var c=this;this.g=a;this.j=!1;this.i=null;this.h=new nf;Di(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,function(){b()})}Mi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.g=null};Mi.prototype.o=function(a){this.i=this.j?this.i:a};Mi.prototype.l=function(){return(this.j?this.g.currentTime:this.i)||0};Mi.prototype.H=function(){};
280
- function Ni(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.I=b.minBufferTime||0;this.s=c;this.D=e;this.B=null;this.j=new Bi(a,b.presentationTimeline,c,Oi(a,c),f);this.h=new Fi(a,function(){a:{var h=g.j;h.A=!0;h.o=!1;h.j=!1;var k=Ii(g.h);h=Pi(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;Ji(g.h,h);h=void 0;break a}g.D();h=void 0}return h},Qi(this,d));this.A=(new P(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ii(g.h),k=g.g.dc(),l=g.g.mb();3>l-k&&(k=
280
+ function Ni(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.I=b.minBufferTime||0;this.s=c;this.D=e;this.B=null;this.j=new zi(a,b.presentationTimeline,c,Oi(a,c),f);this.h=new Fi(a,function(){a:{var h=g.j;h.A=!0;h.o=!1;h.j=!1;var k=Ii(g.h);h=Pi(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;Ji(g.h,h);h=void 0;break a}g.D();h=void 0}return h},Qi(this,d));this.A=(new P(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ii(g.h),k=g.g.ec(),l=g.g.ob();3>l-k&&(k=
281
281
  l-3);h<k&&(h=Pi(g,h),g.i.currentTime=h)}})).oa(.25)}Ni.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.A&&(this.A.stop(),this.A=null);this.i=this.h=this.g=this.s=null;this.D=function(){}};Ni.prototype.o=function(a){Ji(this.h,a)};Ni.prototype.l=function(){var a=Ii(this.h);return 0<this.i.readyState&&!this.i.paused?Ri(this,a):a};
282
- function Qi(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.dc():a.g.mb():0>b&&(b=a.g.mb()+b);return Si(a,Ri(a,b))}Ni.prototype.H=function(){this.j.je()};function Si(a,b){var c=a.g.getDuration();return b>=c?c-a.s.durationBackoff:b}function Pi(a,b){var c=Math.max(a.I,a.s.rebufferingGoal),d=a.s.safeSeekOffset,e=a.g.dc(),f=a.g.mb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Ec(c),k=a.g.Ec(d);c=a.g.Ec(c+d);return b>=g?Si(a,b):b>f?f:b<e?Uh(a.i.buffered,k)?k:c:b>=h||Uh(a.i.buffered,b)?b:c}
283
- function Ri(a,b){var c=a.g.dc();if(b<c)return c;c=a.g.mb();return b>c?c:b}function Oi(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new vi(new Ai(a),b.stallThreshold);xi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function Ti(a){this.P=a;this.g=null;this.h=0;this.i=!1}q=Ti.prototype;q.destroy=function(){Db("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.P=[],this.g&&this.g.stop(),this.g=null)};q.Dg=function(){this.i=!0};
282
+ function Qi(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.ec():a.g.ob():0>b&&(b=a.g.ob()+b);return Si(a,Ri(a,b))}Ni.prototype.H=function(){this.j.je()};function Si(a,b){var c=a.g.getDuration();return b>=c?c-a.s.durationBackoff:b}function Pi(a,b){var c=Math.max(a.I,a.s.rebufferingGoal),d=a.s.safeSeekOffset,e=a.g.ec(),f=a.g.ob(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Fc(c),k=a.g.Fc(d);c=a.g.Fc(c+d);return b>=g?Si(a,b):b>f?f:b<e?Uh(a.i.buffered,k)?k:c:b>=h||Uh(a.i.buffered,b)?b:c}
283
+ function Ri(a,b){var c=a.g.ec();if(b<c)return c;c=a.g.ob();return b>c?c:b}function Oi(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new vi(new yi(a),b.stallThreshold);xi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function Ti(a){this.P=a;this.g=null;this.h=0;this.i=!1}q=Ti.prototype;q.destroy=function(){Db("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.P=[],this.g&&this.g.stop(),this.g=null)};q.Dg=function(){this.i=!0};
284
284
  q.find=function(a){for(var b=this.P.length-1,c=b;0<=c;--c){var d=this.P[c],e=c<b?this.P[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.P.length&&a<this.P[0].startTime?this.h:null};q.get=function(a){if(0==this.P.length)return null;a-=this.h;return 0>a||a>=this.P.length?null:this.P[a]};q.offset=function(a){if(!this.i)for(var b=r(this.P),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
285
- q.md=function(a){!this.i&&a.length&&(this.P=this.P.filter(function(b){return b.startTime<a[0].startTime}),this.P.push.apply(this.P,ia(a)))};q.fc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.P.length||d.endTime>c.P[0].startTime)});this.md(a);this.Fb(b)};q.Fb=function(a){if(!this.i){var b=this.P.length;this.P=this.P.filter(function(c){return c.endTime>a});this.h+=b-this.P.length}};
286
- q.wb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.P.length;)if(this.P[this.P.length-1].startTime>=b)this.P.pop();else break;for(;this.P.length;)if(this.P[0].endTime<=a)this.P.shift(),c||this.h++;else break;0!=this.P.length&&(a=this.P[this.P.length-1],this.P[this.P.length-1]=new ui(a.startTime,b,a.j,a.Ca,a.wa,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.i))}};
287
- q.wd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new P(function(){var d=b();d?c.P.push.apply(c.P,ia(d)):(c.g.stop(),c.g=null)}),this.g.oa(a))};Ti.prototype[Symbol.iterator]=function(){return this.bc(0)};Ti.prototype.bc=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.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Ui(this,b,d)};
288
- function Vi(a,b,c){return new Ti([new ui(a,a+b,function(){return c},0,null,null,a,a,a+b)])}J("shaka.media.SegmentIndex",Ti);Ti.forSingleSegment=Vi;Ti.prototype.getIteratorForTime=Ti.prototype.bc;Ti.prototype.updateEvery=Ti.prototype.wd;Ti.prototype.fit=Ti.prototype.wb;Ti.prototype.evict=Ti.prototype.Fb;Ti.prototype.mergeAndEvict=Ti.prototype.fc;Ti.prototype.merge=Ti.prototype.md;Ti.prototype.offset=Ti.prototype.offset;Ti.prototype.get=Ti.prototype.get;Ti.prototype.find=Ti.prototype.find;
289
- Ti.prototype.markImmutable=Ti.prototype.Dg;Ti.prototype.release=Ti.prototype.release;Ti.prototype.destroy=Ti.prototype.destroy;function Ui(a,b,c){this.i=a;this.h=b;this.g=c}Ui.prototype.seek=function(a){Db("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.bc(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
290
- Ui.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.Ga().length&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};Ui.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.g.length?(this.g++,a.Ga().length&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};J("shaka.media.SegmentIterator",Ui);Ui.prototype.next=Ui.prototype.next;Ui.prototype.current=Ui.prototype.current;
285
+ q.md=function(a){!this.i&&a.length&&(this.P=this.P.filter(function(b){return b.startTime<a[0].startTime}),this.P.push.apply(this.P,ha(a)))};q.hc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.P.length||d.endTime>c.P[0].startTime)});this.md(a);this.Gb(b)};q.Gb=function(a){if(!this.i){var b=this.P.length;this.P=this.P.filter(function(c){return c.endTime>a});this.h+=b-this.P.length}};
286
+ q.yb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.P.length;)if(this.P[this.P.length-1].startTime>=b)this.P.pop();else break;for(;this.P.length;)if(this.P[0].endTime<=a)this.P.shift(),c||this.h++;else break;0!=this.P.length&&(a=this.P[this.P.length-1],this.P[this.P.length-1]=new ui(a.startTime,b,a.j,a.Da,a.wa,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.i))}};
287
+ q.wd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new P(function(){var d=b();d?c.P.push.apply(c.P,ha(d)):(c.g.stop(),c.g=null)}),this.g.oa(a))};Ti.prototype[Symbol.iterator]=function(){return this.cc(0)};Ti.prototype.cc=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.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Ui(this,b,d)};
288
+ function Vi(a,b,c){return new Ti([new ui(a,a+b,function(){return c},0,null,null,a,a,a+b)])}J("shaka.media.SegmentIndex",Ti);Ti.forSingleSegment=Vi;Ti.prototype.getIteratorForTime=Ti.prototype.cc;Ti.prototype.updateEvery=Ti.prototype.wd;Ti.prototype.fit=Ti.prototype.yb;Ti.prototype.evict=Ti.prototype.Gb;Ti.prototype.mergeAndEvict=Ti.prototype.hc;Ti.prototype.merge=Ti.prototype.md;Ti.prototype.offset=Ti.prototype.offset;Ti.prototype.get=Ti.prototype.get;Ti.prototype.find=Ti.prototype.find;
289
+ Ti.prototype.markImmutable=Ti.prototype.Dg;Ti.prototype.release=Ti.prototype.release;Ti.prototype.destroy=Ti.prototype.destroy;function Ui(a,b,c){this.i=a;this.h=b;this.g=c}Ui.prototype.seek=function(a){Db("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.cc(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
290
+ Ui.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.Ha().length&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};Ui.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.g.length?(this.g++,a.Ha().length&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};J("shaka.media.SegmentIterator",Ui);Ui.prototype.next=Ui.prototype.next;Ui.prototype.current=Ui.prototype.current;
291
291
  Ui.prototype.seek=Ui.prototype.seek;function Wi(){Ti.call(this,[]);this.j=[]}qa(Wi,Ti);q=Wi.prototype;q.clone=function(){var a=new Wi;a.j=this.j.slice();return a};q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(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.P.length}return null};
292
- q.get=function(a){for(var b=0,c=r(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.P.length}return null};q.offset=function(){};q.md=function(){};q.Fb=function(){};q.fc=function(){};q.wb=function(){};q.wd=function(){};J("shaka.media.MetaSegmentIndex",Wi);Wi.prototype.updateEvery=Wi.prototype.wd;Wi.prototype.fit=Wi.prototype.wb;Wi.prototype.mergeAndEvict=Wi.prototype.fc;Wi.prototype.evict=Wi.prototype.Fb;Wi.prototype.merge=Wi.prototype.md;
292
+ q.get=function(a){for(var b=0,c=r(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.P.length}return null};q.offset=function(){};q.md=function(){};q.Gb=function(){};q.hc=function(){};q.yb=function(){};q.wd=function(){};J("shaka.media.MetaSegmentIndex",Wi);Wi.prototype.updateEvery=Wi.prototype.wd;Wi.prototype.fit=Wi.prototype.yb;Wi.prototype.mergeAndEvict=Wi.prototype.hc;Wi.prototype.evict=Wi.prototype.Gb;Wi.prototype.merge=Wi.prototype.md;
293
293
  Wi.prototype.offset=Wi.prototype.offset;Wi.prototype.get=Wi.prototype.get;Wi.prototype.find=Wi.prototype.find;Wi.prototype.release=Wi.prototype.release;function Xi(a){var b=this;this.g=a;this.j=!1;this.i=this.g.kd();this.h=new P(function(){b.g.gf(.25*b.i)})}Xi.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Xi.prototype.set=function(a){this.i=a;Yi(this)};Xi.prototype.gd=function(){return this.g.gd()};function Yi(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.kd()!=b&&a.g.xe(b);return}catch(c){}a.h.oa(.25);0!=a.g.kd()&&a.g.xe(0)};function Zi(a){var b=this;this.h=a;this.g=new Set;this.i=(new P(function(){$i(b,!1)})).oa(.25)}Zi.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};
294
- function $i(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.h.currentTime,f=b,g=r(d.l.g),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.j.get(h),l=e<h.startTime?aj:e>h.endTime?bj:cj;d.j.set(h,l);for(var m=r(d.o),n=m.next();!n.done;n=m.next())n=n.value,n.Vb==k&&n.Ub==l&&n.Kb(h,f)}}};function dj(a){var b=this;this.h=function(){};this.g=new Set;this.j=a;this.i=(new P(function(){for(var c=b.j(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&b.g["delete"](e)})).oa(2)}dj.prototype.release=function(){this.h=function(){};this.g.clear();this.i.stop()};function ej(a,b){a.h=b};function fj(a){var b=this;this.l=a;this.j=new Map;this.g=function(){};this.h=function(){};this.i=function(){};this.o=[{Vb:null,Ub:cj,Kb:function(c,d){return b.g(c,d)}},{Vb:aj,Ub:cj,Kb:function(c,d){return b.g(c,d)}},{Vb:bj,Ub:cj,Kb:function(c,d){return b.g(c,d)}},{Vb:cj,Ub:aj,Kb:function(c,d){return b.h(c,d)}},{Vb:cj,Ub:bj,Kb:function(c,d){return b.h(c,d)}},{Vb:aj,Ub:bj,Kb:function(c,d){return b.i(c,d)}},{Vb:bj,Ub:aj,Kb:function(c,d){return b.i(c,d)}}]}
295
- fj.prototype.release=function(){this.l=null;this.j.clear();this.g=function(){};this.h=function(){};this.i=function(){}};function gj(a,b,c,d){a.g=b;a.h=c;a.i=d}var aj=1,cj=2,bj=3;function hj(a,b,c,d,e){a=df(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function ij(a,b){var c=this;this.G=b;this.F=a;this.s=null;this.l=1;this.i=this.h=null;this.g=new Map;this.o=!1;this.A=null;this.j=!1;this.M=new lf(function(){return jj(c)})}ij.prototype.destroy=function(){return this.M.destroy()};function jj(a){var b,c,d,e;return H(function(f){if(1==f.g){b=[];c=r(a.g.values());for(d=c.next();!d.done;d=c.next())e=d.value,kj(e),b.push(lj(e));return u(f,Promise.all(b),2)}a.g.clear();a.G=null;a.F=null;a.s=null;z(f)})}
296
- ij.prototype.configure=function(a){this.s=a;this.A=new Me({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)};ij.prototype.start=function(){var a=this;return H(function(b){if(1==b.g)return u(b,mj(a),2);mf(a.M);a.o=!0;z(b)})};
297
- function nj(a,b){var c,d,e,f,g,h;H(function(k){switch(k.g){case 1:return c=Sb,A(k,2),u(k,ni(a.G.W,c.qa),4);case 4:va(k,3);break;case 2:if(d=E(k),a.G)a.G.onError(d);case 3:e=md(b.mimeType,b.codecs);bi(a.G.W,e);f=a.G.W.o;if(g=f.isTextVisible()||a.s.alwaysStreamText)h=oj(b),a.g.set(c.qa,h),pj(a,h,0);z(k)}})}function qj(a){var b=a.g.get(Rb);b&&(kj(b),lj(b)["catch"](function(){}),a.g["delete"](Rb));a.i=null}
298
- function rj(a,b){var c=a.g.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Rb&&(sj(a,e,!1,0,!1),c.Rb=d)}else if(d=c.Rb)c.Rb=null,sj(a,d,!0,0,!1)}}function tj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.h=b;a.o&&(b.video&&sj(a,b.video,c,d,e),b.audio&&sj(a,b.audio,c,d,e))}function uj(a,b){a.i=b;a.o&&sj(a,b,!0,0,!1)}
299
- function sj(a,b,c,d,e){var f=a.g.get(b.type);f||b.type!=Rb?f&&(f.Rb&&(b.trickModeVideo?(f.Rb=b,b=b.trickModeVideo):f.Rb=null),f.stream!=b||e)&&(b.type==Rb&&bi(a.G.W,md(b.mimeType,b.codecs)),f.stream=b,f.ua=null,c&&(f.yc?f.zd=!0:f.cb?(f.Tb=!0,f.cd=d,f.zd=!0):(kj(f),vj(a,f,!0,d)["catch"](function(g){if(a.G)a.G.onError(g)}))),wj(a,f)["catch"](function(g){if(a.G)a.G.onError(g)})):nj(a,b)}
300
- function wj(a,b){var c,d;return H(function(e){if(1==e.g){if(!b.Qa)return e["return"]();c=b.stream;d=b.Qa;return c.segmentIndex?e.C(2):u(e,c.createSegmentIndex(),2)}if(b.Qa!=d||b.stream!=c)return e["return"]();var f=a.G.jd();var g=gi(a.G.W,b.type),h=b.stream.segmentIndex.find(b.Va?b.Va.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.wa?k.wa-k.Ca:null:null;k&&!h&&(h=(k.endTime-k.startTime)*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.wa?k.wa-k.Ca:null)||0),k=a.G.getBandwidthEstimate(),
301
- f=8*h/k<(g||0)-f-Math.max(a.F.minBufferTime||0,a.s.rebufferingGoal)||b.Qa.h.g>h?!0:!1):f=!1;f&&b.Qa.abort();z(e)})}function xj(a,b){b.yc||b.Tb||(b.cb?(b.Tb=!0,b.cd=0):null==ei(a.G.W,b.type)?null==b.gb&&pj(a,b,0):(kj(b),vj(a,b,!1,0)["catch"](function(c){if(a.G)a.G.onError(c)})))}
302
- function mj(a){var b,c,d,e,f,g,h,k,l,m;return H(function(n){if(1==n.g){b=Sb;if(!a.h)throw new O(2,5,5006);c=new Map;d=new Set;a.h.audio&&(c.set(b.Bb,a.h.audio),d.add(a.h.audio));a.h.video&&(c.set(b.ib,a.h.video),d.add(a.h.video));a.i&&(c.set(b.qa,a.i),d.add(a.i));e=a.G.W;f=a.s.forceTransmuxTS;return u(n,e.init(c,f),2)}mf(a.M);var p=a.F.presentationTimeline.getDuration();Infinity>p?a.G.W.eb(p):a.G.W.eb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.g.has(k)||
303
- (m=oj(l),a.g.set(k,m),pj(a,m,0));z(n)})}function oj(a){return{stream:a,type:a.type,ua:null,Va:null,ld:null,Yd:null,Xd:null,Wd:null,Rb:null,endOfStream:!1,cb:!1,gb:null,Tb:!1,cd:0,zd:!1,yc:!1,le:!1,Gc:!1,Qa:null}}
304
- ij.prototype.Lc=function(a){var b=this,c,d,e,f,g;return H(function(h){switch(h.g){case 1:mf(b.M);if(a.cb||null==a.gb||a.yc)return h["return"]();a.gb=null;if(!a.Tb){h.C(2);break}return u(h,vj(b,a,a.zd,a.cd),3);case 3:return h["return"]();case 2:if(a.stream.segmentIndex){h.C(4);break}c=a.stream;return u(h,a.stream.createSegmentIndex(),5);case 5:if(c!=a.stream)return null==a.gb&&pj(b,a,0),h["return"]();case 4:A(h,6);d=yj(b,a);null!=d&&(pj(b,a,d),a.Gc=!1);va(h,7);break;case 6:return e=E(h),u(h,zj(b,e),
305
- 8);case 8:return h["return"]();case 7:f=Array.from(b.g.values());if(!b.o||!f.every(function(k){return k.endOfStream})){h.C(0);break}return u(h,b.G.W.endOfStream(),10);case 10:mf(b.M),g=b.G.W.getDuration(),0!=g&&g<b.F.presentationTimeline.getDuration()&&b.F.presentationTimeline.eb(g),z(h)}})};
306
- function yj(a,b){if(Aj(b))return li(a.G.W,b.stream.originalId||""),null;b.type==Rb&&mi(a.G.W);var c=a.G.jd(),d=b.Va?b.Va.endTime:c,e=hi(a.G.W,b.type,c),f=Math.max(a.F.minBufferTime||0,a.s.rebufferingGoal,a.s.bufferingGoal)*a.l;if(1E-6>a.F.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.g.get(Rb))&&Aj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.s.updateIntervalSeconds/2;e=gi(a.G.W,b.type);e=Bj(a,b,c,e);if(!e)return a.s.updateIntervalSeconds;f=Infinity;
307
- var g=Array.from(a.g.values());g=r(g);for(var h=g.next();!h.done;h=g.next())h=h.value,Aj(h)||h.ua&&!h.ua.current()||(f=Math.min(f,h.Va?h.Va.endTime:c));if(d>=f+a.F.presentationTimeline.g)return a.s.updateIntervalSeconds;Cj(a,b,c,e)["catch"](function(){});return null}
308
- function Bj(a,b,c,d){if(b.ua)return b.ua.current();if(b.Va||d)return b.ua=b.stream.segmentIndex.bc(b.Va?b.Va.endTime:d),b.ua&&b.ua.next().value;a=a.s.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ua=b.stream.segmentIndex.bc(d),e=b.ua&&b.ua.next().value);e||(b.ua=b.stream.segmentIndex.bc(c),e=b.ua&&b.ua.next().value);return e}
309
- function Cj(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,y;return H(function(x){switch(x.g){case 1:return e=Sb,f=b.stream,g=b.ua,b.cb=!0,A(x,2),u(x,Dj(a,b,d),4);case 4:mf(a.M);if(a.j)return x["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.s.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(w){var C,D,B;return H(function(F){mf(a.M);if(a.j)return F["return"]();n=Ej(n,w);C=!1;D=0;(new tg).box("mdat",function(G){D=G.size+G.start;C=!0}).parse(n,!1,!0);if(!C)return F.C(0);
310
- B=n.subarray(0,D);n=n.subarray(D);return u(F,Fj(a,b,c,f,d,B),0)})},u(x,Gj(a,b,d,p),6);l=Gj(a,b,d);return u(x,l,7);case 7:return m=x.h,mf(a.M),a.j?x["return"]():b.Tb?(b.cb=!1,pj(a,b,0),x["return"]()):u(x,Fj(a,b,c,f,d,m),6);case 6:mf(a.M);if(a.j)return x["return"]();b.Va=d;g.next();b.cb=!1;b.le=!1;t=a.G.W.fd();v=t[b.type];Ya(JSON.stringify(v));b.Tb||a.G.je();pj(a,b,0);va(x,0);break;case 2:y=E(x);mf(a.M,y);if(a.j)return x["return"]();b.cb=!1;if(7001==y.code)b.cb=!1,b.gb=null,pj(a,b,0),x.C(0);else if(b.type==
311
- e.qa&&a.s.ignoreTextStreamFailures)a.g["delete"](e.qa),x.C(0);else if(3017==y.code)Hj(a,b,y),x.C(0);else if(1001==y.code&&y.data&&404==y.data[1])b.cb=!1,b.gb=null,pj(a,b,1),x.C(0);else return b.Gc=!0,y.severity=2,u(x,zj(a,y),0)}})}function Ej(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
312
- function Hj(a,b,c){if(!Array.from(a.g.values()).some(function(e){return e!=b&&e.le})){var d=Math.round(100*a.l);if(20<d)a.l-=.2;else if(4<d)a.l-=.04;else{b.Gc=!0;a.j=!0;a.G.onError(c);return}b.le=!0}pj(a,b,4)}
313
- function Dj(a,b,c){var d,e,f,g,h,k,l;return H(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Yd||e!=b.Xd||f!=b.Wd)h=function(){var n;return H(function(p){if(1==p.g)return A(p,2),b.Xd=e,b.Wd=f,b.Yd=g,u(p,oi(a.G.W,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=E(p);b.Xd=null;b.Wd=null;b.Yd=null;throw n;})},d.push(h());!ti(c.h,b.ld)&&(b.ld=c.h)&&(k=Gj(a,b,c.h),l=function(){var n,p,t;return H(function(v){switch(v.g){case 1:return A(v,2),u(v,k,4);
294
+ function $i(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.h.currentTime,f=b,g=r(d.i.g),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.g.get(h),l=e<h.startTime?aj:e>h.endTime?bj:cj;d.g.set(h,l);for(var m=r(d.j),n=m.next();!n.done;n=m.next())n=n.value,n.Wb==k&&n.Vb==l&&n.Lb(h,f)}}};function dj(a){eb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new P(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new M("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).oa(2)}qa(dj,eb);dj.prototype.release=function(){this.g.clear();this.h.stop();eb.prototype.release.call(this)};function ej(a){eb.call(this);var b=this;this.i=a;this.g=new Map;this.j=[{Wb:null,Vb:cj,Lb:function(c,d){return fj(b,"enter",c,d)}},{Wb:aj,Vb:cj,Lb:function(c,d){return fj(b,"enter",c,d)}},{Wb:bj,Vb:cj,Lb:function(c,d){return fj(b,"enter",c,d)}},{Wb:cj,Vb:aj,Lb:function(c,d){return fj(b,"exit",c,d)}},{Wb:cj,Vb:bj,Lb:function(c,d){return fj(b,"exit",c,d)}},{Wb:aj,Vb:bj,Lb:function(c,d){return fj(b,"skip",c,d)}},{Wb:bj,Vb:aj,Lb:function(c,d){return fj(b,"skip",c,d)}}];this.h=new nf;this.h.m(this.i,"regionremove",
295
+ function(c){b.g["delete"](c.region)})}qa(ej,eb);ej.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;eb.prototype.release.call(this)};function fj(a,b,c,d){b=new M(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var aj=1,cj=2,bj=3;function gj(a,b,c,d,e){a=df(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function hj(a,b){var c=this;this.G=b;this.F=a;this.s=null;this.l=1;this.i=this.h=null;this.g=new Map;this.o=!1;this.A=null;this.j=!1;this.M=new lf(function(){return ij(c)})}hj.prototype.destroy=function(){return this.M.destroy()};function ij(a){var b,c,d,e;return H(function(f){if(1==f.g){b=[];c=r(a.g.values());for(d=c.next();!d.done;d=c.next())e=d.value,jj(e),b.push(kj(e));return u(f,Promise.all(b),2)}a.g.clear();a.G=null;a.F=null;a.s=null;z(f)})}
296
+ hj.prototype.configure=function(a){this.s=a;this.A=new Me({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)};hj.prototype.start=function(){var a=this;return H(function(b){if(1==b.g)return u(b,lj(a),2);mf(a.M);a.o=!0;z(b)})};
297
+ function mj(a,b){var c,d,e,f,g,h;H(function(k){switch(k.g){case 1:return c=Sb,A(k,2),u(k,ni(a.G.W,c.ra),4);case 4:va(k,3);break;case 2:if(d=E(k),a.G)a.G.onError(d);case 3:e=md(b.mimeType,b.codecs);bi(a.G.W,e);f=a.G.W.o;if(g=f.isTextVisible()||a.s.alwaysStreamText)h=nj(b),a.g.set(c.ra,h),oj(a,h,0);z(k)}})}function pj(a){var b=a.g.get(Rb);b&&(jj(b),kj(b)["catch"](function(){}),a.g["delete"](Rb));a.i=null}
298
+ function qj(a,b){var c=a.g.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Sb&&(rj(a,e,!1,0,!1),c.Sb=d)}else if(d=c.Sb)c.Sb=null,rj(a,d,!0,0,!1)}}function sj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.h=b;a.o&&(b.video&&rj(a,b.video,c,d,e),b.audio&&rj(a,b.audio,c,d,e))}function tj(a,b){a.i=b;a.o&&rj(a,b,!0,0,!1)}
299
+ function rj(a,b,c,d,e){var f=a.g.get(b.type);f||b.type!=Rb?f&&(f.Sb&&(b.trickModeVideo?(f.Sb=b,b=b.trickModeVideo):f.Sb=null),f.stream!=b||e)&&(b.type==Rb&&bi(a.G.W,md(b.mimeType,b.codecs)),f.stream=b,f.va=null,c&&(f.zc?f.zd=!0:f.eb?(f.Ub=!0,f.cd=d,f.zd=!0):(jj(f),uj(a,f,!0,d)["catch"](function(g){if(a.G)a.G.onError(g)}))),vj(a,f)["catch"](function(g){if(a.G)a.G.onError(g)})):mj(a,b)}
300
+ function vj(a,b){var c,d;return H(function(e){if(1==e.g){if(!b.Qa)return e["return"]();c=b.stream;d=b.Qa;return c.segmentIndex?e.C(2):u(e,c.createSegmentIndex(),2)}if(b.Qa!=d||b.stream!=c)return e["return"]();var f=a.G.jd();var g=gi(a.G.W,b.type),h=b.stream.segmentIndex.find(b.Va?b.Va.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.wa?k.wa-k.Da:null:null;k&&!h&&(h=(k.endTime-k.startTime)*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.wa?k.wa-k.Da:null)||0),k=a.G.getBandwidthEstimate(),
301
+ f=8*h/k<(g||0)-f-Math.max(a.F.minBufferTime||0,a.s.rebufferingGoal)||b.Qa.h.g>h?!0:!1):f=!1;f&&b.Qa.abort();z(e)})}function wj(a,b){b.zc||b.Ub||(b.eb?(b.Ub=!0,b.cd=0):null==ei(a.G.W,b.type)?null==b.hb&&oj(a,b,0):(jj(b),uj(a,b,!1,0)["catch"](function(c){if(a.G)a.G.onError(c)})))}
302
+ function lj(a){var b,c,d,e,f,g,h,k,l,m;return H(function(n){if(1==n.g){b=Sb;if(!a.h)throw new N(2,5,5006);c=new Map;d=new Set;a.h.audio&&(c.set(b.Cb,a.h.audio),d.add(a.h.audio));a.h.video&&(c.set(b.ib,a.h.video),d.add(a.h.video));a.i&&(c.set(b.ra,a.i),d.add(a.i));e=a.G.W;f=a.s.forceTransmuxTS;return u(n,e.init(c,f),2)}mf(a.M);var p=a.F.presentationTimeline.getDuration();Infinity>p?a.G.W.fb(p):a.G.W.fb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.g.has(k)||
303
+ (m=nj(l),a.g.set(k,m),oj(a,m,0));z(n)})}function nj(a){return{stream:a,type:a.type,va:null,Va:null,ld:null,Yd:null,Xd:null,Wd:null,Sb:null,endOfStream:!1,eb:!1,hb:null,Ub:!1,cd:0,zd:!1,zc:!1,le:!1,Hc:!1,Qa:null}}
304
+ hj.prototype.Mc=function(a){var b=this,c,d,e,f,g;return H(function(h){switch(h.g){case 1:mf(b.M);if(a.eb||null==a.hb||a.zc)return h["return"]();a.hb=null;if(!a.Ub){h.C(2);break}return u(h,uj(b,a,a.zd,a.cd),3);case 3:return h["return"]();case 2:if(a.stream.segmentIndex){h.C(4);break}c=a.stream;return u(h,a.stream.createSegmentIndex(),5);case 5:if(c!=a.stream)return null==a.hb&&oj(b,a,0),h["return"]();case 4:A(h,6);d=xj(b,a);null!=d&&(oj(b,a,d),a.Hc=!1);va(h,7);break;case 6:return e=E(h),u(h,yj(b,e),
305
+ 8);case 8:return h["return"]();case 7:f=Array.from(b.g.values());if(!b.o||!f.every(function(k){return k.endOfStream})){h.C(0);break}return u(h,b.G.W.endOfStream(),10);case 10:mf(b.M),g=b.G.W.getDuration(),0!=g&&g<b.F.presentationTimeline.getDuration()&&b.F.presentationTimeline.fb(g),z(h)}})};
306
+ function xj(a,b){if(zj(b))return li(a.G.W,b.stream.originalId||""),null;b.type==Rb&&mi(a.G.W);var c=a.G.jd(),d=b.Va?b.Va.endTime:c,e=hi(a.G.W,b.type,c),f=Math.max(a.F.minBufferTime||0,a.s.rebufferingGoal,a.s.bufferingGoal)*a.l;if(1E-6>a.F.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.g.get(Rb))&&zj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.s.updateIntervalSeconds/2;e=gi(a.G.W,b.type);e=Aj(a,b,c,e);if(!e)return a.s.updateIntervalSeconds;f=Infinity;
307
+ var g=Array.from(a.g.values());g=r(g);for(var h=g.next();!h.done;h=g.next())h=h.value,zj(h)||h.va&&!h.va.current()||(f=Math.min(f,h.Va?h.Va.endTime:c));if(d>=f+a.F.presentationTimeline.g)return a.s.updateIntervalSeconds;Bj(a,b,c,e)["catch"](function(){});return null}
308
+ function Aj(a,b,c,d){if(b.va)return b.va.current();if(b.Va||d)return b.va=b.stream.segmentIndex.cc(b.Va?b.Va.endTime:d),b.va&&b.va.next().value;a=a.s.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.va=b.stream.segmentIndex.cc(d),e=b.va&&b.va.next().value);e||(b.va=b.stream.segmentIndex.cc(c),e=b.va&&b.va.next().value);return e}
309
+ function Bj(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,y;return H(function(x){switch(x.g){case 1:return e=Sb,f=b.stream,g=b.va,b.eb=!0,A(x,2),u(x,Cj(a,b,d),4);case 4:mf(a.M);if(a.j)return x["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.s.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(w){var C,D,B;return H(function(F){mf(a.M);if(a.j)return F["return"]();n=Dj(n,w);C=!1;D=0;(new tg).box("mdat",function(G){D=G.size+G.start;C=!0}).parse(n,!1,!0);if(!C)return F.C(0);
310
+ B=n.subarray(0,D);n=n.subarray(D);return u(F,Ej(a,b,c,f,d,B),0)})},u(x,Fj(a,b,d,p),6);l=Fj(a,b,d);return u(x,l,7);case 7:return m=x.h,mf(a.M),a.j?x["return"]():b.Ub?(b.eb=!1,oj(a,b,0),x["return"]()):u(x,Ej(a,b,c,f,d,m),6);case 6:mf(a.M);if(a.j)return x["return"]();b.Va=d;g.next();b.eb=!1;b.le=!1;t=a.G.W.fd();v=t[b.type];Ya(JSON.stringify(v));b.Ub||a.G.je();oj(a,b,0);va(x,0);break;case 2:y=E(x);mf(a.M,y);if(a.j)return x["return"]();b.eb=!1;if(7001==y.code)b.eb=!1,b.hb=null,oj(a,b,0),x.C(0);else if(b.type==
311
+ e.ra&&a.s.ignoreTextStreamFailures)a.g["delete"](e.ra),x.C(0);else if(3017==y.code)Gj(a,b,y),x.C(0);else if(1001==y.code&&y.data&&404==y.data[1])b.eb=!1,b.hb=null,oj(a,b,1),x.C(0);else return b.Hc=!0,y.severity=2,u(x,yj(a,y),0)}})}function Dj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
312
+ function Gj(a,b,c){if(!Array.from(a.g.values()).some(function(e){return e!=b&&e.le})){var d=Math.round(100*a.l);if(20<d)a.l-=.2;else if(4<d)a.l-=.04;else{b.Hc=!0;a.j=!0;a.G.onError(c);return}b.le=!0}oj(a,b,4)}
313
+ function Cj(a,b,c){var d,e,f,g,h,k,l;return H(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Yd||e!=b.Xd||f!=b.Wd)h=function(){var n;return H(function(p){if(1==p.g)return A(p,2),b.Xd=e,b.Wd=f,b.Yd=g,u(p,oi(a.G.W,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=E(p);b.Xd=null;b.Wd=null;b.Yd=null;throw n;})},d.push(h());!ti(c.h,b.ld)&&(b.ld=c.h)&&(k=Fj(a,b,c.h),l=function(){var n,p,t;return H(function(v){switch(v.g){case 1:return A(v,2),u(v,k,4);
314
314
  case 4:return n=v.h,mf(a.M),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,ii(a.G.W,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw t=E(v),b.ld=null,t;}})},d.push(l()));return u(m,Promise.all(d),0)})}
315
- function Fj(a,b,c,d,e,f){var g;return H(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new tg).Y("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Nc();var n=k.reader.Nc();var p=k.reader.S();var t=k.reader.S();var v=k.reader.S();var y=k.reader.S();var x=e.startTime+t/p}else p=k.reader.S(),x=k.reader.lc()/p+e.timestampOffset,t=x-e.startTime,v=k.reader.S(),y=k.reader.S(),m=k.reader.Nc(),n=k.reader.Nc();
316
- k=k.reader.zb(k.reader.V.byteLength-k.reader.ma());l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.G.Hg():(l=(new Map).set("detail",{startTime:x,endTime:x+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:t,eventDuration:v,id:y,messageData:k}),l=new M(Ij,l),a.G.onEvent(l)))}).parse(f),u(h,Jj(a,b,c),2);if(3!=h.g)return mf(a.M),u(h,ii(a.G.W,b.type,f,e.startTime,e.endTime,g),3);mf(a.M);z(h)})}
317
- function Jj(a,b,c){var d,e,f,g;return H(function(h){if(1==h.g){d=Math.max(a.s.bufferBehind,a.F.presentationTimeline.g);e=ei(a.G.W,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.G.W.remove(b.type,e,e+g),2)}mf(a.M);z(h)})}function Aj(a){return a&&a.type==Rb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
318
- function Gj(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g)return e=kf,f=hj(c.Ga(),c.Ca,c.wa,a.s.retryParameters,d),g=a.G.Ob.request(e,f),b.Qa=g,u(k,g.promise,2);h=k.h;b.Qa=null;return k["return"](h.data)})}
319
- function vj(a,b,c,d){var e,f;return H(function(g){if(1==g.g)return b.Tb=!1,b.zd=!1,b.cd=0,b.yc=!0,b.Va=null,b.ld=null,b.ua=null,d?(e=a.G.jd(),f=a.G.W.getDuration(),u(g,a.G.W.remove(b.type,e+d,f),3)):u(g,ni(a.G.W,b.type),4);if(3!=g.g)return mf(a.M),c?u(g,a.G.W.flush(b.type),3):g.C(3);mf(a.M);b.yc=!1;b.endOfStream=!1;pj(a,b,0);z(g)})}
320
- function pj(a,b,c){var d=b.type;if(d!=Rb||a.g.has(d))b.gb=(new zd(function(){var e;return H(function(f){if(1==f.g)return A(f,2),u(f,a.Lc(b),4);if(2!=f.g)return va(f,0);e=E(f);if(a.G)a.G.onError(e);z(f)})})).T(c)}function kj(a){null!=a.gb&&(a.gb.stop(),a.gb=null)}function lj(a){return H(function(b){return a.Qa?u(b,a.Qa.abort(),0):b.C(0)})}function zj(a,b){return H(function(c){if(1==c.g)return u(c,Oe(a.A),2);mf(a.M);a.G.onError(b);b.handled||a.s.failureCallback(b);z(c)})};function Kj(a,b){var c=Lj(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.o=[];this.h=this.g=null;this.B=Promise.resolve().then(function(){return Mj(d)});this.M=new lf(function(){return Nj(d)})}Kj.prototype.destroy=function(){return this.M.destroy()};function Nj(a){var b,c,d;return H(function(e){if(1==e.g)return a.h&&a.h.abort(),Oj(a),u(e,a.B,2);a.g&&a.g.ab.Pb();b=r(a.o);for(c=b.next();!c.done;c=b.next())d=c.value,d.ab.Pb();a.g=null;a.o=[];a.j=null;z(e)})}
321
- function Pj(a,b){var c={ic:function(){},nd:function(){},Pb:function(){},onError:function(){},pd:function(){},wi:function(){}};a.o.push({create:b,ab:c});a.h&&a.h.abort();Oj(a);return c}
322
- function Mj(a){return H(function(b){if(a.M.g)b=b.C(0);else{if(0==a.o.length||a.g&&!a.g.Jb)var c=!1;else{a.g&&(a.g.ab.Pb(),a.g=null);c=a.o.shift();var d=c.create(a.l);d?(c.ab.ic(),a.g={node:d.node,payload:d.payload,Jb:d.Jb,ab:c.ab}):c.ab.pd();c=!0}c?c=Promise.resolve():a.g?c=Qj(a):(a.j.Gg(a.i),a.A=new Sc,c=a.A);b=u(b,c,1)}return b})}
323
- function Qj(a){var b,c;return H(function(d){switch(d.g){case 1:return a.i=a.j.kg(a.i,a.l,a.g.node,a.g.payload),A(d,2),a.h=a.j.Pf(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.ab.nd(),a.g=null);va(d,0);break;case 2:b=E(d);if(7001==b.code)a.g.ab.Pb();else a.g.ab.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function Oj(a){a.A&&(a.A.resolve(),a.A=null)};function Rj(a){this.g=null;for(var b=r(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"}q=Rj.prototype;q.remove=function(a,b){if(!this.g)return!1;Sj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
315
+ function Ej(a,b,c,d,e,f){var g;return H(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new tg).X("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Oc();var n=k.reader.Oc();var p=k.reader.R();var t=k.reader.R();var v=k.reader.R();var y=k.reader.R();var x=e.startTime+t/p}else p=k.reader.R(),x=k.reader.mc()/p+e.timestampOffset,t=x-e.startTime,v=k.reader.R(),y=k.reader.R(),m=k.reader.Oc(),n=k.reader.Oc();
316
+ k=k.reader.Ab(k.reader.V.byteLength-k.reader.ma());l&&l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.G.Hg():(l=(new Map).set("detail",{startTime:x,endTime:x+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:t,eventDuration:v,id:y,messageData:k}),l=new M(Hj,l),a.G.onEvent(l)))}).parse(f),u(h,Ij(a,b,c),2);if(3!=h.g)return mf(a.M),u(h,ii(a.G.W,b.type,f,e.startTime,e.endTime,g),3);mf(a.M);z(h)})}
317
+ function Ij(a,b,c){var d,e,f,g;return H(function(h){if(1==h.g){d=Math.max(a.s.bufferBehind,a.F.presentationTimeline.g);e=ei(a.G.W,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.G.W.remove(b.type,e,e+g),2)}mf(a.M);z(h)})}function zj(a){return a&&a.type==Rb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
318
+ function Fj(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g)return e=kf,f=gj(c.Ha(),c.Da,c.wa,a.s.retryParameters,d),g=a.G.Pb.request(e,f),b.Qa=g,u(k,g.promise,2);h=k.h;b.Qa=null;return k["return"](h.data)})}
319
+ function uj(a,b,c,d){var e,f;return H(function(g){if(1==g.g)return b.Ub=!1,b.zd=!1,b.cd=0,b.zc=!0,b.Va=null,b.ld=null,b.va=null,d?(e=a.G.jd(),f=a.G.W.getDuration(),u(g,a.G.W.remove(b.type,e+d,f),3)):u(g,ni(a.G.W,b.type),4);if(3!=g.g)return mf(a.M),c?u(g,a.G.W.flush(b.type),3):g.C(3);mf(a.M);b.zc=!1;b.endOfStream=!1;oj(a,b,0);z(g)})}
320
+ function oj(a,b,c){var d=b.type;if(d!=Rb||a.g.has(d))b.hb=(new zd(function(){var e;return H(function(f){if(1==f.g)return A(f,2),u(f,a.Mc(b),4);if(2!=f.g)return va(f,0);e=E(f);if(a.G)a.G.onError(e);z(f)})})).T(c)}function jj(a){null!=a.hb&&(a.hb.stop(),a.hb=null)}function kj(a){return H(function(b){return a.Qa?u(b,a.Qa.abort(),0):b.C(0)})}function yj(a,b){return H(function(c){if(1==c.g)return u(c,Oe(a.A),2);mf(a.M);a.G.onError(b);b.handled||a.s.failureCallback(b);z(c)})};function Jj(a,b){var c=Kj(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.o=[];this.h=this.g=null;this.B=Promise.resolve().then(function(){return Lj(d)});this.M=new lf(function(){return Mj(d)})}Jj.prototype.destroy=function(){return this.M.destroy()};function Mj(a){var b,c,d;return H(function(e){if(1==e.g)return a.h&&a.h.abort(),Nj(a),u(e,a.B,2);a.g&&a.g.bb.Qb();b=r(a.o);for(c=b.next();!c.done;c=b.next())d=c.value,d.bb.Qb();a.g=null;a.o=[];a.j=null;z(e)})}
321
+ function Oj(a,b){var c={jc:function(){},nd:function(){},Qb:function(){},onError:function(){},pd:function(){},wi:function(){}};a.o.push({create:b,bb:c});a.h&&a.h.abort();Nj(a);return c}
322
+ function Lj(a){return H(function(b){if(a.M.g)b=b.C(0);else{if(0==a.o.length||a.g&&!a.g.Kb)var c=!1;else{a.g&&(a.g.bb.Qb(),a.g=null);c=a.o.shift();var d=c.create(a.l);d?(c.bb.jc(),a.g={node:d.node,payload:d.payload,Kb:d.Kb,bb:c.bb}):c.bb.pd();c=!0}c?c=Promise.resolve():a.g?c=Pj(a):(a.j.Gg(a.i),a.A=new Sc,c=a.A);b=u(b,c,1)}return b})}
323
+ function Pj(a){var b,c;return H(function(d){switch(d.g){case 1:return a.i=a.j.kg(a.i,a.l,a.g.node,a.g.payload),A(d,2),a.h=a.j.Pf(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.bb.nd(),a.g=null);va(d,0);break;case 2:b=E(d);if(7001==b.code)a.g.bb.Qb();else a.g.bb.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function Nj(a){a.A&&(a.A.resolve(),a.A=null)};function Qj(a){this.g=null;for(var b=r(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"}q=Qj.prototype;q.remove=function(a,b){if(!this.g)return!1;Rj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
324
324
  q.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(n,p){return n+"<"+p+">"},"");h=h.reduceRight(function(n,p){return n+"</"+p+">"},"");return g.lineBreak||g.spacer?(g.spacer&&Db("shaka.extern.Cue","Please use lineBreak instead of spacer."),"\n"):g.nestedCues.length?g.nestedCues.map(b).join(""):k+g.payload+h}var c=a.map(function(g){if(g.nestedCues.length){var h=
325
- g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):[];var e={};c=r(c);for(var f=c.next();!f.done;e={Wb:e.Wb},f=c.next())e.Wb=f.value,a.some(function(g){return function(h){return h.startTime==g.Wb.startTime&&h.endTime==g.Wb.endTime&&h.text==g.Wb.payload?!0:!1}}(e))||(f=Tj(e.Wb))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-
326
- d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=r(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};q.destroy=function(){this.g&&(Sj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
327
- function Tj(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}
328
- function Sj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}J("shaka.text.SimpleTextDisplayer",Rj);Rj.prototype.setTextVisibility=Rj.prototype.setTextVisibility;Rj.prototype.isTextVisible=Rj.prototype.isTextVisible;Rj.prototype.destroy=Rj.prototype.destroy;Rj.prototype.append=Rj.prototype.append;Rj.prototype.remove=Rj.prototype.remove;function Uj(){}function R(a){return document.createElement(a)}function Vj(){return document.createElement("button")}function Wj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}J("shaka.util.Dom",Uj);Uj.removeAllChildren=Wj;function Xj(a,b){var c=this;this.o=!1;this.l=[];this.g=a;this.B=b;this.i=R("div");this.i.classList.add("shaka-text-container");this.i.style.textAlign="center";this.i.style.display="flex";this.i.style.flexDirection="column";this.i.style.alignItems="center";this.i.style.justifyContent="flex-end";this.B.appendChild(this.i);this.D=(new P(function(){Yj(c)})).oa(.25);this.j=new Map;this.h=new nf;this.h.m(document,"fullscreenchange",function(){Yj(c,!0)});this.A=null;"ResizeObserver"in window&&(this.A=new ResizeObserver(function(){Yj(c,
329
- !0)}),this.A.observe(this.i))}q=Xj.prototype;q.append=function(a){var b=[].concat(ia(this.l)),c={};a=r(a);for(var d=a.next();!d.done;c={Rc:c.Rc},d=a.next())c.Rc=d.value,b.some(function(e){return function(f){return zc(f,e.Rc)}}(c))||this.l.push(c.Rc);Yj(this)};q.destroy=function(){this.B.removeChild(this.i);this.i=null;this.o=!1;this.l=[];this.D&&this.D.stop();this.j.clear();this.h&&(this.h.release(),this.h=null);this.A&&(this.A.disconnect(),this.A=null)};
330
- q.remove=function(a,b){if(!this.i)return!1;var c=this.l.length;this.l=this.l.filter(function(d){return d.startTime<a||d.endTime>=b});Yj(this,c>this.l.length);return!0};q.isTextVisible=function(){return this.o};q.setTextVisibility=function(a){this.o=a};
331
- function Zj(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.j.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Bf:null;l&&(g.push(l.Pe),m||(f=!0,a.j["delete"](k),l=null));m&&(h.push(k),l||(ak(a,k,e),l=a.j.get(k),n=l.Bf,f=!0));0<k.nestedCues.length&&n&&Zj(a,k.nestedCues,n,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(p,t){return p.startTime!=t.startTime?p.startTime-t.startTime:p.endTime-t.endTime});
332
- h=r(h);for(k=h.next();!k.done;k=h.next())d=a.j.get(k.value),c.appendChild(d.Pe)}}function Yj(a,b){if(a.i){var c=a.g.currentTime;(!a.o||(void 0===b?0:b))&&0<a.j.size&&(Wj(a.i),a.j.clear());if(a.o){for(var d=new Map,e=r(a.j.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.j.get(f));Zj(a,a.l,a.i,c,[])}}}
333
- function ak(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Db("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=R(e);"br"!=e&&bk(a,f,b,c,d);c=f;d&&(c=R("span"),c.classList.add("shaka-text-wrapper"),c.style.backgroundColor=b.backgroundColor,f.appendChild(c));a.j.set(b,{Pe:f,Bf:c})}
334
- function bk(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.backgroundColor=c.backgroundColor;f.border=c.border;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=ck(c.linePadding,c,a.B);f.paddingRight=ck(c.linePadding,c,a.B);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition=
335
- "center";else{if(c.nestedCues.length)var l=b;else l=R("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=dk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=
336
- c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=ck(c.fontSize,c,a.B);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==tc?(f.width="100%",c.lineAlign==vc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==vc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==vc?f.right=c.line+"%":"end"==
325
+ g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):[];var e={};c=r(c);for(var f=c.next();!f.done;e={Xb:e.Xb},f=c.next())e.Xb=f.value,a.some(function(g){return function(h){return h.startTime==g.Xb.startTime&&h.endTime==g.Xb.endTime&&h.text==g.Xb.payload?!0:!1}}(e))||(f=Sj(e.Xb))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-
326
+ d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=r(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};q.destroy=function(){this.g&&(Rj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
327
+ function Sj(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
328
+ function Rj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}J("shaka.text.SimpleTextDisplayer",Qj);Qj.prototype.setTextVisibility=Qj.prototype.setTextVisibility;Qj.prototype.isTextVisible=Qj.prototype.isTextVisible;Qj.prototype.destroy=Qj.prototype.destroy;Qj.prototype.append=Qj.prototype.append;Qj.prototype.remove=Qj.prototype.remove;function Tj(){}function R(a){return document.createElement(a)}function Uj(){return document.createElement("button")}function Vj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}J("shaka.util.Dom",Tj);Tj.removeAllChildren=Vj;function Wj(a,b){var c=this;this.o=!1;this.l=[];this.g=a;this.B=b;this.i=R("div");this.i.classList.add("shaka-text-container");this.i.style.textAlign="center";this.i.style.display="flex";this.i.style.flexDirection="column";this.i.style.alignItems="center";this.i.style.justifyContent="flex-end";this.B.appendChild(this.i);this.D=(new P(function(){Xj(c)})).oa(.25);this.j=new Map;this.h=new nf;this.h.m(document,"fullscreenchange",function(){Xj(c,!0)});this.A=null;"ResizeObserver"in window&&(this.A=new ResizeObserver(function(){Xj(c,
329
+ !0)}),this.A.observe(this.i))}q=Wj.prototype;q.append=function(a){var b=[].concat(ha(this.l)),c={};a=r(a);for(var d=a.next();!d.done;c={Sc:c.Sc},d=a.next())c.Sc=d.value,b.some(function(e){return function(f){return zc(f,e.Sc)}}(c))||this.l.push(c.Sc);Xj(this)};q.destroy=function(){this.B.removeChild(this.i);this.i=null;this.o=!1;this.l=[];this.D&&this.D.stop();this.j.clear();this.h&&(this.h.release(),this.h=null);this.A&&(this.A.disconnect(),this.A=null)};
330
+ q.remove=function(a,b){if(!this.i)return!1;var c=this.l.length;this.l=this.l.filter(function(d){return d.startTime<a||d.endTime>=b});Xj(this,c>this.l.length);return!0};q.isTextVisible=function(){return this.o};q.setTextVisibility=function(a){this.o=a};
331
+ function Yj(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.j.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Bf:null;l&&(g.push(l.Pe),m||(f=!0,a.j["delete"](k),l=null));m&&(h.push(k),l||(Zj(a,k,e),l=a.j.get(k),n=l.Bf,f=!0));0<k.nestedCues.length&&n&&Yj(a,k.nestedCues,n,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(p,t){return p.startTime!=t.startTime?p.startTime-t.startTime:p.endTime-t.endTime});
332
+ h=r(h);for(k=h.next();!k.done;k=h.next())d=a.j.get(k.value),c.appendChild(d.Pe)}}function Xj(a,b){if(a.i){var c=a.g.currentTime;(!a.o||(void 0===b?0:b))&&0<a.j.size&&(Vj(a.i),a.j.clear());if(a.o){for(var d=new Map,e=r(a.j.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.j.get(f));Yj(a,a.l,a.i,c,[])}}}
333
+ function Zj(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Db("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=R(e);"br"!=e&&ak(a,f,b,c,d);c=f;d&&(c=R("span"),c.classList.add("shaka-text-wrapper"),c.style.backgroundColor=b.backgroundColor,f.appendChild(c));a.j.set(b,{Pe:f,Bf:c})}
334
+ function ak(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.backgroundColor=c.backgroundColor;f.border=c.border;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=bk(c.linePadding,c,a.B);f.paddingRight=bk(c.linePadding,c,a.B);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition=
335
+ "center";else{if(c.nestedCues.length)var l=b;else l=R("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=ck(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=
336
+ c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=bk(c.fontSize,c,a.B);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==tc?(f.width="100%",c.lineAlign==vc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==vc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==vc?f.right=c.line+"%":"end"==
337
337
  c.lineAlign&&(f.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Gc?"%":"px",d=c.region.viewportAnchorUnits==Gc?"%":"px",f.height=c.region.height+(c.region.heightUnits==Gc?"%":"px"),f.width=c.region.width+a,f.position="absolute",f.top=c.region.viewportAnchorY+d,f.left=c.region.viewportAnchorX+d);f.lineHeight=c.lineHeight;c.position&&(c.writingMode==tc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat=
338
338
  "right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==tc?f.width=c.size+"%":f.height=c.size+"%")}
339
- function ck(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),ah:d[2]}:null;if(!d)return a;var e=d.value;switch(d.ah){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function dk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}J("shaka.text.UITextDisplayer",Xj);Xj.prototype.setTextVisibility=Xj.prototype.setTextVisibility;
340
- Xj.prototype.isTextVisible=Xj.prototype.isTextVisible;Xj.prototype.remove=Xj.prototype.remove;Xj.prototype.destroy=Xj.prototype.destroy;Xj.prototype.append=Xj.prototype.append;function ek(a,b){function c(h){for(var k=h,l=r(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,t){return p+"<"+t+">"},
339
+ function bk(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),ah:d[2]}:null;if(!d)return a;var e=d.value;switch(d.ah){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function ck(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}J("shaka.text.UITextDisplayer",Wj);Wj.prototype.setTextVisibility=Wj.prototype.setTextVisibility;
340
+ Wj.prototype.isTextVisible=Wj.prototype.isTextVisible;Wj.prototype.remove=Wj.prototype.remove;Wj.prototype.destroy=Wj.prototype.destroy;Wj.prototype.append=Wj.prototype.append;function dk(a,b){function c(h){for(var k=h,l=r(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,t){return p+"<"+t+">"},
341
341
  "");k=k.reduceRight(function(p,t){return p+"</"+t+">"},"");return h.lineBreak||h.spacer?(h.spacer&&Db("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=r(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");
342
- break;case "right":k.push("align:right");break;case sc:k.push("align:middle");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}J("shaka.text.WebVttGenerator",function(){});function fk(){}
343
- function gk(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]=We(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=We(l)),k=gk(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?(Sa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ta("Unexpected number of arguments for "+k),a[h]=b[h]):(Sa("Invalid config, unrecognized key "+
344
- k),g=!1)}return g}function hk(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}J("shaka.util.ConfigUtils",fk);fk.convertToConfigObject=hk;fk.mergeConfigObjects=gk;function ik(){}
345
- function jk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ne(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:bg,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Ne(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
342
+ break;case "right":k.push("align:right");break;case sc:k.push("align:middle");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}J("shaka.text.WebVttGenerator",function(){});function ek(){}
343
+ function fk(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]=We(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=We(l)),k=fk(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?(Sa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ta("Unexpected number of arguments for "+k),a[h]=b[h]):(Sa("Invalid config, unrecognized key "+
344
+ k),g=!1)}return g}function gk(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}J("shaka.util.ConfigUtils",ek);ek.convertToConfigObject=gk;ek.mergeConfigObjects=fk;function hk(){}
345
+ function ik(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ne(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:bg,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Ne(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
346
346
  ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},
347
347
  manifestPreprocessor:function(g){return g}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,useFullSegmentsForStartTime:!1}},d={retryParameters:Ne(),failureCallback:function(g){return[g]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,
348
348
  inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1};if(navigator.userAgent.match(/Edge\//)||Dd()||Fd())d.gapDetectionThreshold=.5;if(Ed("Web0S")||Dd()||Fd())d.stallSkip=0;var e={trackSelectionCallback:function(g){return H(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return H(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k["return"](!0);
349
349
  h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return[g,h]},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new ve},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity}},
350
350
  preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}};e.trackSelectionCallback=
351
- function(g){return H(function(h){return h["return"](kk(g,f.preferredAudioLanguage))})};return f}function lk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return gk(a,b,c||jk(),d,"")}
352
- function kk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=ac(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Ub(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/
353
- 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Rb&&"image"!=g.type||c.push(g);return c}J("shaka.util.PlayerConfiguration",ik);ik.mergeConfigObjects=lk;function mk(){this.g=null;this.h=[]}function nk(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 ok(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
354
- function pk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(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 qk(){this.i=this.h=null;this.g=[]}function rk(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 sk(){this.A=this.B=this.K=this.H=this.o=this.j=this.I=this.l=this.i=this.L=this.O=this.R=this.D=this.X=NaN;this.g=new mk;this.h=new qk};function S(a,b){eb.call(this);var c=this;this.l=tk;this.hb=this.g=null;this.X=!1;this.h=new nf;this.Cb=this.B=this.Ja=this.F=this.vb=this.A=this.i=this.rb=this.K=this.ub=this.I=this.va=this.H=this.L=this.o=this.U=null;this.Zd=1E9;this.s=uk(this);this.Vd={width:Infinity,height:Infinity};this.j=null;this.ea=new Ee(this.s.preferredAudioLanguage,this.s.preferredVariantRole,this.s.preferredAudioChannelCount);this.ha=this.s.preferredTextLanguage;this.Za=this.s.preferredTextRole;this.Ka=this.s.preferForcedSubs;
355
- this.Db=[];b&&b(this);this.U=vk(this);this.U.ve(this.s.streaming.forceHTTPS);this.D=null;wk&&(this.D=Kb(wk));this.h.m(window,"online",function(){c.me()});this.Na={name:"detach"};this.jb={name:"attach"};this.R={name:"unload"};this.be={name:"manifest-parser"};this.Td={name:"manifest"};this.ia={name:"media-source"};this.Zb={name:"drm-engine"};this.O={name:"load"};this.ge={name:"src-equals-drm-engine"};this.za={name:"src-equals"};var d=new Map;d.set(this.jb,function(e,f){return Te(xk(c,e,f))});d.set(this.Na,
356
- function(e){e.J&&(c.h.Sa(e.J,"error"),e.J=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Te(e)});d.set(this.R,function(e){return Te(yk(c,e))});d.set(this.ia,function(e){e=zk(c,e);return Te(e)});d.set(this.be,function(e,f){var g=Ak(c,e,f);return Te(g)});d.set(this.Td,function(e){return Bk(c,e)});d.set(this.Zb,function(e){e=Ck(c,e);return Te(e)});d.set(this.O,function(e,f){return Te(Dk(c,e,f))});d.set(this.ge,function(e,f){var g=Ek(c,e,f);return Te(g)});d.set(this.za,function(e,f){return Fk(c,
357
- e,f)});this.ba=new Kj(this.Na,{kg:function(e,f,g,h){var k=null;e==c.Na&&(k=g==c.Na?c.Na:c.jb);e==c.jb&&(k=g==c.Na||f.J!=h.J?c.Na:g==c.jb?c.jb:g==c.ia||g==c.O?c.ia:g==c.za?c.ge:null);e==c.ia&&(k=g==c.O&&f.J==h.J?c.be:c.R);e==c.be&&(k=Gk(c.O,c.Td,c.R,g,f,h));e==c.Td&&(k=Gk(c.O,c.Zb,c.R,g,f,h));e==c.Zb&&(k=Gk(c.O,c.O,c.R,g,f,h));e==c.ge&&(k=g==c.za&&f.J==h.J?c.za:c.R);if(e==c.O||e==c.za)k=c.R;e==c.R&&(k=h.J&&f.J==h.J?c.jb:c.Na);return k},Pf:function(e,f,g){c.dispatchEvent(Hk(Ik,(new Map).set("state",
358
- e.name)));return d.get(e)(f,g)},handleError:function(e){return H(function(f){return 1==f.g?u(f,yk(c,e),2):f["return"](e.J?c.jb:c.Na)})},Gg:function(e){c.dispatchEvent(Hk(Jk,(new Map).set("state",e.name)))}});a&&this.xc(a,!0)}qa(S,eb);function Hk(a,b){return new M(a,b)}q=S.prototype;
359
- q.destroy=function(){var a=this,b;return H(function(c){switch(c.g){case 1:if(a.l==Kk)return c["return"]();a.l=Kk;b=Pj(a.ba,function(){return{node:a.Na,payload:Lj(),Jb:!1}});return u(c,new Promise(function(d){b.ic=function(){};b.nd=function(){d()};b.Pb=function(){d()};b.onError=function(){d()};b.pd=function(){d()}}),2);case 2:return u(c,a.ba.destroy(),3);case 3:a.h&&(a.h.release(),a.h=null);a.Cb=null;a.B=null;a.s=null;a.j=null;a.hb=null;if(!a.U){c.C(0);break}return u(c,a.U.destroy(),5);case 5:a.U=
360
- null,z(c)}})};
361
- function Lk(){window.Promise||Ta("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Ta("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||Ed("Trident/"))return!1;var a=Hd();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:
362
- Ad()?!0:Bd("application/x-mpegurl")}q.xc=function(a,b){b=void 0===b?!0:b;if(this.l==Kk)return Promise.reject(Mk());var c=Lj();c.J=a;Ad()||(b=!1);var d=b?this.ia:this.jb,e=Pj(this.ba,function(){return{node:d,payload:c,Jb:!1}});e.ic=function(){};return Nk(e)};q.detach=function(){var a=this;if(this.l==Kk)return Promise.reject(Mk());var b=Pj(this.ba,function(){return{node:a.Na,payload:Lj(),Jb:!1}});b.ic=function(){};return Nk(b)};
363
- q.Ge=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Kk)return Promise.reject(Mk());Ad()||(a=!1);var c=Lj(),d=Pj(this.ba,function(e){var f=e.J&&a?b.ia:e.J?b.jb:b.Na;c.J=e.J;return{node:f,payload:c,Jb:!1}});d.ic=function(){};return Nk(d)};
364
- q.load=function(a,b,c){var d=this;if(this.l==Kk)return Promise.reject(Mk());this.dispatchEvent(Hk(Ok));var e=Lj();e.uri=a;e.Ce=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Pk(this,e)?this.za:this.O,g=Pj(this.ba,function(h){if(null==h.J)return null;e.J=h.J;return{node:f,payload:e,Jb:!0}});this.j=new sk;g.ic=function(){};return new Promise(function(h,k){g.pd=function(){return k(new O(2,7,7002))};g.nd=function(){h();d.dispatchEvent(Hk(Qk))};g.Pb=function(){return k(Mk())};g.onError=
365
- function(l){return k(l)}})};function Pk(a,b){if(!Ad())return!0;var c=b.mimeType,d=b.uri||"";c||(c=ng(d),c=Rk[c]);if(c){if(""==(b.J||Cd()).canPlayType(c))return!1;if(!Ad()||!(c in mg||ng(d)in og)||a.s.streaming.preferNativeHls)return!0;if(Gd())return a.s.streaming.useNativeHlsOnSafari}return!1}function xk(a,b,c){null==b.J&&(b.J=c.J,a.h.m(b.J,"error",function(){var d=Sk(a);d&&Tk(a,d)}));a.g=b.J;return Promise.resolve()}
366
- function yk(a,b){var c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:return a.l!=Kk&&(a.l=tk),c=a.Db.map(function(p){return p()}),a.Db=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Hk(Uk));b.mimeType=null;b.startTime=null;b.uri=null;b.J&&(a.h.Sa(b.J,"loadedmetadata"),a.h.Sa(b.J,"playing"),a.h.Sa(b.J,"pause"),a.h.Sa(b.J,"ended"),a.h.Sa(b.J,"ratechange"));a.va&&(a.va.release(),a.va=null);a.ub&&(a.ub.stop(),a.ub=null);if(!a.A){n.C(3);break}return u(n,a.A.stop(),4);case 4:a.A=null,a.vb=null;
351
+ function(g){return H(function(h){return h["return"](jk(g,f.preferredAudioLanguage))})};return f}function kk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return fk(a,b,c||ik(),d,"")}
352
+ function jk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=ac(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Ub(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/
353
+ 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Rb&&"image"!=g.type||c.push(g);return c}J("shaka.util.PlayerConfiguration",hk);hk.mergeConfigObjects=kk;function lk(){this.g=null;this.h=[]}function mk(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 nk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
354
+ function ok(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(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 pk(){this.i=this.h=null;this.g=[]}function qk(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 rk(){this.A=this.B=this.K=this.H=this.o=this.j=this.I=this.l=this.i=this.L=this.O=this.Z=this.D=this.S=NaN;this.g=new lk;this.h=new pk};function S(a,b){eb.call(this);var c=this;this.l=sk;this.jb=this.g=null;this.ba=!1;this.h=new nf;this.Db=this.B=this.Ka=this.F=this.xb=this.A=this.i=this.tb=this.K=this.wb=this.I=this.za=this.H=this.L=this.o=this.U=null;this.Zd=1E9;this.s=tk(this);this.Vd={width:Infinity,height:Infinity};this.j=null;this.ha=new Ee(this.s.preferredAudioLanguage,this.s.preferredVariantRole,this.s.preferredAudioChannelCount);this.ia=this.s.preferredTextLanguage;this.$a=this.s.preferredTextRole;this.Za=this.s.preferForcedSubs;
355
+ this.Eb=[];b&&b(this);this.U=uk(this);this.U.ve(this.s.streaming.forceHTTPS);this.D=null;vk&&(this.D=Kb(vk));this.h.m(window,"online",function(){c.me()});this.Na={name:"detach"};this.kb={name:"attach"};this.S={name:"unload"};this.be={name:"manifest-parser"};this.Td={name:"manifest"};this.qa={name:"media-source"};this.$b={name:"drm-engine"};this.O={name:"load"};this.ge={name:"src-equals-drm-engine"};this.Aa={name:"src-equals"};var d=new Map;d.set(this.kb,function(e,f){return Te(wk(c,e,f))});d.set(this.Na,
356
+ function(e){e.J&&(c.h.Sa(e.J,"error"),e.J=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Te(e)});d.set(this.S,function(e){return Te(xk(c,e))});d.set(this.qa,function(e){e=yk(c,e);return Te(e)});d.set(this.be,function(e,f){var g=zk(c,e,f);return Te(g)});d.set(this.Td,function(e){return Ak(c,e)});d.set(this.$b,function(e){e=Bk(c,e);return Te(e)});d.set(this.O,function(e,f){return Te(Ck(c,e,f))});d.set(this.ge,function(e,f){var g=Dk(c,e,f);return Te(g)});d.set(this.Aa,function(e,f){return Ek(c,
357
+ e,f)});this.ea=new Jj(this.Na,{kg:function(e,f,g,h){var k=null;e==c.Na&&(k=g==c.Na?c.Na:c.kb);e==c.kb&&(k=g==c.Na||f.J!=h.J?c.Na:g==c.kb?c.kb:g==c.qa||g==c.O?c.qa:g==c.Aa?c.ge:null);e==c.qa&&(k=g==c.O&&f.J==h.J?c.be:c.S);e==c.be&&(k=Fk(c.O,c.Td,c.S,g,f,h));e==c.Td&&(k=Fk(c.O,c.$b,c.S,g,f,h));e==c.$b&&(k=Fk(c.O,c.O,c.S,g,f,h));e==c.ge&&(k=g==c.Aa&&f.J==h.J?c.Aa:c.S);if(e==c.O||e==c.Aa)k=c.S;e==c.S&&(k=h.J&&f.J==h.J?c.kb:c.Na);return k},Pf:function(e,f,g){c.dispatchEvent(Gk(Hk,(new Map).set("state",
358
+ e.name)));return d.get(e)(f,g)},handleError:function(e){return H(function(f){return 1==f.g?u(f,xk(c,e),2):f["return"](e.J?c.kb:c.Na)})},Gg:function(e){c.dispatchEvent(Gk(Ik,(new Map).set("state",e.name)))}});a&&this.yc(a,!0)}qa(S,eb);function Gk(a,b){return new M(a,b)}q=S.prototype;
359
+ q.destroy=function(){var a=this,b;return H(function(c){switch(c.g){case 1:if(a.l==Jk)return c["return"]();a.l=Jk;b=Oj(a.ea,function(){return{node:a.Na,payload:Kj(),Kb:!1}});return u(c,new Promise(function(d){b.jc=function(){};b.nd=function(){d()};b.Qb=function(){d()};b.onError=function(){d()};b.pd=function(){d()}}),2);case 2:return u(c,a.ea.destroy(),3);case 3:a.h&&(a.h.release(),a.h=null);a.Db=null;a.B=null;a.s=null;a.j=null;a.jb=null;if(!a.U){c.C(4);break}return u(c,a.U.destroy(),5);case 5:a.U=
360
+ null;case 4:eb.prototype.release.call(a),z(c)}})};
361
+ function Kk(){window.Promise||Ta("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Ta("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||Ed("Trident/"))return!1;var a=Hd();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
362
+ !1:Ad()?!0:Bd("application/x-mpegurl")}q.yc=function(a,b){b=void 0===b?!0:b;if(this.l==Jk)return Promise.reject(Lk());var c=Kj();c.J=a;Ad()||(b=!1);var d=b?this.qa:this.kb,e=Oj(this.ea,function(){return{node:d,payload:c,Kb:!1}});e.jc=function(){};return Mk(e)};q.detach=function(){var a=this;if(this.l==Jk)return Promise.reject(Lk());var b=Oj(this.ea,function(){return{node:a.Na,payload:Kj(),Kb:!1}});b.jc=function(){};return Mk(b)};
363
+ q.Ge=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Jk)return Promise.reject(Lk());Ad()||(a=!1);var c=Kj(),d=Oj(this.ea,function(e){var f=e.J&&a?b.qa:e.J?b.kb:b.Na;c.J=e.J;return{node:f,payload:c,Kb:!1}});d.jc=function(){};return Mk(d)};
364
+ q.load=function(a,b,c){var d=this;if(this.l==Jk)return Promise.reject(Lk());this.dispatchEvent(Gk(Nk));var e=Kj();e.uri=a;e.Ce=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Ok(this,e)?this.Aa:this.O,g=Oj(this.ea,function(h){if(null==h.J)return null;e.J=h.J;return{node:f,payload:e,Kb:!0}});this.j=new rk;g.jc=function(){};return new Promise(function(h,k){g.pd=function(){return k(new N(2,7,7002))};g.nd=function(){h();d.dispatchEvent(Gk(Pk))};g.Qb=function(){return k(Lk())};g.onError=
365
+ function(l){return k(l)}})};function Ok(a,b){if(!Ad())return!0;var c=b.mimeType,d=b.uri||"";c||(c=ng(d),c=Qk[c]);if(c){if(""==(b.J||Cd()).canPlayType(c))return!1;if(!Ad()||!(c in mg||ng(d)in og)||a.s.streaming.preferNativeHls)return!0;if(Gd())return a.s.streaming.useNativeHlsOnSafari}return!1}function wk(a,b,c){null==b.J&&(b.J=c.J,a.h.m(b.J,"error",function(){var d=Rk(a);d&&Sk(a,d)}));a.g=b.J;return Promise.resolve()}
366
+ function xk(a,b){var c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:return a.l!=Jk&&(a.l=sk),c=a.Eb.map(function(p){return p()}),a.Eb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Gk(Tk));b.mimeType=null;b.startTime=null;b.uri=null;b.J&&(a.h.Sa(b.J,"loadedmetadata"),a.h.Sa(b.J,"playing"),a.h.Sa(b.J,"pause"),a.h.Sa(b.J,"ended"),a.h.Sa(b.J,"ratechange"));a.za&&(a.za.release(),a.za=null);a.wb&&(a.wb.stop(),a.wb=null);if(!a.A){n.C(3);break}return u(n,a.A.stop(),4);case 4:a.A=null,a.xb=null;
367
367
  case 3:if(!a.B){n.C(5);break}return u(n,a.B.stop(),5);case 5:if(!a.i){n.C(7);break}return u(n,a.i.destroy(),8);case 8:a.i=null;case 7:a.I&&(a.I.release(),a.I=null);a.H&&(a.H.release(),a.H=null);if(!a.L){n.C(9);break}return u(n,a.L.destroy(),10);case 10:a.L=null;case 9:if(a.D)a.D.onAssetUnload();if(!b.J||!b.J.src){n.C(11);break}return u(n,new Promise(function(p){return(new P(p)).T(.1)}),12);case 12:for(b.J.removeAttribute("src"),b.J.load();b.J.lastChild;)b.J.removeChild(b.J.firstChild);case 11:if(!a.o){n.C(13);
368
- break}return u(n,a.o.destroy(),14);case 14:a.o=null;case 13:a.Ja=null;a.K=null;if(a.F){d=r(a.F.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.F.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.F=null;a.j=new sk;a.Sd=null;Vk(a);z(n)}})}
369
- function zk(a,b){var c,d,e,f;return H(function(g){if(1==g.g)return c=new Rh,d=a.s.textDisplayFactory,e=Kb(d),a.Sd=d,f=Wk(b.J,c,e,function(h,k,l){h=r(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,t=r(m.frames),v=t.next();!v.done;v=t.next())Xk(a,n,p,"ID3",v.value);if(a.D)a.D.onHlsTimedMetadata(m,n)}}),u(g,f.H,2);a.L=f;z(g)})}
370
- function Ak(a,b,c){var d,e,f,g;return H(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.U,a.Ja=d,f=a,u(h,lg(d,e,a.s.manifest.retryParameters,b.mimeType),2);f.vb=h.h;a.A=Kb(a.vb);g=We(a.s.manifest);c.J&&"AUDIO"===c.J.nodeName&&(g.disableVideo=!0);a.A.configure(g);z(h)})}
371
- function Bk(a,b){var c=b.uri,d=a.U;a.rb=new dj(function(){return a.La()});ej(a.rb,function(g){Yk(a,Zk,g);if(a.D)a.D.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return $k(a,g)},makeTextStreamsForClosedCaptions:function(g){return al(a,g)},onTimelineRegionAdded:function(g){var h=a.rb;a:{var k=r(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),
372
- h.h(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Tk(a,g)},isLowLatencyMode:function(){return a.s.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.s.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Pe(function(){var g,h,k,l;return H(function(m){if(1==m.g)return g=a,u(m,a.A.start(c,e),2);g.F=m.h;h=Hk(bl);a.dispatchEvent(h);if(0==a.F.variants.length)throw new O(2,
373
- 4,4036);cl(a.F);k=Date.now()/1E3;l=k-f;a.j.I=l;z(m)})}(),function(){return a.A.stop()})}function Ck(a,b){var c,d;return H(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.o=dl(a,{Ob:a.U,onError:function(f){Tk(a,f)},od:function(f){el(a,f)},onExpirationUpdated:function(f,g){fl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==gl&&d&&(d=!1,a.j.j=Date.now()/1E3-c)}}),a.o.configure(a.s.drm),u(e,Ff(a.o,a.F.variants,a.F.offlineSessionIds),2)):3!=e.g?u(e,a.o.xc(b.J),3):u(e,$k(a,a.F),0)})}
374
- function Dk(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return H(function(y){switch(y.g){case 1:b.startTime=c.startTime;d=b.J;e=b.uri;a.Ja=e;a.I=new Xi({kd:function(){return b.J.playbackRate},gd:function(){return b.J.defaultPlaybackRate},xe:function(x){b.J.playbackRate=x},gf:function(x){b.J.currentTime+=x}});f=function(){return hl(a)};g=function(){return il(a)};a.h.m(d,"playing",f);a.h.m(d,"pause",f);a.h.m(d,"ended",f);a.h.m(d,"ratechange",g);h=a.s.abrFactory;a.B&&a.Cb==h||(a.Cb=h,a.B=Kb(h),"function"!=typeof a.B.playbackRateChanged&&
375
- (Db("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.B.playbackRateChanged=function(){}),a.B.configure(a.s.abr));a.ea=new Ee(a.s.preferredAudioLanguage,a.s.preferredVariantRole,a.s.preferredAudioChannelCount);a.ha=a.s.preferredTextLanguage;a.Za=a.s.preferredTextRole;a.Ka=a.s.preferForcedSubs;jl(a.F.presentationTimeline,a.s.playRangeStart,a.s.playRangeEnd);a.B.init(function(x,w,C){a.i&&x!=a.i.h&&kl(a,x,!0,void 0===w?!1:w,void 0===C?0:C)});a.H=ll(a,b.startTime);a.va=ml(a);
376
- k=Math.max(a.F.minBufferTime,a.s.streaming.rebufferingGoal);nl(a,k);Kd(a.F,a.s.preferredVideoCodecs,a.s.preferredAudioCodecs,a.s.preferredAudioChannelCount,a.s.preferredDecodingAttributes);a.i=ol(a);a.i.configure(a.s.streaming);a.l=pl;a.dispatchEvent(Hk(ql));l=null;if(m=a.Ib().find(function(x){return x.active})){y.C(2);break}l=rl(a)?a.B.chooseVariant():null;kl(a,l,!0,!1,0);if(!a.s.streaming.startAtSegmentBoundary){y.C(3);break}n=a.H.l();return u(y,sl(l,n),4);case 4:p=y.h,a.H.o(p);case 3:tl(a,null,
377
- ie(l));case 2:return t=a.ob().find(function(x){return x.active}),t||((v=se(a.F.textStreams,a.ha,a.Za,a.Ka)[0]||null)&&rk(a.j.h,v,!0),l&&(v?(l.audio&&ul(a,l.audio,v)&&(a.X=!0),a.X&&a.L.o.setTextVisibility(!0),vl(a)):a.X=!1),v&&(a.s.streaming.alwaysStreamText||a.Nb())&&uj(a.i,v)),u(y,a.i.start(),5);case 5:a.s.abr.enabled&&(a.B.enable(),wl(a)),$d(a.i?a.i.h:null,a.F),xl(a.F),yl(a),rl(a),a.F.variants.some(function(x){return x.primary}),a.h.Pa(d,"loadedmetadata",function(){a.j.l=Date.now()/1E3-c.Ce}),z(y)}})}
378
- function Ek(a,b,c){var d,e,f,g,h,k,l;return H(function(m){return 1==m.g?(d=Sb,e=Date.now()/1E3,f=!0,a.o=dl(a,{Ob:a.U,onError:function(n){Tk(a,n)},od:function(n){el(a,n)},onExpirationUpdated:function(n,p){fl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==gl&&f&&(f=!1,a.j.j=Date.now()/1E3-e)}}),a.o.configure(a.s.drm),g=c.uri||"",h=ng(g),k=Rk[h],"application/x-mpegurl"==k&&Gd()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
379
- createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?pd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.ib,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.o.R=!0,u(m,Ff(a.o,[l],[]),2)):u(m,a.o.xc(b.J),
368
+ break}return u(n,a.o.destroy(),14);case 14:a.o=null;case 13:a.Ka=null;a.K=null;if(a.F){d=r(a.F.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.F.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.F=null;a.j=new rk;a.Sd=null;Uk(a);z(n)}})}
369
+ function yk(a,b){var c,d,e,f;return H(function(g){if(1==g.g)return c=new Rh,d=a.s.textDisplayFactory,e=Kb(d),a.Sd=d,f=Vk(b.J,c,e,function(h,k,l){h=r(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,t=r(m.frames),v=t.next();!v.done;v=t.next())Wk(a,n,p,"ID3",v.value);if(a.D)a.D.onHlsTimedMetadata(m,n)}}),u(g,f.H,2);a.L=f;z(g)})}
370
+ function zk(a,b,c){var d,e,f,g;return H(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.U,a.Ka=d,f=a,u(h,lg(d,e,a.s.manifest.retryParameters,b.mimeType),2);f.xb=h.h;a.A=Kb(a.xb);g=We(a.s.manifest);c.J&&"AUDIO"===c.J.nodeName&&(g.disableVideo=!0);a.A.configure(g);z(h)})}
371
+ function Ak(a,b){var c=b.uri,d=a.U;a.tb=new dj(function(){return a.La()});a.tb.addEventListener("regionadd",function(g){g=g.region;Xk(a,Yk,g);if(a.D)a.D.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return Zk(a,g)},makeTextStreamsForClosedCaptions:function(g){return $k(a,g)},onTimelineRegionAdded:function(g){var h=a.tb;a:{var k=r(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=
372
+ l;break a}k=null}null==k&&(h.g.add(g),g=new M("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Sk(a,g)},isLowLatencyMode:function(){return a.s.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.s.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Pe(function(){var g,h,k,l;return H(function(m){if(1==m.g)return g=a,u(m,
373
+ a.A.start(c,e),2);g.F=m.h;h=Gk(al);a.dispatchEvent(h);if(0==a.F.variants.length)throw new N(2,4,4036);bl(a.F);k=Date.now()/1E3;l=k-f;a.j.I=l;z(m)})}(),function(){return a.A.stop()})}
374
+ function Bk(a,b){var c,d;return H(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.o=cl(a,{Pb:a.U,onError:function(f){Sk(a,f)},od:function(f){dl(a,f)},onExpirationUpdated:function(f,g){el(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==fl&&d&&(d=!1,a.j.j=Date.now()/1E3-c)}}),a.o.configure(a.s.drm),u(e,Ff(a.o,a.F.variants,a.F.offlineSessionIds),2)):3!=e.g?u(e,a.o.yc(b.J),3):u(e,Zk(a,a.F),0)})}
375
+ function Ck(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return H(function(y){switch(y.g){case 1:b.startTime=c.startTime;d=b.J;e=b.uri;a.Ka=e;a.I=new Xi({kd:function(){return b.J.playbackRate},gd:function(){return b.J.defaultPlaybackRate},xe:function(x){b.J.playbackRate=x},gf:function(x){b.J.currentTime+=x}});f=function(){return gl(a)};g=function(){return hl(a)};a.h.m(d,"playing",f);a.h.m(d,"pause",f);a.h.m(d,"ended",f);a.h.m(d,"ratechange",g);h=a.s.abrFactory;a.B&&a.Db==h||(a.Db=h,a.B=Kb(h),"function"!=typeof a.B.playbackRateChanged&&
376
+ (Db("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.B.playbackRateChanged=function(){}),a.B.configure(a.s.abr));a.ha=new Ee(a.s.preferredAudioLanguage,a.s.preferredVariantRole,a.s.preferredAudioChannelCount);a.ia=a.s.preferredTextLanguage;a.$a=a.s.preferredTextRole;a.Za=a.s.preferForcedSubs;il(a.F.presentationTimeline,a.s.playRangeStart,a.s.playRangeEnd);a.B.init(function(x,w,C){a.i&&x!=a.i.h&&jl(a,x,!0,void 0===w?!1:w,void 0===C?0:C)});a.H=kl(a,b.startTime);a.za=ll(a);
377
+ k=Math.max(a.F.minBufferTime,a.s.streaming.rebufferingGoal);ml(a,k);Kd(a.F,a.s.preferredVideoCodecs,a.s.preferredAudioCodecs,a.s.preferredAudioChannelCount,a.s.preferredDecodingAttributes);a.i=nl(a);a.i.configure(a.s.streaming);a.l=ol;a.dispatchEvent(Gk(pl));l=null;if(m=a.Jb().find(function(x){return x.active})){y.C(2);break}l=ql(a)?a.B.chooseVariant():null;jl(a,l,!0,!1,0);if(!a.s.streaming.startAtSegmentBoundary){y.C(3);break}n=a.H.l();return u(y,rl(l,n),4);case 4:p=y.h,a.H.o(p);case 3:sl(a,null,
378
+ ie(l));case 2:return t=a.qb().find(function(x){return x.active}),t||((v=se(a.F.textStreams,a.ia,a.$a,a.Za)[0]||null)&&qk(a.j.h,v,!0),l&&(v?(l.audio&&tl(a,l.audio,v)&&(a.ba=!0),a.ba&&a.L.o.setTextVisibility(!0),ul(a)):a.ba=!1),v&&(a.s.streaming.alwaysStreamText||a.Ob())&&tj(a.i,v)),u(y,a.i.start(),5);case 5:a.s.abr.enabled&&(a.B.enable(),vl(a)),$d(a.i?a.i.h:null,a.F),wl(a.F),xl(a),ql(a),a.F.variants.some(function(x){return x.primary}),a.h.Pa(d,"loadedmetadata",function(){a.j.l=Date.now()/1E3-c.Ce}),
379
+ z(y)}})}
380
+ function Dk(a,b,c){var d,e,f,g,h,k,l;return H(function(m){return 1==m.g?(d=Sb,e=Date.now()/1E3,f=!0,a.o=cl(a,{Pb:a.U,onError:function(n){Sk(a,n)},od:function(n){dl(a,n)},onExpirationUpdated:function(n,p){el(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==fl&&f&&(f=!1,a.j.j=Date.now()/1E3-e)}}),a.o.configure(a.s.drm),g=c.uri||"",h=ng(g),k=Qk[h],"application/x-mpegurl"==k&&Gd()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
381
+ createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?pd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.ib,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.o.Z=!0,u(m,Ff(a.o,[l],[]),2)):u(m,a.o.yc(b.J),
380
382
  0)})}
381
- function Fk(a,b,c){function d(){return hl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Ja=b.uri;a.H=new Mi(b.J);null!=b.startTime&&a.H.o(b.startTime);a.I=new Xi({kd:function(){return b.J.playbackRate},gd:function(){return b.J.defaultPlaybackRate},xe:function(g){b.J.playbackRate=g},gf:function(g){b.J.currentTime+=g}});nl(a,a.s.streaming.rebufferingGoal);a.h.m(b.J,"playing",d);a.h.m(b.J,"pause",d);a.h.m(b.J,"ended",d);a.h.m(b.J,"ratechange",function(){return il(a)});"none"!=a.g.preload&&a.h.Pa(a.g,"loadedmetadata",
382
- function(){a.j.l=Date.now()/1E3-c.Ce});a.g.audioTracks&&(a.h.m(a.g.audioTracks,"addtrack",function(){return yl(a)}),a.h.m(a.g.audioTracks,"removetrack",function(){return yl(a)}),a.h.m(a.g.audioTracks,"change",function(){return yl(a)}));a.g.textTracks&&(a.h.m(a.g.textTracks,"addtrack",function(g){if(g.track)switch(g=g.track,g.kind){case "metadata":zl(a,g);break;case "chapters":Al(a,g);break;default:yl(a)}}),a.h.m(a.g.textTracks,"removetrack",function(){return yl(a)}),a.h.m(a.g.textTracks,"change",
383
- function(){return yl(a)}));b.J.src=b.uri;(Dd()||Ed("Web0S"))&&b.J.load();a.l=Bl;a.dispatchEvent(Hk(ql));var e=new Sc;Di(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){e.resolve()});var f=!1;a.Db.push(function(){f=!0});Di(a.g,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){var g;return H(function(h){if(1==h.g){if(f)return h["return"]();Cl(a);g=Dl(a);return g.find(function(k){return"disabled"!=k.mode})?h.C(2):u(h,new Promise(function(k){a.h.Pa(a.g.textTracks,"change",k);(new P(k)).T(1)}),2)}if(f)return h["return"]();
384
- El(a);z(h)})});a.g.error?e.reject(Sk(a)):"none"==a.g.preload&&(Ta('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.'),e.resolve());a.h.Pa(a.g,"error",function(){e.reject(Sk(a))});return new Pe(e,function(){e.reject(new O(2,7,7001));return Promise.resolve()})}
385
- function Cl(a){var b=a.s.preferredAudioLanguage;if(""!=b){a.vd(b);var c=a.s.preferredVariantRole;""!=c&&a.vd(b,c)}}function El(a){var b=a.s.preferredTextLanguage,c=a.s.preferForcedSubs;if(""!=b){a.pe(b,"",c);var d=a.s.preferredTextRole;""!=d&&a.pe(b,d,c)}}
386
- function zl(a,b){"metadata"==b.kind&&(b.mode="hidden",a.h.m(b,"cuechange",function(){if(b.activeCues)for(var c=r(b.activeCues),d=c.next();!d.done;d=c.next())if(d=d.value,Xk(a,d.startTime,d.endTime,d.type,d.value),a.D)a.D.onCueMetadataChange(d.value)}),(new P(function(){var c=Fl(a);c=r(c);for(var d=c.next();!d.done;d=c.next())d.value.mode="hidden"})).Da().T(.5))}function Xk(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Hk(Gl,b))}
387
- function Al(a,b){b&&"chapters"==b.kind&&(b.mode="hidden",(new P(function(){var c=Hl(a);c=r(c);for(var d=c.next();!d.done;d=c.next())d.value.mode="hidden"})).Da().T(.5))}function cl(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 dl(a,b){return new yf(b,a.s.drm.updateExpirationTime)}function vk(a){return new $e(function(b,c){a.B&&a.B.segmentDownloaded(b,c)})}
388
- function ll(a,b){return new Ni(a.g,a.F,a.s.streaming,b,function(){a.va&&$i(a.va,!0);if(a.i)for(var c=a.i,d=c.G.jd(),e=c.s.smallGapLimit,f=r(c.g.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.g.get(g);h.ua=null;var k=c.G.W;g==Rb?(k=k.i,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=fi(k,g),k=Uh(k,d,e));if(!k&&((null!=gi(c.G.W,g)||h.cb)&&xj(c,h),h.Qa&&(h.Qa.abort(),h.Qa=null),g===Rb))for(g=c.G.W.D.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Eh(g),g=r(g.j.values()),h=g.next();!h.done;h=g.next())yh(h.value)}a.K&&
389
- Il(a)},function(c){return a.dispatchEvent(c)})}function ml(a){var b=new fj(a.rb);gj(b,function(d){Yk(a,Jl,d)},function(d){Yk(a,Kl,d)},function(d,e){e||(Yk(a,Jl,d),Yk(a,Kl,d))});var c=new Zi(a.g);c.g.add(b);return c}function nl(a,b){a.K=new Ie;a.K.g=Ke;Le(a.K,b,Math.min(.5,b/2));Vk(a);a.ub=(new P(function(){Il(a)})).oa(.25)}
390
- function Il(a){switch(a.l){case Bl:if(a.g.ended)var b=!0;else{var c=Th(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case pl:a:if(a.g.ended||di(a.L))b=!0;else{if(a.F.presentationTimeline.Z()){c=a.F.presentationTimeline.Hb();var d=Th(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Vh(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Je:Ke;c.g=d;b!=d&&Vk(a)}function Wk(a,b,c,d){return new Yh(a,b,c,d)}
391
- function ol(a){return new ij(a.F,{jd:function(){return a.H.l()},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},W:a.L,Ob:a.U,onError:function(b){return Tk(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Hg:function(){a.A&&a.A.update&&a.A.update()},je:function(){a.H&&a.H.H();Il(a)}})}
392
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=hk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Db("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
393
- 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=lk(this.s,a,uk(this));Ll(this);return c};
394
- function Ll(a){if(a.A){var b=We(a.s.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.A.configure(b)}a.o&&a.o.configure(a.s.drm);if(a.i){a.i.configure(a.s.streaming);try{Ml(a,a.F)}catch(f){Tk(a,f)}a.B&&rl(a);b=a.i.h;!b||b.allowedByApplication&&b.allowedByKeySystem||Nl(a)}a.U&&a.U.ve(a.s.streaming.forceHTTPS);if(a.L&&(b=a.s.textDisplayFactory,a.Sd!=b)){var c=Kb(b),d=a.L,e=d.o;d.o=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.i&&(d.i.i=c);a.Sd=b;a.i&&(b=a.i,(c=b.g.get(Rb))&&
395
- sj(b,c.stream,!0,0,!0))}a.B&&(a.B.configure(a.s.abr),a.s.abr.enabled?a.B.enable():a.B.disable(),wl(a));a.K&&(b=a.s.streaming.rebufferingGoal,a.F&&(b=Math.max(b,a.F.minBufferTime)),Le(a.K,b,Math.min(.5,b/2)));a.F&&jl(a.F.presentationTimeline,a.s.playRangeStart,a.s.playRangeEnd)}q.getConfiguration=function(){var a=uk(this);lk(a,this.s,uk(this));return a};
396
- q.Sf=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.La().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.Sg=function(){for(var a in this.s)delete this.s[a];lk(this.s,uk(this),uk(this));Ll(this)};q.Xe=function(){return this.l};q.jg=function(){return this.g};q.Cc=function(){return this.U};q.Rd=function(){return this.Ja};
397
- q.ed=function(){return this.D?this.D:null};q.Z=function(){return this.F?this.F.presentationTimeline.Z():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Lb=function(){return this.F?this.F.presentationTimeline.Lb():!1};q.bf=function(){if(this.F){var a=this.F.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};
398
- q.La=function(){if(this.F){var a=this.F.presentationTimeline;return{start:a.dc(),end:a.mb()}}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}};q.xg=function(){this.Z()&&(this.g.currentTime=this.La().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.o?this.o.i:null};q.Bc=function(){return this.o?this.o.Bc():Infinity};q.hd=function(){return this.o?this.o.hd():{}};
399
- q.Jc=function(){return this.K?this.K.g==Ke:!1};q.Dc=function(){return this.g?this.I?this.I.i:1:0};q.Fe=function(a){0==a?Ta("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==pl&&(this.B.playbackRateChanged(a),rj(this.i,1<Math.abs(a))))};q.Ke=function(){var a=this.I.gd();this.l==Bl&&this.I.set(a);this.l==pl&&(this.I.set(a),this.B.playbackRateChanged(a),rj(this.i,!1))};
400
- q.Ib=function(){if(this.F){for(var a=this.i?this.i.h:null,b=[],c=0,d=r(this.F.variants),e=d.next();!e.done;e=d.next())if(e=e.value,qe(e)){var f=ie(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 pe(g)}):[]};
401
- q.ob=function(){if(this.F){for(var a=this.i?this.i.i:null,b=[],c=r(this.F.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=je(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Dl(this).map(function(f){return ne(f)}):[]};q.ag=function(){return this.F?this.F.imageStreams.map(function(a){return ke(a)}):[]};
383
+ function Ek(a,b,c){function d(){return gl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Ka=b.uri;a.H=new Mi(b.J);null!=b.startTime&&a.H.o(b.startTime);a.I=new Xi({kd:function(){return b.J.playbackRate},gd:function(){return b.J.defaultPlaybackRate},xe:function(g){b.J.playbackRate=g},gf:function(g){b.J.currentTime+=g}});ml(a,a.s.streaming.rebufferingGoal);a.h.m(b.J,"playing",d);a.h.m(b.J,"pause",d);a.h.m(b.J,"ended",d);a.h.m(b.J,"ratechange",function(){return hl(a)});"none"!=a.g.preload&&a.h.Pa(a.g,"loadedmetadata",
384
+ function(){a.j.l=Date.now()/1E3-c.Ce});a.g.audioTracks&&(a.h.m(a.g.audioTracks,"addtrack",function(){return xl(a)}),a.h.m(a.g.audioTracks,"removetrack",function(){return xl(a)}),a.h.m(a.g.audioTracks,"change",function(){return xl(a)}));a.g.textTracks&&(a.h.m(a.g.textTracks,"addtrack",function(g){if(g.track)switch(g=g.track,g.kind){case "metadata":yl(a,g);break;case "chapters":zl(a,g);break;default:xl(a)}}),a.h.m(a.g.textTracks,"removetrack",function(){return xl(a)}),a.h.m(a.g.textTracks,"change",
385
+ function(){return xl(a)}));b.J.src=b.uri;(Dd()||Ed("Web0S"))&&b.J.load();a.l=Al;a.dispatchEvent(Gk(pl));var e=new Sc;Di(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){e.resolve()});var f=!1;a.Eb.push(function(){f=!0});Di(a.g,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){var g;return H(function(h){if(1==h.g){if(f)return h["return"]();Bl(a);g=Cl(a);return g.find(function(k){return"disabled"!=k.mode})?h.C(2):u(h,new Promise(function(k){a.h.Pa(a.g.textTracks,"change",k);(new P(k)).T(1)}),2)}if(f)return h["return"]();
386
+ Dl(a);z(h)})});a.g.error?e.reject(Rk(a)):"none"==a.g.preload&&(Ta('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.'),e.resolve());a.h.Pa(a.g,"error",function(){e.reject(Rk(a))});return new Pe(e,function(){e.reject(new N(2,7,7001));return Promise.resolve()})}
387
+ function Bl(a){var b=a.s.preferredAudioLanguage;if(""!=b){a.vd(b);var c=a.s.preferredVariantRole;""!=c&&a.vd(b,c)}}function Dl(a){var b=a.s.preferredTextLanguage,c=a.s.preferForcedSubs;if(""!=b){a.pe(b,"",c);var d=a.s.preferredTextRole;""!=d&&a.pe(b,d,c)}}
388
+ function yl(a,b){"metadata"==b.kind&&(b.mode="hidden",a.h.m(b,"cuechange",function(){if(b.activeCues)for(var c=r(b.activeCues),d=c.next();!d.done;d=c.next())if(d=d.value,Wk(a,d.startTime,d.endTime,d.type,d.value),a.D)a.D.onCueMetadataChange(d.value)}),(new P(function(){var c=El(a);c=r(c);for(var d=c.next();!d.done;d=c.next())d.value.mode="hidden"})).Ea().T(.5))}function Wk(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Gk(Fl,b))}
389
+ function zl(a,b){b&&"chapters"==b.kind&&(b.mode="hidden",(new P(function(){var c=Gl(a);c=r(c);for(var d=c.next();!d.done;d=c.next())d.value.mode="hidden"})).Ea().T(.5))}function bl(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 cl(a,b){return new yf(b,a.s.drm.updateExpirationTime)}function uk(a){return new $e(function(b,c){a.B&&a.B.segmentDownloaded(b,c)})}
390
+ function kl(a,b){return new Ni(a.g,a.F,a.s.streaming,b,function(){a.za&&$i(a.za,!0);if(a.i)for(var c=a.i,d=c.G.jd(),e=c.s.smallGapLimit,f=r(c.g.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.g.get(g);h.va=null;var k=c.G.W;g==Rb?(k=k.i,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=fi(k,g),k=Uh(k,d,e));if(!k&&((null!=gi(c.G.W,g)||h.eb)&&wj(c,h),h.Qa&&(h.Qa.abort(),h.Qa=null),g===Rb))for(g=c.G.W.D.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Eh(g),g=r(g.j.values()),h=g.next();!h.done;h=g.next())yh(h.value)}a.K&&
391
+ Hl(a)},function(c){return a.dispatchEvent(c)})}function ll(a){var b=new ej(a.tb);b.addEventListener("enter",function(d){Xk(a,Il,d.region)});b.addEventListener("exit",function(d){Xk(a,Jl,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Xk(a,Il,e),Xk(a,Jl,e))});var c=new Zi(a.g);c.g.add(b);return c}function ml(a,b){a.K=new Ie;a.K.g=Ke;Le(a.K,b,Math.min(.5,b/2));Uk(a);a.wb=(new P(function(){Hl(a)})).oa(.25)}
392
+ function Hl(a){switch(a.l){case Al:if(a.g.ended)var b=!0;else{var c=Th(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case ol:a:if(a.g.ended||di(a.L))b=!0;else{if(a.F.presentationTimeline.Y()){c=a.F.presentationTimeline.Ib();var d=Th(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Vh(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Je:Ke;c.g=d;b!=d&&Uk(a)}function Vk(a,b,c,d){return new Yh(a,b,c,d)}
393
+ function nl(a){return new hj(a.F,{jd:function(){return a.H.l()},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},W:a.L,Pb:a.U,onError:function(b){return Sk(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Hg:function(){a.A&&a.A.update&&a.A.update()},je:function(){a.H&&a.H.H();Hl(a)}})}
394
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=gk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Db("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
395
+ 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=kk(this.s,a,tk(this));Kl(this);return c};
396
+ function Kl(a){if(a.A){var b=We(a.s.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.A.configure(b)}a.o&&a.o.configure(a.s.drm);if(a.i){a.i.configure(a.s.streaming);try{Ll(a,a.F)}catch(f){Sk(a,f)}a.B&&ql(a);b=a.i.h;!b||b.allowedByApplication&&b.allowedByKeySystem||Ml(a)}a.U&&a.U.ve(a.s.streaming.forceHTTPS);if(a.L&&(b=a.s.textDisplayFactory,a.Sd!=b)){var c=Kb(b),d=a.L,e=d.o;d.o=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.i&&(d.i.i=c);a.Sd=b;a.i&&(b=a.i,(c=b.g.get(Rb))&&
397
+ rj(b,c.stream,!0,0,!0))}a.B&&(a.B.configure(a.s.abr),a.s.abr.enabled?a.B.enable():a.B.disable(),vl(a));a.K&&(b=a.s.streaming.rebufferingGoal,a.F&&(b=Math.max(b,a.F.minBufferTime)),Le(a.K,b,Math.min(.5,b/2)));a.F&&il(a.F.presentationTimeline,a.s.playRangeStart,a.s.playRangeEnd)}q.getConfiguration=function(){var a=tk(this);kk(a,this.s,tk(this));return a};
398
+ q.Sf=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.La().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.Sg=function(){for(var a in this.s)delete this.s[a];kk(this.s,tk(this),tk(this));Kl(this)};q.Xe=function(){return this.l};q.jg=function(){return this.g};q.Dc=function(){return this.U};q.Rd=function(){return this.Ka};
399
+ q.ed=function(){return this.D?this.D:null};q.Y=function(){return this.F?this.F.presentationTimeline.Y():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Mb=function(){return this.F?this.F.presentationTimeline.Mb():!1};q.bf=function(){if(this.F){var a=this.F.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};
400
+ q.La=function(){if(this.F){var a=this.F.presentationTimeline;return{start:a.ec(),end:a.ob()}}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}};q.xg=function(){this.Y()&&(this.g.currentTime=this.La().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.o?this.o.i:null};q.Cc=function(){return this.o?this.o.Cc():Infinity};q.hd=function(){return this.o?this.o.hd():{}};
401
+ q.Kc=function(){return this.K?this.K.g==Ke:!1};q.Ec=function(){return this.g?this.I?this.I.i:1:0};q.Fe=function(a){0==a?Ta("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==ol&&(this.B.playbackRateChanged(a),qj(this.i,1<Math.abs(a))))};q.Ke=function(){var a=this.I.gd();this.l==Al&&this.I.set(a);this.l==ol&&(this.I.set(a),this.B.playbackRateChanged(a),qj(this.i,!1))};
402
+ q.Jb=function(){if(this.F){for(var a=this.i?this.i.h:null,b=[],c=0,d=r(this.F.variants),e=d.next();!e.done;e=d.next())if(e=e.value,qe(e)){var f=ie(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 pe(g)}):[]};
403
+ q.qb=function(){if(this.F){for(var a=this.i?this.i.i:null,b=[],c=r(this.F.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=je(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Cl(this).map(function(f){return ne(f)}):[]};q.ag=function(){return this.F?this.F.imageStreams.map(function(a){return ke(a)}):[]};
402
404
  q.sg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,D,B;return H(function(F){if(1==F.g)return c.F?(d=c.F.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.C(3):u(F,d.createSegmentIndex(),3):F["return"](null):F.C(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;t=l/n;
403
- v=m*n;y=f.l-f.startTime;x=f.i||y/v;w=f.startTime;D=C=0;1<v&&(B=Math.floor((b-f.startTime)/x),w=f.startTime+B*x,C=B%m*p,D=Math.floor(B/m)*t);return F["return"]({imageHeight:l,imageWidth:k,height:t,positionX:C,positionY:D,startTime:w,duration:x,uris:f.Ga(),width:p})}return F["return"](null)})};
404
- q.qe=function(a){if(this.F&&this.i){var b=this.F.textStreams.find(function(d){return d.id==a.id});b&&b!=this.i.i&&(rk(this.j.h,b,!1),uj(this.i,b),Ol(this),this.ha=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Dl(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,le(c)==a.id?c.mode=this.X?"showing":"hidden":c.mode="disabled";Ol(this)}};
405
- q.re=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.F&&this.i){this.s.abr.enabled&&Ta("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.F.variants.find(function(e){return e.id==a.id});d&&qe(d)&&(kl(this,d,!1,b,c),this.ea=new De(d),rl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
406
- le(c)==a.id){Pl(this,c);break}};q.Rf=function(){return Ql(this.Ib())};q.rg=function(){return Ql(this.ob())};q.Qf=function(){return Array.from(Rl(this.Ib()))};q.qg=function(){return Array.from(Rl(this.ob()))};
407
- q.vd=function(a,b){if(this.F&&this.H){this.ea=new Ee(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.i.h,e=this.ea.create(this.F.variants),f=null;e=r(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=ie(f),this.re(c,!0)):Nl(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Ub(a);f=d=null;e=
408
- r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=pe(g);Ub(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Pl(this,f):d&&Pl(this,d)}};
409
- q.pe=function(a,b,c){c=void 0===c?!1:c;if(this.F&&this.H){if(this.ha=a,this.Za=b||"",this.Ka=c,(a=se(this.F.textStreams,this.ha,this.Za,this.Ka)[0]||null)&&a!=this.i.i&&(rk(this.j.h,a,!1),this.s.streaming.alwaysStreamText||this.Nb()))uj(this.i,a),Ol(this)}else{var d=Ub(a);(a=this.ob().find(function(e){return Ub(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.qe(a)}};
410
- q.Ug=function(a){if(this.F&&this.H){for(var b=null,c=r(this.F.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.ea=new Ee(b.language,"",0,a),Nl(this))}};q.Nb=function(){var a=this.X;return this.L?this.L.o.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Dl(this).some(function(b){return"showing"==b.mode}):a};q.Ve=function(){return this.g&&this.g.src&&this.g.textTracks?Hl(this).map(function(a){return ne(a)}):[]};
411
- q.Uf=function(a){var b=Ub(a),c=Hl(this).filter(function(f){return Ub(f.language)==b});if(!c||!c.length)return[];a=[];c=r(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=r(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function Dl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
412
- function Fl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Hl(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
413
- q.Ae=function(a){a=!!a;if(this.X!=a){this.X=a;if(this.l==pl)this.L.o.setTextVisibility(a),this.s.streaming.alwaysStreamText||(a?this.i.i||(a=se(this.F.textStreams,this.ha,this.Za,this.Ka),0<a.length&&(uj(this.i,a[0]),Ol(this))):qj(this.i));else if(this.g&&this.g.src&&this.g.textTracks){var b=Dl(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}vl(this)}};
414
- q.lg=function(){if(!this.Z())return null;var a=this.ba.l,b=0;if(this.H)b=this.H.l();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.F?new Date(1E3*(this.F.presentationTimeline.j+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
415
- q.Ye=function(){if(!this.Z())return null;if(this.F)return new Date(1E3*this.F.presentationTimeline.j);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.fd=function(){if(this.l==pl)return this.L.fd();var a={total:[],audio:[],video:[],text:[]};this.l==Bl&&(a.total=Wh(this.g.buffered));return a};
416
- q.getStats=function(){if(this.l!=pl&&this.l!=Bl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};hl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.j;b=Math.round(100*b);c.i=isNaN(c.i)?
417
- b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.j,b=Number(a.totalVideoFrames),c.R=Number(a.droppedVideoFrames),c.O=b,this.j.L=Number(a.corruptedVideoFrames));this.o?(a=this.o,a=a.H?a.H:NaN):a=NaN;this.j.o=a;if(this.l==pl){if(a=this.i.h)this.j.B=(this.I?this.I.i:1)*a.bandwidth;a&&a.video&&(c=this.j,b=a.video.height||NaN,c.X=a.video.width||NaN,c.D=b);this.Z()&&(a=this.Ye().valueOf()+1E3*this.La().end,this.j.H=(Date.now()-a)/1E3);this.F&&this.F.presentationTimeline&&
418
- (this.j.K=this.F.presentationTimeline.g);a=this.B.getBandwidthEstimate();this.j.A=a}var d=this.j;a=d.X;c=d.D;b=d.B;var e=d.O,f=d.R,g=d.L,h=d.A,k=d.i,l=d.l,m=d.I,n=d.j,p=ok(d.g,"playing"),t=ok(d.g,"paused"),v=ok(d.g,"buffering"),y=d.o,x=d.H,w=d.K,C=pk(d.g),D=[];d=r(d.h.g);for(var B=d.next();!B.done;B=d.next())B=B.value,D.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
405
+ v=m*n;y=f.l-f.startTime;x=f.i||y/v;w=f.startTime;D=C=0;1<v&&(B=Math.floor((b-f.startTime)/x),w=f.startTime+B*x,C=B%m*p,D=Math.floor(B/m)*t);return F["return"]({imageHeight:l,imageWidth:k,height:t,positionX:C,positionY:D,startTime:w,duration:x,uris:f.Ha(),width:p})}return F["return"](null)})};
406
+ q.qe=function(a){if(this.F&&this.i){var b=this.F.textStreams.find(function(d){return d.id==a.id});b&&b!=this.i.i&&(qk(this.j.h,b,!1),tj(this.i,b),Nl(this),this.ia=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Cl(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,le(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";Nl(this)}};
407
+ q.re=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.F&&this.i){this.s.abr.enabled&&Ta("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.F.variants.find(function(e){return e.id==a.id});d&&qe(d)&&(jl(this,d,!1,b,c),this.ha=new De(d),ql(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
408
+ le(c)==a.id){Ol(this,c);break}};q.Rf=function(){return Pl(this.Jb())};q.rg=function(){return Pl(this.qb())};q.Qf=function(){return Array.from(Ql(this.Jb()))};q.qg=function(){return Array.from(Ql(this.qb()))};
409
+ q.vd=function(a,b){if(this.F&&this.H){this.ha=new Ee(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.i.h,e=this.ha.create(this.F.variants),f=null;e=r(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=ie(f),this.re(c,!0)):Ml(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Ub(a);f=d=null;e=
410
+ r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=pe(g);Ub(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Ol(this,f):d&&Ol(this,d)}};
411
+ q.pe=function(a,b,c){c=void 0===c?!1:c;if(this.F&&this.H){if(this.ia=a,this.$a=b||"",this.Za=c,(a=se(this.F.textStreams,this.ia,this.$a,this.Za)[0]||null)&&a!=this.i.i&&(qk(this.j.h,a,!1),this.s.streaming.alwaysStreamText||this.Ob()))tj(this.i,a),Nl(this)}else{var d=Ub(a);(a=this.qb().find(function(e){return Ub(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.qe(a)}};
412
+ q.Ug=function(a){if(this.F&&this.H){for(var b=null,c=r(this.F.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.ha=new Ee(b.language,"",0,a),Ml(this))}};q.Ob=function(){var a=this.ba;return this.L?this.L.o.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Cl(this).some(function(b){return"showing"==b.mode}):a};q.Ve=function(){return this.g&&this.g.src&&this.g.textTracks?Gl(this).map(function(a){return ne(a)}):[]};
413
+ q.Uf=function(a){var b=Ub(a),c=Gl(this).filter(function(f){return Ub(f.language)==b});if(!c||!c.length)return[];a=[];c=r(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=r(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function Cl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
414
+ function El(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Gl(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
415
+ q.Ae=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==ol)this.L.o.setTextVisibility(a),this.s.streaming.alwaysStreamText||(a?this.i.i||(a=se(this.F.textStreams,this.ia,this.$a,this.Za),0<a.length&&(tj(this.i,a[0]),Nl(this))):pj(this.i));else if(this.g&&this.g.src&&this.g.textTracks){var b=Cl(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}ul(this)}};
416
+ q.lg=function(){if(!this.Y())return null;var a=this.ea.l,b=0;if(this.H)b=this.H.l();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.F?new Date(1E3*(this.F.presentationTimeline.j+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
417
+ q.Ye=function(){if(!this.Y())return null;if(this.F)return new Date(1E3*this.F.presentationTimeline.j);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.fd=function(){if(this.l==ol)return this.L.fd();var a={total:[],audio:[],video:[],text:[]};this.l==Al&&(a.total=Wh(this.g.buffered));return a};
418
+ q.getStats=function(){if(this.l!=ol&&this.l!=Al)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};gl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.j;b=Math.round(100*b);c.i=isNaN(c.i)?
419
+ b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.j,b=Number(a.totalVideoFrames),c.Z=Number(a.droppedVideoFrames),c.O=b,this.j.L=Number(a.corruptedVideoFrames));this.o?(a=this.o,a=a.H?a.H:NaN):a=NaN;this.j.o=a;if(this.l==ol){if(a=this.i.h)this.j.B=(this.I?this.I.i:1)*a.bandwidth;a&&a.video&&(c=this.j,b=a.video.height||NaN,c.S=a.video.width||NaN,c.D=b);this.Y()&&(a=this.Ye().valueOf()+1E3*this.La().end,this.j.H=(Date.now()-a)/1E3);this.F&&this.F.presentationTimeline&&
420
+ (this.j.K=this.F.presentationTimeline.g);a=this.B.getBandwidthEstimate();this.j.A=a}var d=this.j;a=d.S;c=d.D;b=d.B;var e=d.O,f=d.Z,g=d.L,h=d.A,k=d.i,l=d.l,m=d.I,n=d.j,p=nk(d.g,"playing"),t=nk(d.g,"paused"),v=nk(d.g,"buffering"),y=d.o,x=d.H,w=d.K,C=ok(d.g),D=[];d=r(d.h.g);for(var B=d.next();!B.done;B=d.next())B=B.value,D.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
419
421
  estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:t,bufferingTime:v,licenseTime:y,liveLatency:x,maxSegmentDuration:w,stateHistory:C,switchHistory:D}};
420
- q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Db("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=pl&&this.l!=Bl)throw new O(1,7,7004);if(!d){var h=ng(a);d=Sl[h];if(!d)throw new O(1,2,2011,h);}if(this.l==Bl){if("text/vtt"!=d)throw new O(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=a;d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.ob().find(function(k){return k.language==
421
- b&&k.label==(f||"")&&k.kind==c}))return yl(this),a;throw new O(1,2,2012);}h=this.F.presentationTimeline.getDuration();if(Infinity==h)throw new O(1,4,4033);a={id:this.Zd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Vi(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:Rb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
422
- closedCaptions:null};if(!rd(md(a.mimeType,a.codecs)))throw new O(2,2,2014,d);this.F.textStreams.push(a);yl(this);return je(a)};
423
- q.Gf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,y,x,w,C;return H(function(D){switch(D.g){case 1:if(h.l!=pl&&h.l!=Bl)throw new O(1,7,7004);if(d){D.C(2);break}return u(D,Tl(h,a),3);case 3:d=D.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(B){}if(h.l!=Bl){D.C(4);break}g&&(c="forced");return u(D,Ul(h,a,b,c,d,f||"",k),5);case 5:l=h.ob();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return yl(h),D["return"](m);throw new O(1,2,2012);case 4:n=
424
- Sb;p=h.F.presentationTimeline.getDuration();if(Infinity==p)throw new O(1,4,4033);if(!k.length){D.C(6);break}return u(D,Vl(a,h.U,h.s.streaming.retryParameters),7);case 7:t=D.h,v=Wl(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=ai(y),d="text/vtt";case 6:x={id:h.Zd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Vi(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.qa,primary:!1,trickModeVideo:null,
425
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=md(x.mimeType,x.codecs);C=rd(w);if(!C)throw new O(2,2,2014,d);h.F.textStreams.push(x);yl(h);return D["return"](je(x))}})};
426
- q.Ff=function(a,b,c){var d=this,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:if(d.l!=pl&&d.l!=Bl)throw new O(1,7,7004);if(c){n.C(2);break}return u(n,Tl(d,a),3);case 3:c=n.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(p){}return u(n,Ul(d,a,b,"chapters",c,"",e),4);case 4:f=d.Ve();if(g=f.find(function(p){return p.language==b})){h=Hl(d);k=r(h);for(l=k.next();!l.done;l=k.next())m=l.value,Al(d,m);return n["return"](g)}throw new O(1,2,2012);}})};
427
- function Tl(a,b){var c,d;return H(function(e){switch(e.g){case 1:c=ng(b);if(d=Sl[c])return e["return"](d);A(e,2);return u(e,pg(b,a.U,a.s.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:E(e);case 3:if(d)return e["return"](d);throw new O(1,2,2011,c);}})}
428
- function Ul(a,b,c,d,e,f,g){var h,k,l,m;return H(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,Vl(b,a.U,a.s.streaming.retryParameters),3):n.C(2);2!=n.g&&(h=n.h,k=Wl(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=ai(l),e="text/vtt");m=document.createElement("track");m.src=b;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);z(n)})}
429
- function Vl(a,b,c){var d,e,f;return H(function(g){if(1==g.g)return d=kf,e=df([a],c),e.method="GET",u(g,b.request(d,e).promise,2);f=g.h;return g["return"](f.data)})}function Wl(a,b,c,d){var e=sd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Lc(b),b=c.parseMedia(b,a),ek(b,d);throw new O(2,2,2014,c);}q.we=function(a,b){this.Vd.width=a;this.Vd.height=b};
430
- q.me=function(){if(this.l==pl){var a=this.i;if(a.M.g)a=!1;else if(a.j)a=!1;else{for(var b=r(a.g.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Gc&&(c.Gc=!1,pj(a,c,.1));a=!0}}else a=!1;return a};q.gg=function(){Ta("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.F};q.hg=function(){return this.vb};
431
- function uk(a){var b=jk();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.Z()&&d.includes(c.code)&&(c.severity=1,a.me())};b.textDisplayFactory=function(){return a.hb?new Xj(a.g,a.hb):new Rj(a.g)};return b}q.Be=function(a){this.hb=a};
432
- function al(a,b){for(var c=new Set,d=r(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=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(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 Wi;h={id:a.Zd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
433
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Rb,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 $k(a,b){return H(function(c){if(1==c.g)return u(c,Xl(a,b),2);Ml(a,b);z(c)})}
434
- function Xl(a,b){var c;return H(function(d){if(1==d.g)return c=a.i?a.i.h:null,u(d,Yd(c,b),2);xl(b);z(d)})}
435
- function Ml(a,b){if(a.l!=Kk){for(var c=a.s.restrictions,d=a.Vd,e=!1,f=r(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Xd(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.i&&yl(a);if((c=a.o?a.o.i:null)&&a.o.o)for(d=r(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=r(f.initData||[]),g=f.next();!g.done;g=
436
- f.next())g=g.value,Of(a.o,g.initDataType,g.initData);Yl(a,b)}}
437
- function sl(a,b){var c,d,e,f,g;return H(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n;return H(function(p){if(1==p.g)return k?u(p,k.createSegmentIndex(),2):p["return"](null);m=k.segmentIndex[Symbol.iterator]().seek(l);if(!m)return p["return"](null);n=m.startTime;return p["return"](n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
438
- function Vk(a){var b=a.Jc();if(a.j&&a.K&&a.H){var c=a.I;c.j=b;Yi(c);hl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Hk(Zl,b))}function il(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=Hk($l),a.dispatchEvent(b))}function hl(a){if(a.j&&a.K){var b=a.j.g;a.K.g==Ke?nk(b,"buffering"):a.g.paused?nk(b,"paused"):a.g.ended?nk(b,"ended"):nk(b,"playing")}}
439
- function rl(a){try{Yl(a,a.F)}catch(c){return Tk(a,c),!1}var b=a.F.variants.filter(function(c){return qe(c)});b=a.ea.create(b);a.B.setVariants(Array.from(b.values()));return!0}function Nl(a){var b;(b=rl(a)?a.B.chooseVariant():null)&&kl(a,b,!0,!0,0)}
440
- function kl(a,b,c,d,e){var f=a.i.h;if(b==f)d&&tj(a.i,b,d,e,!0);else{var g=a.j.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));tj(a.i,b,d,e);d=null;f&&(d=ie(f));b=ie(b);c?tl(a,d,b):am(a,d,b)}}function Pl(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=pe(c);var d=pe(b);am(a,c,d)}
441
- function ul(a,b,c){a=Ub(a.s.preferredTextLanguage);b=Ub(b.language);c=Ub(c.language);return Tb(c,a)&&!Tb(b,c)}function tl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Hk(bm,b);cm(a,b)}function yl(a){var b=Hk(dm);cm(a,b)}function am(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Hk(em,b);cm(a,b)}function Ol(a){var b=Hk(fm);cm(a,b)}function vl(a){var b=Hk(gm);cm(a,b)}function wl(a){var b=(new Map).set("newStatus",a.s.abr.enabled);cm(a,Hk(hm,b))}
442
- function Tk(a,b){if(a.l!=Kk){var c=Hk(im,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Yk(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(Hk(b,c))}
443
- function Sk(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 O(2,3,3016,b,c,a.g.error.message)}
444
- function el(a,b){if(a.i){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.F.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=r(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=r(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&&!jm.includes(l)}h!=f.allowedByKeySystem&&
445
- (e=!0)}}}e&&rl(a);(d=a.i.h)&&!d.allowedByKeySystem&&Nl(a);e&&yl(a)}}function fl(a,b,c){if(a.A&&a.A.onExpirationUpdated)a.A.onExpirationUpdated(b,c);b=Hk(km);a.dispatchEvent(b)}function jl(a,b,c){0<b&&(a.Z()||a.vf(b));b=a.getDuration();c<b&&(a.Z()||a.eb(c))}
446
- function Yl(a,b){var c=a.o?a.o.hd():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=r(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=r(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=r(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var t=c[d?"00":p];t?jm.includes(t)&&h.add(t):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
447
- missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new O(2,4,4012,c);}function xl(a){if(!a.variants.some(qe))throw new O(2,4,4032);}function cm(a,b){H(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=Kk&&a.dispatchEvent(b);z(c)})}function Rl(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Ub(c.language)):b.add("und");return b}
448
- function Ql(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Ub(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(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=r(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));
449
- h.push({language:l,role:n,label:p})}});return h}function Mk(){return new O(2,7,7E3)}function Gk(a,b,c,d,e,f){return d==a&&e.J==f.J&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Lj(){return{J:null,mimeType:null,startTime:null,Ce:NaN,uri:null}}function Nk(a){return new Promise(function(b,c){a.Pb=function(){return c(Mk())};a.nd=function(){return b()};a.onError=function(d){return c(d)};a.pd=function(){return c(Mk())}})}J("shaka.Player",S);S.prototype.setVideoContainer=S.prototype.Be;
422
+ q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Db("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=ol&&this.l!=Al)throw new N(1,7,7004);if(!d){var h=ng(a);d=Rl[h];if(!d)throw new N(1,2,2011,h);}if(this.l==Al){if("text/vtt"!=d)throw new N(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=a;d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.qb().find(function(k){return k.language==
423
+ b&&k.label==(f||"")&&k.kind==c}))return xl(this),a;throw new N(1,2,2012);}h=this.F.presentationTimeline.getDuration();if(Infinity==h)throw new N(1,4,4033);a={id:this.Zd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Vi(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:Rb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
424
+ closedCaptions:null};if(!rd(md(a.mimeType,a.codecs)))throw new N(2,2,2014,d);this.F.textStreams.push(a);xl(this);return je(a)};
425
+ q.Gf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,y,x,w,C;return H(function(D){switch(D.g){case 1:if(h.l!=ol&&h.l!=Al)throw new N(1,7,7004);if(d){D.C(2);break}return u(D,Sl(h,a),3);case 3:d=D.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(B){}if(h.l!=Al){D.C(4);break}g&&(c="forced");return u(D,Tl(h,a,b,c,d,f||"",k),5);case 5:l=h.qb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return xl(h),D["return"](m);throw new N(1,2,2012);case 4:n=
426
+ Sb;p=h.F.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){D.C(6);break}return u(D,Ul(a,h.U,h.s.streaming.retryParameters),7);case 7:t=D.h,v=Vl(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=ai(y),d="text/vtt";case 6:x={id:h.Zd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Vi(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.ra,primary:!1,trickModeVideo:null,
427
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=md(x.mimeType,x.codecs);C=rd(w);if(!C)throw new N(2,2,2014,d);h.F.textStreams.push(x);xl(h);return D["return"](je(x))}})};
428
+ q.Ff=function(a,b,c){var d=this,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:if(d.l!=ol&&d.l!=Al)throw new N(1,7,7004);if(c){n.C(2);break}return u(n,Sl(d,a),3);case 3:c=n.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(p){}return u(n,Tl(d,a,b,"chapters",c,"",e),4);case 4:f=d.Ve();if(g=f.find(function(p){return p.language==b})){h=Gl(d);k=r(h);for(l=k.next();!l.done;l=k.next())m=l.value,zl(d,m);return n["return"](g)}throw new N(1,2,2012);}})};
429
+ function Sl(a,b){var c,d;return H(function(e){switch(e.g){case 1:c=ng(b);if(d=Rl[c])return e["return"](d);A(e,2);return u(e,pg(b,a.U,a.s.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:E(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
430
+ function Tl(a,b,c,d,e,f,g){var h,k,l,m;return H(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,Ul(b,a.U,a.s.streaming.retryParameters),3):n.C(2);2!=n.g&&(h=n.h,k=Vl(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=ai(l),e="text/vtt");m=document.createElement("track");m.src=b;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);z(n)})}
431
+ function Ul(a,b,c){var d,e,f;return H(function(g){if(1==g.g)return d=kf,e=df([a],c),e.method="GET",u(g,b.request(d,e).promise,2);f=g.h;return g["return"](f.data)})}function Vl(a,b,c,d){var e=sd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Lc(b),b=c.parseMedia(b,a),dk(b,d);throw new N(2,2,2014,c);}q.we=function(a,b){this.Vd.width=a;this.Vd.height=b};
432
+ q.me=function(){if(this.l==ol){var a=this.i;if(a.M.g)a=!1;else if(a.j)a=!1;else{for(var b=r(a.g.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Hc&&(c.Hc=!1,oj(a,c,.1));a=!0}}else a=!1;return a};q.gg=function(){Ta("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.F};q.hg=function(){return this.xb};
433
+ function tk(a){var b=ik();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.Y()&&d.includes(c.code)&&(c.severity=1,a.me())};b.textDisplayFactory=function(){return a.jb?new Wj(a.g,a.jb):new Qj(a.g)};return b}q.Be=function(a){this.jb=a};
434
+ function $k(a,b){for(var c=new Set,d=r(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=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(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 Wi;h={id:a.Zd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
435
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Rb,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 Zk(a,b){return H(function(c){if(1==c.g)return u(c,Wl(a,b),2);Ll(a,b);z(c)})}
436
+ function Wl(a,b){var c;return H(function(d){if(1==d.g)return c=a.i?a.i.h:null,u(d,Yd(c,b),2);wl(b);z(d)})}
437
+ function Ll(a,b){if(a.l!=Jk){for(var c=a.s.restrictions,d=a.Vd,e=!1,f=r(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Xd(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.i&&xl(a);if((c=a.o?a.o.i:null)&&a.o.o)for(d=r(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=r(f.initData||[]),g=f.next();!g.done;g=
438
+ f.next())g=g.value,Of(a.o,g.initDataType,g.initData);Xl(a,b)}}
439
+ function rl(a,b){var c,d,e,f,g;return H(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n;return H(function(p){if(1==p.g)return k?u(p,k.createSegmentIndex(),2):p["return"](null);m=k.segmentIndex[Symbol.iterator]().seek(l);if(!m)return p["return"](null);n=m.startTime;return p["return"](n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
440
+ function Uk(a){var b=a.Kc();if(a.j&&a.K&&a.H){var c=a.I;c.j=b;Yi(c);gl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Gk(Yl,b))}function hl(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=Gk(Zl),a.dispatchEvent(b))}function gl(a){if(a.j&&a.K){var b=a.j.g;a.K.g==Ke?mk(b,"buffering"):a.g.paused?mk(b,"paused"):a.g.ended?mk(b,"ended"):mk(b,"playing")}}
441
+ function ql(a){try{Xl(a,a.F)}catch(c){return Sk(a,c),!1}var b=a.F.variants.filter(function(c){return qe(c)});b=a.ha.create(b);a.B.setVariants(Array.from(b.values()));return!0}function Ml(a){var b;(b=ql(a)?a.B.chooseVariant():null)&&jl(a,b,!0,!0,0)}
442
+ function jl(a,b,c,d,e){var f=a.i.h;if(b==f)d&&sj(a.i,b,d,e,!0);else{var g=a.j.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));sj(a.i,b,d,e);d=null;f&&(d=ie(f));b=ie(b);c?sl(a,d,b):$l(a,d,b)}}function Ol(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=pe(c);var d=pe(b);$l(a,c,d)}
443
+ function tl(a,b,c){a=Ub(a.s.preferredTextLanguage);b=Ub(b.language);c=Ub(c.language);return Tb(c,a)&&!Tb(b,c)}function sl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Gk(am,b);bm(a,b)}function xl(a){var b=Gk(cm);bm(a,b)}function $l(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Gk(dm,b);bm(a,b)}function Nl(a){var b=Gk(em);bm(a,b)}function ul(a){var b=Gk(fm);bm(a,b)}function vl(a){var b=(new Map).set("newStatus",a.s.abr.enabled);bm(a,Gk(gm,b))}
444
+ function Sk(a,b){if(a.l!=Jk){var c=Gk(hm,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Xk(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(Gk(b,c))}
445
+ function Rk(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)}
446
+ function dl(a,b){if(a.i){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.F.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=r(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=r(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&&!im.includes(l)}h!=f.allowedByKeySystem&&
447
+ (e=!0)}}}e&&ql(a);(d=a.i.h)&&!d.allowedByKeySystem&&Ml(a);e&&xl(a)}}function el(a,b,c){if(a.A&&a.A.onExpirationUpdated)a.A.onExpirationUpdated(b,c);b=Gk(jm);a.dispatchEvent(b)}function il(a,b,c){0<b&&(a.Y()||a.vf(b));b=a.getDuration();c<b&&(a.Y()||a.fb(c))}
448
+ function Xl(a,b){var c=a.o?a.o.hd():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=r(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=r(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=r(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var t=c[d?"00":p];t?im.includes(t)&&h.add(t):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
449
+ missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function wl(a){if(!a.variants.some(qe))throw new N(2,4,4032);}function bm(a,b){H(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=Jk&&a.dispatchEvent(b);z(c)})}function Ql(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Ub(c.language)):b.add("und");return b}
450
+ function Pl(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Ub(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(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=r(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));
451
+ h.push({language:l,role:n,label:p})}});return h}function Lk(){return new N(2,7,7E3)}function Fk(a,b,c,d,e,f){return d==a&&e.J==f.J&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Kj(){return{J:null,mimeType:null,startTime:null,Ce:NaN,uri:null}}function Mk(a){return new Promise(function(b,c){a.Qb=function(){return c(Lk())};a.nd=function(){return b()};a.onError=function(d){return c(d)};a.pd=function(){return c(Lk())}})}J("shaka.Player",S);S.prototype.setVideoContainer=S.prototype.Be;
450
452
  S.prototype.getManifestParserFactory=S.prototype.hg;S.prototype.getManifest=S.prototype.gg;S.prototype.retryStreaming=S.prototype.me;S.prototype.setMaxHardwareResolution=S.prototype.we;S.prototype.addChaptersTrack=S.prototype.Ff;S.prototype.addTextTrackAsync=S.prototype.Gf;S.prototype.addTextTrack=S.prototype.addTextTrack;S.prototype.getStats=S.prototype.getStats;S.prototype.getBufferedInfo=S.prototype.fd;S.prototype.getPresentationStartTimeAsDate=S.prototype.Ye;
451
- S.prototype.getPlayheadTimeAsDate=S.prototype.lg;S.prototype.setTextTrackVisibility=S.prototype.Ae;S.prototype.getChapters=S.prototype.Uf;S.prototype.getChaptersTracks=S.prototype.Ve;S.prototype.isTextTrackVisible=S.prototype.Nb;S.prototype.selectVariantsByLabel=S.prototype.Ug;S.prototype.selectTextLanguage=S.prototype.pe;S.prototype.selectAudioLanguage=S.prototype.vd;S.prototype.getTextLanguages=S.prototype.qg;S.prototype.getAudioLanguages=S.prototype.Qf;S.prototype.getTextLanguagesAndRoles=S.prototype.rg;
452
- S.prototype.getAudioLanguagesAndRoles=S.prototype.Rf;S.prototype.selectVariantTrack=S.prototype.re;S.prototype.selectTextTrack=S.prototype.qe;S.prototype.getThumbnails=S.prototype.sg;S.prototype.getImageTracks=S.prototype.ag;S.prototype.getTextTracks=S.prototype.ob;S.prototype.getVariantTracks=S.prototype.Ib;S.prototype.cancelTrickPlay=S.prototype.Ke;S.prototype.trickPlay=S.prototype.Fe;S.prototype.getPlaybackRate=S.prototype.Dc;S.prototype.isBuffering=S.prototype.Jc;S.prototype.getKeyStatuses=S.prototype.hd;
453
- S.prototype.getExpiration=S.prototype.Bc;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.xg;S.prototype.seekRange=S.prototype.La;S.prototype.isAudioOnly=S.prototype.bf;S.prototype.isInProgress=S.prototype.Lb;S.prototype.isLive=S.prototype.Z;S.prototype.getAdManager=S.prototype.ed;S.prototype.getAssetUri=S.prototype.Rd;S.prototype.getNetworkingEngine=S.prototype.Cc;S.prototype.getMediaElement=S.prototype.jg;
454
- S.prototype.getLoadMode=S.prototype.Xe;S.prototype.resetConfiguration=S.prototype.Sg;S.prototype.getBufferFullness=S.prototype.Sf;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.configure=S.prototype.configure;S.prototype.load=S.prototype.load;S.prototype.unload=S.prototype.Ge;S.prototype.detach=S.prototype.detach;S.prototype.attach=S.prototype.xc;
453
+ S.prototype.getPlayheadTimeAsDate=S.prototype.lg;S.prototype.setTextTrackVisibility=S.prototype.Ae;S.prototype.getChapters=S.prototype.Uf;S.prototype.getChaptersTracks=S.prototype.Ve;S.prototype.isTextTrackVisible=S.prototype.Ob;S.prototype.selectVariantsByLabel=S.prototype.Ug;S.prototype.selectTextLanguage=S.prototype.pe;S.prototype.selectAudioLanguage=S.prototype.vd;S.prototype.getTextLanguages=S.prototype.qg;S.prototype.getAudioLanguages=S.prototype.Qf;S.prototype.getTextLanguagesAndRoles=S.prototype.rg;
454
+ S.prototype.getAudioLanguagesAndRoles=S.prototype.Rf;S.prototype.selectVariantTrack=S.prototype.re;S.prototype.selectTextTrack=S.prototype.qe;S.prototype.getThumbnails=S.prototype.sg;S.prototype.getImageTracks=S.prototype.ag;S.prototype.getTextTracks=S.prototype.qb;S.prototype.getVariantTracks=S.prototype.Jb;S.prototype.cancelTrickPlay=S.prototype.Ke;S.prototype.trickPlay=S.prototype.Fe;S.prototype.getPlaybackRate=S.prototype.Ec;S.prototype.isBuffering=S.prototype.Kc;S.prototype.getKeyStatuses=S.prototype.hd;
455
+ S.prototype.getExpiration=S.prototype.Cc;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.xg;S.prototype.seekRange=S.prototype.La;S.prototype.isAudioOnly=S.prototype.bf;S.prototype.isInProgress=S.prototype.Mb;S.prototype.isLive=S.prototype.Y;S.prototype.getAdManager=S.prototype.ed;S.prototype.getAssetUri=S.prototype.Rd;S.prototype.getNetworkingEngine=S.prototype.Dc;S.prototype.getMediaElement=S.prototype.jg;
456
+ S.prototype.getLoadMode=S.prototype.Xe;S.prototype.resetConfiguration=S.prototype.Sg;S.prototype.getBufferFullness=S.prototype.Sf;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.configure=S.prototype.configure;S.prototype.load=S.prototype.load;S.prototype.unload=S.prototype.Ge;S.prototype.detach=S.prototype.detach;S.prototype.attach=S.prototype.yc;
455
457
  S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return H(function(h){if(1==h.g)return b={},a?u(h,fg(),3):h.C(2);2!=h.g&&(b=h.h);var k={};if(Ad()){for(var l in mg)k[l]=!0;for(var m in og)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["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]=Ad()?!!mg[n]:Bd(n);for(var p in l)k[p]=
456
458
  Ad()?!!og[p]:Bd(l[p]);c=k;k={};p=r('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(","));
457
- for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Ad()?rd(l)?!0:MediaSource.isTypeSupported(l)||id(l):Bd(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=lm;for(g in f)e[g]=f[g]();return h["return"](e)})};S.isBrowserSupported=Lk;S.setAdManagerFactory=function(a){wk=a};S.registerSupportPlugin=function(a,b){lm[a]=b};S.prototype.destroy=S.prototype.destroy;
458
- var hm="abrstatuschanged",bm="adaptation",Zl="buffering",gl="drmsessionupdate",Ij="emsg",im="error",km="expirationupdated",Qk="loaded",Ok="loading",bl="manifestparsed",Gl="metadata",Ik="onstatechange",Jk="onstateidle",$l="ratechange",ql="streaming",fm="textchanged",gm="texttrackvisibility",Zk="timelineregionadded",Jl="timelineregionenter",Kl="timelineregionexit",dm="trackschanged",Uk="unloading",em="variantchanged",mm={lh:hm,mh:bm,nh:Zl,qh:gl,yh:Ij,Error:im,Ah:km,Fh:"largegap",Gh:Qk,Hh:Ok,Lh:bl,Metadata:Gl,
459
- Ph:Ik,Qh:Jk,Yh:$l,bi:"sessiondata",ci:ql,di:fm,ei:gm,gi:Zk,ii:Jl,ji:Kl,ki:dm,oi:Uk,ri:em},Kk=0,tk=1,pl=2,Bl=3;S.LoadMode={DESTROYED:Kk,NOT_LOADED:tk,MEDIA_SOURCE:pl,SRC_EQUALS:Bl};S.version="v3.2.3";var nm=["3","2"];Eb=new function(a){this.g=a;this.i=Fb;this.h=Gb}(new Cb(Number(nm[0]),Number(nm[1])));
460
- var jm=["output-restricted","internal-error"],lm={},wk=null,Rk={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"},Sl={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
461
- ssa:"text/x-ssa",ass:"text/x-ssa"};function om(){this.h=[];this.j=this.i=this.g=0};function pm(a,b){var c=this;this.i=a;this.g=b;this.j=!1;this.l=this.g.getVolume();this.h=new nf;this.h.m(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.j=!0});this.h.m(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.j=!1})}q=pm.prototype;q.getDuration=function(){return this.i.getDuration()};q.getMinSuggestedDuration=function(){return this.i.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.j};
459
+ for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Ad()?rd(l)?!0:MediaSource.isTypeSupported(l)||id(l):Bd(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=km;for(g in f)e[g]=f[g]();return h["return"](e)})};S.isBrowserSupported=Kk;S.setAdManagerFactory=function(a){vk=a};S.registerSupportPlugin=function(a,b){km[a]=b};S.prototype.destroy=S.prototype.destroy;
460
+ var gm="abrstatuschanged",am="adaptation",Yl="buffering",fl="drmsessionupdate",Hj="emsg",hm="error",jm="expirationupdated",Pk="loaded",Nk="loading",al="manifestparsed",Fl="metadata",Hk="onstatechange",Ik="onstateidle",Zl="ratechange",pl="streaming",em="textchanged",fm="texttrackvisibility",Yk="timelineregionadded",Il="timelineregionenter",Jl="timelineregionexit",cm="trackschanged",Tk="unloading",dm="variantchanged",lm={lh:gm,mh:am,nh:Yl,qh:fl,yh:Hj,Error:hm,Ah:jm,Fh:"largegap",Gh:Pk,Hh:Nk,Lh:al,Metadata:Fl,
461
+ Ph:Hk,Qh:Ik,Yh:Zl,bi:"sessiondata",ci:pl,di:em,ei:fm,gi:Yk,ii:Il,ji:Jl,ki:cm,oi:Tk,ri:dm},Jk=0,sk=1,ol=2,Al=3;S.LoadMode={DESTROYED:Jk,NOT_LOADED:sk,MEDIA_SOURCE:ol,SRC_EQUALS:Al};S.version="v3.2.4";var mm=["3","2"];Eb=new function(a){this.g=a;this.i=Fb;this.h=Gb}(new Cb(Number(mm[0]),Number(mm[1])));
462
+ var im=["output-restricted","internal-error"],km={},vk=null,Qk={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"},Rl={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
463
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function nm(){this.h=[];this.j=this.i=this.g=0};function om(a,b){var c=this;this.i=a;this.g=b;this.j=!1;this.l=this.g.getVolume();this.h=new nf;this.h.m(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.j=!0});this.h.m(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.j=!1})}q=om.prototype;q.getDuration=function(){return this.i.getDuration()};q.getMinSuggestedDuration=function(){return this.i.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.j};
462
464
  q.isSkippable=function(){return 0<=this.i.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
463
- q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.i=null};J("shaka.ads.ClientSideAd",pm);
464
- pm.prototype.release=pm.prototype.release;pm.prototype.getPositionInSequence=pm.prototype.getPositionInSequence;pm.prototype.getSequenceLength=pm.prototype.getSequenceLength;pm.prototype.setMuted=pm.prototype.setMuted;pm.prototype.resize=pm.prototype.resize;pm.prototype.isMuted=pm.prototype.isMuted;pm.prototype.setVolume=pm.prototype.setVolume;pm.prototype.getVolume=pm.prototype.getVolume;pm.prototype.play=pm.prototype.play;pm.prototype.pause=pm.prototype.pause;pm.prototype.skip=pm.prototype.skip;
465
- pm.prototype.canSkipNow=pm.prototype.canSkipNow;pm.prototype.getTimeUntilSkippable=pm.prototype.getTimeUntilSkippable;pm.prototype.isSkippable=pm.prototype.isSkippable;pm.prototype.isPaused=pm.prototype.isPaused;pm.prototype.getRemainingTime=pm.prototype.getRemainingTime;pm.prototype.getMinSuggestedDuration=pm.prototype.getMinSuggestedDuration;pm.prototype.getDuration=pm.prototype.getDuration;function qm(a,b,c,d){var e=this;this.o=a;this.g=b;this.B=null;this.D=NaN;this.j=d;this.A=null;this.h=new nf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.g);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.3");this.i=null;this.h.Pa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){rm(e,f)});this.h.m(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
466
- function(f){sm(e,f)});this.g.onended=function(){e.l.contentComplete()}}qm.prototype.stop=function(){this.i&&this.i.stop();this.o&&Wj(this.o)};qm.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.i&&this.i.destroy();this.l.destroy()};function sm(a,b){b.getError();tm(a,null);a.j(new M("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
467
- function rm(a,b){a.j(new M("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.D)));a.i=b.getAdsManager(a.g);a.j(new M("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.i)));var c=a.i.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new M("ad-cue-points-changed",(new Map).set("cuepoints",d)))}um(a);try{a.i.init(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
468
- a.h.m(a.g,"loadeddata",function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.g)),a.i.start()}catch(f){tm(a,null)}}
469
- function um(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new M(d,e))}a.h.m(a.i,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){sm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){vm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.STARTED,function(c){vm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.m(a.i,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.m(a.i,google.ima.AdEvent.Type.THIRD_QUARTILE,
470
- function(c){b(c,"ad-third-quartile")});a.h.m(a.i,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.m(a.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){tm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){tm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.m(a.i,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.m(a.i,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
465
+ q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.i=null};J("shaka.ads.ClientSideAd",om);
466
+ om.prototype.release=om.prototype.release;om.prototype.getPositionInSequence=om.prototype.getPositionInSequence;om.prototype.getSequenceLength=om.prototype.getSequenceLength;om.prototype.setMuted=om.prototype.setMuted;om.prototype.resize=om.prototype.resize;om.prototype.isMuted=om.prototype.isMuted;om.prototype.setVolume=om.prototype.setVolume;om.prototype.getVolume=om.prototype.getVolume;om.prototype.play=om.prototype.play;om.prototype.pause=om.prototype.pause;om.prototype.skip=om.prototype.skip;
467
+ om.prototype.canSkipNow=om.prototype.canSkipNow;om.prototype.getTimeUntilSkippable=om.prototype.getTimeUntilSkippable;om.prototype.isSkippable=om.prototype.isSkippable;om.prototype.isPaused=om.prototype.isPaused;om.prototype.getRemainingTime=om.prototype.getRemainingTime;om.prototype.getMinSuggestedDuration=om.prototype.getMinSuggestedDuration;om.prototype.getDuration=om.prototype.getDuration;function pm(a,b,c,d){var e=this;this.o=a;this.g=b;this.B=null;this.D=NaN;this.j=d;this.A=null;this.h=new nf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.g);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.4");this.i=null;this.h.Pa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){qm(e,f)});this.h.m(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
468
+ function(f){rm(e,f)});this.g.onended=function(){e.l.contentComplete()}}pm.prototype.stop=function(){this.i&&this.i.stop();this.o&&Vj(this.o)};pm.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.i&&this.i.destroy();this.l.destroy()};function rm(a,b){b.getError();sm(a,null);a.j(new M("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
469
+ function qm(a,b){a.j(new M("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.D)));a.i=b.getAdsManager(a.g);a.j(new M("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.i)));var c=a.i.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new M("ad-cue-points-changed",(new Map).set("cuepoints",d)))}tm(a);try{a.i.init(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
470
+ a.h.m(a.g,"loadeddata",function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.g)),a.i.start()}catch(f){sm(a,null)}}
471
+ function tm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new M(d,e))}a.h.m(a.i,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){rm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){um(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.STARTED,function(c){um(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.m(a.i,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.m(a.i,google.ima.AdEvent.Type.THIRD_QUARTILE,
472
+ function(c){b(c,"ad-third-quartile")});a.h.m(a.i,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.m(a.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){sm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){sm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.m(a.i,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.m(a.i,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
471
473
  a.h.m(a.i,google.ima.AdEvent.Type.PAUSED,function(c){a.A.j=!0;b(c,"ad-paused")});a.h.m(a.i,google.ima.AdEvent.Type.RESUMED,function(c){a.A.j=!1;b(c,"ad-resumed")});a.h.m(a.i,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.m(a.i,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.m(a.i,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.m(a.i,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.m(a.i,
472
474
  google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.m(a.i,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.m(a.i,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.m(a.i,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.m(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.m(a.i,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.m(a.i,google.ima.AdEvent.Type.AD_METADATA,
473
- function(c){b(c,"ad-metadata")});a.h.m(a.i,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.m(a.i,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.m(a.i,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function vm(a,b){var c=b.getAd();a.A=new pm(c,a.i);c=(new Map).set("ad",a.A).set("sdkAdObject",c).set("originalEvent",b);a.j(new M("ad-started",c));a.o.setAttribute("ad-active","true");a.g.pause()}
474
- function tm(a,b){a.j(new M("ad-stopped",(new Map).set("originalEvent",b)));a.o.removeAttribute("ad-active");a.g.play()};function wm(a,b){this.i=a;this.h=null;this.g=b}q=wm.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
475
+ function(c){b(c,"ad-metadata")});a.h.m(a.i,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.m(a.i,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.m(a.i,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function um(a,b){var c=b.getAd();a.A=new om(c,a.i);c=(new Map).set("ad",a.A).set("sdkAdObject",c).set("originalEvent",b);a.j(new M("ad-started",c));a.o.setAttribute("ad-active","true");a.g.pause()}
476
+ function sm(a,b){a.j(new M("ad-stopped",(new Map).set("originalEvent",b)));a.o.removeAttribute("ad-active");a.g.play()};function vm(a,b){this.i=a;this.h=null;this.g=b}q=vm.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
475
477
  q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};
476
- q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};J("shaka.ads.ServerSideAd",wm);wm.prototype.release=wm.prototype.release;wm.prototype.getPositionInSequence=wm.prototype.getPositionInSequence;wm.prototype.getSequenceLength=wm.prototype.getSequenceLength;wm.prototype.setMuted=wm.prototype.setMuted;wm.prototype.resize=wm.prototype.resize;wm.prototype.isMuted=wm.prototype.isMuted;
477
- wm.prototype.setVolume=wm.prototype.setVolume;wm.prototype.getVolume=wm.prototype.getVolume;wm.prototype.play=wm.prototype.play;wm.prototype.pause=wm.prototype.pause;wm.prototype.skip=wm.prototype.skip;wm.prototype.canSkipNow=wm.prototype.canSkipNow;wm.prototype.getTimeUntilSkippable=wm.prototype.getTimeUntilSkippable;wm.prototype.isSkippable=wm.prototype.isSkippable;wm.prototype.isPaused=wm.prototype.isPaused;wm.prototype.getRemainingTime=wm.prototype.getRemainingTime;
478
- wm.prototype.getMinSuggestedDuration=wm.prototype.getMinSuggestedDuration;wm.prototype.getDuration=wm.prototype.getDuration;function xm(a,b,c,d){var e=this;this.B=a;this.g=b;this.l=null;this.L=NaN;this.j=d;this.K=!1;this.D=this.o=this.A=null;this.H="";this.I=[];this.h=new nf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.i=new google.ima.dai.api.StreamManager(this.g,this.B,a);this.j(new M("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.i)));this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){ym(e,f)});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.H.length?
479
- e.l.resolve(e.H):e.l.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.l=null});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.o=new wm(f,e.g);e.D&&(e.o.h=e.D);e.j(new M("ad-started",(new Map).set("ad",e.o)));e.B.setAttribute("ad-active","true")});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
478
+ q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};J("shaka.ads.ServerSideAd",vm);vm.prototype.release=vm.prototype.release;vm.prototype.getPositionInSequence=vm.prototype.getPositionInSequence;vm.prototype.getSequenceLength=vm.prototype.getSequenceLength;vm.prototype.setMuted=vm.prototype.setMuted;vm.prototype.resize=vm.prototype.resize;vm.prototype.isMuted=vm.prototype.isMuted;
479
+ vm.prototype.setVolume=vm.prototype.setVolume;vm.prototype.getVolume=vm.prototype.getVolume;vm.prototype.play=vm.prototype.play;vm.prototype.pause=vm.prototype.pause;vm.prototype.skip=vm.prototype.skip;vm.prototype.canSkipNow=vm.prototype.canSkipNow;vm.prototype.getTimeUntilSkippable=vm.prototype.getTimeUntilSkippable;vm.prototype.isSkippable=vm.prototype.isSkippable;vm.prototype.isPaused=vm.prototype.isPaused;vm.prototype.getRemainingTime=vm.prototype.getRemainingTime;
480
+ vm.prototype.getMinSuggestedDuration=vm.prototype.getMinSuggestedDuration;vm.prototype.getDuration=vm.prototype.getDuration;function wm(a,b,c,d){var e=this;this.B=a;this.g=b;this.l=null;this.L=NaN;this.j=d;this.K=!1;this.D=this.o=this.A=null;this.H="";this.I=[];this.h=new nf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.i=new google.ima.dai.api.StreamManager(this.g,this.B,a);this.j(new M("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.i)));this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){xm(e,f)});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.H.length?
481
+ e.l.resolve(e.H):e.l.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.l=null});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.o=new vm(f,e.g);e.D&&(e.o.h=e.D);e.j(new M("ad-started",(new Map).set("ad",e.o)));e.B.setAttribute("ad-active","true")});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
480
482
  var f=e.g.currentTime;e.A&&e.A>f&&(e.g.currentTime=e.A,e.A=null)});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.D=f.getStreamData().adProgressData;e.o&&(e.o.h=e.D)});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.j(new M("ad-first-quartile"))});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.j(new M("ad-midpoint"))});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.j(new M("ad-third-quartile"))});
481
483
  this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.j(new M("ad-complete"));e.j(new M("ad-stopped"));e.B.removeAttribute("ad-active");e.o=null});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.j(new M("ad-skipped"));e.j(new M("ad-stopped"))});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.I=
482
- f;e.j(new M("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}xm.prototype.stop=function(){this.H="";this.A=null;this.I=[]};xm.prototype.release=function(){this.stop();this.h&&this.h.release()};xm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.i.onTimedMetadata(b)}};
483
- function ym(a,b){a.j(new M("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.L)));var c=b.getStreamData().url;a.l.resolve(c);a.l=null;a.K||a.h.m(a.g,"seeked",function(){var d=a.g.currentTime;if(0!=d){a.i.streamTimeForContentTime(d);var e=a.i.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.g.currentTime=e.start)}})};function U(){eb.call(this);this.g=this.h=null;this.j=new om;this.i=navigator.language}qa(U,eb);q=U.prototype;q.setLocale=function(a){this.i=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new O(2,10,1E4);this.h&&this.h.release();this.h=new qm(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
484
- q.release=function(){this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null)};q.onAssetUnload=function(){this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new M("ad-stopped"));this.j=new om};q.requestClientSideAds=function(a){if(!this.h)throw new O(1,10,10001);var b=this.h;b.D=Date.now()/1E3;b.l.requestAds(a)};
485
- q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new O(2,10,10002);this.g&&this.g.release();this.g=new xm(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
486
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ta('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="v3.2.3";c=this.g;var d=b;c.l?c=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
487
- (c.K=!0),c.l=new Sc,c.i.requestStream(a),c.H=d||"",c.L=Date.now()/1E3,c=c.l);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Ta('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="v3.2.3";this.g.i.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new O(1,10,10003);return this.g.I};
484
+ f;e.j(new M("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}wm.prototype.stop=function(){this.H="";this.A=null;this.I=[]};wm.prototype.release=function(){this.stop();this.h&&this.h.release()};wm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.i.onTimedMetadata(b)}};
485
+ function xm(a,b){a.j(new M("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.L)));var c=b.getStreamData().url;a.l.resolve(c);a.l=null;a.K||a.h.m(a.g,"seeked",function(){var d=a.g.currentTime;if(0!=d){a.i.streamTimeForContentTime(d);var e=a.i.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.g.currentTime=e.start)}})};function U(){eb.call(this);this.g=this.h=null;this.j=new nm;this.i=navigator.language}qa(U,eb);q=U.prototype;q.setLocale=function(a){this.i=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.h&&this.h.release();this.h=new pm(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
486
+ q.release=function(){this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);eb.prototype.release.call(this)};q.onAssetUnload=function(){this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new M("ad-stopped"));this.j=new nm};q.requestClientSideAds=function(a){if(!this.h)throw new N(1,10,10001);var b=this.h;b.D=Date.now()/1E3;b.l.requestAds(a)};
487
+ q.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 wm(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
488
+ q.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)&&Ta('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="v3.2.4";c=this.g;var d=b;c.l?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
489
+ (c.K=!0),c.l=new Sc,c.i.requestStream(a),c.H=d||"",c.L=Date.now()/1E3,c=c.l);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Ta('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="v3.2.4";this.g.i.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.I};
488
490
  q.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.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.i.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.i.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};J("shaka.ads.AdManager",U);
489
491
  U.prototype.onCueMetadataChange=U.prototype.onCueMetadataChange;U.prototype.onHlsTimedMetadata=U.prototype.onHlsTimedMetadata;U.prototype.onDashTimedMetadata=U.prototype.onDashTimedMetadata;U.prototype.getStats=U.prototype.getStats;U.prototype.getServerSideCuePoints=U.prototype.getServerSideCuePoints;U.prototype.replaceServerSideAdTagParameters=U.prototype.replaceServerSideAdTagParameters;U.prototype.requestServerSideStream=U.prototype.requestServerSideStream;U.prototype.initServerSide=U.prototype.initServerSide;
490
492
  U.prototype.requestClientSideAds=U.prototype.requestClientSideAds;U.prototype.onAssetUnload=U.prototype.onAssetUnload;U.prototype.release=U.prototype.release;U.prototype.initClientSide=U.prototype.initClientSide;U.prototype.setLocale=U.prototype.setLocale;U.ADS_LOADED="ads-loaded";U.AD_STARTED="ad-started";U.AD_FIRST_QUARTILE="ad-first-quartile";U.AD_MIDPOINT="ad-midpoint";U.AD_THIRD_QUARTILE="ad-third-quartile";U.AD_COMPLETE="ad-complete";U.AD_STOPPED="ad-stopped";U.AD_SKIPPED="ad-skipped";
491
493
  U.AD_VOLUME_CHANGED="ad-volume-changed";U.AD_MUTED="ad-muted";U.AD_PAUSED="ad-paused";U.AD_RESUMED="ad-resumed";U.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";U.CUEPOINTS_CHANGED="ad-cue-points-changed";U.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";U.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";U.AD_CLICKED="ad-clicked";U.AD_PROGRESS="ad-progress";U.AD_BUFFERING="ad-buffering";U.AD_IMPRESSION="ad-impression";U.AD_DURATION_CHANGED="ad-duration-changed";U.AD_CLOSED="ad-closed";
492
- U.AD_LOADED="ad-loaded";U.ALL_ADS_COMPLETED="all-ads-completed";U.AD_LINEAR_CHANGED="ad-linear-changed";U.AD_METADATA="ad-metadata";U.AD_RECOVERABLE_ERROR="ad-recoverable-error";U.AD_BREAK_READY="ad-break-ready";U.AD_INTERACTION="ad-interaction";wk=function(){return new U};function zm(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof M){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=r(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=r(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
494
+ U.AD_LOADED="ad-loaded";U.ALL_ADS_COMPLETED="all-ads-completed";U.AD_LINEAR_CHANGED="ad-linear-changed";U.AD_METADATA="ad-metadata";U.AD_RECOVERABLE_ERROR="ad-recoverable-error";U.AD_BREAK_READY="ad-break-ready";U.AD_INTERACTION="ad-interaction";vk=function(){return new U};function ym(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof M){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=r(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=r(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
493
495
  TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(Wh(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}})}
494
- function Am(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=Bm(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})}
495
- function Bm(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
496
- var Cm="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Dm="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Em=["loop","playbackRate"],Fm=["pause","play"],Gm={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
497
- getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Hm={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Im=[["getConfiguration","configure"]],Jm=[["isTextTrackVisible","setTextTrackVisibility"]],Km="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay goToLive".split(" "),
498
- Lm=["attach","detach","load","unload"];function Mm(a,b,c,d,e,f){var g=this;this.L=a;this.j=new P(b);this.ba=c;this.D=!1;this.B=d;this.K=e;this.R=f;this.h=this.o=!1;this.X="";this.A=null;this.H=function(){return Nm(g)};this.I=function(h,k){var l=Am(k);switch(l.type){case "event":var m=l.targetName;l=Qa(l.event);g.B(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.D&&(g.ba(),g.D=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new O(l.severity,l.category,
499
- l.code);for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.O=0;this.i={};this.l=null;Om.add(this)}q=Mm.prototype;q.destroy=function(){Om["delete"](this);Pm(this);Qm&&Rm(this);this.j&&(this.j.stop(),this.j=null);this.K=this.B=null;this.h=this.o=!1;this.I=this.H=this.l=this.i=this.g=this.A=null;return Promise.resolve()};q.sa=function(){return this.h};q.sd=function(){return this.X};
500
- q.init=function(){if(this.L.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.o=!0;this.j.Da();var a=new chrome.cast.SessionRequest(this.L);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(Om),d=c.next();!d.done;d=c.next())Sm(d.value,b)},function(b){for(var c=r(Om),d=c.next();!d.done;d=c.next())d=d.value,Tm="available"==b,d.j.Da()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Tm&&this.j.T(Um);(a=Qm)&&a.status!=chrome.cast.SessionStatus.STOPPED?Sm(this,
501
- a):Qm=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Vm),window.__onGCastApiAvailable!=Vm&&Ta("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.se=function(a){this.A=a;this.h&&Wm(this,{type:"appData",appData:this.A})};
502
- q.cast=function(a){var b=this;return H(function(c){if(!b.o)throw new O(1,8,8E3);if(!Tm)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new Sc;chrome.cast.requestSession(function(d){return Xm(b,a,d)},function(d){return Ym(b,d)});return u(c,b.l,0)})};function Zm(a){if(a.h){var b=a.R();chrome.cast.requestSession(function(c){return Xm(a,b,c)},function(c){return Ym(a,c)})}}q.$b=function(){if(this.h){Pm(this);if(Qm){Rm(this);try{Qm.stop(function(){},function(){})}catch(a){}Qm=null}Nm(this)}};
503
- q.get=function(a,b){var c=this;if("video"==a){if(Fm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.mf.apply(c,[a,b].concat(ia(e)))}}else if("player"==a){if(Hm[b]&&!this.get("player","isLive")())return function(){};if(Km.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.mf.apply(c,[a,b].concat(ia(e)))};if(Lm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Pg.apply(c,
504
- [a,b].concat(ia(e)))};if(Gm[b])return function(){return c.g[a][b]}}return this.g[a][b]};q.set=function(a,b,c){this.g[a][b]=c;Wm(this,{type:"set",targetName:a,property:b,value:c})};function Xm(a,b,c){Qm=c;c.addUpdateListener(a.H);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.I);Nm(a);Wm(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}
505
- function Ym(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 O(2,8,c,b))}q.mf=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];Wm(this,{type:"call",targetName:a,methodName:b,args:d})};q.Pg=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];e=new Sc;var f=this.O.toString();this.O++;this.i[f]=e;try{Wm(this,{type:"asyncCall",targetName:a,methodName:b,args:d,id:f})}catch(g){e.reject(g)}return e};
506
- function Sm(a,b){var c=a.R();a.l=new Sc;a.D=!0;Xm(a,c,b)}function Rm(a){var b=Qm;b.removeUpdateListener(a.H);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.I)}function Nm(a){var b=Qm?"connected"==Qm.status:!1;if(a.h&&!b){a.K();for(var c in a.g)a.g[c]={};Pm(a)}a.h=b;a.X=b?Qm.receiver.friendlyName:"";a.j.Da()}function Pm(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}
507
- function Wm(a,b){var c=zm(b),d=Qm;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Wa)}catch(e){throw c=new O(2,8,8005,e),d=new M("error",(new Map).set("detail",c)),a.B("player",d),a.$b(),c;}}var Um=.02,Tm=!1,Qm=null,Om=new Set;function Vm(a){if(a){a=r(Om);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function $m(a,b,c){eb.call(this);var d=this;this.j=a;this.i=b;this.h=this.A=this.l=this.B=this.o=null;this.H=c;this.D=new Map;this.g=new Mm(c,function(){return an(d)},function(){return bn(d)},function(e,f){return cn(d,e,f)},function(){return dn(d)},function(){return en(d)});fn(this)}qa($m,eb);q=$m.prototype;
508
- q.destroy=function(a){a&&this.g.$b();this.h&&(this.h.release(),this.h=null);a=[];this.i&&(a.push(this.i.destroy()),this.i=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.B=this.o=this.j=null;return Promise.all(a)};q.yb=function(){return this.o};q.cc=function(){return this.B};q.Je=function(){return this.g.o&&Tm};q.sa=function(){return this.g.sa()};q.sd=function(){return this.g.sd()};
509
- q.cast=function(){var a=this,b;return H(function(c){return 1==c.g?(b=en(a),u(c,a.g.cast(b),2)):a.i?u(c,a.i.Ge(),0):c["return"]()})};q.se=function(a){this.g.se(a)};q.xf=function(){Zm(this.g)};q.$b=function(){this.g.$b()};
510
- q.Ne=function(a){var b=this;return H(function(c){if(1==c.g){if(a==b.H)return c["return"]();b.H=a;b.g.$b();return u(c,b.g.destroy(),2)}b.g=null;b.g=new Mm(a,function(){return an(b)},function(){return bn(b)},function(d,e){return cn(b,d,e)},function(){return dn(b)},function(){return en(b)});b.g.init();z(c)})};
511
- function fn(a){a.g.init();a.h=new nf;for(var b=r(Cm),c=b.next();!c.done;c=b.next())a.h.m(a.j,c.value,function(f){a.g.sa()||(f=Qa(f),a.l.dispatchEvent(f))});for(var d in mm)a.h.m(a.i,mm[d],function(f){a.g.sa()||a.A.dispatchEvent(f)});a.o={};b={};for(var e in a.j)b.nc=e,Object.defineProperty(a.o,b.nc,{configurable:!1,enumerable:!0,get:function(f){return function(){return gn(a,f.nc)}}(b),set:function(f){return function(g){var h=f.nc;a.g.sa()?a.g.set("video",h,g):a.j[h]=g}}(b)}),b={nc:b.nc};a.B={};hn(a,
512
- function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return jn(a,f)}})});kn(a);a.l=new eb;a.l.Xc=a.o;a.A=new eb;a.A.Xc=a.B}function kn(a){var b=new Map;hn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.D.set(c,e):a.D.set(e,c)}else b.set(d,c)})}
513
- function hn(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.i,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=r(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)}}
514
- function en(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.i.Rd(),startTime:null};a.j.pause();for(var c=r(Em),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.j[d];a.j.ended||(b.startTime=a.j.currentTime);c=r(Im);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.i[e[0]]();b.player[d]=e}c=r(Jm);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.i[e[0]](),b.playerAfterLoad[d]=e;return b}function an(a){var b=new M("caststatuschanged");a.dispatchEvent(b)}
515
- function bn(a){var b=new M(a.o.paused?"pause":"play");a.l.dispatchEvent(b)}
516
- function dn(a){for(var b=r(Im),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.i[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.j.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.j.autoplay=!1,b=a.i.load(e,d));var g={};c=r(Em);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.j){for(var h=r(Em),k=h.next();!k.done;k=h.next())k=k.value,a.j[k]=g[k];h=r(Jm);for(k=
517
- h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.i[k](l)}a.j.autoplay=f;e&&a.j.play()}},function(h){h=(new Map).set("detail",h);h=new M(im,h);a.i.dispatchEvent(h)})}
518
- function gn(a,b){if("addEventListener"==b)return function(d,e,f){return a.l.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.l.removeEventListener(d,e,f)};if(a.g.sa()&&0==Object.keys(a.g.g.video).length){var c=a.j[b];if("function"!=typeof c)return c}return a.g.sa()?a.g.get("video",b):(c=a.j[b],"function"==typeof c&&(c=c.bind(a.j)),c)}
519
- function jn(a,b){a.D.has(b)&&(b=a.D.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.o};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.i.Cc()};if("getDrmEngine"==b)return function(){return a.i.o};if("getAdManager"==b)return function(){return a.i.ed()};
520
- if("setVideoContainer"==b)return function(c){return a.i.Be(c)};if(a.g.sa()){if("getManifest"==b||"drmInfo"==b)return function(){Ta(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ta(b+"() does not work while casting!");return Promise.resolve()}}return a.g.sa()&&0==Object.keys(a.g.g.video).length&&Gm[b]||!a.g.sa()?a.i[b].bind(a.i):a.g.get("player",b)}function cn(a,b,c){a.g.sa()&&("video"==b?a.l.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}
521
- J("shaka.cast.CastProxy",$m);$m.prototype.changeReceiverId=$m.prototype.Ne;$m.prototype.forceDisconnect=$m.prototype.$b;$m.prototype.suggestDisconnect=$m.prototype.xf;$m.prototype.setAppData=$m.prototype.se;$m.prototype.cast=$m.prototype.cast;$m.prototype.receiverName=$m.prototype.sd;$m.prototype.isCasting=$m.prototype.sa;$m.prototype.canCast=$m.prototype.Je;$m.prototype.getPlayer=$m.prototype.cc;$m.prototype.getVideo=$m.prototype.yb;$m.prototype.destroy=$m.prototype.destroy;function ln(a,b,c,d){eb.call(this);var e=this;this.g=a;this.i=b;this.h=new nf;this.O={video:a,player:b};this.I=c||function(){};this.R=d||function(f){return f};this.j=null;this.K=!1;this.A=!0;this.o=0;this.H=!1;this.D=!0;this.B=this.l=null;this.L=new P(function(){mn(e)});nn(this)}qa(ln,eb);q=ln.prototype;q.isConnected=function(){return this.K};q.Ag=function(){return this.A};q.Xg=function(a){this.j=a};q.Mf=function(){this.j=null};
496
+ function zm(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=Am(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})}
497
+ function Am(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
498
+ var Bm="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Cm="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Dm=["loop","playbackRate"],Em=["pause","play"],Fm={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
499
+ getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Gm={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Hm=[["getConfiguration","configure"]],Im=[["isTextTrackVisible","setTextTrackVisibility"]],Jm="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay goToLive".split(" "),
500
+ Km=["attach","detach","load","unload"];function Lm(a,b,c,d,e,f){var g=this;this.L=a;this.j=new P(b);this.ba=c;this.D=!1;this.B=d;this.K=e;this.Z=f;this.h=this.o=!1;this.S="";this.A=null;this.H=function(){return Mm(g)};this.I=function(h,k){var l=zm(k);switch(l.type){case "event":var m=l.targetName;l=Qa(l.event);g.B(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.D&&(g.ba(),g.D=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new N(l.severity,l.category,
501
+ l.code);for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.O=0;this.i={};this.l=null;Nm.add(this)}q=Lm.prototype;q.destroy=function(){Nm["delete"](this);Om(this);Pm&&Qm(this);this.j&&(this.j.stop(),this.j=null);this.K=this.B=null;this.h=this.o=!1;this.I=this.H=this.l=this.i=this.g=this.A=null;return Promise.resolve()};q.ua=function(){return this.h};q.sd=function(){return this.S};
502
+ q.init=function(){if(this.L.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.o=!0;this.j.Ea();var a=new chrome.cast.SessionRequest(this.L);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(Nm),d=c.next();!d.done;d=c.next())Rm(d.value,b)},function(b){for(var c=r(Nm),d=c.next();!d.done;d=c.next())d=d.value,Sm="available"==b,d.j.Ea()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Sm&&this.j.T(Tm);(a=Pm)&&a.status!=chrome.cast.SessionStatus.STOPPED?Rm(this,
503
+ a):Pm=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Um),window.__onGCastApiAvailable!=Um&&Ta("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.se=function(a){this.A=a;this.h&&Vm(this,{type:"appData",appData:this.A})};
504
+ q.cast=function(a){var b=this;return H(function(c){if(!b.o)throw new N(1,8,8E3);if(!Sm)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new Sc;chrome.cast.requestSession(function(d){return Wm(b,a,d)},function(d){return Xm(b,d)});return u(c,b.l,0)})};function Ym(a){if(a.h){var b=a.Z();chrome.cast.requestSession(function(c){return Wm(a,b,c)},function(c){return Xm(a,c)})}}q.ac=function(){if(this.h){Om(this);if(Pm){Qm(this);try{Pm.stop(function(){},function(){})}catch(a){}Pm=null}Mm(this)}};
505
+ q.get=function(a,b){var c=this;if("video"==a){if(Em.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.mf.apply(c,[a,b].concat(ha(e)))}}else if("player"==a){if(Gm[b]&&!this.get("player","isLive")())return function(){};if(Jm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.mf.apply(c,[a,b].concat(ha(e)))};if(Km.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Pg.apply(c,
506
+ [a,b].concat(ha(e)))};if(Fm[b])return function(){return c.g[a][b]}}return this.g[a][b]};q.set=function(a,b,c){this.g[a][b]=c;Vm(this,{type:"set",targetName:a,property:b,value:c})};function Wm(a,b,c){Pm=c;c.addUpdateListener(a.H);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.I);Mm(a);Vm(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}
507
+ function Xm(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))}q.mf=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];Vm(this,{type:"call",targetName:a,methodName:b,args:d})};q.Pg=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];e=new Sc;var f=this.O.toString();this.O++;this.i[f]=e;try{Vm(this,{type:"asyncCall",targetName:a,methodName:b,args:d,id:f})}catch(g){e.reject(g)}return e};
508
+ function Rm(a,b){var c=a.Z();a.l=new Sc;a.D=!0;Wm(a,c,b)}function Qm(a){var b=Pm;b.removeUpdateListener(a.H);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.I)}function Mm(a){var b=Pm?"connected"==Pm.status:!1;if(a.h&&!b){a.K();for(var c in a.g)a.g[c]={};Om(a)}a.h=b;a.S=b?Pm.receiver.friendlyName:"";a.j.Ea()}function Om(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}
509
+ function Vm(a,b){var c=ym(b),d=Pm;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Wa)}catch(e){throw c=new N(2,8,8005,e),d=new M("error",(new Map).set("detail",c)),a.B("player",d),a.ac(),c;}}var Tm=.02,Sm=!1,Pm=null,Nm=new Set;function Um(a){if(a){a=r(Nm);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Zm(a,b,c){eb.call(this);var d=this;this.j=a;this.i=b;this.h=this.A=this.l=this.B=this.o=null;this.H=c;this.D=new Map;this.g=new Lm(c,function(){return $m(d)},function(){return an(d)},function(e,f){return bn(d,e,f)},function(){return cn(d)},function(){return dn(d)});en(this)}qa(Zm,eb);q=Zm.prototype;
510
+ q.destroy=function(a){a&&this.g.ac();this.h&&(this.h.release(),this.h=null);a=[];this.i&&(a.push(this.i.destroy()),this.i=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.B=this.o=this.j=null;eb.prototype.release.call(this);return Promise.all(a)};q.zb=function(){return this.o};q.dc=function(){return this.B};q.Je=function(){return this.g.o&&Sm};q.ua=function(){return this.g.ua()};q.sd=function(){return this.g.sd()};
511
+ q.cast=function(){var a=this,b;return H(function(c){return 1==c.g?(b=dn(a),u(c,a.g.cast(b),2)):a.i?u(c,a.i.Ge(),0):c["return"]()})};q.se=function(a){this.g.se(a)};q.xf=function(){Ym(this.g)};q.ac=function(){this.g.ac()};
512
+ q.Ne=function(a){var b=this;return H(function(c){if(1==c.g){if(a==b.H)return c["return"]();b.H=a;b.g.ac();return u(c,b.g.destroy(),2)}b.g=null;b.g=new Lm(a,function(){return $m(b)},function(){return an(b)},function(d,e){return bn(b,d,e)},function(){return cn(b)},function(){return dn(b)});b.g.init();z(c)})};
513
+ function en(a){a.g.init();a.h=new nf;for(var b=r(Bm),c=b.next();!c.done;c=b.next())a.h.m(a.j,c.value,function(f){a.g.ua()||(f=Qa(f),a.l.dispatchEvent(f))});for(var d in lm)a.h.m(a.i,lm[d],function(f){a.g.ua()||a.A.dispatchEvent(f)});a.o={};b={};for(var e in a.j)b.pc=e,Object.defineProperty(a.o,b.pc,{configurable:!1,enumerable:!0,get:function(f){return function(){return fn(a,f.pc)}}(b),set:function(f){return function(g){var h=f.pc;a.g.ua()?a.g.set("video",h,g):a.j[h]=g}}(b)}),b={pc:b.pc};a.B={};gn(a,
514
+ function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return hn(a,f)}})});jn(a);a.l=new eb;a.l.Yc=a.o;a.A=new eb;a.A.Yc=a.B}function jn(a){var b=new Map;gn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.D.set(c,e):a.D.set(e,c)}else b.set(d,c)})}
515
+ function gn(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.i,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=r(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)}}
516
+ function dn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.i.Rd(),startTime:null};a.j.pause();for(var c=r(Dm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.j[d];a.j.ended||(b.startTime=a.j.currentTime);c=r(Hm);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.i[e[0]]();b.player[d]=e}c=r(Im);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.i[e[0]](),b.playerAfterLoad[d]=e;return b}function $m(a){var b=new M("caststatuschanged");a.dispatchEvent(b)}
517
+ function an(a){var b=new M(a.o.paused?"pause":"play");a.l.dispatchEvent(b)}
518
+ function cn(a){for(var b=r(Hm),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.i[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.j.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.j.autoplay=!1,b=a.i.load(e,d));var g={};c=r(Dm);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.j){for(var h=r(Dm),k=h.next();!k.done;k=h.next())k=k.value,a.j[k]=g[k];h=r(Im);for(k=
519
+ h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.i[k](l)}a.j.autoplay=f;e&&a.j.play()}},function(h){h=(new Map).set("detail",h);h=new M(hm,h);a.i.dispatchEvent(h)})}
520
+ function fn(a,b){if("addEventListener"==b)return function(d,e,f){return a.l.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.l.removeEventListener(d,e,f)};if(a.g.ua()&&0==Object.keys(a.g.g.video).length){var c=a.j[b];if("function"!=typeof c)return c}return a.g.ua()?a.g.get("video",b):(c=a.j[b],"function"==typeof c&&(c=c.bind(a.j)),c)}
521
+ function hn(a,b){a.D.has(b)&&(b=a.D.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.o};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.i.Dc()};if("getDrmEngine"==b)return function(){return a.i.o};if("getAdManager"==b)return function(){return a.i.ed()};
522
+ if("setVideoContainer"==b)return function(c){return a.i.Be(c)};if(a.g.ua()){if("getManifest"==b||"drmInfo"==b)return function(){Ta(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ta(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ua()&&0==Object.keys(a.g.g.video).length&&Fm[b]||!a.g.ua()?a.i[b].bind(a.i):a.g.get("player",b)}function bn(a,b,c){a.g.ua()&&("video"==b?a.l.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}
523
+ J("shaka.cast.CastProxy",Zm);Zm.prototype.changeReceiverId=Zm.prototype.Ne;Zm.prototype.forceDisconnect=Zm.prototype.ac;Zm.prototype.suggestDisconnect=Zm.prototype.xf;Zm.prototype.setAppData=Zm.prototype.se;Zm.prototype.cast=Zm.prototype.cast;Zm.prototype.receiverName=Zm.prototype.sd;Zm.prototype.isCasting=Zm.prototype.ua;Zm.prototype.canCast=Zm.prototype.Je;Zm.prototype.getPlayer=Zm.prototype.dc;Zm.prototype.getVideo=Zm.prototype.zb;Zm.prototype.destroy=Zm.prototype.destroy;function kn(a,b,c,d){eb.call(this);var e=this;this.g=a;this.i=b;this.h=new nf;this.O={video:a,player:b};this.I=c||function(){};this.S=d||function(f){return f};this.j=null;this.K=!1;this.A=!0;this.o=0;this.H=!1;this.D=!0;this.B=this.l=null;this.L=new P(function(){ln(e)});mn(this)}qa(kn,eb);q=kn.prototype;q.isConnected=function(){return this.K};q.Ag=function(){return this.A};q.Xg=function(a){this.j=a};q.Mf=function(){this.j=null};
522
524
  q.Yg=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.title=a};q.Wg=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.images=[{url:a}]};q.Vg=function(a){this.j||(this.j={});this.j.artist=a;this.j.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
523
- q.destroy=function(){var a=this,b,c;return H(function(d){if(1==d.g)return a.h&&(a.h.release(),a.h=null),b=[],a.i&&(b.push(a.i.destroy()),a.i=null),a.L&&(a.L.stop(),a.L=null),a.g=null,a.O=null,a.I=null,a.K=!1,a.A=!0,a.l=null,a.B=null,u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
524
- function nn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return on(a)};b.onSenderDisconnected=function(){return on(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&pn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);pn(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return qn(a,
525
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return rn(a,e)};b.start();b=r(Cm);for(var c=b.next();!c.done;c=b.next())a.h.m(a.g,c.value,function(e){return sn(a,"video",e)});for(var d in mm)a.h.m(a.i,mm[d],function(e){return sn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.i.we(3840,2160):a.i.we(1920,1080);a.h.m(a.g,"loadeddata",function(){a.H=!0});a.h.m(a.i,"loading",function(){a.A=
526
- !1;tn(a)});a.h.m(a.g,"playing",function(){a.A=!1;tn(a)});a.h.m(a.g,"pause",function(){tn(a)});a.h.m(a.i,"unloading",function(){a.A=!0;tn(a)});a.h.m(a.g,"ended",function(){(new P(function(){a.g&&a.g.ended&&(a.A=!0,tn(a))})).T(un)})}function on(a){a.o=0;a.D=!0;a.K=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;tn(a)}
527
- function tn(a){var b;H(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.i)return c["return"]();b=new M("caststatuschanged");a.dispatchEvent(b);vn(a)||wn(a);z(c)})}
528
- function xn(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;H(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.i[d](e);a.I(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,A(v,5),u(v,a.i.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=E(v),h=im,k=(new Map).set("detail",g),l=new M(h,k),a.i&&a.i.dispatchEvent(l),v["return"]();case 3:if(!a.i)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)t=b.playerAfterLoad[p],
529
- a.i[p](t);a.g.autoplay=f;b.manifest&&(a.g.play(),wn(a));z(v)}})}function sn(a,b,c){a.i&&(mn(a),pn(a,{type:"event",targetName:b,event:c},a.l))}
530
- function mn(a){a.L.T(yn);for(var b={video:{},player:{}},c=r(Dm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.i.Z())for(var e in Hm)0==a.o%Hm[e]&&(b.player[e]=a.i[e]());for(var f in Gm)0==a.o%Gm[f]&&(b.player[f]=a.i[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.H&&(a.o+=1);pn(a,{type:"update",update:b},a.l);vn(a)}function vn(a){return a.D&&(a.g.duration||a.i.Z())?(zn(a),a.D=!1,!0):!1}
531
- function zn(a,b){var c={contentId:a.i.Rd(),streamType:a.i.Z()?"LIVE":"BUFFERED",contentType:""};a.i.Z()||(c.duration=a.g.duration);a.j&&(c.metadata=a.j);wn(a,void 0===b?0:b,c)}
532
- function rn(a,b){var c=Am(b.data);switch(c.type){case "init":a.o=0;a.H=!1;a.D=!0;xn(a,c.initState,c.appData);mn(a);break;case "appData":a.I(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.O[d][e]=c;break;case "call":d=a.O[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
533
- c.methodName;"player"==d&&"load"==e&&(a.o=0,a.H=!1);var g=c.id,h=b.senderId;f=a.O[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.D=!0}));c.then(function(){return An(a,h,g,null)},function(k){return An(a,h,g,k)})}}
534
- function qn(a,b){var c=Am(b.data);switch(c.type){case "PLAY":a.g.play();wn(a);break;case "PAUSE":a.g.pause();wn(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(),wn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),wn(a));break;case "STOP":a.i.Ge().then(function(){a.i&&wn(a)});break;case "GET_STATUS":zn(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));
535
- null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||wn(a);break;case "LOAD":a.o=0;a.H=!1;a.D=!1;d=c.media;e=c.currentTime;f=a.R(d.contentId);g=c.autoplay||!0;a.I(d.customData);g&&(a.g.autoplay=!0);a.i.load(f,e).then(function(){a.i&&zn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");pn(a,{requestId:Number(c.requestId),type:k},a.B)});break;default:pn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
536
- function An(a,b,c,d){a.i&&pn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function pn(a,b,c,d){a.K&&(a=zm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function wn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?Bn:a.i.Jc()?Cn:a.g.paused?Dn:En,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);pn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
537
- J("shaka.cast.CastReceiver",ln);ln.prototype.destroy=ln.prototype.destroy;ln.prototype.setContentArtist=ln.prototype.Vg;ln.prototype.setContentImage=ln.prototype.Wg;ln.prototype.setContentTitle=ln.prototype.Yg;ln.prototype.clearContentMetadata=ln.prototype.Mf;ln.prototype.setContentMetadata=ln.prototype.Xg;ln.prototype.isIdle=ln.prototype.Ag;ln.prototype.isConnected=ln.prototype.isConnected;var yn=.5,un=5,Bn="IDLE",En="PLAYING",Cn="BUFFERING",Dn="PAUSED";function Fn(a){var b=this;this.g=[];this.h=[];this.data=[];(new tg).box("moov",xg).Y("pssh",function(c){if(!(1<c.version)){var d=Lc(c.reader.V,-12,c.size);b.data.push(d);b.g.push(fd(c.reader.zb(16)));if(0<c.version){d=c.reader.S();d=r(kb(d));for(var e=d.next();!e.done;e=d.next())e=fd(c.reader.zb(16)),b.h.push(e)}}}).parse(a)}
538
- function Gn(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Oc(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function Hn(a){if(!a)return a;var b=new Fn(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={Sc:c.Sc},d=b.next())c.Sc=d.value,a.some(function(e){return function(f){return Jc(f,e.Sc)}}(c))||a.push(c.Sc);return gd.apply(ad,ia(a))};function In(a,b){var c=Jn(a,b);return 1!=c.length?null:c[0]}function Kn(a,b,c){a=Ln(a,b,c);return 1!=a.length?null:a[0]}function Jn(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName==b})}function Mn(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}function Ln(a,b,c){return Array.from(a.childNodes).filter(function(d){return d instanceof Element&&d.localName==c&&d.namespaceURI==b})}
539
- function Nn(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function On(a,b,c){b=r(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 Pn(a){return Array.from(a.childNodes).every(Qn)?a.textContent.trim():null}function Qn(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Rn(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}
540
- function Sn(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}function Tn(a){if(!a)return null;a=/^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}
541
- function Un(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 Vn(a){a=Number(a);return 0===a%1?a:null}function Wn(a){a=Number(a);return 0===a%1&&0<a?a:null}function Xn(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Yn(a){a=Number(a);return isNaN(a)?null:a}function Zn(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(a)?null:a}
542
- function $n(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function ao(a,b){try{var c=Vc(a);return $n(c,b)}catch(d){return null}};function bo(a,b,c){var d=co(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 O(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.qf?(e=h.init||e,!1):!0}),f.length&&(a=eo(e,f,c),0==a.length&&(a=[Nb("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Nb(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
543
- r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Qe:g,si:e,drmInfos:a,Ue:!0}}function fo(a,b,c,d){var e=bo(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 O(2,4,4008);return e.Qe||b.Qe}
544
- function go(a){var b=0,c=Oc(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=Lc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
545
- function ho(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(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 io(a){a=Kn(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=dd(a.textContent);a=go(a).filter(function(b){return b.type===jo})[0];if(!a)return"";a=Wc(a.value,!0);return(a=$n(a,"WRMHEADER"))?ho(a):""}
546
- function eo(a,b,c){var d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.qf];if(f){var g;if(g=Kn(e.node,"urn:microsoft:playready","pro")){g=dd(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:Gn(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=Nb(f,e.init||a||g);if(f=ko.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
547
- function co(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=lo(c.value))&&b.push(c);return b}
548
- function lo(a){var b=a.getAttribute("schemeIdUri"),c=Nn(a,"urn:mpeg:cenc:2013","default_KID"),d=Ln(a,"urn:mpeg:cenc:2013","pssh").map(Pn);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new O(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:dd(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,qf:b,keyId:c,init:0<e.length?e:null}}
549
- var jo=1,ko=(new Map).set("com.widevine.alpha",function(a){return(a=Kn(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",io).set("com.microsoft.playready.recommendation",io).set("com.microsoft.playready.software",io).set("com.microsoft.playready.hardware",io);function mo(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=
525
+ q.destroy=function(){var a=this,b,c;return H(function(d){if(1==d.g)return a.h&&(a.h.release(),a.h=null),b=[],a.i&&(b.push(a.i.destroy()),a.i=null),a.L&&(a.L.stop(),a.L=null),a.g=null,a.O=null,a.I=null,a.K=!1,a.A=!0,a.l=null,a.B=null,eb.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
526
+ function mn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return nn(a)};b.onSenderDisconnected=function(){return nn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&on(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);on(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return pn(a,
527
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return qn(a,e)};b.start();b=r(Bm);for(var c=b.next();!c.done;c=b.next())a.h.m(a.g,c.value,function(e){return rn(a,"video",e)});for(var d in lm)a.h.m(a.i,lm[d],function(e){return rn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.i.we(3840,2160):a.i.we(1920,1080);a.h.m(a.g,"loadeddata",function(){a.H=!0});a.h.m(a.i,"loading",function(){a.A=
528
+ !1;sn(a)});a.h.m(a.g,"playing",function(){a.A=!1;sn(a)});a.h.m(a.g,"pause",function(){sn(a)});a.h.m(a.i,"unloading",function(){a.A=!0;sn(a)});a.h.m(a.g,"ended",function(){(new P(function(){a.g&&a.g.ended&&(a.A=!0,sn(a))})).T(tn)})}function nn(a){a.o=0;a.D=!0;a.K=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;sn(a)}
529
+ function sn(a){var b;H(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.i)return c["return"]();b=new M("caststatuschanged");a.dispatchEvent(b);un(a)||vn(a);z(c)})}
530
+ function wn(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;H(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.i[d](e);a.I(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,A(v,5),u(v,a.i.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=E(v),h=hm,k=(new Map).set("detail",g),l=new M(h,k),a.i&&a.i.dispatchEvent(l),v["return"]();case 3:if(!a.i)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)t=b.playerAfterLoad[p],
531
+ a.i[p](t);a.g.autoplay=f;b.manifest&&(a.g.play(),vn(a));z(v)}})}function rn(a,b,c){a.i&&(ln(a),on(a,{type:"event",targetName:b,event:c},a.l))}
532
+ function ln(a){a.L.T(xn);for(var b={video:{},player:{}},c=r(Cm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.i.Y())for(var e in Gm)0==a.o%Gm[e]&&(b.player[e]=a.i[e]());for(var f in Fm)0==a.o%Fm[f]&&(b.player[f]=a.i[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.H&&(a.o+=1);on(a,{type:"update",update:b},a.l);un(a)}function un(a){return a.D&&(a.g.duration||a.i.Y())?(yn(a),a.D=!1,!0):!1}
533
+ function yn(a,b){var c={contentId:a.i.Rd(),streamType:a.i.Y()?"LIVE":"BUFFERED",contentType:""};a.i.Y()||(c.duration=a.g.duration);a.j&&(c.metadata=a.j);vn(a,void 0===b?0:b,c)}
534
+ function qn(a,b){var c=zm(b.data);switch(c.type){case "init":a.o=0;a.H=!1;a.D=!0;wn(a,c.initState,c.appData);ln(a);break;case "appData":a.I(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.O[d][e]=c;break;case "call":d=a.O[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
535
+ c.methodName;"player"==d&&"load"==e&&(a.o=0,a.H=!1);var g=c.id,h=b.senderId;f=a.O[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.D=!0}));c.then(function(){return zn(a,h,g,null)},function(k){return zn(a,h,g,k)})}}
536
+ function pn(a,b){var c=zm(b.data);switch(c.type){case "PLAY":a.g.play();vn(a);break;case "PAUSE":a.g.pause();vn(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(),vn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),vn(a));break;case "STOP":a.i.Ge().then(function(){a.i&&vn(a)});break;case "GET_STATUS":yn(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));
537
+ null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||vn(a);break;case "LOAD":a.o=0;a.H=!1;a.D=!1;d=c.media;e=c.currentTime;f=a.S(d.contentId);g=c.autoplay||!0;a.I(d.customData);g&&(a.g.autoplay=!0);a.i.load(f,e).then(function(){a.i&&yn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");on(a,{requestId:Number(c.requestId),type:k},a.B)});break;default:on(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
538
+ function zn(a,b,c,d){a.i&&on(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function on(a,b,c,d){a.K&&(a=ym(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function vn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?An:a.i.Kc()?Bn:a.g.paused?Cn:Dn,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);on(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
539
+ J("shaka.cast.CastReceiver",kn);kn.prototype.destroy=kn.prototype.destroy;kn.prototype.setContentArtist=kn.prototype.Vg;kn.prototype.setContentImage=kn.prototype.Wg;kn.prototype.setContentTitle=kn.prototype.Yg;kn.prototype.clearContentMetadata=kn.prototype.Mf;kn.prototype.setContentMetadata=kn.prototype.Xg;kn.prototype.isIdle=kn.prototype.Ag;kn.prototype.isConnected=kn.prototype.isConnected;var xn=.5,tn=5,An="IDLE",Dn="PLAYING",Bn="BUFFERING",Cn="PAUSED";function En(a){var b=this;this.g=[];this.h=[];this.data=[];(new tg).box("moov",xg).X("pssh",function(c){if(!(1<c.version)){var d=Lc(c.reader.V,-12,c.size);b.data.push(d);b.g.push(fd(c.reader.Ab(16)));if(0<c.version){d=c.reader.R();d=r(kb(d));for(var e=d.next();!e.done;e=d.next())e=fd(c.reader.Ab(16)),b.h.push(e)}}}).parse(a)}
540
+ function Fn(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Oc(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function Gn(a){if(!a)return a;var b=new En(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={Tc:c.Tc},d=b.next())c.Tc=d.value,a.some(function(e){return function(f){return Jc(f,e.Tc)}}(c))||a.push(c.Tc);return gd.apply(ad,ha(a))};function Hn(a,b){var c=In(a,b);return 1!=c.length?null:c[0]}function Jn(a,b,c){a=Kn(a,b,c);return 1!=a.length?null:a[0]}function In(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName==b})}function Ln(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}function Kn(a,b,c){return Array.from(a.childNodes).filter(function(d){return d instanceof Element&&d.localName==c&&d.namespaceURI==b})}
541
+ function Mn(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Nn(a,b,c){b=r(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 On(a){return Array.from(a.childNodes).every(Pn)?a.textContent.trim():null}function Pn(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Qn(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}
542
+ function Rn(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}function Sn(a){if(!a)return null;a=/^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}
543
+ function Tn(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 Un(a){a=Number(a);return 0===a%1?a:null}function Vn(a){a=Number(a);return 0===a%1&&0<a?a:null}function Wn(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Xn(a){a=Number(a);return isNaN(a)?null:a}function Yn(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(a)?null:a}
544
+ function Zn(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function $n(a,b){try{var c=Vc(a);return Zn(c,b)}catch(d){return null}};function ao(a,b,c){var d=bo(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.qf?(e=h.init||e,!1):!0}),f.length&&(a=co(e,f,c),0==a.length&&(a=[Nb("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Nb(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
545
+ r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Qe:g,si:e,drmInfos:a,Ue:!0}}function eo(a,b,c,d){var e=ao(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}
546
+ function fo(a){var b=0,c=Oc(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=Lc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
547
+ function go(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(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 ho(a){a=Jn(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=dd(a.textContent);a=fo(a).filter(function(b){return b.type===io})[0];if(!a)return"";a=Wc(a.value,!0);return(a=Zn(a,"WRMHEADER"))?go(a):""}
548
+ function co(a,b,c){var d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.qf];if(f){var g;if(g=Jn(e.node,"urn:microsoft:playready","pro")){g=dd(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:Fn(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=Nb(f,e.init||a||g);if(f=jo.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
549
+ function bo(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=ko(c.value))&&b.push(c);return b}
550
+ function ko(a){var b=a.getAttribute("schemeIdUri"),c=Mn(a,"urn:mpeg:cenc:2013","default_KID"),d=Kn(a,"urn:mpeg:cenc:2013","pssh").map(On);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:dd(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,qf:b,keyId:c,init:0<e.length?e:null}}
551
+ var io=1,jo=(new Map).set("com.widevine.alpha",function(a){return(a=Jn(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",ho).set("com.microsoft.playready.recommendation",ho).set("com.microsoft.playready.software",ho).set("com.microsoft.playready.hardware",ho);function lo(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=
550
552
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
551
- function no(a,b){var c=oo(a,b,"timescale"),d=1;c&&(d=Wn(c)||1);var e=oo(a,b,"duration");c=Wn(e||"");"image"==a.N.contentType&&(c=Yn(e||""));c&&(c/=d);var f=oo(a,b,"startNumber");e=Number(oo(a,b,"presentationTimeOffset"))||0;var g=Xn(f||"");if(null==f||null==g)g=1;var h=po(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.aa.duration||Infinity,l=Jn(h,"S");h=[];var m=-e;l=r(nb(l));for(var n=l.next();!n.done;n=l.next()){n=n.value;var p=n.item,t=n.next,v=Rn(p,"t",Xn);n=Rn(p,"d",Xn);var y=Rn(p,"r",Vn);null!=
552
- v&&(v-=e);if(!n)break;p=null!=v?v:m;v=y||0;if(0>v)if(t){t=Rn(t,"t",Xn);if(null==t)break;else if(p>=t)break;v=Math.ceil((t-p)/n)-1}else{if(Infinity==k)break;else if(p/f>=k)break;v=Math.ceil((k*f-p)/n)-1}0<h.length&&p!=m&&(h[h.length-1].end=p/f);t=r(kb(v+1));for(v=t.next();!v.done;v=t.next())m=p+n,h.push({start:p/f,end:m/f,eh:p}),p=m}f=h}return{timescale:d,Ba:c,mc:g,qb:e/d||0,He:e,timeline:f}}
553
- function oo(a,b,c){return[b(a.N),b(a.Ea),b(a.ya)].filter(Jb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}function po(a,b,c){return[b(a.N),b(a.Ea),b(a.ya)].filter(Jb).map(function(d){return In(d,c)}).reduce(function(d,e){return d||e})}
554
- function qo(a,b,c,d,e,f){for(var g=Nn(a,"http://www.w3.org/1999/xlink","href"),h=Nn(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(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 Qe(new O(2,4,4028));if("onLoad"!=h)return Qe(new O(2,4,4027));var m=Mb([d],[g]);return e.request(0,df(m,b)).ra(function(n){n=ao(n.data,a.tagName);if(!n)return Qe(new O(2,4,4001,g));
555
- 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=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return ro(a,b,c,m[0],e,f+1)})}
556
- function ro(a,b,c,d,e,f){f=void 0===f?0:f;if(Nn(a,"http://www.w3.org/1999/xlink","href")){var g=qo(a,b,c,d,e,f);c&&(g=g.ra(void 0,function(){return ro(a,b,c,d,e,f)}));return g}g=[];for(var h=r(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"==Nn(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(ro(k,b,c,d,e,f)));return Ue(g).ra(function(){return a})};function so(a,b,c,d,e,f,g){var h,k=(new tg).Y("sidx",function(l){h=to(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
557
- function to(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.S();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.S();var m=g.reader.S()}else l=g.reader.lc(),m=g.reader.lc();g.reader.skip(2);var n=g.reader.kc();a=a+g.size+m;n=r(kb(n));for(m=n.next();!m.done;m=n.next()){var p=g.reader.S();m=(p&2147483648)>>>31;p&=2147483647;var t=g.reader.S();g.reader.skip(4);if(1==m)throw new O(2,3,3006);h.push(new ui(l/k+c,(l+t)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=t;a+=p}g.parser.stop();
558
- return h};function uo(a){this.h=Oc(a);this.g=new qg(this.h,0)}uo.prototype.Ha=function(){return this.g.Ha()};
559
- function vo(a){var b=wo(a);if(7<b.length)throw new O(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=wo(a);a:{d=r(xo);for(var e=d.next();!e.done;e=d.next())if(Jc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ma();else{if(8==b.length&&b[1]&224)throw new O(2,3,3001);d=0;e=r(nb(b));for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=f.item;d=0==f.xa?g&(1<<8-b.length)-1:256*d+g}b=d}b=a.g.ma()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ma();d=Oc(a.h,
560
- a.g.ma(),b);a.g.skip(b);return new yo(c,d)}function wo(a){var b=a.g.ma(),c=a.g.na();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Lc(a.h,b,c)}var xo=[[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 yo(a,b){this.id=a;this.g=b}
561
- function zo(a){if(8<a.g.byteLength)throw new O(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new O(2,3,3001);for(var b=0,c=r(kb(a.g.byteLength)),d=c.next();!d.done;d=c.next())d=a.g.getUint8(d.value),b=256*b+d;return b};function Ao(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new uo(a.g);for(var n=null,p=null;a.Ha();){var t=vo(a);if(187==t.id){var v=Bo(t);v&&(t=c*v.fh,v=b+v.Og,null!=n&&m.push(new ui(n+g,t+g,l,p,v-1,f,g,h,k)),n=t,p=v)}}null!=n&&m.push(new ui(n+g,d+g,l,p,null,f,g,h,k));return m}
562
- function Bo(a){var b=new uo(a.g);a=vo(b);if(179!=a.id)throw new O(2,3,3013);a=zo(a);b=vo(b);if(183!=b.id)throw new O(2,3,3012);b=new uo(b.g);for(var c=0;b.Ha();){var d=vo(b);if(241==d.id){c=zo(d);break}}return{fh:a,Og:c}};function Co(a,b){var c=po(a,b,"Initialization");if(!c)return null;var d=a.N.Ta,e=c.getAttribute("sourceURL");e&&(d=Mb(a.N.Ta,[e]));e=0;var f=null;if(c=Rn(c,"range",Un))e=c.start,f=c.end;return new si(function(){return d},e,f)}
563
- function Do(a,b){var c=Number(oo(a,Eo,"presentationTimeOffset"))||0,d=oo(a,Eo,"timescale"),e=1;d&&(e=Wn(d)||1);var f=c/e||0,g=Co(a,Eo);Fo(a,g);var h=Xe(a);return{ac:function(){var k=po(h,Eo,"RepresentationIndex"),l=h.N.Ta;k&&(k=k.getAttribute("sourceURL"))&&(l=Mb(h.N.Ta,[k]));k=Go(h);return Ho(h,b,g,l,k.start,k.end,f)}}}
564
- function Ho(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,y,x,w,C,D,B,F;return H(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Eb||!a.aa.df,l=a.aa.start,m=a.aa.duration,n=a.N.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.Ga(),c.Ca,c.wa):null],p=null,u(G,Promise.all(v),2);y=G.h;x=y[0];w=y[1]||null;C=null;D=l-g;B=l;F=m?l+m:Infinity;if("mp4"==n)var I=so(x,e,d,c,D,B,F);else{I=new uo(w);if(440786851!=vo(I).id)throw new O(2,3,3008);var N=vo(I);if(408125543!=N.id)throw new O(2,3,3009);I=
565
- N.g.byteOffset;N=new uo(N.g);for(var K=null;N.Ha();){var L=vo(N);if(357149030==L.id){K=L;break}}if(!K)throw new O(2,3,3010);K=new uo(K.g);L=1E6;for(N=null;K.Ha();){var T=vo(K);if(2807729==T.id)L=zo(T);else if(17545==T.id)if(4==T.g.byteLength)N=T.g.getFloat32(0);else if(8==T.g.byteLength)N=T.g.getFloat64(0);else throw new O(2,3,3003);}if(null==N)throw new O(2,3,3011);K=L/1E9;N*=K;L=vo(new uo(x));if(475249515!=L.id)throw new O(2,3,3007);I=Ao(L,I,K,N,d,c,D,B,F)}C=I;h.hc(C);t=new Ti(C);k&&t.wb(B,F,!0);
566
- return G["return"](t)})}function Eo(a){return a.Oc}function Go(a){var b=po(a,Eo,"RepresentationIndex");a=oo(a,Eo,"indexRange");a=Un(a||"");b&&(a=Rn(b,"range",Un,a));return a}function Fo(a,b){Io(a,b);if(!Go(a))throw new O(2,4,4002);}function Io(a,b){var c=a.N.mimeType.split("/")[1];if(a.N.contentType!=Rb&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);};function Jo(a,b){var c=Co(a,Ko),d=So(a);if(!d.Ba&&!d.timeline&&1<d.ec.length)throw new O(2,4,4002);if(!d.Ba&&!a.aa.duration&&!d.timeline&&1==d.ec.length)throw new O(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new O(2,4,4002);var e=null,f=null;a.ya.id&&a.N.id&&(f=a.ya.id+","+a.N.id,e=b[f]);c=To(a.aa.start,a.aa.duration,a.N.Ta,d,c);d=!e;e?e.fc(c,a.presentationTimeline.xb()):(e=new Ti(c),f&&a.Eb&&(b[f]=e));a.presentationTimeline.hc(c);a.Eb&&a.aa.df||e.wb(a.aa.start,a.aa.duration?a.aa.start+a.aa.duration:
567
- Infinity,d);return{ac:function(){return Promise.resolve(e)}}}function Ko(a){return a.Ab}function So(a){var b=Uo(a);a=no(a,Ko);var c=a.mc;0==c&&(c=1);var d=0;a.Ba?d=a.Ba*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Ba:a.Ba,startTime:d,mc:c,qb:a.qb,timeline:a.timeline,ec:b}}
568
- function To(a,b,c,d,e){var f=d.ec.length;d.timeline&&d.timeline.length!=d.ec.length&&(f=Math.min(d.timeline.length,d.ec.length));var g=a-d.qb,h=b?a+b:Infinity,k=[],l=d.startTime,m={};f=r(kb(f));for(var n=f.next();!n.done;m={Gd:m.Gd},n=f.next()){n=n.value;var p=d.ec[n];m.Gd=Mb(c,[p.Fg]);var t=void 0;t=null!=d.Ba?l+d.Ba:d.timeline?d.timeline[n].end:l+b;k.push(new ui(a+l,a+t,function(v){return function(){return v.Gd}}(m),p.start,p.end,e,g,a,h));l=t}return k}
569
- function Uo(a){return[a.N.Ab,a.Ea.Ab,a.ya.Ab].filter(Jb).map(function(b){return Jn(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.$e&&(a.$e=!0);var c=b.getAttribute("media");b=Rn(b,"mediaRange",Un,{start:0,end:null});return{Fg: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=Xe(a);if(h.Ic)return Io(a,g),{ac:function(){var v=mo(h.Ic,k.N.id,null,k.bandwidth||null,null);v=Mb(k.N.Ta,[v]);return Ho(k,b,g,v,0,null,h.qb)}};if(h.Ba)return d||(a.presentationTimeline.ce(h.Ba),a.presentationTimeline.ee(a.aa.start)),{ac:function(){return Zo(k,h,e,g,f)}};var l=null;d=null;a.ya.id&&a.N.id&&(d=a.ya.id+","+a.N.id,l=c[d]);var m=$o(k,h,g),n=a.aa.start,p=a.aa.duration?a.aa.start+a.aa.duration:Infinity,t=Infinity!=p;l?(t&&(new Ti(m)).wb(n,
570
- p,!0),l.fc(m,a.presentationTimeline.xb())):(l=new Ti(m),d&&a.Eb&&(c[d]=l));a.presentationTimeline.hc(m);t&&l.wb(n,p);return{ac:function(){return Promise.resolve(l)}}}function ap(a){return a.Pc}function Xo(a){var b=no(a,ap),c=oo(a,ap,"media");a=oo(a,ap,"index");return{Ba:b.Ba,timescale:b.timescale,mc:b.mc,qb:b.qb,He:b.He,timeline:b.timeline,ae:c,Ic:a}}
571
- function Yo(a){var b=a.Ic?1:0;b+=a.timeline?1:0;b+=a.Ba?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.Ic&&(a.timeline=null),a.Ba=null);if(!a.Ic&&!a.ae)throw new O(2,4,4002);}
572
- function Zo(a,b,c,d,e){function f(K){var L=(K-t)*p,T=L+b.qb,W=L+l;L=W+p;var ja=Math.min(L,h());W=new ui(W,ja,function(){var ha=mo(y,w,K,x,T*v);return Mb(C,[ha])},0,null,d,D,l,h());W.l=L;return W}function g(){var K=[Math.max(k.xb(),l),Math.min(k.Hb(),h())].map(function(L){return L-l});return[Math.ceil(K[0]/p),Math.ceil(K[1]/p)-1].map(function(L){return L+t})}function h(){var K=null!=m&&e[m]||n;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.aa.start,m=a.ya.id,n=a.aa.duration,p=b.Ba,t=b.mc,v=
573
- b.timescale,y=b.ae,x=a.bandwidth||null,w=a.N.id,C=a.N.Ta,D=l-b.qb,B=g();a=a.Eb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var F=a;F<=B;++F){var G=f(F);c.push(G)}var I=new Ti(c);c=k.Hb()<h();F=k.Z();if(c||F){var N=Math.max(a,B+1);I.wd(p,function(){var K=k.xb();I.Fb(K);var L=r(g());L.next();L=L.next().value;for(var T=[];N<=L;){var W=f(N);T.push(W);N++}return K>h()&&!T.length?null:T})}return Promise.resolve(I)}
574
- function $o(a,b,c){var d=a.aa.start,e=a.aa.duration,f=d-b.qb;e=e?d+e:Infinity;for(var g=[],h={},k=r(nb(b.timeline)),l=k.next();!l.done;h={Fd:h.Fd,Jd:h.Jd,Md:h.Md,Cd:h.Cd,Od:h.Od,Dd:h.Dd},l=k.next()){l=l.value;var m=l.item,n=m.start,p=m.eh;m=m.end;h.Md=l.xa+b.mc;h.Od=p+b.He;h.Jd=a.N.id;h.Cd=a.bandwidth||null;h.Fd=b.ae;h.Dd=a.N.Ta;g.push(new ui(d+n,d+m,function(t){return function(){var v=mo(t.Fd,t.Jd,t.Md,t.Cd||null,t.Od);return Mb(t.Dd,[v]).map(function(y){return y.toString()})}}(h),0,null,c,f,d,e))}return g}
575
- function Wo(a){var b=oo(a,ap,"initialization");if(!b)return null;var c=a.N.id,d=a.bandwidth||null,e=a.N.Ta;return new si(function(){var f=mo(b,c,null,d,null);return Mb(e,[f])},0,null)};function bp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.o=new Set}bp.prototype.release=function(){for(var a=r(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=[]};
576
- function cp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,D,B,F,G,I,N,K,L,T,W,ja,ha,Z,Ea,wa,Ia,Na,Lb;return H(function(bb){switch(bb.g){case 1:d=Sb;dp(b);ep(b);fp(b);gp(b);if(!c&&1==b.length){e=b[0];a.g=e.$c;a.h=e.yd;a.j=e.textStreams;a.i=e.imageStreams;bb.C(2);break}f=-1;g=r(nb(b));for(h=g.next();!h.done;h=g.next())l=k=h.value,m=l.xa,n=l.item,a.o.has(n.id)||(a.o.add(n.id),-1==f&&(f=m));if(-1==f)return bb["return"]();p=b.map(function(Fa){return Fa.$c});t=b.map(function(Fa){return Fa.yd});v=b.map(function(Fa){return Fa.textStreams});
577
- y=b.map(function(Fa){return Fa.imageStreams});x=r(v);for(w=x.next();!w.done;w=x.next())C=w.value,C.push(hp(d.qa));D=r(y);for(B=D.next();!B.done;B=D.next())F=B.value,F.push(hp(d.vc));return u(bb,ip(a.g,p,f,jp,kp),3);case 3:return u(bb,ip(a.h,t,f,jp,kp),4);case 4:return u(bb,ip(a.j,v,f,jp,kp),5);case 5:return u(bb,ip(a.i,y,f,jp,kp),2);case 2:G=0;I=[];if(a.h.length&&a.g.length)for(ja=r(a.g),ha=ja.next();!ha.done;ha=ja.next())for(Z=ha.value,Ea=r(a.h),wa=Ea.next();!wa.done;wa=Ea.next())Ia=wa.value,Na=
578
- ig(Z.drmInfos,Ia.drmInfos),Z.drmInfos.length&&Ia.drmInfos.length&&!Na.length||(Lb=G++,I.push({id:Lb,language:Z.language,primary:Z.primary,audio:Z,video:Ia,bandwidth:(Z.bandwidth||0)+(Ia.bandwidth||0),drmInfos:Na,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(N=a.h.concat(a.g),K=r(N),L=K.next();!L.done;L=K.next())T=L.value,W=G++,I.push({id:W,language:T.language,primary:T.primary,audio:T.type==d.Bb?T:null,video:T.type==d.ib?T:null,bandwidth:T.bandwidth||0,drmInfos:T.drmInfos,
553
+ function mo(a,b){var c=no(a,b,"timescale"),d=1;c&&(d=Vn(c)||1);var e=no(a,b,"duration");c=Vn(e||"");"image"==a.N.contentType&&(c=Xn(e||""));c&&(c/=d);var f=no(a,b,"startNumber");e=Number(no(a,b,"presentationTimeOffset"))||0;var g=Wn(f||"");if(null==f||null==g)g=1;var h=oo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.aa.duration||Infinity,l=In(h,"S");h=[];var m=-e;l=r(nb(l));for(var n=l.next();!n.done;n=l.next()){n=n.value;var p=n.item,t=n.next,v=Qn(p,"t",Wn);n=Qn(p,"d",Wn);var y=Qn(p,"r",Un);null!=
554
+ v&&(v-=e);if(!n)break;p=null!=v?v:m;v=y||0;if(0>v)if(t){t=Qn(t,"t",Wn);if(null==t)break;else if(p>=t)break;v=Math.ceil((t-p)/n)-1}else{if(Infinity==k)break;else if(p/f>=k)break;v=Math.ceil((k*f-p)/n)-1}0<h.length&&p!=m&&(h[h.length-1].end=p/f);t=r(kb(v+1));for(v=t.next();!v.done;v=t.next())m=p+n,h.push({start:p/f,end:m/f,eh:p}),p=m}f=h}return{timescale:d,Ca:c,nc:g,sb:e/d||0,He:e,timeline:f}}
555
+ function no(a,b,c){return[b(a.N),b(a.Fa),b(a.ya)].filter(Jb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}function oo(a,b,c){return[b(a.N),b(a.Fa),b(a.ya)].filter(Jb).map(function(d){return Hn(d,c)}).reduce(function(d,e){return d||e})}
556
+ function po(a,b,c,d,e,f){for(var g=Mn(a,"http://www.w3.org/1999/xlink","href"),h=Mn(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(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 Qe(new N(2,4,4028));if("onLoad"!=h)return Qe(new N(2,4,4027));var m=Mb([d],[g]);return e.request(0,df(m,b)).sa(function(n){n=$n(n.data,a.tagName);if(!n)return Qe(new N(2,4,4001,g));
557
+ 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=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return qo(a,b,c,m[0],e,f+1)})}
558
+ function qo(a,b,c,d,e,f){f=void 0===f?0:f;if(Mn(a,"http://www.w3.org/1999/xlink","href")){var g=po(a,b,c,d,e,f);c&&(g=g.sa(void 0,function(){return qo(a,b,c,d,e,f)}));return g}g=[];for(var h=r(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"==Mn(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(qo(k,b,c,d,e,f)));return Ue(g).sa(function(){return a})};function ro(a,b,c,d,e,f,g){var h,k=(new tg).X("sidx",function(l){h=so(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
559
+ function so(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.R();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.R();var m=g.reader.R()}else l=g.reader.mc(),m=g.reader.mc();g.reader.skip(2);var n=g.reader.lc();a=a+g.size+m;n=r(kb(n));for(m=n.next();!m.done;m=n.next()){var p=g.reader.R();m=(p&2147483648)>>>31;p&=2147483647;var t=g.reader.R();g.reader.skip(4);if(1==m)throw new N(2,3,3006);h.push(new ui(l/k+c,(l+t)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=t;a+=p}g.parser.stop();
560
+ return h};function to(a){this.h=Oc(a);this.g=new qg(this.h,0)}to.prototype.Ia=function(){return this.g.Ia()};
561
+ function uo(a){var b=vo(a);if(7<b.length)throw new N(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=vo(a);a:{d=r(wo);for(var e=d.next();!e.done;e=d.next())if(Jc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ma();else{if(8==b.length&&b[1]&224)throw new N(2,3,3001);d=0;e=r(nb(b));for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=f.item;d=0==f.xa?g&(1<<8-b.length)-1:256*d+g}b=d}b=a.g.ma()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ma();d=Oc(a.h,
562
+ a.g.ma(),b);a.g.skip(b);return new xo(c,d)}function vo(a){var b=a.g.ma(),c=a.g.na();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Lc(a.h,b,c)}var wo=[[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 xo(a,b){this.id=a;this.g=b}
563
+ function yo(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=r(kb(a.g.byteLength)),d=c.next();!d.done;d=c.next())d=a.g.getUint8(d.value),b=256*b+d;return b};function zo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new to(a.g);for(var n=null,p=null;a.Ia();){var t=uo(a);if(187==t.id){var v=Ao(t);v&&(t=c*v.fh,v=b+v.Og,null!=n&&m.push(new ui(n+g,t+g,l,p,v-1,f,g,h,k)),n=t,p=v)}}null!=n&&m.push(new ui(n+g,d+g,l,p,null,f,g,h,k));return m}
564
+ function Ao(a){var b=new to(a.g);a=uo(b);if(179!=a.id)throw new N(2,3,3013);a=yo(a);b=uo(b);if(183!=b.id)throw new N(2,3,3012);b=new to(b.g);for(var c=0;b.Ia();){var d=uo(b);if(241==d.id){c=yo(d);break}}return{fh:a,Og:c}};function Bo(a,b){var c=oo(a,b,"Initialization");if(!c)return null;var d=a.N.Ta,e=c.getAttribute("sourceURL");e&&(d=Mb(a.N.Ta,[e]));e=0;var f=null;if(c=Qn(c,"range",Tn))e=c.start,f=c.end;return new si(function(){return d},e,f)}
565
+ function Co(a,b){var c=Number(no(a,Do,"presentationTimeOffset"))||0,d=no(a,Do,"timescale"),e=1;d&&(e=Vn(d)||1);var f=c/e||0,g=Bo(a,Do);Eo(a,g);var h=Xe(a);return{bc:function(){var k=oo(h,Do,"RepresentationIndex"),l=h.N.Ta;k&&(k=k.getAttribute("sourceURL"))&&(l=Mb(h.N.Ta,[k]));k=Fo(h);return Go(h,b,g,l,k.start,k.end,f)}}}
566
+ function Go(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,y,x,w,C,D,B,F;return H(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Fb||!a.aa.df,l=a.aa.start,m=a.aa.duration,n=a.N.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.Ha(),c.Da,c.wa):null],p=null,u(G,Promise.all(v),2);y=G.h;x=y[0];w=y[1]||null;C=null;D=l-g;B=l;F=m?l+m:Infinity;if("mp4"==n)var I=ro(x,e,d,c,D,B,F);else{I=new to(w);if(440786851!=uo(I).id)throw new N(2,3,3008);var O=uo(I);if(408125543!=O.id)throw new N(2,3,3009);I=
567
+ O.g.byteOffset;O=new to(O.g);for(var K=null;O.Ia();){var L=uo(O);if(357149030==L.id){K=L;break}}if(!K)throw new N(2,3,3010);K=new to(K.g);L=1E6;for(O=null;K.Ia();){var T=uo(K);if(2807729==T.id)L=yo(T);else if(17545==T.id)if(4==T.g.byteLength)O=T.g.getFloat32(0);else if(8==T.g.byteLength)O=T.g.getFloat64(0);else throw new N(2,3,3003);}if(null==O)throw new N(2,3,3011);K=L/1E9;O*=K;L=uo(new to(x));if(475249515!=L.id)throw new N(2,3,3007);I=zo(L,I,K,O,d,c,D,B,F)}C=I;h.ic(C);t=new Ti(C);k&&t.yb(B,F,!0);
568
+ return G["return"](t)})}function Do(a){return a.Pc}function Fo(a){var b=oo(a,Do,"RepresentationIndex");a=no(a,Do,"indexRange");a=Tn(a||"");b&&(a=Qn(b,"range",Tn,a));return a}function Eo(a,b){Ho(a,b);if(!Fo(a))throw new N(2,4,4002);}function Ho(a,b){var c=a.N.mimeType.split("/")[1];if(a.N.contentType!=Rb&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);};function Io(a,b){var c=Bo(a,Jo),d=Ko(a);if(!d.Ca&&!d.timeline&&1<d.fc.length)throw new N(2,4,4002);if(!d.Ca&&!a.aa.duration&&!d.timeline&&1==d.fc.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.ya.id&&a.N.id&&(f=a.ya.id+","+a.N.id,e=b[f]);c=Lo(a.aa.start,a.aa.duration,a.N.Ta,d,c);d=!e;e?e.hc(c,a.presentationTimeline.pb()):(e=new Ti(c),f&&a.Fb&&(b[f]=e));a.presentationTimeline.ic(c);a.Fb&&a.aa.df||e.yb(a.aa.start,a.aa.duration?a.aa.start+a.aa.duration:
569
+ Infinity,d);return{bc:function(){return Promise.resolve(e)}}}function Jo(a){return a.Bb}function Ko(a){var b=To(a);a=mo(a,Jo);var c=a.nc;0==c&&(c=1);var d=0;a.Ca?d=a.Ca*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Ca:a.Ca,startTime:d,nc:c,sb:a.sb,timeline:a.timeline,fc:b}}
570
+ function Lo(a,b,c,d,e){var f=d.fc.length;d.timeline&&d.timeline.length!=d.fc.length&&(f=Math.min(d.timeline.length,d.fc.length));var g=a-d.sb,h=b?a+b:Infinity,k=[],l=d.startTime,m={};f=r(kb(f));for(var n=f.next();!n.done;m={Gd:m.Gd},n=f.next()){n=n.value;var p=d.fc[n];m.Gd=Mb(c,[p.Fg]);var t=void 0;t=null!=d.Ca?l+d.Ca:d.timeline?d.timeline[n].end:l+b;k.push(new ui(a+l,a+t,function(v){return function(){return v.Gd}}(m),p.start,p.end,e,g,a,h));l=t}return k}
571
+ function To(a){return[a.N.Bb,a.Fa.Bb,a.ya.Bb].filter(Jb).map(function(b){return In(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.$e&&(a.$e=!0);var c=b.getAttribute("media");b=Qn(b,"mediaRange",Tn,{start:0,end:null});return{Fg:c,start:b.start,end:b.end}})};function Uo(a,b,c,d,e,f){var g=Vo(a),h=Wo(a);Xo(h);var k=Xe(a);if(h.Jc)return Ho(a,g),{bc:function(){var v=lo(h.Jc,k.N.id,null,k.bandwidth||null,null);v=Mb(k.N.Ta,[v]);return Go(k,b,g,v,0,null,h.sb)}};if(h.Ca)return d||(a.presentationTimeline.ce(h.Ca),a.presentationTimeline.ee(a.aa.start)),{bc:function(){return Yo(k,h,e,g,f)}};var l=null;d=null;a.ya.id&&a.N.id&&(d=a.ya.id+","+a.N.id,l=c[d]);var m=Zo(k,h,g),n=a.aa.start,p=a.aa.duration?a.aa.start+a.aa.duration:Infinity,t=Infinity!=p;l?(t&&(new Ti(m)).yb(n,
572
+ p,!0),l.hc(m,a.presentationTimeline.pb())):(l=new Ti(m),d&&a.Fb&&(c[d]=l));a.presentationTimeline.ic(m);t&&l.yb(n,p);return{bc:function(){return Promise.resolve(l)}}}function $o(a){return a.Qc}function Wo(a){var b=mo(a,$o),c=no(a,$o,"media");a=no(a,$o,"index");return{Ca:b.Ca,timescale:b.timescale,nc:b.nc,sb:b.sb,He:b.He,timeline:b.timeline,ae:c,Jc:a}}
573
+ function Xo(a){var b=a.Jc?1:0;b+=a.timeline?1:0;b+=a.Ca?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.Jc&&(a.timeline=null),a.Ca=null);if(!a.Jc&&!a.ae)throw new N(2,4,4002);}
574
+ function Yo(a,b,c,d,e){function f(K){var L=(K-t)*p,T=L+b.sb,X=L+l;L=X+p;var ia=Math.min(L,h());X=new ui(X,ia,function(){var ja=lo(y,w,K,x,T*v);return Mb(C,[ja])},0,null,d,D,l,h());X.l=L;return X}function g(){var K=[Math.max(k.pb(),l),Math.min(k.Ib(),h())].map(function(L){return L-l});return[Math.ceil(K[0]/p),Math.ceil(K[1]/p)-1].map(function(L){return L+t})}function h(){var K=null!=m&&e[m]||n;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.aa.start,m=a.ya.id,n=a.aa.duration,p=b.Ca,t=b.nc,v=
575
+ b.timescale,y=b.ae,x=a.bandwidth||null,w=a.N.id,C=a.N.Ta,D=l-b.sb,B=g();a=a.Fb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var F=a;F<=B;++F){var G=f(F);c.push(G)}var I=new Ti(c);c=k.Ib()<h();F=k.Y();if(c||F){var O=Math.max(a,B+1);I.wd(p,function(){var K=k.pb();I.Gb(K);var L=r(g());L.next();L=L.next().value;for(var T=[];O<=L;){var X=f(O);T.push(X);O++}return K>h()&&!T.length?null:T})}return Promise.resolve(I)}
576
+ function Zo(a,b,c){var d=a.aa.start,e=a.aa.duration,f=d-b.sb;e=e?d+e:Infinity;for(var g=[],h={},k=r(nb(b.timeline)),l=k.next();!l.done;h={Fd:h.Fd,Jd:h.Jd,Md:h.Md,Cd:h.Cd,Od:h.Od,Dd:h.Dd},l=k.next()){l=l.value;var m=l.item,n=m.start,p=m.eh;m=m.end;h.Md=l.xa+b.nc;h.Od=p+b.He;h.Jd=a.N.id;h.Cd=a.bandwidth||null;h.Fd=b.ae;h.Dd=a.N.Ta;g.push(new ui(d+n,d+m,function(t){return function(){var v=lo(t.Fd,t.Jd,t.Md,t.Cd||null,t.Od);return Mb(t.Dd,[v]).map(function(y){return y.toString()})}}(h),0,null,c,f,d,e))}return g}
577
+ function Vo(a){var b=no(a,$o,"initialization");if(!b)return null;var c=a.N.id,d=a.bandwidth||null,e=a.N.Ta;return new si(function(){var f=lo(b,c,null,d,null);return Mb(e,[f])},0,null)};function ap(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.o=new Set}ap.prototype.release=function(){for(var a=r(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=[]};
578
+ function bp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,D,B,F,G,I,O,K,L,T,X,ia,ja,W,Ea,xa,Ha,Ma,Lb;return H(function(bb){switch(bb.g){case 1:d=Sb;cp(b);dp(b);ep(b);fp(b);if(!c&&1==b.length){e=b[0];a.g=e.$c;a.h=e.yd;a.j=e.textStreams;a.i=e.imageStreams;bb.C(2);break}f=-1;g=r(nb(b));for(h=g.next();!h.done;h=g.next())l=k=h.value,m=l.xa,n=l.item,a.o.has(n.id)||(a.o.add(n.id),-1==f&&(f=m));if(-1==f)return bb["return"]();p=b.map(function(Fa){return Fa.$c});t=b.map(function(Fa){return Fa.yd});v=b.map(function(Fa){return Fa.textStreams});
579
+ y=b.map(function(Fa){return Fa.imageStreams});x=r(v);for(w=x.next();!w.done;w=x.next())C=w.value,C.push(gp(d.ra));D=r(y);for(B=D.next();!B.done;B=D.next())F=B.value,F.push(gp(d.wc));return u(bb,hp(a.g,p,f,ip,jp),3);case 3:return u(bb,hp(a.h,t,f,ip,jp),4);case 4:return u(bb,hp(a.j,v,f,ip,jp),5);case 5:return u(bb,hp(a.i,y,f,ip,jp),2);case 2:G=0;I=[];if(a.h.length&&a.g.length)for(ia=r(a.g),ja=ia.next();!ja.done;ja=ia.next())for(W=ja.value,Ea=r(a.h),xa=Ea.next();!xa.done;xa=Ea.next())Ha=xa.value,Ma=
580
+ ig(W.drmInfos,Ha.drmInfos),W.drmInfos.length&&Ha.drmInfos.length&&!Ma.length||(Lb=G++,I.push({id:Lb,language:W.language,primary:W.primary,audio:W,video:Ha,bandwidth:(W.bandwidth||0)+(Ha.bandwidth||0),drmInfos:Ma,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(O=a.h.concat(a.g),K=r(O),L=K.next();!L.done;L=K.next())T=L.value,X=G++,I.push({id:X,language:T.language,primary:T.primary,audio:T.type==d.Cb?T:null,video:T.type==d.ib?T:null,bandwidth:T.bandwidth||0,drmInfos:T.drmInfos,
579
581
  allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});a.l=I;z(bb)}})}
580
- function dp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.$c),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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&&mc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.$c=c}}
581
- function fp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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&&mc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
582
- function ep(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.yd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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&&mc(e.roles,h.roles)&&xf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.yd=c}}
583
- function gp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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}}
584
- function lp(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,D,B,F,G,I,N,K,L,T;return H(function(W){switch(W.g){case 1:b=Sb;if(1==a.length)return W["return"](a[0]);c=a.map(function(ja){return ja.filter(function(ha){return ha.type==b.Bb})});d=a.map(function(ja){return ja.filter(function(ha){return ha.type==b.ib})});e=a.map(function(ja){return ja.filter(function(ha){return ha.type==b.qa})});f=a.map(function(ja){return ja.filter(function(ha){return ha.type==b.vc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
585
- h.value,k.push(mp(b.qa));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(mp(b.vc));return u(W,ip([],c,0,np,op),2);case 2:return p=W.h,u(W,ip([],d,0,np,op),3);case 3:return t=W.h,u(W,ip([],e,0,np,op),4);case 4:return v=W.h,u(W,ip([],f,0,np,op),5);case 5:y=W.h;x=0;if(t.length&&p.length)for(F=r(p),G=F.next();!G.done;G=F.next())for(I=G.value,N=r(t),K=N.next();!K.done;K=N.next())L=K.value,T=x++,L.variantIds.push(T),I.variantIds.push(T);else for(w=t.concat(p),C=r(w),D=C.next();!D.done;D=C.next())B=
586
- D.value,B.variantIds=[x++];return W["return"](t.concat(p).concat(v).concat(y))}})}
587
- function ip(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y,x,w,C,D,B,F,G,I,N,K,L,T,W,ja,ha;return H(function(Z){switch(Z.g){case 1:f=Sb;g=[];h=r(nb(b));for(k=h.next();!k.done;k=h.next())m=l=k.value,n=m.xa,p=m.item,n>=c?g.push(new Set(p)):g.push(new Set);t=r(a);v=t.next();case 2:if(v.done){Z.C(4);break}y=v.value;return u(Z,pp(y,b,c,e,g),5);case 5:x=Z.h;if(!x)throw new O(2,4,4037);v=t.next();Z.C(2);break;case 4:w=r(g),C=w.next();case 6:if(C.done){Z.C(8);break}D=C.value;B=r(D);F=B.next();case 9:if(F.done){C=w.next();
588
- Z.C(6);break}G=F.value;return u(Z,qp(G,b,d,e,g),12);case 12:(I=Z.h)&&a.push(I);F=B.next();Z.C(9);break;case 8:N=r(g);for(C=N.next();!C.done;C=N.next())for(K=C.value,L={},T=r(K),F=T.next();!F.done;L={tb:L.tb},F=T.next())if(L.tb=F.value,W=L.tb.type==f.qa&&!L.tb.language,ja=L.tb.type==f.vc&&!L.tb.tilesLayout,!W&&!ja&&(ha=a.some(function(Ea){return function(wa){return wa.mimeType==Ea.tb.mimeType&&od(wa.codecs)==od(Ea.tb.codecs)}}(L))))throw new O(2,4,4037);return Z["return"](a)}})}
589
- function pp(a,b,c,d,e){var f;return H(function(g){if(1==g.g)return(f=rp(b,a))?u(g,sp(f),2):g["return"](!1);tp(a,f,c,d,e);return g["return"](!0)})}function sp(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push(c.createSegmentIndex()),c.trickModeVideo&&!c.trickModeVideo.segmentIndex&&b.push(c.trickModeVideo.createSegmentIndex());return Promise.all(b)}
590
- function qp(a,b,c,d,e){var f,g;return H(function(h){if(1==h.g)return f=c(a),(g=rp(b,f))?f.createSegmentIndex?u(h,sp(g),2):h.C(2):h["return"](null);tp(f,g,0,d,e);return h["return"](f)})}function tp(a,b,c,d,e){b=r(nb(b));for(var f=b.next();!f.done;f=b.next()){var g=f.value;f=g.xa;g=g.item;if(f>=c){d(a,g);var h=!0;"audio"==a.type&&0==Yb(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}}
591
- function jp(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Wi;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}function np(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
592
- 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))));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=ig(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new O(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
593
- (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.j.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=jp(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),kp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&kp(a.trickModeVideo,b)}
594
- 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=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
595
- function rp(a,b){for(var c=[],d=r(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=r(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 null;c.push(f)}return c}function up(a,b){var c;if(!(c=b.mimeType!=a.mimeType||od(b.codecs)!=od(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<ig(c,d).length:1)}return c?!1:!0}
596
- function vp(a,b){return a.language?b.language?0==Yb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function wp(a){return a.tilesLayout?!0:!1}
597
- function xp(a,b,c){if(a.id==c.id)return!0;var d=Yb(a.language,b.language),e=Yb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;
598
- 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}
599
- 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}
600
- function zp(a,b,c){if(a.id==c.id)return!0;var d=Yb(a.language,b.language),e=Yb(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!=
601
- 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}}
602
- function hp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ti([]),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}}
603
- 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.G=this.s=null;this.h=[];this.F=null;this.H=1;this.o={};this.L={};this.g=new bp;this.D=0;this.I=new gc(5);this.B=new P(function(){a.Lc()});this.i=new Ye;this.j=null;this.K=[];this.l=Infinity;this.A=!1}q=Gp.prototype;q.configure=function(a){this.s=a};q.start=function(a,b){var c=this,d;return H(function(e){if(1==e.g)return c.A=b.isLowLatencyMode(),c.h=[a],c.G=b,u(e,Hp(c),2);d=e.h;c.G&&Ip(c,d);if(!c.G)throw new O(2,7,7001);return e["return"](c.F)})};
604
- q.stop=function(){for(var a=r(Object.values(this.o)),b=a.next();!b.done;b=a.next())b.value.release();this.g&&this.g.release();this.s=this.G=null;this.h=[];this.F=null;this.o={};this.g=null;null!=this.B&&(this.B.stop(),this.B=null);return this.i.destroy()};q.update=function(){var a=this,b;return H(function(c){if(1==c.g)return A(c,2),u(c,Hp(a),4);if(2!=c.g)return va(c,0);b=E(c);if(!a.G||!b)return c["return"]();a.G.onError(b);z(c)})};q.onExpirationUpdated=function(){};
605
- function Hp(a){var b,c,d,e,f,g,h;return H(function(k){if(1==k.g)return b=df(a.h,a.s.retryParameters),c=a.G.networkingEngine,d=Date.now(),e=c.request(0,b),Ze(a.i,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.G)return k["return"](0);f.uri&&!a.h.includes(f.uri)&&a.h.unshift(f.uri);return u(k,Jp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;hc(a.I,1,h);return k["return"](h)})}
606
- function Jp(a,b,c){var d,e,f,g,h;return H(function(k){if(1==k.g){d=ao(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.s.dash.disableXlinkProcessing)return k["return"](Kp(a,d,c));f=a.s.dash.xlinkFailGracefully;g=ro(d,a.s.retryParameters,f,c,a.G.networkingEngine);Ze(a.i,g);return u(k,g.promise,2)}h=k.h;return k["return"](Kp(a,h,c))})}
607
- function Kp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,D,B,F,G,I,N,K,L,T,W,ja,ha,Z,Ea,wa,Ia;return H(function(Na){switch(Na.g){case 1:(d=a.s.dash.manifestPreprocessor)&&d(b);e=[c];f=Jn(b,"Location").map(Pn).filter(Jb);0<f.length&&(g=Mb(e,f),e=a.h=g);h=Jn(b,"BaseURL");k=h.map(Pn);l=Mb(e,k);m=0;h&&h.length&&(m=Rn(h[0],"availabilityTimeOffset",Yn)||0);n=a.s.dash.ignoreMinBufferTime;p=0;n||(p=Rn(b,"minBufferTime",Tn)||0);a.D=Rn(b,"minimumUpdatePeriod",Tn,-1);t=Rn(b,"availabilityStartTime",Sn);v=Rn(b,
608
- "timeShiftBufferDepth",Tn);y=a.s.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Rn(b,"suggestedPresentationDelay",Tn));w=a.s.dash.ignoreMaxSegmentDuration;C=null;w||(C=Rn(b,"maxSegmentDuration",Tn));D=b.getAttribute("type")||"static";if(a.F)for(B=a.F.presentationTimeline,F=r(Object.values(a.o)),G=F.next();!G.done;G=F.next())I=G.value,I.Fb(B.xb());else N=a.s.defaultPresentationDelay||1.5*p,K=null!=x?x:N,B=new Q(t,K,a.s.dash.autoCorrectDrift);L=b.getAttribute("profiles")||"";T={Eb:"static"!=D,presentationTimeline:B,
609
- ya:null,aa:null,Ea:null,N:null,bandwidth:0,$e:!1,Yb:m,profiles:L.split(",")};W=Lp(a,T,l,b);ja=W.duration;ha=W.periods;B.Qc("static"==D);"static"!=D&&W.Se||B.eb(ja||Infinity);a.l&&!a.A&&(Z=a.G.isAutoLowLatencyMode())&&(a.G.enableLowLatencyMode(),a.A=a.G.isLowLatencyMode());a.A?B.rf(a.l):a.l&&Ta("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.");(Ea=B.Z())&&
610
- !isNaN(a.s.availabilityWindowOverride)&&(v=a.s.availabilityWindowOverride);null==v&&(v=Infinity);B.ze(v);B.ce(C||1);return u(Na,cp(a.g,ha,T.Eb),2);case 2:if(a.F){a.F.variants=a.g.l;a.F.textStreams=a.g.j.slice();a.F.imageStreams=a.g.i;a.G.filter(a.F);Na.C(3);break}a.F={presentationTimeline:B,variants:a.g.l,textStreams:a.g.j.slice(),imageStreams:a.g.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.zf()){Na.C(3);break}wa=Jn(b,"UTCTiming");return u(Na,Mp(a,l,wa),5);case 5:Ia=Na.h;if(!a.G)return Na["return"]();
611
- B.sf(Ia);case 3:a.G.makeTextStreamsForClosedCaptions(a.F),z(Na)}})}
612
- function Lp(a,b,c,d){var e=Rn(d,"mediaPresentationDuration",Tn),f=[],g=0;d=Jn(d,"Period");for(var h=r(nb(d)),k=h.next();!k.done;k=h.next()){var l=k.value;k=l.xa;var m=l.item,n=l.next;l=Rn(m,"start",Tn,g);var p=m.id,t=Rn(m,"duration",Tn),v=null;if(n){var y=Rn(n,"start",Tn);null!=y&&(v=y-l)}else null!=e&&(v=e-l);null==v&&(v=t);if(!(null!==a.j&&null!==p&&null!==l&&l<a.j)||a.K.includes(p)||k+1==d.length){null!==l&&(null===a.j||l>a.j)&&(a.j=l);g=Np(a,b,c,{start:l,duration:v,node:m,df:null==v||!n});f.push(g);
582
+ function cp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.$c),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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&&mc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.$c=c}}
583
+ function ep(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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&&mc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
584
+ function dp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.yd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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&&mc(e.roles,h.roles)&&xf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.yd=c}}
585
+ function fp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(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}}
586
+ function kp(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,D,B,F,G,I,O,K,L,T;return H(function(X){switch(X.g){case 1:b=Sb;if(1==a.length)return X["return"](a[0]);c=a.map(function(ia){return ia.filter(function(ja){return ja.type==b.Cb})});d=a.map(function(ia){return ia.filter(function(ja){return ja.type==b.ib})});e=a.map(function(ia){return ia.filter(function(ja){return ja.type==b.ra})});f=a.map(function(ia){return ia.filter(function(ja){return ja.type==b.wc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
587
+ h.value,k.push(lp(b.ra));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(lp(b.wc));return u(X,hp([],c,0,mp,np),2);case 2:return p=X.h,u(X,hp([],d,0,mp,np),3);case 3:return t=X.h,u(X,hp([],e,0,mp,np),4);case 4:return v=X.h,u(X,hp([],f,0,mp,np),5);case 5:y=X.h;x=0;if(t.length&&p.length)for(F=r(p),G=F.next();!G.done;G=F.next())for(I=G.value,O=r(t),K=O.next();!K.done;K=O.next())L=K.value,T=x++,L.variantIds.push(T),I.variantIds.push(T);else for(w=t.concat(p),C=r(w),D=C.next();!D.done;D=C.next())B=
588
+ D.value,B.variantIds=[x++];return X["return"](t.concat(p).concat(v).concat(y))}})}
589
+ function hp(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y,x,w,C,D,B,F,G,I,O,K,L,T,X,ia,ja;return H(function(W){switch(W.g){case 1:f=Sb;g=[];h=r(nb(b));for(k=h.next();!k.done;k=h.next())m=l=k.value,n=m.xa,p=m.item,n>=c?g.push(new Set(p)):g.push(new Set);t=r(a);v=t.next();case 2:if(v.done){W.C(4);break}y=v.value;return u(W,op(y,b,c,e,g),5);case 5:x=W.h;if(!x)throw new N(2,4,4037);v=t.next();W.C(2);break;case 4:w=r(g),C=w.next();case 6:if(C.done){W.C(8);break}D=C.value;B=r(D);F=B.next();case 9:if(F.done){C=w.next();
590
+ W.C(6);break}G=F.value;return u(W,pp(G,b,d,e,g),12);case 12:(I=W.h)&&a.push(I);F=B.next();W.C(9);break;case 8:O=r(g);for(C=O.next();!C.done;C=O.next())for(K=C.value,L={},T=r(K),F=T.next();!F.done;L={vb:L.vb},F=T.next())if(L.vb=F.value,X=L.vb.type==f.ra&&!L.vb.language,ia=L.vb.type==f.wc&&!L.vb.tilesLayout,!X&&!ia&&(ja=a.some(function(Ea){return function(xa){return xa.mimeType==Ea.vb.mimeType&&od(xa.codecs)==od(Ea.vb.codecs)}}(L))))throw new N(2,4,4037);return W["return"](a)}})}
591
+ function op(a,b,c,d,e){var f;return H(function(g){if(1==g.g)return(f=qp(b,a))?u(g,rp(f),2):g["return"](!1);sp(a,f,c,d,e);return g["return"](!0)})}function rp(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push(c.createSegmentIndex()),c.trickModeVideo&&!c.trickModeVideo.segmentIndex&&b.push(c.trickModeVideo.createSegmentIndex());return Promise.all(b)}
592
+ function pp(a,b,c,d,e){var f,g;return H(function(h){if(1==h.g)return f=c(a),(g=qp(b,f))?f.createSegmentIndex?u(h,rp(g),2):h.C(2):h["return"](null);sp(f,g,0,d,e);return h["return"](f)})}function sp(a,b,c,d,e){b=r(nb(b));for(var f=b.next();!f.done;f=b.next()){var g=f.value;f=g.xa;g=g.item;if(f>=c){d(a,g);var h=!0;"audio"==a.type&&0==Yb(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}}
593
+ function ip(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Wi;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}function mp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
594
+ function jp(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))));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=ig(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||
595
+ (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.j.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=ip(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),jp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&jp(a.trickModeVideo,b)}
596
+ function np(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ha(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
597
+ function qp(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:tp,video:tp,text:up,image:vp}[f.type],h={audio:wp,video:xp,text:yp,image:zp}[f.type],k=null;e=r(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 null;c.push(f)}return c}function tp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||od(b.codecs)!=od(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<ig(c,d).length:1)}return c?!1:!0}
598
+ function up(a,b){return a.language?b.language?0==Yb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function vp(a){return a.tilesLayout?!0:!1}
599
+ function wp(a,b,c){if(a.id==c.id)return!0;var d=Yb(a.language,b.language),e=Yb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;
600
+ d=Ap(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Bp)return!0;if(d==Cp)return!1;d=Ap(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Bp?!0:d==Cp?!1:a.bandwidth&&Dp(a.bandwidth,b.bandwidth,c.bandwidth)==Bp?!0:!1}
601
+ function xp(a,b,c){if(a.id==c.id)return!0;var d=Ap(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Bp)return!0;if(d==Cp)return!1;if(a.frameRate){d=Ap(a.frameRate,b.frameRate,c.frameRate);if(d==Bp)return!0;if(d==Cp)return!1}return a.bandwidth&&Dp(a.bandwidth,b.bandwidth,c.bandwidth)==Bp?!0:!1}
602
+ function yp(a,b,c){if(a.id==c.id)return!0;var d=Yb(a.language,b.language),e=Yb(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!=
603
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function zp(a,b,c){return a.id==c.id?!0:Ap(a.width*a.height,b.width*b.height,c.width*c.height)==Bp?!0:!1}function lp(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}}
604
+ function gp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ti([]),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}}
605
+ function Ap(a,b,c){if(b==a&&a!=c)return Cp;if(c==a&&a!=b)return Bp;if(b>a){if(c<=a||c-a<b-a)return Bp;if(c-a>b-a)return Cp}else{if(c>a)return Cp;if(a-c<a-b)return Bp;if(a-c>a-b)return Cp}return Ep}function Dp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Bp:b<a?Cp:Ep}var Bp=1,Ep=0,Cp=-1;function Fp(){var a=this;this.G=this.s=null;this.h=[];this.F=null;this.H=1;this.o={};this.L={};this.g=new ap;this.D=0;this.I=new gc(5);this.B=new P(function(){a.Mc()});this.i=new Ye;this.j=null;this.K=[];this.l=Infinity;this.A=!1}q=Fp.prototype;q.configure=function(a){this.s=a};q.start=function(a,b){var c=this,d;return H(function(e){if(1==e.g)return c.A=b.isLowLatencyMode(),c.h=[a],c.G=b,u(e,Gp(c),2);d=e.h;c.G&&Hp(c,d);if(!c.G)throw new N(2,7,7001);return e["return"](c.F)})};
606
+ q.stop=function(){for(var a=r(Object.values(this.o)),b=a.next();!b.done;b=a.next())b.value.release();this.g&&this.g.release();this.s=this.G=null;this.h=[];this.F=null;this.o={};this.g=null;null!=this.B&&(this.B.stop(),this.B=null);return this.i.destroy()};q.update=function(){var a=this,b;return H(function(c){if(1==c.g)return A(c,2),u(c,Gp(a),4);if(2!=c.g)return va(c,0);b=E(c);if(!a.G||!b)return c["return"]();a.G.onError(b);z(c)})};q.onExpirationUpdated=function(){};
607
+ function Gp(a){var b,c,d,e,f,g,h;return H(function(k){if(1==k.g)return b=df(a.h,a.s.retryParameters),c=a.G.networkingEngine,d=Date.now(),e=c.request(0,b),Ze(a.i,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.G)return k["return"](0);f.uri&&!a.h.includes(f.uri)&&a.h.unshift(f.uri);return u(k,Ip(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;hc(a.I,1,h);return k["return"](h)})}
608
+ function Ip(a,b,c){var d,e,f,g,h;return H(function(k){if(1==k.g){d=$n(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.s.dash.disableXlinkProcessing)return k["return"](Jp(a,d,c));f=a.s.dash.xlinkFailGracefully;g=qo(d,a.s.retryParameters,f,c,a.G.networkingEngine);Ze(a.i,g);return u(k,g.promise,2)}h=k.h;return k["return"](Jp(a,h,c))})}
609
+ function Jp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,D,B,F,G,I,O,K,L,T,X,ia,ja,W,Ea,xa,Ha;return H(function(Ma){switch(Ma.g){case 1:(d=a.s.dash.manifestPreprocessor)&&d(b);e=[c];f=In(b,"Location").map(On).filter(Jb);0<f.length&&(g=Mb(e,f),e=a.h=g);h=In(b,"BaseURL");k=h.map(On);l=Mb(e,k);m=0;h&&h.length&&(m=Qn(h[0],"availabilityTimeOffset",Xn)||0);n=a.s.dash.ignoreMinBufferTime;p=0;n||(p=Qn(b,"minBufferTime",Sn)||0);a.D=Qn(b,"minimumUpdatePeriod",Sn,-1);t=Qn(b,"availabilityStartTime",Rn);v=Qn(b,
610
+ "timeShiftBufferDepth",Sn);y=a.s.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Qn(b,"suggestedPresentationDelay",Sn));w=a.s.dash.ignoreMaxSegmentDuration;C=null;w||(C=Qn(b,"maxSegmentDuration",Sn));D=b.getAttribute("type")||"static";if(a.F)for(B=a.F.presentationTimeline,F=r(Object.values(a.o)),G=F.next();!G.done;G=F.next())I=G.value,I.Gb(B.pb());else O=a.s.defaultPresentationDelay||1.5*p,K=null!=x?x:O,B=new Q(t,K,a.s.dash.autoCorrectDrift);B.Rc("static"==D);(L=B.Y())&&!isNaN(a.s.availabilityWindowOverride)&&
611
+ (v=a.s.availabilityWindowOverride);null==v&&(v=Infinity);B.ze(v);T=b.getAttribute("profiles")||"";X={Fb:"static"!=D,presentationTimeline:B,ya:null,aa:null,Fa:null,N:null,bandwidth:0,$e:!1,Zb:m,profiles:T.split(",")};ia=Kp(a,X,l,b);ja=ia.duration;W=ia.periods;"static"!=D&&ia.Se||B.fb(ja||Infinity);a.l&&!a.A&&(Ea=a.G.isAutoLowLatencyMode())&&(a.G.enableLowLatencyMode(),a.A=a.G.isLowLatencyMode());a.A?B.rf(a.l):a.l&&Ta("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.");
612
+ B.ce(C||1);return u(Ma,bp(a.g,W,X.Fb),2);case 2:if(a.F){a.F.variants=a.g.l;a.F.textStreams=a.g.j.slice();a.F.imageStreams=a.g.i;a.G.filter(a.F);Ma.C(3);break}a.F={presentationTimeline:B,variants:a.g.l,textStreams:a.g.j.slice(),imageStreams:a.g.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.zf()){Ma.C(3);break}xa=In(b,"UTCTiming");return u(Ma,Lp(a,l,xa),5);case 5:Ha=Ma.h;if(!a.G)return Ma["return"]();B.sf(Ha);case 3:a.G.makeTextStreamsForClosedCaptions(a.F),z(Ma)}})}
613
+ function Kp(a,b,c,d){var e=Qn(d,"mediaPresentationDuration",Sn),f=[],g=0;d=In(d,"Period");for(var h=r(nb(d)),k=h.next();!k.done;k=h.next()){var l=k.value;k=l.xa;var m=l.item,n=l.next;l=Qn(m,"start",Sn,g);var p=m.id,t=Qn(m,"duration",Sn),v=null;if(n){var y=Qn(n,"start",Sn);null!=y&&(v=y-l)}else null!=e&&(v=e-l);null==v&&(v=t);if(!(null!==a.j&&null!==p&&null!==l&&l<a.j)||a.K.includes(p)||k+1==d.length){null!==l&&(null===a.j||l>a.j)&&(a.j=l);g=Mp(a,b,c,{start:l,duration:v,node:m,df:null==v||!n});f.push(g);
613
614
  b.ya.id&&v&&(a.L[b.ya.id]=v);if(null==v){g=null;break}g=l+v}}a.K=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,Se:!1}:{periods:f,duration:g,Se:!0}}
614
- function Np(a,b,c,d){b.ya=Op(d.node,null,c);b.aa=d;b.ya.Yb=b.Yb;b.ya.id||(b.ya.id="__shaka_period_"+d.start);c=Jn(d.node,"EventStream");c=r(c);for(var e=c.next();!e.done;e=c.next())Pp(a,d.start,d.duration,e.value);c=Jn(d.node,"AdaptationSet").map(function(m){return Qp(a,b,m)}).filter(Jb);if(b.Eb){d=[];e=r(c);for(var f=e.next();!f.done;f=e.next()){f=r(f.value.Rg);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new O(2,4,4018);}d=c.filter(function(m){return!m.Ee});
615
- c=c.filter(function(m){return m.Ee});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ee.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={Wc:h.Wc},l=k.next())h.Wc=l.value,h.Wc.trickModeVideo=e.streams.find(function(m){return function(n){return od(m.Wc.codecs)==od(n.codecs)}}(h))}}}e=a.s.disableAudio?[]:Rp(d,"audio");g=a.s.disableVideo?[]:Rp(d,"video");f=a.s.disableText?[]:Rp(d,Rb);c=a.s.disableThumbnails?
616
- []:Rp(d,"image");if(!g.length&&!e.length)throw new O(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.ya.id,$c:d,yd:e,textStreams:g,imageStreams:f}}
617
- function Rp(a,b){return a.filter(function(c){return c.contentType==b})}
618
- function Qp(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Ea=Op(c,b.ya,null);var e=!1,f=Jn(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Jb),h=void 0,k=b.Ea.contentType==Rb;k&&(h="subtitle");f=r(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=
619
- l}}var n;m=Jn(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=Jn(c,"SupplementalProperty");m=r(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"),
620
- 10)));m=Jn(c,"Accessibility");var v=new Map;m=r(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var y=r(t),x=y.next();!x.done;x=y.next()){var w=x.value,C=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],C=w[1]||"und"):(x="CC"+p,2==t.length?p+=2:p++,C=w);v.set(x,Ub(C))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
621
- 1,null!=t)for(t=r(t.split(";")),x=t.next();!x.done;x=t.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,Ub(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Jn(c,"ContentProtection");var D=bo(l,a.s.dash.ignoreDrmInfo,a.s.dash.keySystemsByURI),B=Ub(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=Jn(c,"Label"))&&l.length&&
622
- (l=l[0],l.textContent&&(F=l.textContent));l=Jn(c,"Representation");c=l.map(function(G){if(G=Sp(a,b,D,h,B,F,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.Ea.contentType;if(a.s.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new O(2,4,4003);}if(!b.Ea.contentType||"application"==b.Ea.contentType)for(b.Ea.contentType=Tp(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.Ea.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
623
- m.value,p=r(D.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Jb);return{id:b.Ea.id||"__fake__"+a.H++,contentType:b.Ea.contentType,language:B,ti:e,streams:c,drmInfos:D.drmInfos,Ee:f,Rg:k}}
624
- function Sp(a,b,c,d,e,f,g,h,k,l){b.N=Op(l,b.Ea,null);a.l=Math.min(a.l,b.N.Yb);if(!Up(b.N))return null;var m=b.aa.start;b.bandwidth=Rn(l,"bandwidth",Wn)||0;var n=b.N.contentType,p=n==Rb||"application"==n;n="image"==n;try{var t=function(G,I,N){return Vp(a,G,I,N)};if(b.N.Oc)var v=Do(b,t);else if(b.N.Ab)v=Jo(b,a.o);else if(b.N.Pc)v=Vo(b,t,a.o,!!a.F,a.s.dash.initialSegmentLimit,a.L);else{var y=b.N.Ta,x=b.aa.duration||0;v={ac:function(){return Promise.resolve(Vi(m,x,y))}}}}catch(G){if((p||n)&&4002==G.code)return null;
625
- throw G;}t=Jn(l,"ContentProtection");t=fo(t,c,a.s.dash.ignoreDrmInfo,a.s.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;Jn(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(b.N.mimeType="audio/eac3-joc",w=!0);var C=!1;p&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var D;if(n&&((l=Jn(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile",
626
- "http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&(D=l.getAttribute("value")),!D))return null;var B;l=b.N.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 F={id:a.H++,originalId:b.N.id,createSegmentIndex:function(){var G;return H(function(I){if(1==I.g){if(F.segmentIndex)return I.C(0);G=F;return u(I,v.ac(),3)}G.segmentIndex=I.h;z(I)})},segmentIndex:null,
627
- mimeType:b.N.mimeType,codecs:b.N.codecs,frameRate:b.N.frameRate,pixelAspectRatio:b.N.pixelAspectRatio,bandwidth:b.bandwidth,width:b.N.width,height:b.N.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.Ea.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.N.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.N.fe,audioSamplingRate:b.N.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:B,tilesLayout:D};return F}
628
- q.Lc=function(){var a=this,b,c;return H(function(d){switch(d.g){case 1:return b=0,A(d,2),u(d,Hp(a),4);case 4:b=d.h;va(d,3);break;case 2:c=E(d),a.G&&(c.severity=1,a.G.onError(c));case 3:if(!a.G)return d["return"]();Ip(a,b);z(d)}})};function Ip(a,b){0>a.D||a.B.T(Math.max(3,a.D-b,ic(a.I)))}
629
- function Op(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,fe:null,audioSamplingRate:null,Yb:0};c=c||b.Ta;var d=Jn(a,"BaseURL"),e=d.map(Pn),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Rn(a,"frameRate",Zn)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Jn(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
630
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Jn(a,"AudioChannelConfiguration");m=Wp(m)||b.fe;p=Rn(a,"audioSamplingRate",Xn)||b.audioSamplingRate;f||(f=Tp(g,h));var t=In(a,"SegmentBase"),v=In(a,"SegmentTemplate"),y=t?Rn(t,"availabilityTimeOffset",Yn)||0:0,x=v?Rn(v,"availabilityTimeOffset",Yn)||0:0;d=d&&d.length?Rn(d[0],"availabilityTimeOffset",Yn)||0:0;d=b.Yb+d+y+x;return{Ta:Mb(c,e),Oc:t||b.Oc,Ab:In(a,"SegmentList")||b.Ab,Pc:v||b.Pc,width:Rn(a,"width",Xn)||b.width,height:Rn(a,
631
- "height",Xn)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),fe:m,audioSamplingRate:p,Yb:d}}
632
- function Wp(a){a=r(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=
633
- 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 Up(a){var b=a.Oc?1:0;b+=a.Ab?1:0;b+=a.Pc?1:0;if(0==b)return a.contentType==Rb||"application"==a.contentType?!0:!1;1!=b&&(a.Oc&&(a.Ab=null),a.Pc=null);return!0}
634
- function Xp(a,b,c,d){var e,f,g,h,k,l;return H(function(m){if(1==m.g)return e=Mb(b,[c]),f=df(e,a.s.retryParameters),f.method=d,g=a.G.networkingEngine.request(4,f),Ze(a.i,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=Vc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
635
- function Mp(a,b,c){var d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.s.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){n.C(4);break}h=g.value;A(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.C(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.C(8);
636
- 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":Ta("NTP UTCTiming scheme is not supported");break;default:Ta("Unrecognized scheme in UTCTiming element",k)}n.C(9);break;case 7:return u(n,Xp(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,Xp(a,b,l,"GET"),11);case 11:return n["return"](n.h);
615
+ function Mp(a,b,c,d){b.ya=Np(d.node,null,c);b.aa=d;b.ya.Zb=b.Zb;b.ya.id||(b.ya.id="__shaka_period_"+d.start);var e=In(d.node,"EventStream");c=b.presentationTimeline.pb();e=r(e);for(var f=e.next();!f.done;f=e.next())Op(a,d.start,d.duration,f.value,c);c=In(d.node,"AdaptationSet").map(function(m){return Pp(a,b,m)}).filter(Jb);if(b.Fb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Rg);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);
616
+ }d=c.filter(function(m){return!m.Ee});c=c.filter(function(m){return m.Ee});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ee.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={Xc:h.Xc},l=k.next())h.Xc=l.value,h.Xc.trickModeVideo=e.streams.find(function(m){return function(n){return od(m.Xc.codecs)==od(n.codecs)}}(h))}}}e=a.s.disableAudio?[]:Qp(d,"audio");g=a.s.disableVideo?[]:Qp(d,"video");f=a.s.disableText?
617
+ []:Qp(d,Rb);c=a.s.disableThumbnails?[]:Qp(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ha(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ha(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ha(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ha(h.value.streams));return{id:b.ya.id,$c:d,yd:e,textStreams:g,imageStreams:f}}
618
+ function Qp(a,b){return a.filter(function(c){return c.contentType==b})}
619
+ function Pp(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Fa=Np(c,b.ya,null);var e=!1,f=In(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Jb),h=void 0,k=b.Fa.contentType==Rb;k&&(h="subtitle");f=r(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=
620
+ l}}var n;m=In(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=In(c,"SupplementalProperty");m=r(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"),
621
+ 10)));m=In(c,"Accessibility");var v=new Map;m=r(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var y=r(t),x=y.next();!x.done;x=y.next()){var w=x.value,C=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],C=w[1]||"und"):(x="CC"+p,2==t.length?p+=2:p++,C=w);v.set(x,Ub(C))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
622
+ 1,null!=t)for(t=r(t.split(";")),x=t.next();!x.done;x=t.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,Ub(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=In(c,"ContentProtection");var D=ao(l,a.s.dash.ignoreDrmInfo,a.s.dash.keySystemsByURI),B=Ub(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=In(c,"Label"))&&l.length&&
623
+ (l=l[0],l.textContent&&(F=l.textContent));l=In(c,"Representation");c=l.map(function(G){if(G=Rp(a,b,D,h,B,F,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.Fa.contentType;if(a.s.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.Fa.contentType||"application"==b.Fa.contentType)for(b.Fa.contentType=Sp(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.Fa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
624
+ m.value,p=r(D.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ha(t.keyIds),ha(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Jb);return{id:b.Fa.id||"__fake__"+a.H++,contentType:b.Fa.contentType,language:B,ti:e,streams:c,drmInfos:D.drmInfos,Ee:f,Rg:k}}
625
+ function Rp(a,b,c,d,e,f,g,h,k,l){b.N=Np(l,b.Fa,null);a.l=Math.min(a.l,b.N.Zb);if(!Tp(b.N))return null;var m=b.aa.start;b.bandwidth=Qn(l,"bandwidth",Vn)||0;var n=b.N.contentType,p=n==Rb||"application"==n;n="image"==n;try{var t=function(G,I,O){return Up(a,G,I,O)};if(b.N.Pc)var v=Co(b,t);else if(b.N.Bb)v=Io(b,a.o);else if(b.N.Qc)v=Uo(b,t,a.o,!!a.F,a.s.dash.initialSegmentLimit,a.L);else{var y=b.N.Ta,x=b.aa.duration||0;v={bc:function(){return Promise.resolve(Vi(m,x,y))}}}}catch(G){if((p||n)&&4002==G.code)return null;
626
+ throw G;}t=In(l,"ContentProtection");t=eo(t,c,a.s.dash.ignoreDrmInfo,a.s.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;In(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(b.N.mimeType="audio/eac3-joc",w=!0);var C=!1;p&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var D;if(n&&((l=In(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile",
627
+ "http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&(D=l.getAttribute("value")),!D))return null;var B;l=b.N.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 F={id:a.H++,originalId:b.N.id,createSegmentIndex:function(){var G;return H(function(I){if(1==I.g){if(F.segmentIndex)return I.C(0);G=F;return u(I,v.bc(),3)}G.segmentIndex=I.h;z(I)})},segmentIndex:null,
628
+ mimeType:b.N.mimeType,codecs:b.N.codecs,frameRate:b.N.frameRate,pixelAspectRatio:b.N.pixelAspectRatio,bandwidth:b.bandwidth,width:b.N.width,height:b.N.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.Fa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.N.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.N.fe,audioSamplingRate:b.N.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:B,tilesLayout:D};return F}
629
+ q.Mc=function(){var a=this,b,c;return H(function(d){switch(d.g){case 1:return b=0,A(d,2),u(d,Gp(a),4);case 4:b=d.h;va(d,3);break;case 2:c=E(d),a.G&&(c.severity=1,a.G.onError(c));case 3:if(!a.G)return d["return"]();Hp(a,b);z(d)}})};function Hp(a,b){0>a.D||a.B.T(Math.max(3,a.D-b,ic(a.I)))}
630
+ function Np(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,fe:null,audioSamplingRate:null,Zb:0};c=c||b.Ta;var d=In(a,"BaseURL"),e=d.map(On),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Qn(a,"frameRate",Yn)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=In(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
631
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=In(a,"AudioChannelConfiguration");m=Vp(m)||b.fe;p=Qn(a,"audioSamplingRate",Wn)||b.audioSamplingRate;f||(f=Sp(g,h));var t=Hn(a,"SegmentBase"),v=Hn(a,"SegmentTemplate"),y=t?Qn(t,"availabilityTimeOffset",Xn)||0:0,x=v?Qn(v,"availabilityTimeOffset",Xn)||0:0;d=d&&d.length?Qn(d[0],"availabilityTimeOffset",Xn)||0:0;d=b.Zb+d+y+x;return{Ta:Mb(c,e),Pc:t||b.Pc,Bb:Hn(a,"SegmentList")||b.Bb,Qc:v||b.Qc,width:Qn(a,"width",Wn)||b.width,height:Qn(a,
632
+ "height",Wn)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),fe:m,audioSamplingRate:p,Zb:d}}
633
+ function Vp(a){a=r(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=
634
+ 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 Tp(a){var b=a.Pc?1:0;b+=a.Bb?1:0;b+=a.Qc?1:0;if(0==b)return a.contentType==Rb||"application"==a.contentType?!0:!1;1!=b&&(a.Pc&&(a.Bb=null),a.Qc=null);return!0}
635
+ function Wp(a,b,c,d){var e,f,g,h,k,l;return H(function(m){if(1==m.g)return e=Mb(b,[c]),f=df(e,a.s.retryParameters),f.method=d,g=a.G.networkingEngine.request(4,f),Ze(a.i,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=Vc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
636
+ function Lp(a,b,c){var d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.s.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){n.C(4);break}h=g.value;A(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.C(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.C(8);
637
+ 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":Ta("NTP UTCTiming scheme is not supported");break;default:Ta("Unrecognized scheme in UTCTiming element",k)}n.C(9);break;case 7:return u(n,Wp(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,Wp(a,b,l,"GET"),11);case 11:return n["return"](n.h);
637
638
  case 9:va(n,3);break;case 5:E(n);case 3:g=f.next();n.C(2);break;case 4:return Ta("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
638
- function Pp(a,b,c,d){var e=d.getAttribute("schemeIdUri")||"",f=d.getAttribute("value")||"",g=Rn(d,"timescale",Xn)||1;d=r(Jn(d,"Event"));for(var h=d.next();!h.done;h=d.next()){h=h.value;var k=Rn(h,"presentationTime",Xn)||0,l=Rn(h,"duration",Xn)||0;k=k/g+b;l=k+l/g;null!=c&&(k=Math.min(k,b+c),l=Math.min(l,b+c));h={schemeIdUri:e,value:f,startTime:k,endTime:l,id:h.getAttribute("id")||"",eventElement:h};a.G.onTimelineRegionAdded(h)}}
639
- function Vp(a,b,c,d){var e,f,g,h,k;return H(function(l){if(1==l.g)return e=kf,f=hj(b,c,d,a.s.retryParameters),g=a.G.networkingEngine,h=g.request(e,f),Ze(a.i,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Tp(a,b){return rd(md(a,b))?Rb:a.split("/")[0]}J("shaka.dash.DashParser",Gp);og.mpd=function(){return new Gp};mg["application/dash+xml"]=function(){return new Gp};mg["video/vnd.mpeg.dash.mpd"]=function(){return new Gp};function Yp(a,b,c,d){this.g=a;this.type=b;this.$=c;this.segments=d||null}function Zp(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Zp.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};
640
- Zp.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function V(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function $p(a,b){var c=a.getAttribute(b);if(!c)throw new O(2,4,4023,b);return c.value}function aq(a,b,c){c=void 0===c?[]:c;this.$=b;this.g=a;this.h=c}function bq(a,b){this.name=a;this.value=b};function cq(a,b){return a.filter(function(c){return c.name==b})}function dq(a,b){return a.filter(function(c){return $p(c,"TYPE")==b})}function eq(a,b){var c=cq(a,b);return c.length?c[0]:null}function fq(a,b,c){c=void 0===c?0:c;return(a=eq(a,b))?Number(a.value):c};function gq(a){this.h=a;this.g=0}function hq(a){iq(a,/[ \t]+/gm)}function iq(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 jq(a){return a.g==a.h.length?null:(a=iq(a,/[^ \t\n]*/gm))?a[0]:null};function kq(){this.g=0}
641
- function lq(a,b,c){b=Vc(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 O(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=mq(a.g++,g),--a.g,nq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;g=r(nb(d));for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=k.xa;var l=k.item;k=k.next;if(/^#(?!EXT)/m.test(l)||e)e=!1;else{l=mq(a.g++,
642
- l);if(oq.includes(l.name)){if(1!=b)throw new O(2,4,4017);k=d.splice(h,d.length-h);d=c;e=[];g=[];h=[];l=null;k=r(k);for(var m=k.next();!m.done;m=k.next())m=m.value,/^(#EXT)/.test(m)?(m=mq(a.g++,m),nq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?l=m:"EXT-X-PART"==m.name?h.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==V(m,"TYPE")?h.push(m):"MAP"==V(m,"TYPE")&&(m.name="EXT-X-MAP",l=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Mb([d],[m.trim()])[0],l&&g.push(l),e.push(new aq(m,g,h)),g=[],h=[]);h.length&&(l&&
643
- g.push(l),e.push(new aq("",g,h)));return new Yp(c,b,f,e)}f.push(l);"EXT-X-STREAM-INF"==l.name&&(l.g.push(new bq("URI",k)),e=!0)}}return new Yp(c,b,f)}function mq(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new O(2,4,4016,b);var d=c[1],e=c[2];c=[];var f;if(e){e=new gq(e);var g;(g=iq(e,/^([^,=]+)(?:,|$)/g))&&(f=g[1]);for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=iq(e,h);)c.push(new bq(g[1],g[2]||g[3]))}return new Zp(a,d,c,f)}
644
- var nq="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(" "),oq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function pq(){}function qq(a){try{var b=rq(a);return Se({uri:a,hf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Qe(c)}}function rq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new O(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new O(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=dd(a):e=Zc(a);return{data:e,contentType:c}}
645
- J("shaka.net.DataUriPlugin",pq);pq.parse=qq;af("data",qq);function sq(){var a=this;this.s=this.G=null;this.za=1;this.l=new Map;this.A=new Map;this.va=new Set;this.g=new Map;this.h=null;this.L="";this.ba=new kq;this.ia=0;this.B=new P(function(){a.Lc()});this.j=tq;this.F=null;this.ha=0;this.H=Infinity;this.X=this.Ka=0;this.D=new Ye;this.R=[];this.K=new Map;this.Ja=!1;this.o=new Map;this.O=null;this.ea=new Map;this.I=new Map;this.i=!1}q=sq.prototype;q.configure=function(a){this.s=a};
646
- q.start=function(a,b){var c=this,d,e;return H(function(f){if(1==f.g)return c.G=b,c.i=b.isLowLatencyMode(),u(f,uq(c,df([a],c.s.retryParameters),0),2);if(3!=f.g)return d=f.h,c.L=d.uri,u(f,vq(c,d.data),3);e=c.ia;0<e&&c.B.T(e);return f["return"](c.F)})};q.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.s=this.G=null;this.va.clear();this.F=null;this.g.clear();this.A.clear();this.o.clear();this.l.clear();return Promise.all(a)};
647
- q.update=function(){var a=this,b,c,d;return H(function(e){if(1==e.g){if(a.j==tq)return e["return"]();b=[];a.O=null;c=Array.from(a.g.values());return c.length?u(e,wq(a,c[0]),2):e.C(2)}for(d=1;d<c.length;d++)b.push(wq(a,c[d]));return u(e,Promise.all(b),0)})};
648
- function wq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return H(function(y){if(1==y.g)return c=xq,d=b.Ef,e=new pb(d),a.i&&b.Jf&&sb(e,new ub("_HLS_skip=YES")),u(y,uq(a,df([e.toString()],a.s.retryParameters),0),2);if(3!=y.g){f=y.h;g=lq(a.ba,f.data,f.uri);if(1!=g.type)throw new O(2,4,4017);h=cq(g.$,"EXT-X-DEFINE");k=yq(a,h);l=b.stream;return u(y,zq(a,b.xd,g,l.type,l.mimeType,b.$d,k,b.Of),3)}m=y.h;l.segmentIndex.fc(m,a.h.xb());m.length&&(n=fq(g.$,"EXT-X-MEDIA-SEQUENCE",0),p=b.$d.get(n),l.segmentIndex.Fb(p));
649
- t=m[m.length-1];if(v=eq(g.$,"EXT-X-ENDLIST"))Aq(a,c.Df),a.h.eb(t.endTime);z(y)})}q.onExpirationUpdated=function(){};
650
- function vq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,D,B,F,G,I,N,K,L,T,W,ja,ha,Z,Ea,wa,Ia,Na,Lb,bb;return H(function(Fa){switch(Fa.g){case 1:c=lq(a.ba,b,a.L);if(0!=c.type)throw new O(2,4,4022);d=cq(c.$,"EXT-X-DEFINE");Bq(a,d);e=cq(c.$,"EXT-X-MEDIA");f=cq(c.$,"EXT-X-STREAM-INF");g=cq(c.$,"EXT-X-IMAGE-STREAM-INF");Cq(a,f);h=cq(c.$,"EXT-X-SESSION-DATA");k=r(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=V(m,"DATA-ID"),p=V(m,"URI"),t=V(m,"LANGUAGE"),v=V(m,"VALUE"),y=(new Map).set("id",n),p&&y.set("uri",
651
- Mb([a.L],[p])[0]),t&&y.set("language",t),v&&y.set("value",v),x=new M("sessiondata",y),a.G)a.G.onEvent(x);return u(Fa,Dq(a,e),2);case 2:return Eq(a,e),u(Fa,Fq(a,f),3);case 3:return w=Fa.h,u(Fa,Gq(a,e),4);case 4:return C=Fa.h,u(Fa,Hq(a,g),5);case 5:D=Fa.h;if(!a.G)throw new O(2,7,7001);if(a.Ja&&0==w.length)throw new O(2,4,4034);F=B=Infinity;G=r(a.g.values());for(I=G.next();!I.done;I=G.next())N=I.value,B=Math.min(B,N.ef),"text"!=N.stream.type&&(F=Math.min(F,N.Eg-N.ef));a.j!=tq?(a.h=new Q(0,a.s.defaultPresentationDelay?
652
- a.s.defaultPresentationDelay:a.X?a.X:3*a.ha),a.h.Qc(!1)):(a.h=new Q(null,0),a.h.Qc(!0));Iq(a);if(a.j!=tq)a.ia=a.H,K=xq,a.j==K.Ie&&(L=a.h.rd,isNaN(a.s.availabilityWindowOverride)||(L=a.s.availabilityWindowOverride),a.h.ze(L));else for(a.h.eb(F),a.h.offset(-B),T=r(a.g.values()),I=T.next();!I.done;I=T.next())W=I.value,W.stream.segmentIndex.offset(-B),W.stream.segmentIndex.wb(0,F);a.R=[];ja=[];ha=r(w);for(Z=ha.next();!Z.done;Z=ha.next())for(Ea=Z.value,wa=r([Ea.video,Ea.audio]),Ia=wa.next();!Ia.done;Ia=
653
- wa.next())(Na=Ia.value)&&ja.push(Na);return u(Fa,Promise.all(ja.map(function(Ae){return H(function(Wf){return u(Wf,Ae.createSegmentIndex(),0)})})),6);case 6:Lb=r(ja);for(Ia=Lb.next();!Ia.done;Ia=Lb.next())bb=Ia.value,a.R.push(bb.segmentIndex.P);Iq(a);a.F={presentationTimeline:a.h,variants:w,textStreams:C,imageStreams:D,offlineSessionIds:[],minBufferTime:0};a.G.makeTextStreamsForClosedCaptions(a.F);z(Fa)}})}
654
- function Bq(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=V(e,"NAME");e=V(e,"VALUE");d&&e&&(a.l.has(d)||a.l.set(d,e))}}function yq(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=V(f,"NAME");var g=V(f,"VALUE");f=V(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.l.get(f))&&c.set(f,e)}return c}
655
- function Cq(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=V(e,"AUDIO");d=V(e,"VIDEO");var g=V(e,"SUBTITLES");e=Jq(a,e);if(g){var h=Pb(Rb,e);a.o.set(g,h);lc(e,h)}f&&(g=Ob("audio",e),a.o.set(f,g));d&&(f=Ob("video",e),a.o.set(d,f))}}
656
- function Gq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return H(function(v){if(1==v.g)return c=dq(b,"SUBTITLES"),d=c.map(function(y){var x,w,C;return H(function(D){if(1==D.g){if(x=a.s.disableText)return D["return"](null);A(D,2);return u(D,Kq(a,y),4)}if(2!=D.g)return w=D.h,D["return"](w.stream);C=E(D);if(a.s.hls.ignoreTextStreamFailures)return D["return"](null);throw C;})}),u(v,Promise.all(d),2);e=v.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=$p(h,"GROUP-ID"),l=a.o.get(k))if(m=a.A.get(k))for(n=
639
+ function Op(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Qn(d,"timescale",Wn)||1;d=r(In(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Qn(k,"presentationTime",Wn)||0,m=Qn(k,"duration",Wn)||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.G.onTimelineRegionAdded(k))}}
640
+ function Up(a,b,c,d){var e,f,g,h,k;return H(function(l){if(1==l.g)return e=kf,f=gj(b,c,d,a.s.retryParameters),g=a.G.networkingEngine,h=g.request(e,f),Ze(a.i,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Sp(a,b){return rd(md(a,b))?Rb:a.split("/")[0]}J("shaka.dash.DashParser",Fp);og.mpd=function(){return new Fp};mg["application/dash+xml"]=function(){return new Fp};mg["video/vnd.mpeg.dash.mpd"]=function(){return new Fp};function Xp(a,b,c,d){this.g=a;this.type=b;this.$=c;this.segments=d||null}function Yp(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Yp.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};
641
+ Yp.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function V(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Zp(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function $p(a,b,c){c=void 0===c?[]:c;this.$=b;this.g=a;this.h=c}function aq(a,b){this.name=a;this.value=b};function bq(a,b){return a.filter(function(c){return c.name==b})}function cq(a,b){return a.filter(function(c){return Zp(c,"TYPE")==b})}function dq(a,b){var c=bq(a,b);return c.length?c[0]:null}function eq(a,b,c){c=void 0===c?0:c;return(a=dq(a,b))?Number(a.value):c};function fq(a){this.h=a;this.g=0}function gq(a){hq(a,/[ \t]+/gm)}function hq(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 iq(a){return a.g==a.h.length?null:(a=hq(a,/[^ \t\n]*/gm))?a[0]:null};function jq(){this.g=0}
642
+ function kq(a,b,c){b=Vc(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=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=lq(a.g++,g),--a.g,mq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;g=r(nb(d));for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=k.xa;var l=k.item;k=k.next;if(/^#(?!EXT)/m.test(l)||e)e=!1;else{l=lq(a.g++,
643
+ l);if(nq.includes(l.name)){if(1!=b)throw new N(2,4,4017);k=d.splice(h,d.length-h);d=c;e=[];g=[];h=[];l=null;k=r(k);for(var m=k.next();!m.done;m=k.next())m=m.value,/^(#EXT)/.test(m)?(m=lq(a.g++,m),mq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?l=m:"EXT-X-PART"==m.name?h.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==V(m,"TYPE")?h.push(m):"MAP"==V(m,"TYPE")&&(m.name="EXT-X-MAP",l=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Mb([d],[m.trim()])[0],l&&g.push(l),e.push(new $p(m,g,h)),g=[],h=[]);h.length&&(l&&
644
+ g.push(l),e.push(new $p("",g,h)));return new Xp(c,b,f,e)}f.push(l);"EXT-X-STREAM-INF"==l.name&&(l.g.push(new aq("URI",k)),e=!0)}}return new Xp(c,b,f)}function lq(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new N(2,4,4016,b);var d=c[1],e=c[2];c=[];var f;if(e){e=new fq(e);var g;(g=hq(e,/^([^,=]+)(?:,|$)/g))&&(f=g[1]);for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=hq(e,h);)c.push(new aq(g[1],g[2]||g[3])),gq(e)}return new Yp(a,d,c,f)}
645
+ var mq="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(" "),nq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function oq(){}function pq(a){try{var b=qq(a);return Se({uri:a,hf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Qe(c)}}function qq(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=dd(a):e=Zc(a);return{data:e,contentType:c}}
646
+ J("shaka.net.DataUriPlugin",oq);oq.parse=pq;af("data",pq);function rq(){var a=this;this.s=this.G=null;this.za=1;this.l=new Map;this.A=new Map;this.qa=new Set;this.g=new Map;this.h=null;this.L="";this.ba=new jq;this.ia=0;this.B=new P(function(){a.Mc()});this.j=sq;this.F=null;this.ha=0;this.H=Infinity;this.S=this.Ka=0;this.D=new Ye;this.Z=[];this.K=new Map;this.Aa=!1;this.o=new Map;this.O=null;this.ea=new Map;this.I=new Map;this.i=!1}q=rq.prototype;q.configure=function(a){this.s=a};
647
+ q.start=function(a,b){var c=this,d,e;return H(function(f){if(1==f.g)return c.G=b,c.i=b.isLowLatencyMode(),u(f,tq(c,df([a],c.s.retryParameters),0),2);if(3!=f.g)return d=f.h,c.L=d.uri,u(f,uq(c,d.data),3);e=c.ia;0<e&&c.B.T(e);return f["return"](c.F)})};q.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.s=this.G=null;this.qa.clear();this.F=null;this.g.clear();this.A.clear();this.o.clear();this.l.clear();return Promise.all(a)};
648
+ q.update=function(){var a=this,b,c,d;return H(function(e){if(1==e.g){if(a.j==sq)return e["return"]();b=[];a.O=null;c=Array.from(a.g.values());return c.length?u(e,vq(a,c[0]),2):e.C(2)}for(d=1;d<c.length;d++)b.push(vq(a,c[d]));return u(e,Promise.all(b),0)})};
649
+ function vq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return H(function(y){if(1==y.g)return c=wq,d=b.Ef,e=new pb(d),a.i&&b.Jf&&sb(e,new ub("_HLS_skip=YES")),u(y,tq(a,df([e.toString()],a.s.retryParameters),0),2);if(3!=y.g){f=y.h;g=kq(a.ba,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=bq(g.$,"EXT-X-DEFINE");k=xq(a,h);l=b.stream;return u(y,yq(a,b.xd,g,l.type,l.mimeType,b.$d,k,b.Of),3)}m=y.h;l.segmentIndex.hc(m,a.h.pb());m.length&&(n=eq(g.$,"EXT-X-MEDIA-SEQUENCE",0),p=b.$d.get(n),l.segmentIndex.Gb(p));
650
+ t=m[m.length-1];if(v=dq(g.$,"EXT-X-ENDLIST"))zq(a,c.Df),a.h.fb(t.endTime);z(y)})}q.onExpirationUpdated=function(){};
651
+ function uq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,D,B,F,G,I,O,K,L,T,X,ia,ja,W,Ea,xa,Ha,Ma,Lb,bb;return H(function(Fa){switch(Fa.g){case 1:c=kq(a.ba,b,a.L);if(0!=c.type)throw new N(2,4,4022);d=bq(c.$,"EXT-X-DEFINE");Aq(a,d);e=bq(c.$,"EXT-X-MEDIA");f=bq(c.$,"EXT-X-STREAM-INF");g=bq(c.$,"EXT-X-IMAGE-STREAM-INF");Bq(a,f);h=bq(c.$,"EXT-X-SESSION-DATA");k=r(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=V(m,"DATA-ID"),p=V(m,"URI"),t=V(m,"LANGUAGE"),v=V(m,"VALUE"),y=(new Map).set("id",n),p&&y.set("uri",
652
+ Mb([a.L],[p])[0]),t&&y.set("language",t),v&&y.set("value",v),x=new M("sessiondata",y),a.G)a.G.onEvent(x);return u(Fa,Cq(a,e),2);case 2:return Dq(a,e),u(Fa,Eq(a,f),3);case 3:return w=Fa.h,u(Fa,Fq(a,e),4);case 4:return C=Fa.h,u(Fa,Gq(a,g),5);case 5:D=Fa.h;if(!a.G)throw new N(2,7,7001);if(a.Aa&&0==w.length)throw new N(2,4,4034);F=B=Infinity;G=r(a.g.values());for(I=G.next();!I.done;I=G.next())O=I.value,B=Math.min(B,O.ef),"text"!=O.stream.type&&(F=Math.min(F,O.Eg-O.ef));a.j!=sq?(a.h=new Q(0,a.s.defaultPresentationDelay?
653
+ a.s.defaultPresentationDelay:a.S?a.S:3*a.ha),a.h.Rc(!1)):(a.h=new Q(null,0),a.h.Rc(!0));Hq(a);if(a.j!=sq)a.ia=a.H,K=wq,a.j==K.Ie&&(L=a.h.rd,isNaN(a.s.availabilityWindowOverride)||(L=a.s.availabilityWindowOverride),a.h.ze(L));else for(a.h.fb(F),a.h.offset(-B),T=r(a.g.values()),I=T.next();!I.done;I=T.next())X=I.value,X.stream.segmentIndex.offset(-B),X.stream.segmentIndex.yb(0,F);a.Z=[];ia=[];ja=r(w);for(W=ja.next();!W.done;W=ja.next())for(Ea=W.value,xa=r([Ea.video,Ea.audio]),Ha=xa.next();!Ha.done;Ha=
654
+ xa.next())(Ma=Ha.value)&&ia.push(Ma);return u(Fa,Promise.all(ia.map(function(Be){return H(function(Xf){return u(Xf,Be.createSegmentIndex(),0)})})),6);case 6:Lb=r(ia);for(Ha=Lb.next();!Ha.done;Ha=Lb.next())bb=Ha.value,a.Z.push(bb.segmentIndex.P);Hq(a);a.F={presentationTimeline:a.h,variants:w,textStreams:C,imageStreams:D,offlineSessionIds:[],minBufferTime:0};a.G.makeTextStreamsForClosedCaptions(a.F);z(Fa)}})}
655
+ function Aq(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=V(e,"NAME");e=V(e,"VALUE");d&&e&&(a.l.has(d)||a.l.set(d,e))}}function xq(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=V(f,"NAME");var g=V(f,"VALUE");f=V(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.l.get(f))&&c.set(f,e)}return c}
656
+ function Bq(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=V(e,"AUDIO");d=V(e,"VIDEO");var g=V(e,"SUBTITLES");e=Iq(a,e);if(g){var h=Pb(Rb,e);a.o.set(g,h);lc(e,h)}f&&(g=Ob("audio",e),a.o.set(f,g));d&&(f=Ob("video",e),a.o.set(d,f))}}
657
+ function Fq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return H(function(v){if(1==v.g)return c=cq(b,"SUBTITLES"),d=c.map(function(y){var x,w,C;return H(function(D){if(1==D.g){if(x=a.s.disableText)return D["return"](null);A(D,2);return u(D,Jq(a,y),4)}if(2!=D.g)return w=D.h,D["return"](w.stream);C=E(D);if(a.s.hls.ignoreTextStreamFailures)return D["return"](null);throw C;})}),u(v,Promise.all(d),2);e=v.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Zp(h,"GROUP-ID"),l=a.o.get(k))if(m=a.A.get(k))for(n=
657
658
  r(m),p=n.next();!p.done;p=n.next())t=p.value,t.stream.codecs=l;return v["return"](e.filter(function(y){return y}))})}
658
- function Hq(a,b){var c,d;return H(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return H(function(l){if(1==l.g){if(g=a.s.disableThumbnails)return l["return"](null);A(l,2);return u(l,Lq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=E(l);if(a.s.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}))})}
659
- function Dq(a,b){var c;return H(function(d){if(1==d.g)return b=b.filter(function(e){var f=V(e,"URI")||"";return"SUBTITLES"!=V(e,"TYPE")&&""!=f}),b.length?u(d,Kq(a,b[0]),2):d.C(2);c=b.slice(1).map(function(e){return Kq(a,e)});return u(d,Promise.all(c),0)})}
660
- function Fq(a,b){var c,d,e;return H(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,t,v;return H(function(y){if(1==y.g)return h=V(g,"FRAME-RATE"),k=Number(V(g,"AVERAGE-BANDWIDTH"))||Number($p(g,"BANDWIDTH")),l=V(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t=V(g,"VIDEO-RANGE"),u(y,Mq(a,g),2);if(v=y.h){for(var x=y["return"],w=v.audio,C=v.video,D=r(C),B=D.next();!B.done;B=D.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
661
- void 0,B.frameRate=Number(h)||void 0,B.hdr=t||void 0;D=a.s.disableAudio;if(!w.length||D)w=[null];D=a.s.disableVideo;if(!C.length||D)C=[null];D=[];w=r(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var F=r(C),G=F.next();!G.done;G=F.next()){var I=G.value;G=B?B.stream:null;var N=I?I.stream:null,K=B?B.stream.drmInfos:null,L=I?I.stream.drmInfos:null;I=(I?I.xd:"")+" - "+(B?B.xd:"");G&&N&&K.length&&L.length&&!(0<ig(K,L).length)||a.va.has(I)||(G={id:a.za++,language:G?G.language:"und",primary:!!G&&G.primary||
662
- !!N&&N.primary,audio:G,video:N,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},D.push(G),a.va.add(I))}}y=x.call(y,D)}else y=y["return"]([]);return y})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Hb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
663
- function Mq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;return H(function(x){if(1==x.g)return c=Sb,d=Jq(a,b),e=V(b,"AUDIO"),f=V(b,"VIDEO"),h=(g=e||f)&&a.A.has(g)?a.A.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=$p(b,"URI"),p=k.audio.find(function(w){return w&&w.xd==n}),t=Pb(c.ib,d),(v=Pb(c.Bb,d))&&!t?l=c.Bb:!h.length&&v&&t?(l=c.ib,d=[[t,v].join()]):k.audio.length&&p?(l=c.Bb,m=!0):l=k.video.length?c.Bb:c.ib,m?x.C(2):u(x,Nq(a,b,d,l),3);2!=x.g&&(y=x.h);if(y)k[y.stream.type]=[y];else if(null===y)return x["return"](null);
664
- Oq(k);return x["return"](k)})}function Jq(a,b){var c=[];a.s.disableVideo||c.push("avc1.42E01E");a.s.disableAudio||c.push("mp4a.40.2");var d=V(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=od(f);c.has(g)||(e.push(f),c.add(g))}return e}function Pq(a){a=V(a,"LANGUAGE")||"und";return Ub(a)}
665
- function Oq(a){a=r(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 Eq(a,b){var c=dq(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Pq(e);var f=$p(e,"GROUP-ID");e=$p(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
666
- function Kq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;return H(function(x){if(1==x.g){c=$p(b,"GROUP-ID");d="";var w=$p(b,"TYPE").toLowerCase();"subtitles"==w&&(w=Rb);e=w;e!=Rb&&c&&a.o.has(c)&&(d=a.o.get(c));f=Qq($p(b,"URI"),a.l);if(a.g.has(f))return x["return"](a.g.get(f));g=Pq(b);h=V(b,"NAME");k=V(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=V(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=V(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;n=w;p=V(b,"CHARACTERISTICS");t=V(b,"FORCED");
667
- v="YES"==t;return u(x,Rq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.A.has(c)?a.A.get(c).push(y):a.A.set(c,[y]);if(null==y)return x["return"](null);if(a.g.has(f))return x["return"](a.g.get(f));a.g.set(f,y);return x["return"](y)})}
668
- function Lq(a,b){var c,d,e,f,g,h,k,l,m,n;return H(function(p){if(1==p.g){c=Qq($p(b,"URI"),a.l);d=V(b,"CODECS","jpeg")||"";if(a.g.has(c))return p["return"](a.g.get(c));e=Pq(b);f=V(b,"NAME");g=V(b,"CHARACTERISTICS");return u(p,Rq(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.g.has(c))return p["return"](a.g.get(c));if(k=V(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=
659
+ function Gq(a,b){var c,d;return H(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return H(function(l){if(1==l.g){if(g=a.s.disableThumbnails)return l["return"](null);A(l,2);return u(l,Kq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=E(l);if(a.s.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}))})}
660
+ function Cq(a,b){var c;return H(function(d){if(1==d.g)return b=b.filter(function(e){var f=V(e,"URI")||"";return"SUBTITLES"!=V(e,"TYPE")&&""!=f}),b.length?u(d,Jq(a,b[0]),2):d.C(2);c=b.slice(1).map(function(e){return Jq(a,e)});return u(d,Promise.all(c),0)})}
661
+ function Eq(a,b){var c,d,e;return H(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,t,v;return H(function(y){if(1==y.g)return h=V(g,"FRAME-RATE"),k=Number(V(g,"AVERAGE-BANDWIDTH"))||Number(Zp(g,"BANDWIDTH")),l=V(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t=V(g,"VIDEO-RANGE"),u(y,Lq(a,g),2);if(v=y.h){for(var x=y["return"],w=v.audio,C=v.video,D=r(C),B=D.next();!B.done;B=D.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
662
+ void 0,B.frameRate=Number(h)||void 0,B.hdr=t||void 0;D=a.s.disableAudio;if(!w.length||D)w=[null];D=a.s.disableVideo;if(!C.length||D)C=[null];D=[];w=r(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var F=r(C),G=F.next();!G.done;G=F.next()){var I=G.value;G=B?B.stream:null;var O=I?I.stream:null,K=B?B.stream.drmInfos:null,L=I?I.stream.drmInfos:null;I=(I?I.xd:"")+" - "+(B?B.xd:"");G&&O&&K.length&&L.length&&!(0<ig(K,L).length)||a.qa.has(I)||(G={id:a.za++,language:G?G.language:"und",primary:!!G&&G.primary||
663
+ !!O&&O.primary,audio:G,video:O,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},D.push(G),a.qa.add(I))}}y=x.call(y,D)}else y=y["return"]([]);return y})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Hb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
664
+ function Lq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;return H(function(x){if(1==x.g)return c=Sb,d=Iq(a,b),e=V(b,"AUDIO"),f=V(b,"VIDEO"),h=(g=e||f)&&a.A.has(g)?a.A.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=Zp(b,"URI"),p=k.audio.find(function(w){return w&&w.xd==n}),t=Pb(c.ib,d),(v=Pb(c.Cb,d))&&!t?l=c.Cb:!h.length&&v&&t?(l=c.ib,d=[[t,v].join()]):k.audio.length&&p?(l=c.Cb,m=!0):l=k.video.length?c.Cb:c.ib,m?x.C(2):u(x,Mq(a,b,d,l),3);2!=x.g&&(y=x.h);if(y)k[y.stream.type]=[y];else if(null===y)return x["return"](null);
665
+ Nq(k);return x["return"](k)})}function Iq(a,b){var c=[];a.s.disableVideo||c.push("avc1.42E01E");a.s.disableAudio||c.push("mp4a.40.2");var d=V(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=od(f);c.has(g)||(e.push(f),c.add(g))}return e}function Oq(a){a=V(a,"LANGUAGE")||"und";return Ub(a)}
666
+ function Nq(a){a=r(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 Dq(a,b){var c=cq(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Oq(e);var f=Zp(e,"GROUP-ID");e=Zp(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
667
+ function Jq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;return H(function(x){if(1==x.g){c=Zp(b,"GROUP-ID");d="";var w=Zp(b,"TYPE").toLowerCase();"subtitles"==w&&(w=Rb);e=w;e!=Rb&&c&&a.o.has(c)&&(d=a.o.get(c));f=Pq(Zp(b,"URI"),a.l);if(a.g.has(f))return x["return"](a.g.get(f));g=Oq(b);h=V(b,"NAME");k=V(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=V(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=V(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;n=w;p=V(b,"CHARACTERISTICS");t=V(b,"FORCED");
668
+ v="YES"==t;return u(x,Qq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.A.has(c)?a.A.get(c).push(y):a.A.set(c,[y]);if(null==y)return x["return"](null);if(a.g.has(f))return x["return"](a.g.get(f));a.g.set(f,y);return x["return"](y)})}
669
+ function Kq(a,b){var c,d,e,f,g,h,k,l,m,n;return H(function(p){if(1==p.g){c=Pq(Zp(b,"URI"),a.l);d=V(b,"CODECS","jpeg")||"";if(a.g.has(c))return p["return"](a.g.get(c));e=Oq(b);f=V(b,"NAME");g=V(b,"CHARACTERISTICS");return u(p,Qq(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.g.has(c))return p["return"](a.g.get(c));if(k=V(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=
669
670
  Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=V(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.g.set(c,h);return p["return"](h)})}
670
- function Nq(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g){e=Qq($p(b,"URI"),a.l);if(a.g.has(e))return k["return"](a.g.get(e));var l=V(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.K.get(l):null;g=Ob(d,c);return u(k,Rq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.g.has(e))return k["return"](a.g.get(e));a.g.set(e,h);return k["return"](h)})}
671
- function Rq(a,b,c,d,e,f,g,h,k,l,m,n){var p,t,v,y,x,w,C,D,B,F,G,I,N,K,L,T,W,ja,ha,Z,Ea,wa,Ia,Na,Lb,bb,Fa,Ae,Wf,Lo,Mo,No,yi,zi,Xf,Oo,Po,Qo,Ro;return H(function(mb){switch(mb.g){case 1:return p=Mb([a.L],[b])[0],u(mb,uq(a,df([p],a.s.retryParameters),0),2);case 2:t=mb.h;p=t.uri;v=lq(a.ba,t.data,p);if(1!=v.type)throw new O(2,4,4017);y=[];if(v.segments)for(x=r(v.segments),w=x.next();!w.done;w=x.next())C=w.value,D=cq(C.$,"EXT-X-KEY"),y.push.apply(y,ia(D));B=!1;F=[];G=new Set;I=r(y);for(N=I.next();!N.done;N=
672
- I.next())if(K=N.value,L=$p(K,"METHOD"),"NONE"!=L){B=!0;if("AES-128"==L)return a.Ja=!0,mb["return"](null);T=$p(K,"KEYFORMAT");if(ja=(W=Sq[T])?W(K):null){if(ja.keyIds)for(ha=r(ja.keyIds),Z=ha.next();!Z.done;Z=ha.next())Ea=Z.value,G.add(Ea);F.push(ja)}}if(B&&!F.length)throw new O(2,4,4026);wa=cq(v.$,"EXT-X-DEFINE");Ia=yq(a,wa);Tq(a,v);return u(mb,Uq(a,d,c,v,Ia),3);case 3:return Na=mb.h,Vq.includes(Na)&&(c=""),Lb=new Map,bb=new Map,A(mb,4),u(mb,zq(a,b,v,d,Na,Lb,Ia,bb),6);case 6:Fa=mb.h;va(mb,5);break;
673
- case 4:Ae=E(mb);if(4035==Ae.code)return Ta("Skipping unsupported HLS stream",Na,b),mb["return"](null);throw Ae;case 5:Wf=Fa[0].startTime;Lo=Fa[Fa.length-1].endTime;Mo=new Ti(Fa);No=d==Rb?"subtitle":void 0;yi=[];if(l)for(zi=r(l.split(",")),Xf=zi.next();!Xf.done;Xf=zi.next())Oo=Xf.value,yi.push(Oo);Qo=(Po=eq(v.$,"EXT-X-SERVER-CONTROL"))?null!=Po.getAttribute("CAN-SKIP-UNTIL"):!1;Ro={id:a.za++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Mo,mimeType:Na,codecs:c,kind:No,
674
- encrypted:B,drmInfos:F,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:yi,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return mb["return"]({stream:Ro,xd:b,Ef:p,ef:Wf,Eg:Lo,$d:Lb,Of:bb,Jf:Qo})}})}
675
- function Tq(a,b){var c=eq(b.$,"EXT-X-PLAYLIST-TYPE"),d=eq(b.$,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Aq(a,tq);else{c?Aq(a,Wq):Aq(a,Xq);d=eq(b.$,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=eq(b.$,"EXT-X-PART-INF");a.i&&c?(a.Ka=Number($p(c,"PART-TARGET")),a.H=Math.min(a.Ka,a.H),c=eq(b.$,"EXT-X-SERVER-CONTROL"),a.X=c?Number($p(c,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.ha=Math.max(d,a.ha)}}
676
- function Yq(a,b,c,d){c=eq(c,"EXT-X-MAP");if(!c)return null;var e=$p(c,"URI");d=Qq(Mb([b],[e])[0],d);b=[d,V(c,"BYTERANGE","")].join("-");a.ea.has(b)||(c=Zq(d,c),a.ea.set(b,c));return a.ea.get(b)}function Zq(a,b){var c=0,d=null,e=V(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new si(function(){return[a]},c,d)}
677
- function $q(a,b,c,d,e,f,g,h,k){var l=d.$,m=Qq(d.g,g),n=eq(l,"EXTINF"),p=g=0,t=null,v=[];if(a.i&&d.h.length){a={};d=r(nb(d.h));for(var y=d.next();!y.done;a={Hd:a.Hd},y=d.next()){y=y.value;var x=y.xa;y=y.item;var w=0==x?c:v[v.length-1];x=0==x?e:w.endTime;var C=Number(V(y,"DURATION"));C=x+C;var D=0,B=null;"EXT-X-PRELOAD-HINT"==y.name?D=(w=V(y,"BYTERANGE-START"))?Number(w):0:(D=V(y,"BYTERANGE"),w=r(ar(w,D)),D=w.next().value,B=w.next().value);y=V(y,"URI");a.Hd=Mb([h],[y])[0];v.push(new ui(x,C,function(F){return function(){return[F.Hd]}}(a),
678
- D,B,b,f,0,Infinity))}}else if(!n)throw new O(2,4,4024,"EXTINF");n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(h=eq(l,"EXT-X-BYTERANGE"))?(t=r(ar(c,h.value)),p=t.next().value,t=t.next().value):v.length&&(p=v[0].Ca,t=v[v.length-1].wa);c="";h=null;"image"==k&&(c="1x1",k=eq(l,"EXT-X-TILES"))&&(c=$p(k,"LAYOUT"),(k=V(k,"DURATION"))&&(h=Number(k)));return new ui(e,g,function(){return m.length?[m]:[]},p,t,b,f,0,Infinity,v,c,h)}
679
- function ar(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.wa+1,d=c+d-1);return[c,d]}function Iq(a){if(a.h){for(var b=r(a.R),c=b.next();!c.done;c=b.next())a.h.hc(c.value);a.R=[]}}
680
- function zq(a,b,c,d,e,f,g,h){var k,l,m,n,p,t,v,y,x,w,C,D,B,F,G,I,N,K,L,T,W,ja,ha,Z,Ea;return H(function(wa){switch(wa.g){case 1:k=c.segments;m=fq(c.$,"EXT-X-MEDIA-SEQUENCE",0);p=(n=eq(c.$,"EXT-X-SKIP"))?Number(V(n,"SKIPPED-SEGMENTS")):0;t=m+p;if(a.j!=tq&&f.has(t)){v=f.get(t);wa.C(2);break}if(null!=a.O){wa.C(3);break}l=Yq(a,c.g,k[0].$,g);y=a;return u(wa,br(a,b,l,e,t,!1,k[0],g,d),4);case 4:y.O=wa.h;case 3:v=a.O;case 2:x=k[0].g;Xa(x.split("/").pop());w=fq(c.$,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.i&&
681
- (h.has(w)||h.set(w,t),p))for(;h.has(w+1)&&h.get(w+1)<t;)w++;C=a.I.get(w)||0;D=[];B=function(Ia){return nb(Ia)};F=r(B(k));G=F.next();case 5:if(G.done){wa.C(7);break}N=I=G.value;K=N.xa;L=N.item;T=D[D.length-1];W=0==K?v:T.endTime;t=m+p+K;f.set(t,W);l=Yq(a,c.g,L.$,g);ja=eq(L.$,"EXT-X-DISCONTINUITY");if(!ja){wa.C(8);break}w++;h.set(w,t);return u(wa,cr(a,w,b,l,e,t,L,g,W,d),9);case 9:C=wa.h;case 8:!a.i&&(ha=a.G.isAutoLowLatencyMode())&&(a.G.enableLowLatencyMode(),a.i=a.G.isLowLatencyMode());Z=eq(L.$,"EXTINF");
682
- a.i||Z?(Ea=$q(a,l,T,L,W,C,g,c.g,d),D.push(Ea)):a.i||Ta("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.");G=F.next();wa.C(5);break;case 7:return wa["return"](D)}})}
683
- function cr(a,b,c,d,e,f,g,h,k,l){var m,n;return H(function(p){if(1==p.g)return m=0,a.I.has(b)?(m=a.I.get(b),p.C(2)):u(p,br(a,c,d,e,f,!0,g,h,l),3);2!=p.g&&(n=p.h,m=k-n,a.I.set(b,m));return p["return"](m)})}
684
- function dr(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:c=kf;d=hj(b.Ga(),b.Ca,b.wa,a.s.retryParameters);if(a.s.hls.useFullSegmentsForStartTime)return k["return"](uq(a,d,c));e=hj(b.Ga(),b.Ca,b.Ca+2048-1,a.s.retryParameters);A(k,2);return u(k,uq(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=E(k);if(7001==g.code)throw g;Ta("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",
685
- e.uris[0]);return u(k,uq(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
686
- function br(a,b,c,d,e,f,g,h,k){var l,m,n,p,t,v,y,x;return H(function(w){switch(w.g){case 1:l=$q(a,c,null,g,0,0,h,"",k);if(a.F&&!f&&(m=a.g.get(b),n=m.$d.get(e),void 0!=n))return w["return"](n);d=d.toLowerCase();if(Vq.includes(d))throw Ta("Raw formats are not yet supported. Skipping "+d),new O(1,4,4035);if("video/webm"==d)throw Ta("WebM in HLS is not yet supported. Skipping."),new O(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.C(2);break}p=[dr(a,l)];c&&p.push(dr(a,c));return u(w,Promise.all(p),
687
- 3);case 3:return t=w.h,v=t[0],y=t[1]||t[0],w["return"](er(b,v.uri,v.data,y.data));case 2:if("video/mp2t"!=d){w.C(4);break}return u(w,dr(a,l),5);case 5:return x=w.h,w["return"](fr(b,x.uri,x.data));case 4:throw new O(2,4,4030,b);}})}
688
- function er(a,b,c,d){var e=0;(new tg).box("moov",xg).box("trak",xg).box("mdia",xg).Y("mdhd",function(h){e=Oh(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new O(2,4,4030,a,b);var f=0,g=!1;(new tg).box("moof",xg).box("traf",xg).Y("tfdt",function(h){f=Nh(h.reader,h.version).Qd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new O(2,4,4030,a,b);return f}
689
- function fr(a,b,c){function d(){f.seek(g+188);h=f.na();71!=h&&(f.seek(g+192),h=f.na());71!=h&&(f.seek(g+204),h=f.na());71!=h&&e();f.nf(1)}function e(){throw new O(2,4,4030,a,b);}var f=new qg(c,0),g=0,h=0;for(c=Math.min(f.V.byteLength-188,940);;){g=f.ma();h=f.na();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.kc();if(8191==(k&8191))d();else if(k&16384)if(k=(f.na()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.na(),f.skip(k)),1!=f.S()>>8)d();else{f.skip(3);c=f.na()>>6;0!=c&&1!=c||e();0==f.na()&&e();c=f.na();k=
690
- f.kc();var l=f.kc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Qq(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(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 O(2,4,4039,f);}}return c}
691
- function Uq(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y;return H(function(x){if(1==x.g){f=Sb;g=kf;h=Qq(d.segments[0].g,e);k=new pb(h);l=k.Ra.split(".").pop();m=gr[b];if(n=m[l])return x["return"](n);if(b==f.qa)return c&&"vtt"!=c&&"wvtt"!=c?x["return"]("application/mp4"):x["return"]("text/vtt");if(b==f.vc&&(!c||"jpeg"==c))return x["return"]("image/jpeg");p=df([h],a.s.retryParameters);p.method="HEAD";return u(x,uq(a,p,g),2)}t=x.h;v=t.headers["content-type"];return v?x["return"](v.split(";")[0]):(y=m.mp4,x["return"](y))})}
692
- q.Lc=function(){var a=this,b,c;return H(function(d){if(1==d.g){if(!a.G)return d["return"]();A(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.ia,a.B.T(b),va(d,0);c=E(d);if(!a.G)return d["return"]();c.severity=1;a.G.onError(c);a.B.T(.1);z(d)})};function Aq(a,b){a.j=b;a.h&&a.h.Qc(a.j==tq);a.j!=tq||a.B.stop()}function uq(a,b,c){if(!a.D)throw new O(2,7,7001);b=a.G.networkingEngine.request(c,b);Ze(a.D,b);return b.promise}J("shaka.hls.HlsParser",sq);
693
- var Vq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],gr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
694
- vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Sq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=$p(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=$p(a,"URI");b=rq(b);b=Lc(b.data);b=Nb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=V(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
695
- $p(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=$p(a,"URI");a=rq(a);a=Lc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Gn(a,b);return Nb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},tq="VOD",Xq="EVENT",Wq="LIVE",xq={Df:tq,uh:Xq,Ie:Wq};og.m3u8=function(){return new sq};mg["application/x-mpegurl"]=function(){return new sq};mg["application/vnd.apple.mpegurl"]=function(){return new sq};function hr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,hf:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Yc(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function ir(){}function jr(a,b,c,d){var e=new kr;vf(b.headers).forEach(function(k,l){e.append(l,k)});var f=new lr,g={Le:!1,yf:!1};a=mr(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new Pe(a,function(){g.Le=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new P(function(){g.yf=!0;f.abort()});h.T(b/1E3);a["finally"](function(){h.stop()})}return a}
696
- function mr(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,y,x,w,C,D;return H(function(B){switch(B.g){case 1:return g=nr,h=or,n=m=0,p=Date.now(),A(B,2),u(B,g(a,c),4);case 4:return k=B.h,t=k.clone().body.getReader(),y=(v=k.headers.get("Content-Length"))?parseInt(v,10):0,x=function(F){function G(){var I,N;return H(function(K){switch(K.g){case 1:return A(K,2),u(K,t.read(),4);case 4:I=K.h;va(K,3);break;case 2:return E(K),K["return"]();case 3:if(I.done){K.C(5);break}m+=I.value.byteLength;if(!f){K.C(5);break}return u(K,
697
- f(I.value),5);case 5:N=Date.now();if(100<N-p||I.done)e(N-p,m-n,y-m),n=m,p=N;I.done?F.close():(F.enqueue(I.value),G());z(K)}})}G()},new h({start:x}),u(B,k.arrayBuffer(),5);case 5:l=B.h;va(B,3);break;case 2:w=E(B);if(d.Le)throw new O(1,1,7001,a,b);if(d.yf)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,w,b);case 3:return C={},D=k.headers,D.forEach(function(F,G){C[G.trim()]=F}),B["return"](hr(C,l,k.status,a,k.url,b))}})}
698
- function pr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}J("shaka.net.HttpFetchPlugin",ir);ir.isSupported=pr;ir.parse=jr;var nr=window.fetch,lr=window.AbortController,or=window.ReadableStream,kr=window.Headers;pr()&&(af("http",jr,2,!0),af("https",jr,2,!0));function qr(){}
699
- function rr(a,b,c,d){var e=new sr,f=Date.now(),g=0,h=new Promise(function(k,l){e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onabort=function(){l(new O(1,1,7001,a,c))};e.onload=function(n){n=n.target;var p=n.getAllResponseHeaders().trim().split("\r\n"),t={};p=r(p);for(var v=p.next();!v.done;v=p.next())v=v.value.split(": "),t[v[0].toLowerCase()]=v.slice(1).join(": ");try{var y=hr(t,n.response,n.status,a,n.responseURL,
700
- c);k(y)}catch(x){l(x)}};e.onerror=function(n){l(new O(1,1,1002,a,n,c))};e.ontimeout=function(){l(new O(1,1,1003,a,c))};e.onprogress=function(n){var p=Date.now();if(100<p-f||n.lengthComputable&&n.loaded==n.total)d(p-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=p};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new Pe(h,function(){e.abort();return Promise.resolve()})}J("shaka.net.HttpXHRPlugin",qr);qr.parse=rr;var sr=window.XMLHttpRequest;
701
- af("http",rr,1,!0);af("https",rr,1,!0);function tr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function ur(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}tr.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 vr(a){var b=this;this.U=a;this.g=new Map;this.M=new lf(function(){return wr(b)["catch"](function(){})});this.h=[];this.kf=function(){};this.jf=function(){};this.wc=new tr}vr.prototype.destroy=function(){return this.M.destroy()};function xr(a,b,c){a.kf=b;a.jf=c}function wr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
702
- function yr(a,b,c,d,e,f){mf(a.M);var g=ur(a.wc,d);d=(a.g.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return H(function(v){if(1==v.g)return u(v,zr(a,c),2);h=v.h;if(a.M.g)throw new O(2,9,7001);if(e)for(m in k=Lc(h),l=new Fn(k),l.data)n=Number(m),p=l.data[n],t=l.g[n],a.jf(p,t);a.wc.close(g,h.byteLength);var y=a.wc;a.kf(0==y.i?0:y.j/y.i,a.wc.h);return v["return"](f(h))})});a.g.set(b,d);return d}
703
- function Ar(a,b,c){mf(a.M);var d=(a.g.get(b)||Promise.resolve()).then(function(){return H(function(e){return u(e,c(),0)})});a.g.set(b,d)}function Br(a){return H(function(b){return 1==b.g?u(b,Promise.all(a.g.values()),2):b["return"](a.wc.h)})}function zr(a,b){var c,d,e,f;return H(function(g){if(1==g.g)return c=kf,d=a.U.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;lc(a.h,e);return g["return"](f.data)})};function Cr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Sc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Cr.prototype.abort=function(){var a=this;return H(function(b){if(1==b.g){try{a.i.abort()}catch(c){}A(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);E(b);z(b)})};
704
- function Dr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return H(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}Cr.prototype.store=function(){return this.h};Cr.prototype.promise=function(){return this.g};function Er(a){this.h=a;this.g=[]}Er.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Fr(a,b){return Gr(a,b,"readwrite")}function Gr(a,b,c){c=a.h.transaction([b],c);var d=new Cr(c,b);a.g.push(d);d.promise().then(function(){lc(a.g,d)},function(){lc(a.g,d)});return d};function Hr(a,b,c){this.g=new Er(a);this.i=b;this.h=c}q=Hr.prototype;q.destroy=function(){return this.g.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Ir(this.i)};q.removeSegments=function(a,b){return Jr(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return H(function(d){if(1==d.g)return u(d,Kr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Oe(e)}))})};q.addManifests=function(){return Ir(this.h)};
705
- q.updateManifestExpiration=function(a,b){var c=Fr(this.g,this.h),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return Jr(this,this.h,a,b)};q.getManifests=function(a){var b=this,c;return H(function(d){if(1==d.g)return u(d,Kr(b,b.h,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.zc(e)})))})};
706
- q.getAllManifests=function(){var a=this,b,c;return H(function(d){return 1==d.g?(b=Gr(a.g,a.h,"readonly"),c=new Map,u(d,Dr(b,function(e,f){var g;return H(function(h){if(1==h.g)return u(h,a.zc(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};q.Oe=function(a){return a};q.zc=function(a){return Promise.resolve(a)};function Ir(a){return Promise.reject(new O(2,9,9011,"Cannot add new value to "+a))}
707
- q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){if(1==m.g){d=Fr(c.g,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Vc:g.Vc},k=h.next())l=k.value,g.Vc=e.add(l),g.Vc.onsuccess=function(n){return function(){f.push(n.Vc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
708
- function Jr(a,b,c,d){a=Fr(a.g,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Uc:e.Uc},f=c.next())e.Uc=f.value,b["delete"](e.Uc).onsuccess=function(g){return function(){return d(g.Uc)}}(e);return a.promise()}
709
- function Kr(a,b,c){var d,e,f,g,h,k,l;return H(function(m){if(1==m.g){d=Gr(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={tc:h.tc,pc:h.pc},l=k.next())h.pc=l.value,h.tc=e.get(h.pc),h.tc.onsuccess=function(n){return function(){void 0==n.tc.result&&g.push(n.pc);f[n.pc]=n.tc.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new O(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function Lr(a){this.g=new Er(a)}Lr.prototype.destroy=function(){return this.g.destroy()};Lr.prototype.getAll=function(){var a=this,b,c;return H(function(d){return 1==d.g?(b=Gr(a.g,"session-ids","readonly"),c=[],u(d,Dr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};Lr.prototype.add=function(a){var b=Fr(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
710
- Lr.prototype.remove=function(a){var b=this,c;return H(function(d){return 1==d.g?(c=Fr(b.g,"session-ids"),u(d,Dr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function Mr(){this.g=new Map}Mr.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Mr.prototype.init=function(){var a=this;Nr.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
711
- function Or(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{bb:d,Fa:f},Fa:e})})});if(b)return b;throw new O(2,9,9013,"Could not find a cell that supports add-operations");}function Pr(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({bb:d,Fa:f},e)})})}
712
- function Qr(a,b,c){a=a.g.get(b);if(!a)throw new O(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new O(2,9,9013,"Could not find cell with name "+c);return b}function Rr(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Sr(a){var b=Array.from(a.g.keys());if(!b.length)throw new O(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
713
- function Tr(a){var b,c,d;return H(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Nr,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.C(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Ur(a,b){Nr.set(a,b)}J("shaka.offline.StorageMuxer",Mr);Mr.unregister=function(a){Nr["delete"](a)};Mr.register=Ur;Mr.prototype.destroy=Mr.prototype.destroy;var Nr=new Map;function Vr(){Hr.apply(this,arguments)}qa(Vr,Hr);Vr.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return H(function(g){d=Fr(c.g,c.h);e=d.store();f=new Sc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new O(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
714
- Vr.prototype.zc=function(a){var b,c,d,e,f,g;return H(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=Wr(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})})};
715
- function Wr(a,b){Xr(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Yr(e,a.startTime,b)})}
716
- function Yr(a,b,c){var d=a.initSegmentUri?Zr(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=Zr(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
717
- 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}}Vr.prototype.Oe=function(a){return{data:a.data}};function Zr(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 O(2,9,9004,"Could not parse uri "+a);}
718
- function Xr(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=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
719
- f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function $r(){Hr.apply(this,arguments)}qa($r,Hr);
720
- $r.prototype.zc=function(a){var b,c,d,e,f,g;return H(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=r(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(as(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==
671
+ function Mq(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g){e=Pq(Zp(b,"URI"),a.l);if(a.g.has(e))return k["return"](a.g.get(e));var l=V(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.K.get(l):null;g=Ob(d,c);return u(k,Qq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.g.has(e))return k["return"](a.g.get(e));a.g.set(e,h);return k["return"](h)})}
672
+ function Qq(a,b,c,d,e,f,g,h,k,l,m,n){var p,t,v,y,x,w,C,D,B,F,G,I,O,K,L,T,X,ia,ja,W,Ea,xa,Ha,Ma,Lb,bb,Fa,Be,Xf,Mo,No,Oo,Bi,Ci,Yf,Po,Qo,Ro,So;return H(function(mb){switch(mb.g){case 1:return p=Mb([a.L],[b])[0],u(mb,tq(a,df([p],a.s.retryParameters),0),2);case 2:t=mb.h;p=t.uri;v=kq(a.ba,t.data,p);if(1!=v.type)throw new N(2,4,4017);y=[];if(v.segments)for(x=r(v.segments),w=x.next();!w.done;w=x.next())C=w.value,D=bq(C.$,"EXT-X-KEY"),y.push.apply(y,ha(D));B=!1;F=[];G=new Set;I=r(y);for(O=I.next();!O.done;O=
673
+ I.next())if(K=O.value,L=Zp(K,"METHOD"),"NONE"!=L){B=!0;if("AES-128"==L)return a.Aa=!0,mb["return"](null);T=Zp(K,"KEYFORMAT");if(ia=(X=Rq[T])?X(K):null){if(ia.keyIds)for(ja=r(ia.keyIds),W=ja.next();!W.done;W=ja.next())Ea=W.value,G.add(Ea);F.push(ia)}}if(B&&!F.length)throw new N(2,4,4026);xa=bq(v.$,"EXT-X-DEFINE");Ha=xq(a,xa);Sq(a,v);return u(mb,Tq(a,d,c,v,Ha),3);case 3:return Ma=mb.h,Uq.includes(Ma)&&(c=""),Lb=new Map,bb=new Map,A(mb,4),u(mb,yq(a,b,v,d,Ma,Lb,Ha,bb),6);case 6:Fa=mb.h;va(mb,5);break;
674
+ case 4:Be=E(mb);if(4035==Be.code)return Ta("Skipping unsupported HLS stream",Ma,b),mb["return"](null);throw Be;case 5:Xf=Fa[0].startTime;Mo=Fa[Fa.length-1].endTime;No=new Ti(Fa);Oo=d==Rb?"subtitle":void 0;Bi=[];if(l)for(Ci=r(l.split(",")),Yf=Ci.next();!Yf.done;Yf=Ci.next())Po=Yf.value,Bi.push(Po);Ro=(Qo=dq(v.$,"EXT-X-SERVER-CONTROL"))?null!=Qo.getAttribute("CAN-SKIP-UNTIL"):!1;So={id:a.za++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:No,mimeType:Ma,codecs:c,kind:Oo,
675
+ encrypted:B,drmInfos:F,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Bi,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return mb["return"]({stream:So,xd:b,Ef:p,ef:Xf,Eg:Mo,$d:Lb,Of:bb,Jf:Ro})}})}
676
+ function Sq(a,b){var c=dq(b.$,"EXT-X-PLAYLIST-TYPE"),d=dq(b.$,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)zq(a,sq);else{c?zq(a,Vq):zq(a,Wq);d=dq(b.$,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=dq(b.$,"EXT-X-PART-INF");a.i&&c?(a.Ka=Number(Zp(c,"PART-TARGET")),a.H=Math.min(a.Ka,a.H),c=dq(b.$,"EXT-X-SERVER-CONTROL"),a.S=c?Number(Zp(c,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.ha=Math.max(d,a.ha)}}
677
+ function Xq(a,b,c,d){c=dq(c,"EXT-X-MAP");if(!c)return null;var e=Zp(c,"URI");d=Pq(Mb([b],[e])[0],d);b=[d,V(c,"BYTERANGE","")].join("-");a.ea.has(b)||(c=Yq(d,c),a.ea.set(b,c));return a.ea.get(b)}function Yq(a,b){var c=0,d=null,e=V(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new si(function(){return[a]},c,d)}
678
+ function Zq(a,b,c,d,e,f,g,h,k){var l=d.$,m=Pq(d.g,g),n=dq(l,"EXTINF"),p=g=0,t=null,v=[];if(a.i&&d.h.length){a={};d=r(nb(d.h));for(var y=d.next();!y.done;a={Hd:a.Hd},y=d.next()){y=y.value;var x=y.xa;y=y.item;var w=0==x?c:v[v.length-1];x=0==x?e:w.endTime;var C=Number(V(y,"DURATION"));C=x+C;var D=0,B=null;"EXT-X-PRELOAD-HINT"==y.name?D=(w=V(y,"BYTERANGE-START"))?Number(w):0:(D=V(y,"BYTERANGE"),w=r($q(w,D)),D=w.next().value,B=w.next().value);y=V(y,"URI");a.Hd=Mb([h],[y])[0];v.push(new ui(x,C,function(F){return function(){return[F.Hd]}}(a),
679
+ D,B,b,f,0,Infinity))}}else if(!n)throw new N(2,4,4024,"EXTINF");n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(h=dq(l,"EXT-X-BYTERANGE"))?(t=r($q(c,h.value)),p=t.next().value,t=t.next().value):v.length&&(p=v[0].Da,t=v[v.length-1].wa);c="";h=null;"image"==k&&(c="1x1",k=dq(l,"EXT-X-TILES"))&&(c=Zp(k,"LAYOUT"),(k=V(k,"DURATION"))&&(h=Number(k)));return new ui(e,g,function(){return m.length?[m]:[]},p,t,b,f,0,Infinity,v,c,h)}
680
+ function $q(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.wa+1,d=c+d-1);return[c,d]}function Hq(a){if(a.h){for(var b=r(a.Z),c=b.next();!c.done;c=b.next())a.h.ic(c.value);a.Z=[]}}
681
+ function yq(a,b,c,d,e,f,g,h){var k,l,m,n,p,t,v,y,x,w,C,D,B,F,G,I,O,K,L,T,X,ia,ja,W,Ea;return H(function(xa){switch(xa.g){case 1:k=c.segments;m=eq(c.$,"EXT-X-MEDIA-SEQUENCE",0);p=(n=dq(c.$,"EXT-X-SKIP"))?Number(V(n,"SKIPPED-SEGMENTS")):0;t=m+p;if(a.j!=sq&&f.has(t)){v=f.get(t);xa.C(2);break}if(null!=a.O){xa.C(3);break}l=Xq(a,c.g,k[0].$,g);y=a;return u(xa,ar(a,b,l,e,t,!1,k[0],g,d),4);case 4:y.O=xa.h;case 3:v=a.O;case 2:x=k[0].g;Xa(x.split("/").pop());w=eq(c.$,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.i&&
682
+ (h.has(w)||h.set(w,t),p))for(;h.has(w+1)&&h.get(w+1)<t;)w++;C=a.I.get(w)||0;D=[];B=function(Ha){return nb(Ha)};F=r(B(k));G=F.next();case 5:if(G.done){xa.C(7);break}O=I=G.value;K=O.xa;L=O.item;T=D[D.length-1];X=0==K?v:T.endTime;t=m+p+K;f.set(t,X);l=Xq(a,c.g,L.$,g);ia=dq(L.$,"EXT-X-DISCONTINUITY");if(!ia){xa.C(8);break}w++;h.set(w,t);return u(xa,br(a,w,b,l,e,t,L,g,X,d),9);case 9:C=xa.h;case 8:!a.i&&(ja=a.G.isAutoLowLatencyMode())&&(a.G.enableLowLatencyMode(),a.i=a.G.isLowLatencyMode());W=dq(L.$,"EXTINF");
683
+ a.i||W?(Ea=Zq(a,l,T,L,X,C,g,c.g,d),D.push(Ea)):a.i||Ta("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.");G=F.next();xa.C(5);break;case 7:return xa["return"](D)}})}
684
+ function br(a,b,c,d,e,f,g,h,k,l){var m,n;return H(function(p){if(1==p.g)return m=0,a.I.has(b)?(m=a.I.get(b),p.C(2)):u(p,ar(a,c,d,e,f,!0,g,h,l),3);2!=p.g&&(n=p.h,m=k-n,a.I.set(b,m));return p["return"](m)})}
685
+ function cr(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:c=kf;d=gj(b.Ha(),b.Da,b.wa,a.s.retryParameters);if(a.s.hls.useFullSegmentsForStartTime)return k["return"](tq(a,d,c));e=gj(b.Ha(),b.Da,b.Da+2048-1,a.s.retryParameters);A(k,2);return u(k,tq(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=E(k);if(7001==g.code)throw g;Ta("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",
686
+ e.uris[0]);return u(k,tq(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
687
+ function ar(a,b,c,d,e,f,g,h,k){var l,m,n,p,t,v,y,x;return H(function(w){switch(w.g){case 1:l=Zq(a,c,null,g,0,0,h,"",k);if(a.F&&!f&&(m=a.g.get(b),n=m.$d.get(e),void 0!=n))return w["return"](n);d=d.toLowerCase();if(Uq.includes(d))throw Ta("Raw formats are not yet supported. Skipping "+d),new N(1,4,4035);if("video/webm"==d)throw Ta("WebM in HLS is not yet supported. Skipping."),new N(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.C(2);break}p=[cr(a,l)];c&&p.push(cr(a,c));return u(w,Promise.all(p),
688
+ 3);case 3:return t=w.h,v=t[0],y=t[1]||t[0],w["return"](dr(b,v.uri,v.data,y.data));case 2:if("video/mp2t"!=d){w.C(4);break}return u(w,cr(a,l),5);case 5:return x=w.h,w["return"](er(b,x.uri,x.data));case 4:throw new N(2,4,4030,b);}})}
689
+ function dr(a,b,c,d){var e=0;(new tg).box("moov",xg).box("trak",xg).box("mdia",xg).X("mdhd",function(h){e=Oh(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new N(2,4,4030,a,b);var f=0,g=!1;(new tg).box("moof",xg).box("traf",xg).X("tfdt",function(h){f=Nh(h.reader,h.version).Qd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new N(2,4,4030,a,b);return f}
690
+ function er(a,b,c){function d(){f.seek(g+188);h=f.na();71!=h&&(f.seek(g+192),h=f.na());71!=h&&(f.seek(g+204),h=f.na());71!=h&&e();f.nf(1)}function e(){throw new N(2,4,4030,a,b);}var f=new qg(c,0),g=0,h=0;for(c=Math.min(f.V.byteLength-188,940);;){g=f.ma();h=f.na();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.lc();if(8191==(k&8191))d();else if(k&16384)if(k=(f.na()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.na(),f.skip(k)),1!=f.R()>>8)d();else{f.skip(3);c=f.na()>>6;0!=c&&1!=c||e();0==f.na()&&e();c=f.na();k=
691
+ f.lc();var l=f.lc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Pq(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(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}
692
+ function Tq(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y;return H(function(x){if(1==x.g){f=Sb;g=kf;h=Pq(d.segments[0].g,e);k=new pb(h);l=k.Ra.split(".").pop();m=fr[b];if(n=m[l])return x["return"](n);if(b==f.ra)return c&&"vtt"!=c&&"wvtt"!=c?x["return"]("application/mp4"):x["return"]("text/vtt");if(b==f.wc&&(!c||"jpeg"==c))return x["return"]("image/jpeg");p=df([h],a.s.retryParameters);p.method="HEAD";return u(x,tq(a,p,g),2)}t=x.h;v=t.headers["content-type"];return v?x["return"](v.split(";")[0]):(y=m.mp4,x["return"](y))})}
693
+ q.Mc=function(){var a=this,b,c;return H(function(d){if(1==d.g){if(!a.G)return d["return"]();A(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.ia,a.B.T(b),va(d,0);c=E(d);if(!a.G)return d["return"]();c.severity=1;a.G.onError(c);a.B.T(.1);z(d)})};function zq(a,b){a.j=b;a.h&&a.h.Rc(a.j==sq);a.j!=sq||a.B.stop()}function tq(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.G.networkingEngine.request(c,b);Ze(a.D,b);return b.promise}J("shaka.hls.HlsParser",rq);
694
+ var Uq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],fr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
695
+ vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Rq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Zp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Zp(a,"URI");b=qq(b);b=Lc(b.data);b=Nb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=V(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
696
+ Zp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Zp(a,"URI");a=qq(a);a=Lc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Fn(a,b);return Nb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},sq="VOD",Wq="EVENT",Vq="LIVE",wq={Df:sq,uh:Wq,Ie:Vq};og.m3u8=function(){return new rq};mg["application/x-mpegurl"]=function(){return new rq};mg["application/vnd.apple.mpegurl"]=function(){return new rq};function gr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,hf:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Yc(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function hr(){}function ir(a,b,c,d){var e=new jr;vf(b.headers).forEach(function(k,l){e.append(l,k)});var f=new kr,g={Le:!1,yf:!1};a=lr(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new Pe(a,function(){g.Le=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new P(function(){g.yf=!0;f.abort()});h.T(b/1E3);a["finally"](function(){h.stop()})}return a}
697
+ function lr(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,y,x,w,C,D;return H(function(B){switch(B.g){case 1:return g=mr,h=nr,n=m=0,p=Date.now(),A(B,2),u(B,g(a,c),4);case 4:return k=B.h,t=k.clone().body.getReader(),y=(v=k.headers.get("Content-Length"))?parseInt(v,10):0,x=function(F){function G(){var I,O;return H(function(K){switch(K.g){case 1:return A(K,2),u(K,t.read(),4);case 4:I=K.h;va(K,3);break;case 2:return E(K),K["return"]();case 3:if(I.done){K.C(5);break}m+=I.value.byteLength;if(!f){K.C(5);break}return u(K,
698
+ f(I.value),5);case 5:O=Date.now();if(100<O-p||I.done)e(O-p,m-n,y-m),n=m,p=O;I.done?F.close():(F.enqueue(I.value),G());z(K)}})}G()},new h({start:x}),u(B,k.arrayBuffer(),5);case 5:l=B.h;va(B,3);break;case 2:w=E(B);if(d.Le)throw new N(1,1,7001,a,b);if(d.yf)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,w,b);case 3:return C={},D=k.headers,D.forEach(function(F,G){C[G.trim()]=F}),B["return"](gr(C,l,k.status,a,k.url,b))}})}
699
+ function or(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}J("shaka.net.HttpFetchPlugin",hr);hr.isSupported=or;hr.parse=ir;var mr=window.fetch,kr=window.AbortController,nr=window.ReadableStream,jr=window.Headers;or()&&(af("http",ir,2,!0),af("https",ir,2,!0));function pr(){}
700
+ function qr(a,b,c,d){var e=new rr,f=Date.now(),g=0,h=new Promise(function(k,l){e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onabort=function(){l(new N(1,1,7001,a,c))};e.onload=function(n){n=n.target;var p=n.getAllResponseHeaders().trim().split("\r\n"),t={};p=r(p);for(var v=p.next();!v.done;v=p.next())v=v.value.split(": "),t[v[0].toLowerCase()]=v.slice(1).join(": ");try{var y=gr(t,n.response,n.status,a,n.responseURL,
701
+ c);k(y)}catch(x){l(x)}};e.onerror=function(n){l(new N(1,1,1002,a,n,c))};e.ontimeout=function(){l(new N(1,1,1003,a,c))};e.onprogress=function(n){var p=Date.now();if(100<p-f||n.lengthComputable&&n.loaded==n.total)d(p-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=p};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new Pe(h,function(){e.abort();return Promise.resolve()})}J("shaka.net.HttpXHRPlugin",pr);pr.parse=qr;var rr=window.XMLHttpRequest;
702
+ af("http",qr,1,!0);af("https",qr,1,!0);function sr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function tr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}sr.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 ur(a){var b=this;this.U=a;this.g=new Map;this.M=new lf(function(){return vr(b)["catch"](function(){})});this.h=[];this.kf=function(){};this.jf=function(){};this.xc=new sr}ur.prototype.destroy=function(){return this.M.destroy()};function wr(a,b,c){a.kf=b;a.jf=c}function vr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
703
+ function xr(a,b,c,d,e,f){mf(a.M);var g=tr(a.xc,d);d=(a.g.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return H(function(v){if(1==v.g)return u(v,yr(a,c),2);h=v.h;if(a.M.g)throw new N(2,9,7001);if(e)for(m in k=Lc(h),l=new En(k),l.data)n=Number(m),p=l.data[n],t=l.g[n],a.jf(p,t);a.xc.close(g,h.byteLength);var y=a.xc;a.kf(0==y.i?0:y.j/y.i,a.xc.h);return v["return"](f(h))})});a.g.set(b,d);return d}
704
+ function zr(a,b,c){mf(a.M);var d=(a.g.get(b)||Promise.resolve()).then(function(){return H(function(e){return u(e,c(),0)})});a.g.set(b,d)}function Ar(a){return H(function(b){return 1==b.g?u(b,Promise.all(a.g.values()),2):b["return"](a.xc.h)})}function yr(a,b){var c,d,e,f;return H(function(g){if(1==g.g)return c=kf,d=a.U.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;lc(a.h,e);return g["return"](f.data)})};function Br(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Sc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Br.prototype.abort=function(){var a=this;return H(function(b){if(1==b.g){try{a.i.abort()}catch(c){}A(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);E(b);z(b)})};
705
+ function Cr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return H(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}Br.prototype.store=function(){return this.h};Br.prototype.promise=function(){return this.g};function Dr(a){this.h=a;this.g=[]}Dr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Er(a,b){return Fr(a,b,"readwrite")}function Fr(a,b,c){c=a.h.transaction([b],c);var d=new Br(c,b);a.g.push(d);d.promise().then(function(){lc(a.g,d)},function(){lc(a.g,d)});return d};function Gr(a,b,c){this.g=new Dr(a);this.i=b;this.h=c}q=Gr.prototype;q.destroy=function(){return this.g.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Hr(this.i)};q.removeSegments=function(a,b){return Ir(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return H(function(d){if(1==d.g)return u(d,Jr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Oe(e)}))})};q.addManifests=function(){return Hr(this.h)};
706
+ q.updateManifestExpiration=function(a,b){var c=Er(this.g,this.h),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return Ir(this,this.h,a,b)};q.getManifests=function(a){var b=this,c;return H(function(d){if(1==d.g)return u(d,Jr(b,b.h,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Ac(e)})))})};
707
+ q.getAllManifests=function(){var a=this,b,c;return H(function(d){return 1==d.g?(b=Fr(a.g,a.h,"readonly"),c=new Map,u(d,Cr(b,function(e,f){var g;return H(function(h){if(1==h.g)return u(h,a.Ac(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};q.Oe=function(a){return a};q.Ac=function(a){return Promise.resolve(a)};function Hr(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}
708
+ q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){if(1==m.g){d=Er(c.g,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Wc:g.Wc},k=h.next())l=k.value,g.Wc=e.add(l),g.Wc.onsuccess=function(n){return function(){f.push(n.Wc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
709
+ function Ir(a,b,c,d){a=Er(a.g,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Vc:e.Vc},f=c.next())e.Vc=f.value,b["delete"](e.Vc).onsuccess=function(g){return function(){return d(g.Vc)}}(e);return a.promise()}
710
+ function Jr(a,b,c){var d,e,f,g,h,k,l;return H(function(m){if(1==m.g){d=Fr(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={uc:h.uc,qc:h.qc},l=k.next())h.qc=l.value,h.uc=e.get(h.qc),h.uc.onsuccess=function(n){return function(){void 0==n.uc.result&&g.push(n.qc);f[n.qc]=n.uc.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 Kr(a){this.g=new Dr(a)}Kr.prototype.destroy=function(){return this.g.destroy()};Kr.prototype.getAll=function(){var a=this,b,c;return H(function(d){return 1==d.g?(b=Fr(a.g,"session-ids","readonly"),c=[],u(d,Cr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};Kr.prototype.add=function(a){var b=Er(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
711
+ Kr.prototype.remove=function(a){var b=this,c;return H(function(d){return 1==d.g?(c=Er(b.g,"session-ids"),u(d,Cr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function Lr(){this.g=new Map}Lr.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Lr.prototype.init=function(){var a=this;Mr.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
712
+ function Nr(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{cb:d,Ga:f},Ga:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function Or(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({cb:d,Ga:f},e)})})}
713
+ function Pr(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 Qr(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Rr(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()}
714
+ function Sr(a){var b,c,d;return H(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Mr,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.C(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Tr(a,b){Mr.set(a,b)}J("shaka.offline.StorageMuxer",Lr);Lr.unregister=function(a){Mr["delete"](a)};Lr.register=Tr;Lr.prototype.destroy=Lr.prototype.destroy;var Mr=new Map;function Ur(){Gr.apply(this,arguments)}qa(Ur,Gr);Ur.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return H(function(g){d=Er(c.g,c.h);e=d.store();f=new Sc;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)})};
715
+ Ur.prototype.Ac=function(a){var b,c,d,e,f,g;return H(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=Vr(a.periods[c],e),b.push(f);return u(h,kp(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})})};
716
+ function Vr(a,b){Wr(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Xr(e,a.startTime,b)})}
717
+ function Xr(a,b,c){var d=a.initSegmentUri?Yr(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=Yr(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
718
+ 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}}Ur.prototype.Oe=function(a){return{data:a.data}};function Yr(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);}
719
+ function Wr(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=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
720
+ f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Zr(){Gr.apply(this,arguments)}qa(Zr,Gr);
721
+ Zr.prototype.Ac=function(a){var b,c,d,e,f,g;return H(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=r(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push($r(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,kp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
721
722
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
722
- function as(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,
723
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function bs(){Hr.apply(this,arguments)}qa(bs,Hr);bs.prototype.hasFixedKeySpace=function(){return!1};bs.prototype.addSegments=function(a){return this.add(this.i,a)};bs.prototype.addManifests=function(a){return this.add(this.h,a)};bs.prototype.zc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function cs(){this.o=this.j=this.i=this.h=this.g=this.l=null}q=cs.prototype;
724
- q.init=function(){var a=this,b=new Sc,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Vr(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new $r(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new $r(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
725
- e=e.contains("manifest-v5")&&e.contains("segment-v5")?new bs(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new Lr(d):null;a.o=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=r(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new O(2,9,9001,c.error));d.preventDefault()};return b};
723
+ function $r(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,
724
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function as(){Gr.apply(this,arguments)}qa(as,Gr);as.prototype.hasFixedKeySpace=function(){return!1};as.prototype.addSegments=function(a){return this.add(this.i,a)};as.prototype.addManifests=function(a){return this.add(this.h,a)};as.prototype.Ac=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function bs(){this.o=this.j=this.i=this.h=this.g=this.l=null}q=bs.prototype;
725
+ q.init=function(){var a=this,b=new Sc,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Ur(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Zr(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Zr(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
726
+ e=e.contains("manifest-v5")&&e.contains("segment-v5")?new as(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new Kr(d):null;a.o=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=r(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new N(2,9,9001,c.error));d.preventDefault()};return b};
726
727
  q.destroy=function(){var a=this;return H(function(b){switch(b.g){case 1:if(!a.g){b.C(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.C(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.C(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.C(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.o){b.C(10);break}return u(b,a.o.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
727
728
  q.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};q.getEmeSessionCell=function(){return this.o};
728
- q.erase=function(){var a=this;return H(function(b){switch(b.g){case 1:if(!a.g){b.C(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.C(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.C(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.C(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,ds(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
729
- function ds(){var a=new Sc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new O(2,9,9001,b.error));c.preventDefault()};return a}Ur("idb",function(){return Fd()||!window.indexedDB?null:new cs});function es(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}es.prototype.bb=function(){return this.i};es.prototype.Fa=function(){return this.h};es.prototype.key=function(){return this.l};es.prototype.toString=function(){return this.j};
730
- function fs(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 es(b,c,d,Number(a[4])):null};function gs(a,b){this.h=a;this.g=b}
731
- function hs(a,b){var c=new Q(null,0);c.eb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=is(a,d,e,c);e=b.streams.filter(function(l){return l.type==Rb}).map(function(l){return js(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return js(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
729
+ q.erase=function(){var a=this;return H(function(b){switch(b.g){case 1:if(!a.g){b.C(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.C(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.C(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.C(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,cs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
730
+ function cs(){var a=new Sc,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}Tr("idb",function(){return Fd()||!window.indexedDB?null:new bs});function ds(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}ds.prototype.cb=function(){return this.i};ds.prototype.Ga=function(){return this.h};ds.prototype.key=function(){return this.l};ds.prototype.toString=function(){return this.j};
731
+ function es(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 ds(b,c,d,Number(a[4])):null};function fs(a,b){this.h=a;this.g=b}
732
+ function gs(a,b){var c=new Q(null,0);c.fb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=hs(a,d,e,c);e=b.streams.filter(function(l){return l.type==Rb}).map(function(l){return is(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return is(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
732
733
  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}}
733
- function is(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=b.next())for(e=
734
- e.value,g=js(a,e,d),h=r(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=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=js(a,e,d),g=r(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}
735
- function js(a,b,c){var d=b.segments.map(function(e){return ks(a,e)});c.hc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ti(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,
736
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function ks(a,b){var c=new es("segment",a.h,a.g,b.dataKey);return new ui(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?ls(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
737
- function ls(a,b){var c=new es("segment",a.h,a.g,b);return new si(function(){return[c.toString()]},0,null)};function ms(){this.g=null}q=ms.prototype;q.configure=function(){};
738
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:d=fs(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new Mr;ua(m);return u(m,e.init(),4);case 4:return u(m,Qr(e,d.bb(),d.Fa()),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 gs(d.bb(),d.Fa()),l=hs(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return xa(m),u(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
739
- q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:return d=c.g,e=new Mr,A(m,2,3),u(m,e.init(),5);case 5:return u(m,Qr(e,d.bb(),d.Fa()),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.C(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),u(m,e.destroy(),10);case 10:ya(m,0);break;case 2:E(m),m.C(3)}})};
740
- mg["application/x-offline-manifest"]=function(){return new ms};function ns(){}function os(a){var b=fs(a);b&&"manifest"==b.g?(a={uri:a,hf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Se(a)):a=b&&"segment"==b.g?ps(b.key(),b):Qe(new O(2,1,9004,a));return a}
741
- function ps(a,b){var c=new Mr;return Se(void 0).ra(function(){return c.init()}).ra(function(){return Qr(c,b.bb(),b.Fa())}).ra(function(d){return d.getSegments([b.key()])}).ra(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}J("shaka.offline.OfflineScheme",ns);ns.plugin=os;af("offline",os);function qs(a,b,c){var d,e,f,g,h,k;return H(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,v=r(m),y=v.next();!y.done;y=v.next())if(y=y.value,rs(y.info,p)){y.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.C(4);break}g=f.value;h=ss(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.C(2);break;case 4:return l["return"](d)}})}
742
- function ss(a,b,c){var d,e;return H(function(f){switch(f.g){case 1:return d=new yf({Ob:b,onError:function(){},od:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),A(f,2),d.configure(a),u(f,Gf(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 E(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return A(f,6),u(f,Pf(d),8);case 8:va(f,7);break;case 6:return E(f),u(f,d.destroy(),
734
+ function hs(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=b.next())for(e=
735
+ e.value,g=is(a,e,d),h=r(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=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=is(a,e,d),g=r(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}
736
+ function is(a,b,c){var d=b.segments.map(function(e){return js(a,e)});c.ic(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ti(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,
737
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function js(a,b){var c=new ds("segment",a.h,a.g,b.dataKey);return new ui(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?ks(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
738
+ function ks(a,b){var c=new ds("segment",a.h,a.g,b);return new si(function(){return[c.toString()]},0,null)};function ls(){this.g=null}q=ls.prototype;q.configure=function(){};
739
+ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:d=es(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new Lr;ua(m);return u(m,e.init(),4);case 4:return u(m,Pr(e,d.cb(),d.Ga()),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 fs(d.cb(),d.Ga()),l=gs(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),u(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
740
+ q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:return d=c.g,e=new Lr,A(m,2,3),u(m,e.init(),5);case 5:return u(m,Pr(e,d.cb(),d.Ga()),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.C(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:ya(m,0);break;case 2:E(m),m.C(3)}})};
741
+ mg["application/x-offline-manifest"]=function(){return new ls};function ms(){}function ns(a){var b=es(a);b&&"manifest"==b.g?(a={uri:a,hf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Se(a)):a=b&&"segment"==b.g?os(b.key(),b):Qe(new N(2,1,9004,a));return a}
742
+ function os(a,b){var c=new Lr;return Se(void 0).sa(function(){return c.init()}).sa(function(){return Pr(c,b.cb(),b.Ga())}).sa(function(d){return d.getSegments([b.key()])}).sa(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}J("shaka.offline.OfflineScheme",ms);ms.plugin=ns;af("offline",ns);function ps(a,b,c){var d,e,f,g,h,k;return H(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,v=r(m),y=v.next();!y.done;y=v.next())if(y=y.value,qs(y.info,p)){y.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.C(4);break}g=f.value;h=rs(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.C(2);break;case 4:return l["return"](d)}})}
743
+ function rs(a,b,c){var d,e;return H(function(f){switch(f.g){case 1:return d=new yf({Pb:b,onError:function(){},od:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),A(f,2),d.configure(a),u(f,Gf(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 E(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return A(f,6),u(f,Pf(d),8);case 8:va(f,7);break;case 6:return E(f),u(f,d.destroy(),
743
744
  9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return H(function(h){if(1==h.g)return A(h,2),u(h,Qf(d,g),4);if(2!=h.g)return e.push(g),va(h,0);E(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
744
- function rs(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&mc(a.audioCapabilities,b.audioCapabilities,c)&&mc(a.videoCapabilities,b.videoCapabilities,c)};function ts(a,b,c){var d=b.presentationTimeline.getDuration();b=us(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function vs(a,b){var c=hs(new gs(a.bb(),a.Fa()),b),d=b.appMetadata||{};c=us(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
745
- function us(a){var b=[],c=re(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(ie(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(je(c.value));return b};function ws(){this.g={}}function xs(a,b,c){c=c.endTime-c.startTime;return ys(a,b)*c}function ys(a,b){var c=a.g[b];null==c&&(c=0);return c};function zs(a){var b=this;if(a&&a.constructor!=S)throw new O(2,9,9008);this.U=this.s=null;a?(this.s=a.s,this.U=a.Cc()):(this.s=jk(),this.U=new $e);this.ud=[];this.Mc=[];this.ke=[];var c=!a;this.M=new lf(function(){var d,e,f,g,h;return H(function(k){switch(k.g){case 1:return u(k,Promise.all(b.ke.map(function(l){return wr(l)})),2);case 2:d=function(){};e=[];f=r(b.Mc);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.C(4);break}return u(k,b.U.destroy(),
746
- 4);case 4:b.s=null,b.U=null,z(k)}})})}function As(){if(Ad())a:{var a=r(Nr.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}q=zs.prototype;q.destroy=function(){return this.M.destroy()};
747
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=hk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Db("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return lk(this.s,a)};q.getConfiguration=function(){var a=jk();lk(a,this.s,jk());return a};q.Cc=function(){return this.U};
748
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new vr(this.U);this.ke.push(f);b=Bs(this,a,b||{},function(){var h;return H(function(k){if(1==k.g)return u(k,lg(a,d.U,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Kb(h))})},e,f);var g=new Pe(b,function(){return wr(f)});g["finally"](function(){lc(d.ke,f)});g.then=function(h){Db("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
749
- return g.promise.then(h)};return Cs(this,g)};q.pg=function(){Db("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
750
- function Bs(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,y,x;return H(function(w){switch(w.g){case 1:return Ds(),h=g=null,k=new Mr,m=l=null,A(w,2,3),u(w,d(),5);case 5:return g=w.h,u(w,Es(a,b,g,e),6);case 6:n=w.h;Fs(a);p=!n.presentationTimeline.Z()&&!n.presentationTimeline.Lb();if(!p)throw new O(2,9,9005,b);return u(w,Gs(a,n,function(C){m=m||C},e),7);case 7:h=w.h;Fs(a);if(m)throw m;return u(w,Hs(n,e),8);case 8:return u(w,k.init(),9);case 9:return Fs(a),u(w,Or(k),10);case 10:return l=w.h,Fs(a),u(w,Is(a,l.Fa,
751
- h,n,b,c,e,f),11);case 11:t=w.h;Fs(a);if(m)throw m;return u(w,l.Fa.addManifests([t]),12);case 12:return v=w.h,Fs(a),y=new es("manifest",l.path.bb,l.path.Fa,v[0]),w["return"](vs(y,t));case 3:return xa(w),a.ud=[],u(w,k.destroy(),13);case 13:if(!g){w.C(14);break}return u(w,g.stop(),14);case 14:if(!h){w.C(16);break}return u(w,h.destroy(),16);case 16:ya(w,0);break;case 2:x=E(w);if(!l){w.C(18);break}return u(w,l.Fa.removeSegments(a.ud,function(){}),18);case 18:throw m||x;}})}
752
- function Hs(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,D,B,F,G,I,N,K,L,T,W,ja,ha;return H(function(Z){switch(Z.g){case 1:c={width:Infinity,height:Infinity};Wd(a,b.restrictions,c);Zd(a,b.offline.usePersistentLicense);d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Kd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(ie(m));n=r(a.textStreams);for(p=n.next();!p.done;p=n.next())t=p.value,d.push(je(t));v=
753
- r(a.imageStreams);for(y=v.next();!y.done;y=v.next())x=y.value,d.push(ke(x));return u(Z,b.offline.trackSelectionCallback(d),2);case 2:w=Z.h;C=a.presentationTimeline.getDuration();D=0;B=r(w);for(F=B.next();!F.done;F=B.next())G=F.value,I=G.bandwidth*C/8,D+=I;A(Z,3);return u(Z,b.offline.downloadSizeCallback(D),5);case 5:N=Z.h;if(!N)throw new O(2,9,9014);va(Z,4);break;case 3:K=E(Z);if(K instanceof O)throw K;throw new O(2,9,9015);case 4:L=new Set;T=new Set;W=new Set;ja=r(w);for(F=ja.next();!F.done;F=ja.next())ha=
754
- F.value,"variant"==ha.type&&L.add(ha.id),"text"==ha.type&&T.add(ha.id),"image"==ha.type&&W.add(ha.id);a.variants=a.variants.filter(function(Ea){return L.has(Ea.id)});a.textStreams=a.textStreams.filter(function(Ea){return T.has(Ea.id)});a.imageStreams=a.imageStreams.filter(function(Ea){return W.has(Ea.id)});Js(a);z(Z)}})}
755
- function Is(a,b,c,d,e,f,g,h){var k,l,m,n,p,t,v,y,x,w,C,D;return H(function(B){switch(B.g){case 1:return k=ts(e,d,f),l=g.offline.progressCallback,m=function(F,G){k.size=G;l(k,F)},n=function(F,G){v&&g.offline.usePersistentLicense&&y==G&&Of(c,"cenc",F)},xr(h,m,n),p=d.variants.some(function(F){var G=F.audio&&F.audio.encrypted;return F.video&&F.video.encrypted||G}),t=d.variants.some(function(F){return(F.video?F.video.drmInfos:[]).concat(F.audio?F.audio.drmInfos:[]).some(function(G){return G.initData&&
756
- G.initData.length})}),v=p&&!t,y=null,v&&(x=c.i,y=Ks.get(x.keySystem)),ua(B),C=w=Ls(a,h,b,c,d,e,f,g),u(B,Br(h),4);case 4:C.size=B.h;w.expiration=c.Bc();D=Uf(c);w.sessionIds=g.offline.usePersistentLicense?D:[];if(p&&g.offline.usePersistentLicense&&!D.length)throw new O(2,9,9007);return B["return"](w);case 2:return xa(B),u(B,h.destroy(),5);case 5:ya(B,0)}})}q.remove=function(a){return Ms(this,Ns(this,a))};
757
- function Ns(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:Ds();c=fs(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new Mr;ua(k);return u(k,e.init(),4);case 4:return u(k,Qr(e,d.bb(),d.Fa()),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([Os(a,h,e),Ps(f,d,h)]),2);case 2:return xa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
758
- function Qs(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:md(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:md(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Os(a,b,c){return H(function(d){return u(d,Rs(a.U,a.s.drm,c,b),0)})}
759
- function Ps(a,b,c){function d(){}var e=Ss(c);vs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Qg=function(){return Ms(this,Ts(this))};
760
- function Ts(a){var b,c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:return Ds(),b=a.U,c=a.s.drm,d=new Mr,e=!1,ua(n),u(n,d.init(),4);case 4:f=[],Rr(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.C(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,qs(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.C(5);break;case 2:return xa(n),u(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n["return"](!e)}})}
761
- q.list=function(){return Ms(this,Us())};function Us(){var a,b,c;return H(function(d){switch(d.g){case 1:return Ds(),a=[],b=new Mr,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Pr(b,function(e,f){c=c.then(function(){var g;return H(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=vs(new es("manifest",e.bb,e.Fa,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return xa(d),u(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d["return"](a)}})}
762
- function Es(a,b,c,d){var e,f,g,h,k;return H(function(l){if(1==l.g)return e=null,f=a.U,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),Fs(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Fs(a),k=Vs(h),u(l,Promise.all(fb(k,
763
- function(m){return m.createSegmentIndex()})),3);Fs(a);if(e)throw e;return l["return"](h)})}function Gs(a,b,c,d){var e;return H(function(f){switch(f.g){case 1:return e=new yf({Ob:a.U,onError:c,od:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,Df(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Pf(e),3);case 3:return u(f,Nf(e),4);case 4:return f["return"](e)}})}
764
- function Ls(a,b,c,d,e,f,g,h){for(var k=new ws,l=r(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var p=m.audio,t=m.video;p&&!t&&(n.g[p.id]=p.bandwidth||m.bandwidth);!p&&t&&(n.g[t.id]=t.bandwidth||m.bandwidth);if(p&&t){var v=p.bandwidth||393216,y=t.bandwidth||m.bandwidth-v;0>=y&&(y=m.bandwidth);n.g[p.id]=v;n.g[t.id]=y}}l=r(e.textStreams);for(n=l.next();!n.done;n=l.next())k.g[n.value.id]=52;l=r(e.imageStreams);for(n=l.next();!n.done;n=l.next())n=n.value,k.g[n.id]=n.bandwidth||2048;n=new Map;
765
- n.set(null,Promise.resolve(null));m=new Map;p=Vs(e);l=new Map;p=r(p);for(t=p.next();!t.done;t=p.next())t=t.value,v=Ws(a,b,c,k,e,t,h,n,m),l.set(t.id,v);a=r(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.i)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,
766
- expiration:d.Bc(),streams:a,sessionIds:h?Uf(d):[],drmInfo:b,appMetadata:g}}
767
- function Ws(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,closedCaptions:f.closedCaptions,
768
- tilesLayout:f.tilesLayout},m=f.id;Xs(f,e.presentationTimeline.xb(),function(n){var p=Ys(a,b,m,f.id,c,d,n.h,g,h),t=Zs(a,b,m,f.id,c,d,n,g,k);Ar(b,m,function(){var v,y;return H(function(x){if(1==x.g)return u(x,p,2);if(3!=x.g)return v=x.h,u(x,t,3);y=x.h;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,dataKey:y});z(x)})})});return l}
769
- function Ys(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=hj(g.Ga(),g.Ca,g.wa,h.streaming.retryParameters);b=yr(b,c,h,.5*ys(f,d),!0,function(l){var m;return H(function(n){if(1==n.g)return u(n,e.addSegments([{data:l}]),2);m=n.h;a.ud.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
770
- function Zs(a,b,c,d,e,f,g,h,k){var l=[g.Ga()[0],g.Ca,g.wa].join("-");if(k.has(l))return k.get(l);h=hj(g.Ga(),g.Ca,g.wa,h.streaming.retryParameters);b=yr(b,c,h,xs(f,d,g),!1,function(m){var n;return H(function(p){if(1==p.g)return u(p,e.addSegments([{data:m}]),2);n=p.h;a.ud.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function Xs(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 Fs(a){if(a.M.g)throw new O(2,9,7001);}
771
- function Ds(){if(!As())throw new O(2,9,9E3);}function Ms(a,b){return H(function(c){if(1==c.g)return a.Mc.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);xa(c);lc(a.Mc,b);return ya(c,0)})}function Cs(a,b){var c=b.promise;a.Mc.push(c);return b["finally"](function(){lc(a.Mc,c)})}
772
- function Ss(a){var b=[];a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.push(d.initSegmentKey),b.push(d.dataKey)}return b}
773
- function Rs(a,b,c,d){var e,f,g;return H(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Sr(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Qs(d,!1),videoCapabilities:Qs(d,!0)}});return u(h,qs(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)})}
774
- function Vs(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(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}
775
- function Js(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=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}J("shaka.offline.Storage",zs);zs.deleteAll=function(){var a;return H(function(b){return 1==b.g?(a=new Mr,ua(b),u(b,Tr(a),2)):5!=b.g?(xa(b),u(b,a.destroy(),5)):ya(b,0)})};zs.prototype.list=zs.prototype.list;
776
- zs.prototype.removeEmeSessions=zs.prototype.Qg;zs.prototype.remove=zs.prototype.remove;zs.prototype.getStoreInProgress=zs.prototype.pg;zs.prototype.store=zs.prototype.store;zs.prototype.getNetworkingEngine=zs.prototype.Cc;zs.prototype.getConfiguration=zs.prototype.getConfiguration;zs.prototype.configure=zs.prototype.configure;zs.prototype.destroy=zs.prototype.destroy;zs.support=As;
777
- var Ks=(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");
778
- lm.offline=As;function $s(){}function at(){for(var a=r(bt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.If()}catch(c){Ta("Error installing polyfill!",c)}}}function ct(a,b){for(var c={priority:b||0,If:a},d=r(nb(bt)),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.xa;if(e.item.priority<c.priority){bt.splice(f,0,c);return}}bt.push(c)}J("shaka.polyfill",$s);$s.register=ct;$s.installAll=at;var bt=[];function dt(){}function et(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())ft(b.value)}function ft(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)}})}$s.Aria=dt;dt.install=et;ct(et);function gt(){}function ht(){it()}$s.EncryptionScheme=gt;gt.install=ht;ct(ht,-2);function jt(){}
779
- function kt(){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}}),
780
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",lt);document.addEventListener("webkitfullscreenerror",lt);document.addEventListener("mozfullscreenchange",lt);document.addEventListener("mozfullscreenerror",lt);document.addEventListener("MSFullscreenChange",lt);document.addEventListener("MSFullscreenError",lt)}}
781
- function lt(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)}$s.Fullscreen=jt;jt.install=kt;ct(kt);function mt(){}function nt(){}$s.MathRound=mt;mt.install=nt;ct(nt);function ot(){}function pt(){if(Fd()||Gd()||Ed("PlayStation 5")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),qt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=rt}
782
- function rt(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,x;return H(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(!Ad()||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=Bd(g),!h)||a.audio&&(k=a.audio.contentType,
745
+ function qs(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&mc(a.audioCapabilities,b.audioCapabilities,c)&&mc(a.videoCapabilities,b.videoCapabilities,c)};function ss(a,b,c){var d=b.presentationTimeline.getDuration();b=ts(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function us(a,b){var c=gs(new fs(a.cb(),a.Ga()),b),d=b.appMetadata||{};c=ts(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
746
+ function ts(a){var b=[],c=re(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(ie(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(je(c.value));return b};function vs(){this.g={}}function ws(a,b,c){c=c.endTime-c.startTime;return xs(a,b)*c}function xs(a,b){var c=a.g[b];null==c&&(c=0);return c};function ys(a){var b=this;if(a&&a.constructor!=S)throw new N(2,9,9008);this.U=this.s=null;a?(this.s=a.s,this.U=a.Dc()):(this.s=ik(),this.U=new $e);this.ud=[];this.Nc=[];this.ke=[];var c=!a;this.M=new lf(function(){var d,e,f,g,h;return H(function(k){switch(k.g){case 1:return u(k,Promise.all(b.ke.map(function(l){return vr(l)})),2);case 2:d=function(){};e=[];f=r(b.Nc);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.C(4);break}return u(k,b.U.destroy(),
747
+ 4);case 4:b.s=null,b.U=null,z(k)}})})}function zs(){if(Ad())a:{var a=r(Mr.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}q=ys.prototype;q.destroy=function(){return this.M.destroy()};
748
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=gk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Db("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return kk(this.s,a)};q.getConfiguration=function(){var a=ik();kk(a,this.s,ik());return a};q.Dc=function(){return this.U};
749
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new ur(this.U);this.ke.push(f);b=As(this,a,b||{},function(){var h;return H(function(k){if(1==k.g)return u(k,lg(a,d.U,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Kb(h))})},e,f);var g=new Pe(b,function(){return vr(f)});g["finally"](function(){lc(d.ke,f)});g.then=function(h){Db("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
750
+ return g.promise.then(h)};return Bs(this,g)};q.pg=function(){Db("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
751
+ function As(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,y,x;return H(function(w){switch(w.g){case 1:return Cs(),h=g=null,k=new Lr,m=l=null,A(w,2,3),u(w,d(),5);case 5:return g=w.h,u(w,Ds(a,b,g,e),6);case 6:n=w.h;Es(a);p=!n.presentationTimeline.Y()&&!n.presentationTimeline.Mb();if(!p)throw new N(2,9,9005,b);return u(w,Fs(a,n,function(C){m=m||C},e),7);case 7:h=w.h;Es(a);if(m)throw m;return u(w,Gs(n,e),8);case 8:return u(w,k.init(),9);case 9:return Es(a),u(w,Nr(k),10);case 10:return l=w.h,Es(a),u(w,Hs(a,l.Ga,
752
+ h,n,b,c,e,f),11);case 11:t=w.h;Es(a);if(m)throw m;return u(w,l.Ga.addManifests([t]),12);case 12:return v=w.h,Es(a),y=new ds("manifest",l.path.cb,l.path.Ga,v[0]),w["return"](us(y,t));case 3:return wa(w),a.ud=[],u(w,k.destroy(),13);case 13:if(!g){w.C(14);break}return u(w,g.stop(),14);case 14:if(!h){w.C(16);break}return u(w,h.destroy(),16);case 16:ya(w,0);break;case 2:x=E(w);if(!l){w.C(18);break}return u(w,l.Ga.removeSegments(a.ud,function(){}),18);case 18:throw m||x;}})}
753
+ function Gs(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,x,w,C,D,B,F,G,I,O,K,L,T,X,ia,ja;return H(function(W){switch(W.g){case 1:return c={width:Infinity,height:Infinity},Wd(a,b.restrictions,c),u(W,Zd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Kd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(ie(m));n=r(a.textStreams);for(p=n.next();!p.done;p=n.next())t=p.value,
754
+ d.push(je(t));v=r(a.imageStreams);for(y=v.next();!y.done;y=v.next())x=y.value,d.push(ke(x));return u(W,b.offline.trackSelectionCallback(d),3);case 3:w=W.h;C=a.presentationTimeline.getDuration();D=0;B=r(w);for(F=B.next();!F.done;F=B.next())G=F.value,I=G.bandwidth*C/8,D+=I;A(W,4);return u(W,b.offline.downloadSizeCallback(D),6);case 6:O=W.h;if(!O)throw new N(2,9,9014);va(W,5);break;case 4:K=E(W);if(K instanceof N)throw K;throw new N(2,9,9015);case 5:L=new Set;T=new Set;X=new Set;ia=r(w);for(F=ia.next();!F.done;F=
755
+ ia.next())ja=F.value,"variant"==ja.type&&L.add(ja.id),"text"==ja.type&&T.add(ja.id),"image"==ja.type&&X.add(ja.id);a.variants=a.variants.filter(function(Ea){return L.has(Ea.id)});a.textStreams=a.textStreams.filter(function(Ea){return T.has(Ea.id)});a.imageStreams=a.imageStreams.filter(function(Ea){return X.has(Ea.id)});Is(a);z(W)}})}
756
+ function Hs(a,b,c,d,e,f,g,h){var k,l,m,n,p,t,v,y,x,w,C,D;return H(function(B){switch(B.g){case 1:return k=ss(e,d,f),l=g.offline.progressCallback,m=function(F,G){k.size=G;l(k,F)},n=function(F,G){v&&g.offline.usePersistentLicense&&y==G&&Of(c,"cenc",F)},wr(h,m,n),p=d.variants.some(function(F){var G=F.audio&&F.audio.encrypted;return F.video&&F.video.encrypted||G}),t=d.variants.some(function(F){return(F.video?F.video.drmInfos:[]).concat(F.audio?F.audio.drmInfos:[]).some(function(G){return G.initData&&
757
+ G.initData.length})}),v=p&&!t,y=null,v&&(x=c.i,y=Js.get(x.keySystem)),ua(B),C=w=Ks(a,h,b,c,d,e,f,g),u(B,Ar(h),4);case 4:C.size=B.h;w.expiration=c.Cc();D=Uf(c);w.sessionIds=g.offline.usePersistentLicense?D:[];if(p&&g.offline.usePersistentLicense&&!D.length)throw new N(2,9,9007);return B["return"](w);case 2:return wa(B),u(B,h.destroy(),5);case 5:ya(B,0)}})}q.remove=function(a){return Ls(this,Ms(this,a))};
758
+ function Ms(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:Cs();c=es(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new Lr;ua(k);return u(k,e.init(),4);case 4:return u(k,Pr(e,d.cb(),d.Ga()),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([Ns(a,h,e),Os(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
759
+ function Ps(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:md(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:md(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Ns(a,b,c){return H(function(d){return u(d,Qs(a.U,a.s.drm,c,b),0)})}
760
+ function Os(a,b,c){function d(){}var e=Rs(c);us(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Qg=function(){return Ls(this,Ss(this))};
761
+ function Ss(a){var b,c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:return Cs(),b=a.U,c=a.s.drm,d=new Lr,e=!1,ua(n),u(n,d.init(),4);case 4:f=[],Qr(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.C(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,ps(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.C(5);break;case 2:return wa(n),u(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n["return"](!e)}})}
762
+ q.list=function(){return Ls(this,Ts())};function Ts(){var a,b,c;return H(function(d){switch(d.g){case 1:return Cs(),a=[],b=new Lr,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Or(b,function(e,f){c=c.then(function(){var g;return H(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=us(new ds("manifest",e.cb,e.Ga,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d["return"](a)}})}
763
+ function Ds(a,b,c,d){var e,f,g,h,k;return H(function(l){if(1==l.g)return e=null,f=a.U,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),Es(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Es(a),k=Us(h),u(l,Promise.all(fb(k,
764
+ function(m){return m.createSegmentIndex()})),3);Es(a);if(e)throw e;return l["return"](h)})}function Fs(a,b,c,d){var e;return H(function(f){switch(f.g){case 1:return e=new yf({Pb:a.U,onError:c,od:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,Df(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Pf(e),3);case 3:return u(f,Nf(e),4);case 4:return f["return"](e)}})}
765
+ function Ks(a,b,c,d,e,f,g,h){for(var k=new vs,l=r(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var p=m.audio,t=m.video;p&&!t&&(n.g[p.id]=p.bandwidth||m.bandwidth);!p&&t&&(n.g[t.id]=t.bandwidth||m.bandwidth);if(p&&t){var v=p.bandwidth||393216,y=t.bandwidth||m.bandwidth-v;0>=y&&(y=m.bandwidth);n.g[p.id]=v;n.g[t.id]=y}}l=r(e.textStreams);for(n=l.next();!n.done;n=l.next())k.g[n.value.id]=52;l=r(e.imageStreams);for(n=l.next();!n.done;n=l.next())n=n.value,k.g[n.id]=n.bandwidth||2048;n=new Map;
766
+ n.set(null,Promise.resolve(null));m=new Map;p=Us(e);l=new Map;p=r(p);for(t=p.next();!t.done;t=p.next())t=t.value,v=Vs(a,b,c,k,e,t,h,n,m),l.set(t.id,v);a=r(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.i)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,
767
+ expiration:d.Cc(),streams:a,sessionIds:h?Uf(d):[],drmInfo:b,appMetadata:g}}
768
+ function Vs(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,closedCaptions:f.closedCaptions,
769
+ tilesLayout:f.tilesLayout},m=f.id;Ws(f,e.presentationTimeline.pb(),function(n){var p=Xs(a,b,m,f.id,c,d,n.h,g,h),t=Ys(a,b,m,f.id,c,d,n,g,k);zr(b,m,function(){var v,y;return H(function(x){if(1==x.g)return u(x,p,2);if(3!=x.g)return v=x.h,u(x,t,3);y=x.h;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,dataKey:y});z(x)})})});return l}
770
+ function Xs(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=gj(g.Ha(),g.Da,g.wa,h.streaming.retryParameters);b=xr(b,c,h,.5*xs(f,d),!0,function(l){var m;return H(function(n){if(1==n.g)return u(n,e.addSegments([{data:l}]),2);m=n.h;a.ud.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
771
+ function Ys(a,b,c,d,e,f,g,h,k){var l=[g.Ha()[0],g.Da,g.wa].join("-");if(k.has(l))return k.get(l);h=gj(g.Ha(),g.Da,g.wa,h.streaming.retryParameters);b=xr(b,c,h,ws(f,d,g),!1,function(m){var n;return H(function(p){if(1==p.g)return u(p,e.addSegments([{data:m}]),2);n=p.h;a.ud.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function Ws(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 Es(a){if(a.M.g)throw new N(2,9,7001);}
772
+ function Cs(){if(!zs())throw new N(2,9,9E3);}function Ls(a,b){return H(function(c){if(1==c.g)return a.Nc.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);lc(a.Nc,b);return ya(c,0)})}function Bs(a,b){var c=b.promise;a.Nc.push(c);return b["finally"](function(){lc(a.Nc,c)})}
773
+ function Rs(a){var b=[];a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.push(d.initSegmentKey),b.push(d.dataKey)}return b}
774
+ function Qs(a,b,c,d){var e,f,g;return H(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Rr(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Ps(d,!1),videoCapabilities:Ps(d,!0)}});return u(h,ps(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)})}
775
+ function Us(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(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}
776
+ function Is(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=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}J("shaka.offline.Storage",ys);ys.deleteAll=function(){var a;return H(function(b){return 1==b.g?(a=new Lr,ua(b),u(b,Sr(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):ya(b,0)})};ys.prototype.list=ys.prototype.list;
777
+ ys.prototype.removeEmeSessions=ys.prototype.Qg;ys.prototype.remove=ys.prototype.remove;ys.prototype.getStoreInProgress=ys.prototype.pg;ys.prototype.store=ys.prototype.store;ys.prototype.getNetworkingEngine=ys.prototype.Dc;ys.prototype.getConfiguration=ys.prototype.getConfiguration;ys.prototype.configure=ys.prototype.configure;ys.prototype.destroy=ys.prototype.destroy;ys.support=zs;
778
+ var Js=(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");
779
+ km.offline=zs;function Zs(){}function $s(){for(var a=r(at),b=a.next();!b.done;b=a.next()){b=b.value;try{b.If()}catch(c){Ta("Error installing polyfill!",c)}}}function bt(a,b){for(var c={priority:b||0,If:a},d=r(nb(at)),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.xa;if(e.item.priority<c.priority){at.splice(f,0,c);return}}at.push(c)}J("shaka.polyfill",Zs);Zs.register=bt;Zs.installAll=$s;var at=[];function ct(){}function dt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())et(b.value)}function et(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)}})}Zs.Aria=ct;ct.install=dt;bt(dt);function ft(){}function gt(){ht()}Zs.EncryptionScheme=ft;ft.install=gt;bt(gt,-2);function it(){}
780
+ function jt(){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}}),
781
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",kt);document.addEventListener("webkitfullscreenerror",kt);document.addEventListener("mozfullscreenchange",kt);document.addEventListener("mozfullscreenerror",kt);document.addEventListener("MSFullscreenChange",kt);document.addEventListener("MSFullscreenError",kt)}}
782
+ function kt(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)}Zs.Fullscreen=it;it.install=jt;bt(jt);function lt(){}function mt(){}Zs.MathRound=lt;lt.install=mt;bt(mt);function nt(){}function ot(){if(Fd()||Gd()||Ed("PlayStation 5")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),pt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=qt}
783
+ function qt(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,x;return H(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(!Ad()||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=Bd(g),!h)||a.audio&&(k=a.audio.contentType,
783
784
  l=Bd(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&&(t={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(t));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};
784
- n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);A(w,3);return u(w,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=w.h;va(w,4);break;case 3:E(w);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return w["return"](b)}})}$s.MediaCapabilities=ot;ot.install=pt;var qt=null;ot.originalMcap=qt;ct(pt,-1);function st(){}function tt(){var a=Hd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?ut():a?(vt(),12>=a?(wt(),xt()):wt()):(Ed("Tizen 2")||Ed("Tizen 3")||Ed("Tizen 4"))&&yt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&zt()}
785
- function wt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];c=a.apply(this,c);c.abort=function(){};return c}}function xt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function vt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
786
- function yt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=od(b)&&a(b)}}function ut(){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)}}
787
- function zt(){var a=MediaSource.isTypeSupported;Ed("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)})}$s.MediaSource=st;st.install=tt;ct(tt);function At(){}function Bt(){screen.orientation||void 0!=window.orientation&&Ct()}function Ct(){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 Dt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new M("change");b.dispatchEvent(c)})}$s.Orientation=At;
788
- At.install=Bt;function Dt(){eb.call(this);this.type="";this.angle=0}qa(Dt,eb);
789
- Dt.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)};
790
- Dt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};ct(Bt);function Et(){}function Ft(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Gt,window.MediaKeys=Ht,window.MediaKeySystemAccess=It,navigator.requestMediaKeySystemAccess=Jt)}function Jt(a,b){try{var c=new It(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
791
- function Gt(a){var b=this.mediaKeys;b&&b!=a&&Kt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Kt(a,this):Promise.resolve()}function Lt(a){a=Lc(a.initData);if(Oc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Wc(a.subarray(4),!0);a=Zc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Mc(a);this.dispatchEvent(b)}$s.PatchedMediaKeysApple=Et;Et.install=Ft;
792
- function It(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=r(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=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
785
+ n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);A(w,3);return u(w,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=w.h;va(w,4);break;case 3:E(w);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return w["return"](b)}})}Zs.MediaCapabilities=nt;nt.install=ot;var pt=null;nt.originalMcap=pt;bt(ot,-1);function rt(){}function st(){var a=Hd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?tt():a?(ut(),12>=a?(vt(),wt()):vt()):(Ed("Tizen 2")||Ed("Tizen 3")||Ed("Tizen 4"))&&xt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&yt()}
786
+ function vt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];c=a.apply(this,c);c.abort=function(){};return c}}function wt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function ut(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
787
+ function xt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=od(b)&&a(b)}}function tt(){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)}}
788
+ function yt(){var a=MediaSource.isTypeSupported;Ed("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)})}Zs.MediaSource=rt;rt.install=st;bt(st);function zt(){}function At(){screen.orientation||void 0!=window.orientation&&Bt()}function Bt(){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 Ct;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new M("change");b.dispatchEvent(c)})}Zs.Orientation=zt;
789
+ zt.install=At;function Ct(){eb.call(this);this.type="";this.angle=0}qa(Ct,eb);
790
+ Ct.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)};
791
+ Ct.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};bt(At);function Dt(){}function Et(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Ft,window.MediaKeys=Gt,window.MediaKeySystemAccess=Ht,navigator.requestMediaKeySystemAccess=It)}function It(a,b){try{var c=new Ht(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
792
+ function Ft(a){var b=this.mediaKeys;b&&b!=a&&Jt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Jt(a,this):Promise.resolve()}function Kt(a){a=Lc(a.initData);if(Oc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Wc(a.subarray(4),!0);a=Zc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Mc(a);this.dispatchEvent(b)}Zs.PatchedMediaKeysApple=Dt;Dt.install=Et;
793
+ function Ht(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=r(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=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
793
794
  k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=r(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;}
794
- It.prototype.createMediaKeys=function(){var a=new Ht(this.keySystem);return Promise.resolve(a)};It.prototype.getConfiguration=function(){return this.g};function Ht(a){this.g=new WebKitMediaKeys(a);this.h=new nf}Ht.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Mt(this.g,a)};Ht.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
795
- function Kt(a,b){a.h.Qb();if(!b)return Promise.resolve();a.h.m(b,"webkitneedkey",Lt);try{return Di(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.webkitSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Mt(a){eb.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new nf;this.sessionId="";this.expiration=NaN;this.closed=new Sc;this.keyStatuses=new Nt}qa(Mt,eb);q=Mt.prototype;
796
- q.generateRequest=function(a,b){var c=this;this.g=new Sc;try{var d=this.l.createSession("video/mp4",Lc(b));this.j=d;this.sessionId=d.sessionId||"";this.h.m(this.j,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Mc(e.message));e=new M("message",e);c.dispatchEvent(e)});this.h.m(d,"webkitkeyadded",function(){c.i&&(Ot(c,"usable"),c.i.resolve(),c.i=null)});this.h.m(d,"webkitkeyerror",function(){var e=
797
- Error("EME PatchedMediaKeysApple key error");e.errorCode=c.j.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.i)c.i.reject(e),c.i=null;else switch(c.j.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Ot(c,"output-not-allowed");break;default:Ot(c,"internal-error")}});Ot(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
798
- q.update=function(a){this.i=new Sc;try{this.j.update(Lc(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.Qb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Ot(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new M("keystatuseschange");a.dispatchEvent(c)}
799
- function Nt(){this.size=0;this.g=void 0}q=Nt.prototype;q.forEach=function(a){this.g&&a(this.g,jg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=jg.value();return this.g&&Jc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};ct(Ft);function Pt(){}function Qt(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Rt,window.MediaKeySystemAccess=St,navigator.requestMediaKeySystemAccess=Tt,HTMLMediaElement.prototype.setMediaKeys=Ut)}function Tt(a,b){try{var c=new St(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
800
- function Vt(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Mc(Hn(a.initData));this.dispatchEvent(b)}}$s.PatchedMediaKeysMs=Pt;Pt.install=Qt;
801
- function St(a,b){this.keySystem=a;for(var c=!1,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
795
+ Ht.prototype.createMediaKeys=function(){var a=new Gt(this.keySystem);return Promise.resolve(a)};Ht.prototype.getConfiguration=function(){return this.g};function Gt(a){this.g=new WebKitMediaKeys(a);this.h=new nf}Gt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Lt(this.g,a)};Gt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
796
+ function Jt(a,b){a.h.Rb();if(!b)return Promise.resolve();a.h.m(b,"webkitneedkey",Kt);try{return Di(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.webkitSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Lt(a){eb.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new nf;this.sessionId="";this.expiration=NaN;this.closed=new Sc;this.keyStatuses=new Mt}qa(Lt,eb);q=Lt.prototype;
797
+ q.generateRequest=function(a,b){var c=this;this.g=new Sc;try{var d=this.l.createSession("video/mp4",Lc(b));this.j=d;this.sessionId=d.sessionId||"";this.h.m(this.j,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Mc(e.message));e=new M("message",e);c.dispatchEvent(e)});this.h.m(d,"webkitkeyadded",function(){c.i&&(Nt(c,"usable"),c.i.resolve(),c.i=null)});this.h.m(d,"webkitkeyerror",function(){var e=
798
+ Error("EME PatchedMediaKeysApple key error");e.errorCode=c.j.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.i)c.i.reject(e),c.i=null;else switch(c.j.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Nt(c,"output-not-allowed");break;default:Nt(c,"internal-error")}});Nt(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
799
+ q.update=function(a){this.i=new Sc;try{this.j.update(Lc(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.Rb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Nt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new M("keystatuseschange");a.dispatchEvent(c)}
800
+ function Mt(){this.size=0;this.g=void 0}q=Mt.prototype;q.forEach=function(a){this.g&&a(this.g,jg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=jg.value();return this.g&&Jc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};bt(Et);function Ot(){}function Pt(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Qt,window.MediaKeySystemAccess=Rt,navigator.requestMediaKeySystemAccess=St,HTMLMediaElement.prototype.setMediaKeys=Tt)}function St(a,b){try{var c=new Rt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
801
+ function Ut(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Mc(Gn(a.initData));this.dispatchEvent(b)}}Zs.PatchedMediaKeysMs=Ot;Ot.install=Pt;
802
+ function Rt(a,b){this.keySystem=a;for(var c=!1,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
802
803
  !0));if(e.videoCapabilities)for(h=r(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.g=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
803
- St.prototype.createMediaKeys=function(){var a=new Rt(this.keySystem);return Promise.resolve(a)};St.prototype.getConfiguration=function(){return this.g};function Ut(a){var b=this.mediaKeys;b&&b!=a&&Wt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Wt(a,this):Promise.resolve()}function Rt(a){this.g=new MSMediaKeys(a);this.h=new nf}
804
- Rt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Xt(this.g,a)};Rt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Wt(a,b){a.h.Qb();if(!b)return Promise.resolve();a.h.m(b,"msneedkey",Vt);try{return Di(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.msSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
805
- function Xt(a){eb.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new nf;this.sessionId="";this.expiration=NaN;this.closed=new Sc;this.keyStatuses=new Yt}qa(Xt,eb);q=Xt.prototype;
806
- q.generateRequest=function(a,b){var c=this;this.g=new Sc;try{this.j=this.l.createSession("video/mp4",Lc(b),null),this.h.m(this.j,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Mc(d.message));d=new M("message",d);c.dispatchEvent(d)}),this.h.m(this.j,"mskeyadded",function(){c.g?(Zt(c,"usable"),c.g.resolve(),c.g=null):c.i&&(Zt(c,"usable"),c.i.resolve(),c.i=null)}),this.h.m(this.j,"mskeyerror",
807
- function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.j.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.i)c.i.reject(d),c.i=null;else switch(c.j.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Zt(c,"output-not-allowed");break;default:Zt(c,"internal-error")}}),Zt(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
808
- q.update=function(a){this.i=new Sc;try{this.j.update(Lc(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.Qb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Zt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new M("keystatuseschange");a.dispatchEvent(c)}
809
- function Yt(){this.size=0;this.g=void 0}q=Yt.prototype;q.forEach=function(a){this.g&&a(this.g,jg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=jg.value();return this.g&&Jc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};ct(Qt);function $t(){}function au(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=bu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=cu,window.MediaKeys=du,window.MediaKeySystemAccess=eu)}function bu(){return Promise.reject(Error("The key system specified is not supported."))}
810
- function cu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}$s.PatchedMediaKeysNop=$t;$t.install=au;function du(){throw new TypeError("Illegal constructor.");}du.prototype.createSession=function(){};du.prototype.setServerCertificate=function(){};function eu(){this.keySystem="";throw new TypeError("Illegal constructor.");}eu.prototype.getConfiguration=function(){};eu.prototype.createMediaKeys=function(){};ct(au,-10);function fu(){}function gu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)hu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=iu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=ju;window.MediaKeys=ku;window.MediaKeySystemAccess=lu}}
811
- function mu(a){var b=hu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function iu(a,b){try{var c=new lu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function ju(a){var b=this.mediaKeys;b&&b!=a&&nu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&nu(a,this);return Promise.resolve()}$s.PatchedMediaKeysWebkit=fu;fu.install=gu;
812
- function lu(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=r(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=r(g.audioCapabilities),
804
+ Rt.prototype.createMediaKeys=function(){var a=new Qt(this.keySystem);return Promise.resolve(a)};Rt.prototype.getConfiguration=function(){return this.g};function Tt(a){var b=this.mediaKeys;b&&b!=a&&Vt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Vt(a,this):Promise.resolve()}function Qt(a){this.g=new MSMediaKeys(a);this.h=new nf}
805
+ Qt.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.g,a)};Qt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Vt(a,b){a.h.Rb();if(!b)return Promise.resolve();a.h.m(b,"msneedkey",Ut);try{return Di(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.msSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
806
+ function Wt(a){eb.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new nf;this.sessionId="";this.expiration=NaN;this.closed=new Sc;this.keyStatuses=new Xt}qa(Wt,eb);q=Wt.prototype;
807
+ q.generateRequest=function(a,b){var c=this;this.g=new Sc;try{this.j=this.l.createSession("video/mp4",Lc(b),null),this.h.m(this.j,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Mc(d.message));d=new M("message",d);c.dispatchEvent(d)}),this.h.m(this.j,"mskeyadded",function(){c.g?(Yt(c,"usable"),c.g.resolve(),c.g=null):c.i&&(Yt(c,"usable"),c.i.resolve(),c.i=null)}),this.h.m(this.j,"mskeyerror",
808
+ function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.j.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.i)c.i.reject(d),c.i=null;else switch(c.j.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Yt(c,"output-not-allowed");break;default:Yt(c,"internal-error")}}),Yt(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
809
+ q.update=function(a){this.i=new Sc;try{this.j.update(Lc(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.Rb()}catch(a){this.closed.reject(a)}return this.closed};q.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 M("keystatuseschange");a.dispatchEvent(c)}
810
+ function Xt(){this.size=0;this.g=void 0}q=Xt.prototype;q.forEach=function(a){this.g&&a(this.g,jg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=jg.value();return this.g&&Jc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};bt(Pt);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)}function au(){return Promise.reject(Error("The key system specified is not supported."))}
811
+ function bu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Zs.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(){};bt($t,-10);function eu(){}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}}
812
+ 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()}Zs.PatchedMediaKeysWebkit=eu;eu.install=fu;
813
+ 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=r(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=r(g.audioCapabilities),
813
814
  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=r(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
814
- d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}lu.prototype.createMediaKeys=function(){var a=new ku(this.g);return Promise.resolve(a)};lu.prototype.getConfiguration=function(){return this.h};function ku(a){this.l=a;this.g=null;this.h=new nf;this.i=[];this.j=new Map}
815
- function nu(a,b){a.g=b;a.h.Qb();var c=hu;b&&(a.h.m(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Mc(d.initData);a.g.dispatchEvent(e)}),a.h.m(b,c+"keymessage",function(d){var e=ou(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new M("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.h.m(b,c+"keyadded",function(d){if(d=ou(a,d.sessionId))pu(d,"usable"),
816
- d.g&&d.g.resolve(),d.g=null}),a.h.m(b,c+"keyerror",function(d){var e=ou(a,d.sessionId);e&&e.handleError(d)}))}ku.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.g||document.createElement("video");b.src||(b.src="about:blank");a=new qu(b,this.l,a);this.i.push(a);return a};ku.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
817
- function ou(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 qu(a,b,c){eb.call(this);this.j=a;this.o=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Sc;this.keyStatuses=new ru}qa(qu,eb);q=qu.prototype;
818
- q.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?pu(this,"output-restricted"):1==b?pu(this,"expired"):pu(this,"internal-error"))};
819
- function su(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;try{if("persistent-license"==a.l)if(c)var d=Lc(Zc("LOAD_SESSION|"+c));else{var e=Zc("PERSISTENT|");d=gd(e,b)}else d=Lc(b)}catch(g){return Promise.reject(g)}a.h=new Sc;var f=mu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new P(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).T(.01)}return a.h}
820
- function tu(a,b,c){if(a.g)a.g.then(function(){return tu(a,b,c)})["catch"](function(){return tu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Vc(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=dd(e.keys[0].k);e=dd(e.keys[0].kid)}else d=Lc(c),e=null;var f=mu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
821
- function pu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new M("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return su(this,b,null)};q.load=function(a){return"persistent-license"==this.l?su(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Sc;tu(this,b,a);return b};
822
- q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=mu("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function ru(){this.size=0;this.g=void 0}q=ru.prototype;q.forEach=function(a){this.g&&a(this.g,jg.value())};q.get=function(a){if(this.has(a))return this.g};
823
- q.has=function(a){var b=jg.value();return this.g&&Jc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var hu="";ct(gu);function uu(){}function vu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=wu,Object.defineProperty(a,"disablePictureInPicture",{get:xu,set:yu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=zu,document.addEventListener("webkitpresentationmodechanged",Au,!0))}}
824
- function Au(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
825
- function wu(){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 zu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
826
- function xu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function yu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}$s.PiPWebkit=uu;uu.install=vu;ct(vu);function Bu(){}function Cu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Du)}function Du(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}$s.StorageEstimate=Bu;Bu.install=Cu;ct(Cu);function Eu(){}function Fu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}$s.VideoPlayPromise=Eu;Eu.install=Fu;ct(Fu);function Gu(){}function Hu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Iu)}}function Iu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}$s.VideoPlaybackQuality=Gu;Gu.install=Hu;ct(Hu);function Ju(){}function Ku(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Lu;else if(6==b)a=Mu;else{try{var c=!!Lu(1,2,"")}catch(d){c=!1}c&&(a=Lu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Lu(a,b,c){return new window.TextTrackCue(a,b,c)}function Mu(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}$s.VTTCue=Ju;Ju.install=Ku;ct(Ku);function Nu(){}Nu.prototype.parseInit=function(){};Nu.prototype.parseMedia=function(a,b){var c=null,d=[],e=Vc(a).split(/\r?\n/);e=r(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Ou.exec(f))){var g=Pu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new oc(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};J("shaka.text.LrcTextParser",Nu);Nu.prototype.parseMedia=Nu.prototype.parseMedia;
827
- Nu.prototype.parseInit=Nu.prototype.parseInit;var Ou=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Pu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;sd["application/x-subtitle-lrc"]=function(){return new Nu};function Qu(){}Qu.prototype.parseInit=function(){};
828
- Qu.prototype.parseMedia=function(a,b){var c=Vc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(D){throw new O(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new O(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new O(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=On(g,Ru,"frameRate"),k=On(g,Ru,"subFrameRate"),l=On(g,Ru,"frameRateMultiplier"),
829
- m=On(g,Ru,"tickRate"),n=On(g,Ru,"cellResolution");c=g.getAttribute("xml:space")||"default";e=On(g,Su,"extent");if("default"!=c&&"preserve"!=c)throw new O(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Tu(h,k,l,m);n=n?(n=/^(\d+) (\d+)$/.exec(n))?{columns:parseInt(n[1],10),rows:parseInt(n[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?Mn(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=r(g),t=p.next();!t.done;t=
830
- p.next()){var v=t.value;t=new qc;var y=v.getAttribute("xml:id");if(y){t.id=y;var x=null;e&&(x=Uu.exec(e)||Vu.exec(e));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,C;if(w=Wu(v,l,"extent"))w=(C=Uu.exec(w))||Vu.exec(w),null!=w&&(t.width=Number(w[1]),t.height=Number(w[2]),C||(null!=y&&(t.width=100*t.width/y),null!=x&&(t.height=100*t.height/x)),t.widthUnits=C||null!=y?Gc:0,t.heightUnits=C||null!=x?Gc:0);if(v=Wu(v,l,"origin"))w=(C=Uu.exec(v))||Vu.exec(v),null!=w&&(t.viewportAnchorX=Number(w[1]),t.viewportAnchorY=
831
- Number(w[2]),C||(null!=x&&(t.viewportAnchorY=100*t.viewportAnchorY/x),null!=y&&(t.viewportAnchorX=100*t.viewportAnchorX/y)),t.viewportAnchorUnits=C||null!=y?Gc:0)}else t=null;t&&m.push(t)}if(Jn(f,"p").length)throw new O(2,2,2001,"<p> can only be inside <div> in TTML");e=r(Jn(f,"div"));for(p=e.next();!p.done;p=e.next())if(Jn(p.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");(f=Xu(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
832
- function Xu(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 t=null,v=r(Yu),y=v.next();!y.done&&!(t=Zu(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||t)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});
833
- a=[];if(!y)for(var x=r(p.childNodes),w=x.next();!w.done;w=x.next())(w=Xu(w.value,b,c,d,e,f,g,h,k,p,m))&&a.push(w);d=null!=l;x=/\S/.test(p.textContent);var C=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(C||x||"br"==p.tagName||0!=a.length||d&&!h))return null;w=$u(p,c);x=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=av(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(!C&&0<a.length)for(x=Infinity,w=0,b=r(a),
834
- c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),w=Math.max(w,c.endTime);if("br"==p.tagName)return e=new oc(x,w,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new oc(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Zu(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var D=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==D})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
835
- (g=Zu(l,"region",f,"")[0]);bv(b,p,g,t,e,v,0==a.length);return b}
836
- function bv(a,b,c,d,e,f,g){f=f||g;"rtl"==cv(b,c,e,"direction",f)&&(a.direction="rtl");g=cv(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=pc);(g=cv(b,c,e,"textAlign",!0))?(a.positionAlign=dv[g],a.lineAlign=ev[g],a.textAlign=Ac[g.toUpperCase()]):a.textAlign="start";if(g=cv(b,c,e,"displayAlign",!0))a.displayAlign=Bc[g.toUpperCase()];if(g=cv(b,c,e,"color",f))a.color=g;if(g=cv(b,c,e,"backgroundColor",
837
- f))a.backgroundColor=g;if(g=cv(b,c,e,"border",f))a.border=g;if(g=cv(b,c,e,"fontFamily",f))a.fontFamily=g;(g=cv(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=cv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=cv(b,c,e,"lineHeight",f))&&g.match(fv)&&(a.lineHeight=g);(g=cv(b,c,e,"fontSize",f))&&(g.match(fv)||g.match(gv))&&(a.fontSize=g);if(g=cv(b,c,e,"fontStyle",f))a.fontStyle=Fc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
838
- d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=cv(b,c,e,"letterSpacing",f))&&d.match(fv)&&(a.letterSpacing=d);(d=cv(b,c,e,"linePadding",f))&&d.match(fv)&&(a.linePadding=d);if(f=cv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Wu(c,e,"textDecoration"))&&hv(a,c);(b=iv(b,e,"textDecoration"))&&hv(a,b)}
839
- function hv(a,b){for(var c=r(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")&&lc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&lc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
840
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&lc(a.textDecoration,"overline")}}function cv(a,b,c,d,e){e=void 0===e?!0:e;return(a=iv(a,c,d))?a:e?Wu(b,c,d):null}function Wu(a,b,c){if(!a)return null;var d=On(a,Su,c);return d?d:jv(a,b,c)}function iv(a,b,c){var d=On(a,Su,c);return d?d:jv(a,b,c)}
841
- function jv(a,b,c){a=Zu(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Nn(a[e],"urn:ebu:tt:style",c);f||(f=On(a[e],Su,c));f||(f=iv(a[e],b,c));f&&(d=f)}return d}
842
- function Zu(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Nn(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(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 av(a,b,c,d){a=$u(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}}
843
- function $u(a,b){var c=kv(a.getAttribute("begin"),b),d=kv(a.getAttribute("end"),b),e=kv(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
844
- function kv(a,b){var c=null;if(lv.test(a)){c=lv.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(mv.test(a))c=nv(mv,a);else if(ov.test(a))c=nv(ov,a);else if(pv.test(a))c=pv.exec(a),c=Number(c[1])/b.frameRate;else if(qv.test(a))c=qv.exec(a),c=Number(c[1])/b.g;else if(rv.test(a))c=nv(rv,a);else if(a)throw new O(2,2,2001,"Could not parse cue time range in TTML");return c}
845
- function nv(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)}J("shaka.text.TtmlTextParser",Qu);Qu.prototype.parseMedia=Qu.prototype.parseMedia;Qu.prototype.parseInit=Qu.prototype.parseInit;function Tu(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]))}
846
- var Uu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,gv=/^(\d{1,2}(?:\.\d+)?|100)%$/,fv=/^(\d+px|\d+em|\d*\.?\d+c)$/,Vu=/^(\d+)px (\d+)px$/,lv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,mv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,ov=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,pv=/^(\d*(?:\.\d*)?)f$/,qv=/^(\d*(?:\.\d*)?)t$/,rv=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,ev={left:vc,center:"center",right:"end",start:vc,end:"end"},dv=
847
- {left:"line-left",center:"center",right:"line-right"},Ru=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Su=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Yu=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];sd["application/ttml+xml"]=function(){return new Qu};function sv(){this.A=new Qu}sv.prototype.parseInit=function(a){var b=!1;(new tg).box("moov",xg).box("trak",xg).box("mdia",xg).box("minf",xg).box("stbl",xg).Y("stsd",zg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};sv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new tg).box("mdat",Ag(function(f){d=!0;e=e.concat(c.A.parseMedia(f,b))})).parse(a,!1);if(!d)throw new O(2,2,2007);return e};J("shaka.text.Mp4TtmlParser",sv);sv.prototype.parseMedia=sv.prototype.parseMedia;
848
- sv.prototype.parseInit=sv.prototype.parseInit;sd['application/mp4; codecs="stpp"']=function(){return new sv};sd['application/mp4; codecs="stpp.ttml"']=function(){return new sv};sd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new sv};sd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new sv};function tv(){}tv.prototype.parseInit=function(){};
849
- tv.prototype.parseMedia=function(a,b){var c=Vc(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 O(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){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=uv(new gq(e[1]));if(null==c)throw new O(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
850
- [];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new gq(g);var h=new qc;jq(g);hq(g);for(var k=jq(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))?
851
- (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");hq(g);k=jq(g)}f.push(h)}e=new Map;vv(e);g=[];d=r(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 oc(0,0,"");for(var n=!1,p=0;p<k.length;p++){var t=
815
+ 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.g=null;this.h=new nf;this.i=[];this.j=new Map}
816
+ function mu(a,b){a.g=b;a.h.Rb();var c=gu;b&&(a.h.m(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Mc(d.initData);a.g.dispatchEvent(e)}),a.h.m(b,c+"keymessage",function(d){var e=nu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new M("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.h.m(b,c+"keyadded",function(d){if(d=nu(a,d.sessionId))ou(d,"usable"),
817
+ d.g&&d.g.resolve(),d.g=null}),a.h.m(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.g||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)};
818
+ 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){eb.call(this);this.j=a;this.o=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Sc;this.keyStatuses=new qu}qa(pu,eb);q=pu.prototype;
819
+ q.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"))};
820
+ function ru(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;try{if("persistent-license"==a.l)if(c)var d=Lc(Zc("LOAD_SESSION|"+c));else{var e=Zc("PERSISTENT|");d=gd(e,b)}else d=Lc(b)}catch(g){return Promise.reject(g)}a.h=new Sc;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 P(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).T(.01)}return a.h}
821
+ 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=Vc(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=dd(e.keys[0].k);e=dd(e.keys[0].kid)}else d=Lc(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}}}
822
+ function ou(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new M("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return ru(this,b,null)};q.load=function(a){return"persistent-license"==this.l?ru(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Sc;su(this,b,a);return b};
823
+ q.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};q.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}q=qu.prototype;q.forEach=function(a){this.g&&a(this.g,jg.value())};q.get=function(a){if(this.has(a))return this.g};
824
+ q.has=function(a){var b=jg.value();return this.g&&Jc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var gu="";bt(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))}}
825
+ 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)}
826
+ 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"))}
827
+ function wu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function xu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Zs.PiPWebkit=tu;tu.install=uu;bt(uu);function Au(){}function Bu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Cu)}function Cu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Zs.StorageEstimate=Au;Au.install=Bu;bt(Bu);function Du(){}function Eu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Zs.VideoPlayPromise=Du;Du.install=Eu;bt(Eu);function Fu(){}function Gu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Hu)}}function Hu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Zs.VideoPlaybackQuality=Fu;Fu.install=Gu;bt(Gu);function Iu(){}function Ju(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Ku;else if(6==b)a=Lu;else{try{var c=!!Ku(1,2,"")}catch(d){c=!1}c&&(a=Ku)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Ku(a,b,c){return new window.TextTrackCue(a,b,c)}function Lu(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Zs.VTTCue=Iu;Iu.install=Ju;bt(Ju);function Mu(){}Mu.prototype.parseInit=function(){};Mu.prototype.parseMedia=function(a,b){var c=null,d=[],e=Vc(a).split(/\r?\n/);e=r(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Nu.exec(f))){var g=Ou.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new oc(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};J("shaka.text.LrcTextParser",Mu);Mu.prototype.parseMedia=Mu.prototype.parseMedia;
828
+ Mu.prototype.parseInit=Mu.prototype.parseInit;var Nu=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Ou=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;sd["application/x-subtitle-lrc"]=function(){return new Mu};function Pu(){}Pu.prototype.parseInit=function(){};
829
+ Pu.prototype.parseMedia=function(a,b){var c=Vc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(D){throw new N(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new N(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new N(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=Nn(g,Qu,"frameRate"),k=Nn(g,Qu,"subFrameRate"),l=Nn(g,Qu,"frameRateMultiplier"),
830
+ m=Nn(g,Qu,"tickRate"),n=Nn(g,Qu,"cellResolution");c=g.getAttribute("xml:space")||"default";e=Nn(g,Ru,"extent");if("default"!=c&&"preserve"!=c)throw new N(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Su(h,k,l,m);n=n?(n=/^(\d+) (\d+)$/.exec(n))?{columns:parseInt(n[1],10),rows:parseInt(n[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?Ln(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=r(g),t=p.next();!t.done;t=
831
+ p.next()){var v=t.value;t=new qc;var y=v.getAttribute("xml:id");if(y){t.id=y;var x=null;e&&(x=Tu.exec(e)||Uu.exec(e));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,C;if(w=Vu(v,l,"extent"))w=(C=Tu.exec(w))||Uu.exec(w),null!=w&&(t.width=Number(w[1]),t.height=Number(w[2]),C||(null!=y&&(t.width=100*t.width/y),null!=x&&(t.height=100*t.height/x)),t.widthUnits=C||null!=y?Gc:0,t.heightUnits=C||null!=x?Gc:0);if(v=Vu(v,l,"origin"))w=(C=Tu.exec(v))||Uu.exec(v),null!=w&&(t.viewportAnchorX=Number(w[1]),t.viewportAnchorY=
832
+ Number(w[2]),C||(null!=x&&(t.viewportAnchorY=100*t.viewportAnchorY/x),null!=y&&(t.viewportAnchorX=100*t.viewportAnchorX/y)),t.viewportAnchorUnits=C||null!=y?Gc:0)}else t=null;t&&m.push(t)}if(In(f,"p").length)throw new N(2,2,2001,"<p> can only be inside <div> in TTML");e=r(In(f,"div"));for(p=e.next();!p.done;p=e.next())if(In(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");(f=Wu(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
833
+ function Wu(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 t=null,v=r(Xu),y=v.next();!y.done&&!(t=Yu(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||t)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});
834
+ a=[];if(!y)for(var x=r(p.childNodes),w=x.next();!w.done;w=x.next())(w=Wu(w.value,b,c,d,e,f,g,h,k,p,m))&&a.push(w);d=null!=l;x=/\S/.test(p.textContent);var C=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(C||x||"br"==p.tagName||0!=a.length||d&&!h))return null;w=Zu(p,c);x=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=$u(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(!C&&0<a.length)for(x=Infinity,w=0,b=r(a),
835
+ 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 oc(x,w,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new oc(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Yu(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var D=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==D})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
836
+ (g=Yu(l,"region",f,"")[0]);av(b,p,g,t,e,v,0==a.length);return b}
837
+ function av(a,b,c,d,e,f,g){f=f||g;"rtl"==bv(b,c,e,"direction",f)&&(a.direction="rtl");g=bv(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=pc);(g=bv(b,c,e,"textAlign",!0))?(a.positionAlign=cv[g],a.lineAlign=dv[g],a.textAlign=Ac[g.toUpperCase()]):a.textAlign="start";if(g=bv(b,c,e,"displayAlign",!0))a.displayAlign=Bc[g.toUpperCase()];if(g=bv(b,c,e,"color",f))a.color=g;if(g=bv(b,c,e,"backgroundColor",
838
+ f))a.backgroundColor=g;if(g=bv(b,c,e,"border",f))a.border=g;if(g=bv(b,c,e,"fontFamily",f))a.fontFamily=g;(g=bv(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=bv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=bv(b,c,e,"lineHeight",f))&&g.match(ev)&&(a.lineHeight=g);(g=bv(b,c,e,"fontSize",f))&&(g.match(ev)||g.match(fv))&&(a.fontSize=g);if(g=bv(b,c,e,"fontStyle",f))a.fontStyle=Fc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
839
+ d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=bv(b,c,e,"letterSpacing",f))&&d.match(ev)&&(a.letterSpacing=d);(d=bv(b,c,e,"linePadding",f))&&d.match(ev)&&(a.linePadding=d);if(f=bv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Vu(c,e,"textDecoration"))&&gv(a,c);(b=hv(b,e,"textDecoration"))&&gv(a,b)}
840
+ function gv(a,b){for(var c=r(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")&&lc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&lc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
841
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&lc(a.textDecoration,"overline")}}function bv(a,b,c,d,e){e=void 0===e?!0:e;return(a=hv(a,c,d))?a:e?Vu(b,c,d):null}function Vu(a,b,c){if(!a)return null;var d=Nn(a,Ru,c);return d?d:iv(a,b,c)}function hv(a,b,c){var d=Nn(a,Ru,c);return d?d:iv(a,b,c)}
842
+ function iv(a,b,c){a=Yu(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Mn(a[e],"urn:ebu:tt:style",c);f||(f=Nn(a[e],Ru,c));f||(f=hv(a[e],b,c));f&&(d=f)}return d}
843
+ function Yu(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Mn(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(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 $u(a,b,c,d){a=Zu(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
844
+ function Zu(a,b){var c=jv(a.getAttribute("begin"),b),d=jv(a.getAttribute("end"),b),e=jv(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
845
+ function jv(a,b){var c=null;if(kv.test(a)){c=kv.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(lv.test(a))c=mv(lv,a);else if(nv.test(a))c=mv(nv,a);else if(ov.test(a))c=ov.exec(a),c=Number(c[1])/b.frameRate;else if(pv.test(a))c=pv.exec(a),c=Number(c[1])/b.g;else if(qv.test(a))c=mv(qv,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
846
+ function mv(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)}J("shaka.text.TtmlTextParser",Pu);Pu.prototype.parseMedia=Pu.prototype.parseMedia;Pu.prototype.parseInit=Pu.prototype.parseInit;function Su(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]))}
847
+ var Tu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,fv=/^(\d{1,2}(?:\.\d+)?|100)%$/,ev=/^(\d+px|\d+em|\d*\.?\d+c)$/,Uu=/^(\d+)px (\d+)px$/,kv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,lv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,nv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,ov=/^(\d*(?:\.\d*)?)f$/,pv=/^(\d*(?:\.\d*)?)t$/,qv=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,dv={left:vc,center:"center",right:"end",start:vc,end:"end"},cv=
848
+ {left:"line-left",center:"center",right:"line-right"},Qu=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Ru=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Xu=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];sd["application/ttml+xml"]=function(){return new Pu};function rv(){this.A=new Pu}rv.prototype.parseInit=function(a){var b=!1;(new tg).box("moov",xg).box("trak",xg).box("mdia",xg).box("minf",xg).box("stbl",xg).X("stsd",zg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};rv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new tg).box("mdat",Ag(function(f){d=!0;e=e.concat(c.A.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};J("shaka.text.Mp4TtmlParser",rv);rv.prototype.parseMedia=rv.prototype.parseMedia;
849
+ rv.prototype.parseInit=rv.prototype.parseInit;sd['application/mp4; codecs="stpp"']=function(){return new rv};sd['application/mp4; codecs="stpp.ttml"']=function(){return new rv};sd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new rv};sd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new rv};function sv(){}sv.prototype.parseInit=function(){};
850
+ sv.prototype.parseMedia=function(a,b){var c=Vc(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.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){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=tv(new fq(e[1]));if(null==c)throw new N(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
851
+ [];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new fq(g);var h=new qc;iq(g);gq(g);for(var k=iq(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))?
852
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");gq(g);k=iq(g)}f.push(h)}e=new Map;uv(e);g=[];d=r(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 oc(0,0,"");for(var n=!1,p=0;p<k.length;p++){var t=
852
853
  /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(t){var v=t[2].trim().replace(";","");switch(t[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=yc;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
853
- !0;m.opacity=parseFloat(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 gq(h[0]);m=uv(k);t=iq(k,/[ \t]+--\x3e[ \t]+/g);n=uv(k);if(null==m||null==t||null==n)throw new O(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(),h.startTime=m,h.endTime=n,h.payload=
854
- ""):h=new oc(m,n,"");wv(p,h,e);hq(k);for(m=jq(k);m;)xv(h,m,f),hq(k),m=jq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function vv(a){for(var b=r(Object.entries(Dc)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new oc(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(Ec));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new oc(0,0,""),e.backgroundColor=d,a.set(c,e)}
855
- function wv(a,b,c){0===c.size&&vv(c);a=yv(a);var d=$n("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=r(d);for(d=a.next();!d.done;d=a.next())zv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
856
- function yv(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 Av(a,b){return a&&0<a.length?a:b}
857
- function zv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(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=Av(h.backgroundColor,e.backgroundColor),e.color=Av(h.color,e.color),e.fontFamily=Av(h.fontFamily,e.fontFamily),e.fontSize=Av(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=
858
- "italic";break;case "u":e.textDecoration.push("underline")}}if(Qn(a))for(f=!0,d=r(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=r(a.childNodes),a=b.next();!a.done;a=b.next())zv(a.value,e,c,d)}
859
- function xv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=sc:a.textAlign=Ac[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"==
860
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Bv(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=Cc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=uc,a.line=Number(c[1]),c[2]&&(a.lineAlign=Cc[c[2].toUpperCase()])}function Bv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
861
- function uv(a){a=iq(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)}J("shaka.text.VttTextParser",tv);tv.prototype.parseMedia=tv.prototype.parseMedia;tv.prototype.parseInit=tv.prototype.parseInit;sd["text/vtt"]=function(){return new tv};sd['text/vtt; codecs="vtt"']=function(){return new tv};sd['text/vtt; codecs="wvtt"']=function(){return new tv};function Cv(){this.g=null}Cv.prototype.parseInit=function(a){var b=this,c=!1;(new tg).box("moov",xg).box("trak",xg).box("mdia",xg).Y("mdhd",function(d){d=Oh(d.reader,d.version);b.g=d.timescale}).box("minf",xg).box("stbl",xg).Y("stsd",zg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};
862
- Cv.prototype.parseMedia=function(a,b){if(!this.g)throw new O(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new tg).box("moof",xg).box("traf",xg).Y("tfdt",function(B){g=!0;c=Nh(B.reader,B.version).Qd}).Y("tfhd",function(B){l=Mh(B.reader,B.flags).Re}).Y("trun",function(B){h=!0;d=Ph(B.reader,B.version,B.flags).pf}).box("mdat",Ag(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);for(var m=c,n=new qg(e,0),p=r(d),t=p.next();!t.done;t=p.next()){t=t.value;var v=t.oe||l,y=t.td?
863
- c+t.td:m;m=y+(v||0);var x=0;do{var w=n.S();x+=w;var C=n.S(),D=null;"vttc"==Bg(C)?8<w&&(D=n.zb(w-8)):n.skip(w-8);v&&D&&(w=Dv(D,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(t.sampleSize&&x<t.sampleSize)}return f.filter(Jb)};function Dv(a,b,c){var d,e,f;(new tg).box("payl",Ag(function(g){d=Vc(g)})).box("iden",Ag(function(g){e=Vc(g)})).box("sttg",Ag(function(g){f=Vc(g)})).parse(a);return d?Ev(d,e,f,b,c):null}
864
- function Ev(a,b,c,d,e){d=new oc(d,e,"");wv(a,d,new Map);b&&(d.id=b);if(c)for(a=new gq(c),b=jq(a);b;)xv(d,b,[]),hq(a),b=jq(a);return d}J("shaka.text.Mp4VttParser",Cv);Cv.prototype.parseMedia=Cv.prototype.parseMedia;Cv.prototype.parseInit=Cv.prototype.parseInit;sd['application/mp4; codecs="wvtt"']=function(){return new Cv};function Fv(){}Fv.prototype.parseInit=function(){};Fv.prototype.parseMedia=function(a){var b=Vc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new gq(c[0]),e=Gv(d),f=iq(d,/,/g);d=Gv(d);if(null==e||null==f||null==d)throw new O(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new oc(e,d,c.slice(1).join("\n").trim()))}return a};
865
- function Gv(a){a=iq(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)}J("shaka.text.SbvTextParser",Fv);Fv.prototype.parseMedia=Fv.prototype.parseMedia;Fv.prototype.parseInit=Fv.prototype.parseInit;sd["text/x-subviewer"]=function(){return new Fv};function Hv(){this.A=new tv}Hv.prototype.parseInit=function(){};Hv.prototype.parseMedia=function(a,b){var c=Vc(a);c=Iv(c);c=Lc(Zc(c));return this.A.parseMedia(c,b)};function Iv(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(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}J("shaka.text.SrtTextParser",Hv);Hv.srt2webvtt=Iv;Hv.prototype.parseMedia=Hv.prototype.parseMedia;
866
- Hv.prototype.parseInit=Hv.prototype.parseInit;sd["text/srt"]=function(){return new Hv};function Jv(){}Jv.prototype.parseInit=function(){};
867
- Jv.prototype.parseMedia=function(a){var b="",c="";a=Vc(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Kv.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=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Lv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Mv);else if("Style"==e){e=f.split(Mv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
868
- [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Nd:e.Nd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Lv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Mv);else if("Dialogue"==f){g=g.split(Mv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Nv(f.Start);var k=Nv(f.End);g=new oc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Nd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Nd}}(e)))&&Ov(g,f);d.push(g)}return d};
869
- function Ov(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Pv(c))a.color=c;if(c=b.BackColour)if(c=Pv(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=wc;a.textAlign="start";break;case 2:a.displayAlign=wc;a.textAlign=sc;break;case 3:a.displayAlign=wc;a.textAlign="end";
854
+ !0;m.opacity=parseFloat(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 fq(h[0]);m=tv(k);t=hq(k,/[ \t]+--\x3e[ \t]+/g);n=tv(k);if(null==m||null==t||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(),h.startTime=m,h.endTime=n,h.payload=
855
+ ""):h=new oc(m,n,"");vv(p,h,e);gq(k);for(m=iq(k);m;)wv(h,m,f),gq(k),m=iq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function uv(a){for(var b=r(Object.entries(Dc)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new oc(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(Ec));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new oc(0,0,""),e.backgroundColor=d,a.set(c,e)}
856
+ function vv(a,b,c){0===c.size&&uv(c);a=xv(a);var d=Zn("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=r(d);for(d=a.next();!d.done;d=a.next())yv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
857
+ function xv(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 zv(a,b){return a&&0<a.length?a:b}
858
+ function yv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(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=zv(h.backgroundColor,e.backgroundColor),e.color=zv(h.color,e.color),e.fontFamily=zv(h.fontFamily,e.fontFamily),e.fontSize=zv(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=
859
+ "italic";break;case "u":e.textDecoration.push("underline")}}if(Pn(a))for(f=!0,d=r(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=r(a.childNodes),a=b.next();!a.done;a=b.next())yv(a.value,e,c,d)}
860
+ function wv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=sc:a.textAlign=Ac[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"==
861
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Av(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=Cc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=uc,a.line=Number(c[1]),c[2]&&(a.lineAlign=Cc[c[2].toUpperCase()])}function Av(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
862
+ function tv(a){a=hq(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)}J("shaka.text.VttTextParser",sv);sv.prototype.parseMedia=sv.prototype.parseMedia;sv.prototype.parseInit=sv.prototype.parseInit;sd["text/vtt"]=function(){return new sv};sd['text/vtt; codecs="vtt"']=function(){return new sv};sd['text/vtt; codecs="wvtt"']=function(){return new sv};function Bv(){this.g=null}Bv.prototype.parseInit=function(a){var b=this,c=!1;(new tg).box("moov",xg).box("trak",xg).box("mdia",xg).X("mdhd",function(d){d=Oh(d.reader,d.version);b.g=d.timescale}).box("minf",xg).box("stbl",xg).X("stsd",zg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};
863
+ Bv.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 tg).box("moof",xg).box("traf",xg).X("tfdt",function(B){g=!0;c=Nh(B.reader,B.version).Qd}).X("tfhd",function(B){l=Mh(B.reader,B.flags).Re}).X("trun",function(B){h=!0;d=Ph(B.reader,B.version,B.flags).pf}).box("mdat",Ag(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 qg(e,0),p=r(d),t=p.next();!t.done;t=p.next()){t=t.value;var v=t.oe||l,y=t.td?
864
+ c+t.td:m;m=y+(v||0);var x=0;do{var w=n.R();x+=w;var C=n.R(),D=null;"vttc"==Bg(C)?8<w&&(D=n.Ab(w-8)):n.skip(w-8);v&&D&&(w=Cv(D,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(t.sampleSize&&x<t.sampleSize)}return f.filter(Jb)};function Cv(a,b,c){var d,e,f;(new tg).box("payl",Ag(function(g){d=Vc(g)})).box("iden",Ag(function(g){e=Vc(g)})).box("sttg",Ag(function(g){f=Vc(g)})).parse(a);return d?Dv(d,e,f,b,c):null}
865
+ function Dv(a,b,c,d,e){d=new oc(d,e,"");vv(a,d,new Map);b&&(d.id=b);if(c)for(a=new fq(c),b=iq(a);b;)wv(d,b,[]),gq(a),b=iq(a);return d}J("shaka.text.Mp4VttParser",Bv);Bv.prototype.parseMedia=Bv.prototype.parseMedia;Bv.prototype.parseInit=Bv.prototype.parseInit;sd['application/mp4; codecs="wvtt"']=function(){return new Bv};function Ev(){}Ev.prototype.parseInit=function(){};Ev.prototype.parseMedia=function(a){var b=Vc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new fq(c[0]),e=Fv(d),f=hq(d,/,/g);d=Fv(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 oc(e,d,c.slice(1).join("\n").trim()))}return a};
866
+ function Fv(a){a=hq(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)}J("shaka.text.SbvTextParser",Ev);Ev.prototype.parseMedia=Ev.prototype.parseMedia;Ev.prototype.parseInit=Ev.prototype.parseInit;sd["text/x-subviewer"]=function(){return new Ev};function Gv(){this.A=new sv}Gv.prototype.parseInit=function(){};Gv.prototype.parseMedia=function(a,b){var c=Vc(a);c=Hv(c);c=Lc(Zc(c));return this.A.parseMedia(c,b)};function Hv(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(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}J("shaka.text.SrtTextParser",Gv);Gv.srt2webvtt=Hv;Gv.prototype.parseMedia=Gv.prototype.parseMedia;
867
+ Gv.prototype.parseInit=Gv.prototype.parseInit;sd["text/srt"]=function(){return new Gv};function Iv(){}Iv.prototype.parseInit=function(){};
868
+ Iv.prototype.parseMedia=function(a){var b="",c="";a=Vc(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Jv.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=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Kv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Lv);else if("Style"==e){e=f.split(Lv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
869
+ [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Nd:e.Nd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Kv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Lv);else if("Dialogue"==f){g=g.split(Lv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Mv(f.Start);var k=Mv(f.End);g=new oc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Nd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Nd}}(e)))&&Nv(g,f);d.push(g)}return d};
870
+ function Nv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Ov(c))a.color=c;if(c=b.BackColour)if(c=Ov(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=wc;a.textAlign="start";break;case 2:a.displayAlign=wc;a.textAlign=sc;break;case 3:a.displayAlign=wc;a.textAlign="end";
870
871
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=sc;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=sc;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
871
- function Pv(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 Nv(a){a=Qv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}J("shaka.text.SsaTextParser",Jv);Jv.prototype.parseMedia=Jv.prototype.parseMedia;Jv.prototype.parseInit=Jv.prototype.parseInit;var Kv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Lv=/^\s*([^:]+):\s*(.*)/,Mv=/\s*,\s*/,Qv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
872
- sd["text/x-ssa"]=function(){return new Jv};/*
872
+ function Ov(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 Mv(a){a=Pv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}J("shaka.text.SsaTextParser",Iv);Iv.prototype.parseMedia=Iv.prototype.parseMedia;Iv.prototype.parseInit=Iv.prototype.parseInit;var Jv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Kv=/^\s*([^:]+):\s*(.*)/,Lv=/\s*,\s*/,Pv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
873
+ sd["text/x-ssa"]=function(){return new Iv};/*
873
874
  @license
874
875
  EME Encryption Scheme Polyfill
875
876
  Copyright 2019 Google LLC
876
877
  SPDX-License-Identifier: Apache-2.0
877
878
  */
878
- function Rv(){}var Sv;function Tv(){Sv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Sv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Uv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
879
- function Uv(a,b){var c=this,d;return H(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Sv.call(c,a,b),2);d=e.h;if(Vv(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Sv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Wv;return e["return"](Wv.call(c,
879
+ function Qv(){}var Rv;function Sv(){Rv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Rv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Tv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
880
+ function Tv(a,b){var c=this,d;return H(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Rv.call(c,a,b),2);d=e.h;if(Uv(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Rv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Vv;return e["return"](Vv.call(c,
880
881
  a,b))})}
881
- function Wv(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return H(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Xv(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Yv(h.videoCapabilities,d),l=Yv(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."),
882
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(t,Sv.call(c,a,e),2)}p=t.h;return t["return"](new Zv(p,d))})}function Yv(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}J("EmeEncryptionSchemePolyfill",Rv);Rv.install=Tv;function $v(){}var aw;
883
- function bw(){aw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(aw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=cw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
884
- function cw(a){var b=this,c,d;return H(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(e,aw.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Vv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=aw,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
885
- navigator.mediaCapabilities.decodingInfo=dw;return e["return"](dw.call(b,a))})}
886
- function dw(a){var b=this,c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.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=Xv(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):u(n,aw.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
887
- new Zv(k.keySystemAccess,c);n.C(3);break}if(!a.keySystemConfiguration){n.C(3);break}var p=a.keySystemConfiguration,t=[],v=[];p.audio&&t.push({robustness:p.audio.robustness||"",contentType:a.audio.contentType});p.video&&v.push({robustness:p.video.robustness||"",contentType:a.video.contentType});p={initDataTypes:p.initDataType?[p.initDataType]:[],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};t.length&&(p.audioCapabilities=t);v.length&&(p.videoCapabilities=
888
- v);l=p;m=k;return u(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}J("McEncryptionSchemePolyfill",$v);$v.install=bw;function Zv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
889
- Zv.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Zv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
890
- function Xv(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Vv(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function ew(){}
891
- function it(){Tv();bw()}J("EncryptionSchemePolyfills",ew);ew.install=it;"undefined"!==typeof module&&module.exports&&(module.exports=ew);/*
882
+ function Vv(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return H(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Wv(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Xv(h.videoCapabilities,d),l=Xv(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."),
883
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(t,Rv.call(c,a,e),2)}p=t.h;return t["return"](new Yv(p,d))})}function Xv(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}J("EmeEncryptionSchemePolyfill",Qv);Qv.install=Sv;function Zv(){}var $v;
884
+ function aw(){$v?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?($v=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=bw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
885
+ function bw(a){var b=this,c,d;return H(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(e,$v.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Uv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=$v,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
886
+ navigator.mediaCapabilities.decodingInfo=cw;return e["return"](cw.call(b,a))})}
887
+ function cw(a){var b=this,c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.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=Wv(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):u(n,$v.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
888
+ new Yv(k.keySystemAccess,c);n.C(3);break}if(!a.keySystemConfiguration){n.C(3);break}var p=a.keySystemConfiguration,t=[],v=[];p.audio&&t.push({robustness:p.audio.robustness||"",contentType:a.audio.contentType});p.video&&v.push({robustness:p.video.robustness||"",contentType:a.video.contentType});p={initDataTypes:p.initDataType?[p.initDataType]:[],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};t.length&&(p.audioCapabilities=t);v.length&&(p.videoCapabilities=
889
+ v);l=p;m=k;return u(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}J("McEncryptionSchemePolyfill",Zv);Zv.install=aw;function Yv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
890
+ Yv.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Yv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
891
+ function Wv(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Uv(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function dw(){}
892
+ function ht(){Sv();aw()}J("EncryptionSchemePolyfills",dw);dw.install=ht;"undefined"!==typeof module&&module.exports&&(module.exports=dw);/*
892
893
  @license
893
894
  Copyright 2013 Ali Al Dallal
894
895
 
@@ -912,7 +913,7 @@ function it(){Tv();bw()}J("EncryptionSchemePolyfills",ew);ew.install=it;"undefin
912
913
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
913
914
  SOFTWARE.
914
915
  */
915
- for(var fw={ach:{u:"Lwo",v:"Acholi"},ady:{u:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",v:"Adyghe"},af:{u:"Afrikaans",v:"Afrikaans"},"af-NA":{u:"Afrikaans (Namibia)",v:"Afrikaans (Namibia)"},"af-ZA":{u:"Afrikaans (South Africa)",v:"Afrikaans (South Africa)"},ak:{u:"T\u0255\u0265i",v:"Akan"},ar:{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",v:"Arabic"},"ar-AR":{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",v:"Arabic"},"ar-MA":{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",v:"Arabic (Morocco)"},
916
+ for(var ew={ach:{u:"Lwo",v:"Acholi"},ady:{u:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",v:"Adyghe"},af:{u:"Afrikaans",v:"Afrikaans"},"af-NA":{u:"Afrikaans (Namibia)",v:"Afrikaans (Namibia)"},"af-ZA":{u:"Afrikaans (South Africa)",v:"Afrikaans (South Africa)"},ak:{u:"T\u0255\u0265i",v:"Akan"},ar:{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",v:"Arabic"},"ar-AR":{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",v:"Arabic"},"ar-MA":{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",v:"Arabic (Morocco)"},
916
917
  "ar-SA":{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",v:"Arabic (Saudi Arabia)"},"ay-BO":{u:"Aymar aru",v:"Aymara"},az:{u:"Az\u0259rbaycan dili",v:"Azerbaijani"},"az-AZ":{u:"Az\u0259rbaycan dili",v:"Azerbaijani"},"be-BY":{u:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",v:"Belarusian"},bg:{u:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",v:"Bulgarian"},"bg-BG":{u:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
917
918
  v:"Bulgarian"},bn:{u:"\u09ac\u09be\u0982\u09b2\u09be",v:"Bengali"},"bn-IN":{u:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",v:"Bengali (India)"},"bn-BD":{u:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",v:"Bengali (Bangladesh)"},"bs-BA":{u:"Bosanski",v:"Bosnian"},ca:{u:"Catal\u00e0",v:"Catalan"},"ca-ES":{u:"Catal\u00e0",v:"Catalan"},cak:{u:"Maya Kaqchikel",v:"Kaqchikel"},"ck-US":{u:"\u13e3\u13b3\u13a9 (tsalagi)",v:"Cherokee"},cs:{u:"\u010ce\u0161tina",
918
919
  v:"Czech"},"cs-CZ":{u:"\u010ce\u0161tina",v:"Czech"},cy:{u:"Cymraeg",v:"Welsh"},"cy-GB":{u:"Cymraeg",v:"Welsh"},da:{u:"Dansk",v:"Danish"},"da-DK":{u:"Dansk",v:"Danish"},de:{u:"Deutsch",v:"German"},"de-AT":{u:"Deutsch (\u00d6sterreich)",v:"German (Austria)"},"de-DE":{u:"Deutsch (Deutschland)",v:"German (Germany)"},"de-CH":{u:"Deutsch (Schweiz)",v:"German (Switzerland)"},dsb:{u:"Dolnoserb\u0161\u0107ina",v:"Lower Sorbian"},el:{u:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",v:"Greek"},"el-GR":{u:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
@@ -933,49 +934,49 @@ v:"Slovak"},"sk-SK":{u:"Sloven\u010dina (Slovakia)",v:"Slovak (Slovakia)"},sl:{u
933
934
  sw:{u:"Kiswahili",v:"Swahili"},"sw-KE":{u:"Kiswahili",v:"Swahili (Kenya)"},ta:{u:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",v:"Tamil"},"ta-IN":{u:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",v:"Tamil"},te:{u:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",v:"Telugu"},"te-IN":{u:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",v:"Telugu"},tg:{u:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",v:"Tajik"},"tg-TJ":{u:"\u0442\u043e\u04b7\u0438\u043a\u04e3",v:"Tajik"},th:{u:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
934
935
  v:"Thai"},"th-TH":{u:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",v:"Thai (Thailand)"},tl:{u:"Filipino",v:"Filipino"},"tl-PH":{u:"Filipino",v:"Filipino"},tlh:{u:"tlhIngan-Hol",v:"Klingon"},tr:{u:"T\u00fcrk\u00e7e",v:"Turkish"},"tr-TR":{u:"T\u00fcrk\u00e7e",v:"Turkish"},"tt-RU":{u:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",v:"Tatar"},uk:{u:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",v:"Ukrainian"},"uk-UA":{u:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
935
936
  v:"Ukrainian"},ur:{u:"\u0627\u0631\u062f\u0648",v:"Urdu"},"ur-PK":{u:"\u0627\u0631\u062f\u0648",v:"Urdu"},uz:{u:"O'zbek",v:"Uzbek"},"uz-UZ":{u:"O'zbek",v:"Uzbek"},vi:{u:"Ti\u1ebfng Vi\u1ec7t",v:"Vietnamese"},"vi-VN":{u:"Ti\u1ebfng Vi\u1ec7t",v:"Vietnamese"},"xh-ZA":{u:"isiXhosa",v:"Xhosa"},yi:{u:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",v:"Yiddish"},"yi-DE":{u:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",v:"Yiddish (German)"},zh:{u:"\u4e2d\u6587",v:"Chinese"},"zh-HANS":{u:"\u4e2d\u6587\u7b80\u4f53",
936
- v:"Chinese Simplified"},"zh-HANT":{u:"\u4e2d\u6587\u7e41\u9ad4",v:"Chinese Traditional"},"zh-CN":{u:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",v:"Chinese Simplified (China)"},"zh-HK":{u:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",v:"Chinese Traditional (Hong Kong)"},"zh-SG":{u:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",v:"Chinese Simplified (Singapore)"},"zh-TW":{u:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",v:"Chinese Traditional (Taiwan)"},"zu-ZA":{u:"isiZulu",v:"Zulu"}},gw=r(Object.keys(fw)),hw=gw.next();!hw.done;hw=
937
- gw.next()){var iw=hw.value;fw[iw.toLowerCase()]=fw[iw]};function jw(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new nf;this.localization=this.controls.Za;this.player=this.controls.cc();this.video=this.controls.yb();this.adManager=this.player.ed();this.ad=b.getAd();this.eventManager.m(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.m(this.adManager,"ad-stopped",function(){c.ad=null})}
938
- jw.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};J("shaka.ui.Element",jw);jw.prototype.release=jw.prototype.release;function kw(a){return lw(a,"shaka-back-to-overflow-button")}function lw(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function mw(a){a&&(a=lw(a,"shaka-chosen-item"))&&a.parentElement.focus()}function nw(){var a=R("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function X(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
939
- function ow(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60),e=Math.floor(a%60);10>e&&(e="0"+e);e=d+":"+e;b&&(10>d&&(e="0"+e),e=c+":"+e);return e};function pw(a,b){jw.call(this,a,b);var c=this;this.i=R("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=R("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new P(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=ow(e-d,!1)+" / "+ow(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
940
- ""))});this.eventManager.m(this.localization,"locale-updated",function(){});this.eventManager.m(this.localization,"locale-changed",function(){});this.eventManager.m(this.adManager,"ad-started",function(){c.g.Da();c.g.oa(.5)});this.eventManager.m(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Da(),this.g.oa(.5))}qa(pw,jw);pw.prototype.release=function(){this.g.stop();this.g=null;jw.prototype.release.call(this)};J("shaka.ui.AdCounter",pw);function qw(a,b){jw.call(this,a,b);var c=this;this.g=R("div");this.g.classList.add("shaka-ad-position");X(this.g,!1);this.parent.appendChild(this.g);this.h=R("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.m(this.localization,"locale-updated",function(){c.ad&&rw(c)});this.eventManager.m(this.localization,"locale-changed",function(){c.ad&&rw(c)});this.eventManager.m(this.adManager,"ad-started",function(){rw(c)});this.eventManager.m(this.adManager,
941
- "ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&rw(this)}qa(qw,jw);function rw(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));X(a.g,!0)}}J("shaka.ui.AdPosition",qw);function sw(a,b){jw.call(this,a,b);var c=this;this.button=Vj();this.parent.appendChild(this.button);this.eventManager.m(this.localization,"locale-updated",function(){c.g()});this.eventManager.m(this.localization,"locale-changed",function(){c.g()});this.eventManager.m(this.video,"play",function(){c.g();c.h()});this.eventManager.m(this.video,"pause",function(){c.g();c.h()});this.eventManager.m(this.video,"seeking",function(){c.g();c.h()});this.eventManager.m(this.adManager,"ad-paused",function(){c.g();
942
- c.h()});this.eventManager.m(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.m(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.m(this.button,"click",function(){c.ad?tw(c.controls):uw(c.controls)});this.ad&&(this.g(),this.h())}qa(sw,jw);sw.prototype.isPaused=function(){if(this.ad)var a=this.ad.isPaused();else a=this.controls,a=a.g.paused&&!a.ea;return a};sw.prototype.g=function(){};sw.prototype.h=function(){};J("shaka.ui.PlayButton",sw);function vw(a,b){sw.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}qa(vw,sw);vw.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};vw.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};J("shaka.ui.BigPlayButton",vw);function ww(a,b,c,d){jw.call(this,a,b);var e=this;this.container=R("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ia(c));this.g=!1;this.bar=document.createElement("input");this.l=new P(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ia(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
943
- this.parent.appendChild(this.container);this.eventManager.m(this.bar,"mousedown",function(){e.controls.Mb()&&(e.g=!0,e.onChangeStart())});this.eventManager.m(this.bar,"touchstart",function(f){e.controls.Mb()&&(e.g=!0,xw(e,f),e.onChangeStart())});this.eventManager.m(this.bar,"input",function(){e.onChange()});this.eventManager.m(this.bar,"touchmove",function(f){e.g&&(xw(e,f),e.onChange())});this.eventManager.m(this.bar,"touchend",function(f){e.g&&(e.g=!1,xw(e,f),e.onChangeEnd())});this.eventManager.m(this.bar,
944
- "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}qa(ww,jw);q=ww.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);jw.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.T(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
945
- q.setValue=function(a){this.g||(this.bar.value=a)};function xw(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect(),e=parseFloat(a.bar.min),f=parseFloat(a.bar.max);c=e+(f-e)/d.width*(c.clientX-d.left);c<e?c=e:c>f&&(c=f);a.bar.value=c}J("shaka.ui.RangeElement",ww);ww.prototype.setValue=ww.prototype.setValue;ww.prototype.getValue=ww.prototype.getValue;ww.prototype.changeTo=ww.prototype.changeTo;ww.prototype.onChangeEnd=ww.prototype.onChangeEnd;ww.prototype.onChange=ww.prototype.onChange;
946
- ww.prototype.onChangeStart=ww.prototype.onChangeStart;ww.prototype.setRange=ww.prototype.setRange;function yw(a,b){ww.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=R("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.s=this.controls.s;this.h=new P(function(){c.video.currentTime=c.getValue()});this.o=new P(function(){zw(c)});this.A=!1;this.i=[];this.eventManager.m(this.localization,"locale-updated",function(){return Aw(c)});this.eventManager.m(this.localization,
947
- "locale-changed",function(){return Aw(c)});this.eventManager.m(this.adManager,"ad-started",function(){X(c.container,!1)});this.eventManager.m(this.adManager,"ad-stopped",function(){Bw(c)&&X(c.container,!0)});this.eventManager.m(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Cw(c)});this.eventManager.m(this.player,"unloading",function(){c.i=[];Cw(c)});this.setValue(this.video.currentTime);this.update();Aw(this);this.ad&&X(this.container,!1)}qa(yw,ww);q=yw.prototype;
948
- q.release=function(){this.h&&(this.h.stop(),this.h=null,this.o.stop(),this.o=null);ww.prototype.release.call(this)};q.onChangeStart=function(){this.A=!this.video.paused;this.controls.ye(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.T(.125))};q.onChangeEnd=function(){this.h.Da();this.controls.ye(!1);this.A&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
949
- q.update=function(){var a=this.s.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.La(),g=f.end-f.start;this.setRange(f.start,f.end);Bw(this)?(X(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.s.showUnbufferedStart?
950
- a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):X(this.container,!1)};
951
- function zw(a){if(a.i.length){for(var b=a.player.La(),c=b.end-b.start,d=["to right"],e=[],f=a.s.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
952
- 100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function Cw(a){zw(a);var b=a.player.La();b=b.end-b.start;a.player.Z()&&5<b&&a.o.oa(1)}function Bw(a){var b=a.player.La();b=b.end-b.start;return a.player.Z()&&5>b?!1:null==a.ad}function Aw(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}J("shaka.ui.SeekBar",yw);function Dw(){}Dw.prototype.create=function(a,b){return new yw(a,b)};
953
- yw.Factory=Dw;function Y(a,b,c,d){eb.call(this);var e=this;this.X=!0;this.s=d;this.A=new $m(c,a,this.s.castReceiverAppId);this.vb=!0;this.g=this.A.yb();this.B=c;this.D=this.A.cc();this.Ja=a;this.j=b;this.ub=this.D.ed();this.l=this.o=null;this.ea=!1;this.H=[];this.Zb=[];this.Db=!1;this.ha=new P(function(){e.j.style.cursor="none";e.Db=!1;Ew(e)});this.va=new P(function(){e.i.removeAttribute("shown");e.I.T(2)});this.I=new P(function(){for(var f=r(e.H),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.hb=new P(function(){e.Mb()&&
954
- Fw(e)});this.K=null;this.R=[];this.Za=Gw();this.h=new nf;this.configure(this.s);Hw(this);this.za=new Set;Iw(this);this.hb.oa(.125);this.h.m(this.Za,"locale-changed",function(f){e.ub.setLocale(f.locales[0])})}qa(Y,eb);q=Y.prototype;
955
- q.destroy=function(){var a=this;return H(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.C(2);break}return u(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.ha&&(a.ha.stop(),a.ha=null);a.va&&(a.va.stop(),a.va=null);a.I&&(a.I.stop(),a.I=null);a.hb&&(a.hb.stop(),a.hb=null);Jw(a);a.i&&(a.j.removeChild(a.i),a.i=null);if(!a.A){b.C(4);break}return u(b,a.A.destroy(),5);case 5:a.A=null;case 4:if(!a.Ja){b.C(6);break}return u(b,a.Ja.destroy(),7);case 7:a.Ja=
956
- null;case 6:a.D=null,a.B=null,a.g=null,a.Za=null,a.za.clear(),z(b)}})};function Jw(a){for(var b=r(a.R),c=b.next();!c.done;c=b.next())c.value.release();a.R=[]}function Kw(a,b){Lw.set(a,b)}q.Hf=function(a){this.vb=a;Iw(this)};q.Cg=function(){Ew(this)};
957
- q.configure=function(a){this.s=a;this.A.Ne(a.castReceiverAppId);this.l&&(this.l=null);this.Cb&&(this.Cb=null);this.i?(Wj(this.i),Jw(this)):(Mw(this),this.ba=R("div"),this.ba.classList.add("shaka-client-side-ad-container"),X(this.ba,!1),this.j.appendChild(this.ba));this.j.classList.add("shaka-video-container");this.B.classList.add("shaka-video");Nw(this);this.s.addBigPlayButton&&Ow(this);this.ia||Pw(this);this.rb=R("div");this.rb.classList.add("shaka-server-side-ad-container");this.i.appendChild(this.rb);
958
- Qw(this);this.H=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.H.push.apply(this.H,ia(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Rw(this);this.Zb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Ew(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.m(b,"click",c);this.h.m(b,"dblclick",c)}};
959
- q.ue=function(a){(this.X=a)?(this.j.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.j.removeAttribute("shaka-controls");Ew(this)};q.tf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.ue(!1)};q.getAd=function(){return this.o};q.Tf=function(){return this.A};q.fg=function(){return this.Za};q.wg=function(){return this.j};q.yb=function(){return this.g};q.eg=function(){return this.B};q.cc=function(){return this.D};q.dg=function(){return this.Ja};q.Yf=function(){return this.i};
960
- q.ng=function(){return this.rb};q.Vf=function(){return this.ba};q.Wf=function(){return this.s};q.Bg=function(){return this.ea};q.ye=function(a){this.ea=a};q.zg=function(){return this.vb};q.We=function(){return this.l?this.l.getValue():this.g.currentTime};q.uf=function(a){this.K=a};q.Zc=function(){return this.H.some(function(a){return!a.classList.contains("shaka-hidden")})};q.Hc=function(){this.I.Da()};
937
+ v:"Chinese Simplified"},"zh-HANT":{u:"\u4e2d\u6587\u7e41\u9ad4",v:"Chinese Traditional"},"zh-CN":{u:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",v:"Chinese Simplified (China)"},"zh-HK":{u:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",v:"Chinese Traditional (Hong Kong)"},"zh-SG":{u:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",v:"Chinese Simplified (Singapore)"},"zh-TW":{u:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",v:"Chinese Traditional (Taiwan)"},"zu-ZA":{u:"isiZulu",v:"Zulu"}},fw=r(Object.keys(ew)),gw=fw.next();!gw.done;gw=
938
+ fw.next()){var hw=gw.value;ew[hw.toLowerCase()]=ew[hw]};function iw(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new nf;this.localization=this.controls.$a;this.player=this.controls.dc();this.video=this.controls.zb();this.adManager=this.player.ed();this.ad=b.getAd();this.eventManager.m(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.m(this.adManager,"ad-stopped",function(){c.ad=null})}
939
+ iw.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};J("shaka.ui.Element",iw);iw.prototype.release=iw.prototype.release;function jw(a){return kw(a,"shaka-back-to-overflow-button")}function kw(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function lw(a){a&&(a=kw(a,"shaka-chosen-item"))&&a.parentElement.focus()}function mw(){var a=R("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function Y(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
940
+ function nw(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60),e=Math.floor(a%60);10>e&&(e="0"+e);e=d+":"+e;b&&(10>d&&(e="0"+e),e=c+":"+e);return e};function ow(a,b){iw.call(this,a,b);var c=this;this.i=R("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=R("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new P(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=nw(e-d,!1)+" / "+nw(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
941
+ ""))});this.eventManager.m(this.localization,"locale-updated",function(){});this.eventManager.m(this.localization,"locale-changed",function(){});this.eventManager.m(this.adManager,"ad-started",function(){c.g.Ea();c.g.oa(.5)});this.eventManager.m(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Ea(),this.g.oa(.5))}qa(ow,iw);ow.prototype.release=function(){this.g.stop();this.g=null;iw.prototype.release.call(this)};J("shaka.ui.AdCounter",ow);function pw(a,b){iw.call(this,a,b);var c=this;this.g=R("div");this.g.classList.add("shaka-ad-position");Y(this.g,!1);this.parent.appendChild(this.g);this.h=R("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.m(this.localization,"locale-updated",function(){c.ad&&qw(c)});this.eventManager.m(this.localization,"locale-changed",function(){c.ad&&qw(c)});this.eventManager.m(this.adManager,"ad-started",function(){qw(c)});this.eventManager.m(this.adManager,
942
+ "ad-stopped",function(){c.h.textContent="";Y(c.g,!1)});this.ad&&qw(this)}qa(pw,iw);function qw(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));Y(a.g,!0)}}J("shaka.ui.AdPosition",pw);function rw(a,b){iw.call(this,a,b);var c=this;this.button=Uj();this.parent.appendChild(this.button);this.eventManager.m(this.localization,"locale-updated",function(){c.g()});this.eventManager.m(this.localization,"locale-changed",function(){c.g()});this.eventManager.m(this.video,"play",function(){c.g();c.h()});this.eventManager.m(this.video,"pause",function(){c.g();c.h()});this.eventManager.m(this.video,"seeking",function(){c.g();c.h()});this.eventManager.m(this.adManager,"ad-paused",function(){c.g();
943
+ c.h()});this.eventManager.m(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.m(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.m(this.button,"click",function(){c.ad?sw(c.controls):tw(c.controls)});this.ad&&(this.g(),this.h())}qa(rw,iw);rw.prototype.isPaused=function(){if(this.ad)var a=this.ad.isPaused();else a=this.controls,a=a.g.paused&&!a.ha;return a};rw.prototype.g=function(){};rw.prototype.h=function(){};J("shaka.ui.PlayButton",rw);function uw(a,b){rw.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}qa(uw,rw);uw.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};uw.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};J("shaka.ui.BigPlayButton",uw);function vw(a,b,c,d){iw.call(this,a,b);var e=this;this.container=R("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ha(c));this.g=!1;this.bar=document.createElement("input");this.l=new P(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ha(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
944
+ this.parent.appendChild(this.container);this.eventManager.m(this.bar,"mousedown",function(){e.controls.Nb()&&(e.g=!0,e.onChangeStart())});this.eventManager.m(this.bar,"touchstart",function(f){e.controls.Nb()&&(e.g=!0,ww(e,f),e.onChangeStart())});this.eventManager.m(this.bar,"input",function(){e.onChange()});this.eventManager.m(this.bar,"touchmove",function(f){e.g&&(ww(e,f),e.onChange())});this.eventManager.m(this.bar,"touchend",function(f){e.g&&(e.g=!1,ww(e,f),e.onChangeEnd())});this.eventManager.m(this.bar,
945
+ "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}qa(vw,iw);q=vw.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);iw.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.T(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
946
+ q.setValue=function(a){this.g||(this.bar.value=a)};function ww(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect(),e=parseFloat(a.bar.min),f=parseFloat(a.bar.max);c=e+(f-e)/d.width*(c.clientX-d.left);c<e?c=e:c>f&&(c=f);a.bar.value=c}J("shaka.ui.RangeElement",vw);vw.prototype.setValue=vw.prototype.setValue;vw.prototype.getValue=vw.prototype.getValue;vw.prototype.changeTo=vw.prototype.changeTo;vw.prototype.onChangeEnd=vw.prototype.onChangeEnd;vw.prototype.onChange=vw.prototype.onChange;
947
+ vw.prototype.onChangeStart=vw.prototype.onChangeStart;vw.prototype.setRange=vw.prototype.setRange;function xw(a,b){vw.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=R("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.s=this.controls.s;this.h=new P(function(){c.video.currentTime=c.getValue()});this.o=new P(function(){yw(c)});this.A=!1;this.i=[];this.eventManager.m(this.localization,"locale-updated",function(){return zw(c)});this.eventManager.m(this.localization,
948
+ "locale-changed",function(){return zw(c)});this.eventManager.m(this.adManager,"ad-started",function(){Y(c.container,!1)});this.eventManager.m(this.adManager,"ad-stopped",function(){Aw(c)&&Y(c.container,!0)});this.eventManager.m(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Bw(c)});this.eventManager.m(this.player,"unloading",function(){c.i=[];Bw(c)});this.setValue(this.video.currentTime);this.update();zw(this);this.ad&&Y(this.container,!1)}qa(xw,vw);q=xw.prototype;
949
+ q.release=function(){this.h&&(this.h.stop(),this.h=null,this.o.stop(),this.o=null);vw.prototype.release.call(this)};q.onChangeStart=function(){this.A=!this.video.paused;this.controls.ye(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.T(.125))};q.onChangeEnd=function(){this.h.Ea();this.controls.ye(!1);this.A&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
950
+ q.update=function(){var a=this.s.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.La(),g=f.end-f.start;this.setRange(f.start,f.end);Aw(this)?(Y(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.s.showUnbufferedStart?
951
+ a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):Y(this.container,!1)};
952
+ function yw(a){if(a.i.length){for(var b=a.player.La(),c=b.end-b.start,d=["to right"],e=[],f=a.s.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
953
+ 100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function Bw(a){yw(a);var b=a.player.La();b=b.end-b.start;a.player.Y()&&5<b&&a.o.oa(1)}function Aw(a){var b=a.player.La();b=b.end-b.start;return a.player.Y()&&5>b?!1:null==a.ad}function zw(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}J("shaka.ui.SeekBar",xw);function Cw(){}Cw.prototype.create=function(a,b){return new xw(a,b)};
954
+ xw.Factory=Cw;function Z(a,b,c,d){eb.call(this);var e=this;this.ba=!0;this.s=d;this.A=new Zm(c,a,this.s.castReceiverAppId);this.xb=!0;this.g=this.A.zb();this.B=c;this.D=this.A.dc();this.Ka=a;this.j=b;this.wb=this.D.ed();this.l=this.o=null;this.ha=!1;this.H=[];this.$b=[];this.Eb=!1;this.ia=new P(function(){e.j.style.cursor="none";e.Eb=!1;Dw(e)});this.za=new P(function(){e.i.removeAttribute("shown");e.I.T(2)});this.I=new P(function(){for(var f=r(e.H),g=f.next();!g.done;g=f.next())Y(g.value,!1)});this.jb=new P(function(){e.Nb()&&
955
+ Ew(e)});this.K=null;this.S=[];this.$a=Fw();this.h=new nf;this.configure(this.s);Gw(this);this.Aa=new Set;Hw(this);this.jb.oa(.125);this.h.m(this.$a,"locale-changed",function(f){e.wb.setLocale(f.locales[0])})}qa(Z,eb);q=Z.prototype;
956
+ q.destroy=function(){var a=this;return H(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.C(2);break}return u(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.ia&&(a.ia.stop(),a.ia=null);a.za&&(a.za.stop(),a.za=null);a.I&&(a.I.stop(),a.I=null);a.jb&&(a.jb.stop(),a.jb=null);Iw(a);a.i&&(a.j.removeChild(a.i),a.i=null);if(!a.A){b.C(4);break}return u(b,a.A.destroy(),5);case 5:a.A=null;case 4:if(!a.Ka){b.C(6);break}return u(b,a.Ka.destroy(),7);case 7:a.Ka=
957
+ null;case 6:a.D=null,a.B=null,a.g=null,a.$a=null,a.Aa.clear(),eb.prototype.release.call(a),z(b)}})};function Iw(a){for(var b=r(a.S),c=b.next();!c.done;c=b.next())c.value.release();a.S=[]}function Jw(a,b){Kw.set(a,b)}q.Hf=function(a){this.xb=a;Hw(this)};q.Cg=function(){Dw(this)};
958
+ q.configure=function(a){this.s=a;this.A.Ne(a.castReceiverAppId);this.l&&(this.l=null);this.Db&&(this.Db=null);this.i?(Vj(this.i),Iw(this)):(Lw(this),this.ea=R("div"),this.ea.classList.add("shaka-client-side-ad-container"),Y(this.ea,!1),this.j.appendChild(this.ea));this.j.classList.add("shaka-video-container");this.B.classList.add("shaka-video");Mw(this);this.s.addBigPlayButton&&Nw(this);this.qa||Ow(this);this.tb=R("div");this.tb.classList.add("shaka-server-side-ad-container");this.i.appendChild(this.tb);
959
+ Pw(this);this.H=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.H.push.apply(this.H,ha(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Qw(this);this.$b=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Dw(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.m(b,"click",c);this.h.m(b,"dblclick",c)}};
960
+ q.ue=function(a){(this.ba=a)?(this.j.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.j.removeAttribute("shaka-controls");Dw(this)};q.tf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.ue(!1)};q.getAd=function(){return this.o};q.Tf=function(){return this.A};q.fg=function(){return this.$a};q.wg=function(){return this.j};q.zb=function(){return this.g};q.eg=function(){return this.B};q.dc=function(){return this.D};q.dg=function(){return this.Ka};q.Yf=function(){return this.i};
961
+ q.ng=function(){return this.tb};q.Vf=function(){return this.ea};q.Wf=function(){return this.s};q.Bg=function(){return this.ha};q.ye=function(a){this.ha=a};q.zg=function(){return this.xb};q.We=function(){return this.l?this.l.getValue():this.g.currentTime};q.uf=function(a){this.K=a};q.Zc=function(){return this.H.some(function(a){return!a.classList.contains("shaka-hidden")})};q.Ic=function(){this.I.Ea()};
961
962
  q.De=function(){var a=this,b;return H(function(c){switch(c.g){case 1:if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),u(c,document.exitFullscreen(),0);A(c,4);if(!document.pictureInPictureElement){c.C(6);break}return u(c,document.exitPictureInPicture(),6);case 6:return u(c,a.j.requestFullscreen({navigationUI:"hide"}),8);case 8:if(!a.s.forceLandscapeOnFullscreen||!screen.orientation){c.C(9);break}A(c,10);return u(c,screen.orientation.lock("landscape"),12);case 12:va(c,
962
- 9,4);break;case 10:E(c,4);case 9:va(c,0);break;case 4:b=E(c),a.dispatchEvent(new M("error",(new Map).set("detail",b))),c.C(0)}})};q.wf=function(){X(this.L,!0);X(this.ba,!0);this.i.setAttribute("ad-active","true")};q.Ze=function(){X(this.L,!1);X(this.ba,!1);this.i.removeAttribute("ad-active")};function uw(a){a.X&&a.g.duration&&(a.D.Ke(),a.g.paused&&!a.ea?a.g.play():a.g.pause())}function tw(a){a.o&&a.o.isPaused()?a.o.play():a.o&&a.o.pause()}
963
- function Mw(a){a.i=R("div");a.i.classList.add("shaka-controls-container");a.j.appendChild(a.i);a.j.setAttribute("shaka-controls","true");a.h.m(a.i,"touchstart",function(b){a.g.duration&&(a.Mb()?a.K=Date.now():(Sw(a,b),b.preventDefault()))},{passive:!1});a.h.m(a.i,"click",function(){a.X&&(a.Zc()?a.I.Da():a.o?tw(a):uw(a))});a.h.m(a.i,"dblclick",function(){a.s.doubleClickForFullscreen&&document.fullscreenEnabled&&a.De()})}
964
- function Ow(a){var b=R("div");b.classList.add("shaka-play-button-container");a.i.appendChild(b);a.Cb=new vw(b,a);a.R.push(a.Cb)}function Nw(a){var b=R("div");b.classList.add("shaka-scrim-container");a.i.appendChild(b)}function Tw(a){a.L=R("div");a.L.classList.add("shaka-ad-controls");X(a.L,null!=a.o);a.O.appendChild(a.L);var b=new qw(a.L,a);a.R.push(b);b=new pw(a.L,a);a.R.push(b)}
965
- function Pw(a){a.ia=R("div");a.ia.classList.add("shaka-spinner-container");a.j.appendChild(a.ia);var b=R("div");b.classList.add("shaka-spinner");a.ia.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
963
+ 9,4);break;case 10:E(c,4);case 9:va(c,0);break;case 4:b=E(c),a.dispatchEvent(new M("error",(new Map).set("detail",b))),c.C(0)}})};q.wf=function(){Y(this.L,!0);Y(this.ea,!0);this.i.setAttribute("ad-active","true")};q.Ze=function(){Y(this.L,!1);Y(this.ea,!1);this.i.removeAttribute("ad-active")};function tw(a){a.ba&&a.g.duration&&(a.D.Ke(),a.g.paused&&!a.ha?a.g.play():a.g.pause())}function sw(a){a.o&&a.o.isPaused()?a.o.play():a.o&&a.o.pause()}
964
+ function Lw(a){a.i=R("div");a.i.classList.add("shaka-controls-container");a.j.appendChild(a.i);a.j.setAttribute("shaka-controls","true");a.h.m(a.i,"touchstart",function(b){a.g.duration&&(a.Nb()?a.K=Date.now():(Rw(a,b),b.preventDefault()))},{passive:!1});a.h.m(a.i,"click",function(){a.ba&&(a.Zc()?a.I.Ea():a.o?sw(a):tw(a))});a.h.m(a.i,"dblclick",function(){a.s.doubleClickForFullscreen&&document.fullscreenEnabled&&a.De()})}
965
+ function Nw(a){var b=R("div");b.classList.add("shaka-play-button-container");a.i.appendChild(b);a.Db=new uw(b,a);a.S.push(a.Db)}function Mw(a){var b=R("div");b.classList.add("shaka-scrim-container");a.i.appendChild(b)}function Sw(a){a.L=R("div");a.L.classList.add("shaka-ad-controls");Y(a.L,null!=a.o);a.O.appendChild(a.L);var b=new pw(a.L,a);a.S.push(b);b=new ow(a.L,a);a.S.push(b)}
966
+ function Ow(a){a.qa=R("div");a.qa.classList.add("shaka-spinner-container");a.j.appendChild(a.qa);var b=R("div");b.classList.add("shaka-spinner");a.qa.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
966
967
  b.setAttribute("fill","none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
967
- function Qw(a){a.O=R("div");a.O.classList.add("shaka-bottom-controls");a.O.classList.add("shaka-no-propagation");a.i.appendChild(a.O);a.h.m(a.O,"click",function(){a.Hc()});Tw(a);a.Ka=R("div");a.Ka.classList.add("shaka-controls-button-panel");a.Ka.classList.add("shaka-show-controls-on-mouse-over");a.O.appendChild(a.Ka);for(var b={},c=r(a.s.controlPanelElements),d=c.next();!d.done;b={qc:b.qc},d=c.next())d=d.value,Lw.get(d)?(d=Lw.get(d).create(a.Ka,a),"function"!=typeof d.release&&(Db("shaka.extern.IUIElement",
968
- "Please update UI elements to have a release() method."),b.qc=d,b.qc.release=function(e){return function(){e.qc.destroy&&e.qc.destroy()}}(b)),a.R.push(d)):Ta("Unrecognized control panel element requested:",d)}function Rw(a){if(a.s.addSeekBar)a.l=Uw.create(a.O,a),a.R.push(a.l);else{a=r(a.H);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}
969
- function Hw(a){a.h.m(a.D,"buffering",function(){a.X&&X(a.ia,a.D.Jc())});a.X&&X(a.ia,a.D.Jc());a.h.m(window,"keydown",function(b){Vw(a,b)});a.h.m(window,"click",function(){return a.Hc()});a.h.m(a.g,"play",function(){Ew(a)});a.h.m(a.g,"pause",function(){Ew(a)});a.h.m(a.j,"mousemove",function(b){Sw(a,b)});a.h.m(a.j,"touchmove",function(b){Sw(a,b)},{passive:!0});a.h.m(a.j,"touchend",function(b){Sw(a,b)},{passive:!0});a.h.m(a.j,"mouseleave",function(){a.K||a.ha.Da()});a.h.m(a.A,"caststatuschanged",function(){Iw(a)});
970
- a.h.m(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.i.contains(c)&&Sw(a,b);if(a.s.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.l&&!d&&(b.preventDefault(),Ww(a,a.l.getValue()-5));break;case "ArrowRight":a.l&&!d&&(b.preventDefault(),Ww(a,a.l.getValue()+5));break;case "Home":a.l&&Ww(a,a.D.La().start);break;case "End":a.l&&Ww(a,a.D.La().end);break;case " ":e&&
971
- (a.o?tw(a):uw(a))}});a.h.m(a.j,"keyup",function(b){a.za["delete"](b.key)});a.h.m(a.ub,"ad-started",function(b){a.o=b.ad;a.wf()});a.h.m(a.ub,"ad-stopped",function(){a.o=null;a.Ze()});screen.orientation&&a.h.m(screen.orientation,"change",function(){return H(function(b){return u(b,Xw(a),0)})});a.h.m(document,"fullscreenchange",function(){a.o&&a.o.resize(a.B.offsetWidth,a.B.offsetHeight)})}
972
- function Xw(a){return H(function(b){return a.g&&0!=a.g.readyState&&!a.A.sa()&&a.s.enableFullscreenOnRotation?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?u(b,a.j.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?u(b,document.exitFullscreen(),0):b.C(0):b["return"]()})}
973
- function Sw(a,b){"mousemove"==b.type&&(a.i.classList.remove("shaka-keyboard-navigation"),Ew(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.K=Date.now():a.K+1E3<Date.now()&&(a.K=null);a.K&&"mousemove"==b.type||(a.j.style.cursor="",a.Db=!0,a.I.stop(),a.Mb()||(Fw(a),Ew(a)),a.ha.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.K||a.ha.T(3))}function Yw(a){return window.matchMedia("hover: hover").matches?a.Zb.some(function(b){return b.matches(":hover")}):!1}
974
- function Ew(a){var b=a.o?a.o.isPaused():!1,c=a.g.paused&&!a.ea,d=a.i.classList.contains("shaka-keyboard-navigation");b||!a.o&&c||a.Db||d||Yw(a)?(Fw(a),a.i.setAttribute("shown","true"),a.va.stop()):a.va.T(a.s.fadeDelay)}function Iw(a){var b=a.A.sa();a.dispatchEvent(new M("caststatuschanged",(new Map).set("newStatus",b)));b?a.i.setAttribute("casting","true"):a.i.removeAttribute("casting")}q.Mb=function(){return this.X?null!=this.i.getAttribute("shown")||null!=this.i.getAttribute("casting"):!1};
975
- function Ww(a,b){a.l.changeTo(b);a.Mb()&&Fw(a)}function Fw(a){if(a.l)if(a.l.setValue(a.g.currentTime),a.l.update(),a.l.isShowing())for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.H),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new M("timeandseekrangeupdated"))}
976
- function Vw(a,b){a.za.add(b.key);var c=a.Zc();"Tab"==b.key&&(a.i.classList.add("shaka-keyboard-navigation"),Ew(a),a.h.m(window,"mousedown",function(){a.h.Sa(window,"mousedown")}));"Escape"==b.key&&a.I.Da();c&&a.za.has("Tab")&&Zw(a,b)}
977
- function Zw(a,b){var c=a.H.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.za.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
978
- function Gw(){var a=new bc("en");a.ka("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
968
+ function Pw(a){a.O=R("div");a.O.classList.add("shaka-bottom-controls");a.O.classList.add("shaka-no-propagation");a.i.appendChild(a.O);a.h.m(a.O,"click",function(){a.Ic()});Sw(a);a.Za=R("div");a.Za.classList.add("shaka-controls-button-panel");a.Za.classList.add("shaka-show-controls-on-mouse-over");a.O.appendChild(a.Za);for(var b={},c=r(a.s.controlPanelElements),d=c.next();!d.done;b={rc:b.rc},d=c.next())d=d.value,Kw.get(d)?(d=Kw.get(d).create(a.Za,a),"function"!=typeof d.release&&(Db("shaka.extern.IUIElement",
969
+ "Please update UI elements to have a release() method."),b.rc=d,b.rc.release=function(e){return function(){e.rc.destroy&&e.rc.destroy()}}(b)),a.S.push(d)):Ta("Unrecognized control panel element requested:",d)}function Qw(a){if(a.s.addSeekBar)a.l=Tw.create(a.O,a),a.S.push(a.l);else{a=r(a.H);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}
970
+ function Gw(a){a.h.m(a.D,"buffering",function(){a.ba&&Y(a.qa,a.D.Kc())});a.ba&&Y(a.qa,a.D.Kc());a.h.m(window,"keydown",function(b){Uw(a,b)});a.h.m(window,"click",function(){return a.Ic()});a.h.m(a.g,"play",function(){Dw(a)});a.h.m(a.g,"pause",function(){Dw(a)});a.h.m(a.j,"mousemove",function(b){Rw(a,b)});a.h.m(a.j,"touchmove",function(b){Rw(a,b)},{passive:!0});a.h.m(a.j,"touchend",function(b){Rw(a,b)},{passive:!0});a.h.m(a.j,"mouseleave",function(){a.K||a.ia.Ea()});a.h.m(a.A,"caststatuschanged",function(){Hw(a)});
971
+ a.h.m(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.i.contains(c)&&Rw(a,b);if(a.s.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.l&&!d&&(b.preventDefault(),Vw(a,a.l.getValue()-5));break;case "ArrowRight":a.l&&!d&&(b.preventDefault(),Vw(a,a.l.getValue()+5));break;case "Home":a.l&&Vw(a,a.D.La().start);break;case "End":a.l&&Vw(a,a.D.La().end);break;case " ":e&&
972
+ (a.o?sw(a):tw(a))}});a.h.m(a.j,"keyup",function(b){a.Aa["delete"](b.key)});a.h.m(a.wb,"ad-started",function(b){a.o=b.ad;a.wf()});a.h.m(a.wb,"ad-stopped",function(){a.o=null;a.Ze()});screen.orientation&&a.h.m(screen.orientation,"change",function(){return H(function(b){return u(b,Ww(a),0)})});a.h.m(document,"fullscreenchange",function(){a.o&&a.o.resize(a.B.offsetWidth,a.B.offsetHeight)})}
973
+ function Ww(a){return H(function(b){return a.g&&0!=a.g.readyState&&!a.A.ua()&&a.s.enableFullscreenOnRotation?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?u(b,a.j.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?u(b,document.exitFullscreen(),0):b.C(0):b["return"]()})}
974
+ function Rw(a,b){"mousemove"==b.type&&(a.i.classList.remove("shaka-keyboard-navigation"),Dw(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.K=Date.now():a.K+1E3<Date.now()&&(a.K=null);a.K&&"mousemove"==b.type||(a.j.style.cursor="",a.Eb=!0,a.I.stop(),a.Nb()||(Ew(a),Dw(a)),a.ia.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.K||a.ia.T(3))}function Xw(a){return window.matchMedia("hover: hover").matches?a.$b.some(function(b){return b.matches(":hover")}):!1}
975
+ function Dw(a){var b=a.o?a.o.isPaused():!1,c=a.g.paused&&!a.ha,d=a.i.classList.contains("shaka-keyboard-navigation");b||!a.o&&c||a.Eb||d||Xw(a)?(Ew(a),a.i.setAttribute("shown","true"),a.za.stop()):a.za.T(a.s.fadeDelay)}function Hw(a){var b=a.A.ua();a.dispatchEvent(new M("caststatuschanged",(new Map).set("newStatus",b)));b?a.i.setAttribute("casting","true"):a.i.removeAttribute("casting")}q.Nb=function(){return this.ba?null!=this.i.getAttribute("shown")||null!=this.i.getAttribute("casting"):!1};
976
+ function Vw(a,b){a.l.changeTo(b);a.Nb()&&Ew(a)}function Ew(a){if(a.l)if(a.l.setValue(a.g.currentTime),a.l.update(),a.l.isShowing())for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.H),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new M("timeandseekrangeupdated"))}
977
+ function Uw(a,b){a.Aa.add(b.key);var c=a.Zc();"Tab"==b.key&&(a.i.classList.add("shaka-keyboard-navigation"),Dw(a),a.h.m(window,"mousedown",function(){a.h.Sa(window,"mousedown")}));"Escape"==b.key&&a.I.Ea();c&&a.Aa.has("Tab")&&Yw(a,b)}
978
+ function Yw(a,b){var c=a.H.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.Aa.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
979
+ function Fw(){var a=new bc("en");a.ka("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
979
980
  ["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],
980
981
  ["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],
981
982
  ["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],
@@ -1033,67 +1034,67 @@ new Map([["AD_DURATION","Duraci\u00f3n del anuncio"],["AD_PROGRESS","Anuncio [AD
1033
1034
  "\u5206\u8fa8\u7387"],["REWIND","\u5feb\u9000"],["SEEK","\u8fdb\u5ea6"],["SKIP_AD","\u8df3\u8fc7\u5e7f\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u672a\u786e\u5b9a"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],["UNRECOGNIZED_LANGUAGE","\u65e0\u6cd5\u8bc6\u522b"],["VOLUME","\u97f3\u91cf"]]));a.ka("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY",
1034
1035
  "\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN",
1035
1036
  "\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\u89e3\u6790\u5ea6"],
1036
- ["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Me(navigator.languages||[]);return a}J("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.Mb;Y.prototype.hideAdUI=Y.prototype.Ze;Y.prototype.showAdUI=Y.prototype.wf;
1037
- Y.prototype.toggleFullScreen=Y.prototype.De;Y.prototype.hideSettingsMenus=Y.prototype.Hc;Y.prototype.anySettingsMenusAreOpen=Y.prototype.Zc;Y.prototype.setLastTouchEventTime=Y.prototype.uf;Y.prototype.getDisplayTime=Y.prototype.We;Y.prototype.isCastAllowed=Y.prototype.zg;Y.prototype.setSeeking=Y.prototype.ye;Y.prototype.isSeeking=Y.prototype.Bg;Y.prototype.getConfig=Y.prototype.Wf;Y.prototype.getClientSideAdContainer=Y.prototype.Vf;Y.prototype.getServerSideAdContainer=Y.prototype.ng;
1038
- Y.prototype.getControlsContainer=Y.prototype.Yf;Y.prototype.getLocalPlayer=Y.prototype.dg;Y.prototype.getPlayer=Y.prototype.cc;Y.prototype.getLocalVideo=Y.prototype.eg;Y.prototype.getVideo=Y.prototype.yb;Y.prototype.getVideoContainer=Y.prototype.wg;Y.prototype.getLocalization=Y.prototype.fg;Y.prototype.getCastProxy=Y.prototype.Tf;Y.prototype.getAd=Y.prototype.getAd;Y.prototype.setEnabledNativeControls=Y.prototype.tf;Y.prototype.setEnabledShakaControls=Y.prototype.ue;Y.prototype.configure=Y.prototype.configure;
1039
- Y.prototype.loadComplete=Y.prototype.Cg;Y.prototype.allowCast=Y.prototype.Hf;Y.registerSeekBar=function(a){Uw=a};Y.registerElement=Kw;Y.prototype.destroy=Y.prototype.destroy;var Lw=new Map,Uw=new Dw;function $w(a,b){jw.call(this,a,b);var c=this;this.s=this.controls.s;this.j=this.controls.i;this.i=[];this.h=Vj();this.h.classList.add("shaka-overflow-menu-button");this.h.classList.add("shaka-no-propagation");this.h.classList.add("material-icons-round");this.h.textContent="more_vert";this.parent.appendChild(this.h);this.g=R("div");this.g.classList.add("shaka-overflow-menu");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-hidden");
1040
- this.j.appendChild(this.g);ax(this);for(var d=r(this.controls.j.getElementsByClassName("shaka-back-to-overflow-button")),e=d.next();!e.done;e=d.next())this.eventManager.m(e.value,"click",function(){c.controls.Hc();X(c.g,!0);c.g.childNodes.length&&c.g.childNodes[0].focus();Ew(c.controls)});this.eventManager.m(this.localization,"locale-updated",function(){bx(c)});this.eventManager.m(this.localization,"locale-changed",function(){bx(c)});this.eventManager.m(this.adManager,"ad-started",function(){X(c.h,
1041
- !1)});this.eventManager.m(this.adManager,"ad-stopped",function(){X(c.h,!0)});this.eventManager.m(this.controls,"submenuopen",function(){X(c.g,!1)});this.eventManager.m(this.g,"touchstart",function(f){c.controls.uf(Date.now());f.stopPropagation()});this.eventManager.m(this.h,"click",function(){cx(c)});bx(this);this.ad&&X(this.h,!1)}qa($w,jw);$w.prototype.release=function(){this.j=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];jw.prototype.release.call(this)};
1042
- function dx(a,b){ex.set(a,b)}function ax(a){for(var b=r(a.s.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,ex.get(c)?(c=ex.get(c),a.i.push(c.create(a.g,a.controls))):Ta("Unrecognized overflow menu element requested:",c)}function cx(a){if(a.controls.Zc())a.controls.Hc();else{X(a.g,!0);Ew(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};hb(a.g.childNodes,b)&&ib(a.g.childNodes,b)[0].focus()}}
1043
- function bx(a){a.h.ariaLabel=a.localization.resolve("MORE_SETTINGS")}J("shaka.ui.OverflowMenu",$w);$w.registerElement=dx;function fx(){}fx.prototype.create=function(a,b){return new $w(a,b)};Kw("overflow_menu",new fx);var ex=new Map;function gx(a,b){jw.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-airplay-button");this.g.ariaPressed="false";this.h=R("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=R("span");d.appendChild(this.j);this.i=R("span");this.i.classList.add("shaka-current-selection-span");
1044
- d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);hx(this);ix(this);this.eventManager.m(this.localization,"locale-updated",function(){hx(c)});this.eventManager.m(this.localization,"locale-changed",function(){hx(c)});this.eventManager.m(this.g,"click",function(){c.controls.yb().webkitShowPlaybackTargetPicker()});d=this.controls.yb();this.eventManager.m(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=c.player.Xe()==Bl;X(c.g,"available"==e.availability&&f)});this.eventManager.m(d,
1045
- "webkitcurrentplaybacktargetiswirelesschanged",function(){ix(c)})}qa(gx,jw);function ix(a){var b=a.controls.yb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function hx(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}J("shaka.ui.AirPlayButton",gx);function jx(){}jx.prototype.create=function(a,b){return new gx(a,b)};dx("airplay",new jx);Kw("airplay",new jx);function kx(a,b,c){this.h=a;this.s=lx(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Ud()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.s);this.configure({});c.controls||a.Be(b);b.ui=this;c.ui=this}q=kx.prototype;q.destroy=function(){var a=this;return H(function(b){if(1==b.g)return a.g?u(b,a.g.destroy(),2):b.C(2);if(4!=b.g)return a.g=null,a.h?u(b,a.h.destroy(),4):b.C(4);a.h=null;z(b)})};q.Ud=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Gd()&&1<navigator.maxTouchPoints};
1046
- q.getConfiguration=function(){var a=lx(this);gk(a,this.s,lx(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=hk(a,b));gk(this.s,a,lx(this),{},"");this.s.castReceiverAppId&&!this.s.overflowMenuButtons.includes("cast")&&this.s.overflowMenuButtons.push("cast");this.g.configure(this.s);this.g.dispatchEvent(new M("uiupdated"))};q.Xf=function(){return this.g};q.$g=function(a){this.g.ue(a)};
1047
- function lx(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),addSeekBar:!0,addBigPlayButton:!1,castReceiverAppId:"",clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",
1048
- level:"rgb(255, 255, 255)"},trackLabelFormat:mx,fadeDelay:0,doubleClickForFullscreen:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Ud()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1049
- function nx(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return H(function(t){switch(t.g){case 1:at();if(!Lk())return ox("shaka-ui-load-failed",px),t["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){t.C(2);break}if(b.length&&!a.length){c=r(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),qx(f,e));t.C(2);break}h=r(a);k=h.next();
1050
- case 4:if(k.done){t.C(2);break}l=k.value;if(l.ui){t.C(5);break}m=null;n=r(b);for(d=n.next();!d.done;d=n.next())if(p=d.value,p.parentElement==l){m=p;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));A(t,7);return u(t,qx(l,m),9);case 9:va(t,5);break;case 7:return E(t),ox("shaka-ui-load-failed",rx),t["return"]();case 5:k=h.next();t.C(4);break;case 2:ox("shaka-ui-loaded"),z(t)}})}
1051
- function ox(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1052
- function qx(a,b){var c,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:c=new S(b);d=new kx(c,a,b);e="";a.dataset&&a.dataset.shakaPlayerCastReceiverId?e=a.dataset.shakaPlayerCastReceiverId:b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId);e.length&&d.configure({castReceiverAppId:e});b.controls&&d.g.tf(!0);if(f=b.getAttribute("src"))g=document.createElement("source"),g.setAttribute("src",f),b.appendChild(g),b.removeAttribute("src");h=r(b.querySelectorAll("source"));
1053
- k=h.next();case 2:if(k.done){m.C(0);break}l=k.value;A(m,5);return u(m,d.g.cc().load(l.getAttribute("src")),7);case 7:m.C(0);break;case 5:E(m);case 3:k=h.next(),m.C(2)}})}J("shaka.ui.Overlay",kx);kx.prototype.setEnabled=kx.prototype.$g;kx.prototype.getControls=kx.prototype.Xf;kx.prototype.configure=kx.prototype.configure;kx.prototype.getConfiguration=kx.prototype.getConfiguration;kx.prototype.isMobile=kx.prototype.Ud;kx.prototype.destroy=kx.prototype.destroy;var mx=0;
1054
- kx.TrackLabelFormat={LANGUAGE:mx,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var px=0,rx=1;kx.FailReasonCode={NO_BROWSER_SUPPORT:px,PLAYER_FAILED_TO_LOAD:rx};"complete"==document.readyState?H(function(a){if(1==a.g)return u(a,Promise.resolve(),2);nx();z(a)}):window.addEventListener("load",nx);function sx(a,b,c,d,e,f,g){function h(D,B){return D+": "+B}function k(D){return"variant"==D.type?D.audioRoles?D.audioRoles.join(", "):void 0:D.roles.join(", ")}var l=a.find(function(D){return 1==D.active}),m=kw(b);Wj(b);b.appendChild(m);m=new Map;for(var n=r(a),p=n.next();!p.done;p=n.next())p=p.value,m.has(p.language)||m.set(p.language,new Set),m.get(p.language).add(k(p));m=new Set;l=l?h(l.language,k(l)):"";n={};a=r(a);for(p=a.next();!p.done;n={Xa:n.Xa},p=a.next()){n.Xa=p.value;p=n.Xa.language;var t=
1055
- n.Xa.forced,v=f.resolve(fc.Cf),y=k(n.Xa),x=h(p,y);if(!m.has(x)){m.add(x);var w=Vj();w.addEventListener("click",function(D){return function(){c(D.Xa)}}(n));var C=R("span");w.appendChild(C);C.textContent=tx(p,f);switch(g){case mx:t&&(C.textContent+=" ("+v+")");break;case 1:y?C.textContent=y:(Ta("Track #"+n.Xa.id+" does not have a role, but the UI is configured to only show role."),C.textContent="?");t&&(C.textContent+=" ("+v+")");break;case 2:y&&(C.textContent+=": "+y);t&&(C.textContent+=" ("+v+")");
1056
- break;case 3:n.Xa.label?C.textContent=n.Xa.label:(Ta("Track #"+n.Xa.id+" does not have a label, but the UI is configured to only show labels."),C.textContent="?")}d&&x==l&&(w.appendChild(nw()),C.classList.add("shaka-chosen-item"),w.ariaSelected="true",e.textContent=C.textContent);b.appendChild(w)}}}
1057
- function tx(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Zb(a);return a in fw?fw[a].u:c in fw?fw[c].u+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function ux(a,b,c){jw.call(this,a,b);var d=this;vx(this,c);wx(this);this.eventManager.m(this.button,"click",function(){d.controls.dispatchEvent(new M("submenuopen"));X(d.menu,!0);mw(d.menu)})}qa(ux,jw);
1058
- function vx(a,b){a.button=Vj();a.icon=R("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);var c=R("label");c.classList.add("shaka-overflow-button-label");a.nameSpan=R("span");c.appendChild(a.nameSpan);a.currentSelection=R("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
1059
- function wx(a){a.menu=R("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Vj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);var b=R("i");b.classList.add("material-icons-round");b.textContent="arrow_back";a.backButton.appendChild(b);a.backSpan=R("span");a.backButton.appendChild(a.backSpan);a.controls.i.appendChild(a.menu)}
1060
- J("shaka.ui.SettingsMenu",ux);function xx(a,b){ux.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.menu.classList.add("shaka-audio-languages");this.eventManager.m(this.localization,"locale-updated",function(){yx(c)});this.eventManager.m(this.localization,"locale-changed",function(){yx(c)});this.eventManager.m(this.player,"trackschanged",function(){var d=0<c.player.Ib().length;X(c.button,d);zx(c)});this.eventManager.m(this.player,"variantchanged",function(){zx(c)});yx(this);zx(this)}
1061
- qa(xx,ux);function zx(a){var b=a.player.Ib();sx(b,a.menu,function(c){a.player.vd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.s.trackLabelFormat);mw(a.menu);a.controls.dispatchEvent(new M("languageselectionupdated"))}function yx(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}
1062
- J("shaka.ui.AudioLanguageSelection",xx);function Ax(){}Ax.prototype.create=function(a,b){return new xx(a,b)};dx("language",new Ax);function Bx(a,b){jw.call(this,a,b);var c=this;this.h=this.controls.A;this.g=Vj();this.g.classList.add("shaka-cast-button");this.g.ariaPressed="false";this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=R("span");d.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");d.appendChild(this.j);
1063
- this.g.appendChild(d);this.parent.appendChild(this.g);Cx(this);Dx(this);this.eventManager.m(this.localization,"locale-updated",function(){Cx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Cx(c)});this.eventManager.m(this.g,"click",function(){Ex(c)});this.eventManager.m(this.controls,"caststatuschanged",function(){Dx(c)})}qa(Bx,jw);
1064
- function Ex(a){var b;H(function(c){if(1==c.g){if(a.h.sa())return a.h.xf(),c.C(0);A(c,3);a.g.disabled=!0;return u(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=E(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new M("error",(new Map).set("detail",b)));z(c)})}function Dx(a){var b=a.h.Je()&&a.controls.vb,c=a.h.sa();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Fx(a)}
1065
- function Fx(a){a.j.textContent=a.h.sa()?a.h.sd():a.localization.resolve("OFF")}function Cx(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Fx(a)}J("shaka.ui.CastButton",Bx);function Gx(){}Gx.prototype.create=function(a,b){return new Bx(a,b)};dx("cast",new Gx);Kw("cast",new Gx);function Hx(a,b){jw.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.textContent="fast_forward";this.parent.appendChild(this.g);Ix(this);this.eventManager.m(this.localization,"locale-updated",function(){Ix(c)});this.eventManager.m(this.localization,"locale-changed",function(){Ix(c)});this.eventManager.m(this.g,"click",function(){if(c.video.duration){var d=c.player.Dc();c.player.Fe(0>d||4<d?1:2*d)}})}qa(Hx,jw);
1066
- function Ix(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}J("shaka.ui.FastForwardButton",Hx);function Jx(){}Jx.prototype.create=function(a,b){return new Hx(a,b)};Kw("fast_forward",new Jx);function Kx(a,b){jw.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");document.fullscreenEnabled||this.g.classList.add("shaka-hidden");this.g.textContent="fullscreen";this.parent.appendChild(this.g);Lx(this);this.eventManager.m(this.localization,"locale-updated",function(){Lx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Lx(c)});this.eventManager.m(this.g,"click",function(){return H(function(d){return u(d,
1067
- c.controls.De(),0)})});this.eventManager.m(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Lx(c)})}qa(Kx,jw);function Lx(a){a.g.ariaLabel=a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN")}J("shaka.ui.FullscreenButton",Kx);function Mx(){}Mx.prototype.create=function(a,b){return new Kx(a,b)};Kw("fullscreen",new Mx);function Nx(a,b){jw.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-loop-button");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=R("span");this.l.textContent=this.localization.resolve("LOOP");d.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");d.appendChild(this.j);
1068
- this.g.appendChild(d);Ox(this);this.parent.appendChild(this.g);this.eventManager.m(this.localization,"locale-updated",function(){Ox(c)});this.eventManager.m(this.localization,"locale-changed",function(){Ox(c)});this.eventManager.m(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Da();c.h.oa(1)});this.o=this.video.loop;this.h=new P(function(){c.o!=c.video.loop&&(Ox(c),c.o=c.video.loop)});this.h.oa(1)}qa(Nx,jw);Nx.prototype.release=function(){this.h.stop();this.h=null;jw.prototype.release.call(this)};
1069
- function Ox(a){a.l.textContent=a.localization.resolve("LOOP");a.j.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}J("shaka.ui.LoopButton",Nx);function Px(){}Px.prototype.create=function(a,b){return new Nx(a,b)};dx("loop",new Px);Kw("loop",new Px);function Qx(a,b){jw.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.parent.appendChild(this.g);Rx(this);Sx(this);this.eventManager.m(this.localization,"locale-updated",function(){Rx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Rx(c)});this.eventManager.m(this.g,"click",function(){c.ad?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});this.eventManager.m(this.video,"volumechange",
1070
- function(){Rx(c);Sx(c)});this.eventManager.m(this.adManager,"ad-volume-changed",function(){Rx(c);Sx(c)});this.eventManager.m(this.adManager,"ad-muted",function(){Rx(c);Sx(c)});this.eventManager.m(this.adManager,"ad-stopped",function(){c.ad=null;Rx(c);Sx(c)})}qa(Qx,jw);function Rx(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1071
- function Sx(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}J("shaka.ui.MuteButton",Qx);function Tx(){}Tx.prototype.create=function(a,b){return new Qx(a,b)};Kw("mute",new Tx);function Ux(a,b){jw.call(this,a,b);var c=this;this.l=this.controls.B;this.g=Vj();this.g.classList.add("shaka-pip-button");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);this.h=R("span");this.h.classList.add("shaka-current-selection-span");
1072
- d.appendChild(this.h);this.g.appendChild(d);Vx(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.m(this.localization,"locale-updated",function(){Vx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Vx(c)});this.eventManager.m(this.g,"click",function(){Wx(c)});this.eventManager.m(this.l,"enterpictureinpicture",function(){c.i.textContent="branding_watermark";c.g.ariaLabel=c.localization.resolve("EXIT_PICTURE_IN_PICTURE");
1073
- c.h.textContent=c.localization.resolve("ON")});this.eventManager.m(this.l,"leavepictureinpicture",function(){c.i.textContent="picture_in_picture_alt";c.g.ariaLabel=c.localization.resolve("ENTER_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("OFF")});this.eventManager.m(this.controls,"caststatuschanged",function(e){e.newStatus?document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!1):document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!0)});this.eventManager.m(this.player,
1074
- "trackschanged",function(){Xx(c)})}qa(Ux,jw);function Wx(a){var b;H(function(c){if(1==c.g)return A(c,2),document.pictureInPictureElement?u(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),u(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return va(c,0);b=E(c);a.controls.dispatchEvent(new M("error",(new Map).set("detail",b)));z(c)})}
1075
- function Vx(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.ariaLabel=a.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
1076
- function Xx(a){H(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.C(0);if(!a.player||!a.player.bf())return X(a.g,!0),b.C(0);X(a.g,!1);return document.pictureInPictureElement?u(b,document.exitPictureInPicture(),0):b.C(0)})}J("shaka.ui.PipButton",Ux);function Yx(){}Yx.prototype.create=function(a,b){return new Ux(a,b)};dx("picture_in_picture",new Yx);Kw("picture_in_picture",new Yx);function Zx(a,b){ux.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.eventManager.m(this.localization,"locale-updated",function(){$x(c)});this.eventManager.m(this.localization,"locale-changed",function(){$x(c)});this.eventManager.m(this.player,"ratechange",function(){ay(c,c.player.Dc())});this.g=new Map([["0.5x",.5],["0.75x",.75],["1x",1],["1.25x",1.25],["1.5x",1.5],["1.75x",1.75],["2x",2]]);$x(this);
1077
- by(this);ay(this,this.player.Dc())}qa(Zx,ux);function $x(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
1078
- function ay(a,b){var c=lw(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(nw()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x"}
1079
- function by(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={rc:b.rc},d=c.next()){b.rc=d.value;d=Vj();var e=R("span");e.textContent=b.rc;d.appendChild(e);a.eventManager.m(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.rc);a.video.defaultPlaybackRate=a.g.get(f.rc)}}(b));a.menu.appendChild(d)}mw(a.menu)}J("shaka.ui.PlaybackRateSelection",Zx);function cy(){}cy.prototype.create=function(a,b){return new Zx(a,b)};dx("playback_rate",new cy);function dy(a,b){jw.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-current-time");ey(this,"0:00");this.parent.appendChild(this.g);this.eventManager.m(this.g,"click",function(){c.player.Z()&&(c.video.currentTime=c.player.La().end)});this.eventManager.m(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.ea,e=c.controls.We(),f=c.video.duration,g=c.player.La(),h=g.end-g.start;c.player.Z()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(ey(c,"- "+ow(e,f)),c.g.disabled=
1080
- !1):(ey(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=ow(e,d),f&&(e+=" / "+ow(f,d)),ey(c,e),c.g.disabled=!0)});this.eventManager.m(this.player,"trackschanged",function(){c.player.Z()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}qa(dy,jw);function ey(a,b){b!=a.g.textContent&&(a.g.textContent=b)}J("shaka.ui.PresentationTimeTracker",dy);function fy(){}fy.prototype.create=function(a,b){return new dy(a,b)};Kw("time_and_duration",new fy);function gy(a,b){ux.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.menu.classList.add("shaka-resolutions");this.eventManager.m(this.localization,"locale-updated",function(){hy(c)});this.eventManager.m(this.localization,"locale-changed",function(){hy(c)});this.eventManager.m(this.player,"variantchanged",function(){iy(c)});this.eventManager.m(this.player,"trackschanged",function(){iy(c)});this.eventManager.m(this.player,"abrstatuschanged",function(){iy(c)});
1081
- iy(this);hy(this)}qa(gy,ux);
1082
- function iy(a){var b=a.player.Ib();if(b.length&&!b[0].height)X(a.menu,!1),X(a.button,!1);else{X(a.button,!0);b.sort(function(k,l){return l.height-k.height});var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height})==l});var d=kw(a.menu);Wj(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e=
1083
- {uc:e.uc},g=f.next()){e.uc=g.value;g=Vj();g.classList.add("explicit-resolution");a.eventManager.m(g,"click",function(k){return function(){var l=k.uc;a.player.configure({abr:{enabled:!1}});a.player.re(l,a.controls.s.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=e.uc.height+"p";g.appendChild(h);d||e.uc!=c||(g.ariaSelected="true",g.appendChild(nw()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Vj();e.classList.add("shaka-enable-abr-button");
1084
- a.eventManager.m(e,"click",function(){a.player.configure({abr:{enabled:!0}});iy(a)});a.g=R("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(nw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.menu.appendChild(e);mw(a.menu);a.controls.dispatchEvent(new M("resolutionselectionupdated"))}}
1085
- function hy(a){a.button.ariaLabel=a.localization.resolve("RESOLUTION");a.backButton.ariaLabel=a.localization.resolve("RESOLUTION");a.backSpan.textContent=a.localization.resolve("RESOLUTION");a.nameSpan.textContent=a.localization.resolve("RESOLUTION");a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}J("shaka.ui.ResolutionSelection",gy);function jy(){}
1086
- jy.prototype.create=function(a,b){return new gy(a,b)};dx("quality",new jy);function ky(a,b){jw.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.textContent="fast_rewind";this.parent.appendChild(this.g);ly(this);this.eventManager.m(this.localization,"locale-updated",function(){ly(c)});this.eventManager.m(this.localization,"locale-changed",function(){ly(c)});this.eventManager.m(this.g,"click",function(){if(c.video.duration){var d=c.player.Dc();c.player.Fe(0<d||-4>d?-1:2*d)}})}qa(ky,jw);
1087
- function ly(a){a.g.ariaLabel=a.localization.resolve("REWIND")}J("shaka.ui.RewindButton",ky);function my(){}my.prototype.create=function(a,b){return new ky(a,b)};Kw("rewind",new my);function ny(a,b){jw.call(this,a,b);var c=this;this.j=R("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=R("div");this.h.classList.add("shaka-skip-ad-counter");X(this.h,!1);this.j.appendChild(this.h);this.g=Vj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;X(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);oy(this);this.i=new P(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1088
- d:(c.i.stop(),X(c.h,!1))});this.eventManager.m(this.localization,"locale-updated",function(){oy(c)});this.eventManager.m(this.localization,"locale-changed",function(){oy(c)});this.eventManager.m(this.adManager,"ad-started",function(){py(c)});this.eventManager.m(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),X(c.h,!1))});this.eventManager.m(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;X(c.g,!1);X(c.h,!1)});this.eventManager.m(this.g,
1089
- "click",function(){c.ad.skip()});this.ad&&py(this)}qa(ny,jw);ny.prototype.release=function(){this.i.stop();this.i=null;jw.prototype.release.call(this)};function oy(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function py(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.Da(),a.i.oa(.5))}J("shaka.ui.SkipAdButton",ny);function qy(a,b){sw.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.h();this.g()}qa(qy,sw);qy.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};qy.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
1090
- J("shaka.ui.SmallPlayButton",qy);function ry(){}ry.prototype.create=function(a,b){return new qy(a,b)};Kw("play_pause",new ry);function sy(a,b){jw.call(this,a,b);var c=R("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}qa(sy,jw);J("shaka.ui.Spacer",sy);function ty(){}ty.prototype.create=function(a,b){return new sy(a,b)};Kw("spacer",new ty);function uy(a,b){ux.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Nb()?this.button.ariaPressed="true":this.button.ariaPressed="false";vy(this);this.eventManager.m(this.localization,"locale-updated",function(){wy(c);xy(c)});this.eventManager.m(this.localization,"locale-changed",function(){wy(c);xy(c)});this.eventManager.m(this.player,"texttrackvisibility",function(){yy(c);xy(c)});
1091
- this.eventManager.m(this.player,"textchanged",function(){xy(c)});this.eventManager.m(this.player,"trackschanged",function(){zy(c)});yy(this);wy(this);xy(this);zy(this)}qa(uy,ux);function vy(a){var b=Vj();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(nw());a.g=R("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1092
- function yy(a){a.player.Nb()?(a.icon.classList.add("shaka-captions-on"),a.icon.classList.remove("shaka-captions-off"),a.button.ariaPressed="true"):(a.icon.classList.add("shaka-captions-off"),a.icon.classList.remove("shaka-captions-on"),a.button.ariaPressed="false");a.controls.dispatchEvent(new M("captionselectionupdated"))}
1093
- function xy(a){var b=a.player.ob();sx(b,a.menu,function(c){return Ay(a,c)},a.player.Nb(),a.currentSelection,a.localization,a.controls.s.trackLabelFormat);b=Vj();b.classList.add("shaka-turn-captions-off-button");a.eventManager.m(b,"click",function(){a.player.Ae(!1);xy(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Nb()||(b.ariaSelected="true",b.appendChild(nw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));mw(a.menu);a.controls.dispatchEvent(new M("captionselectionupdated"))}
1094
- function Ay(a,b){return H(function(c){a.player.qe(b);return u(c,a.player.Ae(!0),0)})}function wy(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}function zy(a){var b=0<a.player.ob().length;X(a.button,b);xy(a)}J("shaka.ui.TextSelection",uy);function By(){}
1095
- By.prototype.create=function(a,b){return new uy(a,b)};dx("captions",new By);function Cy(a,b){ww.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.s=this.controls.s;this.eventManager.m(this.video,"volumechange",function(){return Dy(c)});this.eventManager.m(this.adManager,"ad-volume-changed",function(){return Ey(c)});this.eventManager.m(this.adManager,"ad-muted",function(){return Ey(c)});this.eventManager.m(this.adManager,"ad-stopped",function(){return Dy(c)});this.eventManager.m(this.localization,"locale-updated",function(){return Fy(c)});
1096
- this.eventManager.m(this.localization,"locale-changed",function(){return Fy(c)});Dy(this);Fy(this);if(this.ad)this.onChange()}qa(Cy,ww);Cy.prototype.onChange=function(){this.ad?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function Dy(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);Gy(a)}function Ey(a){var b=a.ad.getVolume();a.setValue(b);Gy(a)}
1097
- function Gy(a){var b=a.s.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function Fy(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}J("shaka.ui.VolumeBar",Cy);function Hy(){}Hy.prototype.create=function(a,b){return new Cy(a,b)};Kw("volume",new Hy);}).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})();
1037
+ ["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Me(navigator.languages||[]);return a}J("shaka.ui.Controls",Z);Z.prototype.isOpaque=Z.prototype.Nb;Z.prototype.hideAdUI=Z.prototype.Ze;Z.prototype.showAdUI=Z.prototype.wf;
1038
+ Z.prototype.toggleFullScreen=Z.prototype.De;Z.prototype.hideSettingsMenus=Z.prototype.Ic;Z.prototype.anySettingsMenusAreOpen=Z.prototype.Zc;Z.prototype.setLastTouchEventTime=Z.prototype.uf;Z.prototype.getDisplayTime=Z.prototype.We;Z.prototype.isCastAllowed=Z.prototype.zg;Z.prototype.setSeeking=Z.prototype.ye;Z.prototype.isSeeking=Z.prototype.Bg;Z.prototype.getConfig=Z.prototype.Wf;Z.prototype.getClientSideAdContainer=Z.prototype.Vf;Z.prototype.getServerSideAdContainer=Z.prototype.ng;
1039
+ Z.prototype.getControlsContainer=Z.prototype.Yf;Z.prototype.getLocalPlayer=Z.prototype.dg;Z.prototype.getPlayer=Z.prototype.dc;Z.prototype.getLocalVideo=Z.prototype.eg;Z.prototype.getVideo=Z.prototype.zb;Z.prototype.getVideoContainer=Z.prototype.wg;Z.prototype.getLocalization=Z.prototype.fg;Z.prototype.getCastProxy=Z.prototype.Tf;Z.prototype.getAd=Z.prototype.getAd;Z.prototype.setEnabledNativeControls=Z.prototype.tf;Z.prototype.setEnabledShakaControls=Z.prototype.ue;Z.prototype.configure=Z.prototype.configure;
1040
+ Z.prototype.loadComplete=Z.prototype.Cg;Z.prototype.allowCast=Z.prototype.Hf;Z.registerSeekBar=function(a){Tw=a};Z.registerElement=Jw;Z.prototype.destroy=Z.prototype.destroy;var Kw=new Map,Tw=new Cw;function Zw(a,b){iw.call(this,a,b);var c=this;this.s=this.controls.s;this.j=this.controls.i;this.i=[];this.h=Uj();this.h.classList.add("shaka-overflow-menu-button");this.h.classList.add("shaka-no-propagation");this.h.classList.add("material-icons-round");this.h.textContent="more_vert";this.parent.appendChild(this.h);this.g=R("div");this.g.classList.add("shaka-overflow-menu");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-hidden");
1041
+ this.j.appendChild(this.g);$w(this);for(var d=r(this.controls.j.getElementsByClassName("shaka-back-to-overflow-button")),e=d.next();!e.done;e=d.next())this.eventManager.m(e.value,"click",function(){c.controls.Ic();Y(c.g,!0);c.g.childNodes.length&&c.g.childNodes[0].focus();Dw(c.controls)});this.eventManager.m(this.localization,"locale-updated",function(){ax(c)});this.eventManager.m(this.localization,"locale-changed",function(){ax(c)});this.eventManager.m(this.adManager,"ad-started",function(){Y(c.h,
1042
+ !1)});this.eventManager.m(this.adManager,"ad-stopped",function(){Y(c.h,!0)});this.eventManager.m(this.controls,"submenuopen",function(){Y(c.g,!1)});this.eventManager.m(this.g,"touchstart",function(f){c.controls.uf(Date.now());f.stopPropagation()});this.eventManager.m(this.h,"click",function(){bx(c)});ax(this);this.ad&&Y(this.h,!1)}qa(Zw,iw);Zw.prototype.release=function(){this.j=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];iw.prototype.release.call(this)};
1043
+ function cx(a,b){dx.set(a,b)}function $w(a){for(var b=r(a.s.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,dx.get(c)?(c=dx.get(c),a.i.push(c.create(a.g,a.controls))):Ta("Unrecognized overflow menu element requested:",c)}function bx(a){if(a.controls.Zc())a.controls.Ic();else{Y(a.g,!0);Dw(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};hb(a.g.childNodes,b)&&ib(a.g.childNodes,b)[0].focus()}}
1044
+ function ax(a){a.h.ariaLabel=a.localization.resolve("MORE_SETTINGS")}J("shaka.ui.OverflowMenu",Zw);Zw.registerElement=cx;function ex(){}ex.prototype.create=function(a,b){return new Zw(a,b)};Jw("overflow_menu",new ex);var dx=new Map;function fx(a,b){iw.call(this,a,b);var c=this;this.g=Uj();this.g.classList.add("shaka-airplay-button");this.g.ariaPressed="false";this.h=R("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=R("span");d.appendChild(this.j);this.i=R("span");this.i.classList.add("shaka-current-selection-span");
1045
+ d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);gx(this);hx(this);this.eventManager.m(this.localization,"locale-updated",function(){gx(c)});this.eventManager.m(this.localization,"locale-changed",function(){gx(c)});this.eventManager.m(this.g,"click",function(){c.controls.zb().webkitShowPlaybackTargetPicker()});d=this.controls.zb();this.eventManager.m(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=c.player.Xe()==Al;Y(c.g,"available"==e.availability&&f)});this.eventManager.m(d,
1046
+ "webkitcurrentplaybacktargetiswirelesschanged",function(){hx(c)})}qa(fx,iw);function hx(a){var b=a.controls.zb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function gx(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}J("shaka.ui.AirPlayButton",fx);function ix(){}ix.prototype.create=function(a,b){return new fx(a,b)};cx("airplay",new ix);Jw("airplay",new ix);function jx(a,b,c){this.h=a;this.s=kx(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Ud()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,this.s);this.configure({});c.controls||a.Be(b);b.ui=this;c.ui=this}q=jx.prototype;q.destroy=function(){var a=this;return H(function(b){if(1==b.g)return a.g?u(b,a.g.destroy(),2):b.C(2);if(4!=b.g)return a.g=null,a.h?u(b,a.h.destroy(),4):b.C(4);a.h=null;z(b)})};q.Ud=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Gd()&&1<navigator.maxTouchPoints};
1047
+ q.getConfiguration=function(){var a=kx(this);fk(a,this.s,kx(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=gk(a,b));fk(this.s,a,kx(this),{},"");this.s.castReceiverAppId&&!this.s.overflowMenuButtons.includes("cast")&&this.s.overflowMenuButtons.push("cast");this.g.configure(this.s);this.g.dispatchEvent(new M("uiupdated"))};q.Xf=function(){return this.g};q.$g=function(a){this.g.ue(a)};
1048
+ function kx(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),addSeekBar:!0,addBigPlayButton:!1,castReceiverAppId:"",clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",
1049
+ level:"rgb(255, 255, 255)"},trackLabelFormat:lx,fadeDelay:0,doubleClickForFullscreen:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Ud()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1050
+ function mx(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return H(function(t){switch(t.g){case 1:$s();if(!Kk())return nx("shaka-ui-load-failed",ox),t["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){t.C(2);break}if(b.length&&!a.length){c=r(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),px(f,e));t.C(2);break}h=r(a);k=h.next();
1051
+ case 4:if(k.done){t.C(2);break}l=k.value;if(l.ui){t.C(5);break}m=null;n=r(b);for(d=n.next();!d.done;d=n.next())if(p=d.value,p.parentElement==l){m=p;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));A(t,7);return u(t,px(l,m),9);case 9:va(t,5);break;case 7:return E(t),nx("shaka-ui-load-failed",qx),t["return"]();case 5:k=h.next();t.C(4);break;case 2:nx("shaka-ui-loaded"),z(t)}})}
1052
+ function nx(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1053
+ function px(a,b){var c,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:c=new S(b);d=new jx(c,a,b);e="";a.dataset&&a.dataset.shakaPlayerCastReceiverId?e=a.dataset.shakaPlayerCastReceiverId:b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId);e.length&&d.configure({castReceiverAppId:e});b.controls&&d.g.tf(!0);if(f=b.getAttribute("src"))g=document.createElement("source"),g.setAttribute("src",f),b.appendChild(g),b.removeAttribute("src");h=r(b.querySelectorAll("source"));
1054
+ k=h.next();case 2:if(k.done){m.C(0);break}l=k.value;A(m,5);return u(m,d.g.dc().load(l.getAttribute("src")),7);case 7:m.C(0);break;case 5:E(m);case 3:k=h.next(),m.C(2)}})}J("shaka.ui.Overlay",jx);jx.prototype.setEnabled=jx.prototype.$g;jx.prototype.getControls=jx.prototype.Xf;jx.prototype.configure=jx.prototype.configure;jx.prototype.getConfiguration=jx.prototype.getConfiguration;jx.prototype.isMobile=jx.prototype.Ud;jx.prototype.destroy=jx.prototype.destroy;var lx=0;
1055
+ jx.TrackLabelFormat={LANGUAGE:lx,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var ox=0,qx=1;jx.FailReasonCode={NO_BROWSER_SUPPORT:ox,PLAYER_FAILED_TO_LOAD:qx};"complete"==document.readyState?H(function(a){if(1==a.g)return u(a,Promise.resolve(),2);mx();z(a)}):window.addEventListener("load",mx);function rx(a,b,c,d,e,f,g){function h(D,B){return D+": "+B}function k(D){return"variant"==D.type?D.audioRoles?D.audioRoles.join(", "):void 0:D.roles.join(", ")}var l=a.find(function(D){return 1==D.active}),m=jw(b);Vj(b);b.appendChild(m);m=new Map;for(var n=r(a),p=n.next();!p.done;p=n.next())p=p.value,m.has(p.language)||m.set(p.language,new Set),m.get(p.language).add(k(p));m=new Set;l=l?h(l.language,k(l)):"";n={};a=r(a);for(p=a.next();!p.done;n={Xa:n.Xa},p=a.next()){n.Xa=p.value;p=n.Xa.language;var t=
1056
+ n.Xa.forced,v=f.resolve(fc.Cf),y=k(n.Xa),x=h(p,y);if(!m.has(x)){m.add(x);var w=Uj();w.addEventListener("click",function(D){return function(){c(D.Xa)}}(n));var C=R("span");w.appendChild(C);C.textContent=sx(p,f);switch(g){case lx:t&&(C.textContent+=" ("+v+")");break;case 1:y?C.textContent=y:(Ta("Track #"+n.Xa.id+" does not have a role, but the UI is configured to only show role."),C.textContent="?");t&&(C.textContent+=" ("+v+")");break;case 2:y&&(C.textContent+=": "+y);t&&(C.textContent+=" ("+v+")");
1057
+ break;case 3:n.Xa.label?C.textContent=n.Xa.label:(Ta("Track #"+n.Xa.id+" does not have a label, but the UI is configured to only show labels."),C.textContent="?")}d&&x==l&&(w.appendChild(mw()),C.classList.add("shaka-chosen-item"),w.ariaSelected="true",e.textContent=C.textContent);b.appendChild(w)}}}
1058
+ function sx(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Zb(a);return a in ew?ew[a].u:c in ew?ew[c].u+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function tx(a,b,c){iw.call(this,a,b);var d=this;ux(this,c);vx(this);this.eventManager.m(this.button,"click",function(){d.controls.dispatchEvent(new M("submenuopen"));Y(d.menu,!0);lw(d.menu)})}qa(tx,iw);
1059
+ function ux(a,b){a.button=Uj();a.icon=R("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);var c=R("label");c.classList.add("shaka-overflow-button-label");a.nameSpan=R("span");c.appendChild(a.nameSpan);a.currentSelection=R("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
1060
+ function vx(a){a.menu=R("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Uj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);var b=R("i");b.classList.add("material-icons-round");b.textContent="arrow_back";a.backButton.appendChild(b);a.backSpan=R("span");a.backButton.appendChild(a.backSpan);a.controls.i.appendChild(a.menu)}
1061
+ J("shaka.ui.SettingsMenu",tx);function wx(a,b){tx.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.menu.classList.add("shaka-audio-languages");this.eventManager.m(this.localization,"locale-updated",function(){xx(c)});this.eventManager.m(this.localization,"locale-changed",function(){xx(c)});this.eventManager.m(this.player,"trackschanged",function(){var d=0<c.player.Jb().length;Y(c.button,d);yx(c)});this.eventManager.m(this.player,"variantchanged",function(){yx(c)});xx(this);yx(this)}
1062
+ qa(wx,tx);function yx(a){var b=a.player.Jb();rx(b,a.menu,function(c){a.player.vd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.s.trackLabelFormat);lw(a.menu);a.controls.dispatchEvent(new M("languageselectionupdated"))}function xx(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}
1063
+ J("shaka.ui.AudioLanguageSelection",wx);function zx(){}zx.prototype.create=function(a,b){return new wx(a,b)};cx("language",new zx);function Ax(a,b){iw.call(this,a,b);var c=this;this.h=this.controls.A;this.g=Uj();this.g.classList.add("shaka-cast-button");this.g.ariaPressed="false";this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=R("span");d.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");d.appendChild(this.j);
1064
+ this.g.appendChild(d);this.parent.appendChild(this.g);Bx(this);Cx(this);this.eventManager.m(this.localization,"locale-updated",function(){Bx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Bx(c)});this.eventManager.m(this.g,"click",function(){Dx(c)});this.eventManager.m(this.controls,"caststatuschanged",function(){Cx(c)})}qa(Ax,iw);
1065
+ function Dx(a){var b;H(function(c){if(1==c.g){if(a.h.ua())return a.h.xf(),c.C(0);A(c,3);a.g.disabled=!0;return u(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=E(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new M("error",(new Map).set("detail",b)));z(c)})}function Cx(a){var b=a.h.Je()&&a.controls.xb,c=a.h.ua();Y(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Ex(a)}
1066
+ function Ex(a){a.j.textContent=a.h.ua()?a.h.sd():a.localization.resolve("OFF")}function Bx(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Ex(a)}J("shaka.ui.CastButton",Ax);function Fx(){}Fx.prototype.create=function(a,b){return new Ax(a,b)};cx("cast",new Fx);Jw("cast",new Fx);function Gx(a,b){iw.call(this,a,b);var c=this;this.g=Uj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.textContent="fast_forward";this.parent.appendChild(this.g);Hx(this);this.eventManager.m(this.localization,"locale-updated",function(){Hx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Hx(c)});this.eventManager.m(this.g,"click",function(){if(c.video.duration){var d=c.player.Ec();c.player.Fe(0>d||4<d?1:2*d)}})}qa(Gx,iw);
1067
+ function Hx(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}J("shaka.ui.FastForwardButton",Gx);function Ix(){}Ix.prototype.create=function(a,b){return new Gx(a,b)};Jw("fast_forward",new Ix);function Jx(a,b){iw.call(this,a,b);var c=this;this.g=Uj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");document.fullscreenEnabled||this.g.classList.add("shaka-hidden");this.g.textContent="fullscreen";this.parent.appendChild(this.g);Kx(this);this.eventManager.m(this.localization,"locale-updated",function(){Kx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Kx(c)});this.eventManager.m(this.g,"click",function(){return H(function(d){return u(d,
1068
+ c.controls.De(),0)})});this.eventManager.m(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Kx(c)})}qa(Jx,iw);function Kx(a){a.g.ariaLabel=a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN")}J("shaka.ui.FullscreenButton",Jx);function Lx(){}Lx.prototype.create=function(a,b){return new Jx(a,b)};Jw("fullscreen",new Lx);function Mx(a,b){iw.call(this,a,b);var c=this;this.g=Uj();this.g.classList.add("shaka-loop-button");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=R("span");this.l.textContent=this.localization.resolve("LOOP");d.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");d.appendChild(this.j);
1069
+ this.g.appendChild(d);Nx(this);this.parent.appendChild(this.g);this.eventManager.m(this.localization,"locale-updated",function(){Nx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Nx(c)});this.eventManager.m(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Ea();c.h.oa(1)});this.o=this.video.loop;this.h=new P(function(){c.o!=c.video.loop&&(Nx(c),c.o=c.video.loop)});this.h.oa(1)}qa(Mx,iw);Mx.prototype.release=function(){this.h.stop();this.h=null;iw.prototype.release.call(this)};
1070
+ function Nx(a){a.l.textContent=a.localization.resolve("LOOP");a.j.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}J("shaka.ui.LoopButton",Mx);function Ox(){}Ox.prototype.create=function(a,b){return new Mx(a,b)};cx("loop",new Ox);Jw("loop",new Ox);function Px(a,b){iw.call(this,a,b);var c=this;this.g=Uj();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.parent.appendChild(this.g);Qx(this);Rx(this);this.eventManager.m(this.localization,"locale-updated",function(){Qx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Qx(c)});this.eventManager.m(this.g,"click",function(){c.ad?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});this.eventManager.m(this.video,"volumechange",
1071
+ function(){Qx(c);Rx(c)});this.eventManager.m(this.adManager,"ad-volume-changed",function(){Qx(c);Rx(c)});this.eventManager.m(this.adManager,"ad-muted",function(){Qx(c);Rx(c)});this.eventManager.m(this.adManager,"ad-stopped",function(){c.ad=null;Qx(c);Rx(c)})}qa(Px,iw);function Qx(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1072
+ function Rx(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}J("shaka.ui.MuteButton",Px);function Sx(){}Sx.prototype.create=function(a,b){return new Px(a,b)};Jw("mute",new Sx);function Tx(a,b){iw.call(this,a,b);var c=this;this.l=this.controls.B;this.g=Uj();this.g.classList.add("shaka-pip-button");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);this.h=R("span");this.h.classList.add("shaka-current-selection-span");
1073
+ d.appendChild(this.h);this.g.appendChild(d);Ux(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||Y(this.g,!1);this.eventManager.m(this.localization,"locale-updated",function(){Ux(c)});this.eventManager.m(this.localization,"locale-changed",function(){Ux(c)});this.eventManager.m(this.g,"click",function(){Vx(c)});this.eventManager.m(this.l,"enterpictureinpicture",function(){c.i.textContent="branding_watermark";c.g.ariaLabel=c.localization.resolve("EXIT_PICTURE_IN_PICTURE");
1074
+ c.h.textContent=c.localization.resolve("ON")});this.eventManager.m(this.l,"leavepictureinpicture",function(){c.i.textContent="picture_in_picture_alt";c.g.ariaLabel=c.localization.resolve("ENTER_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("OFF")});this.eventManager.m(this.controls,"caststatuschanged",function(e){e.newStatus?document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&Y(c.g,!1):document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&Y(c.g,!0)});this.eventManager.m(this.player,
1075
+ "trackschanged",function(){Wx(c)})}qa(Tx,iw);function Vx(a){var b;H(function(c){if(1==c.g)return A(c,2),document.pictureInPictureElement?u(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),u(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return va(c,0);b=E(c);a.controls.dispatchEvent(new M("error",(new Map).set("detail",b)));z(c)})}
1076
+ function Ux(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.ariaLabel=a.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
1077
+ function Wx(a){H(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return Y(a.g,!1),b.C(0);if(!a.player||!a.player.bf())return Y(a.g,!0),b.C(0);Y(a.g,!1);return document.pictureInPictureElement?u(b,document.exitPictureInPicture(),0):b.C(0)})}J("shaka.ui.PipButton",Tx);function Xx(){}Xx.prototype.create=function(a,b){return new Tx(a,b)};cx("picture_in_picture",new Xx);Jw("picture_in_picture",new Xx);function Yx(a,b){tx.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.eventManager.m(this.localization,"locale-updated",function(){Zx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Zx(c)});this.eventManager.m(this.player,"ratechange",function(){$x(c,c.player.Ec())});this.g=new Map([["0.5x",.5],["0.75x",.75],["1x",1],["1.25x",1.25],["1.5x",1.5],["1.75x",1.75],["2x",2]]);Zx(this);
1078
+ ay(this);$x(this,this.player.Ec())}qa(Yx,tx);function Zx(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
1079
+ function $x(a,b){var c=kw(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(mw()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x"}
1080
+ function ay(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={sc:b.sc},d=c.next()){b.sc=d.value;d=Uj();var e=R("span");e.textContent=b.sc;d.appendChild(e);a.eventManager.m(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.sc);a.video.defaultPlaybackRate=a.g.get(f.sc)}}(b));a.menu.appendChild(d)}lw(a.menu)}J("shaka.ui.PlaybackRateSelection",Yx);function by(){}by.prototype.create=function(a,b){return new Yx(a,b)};cx("playback_rate",new by);function cy(a,b){iw.call(this,a,b);var c=this;this.g=Uj();this.g.classList.add("shaka-current-time");dy(this,"0:00");this.parent.appendChild(this.g);this.eventManager.m(this.g,"click",function(){c.player.Y()&&(c.video.currentTime=c.player.La().end)});this.eventManager.m(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.ha,e=c.controls.We(),f=c.video.duration,g=c.player.La(),h=g.end-g.start;c.player.Y()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(dy(c,"- "+nw(e,f)),c.g.disabled=
1081
+ !1):(dy(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=nw(e,d),f&&(e+=" / "+nw(f,d)),dy(c,e),c.g.disabled=!0)});this.eventManager.m(this.player,"trackschanged",function(){c.player.Y()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}qa(cy,iw);function dy(a,b){b!=a.g.textContent&&(a.g.textContent=b)}J("shaka.ui.PresentationTimeTracker",cy);function ey(){}ey.prototype.create=function(a,b){return new cy(a,b)};Jw("time_and_duration",new ey);function fy(a,b){tx.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.menu.classList.add("shaka-resolutions");this.eventManager.m(this.localization,"locale-updated",function(){gy(c)});this.eventManager.m(this.localization,"locale-changed",function(){gy(c)});this.eventManager.m(this.player,"variantchanged",function(){hy(c)});this.eventManager.m(this.player,"trackschanged",function(){hy(c)});this.eventManager.m(this.player,"abrstatuschanged",function(){hy(c)});
1082
+ hy(this);gy(this)}qa(fy,tx);
1083
+ function hy(a){var b=a.player.Jb();if(b.length&&!b[0].height)Y(a.menu,!1),Y(a.button,!1);else{Y(a.button,!0);b.sort(function(k,l){return l.height-k.height});var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height})==l});var d=jw(a.menu);Vj(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e=
1084
+ {vc:e.vc},g=f.next()){e.vc=g.value;g=Uj();g.classList.add("explicit-resolution");a.eventManager.m(g,"click",function(k){return function(){var l=k.vc;a.player.configure({abr:{enabled:!1}});a.player.re(l,a.controls.s.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=e.vc.height+"p";g.appendChild(h);d||e.vc!=c||(g.ariaSelected="true",g.appendChild(mw()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Uj();e.classList.add("shaka-enable-abr-button");
1085
+ a.eventManager.m(e,"click",function(){a.player.configure({abr:{enabled:!0}});hy(a)});a.g=R("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(mw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.menu.appendChild(e);lw(a.menu);a.controls.dispatchEvent(new M("resolutionselectionupdated"))}}
1086
+ function gy(a){a.button.ariaLabel=a.localization.resolve("RESOLUTION");a.backButton.ariaLabel=a.localization.resolve("RESOLUTION");a.backSpan.textContent=a.localization.resolve("RESOLUTION");a.nameSpan.textContent=a.localization.resolve("RESOLUTION");a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}J("shaka.ui.ResolutionSelection",fy);function iy(){}
1087
+ iy.prototype.create=function(a,b){return new fy(a,b)};cx("quality",new iy);function jy(a,b){iw.call(this,a,b);var c=this;this.g=Uj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.textContent="fast_rewind";this.parent.appendChild(this.g);ky(this);this.eventManager.m(this.localization,"locale-updated",function(){ky(c)});this.eventManager.m(this.localization,"locale-changed",function(){ky(c)});this.eventManager.m(this.g,"click",function(){if(c.video.duration){var d=c.player.Ec();c.player.Fe(0<d||-4>d?-1:2*d)}})}qa(jy,iw);
1088
+ function ky(a){a.g.ariaLabel=a.localization.resolve("REWIND")}J("shaka.ui.RewindButton",jy);function ly(){}ly.prototype.create=function(a,b){return new jy(a,b)};Jw("rewind",new ly);function my(a,b){iw.call(this,a,b);var c=this;this.j=R("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=R("div");this.h.classList.add("shaka-skip-ad-counter");Y(this.h,!1);this.j.appendChild(this.h);this.g=Uj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;Y(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);ny(this);this.i=new P(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1089
+ d:(c.i.stop(),Y(c.h,!1))});this.eventManager.m(this.localization,"locale-updated",function(){ny(c)});this.eventManager.m(this.localization,"locale-changed",function(){ny(c)});this.eventManager.m(this.adManager,"ad-started",function(){oy(c)});this.eventManager.m(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),Y(c.h,!1))});this.eventManager.m(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;Y(c.g,!1);Y(c.h,!1)});this.eventManager.m(this.g,
1090
+ "click",function(){c.ad.skip()});this.ad&&oy(this)}qa(my,iw);my.prototype.release=function(){this.i.stop();this.i=null;iw.prototype.release.call(this)};function ny(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function oy(a){a.ad.isSkippable()&&(Y(a.g,!0),Y(a.h,!0),a.h.textContent="",a.i.Ea(),a.i.oa(.5))}J("shaka.ui.SkipAdButton",my);function py(a,b){rw.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.h();this.g()}qa(py,rw);py.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};py.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
1091
+ J("shaka.ui.SmallPlayButton",py);function qy(){}qy.prototype.create=function(a,b){return new py(a,b)};Jw("play_pause",new qy);function ry(a,b){iw.call(this,a,b);var c=R("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}qa(ry,iw);J("shaka.ui.Spacer",ry);function sy(){}sy.prototype.create=function(a,b){return new ry(a,b)};Jw("spacer",new sy);function ty(a,b){tx.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Ob()?this.button.ariaPressed="true":this.button.ariaPressed="false";uy(this);this.eventManager.m(this.localization,"locale-updated",function(){vy(c);wy(c)});this.eventManager.m(this.localization,"locale-changed",function(){vy(c);wy(c)});this.eventManager.m(this.player,"texttrackvisibility",function(){xy(c);wy(c)});
1092
+ this.eventManager.m(this.player,"textchanged",function(){wy(c)});this.eventManager.m(this.player,"trackschanged",function(){yy(c)});xy(this);vy(this);wy(this);yy(this)}qa(ty,tx);function uy(a){var b=Uj();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(mw());a.g=R("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1093
+ function xy(a){a.player.Ob()?(a.icon.classList.add("shaka-captions-on"),a.icon.classList.remove("shaka-captions-off"),a.button.ariaPressed="true"):(a.icon.classList.add("shaka-captions-off"),a.icon.classList.remove("shaka-captions-on"),a.button.ariaPressed="false");a.controls.dispatchEvent(new M("captionselectionupdated"))}
1094
+ function wy(a){var b=a.player.qb();rx(b,a.menu,function(c){return zy(a,c)},a.player.Ob(),a.currentSelection,a.localization,a.controls.s.trackLabelFormat);b=Uj();b.classList.add("shaka-turn-captions-off-button");a.eventManager.m(b,"click",function(){a.player.Ae(!1);wy(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Ob()||(b.ariaSelected="true",b.appendChild(mw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));lw(a.menu);a.controls.dispatchEvent(new M("captionselectionupdated"))}
1095
+ function zy(a,b){return H(function(c){a.player.qe(b);return u(c,a.player.Ae(!0),0)})}function vy(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}function yy(a){var b=0<a.player.qb().length;Y(a.button,b);wy(a)}J("shaka.ui.TextSelection",ty);function Ay(){}
1096
+ Ay.prototype.create=function(a,b){return new ty(a,b)};cx("captions",new Ay);function By(a,b){vw.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.s=this.controls.s;this.eventManager.m(this.video,"volumechange",function(){return Cy(c)});this.eventManager.m(this.adManager,"ad-volume-changed",function(){return Dy(c)});this.eventManager.m(this.adManager,"ad-muted",function(){return Dy(c)});this.eventManager.m(this.adManager,"ad-stopped",function(){return Cy(c)});this.eventManager.m(this.localization,"locale-updated",function(){return Ey(c)});
1097
+ this.eventManager.m(this.localization,"locale-changed",function(){return Ey(c)});Cy(this);Ey(this);if(this.ad)this.onChange()}qa(By,vw);By.prototype.onChange=function(){this.ad?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function Cy(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);Fy(a)}function Dy(a){var b=a.ad.getVolume();a.setValue(b);Fy(a)}
1098
+ function Fy(a){var b=a.s.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function Ey(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}J("shaka.ui.VolumeBar",By);function Gy(){}Gy.prototype.create=function(a,b){return new By(a,b)};Jw("volume",new Gy);}).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})();
1098
1099
 
1099
1100
  //# sourceMappingURL=shaka-player.ui.map