shaka-player 4.0.4 → 4.1.2

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 (79) hide show
  1. package/CHANGELOG.md +41 -34
  2. package/CONTRIBUTORS +1 -0
  3. package/demo/common/message_ids.js +1 -0
  4. package/demo/config.js +3 -1
  5. package/demo/locales/en.json +1 -0
  6. package/demo/locales/source.json +4 -0
  7. package/dist/demo.compiled.debug.js +4 -4
  8. package/dist/demo.compiled.debug.map +2 -2
  9. package/dist/demo.compiled.js +4 -4
  10. package/dist/demo.compiled.map +2 -2
  11. package/dist/deps.js +2 -2
  12. package/dist/locales.js +30 -30
  13. package/dist/receiver.compiled.debug.js +2 -2
  14. package/dist/receiver.compiled.debug.map +2 -2
  15. package/dist/receiver.compiled.js +2 -2
  16. package/dist/receiver.compiled.map +2 -2
  17. package/dist/shaka-player.compiled.d.ts +14 -8
  18. package/dist/shaka-player.compiled.debug.d.ts +14 -8
  19. package/dist/shaka-player.compiled.debug.externs.js +10 -2
  20. package/dist/shaka-player.compiled.debug.js +168 -160
  21. package/dist/shaka-player.compiled.debug.map +3 -3
  22. package/dist/shaka-player.compiled.externs.js +10 -2
  23. package/dist/shaka-player.compiled.js +767 -764
  24. package/dist/shaka-player.compiled.map +3 -3
  25. package/dist/shaka-player.ui.d.ts +15 -9
  26. package/dist/shaka-player.ui.debug.d.ts +15 -9
  27. package/dist/shaka-player.ui.debug.externs.js +10 -2
  28. package/dist/shaka-player.ui.debug.js +201 -189
  29. package/dist/shaka-player.ui.debug.map +3 -3
  30. package/dist/shaka-player.ui.externs.js +10 -2
  31. package/dist/shaka-player.ui.js +934 -931
  32. package/dist/shaka-player.ui.map +3 -3
  33. package/docs/design/chromecast.md +3 -1
  34. package/docs/tutorials/drm-config.md +16 -0
  35. package/docs/tutorials/ui.md +26 -0
  36. package/externs/chromecast.js +9 -2
  37. package/externs/shaka/manifest.js +7 -0
  38. package/externs/shaka/player.js +21 -2
  39. package/externs/shaka/text.js +7 -0
  40. package/lib/cast/cast_proxy.js +19 -8
  41. package/lib/cast/cast_receiver.js +3 -3
  42. package/lib/cast/cast_sender.js +12 -2
  43. package/lib/hls/hls_parser.js +12 -1
  44. package/lib/media/drm_engine.js +17 -8
  45. package/lib/media/gap_jumping_controller.js +23 -1
  46. package/lib/media/playhead.js +47 -4
  47. package/lib/media/stall_detector.js +19 -2
  48. package/lib/media/streaming_engine.js +8 -1
  49. package/lib/offline/manifest_converter.js +1 -0
  50. package/lib/player.js +175 -69
  51. package/lib/text/cue.js +6 -0
  52. package/lib/text/ui_text_displayer.js +1 -0
  53. package/lib/text/vtt_text_parser.js +4 -0
  54. package/lib/util/error.js +6 -0
  55. package/lib/util/fake_event.js +39 -0
  56. package/lib/util/player_configuration.js +2 -0
  57. package/lib/util/stats.js +28 -1
  58. package/lib/util/stream_utils.js +7 -0
  59. package/package.json +1 -1
  60. package/test/cast/cast_proxy_unit.js +3 -1
  61. package/test/cast/cast_sender_unit.js +21 -6
  62. package/test/demo/demo_unit.js +2 -1
  63. package/test/media/adaptation_set_unit.js +1 -0
  64. package/test/media/playhead_unit.js +114 -25
  65. package/test/media/stall_detector_unit.js +20 -2
  66. package/test/media/streaming_engine_integration.js +2 -1
  67. package/test/media/streaming_engine_unit.js +1 -0
  68. package/test/player_integration.js +3 -0
  69. package/test/player_unit.js +142 -1
  70. package/test/test/util/manifest_generator.js +2 -0
  71. package/test/test/util/simple_fakes.js +14 -0
  72. package/test/test/util/streaming_engine_util.js +1 -0
  73. package/test/text/vtt_text_parser_unit.js +4 -0
  74. package/test/ui/ui_unit.js +18 -5
  75. package/test/util/stream_utils_unit.js +108 -0
  76. package/ui/controls.js +12 -8
  77. package/ui/externs/ui.js +10 -1
  78. package/ui/statistics_button.js +10 -0
  79. package/ui/ui.js +12 -1
@@ -13,34 +13,34 @@ 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 t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ia(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var 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
- 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.Si=b.prototype}function ra(){this.A=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=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={hf:b,tf:!0};a.g=a.m||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.D=function(a){this.g=a};function z(a){a.g=0}function B(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b,c){a.g=b;a.m=c||0}function F(a,b){a.m=b||0;var c=a.i.hf;a.i=null;return c}function wa(a){a.C=[a.i];a.m=0;a.j=0}
20
- function ya(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.tf?a.g=a.m||a.j:void 0!=c.D&&a.j<c.D?(a.g=c.D,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)}
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.$i=b.prototype}function ra(){this.A=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=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={mf:b,xf:!0};a.g=a.m||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.D=function(a){this.g=a};function z(a){a.g=0}function A(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b,c){a.g=b;a.m=c||0}function F(a,b){a.m=b||0;var c=a.i.mf;a.i=null;return c}function wa(a){a.C=[a.i];a.m=0;a.j=0}
20
+ function ya(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.xf?a.g=a.m||a.j:void 0!=c.D&&a.j<c.D?(a.g=c.D,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
- 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.tf)throw b.hf;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
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.xf)throw b.mf;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}}
24
24
  function Ea(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 I(a){return Ea(new Da(new za(a)))}function Ha(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
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.H),reject:g(this.l)}};b.prototype.H=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.J(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.G(g):this.m(g)}};
27
27
  b.prototype.G=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.B(2,g)};b.prototype.m=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.I();this.C()};b.prototype.I=function(){var g=this;e(function(){if(g.F()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
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.C=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.J=function(g){var h=this.j();g.cd(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(n,t){return"function"==typeof n?function(v){try{l(n(v))}catch(y){m(y)}}:t}var l,m,p=new b(function(n,t){l=n;m=t});this.cd(k(g,l),k(h,m));return p};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.cd=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
- break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.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).cd(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function p(v){return function(y){n[v]=y;t--;0==t&&l(n)}}var n=[],t=0;do n.push(void 0),t++,d(k.value).cd(p(n.length-1),m),k=h.next();
29
+ b.prototype.J=function(g){var h=this.j();g.ed(h.resolve,h.reject)};b.prototype.K=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,r){return"function"==typeof p?function(w){try{l(p(w))}catch(y){m(y)}}:r}var l,m,n=new b(function(p,r){l=p;m=r});this.ed(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.ed=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
+ break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.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=t(g),m=l.next();!m.done;m=l.next())d(m.value).ed(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(w){return function(y){p[w]=y;r--;0==r&&l(p)}}var p=[],r=0;do p.push(void 0),r++,d(k.value).ed(n(p.length-1),m),k=h.next();
31
31
  while(!k.done)})};return b});function Ia(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
- 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(!Ia(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
33
- m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(p){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ia(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ia(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
32
+ ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ia(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
33
+ 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(!Ia(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ia(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
34
34
  Ia(k,g)&&Ia(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ia(k,g)&&Ia(k[g],this.g)?delete k[g][this.g]:!1};return b});
35
- ea("Map",function(a){function b(){var h={};return h.ob=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.ob;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&&Ia(h.h,l))for(var p=0;p<m.length;p++){var n=m[p];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:p,va:n}}return{id:l,
36
- list:m,index:-1,va: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(p){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.va?l.va.value=k:(l.va={next:this.g,ob:this.g.ob,head:this.g,key:h,value:k},l.list.push(l.va),this.g.ob.next=l.va,this.g.ob=l.va,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.va&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.va.ob.next=h.va.next,h.va.next.ob=h.va.ob,
38
- h.va.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.ob=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).va};e.prototype.get=function(h){return(h=d(this,h).va)&&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.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&&Ia(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,va:p}}return{id:l,
36
+ list:m,index:-1,va:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
37
+ "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.va?l.va.value=k:(l.va={next:this.g,pb:this.g.pb,head:this.g,key:h,value:k},l.list.push(l.va),this.g.pb.next=l.va,this.g.pb=l.va,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.va&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.va.pb.next=h.va.next,h.va.next.pb=h.va.pb,
38
+ h.va.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).va};e.prototype.get=function(h){return(h=d(this,h).va)&&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 Ja(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 Ja(this,function(b){return b})}});
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||
40
+ ea("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
41
41
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
42
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
- function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{qf:e,v:f}}return{qf:-1,v:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).qf}});ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
43
+ function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{vf:e,v:f}}return{vf:-1,v:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).vf}});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
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
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 Ka(this,b,c).v}});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}});
46
46
  var Na="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ia(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||Na});ea("Array.prototype.values",function(a){return a?a:function(){return Ja(this,function(b,c){return c})}});
@@ -53,853 +53,856 @@ function J(a,b){var c=a.split("."),d=Oa;c[0]in d||"undefined"==typeof d.execScri
53
53
  Copyright 2016 Google LLC
54
54
  SPDX-License-Identifier: Apache-2.0
55
55
  */
56
- function L(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}
57
- function Pa(a){var b=new L(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}L.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};L.prototype.stopImmediatePropagation=function(){this.g=!0};L.prototype.stopPropagation=function(){};J("shaka.util.FakeEvent",L);function Qa(){}function Ra(){}function Ta(){}function Ua(a){var b=Ha.apply(1,arguments);Va.has(a)||(Va.add(a),Ta.apply(Qa,ia(b)))}function Wa(){}function Xa(){}function Ya(){}function Za(){}var Va=new Set;if(window.console&&window.console.log.bind){var $a={},bb=($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=bb[2];Ra=bb[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.ua=new cb;this.nd=this}eb.prototype.addEventListener=function(a,b){this.ua&&this.ua.push(a,b)};eb.prototype.removeEventListener=function(a,b){this.ua&&this.ua.remove(a,b)};eb.prototype.dispatchEvent=function(a){if(!this.ua)return!0;var b=this.ua.get(a.type)||[],c=this.ua.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.nd;a.currentTarget=this.nd;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.ua=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};/*
56
+ function L(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
57
+ function Pa(a){var b=new L(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}L.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};L.prototype.stopImmediatePropagation=function(){this.g=!0};L.prototype.stopPropagation=function(){};J("shaka.util.FakeEvent",L);
58
+ var Qa={Ch:"abrstatuschanged",Dh:"adaptation",Eh:"buffering",Ih:"downloadfailed",Jh:"downloadheadersreceived",Kh:"drmsessionupdate",Rh:"emsg",Error:"error",Sh:"expirationupdated",Vh:"gapjumped",Zh:"loaded",$h:"loading",ei:"manifestparsed",gi:"mediaqualitychanged",Metadata:"metadata",mi:"onstatechange",ni:"onstateidle",Ai:"ratechange",Gi:"sessiondata",Hi:"stalldetected",Ii:"streaming",Ji:"textchanged",Ki:"texttrackvisibility",Li:"timelineregionadded",Mi:"timelineregionenter",Ni:"timelineregionexit",
59
+ Oi:"trackschanged",Ti:"unloading",Vi:"variantchanged"};function Ra(){}function Ta(){}function Ua(){}function Va(a){var b=Ha.apply(1,arguments);Wa.has(a)||(Wa.add(a),Ua.apply(Ra,ia(b)))}function Xa(){}function Ya(){}function Za(){}function $a(){}var Wa=new Set;if(window.console&&window.console.log.bind){var bb={},cb=(bb[1]=console.error.bind(console),bb[2]=console.warn.bind(console),bb[3]=console.info.bind(console),bb[4]=console.log.bind(console),bb[5]=console.debug.bind(console),bb[6]=console.debug.bind(console),bb);Ua=cb[2];Ta=cb[1]};function db(){this.g={}}q=db.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 eb(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 fb(){this.ua=new db;this.rd=this}fb.prototype.addEventListener=function(a,b){this.ua&&this.ua.push(a,b)};fb.prototype.removeEventListener=function(a,b){this.ua&&this.ua.remove(a,b)};fb.prototype.dispatchEvent=function(a){if(!this.ua)return!0;var b=this.ua.get(a.type)||[],c=this.ua.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.rd;a.currentTarget=this.rd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
60
+ fb.prototype.release=function(){this.ua=null};function gb(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function hb(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}function ib(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(b(d.value))return!0;return!1}function jb(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())e=e.value,b(e)&&c.push(e);return c};/*
59
61
  @license
60
62
  Copyright 2008 The Closure Library Authors
61
63
  SPDX-License-Identifier: Apache-2.0
62
64
  */
63
- var jb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
65
+ var kb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
64
66
  @license
65
67
  Copyright 2006 The Closure Library Authors
66
68
  SPDX-License-Identifier: Apache-2.0
67
69
  */
68
- function kb(a){var b;a instanceof kb?(lb(this,a.Va),this.Rb=a.Rb,this.Ya=a.Ya,mb(this,a.kc),this.Ka=a.Ka,nb(this,a.g.clone()),this.Hb=a.Hb):a&&(b=String(a).match(jb))?(lb(this,b[1]||"",!0),this.Rb=ob(b[2]||""),this.Ya=ob(b[3]||"",!0),mb(this,b[4]),this.Ka=ob(b[5]||"",!0),nb(this,b[6]||"",!0),this.Hb=ob(b[7]||"")):this.g=new pb(null)}q=kb.prototype;q.Va="";q.Rb="";q.Ya="";q.kc=null;q.Ka="";q.Hb="";
69
- q.toString=function(){var a=[],b=this.Va;b&&a.push(rb(b,sb,!0),":");if(b=this.Ya){a.push("//");var c=this.Rb;c&&a.push(rb(c,sb,!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.Ka)this.Ya&&"/"!=b.charAt(0)&&a.push("/"),a.push(rb(b,"/"==b.charAt(0)?tb:ub,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Hb)&&a.push("#",rb(b,vb));return a.join("")};
70
- q.resolve=function(a){var b=this.clone();"data"===b.Va&&(b=new kb);var c=!!a.Va;c?lb(b,a.Va):c=!!a.Rb;c?b.Rb=a.Rb:c=!!a.Ya;c?b.Ya=a.Ya:c=null!=a.kc;var d=a.Ka;if(c)mb(b,a.kc);else if(c=!!a.Ka){if("/"!=d.charAt(0))if(this.Ya&&!this.Ka)d="/"+d;else{var e=b.Ka.lastIndexOf("/");-1!=e&&(d=b.Ka.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.Ka=d:c=""!==a.g.toString();c?nb(b,a.g.clone()):c=!!a.Hb;c&&(b.Hb=a.Hb);return b};q.clone=function(){return new kb(this)};function lb(a,b,c){a.Va=c?ob(b,!0):b;a.Va&&(a.Va=a.Va.replace(/:$/,""))}function mb(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 nb(a,b,c){b instanceof pb?a.g=b:(c||(b=rb(b,wb)),a.g=new pb(b))}
72
- function ob(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function rb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,xb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function xb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var sb=/[#\/\?@]/g,ub=/[#\?:]/g,tb=/[#\?]/g,wb=/[#\?@]/g,vb=/#/g;function pb(a){this.g=a||null}
73
- function yb(a){if(!a.Ea&&(a.Ea={},a.ed=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=pb.prototype;q.Ea=null;q.ed=null;q.add=function(a,b){yb(this);this.g=null;var c=this.Ea.hasOwnProperty(a)&&this.Ea[a];c||(this.Ea[a]=c=[]);c.push(b);this.ed++;return this};
74
- q.set=function(a,b){yb(this);this.g=null;this.Ea.hasOwnProperty(a)?this.Ea[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.Ea)return"";var a=[],b;for(b in this.Ea)for(var c=encodeURIComponent(b),d=this.Ea[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 pb;a.g=this.g;if(this.Ea){var b={},c;for(c in this.Ea)b[c]=this.Ea[c].concat();a.Ea=b;a.ed=this.ed}return a};function O(a,b,c){var d=Ha.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;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,
76
- TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,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,
70
+ function lb(a){var b;a instanceof lb?(mb(this,a.Wa),this.Rb=a.Rb,this.Za=a.Za,nb(this,a.kc),this.Ka=a.Ka,ob(this,a.g.clone()),this.Hb=a.Hb):a&&(b=String(a).match(kb))?(mb(this,b[1]||"",!0),this.Rb=pb(b[2]||""),this.Za=pb(b[3]||"",!0),nb(this,b[4]),this.Ka=pb(b[5]||"",!0),ob(this,b[6]||"",!0),this.Hb=pb(b[7]||"")):this.g=new rb(null)}q=lb.prototype;q.Wa="";q.Rb="";q.Za="";q.kc=null;q.Ka="";q.Hb="";
71
+ q.toString=function(){var a=[],b=this.Wa;b&&a.push(sb(b,tb,!0),":");if(b=this.Za){a.push("//");var c=this.Rb;c&&a.push(sb(c,tb,!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.Ka)this.Za&&"/"!=b.charAt(0)&&a.push("/"),a.push(sb(b,"/"==b.charAt(0)?ub:vb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Hb)&&a.push("#",sb(b,wb));return a.join("")};
72
+ q.resolve=function(a){var b=this.clone();"data"===b.Wa&&(b=new lb);var c=!!a.Wa;c?mb(b,a.Wa):c=!!a.Rb;c?b.Rb=a.Rb:c=!!a.Za;c?b.Za=a.Za:c=null!=a.kc;var d=a.Ka;if(c)nb(b,a.kc);else if(c=!!a.Ka){if("/"!=d.charAt(0))if(this.Za&&!this.Ka)d="/"+d;else{var e=b.Ka.lastIndexOf("/");-1!=e&&(d=b.Ka.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(""):".."==
73
+ 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.Ka=d:c=""!==a.g.toString();c?ob(b,a.g.clone()):c=!!a.Hb;c&&(b.Hb=a.Hb);return b};q.clone=function(){return new lb(this)};function mb(a,b,c){a.Wa=c?pb(b,!0):b;a.Wa&&(a.Wa=a.Wa.replace(/:$/,""))}function nb(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 ob(a,b,c){b instanceof rb?a.g=b:(c||(b=sb(b,xb)),a.g=new rb(b))}
74
+ function pb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function sb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,yb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function yb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var tb=/[#\/\?@]/g,vb=/[#\?:]/g,ub=/[#\?]/g,xb=/[#\?@]/g,wb=/#/g;function rb(a){this.g=a||null}
75
+ function zb(a){if(!a.Ea&&(a.Ea={},a.gd=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=rb.prototype;q.Ea=null;q.gd=null;q.add=function(a,b){zb(this);this.g=null;var c=this.Ea.hasOwnProperty(a)&&this.Ea[a];c||(this.Ea[a]=c=[]);c.push(b);this.gd++;return this};
76
+ q.set=function(a,b){zb(this);this.g=null;this.Ea.hasOwnProperty(a)?this.Ea[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.Ea)return"";var a=[],b;for(b in this.Ea)for(var c=encodeURIComponent(b),d=this.Ea[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 rb;a.g=this.g;if(this.Ea){var b={},c;for(c in this.Ea)b[c]=this.Ea[c].concat();a.Ea=b;a.gd=this.gd}return a};function O(a,b,c){var d=Ha.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;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};
77
+ 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,SEGMENT_MISSING:1011,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,
78
+ CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,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,
77
79
  WEBM_CUE_TIME_ELEMENT_MISSING:3013,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,
78
80
  DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,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_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,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,
79
81
  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,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,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,
80
82
  LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,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,
81
83
  CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,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,MODIFY_OPERATION_NOT_SUPPORTED:9016,CS_IMA_SDK_MISSING:1E4,
82
- CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function zb(a,b){return a.concat(b)}function Ab(){}function Bb(a){return null!=a};function Cb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new kb(d)});return a.map(function(d){return new kb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(zb,[]).map(function(d){return d.toString()})}function Db(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
83
- function Eb(a,b){if(1==b.length)return b[0];var c=Fb(a,b);if(null!=c)return c;throw new O(2,4,4025,b);}function Fb(a,b){for(var c=r(Gb[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==Hb?"":null}var Hb="text",Ib={Ma:"video",Fb:"audio",ha:Hb,xc:"image",rh:"application"},Gb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Jb(){}function Kb(a,b){a=Lb(a);b=Lb(b);return a.split("-")[0]==b.split("-")[0]}function Mb(a,b){a=Lb(a);b=Lb(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Nb(a,b){a=Lb(a);b=Lb(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Lb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Ob.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Pb(a,b){var c=Qb(a),d=Qb(b);return a!=c&&b!=d&&c==d}
84
- function Rb(a,b){a=Lb(a);b=Lb(b);return b==a?4:Mb(b,a)?3:Nb(b,a)?2:Mb(a,b)?1:0}function Qb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Ob.get(a)||a}function Sb(a){return a.language?Lb(a.language):a.audio&&a.audio.language?Lb(a.audio.language):a.video&&a.video.language?Lb(a.video.language):"und"}
85
- function Tb(a,b){for(var c=Lb(a),d=new Set,e=r(b),f=e.next();!f.done;f=e.next())d.add(Lb(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,Mb(f,c))return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Nb(f,c))return f;d=r(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Mb(c,f))return f;return null}J("shaka.util.LanguageUtils",Jb);Jb.findClosestLocale=Tb;Jb.getLocaleForVariant=Sb;
86
- Jb.getLocaleForText=function(a){return Lb(a.language||"und")};Jb.getBase=Qb;Jb.relatedness=Rb;Jb.areSiblings=Pb;Jb.normalize=Lb;Jb.isSiblingOf=Nb;Jb.isParentOf=Mb;Jb.areLanguageCompatible=Kb;Jb.areLocaleCompatible=function(a,b){a=Lb(a);b=Lb(b);return a==b};
87
- var Ob=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",
84
+ CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function Ab(a,b){return a.concat(b)}function Bb(){}function Cb(a){return null!=a};function Db(a,b){if(0==b.length)return a;var c=b.map(function(d){return new lb(d)});return a.map(function(d){return new lb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Ab,[]).map(function(d){return d.toString()})}function Eb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
85
+ function Fb(a,b){if(1==b.length)return b[0];var c=Gb(a,b);if(null!=c)return c;throw new O(2,4,4025,b);}function Gb(a,b){for(var c=t(Hb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Ib?"":null}var Ib="text",Jb={Ma:"video",Fb:"audio",ha:Ib,xc:"image",yh:"application"},Hb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Kb(){}function Lb(a,b){a=Mb(a);b=Mb(b);return a.split("-")[0]==b.split("-")[0]}function Nb(a,b){a=Mb(a);b=Mb(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Ob(a,b){a=Mb(a);b=Mb(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Mb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Pb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Qb(a,b){var c=Rb(a),d=Rb(b);return a!=c&&b!=d&&c==d}
86
+ function Sb(a,b){a=Mb(a);b=Mb(b);return b==a?4:Nb(b,a)?3:Ob(b,a)?2:Nb(a,b)?1:0}function Rb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Pb.get(a)||a}function Tb(a){return a.language?Mb(a.language):a.audio&&a.audio.language?Mb(a.audio.language):a.video&&a.video.language?Mb(a.video.language):"und"}
87
+ function Ub(a,b){for(var c=Mb(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(Mb(f.value));e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Nb(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Ob(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Nb(c,f))return f;return null}J("shaka.util.LanguageUtils",Kb);Kb.findClosestLocale=Ub;Kb.getLocaleForVariant=Tb;
88
+ Kb.getLocaleForText=function(a){return Mb(a.language||"und")};Kb.getBase=Rb;Kb.relatedness=Sb;Kb.areSiblings=Qb;Kb.normalize=Mb;Kb.isSiblingOf=Ob;Kb.isParentOf=Nb;Kb.areLanguageCompatible=Lb;Kb.areLocaleCompatible=function(a,b){a=Mb(a);b=Mb(b);return a==b};
89
+ var Pb=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",
88
90
  "cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
89
91
  "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",
90
92
  "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",
91
93
  "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",
92
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Ub(a){eb.call(this);this.j=Lb(a);this.i=new Map;this.g=new Set;this.h=new Map}qa(Ub,eb);q=Ub.prototype;q.release=function(){eb.prototype.release.call(this)};
93
- q.Ye=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Lb(c.value));Vb(this);a=ib(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new L("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 L("locale-changed",a))};
94
- q.ia=function(a,b,c){a=Lb(a);void 0===c&&(c=Wb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Wb||d.set(f,e)});this.h.set(a,d);Vb(this);this.dispatchEvent(new L("locale-updated"));return this};q.$g=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 L("unknown-localization",a));return""};
95
- function Vb(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={Wb:f.Wb},h=g.next()){f.Wb=h.value;e.add(f.Wb);e.add(Qb(f.Wb));h=ib(b.keys(),function(l){return function(m){return Pb(m,l.Wb)}}(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 Qb(m)==l.Wb}}(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=b.get(h.value))&&c.push(h);
96
- 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,Xb(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new L("missing-localizations",d)))}function Xb(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",Ub);Ub.prototype.resolve=Ub.prototype.resolve;
97
- Ub.prototype.resolveDictionary=Ub.prototype.$g;Ub.prototype.insert=Ub.prototype.ia;Ub.prototype.changeLocale=Ub.prototype.Ye;Ub.prototype.release=Ub.prototype.release;var Wb=1;Ub.ConflictResolution={USE_OLD:0,USE_NEW:Wb};Ub.UNKNOWN_LOCALES="unknown-locales";Ub.UNKNOWN_LOCALIZATION="unknown-localization";Ub.MISSING_LOCALIZATIONS="missing-localizations";Ub.LOCALE_CHANGED="locale-changed";Ub.LOCALE_UPDATED="locale-updated";var Yb={Ki:"UNRECOGNIZED_LANGUAGE",ii:"PICTURE_IN_PICTURE",Jh:"EXIT_LOOP_MODE",Te:"LIVE",Ih:"EXIT_FULL_SCREEN",Gh:"ENTER_PICTURE_IN_PICTURE",Mi:"VOLUME",ri:"SEEK",Ah:"CAST",Vh:"MORE_SETTINGS",Rh:"LOOP",bi:"ON",mi:"REPLAY",si:"SKIP_AD",qh:"AIRPLAY",Qh:"LANGUAGE",$h:"NOT_APPLICABLE",Lf:"SUBTITLE_FORCED",ph:"AD_TIME",oi:"REWIND",Xh:"MUTE",sh:"AUTO_QUALITY",gi:"PAUSE",ai:"OFF",ki:"PLAYBACK_RATE",Wh:"MULTIPLE_LANGUAGES",ji:"PLAY",Ji:"UNMUTE",xi:"STATISTICS",Fh:"ENTER_LOOP_MODE",yh:"CAPTIONS",Nh:"FAST_FORWARD",
98
- Kh:"EXIT_PICTURE_IN_PICTURE",Oh:"FULL_SCREEN",BACK:"BACK",ni:"RESOLUTION",oh:"AD_DURATION",AD_PROGRESS:"AD_PROGRESS",Ii:"UNDETERMINED_LANGUAGE",li:"QUALITY",ti:"SKIP_TO_LIVE"};function Zb(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Zb.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function $b(a){return a.h/(1-Math.pow(a.g,a.i))};function ac(){this.h=new Zb(2);this.j=new Zb(5);this.g=0;this.i=128E3;this.l=16E3}ac.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};ac.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};ac.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min($b(this.h),$b(this.j))};function bc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function cc(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function dc(a,b,c){c||(c=bc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Jd:d.Jd},e=a.next()){d.Jd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Jd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
99
- function ec(a,b,c){c||(c=bc);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 fc(a,b,c){this.startTime=a;this.direction=gc;this.endTime=b;this.payload=c;this.region=new hc;this.position=null;this.positionAlign=ic;this.size=0;this.textAlign=jc;this.writingMode=kc;this.lineInterpretation=lc;this.line=null;this.lineHeight="";this.lineAlign=mc;this.displayAlign=nc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=oc;this.fontStyle=pc;this.linePadding=this.letterSpacing=this.fontFamily=
100
- "";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}fc.prototype.clone=function(){var a=new fc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
101
- function qc(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(!ec(a.nestedCues,b.nestedCues,qc))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(!ec(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}J("shaka.text.Cue",fc);var ic="auto";
102
- fc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:ic};var jc="center",uc={LEFT:"left",RIGHT:"right",CENTER:jc,START:"start",END:"end"};fc.textAlign=uc;var nc="after",vc={BEFORE:"before",CENTER:"center",AFTER:nc};fc.displayAlign=vc;var gc="ltr";fc.direction={HORIZONTAL_LEFT_TO_RIGHT:gc,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var kc="horizontal-tb";fc.writingMode={HORIZONTAL_TOP_TO_BOTTOM:kc,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var lc=0;
103
- fc.lineInterpretation={LINE_NUMBER:lc,PERCENTAGE:1};var mc="start",wc={CENTER:"center",START:mc,END:"end"};fc.lineAlign=wc;var xc={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};fc.defaultTextColor=xc;var yc={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};fc.defaultTextBackgroundColor=yc;var oc=400;fc.fontWeight={NORMAL:oc,BOLD:700};
104
- var pc="normal",zc={NORMAL:pc,ITALIC:"italic",OBLIQUE:"oblique"};fc.fontStyle=zc;fc.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function hc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Ac;this.scroll=Bc}J("shaka.text.CueRegion",hc);var Ac=1;hc.units={PX:0,PERCENTAGE:Ac,LINES:2};var Bc="";hc.scrollMode={NONE:Bc,UP:"up"};function Cc(){}function Dc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Ec(a)==Ec(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Fc(a),d=Fc(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Ec(a){return a instanceof ArrayBuffer?a:a.buffer}function Gc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
105
- function Fc(a,b,c){c=void 0===c?Infinity:c;return Hc(a,void 0===b?0:b,c,Uint8Array)}function Ic(a,b,c){c=void 0===c?Infinity:c;return Hc(a,void 0===b?0:b,c,DataView)}function Hc(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(Ec(a),b,Math.min(b+Math.max(c,0),e)-b)}J("shaka.util.BufferUtils",Cc);Cc.toDataView=Ic;Cc.toUint8=Fc;Cc.toArrayBuffer=Gc;Cc.equal=Dc;function Jc(){}J("shaka.dependencies",Jc);Jc.has=function(a){return Kc.has(a)};Jc.add=function(a,b){if(!Lc[a])throw Error(a+" is not supported");Kc.set(a,function(){return b})};var Lc={muxjs:"muxjs"};Jc.Allowed=Lc;var Kc=new Map([["muxjs",function(){return window.muxjs}]]);function Mc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Mc.prototype.resolve=function(){};Mc.prototype.reject=function(){};function Nc(a){this.h=a;this.g=void 0}Nc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Oc(a){this.h=a;this.g=null}Oc.prototype.S=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Oc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function P(a){this.h=a;this.g=null}P.prototype.xa=function(){this.stop();this.h();return this};P.prototype.S=function(a){var b=this;this.stop();this.g=(new Oc(function(){b.h()})).S(a);return this};P.prototype.ka=function(a){var b=this;this.stop();this.g=(new Oc(function(){b.g.S(a);b.h()})).S(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.ka;P.prototype.tickAfter=P.prototype.S;
106
- P.prototype.tickNow=P.prototype.xa;function Pc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Rc(a){return""!=Sc().canPlayType(a)}function Tc(){return Uc("Xbox One")}function Vc(){return Uc("Tizen")}function Wc(){return Uc("Web0S")&&Uc("Chrome/38.0.2125.122 Safari/537.36")}function Xc(){return Uc("CrKey")}function Yc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Vc()&&!Uc("PC=EOS")&&!Zc()}function Zc(){return Uc("PlayStation 4")}
107
- function $c(){if(!Yc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function Uc(a){return(navigator.userAgent||"").includes(a)}function Sc(){if(ad)return ad;bd||(bd=new P(function(){ad=null}));(ad=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(ad=document.createElement("video"));bd.S(1);return ad}var bd=null,ad=null;function cd(){}function dd(a){if(!a)return"";a=Fc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Zc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ra('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;a=ed(a);a=escape(a);try{return decodeURIComponent(a)}catch(b){throw new O(2,2,2004);}}
108
- function fd(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new O(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Ic(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return ed(d)}
109
- function gd(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Fc(a);if(239==c[0]&&187==c[1]&&191==c[2])return dd(c);if(254==c[0]&&255==c[1])return fd(c.subarray(2),!1);if(255==c[0]&&254==c[1])return fd(c.subarray(2),!0);if(0==c[0]&&0==c[2])return fd(a,!1);if(0==c[1]&&0==c[3])return fd(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return dd(a);throw new O(2,2,2003);}
110
- function hd(a){if(window.TextEncoder&&!Zc()){var b=new TextEncoder;return Gc(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Gc(b)}function id(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function ed(a){return jd.value()(a)}J("shaka.util.StringUtils",cd);cd.resetFromCharCode=function(){jd.g=void 0};cd.toUTF16=id;cd.toUTF8=hd;
111
- cd.fromBytesAutoDetect=gd;cd.fromUTF16=fd;cd.fromUTF8=dd;var jd=new Nc(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 kd(){}function ld(a){a=ed(Fc(a));return btoa(a)}function md(a,b){b=void 0==b?!0:b;var c=ld(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function nd(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function od(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
112
- function pd(a){var b=Fc(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}function qd(){for(var a=Ha.apply(0,arguments),b=0,c=r(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Fc(d),c),c+=d.byteLength;return b}J("shaka.util.Uint8ArrayUtils",kd);kd.concat=qd;kd.toHex=pd;kd.fromHex=od;kd.fromBase64=nd;kd.toBase64=md;kd.toStandardBase64=ld;function rd(){var a=this;this.A=Kc.get("muxjs")();this.g=new this.A.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(qd(b.initSegment,b.data))});this.g.on("done",function(){var b={data:qd.apply(kd,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}rd.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
113
- function sd(a,b){if(!Kc.get("muxjs")()||!td(a))return!1;if(b)return MediaSource.isTypeSupported(ud(b,a));var c=ud("audio",a),d=ud("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function td(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
114
- function ud(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 vd(a,b){a.l=!0;a.h=new Mc;a.m=[];a.j=[];a.i=[];var c=Fc(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new O(2,3,3018));return a.h};function wd(){}function xd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function yd(a,b,c){a=xd(a,b);if(td(a)){if(Kc.get("muxjs")())return ud(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
115
- function zd(a){var b=Ad(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
116
- case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function Bd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Ad(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}J("shaka.util.MimeUtils",wd);wd.getFullType=xd;
117
- (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Cd(a){this.j=null;this.i=a;this.C=!1;this.l=this.B=0;this.m=Infinity;this.h=this.g=null;this.F="";this.A=new Map}function Gd(a){return Hd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Cd.prototype.destroy=function(){this.i=this.j=null;this.A.clear();return Promise.resolve()};
118
- function Id(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g)return u(k,Promise.resolve(),2);if(!a.j||!a.i)return k["return"]();if(null==c||null==d)return a.j.parseInit(Fc(b)),k["return"]();e=a.C?c:a.B;f={periodStart:a.B,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.j.parseMedia(Fc(b),f);h=g.filter(function(l){return l.startTime>=a.l&&l.startTime<a.m});a.i.append(h);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);z(k)})}
119
- Cd.prototype.remove=function(a,b){var c=this;return I(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 Jd(a,b,c){a.l=b;a.m=c}function Kd(a,b,c){a.F=b;if(b=a.A.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)}
120
- function Ld(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 fc(c.startTime,c.endTime,c.text)});return b}function Md(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Md(a,d.value,c)}
121
- function Nd(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,[]);Md(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.F&&a.i.append([k]))}e=r(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.A.has(f)||a.A.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.A.get(f).set(h,k);a.g=null==a.g?Math.max(c,
122
- a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}J("shaka.text.TextEngine",Cd);Cd.prototype.destroy=Cd.prototype.destroy;Cd.findParser=function(a){return Hd[a]};Cd.unregisterParser=function(a){delete Hd[a]};Cd.registerParser=function(a,b){Hd[a]=b};var Hd={};function Od(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Pd(f,b,c);f=Qd(f,d);b=Rd(f);b=Sd(b);var g=Td(b,e);a.variants=a.variants.filter(function(h){return Ud(h)==g?!0:!1})}function Rd(a){var b=new cb;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Ud(c);b.push(d,c)}return b}
123
- function Sd(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}
124
- function Pd(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={Ud:d.Ud},e=b.next())if(d.Ud=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Ud)}}(d)),e.length){a=e;break}d={};c=r(c);for(b=c.next();!b.done;d={Gd:d.Gd},b=c.next())if(d.Gd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Gd)}}(d)),b.length){a=b;break}return a}
125
- function Td(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Vd||d==Wd){if(a=Xd(a,d),1==a.size())return a.keys()[0]}else if(d==Yd)break;return Zd(a)}function Xd(a,b){var c=0,d=new cb;db(a,function(e,f){for(var g=0,h=0,k=r(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
126
- function Zd(a){var b="",c=Infinity;db(a,function(d,e){for(var f=0,g=0,h=r(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Ud(a){var b="";a.video&&(b=zd(a.video.codecs));var c="";a.audio&&(c=zd(a.audio.codecs));return b+"-"+c}function $d(a,b,c){a.variants=a.variants.filter(function(d){return ae(d,b,c)})}
127
- function ae(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
128
- function be(a,b){return I(function(c){if(1==c.g)return u(c,ce(b,0<b.offlineSessionIds.length),2);de(a,b);ee(b);return u(c,fe(b),0)})}
129
- function ce(a,b){return I(function(c){if(1==c.g)return u(c,ge(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=he(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Eb("video",g);g=Eb("audio",g);g=yd(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=yd(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=ie(f.codecs),f=yd(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(Tc()&&e&&(e.width&&
130
- 1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Xa(je(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Xa(je(d));return e});z(c)})}
131
- function ge(a,b,c){var d,e,f,g,h,k,l,m,p,n,t;return I(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,x){var w;return I(function(D){if(1==D.g)return B(D,2),u(D,e.decodingInfo(x),4);if(2!=D.g)return w=D.h,y.decodingInfos.push(w),va(D,0);F(D);JSON.stringify(x);z(D)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=ke(l,b,c),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,f.push(g(l,t));return u(v,Promise.all(f),
94
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Vb(a){fb.call(this);this.j=Mb(a);this.i=new Map;this.g=new Set;this.h=new Map}qa(Vb,fb);q=Vb.prototype;q.release=function(){fb.prototype.release.call(this)};
95
+ q.cf=function(a){var b=this;this.g.clear();a=t(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Mb(c.value));Wb(this);a=jb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new L("unknown-locales",(new Map).set("locales",a)));a=jb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new L("locale-changed",a))};
96
+ q.ia=function(a,b,c){a=Mb(a);void 0===c&&(c=Xb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Xb||d.set(f,e)});this.h.set(a,d);Wb(this);this.dispatchEvent(new L("locale-updated"));return this};q.gh=function(a){for(var b=t(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 L("unknown-localization",a));return""};
97
+ function Wb(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=t(d),h=g.next();!h.done;f={Wb:f.Wb},h=g.next()){f.Wb=h.value;e.add(f.Wb);e.add(Rb(f.Wb));h=jb(b.keys(),function(l){return function(m){return Qb(m,l.Wb)}}(f));h.sort();var k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=jb(b.keys(),function(l){return function(m){return Rb(m)==l.Wb}}(f));h.sort();k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=t(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
98
+ c.reverse();a.i.clear();b=t(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=t(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,Yb(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new L("missing-localizations",d)))}function Yb(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}J("shaka.ui.Localization",Vb);Vb.prototype.resolve=Vb.prototype.resolve;
99
+ Vb.prototype.resolveDictionary=Vb.prototype.gh;Vb.prototype.insert=Vb.prototype.ia;Vb.prototype.changeLocale=Vb.prototype.cf;Vb.prototype.release=Vb.prototype.release;var Xb=1;Vb.ConflictResolution={USE_OLD:0,USE_NEW:Xb};Vb.UNKNOWN_LOCALES="unknown-locales";Vb.UNKNOWN_LOCALIZATION="unknown-localization";Vb.MISSING_LOCALIZATIONS="missing-localizations";Vb.LOCALE_CHANGED="locale-changed";Vb.LOCALE_UPDATED="locale-updated";var Zb={xi:"RESOLUTION",oi:"PAUSE",Ri:"UNMUTE",ii:"NOT_APPLICABLE",Si:"UNRECOGNIZED_LANGUAGE",ki:"ON",vh:"AD_DURATION",Xh:"LANGUAGE",Mh:"ENTER_PICTURE_IN_PICTURE",Lh:"ENTER_LOOP_MODE",Ci:"SKIP_AD",wi:"REPLAY",ci:"MULTIPLE_LANGUAGES",bi:"MORE_SETTINGS",Gh:"CAST",ri:"PLAY",Fi:"STATISTICS",pi:"PICTURE_IN_PICTURE",xh:"AIRPLAY",Xe:"LIVE",wh:"AD_TIME",Rf:"SUBTITLE_FORCED",Ah:"AUTO_QUALITY",Qi:"UNDETERMINED_LANGUAGE",Oh:"EXIT_FULL_SCREEN",Ph:"EXIT_LOOP_MODE",Bi:"SEEK",zi:"REWIND",di:"MUTE",Uh:"FULL_SCREEN",
100
+ ji:"OFF",Ui:"VOLUME",Th:"FAST_FORWARD",Di:"SKIP_TO_LIVE",AD_PROGRESS:"AD_PROGRESS",BACK:"BACK",Qh:"EXIT_PICTURE_IN_PICTURE",Yh:"LOOP",si:"PLAYBACK_RATE",Fh:"CAPTIONS",ti:"QUALITY"};function $b(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}$b.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function ac(a){return a.h/(1-Math.pow(a.g,a.i))};function bc(){this.h=new $b(2);this.j=new $b(5);this.g=0;this.i=128E3;this.l=16E3}bc.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};bc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};bc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(ac(this.h),ac(this.j))};function cc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function dc(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function ec(a,b,c){c||(c=cc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Md:d.Md},e=a.next()){d.Md=e.value;e=b.findIndex(function(f){return function(g){return c(f.Md,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
101
+ function fc(a,b,c){c||(c=cc);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 gc(a,b,c){this.startTime=a;this.direction=hc;this.endTime=b;this.payload=c;this.region=new ic;this.position=null;this.positionAlign=jc;this.size=0;this.textAlign=kc;this.writingMode=lc;this.lineInterpretation=mc;this.line=null;this.lineHeight="";this.lineAlign=nc;this.displayAlign=oc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=pc;this.fontStyle=qc;this.linePadding=this.letterSpacing=
102
+ this.fontFamily="";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}gc.prototype.clone=function(){var a=new gc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
103
+ function uc(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(!fc(a.nestedCues,b.nestedCues,uc))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(!fc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}J("shaka.text.Cue",gc);var jc="auto";
104
+ gc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:jc};var kc="center",vc={LEFT:"left",RIGHT:"right",CENTER:kc,START:"start",END:"end"};gc.textAlign=vc;var oc="after",wc={BEFORE:"before",CENTER:"center",AFTER:oc};gc.displayAlign=wc;var hc="ltr";gc.direction={HORIZONTAL_LEFT_TO_RIGHT:hc,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var lc="horizontal-tb";gc.writingMode={HORIZONTAL_TOP_TO_BOTTOM:lc,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var mc=0;
105
+ gc.lineInterpretation={LINE_NUMBER:mc,PERCENTAGE:1};var nc="start",xc={CENTER:"center",START:nc,END:"end"};gc.lineAlign=xc;var yc={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};gc.defaultTextColor=yc;var zc={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};gc.defaultTextBackgroundColor=zc;var pc=400;gc.fontWeight={NORMAL:pc,BOLD:700};
106
+ var qc="normal",Ac={NORMAL:qc,ITALIC:"italic",OBLIQUE:"oblique"};gc.fontStyle=Ac;gc.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function ic(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Bc;this.scroll=Cc}J("shaka.text.CueRegion",ic);var Bc=1;ic.units={PX:0,PERCENTAGE:Bc,LINES:2};var Cc="";ic.scrollMode={NONE:Cc,UP:"up"};function Dc(){}function Ec(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Fc(a)==Fc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Gc(a),d=Gc(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Fc(a){return a instanceof ArrayBuffer?a:a.buffer}function Hc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
107
+ function Gc(a,b,c){c=void 0===c?Infinity:c;return Ic(a,void 0===b?0:b,c,Uint8Array)}function Jc(a,b,c){c=void 0===c?Infinity:c;return Ic(a,void 0===b?0:b,c,DataView)}function Ic(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(Fc(a),b,Math.min(b+Math.max(c,0),e)-b)}J("shaka.util.BufferUtils",Dc);Dc.toDataView=Jc;Dc.toUint8=Gc;Dc.toArrayBuffer=Hc;Dc.equal=Ec;function Kc(){}J("shaka.dependencies",Kc);Kc.has=function(a){return Lc.has(a)};Kc.add=function(a,b){if(!Mc[a])throw Error(a+" is not supported");Lc.set(a,function(){return b})};var Mc={muxjs:"muxjs"};Kc.Allowed=Mc;var Lc=new Map([["muxjs",function(){return window.muxjs}]]);function Nc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Nc.prototype.resolve=function(){};Nc.prototype.reject=function(){};function Oc(a){this.h=a;this.g=void 0}Oc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Pc(a){this.h=a;this.g=null}Pc.prototype.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};Pc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function P(a){this.h=a;this.g=null}P.prototype.xa=function(){this.stop();this.h();return this};P.prototype.T=function(a){var b=this;this.stop();this.g=(new Pc(function(){b.h()})).T(a);return this};P.prototype.ka=function(a){var b=this;this.stop();this.g=(new Pc(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.ka;P.prototype.tickAfter=P.prototype.T;
108
+ P.prototype.tickNow=P.prototype.xa;function Rc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Sc(a){return""!=Tc().canPlayType(a)}function Uc(){return Vc("Xbox One")}function Wc(){return Vc("Tizen")}function Xc(){return Vc("Web0S")&&Vc("Chrome/38.0.2125.122 Safari/537.36")}function Yc(){return Vc("CrKey")}function Zc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Wc()&&!Vc("PC=EOS")&&!$c()}function $c(){return Vc("PlayStation 4")}
109
+ function ad(){if(!Zc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function Vc(a){return(navigator.userAgent||"").includes(a)}function Tc(){if(bd)return bd;cd||(cd=new P(function(){bd=null}));(bd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(bd=document.createElement("video"));cd.T(1);return bd}var cd=null,bd=null;function dd(){}function ed(a){if(!a)return"";a=Gc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!$c())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ta('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;a=fd(a);a=escape(a);try{return decodeURIComponent(a)}catch(b){throw new O(2,2,2004);}}
110
+ function gd(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new O(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Jc(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return fd(d)}
111
+ function hd(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Gc(a);if(239==c[0]&&187==c[1]&&191==c[2])return ed(c);if(254==c[0]&&255==c[1])return gd(c.subarray(2),!1);if(255==c[0]&&254==c[1])return gd(c.subarray(2),!0);if(0==c[0]&&0==c[2])return gd(a,!1);if(0==c[1]&&0==c[3])return gd(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return ed(a);throw new O(2,2,2003);}
112
+ function id(a){if(window.TextEncoder&&!$c()){var b=new TextEncoder;return Hc(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Hc(b)}function jd(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function fd(a){return kd.value()(a)}J("shaka.util.StringUtils",dd);dd.resetFromCharCode=function(){kd.g=void 0};dd.toUTF16=jd;dd.toUTF8=id;
113
+ dd.fromBytesAutoDetect=hd;dd.fromUTF16=gd;dd.fromUTF8=ed;var kd=new Oc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={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 ld(){}function md(a){a=fd(Gc(a));return btoa(a)}function nd(a,b){b=void 0==b?!0:b;var c=md(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function od(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function pd(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
114
+ function qd(a){var b=Gc(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function rd(){for(var a=Ha.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Gc(d),c),c+=d.byteLength;return b}J("shaka.util.Uint8ArrayUtils",ld);ld.concat=rd;ld.toHex=qd;ld.fromHex=pd;ld.fromBase64=od;ld.toBase64=nd;ld.toStandardBase64=md;function sd(){var a=this;this.A=Lc.get("muxjs")();this.g=new this.A.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(rd(b.initSegment,b.data))});this.g.on("done",function(){var b={data:rd.apply(ld,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}sd.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
115
+ function td(a,b){if(!Lc.get("muxjs")()||!ud(a))return!1;if(b)return MediaSource.isTypeSupported(vd(b,a));var c=vd("audio",a),d=vd("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function ud(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
116
+ function vd(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 wd(a,b){a.l=!0;a.h=new Nc;a.m=[];a.j=[];a.i=[];var c=Gc(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new O(2,3,3018));return a.h};function xd(){}function yd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function zd(a,b,c){a=yd(a,b);if(ud(a)){if(Lc.get("muxjs")())return vd(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
117
+ function Ad(a){var b=Bd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
118
+ case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function Fd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Bd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}J("shaka.util.MimeUtils",xd);xd.getFullType=yd;
119
+ (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Gd(a){this.j=null;this.i=a;this.C=!1;this.l=this.B=0;this.m=Infinity;this.h=this.g=null;this.F="";this.A=new Map}function Hd(a){return Id[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Gd.prototype.destroy=function(){this.i=this.j=null;this.A.clear();return Promise.resolve()};
120
+ function Jd(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g)return u(k,Promise.resolve(),2);if(!a.j||!a.i)return k["return"]();if(null==c||null==d)return a.j.parseInit(Gc(b)),k["return"]();e=a.C?c:a.B;f={periodStart:a.B,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.j.parseMedia(Gc(b),f);h=g.filter(function(l){return l.startTime>=a.l&&l.startTime<a.m});a.i.append(h);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);z(k)})}
121
+ Gd.prototype.remove=function(a,b){var c=this;return I(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 Kd(a,b,c){a.l=b;a.m=c}function Ld(a,b,c){a.F=b;if(b=a.A.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
122
+ function Md(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new gc(c.startTime,c.endTime,c.text)});return b}function Nd(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Nd(a,d.value,c)}
123
+ function Od(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Nd(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.F&&a.i.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.A.has(f)||a.A.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.A.get(f).set(h,k);a.g=null==a.g?Math.max(c,
124
+ a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}J("shaka.text.TextEngine",Gd);Gd.prototype.destroy=Gd.prototype.destroy;Gd.findParser=function(a){return Id[a]};Gd.unregisterParser=function(a){delete Id[a]};Gd.registerParser=function(a,b){Id[a]=b};var Id={};function Pd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Qd(f,b,c);f=Rd(f,d);b=Sd(f);b=Td(b);var g=Ud(b,e);a.variants=a.variants.filter(function(h){return Vd(h)==g?!0:!1})}function Sd(a){var b=new db;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Vd(c);b.push(d,c)}return b}
125
+ function Td(a){var b=0,c=new Map,d=a.size();eb(a,function(e,f){for(var g=t(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new db);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
126
+ function Qd(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={Xd:d.Xd},e=b.next())if(d.Xd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Xd)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={Jd:d.Jd},b=c.next())if(d.Jd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Jd)}}(d)),b.length){a=b;break}return a}
127
+ function Ud(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Wd||d==Xd){if(a=Yd(a,d),1==a.size())return a.keys()[0]}else if(d==Zd)break;return $d(a)}function Yd(a,b){var c=0,d=new db;eb(a,function(e,f){for(var g=0,h=0,k=t(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
128
+ function $d(a){var b="",c=Infinity;eb(a,function(d,e){for(var f=0,g=0,h=t(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Vd(a){var b="";a.video&&(b=Ad(a.video.codecs));var c="";a.audio&&(c=Ad(a.audio.codecs));return b+"-"+c}function ae(a,b,c){a.variants=a.variants.filter(function(d){return be(d,b,c)})}
129
+ function be(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;if(0!=a.disabledUntilTime){if(a.disabledUntilTime>Date.now()/1E3)return!1;a.disabledUntilTime=0}return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
130
+ function ce(a,b,c){var d=!1;a=t(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=be(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function de(a,b){return I(function(c){if(1==c.g)return u(c,ee(b,0<b.offlineSessionIds.length),2);fe(a,b);ge(b);return u(c,he(b),0)})}
131
+ function ee(a,b){return I(function(c){if(1==c.g)return u(c,ie(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=je(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Fb("video",g);g=Fb("audio",g);g=zd(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=zd(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=ke(f.codecs),f=zd(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(Uc()&&e&&(e.width&&
132
+ 1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Ya(le(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Ya(le(d));return e});z(c)})}
133
+ function ie(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return I(function(w){if(d=a.some(function(y){return y.decodingInfos.length}))return w["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,x){var v;return I(function(D){if(1==D.g)return A(D,2),u(D,e.decodingInfo(x),4);if(2!=D.g)return v=D.h,y.decodingInfos.push(v),va(D,0);F(D);JSON.stringify(x);z(D)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=me(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())r=p.value,f.push(g(l,r));return u(w,Promise.all(f),
132
134
  0)})}
133
- function ke(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Eb("video",g);f=he(f);g=Eb("audio",g);g=yd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=he(f);f=yd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
134
- break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=ie(d.codecs),f=yd(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
135
- f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var p=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=r(p);for(h=p.next();!h.done;h=p.next()){h=h.value;if(h.initData&&h.initData.length){for(var n=new Set,t=r(h.initData),v=t.next();!v.done;v=t.next())n.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
136
- (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function ie(a){return Vc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
137
- function he(a){return"vp9"==a?"vp09.00.10.08":a}function de(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!le(d,a.audio)||c&&a&&a.video&&!le(c,a.video)?!1:!0})}function ee(a){a.textStreams=a.textStreams.filter(function(b){return Gd(xd(b.mimeType,b.codecs))})}
138
- function fe(a){var b,c,d,e,f,g,h,k;return I(function(l){switch(l.g){case 1:b=[],c=r(a.imageStreams),d=c.next();case 2:if(d.done){l.D(4);break}e=d.value;f=e.mimeType;if(me.has(f)){l.D(5);break}g=ne.get(f);if(!g){me.set(f,!1);l.D(5);break}return u(l,oe(g),7);case 7:h=l.h,me.set(f,h);case 5:(k=me.get(f))&&b.push(e);d=c.next();l.D(2);break;case 4:a.imageStreams=b,z(l)}})}
139
- function oe(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)})["catch"](function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function le(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
140
- function pe(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var p=r(b.roles),n=p.next();!n.done;n=p.next())m.add(n.value);if(c)for(p=r(c.roles),n=p.next();!n.done;n=p.next())m.add(n.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
135
+ function me(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Fb("video",g);f=je(f);g=Fb("audio",g);g=zd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=je(f);f=zd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
136
+ break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=ke(d.codecs),f=zd(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
137
+ f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,r=t(h.initData),w=r.next();!w.done;w=r.next())p.add(w.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
138
+ (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function ke(a){return Wc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
139
+ function je(a){return"vp9"==a?"vp09.00.10.08":a}function fe(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!ne(d,a.audio)||c&&a&&a.video&&!ne(c,a.video)?!1:!0})}function ge(a){a.textStreams=a.textStreams.filter(function(b){return Hd(yd(b.mimeType,b.codecs))})}
140
+ function he(a){var b,c,d,e,f,g,h,k;return I(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.D(4);break}e=d.value;f=e.mimeType;if(oe.has(f)){l.D(5);break}g=pe.get(f);if(!g){oe.set(f,!1);l.D(5);break}return u(l,qe(g),7);case 7:h=l.h,oe.set(f,h);case 5:(k=oe.get(f))&&b.push(e);d=c.next();l.D(2);break;case 4:a.imageStreams=b,z(l)}})}
141
+ function qe(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)})["catch"](function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function ne(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
142
+ function re(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),p=n.next();!p.done;p=n.next())m.add(p.value);if(c)for(n=t(c.roles),p=n.next();!p.done;p=n.next())m.add(p.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
141
143
  kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:h.join(", "),audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,
142
144
  a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles);return a}
143
- function qe(a){return{id:a.id,active:!1,type:Hb,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
145
+ function se(a){return{id:a.id,active:!1,type:Ib,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
144
146
  originalAudioId:null,originalTextId:a.originalId,originalImageId:null}}
145
- function re(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],
146
- audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function se(a){a.__shaka_id||(a.__shaka_id=te++);return a.__shaka_id}
147
- function ue(a){var b=ve(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 we(a){var b=ve(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}
148
- function ve(a){return{id:se(a),active:!1,type:"",bandwidth:0,language:Lb(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
149
- originalTextId:null,originalImageId:null}}function xe(a){return a.allowedByApplication&&a.allowedByKeySystem}function ye(a){return a.filter(function(b){return xe(b)})}
150
- function Qd(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)))}
151
- function ze(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=Tb(Lb(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Lb(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=Ae(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(zb,[]);return a.length?
152
- Ae(e,a[0]):e}function Ae(a,b){return a.filter(function(c){return c.roles.includes(b)})}function je(a){var b=[];a.audio&&b.push(Be(a.audio));a.video&&b.push(Be(a.video));return b.join(", ")}
153
- function Be(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"}
154
- var te=0,Vd="smooth",Wd="powerEfficient",Yd="bandwidth",me=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),ne=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Ce(){var a=this;this.l=null;this.i=!1;this.h=new ac;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.i){a.h=new ac;a.g&&a.h.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.j=[];this.A=1;this.B=!1;this.g=this.m=null}q=Ce.prototype;q.stop=function(){this.l=null;this.i=!1;this.j=[];this.A=1;this.m=null};q.init=function(a){this.l=a};
155
- q.chooseVariant=function(){var a=De(this.g.restrictions,this.j),b=this.h.getBandwidthEstimate(Fe(this));this.j.length&&!a.length&&(a=De(null,this.j),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.A)?1:Math.abs(this.A),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.m=Date.now();return c};
156
- q.enable=function(){this.i=!0};q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.i)a:{if(!this.B){var c=this.h;if(!(c.g>=c.i))break a;this.B=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(Fe(this));c&&this.l(c)}};q.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(Fe(this))};q.setVariants=function(a){this.j=a};q.playbackRateChanged=function(a){this.A=a};
157
- q.configure=function(a){this.g=a;this.h&&this.g&&this.h.configure(this.g.advanced)};function Fe(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function De(a,b){a&&(b=b.filter(function(c){return ae(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}J("shaka.abr.SimpleAbrManager",Ce);Ce.prototype.configure=Ce.prototype.configure;
158
- Ce.prototype.playbackRateChanged=Ce.prototype.playbackRateChanged;Ce.prototype.setVariants=Ce.prototype.setVariants;Ce.prototype.getBandwidthEstimate=Ce.prototype.getBandwidthEstimate;Ce.prototype.segmentDownloaded=Ce.prototype.segmentDownloaded;Ce.prototype.disable=Ce.prototype.disable;Ce.prototype.enable=Ce.prototype.enable;Ce.prototype.chooseVariant=Ce.prototype.chooseVariant;Ce.prototype.init=Ce.prototype.init;Ce.prototype.stop=Ce.prototype.stop;function Ge(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)}Ge.prototype.add=function(a){return He(this.h,a)?(this.g.add(a),!0):!1};
159
- function He(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)&&Ie(c,d)&&Je(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(Ie(c,d)&&Je(c.roles,d.roles)));return c?!1:!0}Ge.prototype.values=function(){return this.g.values()};
160
- function Ie(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return Ad(f)[0]}),d=b.codecs.split(",").map(function(f){return Ad(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function Je(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 Ke(a){this.g=a;this.h=new Le(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Ke.prototype.create=function(a){var b=this,c=a.filter(function(d){return He(b.g,d)});return c.length?new Ge(c[0],c):this.h.create(a)};function Le(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
161
- Le.prototype.create=function(a){var b=[];b=Me(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Ne(b,this.j);a.length&&(b=a);this.g&&(a=Qd(b,this.g),a.length&&(b=a));this.h&&(a=Oe(b,this.h),a.length&&(b=a));a=new Ge(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,He(a.h,c)&&a.add(c);return a};function Me(a,b){var c=Lb(b),d=Tb(c,a.map(function(e){return Sb(e)}));return d?a.filter(function(e){return d==Sb(e)}):[]}
162
- function Ne(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Oe(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Pe(){this.g=Qe;this.h=(new Map).set(Qe,2).set(Re,1)}function Se(a,b,c){a.h.set(Qe,c).set(Re,b)}var Re=0,Qe=1;function Te(a,b){var c=Ue();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.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
163
- function Ve(a){var b,c;return I(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)).S(c/1E3)}),2)}a.h*=a.m;z(d)})}function Ue(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function We(a,b){this.promise=a;this.i=b;this.g=!1}function Xe(a){return new We(Promise.reject(a),function(){return Promise.resolve()})}function Ye(){var a=Promise.reject(new O(2,7,7001));a["catch"](function(){});return new We(a,function(){return Promise.resolve()})}function Ze(a){return new We(Promise.resolve(a),function(){return Promise.resolve()})}function $e(a){return new We(a,function(){return a["catch"](function(){})})}We.prototype.abort=function(){this.g=!0;return this.i()};
164
- function af(a){return new We(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}We.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
165
- We.prototype.na=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=bf(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Mc,g=new O(2,7,7001);this.promise.then(c(!0),c(!1));return new We(f,function(){return d()})};
166
- function bf(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",We);We.prototype.chain=We.prototype.na;We.prototype["finally"]=We.prototype["finally"];We.all=af;We.prototype.abort=We.prototype.abort;We.notAbortable=$e;We.completed=Ze;We.aborted=Ye;We.failed=Xe;function cf(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 df(a){var b={},c;for(c in a)b[c]=a[c];return b};function ef(){this.g=[]}function ff(a,b){a.g.push(b["finally"](function(){cc(a.g,b)}))}ef.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 gf(a,b,c){eb.call(this);this.i=!1;this.m=new ef;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.A=!1}qa(gf,eb);q=gf.prototype;q.Be=function(a){this.A=a};function hf(a,b,c,d){c=c||jf;var e=kf[a];if(!e||c>=e.priority)kf[a]={priority:c,Rg:b,Sg:void 0===d?!1:d}}q.Tg=function(a){this.g.add(a)};q.jh=function(a){this.g["delete"](a)};q.Tf=function(){this.g.clear()};q.Ug=function(a){this.h.add(a)};q.kh=function(a){this.h["delete"](a)};q.Uf=function(){this.h.clear()};
167
- function lf(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();eb.prototype.release.call(this);return this.m.destroy()};
168
- q.request=function(a,b){var c=this,d=new mf;if(this.i){var e=Promise.reject(new O(2,7,7001));e["catch"](function(){});return new nf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?cf(b.retryParameters):Ue();b.uris=cf(b.uris);e=of(this,a,b);var f=e.na(function(){return pf(c,a,b,new Te(b.retryParameters,!1),0,null,d)}),g=f.na(function(p){return qf(c,a,p)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
169
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.na(function(p){var n=Date.now()-l,t=p.response;t.timeMs+=k;t.timeMs+=n;p.Eg||!c.l||t.fromCache||a!=rf||c.l(t.timeMs,t.data.byteLength);return t},function(p){p&&(p.severity=2);throw p;});e=new nf(m.promise,function(){return m.abort()},d);ff(this.m,e);return e};
170
- function of(a,b,c){var d=Ze(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Pd:e.Pd},f=a.next())e.Pd=f.value,d=d.na(function(g){return function(){c.body&&(c.body=Gc(c.body));return g.Pd(b,c)}}(e));return d.na(void 0,function(g){if(g instanceof O&&7001==g.code)throw g;throw new O(2,1,1006,g);})}
171
- function pf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new kb(c.uris[e]),k=h.Va,l=!1;k||(k=location.protocol,k=k.slice(0,-1),lb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=kf[k])?k.Rg:null;if(!m)return Xe(new O(2,1,1E3,h));var p=k.Sg,n=null,t=null,v=!1,y=!1,x;return $e(Ve(d)).na(function(){if(a.i)return Ye();x=Date.now();var w=m(c.uris[e],c,b,function(A,G,E){n&&n.stop();t&&t.S(C/1E3);a.l&&b==rf&&(a.l(A,G),l=!0,g.g=E)},function(A){a.j&&a.j(A,c,b);y=!0});
172
- if(!p)return w;var D=c.retryParameters.connectionTimeout;D&&(n=new P(function(){v=!0;w.abort()}),n.S(D/1E3));var C=c.retryParameters.stallTimeout;C&&(t=new P(function(){v=!0;w.abort()}));return w}).na(function(w){n&&n.stop();t&&t.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-x);var D={response:w,Eg:l};!y&&a.j&&a.j(w.headers,c,b);return D},function(w){n&&n.stop();t&&t.stop();if(a.B){var D=null,C=0;w instanceof O&&(D=w,1001==w.code&&(C=w.data[1]));a.B(c,D,C,v)}if(a.i)return Ye();v&&(w=new O(1,1,1003,
173
- c.uris[e],b));if(w instanceof O){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return D=(new Map).set("error",w),D=new L("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,pf(a,b,c,d,e,w,g)}throw w;})}
174
- function qf(a,b,c){var d=Ze(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Qd:e.Qd},f=a.next())e.Qd=f.value,d=d.na(function(g){return function(){var h=c.response;h.data&&(h.data=Gc(h.data));return g.Qd(b,h)}}(e));return d.na(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",gf);gf.prototype.request=gf.prototype.request;gf.prototype.destroy=gf.prototype.destroy;gf.makeRequest=lf;
175
- gf.defaultRetryParameters=function(){return Ue()};gf.prototype.clearAllResponseFilters=gf.prototype.Uf;gf.prototype.unregisterResponseFilter=gf.prototype.kh;gf.prototype.registerResponseFilter=gf.prototype.Ug;gf.prototype.clearAllRequestFilters=gf.prototype.Tf;gf.prototype.unregisterRequestFilter=gf.prototype.jh;gf.prototype.registerRequestFilter=gf.prototype.Tg;gf.unregisterScheme=function(a){delete kf[a]};gf.registerScheme=hf;gf.prototype.setForceHTTPS=gf.prototype.Be;function mf(){this.g=0}
176
- gf.NumBytesRemainingClass=mf;function nf(a,b,c){We.call(this,a,b);this.h=c}qa(nf,We);gf.PendingRequest=nf;var rf=1;gf.RequestType={MANIFEST:0,SEGMENT:rf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var jf=3;gf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:jf};var kf={};function sf(a){this.g=!1;this.h=new Mc;this.i=a}sf.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 tf(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function uf(){this.g=new cb}q=uf.prototype;q.release=function(){this.Pc();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new vf(a,b,c,d),this.g.push(b,a))};q.Fa=function(a,b,c,d){function e(g){f.nc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.nc=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.nc(),this.g.remove(b,e))}};
177
- q.Pc=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.nc();this.g.g={}}};J("shaka.util.EventManager",uf);uf.prototype.removeAll=uf.prototype.Pc;uf.prototype.unlisten=uf.prototype.nc;uf.prototype.listenOnce=uf.prototype.Fa;uf.prototype.listen=uf.prototype.o;uf.prototype.release=uf.prototype.release;function vf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=wf(a,d);this.target.addEventListener(b,c,this.g)}
178
- vf.prototype.nc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function wf(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 xf(a)?b:b.capture||!1}
179
- function xf(a){var b=yf;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}yf=b}return b||!1}var yf=void 0;function zf(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 Af(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Bf(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 Cf(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.I=new Set;this.l=this.B=null;this.ba=this.$=!1;this.J=0;this.g=null;this.A=new uf;this.i=new Map;this.F=[];this.C=new Mc;this.h=null;this.m=function(d){c.C.reject(d);a.onError(d)};this.ea=new Map;this.ua=new Map;this.U=new P(function(){return Df(c)});this.N=!1;this.K=[];this.P=!1;this.aa=(new P(function(){Ef(c)})).ka(b);this.C["catch"](function(){});this.j=new sf(function(){return Ff(c)});this.X=!1;this.H=null}q=Cf.prototype;q.destroy=function(){return this.j.destroy()};
180
- function Ff(a){return I(function(b){switch(b.g){case 1:return a.A.release(),a.A=null,a.C.reject(),a.aa.stop(),a.aa=null,a.U.stop(),a.U=null,u(b,Gf(a),2);case 2:if(!a.l){b.D(3);break}B(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.I.clear(),a.B=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.X=!1,a.H=null,z(b)}})}q.configure=function(a){this.h=a};function Hf(a,b,c){a.ba=!0;a.F=[];a.N=c;return If(a,b)}
181
- function Jf(a,b,c){a.F=c;a.N=0<c.length;return If(a,b)}function Kf(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 Lf(a,g,[])}
182
- function If(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y;return I(function(x){if(1==x.g){if(c=Mf(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=zf(a.h.servers),Nf(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Of(l),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,Pf(t,zf(a.h.servers),zf(a.h.advanced||{}));return u(x,
183
- ge(b,a.N,a.X),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.$=!0,x["return"](Promise.resolve());y=Lf(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}function Qf(a){var b;return I(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c["return"]();if(!a.H){c.D(2);break}return u(c,a.H,3);case 3:return c["return"]();case 2:return B(c,4),a.H=a.l.setMediaKeys(a.B),u(c,a.H,6);case 6:va(c,5);break;case 4:b=F(c),a.m(new O(2,6,6003,b.message));case 5:tf(a.j),z(c)}})}
184
- function Rf(a,b){return I(function(c){if(1==c.g)return u(c,Qf(a),2);Sf(a,b.initDataType,Fc(b.initData));z(c)})}
185
- q.yc=function(a){var b=this,c;return I(function(d){if(1==d.g){if(!b.B)return b.A.Fa(a,"encrypted",function(){b.m(new O(2,6,6010))}),d["return"]();b.l=a;b.A.Fa(b.l,"play",function(){for(var e=r(b.K),f=e.next();!f.done;f=e.next())Tf(b,f.value);b.P=!0;b.K=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.A.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Gf(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||window.shakaMediaKeysPolyfill||b.F.length?u(d,
186
- Qf(b),2):d.D(2)}Uf(b);c||b.F.length||b.A.o(b.l,"encrypted",function(e){return Rf(b,e)});z(d)})};
187
- function Vf(a){var b,c,d,e,f;return I(function(g){switch(g.g){case 1:if(!a.B||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=lf([a.g.serverCertificateUri],a.h.retryParameters);B(g,3);c=a.G.Ob.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fc(d.data);va(g,4);break;case 3:throw e=F(g),new O(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
188
- B(g,6);return u(g,a.B.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=F(g),new O(2,6,6004,f.message);}})}function Wf(a,b){var c,d,e;return I(function(f){if(1==f.g)return u(f,Xf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.cb=new Mc,d.push(e.cb);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);z(f)})}
189
- function Uf(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Sf(a,d.initDataType,d.initData);c=r(a.F);for(d=c.next();!d.done;d=c.next())Xf(a,d.value);b.length||a.F.length||a.C.resolve();return a.C}function Sf(a,b,c){if(c.length){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Dc(c,e.value.initData)&&!Uc("Tizen 2"))return;Yf(a,b,c,a.g.sessionType)}}function Zf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
190
- function $f(a){a=a.i.keys();a=fb(a,function(b){return b.sessionId});return Array.from(a)}q.Dc=function(){var a=Infinity,b=this.i.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 Af(this.ua)};
191
- function Lf(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y;return I(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=ag(a,c,d);x.D(2);break}return u(x,bg(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new O(2,6,6001);tf(a.j);B(x,4);a.I.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())p=m.value,a.I.add(p.contentType.toLowerCase());n=r(k);for(m=n.next();!m.done;m=n.next())t=m.value,a.I.add(t.contentType.toLowerCase());if(c.length){var w=
192
- f.keySystem;var D=d.get(f.keySystem);var C=[],A=[],G=[],E=[],H=new Set;cg(D,C,G,A,E,H);var N=a.N?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:C[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||N,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:A[0],initData:E,keyIds:H};D=r(D);for(C=D.next();!C.done;C=
193
- D.next())C=C.value,C.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(w.persistentStateRequired=C.persistentStateRequired);D=w}else D=f.keySystem,w=b.get(f.keySystem),C=[],A=[],G=[],E=[],H=new Set,cg(w.drmInfos,C,G,A,E,H),D={keySystem:D,licenseServerUri:C[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
194
- w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:A[0],initData:E,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new O(2,6,6012,a.g.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,tf(a.j),a.B=v,a.$=!0,u(x,Vf(a),7);case 7:tf(a.j);va(x,0);break;case 4:y=F(x);tf(a.j,y);a.g=null;a.I.clear();if(y instanceof O)throw y;throw new O(2,6,6002,y.message);}})}
195
- function ag(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(Of(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.h.preferredKeySystems);for(e=a.next();!e.done;d={Nd:d.Nd},e=a.next())for(d.Nd=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==
196
- l.Nd}}(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}
197
- function bg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,x;return I(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.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.D(4);break}k=h.value;if(!b.has(k)){w.D(3);break}l=b.get(k);B(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
198
- w.h,w["return"](c);case 6:F(w);case 7:tf(a.j);case 3:h=g.next();w.D(2);break;case 4:m=r([!0,!1]),p=m.next();case 9:if(p.done){w.D(11);break}n=p.value;t=r(b.keys());h=t.next();case 12:if(h.done){p=m.next();w.D(9);break}v=h.value;y=b.get(v);x=y.drmInfos.some(function(D){return!!D.licenseServerUri});if(x!=n){w.D(13);break}B(w,15);return u(w,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=w.h,w["return"](c);case 15:F(w);case 16:tf(a.j);case 13:h=t.next();w.D(12);break;case 11:return w["return"](c)}})}
199
- function Mf(a){a=zf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=od(f),h=od(e);g={kty:"oct",kid:md(g,!1),k:md(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Fc(hd(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
147
+ function te(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],
148
+ audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function ue(a){a.__shaka_id||(a.__shaka_id=ve++);return a.__shaka_id}
149
+ function we(a){var b=xe(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 ye(a){var b=xe(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}
150
+ function xe(a){return{id:ue(a),active:!1,type:"",bandwidth:0,language:Mb(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
151
+ originalTextId:null,originalImageId:null}}function ze(a){return a.allowedByApplication&&a.allowedByKeySystem}function Ae(a){return a.filter(function(b){return ze(b)})}
152
+ function Rd(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ia(e))):d.get(Math.min.apply(Math,ia(c)))}
153
+ function Be(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=Ub(Mb(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Mb(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=Ce(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(Ab,[]);return a.length?
154
+ Ce(e,a[0]):e}function Ce(a,b){return a.filter(function(c){return c.roles.includes(b)})}function le(a){var b=[];a.audio&&b.push(Ee(a.audio));a.video&&b.push(Ee(a.video));return b.join(", ")}
155
+ function Ee(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"}
156
+ var ve=0,Wd="smooth",Xd="powerEfficient",Zd="bandwidth",oe=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),pe=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Fe(){var a=this;this.l=null;this.i=!1;this.h=new bc;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.i){a.h=new bc;a.g&&a.h.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.j=[];this.A=1;this.B=!1;this.g=this.m=null}q=Fe.prototype;q.stop=function(){this.l=null;this.i=!1;this.j=[];this.A=1;this.m=null};q.init=function(a){this.l=a};
157
+ q.chooseVariant=function(){var a=Ge(this.g.restrictions,this.j),b=this.h.getBandwidthEstimate(He(this));this.j.length&&!a.length&&(a=Ge(null,this.j),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.A)?1:Math.abs(this.A),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.m=Date.now();return c};
158
+ q.enable=function(){this.i=!0};q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.i)a:{if(!this.B){var c=this.h;if(!(c.g>=c.i))break a;this.B=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(He(this));c&&this.l(c)}};q.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(He(this))};q.setVariants=function(a){this.j=a};q.playbackRateChanged=function(a){this.A=a};
159
+ q.configure=function(a){this.g=a;this.h&&this.g&&this.h.configure(this.g.advanced)};function He(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function Ge(a,b){a&&(b=b.filter(function(c){return be(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}J("shaka.abr.SimpleAbrManager",Fe);Fe.prototype.configure=Fe.prototype.configure;
160
+ Fe.prototype.playbackRateChanged=Fe.prototype.playbackRateChanged;Fe.prototype.setVariants=Fe.prototype.setVariants;Fe.prototype.getBandwidthEstimate=Fe.prototype.getBandwidthEstimate;Fe.prototype.segmentDownloaded=Fe.prototype.segmentDownloaded;Fe.prototype.disable=Fe.prototype.disable;Fe.prototype.enable=Fe.prototype.enable;Fe.prototype.chooseVariant=Fe.prototype.chooseVariant;Fe.prototype.init=Fe.prototype.init;Fe.prototype.stop=Fe.prototype.stop;function Ie(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=t(b),d=c.next();!d.done;d=c.next())this.add(d.value)}Ie.prototype.add=function(a){return Je(this.h,a)?(this.g.add(a),!0):!1};
161
+ function Je(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)&&Ke(c,d)&&Le(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(Ke(c,d)&&Le(c.roles,d.roles)));return c?!1:!0}Ie.prototype.values=function(){return this.g.values()};
162
+ function Ke(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return Bd(f)[0]}),d=b.codecs.split(",").map(function(f){return Bd(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function Le(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=t(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function Me(a){this.g=a;this.h=new Ne(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Me.prototype.create=function(a){var b=this,c=a.filter(function(d){return Je(b.g,d)});return c.length?new Ie(c[0],c):this.h.create(a)};function Ne(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
163
+ Ne.prototype.create=function(a){var b=[];b=Oe(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Pe(b,this.j);a.length&&(b=a);this.g&&(a=Rd(b,this.g),a.length&&(b=a));this.h&&(a=Qe(b,this.h),a.length&&(b=a));a=new Ie(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,Je(a.h,c)&&a.add(c);return a};function Oe(a,b){var c=Mb(b),d=Ub(c,a.map(function(e){return Tb(e)}));return d?a.filter(function(e){return d==Tb(e)}):[]}
164
+ function Pe(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Qe(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Re(){this.g=Se;this.h=(new Map).set(Se,2).set(Te,1)}function Ue(a,b,c){a.h.set(Se,c).set(Te,b)}var Te=0,Se=1;function Ve(a,b){var c=We();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.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
165
+ function Xe(a){var b,c;return I(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.m;z(d)})}function We(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ye(a,b){this.promise=a;this.i=b;this.g=!1}function Ze(a){return new Ye(Promise.reject(a),function(){return Promise.resolve()})}function $e(){var a=Promise.reject(new O(2,7,7001));a["catch"](function(){});return new Ye(a,function(){return Promise.resolve()})}function af(a){return new Ye(Promise.resolve(a),function(){return Promise.resolve()})}function bf(a){return new Ye(a,function(){return a["catch"](function(){})})}Ye.prototype.abort=function(){this.g=!0;return this.i()};
166
+ function cf(a){return new Ye(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Ye.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
167
+ Ye.prototype.na=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=df(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Nc,g=new O(2,7,7001);this.promise.then(c(!0),c(!1));return new Ye(f,function(){return d()})};
168
+ function df(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",Ye);Ye.prototype.chain=Ye.prototype.na;Ye.prototype["finally"]=Ye.prototype["finally"];Ye.all=cf;Ye.prototype.abort=Ye.prototype.abort;Ye.notAbortable=bf;Ye.completed=af;Ye.aborted=$e;Ye.failed=Ze;function ef(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 ff(a){var b={},c;for(c in a)b[c]=a[c];return b};function gf(){this.g=[]}function hf(a,b){a.g.push(b["finally"](function(){dc(a.g,b)}))}gf.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function jf(a,b,c){fb.call(this);this.i=!1;this.m=new gf;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.A=!1}qa(jf,fb);q=jf.prototype;q.De=function(a){this.A=a};function kf(a,b,c,d){c=c||lf;var e=mf[a];if(!e||c>=e.priority)mf[a]={priority:c,Xg:b,Yg:void 0===d?!1:d}}q.Zg=function(a){this.g.add(a)};q.ph=function(a){this.g["delete"](a)};q.Zf=function(){this.g.clear()};q.$g=function(a){this.h.add(a)};q.qh=function(a){this.h["delete"](a)};q.$f=function(){this.h.clear()};
169
+ function nf(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();fb.prototype.release.call(this);return this.m.destroy()};
170
+ q.request=function(a,b){var c=this,d=new of;if(this.i){var e=Promise.reject(new O(2,7,7001));e["catch"](function(){});return new pf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?ef(b.retryParameters):We();b.uris=ef(b.uris);e=qf(this,a,b);var f=e.na(function(){return rf(c,a,b,new Ve(b.retryParameters,!1),0,null,d)}),g=f.na(function(n){return sf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
171
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.na(function(n){var p=Date.now()-l,r=n.response;r.timeMs+=k;r.timeMs+=p;n.Kg||!c.l||r.fromCache||a!=tf||c.l(r.timeMs,r.data.byteLength);return r},function(n){n&&(n.severity=2);throw n;});e=new pf(m.promise,function(){return m.abort()},d);hf(this.m,e);return e};
172
+ function qf(a,b,c){var d=af(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={Sd:e.Sd},f=a.next())e.Sd=f.value,d=d.na(function(g){return function(){c.body&&(c.body=Hc(c.body));return g.Sd(b,c)}}(e));return d.na(void 0,function(g){if(g instanceof O&&7001==g.code)throw g;throw new O(2,1,1006,g);})}
173
+ function rf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new lb(c.uris[e]),k=h.Wa,l=!1;k||(k=location.protocol,k=k.slice(0,-1),mb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=mf[k])?k.Xg:null;if(!m)return Ze(new O(2,1,1E3,h));var n=k.Yg,p=null,r=null,w=!1,y=!1,x;return bf(Xe(d)).na(function(){if(a.i)return $e();x=Date.now();var v=m(c.uris[e],c,b,function(B,G,E){p&&p.stop();r&&r.T(C/1E3);a.l&&b==tf&&(a.l(B,G),l=!0,g.g=E)},function(B){a.j&&a.j(B,c,b);y=!0});
174
+ if(!n)return v;var D=c.retryParameters.connectionTimeout;D&&(p=new P(function(){w=!0;v.abort()}),p.T(D/1E3));var C=c.retryParameters.stallTimeout;C&&(r=new P(function(){w=!0;v.abort()}));return v}).na(function(v){p&&p.stop();r&&r.stop();void 0==v.timeMs&&(v.timeMs=Date.now()-x);var D={response:v,Kg:l};!y&&a.j&&a.j(v.headers,c,b);return D},function(v){p&&p.stop();r&&r.stop();if(a.B){var D=null,C=0;v instanceof O&&(D=v,1001==v.code&&(C=v.data[1]));a.B(c,D,C,w)}if(a.i)return $e();w&&(v=new O(1,1,1003,
175
+ c.uris[e],b));if(v instanceof O){if(7001==v.code)throw v;if(1010==v.code)throw f;if(1==v.severity)return D=(new Map).set("error",v),D=new L("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,rf(a,b,c,d,e,v,g)}throw v;})}
176
+ function sf(a,b,c){var d=af(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={Td:e.Td},f=a.next())e.Td=f.value,d=d.na(function(g){return function(){var h=c.response;h.data&&(h.data=Hc(h.data));return g.Td(b,h)}}(e));return d.na(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",jf);jf.prototype.request=jf.prototype.request;jf.prototype.destroy=jf.prototype.destroy;jf.makeRequest=nf;
177
+ jf.defaultRetryParameters=function(){return We()};jf.prototype.clearAllResponseFilters=jf.prototype.$f;jf.prototype.unregisterResponseFilter=jf.prototype.qh;jf.prototype.registerResponseFilter=jf.prototype.$g;jf.prototype.clearAllRequestFilters=jf.prototype.Zf;jf.prototype.unregisterRequestFilter=jf.prototype.ph;jf.prototype.registerRequestFilter=jf.prototype.Zg;jf.unregisterScheme=function(a){delete mf[a]};jf.registerScheme=kf;jf.prototype.setForceHTTPS=jf.prototype.De;function of(){this.g=0}
178
+ jf.NumBytesRemainingClass=of;function pf(a,b,c){Ye.call(this,a,b);this.h=c}qa(pf,Ye);jf.PendingRequest=pf;var tf=1;jf.RequestType={MANIFEST:0,SEGMENT:tf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var lf=3;jf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:lf};var mf={};function uf(a){this.g=!1;this.h=new Nc;this.i=a}uf.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 vf(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function wf(){this.g=new db}q=wf.prototype;q.release=function(){this.Qc();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new xf(a,b,c,d),this.g.push(b,a))};q.Fa=function(a,b,c,d){function e(g){f.nc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.nc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.nc(),this.g.remove(b,e))}};
179
+ q.Qc=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.nc();this.g.g={}}};J("shaka.util.EventManager",wf);wf.prototype.removeAll=wf.prototype.Qc;wf.prototype.unlisten=wf.prototype.nc;wf.prototype.listenOnce=wf.prototype.Fa;wf.prototype.listen=wf.prototype.o;wf.prototype.release=wf.prototype.release;function xf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=yf(a,d);this.target.addEventListener(b,c,this.g)}
180
+ xf.prototype.nc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function yf(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 zf(a)?b:b.capture||!1}
181
+ function zf(a){var b=Af;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}Af=b}return b||!1}var Af=void 0;function Bf(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Cf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Df(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function Ef(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.I=new Set;this.l=this.B=null;this.ba=this.$=!1;this.J=0;this.g=null;this.A=new wf;this.i=new Map;this.F=[];this.C=new Nc;this.h=null;this.m=function(d){c.C.reject(d);a.onError(d)};this.ea=new Map;this.ua=new Map;this.S=new P(function(){return Ff(c)});this.N=!1;this.K=[];this.P=!1;this.aa=(new P(function(){Gf(c)})).ka(b);this.C["catch"](function(){});this.j=new uf(function(){return Hf(c)});this.X=!1;this.H=null}q=Ef.prototype;q.destroy=function(){return this.j.destroy()};
182
+ function Hf(a){return I(function(b){switch(b.g){case 1:return a.A.release(),a.A=null,a.C.reject(),a.aa.stop(),a.aa=null,a.S.stop(),a.S=null,u(b,If(a),2);case 2:if(!a.l){b.D(3);break}A(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.I.clear(),a.B=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.X=!1,a.H=null,z(b)}})}q.configure=function(a){this.h=a};function Jf(a,b,c){a.ba=!0;a.F=[];a.N=c;return Kf(a,b)}
183
+ function Lf(a,b,c){a.F=c;a.N=0<c.length;return Kf(a,b)}function Mf(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 Nf(a,g,[])}
184
+ function Kf(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,w,y;return I(function(x){if(1==x.g){if(c=Of(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(v){return v.video&&v.video.drmInfos.length||v.audio&&v.audio.drmInfos.length?!0:!1});g||(h=Bf(a.h.servers),Pf(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Qf(l),n=t(m),p=n.next();!p.done;p=n.next())r=p.value,Rf(r,Bf(a.h.servers),Bf(a.h.advanced||{}),a.h.keySystemsMapping);
185
+ return u(x,ie(b,a.N,a.X),2)}w=g||Object.keys(a.h.servers).length;if(!w)return a.$=!0,x["return"](Promise.resolve());y=Nf(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}function Sf(a){var b;return I(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c["return"]();if(!a.H){c.D(2);break}return u(c,a.H,3);case 3:return c["return"]();case 2:return A(c,4),a.H=a.l.setMediaKeys(a.B),u(c,a.H,6);case 6:va(c,5);break;case 4:b=F(c),a.m(new O(2,6,6003,b.message));case 5:vf(a.j),z(c)}})}
186
+ function Tf(a,b){return I(function(c){if(1==c.g)return u(c,Sf(a),2);Uf(a,b.initDataType,Gc(b.initData));z(c)})}
187
+ q.yc=function(a){var b=this,c;return I(function(d){if(1==d.g){if(!b.B)return b.A.Fa(a,"encrypted",function(){b.m(new O(2,6,6010))}),d["return"]();b.l=a;b.A.Fa(b.l,"play",function(){for(var e=t(b.K),f=e.next();!f.done;f=e.next())Vf(b,f.value);b.P=!0;b.K=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.A.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return If(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||window.shakaMediaKeysPolyfill||b.F.length?u(d,
188
+ Sf(b),2):d.D(2)}Wf(b);c||b.F.length||b.A.o(b.l,"encrypted",function(e){return Tf(b,e)});z(d)})};
189
+ function Xf(a){var b,c,d,e,f;return I(function(g){switch(g.g){case 1:if(!a.B||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=nf([a.g.serverCertificateUri],a.h.retryParameters);A(g,3);c=a.G.Ob.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Gc(d.data);va(g,4);break;case 3:throw e=F(g),new O(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
190
+ A(g,6);return u(g,a.B.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=F(g),new O(2,6,6004,f.message);}})}function Yf(a,b){var c,d,e;return I(function(f){if(1==f.g)return u(f,Zf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.cb=new Nc,d.push(e.cb);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);z(f)})}
191
+ function Wf(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,Uf(a,d.initDataType,d.initData);c=t(a.F);for(d=c.next();!d.done;d=c.next())Zf(a,d.value);b.length||a.F.length||a.C.resolve();return a.C}function Uf(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Ec(c,e.value.initData)&&!Vc("Tizen 2"))return;$f(a,b,c,a.g.sessionType)}}function ag(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
192
+ function bg(a){a=a.i.keys();a=gb(a,function(b){return b.sessionId});return Array.from(a)}q.Dc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.kd=function(){return Cf(this.ua)};
193
+ function Nf(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,w,y;return I(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=cg(a,c,d);x.D(2);break}return u(x,dg(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new O(2,6,6001);vf(a.j);A(x,4);a.I.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.I.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())r=m.value,a.I.add(r.contentType.toLowerCase());if(c.length){var v=
194
+ f.keySystem;var D=d.get(f.keySystem);var C=[],B=[],G=[],E=[],H=new Set;eg(D,C,G,B,E,H);var N=a.N?"persistent-license":"temporary";v={keySystem:v,licenseServerUri:C[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||N,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:B[0],initData:E,keyIds:H};D=t(D);for(C=D.next();!C.done;C=
195
+ D.next())C=C.value,C.distinctiveIdentifierRequired&&(v.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(v.persistentStateRequired=C.persistentStateRequired);D=v}else D=f.keySystem,v=b.get(f.keySystem),C=[],B=[],G=[],E=[],H=new Set,eg(v.drmInfos,C,G,B,E,H),D={keySystem:D,licenseServerUri:C[0],distinctiveIdentifierRequired:"required"==v.distinctiveIdentifier,persistentStateRequired:"required"==v.persistentState,sessionType:v.sessionTypes[0]||"temporary",audioRobustness:(v.audioCapabilities?
196
+ v.audioCapabilities[0].robustness:"")||"",videoRobustness:(v.videoCapabilities?v.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:B[0],initData:E,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new O(2,6,6012,a.g.keySystem);return u(x,f.createMediaKeys(),6);case 6:return w=x.h,vf(a.j),a.B=w,a.$=!0,u(x,Xf(a),7);case 7:vf(a.j);va(x,0);break;case 4:y=F(x);vf(a.j,y);a.g=null;a.I.clear();if(y instanceof O)throw y;throw new O(2,6,6002,y.message);}})}
197
+ function cg(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Qf(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=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Qd:d.Qd},e=a.next())for(d.Qd=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
198
+ l.Qd}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
199
+ function dg(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,w,y,x;return I(function(v){switch(v.g){case 1:if(1==b.size&&b.has(""))throw new O(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){v.D(4);break}k=h.value;if(!b.has(k)){v.D(3);break}l=b.get(k);A(v,6);return u(v,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
200
+ v.h,v["return"](c);case 6:F(v);case 7:vf(a.j);case 3:h=g.next();v.D(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){v.D(11);break}p=n.value;r=t(b.keys());h=r.next();case 12:if(h.done){n=m.next();v.D(9);break}w=h.value;y=b.get(w);x=y.drmInfos.some(function(D){return!!D.licenseServerUri});if(x!=p){v.D(13);break}A(v,15);return u(v,navigator.requestMediaKeySystemAccess(w,[y]),17);case 17:return c=v.h,v["return"](c);case 15:F(v);case 16:vf(a.j);case 13:h=r.next();v.D(12);break;case 11:return v["return"](c)}})}
201
+ function Of(a){a=Bf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=pd(f),h=pd(e);g={kty:"oct",kid:nd(g,!1),k:nd(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Gc(id(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
200
202
  serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
201
- function Xf(a,b){var c,d,e,f,g;return I(function(h){switch(h.g){case 1:try{c=a.B.createSession("persistent-license")}catch(k){return d=new O(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.A.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.K.push(k):Tf(a,k)});a.A.o(c,"keystatuseschange",function(k){return dg(a,k)});e={initData:null,initDataType:null,loaded:!1,ke:Infinity,cb:null,type:"persistent-license"};a.i.set(c,e);B(h,2);return u(h,c.load(b),4);
202
- case 4:f=h.h;tf(a.j);if(!f)return a.i["delete"](c),a.m(new O(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;eg(a)&&a.C.resolve();return h["return"](c);case 2:g=F(h),tf(a.j,g),a.i["delete"](c),a.m(new O(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
203
- function Yf(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.m(new O(2,6,6005,f.message));return}a.A.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.K.push(f):Tf(a,f)});a.A.o(e,"keystatuseschange",function(f){return dg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,ke:Infinity,cb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof O||(b=new O(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&md(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
203
+ function Zf(a,b){var c,d,e,f,g;return I(function(h){switch(h.g){case 1:try{c=a.B.createSession("persistent-license")}catch(k){return d=new O(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.A.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.K.push(k):Vf(a,k)});a.A.o(c,"keystatuseschange",function(k){return fg(a,k)});e={initData:null,initDataType:null,loaded:!1,oe:Infinity,cb:null,type:"persistent-license"};a.i.set(c,e);A(h,2);return u(h,c.load(b),4);
204
+ case 4:f=h.h;vf(a.j);if(!f)return a.i["delete"](c),a.m(new O(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;gg(a)&&a.C.resolve();return h["return"](c);case 2:g=F(h),vf(a.j,g),a.i["delete"](c),a.m(new O(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
205
+ function $f(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.m(new O(2,6,6005,f.message));return}a.A.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.K.push(f):Vf(a,f)});a.A.o(e,"keystatuseschange",function(f){return fg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,oe:Infinity,cb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof O||(b=new O(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&nd(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
204
206
  var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new O(2,6,6006,f.message,f,h))}})}
205
- function Tf(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y;I(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&md(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=lf([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,g.drmInfo=a.g,d&&(g.initData=d.initData,g.initDataType=d.initDataType),
206
- Zf(a.g.keySystem)&&fg(g),h=Date.now(),B(x,2),l=a.G.Ob.request(2,g),u(x,l.promise,4);case 4:k=x.h;va(x,3);break;case 2:return m=F(x),p=new O(2,6,6007,m),a.m(p),d&&d.cb&&d.cb.reject(p),x["return"]();case 3:if(a.j.g)return x["return"]();a.J+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&md(k.data);B(x,5);return u(x,c.update(k.data),7);case 7:va(x,6);break;case 5:return n=F(x),t=new O(2,6,6008,n.message),a.m(t),d&&d.cb&&d.cb.reject(t),x["return"]();case 6:if(a.j.g)return x["return"]();v=new L("drmsessionupdate");
207
- a.G.onEvent(v);d&&(d.cb&&d.cb.resolve(),y=new P(function(){d.loaded=!0;eg(a)&&a.C.resolve()}),y.S(gg));z(x)}})}
208
- function fg(a){var b=fd(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=nd(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
209
- function dg(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Zf(a.g.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Ic(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),p=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,p,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=pd(h);a.ea.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.cb&&(a.i["delete"](c),c.close()["catch"](function(){}));
210
- eg(a)&&(a.C.resolve(),a.U.S(hg))}function Df(a){var b=a.ea,c=a.ua;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new O(2,6,6014));a.G.ud(Af(c))}
211
- function ig(){var a,b,c,d,e,f,g,h;return I(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,
212
- c],f=new Map,g=function(l){var m,p,n;return I(function(t){switch(t.g){case 1:B(t,2);if("org.w3.clearkey"===l&&$c())throw Error("Unsupported keySystem");return u(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,Uc("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),u(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:F(t),f.set(l,null),z(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](Af(f))})}
213
- function jg(a){var b;return I(function(c){if(1==c.g)return b=new Promise(function(d,e){(new P(e)).S(mg)}),B(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);F(c);z(c)})}
214
- function Gf(a){var b;return I(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return I(function(g){if(1==g.g)return B(g,2),a.ba||a.F.includes(e.sessionId)||"persistent-license"!==f.type?u(g,jg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);z(g)})})),0)})}
215
- function ng(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={Ta:f.Ta},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ta=[];f.Ta=f.Ta.concat(e.initData||[]);f.Ta=f.Ta.concat(h.initData||[]);f.Ta=f.Ta.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ta.findIndex(function(p){return p.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
207
+ function Vf(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,w,y;I(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&nd(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=nf([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,g.drmInfo=a.g,d&&(g.initData=d.initData,g.initDataType=d.initDataType),
208
+ ag(a.g.keySystem)&&hg(g),h=Date.now(),A(x,2),l=a.G.Ob.request(2,g),u(x,l.promise,4);case 4:k=x.h;va(x,3);break;case 2:return m=F(x),n=new O(2,6,6007,m),a.m(n),d&&d.cb&&d.cb.reject(n),x["return"]();case 3:if(a.j.g)return x["return"]();a.J+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&nd(k.data);A(x,5);return u(x,c.update(k.data),7);case 7:va(x,6);break;case 5:return p=F(x),r=new O(2,6,6008,p.message),a.m(r),d&&d.cb&&d.cb.reject(r),x["return"]();case 6:if(a.j.g)return x["return"]();w=new L("drmsessionupdate");
209
+ a.G.onEvent(w);d&&(d.cb&&d.cb.resolve(),y=new P(function(){d.loaded=!0;gg(a)&&a.C.resolve()}),y.T(ig));z(x)}})}
210
+ function hg(a){var b=gd(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=od(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
211
+ function fg(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(ag(a.g.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Jc(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=qd(h);a.ea.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.cb&&(a.i["delete"](c),c.close()["catch"](function(){}));
212
+ gg(a)&&(a.C.resolve(),a.S.T(lg))}function Ff(a){var b=a.ea,c=a.ua;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new O(2,6,6014));a.G.wd(Cf(c))}
213
+ function mg(){var a,b,c,d,e,f,g,h;return I(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,
214
+ c],f=new Map,g=function(l){var m,n,p;return I(function(r){switch(r.g){case 1:A(r,2);if("org.w3.clearkey"===l&&ad())throw Error("Unsupported keySystem");return u(r,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=r.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Vc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(r,m.createMediaKeys(),5);case 5:va(r,0);break;case 2:F(r),f.set(l,null),z(r)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](Cf(f))})}
215
+ function ng(a){var b;return I(function(c){if(1==c.g)return b=new Promise(function(d,e){(new P(e)).T(og)}),A(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);F(c);z(c)})}
216
+ function If(a){var b;return I(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return I(function(g){if(1==g.g)return A(g,2),a.ba||a.F.includes(e.sessionId)||"persistent-license"!==f.type?u(g,ng(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);z(g)})})),0)})}
217
+ function pg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={Ua:f.Ua},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ua=[];f.Ua=f.Ua.concat(e.initData||[]);f.Ua=f.Ua.concat(h.initData||[]);f.Ua=f.Ua.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ua.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
216
218
  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,
217
- initData:f.Ta,keyIds:g});break}}return c}function Of(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Ef(a){a.i.forEach(function(b,c){var d=b.ke,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.ke=e)})}function eg(a){a=a.i.values();return gb(a,function(b){return b.loaded})}
218
- function Nf(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)}
219
- function cg(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Ha:g.Ha},h=a.next()){g.Ha=h.value;b.includes(g.Ha.licenseServerUri)||b.push(g.Ha.licenseServerUri);d.includes(g.Ha.serverCertificateUri)||d.push(g.Ha.serverCertificateUri);g.Ha.serverCertificate&&(c.some(function(m){return function(p){return Dc(p,m.Ha.serverCertificate)}}(g))||c.push(g.Ha.serverCertificate));if(g.Ha.initData){h={};for(var k=r(g.Ha.initData),l=k.next();!l.done;h={Wc:h.Wc},l=k.next())h.Wc=l.value,e.some(function(m){return function(p){var n=
220
- m.Wc;return p.keyId&&p.keyId==n.keyId?!0:p.initDataType==n.initDataType&&Dc(p.initData,n.initData)}}(h))||e.push(h.Wc)}if(g.Ha.keyIds)for(h=r(g.Ha.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
221
- function Pf(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||
222
- (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 mg=1,gg=5,hg=.5,og=new Nc(function(){return Gc(new Uint8Array([0]))});function pg(){}function qg(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g){if(d&&(e=rg[d.toLowerCase()]))return k["return"](e);if(f=sg(a))if(g=tg[f])return k["return"](g);return d?k.D(2):u(k,ug(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=rg[d]))return k["return"](h);throw new O(2,4,4E3,a);})}
223
- function ug(a,b,c){var d,e,f;return I(function(g){if(1==g.g)return d=lf([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 sg(a){a=(new kb(a)).Ka.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}J("shaka.media.ManifestParser",pg);pg.unregisterParserByMime=function(a){delete rg[a]};pg.registerParserByMime=function(a,b){rg[a]=b};
224
- pg.registerParserByExtension=function(a,b){tg[a]=b};var rg={},tg={};function vg(a,b){this.W=Ic(a);this.h=b==wg;this.g=0}q=vg.prototype;q.Da=function(){return this.g<this.W.byteLength};q.oa=function(){return this.g};q.kg=function(){return this.W.byteLength};q.pb=function(){try{var a=this.W.getUint8(this.g);this.g+=1;return a}catch(b){throw xg();}};q.pe=function(){try{var a=this.W.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw xg();}};q.R=function(){try{var a=this.W.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw xg();}};
225
- q.xf=function(){try{var a=this.W.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw xg();}};q.lc=function(){try{if(this.h){var a=this.W.getUint32(this.g,!0);var b=this.W.getUint32(this.g+4,!0)}else b=this.W.getUint32(this.g,!1),a=this.W.getUint32(this.g+4,!1)}catch(c){throw xg();}if(2097151<b)throw new O(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Cb=function(a){if(this.g+a>this.W.byteLength)throw xg();var b=Fc(this.W,this.g,a);this.g+=a;return b};
226
- q.skip=function(a){if(this.g+a>this.W.byteLength)throw xg();this.g+=a};q.ah=function(a){if(this.g<a)throw xg();this.g-=a};q.seek=function(a){if(0>a||a>this.W.byteLength)throw xg();this.g=a};q.Oc=function(){for(var a=this.g;this.Da()&&0!=this.W.getUint8(this.g);)this.g+=1;a=Fc(this.W,a,this.g-a);this.g+=1;return dd(a)};function xg(){return new O(2,3,3E3)}J("shaka.util.DataViewReader",vg);vg.prototype.readTerminatedString=vg.prototype.Oc;vg.prototype.seek=vg.prototype.seek;vg.prototype.rewind=vg.prototype.ah;
227
- vg.prototype.skip=vg.prototype.skip;vg.prototype.readBytes=vg.prototype.Cb;vg.prototype.readUint64=vg.prototype.lc;vg.prototype.readInt32=vg.prototype.xf;vg.prototype.readUint32=vg.prototype.R;vg.prototype.readUint16=vg.prototype.pe;vg.prototype.readUint8=vg.prototype.pb;vg.prototype.getLength=vg.prototype.kg;vg.prototype.getPosition=vg.prototype.oa;vg.prototype.hasMoreData=vg.prototype.Da;var wg=1;vg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:wg};function yg(){this.i=[];this.h=[];this.g=!1}q=yg.prototype;q.box=function(a,b){var c=zg(a);this.i[c]=Ag;this.h[c]=b;return this};q.Y=function(a,b){var c=zg(a);this.i[c]=Bg;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new vg(a,0);for(this.g=!1;a.Da()&&!this.g;)this.wd(0,a,b,c)};
228
- q.wd=function(a,b,c,d){var e=b.oa();if(d&&e+8>b.W.byteLength)this.g=!0;else{var f=b.R(),g=b.R(),h=!1;switch(f){case 0:f=b.W.byteLength-e;break;case 1:if(d&&b.oa()+8>b.W.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]==Bg){if(d&&b.oa()+4>b.W.byteLength){this.g=!0;return}m=b.R();l=m>>>24;m&=16777215}g=e+f;c&&g>b.W.byteLength&&(g=b.W.byteLength);d&&g>b.W.byteLength?this.g=!0:(d=g-b.oa(),b=0<d?b.Cb(d):new Uint8Array(0),b=new vg(b,0),k({parser:this,partialOkay:c||
229
- !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.oa(),b.W.byteLength-b.oa()))}};function Cg(a){for(var b=Dg(a);a.reader.Da()&&!a.parser.g;)a.parser.wd(a.start+b,a.reader,a.partialOkay)}function Eg(a){for(var b=Dg(a),c=a.reader.R(),d=0;d<c&&(a.parser.wd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Fg(a){return function(b){a(b.reader.Cb(b.reader.W.byteLength-b.reader.oa()))}}
230
- function zg(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 Gg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Dg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}J("shaka.util.Mp4Parser",yg);yg.headerSize=Dg;yg.typeToString=Gg;yg.allData=Fg;yg.sampleDescription=Eg;yg.children=Cg;yg.prototype.parseNext=yg.prototype.wd;yg.prototype.parse=yg.prototype.parse;yg.prototype.stop=yg.prototype.stop;
231
- yg.prototype.fullBox=yg.prototype.Y;yg.prototype.box=yg.prototype.box;var Ag=0,Bg=1;function Hg(a){function b(){d=!0}function c(l){f.push(l);Cg(l)}a=Fc(a);var d=!1,e,f=[],g=[];(new yg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).Y("stsd",function(l){e=l;f.push(l);Eg(l)}).Y("encv",b).Y("enca",b).Y("avc1",function(l){g.push({box:l,Mc:1701733238})}).Y("avc3",function(l){g.push({box:l,Mc:1701733238})}).Y("ac-3",function(l){g.push({box:l,Mc:1701733217})}).Y("ec-3",function(l){g.push({box:l,Mc:1701733217})}).Y("mp4a",function(l){g.push({box:l,Mc:1701733217})}).parse(a);
232
- if(d)return a;if(0==g.length||!e)throw Za(pd(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=Ig(a,e,k.box,f,k.Mc);return a}
233
- function Ig(a,b,c,d,e){var f=Jg.value(),g=a.subarray(c.start,c.start+c.size),h=Ic(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Ic(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Kg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Tc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,Kg(e,d.start,d.size+k.byteLength);k=Ic(e,b.start);b=Dg(b);a=k.getUint32(b);
234
- k.setUint32(b,a+1);return e}function Kg(a,b,c){a=Ic(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 Jg=new Nc(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 Lg(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",p=Mg(d,e,h,k,l,m);f<=g;f++){for(var n=c[f],t=-1,v=-1,y=0;y<n.length;y++)if(null!=n[y]&&""!==n[y].g.trim()){t=y;break}for(y=n.length-1;0<=y;y--)if(null!=n[y]&&""!==n[y].g.trim()){v=y;break}if(-1===
235
- t||-1===v)n=Ng(d,e),a.nestedCues.push(n);else{for(;t<=v;t++)if(y=n[t]){var x=y.l,w=y.i,D=y.j,C=y.h;if(x!=h||w!=k||D!=l||C!=m)p.payload&&a.nestedCues.push(p),p=Mg(d,e,x,w,D,C),h=x,k=w,l=D,m=C;p.payload+=y.g}else p.payload+=" ";p.payload&&a.nestedCues.push(p);f!==g&&(p=Ng(d,e),a.nestedCues.push(p));p=Mg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
236
- function Mg(a,b,c,d,e,f){a=new fc(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Ng(a,b){var c=new fc(a,b,"");c.lineBreak=!0;return c}function Og(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Pg(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.B=b;this.j=this.m=!1;this.l="white";this.A="black";Qg(this)}function Rg(a,b,c){return Lg(new fc(b,c,""),"CC"+(a.C<<1|a.B+1),a.i,b,c)}function Qg(a){Sg(a,0,15);a.g=1}function Tg(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Ug:d=Vg.has(c)?Vg.get(c):String.fromCharCode(c);break;case Wg:d=Xg.get(c);break;case Yg:a.i[a.g].pop();d=Zg.get(c);break;case $g:a.i[a.g].pop(),d=ah.get(c)}d&&a.i[a.g].push(new Og(d,a.m,a.j,a.A,a.l))}}
237
- function bh(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Sg(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
238
- var Ug=0,Wg=1,Yg=2,$g=3,Vg=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Xg=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Zg=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
239
- [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"]]),ah=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
240
- [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 ch(a,b){this.h=dh;this.A=new Pg(a,b);this.i=new Pg(a,b);this.l=new Pg(a,b);this.g=this.i;this.j=0;this.m=null}function eh(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==fh&&a.h!==gh&&(e=Rg(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Sg(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Sg(c,0,15),d.g=15);a.h=fh;d.h=b;return e}function hh(a){a.h=ih;a.g=a.l;a.g.h=0}function jh(a){Ua("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.A;a.h=gh}
241
- var dh=0,ih=1,fh=3,gh=4,kh="black green blue cyan red yellow magenta black".split(" "),lh="white green blue cyan red yellow magenta white_italics".split(" ");function mh(){this.l=!1;this.F=this.H=0;this.G=nh;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.m="black";oh(this)}function oh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(ph())}function ph(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function qh(a,b){rh(a)&&(a.i[a.h][a.g]=new Og(b,a.C,a.A,a.m,a.B),a.g++)}function rh(a){var b=a.g<a.F&&0<=a.g;return a.h<a.H&&0<=a.h&&b}mh.prototype.isVisible=function(){return this.l};
242
- function sh(a,b,c){var d=new fc(a.j,b,"");d.textAlign=a.G===th?"left":a.G===uh?"right":jc;if(c=Lg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var th=0,uh=1,nh=2;function vh(){this.i=[];this.h=null;this.g=0}function wh(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 xh(a.h)),a.h=null,a.g=0))}function xh(a){this.g=0;this.h=a}xh.prototype.Da=function(){return this.g<this.h.length};xh.prototype.oa=function(){return this.g};function yh(a){if(!a.Da())throw new O(2,2,3E3);return a.h[a.g++]}xh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new O(2,2,3E3);this.g+=a};function zh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
243
- function Ah(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=yh(b).value;b=null;c=r(Bh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=sh(e,d,a.i)),oh(e);return b}if(137===c)for(b=yh(b).value,b=r(Bh(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=yh(b).value;b=null;c=r(Bh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=sh(e,d,a.i)),e.l=!1;return b}if(139===c){c=yh(b).value;
244
- b=null;c=r(Bh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=sh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=yh(b).value,Ch(a,b,d);if(143===c)return d=Ch(a,255,d),Dh(a),d;if(144===c)b.skip(1),d=yh(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=yh(b).value,c=yh(b).value,b.skip(1),a.g&&(b=Eh((c&48)>>4,(c&12)>>2,c&3),a.g.B=Eh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=yh(b).value,b=yh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
245
- b.skip(1),d=yh(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new mh;f.j=d;a.h[c]=f}d=yh(b).value;yh(b);yh(b);f=yh(b).value;var g=yh(b).value;b=yh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.H=(f&15)+1;b.F=(g&63)+1;a.g=a.h[c]}}}return null}function Bh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
246
- function Ch(a,b,c){var d=null;b=r(Bh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=sh(f,c,a.i));a.h[e]=null}return d}function Dh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Eh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Fh[a<<2|b<<1|c]}
247
- var Gh=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"]]),Fh="black blue green cyan red magenta yellow white".split(" ");function Hh(){this.h=[];this.g=[];this.i=new vh;this.l=0;this.B=new Map([["CC1",new ch(0,0)],["CC2",new ch(0,1)],["CC3",new ch(1,0)],["CC4",new ch(1,1)]]);this.A=this.m=0;this.j=new Map;Ih(this)}function Ih(a){a.m=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.m=null,Qg(b.i),Qg(b.l),Qg(b.A)}
248
- function Jh(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=Kh(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())wh(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=Lh(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
249
- function Kh(a,b){var c=b.type;if(16===(b.Oa&112)){var d=b.Oa>>3&1;0===c?a.m=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.m)+1));if(255===b.Oa&&255===b.jb||!b.Oa&&!b.jb||!Mh(b.Oa)||!Mh(b.jb))return 45<=++a.l&&Ih(a),null;a.l=0;b.Oa&=127;b.jb&=127;if(!b.Oa&&!b.jb)return null;d=null;if(16===(b.Oa&112))a:{var e=b.Oa;d=b.jb;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=lh[f]:7===f&&(h=!0);
250
- d=1===(d&1);if(c.h!==gh){f=c.g;if(c.h===fh&&e!==f.g){var k=1+e-f.h;bh(f,k,1+f.g-f.h,f.h);Sg(f,0,k-1);Sg(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.A="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Tg(c.g,Ug,32),g=!1,e=lh[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=kh[(d&14)>>1]),c.g.A=g;else if(17===(e&247)&&48===(d&240))Tg(c.g,Wg,d);else if(18===
251
- (e&246)&&32===(d&224))Tg(c.g,e&1?$g:Yg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.jb){case 32:hh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=eh(c,2,d);break;case 38:e=eh(c,3,d);break;case 39:e=eh(c,4,d);break;case 40:Tg(c.g,Ug,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Qg(c.A);jh(c);break;case 43:jh(c);break;case 44:e=c.i;g=null;c.h!==gh&&(g=Rg(e,c.j,d));Sg(e,0,15);e=g;break;case 45:e=c.g;c.h!==fh?e=null:(g=Rg(e,c.j,d),h=e.g-e.h+1,bh(e,h-1,h,e.h),Sg(e,
252
- 0,h-1),Sg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Sg(c.l,0,15);break;case 47:e=null,c.h!==gh&&(e=Rg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,hh(c),c.j=d}d=e;break a}d=null}else e=b.jb,Tg(c.g,Ug,b.Oa),Tg(c.g,Ug,e);return d}
253
- function Lh(a,b){var c=[];try{for(;b.Da();){var d=yh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=yh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new zh(e));for(var g=a.j.get(e),h=b.oa();b.oa()-h<f;){e=b;var k=yh(e),l=k.value,m=k.pts;if(16===l){var p=yh(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!rh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.F-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=sh(t,n,g.i));if(t.h+1>=t.H){n=t;for(var v=0,y=1;15>y;y++,
254
- v++)n.i[v]=n.i[y];for(y=0;1>y;y++,v++)n.i[v]=ph()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=sh(t,n,g.i));t.i[t.h]=ph();t.g=0;break;case 12:t.isVisible()&&(e=sh(t,n,g.i)),oh(t),n=t,n.h=0,n.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Ah(g,e,l,m);else{if(4096<=l&&4127>=l)n=l&255,8<=n&&15>=n?e.skip(1):16<=n&&23>=n?e.skip(2):24<=n&&31>=n&&e.skip(3);else if(4224<=l&&4255>=l)n=l&255,128<=n&&135>=n?e.skip(4):136<=n&&143>=n&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?qh(g.g,"\u266a"):qh(g.g,
255
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&qh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Gh.has(e)){var w=Gh.get(e);qh(g.g,w)}else qh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?qh(g.g,"_"):qh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(D){if(D instanceof O&&3E3===D.code)Ua("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Mh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Nh(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,ef:c,Wf:d}}function Oh(a,b){return{Ue:1==b?a.lc():a.R()}}function Ph(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.R()}}
256
- function Qh(a,b,c){var d=a.R(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={ue:null,sampleSize:null,zd:null};c&256&&(g.ue=a.R());c&512&&(g.sampleSize=a.R());c&1024&&a.skip(4);c&2048&&(g.zd=0==b?a.R():a.xf());e.push(g)}return{Ri:d,zf:e}};function Rh(){this.i=new Map;this.h=this.g=0}
257
- Rh.prototype.init=function(a){var b=this,c=[],d=[];(new yg).box("moov",Cg).box("mvex",Cg).Y("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",Cg).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.R();c.push(e)}).box("mdia",Cg).Y("mdhd",function(e){e=Ph(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])})};
258
- Rh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new yg).box("moof",Cg).box("traf",Cg).Y("trun",function(k){f=Qh(k.reader,k.version,k.flags).zf}).Y("tfhd",function(k){k=Nh(k.reader,k.flags);d=k.ef||b.g;e=k.Wf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).Y("tfdt",function(k){g=Oh(k.reader,k.version).Ue}).box("mdat",function(k){if(null===g)throw new O(2,2,2010);k=k.reader;var l=g,m=h,p=d,n=e,t=f,v=0,y=n;for(t.length&&(y=t[0].sampleSize||n);k.Da();){var x=k.R();if(6==
259
- (k.pb()&31)){var w=0;t.length>v&&(w=t[v].zd||0);w=(l+w)/m;for(var D=[],C,A=k.Cb(x-1),G=C=0;G<A.length;)2==C&&3==A[G]?(C=0,A=[].concat(ia(A)),A.splice(G,1),A=new Uint8Array(A)):0==A[G]?C++:C=0,G++;C=A;for(G=0;G<C.length;){for(A=0;255==C[G];)A+=255,G++;A+=C[G++];for(var E=0;255==C[G];)E+=255,G++;E+=C[G++];4==A&&D.push(C.subarray(G,G+E));G+=E}D=r(D);for(C=D.next();!C.done;C=D.next())c.push({Qg:C.value,pts:w})}else try{k.skip(x-1)}catch(H){break}y-=x+4;0==y&&(l=t.length>v?l+(t[v].ue||p):l+p,v++,y=t.length>
260
- v?t[v].sampleSize||n:n)}}).parse(a,!1);return c};function Sh(){this.h=new Rh;this.g=new Hh}Sh.prototype.init=function(a){this.h.init(a)};
261
- function Th(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=Fc(e.Qg);if(0<f.length&&(d=a.g,e=e.pts,f=new vg(f,0),181===f.pb()&&49===f.pe()&&1195456820===f.R()&&3===f.pb())){var g=f.pb();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.pb(),l=(k&4)>>2,m=f.pb(),p=f.pb();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Oa:m,jb:p,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:p,order:d.g.length})))}}}}return Jh(a.g)}
262
- ;function Uh(a,b,c,d){this.Pa=a;this.Sa=b;this.Ca=c;this.fe=void 0===d?null:d}Uh.prototype.Gc=function(){return this.Sa};Uh.prototype.Cc=function(){return this.Ca};function Vh(a,b){return a&&b?a.Gc()==b.Gc()&&a.Cc()==b.Cc()&&ec(a.Pa(),b.Pa()):a==b}J("shaka.media.InitSegmentReference",Uh);Uh.prototype.getEndByte=Uh.prototype.Cc;Uh.prototype.getStartByte=Uh.prototype.Gc;
263
- function Wh(a,b,c,d,e,f,g,h,k,l,m,p,n,t){l=void 0===l?[]:l;t=void 0===t?Xh:t;this.startTime=a;this.j=this.endTime=b;this.m=c;this.Sa=d;this.Ca=e;this.i=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.l=void 0===p?null:p;this.g=void 0===n?null:n;this.status=t}q=Wh.prototype;q.Pa=function(){return this.m()};q.getStartTime=function(){return this.startTime};q.ig=function(){return this.endTime};q.Gc=function(){return this.Sa};
264
- q.Cc=function(){return this.Ca};q.Bg=function(){return this.tilesLayout};q.Ag=function(){return this.l};q.Wd=function(){return this.status};q.Kg=function(){this.status=Yh};J("shaka.media.SegmentReference",Wh);Wh.prototype.markAsUnavailable=Wh.prototype.Kg;Wh.prototype.getStatus=Wh.prototype.Wd;Wh.prototype.getTileDuration=Wh.prototype.Ag;Wh.prototype.getTilesLayout=Wh.prototype.Bg;Wh.prototype.getEndByte=Wh.prototype.Cc;Wh.prototype.getStartByte=Wh.prototype.Gc;Wh.prototype.getEndTime=Wh.prototype.ig;
265
- Wh.prototype.getStartTime=Wh.prototype.getStartTime;Wh.prototype.getUris=Wh.prototype.Pa;var Xh=0,Yh=1;Wh.Status={uh:Xh,Hi:Yh,Uh:2};function Zh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function $h(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ai(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
266
- function bi(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(ci(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}function di(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=ci(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function ci(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function ei(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.N={};this.K={};this.g=null;this.H=!1;this.U=d||function(){};this.i={};this.A=new uf;this.C={};this.F=b;this.I=new Mc;this.l=fi(this,this.I);this.G=new sf(function(){return gi(e)});this.J="";this.B=!1;this.P=new Mc}function fi(a,b){var c=new MediaSource;a.A.Fa(c,"sourceopen",function(){URL.revokeObjectURL(a.J);b.resolve()});a.J=hi(c);a.j.src=a.J;return c}q=ei.prototype;q.destroy=function(){return this.G.destroy()};
267
- function gi(a){var b,c,d,e,f,g,h,k;return I(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Ab)),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.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.C)b.push(a.C[k].destroy());return u(l,Promise.all(b),2)}a.A&&(a.A.release(),a.A=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.l=null;a.g=null;a.m=null;a.h={};a.C={};a.F=null;a.i=
219
+ initData:f.Ua,keyIds:g});break}}return c}function Qf(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Gf(a){a.i.forEach(function(b,c){var d=b.oe,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.oe=e)})}function gg(a){a=a.i.values();return hb(a,function(b){return b.loaded})}
220
+ function Pf(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=t(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
221
+ function eg(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={Ha:g.Ha},h=a.next()){g.Ha=h.value;b.includes(g.Ha.licenseServerUri)||b.push(g.Ha.licenseServerUri);d.includes(g.Ha.serverCertificateUri)||d.push(g.Ha.serverCertificateUri);g.Ha.serverCertificate&&(c.some(function(m){return function(n){return Ec(n,m.Ha.serverCertificate)}}(g))||c.push(g.Ha.serverCertificate));if(g.Ha.initData){h={};for(var k=t(g.Ha.initData),l=k.next();!l.done;h={Xc:h.Xc},l=k.next())h.Xc=l.value,e.some(function(m){return function(n){var p=
222
+ m.Xc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Ec(n.initData,p.initData)}}(h))||e.push(h.Xc)}if(g.Ha.keyIds)for(h=t(g.Ha.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
223
+ function Rf(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))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||(a.serverCertificate=
224
+ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var og=1,ig=5,lg=.5,qg=new Oc(function(){return Hc(new Uint8Array([0]))});function rg(){}function sg(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g){if(d&&(e=tg[d.toLowerCase()]))return k["return"](e);if(f=ug(a))if(g=vg[f])return k["return"](g);return d?k.D(2):u(k,wg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=tg[d]))return k["return"](h);throw new O(2,4,4E3,a);})}
225
+ function wg(a,b,c){var d,e,f;return I(function(g){if(1==g.g)return d=nf([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 ug(a){a=(new lb(a)).Ka.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}J("shaka.media.ManifestParser",rg);rg.unregisterParserByMime=function(a){delete tg[a]};rg.registerParserByMime=function(a,b){tg[a]=b};
226
+ rg.registerParserByExtension=function(a,b){vg[a]=b};var tg={},vg={};function xg(a,b){this.W=Jc(a);this.h=b==yg;this.g=0}q=xg.prototype;q.Da=function(){return this.g<this.W.byteLength};q.oa=function(){return this.g};q.qg=function(){return this.W.byteLength};q.qb=function(){try{var a=this.W.getUint8(this.g);this.g+=1;return a}catch(b){throw zg();}};q.re=function(){try{var a=this.W.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw zg();}};q.R=function(){try{var a=this.W.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw zg();}};
227
+ q.Cf=function(){try{var a=this.W.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw zg();}};q.lc=function(){try{if(this.h){var a=this.W.getUint32(this.g,!0);var b=this.W.getUint32(this.g+4,!0)}else b=this.W.getUint32(this.g,!1),a=this.W.getUint32(this.g+4,!1)}catch(c){throw zg();}if(2097151<b)throw new O(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Cb=function(a){if(this.g+a>this.W.byteLength)throw zg();var b=Gc(this.W,this.g,a);this.g+=a;return b};
228
+ q.skip=function(a){if(this.g+a>this.W.byteLength)throw zg();this.g+=a};q.hh=function(a){if(this.g<a)throw zg();this.g-=a};q.seek=function(a){if(0>a||a>this.W.byteLength)throw zg();this.g=a};q.Pc=function(){for(var a=this.g;this.Da()&&0!=this.W.getUint8(this.g);)this.g+=1;a=Gc(this.W,a,this.g-a);this.g+=1;return ed(a)};function zg(){return new O(2,3,3E3)}J("shaka.util.DataViewReader",xg);xg.prototype.readTerminatedString=xg.prototype.Pc;xg.prototype.seek=xg.prototype.seek;xg.prototype.rewind=xg.prototype.hh;
229
+ xg.prototype.skip=xg.prototype.skip;xg.prototype.readBytes=xg.prototype.Cb;xg.prototype.readUint64=xg.prototype.lc;xg.prototype.readInt32=xg.prototype.Cf;xg.prototype.readUint32=xg.prototype.R;xg.prototype.readUint16=xg.prototype.re;xg.prototype.readUint8=xg.prototype.qb;xg.prototype.getLength=xg.prototype.qg;xg.prototype.getPosition=xg.prototype.oa;xg.prototype.hasMoreData=xg.prototype.Da;var yg=1;xg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:yg};function Ag(){this.i=[];this.h=[];this.g=!1}q=Ag.prototype;q.box=function(a,b){var c=Bg(a);this.i[c]=Cg;this.h[c]=b;return this};q.Y=function(a,b){var c=Bg(a);this.i[c]=Dg;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new xg(a,0);for(this.g=!1;a.Da()&&!this.g;)this.yd(0,a,b,c)};
230
+ q.yd=function(a,b,c,d){var e=b.oa();if(d&&e+8>b.W.byteLength)this.g=!0;else{var f=b.R(),g=b.R(),h=!1;switch(f){case 0:f=b.W.byteLength-e;break;case 1:if(d&&b.oa()+8>b.W.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]==Dg){if(d&&b.oa()+4>b.W.byteLength){this.g=!0;return}m=b.R();l=m>>>24;m&=16777215}g=e+f;c&&g>b.W.byteLength&&(g=b.W.byteLength);d&&g>b.W.byteLength?this.g=!0:(d=g-b.oa(),b=0<d?b.Cb(d):new Uint8Array(0),b=new xg(b,0),k({parser:this,partialOkay:c||
231
+ !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.oa(),b.W.byteLength-b.oa()))}};function Eg(a){for(var b=Fg(a);a.reader.Da()&&!a.parser.g;)a.parser.yd(a.start+b,a.reader,a.partialOkay)}function Gg(a){for(var b=Fg(a),c=a.reader.R(),d=0;d<c&&(a.parser.yd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Hg(a){return function(b){a(b.reader.Cb(b.reader.W.byteLength-b.reader.oa()))}}
232
+ function Bg(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Ig(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Fg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}J("shaka.util.Mp4Parser",Ag);Ag.headerSize=Fg;Ag.typeToString=Ig;Ag.allData=Hg;Ag.sampleDescription=Gg;Ag.children=Eg;Ag.prototype.parseNext=Ag.prototype.yd;Ag.prototype.parse=Ag.prototype.parse;Ag.prototype.stop=Ag.prototype.stop;
233
+ Ag.prototype.fullBox=Ag.prototype.Y;Ag.prototype.box=Ag.prototype.box;var Cg=0,Dg=1;function Jg(a){function b(){d=!0}function c(l){f.push(l);Eg(l)}a=Gc(a);var d=!1,e,f=[],g=[];(new Ag).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).Y("stsd",function(l){e=l;f.push(l);Gg(l)}).Y("encv",b).Y("enca",b).Y("avc1",function(l){g.push({box:l,Nc:1701733238})}).Y("avc3",function(l){g.push({box:l,Nc:1701733238})}).Y("ac-3",function(l){g.push({box:l,Nc:1701733217})}).Y("ec-3",function(l){g.push({box:l,Nc:1701733217})}).Y("mp4a",function(l){g.push({box:l,Nc:1701733217})}).parse(a);
234
+ if(d)return a;if(0==g.length||!e)throw $a(qd(a)),new O(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=Kg(a,e,k.box,f,k.Nc);return a}
235
+ function Kg(a,b,c,d,e){var f=Lg.value(),g=a.subarray(c.start,c.start+c.size),h=Jc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Jc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Mg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Uc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Mg(e,d.start,d.size+k.byteLength);k=Jc(e,b.start);b=Fg(b);a=k.getUint32(b);
236
+ k.setUint32(b,a+1);return e}function Mg(a,b,c){a=Jc(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 Lg=new Oc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Ng(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=Og(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,w=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){r=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){w=y;break}if(-1===
237
+ r||-1===w)p=Pg(d,e),a.nestedCues.push(p);else{for(;r<=w;r++)if(y=p[r]){var x=y.l,v=y.i,D=y.j,C=y.h;if(x!=h||v!=k||D!=l||C!=m)n.payload&&a.nestedCues.push(n),n=Og(d,e,x,v,D,C),h=x,k=v,l=D,m=C;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Pg(d,e),a.nestedCues.push(n));n=Og(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
238
+ function Og(a,b,c,d,e,f){a=new gc(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Pg(a,b){var c=new gc(a,b,"");c.lineBreak=!0;return c}function Qg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Rg(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.B=b;this.j=this.m=!1;this.l="white";this.A="black";Sg(this)}function Tg(a,b,c){return Ng(new gc(b,c,""),"CC"+(a.C<<1|a.B+1),a.i,b,c)}function Sg(a){Ug(a,0,15);a.g=1}function Vg(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Wg:d=Xg.has(c)?Xg.get(c):String.fromCharCode(c);break;case Yg:d=Zg.get(c);break;case $g:a.i[a.g].pop();d=ah.get(c);break;case bh:a.i[a.g].pop(),d=ch.get(c)}d&&a.i[a.g].push(new Qg(d,a.m,a.j,a.A,a.l))}}
239
+ function dh(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Ug(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
240
+ var Wg=0,Yg=1,$g=2,bh=3,Xg=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Zg=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),ah=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
241
+ [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"]]),ch=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
242
+ [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 eh(a,b){this.h=fh;this.A=new Rg(a,b);this.i=new Rg(a,b);this.l=new Rg(a,b);this.g=this.i;this.j=0;this.m=null}function gh(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==hh&&a.h!==ih&&(e=Tg(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Ug(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Ug(c,0,15),d.g=15);a.h=hh;d.h=b;return e}function jh(a){a.h=kh;a.g=a.l;a.g.h=0}function lh(a){Va("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.A;a.h=ih}
243
+ var fh=0,kh=1,hh=3,ih=4,mh="black green blue cyan red yellow magenta black".split(" "),nh="white green blue cyan red yellow magenta white_italics".split(" ");function oh(){this.l=!1;this.F=this.H=0;this.G=ph;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.m="black";qh(this)}function qh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(rh())}function rh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function sh(a,b){th(a)&&(a.i[a.h][a.g]=new Qg(b,a.C,a.A,a.m,a.B),a.g++)}function th(a){var b=a.g<a.F&&0<=a.g;return a.h<a.H&&0<=a.h&&b}oh.prototype.isVisible=function(){return this.l};
244
+ function uh(a,b,c){var d=new gc(a.j,b,"");d.textAlign=a.G===vh?"left":a.G===wh?"right":kc;if(c=Ng(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var vh=0,wh=1,ph=2;function xh(){this.i=[];this.h=null;this.g=0}function yh(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 zh(a.h)),a.h=null,a.g=0))}function zh(a){this.g=0;this.h=a}zh.prototype.Da=function(){return this.g<this.h.length};zh.prototype.oa=function(){return this.g};function Ah(a){if(!a.Da())throw new O(2,2,3E3);return a.h[a.g++]}zh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new O(2,2,3E3);this.g+=a};function Bh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
245
+ function Ch(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=Ah(b).value;b=null;c=t(Dh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=uh(e,d,a.i)),qh(e);return b}if(137===c)for(b=Ah(b).value,b=t(Dh(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=Ah(b).value;b=null;c=t(Dh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=uh(e,d,a.i)),e.l=!1;return b}if(139===c){c=Ah(b).value;
246
+ b=null;c=t(Dh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=uh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Ah(b).value,Eh(a,b,d);if(143===c)return d=Eh(a,255,d),Fh(a),d;if(144===c)b.skip(1),d=Ah(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Ah(b).value,c=Ah(b).value,b.skip(1),a.g&&(b=Gh((c&48)>>4,(c&12)>>2,c&3),a.g.B=Gh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Ah(b).value,b=Ah(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
247
+ b.skip(1),d=Ah(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new oh;f.j=d;a.h[c]=f}d=Ah(b).value;Ah(b);Ah(b);f=Ah(b).value;var g=Ah(b).value;b=Ah(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.H=(f&15)+1;b.F=(g&63)+1;a.g=a.h[c]}}}return null}function Dh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
248
+ function Eh(a,b,c){var d=null;b=t(Dh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=uh(f,c,a.i));a.h[e]=null}return d}function Fh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Gh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Hh[a<<2|b<<1|c]}
249
+ var Ih=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"]]),Hh="black blue green cyan red magenta yellow white".split(" ");function Jh(){this.h=[];this.g=[];this.i=new xh;this.l=0;this.B=new Map([["CC1",new eh(0,0)],["CC2",new eh(0,1)],["CC3",new eh(1,0)],["CC4",new eh(1,1)]]);this.A=this.m=0;this.j=new Map;Kh(this)}function Kh(a){a.m=0;a.A=0;a=t(a.B.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Sg(b.i),Sg(b.l),Sg(b.A)}
250
+ function Lh(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=t(a.h),e=d.next();!e.done;e=d.next())(e=Mh(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())yh(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=Nh(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
251
+ function Mh(a,b){var c=b.type;if(16===(b.Oa&112)){var d=b.Oa>>3&1;0===c?a.m=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.m)+1));if(255===b.Oa&&255===b.jb||!b.Oa&&!b.jb||!Oh(b.Oa)||!Oh(b.jb))return 45<=++a.l&&Kh(a),null;a.l=0;b.Oa&=127;b.jb&=127;if(!b.Oa&&!b.jb)return null;d=null;if(16===(b.Oa&112))a:{var e=b.Oa;d=b.jb;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=nh[f]:7===f&&(h=!0);
252
+ d=1===(d&1);if(c.h!==ih){f=c.g;if(c.h===hh&&e!==f.g){var k=1+e-f.h;dh(f,k,1+f.g-f.h,f.h);Ug(f,0,k-1);Ug(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.A="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Vg(c.g,Wg,32),g=!1,e=nh[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=mh[(d&14)>>1]),c.g.A=g;else if(17===(e&247)&&48===(d&240))Vg(c.g,Yg,d);else if(18===
253
+ (e&246)&&32===(d&224))Vg(c.g,e&1?bh:$g,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.jb){case 32:jh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=gh(c,2,d);break;case 38:e=gh(c,3,d);break;case 39:e=gh(c,4,d);break;case 40:Vg(c.g,Wg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Sg(c.A);lh(c);break;case 43:lh(c);break;case 44:e=c.i;g=null;c.h!==ih&&(g=Tg(e,c.j,d));Ug(e,0,15);e=g;break;case 45:e=c.g;c.h!==hh?e=null:(g=Tg(e,c.j,d),h=e.g-e.h+1,dh(e,h-1,h,e.h),Ug(e,
254
+ 0,h-1),Ug(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Ug(c.l,0,15);break;case 47:e=null,c.h!==ih&&(e=Tg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,jh(c),c.j=d}d=e;break a}d=null}else e=b.jb,Vg(c.g,Wg,b.Oa),Vg(c.g,Wg,e);return d}
255
+ function Nh(a,b){var c=[];try{for(;b.Da();){var d=Ah(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Ah(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Bh(e));for(var g=a.j.get(e),h=b.oa();b.oa()-h<f;){e=b;var k=Ah(e),l=k.value,m=k.pts;if(16===l){var n=Ah(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var r=g.g;e=null;switch(l){case 8:!th(r)||0>=r.g&&0>=r.h||(0>=r.g?(r.g=r.F-1,r.h--):r.g--,r.i[r.h][r.g]=null);break;case 13:r.isVisible()&&(e=uh(r,p,g.i));if(r.h+1>=r.H){p=r;for(var w=0,y=1;15>y;y++,
256
+ w++)p.i[w]=p.i[y];for(y=0;1>y;y++,w++)p.i[w]=rh()}else r.h++;r.g=0;break;case 14:r.isVisible()&&(e=uh(r,p,g.i));r.i[r.h]=rh();r.g=0;break;case 12:r.isVisible()&&(e=uh(r,p,g.i)),qh(r),p=r,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Ch(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?sh(g.g,"\u266a"):sh(g.g,
257
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&sh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Ih.has(e)){var v=Ih.get(e);sh(g.g,v)}else sh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?sh(g.g,"_"):sh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(D){if(D instanceof O&&3E3===D.code)Va("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Oh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Ph(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,kf:c,cg:d}}function Qh(a,b){return{Ye:1==b?a.lc():a.R()}}function Rh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.R()}}
258
+ function Sh(a,b,c){var d=a.R(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={we:null,sampleSize:null,Dd:null};c&256&&(g.we=a.R());c&512&&(g.sampleSize=a.R());c&1024&&a.skip(4);c&2048&&(g.Dd=0==b?a.R():a.Cf());e.push(g)}return{Zi:d,Ef:e}};function Th(){this.i=new Map;this.h=this.g=0}
259
+ Th.prototype.init=function(a){var b=this,c=[],d=[];(new Ag).box("moov",Eg).box("mvex",Eg).Y("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",Eg).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.R();c.push(e)}).box("mdia",Eg).Y("mdhd",function(e){e=Rh(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])})};
260
+ Th.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Ag).box("moof",Eg).box("traf",Eg).Y("trun",function(k){f=Sh(k.reader,k.version,k.flags).Ef}).Y("tfhd",function(k){k=Ph(k.reader,k.flags);d=k.kf||b.g;e=k.cg||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).Y("tfdt",function(k){g=Qh(k.reader,k.version).Ye}).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,r=f,w=0,y=p;for(r.length&&(y=r[0].sampleSize||p);k.Da();){var x=k.R();if(6==
261
+ (k.qb()&31)){var v=0;r.length>w&&(v=r[w].Dd||0);v=(l+v)/m;for(var D=[],C,B=k.Cb(x-1),G=C=0;G<B.length;)2==C&&3==B[G]?(C=0,B=[].concat(ia(B)),B.splice(G,1),B=new Uint8Array(B)):0==B[G]?C++:C=0,G++;C=B;for(G=0;G<C.length;){for(B=0;255==C[G];)B+=255,G++;B+=C[G++];for(var E=0;255==C[G];)E+=255,G++;E+=C[G++];4==B&&D.push(C.subarray(G,G+E));G+=E}D=t(D);for(C=D.next();!C.done;C=D.next())c.push({Wg:C.value,pts:v})}else try{k.skip(x-1)}catch(H){break}y-=x+4;0==y&&(l=r.length>w?l+(r[w].we||n):l+n,w++,y=r.length>
262
+ w?r[w].sampleSize||p:p)}}).parse(a,!1);return c};function Uh(){this.h=new Th;this.g=new Jh}Uh.prototype.init=function(a){this.h.init(a)};
263
+ function Vh(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Gc(e.Wg);if(0<f.length&&(d=a.g,e=e.pts,f=new xg(f,0),181===f.qb()&&49===f.re()&&1195456820===f.R()&&3===f.qb())){var g=f.qb();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.qb(),l=(k&4)>>2,m=f.qb(),n=f.qb();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Oa:m,jb: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 Lh(a.g)}
264
+ ;function Wh(a,b,c,d){this.Pa=a;this.Ta=b;this.Ca=c;this.je=void 0===d?null:d}Wh.prototype.Gc=function(){return this.Ta};Wh.prototype.Cc=function(){return this.Ca};function Xh(a,b){return a&&b?a.Gc()==b.Gc()&&a.Cc()==b.Cc()&&fc(a.Pa(),b.Pa()):a==b}J("shaka.media.InitSegmentReference",Wh);Wh.prototype.getEndByte=Wh.prototype.Cc;Wh.prototype.getStartByte=Wh.prototype.Gc;
265
+ function Yh(a,b,c,d,e,f,g,h,k,l,m,n,p,r){l=void 0===l?[]:l;r=void 0===r?Zh:r;this.startTime=a;this.j=this.endTime=b;this.m=c;this.Ta=d;this.Ca=e;this.i=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.l=void 0===n?null:n;this.g=void 0===p?null:p;this.status=r}q=Yh.prototype;q.Pa=function(){return this.m()};q.getStartTime=function(){return this.startTime};q.og=function(){return this.endTime};q.Gc=function(){return this.Ta};
266
+ q.Cc=function(){return this.Ca};q.Hg=function(){return this.tilesLayout};q.Gg=function(){return this.l};q.nd=function(){return this.status};q.Qg=function(){this.status=$h};J("shaka.media.SegmentReference",Yh);Yh.prototype.markAsUnavailable=Yh.prototype.Qg;Yh.prototype.getStatus=Yh.prototype.nd;Yh.prototype.getTileDuration=Yh.prototype.Gg;Yh.prototype.getTilesLayout=Yh.prototype.Hg;Yh.prototype.getEndByte=Yh.prototype.Cc;Yh.prototype.getStartByte=Yh.prototype.Gc;Yh.prototype.getEndTime=Yh.prototype.og;
267
+ Yh.prototype.getStartTime=Yh.prototype.getStartTime;Yh.prototype.getUris=Yh.prototype.Pa;var Zh=0,$h=1;Yh.Status={Bh:Zh,Pi:$h,ai:2};function ai(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function bi(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ci(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
268
+ function di(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(ei(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}function fi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=ei(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function ei(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function gi(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.N={};this.K={};this.g=null;this.H=!1;this.S=d||function(){};this.i={};this.A=new wf;this.C={};this.F=b;this.I=new Nc;this.l=hi(this,this.I);this.G=new uf(function(){return ii(e)});this.J="";this.B=!1;this.P=new Nc}function hi(a,b){var c=new MediaSource;a.A.Fa(c,"sourceopen",function(){URL.revokeObjectURL(a.J);b.resolve()});a.J=ji(c);a.j.src=a.J;return c}q=gi.prototype;q.destroy=function(){return this.G.destroy()};
269
+ function ii(a){var b,c,d,e,f,g,h,k;return I(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Bb)),f=t(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.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.C)b.push(a.C[k].destroy());return u(l,Promise.all(b),2)}a.A&&(a.A.release(),a.A=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.l=null;a.g=null;a.m=null;a.h={};a.C={};a.F=null;a.i=
268
270
  {};z(l)})}
269
- q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return I(function(p){if(1==p.g)return e=Ib,u(p,d.I,2);d.B=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={Ga:f.Ga},h=g.next())f.Ga=h.value,k=a.get(f.Ga),l=xd(k.mimeType,k.codecs),f.Ga==e.ha?ii(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!sd(l,f.Ga)||(d.C[f.Ga]=new rd,l=ud(f.Ga,l)),m=d.l.addSourceBuffer(l),d.A.o(m,"error",function(n){return function(){d.i[n.Ga][0].p.reject(new O(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.A.o(m,"updateend",
270
- function(n){return function(){return ji(d,n.Ga)}}(f)),d.h[f.Ga]=m,d.N[f.Ga]=l,d.i[f.Ga]=[],d.K[f.Ga]=!!k.drmInfos.length);z(p)})};function ii(a,b,c){a.g||(a.g=new Cd(a.m));var d=a.g;a=a.H;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,Hd[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Ta('Text parsers should have a "setSequenceMode" method!'),d.C=a)}function ki(a){return a.l?"ended"==a.l.readyState:!0}function li(a,b){return b==Hb?a.g.g:Zh(mi(a,b))}
271
- function ni(a,b){return b==Hb?a.g.h:$h(mi(a,b))}function oi(a,b,c){if(b==Hb)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=mi(a,b);return bi(a,c)}q.yb=function(){var a={total:ci(this.j.buffered),audio:ci(mi(this,"audio")),video:ci(mi(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function mi(a,b){try{return a.h[b].buffered}catch(c){return null}}
272
- function pi(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,x,w,D,C,A,G;return I(function(E){switch(E.g){case 1:g=Ib;if(b!=g.ha){E.D(2);break}if(!a.B){E.D(3);break}return u(E,a.P,4);case 4:h=E.h,a.g.B=h;case 3:return u(E,Id(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return E["return"]();case 2:if(!a.C[b]){e&&(a.g||ii(a,"text/vtt",a.B),d?(k=Th(a.F,c),k.length&&(l=a.h[g.Ma].timestampOffset,Nd(a.g,k,d.startTime,d.endTime,l))):a.F.init(c));E.D(6);break}return u(E,vd(a.C[b],c),7);case 7:m=E.h,a.g||ii(a,
273
- "text/vtt",a.B),m.metadata&&(p=a.h[b].timestampOffset,a.U(m.metadata,p,d?d.endTime:null)),m.captions&&m.captions.length&&(n=a.h[g.Ma].timestampOffset,t=Ld(m.captions),Nd(a.g,t,d?d.startTime:null,d?d.endTime:null,n)),c=m.data;case 6:c=qi(a,c,d?d.startTime:null,b);v=a.h[b];y=ri;if(!a.B||v.mode==y||!d){E.D(8);break}x=b==g.Ma||!(g.Ma in a.h);if(!x){E.D(9);break}w=[v.appendWindowStart,v.appendWindowEnd];v.appendWindowStart=0;v.appendWindowEnd=Infinity;D=v.timestampOffset;v.timestampOffset=0;return u(E,
274
- si(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return v.timestampOffset=D,v.appendWindowStart=w[0],v.appendWindowEnd=w[1],C=Zh(mi(a,b)),A=(d.startTime||0)-(C||0),a.P.resolve(A),u(E,si(a,b,function(){return ti(a,b,0,a.l.duration)}),9);case 9:v.mode=y;case 8:return d&&a.B&&b!=g.ha&&f&&(G=d.startTime,si(a,b,function(){var H=G;0>H&&(H+=.001);a.h[b].timestampOffset=H;ji(a,b)})),u(E,si(a,b,function(){a.h[b].appendBuffer(c)}),12);case 12:z(E)}})}
275
- function ui(a,b){var c=ni(a,"video")||0;Kd(a.g,b,c)}function vi(a){a.g&&Kd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return I(function(f){e=Ib;return a==e.ha?u(f,d.g.remove(b,c),0):u(f,si(d,a,function(){return ti(d,a,b,c)}),0)})};function wi(a,b){var c;return I(function(d){c=Ib;return b==c.ha?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,si(a,b,function(){return ti(a,b,0,a.l.duration)}),0)})}
276
- q.flush=function(a){var b=this,c;return I(function(d){c=Ib;return a==c.ha?d["return"]():u(d,si(b,a,function(){b.j.currentTime-=.001;ji(b,a)}),0)})};
277
- function xi(a,b,c,d,e,f){var g;return I(function(h){g=Ib;return b==g.ha?(f||(a.g.B=c),Jd(a.g,d,e),h["return"]()):u(h,Promise.all([si(a,b,function(){var k=a.h[b].appendWindowStart,l=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=k;a.h[b].appendWindowEnd=l;ji(a,b)}),f?Promise.resolve():si(a,b,function(){var k=c;0>k&&(k+=.001);a.h[b].timestampOffset=k;ji(a,b)}),si(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;ji(a,b)})]),0)})}
278
- q.endOfStream=function(a){var b=this;return I(function(c){return u(c,yi(b,function(){ki(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.bb=function(a){var b=this;return I(function(c){return u(c,yi(b,function(){b.l.duration=a}),0)})};q.getDuration=function(){return this.l.duration};function ti(a,b,c,d){d<=c?ji(a,b):a.h[b].remove(c,d)}function ji(a,b){var c=a.i[b][0];c&&(c.p.resolve(),zi(a,b))}
279
- function si(a,b,c){tf(a.G);c={start:c,p:new Mc};a.i[b].push(c);1==a.i[b].length&&Ai(a,b);return c.p}
280
- function yi(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:tf(a.G);c=[];d={};for(e in a.h)d.vc=new Mc,f={start:function(l){return function(){return l.vc.resolve()}}(d),p:d.vc},a.i[e].push(f),c.push(d.vc),1==a.i[e].length&&f.start(),d={vc:d.vc};B(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new O(2,3,3015,l);}finally{for(h in a.h)zi(a,h)}z(k)}})}function zi(a,b){a.i[b].shift();Ai(a,b)}
281
- function Ai(a,b){var c=a.i[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)),zi(a,b)}}function qi(a,b,c,d){var e=a.K[d];null==c&&e&&(Vc()||Tc())&&"mp4"==a.N[d].split(";")[0].split("/")[1]&&(b=Hg(b));return b}var hi=window.URL.createObjectURL,ri="sequence",Bi=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Q(a,b,c){this.l=a;this.xd=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.A=0;this.B=!0;this.C=0;this.F=void 0===c?!0:c;this.G=0;this.H=!1}q=Q.prototype;q.getDuration=function(){return this.i};q.qg=function(){return this.g};q.bb=function(a){this.i=a};q.vg=function(){return this.l};q.Bf=function(a){this.A=a};q.Tc=function(a){this.B=a};q.Fe=function(a){this.m=a};q.hh=function(a){this.xd=a};q.hg=function(){return this.xd};
282
- q.ic=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.je(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.F&&!this.H&&(this.l=(Date.now()+this.A)/1E3-this.h-this.g)}};q.ce=function(){this.H=!0};q.je=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.ie=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
283
- q.T=function(){return Infinity==this.i&&!this.B};q.Lb=function(){return Infinity!=this.i&&!this.B};q.mb=function(){return Math.max(this.C,this.Ib()-this.m)};q.Ef=function(a){this.C=a};q.Ib=function(){return this.T()||this.Lb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.l)+this.G,this.i):this.h?Math.min(this.h,this.i):this.i};q.Fc=function(a){var b=Math.max(this.j,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Ib()-this.m+a,this.kb()))};q.cc=function(){return this.Fc(0)};
284
- q.kb=function(){return Math.max(0,this.Ib()-(this.T()||this.Lb()?this.xd:0))};q.If=function(){return null==this.l||null!=this.h&&this.F?!1:!0};q.Af=function(a){this.G=a};J("shaka.media.PresentationTimeline",Q);Q.prototype.setAvailabilityTimeOffset=Q.prototype.Af;Q.prototype.usingPresentationStartTime=Q.prototype.If;Q.prototype.getSeekRangeEnd=Q.prototype.kb;Q.prototype.getSeekRangeStart=Q.prototype.cc;Q.prototype.getSafeSeekRangeStart=Q.prototype.Fc;Q.prototype.getSegmentAvailabilityEnd=Q.prototype.Ib;
285
- Q.prototype.setUserSeekStart=Q.prototype.Ef;Q.prototype.getSegmentAvailabilityStart=Q.prototype.mb;Q.prototype.isInProgress=Q.prototype.Lb;Q.prototype.isLive=Q.prototype.T;Q.prototype.offset=Q.prototype.offset;Q.prototype.notifyMaxSegmentDuration=Q.prototype.ie;Q.prototype.notifyMinSegmentStartTime=Q.prototype.je;Q.prototype.lockStartTime=Q.prototype.ce;Q.prototype.notifySegments=Q.prototype.ic;Q.prototype.getDelay=Q.prototype.hg;Q.prototype.setDelay=Q.prototype.hh;
286
- Q.prototype.setSegmentAvailabilityDuration=Q.prototype.Fe;Q.prototype.setStatic=Q.prototype.Tc;Q.prototype.setClockOffset=Q.prototype.Bf;Q.prototype.getPresentationStartTime=Q.prototype.vg;Q.prototype.setDuration=Q.prototype.bb;Q.prototype.getMaxSegmentDuration=Q.prototype.qg;Q.prototype.getDuration=Q.prototype.getDuration;function Ci(a,b){this.j=a;this.m=Di(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.A=b;this.i=function(){}}Ci.prototype.release=function(){this.j=null;this.i=function(){}};function Ei(a,b){a.i=b}function Fi(a){this.g=a}function Di(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(ci(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 Gi(a,b,c,d){var e=this;this.g=a;this.A=b;this.C=c;this.i=new uf;this.m=!1;this.B=a.readyState;this.h=d;this.l=!1;this.i.o(a,"waiting",function(){return Hi(e)});this.j=(new P(function(){Hi(e)})).ka(.25)}Gi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.A=null};Gi.prototype.le=function(){this.l=!0;Hi(this)};
287
- function Hi(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.B&&(a.B=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Di(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=di(c,b,a.C.gapDetectionThreshold),null==d||0==d&&!a.l||(e=c.start(d),e>=a.A.kb()||
288
- .001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e)))}}};function Ii(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ji.value().get(b),c.Fa(a,b,d))}var Ji=new Nc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ki(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new uf;this.i=new Li(a);Ii(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Mi(d,d.j)})}Ki.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 Ni(a){return a.m?a.g.currentTime:a.j}function Oi(a,b){0<a.g.readyState?Pi(a.i,b):Ii(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Mi(a,a.j)})}
289
- function Mi(a,b){.001>Math.abs(a.g.currentTime-b)?Qi(a):(a.h.Fa(a.g,"seeking",function(){Qi(a)}),Pi(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Qi(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function Li(a){var b=this;this.h=a;this.m=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--)})}Li.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
290
- function Pi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ka(.1)};function Ri(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.Fa(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.h))}var c=this;this.g=a;this.j=!1;this.h=null;this.i=new uf;Ii(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}Ri.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};Ri.prototype.A=function(a){this.h=this.j?this.h:a};Ri.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0};Ri.prototype.G=function(){};
291
- function Si(a,b,c,d,e){var f=this;this.i=a;this.g=b.presentationTimeline;this.H=b.minBufferTime||0;this.l=c;this.F=e;this.C=null;this.j=new Gi(a,b.presentationTimeline,c,Ti(a,c));this.h=new Ki(a,function(){a:{var g=f.j;g.m=!0;g.l=!1;var h=Ni(f.h);g=Ui(f,h);if(.001<Math.abs(g-h)&&(h=Date.now()/1E3,!f.C||f.C<h-1)){f.C=h;Oi(f.h,g);g=void 0;break a}f.F();g=void 0}return g},Vi(this,d));this.B=(new P(function(){if(0!=f.i.readyState&&!f.i.paused){var g=Ni(f.h),h=f.g.cc(),k=f.g.kb();3>k-h&&(h=k-3);g<h&&(g=
292
- Ui(f,g),f.i.currentTime=g)}})).ka(.25)}Si.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.B&&(this.B.stop(),this.B=null);this.i=this.h=this.g=this.l=null;this.F=function(){}};Si.prototype.A=function(a){Oi(this.h,a)};Si.prototype.m=function(){var a=Ni(this.h);return 0<this.i.readyState&&!this.i.paused?Wi(this,a):a};function Vi(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.cc():a.g.kb():0>b&&(b=a.g.kb()+b);return Xi(a,Wi(a,b))}
293
- Si.prototype.G=function(){this.j.le()};function Xi(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Ui(a,b){var c=Math.max(a.H,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.cc(),f=a.g.kb(),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?Xi(a,b):b>f?f:b<e?ai(a.i.buffered,k)?k:c:b>=h||ai(a.i.buffered,b)?b:c}function Wi(a,b){var c=a.g.cc();if(b<c)return c;c=a.g.kb();return b>c?c:b}
294
- function Ti(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new Ci(new Fi(a),b.stallThreshold);Ei(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function Yi(a){this.M=a;this.g=null;this.h=0;this.i=!1}q=Yi.prototype;q.release=function(){this.i||(this.M=[],this.g&&this.g.stop(),this.g=null)};q.Lg=function(){this.i=!0};q.find=function(a){for(var b=this.M.length-1,c=b;0<=c;--c){var d=this.M[c],e=c<b?this.M[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.M.length&&a<this.M[0].startTime?this.h:null};q.get=function(a){if(0==this.M.length)return null;a-=this.h;return 0>a||a>=this.M.length?null:this.M[a]};
295
- q.offset=function(a){if(!this.i)for(var b=r(this.M),c=b.next();!c.done;c=b.next()){c=c.value;c.startTime+=a;c.endTime+=a;c.j+=a;c=r(c.h);for(var d=c.next();!d.done;d=c.next())d=d.value,d.startTime+=a,d.endTime+=a,d.j+=a}};q.Lc=function(a){!this.i&&a.length&&(this.M=this.M.filter(function(b){return b.startTime<a[0].startTime}),this.M.push.apply(this.M,ia(a)))};q.hc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.M.length||d.endTime>c.M[0].startTime)});this.Lc(a);this.Gb(b)};
271
+ q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return I(function(n){if(1==n.g)return e=Jb,u(n,d.I,2);d.B=c;f={};g=t(a.keys());for(h=g.next();!h.done;f={Ga:f.Ga},h=g.next())f.Ga=h.value,k=a.get(f.Ga),l=yd(k.mimeType,k.codecs),f.Ga==e.ha?ki(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!td(l,f.Ga)||(d.C[f.Ga]=new sd,l=vd(f.Ga,l)),m=d.l.addSourceBuffer(l),d.A.o(m,"error",function(p){return function(){d.i[p.Ga][0].p.reject(new O(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.A.o(m,"updateend",
272
+ function(p){return function(){return li(d,p.Ga)}}(f)),d.h[f.Ga]=m,d.N[f.Ga]=l,d.i[f.Ga]=[],d.K[f.Ga]=!!k.drmInfos.length);z(n)})};function ki(a,b,c){a.g||(a.g=new Gd(a.m));var d=a.g;a=a.H;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,Id[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Ua('Text parsers should have a "setSequenceMode" method!'),d.C=a)}function mi(a){return a.l?"ended"==a.l.readyState:!0}function ni(a,b){return b==Ib?a.g.g:ai(oi(a,b))}
273
+ function pi(a,b){return b==Ib?a.g.h:bi(oi(a,b))}function qi(a,b,c){if(b==Ib)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=oi(a,b);return di(a,c)}q.kb=function(){var a={total:ei(this.j.buffered),audio:ei(oi(this,"audio")),video:ei(oi(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function oi(a,b){try{return a.h[b].buffered}catch(c){return null}}
274
+ function ri(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,w,y,x,v,D,C,B,G;return I(function(E){switch(E.g){case 1:g=Jb;if(b!=g.ha){E.D(2);break}if(!a.B){E.D(3);break}return u(E,a.P,4);case 4:h=E.h,a.g.B=h;case 3:return u(E,Jd(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return E["return"]();case 2:if(!a.C[b]){e&&(a.g||ki(a,"text/vtt",a.B),d?(k=Vh(a.F,c),k.length&&(l=a.h[g.Ma].timestampOffset,Od(a.g,k,d.startTime,d.endTime,l))):a.F.init(c));E.D(6);break}return u(E,wd(a.C[b],c),7);case 7:m=E.h,a.g||ki(a,
275
+ "text/vtt",a.B),m.metadata&&(n=a.h[b].timestampOffset,a.S(m.metadata,n,d?d.endTime:null)),m.captions&&m.captions.length&&(p=a.h[g.Ma].timestampOffset,r=Md(m.captions),Od(a.g,r,d?d.startTime:null,d?d.endTime:null,p)),c=m.data;case 6:c=si(a,c,d?d.startTime:null,b);w=a.h[b];y=ti;if(!a.B||w.mode==y||!d){E.D(8);break}x=b==g.Ma||!(g.Ma in a.h);if(!x){E.D(9);break}v=[w.appendWindowStart,w.appendWindowEnd];w.appendWindowStart=0;w.appendWindowEnd=Infinity;D=w.timestampOffset;w.timestampOffset=0;return u(E,
276
+ ui(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return w.timestampOffset=D,w.appendWindowStart=v[0],w.appendWindowEnd=v[1],C=ai(oi(a,b)),B=(d.startTime||0)-(C||0),a.P.resolve(B),u(E,ui(a,b,function(){return vi(a,b,0,a.l.duration)}),9);case 9:w.mode=y;case 8:return d&&a.B&&b!=g.ha&&f&&(G=d.startTime,ui(a,b,function(){var H=G;0>H&&(H+=.001);a.h[b].timestampOffset=H;li(a,b)})),u(E,ui(a,b,function(){a.h[b].appendBuffer(c)}),12);case 12:z(E)}})}
277
+ function wi(a,b){var c=pi(a,"video")||0;Ld(a.g,b,c)}function xi(a){a.g&&Ld(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return I(function(f){e=Jb;return a==e.ha?u(f,d.g.remove(b,c),0):u(f,ui(d,a,function(){return vi(d,a,b,c)}),0)})};function yi(a,b){var c;return I(function(d){c=Jb;return b==c.ha?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,ui(a,b,function(){return vi(a,b,0,a.l.duration)}),0)})}
278
+ q.flush=function(a){var b=this,c;return I(function(d){c=Jb;return a==c.ha?d["return"]():u(d,ui(b,a,function(){b.j.currentTime-=.001;li(b,a)}),0)})};
279
+ function zi(a,b,c,d,e,f){var g;return I(function(h){g=Jb;return b==g.ha?(f||(a.g.B=c),Kd(a.g,d,e),h["return"]()):u(h,Promise.all([ui(a,b,function(){var k=a.h[b].appendWindowStart,l=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=k;a.h[b].appendWindowEnd=l;li(a,b)}),f?Promise.resolve():ui(a,b,function(){var k=c;0>k&&(k+=.001);a.h[b].timestampOffset=k;li(a,b)}),ui(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;li(a,b)})]),0)})}
280
+ q.endOfStream=function(a){var b=this;return I(function(c){return u(c,Ai(b,function(){mi(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.bb=function(a){var b=this;return I(function(c){return u(c,Ai(b,function(){b.l.duration=a}),0)})};q.getDuration=function(){return this.l.duration};function vi(a,b,c,d){d<=c?li(a,b):a.h[b].remove(c,d)}function li(a,b){var c=a.i[b][0];c&&(c.p.resolve(),Bi(a,b))}
281
+ function ui(a,b,c){vf(a.G);c={start:c,p:new Nc};a.i[b].push(c);1==a.i[b].length&&Ci(a,b);return c.p}
282
+ function Ai(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:vf(a.G);c=[];d={};for(e in a.h)d.vc=new Nc,f={start:function(l){return function(){return l.vc.resolve()}}(d),p:d.vc},a.i[e].push(f),c.push(d.vc),1==a.i[e].length&&f.start(),d={vc:d.vc};A(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new O(2,3,3015,l);}finally{for(h in a.h)Bi(a,h)}z(k)}})}function Bi(a,b){a.i[b].shift();Ci(a,b)}
283
+ function Ci(a,b){var c=a.i[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)),Bi(a,b)}}function si(a,b,c,d){var e=a.K[d];null==c&&e&&(Wc()||Uc())&&"mp4"==a.N[d].split(";")[0].split("/")[1]&&(b=Jg(b));return b}var ji=window.URL.createObjectURL,ti="sequence",Di=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Q(a,b,c){this.l=a;this.zd=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.A=0;this.B=!0;this.C=0;this.F=void 0===c?!0:c;this.G=0;this.H=!1}q=Q.prototype;q.getDuration=function(){return this.i};q.xg=function(){return this.g};q.bb=function(a){this.i=a};q.Bg=function(){return this.l};q.Gf=function(a){this.A=a};q.Uc=function(a){this.B=a};q.He=function(a){this.m=a};q.nh=function(a){this.zd=a};q.ng=function(){return this.zd};
284
+ q.ic=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.me(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.F&&!this.H&&(this.l=(Date.now()+this.A)/1E3-this.h-this.g)}};q.ge=function(){this.H=!0};q.me=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.le=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
285
+ q.U=function(){return Infinity==this.i&&!this.B};q.Lb=function(){return Infinity!=this.i&&!this.B};q.ob=function(){return Math.max(this.C,this.Ib()-this.m)};q.Jf=function(a){this.C=a};q.Ib=function(){return this.U()||this.Lb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.l)+this.G,this.i):this.h?Math.min(this.h,this.i):this.i};q.Fc=function(a){var b=Math.max(this.j,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Ib()-this.m+a,this.mb()))};q.cc=function(){return this.Fc(0)};
286
+ q.mb=function(){return Math.max(0,this.Ib()-(this.U()||this.Lb()?this.zd:0))};q.Nf=function(){return null==this.l||null!=this.h&&this.F?!1:!0};q.Ff=function(a){this.G=a};J("shaka.media.PresentationTimeline",Q);Q.prototype.setAvailabilityTimeOffset=Q.prototype.Ff;Q.prototype.usingPresentationStartTime=Q.prototype.Nf;Q.prototype.getSeekRangeEnd=Q.prototype.mb;Q.prototype.getSeekRangeStart=Q.prototype.cc;Q.prototype.getSafeSeekRangeStart=Q.prototype.Fc;Q.prototype.getSegmentAvailabilityEnd=Q.prototype.Ib;
287
+ Q.prototype.setUserSeekStart=Q.prototype.Jf;Q.prototype.getSegmentAvailabilityStart=Q.prototype.ob;Q.prototype.isInProgress=Q.prototype.Lb;Q.prototype.isLive=Q.prototype.U;Q.prototype.offset=Q.prototype.offset;Q.prototype.notifyMaxSegmentDuration=Q.prototype.le;Q.prototype.notifyMinSegmentStartTime=Q.prototype.me;Q.prototype.lockStartTime=Q.prototype.ge;Q.prototype.notifySegments=Q.prototype.ic;Q.prototype.getDelay=Q.prototype.ng;Q.prototype.setDelay=Q.prototype.nh;
288
+ Q.prototype.setSegmentAvailabilityDuration=Q.prototype.He;Q.prototype.setStatic=Q.prototype.Uc;Q.prototype.setClockOffset=Q.prototype.Gf;Q.prototype.getPresentationStartTime=Q.prototype.Bg;Q.prototype.setDuration=Q.prototype.bb;Q.prototype.getMaxSegmentDuration=Q.prototype.xg;Q.prototype.getDuration=Q.prototype.getDuration;function Ei(a,b,c){this.l=c;this.j=a;this.B=Fi(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.A=0;this.C=b;this.i=function(){}}Ei.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function Gi(a,b){a.i=b}function Hi(a){this.g=a}function Fi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(ei(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 Ii(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.G=c;this.i=new wf;this.m=!1;this.F=a.readyState;this.C=0;this.h=d;this.l=!1;this.i.o(a,"waiting",function(){return Ji(f)});this.j=(new P(function(){Ji(f)})).ka(.25)}Ii.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};Ii.prototype.pe=function(){this.l=!0;Ji(this)};
289
+ function Ji(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Fi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.B!=d)b.m=f,b.g=e,b.B=d,b.h=!1;e=f-b.m;if(d=e>=b.C&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.A++,b.l(new L("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=fi(c,b,a.G.gapDetectionThreshold),null==
290
+ d||0==d&&!a.l||(e=c.start(d),e>=a.B.mb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.C++,a.A(new L("gapjumped")))))}}};function Ki(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Li.value().get(b),c.Fa(a,b,d))}var Li=new Oc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Mi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new wf;this.i=new Ni(a);Ki(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Oi(d,d.j)})}Mi.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 Pi(a){return a.m?a.g.currentTime:a.j}function Qi(a,b){0<a.g.readyState?Ri(a.i,b):Ki(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Oi(a,a.j)})}
291
+ function Oi(a,b){.001>Math.abs(a.g.currentTime-b)?Si(a):(a.h.Fa(a.g,"seeking",function(){Si(a)}),Ri(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Si(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function Ni(a){var b=this;this.h=a;this.m=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--)})}Ni.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
292
+ function Ri(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ka(.1)};function Ti(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.Fa(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.h))}var c=this;this.g=a;this.j=!1;this.h=null;this.i=new wf;Ki(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}q=Ti.prototype;q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.Yd=function(a){this.h=this.j?this.h:a};q.bd=function(){return(this.j?this.g.currentTime:this.h)||0};q.We=function(){return 0};q.Ve=function(){return 0};
293
+ q.Af=function(){};
294
+ function Ui(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.B=e;this.A=null;this.C=Vi(a,c,f);this.j=new Ii(a,b.presentationTimeline,c,this.C,f);this.h=new Mi(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=Pi(g.h);h=Wi(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.A||g.A<k-1)){g.A=k;Qi(g.h,h);h=void 0;break a}g.B();h=void 0}return h},Xi(this,d));this.m=(new P(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Pi(g.h),k=g.g.cc(),l=g.g.mb();3>
295
+ l-k&&(k=l-3);h<k&&(h=Wi(g,h),g.i.currentTime=h)}})).ka(.25)}q=Ui.prototype;q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.B=function(){}};q.Yd=function(a){Qi(this.h,a)};q.bd=function(){var a=Pi(this.h);return 0<this.i.readyState&&!this.i.paused?Yi(this,a):a};q.We=function(){return this.C.A};q.Ve=function(){return this.j.C};
296
+ function Xi(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.cc():a.g.mb():0>b&&(b=a.g.mb()+b);return Zi(a,Yi(a,b))}q.Af=function(){this.j.pe()};function Zi(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Wi(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.cc(),f=a.g.mb(),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?Zi(a,b):b>f?f:b<e?ci(a.i.buffered,k)?k:c:b>=h||ci(a.i.buffered,b)?b:c}
297
+ function Yi(a,b){var c=a.g.cc();if(b<c)return c;c=a.g.mb();return b>c?c:b}function Vi(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Ei(new Hi(a),b.stallThreshold,c);Gi(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function $i(a){this.M=a;this.g=null;this.h=0;this.i=!1}q=$i.prototype;q.release=function(){this.i||(this.M=[],this.g&&this.g.stop(),this.g=null)};q.Rg=function(){this.i=!0};q.find=function(a){for(var b=this.M.length-1,c=b;0<=c;--c){var d=this.M[c],e=c<b?this.M[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.M.length&&a<this.M[0].startTime?this.h:null};q.get=function(a){if(0==this.M.length)return null;a-=this.h;return 0>a||a>=this.M.length?null:this.M[a]};
298
+ q.offset=function(a){if(!this.i)for(var b=t(this.M),c=b.next();!c.done;c=b.next()){c=c.value;c.startTime+=a;c.endTime+=a;c.j+=a;c=t(c.h);for(var d=c.next();!d.done;d=c.next())d=d.value,d.startTime+=a,d.endTime+=a,d.j+=a}};q.Mc=function(a){!this.i&&a.length&&(this.M=this.M.filter(function(b){return b.startTime<a[0].startTime}),this.M.push.apply(this.M,ia(a)))};q.hc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.M.length||d.endTime>c.M[0].startTime)});this.Mc(a);this.Gb(b)};
296
299
  q.Gb=function(a){if(!this.i){var b=this.M.length;this.M=this.M.filter(function(c){return c.endTime>a});this.h+=b-this.M.length}};
297
- q.xb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.M.length;)if(this.M[this.M.length-1].startTime>=b)this.M.pop();else break;for(;this.M.length;)if(this.M[0].endTime<=a)this.M.shift(),c||this.h++;else break;0!=this.M.length&&(a=this.M[this.M.length-1],this.M[this.M.length-1]=new Wh(a.startTime,b,a.m,a.Sa,a.Ca,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.l,a.g))}};
298
- q.Cd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new P(function(){var d=b();d?c.M.push.apply(c.M,ia(d)):(c.g.stop(),c.g=null)}),this.g.ka(a))};Yi.prototype[Symbol.iterator]=function(){return this.ac(0)};Yi.prototype.ac=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Zi(this,b,d)};
299
- function $i(a,b,c){return new Yi([new Wh(a,a+b,function(){return c},0,null,null,a,a,a+b)])}J("shaka.media.SegmentIndex",Yi);Yi.forSingleSegment=$i;Yi.prototype.getIteratorForTime=Yi.prototype.ac;Yi.prototype.updateEvery=Yi.prototype.Cd;Yi.prototype.fit=Yi.prototype.xb;Yi.prototype.evict=Yi.prototype.Gb;Yi.prototype.mergeAndEvict=Yi.prototype.hc;Yi.prototype.offset=Yi.prototype.offset;Yi.prototype.get=Yi.prototype.get;Yi.prototype.find=Yi.prototype.find;Yi.prototype.markImmutable=Yi.prototype.Lg;
300
- Yi.prototype.release=Yi.prototype.release;function Zi(a,b,c){this.i=a;this.h=b;this.g=c}Zi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.Pa().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};Zi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.Pa().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};
301
- J("shaka.media.SegmentIterator",Zi);Zi.prototype.next=Zi.prototype.next;Zi.prototype.current=Zi.prototype.current;function aj(){Yi.call(this,[]);this.j=[]}qa(aj,Yi);q=aj.prototype;q.clone=function(){var a=new aj;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.M.length}return null};
302
- 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.M.length}return null};q.offset=function(){};q.Lc=function(){};q.Gb=function(){};q.hc=function(){};q.xb=function(){};q.Cd=function(){};J("shaka.media.MetaSegmentIndex",aj);aj.prototype.updateEvery=aj.prototype.Cd;aj.prototype.fit=aj.prototype.xb;aj.prototype.mergeAndEvict=aj.prototype.hc;aj.prototype.evict=aj.prototype.Gb;aj.prototype.merge=aj.prototype.Lc;
303
- aj.prototype.offset=aj.prototype.offset;aj.prototype.get=aj.prototype.get;aj.prototype.find=aj.prototype.find;aj.prototype.release=aj.prototype.release;function bj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.kd();this.h=new P(function(){b.g.vf(.25*b.i)})}bj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};bj.prototype.set=function(a){this.i=a;cj(this)};bj.prototype.gd=function(){return this.g.gd()};function cj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.kd()!=b&&a.g.De(b);return}catch(c){}a.h.ka(.25);0!=a.g.kd()&&a.g.De(0)};function dj(a){var b=this;this.h=a;this.g=new Set;this.i=(new P(function(){ej(b,!1)})).ka(.25)}dj.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()};function ej(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function fj(a){eb.call(this);this.g=new Map;this.h=a}qa(fj,eb);fj.prototype.release=function(){this.g.clear();eb.prototype.release.call(this)};function gj(a,b){var c=a.g.get(b);c||(c={Nc:[],cf:null,contentType:b},a.g.set(b,c));return c}function hj(a,b,c){var d=gj(a,b.contentType);ij(a,d);a={fe:b,position:c};d=d.Nc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
304
- fj.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Nc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.fe;break a}}d=null}if(e=d)e=c.cf,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
305
- if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.cf=d,JSON.stringify(d),c=new L("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function ij(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.Nc;b.Nc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.Nc=[]};function jj(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 L("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ka(2)}qa(jj,eb);jj.prototype.release=function(){this.g.clear();this.h.stop();eb.prototype.release.call(this)};function kj(a){eb.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Ub:null,Tb:lj,Kb:function(c,d){return mj(b,"enter",c,d)}},{Ub:nj,Tb:lj,Kb:function(c,d){return mj(b,"enter",c,d)}},{Ub:oj,Tb:lj,Kb:function(c,d){return mj(b,"enter",c,d)}},{Ub:lj,Tb:nj,Kb:function(c,d){return mj(b,"exit",c,d)}},{Ub:lj,Tb:oj,Kb:function(c,d){return mj(b,"exit",c,d)}},{Ub:nj,Tb:oj,Kb:function(c,d){return mj(b,"skip",c,d)}},{Ub:oj,Tb:nj,Kb:function(c,d){return mj(b,"skip",c,d)}}];this.h=new uf;this.h.o(this.i,"regionremove",
306
- function(c){b.g["delete"](c.region)})}qa(kj,eb);kj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;eb.prototype.release.call(this)};kj.prototype.j=function(a,b){for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?nj:a>d.endTime?oj:lj;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Ub==e&&h.Tb==f&&h.Kb(d,b)}};
307
- function mj(a,b,c,d){b=new L(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var nj=1,lj=2,oj=3;function pj(a,b,c,d,e){a=lf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function qj(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.C=1;this.A=this.l=null;this.h=new Map;this.F=!1;this.G=null;this.B=!1;this.j=new sf(function(){return rj(c)})}qj.prototype.destroy=function(){return this.j.destroy()};function rj(a){var b,c,d,e;return I(function(f){if(1==f.g){b=[];c=r(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,sj(e),b.push(tj(e));return u(f,Promise.all(b),2)}a.h.clear();a.g=null;a.m=null;a.i=null;z(f)})}
308
- qj.prototype.configure=function(a){this.i=a;this.G=new Te({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)};qj.prototype.start=function(){var a=this;return I(function(b){if(1==b.g)return u(b,uj(a),2);tf(a.j);a.F=!0;z(b)})};
309
- function vj(a,b){var c,d,e,f,g,h;I(function(k){switch(k.g){case 1:return c=Ib,B(k,2),u(k,wi(a.g.V,c.ha),4);case 4:va(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=xd(b.mimeType,b.codecs);ii(a.g.V,e,a.m.sequenceMode);f=a.g.V.m;if(g=f.isTextVisible()||a.i.alwaysStreamText)h=wj(b),a.h.set(c.ha,h),xj(a,h,0);z(k)}})}function yj(a){var b=a.h.get(Hb);b&&(sj(b),tj(b)["catch"](function(){}),a.h["delete"](Hb));a.A=null}
310
- function zj(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Qb&&(Aj(a,e,!1,0,!1),c.Qb=d)}else if(d=c.Qb)c.Qb=null,Aj(a,d,!0,0,!1)}}function Bj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.F&&(b.video&&Aj(a,b.video,c,d,e),b.audio&&Aj(a,b.audio,c,d,e))}function Cj(a,b){a.A=b;a.F&&Aj(a,b,!0,0,!1)}
311
- function Aj(a,b,c,d,e){var f=a.h.get(b.type);f||b.type!=Hb?f&&(f.Qb&&(b.trickModeVideo?(f.Qb=b,b=b.trickModeVideo):f.Qb=null),f.stream!=b||e)&&(b.type==Hb&&ii(a.g.V,xd(b.mimeType,b.codecs),a.m.sequenceMode),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.sa=null,c&&(f.zc?f.Fd=!0:f.ab?(f.Sb=!0,f.dd=d,f.Fd=!0):(sj(f),Dj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),Ej(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):vj(a,b)}
312
- function Ej(a,b){var c,d;return I(function(e){if(1==e.g){if(!b.Ja)return e["return"]();c=b.stream;d=b.Ja;return c.segmentIndex?e.D(2):u(e,c.createSegmentIndex(),2)}if(b.Ja!=d||b.stream!=c)return e["return"]();var f=a.g.jd();var g=ni(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Qa?b.Qa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Ca?k.Ca-k.Sa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.Ca?k.Ca-k.Sa:null)||0),k=a.g.getBandwidthEstimate(),
300
+ q.yb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.M.length;)if(this.M[this.M.length-1].startTime>=b)this.M.pop();else break;for(;this.M.length;)if(this.M[0].endTime<=a)this.M.shift(),c||this.h++;else break;0!=this.M.length&&(a=this.M[this.M.length-1],this.M[this.M.length-1]=new Yh(a.startTime,b,a.m,a.Ta,a.Ca,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.l,a.g))}};
301
+ q.Fd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new P(function(){var d=b();d?c.M.push.apply(c.M,ia(d)):(c.g.stop(),c.g=null)}),this.g.ka(a))};$i.prototype[Symbol.iterator]=function(){return this.ac(0)};$i.prototype.ac=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new aj(this,b,d)};
302
+ function bj(a,b,c){return new $i([new Yh(a,a+b,function(){return c},0,null,null,a,a,a+b)])}J("shaka.media.SegmentIndex",$i);$i.forSingleSegment=bj;$i.prototype.getIteratorForTime=$i.prototype.ac;$i.prototype.updateEvery=$i.prototype.Fd;$i.prototype.fit=$i.prototype.yb;$i.prototype.evict=$i.prototype.Gb;$i.prototype.mergeAndEvict=$i.prototype.hc;$i.prototype.offset=$i.prototype.offset;$i.prototype.get=$i.prototype.get;$i.prototype.find=$i.prototype.find;$i.prototype.markImmutable=$i.prototype.Rg;
303
+ $i.prototype.release=$i.prototype.release;function aj(a,b,c){this.i=a;this.h=b;this.g=c}aj.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.Pa().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};aj.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.Pa().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};
304
+ J("shaka.media.SegmentIterator",aj);aj.prototype.next=aj.prototype.next;aj.prototype.current=aj.prototype.current;function cj(){$i.call(this,[]);this.j=[]}qa(cj,$i);q=cj.prototype;q.clone=function(){var a=new cj;a.j=this.j.slice();return a};q.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.M.length}return null};
305
+ q.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.M.length}return null};q.offset=function(){};q.Mc=function(){};q.Gb=function(){};q.hc=function(){};q.yb=function(){};q.Fd=function(){};J("shaka.media.MetaSegmentIndex",cj);cj.prototype.updateEvery=cj.prototype.Fd;cj.prototype.fit=cj.prototype.yb;cj.prototype.mergeAndEvict=cj.prototype.hc;cj.prototype.evict=cj.prototype.Gb;cj.prototype.merge=cj.prototype.Mc;
306
+ cj.prototype.offset=cj.prototype.offset;cj.prototype.get=cj.prototype.get;cj.prototype.find=cj.prototype.find;cj.prototype.release=cj.prototype.release;function dj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.md();this.h=new P(function(){b.g.zf(.25*b.i)})}dj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};dj.prototype.set=function(a){this.i=a;ej(this)};dj.prototype.jd=function(){return this.g.jd()};function ej(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.md()!=b&&a.g.Fe(b);return}catch(c){}a.h.ka(.25);0!=a.g.md()&&a.g.Fe(0)};function fj(a){var b=this;this.h=a;this.g=new Set;this.i=(new P(function(){gj(b,!1)})).ka(.25)}fj.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function gj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function hj(a){fb.call(this);this.g=new Map;this.h=a}qa(hj,fb);hj.prototype.release=function(){this.g.clear();fb.prototype.release.call(this)};function ij(a,b){var c=a.g.get(b);c||(c={Oc:[],hf:null,contentType:b},a.g.set(b,c));return c}function jj(a,b,c){var d=ij(a,b.contentType);kj(a,d);a={je:b,position:c};d=d.Oc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
307
+ hj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Oc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.je;break a}}d=null}if(e=d)e=c.hf,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
308
+ if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.hf=d,JSON.stringify(d),c=new L("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function kj(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.Oc;b.Oc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.Oc=[]};function lj(a){fb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new P(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new L("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ka(2)}qa(lj,fb);lj.prototype.release=function(){this.g.clear();this.h.stop();fb.prototype.release.call(this)};function mj(a){fb.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Ub:null,Tb:nj,Kb:function(c,d){return oj(b,"enter",c,d)}},{Ub:pj,Tb:nj,Kb:function(c,d){return oj(b,"enter",c,d)}},{Ub:qj,Tb:nj,Kb:function(c,d){return oj(b,"enter",c,d)}},{Ub:nj,Tb:pj,Kb:function(c,d){return oj(b,"exit",c,d)}},{Ub:nj,Tb:qj,Kb:function(c,d){return oj(b,"exit",c,d)}},{Ub:pj,Tb:qj,Kb:function(c,d){return oj(b,"skip",c,d)}},{Ub:qj,Tb:pj,Kb:function(c,d){return oj(b,"skip",c,d)}}];this.h=new wf;this.h.o(this.i,"regionremove",
309
+ function(c){b.g["delete"](c.region)})}qa(mj,fb);mj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;fb.prototype.release.call(this)};mj.prototype.j=function(a,b){for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?pj:a>d.endTime?qj:nj;this.g.set(d,f);for(var g=t(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Ub==e&&h.Tb==f&&h.Kb(d,b)}};
310
+ function oj(a,b,c,d){b=new L(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var pj=1,nj=2,qj=3;function rj(a,b,c,d,e){a=nf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function sj(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.C=1;this.A=this.l=null;this.h=new Map;this.F=!1;this.G=null;this.B=!1;this.j=new uf(function(){return tj(c)})}sj.prototype.destroy=function(){return this.j.destroy()};function tj(a){var b,c,d,e;return I(function(f){if(1==f.g){b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,uj(e),b.push(vj(e));return u(f,Promise.all(b),2)}a.h.clear();a.g=null;a.m=null;a.i=null;z(f)})}
311
+ sj.prototype.configure=function(a){this.i=a;this.G=new Ve({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)};sj.prototype.start=function(){var a=this;return I(function(b){if(1==b.g)return u(b,wj(a),2);vf(a.j);a.F=!0;z(b)})};
312
+ function xj(a,b){var c,d,e,f,g,h;I(function(k){switch(k.g){case 1:return c=Jb,A(k,2),u(k,yi(a.g.V,c.ha),4);case 4:va(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=yd(b.mimeType,b.codecs);ki(a.g.V,e,a.m.sequenceMode);f=a.g.V.m;if(g=f.isTextVisible()||a.i.alwaysStreamText)h=yj(b),a.h.set(c.ha,h),zj(a,h,0);z(k)}})}function Aj(a){var b=a.h.get(Ib);b&&(uj(b),vj(b)["catch"](function(){}),a.h["delete"](Ib));a.A=null}
313
+ function Bj(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Qb&&(Cj(a,e,!1,0,!1),c.Qb=d)}else if(d=c.Qb)c.Qb=null,Cj(a,d,!0,0,!1)}}function Dj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.F&&(b.video&&Cj(a,b.video,c,d,e),b.audio&&Cj(a,b.audio,c,d,e))}function Ej(a,b){a.A=b;a.F&&Cj(a,b,!0,0,!1)}
314
+ function Cj(a,b,c,d,e){var f=a.h.get(b.type);f||b.type!=Ib?f&&(f.Qb&&(b.trickModeVideo?(f.Qb=b,b=b.trickModeVideo):f.Qb=null),f.stream!=b||e)&&(b.type==Ib&&ki(a.g.V,yd(b.mimeType,b.codecs),a.m.sequenceMode),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.sa=null,c&&(f.zc?f.Id=!0:f.ab?(f.Sb=!0,f.fd=d,f.Id=!0):(uj(f),Fj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),Gj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):xj(a,b)}
315
+ function Gj(a,b){var c,d;return I(function(e){if(1==e.g){if(!b.Ja)return e["return"]();c=b.stream;d=b.Ja;return c.segmentIndex?e.D(2):u(e,c.createSegmentIndex(),2)}if(b.Ja!=d||b.stream!=c)return e["return"]();var f=a.g.ld();var g=pi(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Ra?b.Ra.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Ca?k.Ca-k.Ta:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.Ca?k.Ca-k.Ta:null)||0),k=a.g.getBandwidthEstimate(),
313
316
  f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.Ja.h.g>h?!0:!1):f=!1;f&&b.Ja.abort();z(e)})}
314
- qj.prototype.Qc=function(){for(var a=this.g.jd(),b=r(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);c.sa=null;var e=this.g.V;d==Hb?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=mi(e,d),e=ai(e,a));if(!e){(null!=ni(this.g.V,d)||c.ab)&&Fj(this,c);c.Ja&&(c.Ja.abort(),c.Ja=null);if(d===Hb)for(d=this.g.V.F.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,Ih(d),d=r(d.j.values()),e=d.next();!e.done;e=d.next())Dh(e.value);c.Qc=!0}}};
315
- function Fj(a,b){b.zc||b.Sb||(b.ab?(b.Sb=!0,b.dd=0):null==li(a.g.V,b.type)?null==b.eb&&xj(a,b,0):(sj(b),Dj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
316
- function uj(a){var b,c,d,e,f,g,h,k,l,m;return I(function(p){if(1==p.g){b=Ib;if(!a.l)throw new O(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Fb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Ma,a.l.video),d.add(a.l.video));a.A&&(c.set(b.ha,a.A),d.add(a.A));e=a.g.V;f=a.i.forceTransmuxTS;return u(p,e.init(c,f,a.m.sequenceMode),2)}tf(a.j);var n=a.m.presentationTimeline.getDuration();Infinity>n?a.g.V.bb(n):a.g.V.bb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),
317
- a.h.has(k)||(m=wj(l),a.h.set(k,m),xj(a,m,0));z(p)})}function wj(a){return{stream:a,type:a.type,sa:null,Qa:null,od:null,be:null,ae:null,$d:null,Qb:null,endOfStream:!1,ab:!1,eb:null,Sb:!1,dd:0,Fd:!1,zc:!1,Qc:!0,qe:!1,Hc:!1,Ja:null}}
318
- function Gj(a,b){var c,d,e,f,g;return I(function(h){switch(h.g){case 1:tf(a.j);if(b.ab||null==b.eb||b.zc)return h["return"]();b.eb=null;if(!b.Sb){h.D(2);break}return u(h,Dj(a,b,b.Fd,b.dd),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.eb&&xj(a,b,0),h["return"]();case 4:B(h,6);d=Hj(a,b);null!=d&&(xj(a,b,d),b.Hc=!1);va(h,7);break;case 6:return e=
319
- F(h),u(h,Ij(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.h.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return u(h,a.g.V.endOfStream(),10);case 10:tf(a.j),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.bb(g),z(h)}})}
320
- function Hj(a,b){if(Jj(b))return ui(a.g.V,b.stream.originalId||""),null;b.type==Hb&&vi(a.g.V);var c=a.g.jd(),d=b.Qa?b.Qa.endTime:c,e=oi(a.g.V,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.C;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.h.get(Hb))&&Jj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=ni(a.g.V,b.type);e=Kj(a,b,c,e);if(!e)return a.i.updateIntervalSeconds;f=Infinity;
321
- var g=Array.from(a.h.values());g=r(g);for(var h=g.next();!h.done;h=g.next())h=h.value,Jj(h)||h.sa&&!h.sa.current()||(f=Math.min(f,h.Qa?h.Qa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;Lj(a,b,c,e)["catch"](function(){});return null}
322
- function Kj(a,b,c,d){if(b.sa)return b.sa.current();if(b.Qa||d)return b.sa=b.stream.segmentIndex.ac(b.Qa?b.Qa.endTime:d),b.sa&&b.sa.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.sa=b.stream.segmentIndex.ac(d),e=b.sa&&b.sa.next().value);e||(b.sa=b.stream.segmentIndex.ac(c),e=b.sa&&b.sa.next().value);return e}
323
- function Lj(a,b,c,d){var e,f,g,h,k,l,m,p,n,t,v,y;return I(function(x){switch(x.g){case 1:return e=Ib,f=b.stream,g=b.sa,b.ab=!0,B(x,2),u(x,Mj(a,b,d),4);case 4:tf(a.j);if(a.B)return x["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h)return p=new Uint8Array(0),n=function(w){var D,C,A;return I(function(G){tf(a.j);if(a.B)return G["return"]();p=Nj(p,w);D=!1;C=0;(new yg).box("mdat",function(E){C=E.size+E.start;D=!0}).parse(p,!1,!0);if(!D)return G.D(0);
324
- A=p.subarray(0,C);p=p.subarray(C);return u(G,Oj(a,b,c,f,d,A),0)})},u(x,Pj(a,b,d,n),6);l=Pj(a,b,d);return u(x,l,7);case 7:return m=x.h,tf(a.j),a.B?x["return"]():b.Sb?(b.ab=!1,xj(a,b,0),x["return"]()):u(x,Oj(a,b,c,f,d,m),6);case 6:tf(a.j);if(a.B)return x["return"]();b.Qa=d;g.next();b.ab=!1;b.qe=!1;t=a.g.V.yb();v=t[b.type];Ya(JSON.stringify(v));b.Sb||a.g.le();xj(a,b,0);va(x,0);break;case 2:y=F(x);tf(a.j,y);if(a.B)return x["return"]();b.ab=!1;if(7001==y.code)b.ab=!1,b.eb=null,xj(a,b,0),x.D(0);else if(b.type==
325
- e.ha&&a.i.ignoreTextStreamFailures)a.h["delete"](e.ha),x.D(0);else if(3017==y.code)Qj(a,b,y),x.D(0);else if(1001==y.code&&y.data&&404==y.data[1])b.ab=!1,b.eb=null,xj(a,b,1),x.D(0);else return b.Hc=!0,y.severity=2,u(x,Ij(a,y),0)}})}function Nj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
326
- function Qj(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.qe})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Hc=!0;a.B=!0;a.g.onError(c);return}b.qe=!0}xj(a,b,4)}
327
- function Mj(a,b,c){var d,e,f,g,h,k,l;return I(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.be||e!=b.ae||f!=b.$d)h=function(){var p;return I(function(n){if(1==n.g)return B(n,2),b.ae=e,b.$d=f,b.be=g,u(n,xi(a.g.V,b.type,g,e,f,a.m.sequenceMode),4);if(2!=n.g)return va(n,0);p=F(n);b.ae=null;b.$d=null;b.be=null;throw p;})},d.push(h());!Vh(c.i,b.od)&&(b.od=c.i)&&(k=Pj(a,b,c.i),l=function(){var p,n,t;return I(function(v){switch(v.g){case 1:return B(v,
328
- 2),u(v,k,4);case 4:return p=v.h,tf(a.j),n=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,pi(a.g.V,b.type,p,null,n),5);case 5:va(v,0);break;case 2:throw t=F(v),b.od=null,t;}})},a.g.Og(c.startTime,c.i),d.push(l()));return u(m,Promise.all(d),0)})}
329
- function Oj(a,b,c,d,e,f){var g,h;return I(function(k){if(1==k.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes)&&(new yg).Y("emsg",function(l){var m=d.emsgSchemeIdUris;if(0===l.version){var p=l.reader.Oc();var n=l.reader.Oc();var t=l.reader.R();var v=l.reader.R();var y=l.reader.R();var x=l.reader.R();var w=e.startTime+v/t}else t=l.reader.R(),w=l.reader.lc()/t+e.timestampOffset,v=w-e.startTime,y=l.reader.R(),x=l.reader.R(),
330
- p=l.reader.Oc(),n=l.reader.Oc();l=l.reader.Cb(l.reader.W.byteLength-l.reader.oa());if(m&&m.includes(p)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==p?a.g.Pg():(m=(new Map).set("detail",{startTime:w,endTime:w+y/t,schemeIdUri:p,value:n,timescale:t,presentationTimeDelta:v,eventDuration:y,id:x,messageData:l}),m=new L(Rj,m),a.g.onEvent(m))}).parse(f),u(k,Sj(a,b,c),2);if(3!=k.g)return tf(a.j),h=b.Qc,b.Qc=!1,u(k,pi(a.g.V,b.type,f,e,g,h),3);tf(a.j);z(k)})}
331
- function Sj(a,b,c){var d,e,f,g;return I(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=li(a.g.V,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.V.remove(b.type,e,e+g),2)}tf(a.j);z(h)})}function Jj(a){return a&&a.type==Hb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
332
- function Pj(a,b,c,d){var e,f,g,h,k;return I(function(l){if(1==l.g)return e=rf,f=pj(c.Pa(),c.Sa,c.Ca,a.i.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof Uh,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Ob.request(e,f),b.Ja=h,u(l,h.promise,2);k=l.h;b.Ja=null;return l["return"](k.data)})}
333
- function Dj(a,b,c,d){var e,f;return I(function(g){if(1==g.g)return b.Sb=!1,b.Fd=!1,b.dd=0,b.zc=!0,b.Qa=null,b.od=null,b.sa=null,d?(e=a.g.jd(),f=a.g.V.getDuration(),u(g,a.g.V.remove(b.type,e+d,f),3)):u(g,wi(a.g.V,b.type),4);if(3!=g.g)return tf(a.j),c?u(g,a.g.V.flush(b.type),3):g.D(3);tf(a.j);b.zc=!1;b.endOfStream=!1;xj(a,b,0);z(g)})}
334
- function xj(a,b,c){var d=b.type;if(d!=Hb||a.h.has(d))b.eb=(new Oc(function(){var e;return I(function(f){if(1==f.g)return B(f,2),u(f,Gj(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);z(f)})})).S(c)}function sj(a){null!=a.eb&&(a.eb.stop(),a.eb=null)}function tj(a){return I(function(b){return a.Ja?u(b,a.Ja.abort(),0):b.D(0)})}function Ij(a,b){return I(function(c){if(1==c.g)return u(c,Ve(a.G),2);tf(a.j);a.g.onError(b);b.handled||a.i.failureCallback(b);z(c)})};function Tj(a,b){var c=Uj(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return Vj(d)});this.B=new sf(function(){return Wj(d)})}Tj.prototype.destroy=function(){return this.B.destroy()};function Wj(a){var b,c,d;return I(function(e){if(1==e.g)return a.h&&a.h.abort(),Xj(a),u(e,a.C,2);a.g&&a.g.$a.Pb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.$a.Pb();a.g=null;a.m=[];a.j=null;z(e)})}
335
- function Yj(a,b){var c={jc:function(){},td:function(){},Pb:function(){},onError:function(){},vd:function(){},Qi:function(){}};a.m.push({create:b,$a:c});a.h&&a.h.abort();Xj(a);return c}
336
- function Vj(a){return I(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Jb)var c=!1;else{a.g&&(a.g.$a.Pb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.$a.jc(),a.g={node:d.node,payload:d.payload,Jb:d.Jb,$a:c.$a}):c.$a.vd();c=!0}c?c=Promise.resolve():a.g?c=Zj(a):(a.j.Ng(a.i),a.A=new Mc,c=a.A);b=u(b,c,1)}return b})}
337
- function Zj(a){var b,c;return I(function(d){switch(d.g){case 1:return a.i=a.j.sg(a.i,a.l,a.g.node,a.g.payload),B(d,2),a.h=a.j.Xf(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.$a.td(),a.g=null);va(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.$a.Pb();else a.g.$a.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 Xj(a){a.A&&(a.A.resolve(),a.A=null)};function ak(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=ak.prototype;q.remove=function(a,b){if(!this.g)return!1;bk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
338
- 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(p,n){return p+"<"+n+">"},"");h=h.reduceRight(function(p,n){return p+"</"+n+">"},"");return g.lineBreak?"\n":g.nestedCues.length?g.nestedCues.map(b).join(""):k+g.payload+h}var c=a.map(function(g){if(g.nestedCues.length){var h=g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):
339
- [];var e={};c=r(c);for(var f=c.next();!f.done;e={Vb:e.Vb},f=c.next())e.Vb=f.value,a.some(function(g){return function(h){return h.startTime==g.Vb.startTime&&h.endTime==g.Vb.endTime&&h.text==g.Vb.payload?!0:!1}}(e))||(f=ck(e.Vb))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=r(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};
340
- q.destroy=function(){this.g&&(bk(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"};
341
- function ck(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}
342
- function bk(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",ak);ak.prototype.setTextVisibility=ak.prototype.setTextVisibility;ak.prototype.isTextVisible=ak.prototype.isTextVisible;ak.prototype.destroy=ak.prototype.destroy;ak.prototype.append=ak.prototype.append;ak.prototype.remove=ak.prototype.remove;function dk(){}function R(a){return document.createElement(a)}function ek(){return document.createElement("button")}function fk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}J("shaka.util.Dom",dk);dk.removeAllChildren=fk;function gk(a,b){var c=this;this.j=!1;this.i=[];this.C=a;this.m=b;this.g=R("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.B=(new P(function(){hk(c)})).ka(.25);this.h=new Map;this.A=new uf;this.A.o(document,"fullscreenchange",function(){hk(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){hk(c,
343
- !0)}),this.l.observe(this.g))}q=gk.prototype;q.append=function(a){var b=[].concat(ia(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={Vc:c.Vc},d=a.next())c.Vc=d.value,b.some(function(e){return function(f){return qc(f,e.Vc)}}(c))||this.i.push(c.Vc);hk(this)};q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.B&&this.B.stop();this.h.clear();this.A&&(this.A.release(),this.A=null);this.l&&(this.l.disconnect(),this.l=null)};
344
- q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});hk(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};
345
- function ik(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.h.get(k),m=k.startTime<=d&&k.endTime>d,p=l?l.Jf:null;l&&(g.push(l.bf),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(jk(a,k,e),l=a.h.get(k),p=l.Jf,f=!0));0<k.nestedCues.length&&p&&ik(a,k.nestedCues,p,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(n,t){return n.startTime!=t.startTime?n.startTime-t.startTime:n.endTime-t.endTime});
346
- h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),c.appendChild(d.bf)}}function hk(a,b){if(a.g){var c=a.C.currentTime;(!a.j||(void 0===b?0:b))&&0<a.h.size&&(fk(a.g),a.h.clear());if(a.j){for(var d=new Map,e=r(a.h.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));ik(a,a.i,a.g,c,[])}}}
347
- function jk(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=R(e);"br"!=e&&kk(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.h.set(b,{bf:f,Jf:c})}
348
- function kk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=lk(c.linePadding,c,a.m);f.paddingRight=lk(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
349
- "contain",f.backgroundPosition="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=mk(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");
350
- g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=lk(c.fontSize,c,a.m);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==kc?(f.width="100%",c.lineAlign==mc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==mc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==
351
- mc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Ac?"%":"px",d=c.region.viewportAnchorUnits==Ac?"%":"px",f.height=c.region.height+(c.region.heightUnits==Ac?"%":"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==kc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==
352
- c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==kc?f.width=c.size+"%":f.height=c.size+"%")}
353
- function lk(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function mk(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",gk);gk.prototype.setTextVisibility=gk.prototype.setTextVisibility;
354
- gk.prototype.isTextVisible=gk.prototype.isTextVisible;gk.prototype.remove=gk.prototype.remove;gk.prototype.destroy=gk.prototype.destroy;gk.prototype.append=gk.prototype.append;function nk(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,p=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");p&&k.push("u");l=k.reduce(function(n,t){return n+"<"+t+">"},
355
- "");k=k.reduceRight(function(n,t){return n+"</"+t+">"},"");return h.lineBreak?"\n":h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=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");break;case "right":k.push("align:right");break;case jc:k.push("align:middle");
356
- 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 ok(a,b){this.h=a;this.g=b;this.j="";this.A=void 0;this.i=!1;this.m=!0;this.l=!1}function pk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?qk:rk};d.ot=sk(c);var e=d.ot===tk||d.ot===uk||d.ot===vk||d.ot===wk;e&&(d.bl=xk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==wk&&(d.tb=yk(a,d.ot)/1E3);zk(a,b,d)}}catch(f){Ua("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
357
- function Ak(a,b,c){try{if(!a.g.enabled)return b;var d=Bk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=vk;break a;case "application/x-mpegurl":e=Ck;break a}e=void 0}d.ot=e;d.su=!0;var f=Dk(d);return Ek(b,f)}catch(g){return Ua("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Bk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.A,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
358
- function zk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Bk(a));c.pr=a.h.zb();var e=c.ot===tk||c.ot===vk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Fk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=Dk(c);f&&(b.uris=b.uris.map(function(g){return Ek(g,f)}))}}}
359
- function sk(a){var b=a.type;if(a.init)return Gk;if("video"==b)return a.codecs.includes(",")?vk:tk;if("audio"==b)return uk;if("text"==b)return"application/mp4"===a.mimeType?wk:Hk}function xk(a,b){var c=a.h.yb()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
360
- function yk(a,b){var c=a.h.Za();if(!c.length)return NaN;var d=c[0];c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case tk:return d.videoBandwidth||NaN;case uk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
361
- function Dk(a){function b(p){return 100*c(p/100)}function c(p){return Math.round(p)}function d(p){return!Number.isNaN(p)&&null!=p&&""!==p&&!1!==p}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(p){return encodeURIComponent(p)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
362
- l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Fk(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=Dk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
363
- function Ek(a,b){if(!b||a.includes("offline:"))return a;var c=new kb(a);c.g.set("CMCD",b);return c.toString()}var Ck="m",uk="a",tk="v",vk="av",Gk="i",Hk="c",wk="tt",rk="v",qk="l";J("shaka.util.CmcdManager.StreamingFormat",{Bh:"d",Ph:"h",wi:"s",ci:"o"});function Ik(){}
364
- function Jk(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]=cf(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=cf(l)),k=Jk(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?(Ra("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]):(Ra("Invalid config, unrecognized key "+
365
- k),g=!1)}return g}function Kk(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Lk(a,b){return a&&b}J("shaka.util.ConfigUtils",Ik);Ik.convertToConfigObject=Kk;Ik.mergeConfigObjects=Jk;function Mk(){}
366
- function Nk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ue(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){return Lk([g,h,k],g)},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Ue(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,dash:{clockSyncUri:"",
317
+ sj.prototype.Rc=function(){for(var a=this.g.ld(),b=t(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);c.sa=null;var e=this.g.V;d==Ib?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=oi(e,d),e=ci(e,a));if(!e){(null!=pi(this.g.V,d)||c.ab)&&Hj(this,c);c.Ja&&(c.Ja.abort(),c.Ja=null);if(d===Ib)for(d=this.g.V.F.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,Kh(d),d=t(d.j.values()),e=d.next();!e.done;e=d.next())Fh(e.value);c.Rc=!0}}};
318
+ function Hj(a,b){b.zc||b.Sb||(b.ab?(b.Sb=!0,b.fd=0):null==ni(a.g.V,b.type)?null==b.eb&&zj(a,b,0):(uj(b),Fj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
319
+ function wj(a){var b,c,d,e,f,g,h,k,l,m;return I(function(n){if(1==n.g){b=Jb;if(!a.l)throw new O(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Fb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Ma,a.l.video),d.add(a.l.video));a.A&&(c.set(b.ha,a.A),d.add(a.A));e=a.g.V;f=a.i.forceTransmuxTS;return u(n,e.init(c,f,a.m.sequenceMode),2)}vf(a.j);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.V.bb(p):a.g.V.bb(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),
320
+ a.h.has(k)||(m=yj(l),a.h.set(k,m),zj(a,m,0));z(n)})}function yj(a){return{stream:a,type:a.type,sa:null,Ra:null,qd:null,fe:null,ee:null,ce:null,Qb:null,endOfStream:!1,ab:!1,eb:null,Sb:!1,fd:0,Id:!1,zc:!1,Rc:!0,se:!1,Ic:!1,Ja:null}}
321
+ function Ij(a,b){var c,d,e,f,g;return I(function(h){switch(h.g){case 1:vf(a.j);if(b.ab||null==b.eb||b.zc)return h["return"]();b.eb=null;if(!b.Sb){h.D(2);break}return u(h,Fj(a,b,b.Id,b.fd),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.eb&&zj(a,b,0),h["return"]();case 4:A(h,6);d=Jj(a,b);null!=d&&(zj(a,b,d),b.Ic=!1);va(h,7);break;case 6:return e=
322
+ F(h),u(h,Kj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.h.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return u(h,a.g.V.endOfStream(),10);case 10:vf(a.j),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.bb(g),z(h)}})}
323
+ function Jj(a,b){if(Lj(b))return wi(a.g.V,b.stream.originalId||""),null;b.type==Ib&&xi(a.g.V);var c=a.g.ld(),d=b.Ra?b.Ra.endTime:c,e=qi(a.g.V,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.C;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.h.get(Ib))&&Lj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=pi(a.g.V,b.type);e=Mj(a,b,c,e);if(!e)return a.i.updateIntervalSeconds;f=Infinity;
324
+ var g=Array.from(a.h.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,Lj(h)||h.sa&&!h.sa.current()||(f=Math.min(f,h.Ra?h.Ra.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;Nj(a,b,c,e)["catch"](function(){});return null}
325
+ function Mj(a,b,c,d){if(b.sa)return b.sa.current();if(b.Ra||d)return b.sa=b.stream.segmentIndex.ac(b.Ra?b.Ra.endTime:d),b.sa&&b.sa.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.sa=b.stream.segmentIndex.ac(d),e=b.sa&&b.sa.next().value);e||(b.sa=b.stream.segmentIndex.ac(c),e=b.sa&&b.sa.next().value);return e}
326
+ function Nj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,w,y;return I(function(x){switch(x.g){case 1:e=Jb;f=b.stream;g=b.sa;b.ab=!0;A(x,2);if(2==d.nd())throw new O(1,1,1011);return u(x,Oj(a,b,d),4);case 4:vf(a.j);if(a.B)return x["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(v){var D,C,B;return I(function(G){vf(a.j);if(a.B)return G["return"]();n=Pj(n,v);D=!1;C=0;(new Ag).box("mdat",function(E){C=E.size+E.start;
327
+ D=!0}).parse(n,!1,!0);if(!D)return G.D(0);B=n.subarray(0,C);n=n.subarray(C);return u(G,Qj(a,b,c,f,d,B),0)})},u(x,Rj(a,b,d,p),6);l=Rj(a,b,d);return u(x,l,7);case 7:return m=x.h,vf(a.j),a.B?x["return"]():b.Sb?(b.ab=!1,zj(a,b,0),x["return"]()):u(x,Qj(a,b,c,f,d,m),6);case 6:vf(a.j);if(a.B)return x["return"]();b.Ra=d;g.next();b.ab=!1;b.se=!1;r=a.g.V.kb();w=r[b.type];Za(JSON.stringify(w));b.Sb||a.g.pe();zj(a,b,0);va(x,0);break;case 2:y=F(x);vf(a.j,y);if(a.B)return x["return"]();b.ab=!1;if(7001==y.code)b.ab=
328
+ !1,b.eb=null,zj(a,b,0),x.D(0);else if(b.type==e.ha&&a.i.ignoreTextStreamFailures)a.h["delete"](e.ha),x.D(0);else if(3017==y.code)Sj(a,b,y),x.D(0);else if(1001==y.code&&y.data&&404==y.data[1])b.ab=!1,b.eb=null,zj(a,b,1),x.D(0);else return b.Ic=!0,y.severity=2,u(x,Kj(a,y),0)}})}function Pj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
329
+ function Sj(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.se})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Ic=!0;a.B=!0;a.g.onError(c);return}b.se=!0}zj(a,b,4)}
330
+ function Oj(a,b,c){var d,e,f,g,h,k,l;return I(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.fe||e!=b.ee||f!=b.ce)h=function(){var n;return I(function(p){if(1==p.g)return A(p,2),b.ee=e,b.ce=f,b.fe=g,u(p,zi(a.g.V,b.type,g,e,f,a.m.sequenceMode),4);if(2!=p.g)return va(p,0);n=F(p);b.ee=null;b.ce=null;b.fe=null;throw n;})},d.push(h());!Xh(c.i,b.qd)&&(b.qd=c.i)&&(k=Rj(a,b,c.i),l=function(){var n,p,r;return I(function(w){switch(w.g){case 1:return A(w,
331
+ 2),u(w,k,4);case 4:return n=w.h,vf(a.j),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(w,ri(a.g.V,b.type,n,null,p),5);case 5:va(w,0);break;case 2:throw r=F(w),b.qd=null,r;}})},a.g.Ug(c.startTime,c.i),d.push(l()));return u(m,Promise.all(d),0)})}
332
+ function Qj(a,b,c,d,e,f){var g,h;return I(function(k){if(1==k.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes)&&(new Ag).Y("emsg",function(l){var m=d.emsgSchemeIdUris;if(0===l.version){var n=l.reader.Pc();var p=l.reader.Pc();var r=l.reader.R();var w=l.reader.R();var y=l.reader.R();var x=l.reader.R();var v=e.startTime+w/r}else r=l.reader.R(),v=l.reader.lc()/r+e.timestampOffset,w=v-e.startTime,y=l.reader.R(),x=l.reader.R(),
333
+ n=l.reader.Pc(),p=l.reader.Pc();l=l.reader.Cb(l.reader.W.byteLength-l.reader.oa());if(m&&m.includes(n)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==n?a.g.Vg():(m=(new Map).set("detail",{startTime:v,endTime:v+y/r,schemeIdUri:n,value:p,timescale:r,presentationTimeDelta:w,eventDuration:y,id:x,messageData:l}),m=new L("emsg",m),a.g.onEvent(m))}).parse(f),u(k,Tj(a,b,c),2);if(3!=k.g)return vf(a.j),h=b.Rc,b.Rc=!1,u(k,ri(a.g.V,b.type,f,e,g,h),3);vf(a.j);z(k)})}
334
+ function Tj(a,b,c){var d,e,f,g;return I(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=ni(a.g.V,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.V.remove(b.type,e,e+g),2)}vf(a.j);z(h)})}function Lj(a){return a&&a.type==Ib&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
335
+ function Rj(a,b,c,d){var e,f,g,h,k;return I(function(l){if(1==l.g)return e=tf,f=rj(c.Pa(),c.Ta,c.Ca,a.i.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof Wh,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Ob.request(e,f),b.Ja=h,u(l,h.promise,2);k=l.h;b.Ja=null;return l["return"](k.data)})}
336
+ function Fj(a,b,c,d){var e,f;return I(function(g){if(1==g.g)return b.Sb=!1,b.Id=!1,b.fd=0,b.zc=!0,b.Ra=null,b.qd=null,b.sa=null,d?(e=a.g.ld(),f=a.g.V.getDuration(),u(g,a.g.V.remove(b.type,e+d,f),3)):u(g,yi(a.g.V,b.type),4);if(3!=g.g)return vf(a.j),c?u(g,a.g.V.flush(b.type),3):g.D(3);vf(a.j);b.zc=!1;b.endOfStream=!1;zj(a,b,0);z(g)})}
337
+ function zj(a,b,c){var d=b.type;if(d!=Ib||a.h.has(d))b.eb=(new Pc(function(){var e;return I(function(f){if(1==f.g)return A(f,2),u(f,Ij(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);z(f)})})).T(c)}function uj(a){null!=a.eb&&(a.eb.stop(),a.eb=null)}function vj(a){return I(function(b){return a.Ja?u(b,a.Ja.abort(),0):b.D(0)})}function Kj(a,b){return I(function(c){if(1==c.g)return u(c,Xe(a.G),2);vf(a.j);a.g.onError(b);b.handled||a.i.failureCallback(b);z(c)})};function Uj(a,b){var c=Vj(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return Wj(d)});this.B=new uf(function(){return Xj(d)})}Uj.prototype.destroy=function(){return this.B.destroy()};function Xj(a){var b,c,d;return I(function(e){if(1==e.g)return a.h&&a.h.abort(),Yj(a),u(e,a.C,2);a.g&&a.g.$a.Pb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.$a.Pb();a.g=null;a.m=[];a.j=null;z(e)})}
338
+ function Zj(a,b){var c={jc:function(){},vd:function(){},Pb:function(){},onError:function(){},xd:function(){},Yi:function(){}};a.m.push({create:b,$a:c});a.h&&a.h.abort();Yj(a);return c}
339
+ function Wj(a){return I(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Jb)var c=!1;else{a.g&&(a.g.$a.Pb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.$a.jc(),a.g={node:d.node,payload:d.payload,Jb:d.Jb,$a:c.$a}):c.$a.xd();c=!0}c?c=Promise.resolve():a.g?c=ak(a):(a.j.Tg(a.i),a.A=new Nc,c=a.A);b=u(b,c,1)}return b})}
340
+ function ak(a){var b,c;return I(function(d){switch(d.g){case 1:return a.i=a.j.zg(a.i,a.l,a.g.node,a.g.payload),A(d,2),a.h=a.j.dg(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.$a.vd(),a.g=null);va(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.$a.Pb();else a.g.$a.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 Yj(a){a.A&&(a.A.resolve(),a.A=null)};function bk(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=bk.prototype;q.remove=function(a,b){if(!this.g)return!1;ck(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
341
+ 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?"\n":g.nestedCues.length?g.nestedCues.map(b).join(""):k+g.payload+h}var c=a.map(function(g){if(g.nestedCues.length){var h=g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):
342
+ [];var e={};c=t(c);for(var f=c.next();!f.done;e={Vb:e.Vb},f=c.next())e.Vb=f.value,a.some(function(g){return function(h){return h.startTime==g.Vb.startTime&&h.endTime==g.Vb.endTime&&h.text==g.Vb.payload?!0:!1}}(e))||(f=dk(e.Vb))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=t(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};
343
+ q.destroy=function(){this.g&&(ck(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"};
344
+ function dk(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}
345
+ function ck(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}J("shaka.text.SimpleTextDisplayer",bk);bk.prototype.setTextVisibility=bk.prototype.setTextVisibility;bk.prototype.isTextVisible=bk.prototype.isTextVisible;bk.prototype.destroy=bk.prototype.destroy;bk.prototype.append=bk.prototype.append;bk.prototype.remove=bk.prototype.remove;function ek(){}function R(a){return document.createElement(a)}function fk(){return document.createElement("button")}function gk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}J("shaka.util.Dom",ek);ek.removeAllChildren=gk;function hk(a,b){var c=this;this.j=!1;this.i=[];this.C=a;this.m=b;this.g=R("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.B=(new P(function(){ik(c)})).ka(.25);this.h=new Map;this.A=new wf;this.A.o(document,"fullscreenchange",function(){ik(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){ik(c,
346
+ !0)}),this.l.observe(this.g))}q=hk.prototype;q.append=function(a){var b=[].concat(ia(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={Wc:c.Wc},d=a.next())c.Wc=d.value,b.some(function(e){return function(f){return uc(f,e.Wc)}}(c))||this.i.push(c.Wc);ik(this)};q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.B&&this.B.stop();this.h.clear();this.A&&(this.A.release(),this.A=null);this.l&&(this.l.disconnect(),this.l=null)};
347
+ q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});ik(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};
348
+ function jk(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Of:null;l&&(g.push(l.gf),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(kk(a,k,e),l=a.h.get(k),n=l.Of,f=!0));0<k.nestedCues.length&&n&&jk(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(p,r){return p.startTime!=r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});
349
+ h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),c.appendChild(d.gf)}}function ik(a,b){if(a.g){var c=a.C.currentTime;(!a.j||(void 0===b?0:b))&&0<a.h.size&&(gk(a.g),a.h.clear());if(a.j){for(var d=new Map,e=t(a.h.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));jk(a,a.i,a.g,c,[])}}}
350
+ function kk(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=R(e);"br"!=e&&lk(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.h.set(b,{gf:f,Of:c})}
351
+ function lk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=mk(c.linePadding,c,a.m);f.paddingRight=mk(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
352
+ "no-repeat",f.backgroundSize="contain",f.backgroundPosition="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=nk(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"==
353
+ c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=mk(c.fontSize,c,a.m);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==lc?(f.width="100%",c.lineAlign==nc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==nc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+
354
+ "%")):(f.height="100%",c.lineAlign==nc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Bc?"%":"px",d=c.region.viewportAnchorUnits==Bc?"%":"px",f.height=c.region.height+(c.region.heightUnits==Bc?"%":"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==lc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?
355
+ f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==lc?f.width=c.size+"%":f.height=c.size+"%")}
356
+ function mk(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function nk(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",hk);hk.prototype.setTextVisibility=hk.prototype.setTextVisibility;
357
+ hk.prototype.isTextVisible=hk.prototype.isTextVisible;hk.prototype.remove=hk.prototype.remove;hk.prototype.destroy=hk.prototype.destroy;hk.prototype.append=hk.prototype.append;function ok(a,b){function c(h){for(var k=h,l=t(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,r){return p+"<"+r+">"},
358
+ "");k=k.reduceRight(function(p,r){return p+"</"+r+">"},"");return h.lineBreak?"\n":h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=t(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");break;case "right":k.push("align:right");break;case kc:k.push("align:middle");
359
+ 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 pk(a,b){this.h=a;this.g=b;this.j="";this.A=void 0;this.i=!1;this.m=!0;this.l=!1}function qk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.U()?rk:sk};d.ot=tk(c);var e=d.ot===uk||d.ot===vk||d.ot===wk||d.ot===xk;e&&(d.bl=yk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==xk&&(d.tb=zk(a,d.ot)/1E3);Ak(a,b,d)}}catch(f){Va("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
360
+ function Bk(a,b,c){try{if(!a.g.enabled)return b;var d=Ck(a);a:{switch(c){case "video/webm":case "video/mp4":var e=wk;break a;case "application/x-mpegurl":e=Dk;break a}e=void 0}d.ot=e;d.su=!0;var f=Ek(d);return Fk(b,f)}catch(g){return Va("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Ck(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.A,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
361
+ function Ak(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Ck(a));c.pr=a.h.zb();var e=c.ot===uk||c.ot===wk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Gk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=Ek(c);f&&(b.uris=b.uris.map(function(g){return Fk(g,f)}))}}}
362
+ function tk(a){var b=a.type;if(a.init)return Hk;if("video"==b)return a.codecs.includes(",")?wk:uk;if("audio"==b)return vk;if("text"==b)return"application/mp4"===a.mimeType?xk:Ik}function yk(a,b){var c=a.h.kb()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
363
+ function zk(a,b){var c=a.h.Qa();if(!c.length)return NaN;var d=c[0];c=t(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case uk:return d.videoBandwidth||NaN;case vk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
364
+ function Ek(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
365
+ l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Gk(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=Ek(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
366
+ function Fk(a,b){if(!b||a.includes("offline:"))return a;var c=new lb(a);c.g.set("CMCD",b);return c.toString()}var Dk="m",vk="a",uk="v",wk="av",Hk="i",Ik="c",xk="tt",sk="v",rk="l";J("shaka.util.CmcdManager.StreamingFormat",{Hh:"d",Wh:"h",Ei:"s",li:"o"});function Jk(){}
367
+ function Kk(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]=ef(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=ef(l)),k=Kk(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?(Ta("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ua("Unexpected number of arguments for "+k),a[h]=b[h]):(Ta("Invalid config, unrecognized key "+
368
+ k),g=!1)}return g}function Lk(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Mk(a,b){return a&&b}J("shaka.util.ConfigUtils",Jk);Jk.convertToConfigObject=Lk;Jk.mergeConfigObjects=Kk;function Nk(){}
369
+ function Ok(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:We(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){return Mk([g,h,k],g)},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{}},c={retryParameters:We(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,dash:{clockSyncUri:"",
367
370
  ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
368
- "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return Lk([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"'}},d={retryParameters:Ue(),failureCallback:function(g){return Lk([g],void 0)},
369
- rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};if(navigator.userAgent.match(/Edge\//)||Vc()||Xc())d.gapDetectionThreshold=
370
- .5;if(Uc("Web0S")||Vc()||Xc())d.stallSkip=0;var e={trackSelectionCallback:function(g){return I(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return I(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return Lk([g,h],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,offline:e,
371
- abrFactory:function(){return new Ce},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",
372
- preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return I(function(h){return h["return"](Ok(g,
373
- f.preferredAudioLanguage))})};return f}function Pk(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 Jk(a,b,c||Nk(),d,"")}
374
- function Ok(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Tb(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Lb(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/
375
- 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!=Hb&&"image"!=g.type||c.push(g);return c}J("shaka.util.PlayerConfiguration",Mk);Mk.mergeConfigObjects=Pk;Mk.createDefault=Nk;function Qk(){this.g=null;this.h=[]}function Rk(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 Sk(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}
376
- function Tk(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 Uk(){this.i=this.h=null;this.g=[]}function Vk(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 Wk(){this.A=this.B=this.H=this.F=this.m=this.j=this.G=this.l=this.i=this.I=this.J=this.K=this.C=this.N=NaN;this.g=new Qk;this.h=new Uk};function S(a,b){eb.call(this);var c=this;this.l=Xk;this.ld=this.g=null;this.ba=!1;this.pd=new uf;this.hb=new uf;this.A=new uf;this.me=this.C=this.gb=this.i=this.qd=this.J=this.j=this.ea=this.U=this.sd=this.N=this.md=this.I=this.Wa=this.G=this.K=this.m=this.H=null;this.Kf=1E9;this.h=Yk(this);this.Qe={width:Infinity,height:Infinity};this.B=null;this.ya=new Le(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.za=this.h.preferredTextLanguage;this.vb=this.h.preferredTextRole;
377
- this.ib=this.h.preferForcedSubs;this.fb=[];this.Bc=null;b&&b(this);this.H=Zk(this);this.H.Be(this.h.streaming.forceHTTPS);this.F=null;$k&&(this.F=$k());this.pd.o(window,"online",function(){c.re()});this.P={name:"detach"};this.X={name:"attach"};this.aa={name:"unload"};this.Re={name:"manifest-parser"};this.Ne={name:"manifest"};this.La={name:"media-source"};this.oe={name:"drm-engine"};this.$={name:"load"};this.Se={name:"src-equals-drm-engine"};this.Xa={name:"src-equals"};var d=new Map;d.set(this.X,function(e,
378
- f){return $e(al(c,e,f))});d.set(this.P,function(e){e.O&&(c.hb.Pc(),e.O=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return $e(e)});d.set(this.aa,function(e){return $e(bl(c,e))});d.set(this.La,function(e){e=cl(c,e);return $e(e)});d.set(this.Re,function(e,f){var g=dl(c,e,f);return $e(g)});d.set(this.Ne,function(e){return el(c,e)});d.set(this.oe,function(e){e=fl(c,e);return $e(e)});d.set(this.$,function(e,f){return $e(gl(c,e,f))});d.set(this.Se,function(e,f){var g=hl(c,e,f);return $e(g)});d.set(this.Xa,
379
- function(e,f){return il(c,e,f)});this.ma=new Tj(this.P,{sg:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.X);e==c.X&&(k=g==c.P||f.O!=h.O?c.P:g==c.X?c.X:g==c.La||g==c.$?c.La:g==c.Xa?c.Se:null);e==c.La&&(k=g==c.$&&f.O==h.O?c.Re:c.aa);e==c.Re&&(k=jl(c.$,c.Ne,c.aa,g,f,h));e==c.Ne&&(k=jl(c.$,c.oe,c.aa,g,f,h));e==c.oe&&(k=jl(c.$,c.$,c.aa,g,f,h));e==c.Se&&(k=g==c.Xa&&f.O==h.O?c.Xa:c.aa);if(e==c.$||e==c.Xa)k=c.aa;e==c.aa&&(k=h.O&&f.O==h.O?c.X:c.P);return k},Xf:function(e,f,g){c.dispatchEvent(kl(ll,
380
- (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return I(function(f){return 1==f.g?u(f,bl(c,e),2):f["return"](e.O?c.X:c.P)})},Ng:function(e){c.dispatchEvent(kl(ml,(new Map).set("state",e.name)))}});a&&this.yc(a,!0)}qa(S,eb);function kl(a,b){return new L(a,b)}q=S.prototype;
381
- q.destroy=function(){var a=this,b;return I(function(c){switch(c.g){case 1:if(a.l==nl)return c["return"]();a.l=nl;b=Yj(a.ma,function(){return{node:a.P,payload:Uj(),Jb:!1}});return u(c,new Promise(function(d){b.jc=function(){};b.td=function(){d()};b.Pb=function(){d()};b.onError=function(){d()};b.vd=function(){d()}}),2);case 2:return u(c,a.ma.destroy(),3);case 3:a.pd&&(a.pd.release(),a.pd=null);a.hb&&(a.hb.release(),a.hb=null);a.A&&(a.A.release(),a.A=null);a.me=null;a.C=null;a.h=null;a.B=null;a.ld=null;
382
- a.U=null;if(!a.H){c.D(4);break}return u(c,a.H.destroy(),5);case 5:a.H=null;case 4:eb.prototype.release.call(a),z(c)}})};
383
- function ol(){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)||Uc("Trident/"))return!1;var a=$c();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
384
- !1:Pc()?!0:Rc("application/x-mpegurl")}q.yc=function(a,b){b=void 0===b?!0:b;if(this.l==nl)return Promise.reject(pl());var c=Uj();c.O=a;Pc()||(b=!1);var d=b?this.La:this.X,e=Yj(this.ma,function(){return{node:d,payload:c,Jb:!1}});e.jc=function(){};return ql(e)};q.detach=function(){var a=this;if(this.l==nl)return Promise.reject(pl());var b=Yj(this.ma,function(){return{node:a.P,payload:Uj(),Jb:!1}});b.jc=function(){};return ql(b)};
385
- q.Oe=function(a){var b=this;a=void 0===a?!0:a;if(this.l==nl)return Promise.reject(pl());Pc()||(a=!1);var c=Uj(),d=Yj(this.ma,function(e){var f=e.O&&a?b.La:e.O?b.X:b.P;c.O=e.O;return{node:f,payload:c,Jb:!1}});d.jc=function(){};return ql(d)};q.nh=function(a){this.Bc=a};
386
- q.load=function(a,b,c){var d=this;this.Bc=null;if(this.l==nl)return Promise.reject(pl());this.dispatchEvent(kl(rl));var e=Uj();e.uri=a;e.Ie=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=sl(this,e)?this.Xa:this.$,g=Yj(this.ma,function(h){if(null==h.O)return null;e.O=h.O;return{node:f,payload:e,Jb:!0}});this.B=new Wk;this.U=tl(this);g.jc=function(){};return new Promise(function(h,k){g.vd=function(){return k(new O(2,7,7002))};g.td=function(){h();d.dispatchEvent(kl(ul))};g.Pb=function(){return k(pl())};
387
- g.onError=function(l){return k(l)}})};function sl(a,b){if(!Pc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=sg(d),c=vl[c]);if(c){if(""==(b.O||Sc()).canPlayType(c))return!1;if(!Pc()||!(c in rg||sg(d)in tg)||a.h.streaming.preferNativeHls)return!0;if(Yc())return a.h.streaming.useNativeHlsOnSafari}return!1}function al(a,b,c){null==b.O&&(b.O=c.O,a.hb.o(b.O,"error",function(){var d=wl(a);d&&xl(a,d)}));a.g=b.O;return Promise.resolve()}
388
- function bl(a,b){var c,d,e,f,g,h,k,l,m;return I(function(p){switch(p.g){case 1:return a.l!=nl&&(a.l=Xk),c=a.fb.map(function(n){return n()}),a.fb=[],u(p,Promise.all(c),2);case 2:a.dispatchEvent(kl(yl));b.mimeType=null;b.startTime=null;b.uri=null;b.O&&a.A.Pc();a.Wa&&(a.Wa.release(),a.Wa=null);a.md&&(a.md.stop(),a.md=null);if(!a.J){p.D(3);break}return u(p,a.J.stop(),4);case 4:a.J=null,a.qd=null;case 3:if(!a.C){p.D(5);break}return u(p,a.C.stop(),5);case 5:if(!a.j){p.D(7);break}return u(p,a.j.destroy(),
389
- 8);case 8:a.j=null;case 7:a.I&&(a.I.release(),a.I=null);a.G&&(a.G.release(),a.G=null);if(!a.K){p.D(9);break}return u(p,a.K.destroy(),10);case 10:a.K=null;case 9:if(a.F)a.F.onAssetUnload();if(!b.O||!b.O.src){p.D(11);break}return u(p,new Promise(function(n){return(new P(n)).S(.1)}),12);case 12:for(b.O.removeAttribute("src"),b.O.load();b.O.lastChild;)b.O.removeChild(b.O.firstChild);case 11:if(!a.m){p.D(13);break}return u(p,a.m.destroy(),14);case 14:a.m=null;case 13:a.gb=null;a.N=null;if(a.i){d=r(a.i.variants);
390
- 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.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.B=new Wk;a.se=null;zl(a);z(p)}})}
391
- function cl(a,b){var c,d,e,f,g,h;return I(function(k){if(1==k.g)return c=new Sh,d=a.h.textDisplayFactory,e=d(),a.se=d,f=Al(b.O,c,e,function(l,m,p){l=r(l);for(var n=l.next();!n.done;n=l.next())if(n=n.value,n.data&&n.cueTime&&n.frames){for(var t=n.cueTime+m,v=p,y=r(n.frames),x=y.next();!x.done;x=y.next())Bl(a,t,v,"ID3",x.value);if(a.F)a.F.onHlsTimedMetadata(n,t)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.H=h,u(k,f.I,2);a.K=f;z(k)})}
392
- function dl(a,b,c){var d,e,f,g;return I(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.gb=d,f=a,u(h,qg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.qd=h.h;a.J=a.qd();g=cf(a.h.manifest);c.O&&"AUDIO"===c.O.nodeName&&(g.disableVideo=!0);a.J.configure(g);z(h)})}
393
- function el(a,b){var c=b.uri,d=a.H;a.sd=new jj(function(){return a.Ia()});a.sd.addEventListener("regionadd",function(g){g=g.region;Cl(a,Dl,g);if(a.F)a.F.onDashTimedMetadata(g)});a.ea=null;a.h.streaming.observeQualityChanges&&(a.ea=new fj(function(){return a.yb()}),a.ea.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
394
- mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(kl(El,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.U;try{k.g.enabled&&(k.A=h.format,zk(k,g,{ot:Ck,su:!k.i}))}catch(l){Ua("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){pk(a.U,g,h)},filter:function(g){return Fl(a,g)},makeTextStreamsForClosedCaptions:function(g){return Gl(a,g)},
395
- onTimelineRegionAdded:function(g){var h=a.sd;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),g=new L("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return xl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
396
- enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new We(function(){var g,h,k,l;return I(function(m){if(1==m.g)return g=a,u(m,a.J.start(c,e),2);g.i=m.h;h=kl(Hl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new O(2,4,4036);Il(a.i);k=Date.now()/1E3;l=k-f;a.B.G=l;z(m)})}(),function(){return a.J.stop()})}
397
- function fl(a,b){var c,d;return I(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Jl(a,{Ob:a.H,onError:function(f){xl(a,f)},ud:function(f){Kl(a,f)},onExpirationUpdated:function(f,g){Ll(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Ml&&d&&(d=!1,a.B.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,Jf(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.yc(b.O),3):u(e,Fl(a,a.i),0)})}
398
- function gl(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v;return I(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Bc&&(b.startTime=a.Bc,a.Bc=null);d=b.O;e=b.uri;a.gb=e;a.I=new bj({kd:function(){return d.playbackRate},gd:function(){return d.defaultPlaybackRate},De:function(x){d.playbackRate=x},vf:function(x){d.currentTime+=x}});f=function(){return Nl(a)};g=function(){return Ol(a)};a.A.o(d,"playing",f);a.A.o(d,"pause",f);a.A.o(d,"ended",f);a.A.o(d,"ratechange",g);h=a.h.abrFactory;a.C&&a.me==h||
399
- (a.me=h,a.C=h(),a.C.configure(a.h.abr));a.ya=new Le(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.za=a.h.preferredTextLanguage;a.vb=a.h.preferredTextRole;a.ib=a.h.preferForcedSubs;Pl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C.init(function(x,w,D){a.j&&x!=a.j.l&&Ql(a,x,!0,void 0===w?!1:w,void 0===D?0:D)});a.G=Rl(a,b.startTime);a.Wa=Sl(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Tl(a,k);Od(a.i,a.h.preferredVideoCodecs,
400
- a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Ul(a);a.j.configure(a.h.streaming);a.l=Vl;d.textTracks&&a.A.o(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":Wl(a,x)}});a.dispatchEvent(kl(Xl));l=null;if(m=a.Za().find(function(x){return x.active})){y.D(2);break}l=Yl(a)?a.C.chooseVariant():null;Ql(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.D(3);break}p=a.G.m();return u(y,Zl(l,p),4);case 4:n=y.h,a.G.A(n);
401
- case 3:$l(a,null,pe(l));case 2:return t=a.Ab().find(function(x){return x.active}),t||((v=ze(a.i.textStreams,a.za,a.vb,a.ib)[0]||null)&&Vk(a.B.h,v,!0),l&&(v?(l.audio&&am(a,l.audio,v)&&(a.ba=!0),a.ba&&a.K.m.setTextVisibility(!0),bm(a)):a.ba=!1),v&&(a.h.streaming.alwaysStreamText||a.Nb())&&Cj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.C.enable(),cm(a)),de(a.j?a.j.l:null,a.i),dm(a.i),em(a),Yl(a),a.i.variants.some(function(x){return x.primary}),a.A.Fa(d,"loadedmetadata",function(){a.B.l=Date.now()/
402
- 1E3-c.Ie}),z(y)}})}
403
- function hl(a,b,c){var d,e,f,g,h,k,l;return I(function(m){return 1==m.g?(d=Ib,e=Date.now()/1E3,f=!0,a.m=Jl(a,{Ob:a.H,onError:function(p){xl(a,p)},ud:function(p){Kl(a,p)},onExpirationUpdated:function(p,n){Ll(a,p,n)},onEvent:function(p){a.dispatchEvent(p);p.type==Ml&&f&&(f=!1,a.B.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=sg(g),k=vl[h],"application/x-mpegurl"==k&&Yc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
404
- createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Bd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.X=!0,u(m,Jf(a.m,[l],[]),2)):u(m,a.m.yc(b.O),
405
- 0)})}
406
- function il(a,b,c){function d(){return Nl(a)}b.uri=c.uri;b.startTime=c.startTime;a.gb=b.uri;var e=b.O;a.G=new Ri(e);var f=!1;a.fb.push(function(){f=!0});null!=b.startTime&&a.G.A(b.startTime);a.I=new bj({kd:function(){return e.playbackRate},gd:function(){return e.defaultPlaybackRate},De:function(k){e.playbackRate=k},vf:function(k){e.currentTime+=k}});Tl(a,a.h.streaming.rebufferingGoal);a.A.o(e,"playing",d);a.A.o(e,"pause",d);a.A.o(e,"ended",d);a.A.o(e,"ratechange",function(){return Ol(a)});"none"!=e.preload&&
407
- a.A.Fa(e,"loadedmetadata",function(){a.B.l=Date.now()/1E3-c.Ie});e.audioTracks&&(a.A.o(e.audioTracks,"addtrack",function(){return em(a)}),a.A.o(e.audioTracks,"removetrack",function(){return em(a)}),a.A.o(e.audioTracks,"change",function(){return em(a)}));e.textTracks&&(a.A.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":fm(a,k);break;case "chapters":Wl(a,k);break;default:em(a)}}),a.A.o(e.textTracks,"removetrack",function(){return em(a)}),a.A.o(e.textTracks,
408
- "change",function(){return em(a)}));var g=sg(b.uri);e.src=Ak(a.U,b.uri,vl[g]);(Vc()||Uc("Web0S"))&&e.load();a.l=gm;a.dispatchEvent(kl(Xl));var h=new Mc;Ii(e,HTMLMediaElement.HAVE_METADATA,a.A,function(){h.resolve()});Ii(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.A,function(){var k;return I(function(l){if(1==l.g)return hm(a),k=im(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):u(l,new Promise(function(m){a.A.Fa(e.textTracks,"change",m);(new P(m)).S(1)}),2);if(f)return l["return"]();jm(a);z(l)})});
409
- e.error?h.reject(wl(a)):"none"==e.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.'),h.resolve());a.A.Fa(e,"error",function(){h.reject(wl(a))});return new We(h,function(){h.reject(new O(2,7,7001));return Promise.resolve()})}
410
- function hm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Bd(b);var c=a.h.preferredVariantRole;""!=c&&a.Bd(b,c)}}function jm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.we(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.we(b,d,c)}}
411
- function fm(a,b){if("metadata"==b.kind){b.mode="hidden";a.A.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Bl(a,e.startTime,e.endTime,e.type,e.value),a.F)a.F.onCueMetadataChange(e.value)});var c=(new P(function(){var d=km(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).xa().S(.5);a.fb.push(function(){c.stop()})}}
412
- function Bl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(kl(lm,b))}function Wl(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new P(function(){b.mode="hidden"})).xa().S(.5);a.fb.push(function(){c.stop()})}}function Il(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 Jl(a,b){return new Cf(b,a.h.drm.updateExpirationTime)}
413
- function Zk(a){return new gf(function(b,c){a.C&&a.C.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(kl(mm,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(kl(nm,b))})}function Rl(a,b){return new Si(a.g,a.i,a.h.streaming,b,function(){a.Wa&&ej(a.Wa,!0);a.j&&a.j.Qc();a.N&&om(a)})}
414
- function Sl(a){var b=new kj(a.sd);b.addEventListener("enter",function(d){Cl(a,pm,d.region)});b.addEventListener("exit",function(d){Cl(a,qm,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Cl(a,pm,e),Cl(a,qm,e))});var c=new dj(a.g);c.g.add(b);a.ea&&c.g.add(a.ea);return c}function Tl(a,b){a.N=new Pe;a.N.g=Re;Se(a.N,b,Math.min(.5,b/2));zl(a);a.md=(new P(function(){om(a)})).ka(.25)}
415
- function om(a){switch(a.l){case gm:if(a.g.ended)var b=!0;else{var c=$h(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Vl:a:if(a.g.ended||ki(a.K))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Ib();var d=$h(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=bi(a.g.buffered,a.g.currentTime);c=a.N;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Qe:Re;c.g=d;b!=d&&zl(a)}function Al(a,b,c,d){return new ei(a,b,c,d)}
416
- function tl(a){return new ok({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},yb:function(){return a.yb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Za:function(){return a.Za()},zb:function(){return a.zb()},T:function(){return a.T()}},a.h.cmcd)}
417
- function Ul(a){return new qj(a.i,{jd:function(){return a.G.m()},getBandwidthEstimate:function(){return a.C.getBandwidthEstimate()},modifySegmentRequest:function(b,c){pk(a.U,b,c)},V:a.K,Ob:a.H,onError:function(b){return xl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Pg:function(){a.J&&a.J.update&&a.J.update()},le:function(){a.G&&a.G.G();om(a)},Og:function(b,c){var d=c.fe;d&&a.ea&&hj(a.ea,d,b)}})}
418
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Kk(a,b));a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Pk(this.h,a,Yk(this));rm(this);return c};
419
- function rm(a){if(a.J){var b=cf(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{sm(a,a.i)}catch(f){xl(a,f)}a.C&&Yl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||tm(a)}a.H&&a.H.Be(a.h.streaming.forceHTTPS);if(a.K&&(a.K.H=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.se!=b)){var c=b(),d=a.K,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=
420
- c);a.se=b;a.j&&(b=a.j,(c=b.h.get(Hb))&&Aj(b,c.stream,!0,0,!0))}a.C&&(a.C.configure(a.h.abr),a.h.abr.enabled?a.C.enable():a.C.disable(),cm(a));a.N&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Se(a.N,b,Math.min(.5,b/2)));a.i&&Pl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Yk(this);Pk(a,this.h,Yk(this));return a};
421
- q.$f=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.Ia().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.Zg=function(){for(var a in this.h)delete this.h[a];Pk(this.h,Yk(this),Yk(this));rm(this)};q.mf=function(){return this.l};q.rg=function(){return this.g};q.Ec=function(){return this.H};q.Vd=function(){return this.gb};
422
- q.fd=function(){return this.F?this.F:null};q.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Lb=function(){return this.i?this.i.presentationTimeline.Lb():!1};q.ec=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
423
- q.Ia=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.cc(),end:a.kb()}}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.Dg=function(){this.T()&&(this.g.currentTime=this.Ia().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Dc=function(){return this.m?this.m.Dc():Infinity};q.hd=function(){return this.m?this.m.hd():{}};
424
- q.Jc=function(){return this.N?this.N.g==Re:!1};q.zb=function(){return this.g?this.I?this.I.i:1:0};q.Me=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==Vl&&(this.C.playbackRateChanged(a),zj(this.j,1<Math.abs(a))))};q.We=function(){var a=this.I.gd();this.l==gm&&this.I.set(a);this.l==Vl&&(this.I.set(a),this.C.playbackRateChanged(a),zj(this.j,!1))};
425
- q.Za=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,xe(e)){var f=pe(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 we(g)}):[]};
426
- q.Ab=function(){if(this.i){for(var a=this.j?this.j.A:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=qe(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?im(this).map(function(f){return ue(f)}):[]};q.jg=function(){return this.i?this.i.imageStreams.map(function(a){return re(a)}):[]};
427
- q.zg=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,v,y,x,w,D,C,A;return I(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?G.D(3):u(G,d.createSegmentIndex(),3):G["return"](null):G.D(2);if(2!=G.g){e=d.segmentIndex.find(b);if(null==e)return G["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return G["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;t=l/p;
428
- v=m*p;y=f.j-f.startTime;x=f.l||y/v;w=f.startTime;C=D=0;1<v&&(A=Math.floor((b-f.startTime)/x),w=f.startTime+A*x,D=A%m*n,C=Math.floor(A/m)*t);return G["return"]({imageHeight:l,imageWidth:k,height:t,positionX:D,positionY:C,startTime:w,duration:x,uris:f.Pa(),width:n})}return G["return"](null)})};
429
- q.xe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.A&&(Vk(this.B.h,b,!1),Cj(this.j,b),um(this),this.za=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=im(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,se(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";um(this)}};
430
- q.ye=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&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.i.variants.find(function(e){return e.id==a.id});d&&xe(d)&&(Ql(this,d,!1,b,c),this.ya=new Ke(d),Yl(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,
431
- se(c)==a.id){vm(this,c);break}};q.Zf=function(){return wm(this.Za())};q.yg=function(){return wm(this.Ab())};q.Yf=function(){return Array.from(xm(this.Za()))};q.xg=function(){return Array.from(xm(this.Ab()))};
432
- q.Bd=function(a,b){if(this.i&&this.G){this.ya=new Le(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.ya.create(this.i.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=pe(f),this.ye(c,!0)):tm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Lb(a);f=d=null;e=
433
- r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=we(g);Lb(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?vm(this,f):d&&vm(this,d)}};
434
- q.we=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.za=a,this.vb=b||"",this.ib=c,(a=ze(this.i.textStreams,this.za,this.vb,this.ib)[0]||null)&&a!=this.j.A&&(Vk(this.B.h,a,!1),this.h.streaming.alwaysStreamText||this.Nb()))Cj(this.j,a),um(this)}else{var d=Lb(a);(a=this.Ab().find(function(e){return Lb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.xe(a)}};
435
- q.bh=function(a){if(this.i&&this.G){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.ya=new Le(b.language,"",0,a),tm(this))}};q.Nb=function(){var a=this.ba;return this.K?this.K.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?im(this).some(function(b){return"showing"==b.mode}):a};q.kf=function(){return this.g&&this.g.src&&this.g.textTracks?ym(this).map(function(a){return ue(a)}):[]};
436
- q.cg=function(a){var b=Lb(a),c=ym(this).filter(function(f){return Lb(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 im(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
437
- function km(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function ym(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
438
- q.Ge=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==Vl)this.K.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=ze(this.i.textStreams,this.za,this.vb,this.ib),0<a.length&&(Cj(this.j,a[0]),um(this))):yj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=im(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")}bm(this)}};
439
- q.ug=function(){if(!this.T())return null;var a=this.ma.l,b=0;if(this.G)b=this.G.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
440
- q.nf=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.yb=function(){if(this.l==Vl)return this.K.yb();var a={total:[],audio:[],video:[],text:[]};this.l==gm&&(a.total=ci(this.g.buffered));return a};
441
- q.getStats=function(){if(this.l!=Vl&&this.l!=gm)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:[]};Nl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.B;b=Math.round(100*b);c.i=isNaN(c.i)?
442
- b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.B,b=Number(a.totalVideoFrames),c.K=Number(a.droppedVideoFrames),c.J=b,this.B.I=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.J?a.J:NaN):a=NaN;this.B.m=a;if(this.l==Vl){if(a=this.j.l)this.B.B=(this.I?this.I.i:1)*a.bandwidth;a&&a.video&&(c=this.B,b=a.video.height||NaN,c.N=a.video.width||NaN,c.C=b);this.T()&&(a=this.nf().valueOf()+1E3*this.Ia().end,this.B.F=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
443
- (this.B.H=this.i.presentationTimeline.g);a=this.C.getBandwidthEstimate();this.B.A=a}var d=this.B;a=d.N;c=d.C;b=d.B;var e=d.J,f=d.K,g=d.I,h=d.A,k=d.i,l=d.l,m=d.G,p=d.j,n=Sk(d.g,"playing"),t=Sk(d.g,"paused"),v=Sk(d.g,"buffering"),y=d.m,x=d.F,w=d.H,D=Tk(d.g),C=[];d=r(d.h.g);for(var A=d.next();!A.done;A=d.next())A=A.value,C.push({timestamp:A.timestamp,id:A.id,type:A.type,fromAdaptation:A.fromAdaptation,bandwidth:A.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
444
- estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:p,playTime:n,pauseTime:t,bufferingTime:v,licenseTime:y,liveLatency:x,maxSegmentDuration:w,stateHistory:D,switchHistory:C}};
445
- q.Pf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,v,y,x,w,D;return I(function(C){switch(C.g){case 1:if(h.l!=Vl&&h.l!=gm)throw new O(1,7,7004);if(d){C.D(2);break}return u(C,zm(h,a),3);case 3:d=C.h;case 2:k=[];if(h.F)try{k=h.F.getServerSideCuePoints()}catch(A){}if(h.l!=gm){C.D(4);break}g&&(c="forced");return u(C,Am(h,a,b,c,d,f||"",k),5);case 5:l=h.Ab();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return em(h),C["return"](m);throw new O(1,2,2012);case 4:p=
446
- Ib;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new O(1,4,4033);if(!k.length){C.D(6);break}return u(C,Bm(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=C.h,v=Cm(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=hi(y),d="text/vtt";case 6:x={id:h.Kf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:$i(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.ha,primary:!1,trickModeVideo:null,
447
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=xd(x.mimeType,x.codecs);D=Gd(w);if(!D)throw new O(2,2,2014,d);h.i.textStreams.push(x);em(h);return C["return"](qe(x))}})};
448
- q.Of=function(a,b,c){var d=this,e,f,g,h;return I(function(k){switch(k.g){case 1:if(d.l!=Vl&&d.l!=gm)throw new O(1,7,7004);if(c){k.D(2);break}return u(k,zm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.F)try{e=d.F.getServerSideCuePoints()}catch(l){}return u(k,Am(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.kf();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return u(k,new Promise(function(l,m){d.A.Fa(f,"load",l);d.A.Fa(f,"error",function(){m(new O(1,2,2015))})}),6);case 6:return k["return"](h);
449
- case 5:throw new O(1,2,2012);}})};function zm(a,b){var c,d;return I(function(e){switch(e.g){case 1:c=sg(b);if(d=Dm[c])return e["return"](d);B(e,2);return u(e,ug(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:F(e);case 3:if(d)return e["return"](d);throw new O(1,2,2011,c);}})}
450
- function Am(a,b,c,d,e,f,g){var h,k,l,m;return I(function(p){if(1==p.g)return"text/vtt"!=e||g.length?u(p,Bm(a,b,a.H,a.h.streaming.retryParameters),3):p.D(2);2!=p.g&&(h=p.h,k=Cm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=hi(l),e="text/vtt");m=document.createElement("track");var n=a.U,t=b;try{if(n.g.enabled){var v=Bk(n);v.ot=Hk;v.su=!0;var y=Dk(v);var x=Ek(t,y)}else x=t}catch(w){Ua("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),x=t}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
451
- a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p["return"](m)})}function Bm(a,b,c,d){var e,f,g;return I(function(h){if(1==h.g){e=rf;f=lf([b],d);f.method="GET";var k=a.U;try{k.g.enabled&&zk(k,f,{ot:Hk,su:!0})}catch(l){Ua("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}
452
- function Cm(a,b,c,d){var e=Hd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Fc(b),b=c.parseMedia(b,a),nk(b,d);throw new O(2,2,2014,c);}q.Ce=function(a,b){this.Qe.width=a;this.Qe.height=b};q.re=function(){if(this.l==Vl){var a=this.j;if(a.j.g)a=!1;else if(a.B)a=!1;else{for(var b=r(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Hc&&(c.Hc=!1,xj(a,c,.1));a=!0}}else a=!1;return a};
453
- q.og=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.i};q.pg=function(){return this.qd};
454
- function Yk(a){var b=Nk();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.T()&&d.includes(c.code)&&(c.severity=1,a.re())};b.textDisplayFactory=function(){return a.ld?new gk(a.g,a.ld):new ak(a.g)};return b}q.He=function(a){this.ld=a};
455
- function Gl(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 aj;h={id:a.Kf++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
456
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Hb,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 Fl(a,b){return I(function(c){if(1==c.g)return u(c,Em(a,b),2);sm(a,b);z(c)})}
457
- function Em(a,b){var c;return I(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,be(c,b),2);dm(b);z(d)})}
458
- function sm(a,b){if(a.l!=nl){for(var c=a.h.restrictions,d=a.Qe,e=!1,f=r(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=ae(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&em(a);if((c=a.m?a.m.g:null)&&a.m.B)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=
459
- f.next())g=g.value,Sf(a.m,g.initDataType,g.initData);Fm(a,b)}}
460
- function Zl(a,b){var c,d,e,f,g;return I(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p,n;return I(function(t){if(1==t.g)return k?u(t,k.createSegmentIndex(),2):t["return"](null);p=(m=k.segmentIndex.ac(l))?m.next().value:null;if(!p)return t["return"](null);n=p.startTime;return t["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)})}
461
- function zl(a){var b=a.Jc();if(a.B&&a.N&&a.G){var c=a.I;c.j=b;cj(c);a.U&&(c=a.U,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Nl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(kl(Gm,b))}function Ol(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=kl(Hm),a.dispatchEvent(b))}function Nl(a){if(a.B&&a.N){var b=a.B.g;a.N.g==Re?Rk(b,"buffering"):a.g.paused?Rk(b,"paused"):a.g.ended?Rk(b,"ended"):Rk(b,"playing")}}
462
- function Yl(a){try{Fm(a,a.i)}catch(c){return xl(a,c),!1}var b=a.i.variants.filter(function(c){return xe(c)});b=a.ya.create(b);a.C.setVariants(Array.from(b.values()));return!0}function tm(a){var b;(b=Yl(a)?a.C.chooseVariant():null)&&Ql(a,b,!0,!0,0)}
463
- function Ql(a,b,c,d,e){var f=a.j.l;if(b==f)d&&Bj(a.j,b,d,e,!0);else{var g=a.B.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Bj(a.j,b,d,e);d=null;f&&(d=pe(f));b=pe(b);c?$l(a,d,b):Im(a,d,b)}}function vm(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=we(c);var d=we(b);Im(a,c,d)}
464
- function am(a,b,c){a=Lb(a.h.preferredTextLanguage);b=Lb(b.language);c=Lb(c.language);return Kb(c,a)&&!Kb(b,c)}function $l(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=kl(Jm,b);Km(a,b)}function em(a){var b=kl(Lm);Km(a,b)}function Im(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=kl(Mm,b);Km(a,b)}function um(a){var b=kl(Nm);Km(a,b)}function bm(a){var b=kl(Om);Km(a,b)}function cm(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Km(a,kl(Pm,b))}
465
- function xl(a,b){if(a.l!=nl){var c=kl(Qm,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Cl(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(kl(b,c))}
466
- function wl(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)}
467
- function Kl(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=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&&!Rm.includes(l)}h!=f.allowedByKeySystem&&
468
- (e=!0)}}}if(!e||Yl(a))(d=a.j.l)&&!d.allowedByKeySystem&&tm(a),e&&em(a)}}function Ll(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=kl(Sm);a.dispatchEvent(b)}function Pl(a,b,c){0<b&&(a.T()||a.Ef(b));b=a.getDuration();c<b&&(a.T()||a.bb(c))}
469
- function Fm(a,b){var c=a.m?a.m.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 p=m.next();!p.done;p=m.next())if(p=p.value,p.keyIds.size){p=r(p.keyIds);for(var n=p.next();!n.done;n=p.next()){n=n.value;var t=c[d?"00":n];t?Rm.includes(t)&&h.add(t):g.add(n)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
470
- missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new O(2,4,4012,c);}function dm(a){if(!a.variants.some(xe))throw new O(2,4,4032);}function Km(a,b){I(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=nl&&a.dispatchEvent(b);z(c)})}function xm(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(Lb(c.language)):b.add("und");return b}
471
- function wm(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=Lb(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),p=m.next();!p.done;p=m.next()){p=p.value;var n=null;c.has(l)&&c.get(l).has(p)&&(n=c.get(l).get(p));
472
- h.push({language:l,role:p,label:n})}});return h}function pl(){return new O(2,7,7E3)}function jl(a,b,c,d,e,f){return d==a&&e.O==f.O&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Uj(){return{O:null,mimeType:null,startTime:null,Ie:NaN,uri:null}}function ql(a){return new Promise(function(b,c){a.Pb=function(){return c(pl())};a.td=function(){return b()};a.onError=function(d){return c(d)};a.vd=function(){return c(pl())}})}J("shaka.Player",S);S.prototype.setVideoContainer=S.prototype.He;
473
- S.prototype.getManifestParserFactory=S.prototype.pg;S.prototype.getManifest=S.prototype.og;S.prototype.retryStreaming=S.prototype.re;S.prototype.setMaxHardwareResolution=S.prototype.Ce;S.prototype.addChaptersTrack=S.prototype.Of;S.prototype.addTextTrackAsync=S.prototype.Pf;S.prototype.getStats=S.prototype.getStats;S.prototype.getBufferedInfo=S.prototype.yb;S.prototype.getPresentationStartTimeAsDate=S.prototype.nf;S.prototype.getPlayheadTimeAsDate=S.prototype.ug;
474
- S.prototype.setTextTrackVisibility=S.prototype.Ge;S.prototype.getChapters=S.prototype.cg;S.prototype.getChaptersTracks=S.prototype.kf;S.prototype.isTextTrackVisible=S.prototype.Nb;S.prototype.selectVariantsByLabel=S.prototype.bh;S.prototype.selectTextLanguage=S.prototype.we;S.prototype.selectAudioLanguage=S.prototype.Bd;S.prototype.getTextLanguages=S.prototype.xg;S.prototype.getAudioLanguages=S.prototype.Yf;S.prototype.getTextLanguagesAndRoles=S.prototype.yg;
475
- S.prototype.getAudioLanguagesAndRoles=S.prototype.Zf;S.prototype.selectVariantTrack=S.prototype.ye;S.prototype.selectTextTrack=S.prototype.xe;S.prototype.getThumbnails=S.prototype.zg;S.prototype.getImageTracks=S.prototype.jg;S.prototype.getTextTracks=S.prototype.Ab;S.prototype.getVariantTracks=S.prototype.Za;S.prototype.cancelTrickPlay=S.prototype.We;S.prototype.trickPlay=S.prototype.Me;S.prototype.getPlaybackRate=S.prototype.zb;S.prototype.isBuffering=S.prototype.Jc;S.prototype.getKeyStatuses=S.prototype.hd;
476
- S.prototype.getExpiration=S.prototype.Dc;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.Dg;S.prototype.seekRange=S.prototype.Ia;S.prototype.isAudioOnly=S.prototype.ec;S.prototype.isInProgress=S.prototype.Lb;S.prototype.isLive=S.prototype.T;S.prototype.getAdManager=S.prototype.fd;S.prototype.getAssetUri=S.prototype.Vd;S.prototype.getNetworkingEngine=S.prototype.Ec;S.prototype.getMediaElement=S.prototype.rg;
477
- S.prototype.getLoadMode=S.prototype.mf;S.prototype.resetConfiguration=S.prototype.Zg;S.prototype.getBufferFullness=S.prototype.$f;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.configure=S.prototype.configure;S.prototype.load=S.prototype.load;S.prototype.updateStartTime=S.prototype.nh;S.prototype.unload=S.prototype.Oe;S.prototype.detach=S.prototype.detach;S.prototype.attach=S.prototype.yc;
478
- S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return I(function(h){if(1==h.g)return b={},a?u(h,ig(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Pc()){for(var l in rg)k[l]=!0;for(var m in tg)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 p=m.next();!p.done;p=m.next())p=p.value,k[p]=Pc()?!!rg[p]:Rc(p);for(var n in l)k[n]=
479
- Pc()?!!tg[n]:Rc(l[n]);c=k;n='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(ia(Bi));
480
- k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=Pc()?Gd(l)?!0:MediaSource.isTypeSupported(l)||sd(l):Rc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Tm;for(g in f)e[g]=f[g]();return h["return"](e)})};S.isBrowserSupported=ol;S.setAdManagerFactory=function(a){$k=a};S.registerSupportPlugin=function(a,b){Tm[a]=b};S.prototype.destroy=S.prototype.destroy;
481
- var Pm="abrstatuschanged",Jm="adaptation",Gm="buffering",nm="downloadfailed",mm="downloadheadersreceived",Ml="drmsessionupdate",Rj="emsg",Qm="error",Sm="expirationupdated",ul="loaded",rl="loading",Hl="manifestparsed",El="mediaqualitychanged",lm="metadata",ll="onstatechange",ml="onstateidle",Hm="ratechange",Xl="streaming",Nm="textchanged",Om="texttrackvisibility",Dl="timelineregionadded",pm="timelineregionenter",qm="timelineregionexit",Lm="trackschanged",yl="unloading",Mm="variantchanged",Um={vh:Pm,
482
- wh:Jm,xh:Gm,Ch:nm,Dh:mm,Eh:Ml,Lh:Rj,Error:Qm,Mh:Sm,Sh:ul,Th:rl,Yh:Hl,Zh:El,Metadata:lm,di:ll,ei:ml,pi:Hm,zi:"sessiondata",Ai:Xl,Bi:Nm,Ci:Om,Di:Dl,Ei:pm,Fi:qm,Gi:Lm,Li:yl,Ni:Mm},nl=0,Xk=1,Vl=2,gm=3;S.LoadMode={DESTROYED:nl,NOT_LOADED:Xk,MEDIA_SOURCE:Vl,SRC_EQUALS:gm};S.version="v4.0.4";
483
- var Rm=["output-restricted","internal-error"],Tm={},$k=null,vl={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"},Dm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
484
- ssa:"text/x-ssa",ass:"text/x-ssa"};function Vm(){this.h=[];this.j=this.i=this.g=0};function Wm(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new uf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Wm.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
371
+ "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return Mk([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"'}},d={retryParameters:We(),failureCallback:function(g){return Mk([g],void 0)},
372
+ rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30};if(navigator.userAgent.match(/Edge\//)||
373
+ Wc()||Yc())d.gapDetectionThreshold=.5;if(Vc("Web0S")||Wc()||Yc())d.stallSkip=0;var e={trackSelectionCallback:function(g){return I(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return I(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return Mk([g,h],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5},
374
+ f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new Fe},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5}},preferredAudioLanguage:"",preferredTextLanguage:"",
375
+ 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},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=
376
+ function(g){return I(function(h){return h["return"](Pk(g,f.preferredAudioLanguage))})};return f}function Qk(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 Kk(a,b,c||Ok(),d,"")}
377
+ function Pk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Ub(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Mb(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/
378
+ 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Ib&&"image"!=g.type||c.push(g);return c}J("shaka.util.PlayerConfiguration",Nk);Nk.mergeConfigObjects=Qk;Nk.createDefault=Ok;function Rk(){this.g=null;this.h=[]}function Sk(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 Tk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
379
+ function Uk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Vk(){this.i=this.h=null;this.g=[]}function Wk(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 Xk(){this.A=this.B=this.H=this.F=this.m=this.j=this.G=this.l=this.i=this.N=this.P=this.I=this.J=this.K=this.C=this.S=NaN;this.g=new Rk;this.h=new Vk};function S(a,b){fb.call(this);var c=this;this.l=Yk;this.od=this.g=null;this.ba=!1;this.sd=new wf;this.hb=new wf;this.A=new wf;this.qe=this.C=this.gb=this.i=this.ud=this.J=this.j=this.ea=this.S=this.Bd=this.N=this.pd=this.I=this.Xa=this.F=this.K=this.m=this.H=null;this.Qf=1E9;this.h=Zk(this);this.Bc={width:Infinity,height:Infinity};this.B=null;this.ya=new Ne(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.za=this.h.preferredTextLanguage;this.wb=this.h.preferredTextRole;
380
+ this.ib=this.h.preferForcedSubs;this.fb=[];this.Hc=null;b&&b(this);this.H=$k(this);this.H.De(this.h.streaming.forceHTTPS);this.G=null;al&&(this.G=al());this.sd.o(window,"online",function(){c.ue()});this.P={name:"detach"};this.X={name:"attach"};this.aa={name:"unload"};this.Te={name:"manifest-parser"};this.Se={name:"manifest"};this.La={name:"media-source"};this.ve={name:"drm-engine"};this.$={name:"load"};this.Ue={name:"src-equals-drm-engine"};this.Ya={name:"src-equals"};var d=new Map;d.set(this.X,function(e,
381
+ f){return bf(bl(c,e,f))});d.set(this.P,function(e){e.O&&(c.hb.Qc(),e.O=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return bf(e)});d.set(this.aa,function(e){return bf(cl(c,e))});d.set(this.La,function(e){e=dl(c,e);return bf(e)});d.set(this.Te,function(e,f){var g=el(c,e,f);return bf(g)});d.set(this.Se,function(e){return fl(c,e)});d.set(this.ve,function(e){e=gl(c,e);return bf(e)});d.set(this.$,function(e,f){return bf(hl(c,e,f))});d.set(this.Ue,function(e,f){var g=il(c,e,f);return bf(g)});d.set(this.Ya,
382
+ function(e,f){return jl(c,e,f)});this.ma=new Uj(this.P,{zg:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.X);e==c.X&&(k=g==c.P||f.O!=h.O?c.P:g==c.X?c.X:g==c.La||g==c.$?c.La:g==c.Ya?c.Ue:null);e==c.La&&(k=g==c.$&&f.O==h.O?c.Te:c.aa);e==c.Te&&(k=kl(c.$,c.Se,c.aa,g,f,h));e==c.Se&&(k=kl(c.$,c.ve,c.aa,g,f,h));e==c.ve&&(k=kl(c.$,c.$,c.aa,g,f,h));e==c.Ue&&(k=g==c.Ya&&f.O==h.O?c.Ya:c.aa);if(e==c.$||e==c.Ya)k=c.aa;e==c.aa&&(k=h.O&&f.O==h.O?c.X:c.P);return k},dg:function(e,f,g){c.dispatchEvent(ll("onstatechange",
383
+ (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return I(function(f){return 1==f.g?u(f,cl(c,e),2):f["return"](e.O?c.X:c.P)})},Tg:function(e){c.dispatchEvent(ll("onstateidle",(new Map).set("state",e.name)))}});this.Pf=new P(function(){ce(c.i.variants,c.h.restrictions,c.Bc)&&ml(c)});a&&this.yc(a,!0)}qa(S,fb);function ll(a,b){return new L(a,b)}q=S.prototype;
384
+ q.destroy=function(){var a=this,b;return I(function(c){switch(c.g){case 1:if(a.l==nl)return c["return"]();a.l=nl;b=Zj(a.ma,function(){return{node:a.P,payload:Vj(),Jb:!1}});return u(c,new Promise(function(d){b.jc=function(){};b.vd=function(){d()};b.Pb=function(){d()};b.onError=function(){d()};b.xd=function(){d()}}),2);case 2:return u(c,a.ma.destroy(),3);case 3:a.sd&&(a.sd.release(),a.sd=null);a.hb&&(a.hb.release(),a.hb=null);a.A&&(a.A.release(),a.A=null);a.qe=null;a.C=null;a.h=null;a.B=null;a.od=null;
385
+ a.S=null;if(!a.H){c.D(4);break}return u(c,a.H.destroy(),5);case 5:a.H=null;case 4:fb.prototype.release.call(a),z(c)}})};
386
+ function ol(){window.Promise||Ua("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Ua("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||Vc("Trident/"))return!1;var a=ad();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
387
+ !1:Rc()?!0:Sc("application/x-mpegurl")}q.yc=function(a,b){b=void 0===b?!0:b;if(this.l==nl)return Promise.reject(pl());var c=Vj();c.O=a;Rc()||(b=!1);var d=b?this.La:this.X,e=Zj(this.ma,function(){return{node:d,payload:c,Jb:!1}});e.jc=function(){};return ql(e)};q.detach=function(){var a=this;if(this.l==nl)return Promise.reject(pl());var b=Zj(this.ma,function(){return{node:a.P,payload:Vj(),Jb:!1}});b.jc=function(){};return ql(b)};
388
+ q.Qe=function(a){var b=this;a=void 0===a?!0:a;if(this.l==nl)return Promise.reject(pl());Rc()||(a=!1);var c=Vj(),d=Zj(this.ma,function(e){var f=e.O&&a?b.La:e.O?b.X:b.P;c.O=e.O;return{node:f,payload:c,Jb:!1}});d.jc=function(){};return ql(d)};q.uh=function(a){this.Hc=a};
389
+ q.load=function(a,b,c){var d=this;this.Hc=null;if(this.l==nl)return Promise.reject(pl());this.dispatchEvent(ll("loading"));var e=Vj();e.uri=a;e.Ke=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=rl(this,e)?this.Ya:this.$,g=Zj(this.ma,function(h){if(null==h.O)return null;e.O=h.O;return{node:f,payload:e,Jb:!0}});this.B=new Xk;this.S=sl(this);g.jc=function(){};return new Promise(function(h,k){g.xd=function(){return k(new O(2,7,7002))};g.vd=function(){h();d.dispatchEvent(ll("loaded"))};
390
+ g.Pb=function(){return k(pl())};g.onError=function(l){return k(l)}})};function rl(a,b){if(!Rc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=ug(d),c=tl[c]);if(c){if(""==(b.O||Tc()).canPlayType(c))return!1;if(!Rc()||!(c in tg||ug(d)in vg)||a.h.streaming.preferNativeHls)return!0;if(Zc())return a.h.streaming.useNativeHlsOnSafari}return!1}function bl(a,b,c){null==b.O&&(b.O=c.O,a.hb.o(b.O,"error",function(){var d=ul(a);d&&vl(a,d)}));a.g=b.O;return Promise.resolve()}
391
+ function cl(a,b){var c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:return a.l!=nl&&(a.l=Yk),c=a.fb.map(function(p){return p()}),a.fb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(ll("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;b.O&&a.A.Qc();a.Pf.stop();a.Xa&&(a.Xa.release(),a.Xa=null);a.pd&&(a.pd.stop(),a.pd=null);if(!a.J){n.D(3);break}return u(n,a.J.stop(),4);case 4:a.J=null,a.ud=null;case 3:if(!a.C){n.D(5);break}return u(n,a.C.stop(),5);case 5:if(!a.j){n.D(7);break}return u(n,
392
+ a.j.destroy(),8);case 8:a.j=null;case 7:a.I&&(a.I.release(),a.I=null);a.F&&(a.F.release(),a.F=null);if(!a.K){n.D(9);break}return u(n,a.K.destroy(),10);case 10:a.K=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.O||!b.O.src){n.D(11);break}return u(n,new Promise(function(p){return(new P(p)).T(.1)}),12);case 12:for(b.O.removeAttribute("src"),b.O.load();b.O.lastChild;)b.O.removeChild(b.O.firstChild);case 11:if(!a.m){n.D(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.gb=null;a.N=null;if(a.i){d=
393
+ t(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.B=new Xk;a.Pe=null;wl(a);z(n)}})}
394
+ function dl(a,b){var c,d,e,f,g,h;return I(function(k){if(1==k.g)return c=new Uh,d=a.h.textDisplayFactory,e=d(),a.Pe=d,f=xl(b.O,c,e,function(l,m,n){l=t(l);for(var p=l.next();!p.done;p=l.next())if(p=p.value,p.data&&p.cueTime&&p.frames){for(var r=p.cueTime+m,w=n,y=t(p.frames),x=y.next();!x.done;x=y.next())yl(a,r,w,"ID3",x.value);if(a.G)a.G.onHlsTimedMetadata(p,r)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.H=h,u(k,f.I,2);a.K=f;z(k)})}
395
+ function el(a,b,c){var d,e,f,g;return I(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.gb=d,f=a,u(h,sg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.ud=h.h;a.J=a.ud();g=ef(a.h.manifest);c.O&&"AUDIO"===c.O.nodeName&&(g.disableVideo=!0);a.J.configure(g);z(h)})}
396
+ function fl(a,b){var c=b.uri,d=a.H;a.Bd=new lj(function(){return a.Ia()});a.Bd.addEventListener("regionadd",function(g){g=g.region;zl(a,"timelineregionadded",g);if(a.G)a.G.onDashTimedMetadata(g)});a.ea=null;a.h.streaming.observeQualityChanges&&(a.ea=new hj(function(){return a.kb()}),a.ea.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,
397
+ height:h.height,mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(ll("mediaqualitychanged",h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.S;try{k.g.enabled&&(k.A=h.format,Ak(k,g,{ot:Dk,su:!k.i}))}catch(l){Va("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){qk(a.S,g,h)},filter:function(g){return Al(a,g)},makeTextStreamsForClosedCaptions:function(g){return Bl(a,
398
+ g)},onTimelineRegionAdded:function(g){var h=a.Bd;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new L("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return vl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
399
+ enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Ye(function(){var g,h,k,l;return I(function(m){if(1==m.g)return g=a,u(m,a.J.start(c,e),2);g.i=m.h;h=ll("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new O(2,4,4036);Cl(a.i);k=Date.now()/1E3;l=k-f;a.B.G=l;z(m)})}(),function(){return a.J.stop()})}
400
+ function gl(a,b){var c,d;return I(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Dl(a,{Ob:a.H,onError:function(f){vl(a,f)},wd:function(f){El(a,f)},onExpirationUpdated:function(f,g){Fl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.B.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,Lf(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.yc(b.O),3):u(e,Al(a,a.i),0)})}
401
+ function hl(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,w;return I(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Hc&&(b.startTime=a.Hc,a.Hc=null);d=b.O;e=b.uri;a.gb=e;a.I=new dj({md:function(){return d.playbackRate},jd:function(){return d.defaultPlaybackRate},Fe:function(x){d.playbackRate=x},zf:function(x){d.currentTime+=x}});f=function(){return Gl(a)};g=function(){return Hl(a)};a.A.o(d,"playing",f);a.A.o(d,"pause",f);a.A.o(d,"ended",f);a.A.o(d,"ratechange",g);h=a.h.abrFactory;a.C&&a.qe==h||
402
+ (a.qe=h,a.C=h(),a.C.configure(a.h.abr));a.ya=new Ne(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.za=a.h.preferredTextLanguage;a.wb=a.h.preferredTextRole;a.ib=a.h.preferForcedSubs;Il(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C.init(function(x,v,D){a.j&&x!=a.j.l&&Jl(a,x,!0,void 0===v?!1:v,void 0===D?0:D)});a.F=Kl(a,b.startTime);a.Xa=Ll(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Ml(a,k);Pd(a.i,a.h.preferredVideoCodecs,
403
+ a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Nl(a);a.j.configure(a.h.streaming);a.l=Ol;d.textTracks&&a.A.o(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":Pl(a,x)}});a.dispatchEvent(ll("streaming"));l=null;if(m=a.Qa().find(function(x){return x.active})){y.D(2);break}l=ml(a);Jl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.D(3);break}n=a.F.bd();return u(y,Ql(l,n),4);case 4:p=y.h,a.F.Yd(p);case 3:Rl(a,
404
+ null,re(l));case 2:return r=a.Ab().find(function(x){return x.active}),r||((w=Be(a.i.textStreams,a.za,a.wb,a.ib)[0]||null)&&Wk(a.B.h,w,!0),l&&(w?(l.audio&&Sl(a,l.audio,w)&&(a.ba=!0),a.ba&&a.K.m.setTextVisibility(!0),Tl(a)):a.ba=!1),w&&(a.h.streaming.alwaysStreamText||a.Nb())&&Ej(a.j,w)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.C.enable(),Ul(a)),fe(a.j?a.j.l:null,a.i),Vl(a.i),Wl(a),Xl(a),a.i.variants.some(function(x){return x.primary}),a.A.Fa(d,"loadedmetadata",function(){a.B.l=Date.now()/1E3-
405
+ c.Ke}),z(y)}})}
406
+ function il(a,b,c){var d,e,f,g,h,k,l;return I(function(m){return 1==m.g?(d=Jb,e=Date.now()/1E3,f=!0,a.m=Dl(a,{Ob:a.H,onError:function(n){vl(a,n)},wd:function(n){El(a,n)},onExpirationUpdated:function(n,p){Fl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);"drmsessionupdate"==n.type&&f&&(f=!1,a.B.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=ug(g),k=tl[h],"application/x-mpegurl"==k&&Zc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,primary:!1,
407
+ audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Fd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
408
+ a.m.X=!0,u(m,Lf(a.m,[l],[]),2)):u(m,a.m.yc(b.O),0)})}
409
+ function jl(a,b,c){function d(){return Gl(a)}b.uri=c.uri;b.startTime=c.startTime;a.gb=b.uri;var e=b.O;a.F=new Ti(e);var f=!1;a.fb.push(function(){f=!0});null!=b.startTime&&a.F.Yd(b.startTime);a.I=new dj({md:function(){return e.playbackRate},jd:function(){return e.defaultPlaybackRate},Fe:function(k){e.playbackRate=k},zf:function(k){e.currentTime+=k}});Ml(a,a.h.streaming.rebufferingGoal);a.A.o(e,"playing",d);a.A.o(e,"pause",d);a.A.o(e,"ended",d);a.A.o(e,"ratechange",function(){return Hl(a)});"none"!=
410
+ e.preload&&a.A.Fa(e,"loadedmetadata",function(){a.B.l=Date.now()/1E3-c.Ke});e.audioTracks&&(a.A.o(e.audioTracks,"addtrack",function(){return Wl(a)}),a.A.o(e.audioTracks,"removetrack",function(){return Wl(a)}),a.A.o(e.audioTracks,"change",function(){return Wl(a)}));e.textTracks&&(a.A.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Yl(a,k);break;case "chapters":Pl(a,k);break;default:Wl(a)}}),a.A.o(e.textTracks,"removetrack",function(){return Wl(a)}),a.A.o(e.textTracks,
411
+ "change",function(){return Wl(a)}));var g=ug(b.uri);e.src=Bk(a.S,b.uri,tl[g]);(Wc()||Vc("Web0S"))&&e.load();a.l=Zl;a.dispatchEvent(ll("streaming"));var h=new Nc;Ki(e,HTMLMediaElement.HAVE_METADATA,a.A,function(){h.resolve()});Ki(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.A,function(){var k;return I(function(l){if(1==l.g)return $l(a),k=am(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):u(l,new Promise(function(m){a.A.Fa(e.textTracks,"change",m);(new P(m)).T(1)}),2);if(f)return l["return"]();bm(a);
412
+ z(l)})});e.error?h.reject(ul(a)):"none"==e.preload&&(Ua('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.A.Fa(e,"error",function(){h.reject(ul(a))});return new Ye(h,function(){h.reject(new O(2,7,7001));return Promise.resolve()})}
413
+ function $l(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Ed(b);var c=a.h.preferredVariantRole;""!=c&&a.Ed(b,c)}}function bm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.ye(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.ye(b,d,c)}}
414
+ function Yl(a,b){if("metadata"==b.kind){b.mode="hidden";a.A.o(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,yl(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new P(function(){var d=cm(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).xa().T(.5);a.fb.push(function(){c.stop()})}}
415
+ function yl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(ll("metadata",b))}function Pl(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new P(function(){b.mode="hidden"})).xa().T(.5);a.fb.push(function(){c.stop()})}}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 Ef(b,a.h.drm.updateExpirationTime)}
416
+ function $k(a){return new jf(function(b,c){a.C&&a.C.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(ll("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(ll("downloadfailed",b))})}
417
+ function Kl(a,b){return new Ui(a.g,a.i,a.h.streaming,b,function(){a.Xa&&gj(a.Xa,!0);a.j&&a.j.Rc();a.N&&dm(a)},function(c){return a.dispatchEvent(c)})}
418
+ function Ll(a){var b=new mj(a.Bd);b.addEventListener("enter",function(d){zl(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){zl(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(zl(a,"timelineregionenter",e),zl(a,"timelineregionexit",e))});var c=new fj(a.g);c.g.add(b);a.ea&&c.g.add(a.ea);return c}function Ml(a,b){a.N=new Re;a.N.g=Te;Ue(a.N,b,Math.min(.5,b/2));wl(a);a.pd=(new P(function(){dm(a)})).ka(.25)}
419
+ function dm(a){switch(a.l){case Zl:if(a.g.ended)var b=!0;else{var c=bi(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Ol:a:if(a.g.ended||mi(a.K))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.Ib();var d=bi(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=di(a.g.buffered,a.g.currentTime);c=a.N;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Se:Te;c.g=d;b!=d&&wl(a)}function xl(a,b,c,d){return new gi(a,b,c,d)}
420
+ function sl(a){return new pk({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},kb:function(){return a.kb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Qa:function(){return a.Qa()},zb:function(){return a.zb()},U:function(){return a.U()}},a.h.cmcd)}
421
+ function Nl(a){return new sj(a.i,{ld:function(){return a.F.bd()},getBandwidthEstimate:function(){return a.C.getBandwidthEstimate()},modifySegmentRequest:function(b,c){qk(a.S,b,c)},V:a.K,Ob:a.H,onError:function(b){return vl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Vg:function(){a.J&&a.J.update&&a.J.update()},pe:function(){a.F&&a.F.Af();dm(a)},Ug:function(b,c){var d=c.je;d&&a.ea&&jj(a.ea,d,b)}})}
422
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Lk(a,b));a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Qk(this.h,a,Zk(this));em(this);return c};
423
+ function em(a){if(a.J){var b=ef(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{fm(a,a.i)}catch(f){vl(a,f)}a.C&&Xl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||gm(a)}a.H&&a.H.De(a.h.streaming.forceHTTPS);if(a.K&&(a.K.H=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Pe!=b)){var c=b(),d=a.K,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=
424
+ c);a.Pe=b;a.j&&(b=a.j,(c=b.h.get(Ib))&&Cj(b,c.stream,!0,0,!0))}a.C&&(a.C.configure(a.h.abr),a.h.abr.enabled?a.C.enable():a.C.disable(),Ul(a));a.N&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ue(a.N,b,Math.min(.5,b/2)));a.i&&Il(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Zk(this);Qk(a,this.h,Zk(this));return a};
425
+ q.gg=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.Ia().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.fh=function(){for(var a in this.h)delete this.h[a];Qk(this.h,Zk(this),Zk(this));em(this)};q.rf=function(){return this.l};q.yg=function(){return this.g};q.Ec=function(){return this.H};q.Zd=function(){return this.gb};
426
+ q.hd=function(){return this.G?this.G:null};q.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Lb=function(){return this.i?this.i.presentationTimeline.Lb():!1};q.ec=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
427
+ q.Ia=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.cc(),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.Jg=function(){this.U()&&(this.g.currentTime=this.Ia().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Dc=function(){return this.m?this.m.Dc():Infinity};q.kd=function(){return this.m?this.m.kd():{}};
428
+ q.Kc=function(){return this.N?this.N.g==Te:!1};q.zb=function(){return this.g?this.I?this.I.i:1:0};q.Oe=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==Ol&&(this.C.playbackRateChanged(a),Bj(this.j,1<Math.abs(a))))};q.$e=function(){var a=this.I.jd();this.l==Zl&&this.I.set(a);this.l==Ol&&(this.I.set(a),this.C.playbackRateChanged(a),Bj(this.j,!1))};
429
+ q.Qa=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,ze(e)){var f=re(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 ye(g)}):[]};
430
+ q.Ab=function(){if(this.i){for(var a=this.j?this.j.A:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=se(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?am(this).map(function(f){return we(f)}):[]};q.pg=function(){return this.i?this.i.imageStreams.map(function(a){return te(a)}):[]};
431
+ q.Fg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,w,y,x,v,D,C,B;return I(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?G.D(3):u(G,d.createSegmentIndex(),3):G["return"](null):G.D(2);if(2!=G.g){e=d.segmentIndex.find(b);if(null==e)return G["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return G["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;r=l/n;
432
+ w=m*n;y=f.j-f.startTime;x=f.l||y/w;v=f.startTime;C=D=0;1<w&&(B=Math.floor((b-f.startTime)/x),v=f.startTime+B*x,D=B%m*p,C=Math.floor(B/m)*r);return G["return"]({imageHeight:l,imageWidth:k,height:r,positionX:D,positionY:C,startTime:v,duration:x,uris:f.Pa(),width:p})}return G["return"](null)})};
433
+ q.ze=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.A&&(Wk(this.B.h,b,!1),Ej(this.j,b),hm(this),this.za=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=am(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ue(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";hm(this)}};
434
+ q.Ae=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ua("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&ze(d)&&(Jl(this,d,!1,b,c),this.ya=new Me(d),Xl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
435
+ ue(c)==a.id){im(this,c);break}};q.fg=function(){return jm(this.Qa())};q.Eg=function(){return jm(this.Ab())};q.eg=function(){return Array.from(km(this.Qa()))};q.Dg=function(){return Array.from(km(this.Ab()))};
436
+ q.Ed=function(a,b){if(this.i&&this.F){this.ya=new Ne(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.ya.create(this.i.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=re(f),this.Ae(c,!0)):gm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Mb(a);f=d=null;e=
437
+ t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=ye(g);Mb(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?im(this,f):d&&im(this,d)}};
438
+ q.ye=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.za=a,this.wb=b||"",this.ib=c,(a=Be(this.i.textStreams,this.za,this.wb,this.ib)[0]||null)&&a!=this.j.A&&(Wk(this.B.h,a,!1),this.h.streaming.alwaysStreamText||this.Nb()))Ej(this.j,a),hm(this)}else{var d=Mb(a);(a=this.Ab().find(function(e){return Mb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.ze(a)}};
439
+ q.ih=function(a){if(this.i&&this.F){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.ya=new Ne(b.language,"",0,a),gm(this))}};q.Nb=function(){var a=this.ba;return this.K?this.K.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?am(this).some(function(b){return"showing"==b.mode}):a};q.pf=function(){return this.g&&this.g.src&&this.g.textTracks?lm(this).map(function(a){return we(a)}):[]};
440
+ q.ig=function(a){var b=Mb(a),c=lm(this).filter(function(g){return Mb(g.language)==b});if(!c||!c.length)return[];a=[];c=t(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=t(d.cues);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.id;f&&""!=f||(f=e.startTime+"-"+e.endTime+"-"+e.text);a.push({id:f,title:e.text,startTime:e.startTime,endTime:e.endTime})}}return a};
441
+ function am(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function cm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function lm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
442
+ q.Ie=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==Ol)this.K.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=Be(this.i.textStreams,this.za,this.wb,this.ib),0<a.length&&(Ej(this.j,a[0]),hm(this))):Aj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=am(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Tl(this)}};
443
+ q.Ag=function(){if(!this.U())return null;var a=this.ma.l,b=0;if(this.F)b=this.F.bd();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
444
+ q.tf=function(){if(!this.U())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.kb=function(){if(this.l==Ol)return this.K.kb();var a={total:[],audio:[],video:[],text:[]};this.l==Zl&&(a.total=ei(this.g.buffered));return a};
445
+ q.getStats=function(){if(this.l!=Ol&&this.l!=Zl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Gl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.B;b=
446
+ Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.B.N=this.F.Ve(),this.B.P=this.F.We());a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.B,b=Number(a.totalVideoFrames),c.K=Number(a.droppedVideoFrames),c.J=b,this.B.I=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.J?a.J:NaN):a=NaN;this.B.m=a;if(this.l==Ol){if(a=this.j.l)this.B.B=(this.I?this.I.i:1)*a.bandwidth;a&&a.video&&(c=this.B,b=a.video.height||NaN,c.S=a.video.width||NaN,c.C=b);this.U()&&(a=this.tf().valueOf()+
447
+ 1E3*this.Ia().end,this.B.F=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&(this.B.H=this.i.presentationTimeline.g);a=this.C.getBandwidthEstimate();this.B.A=a}var d=this.B;a=d.S;c=d.C;b=d.B;var e=d.J,f=d.K,g=d.I,h=d.P,k=d.N,l=d.A,m=d.i,n=d.l,p=d.G,r=d.j,w=Tk(d.g,"playing"),y=Tk(d.g,"paused"),x=Tk(d.g,"buffering"),v=d.m,D=d.F,C=d.H,B=Uk(d.g),G=[];d=t(d.h.g);for(var E=d.next();!E.done;E=d.next())E=E.value,G.push({timestamp:E.timestamp,id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.bandwidth});
448
+ return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:r,playTime:w,pauseTime:y,bufferingTime:x,licenseTime:v,liveLatency:D,maxSegmentDuration:C,stateHistory:B,switchHistory:G}};
449
+ q.Vf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,w,y,x,v,D;return I(function(C){switch(C.g){case 1:if(h.l!=Ol&&h.l!=Zl)throw new O(1,7,7004);if(d){C.D(2);break}return u(C,mm(h,a),3);case 3:d=C.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(B){}if(h.l!=Zl){C.D(4);break}g&&(c="forced");return u(C,nm(h,a,b,c,d,f||"",k),5);case 5:l=h.Ab();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return Wl(h),C["return"](m);throw new O(1,2,2012);case 4:n=
450
+ Jb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new O(1,4,4033);if(!k.length){C.D(6);break}return u(C,om(h,a,h.H,h.h.streaming.retryParameters),7);case 7:r=C.h,w=pm(h,r,d,k),y=new Blob([w],{type:"text/vtt"}),a=ji(y),d="text/vtt";case 6:x={id:h.Qf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:bj(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.ha,primary:!1,trickModeVideo:null,
451
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};v=yd(x.mimeType,x.codecs);D=Hd(v);if(!D)throw new O(2,2,2014,d);h.i.textStreams.push(x);Wl(h);return C["return"](se(x))}})};
452
+ q.Uf=function(a,b,c){var d=this,e,f,g,h;return I(function(k){switch(k.g){case 1:if(d.l!=Ol&&d.l!=Zl)throw new O(1,7,7004);if(c){k.D(2);break}return u(k,mm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return u(k,nm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.pf();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return u(k,new Promise(function(l,m){d.A.Fa(f,"load",l);d.A.Fa(f,"error",function(){m(new O(1,2,2015))})}),6);case 6:return k["return"](h);
453
+ case 5:throw new O(1,2,2012);}})};function mm(a,b){var c,d;return I(function(e){switch(e.g){case 1:c=ug(b);if(d=qm[c])return e["return"](d);A(e,2);return u(e,wg(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:F(e);case 3:if(d)return e["return"](d);throw new O(1,2,2011,c);}})}
454
+ function nm(a,b,c,d,e,f,g){var h,k,l,m;return I(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,om(a,b,a.H,a.h.streaming.retryParameters),3):n.D(2);2!=n.g&&(h=n.h,k=pm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=ji(l),e="text/vtt");m=document.createElement("track");var p=a.S,r=b;try{if(p.g.enabled){var w=Ck(p);w.ot=Ik;w.su=!0;var y=Ek(w);var x=Fk(r,y)}else x=r}catch(v){Va("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",v),x=r}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
455
+ a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}function om(a,b,c,d){var e,f,g;return I(function(h){if(1==h.g){e=tf;f=nf([b],d);f.method="GET";var k=a.S;try{k.g.enabled&&Ak(k,f,{ot:Ik,su:!0})}catch(l){Va("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}
456
+ function pm(a,b,c,d){var e=Id[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Gc(b),b=c.parseMedia(b,a),ok(b,d);throw new O(2,2,2014,c);}q.Ee=function(a,b){this.Bc.width=a;this.Bc.height=b};q.ue=function(){if(this.l==Ol){var a=this.j;if(a.j.g)a=!1;else if(a.B)a=!1;else{for(var b=t(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Ic&&(c.Ic=!1,zj(a,c,.1));a=!0}}else a=!1;return a};
457
+ q.vg=function(){Ua("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};q.wg=function(){return this.ud};
458
+ function Zk(a){var b=Ok();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.U()&&d.includes(c.code)&&(c.severity=1,a.ue())};b.textDisplayFactory=function(){return a.od?new hk(a.g,a.od):new bk(a.g)};return b}q.Je=function(a){this.od=a};
459
+ function Bl(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new cj;h={id:a.Qf++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
460
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Ib,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 Al(a,b){return I(function(c){if(1==c.g)return u(c,rm(a,b),2);fm(a,b);z(c)})}
461
+ function rm(a,b){var c;return I(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,de(c,b),2);Vl(b);z(d)})}
462
+ function fm(a,b){if(a.l!=nl){ce(b.variants,a.h.restrictions,a.Bc)&&a.j&&Wl(a);var c=a.m?a.m.g:null;if(c&&a.m.B)for(var d=t(b.variants),e=d.next();!e.done;e=d.next()){e=e.value;e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem){f=t(f.initData||[]);for(var g=f.next();!g.done;g=f.next())g=g.value,Uf(a.m,g.initDataType,g.initData)}}sm(a,b)}}
463
+ function Ql(a,b){var c,d,e,f,g;return I(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return I(function(r){if(1==r.g)return k?u(r,k.createSegmentIndex(),2):r["return"](null);n=(m=k.segmentIndex.ac(l))?m.next().value:null;if(!n)return r["return"](null);p=n.startTime;return r["return"](p)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
464
+ function wl(a){var b=a.Kc();if(a.B&&a.N&&a.F){var c=a.I;c.j=b;ej(c);a.S&&(c=a.S,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Gl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(ll("buffering",b))}function Hl(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=ll("ratechange"),a.dispatchEvent(b))}function Gl(a){if(a.B&&a.N){var b=a.B.g;a.N.g==Te?Sk(b,"buffering"):a.g.paused?Sk(b,"paused"):a.g.ended?Sk(b,"ended"):Sk(b,"playing")}}
465
+ function Xl(a){try{sm(a,a.i)}catch(c){return vl(a,c),!1}var b=a.i.variants.filter(function(c){return ze(c)});b=a.ya.create(b);a.C.setVariants(Array.from(b.values()));return!0}function ml(a){return Xl(a)?a.C.chooseVariant():null}function gm(a){var b=ml(a);b&&Jl(a,b,!0,!0,0)}
466
+ function Jl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&Dj(a.j,b,d,e,!0);else{var g=a.B.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Dj(a.j,b,d,e);d=null;f&&(d=re(f));b=re(b);c?Rl(a,d,b):tm(a,d,b)}}function im(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=ye(c);var d=ye(b);tm(a,c,d)}
467
+ function Sl(a,b,c){a=Mb(a.h.preferredTextLanguage);b=Mb(b.language);c=Mb(c.language);return Lb(c,a)&&!Lb(b,c)}function Rl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=ll("adaptation",b);um(a,b)}function Wl(a){var b=ll("trackschanged");um(a,b)}function tm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=ll("variantchanged",b);um(a,b)}function hm(a){var b=ll("textchanged");um(a,b)}function Tl(a){var b=ll("texttrackvisibility");um(a,b)}
468
+ function Ul(a){var b=(new Map).set("newStatus",a.h.abr.enabled);um(a,ll("abrstatuschanged",b))}
469
+ function vm(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;for(var d=a.Qa().find(function(h){return h.active}),e=a.i,f=t(e.variants),g=f.next();!g.done;g=f.next())g=g.value,g.id===d.id&&(g.disabledUntilTime=Date.now()/1E3+c);ce(e.variants,a.h.restrictions,a.Bc);d=ml(a);if(!d)return!1;e=a.kb().video.reduce(function(h,k){return h+k.end-k.start},0);Jl(a,d,!1,!0,e);a.Pf.T(c);return!0}
470
+ function vl(a,b){if(a.l!=nl)if(vm(a,b))b.handled=!0;else{var c=ll("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function zl(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(ll(b,c))}
471
+ function ul(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)}
472
+ function El(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!wm.includes(l)}h!=f.allowedByKeySystem&&
473
+ (e=!0)}}}if(!e||Xl(a))(d=a.j.l)&&!d.allowedByKeySystem&&gm(a),e&&Wl(a)}}function Fl(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=ll("expirationupdated");a.dispatchEvent(b)}function Il(a,b,c){0<b&&(a.U()||a.Jf(b));b=a.getDuration();c<b&&(a.U()||a.bb(c))}
474
+ function sm(a,b){var c=a.m?a.m.kd():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=t(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var r=c[d?"00":p];r?wm.includes(r)&&h.add(r):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
475
+ missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new O(2,4,4012,c);}function Vl(a){if(!a.variants.some(ze))throw new O(2,4,4032);}function um(a,b){I(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=nl&&a.dispatchEvent(b);z(c)})}function km(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Mb(c.language)):b.add("und");return b}
476
+ function jm(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Mb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=t(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
477
+ h.push({language:l,role:n,label:p})}});return h}function pl(){return new O(2,7,7E3)}function kl(a,b,c,d,e,f){return d==a&&e.O==f.O&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Vj(){return{O:null,mimeType:null,startTime:null,Ke:NaN,uri:null}}function ql(a){return new Promise(function(b,c){a.Pb=function(){return c(pl())};a.vd=function(){return b()};a.onError=function(d){return c(d)};a.xd=function(){return c(pl())}})}J("shaka.Player",S);S.prototype.setVideoContainer=S.prototype.Je;
478
+ S.prototype.getManifestParserFactory=S.prototype.wg;S.prototype.getManifest=S.prototype.vg;S.prototype.retryStreaming=S.prototype.ue;S.prototype.setMaxHardwareResolution=S.prototype.Ee;S.prototype.addChaptersTrack=S.prototype.Uf;S.prototype.addTextTrackAsync=S.prototype.Vf;S.prototype.getStats=S.prototype.getStats;S.prototype.getBufferedInfo=S.prototype.kb;S.prototype.getPresentationStartTimeAsDate=S.prototype.tf;S.prototype.getPlayheadTimeAsDate=S.prototype.Ag;
479
+ S.prototype.setTextTrackVisibility=S.prototype.Ie;S.prototype.getChapters=S.prototype.ig;S.prototype.getChaptersTracks=S.prototype.pf;S.prototype.isTextTrackVisible=S.prototype.Nb;S.prototype.selectVariantsByLabel=S.prototype.ih;S.prototype.selectTextLanguage=S.prototype.ye;S.prototype.selectAudioLanguage=S.prototype.Ed;S.prototype.getTextLanguages=S.prototype.Dg;S.prototype.getAudioLanguages=S.prototype.eg;S.prototype.getTextLanguagesAndRoles=S.prototype.Eg;
480
+ S.prototype.getAudioLanguagesAndRoles=S.prototype.fg;S.prototype.selectVariantTrack=S.prototype.Ae;S.prototype.selectTextTrack=S.prototype.ze;S.prototype.getThumbnails=S.prototype.Fg;S.prototype.getImageTracks=S.prototype.pg;S.prototype.getTextTracks=S.prototype.Ab;S.prototype.getVariantTracks=S.prototype.Qa;S.prototype.cancelTrickPlay=S.prototype.$e;S.prototype.trickPlay=S.prototype.Oe;S.prototype.getPlaybackRate=S.prototype.zb;S.prototype.isBuffering=S.prototype.Kc;S.prototype.getKeyStatuses=S.prototype.kd;
481
+ S.prototype.getExpiration=S.prototype.Dc;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.Jg;S.prototype.seekRange=S.prototype.Ia;S.prototype.isAudioOnly=S.prototype.ec;S.prototype.isInProgress=S.prototype.Lb;S.prototype.isLive=S.prototype.U;S.prototype.getAdManager=S.prototype.hd;S.prototype.getAssetUri=S.prototype.Zd;S.prototype.getNetworkingEngine=S.prototype.Ec;S.prototype.getMediaElement=S.prototype.yg;
482
+ S.prototype.getLoadMode=S.prototype.rf;S.prototype.resetConfiguration=S.prototype.fh;S.prototype.getBufferFullness=S.prototype.gg;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.configure=S.prototype.configure;S.prototype.load=S.prototype.load;S.prototype.updateStartTime=S.prototype.uh;S.prototype.unload=S.prototype.Qe;S.prototype.detach=S.prototype.detach;S.prototype.attach=S.prototype.yc;
483
+ S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return I(function(h){if(1==h.g)return b={},a?u(h,mg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Rc()){for(var l in tg)k[l]=!0;for(var m in vg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=Rc()?!!tg[n]:Sc(n);for(var p in l)k[p]=
484
+ Rc()?!!vg[p]:Sc(l[p]);c=k;p='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(ia(Di));
485
+ k={};p=t(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Rc()?Hd(l)?!0:MediaSource.isTypeSupported(l)||td(l):Sc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=xm;for(g in f)e[g]=f[g]();return h["return"](e)})};S.isBrowserSupported=ol;S.setAdManagerFactory=function(a){al=a};S.registerSupportPlugin=function(a,b){xm[a]=b};S.prototype.destroy=S.prototype.destroy;var nl=0,Yk=1,Ol=2,Zl=3;S.LoadMode={DESTROYED:nl,NOT_LOADED:Yk,MEDIA_SOURCE:Ol,SRC_EQUALS:Zl};S.version="v4.1.2";
486
+ var wm=["output-restricted","internal-error"],xm={},al=null,tl={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},qm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
487
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function ym(){this.h=[];this.j=this.i=this.g=0};function zm(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new wf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=zm.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
485
488
  q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.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()};
486
489
  q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
487
- q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};J("shaka.ads.ClientSideAd",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.isLinear=Wm.prototype.isLinear;Wm.prototype.isMuted=Wm.prototype.isMuted;
488
- 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;
489
- Wm.prototype.getMinSuggestedDuration=Wm.prototype.getMinSuggestedDuration;Wm.prototype.getDuration=Wm.prototype.getDuration;function Xm(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.j=d;this.m=null;this.h=new uf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.0.4");this.g=null;this.h.Fa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Ym(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
490
- function(f){Zm(e,f)});this.i.onended=function(){e.l.contentComplete()}}Xm.prototype.stop=function(){this.g&&this.g.stop();this.A&&fk(this.A)};Xm.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Zm(a,b){b.getError();$m(a,null);a.j(new L("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
491
- function Ym(a,b){a.j(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.j(new L("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.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 L("ad-cue-points-changed",(new Map).set("cuepoints",d)))}an(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,bn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",
492
- function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,bn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,bn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)),a.g.start()}catch(f){$m(a,null)}}function bn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
493
- function an(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new L(d,e))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Zm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){cn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){cn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
494
- function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){$m(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){$m(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
490
+ q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};J("shaka.ads.ClientSideAd",zm);zm.prototype.release=zm.prototype.release;zm.prototype.getPositionInSequence=zm.prototype.getPositionInSequence;zm.prototype.getSequenceLength=zm.prototype.getSequenceLength;zm.prototype.setMuted=zm.prototype.setMuted;zm.prototype.resize=zm.prototype.resize;zm.prototype.isLinear=zm.prototype.isLinear;zm.prototype.isMuted=zm.prototype.isMuted;
491
+ zm.prototype.setVolume=zm.prototype.setVolume;zm.prototype.getVolume=zm.prototype.getVolume;zm.prototype.play=zm.prototype.play;zm.prototype.pause=zm.prototype.pause;zm.prototype.skip=zm.prototype.skip;zm.prototype.canSkipNow=zm.prototype.canSkipNow;zm.prototype.getTimeUntilSkippable=zm.prototype.getTimeUntilSkippable;zm.prototype.isSkippable=zm.prototype.isSkippable;zm.prototype.isPaused=zm.prototype.isPaused;zm.prototype.getRemainingTime=zm.prototype.getRemainingTime;
492
+ zm.prototype.getMinSuggestedDuration=zm.prototype.getMinSuggestedDuration;zm.prototype.getDuration=zm.prototype.getDuration;function Am(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.j=d;this.m=null;this.h=new wf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.1.2");this.g=null;this.h.Fa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Bm(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
493
+ function(f){Cm(e,f)});this.i.onended=function(){e.l.contentComplete()}}Am.prototype.stop=function(){this.g&&this.g.stop();this.A&&gk(this.A)};Am.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Cm(a,b){b.getError();Dm(a,null);a.j(new L("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
494
+ function Bm(a,b){a.j(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.j(new L("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new L("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Em(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Fm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",
495
+ function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Fm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Fm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)),a.g.start()}catch(f){Dm(a,null)}}function Fm(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
496
+ function Em(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new L(d,e))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Cm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Gm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Gm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
497
+ function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Dm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Dm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
495
498
  a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.m.i=!0;b(c,"ad-paused")});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.m.i=!1;b(c,"ad-resumed")});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.o(a.g,
496
499
  google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g,google.ima.AdEvent.Type.AD_METADATA,
497
- function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function cn(a,b){var c=b.getAd();a.m=new Wm(c,a.g,a.i);c=(new Map).set("ad",a.m).set("sdkAdObject",c).set("originalEvent",b);a.j(new L("ad-started",c));a.m.isLinear()&&(a.A.setAttribute("ad-active","true"),a.i.pause())}
498
- function $m(a,b){a.j(new L("ad-stopped",(new Map).set("originalEvent",b)));a.m.isLinear()&&(a.A.removeAttribute("ad-active"),a.i.play())};function dn(a,b){this.i=a;this.h=null;this.g=b}q=dn.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)};
500
+ function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Gm(a,b){var c=b.getAd();a.m=new zm(c,a.g,a.i);c=(new Map).set("ad",a.m).set("sdkAdObject",c).set("originalEvent",b);a.j(new L("ad-started",c));a.m.isLinear()&&(a.A.setAttribute("ad-active","true"),a.i.pause())}
501
+ function Dm(a,b){a.j(new L("ad-stopped",(new Map).set("originalEvent",b)));a.m.isLinear()&&(a.A.removeAttribute("ad-active"),a.i.play())};function Hm(a,b){this.i=a;this.h=null;this.g=b}q=Hm.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)};
499
502
  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.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
500
- 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.h=this.i=null};J("shaka.ads.ServerSideAd",dn);dn.prototype.release=dn.prototype.release;dn.prototype.getPositionInSequence=dn.prototype.getPositionInSequence;dn.prototype.getSequenceLength=dn.prototype.getSequenceLength;dn.prototype.setMuted=dn.prototype.setMuted;
501
- dn.prototype.resize=dn.prototype.resize;dn.prototype.isLinear=dn.prototype.isLinear;dn.prototype.isMuted=dn.prototype.isMuted;dn.prototype.setVolume=dn.prototype.setVolume;dn.prototype.getVolume=dn.prototype.getVolume;dn.prototype.play=dn.prototype.play;dn.prototype.pause=dn.prototype.pause;dn.prototype.skip=dn.prototype.skip;dn.prototype.canSkipNow=dn.prototype.canSkipNow;dn.prototype.getTimeUntilSkippable=dn.prototype.getTimeUntilSkippable;dn.prototype.isSkippable=dn.prototype.isSkippable;
502
- dn.prototype.isPaused=dn.prototype.isPaused;dn.prototype.getRemainingTime=dn.prototype.getRemainingTime;dn.prototype.getMinSuggestedDuration=dn.prototype.getMinSuggestedDuration;dn.prototype.getDuration=dn.prototype.getDuration;function en(a,b,c,d){var e=this;this.B=a;this.l=b;this.j=null;this.I=NaN;this.i=d;this.H=!1;this.C=this.m=this.A=null;this.F="";this.G=[];this.h=new uf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.B,a);this.i(new L("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){fn(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
503
- e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new dn(f,e.l);e.C&&(e.m.h=e.C);e.i(new L("ad-started",(new Map).set("ad",e.m)));e.B.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
503
+ 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.h=this.i=null};J("shaka.ads.ServerSideAd",Hm);Hm.prototype.release=Hm.prototype.release;Hm.prototype.getPositionInSequence=Hm.prototype.getPositionInSequence;Hm.prototype.getSequenceLength=Hm.prototype.getSequenceLength;Hm.prototype.setMuted=Hm.prototype.setMuted;
504
+ Hm.prototype.resize=Hm.prototype.resize;Hm.prototype.isLinear=Hm.prototype.isLinear;Hm.prototype.isMuted=Hm.prototype.isMuted;Hm.prototype.setVolume=Hm.prototype.setVolume;Hm.prototype.getVolume=Hm.prototype.getVolume;Hm.prototype.play=Hm.prototype.play;Hm.prototype.pause=Hm.prototype.pause;Hm.prototype.skip=Hm.prototype.skip;Hm.prototype.canSkipNow=Hm.prototype.canSkipNow;Hm.prototype.getTimeUntilSkippable=Hm.prototype.getTimeUntilSkippable;Hm.prototype.isSkippable=Hm.prototype.isSkippable;
505
+ Hm.prototype.isPaused=Hm.prototype.isPaused;Hm.prototype.getRemainingTime=Hm.prototype.getRemainingTime;Hm.prototype.getMinSuggestedDuration=Hm.prototype.getMinSuggestedDuration;Hm.prototype.getDuration=Hm.prototype.getDuration;function Im(a,b,c,d){var e=this;this.B=a;this.l=b;this.j=null;this.I=NaN;this.i=d;this.H=!1;this.C=this.m=this.A=null;this.F="";this.G=[];this.h=new wf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.B,a);this.i(new L("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Jm(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
506
+ e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Hm(f,e.l);e.C&&(e.m.h=e.C);e.i(new L("ad-started",(new Map).set("ad",e.m)));e.B.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
504
507
  var f=e.l.currentTime;e.A&&e.A>f&&(e.l.currentTime=e.A,e.A=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.h=e.C)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new L("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new L("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new L("ad-third-quartile"))});
505
- this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new L("ad-complete"));e.i(new L("ad-stopped"));e.B.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new L("ad-skipped"));e.i(new L("ad-stopped"))});this.h.o(this.g,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.G=
506
- f;e.i(new L("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}en.prototype.stop=function(){this.F="";this.A=null;this.G=[]};en.prototype.release=function(){this.stop();this.h&&this.h.release()};en.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
507
- function fn(a,b){a.i(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.l.currentTime=e.start)}})};function T(){eb.call(this);this.g=this.i=null;this.h=new Vm;this.j=navigator.language}qa(T,eb);q=T.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new O(2,10,1E4);this.i&&this.i.release();this.i=new Xm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
508
- q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);eb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new L("ad-stopped"));this.h=new Vm};q.requestClientSideAds=function(a){if(!this.i)throw new O(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.l.requestAds(a)};
509
- 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 en(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
510
- 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="v4.0.4";c=this.g;var d=b;c.j?c=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
511
- (c.H=!0),c.j=new Mc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);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="v4.0.4";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new O(1,10,10003);return this.g.G};
508
+ this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new L("ad-complete"));e.i(new L("ad-stopped"));e.B.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new L("ad-skipped"));e.i(new L("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.G=
509
+ f;e.i(new L("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Im.prototype.stop=function(){this.F="";this.A=null;this.G=[]};Im.prototype.release=function(){this.stop();this.h&&this.h.release()};Im.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
510
+ function Jm(a,b){a.i(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.l.currentTime=e.start)}})};function T(){fb.call(this);this.g=this.i=null;this.h=new ym;this.j=navigator.language}qa(T,fb);q=T.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new O(2,10,1E4);this.i&&this.i.release();this.i=new Am(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
511
+ q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);fb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new L("ad-stopped"));this.h=new ym};q.requestClientSideAds=function(a){if(!this.i)throw new O(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.l.requestAds(a)};
512
+ 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 Im(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
513
+ 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)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.1.2";c=this.g;var d=b;c.j?c=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
514
+ (c.H=!0),c.j=new Nc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.1.2";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new O(1,10,10003);return this.g.G};
512
515
  q.getStats=function(){var a=this.h;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.g.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};J("shaka.ads.AdManager",T);
513
516
  T.prototype.onCueMetadataChange=T.prototype.onCueMetadataChange;T.prototype.onHlsTimedMetadata=T.prototype.onHlsTimedMetadata;T.prototype.onDashTimedMetadata=T.prototype.onDashTimedMetadata;T.prototype.getStats=T.prototype.getStats;T.prototype.getServerSideCuePoints=T.prototype.getServerSideCuePoints;T.prototype.replaceServerSideAdTagParameters=T.prototype.replaceServerSideAdTagParameters;T.prototype.requestServerSideStream=T.prototype.requestServerSideStream;T.prototype.initServerSide=T.prototype.initServerSide;
514
517
  T.prototype.requestClientSideAds=T.prototype.requestClientSideAds;T.prototype.onAssetUnload=T.prototype.onAssetUnload;T.prototype.release=T.prototype.release;T.prototype.initClientSide=T.prototype.initClientSide;T.prototype.setLocale=T.prototype.setLocale;T.ADS_LOADED="ads-loaded";T.AD_STARTED="ad-started";T.AD_FIRST_QUARTILE="ad-first-quartile";T.AD_MIDPOINT="ad-midpoint";T.AD_THIRD_QUARTILE="ad-third-quartile";T.AD_COMPLETE="ad-complete";T.AD_STOPPED="ad-stopped";T.AD_SKIPPED="ad-skipped";
515
518
  T.AD_VOLUME_CHANGED="ad-volume-changed";T.AD_MUTED="ad-muted";T.AD_PAUSED="ad-paused";T.AD_RESUMED="ad-resumed";T.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";T.CUEPOINTS_CHANGED="ad-cue-points-changed";T.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";T.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";T.AD_CLICKED="ad-clicked";T.AD_PROGRESS="ad-progress";T.AD_BUFFERING="ad-buffering";T.AD_IMPRESSION="ad-impression";T.AD_DURATION_CHANGED="ad-duration-changed";T.AD_CLOSED="ad-closed";
516
- T.AD_LOADED="ad-loaded";T.ALL_ADS_COMPLETED="all-ads-completed";T.AD_LINEAR_CHANGED="ad-linear-changed";T.AD_METADATA="ad-metadata";T.AD_RECOVERABLE_ERROR="ad-recoverable-error";T.AD_BREAK_READY="ad-break-ready";T.AD_INTERACTION="ad-interaction";$k=function(){return new T};function gn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof L){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
517
- TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(ci(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}})}
518
- function hn(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=jn(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})}
519
- function jn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
520
- var kn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),ln="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),mn=["loop","playbackRate"],nn=["pause","play"],on={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
521
- getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},pn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},qn=[["getConfiguration","configure"]],rn=[["isTextTrackVisible","setTextTrackVisibility"]],sn="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
522
- tn=["attach","detach","load","unload"];function un(a,b,c,d,e,f){var g=this;this.I=a;this.j=new P(b);this.P=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.N="";this.A=null;this.F=function(){return vn(g)};this.G=function(h,k){var l=hn(k);switch(l.type){case "event":var m=l.targetName;l=Pa(l.event);g.B(m,l);break;case "update":m=l.update;for(var p in m){l=g.g[p]||{};for(var n in m[p])l[n]=m[p][n]}g.C&&(g.P(),g.C=!1);break;case "asyncComplete":if(p=l.id,l=l.error,n=g.i[p],delete g.i[p],n)if(l){p=new O(l.severity,l.category,l.code);
523
- for(m in l)p[m]=l[m];n.reject(p)}else n.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;wn.add(this)}q=un.prototype;q.destroy=function(){wn["delete"](this);xn(this);yn&&zn(this);this.j&&(this.j.stop(),this.j=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.F=this.l=this.i=this.g=this.A=null;return Promise.resolve()};q.qa=function(){return this.h};q.yd=function(){return this.N};
524
- q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.xa();var a=new chrome.cast.SessionRequest(this.I);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(wn),d=c.next();!d.done;d=c.next())An(d.value,b)},function(b){for(var c=r(wn),d=c.next();!d.done;d=c.next())d=d.value,Bn="available"==b,d.j.xa()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Bn&&this.j.S(Cn);(a=yn)&&a.status!=chrome.cast.SessionStatus.STOPPED?An(this,
525
- a):yn=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Dn),window.__onGCastApiAvailable!=Dn&&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.ze=function(a){this.A=a;this.h&&En(this,{type:"appData",appData:this.A})};
526
- q.cast=function(a){var b=this;return I(function(c){if(!b.m)throw new O(1,8,8E3);if(!Bn)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new Mc;chrome.cast.requestSession(function(d){return Fn(b,a,d)},function(d){return Gn(b,d)});return u(c,b.l,0)})};function Hn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return Fn(a,b,c)},function(c){return Gn(a,c)})}}q.Zb=function(){if(this.h){xn(this);if(yn){zn(this);try{yn.stop(function(){},function(){})}catch(a){}yn=null}vn(this)}};
527
- q.get=function(a,b){var c=this;if("video"==a){if(nn.includes(b))return function(){return c.yf.apply(c,[a,b].concat(ia(Ha.apply(0,arguments))))}}else if("player"==a){if(pn[b]&&!this.get("player","isLive")())return function(){};if(sn.includes(b))return function(){return c.yf.apply(c,[a,b].concat(ia(Ha.apply(0,arguments))))};if(tn.includes(b))return function(){return c.Wg.apply(c,[a,b].concat(ia(Ha.apply(0,arguments))))};if(on[b])return function(){return c.g[a][b]}}return this.g[a][b]};
528
- q.set=function(a,b,c){this.g[a][b]=c;En(this,{type:"set",targetName:a,property:b,value:c})};function Fn(a,b,c){yn=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);vn(a);En(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}function Gn(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))}
529
- q.yf=function(a,b){En(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};q.Wg=function(a,b){var c=Ha.apply(2,arguments),d=new Mc,e=this.J.toString();this.J++;this.i[e]=d;try{En(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function An(a,b){var c=a.K();a.l=new Mc;a.C=!0;Fn(a,c,b)}function zn(a){var b=yn;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
530
- function vn(a){var b=yn?"connected"==yn.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};xn(a)}a.h=b;a.N=b?yn.receiver.friendlyName:"";a.j.xa()}function xn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}function En(a,b){var c=gn(b),d=yn;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 L("error",(new Map).set("detail",c)),a.B("player",d),a.Zb(),c;}}var Cn=.02,Bn=!1,yn=null,wn=new Set;
531
- function Dn(a){if(a){a=r(wn);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function In(a,b,c){eb.call(this);var d=this;this.i=a;this.h=b;this.m=this.A=this.j=this.B=this.l=null;this.F=c;this.C=new Map;this.g=new un(c,function(){return Jn(d)},function(){return Kn(d)},function(e,f){return Ln(d,e,f)},function(){return Mn(d)},function(){return Nn(d)});On(this)}qa(In,eb);q=In.prototype;
532
- q.destroy=function(a){a&&this.g.Zb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.B=this.l=this.i=null;eb.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.bc=function(){return this.B};q.Ve=function(){return this.g.m&&Bn};q.qa=function(){return this.g.qa()};q.yd=function(){return this.g.yd()};
533
- q.cast=function(){var a=this,b;return I(function(c){return 1==c.g?(b=Nn(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Oe(),0):c["return"]()})};q.ze=function(a){this.g.ze(a)};q.Gf=function(){Hn(this.g)};q.Zb=function(){this.g.Zb()};
534
- q.Ze=function(a){var b=this;return I(function(c){if(1==c.g){if(a==b.F)return c["return"]();b.F=a;b.g.Zb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new un(a,function(){return Jn(b)},function(){return Kn(b)},function(d,e){return Ln(b,d,e)},function(){return Mn(b)},function(){return Nn(b)});b.g.init();z(c)})};
535
- function On(a){a.g.init();a.m=new uf;for(var b=r(kn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.qa()||(f=Pa(f),a.j.dispatchEvent(f))});for(var d in Um)a.m.o(a.h,Um[d],function(f){a.g.qa()||a.A.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.sc=e,Object.defineProperty(a.l,b.sc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Pn(a,f.sc)}}(b),set:function(f){return function(g){var h=f.sc;a.g.qa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={sc:b.sc};a.B={};Qn(a,
536
- function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return Rn(a,f)}})});Sn(a);a.j=new eb;a.j.nd=a.l;a.A=new eb;a.A.nd=a.B}function Sn(a){var b=new Map;Qn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.C.set(c,e):a.C.set(e,c)}else b.set(d,c)})}
537
- function Qn(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=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)}}
538
- function Nn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Vd(),startTime:null};a.i.pause();for(var c=r(mn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=r(qn);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=r(rn);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function Jn(a){var b=new L("caststatuschanged");a.dispatchEvent(b)}
539
- function Kn(a){var b=new L(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
540
- function Mn(a){for(var b=r(qn),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=r(mn);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=r(mn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(rn);for(k=
541
- h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new L(Qm,h);a.h.dispatchEvent(h)})}
542
- function Pn(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.qa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.qa()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
543
- function Rn(a,b){a.C.has(b)&&(b=a.C.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.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Ec()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.fd()};
544
- if("setVideoContainer"==b)return function(c){return a.h.He(c)};if(a.g.qa()){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.qa()&&0==Object.keys(a.g.g.video).length&&on[b]||!a.g.qa()?a.h[b].bind(a.h):a.g.get("player",b)}function Ln(a,b,c){a.g.qa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}
545
- J("shaka.cast.CastProxy",In);In.prototype.changeReceiverId=In.prototype.Ze;In.prototype.forceDisconnect=In.prototype.Zb;In.prototype.suggestDisconnect=In.prototype.Gf;In.prototype.setAppData=In.prototype.ze;In.prototype.cast=In.prototype.cast;In.prototype.receiverName=In.prototype.yd;In.prototype.isCasting=In.prototype.qa;In.prototype.canCast=In.prototype.Ve;In.prototype.getPlayer=In.prototype.bc;In.prototype.getVideo=In.prototype.Bb;In.prototype.destroy=In.prototype.destroy;function Tn(a,b,c,d){eb.call(this);var e=this;this.g=a;this.h=b;this.j=new uf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.A=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new P(function(){Un(e)});Vn(this)}qa(Tn,eb);q=Tn.prototype;q.isConnected=function(){return this.H};q.Gg=function(){return this.A};q.fh=function(a){this.i=a};q.Vf=function(){this.i=null};
546
- q.gh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.eh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.dh=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
547
- q.destroy=function(){var a=this,b,c;return I(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!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)})};
548
- function Vn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Wn(a)};b.onSenderDisconnected=function(){return Wn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Xn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Xn(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 Yn(a,
549
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Zn(a,e)};b.start();b=r(kn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return $n(a,"video",e)});for(var d in Um)a.j.o(a.h,Um[d],function(e){return $n(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Ce(3840,2160):a.h.Ce(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.A=
550
- !1;ao(a)});a.j.o(a.g,"playing",function(){a.A=!1;ao(a)});a.j.o(a.g,"pause",function(){ao(a)});a.j.o(a.h,"unloading",function(){a.A=!0;ao(a)});a.j.o(a.g,"ended",function(){(new P(function(){a.g&&a.g.ended&&(a.A=!0,ao(a))})).S(bo)})}function Wn(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;ao(a)}
551
- function ao(a){var b;I(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new L("caststatuschanged");a.dispatchEvent(b);co(a)||eo(a);z(c)})}
552
- function fo(a,b,c){var d,e,f,g,h,k,l,m,p,n,t;I(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,B(v,5),u(v,a.h.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=F(v),h=Qm,k=(new Map).set("detail",g),l=new L(h,k),a.h&&a.h.dispatchEvent(l),v["return"]();case 3:if(!a.h)return v["return"]();for(m in b.video)p=b.video[m],a.g[m]=p;for(n in b.playerAfterLoad)t=b.playerAfterLoad[n],
553
- a.h[n](t);a.g.autoplay=f;b.manifest&&(a.g.play(),eo(a));z(v)}})}function $n(a,b,c){a.h&&(Un(a),Xn(a,{type:"event",targetName:b,event:c},a.l))}
554
- function Un(a){a.I.S(go);for(var b={video:{},player:{}},c=r(ln),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in pn)0==a.m%pn[e]&&(b.player[e]=a.h[e]());for(var f in on)0==a.m%on[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.F&&(a.m+=1);Xn(a,{type:"update",update:b},a.l);co(a)}function co(a){return a.C&&(a.g.duration||a.h.T())?(ho(a),a.C=!1,!0):!1}
555
- function ho(a,b){var c={contentId:a.h.Vd(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);eo(a,void 0===b?0:b,c)}
556
- function Zn(a,b){var c=hn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;fo(a,c.initState,c.appData);Un(a);break;case "appData":a.G(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.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
557
- c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.J[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return io(a,h,g,null)},function(k){return io(a,h,g,k)})}}
558
- function Yn(a,b){var c=hn(b.data);switch(c.type){case "PLAY":a.g.play();eo(a);break;case "PAUSE":a.g.pause();eo(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(),eo(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),eo(a));break;case "STOP":a.h.Oe().then(function(){a.h&&eo(a)});break;case "GET_STATUS":ho(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));
559
- null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||eo(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;d=c.media;e=c.currentTime;f=a.K(d.contentId);g=c.autoplay||!0;a.G(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&ho(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Xn(a,{requestId:Number(c.requestId),type:k},a.B)});break;default:Xn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
560
- function io(a,b,c,d){a.h&&Xn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Xn(a,b,c,d){a.H&&(a=gn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function eo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?jo:a.h.Jc()?ko:a.g.paused?lo:mo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Xn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
561
- J("shaka.cast.CastReceiver",Tn);Tn.prototype.destroy=Tn.prototype.destroy;Tn.prototype.setContentArtist=Tn.prototype.dh;Tn.prototype.setContentImage=Tn.prototype.eh;Tn.prototype.setContentTitle=Tn.prototype.gh;Tn.prototype.clearContentMetadata=Tn.prototype.Vf;Tn.prototype.setContentMetadata=Tn.prototype.fh;Tn.prototype.isIdle=Tn.prototype.Gg;Tn.prototype.isConnected=Tn.prototype.isConnected;var go=.5,bo=5,jo="IDLE",mo="PLAYING",ko="BUFFERING",lo="PAUSED";function no(a){var b=this;this.g=[];this.h=[];this.data=[];(new yg).box("moov",Cg).Y("pssh",function(c){if(!(1<c.version)){var d=Fc(c.reader.W,-12,c.size);b.data.push(d);b.g.push(pd(c.reader.Cb(16)));if(0<c.version){d=c.reader.R();for(var e=0;e<d;e++){var f=pd(c.reader.Cb(16));b.h.push(f)}}}}).parse(a)}
562
- function oo(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Ic(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=r(c),c=b.next();!c.done;c=b.next())c=od(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function po(a,b){var c=qo(a,b);return 1!=c.length?null:c[0]}function ro(a,b,c){a=so(a,b,c);return 1!=a.length?null:a[0]}function qo(a,b){for(var c=[],d=r(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function to(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
563
- function so(a,b,c){var d=[];a=r(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function uo(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function vo(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 wo(a){return Array.from(a.childNodes).every(xo)?a.textContent.trim():null}
564
- function xo(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function yo(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function zo(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}
565
- function Ao(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
566
- function Bo(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 Co(a){a=Number(a);return 0===a%1?a:null}function Do(a){a=Number(a);return 0===a%1&&0<a?a:null}function Eo(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Fo(a){a=Number(a);return isNaN(a)?null:a}function Go(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
567
- function Ho(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 Io(a,b){try{var c=dd(a);return Ho(c,b)}catch(d){return null}};function Jo(a,b,c){var d=Ko(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new O(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.ve?(e=h.init||e,!1):!0}),f.length&&(a=Lo(e,f,c,g),0==a.length&&(a=[Db("",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(Db(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
568
- r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{df:g,Oi:e,drmInfos:a,jf:!0}}function Mo(a,b,c,d){var e=Jo(a,c,d);if(b.jf){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.jf=!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.df||b.df}
569
- function No(a){var b=0,c=Ic(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=Fc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
570
- function Oo(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 Po(a){a=ro(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=nd(a.textContent);a=No(a).filter(function(b){return b.type===Qo})[0];if(!a)return"";a=fd(a.value,!0);return(a=Ho(a,"WRMHEADER"))?Oo(a):""}
571
- function Lo(a,b,c,d){var e=[];b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.ve];if(g){var h;if(h=ro(f.node,"urn:microsoft:playready","pro")){h=nd(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:oo(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.ve)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
572
- 226,251,75]),m=new Uint8Array([]);k=[{initData:oo(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Db(g,f.init||a||h||k);if(g=Ro.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function Ko(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=So(c.value))&&b.push(c);return b}
573
- function So(a){var b=a.getAttribute("schemeIdUri"),c=uo(a,"urn:mpeg:cenc:2013","default_KID"),d=so(a,"urn:mpeg:cenc:2013","pssh").map(wo);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:nd(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,ve:b,keyId:c,init:0<e.length?e:null}}
574
- var Qo=1,Ro=(new Map).set("com.widevine.alpha",function(a){return(a=ro(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Po).set("com.microsoft.playready.recommendation",Po).set("com.microsoft.playready.software",Po).set("com.microsoft.playready.hardware",Po).set("org.w3.clearkey",function(a){return(a=ro(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function To(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
519
+ T.AD_LOADED="ad-loaded";T.ALL_ADS_COMPLETED="all-ads-completed";T.AD_LINEAR_CHANGED="ad-linear-changed";T.AD_METADATA="ad-metadata";T.AD_RECOVERABLE_ERROR="ad-recoverable-error";T.AD_BREAK_READY="ad-break-ready";T.AD_INTERACTION="ad-interaction";al=function(){return new T};function Km(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof L){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=t(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=t(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
520
+ TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(ei(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}})}
521
+ function Lm(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=Mm(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})}
522
+ function Mm(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
523
+ var Nm="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Om="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Pm=["loop","playbackRate"],Qm=["pause","play"],Rm={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
524
+ getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Sm={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Tm=[["getConfiguration","configure"]],Um=[["isTextTrackVisible","setTextTrackVisibility"]],Vm="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
525
+ Wm=["attach","detach","load","unload"];function Xm(a,b,c,d,e,f,g){var h=this;this.I=a;this.P=g;this.j=new P(b);this.S=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.N="";this.A=null;this.F=function(){return Ym(h)};this.G=function(k,l){var m=Lm(l);switch(m.type){case "event":var n=m.targetName;m=Pa(m.event);h.B(n,m);break;case "update":n=m.update;for(var p in n){m=h.g[p]||{};for(var r in n[p])m[r]=n[p][r]}h.C&&(h.S(),h.C=!1);break;case "asyncComplete":if(p=m.id,m=m.error,r=h.i[p],delete h.i[p],r)if(m){p=new O(m.severity,m.category,
526
+ m.code);for(n in m)p[n]=m[n];r.reject(p)}else r.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;Zm.add(this)}q=Xm.prototype;q.destroy=function(){Zm["delete"](this);$m(this);an&&bn(this);this.j&&(this.j.stop(),this.j=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.F=this.l=this.i=this.g=this.A=null;return Promise.resolve()};q.qa=function(){return this.h};q.Cd=function(){return this.N};
527
+ q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.xa();var a=new chrome.cast.SessionRequest(this.I,[],null,this.P,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Zm),d=c.next();!d.done;d=c.next())cn(d.value,b)},function(b){for(var c=t(Zm),d=c.next();!d.done;d=c.next())d=d.value,dn="available"==b,d.j.xa()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});dn&&this.j.T(en);(a=an)&&a.status!=chrome.cast.SessionStatus.STOPPED?
528
+ cn(this,a):an=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=fn),window.__onGCastApiAvailable!=fn&&Ua("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.Be=function(a){this.A=a;this.h&&gn(this,{type:"appData",appData:this.A})};
529
+ q.cast=function(a){var b=this;return I(function(c){if(!b.m)throw new O(1,8,8E3);if(!dn)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new Nc;chrome.cast.requestSession(function(d){return hn(b,a,d)},function(d){return jn(b,d)});return u(c,b.l,0)})};function kn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return hn(a,b,c)},function(c){return jn(a,c)})}}q.Zb=function(){if(this.h){$m(this);if(an){bn(this);try{an.stop(function(){},function(){})}catch(a){}an=null}Ym(this)}};
530
+ q.get=function(a,b){var c=this;if("video"==a){if(Qm.includes(b))return function(){return c.Df.apply(c,[a,b].concat(ia(Ha.apply(0,arguments))))}}else if("player"==a){if(Sm[b]&&!this.get("player","isLive")())return function(){};if(Vm.includes(b))return function(){return c.Df.apply(c,[a,b].concat(ia(Ha.apply(0,arguments))))};if(Wm.includes(b))return function(){return c.bh.apply(c,[a,b].concat(ia(Ha.apply(0,arguments))))};if(Rm[b])return function(){return c.g[a][b]}}return this.g[a][b]};
531
+ q.set=function(a,b,c){this.g[a][b]=c;gn(this,{type:"set",targetName:a,property:b,value:c})};function hn(a,b,c){an=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);Ym(a);gn(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}function jn(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))}
532
+ q.Df=function(a,b){gn(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};q.bh=function(a,b){var c=Ha.apply(2,arguments),d=new Nc,e=this.J.toString();this.J++;this.i[e]=d;try{gn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function cn(a,b){var c=a.K();a.l=new Nc;a.C=!0;hn(a,c,b)}function bn(a){var b=an;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
533
+ function Ym(a){var b=an?"connected"==an.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};$m(a)}a.h=b;a.N=b?an.receiver.friendlyName:"";a.j.xa()}function $m(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}function gn(a,b){var c=Km(b),d=an;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Xa)}catch(e){throw c=new O(2,8,8005,e),d=new L("error",(new Map).set("detail",c)),a.B("player",d),a.Zb(),c;}}var en=.02,dn=!1,an=null,Zm=new Set;
534
+ function fn(a){if(a){a=t(Zm);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function ln(a,b,c,d){d=void 0===d?!1:d;fb.call(this);var e=this;this.i=a;this.h=b;this.m=this.A=this.j=this.B=this.l=null;this.G=c;this.F=d;this.C=new Map;this.g=new Xm(c,function(){return mn(e)},function(){return nn(e)},function(f,g){return on(e,f,g)},function(){return pn(e)},function(){return qn(e)},d);rn(this)}qa(ln,fb);q=ln.prototype;
535
+ q.destroy=function(a){a&&this.g.Zb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.B=this.l=this.i=null;fb.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.bc=function(){return this.B};q.Ze=function(){return this.g.m&&dn};q.qa=function(){return this.g.qa()};q.Cd=function(){return this.g.Cd()};
536
+ q.cast=function(){var a=this,b;return I(function(c){return 1==c.g?(b=qn(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.Qe(),0):c["return"]()})};q.Be=function(a){this.g.Be(a)};q.Lf=function(){kn(this.g)};q.Zb=function(){this.g.Zb()};
537
+ q.df=function(a,b){b=void 0===b?!1:b;var c=this;return I(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d["return"]();c.G=a;c.F=b;c.g.Zb();return u(d,c.g.destroy(),2)}c.g=null;c.g=new Xm(a,function(){return mn(c)},function(){return nn(c)},function(e,f){return on(c,e,f)},function(){return pn(c)},function(){return qn(c)},b);c.g.init();z(d)})};
538
+ function rn(a){a.g.init();a.m=new wf;for(var b=t(Nm),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.qa()||(f=Pa(f),a.j.dispatchEvent(f))});for(var d in Qa)a.m.o(a.h,Qa[d],function(f){a.g.qa()||a.A.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.sc=e,Object.defineProperty(a.l,b.sc,{configurable:!1,enumerable:!0,get:function(f){return function(){return sn(a,f.sc)}}(b),set:function(f){return function(g){var h=f.sc;a.g.qa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={sc:b.sc};a.B={};tn(a,
539
+ function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return un(a,f)}})});vn(a);a.j=new fb;a.j.rd=a.l;a.A=new fb;a.A.rd=a.B}function vn(a){var b=new Map;tn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.C.set(c,e):a.C.set(e,c)}else b.set(d,c)})}
540
+ function tn(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=t(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
541
+ function qn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Zd(),startTime:null};a.i.pause();for(var c=t(Pm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(Tm);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(Um);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function mn(a){var b=new L("caststatuschanged");a.dispatchEvent(b)}
542
+ function nn(a){var b=new L(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
543
+ function pn(a){for(var b=t(Tm),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=t(Pm);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=t(Pm),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(Um);for(k=
544
+ h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new L("error",h);a.h.dispatchEvent(h)})}
545
+ function sn(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.qa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.qa()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
546
+ function un(a,b){a.C.has(b)&&(b=a.C.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.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Ec()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.hd()};
547
+ if("setVideoContainer"==b)return function(c){return a.h.Je(c)};if(a.g.qa()){if("getManifest"==b||"drmInfo"==b)return function(){Ua(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ua(b+"() does not work while casting!");return Promise.resolve()}}return a.g.qa()&&0==Object.keys(a.g.g.video).length&&Rm[b]||!a.g.qa()?a.h[b].bind(a.h):a.g.get("player",b)}function on(a,b,c){a.g.qa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}
548
+ J("shaka.cast.CastProxy",ln);ln.prototype.changeReceiverId=ln.prototype.df;ln.prototype.forceDisconnect=ln.prototype.Zb;ln.prototype.suggestDisconnect=ln.prototype.Lf;ln.prototype.setAppData=ln.prototype.Be;ln.prototype.cast=ln.prototype.cast;ln.prototype.receiverName=ln.prototype.Cd;ln.prototype.isCasting=ln.prototype.qa;ln.prototype.canCast=ln.prototype.Ze;ln.prototype.getPlayer=ln.prototype.bc;ln.prototype.getVideo=ln.prototype.Bb;ln.prototype.destroy=ln.prototype.destroy;function wn(a,b,c,d){fb.call(this);var e=this;this.g=a;this.h=b;this.j=new wf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.A=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new P(function(){xn(e)});yn(this)}qa(wn,fb);q=wn.prototype;q.isConnected=function(){return this.H};q.Mg=function(){return this.A};q.lh=function(a){this.i=a};q.ag=function(){this.i=null};
549
+ q.mh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.kh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.jh=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
550
+ q.destroy=function(){var a=this,b,c;return I(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.A=!0,a.l=null,a.B=null,fb.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
551
+ function yn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return zn(a)};b.onSenderDisconnected=function(){return zn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&An(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);An(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 Bn(a,
552
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Cn(a,e)};b.start();b=t(Nm);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Dn(a,"video",e)});for(var d in Qa)a.j.o(a.h,Qa[d],function(e){return Dn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Ee(3840,2160):a.h.Ee(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.A=
553
+ !1;En(a)});a.j.o(a.g,"playing",function(){a.A=!1;En(a)});a.j.o(a.g,"pause",function(){En(a)});a.j.o(a.h,"unloading",function(){a.A=!0;En(a)});a.j.o(a.g,"ended",function(){(new P(function(){a.g&&a.g.ended&&(a.A=!0,En(a))})).T(Fn)})}function zn(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;En(a)}
554
+ function En(a){var b;I(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new L("caststatuschanged");a.dispatchEvent(b);Gn(a)||Hn(a);z(c)})}
555
+ function In(a,b,c){var d,e,f,g,h,k,l,m,n,p;I(function(r){switch(r.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,A(r,5),u(r,a.h.load(b.manifest,b.startTime),7)):u(r,Promise.resolve(),3);case 7:va(r,3);break;case 5:return g=F(r),h=(new Map).set("detail",g),k=new L("error",h),a.h&&a.h.dispatchEvent(k),r["return"]();case 3:if(!a.h)return r["return"]();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],
556
+ a.h[n](p);a.g.autoplay=f;b.manifest&&(a.g.play(),Hn(a));z(r)}})}function Dn(a,b,c){a.h&&(xn(a),An(a,{type:"event",targetName:b,event:c},a.l))}
557
+ function xn(a){a.I.T(Jn);for(var b={video:{},player:{}},c=t(Om),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in Sm)0==a.m%Sm[e]&&(b.player[e]=a.h[e]());for(var f in Rm)0==a.m%Rm[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.F&&(a.m+=1);An(a,{type:"update",update:b},a.l);Gn(a)}function Gn(a){return a.C&&(a.g.duration||a.h.U())?(Kn(a),a.C=!1,!0):!1}
558
+ function Kn(a,b){var c={contentId:a.h.Zd(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Hn(a,void 0===b?0:b,c)}
559
+ function Cn(a,b){var c=Lm(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;In(a,c.initState,c.appData);xn(a);break;case "appData":a.G(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.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
560
+ c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.J[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return Ln(a,h,g,null)},function(k){return Ln(a,h,g,k)})}}
561
+ function Bn(a,b){var c=Lm(b.data);switch(c.type){case "PLAY":a.g.play();Hn(a);break;case "PAUSE":a.g.pause();Hn(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(),Hn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),Hn(a));break;case "STOP":a.h.Qe().then(function(){a.h&&Hn(a)});break;case "GET_STATUS":Kn(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));
562
+ null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||Hn(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;d=c.media;e=c.currentTime;f=a.K(d.contentId);g=c.autoplay||!0;a.G(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&Kn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");An(a,{requestId:Number(c.requestId),type:k},a.B)});break;default:An(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
563
+ function Ln(a,b,c,d){a.h&&An(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function An(a,b,c,d){a.H&&(a=Km(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Hn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?Mn:a.h.Kc()?Nn:a.g.paused?On:Pn,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);An(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
564
+ J("shaka.cast.CastReceiver",wn);wn.prototype.destroy=wn.prototype.destroy;wn.prototype.setContentArtist=wn.prototype.jh;wn.prototype.setContentImage=wn.prototype.kh;wn.prototype.setContentTitle=wn.prototype.mh;wn.prototype.clearContentMetadata=wn.prototype.ag;wn.prototype.setContentMetadata=wn.prototype.lh;wn.prototype.isIdle=wn.prototype.Mg;wn.prototype.isConnected=wn.prototype.isConnected;var Jn=.5,Fn=5,Mn="IDLE",Pn="PLAYING",Nn="BUFFERING",On="PAUSED";function Qn(a){var b=this;this.g=[];this.h=[];this.data=[];(new Ag).box("moov",Eg).Y("pssh",function(c){if(!(1<c.version)){var d=Gc(c.reader.W,-12,c.size);b.data.push(d);b.g.push(qd(c.reader.Cb(16)));if(0<c.version){d=c.reader.R();for(var e=0;e<d;e++){var f=qd(c.reader.Cb(16));b.h.push(f)}}}}).parse(a)}
565
+ function Rn(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Jc(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=pd(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Sn(a,b){var c=Tn(a,b);return 1!=c.length?null:c[0]}function Un(a,b,c){a=Vn(a,b,c);return 1!=a.length?null:a[0]}function Tn(a,b){for(var c=[],d=t(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function Wn(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
566
+ function Vn(a,b,c){var d=[];a=t(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function Xn(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Yn(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function Zn(a){return Array.from(a.childNodes).every($n)?a.textContent.trim():null}
567
+ function $n(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function ao(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function bo(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}
568
+ function co(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
569
+ function eo(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 fo(a){a=Number(a);return 0===a%1?a:null}function go(a){a=Number(a);return 0===a%1&&0<a?a:null}function ho(a){a=Number(a);return 0===a%1&&0<=a?a:null}function io(a){a=Number(a);return isNaN(a)?null:a}function jo(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
570
+ function ko(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 lo(a,b){try{var c=ed(a);return ko(c,b)}catch(d){return null}};function mo(a,b,c){var d=no(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.xe?(e=h.init||e,!1):!0}),f.length&&(a=oo(e,f,c,g),0==a.length&&(a=[Eb("",e)])));if(d.length&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Eb(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
571
+ t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{jf:g,Wi:e,drmInfos:a,nf:!0}}function po(a,b,c,d){var e=mo(a,c,d);if(b.nf){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.nf=!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.jf||b.jf}
572
+ function qo(a){var b=0,c=Jc(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=Gc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
573
+ function ro(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function so(a){a=Un(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=od(a.textContent);a=qo(a).filter(function(b){return b.type===to})[0];if(!a)return"";a=gd(a.value,!0);return(a=ko(a,"WRMHEADER"))?ro(a):""}
574
+ function oo(a,b,c,d){var e=[];b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.xe];if(g){var h;if(h=Un(f.node,"urn:microsoft:playready","pro")){h=od(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Rn(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.xe)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
575
+ 226,251,75]),m=new Uint8Array([]);k=[{initData:Rn(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Eb(g,f.init||a||h||k);if(g=uo.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function no(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=vo(c.value))&&b.push(c);return b}
576
+ function vo(a){var b=a.getAttribute("schemeIdUri"),c=Xn(a,"urn:mpeg:cenc:2013","default_KID"),d=Vn(a,"urn:mpeg:cenc:2013","pssh").map(Zn);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:od(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,xe:b,keyId:c,init:0<e.length?e:null}}
577
+ var to=1,uo=(new Map).set("com.widevine.alpha",function(a){return(a=Un(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",so).set("com.microsoft.playready.recommendation",so).set("com.microsoft.playready.software",so).set("com.microsoft.playready.hardware",so).set("org.w3.clearkey",function(a){return(a=Un(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function wo(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=
575
578
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
576
- function Uo(a,b){var c=Vo(a,b,"timescale"),d=1;c&&(d=Do(c)||1);var e=Vo(a,b,"duration");c=Do(e||"");"image"==a.L.contentType&&(c=Fo(e||""));c&&(c/=d);var f=Vo(a,b,"startNumber");e=Number(Vo(a,b,"presentationTimeOffset"))||0;var g=Eo(f||"");if(null==f||null==g)g=1;var h=Wo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.Z.duration||Infinity;h=qo(h,"S");for(var l=[],m=-e,p=0;p<h.length;++p){var n=h[p],t=h[p+1],v=yo(n,"t",Eo),y=yo(n,"d",Eo);n=yo(n,"r",Co);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;n=
577
- n||0;if(0>n)if(t){t=yo(t,"t",Eo);if(null==t)break;else if(v>=t)break;n=Math.ceil((t-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;n=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(t=0;t<=n;++t)m=v+y,l.push({start:v/f,end:m/f,lh:v}),v=m}f=l}return{timescale:d,wa:c,mc:g,qb:e/d||0,Pe:e,timeline:f}}function Vo(a,b,c){return[b(a.L),b(a.Aa),b(a.ra)].filter(Bb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
578
- function Wo(a,b,c){return[b(a.L),b(a.Aa),b(a.ra)].filter(Bb).map(function(d){return po(d,c)}).reduce(function(d,e){return d||e})}
579
- function Xo(a,b,c,d,e,f){for(var g=uo(a,"http://www.w3.org/1999/xlink","href"),h=uo(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 Xe(new O(2,4,4028));if("onLoad"!=h)return Xe(new O(2,4,4027));var m=Cb([d],[g]);return e.request(0,lf(m,b)).na(function(p){p=Io(p.data,a.tagName);if(!p)return Xe(new O(2,4,4001,g));
580
- for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return Yo(a,b,c,m[0],e,f+1)})}
581
- function Yo(a,b,c,d,e,f){f=void 0===f?0:f;if(uo(a,"http://www.w3.org/1999/xlink","href")){var g=Xo(a,b,c,d,e,f);c&&(g=g.na(void 0,function(){return Yo(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"==uo(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Yo(k,b,c,d,e,f)));return af(g).na(function(){return a})};function Zo(a,b,c,d,e,f,g){var h,k=(new yg).Y("sidx",function(l){h=$o(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
582
- function $o(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.R();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.R();var m=g.reader.R()}else l=g.reader.lc(),m=g.reader.lc();g.reader.skip(2);var p=g.reader.pe();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.R(),t=(n&2147483648)>>>31;n&=2147483647;var v=g.reader.R();g.reader.skip(4);if(1==t)throw new O(2,3,3006);h.push(new Wh(l/k+c,(l+v)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=v;a+=n}g.parser.stop();return h};function ap(a){this.h=Ic(a);this.g=new vg(this.h,0)}ap.prototype.Da=function(){return this.g.Da()};
583
- function bp(a){var b=cp(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=cp(a);a:{d=r(dp);for(var e=d.next();!e.done;e=d.next())if(Dc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.oa();else{if(8==b.length&&b[1]&224)throw new O(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.oa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.oa();d=Ic(a.h,a.g.oa(),b);a.g.skip(b);return new ep(c,
584
- d)}function cp(a){var b=a.g.oa(),c=a.g.pb();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fc(a.h,b,c)}var dp=[[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 ep(a,b){this.id=a;this.g=b}
585
- function fp(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=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function gp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new ap(a.g);for(var p=null,n=null;a.Da();){var t=bp(a);if(187==t.id){var v=hp(t);v&&(t=c*v.mh,v=b+v.Vg,null!=p&&m.push(new Wh(p+g,t+g,l,n,v-1,f,g,h,k)),p=t,n=v)}}null!=p&&m.push(new Wh(p+g,d+g,l,n,null,f,g,h,k));return m}
586
- function hp(a){var b=new ap(a.g);a=bp(b);if(179!=a.id)throw new O(2,3,3013);a=fp(a);b=bp(b);if(183!=b.id)throw new O(2,3,3012);b=new ap(b.g);for(var c=0;b.Da();){var d=bp(b);if(241==d.id){c=fp(d);break}}return{mh:a,Vg:c}};function ip(a,b){var c=Wo(a,b,"Initialization");if(!c)return null;var d=a.L.Na,e=c.getAttribute("sourceURL");e&&(d=Cb(a.L.Na,[e]));e=0;var f=null;if(c=yo(c,"range",Bo))e=c.start,f=c.end;return new Uh(function(){return d},e,f,jp(a))}
587
- function kp(a,b){var c=Number(Vo(a,lp,"presentationTimeOffset"))||0,d=Vo(a,lp,"timescale"),e=1;d&&(e=Do(d)||1);var f=c/e||0,g=ip(a,lp);np(a,g);var h=df(a);return{$b:function(){var k=Wo(h,lp,"RepresentationIndex"),l=h.L.Na;k&&(k=k.getAttribute("sourceURL"))&&(l=Cb(h.L.Na,[k]));k=op(h);return pp(h,b,g,l,k.start,k.end,f)}}}
588
- function pp(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,v,y,x,w,D,C,A,G;return I(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.wb||!a.Z.uf,l=a.Z.start,m=a.Z.duration,p=a.L.mimeType.split("/")[1],n=b,t=null,v=[n(d,e,f),"webm"==p?n(c.Pa(),c.Sa,c.Ca):null],n=null,u(E,Promise.all(v),2);y=E.h;x=y[0];w=y[1]||null;D=null;C=l-g;A=l;G=m?l+m:Infinity;if("mp4"==p)var H=Zo(x,e,d,c,C,A,G);else{H=new ap(w);if(440786851!=bp(H).id)throw new O(2,3,3008);var N=bp(H);if(408125543!=N.id)throw new O(2,3,3009);H=N.g.byteOffset;
589
- N=new ap(N.g);for(var K=null;N.Da();){var M=bp(N);if(357149030==M.id){K=M;break}}if(!K)throw new O(2,3,3010);K=new ap(K.g);M=1E6;for(N=null;K.Da();){var V=bp(K);if(2807729==V.id)M=fp(V);else if(17545==V.id)if(4==V.g.byteLength)N=V.g.getFloat32(0);else if(8==V.g.byteLength)N=V.g.getFloat64(0);else throw new O(2,3,3003);}if(null==N)throw new O(2,3,3011);K=M/1E9;N*=K;M=bp(new ap(x));if(475249515!=M.id)throw new O(2,3,3007);H=gp(M,H,K,N,d,c,C,A,G)}D=H;h.ic(D);t=new Yi(D);k&&t.xb(A,G,!0);return E["return"](t)})}
590
- function lp(a){return a.Rc}function op(a){var b=Wo(a,lp,"RepresentationIndex");a=Vo(a,lp,"indexRange");a=Bo(a||"");b&&(a=yo(b,"range",Bo,a));return a}function np(a,b){qp(a,b);if(!op(a))throw new O(2,4,4002);}function qp(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Hb&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);}
591
- function jp(a){var b=a.L;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.rd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function rp(a,b){var c=ip(a,sp),d=tp(a);if(!d.wa&&!d.timeline&&1<d.fc.length)throw new O(2,4,4002);if(!d.wa&&!a.Z.duration&&!d.timeline&&1==d.fc.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.ra.id&&a.L.id&&(f=b[a.ra.id+","+a.L.id])&&(e=f.segmentIndex);var g=up(a.Z.start,a.Z.duration,a.L.Na,d,c);c=!e;e?e.hc(g,a.presentationTimeline.mb()):e=new Yi(g);a.presentationTimeline.ic(g);a.wb&&a.Z.uf||e.xb(a.Z.start,a.Z.duration?a.Z.start+a.Z.duration:
592
- Infinity,c);f&&(f.segmentIndex=e);return{$b:function(){e&&0!=e.M.length||e.Lc(g);return Promise.resolve(e)}}}function sp(a){return a.Db}function tp(a){var b=vp(a);a=Uo(a,sp);var c=a.mc;0==c&&(c=1);var d=0;a.wa?d=a.wa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{wa:a.wa,startTime:d,mc:c,qb:a.qb,timeline:a.timeline,fc:b}}
593
- function up(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));for(var g=a-d.qb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={Ld:m.Ld},p++){var n=d.fc[p];m.Ld=Cb(c,[n.Mg]);var t=void 0;t=null!=d.wa?l+d.wa:d.timeline?d.timeline[p].end:l+b;k.push(new Wh(a+l,a+t,function(v){return function(){return v.Ld}}(m),n.start,n.end,e,g,a,h));l=t}return k}
594
- function vp(a){return[a.L.Db,a.Aa.Db,a.ra.Db].filter(Bb).map(function(b){return qo(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.rf&&(a.rf=!0);var c=b.getAttribute("media");b=yo(b,"mediaRange",Bo,{start:0,end:null});return{Mg:c,start:b.start,end:b.end}})};function wp(a,b,c,d,e,f){var g=xp(a),h=yp(a);zp(h);var k=df(a);if(h.Ic)return qp(a,g),{$b:function(){var t=To(h.Ic,k.L.id,null,k.bandwidth||null,null);t=Cb(k.L.Na,[t]);return pp(k,b,g,t,0,null,h.qb)}};if(h.wa)return d||(a.presentationTimeline.ie(h.wa),a.presentationTimeline.je(a.Z.start)),{$b:function(){return Ap(k,h,e,g,f)}};var l=null;d=d=null;a.ra.id&&a.L.id&&(d=a.ra.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Bp(k,h,g);c=a.Z.start;var p=a.Z.duration?a.Z.start+a.Z.duration:Infinity,n=Infinity!=
595
- p;l?(n&&(new Yi(m)).xb(c,p,!0),l.hc(m,a.presentationTimeline.mb())):l=new Yi(m);a.presentationTimeline.ic(m);n&&l.xb(c,p);d&&a.wb&&(d.segmentIndex=l);return{$b:function(){l&&0!=l.M.length||l.Lc(m);return Promise.resolve(l)}}}function Cp(a){return a.Sc}function yp(a){var b=Uo(a,Cp),c=Vo(a,Cp,"media");a=Vo(a,Cp,"index");return{wa:b.wa,timescale:b.timescale,mc:b.mc,qb:b.qb,Pe:b.Pe,timeline:b.timeline,ge:c,Ic:a}}
596
- function zp(a){var b=a.Ic?1:0;b+=a.timeline?1:0;b+=a.wa?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.Ic&&(a.timeline=null),a.wa=null);if(!a.Ic&&!a.ge)throw new O(2,4,4002);}
597
- function Ap(a,b,c,d,e){function f(K){var M=(K-t)*n,V=M+b.qb,Y=M+l;M=Y+n;var ha=Math.min(M,h());Y=new Wh(Y,ha,function(){var ja=To(y,w,K,x,V*v);return Cb(D,[ja])},0,null,d,C,l,h());Y.j=M;return Y}function g(){var K=[Math.max(k.mb(),l),Math.min(k.Ib(),h())].map(function(M){return M-l});return[Math.ceil(K[0]/n),Math.ceil(K[1]/n)-1].map(function(M){return M+t})}function h(){var K=null!=m&&e[m]||p;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.Z.start,m=a.ra.id,p=a.Z.duration,n=b.wa,t=b.mc,v=b.timescale,
598
- y=b.ge,x=a.bandwidth||null,w=a.L.id,D=a.L.Na,C=l-b.qb,A=g();a=a.wb?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var G=a;G<=A;++G){var E=f(G);c.push(E)}var H=new Yi(c);c=k.Ib()<h();G=k.T();if(c||G){var N=Math.max(a,A+1);H.Cd(n,function(){var K=k.mb();H.Gb(K);var M=r(g());M.next();M=M.next().value;for(var V=[];N<=M;){var Y=f(N);V.push(Y);N++}return K>h()&&!V.length?null:V})}return Promise.resolve(H)}
599
- function Bp(a,b,c){var d=a.Z.start,e=a.Z.duration,f=d-b.qb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Kd:h.Kd,Od:h.Od,Rd:h.Rd,Hd:h.Hd,Td:h.Td,Id:h.Id},k++){var l=b.timeline[k],m=l.start,p=l.lh;l=l.end;h.Rd=k+b.mc;h.Td=p+b.Pe;h.Od=a.L.id;h.Hd=a.bandwidth||null;h.Kd=b.ge;h.Id=a.L.Na;g.push(new Wh(d+m,d+l,function(n){return function(){var t=To(n.Kd,n.Od,n.Rd,n.Hd||null,n.Td);return Cb(n.Id,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
600
- function xp(a){var b=Vo(a,Cp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Na;return new Uh(function(){var f=To(b,c,null,d,null);return Cb(e,[f])},0,null,jp(a))};function Dp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Dp.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=[]};
601
- function Ep(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,x,w,D,C,A,G,E,H,N,K,M,V,Y,ha,ja,xa,La;return I(function(Fa){switch(Fa.g){case 1:d=Ib;Fp(b);Gp(b);Hp(b);Ip(b);if(!c&&1==b.length){e=b[0];a.g=e.bd;a.h=e.Ed;a.j=e.textStreams;a.i=e.imageStreams;Fa.D(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Fa["return"]();k=b.map(function(Sa){return Sa.bd});l=b.map(function(Sa){return Sa.Ed});m=b.map(function(Sa){return Sa.textStreams});p=b.map(function(Sa){return Sa.imageStreams});
602
- n=r(m);for(t=n.next();!t.done;t=n.next())v=t.value,v.push(Jp(d.ha));y=r(p);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(Jp(d.xc));return u(Fa,Kp(a.g,k,f,Lp,Mp),3);case 3:return u(Fa,Kp(a.h,l,f,Lp,Mp),4);case 4:return u(Fa,Kp(a.j,m,f,Lp,Mp),5);case 5:return u(Fa,Kp(a.i,p,f,Lp,Mp),2);case 2:D=0;C=[];if(a.h.length&&a.g.length)for(K=r(a.g),M=K.next();!M.done;M=K.next())for(V=M.value,Y=r(a.h),ha=Y.next();!ha.done;ha=Y.next())ja=ha.value,xa=ng(V.drmInfos,ja.drmInfos),V.drmInfos.length&&ja.drmInfos.length&&
603
- !xa.length||(La=D++,C.push({id:La,language:V.language,primary:V.primary,audio:V,video:ja,bandwidth:(V.bandwidth||0)+(ja.bandwidth||0),drmInfos:xa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),G=r(A),E=G.next();!E.done;E=G.next())H=E.value,N=D++,C.push({id:N,language:H.language,primary:H.primary,audio:H.type==d.Fb?H:null,video:H.type==d.Ma?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
604
- a.l=C;z(Fa)}})}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.bd),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&&dc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.bd=c}}
605
- function Hp(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&&e.bandwidth==h.bandwidth&&dc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
606
- 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.Ed),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&&dc(e.roles,h.roles)&&Bf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Ed=c}}
607
- function Ip(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}}
608
- function Np(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,x,w,D,C,A,G,E,H,N,K,M,V;return I(function(Y){switch(Y.g){case 1:b=Ib;if(1==a.length)return Y["return"](a[0]);c=a.map(function(ha){return ha.filter(function(ja){return ja.type==b.Fb})});d=a.map(function(ha){return ha.filter(function(ja){return ja.type==b.Ma})});e=a.map(function(ha){return ha.filter(function(ja){return ja.type==b.ha})});f=a.map(function(ha){return ha.filter(function(ja){return ja.type==b.xc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
609
- h.value,k.push(Op(b.ha));l=r(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(Op(b.xc));return u(Y,Kp([],c,0,Pp,Qp),2);case 2:return n=Y.h,u(Y,Kp([],d,0,Pp,Qp),3);case 3:return t=Y.h,u(Y,Kp([],e,0,Pp,Qp),4);case 4:return v=Y.h,u(Y,Kp([],f,0,Pp,Qp),5);case 5:y=Y.h;x=0;if(t.length&&n.length)for(G=r(n),E=G.next();!E.done;E=G.next())for(H=E.value,N=r(t),K=N.next();!K.done;K=N.next())M=K.value,V=x++,M.variantIds.push(V),H.variantIds.push(V);else for(w=t.concat(n),D=r(w),C=D.next();!C.done;C=D.next())A=
610
- C.value,A.variantIds=[x++];return Y["return"](t.concat(n).concat(v).concat(y))}})}
611
- function Kp(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,v,y,x,w,D,C,A,G,E,H,N,K;return I(function(M){switch(M.g){case 1:f=Ib;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){M.D(4);break}m=l.value;return u(M,Rp(m,b,c,e,g),5);case 5:p=M.h;if(!p)throw new O(2,4,4037);l=k.next();M.D(2);break;case 4:n=r(g);for(t=n.next();!t.done;t=n.next())for(v=t.value,y=r(v),x=y.next();!x.done;x=y.next())w=x.value,(D=Sp(w,b,d,e,g))&&a.push(D);C=r(g);for(t=C.next();!t.done;t=
612
- C.next())for(A=t.value,G={},E=r(A),x=E.next();!x.done;G={ub:G.ub},x=E.next())if(G.ub=x.value,H=G.ub.type==f.ha&&!G.ub.language,N=G.ub.type==f.xc&&!G.ub.tilesLayout,!H&&!N&&(K=a.some(function(V){return function(Y){return Y.mimeType==V.ub.mimeType&&zd(Y.codecs)==zd(V.ub.codecs)}}(G))))throw new O(2,4,4037);return M["return"](a)}})}
613
- function Rp(a,b,c,d,e){return I(function(f){if(1==f.g)return Tp(b,a),a.matchedStreams?a.segmentIndex?u(f,Up(a,c),2):f.D(2):f["return"](!1);Vp(a,c,d,e);return f["return"](!0)})}
614
- function Up(a,b){var c,d,e,f,g,h,k;return I(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof aj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);z(l)})}
615
- function Sp(a,b,c,d,e){var f=c(a);Tp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return I(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new aj;return u(g,Up(f,0),0)})});if(!f.matchedStreams)return null;Vp(f,0,d,e);return f}function Vp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==Rb(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
616
- function Lp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=r(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
617
- function Pp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
618
- function Mp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=ng(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||
619
- (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)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Lp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Mp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Mp(a.trickModeVideo,b)}
620
- function Qp(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)}}}
621
- function Tp(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Wp,video:Wp,text:Xp,image:Yp}[f.type],h={audio:Zp,video:$p,text:aq,image:bq}[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;c.push(f)}b.matchedStreams=c}function Wp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||zd(b.codecs)!=zd(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<ng(c,d).length:1)}return c?!1:!0}
622
- function Xp(a,b){return a.language?b.language?0==Rb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Yp(a){return a.tilesLayout?!0:!1}
623
- function Zp(a,b,c){if(a.id==c.id)return!0;var d=Rb(a.language,b.language),e=Rb(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;
624
- d=cq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==dq)return!0;if(d==eq)return!1;d=cq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==dq?!0:d==eq?!1:a.bandwidth&&fq(a.bandwidth,b.bandwidth,c.bandwidth)==dq?!0:!1}
625
- function $p(a,b,c){if(a.id==c.id)return!0;var d=cq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==dq)return!0;if(d==eq)return!1;if(a.frameRate){d=cq(a.frameRate,b.frameRate,c.frameRate);if(d==dq)return!0;if(d==eq)return!1}return a.bandwidth&&fq(a.bandwidth,b.bandwidth,c.bandwidth)==dq?!0:!1}
626
- function aq(a,b,c){if(a.id==c.id)return!0;var d=Rb(a.language,b.language),e=Rb(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!=
627
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function bq(a,b,c){return a.id==c.id?!0:cq(a.width*a.height,b.width*b.height,c.width*c.height)==dq?!0:!1}function Op(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}}
628
- function Jp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Yi([]),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}}
629
- function cq(a,b,c){if(b==a&&a!=c)return eq;if(c==a&&a!=b)return dq;if(b>a){if(c<=a||c-a<b-a)return dq;if(c-a>b-a)return eq}else{if(c>a)return eq;if(a-c<a-b)return dq;if(a-c>a-b)return eq}return gq}function fq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?dq:b<a?eq:gq}var dq=1,gq=0,eq=-1;function hq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.N={};this.j=new Dp;this.H=0;this.J=new Zb(5);this.G=new P(function(){iq(a)});this.A=new ef;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=hq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return I(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,jq(c),2);d=e.h;c.h&&kq(c,d);if(!c.h)throw new O(2,7,7001);return e["return"](c.i)})};
630
- q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.G&&(this.G.stop(),this.G=null);return this.A.destroy()};q.update=function(){var a=this,b;return I(function(c){if(1==c.g)return B(c,2),u(c,jq(a),4);if(2!=c.g)return va(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);z(c)})};q.onExpirationUpdated=function(){};
631
- function jq(a){var b,c,d,e,f,g,h;return I(function(k){if(1==k.g)return b=lf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),ff(a.A,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,lq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k["return"](h)})}
632
- function lq(a,b,c){var d,e,f,g,h;return I(function(k){if(1==k.g){d=Io(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](mq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Yo(d,a.g.retryParameters,f,c,a.h.networkingEngine);ff(a.A,g);return u(k,g.promise,2)}h=k.h;return k["return"](mq(a,h,c))})}
633
- function mq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,x,w,D,C,A,G,E,H,N,K,M,V,Y,ha,ja,xa,La,Fa,Sa;return I(function(Ga){switch(Ga.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=qo(b,"Location").map(wo).filter(Bb);0<f.length&&(g=Cb(e,f),e=a.m=g);h=qo(b,"BaseURL");k=h.map(wo);l=Cb(e,k);m=0;h&&h.length&&(m=yo(h[0],"availabilityTimeOffset",Fo)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=yo(b,"minBufferTime",Ao)||0);a.H=yo(b,"minimumUpdatePeriod",Ao,-1);t=yo(b,"availabilityStartTime",zo);v=yo(b,
634
- "timeShiftBufferDepth",Ao);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=yo(b,"suggestedPresentationDelay",Ao));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=yo(b,"maxSegmentDuration",Ao));C=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,G=r(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.Gb(A.mb());else N=a.g.defaultPresentationDelay||1.5*n,K=null!=x?x:N,A=new Q(t,K,a.g.dash.autoCorrectDrift);A.Tc("static"==C);(M=A.T())&&
635
- !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.Fe(v);V=b.getAttribute("profiles")||"";Y={wb:"static"!=C,presentationTimeline:A,ra:null,Z:null,Aa:null,L:null,bandwidth:0,rf:!1,Yb:m,profiles:V.split(",")};ha=nq(a,Y,l,b);ja=ha.duration;xa=ha.periods;"static"!=C&&ha.gf||A.bb(ja||Infinity);a.C&&!a.F&&(La=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?A.Af(a.C):a.C&&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.");
636
- A.ie(D||1);return u(Ga,Ep(a.j,xa,Y.wb),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Ga.D(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:!1};if(!A.If()){Ga.D(4);break}Fa=qo(b,"UTCTiming");return u(Ga,oq(a,l,Fa),5);case 5:Sa=Ga.h;if(!a.h)return Ga["return"]();A.Bf(Sa);case 4:A.ce();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Ga)}})}
637
- function nq(a,b,c,d){var e=yo(d,"mediaPresentationDuration",Ao),f=[],g=0;d=qo(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=yo(k,"start",Ao,g),p=k.id,n=yo(k,"duration",Ao),t=null;if(l){var v=yo(l,"start",Ao);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.B&&null!==p&&null!==m&&m<a.B)||a.K.includes(p)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=pq(a,b,c,{start:m,duration:t,node:k,uf:null==t||!l});f.push(g);b.ra.id&&t&&(a.N[b.ra.id]=t);if(null==t){g=
638
- null;break}g=m+t}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,gf:!1}:{periods:f,duration:g,gf:!0}}
639
- function pq(a,b,c,d){b.ra=qq(d.node,null,c);b.Z=d;b.ra.Yb=b.Yb;b.ra.id||(b.ra.id="__shaka_period_"+d.start);var e=qo(d.node,"EventStream");c=b.presentationTimeline.mb();e=r(e);for(var f=e.next();!f.done;f=e.next())rq(a,d.start,d.duration,f.value,c);c=qo(d.node,"AdaptationSet").map(function(m){return sq(a,b,m)}).filter(Bb);if(b.wb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Yg);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);
640
- }d=c.filter(function(m){return!m.Le});c=c.filter(function(m){return m.Le});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Le.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={Zc:h.Zc},l=k.next())h.Zc=l.value,h.Zc.trickModeVideo=e.streams.find(function(m){return function(p){return zd(m.Zc.codecs)==zd(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:tq(d,"audio");g=a.g.disableVideo?[]:tq(d,"video");f=a.g.disableText?
641
- []:tq(d,Hb);c=a.g.disableThumbnails?[]:tq(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.ra.id,bd:d,Ed:e,textStreams:g,imageStreams:f}}
642
- function tq(a,b){return a.filter(function(c){return c.contentType==b})}
643
- function sq(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Aa=qq(c,b.ra,null);var e=!1,f=qo(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(Bb),h=void 0,k=b.Aa.contentType==Hb;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=
644
- l}}var p;m=qo(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var t=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?p=d(parseInt(n.getAttribute("value"),10)):l=!0}m=qo(c,"SupplementalProperty");m=r(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),
645
- 10)));m=qo(c,"Accessibility");var v=new Map;m=r(m);for(n=m.next();!n.done;n=m.next())if(t=n.value,n=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=t){t=t.split(";");for(var y=r(t),x=y.next();!x.done;x=y.next()){var w=x.value,D=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(x="CC"+n,2==t.length?n+=2:n++,D=w);v.set(x,Lb(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=
646
- 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"+n,n++,w=x),v.set(y,Lb(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=qo(c,"ContentProtection");var C=Jo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=Lb(c.getAttribute("lang")||"und"),G=c.getAttribute("label");(l=qo(c,"Label"))&&l.length&&
647
- (l=l[0],l.textContent&&(G=l.textContent));l=qo(c,"Representation");c=l.map(function(E){if(E=uq(a,b,C,h,A,G,e,g,v,E))E.hdr=E.hdr||p;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.Aa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new O(2,4,4003);}if(!b.Aa.contentType||"application"==b.Aa.contentType)for(b.Aa.contentType=vq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.Aa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
648
- m.value,n=r(C.drmInfos),t=n.next();!t.done;t=n.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(E){return E.getAttribute("id")}).filter(Bb);return{id:b.Aa.id||"__fake__"+a.I++,contentType:b.Aa.contentType,language:A,Pi:e,streams:c,drmInfos:C.drmInfos,Le:f,Yg:k}}
649
- function uq(a,b,c,d,e,f,g,h,k,l){b.L=qq(l,b.Aa,null);a.C=Math.min(a.C,b.L.Yb);if(!wq(b.L))return null;var m=b.Z.start;b.bandwidth=yo(l,"bandwidth",Do)||0;var p=b.L.contentType,n=p==Hb||"application"==p;p="image"==p;try{var t=function(H,N,K){return xq(a,H,N,K)};if(b.L.Rc)var v=kp(b,t);else if(b.L.Db)v=rp(b,a.l);else if(b.L.Sc)v=wp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.L.Na,x=b.Z.duration||0;v={$b:function(){return Promise.resolve($i(m,x,y))}}}}catch(H){if((n||p)&&4002==H.code)return null;
650
- throw H;}t=qo(l,"ContentProtection");t=Mo(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;qo(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var D=!1;n&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var C;if(p&&((l=qo(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
651
- (C=l.getAttribute("value")),!C))return null;var A;l=b.L.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(A="PQ");var G=b.L.id?b.ra.id+","+b.L.id:"",E={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,N,K;return I(function(M){if(1==M.g){N=(H=G&&b.wb&&a.l[G])?a.l[G]:E;if(N.segmentIndex)return M.D(0);K=N;return u(M,v.$b(),3)}K.segmentIndex=M.h;z(M)})},closeSegmentIndex:function(){E.segmentIndex&&
652
- (E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.Aa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.L.rd,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:w,closedCaptions:k,
653
- hdr:A,tilesLayout:C,matchedStreams:[]};G&&b.wb&&!a.l[G]&&(a.l[G]=E);return E}function iq(a){var b,c;I(function(d){switch(d.g){case 1:return b=0,B(d,2),u(d,jq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();kq(a,b);z(d)}})}function kq(a,b){0>a.H||a.G.S(Math.max(3,a.H-b,$b(a.J)))}
654
- function qq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,rd:null,audioSamplingRate:null,Yb:0};c=c||b.Na;var d=qo(a,"BaseURL"),e=d.map(wo),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=yo(a,"frameRate",Go)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=qo(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
655
- m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=qo(a,"AudioChannelConfiguration");m=yq(m)||b.rd;n=yo(a,"audioSamplingRate",Eo)||b.audioSamplingRate;f||(f=vq(g,h));var t=po(a,"SegmentBase"),v=po(a,"SegmentTemplate"),y=t?yo(t,"availabilityTimeOffset",Fo)||0:0,x=v?yo(v,"availabilityTimeOffset",Fo)||0:0;d=d&&d.length?yo(d[0],"availabilityTimeOffset",Fo)||0:0;d=b.Yb+d+y+x;return{Na:Cb(c,e),Rc:t||b.Rc,Db:po(a,"SegmentList")||b.Db,Sc:v||b.Sc,width:yo(a,"width",Eo)||b.width,height:yo(a,
656
- "height",Eo)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:p,id:a.getAttribute("id"),rd:m,audioSamplingRate:n,Yb:d}}
657
- function yq(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=
658
- 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 wq(a){var b=a.Rc?1:0;b+=a.Db?1:0;b+=a.Sc?1:0;if(0==b)return a.contentType==Hb||"application"==a.contentType?!0:!1;1!=b&&(a.Rc&&(a.Db=null),a.Sc=null);return!0}
659
- function zq(a,b,c,d){var e,f,g,h,k,l;return I(function(m){if(1==m.g)return e=Cb(b,[c]),f=lf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),ff(a.A,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=dd(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
660
- function oq(a,b,c){var d,e,f,g,h,k,l,m;return I(function(p){switch(p.g){case 1:d=c.map(function(n){return{scheme:n.getAttribute("schemeIdUri"),value:n.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){p.D(4);break}h=g.value;B(p,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return p.D(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return p.D(8);
661
- case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p["return"](isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Ta("NTP UTCTiming scheme is not supported");break;default:Ta("Unrecognized scheme in UTCTiming element",k)}p.D(9);break;case 7:return u(p,zq(a,b,l,"HEAD"),10);case 10:return p["return"](p.h);case 8:return u(p,zq(a,b,l,"GET"),11);case 11:return p["return"](p.h);
662
- case 9:va(p,3);break;case 5:F(p);case 3:g=f.next();p.D(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!"),p["return"](0)}})}
663
- function rq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=yo(d,"timescale",Eo)||1;d=r(qo(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=yo(k,"presentationTime",Eo)||0,m=yo(k,"duration",Eo)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
664
- function xq(a,b,c,d){var e,f,g,h,k;return I(function(l){if(1==l.g)return e=rf,f=pj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),ff(a.A,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function vq(a,b){return Gd(xd(a,b))?Hb:a.split("/")[0]}J("shaka.dash.DashParser",hq);tg.mpd=function(){return new hq};rg["application/dash+xml"]=function(){return new hq};rg["video/vnd.mpeg.dash.mpd"]=function(){return new hq};function Aq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Bq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Bq.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};
665
- Bq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function U(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Cq(a,b){var c=a.getAttribute(b);if(!c)throw new O(2,4,4023,b);return c.value}function Dq(a,b,c){c=void 0===c?[]:c;this.h=b;this.i=a;this.g=c}function Eq(a,b){this.name=a;this.value=b};function Fq(a,b){return a.filter(function(c){return c.name==b})}function Gq(a,b){return a.filter(function(c){return Cq(c,"TYPE")==b})}function Hq(a,b){var c=Fq(a,b);return c.length?c[0]:null}function Iq(a){var b=0;b=void 0===b?0:b;return(a=Hq(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b};function Jq(a){this.h=a;this.g=0}function Kq(a){Lq(a,/[ \t]+/gm)}function Lq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function Mq(a){return a.g==a.h.length?null:(a=Lq(a,/[^ \t\n]*/gm))?a[0]:null};function Nq(){this.g=0}
666
- function Oq(a,b,c){b=dd(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=Pq(a,g),--a.g,Qq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=Pq(a,h);if(Rq.includes(h.name)){if(1!=b)throw new O(2,4,4017);
667
- var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Pq(a,m),Qq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==U(m,"TYPE")?k.push(m):"MAP"==U(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Cb([d],[m.trim()])[0],h&&g.push(h),e.push(new Dq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Dq("",g,k)));return new Aq(c,b,f,e)}f.push(h);
668
- "EXT-X-STREAM-INF"==h.name&&(h.g.push(new Eq("URI",k)),e=!0)}}return new Aq(c,b,f)}function Pq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new O(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new Jq(f);var h;(h=Lq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Lq(f,k);)d.push(new Eq(h[1],h[2]||h[3])),Kq(f)}return new Bq(c,e,d,g)}
669
- var Qq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Rq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Sq(){}function Tq(a){try{var b=Uq(a);return Ze({uri:a,wf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Xe(c)}}function Uq(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=nd(a):e=hd(a);return{data:e,contentType:c}}
670
- J("shaka.net.DataUriPlugin",Sq);Sq.parse=Tq;hf("data",Tq);function Vq(){var a=this;this.h=this.j=null;this.ya=1;this.A=new Map;this.C=new Map;this.ma=new Set;this.g=new Map;this.i=null;this.K="";this.$=new Nq;this.ea=0;this.U=!1;this.N=null;this.F=new P(function(){Wq(a)});this.m=Xq;this.I=null;this.aa=0;this.H=Infinity;this.X=this.ba=0;this.G=new ef;this.P=[];this.J=new Map;this.za=!1;this.B=new Map;this.ua=new Map;this.l=!1}q=Vq.prototype;q.configure=function(a){this.h=a};
671
- q.start=function(a,b){var c=this,d,e;return I(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,Yq(c,a),2);if(3!=f.g)return d=f.h,c.K=d.uri,u(f,Zq(c,d.data,a),3);e=c.ea;0<e&&c.F.S(e);return f["return"](c.I)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.G&&(a.push(this.G.destroy()),this.G=null);this.h=this.j=null;this.ma.clear();this.I=null;this.g.clear();this.C.clear();this.B.clear();this.A.clear();return Promise.all(a)};
672
- q.update=function(){var a=this,b,c,d;return I(function(e){if(1==e.g){if(a.m==Xq)return e["return"]();b=[];c=Array.from(a.g.values());return c.length?u(e,$q(a,c[0]),2):e.D(2)}for(d=1;d<c.length;d++)b.push($q(a,c[d]));return u(e,Promise.all(b),0)})};
673
- function $q(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v;return I(function(y){if(1==y.g)return c=ar,d=b.Nf,e=new kb(d),a.l&&b.Sf&&nb(e,new pb("_HLS_skip=YES")),u(y,Yq(a,e.toString()),2);f=y.h;g=Oq(a.$,f.data,f.uri);if(1!=g.type)throw new O(2,4,4017);h=Fq(g.g,"EXT-X-DEFINE");k=br(a,h);l=b.stream;m=cr(a,g,l.type,b.Kc,k);l.segmentIndex.hc(m,a.i.mb());m.length&&(p=Iq(g.g),n=b.Kc.get(p),l.segmentIndex.Gb(n));t=m[m.length-1];if(v=Hq(g.g,"EXT-X-ENDLIST"))dr(a,c.Mf),a.i.bb(t.endTime);z(y)})}q.onExpirationUpdated=function(){};
674
- function er(a){if(!a.U){for(var b=-1,c=new Map,d=r(a.g.values()),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex;if(f&&(f=f.M[0]||null))for(var g=r(e.Kc),h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c.set(e,k);b=Math.max(b,k);break}}}if(!(0>b)){a.N=b;b=r(a.g.values());for(e=b.next();!e.done;e=b.next())if(d=e.value,e=d.stream.segmentIndex)f=a.N-c.get(d),e.M.splice(0,f),(e=e.M[0]||null)&&fr(d,-e.startTime);a.U=!0}}}
675
- function gr(a){if(!a.U){for(var b=Infinity,c=r(a.g.values()),d=c.next();!d.done;d=c.next())if(d=d.value.stream.segmentIndex)d=d.M[0]||null,null!=d&&null!=d.g&&(b=Math.min(b,d.g));if(Infinity!=b){c=r(a.g.values());for(d=c.next();!d.done;d=c.next()){d=d.value;var e=d.stream.segmentIndex;null!=e&&(e=e.M[0]||null,null==e.g?Ra("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.Dd,"Expect AV sync issues!"):fr(d,e.g-b-e.startTime))}a.U=!0}}}
676
- function fr(a,b){a.stream.segmentIndex.offset(b);a.ee+=b;for(var c=r(a.Kc),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.Kc.set(d,e+b)}}
677
- function Zq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,x,w,D,C,A,G,E,H,N,K,M,V,Y,ha,ja,xa,La,Fa,Sa,Ga,rc,Qc,Dd,Ed,qb,Fd,sc,Ee;return I(function(ab){switch(ab.g){case 1:d=Oq(a.$,b,a.K);e=Fq(d.g,"EXT-X-DEFINE");hr(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.h.hls.mediaPlaylistFullMimeType,E=G.split(";")[0],H=E.split("/")[0],N=Bd(G),K=new Map,u(ab,ir(a,d,c,c,N,H,"",!0,"Media Playlist",null,K,null,!1,!1,E),8);k=Fq(d.g,"EXT-X-MEDIA");l=Fq(d.g,"EXT-X-STREAM-INF");m=Fq(d.g,"EXT-X-IMAGE-STREAM-INF");jr(a,l);p=
678
- Fq(d.g,"EXT-X-SESSION-DATA");n=r(p);for(t=n.next();!t.done;t=n.next())if(v=t.value,y=U(v,"DATA-ID"),x=U(v,"URI"),w=U(v,"LANGUAGE"),D=U(v,"VALUE"),C=(new Map).set("id",y),x&&C.set("uri",Cb([a.K],[x])[0]),w&&C.set("language",w),D&&C.set("value",D),A=new L("sessiondata",C),a.j)a.j.onEvent(A);return u(ab,kr(a,k),4);case 4:return lr(a,k),u(ab,mr(a,l),5);case 5:return f=ab.h,u(ab,nr(a,k),6);case 6:return g=ab.h,u(ab,or(a,m),7);case 7:h=ab.h;ab.D(3);break;case 8:M=ab.h,a.g.set(c,M),f.push({id:0,language:"und",
679
- primary:!0,audio:"audio"==H?M.stream:null,video:"video"==H?M.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.j)throw new O(2,7,7001);a.h.hls.ignoreManifestProgramDateTime?er(a):gr(a);if(a.za&&0==f.length)throw new O(2,4,4034);V=Infinity;Y=r(a.g.values());for(ha=Y.next();!ha.done;ha=Y.next())ja=ha.value,"text"!=ja.stream.type&&(V=Math.min(V,ja.ee));a.m!=Xq?(a.i=new Q(0,a.h.defaultPresentationDelay?a.h.defaultPresentationDelay:a.X?a.X:3*a.aa),a.i.Tc(!1)):
680
- (a.i=new Q(null,0),a.i.Tc(!0));if(a.m!=Xq)a.ea=a.H,xa=ar,a.m==xa.Te&&(La=a.i.xd,isNaN(a.h.availabilityWindowOverride)||(La=a.h.availabilityWindowOverride),a.i.Fe(La));else for(a.i.bb(V),Fa=r(a.g.values()),ha=Fa.next();!ha.done;ha=Fa.next())Sa=ha.value,Sa.stream.segmentIndex.xb(0,V);a.P=[];Ga=[];rc=r(f);for(Qc=rc.next();!Qc.done;Qc=rc.next())for(Dd=Qc.value,Ed=r([Dd.video,Dd.audio]),qb=Ed.next();!qb.done;qb=Ed.next())(Fd=qb.value)&&Ga.push(Fd);return u(ab,Promise.all(Ga.map(function(kg){return I(function(lg){return u(lg,
681
- kg.createSegmentIndex(),0)})})),9);case 9:sc=r(Ga);for(qb=sc.next();!qb.done;qb=sc.next())Ee=qb.value,a.P.push(Ee.segmentIndex.M);pr(a);a.i.ce();a.I={presentationTimeline:a.i,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.j.makeTextStreamsForClosedCaptions(a.I);z(ab)}})}function hr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=U(e,"NAME");e=U(e,"VALUE");d&&e&&(a.A.has(d)||a.A.set(d,e))}}
682
- function br(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=U(f,"NAME");var g=U(f,"VALUE");f=U(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.A.get(f))&&c.set(f,e)}return c}function jr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=U(e,"AUDIO");d=U(e,"VIDEO");var g=U(e,"SUBTITLES");e=qr(a,e);if(g){var h=Fb(Hb,e);a.B.set(g,h);cc(e,h)}f&&(g=Eb("audio",e),a.B.set(f,g));d&&(f=Eb("video",e),a.B.set(d,f))}}
683
- function nr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t;return I(function(v){if(1==v.g)return c=Gq(b,"SUBTITLES"),d=c.map(function(y){var x,w,D;return I(function(C){if(1==C.g){if(x=a.h.disableText)return C["return"](null);B(C,2);return u(C,rr(a,y),4)}if(2!=C.g)return w=C.h,C["return"](w.stream);D=F(C);if(a.h.hls.ignoreTextStreamFailures)return C["return"](null);throw D;})}),u(v,Promise.all(d),2);e=v.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Cq(h,"GROUP-ID"),l=a.B.get(k))if(m=a.C.get(k))for(p=
684
- r(m),n=p.next();!n.done;n=p.next())t=n.value,t.stream.codecs=l;return v["return"](e.filter(function(y){return y}))})}
685
- function or(a,b){var c,d;return I(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return I(function(l){if(1==l.g){if(g=a.h.disableThumbnails)return l["return"](null);B(l,2);return u(l,sr(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=F(l);if(a.h.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
686
- function kr(a,b){var c;return I(function(d){b=b.filter(function(e){var f=U(e,"URI")||"";return"SUBTITLES"!=U(e,"TYPE")&&""!=f});c=b.map(function(e){return rr(a,e)});return u(d,Promise.all(c),0)})}
687
- function mr(a,b){var c,d,e;return I(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,p,n,t,v;return I(function(y){if(1==y.g)return h=U(g,"FRAME-RATE"),k=Number(U(g,"AVERAGE-BANDWIDTH"))||Number(Cq(g,"BANDWIDTH")),l=U(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),p=m.next().value,n=m.next().value,t=U(g,"VIDEO-RANGE"),u(y,tr(a,g),2);if(v=y.h){for(var x=y["return"],w=v.audio,D=v.video,C=r(D),A=C.next();!A.done;A=C.next())if(A=A.value.stream)A.width=Number(p)||void 0,A.height=Number(n)||
688
- void 0,A.frameRate=Number(h)||void 0,A.hdr=t||void 0;C=a.h.disableAudio;if(!w.length||C)w=[null];C=a.h.disableVideo;if(!D.length||C)D=[null];C=[];w=r(w);for(A=w.next();!A.done;A=w.next()){A=A.value;for(var G=r(D),E=G.next();!E.done;E=G.next()){var H=E.value;E=A?A.stream:null;var N=H?H.stream:null,K=A?A.stream.drmInfos:null,M=H?H.stream.drmInfos:null;H=(H?H.Dd:"")+" - "+(A?A.Dd:"");E&&N&&K.length&&M.length&&!(0<ng(K,M).length)||a.ma.has(H)||(E={id:a.ya++,language:E?E.language:"und",primary:!!E&&E.primary||
689
- !!N&&N.primary,audio:E,video:N,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},C.push(E),a.ma.add(H))}}y=x.call(y,C)}else y=y["return"]([]);return y})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(zb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
690
- function tr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y;return I(function(x){if(1==x.g)return c=Ib,d=qr(a,b),e=U(b,"AUDIO"),f=U(b,"VIDEO"),h=(g=e||f)&&a.C.has(g)?a.C.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,p=Cq(b,"URI"),n=k.audio.find(function(w){return w&&w.Dd==p}),t=Fb(c.Ma,d),(v=Fb(c.Fb,d))&&!t?l=c.Fb:!h.length&&v&&t?(l=c.Ma,d=[[t,v].join()]):k.audio.length&&n?(l=c.Fb,m=!0):l=k.video.length?c.Fb:c.Ma,m?x.D(2):u(x,ur(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);
691
- vr(k);return x["return"](k)})}function qr(a,b){var c=[];a.h.disableVideo||c.push(a.h.hls.defaultVideoCodec);a.h.disableAudio||c.push(a.h.hls.defaultAudioCodec);var d=U(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=Ad(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function wr(a){a=U(a,"LANGUAGE")||"und";return Lb(a)}
692
- function vr(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 lr(a,b){var c=Gq(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=wr(e);var f=Cq(e,"GROUP-ID");e=Cq(e,"INSTREAM-ID");a.J.get(f)||a.J.set(f,new Map);a.J.get(f).set(e,d)}}
693
- function rr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y;return I(function(x){if(1==x.g){c=Cq(b,"GROUP-ID");d="";var w=Cq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=Hb);e=w;e!=Hb&&c&&a.B.has(c)&&(d=a.B.get(c));f=xr(Cq(b,"URI"),a.A);if(a.g.has(f))return x["return"](a.g.get(f));g=wr(b);h=U(b,"NAME");k=U(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=U(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=U(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;p=w;n=U(b,"CHARACTERISTICS");t=U(b,"FORCED");
694
- v="YES"==t;return u(x,yr(a,f,d,e,g,l,h,m,null,n,v,p),2)}y=x.h;a.C.has(c)?a.C.get(c).push(y):a.C.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)})}
695
- function sr(a,b){var c,d,e,f,g,h,k,l,m,p;return I(function(n){if(1==n.g){c=xr(Cq(b,"URI"),a.A);d=U(b,"CODECS","jpeg")||"";if(a.g.has(c))return n["return"](a.g.get(c));e=wr(b);f=U(b,"NAME");g=U(b,"CHARACTERISTICS");return u(n,yr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=n.h;if(null==h)return n["return"](null);if(a.g.has(c))return n["return"](a.g.get(c));if(k=U(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=
696
- Number(k.split("x")[1])*Number(m.split("x")[1]);if(p=U(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.g.set(c,h);return n["return"](h)})}
697
- function ur(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g){e=xr(Cq(b,"URI"),a.A);if(a.g.has(e))return k["return"](a.g.get(e));var l=U(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.J.get(l):null;g=Eb(d,c);return u(k,yr(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)})}
698
- function yr(a,b,c,d,e,f,g,h,k,l,m,p){var n,t,v;return I(function(y){if(1==y.g)return n=Cb([a.K],[b])[0],u(y,Yq(a,n),2);t=y.h;n=t.uri;v=Oq(a.$,t.data,n);return y["return"](ir(a,v,b,n,c,d,e,f,g,h,k,l,m,p))})}
699
- function ir(a,b,c,d,e,f,g,h,k,l,m,p,n,t,v){var y,x,w,D,C,A,G,E,H,N,K,M,V,Y,ha,ja,xa,La,Fa,Sa,Ga,rc,Qc,Dd,Ed,qb,Fd,sc,Ee,ab,kg,lg;return I(function(tc){if(1==tc.g){if(1!=b.type)throw new O(2,4,4017);y=Fq(b.g,"EXT-X-DEFINE");x=br(a,y);zr(a,b);return v?tc.D(2):u(tc,Ar(a,f,e,b,x),3)}2!=tc.g&&(v=tc.h);w=[];if(b.segments)for(D=r(b.segments),C=D.next();!C.done;C=D.next())A=C.value,G=Fq(A.h,"EXT-X-KEY"),w.push.apply(w,ia(G));E=!1;H=[];N=new Set;K=r(w);for(M=K.next();!M.done;M=K.next())if(V=M.value,Y=Cq(V,
700
- "METHOD"),"NONE"!=Y){E=!0;if("AES-128"==Y)return a.za=!0,tc["return"](null);ha=Cq(V,"KEYFORMAT");if(xa=(ja=Br[ha])?ja(V,v):null){if(xa.keyIds)for(La=r(xa.keyIds),Fa=La.next();!Fa.done;Fa=La.next())Sa=Fa.value,N.add(Sa);H.push(xa)}}if(E&&!H.length)throw new O(2,4,4026);Bi.includes(v)&&(e="");Ga=new Map;try{rc=cr(a,b,f,Ga,x)}catch(mp){if(4035==mp.code)return Ta("Skipping unsupported HLS stream",v,c),tc["return"](null);throw mp;}Qc=rc[rc.length-1].endTime;Dd=new Yi(rc);Ed=f==Hb?"subtitle":void 0;qb=
701
- [];if(p)for(Fd=r(p.split(",")),sc=Fd.next();!sc.done;sc=Fd.next())Ee=sc.value,qb.push(Ee);kg=(ab=Hq(b.g,"EXT-X-SERVER-CONTROL"))?null!=ab.getAttribute("CAN-SKIP-UNTIL"):!1;lg={id:a.ya++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Dd,mimeType:v,codecs:e,kind:Ed,encrypted:E,drmInfos:H,keyIds:N,language:g,label:k,type:f,primary:h,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:qb,
702
- forced:n,channelsCount:l,audioSamplingRate:null,spatialAudio:t,closedCaptions:m,hdr:void 0,tilesLayout:void 0};return tc["return"]({stream:lg,Dd:c,Nf:d,ee:Qc,Kc:Ga,Sf:kg})})}
703
- function zr(a,b){var c=Hq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Hq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)dr(a,Xq);else{c?dr(a,Cr):dr(a,Dr);d=Hq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Hq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ba=Number(Cq(c,"PART-TARGET")),a.H=Math.min(a.ba,a.H),c=Hq(b.g,"EXT-X-SERVER-CONTROL"),a.X=c?Number(Cq(c,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.aa=Math.max(d,a.aa)}}
704
- function Er(a,b,c,d){c=Hq(c,"EXT-X-MAP");if(!c)return null;var e=Cq(c,"URI");d=xr(Cb([b],[e])[0],d);b=[d,U(c,"BYTERANGE","")].join("-");a.ua.has(b)||(c=Fr(d,c),a.ua.set(b,c));return a.ua.get(b)}function Fr(a,b){var c=0,d=null,e=U(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new Uh(function(){return[a]},c,d)}
705
- function Gr(a,b,c,d,e,f,g,h){var k=d.h,l=xr(d.i,f),m=Hq(k,"EXTINF"),p=f=0,n=null;d.g.length&&!a.l&&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.");var t=null;if(!a.h.hls.ignoreManifestProgramDateTime){var v=Hq(k,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(t=zo(v.value))}v=Xh;Hq(k,"EXT-X-GAP")&&(v=2);if(!m){if(0==d.g.length)throw new O(2,4,4024,"EXTINF");
706
- if(!a.l)return null}var y=[];if(a.l)for(var x={},w=0;w<d.g.length;x={Md:x.Md},w++){var D=d.g[w],C=0==w?c:y[y.length-1],A=0==w?e:C.endTime,G=Number(U(D,"DURATION"))||a.ba;if(G){G=A+G;var E=0,H=null;"EXT-X-PRELOAD-HINT"==D.name?E=(C=U(D,"BYTERANGE-START"))?Number(C):0:(E=U(D,"BYTERANGE"),C=r(Hr(C,E)),E=C.next().value,H=C.next().value);if(D=U(D,"URI"))x.Md=Cb([g],[D])[0],y.push(new Wh(A,G,function(N){return function(){return[N.Md]}}(x),E,H,b,0,0,Infinity))}}m?f=e+Number(m.value.split(",")[0]):f=y[y.length-
707
- 1].endTime;(a=Hq(k,"EXT-X-BYTERANGE"))?(n=r(Hr(c,a.value)),p=n.next().value,n=n.next().value):y.length&&(p=y[0].Sa,n=y[y.length-1].Ca);c="";a=null;"image"==h&&(c="1x1",h=Hq(k,"EXT-X-TILES"))&&(c=Cq(h,"LAYOUT"),(h=U(h,"DURATION"))&&(a=Number(h)));return new Wh(e,f,function(){return l.length?[l]:[]},p,n,b,0,0,Infinity,y,c,a,t,v)}function Hr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.Ca+1,d=c+d-1);return[c,d]}
708
- function pr(a){if(a.i){for(var b=r(a.P),c=b.next();!c.done;c=b.next())a.i.ic(c.value);a.P=[]}}
709
- function cr(a,b,c,d,e){var f=b.segments,g=Iq(b.g),h=Hq(b.g,"EXT-X-SKIP");h=h?Number(U(h,"SKIPPED-SEGMENTS")):0;var k=g+h,l=0;a.m!=Xq&&d.has(k)&&(l=d.get(k));for(var m=[],p=null,n=0;n<f.length;n++){var t=f[n],v=0==n?l:p.endTime;k=g+h+n;d.set(k,v);var y=Er(a,b.h,t.h,e);!a.l&&a.j.isAutoLowLatencyMode()&&(a.j.enableLowLatencyMode(),a.l=a.j.isLowLatencyMode());(p=y=Gr(a,y,p,t,v,e,b.h,c))&&(a.h.hls.ignoreManifestProgramDateTime&&null!=a.N&&k<a.N||m.push(y))}if(a=m.some(function(x){return null!=x.g}))for(b=
710
- {},c=0;c<m.length;b={rc:b.rc,qc:b.qc,Uc:b.Uc,rb:b.rb,pc:b.pc},c++)if(b.rb=m[c],null==b.rb.g)for(b.qc=0,b.rc=c,d=function(x){return function(){var w=m[x.rc];if(w){if(null!=w.g)return w.g+x.qc;x.qc-=w.endTime-w.startTime;x.rc+=1}return null}}(b),b.pc=0,b.Uc=c,e=function(x){return function(){var w=m[x.Uc];if(w){w!=x.rb&&(x.pc+=w.endTime-w.startTime);if(null!=w.g)return w.g+x.pc;--x.Uc}return null}}(b);null==b.rb.g;)b.rb.g=e(),null==b.rb.g&&(b.rb.g=d());if(a)for(a=r(m),b=a.next();!b.done;b=a.next())for(c=
711
- b.value,b=c.g,c=r(c.h),d=c.next();!d.done;d=c.next())d=d.value,d.g=b,b+=d.endTime-d.startTime;return m}function xr(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}
712
- function Ar(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,v,y,x;return I(function(w){if(1==w.g){f=Ib;g=rf;h=Math.trunc((d.segments.length-1)/2);k=xr(d.segments[h].i,e);l=new kb(k);m=l.Ka.split(".").pop();p=Ir[b];if(n=p[m])return w["return"](n);if(b==f.ha){if("vtt"==c||"wvtt"==c)return w["return"]("text/vtt");if(c&&""!==c)return w["return"]("application/mp4")}if(b==f.xc&&(!c||"jpeg"==c))return w["return"]("image/jpeg");t=lf([k],a.h.retryParameters);t.method="HEAD";return u(w,Jr(a,t,g),2)}v=w.h;y=v.headers["content-type"];
713
- if(!y){if(b==f.ha)return w["return"]("text/vtt");x=p.mp4;return w["return"](x)}return w["return"](y.split(";")[0])})}function Yq(a,b){var c=lf([b],a.h.retryParameters);a.j.modifyManifestRequest(c,{format:"h"});return Jr(a,c,0)}function Wq(a){var b,c;I(function(d){if(1==d.g){if(!a.j)return d["return"]();B(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.ea,a.F.S(b),va(d,0);c=F(d);if(!a.j)return d["return"]();c.severity=1;a.j.onError(c);a.F.S(.1);z(d)})}
714
- function dr(a,b){a.m=b;a.i&&a.i.Tc(a.m==Xq);a.m!=Xq||a.F.stop()}function Jr(a,b,c){if(!a.G)throw new O(2,7,7001);b=a.j.networkingEngine.request(c,b);ff(a.G,b);return b.promise}J("shaka.hls.HlsParser",Vq);
715
- var Ir={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"},
716
- image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Br={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new O(2,4,4040);return Db("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Cq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Cq(a,"URI");b=Uq(b);b=Fc(b.data);b=Db("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);
717
- if(a=U(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Cq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Cq(a,"URI");a=Uq(a);a=Fc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=oo(a,b,new Set,0);return Db("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Xq="VOD",Dr="EVENT",Cr="LIVE",ar={Mf:Xq,Hh:Dr,Te:Cr};
718
- Uc("Tizen 3")||Uc("Tizen 2")||Wc()||(tg.m3u8=function(){return new Vq},rg["application/x-mpegurl"]=function(){return new Vq},rg["application/vnd.apple.mpegurl"]=function(){return new Vq});function Kr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,wf:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=gd(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Lr(){}function Mr(a,b,c,d,e){var f=new Nr;zf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Or,h={Xe:!1,Hf:!1};a=Pr(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new We(a,function(){h.Xe=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new P(function(){h.Hf=!0;g.abort()});k.S(b/1E3);a["finally"](function(){k.stop()})}return a}
719
- function Pr(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,v,y,x,w,D,C;return I(function(A){switch(A.g){case 1:return h=Qr,k=Rr,n=p=0,t=Date.now(),B(A,2),u(A,h(a,c),4);case 4:return l=A.h,f(Sr(l.headers)),v=l.clone().body.getReader(),x=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,w=function(G){function E(){var H,N;return I(function(K){switch(K.g){case 1:return B(K,2),u(K,v.read(),4);case 4:H=K.h;va(K,3);break;case 2:return F(K),K["return"]();case 3:if(H.done){K.D(5);break}p+=H.value.byteLength;if(!g){K.D(5);
720
- break}return u(K,g(H.value),5);case 5:N=Date.now();if(100<N-t||H.done)e(N-t,p-n,x-p),n=p,t=N;H.done?G.close():(G.enqueue(H.value),E());z(K)}})}E()},new k({start:w}),u(A,l.arrayBuffer(),5);case 5:m=A.h;va(A,3);break;case 2:D=F(A);if(d.Xe)throw new O(1,1,7001,a,b);if(d.Hf)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,D,b);case 3:return C=Sr(l.headers),A["return"](Kr(C,m,l.status,a,l.url,b))}})}function Sr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
721
- function Tr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}J("shaka.net.HttpFetchPlugin",Lr);Lr.isSupported=Tr;Lr.parse=Mr;var Qr=window.fetch,Or=window.AbortController,Rr=window.ReadableStream,Nr=window.Headers;Tr()&&(hf("http",Mr,2,!0),hf("https",Mr,2,!0),hf("blob",Mr,2,!0));function Ur(){}
722
- function Vr(a,b,c,d,e){var f=new Wr,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new O(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var t=Xr(f);e(t);p=!0}};f.onload=function(){var t=Xr(f),v=f.response;try{var y=Kr(t,v,f.status,a,f.responseURL,c);l(y)}catch(x){m(x)}};f.onerror=function(t){m(new O(1,1,1002,a,t,
723
- c))};f.ontimeout=function(){m(new O(1,1,1003,a,c))};f.onprogress=function(t){var v=Date.now();if(100<v-g||t.lengthComputable&&t.loaded==t.total)d(v-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=v};for(var n in b.headers)f.setRequestHeader(n.toLowerCase(),b.headers[n]);f.send(b.body)});return new We(k,function(){f.abort();return Promise.resolve()})}
724
- function Xr(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}J("shaka.net.HttpXHRPlugin",Ur);Ur.parse=Vr;var Wr=window.XMLHttpRequest;hf("http",Vr,1,!0);hf("https",Vr,1,!0);hf("blob",Vr,1,!0);function Yr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Zr(a){return a.Pa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Sa+":"+a.Ca}function $r(a,b){return pj(a.g.Pa(),a.g.Sa,a.g.Ca,b.streaming.retryParameters)};function as(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function bs(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}as.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 cs(a){var b=this;this.A=a;this.j=new Map;this.i=new sf(function(){return ds(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new as}cs.prototype.destroy=function(){return this.i.destroy()};function es(a,b,c){a.m=b;a.l=c}function ds(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
725
- function fs(a,b,c,d,e,f){tf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,p,n,t;return I(function(v){if(1==v.g)return u(v,gs(a,c),2);h=v.h;if(a.i.g)throw new O(2,9,7001);if(e)for(m in k=Fc(h),l=new no(k),l.data)p=Number(m),n=l.data[p],t=l.g[p],a.l(n,t);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v["return"](f(h))})});a.j.set(b,g)}function hs(a){return I(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
726
- function gs(a,b){var c,d,e,f;return I(function(g){if(1==g.g)return c=rf,d=a.A.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;cc(a.h,e);return g["return"](f.data)})};function is(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Mc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}is.prototype.abort=function(){var a=this;return I(function(b){if(1==b.g){try{a.i.abort()}catch(c){}B(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);F(b);z(b)})};
727
- function js(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return I(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)})}})}is.prototype.store=function(){return this.h};is.prototype.promise=function(){return this.g};function ks(a){this.h=a;this.g=[]}ks.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function ls(a,b){return ms(a,b,"readwrite")}function ms(a,b,c){c=a.h.transaction([b],c);var d=new is(c,b);a.g.push(d);d.promise().then(function(){cc(a.g,d)},function(){cc(a.g,d)});return d};function ns(a,b,c){this.h=new ks(a);this.i=b;this.g=c}q=ns.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return os(this.i)};q.removeSegments=function(a,b){return ps(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return I(function(d){if(1==d.g)return u(d,qs(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.$e(e)}))})};q.addManifests=function(){return os(this.g)};
728
- q.updateManifest=function(){return Promise.reject(new O(2,9,9016,"Cannot modify values in "+this.g))};function rs(a,b,c){a=ls(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=ls(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return ps(this,this.g,a,b)};
729
- q.getManifests=function(a){var b=this,c;return I(function(d){if(1==d.g)return u(d,qs(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Ac(e)})))})};q.getAllManifests=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=ms(a.h,a.g,"readonly"),c=new Map,u(d,js(b,function(e,f){var g;return I(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.$e=function(a){return a};q.Ac=function(a){return Promise.resolve(a)};
730
- function os(a){return Promise.reject(new O(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){if(1==m.g){d=ls(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Yc:g.Yc},k=h.next())l=k.value,g.Yc=e.add(l),g.Yc.onsuccess=function(p){return function(){f.push(p.Yc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
731
- function ps(a,b,c,d){a=ls(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Xc:e.Xc},f=c.next())e.Xc=f.value,b["delete"](e.Xc).onsuccess=function(g){return function(){return d(g.Xc)}}(e);return a.promise()}
732
- function qs(a,b,c){var d,e,f,g,h,k,l;return I(function(m){if(1==m.g){d=ms(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={wc:h.wc,tc:h.tc},l=k.next())h.tc=l.value,h.wc=e.get(h.tc),h.wc.onsuccess=function(p){return function(){void 0==p.wc.result&&g.push(p.tc);f[p.tc]=p.wc.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(p){return f[p]}))})};function ss(a){this.g=new ks(a)}ss.prototype.destroy=function(){return this.g.destroy()};ss.prototype.getAll=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=ms(a.g,"session-ids","readonly"),c=[],u(d,js(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};ss.prototype.add=function(a){var b=ls(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()};
733
- ss.prototype.remove=function(a){var b=this,c;return I(function(d){return 1==d.g?(c=ls(b.g,"session-ids"),u(d,js(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function ts(){this.g=new Map}ts.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)};ts.prototype.init=function(){var a=this;us.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)};
734
- function vs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ra:d,Ba:f},Ba:e})})});if(b)return b;throw new O(2,9,9013,"Could not find a cell that supports add-operations");}function ws(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ra:d,Ba:f},e)})})}
735
- function xs(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 ys(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function zs(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()}
736
- function As(a){var b,c,d;return I(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=us,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Bs(a,b){us.set(a,b)}J("shaka.offline.StorageMuxer",ts);ts.unregister=function(a){us["delete"](a)};ts.register=Bs;ts.prototype.destroy=ts.prototype.destroy;var us=new Map;function Cs(){ns.apply(this,arguments)}qa(Cs,ns);Cs.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return I(function(g){d=ls(c.h,c.g);e=d.store();f=new Mc;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)})};
737
- Cs.prototype.Ac=function(a){var b,c,d,e,f,g;return I(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=Ds(a.periods[c],e),b.push(f);return u(h,Np(b),2)}g=h.h;return h["return"]({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
738
- function Ds(a,b){Es(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Fs(e,a.startTime,b)})}
739
- function Fs(a,b,c){var d=a.initSegmentUri?Gs(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=Gs(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
740
- 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}}Cs.prototype.$e=function(a){return{data:a.data}};function Gs(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);}
741
- function Es(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++,
742
- 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 Hs(){ns.apply(this,arguments)}qa(Hs,ns);
743
- Hs.prototype.Ac=function(a){var b,c,d,e,f,g;return I(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),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(Is(p,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,Np(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
579
+ function xo(a,b){var c=yo(a,b,"timescale"),d=1;c&&(d=go(c)||1);var e=yo(a,b,"duration");c=go(e||"");"image"==a.L.contentType&&(c=io(e||""));c&&(c/=d);var f=yo(a,b,"startNumber");e=Number(yo(a,b,"presentationTimeOffset"))||0;var g=ho(f||"");if(null==f||null==g)g=1;var h=zo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.Z.duration||Infinity;h=Tn(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],r=h[n+1],w=ao(p,"t",ho),y=ao(p,"d",ho);p=ao(p,"r",fo);null!=w&&(w-=e);if(!y)break;w=null!=w?w:m;p=
580
+ p||0;if(0>p)if(r){r=ao(r,"t",ho);if(null==r)break;else if(w>=r)break;p=Math.ceil((r-w)/y)-1}else{if(Infinity==k)break;else if(w/f>=k)break;p=Math.ceil((k*f-w)/y)-1}0<l.length&&w!=m&&(l[l.length-1].end=w/f);for(r=0;r<=p;++r)m=w+y,l.push({start:w/f,end:m/f,rh:w}),w=m}f=l}return{timescale:d,wa:c,mc:g,rb:e/d||0,Re:e,timeline:f}}function yo(a,b,c){return[b(a.L),b(a.Aa),b(a.ra)].filter(Cb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
581
+ function zo(a,b,c){return[b(a.L),b(a.Aa),b(a.ra)].filter(Cb).map(function(d){return Sn(d,c)}).reduce(function(d,e){return d||e})}
582
+ function Ao(a,b,c,d,e,f){for(var g=Xn(a,"http://www.w3.org/1999/xlink","href"),h=Xn(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Ze(new O(2,4,4028));if("onLoad"!=h)return Ze(new O(2,4,4027));var m=Db([d],[g]);return e.request(0,nf(m,b)).na(function(n){n=lo(n.data,a.tagName);if(!n)return Ze(new O(2,4,4001,g));
583
+ for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return Bo(a,b,c,m[0],e,f+1)})}
584
+ function Bo(a,b,c,d,e,f){f=void 0===f?0:f;if(Xn(a,"http://www.w3.org/1999/xlink","href")){var g=Ao(a,b,c,d,e,f);c&&(g=g.na(void 0,function(){return Bo(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Xn(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Bo(k,b,c,d,e,f)));return cf(g).na(function(){return a})};function Co(a,b,c,d,e,f,g){var h,k=(new Ag).Y("sidx",function(l){h=Do(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
585
+ function Do(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.R();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.R();var m=g.reader.R()}else l=g.reader.lc(),m=g.reader.lc();g.reader.skip(2);var n=g.reader.re();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.R(),r=(p&2147483648)>>>31;p&=2147483647;var w=g.reader.R();g.reader.skip(4);if(1==r)throw new O(2,3,3006);h.push(new Yh(l/k+c,(l+w)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=w;a+=p}g.parser.stop();return h};function Eo(a){this.h=Jc(a);this.g=new xg(this.h,0)}Eo.prototype.Da=function(){return this.g.Da()};
586
+ function Fo(a){var b=Go(a);if(7<b.length)throw new O(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Go(a);a:{d=t(Ho);for(var e=d.next();!e.done;e=d.next())if(Ec(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.oa();else{if(8==b.length&&b[1]&224)throw new O(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.oa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.oa();d=Jc(a.h,a.g.oa(),b);a.g.skip(b);return new Io(c,
587
+ d)}function Go(a){var b=a.g.oa(),c=a.g.qb();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Gc(a.h,b,c)}var Ho=[[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 Io(a,b){this.id=a;this.g=b}
588
+ function Jo(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=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Ko(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Eo(a.g);for(var n=null,p=null;a.Da();){var r=Fo(a);if(187==r.id){var w=Lo(r);w&&(r=c*w.sh,w=b+w.ah,null!=n&&m.push(new Yh(n+g,r+g,l,p,w-1,f,g,h,k)),n=r,p=w)}}null!=n&&m.push(new Yh(n+g,d+g,l,p,null,f,g,h,k));return m}
589
+ function Lo(a){var b=new Eo(a.g);a=Fo(b);if(179!=a.id)throw new O(2,3,3013);a=Jo(a);b=Fo(b);if(183!=b.id)throw new O(2,3,3012);b=new Eo(b.g);for(var c=0;b.Da();){var d=Fo(b);if(241==d.id){c=Jo(d);break}}return{sh:a,ah:c}};function Mo(a,b){var c=zo(a,b,"Initialization");if(!c)return null;var d=a.L.Na,e=c.getAttribute("sourceURL");e&&(d=Db(a.L.Na,[e]));e=0;var f=null;if(c=ao(c,"range",eo))e=c.start,f=c.end;return new Wh(function(){return d},e,f,No(a))}
590
+ function Oo(a,b){var c=Number(yo(a,Qo,"presentationTimeOffset"))||0,d=yo(a,Qo,"timescale"),e=1;d&&(e=go(d)||1);var f=c/e||0,g=Mo(a,Qo);Ro(a,g);var h=ff(a);return{$b:function(){var k=zo(h,Qo,"RepresentationIndex"),l=h.L.Na;k&&(k=k.getAttribute("sourceURL"))&&(l=Db(h.L.Na,[k]));k=So(h);return To(h,b,g,l,k.start,k.end,f)}}}
591
+ function To(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,w,y,x,v,D,C,B,G;return I(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.xb||!a.Z.yf,l=a.Z.start,m=a.Z.duration,n=a.L.mimeType.split("/")[1],p=b,r=null,w=[p(d,e,f),"webm"==n?p(c.Pa(),c.Ta,c.Ca):null],p=null,u(E,Promise.all(w),2);y=E.h;x=y[0];v=y[1]||null;D=null;C=l-g;B=l;G=m?l+m:Infinity;if("mp4"==n)var H=Co(x,e,d,c,C,B,G);else{H=new Eo(v);if(440786851!=Fo(H).id)throw new O(2,3,3008);var N=Fo(H);if(408125543!=N.id)throw new O(2,3,3009);H=N.g.byteOffset;
592
+ N=new Eo(N.g);for(var K=null;N.Da();){var M=Fo(N);if(357149030==M.id){K=M;break}}if(!K)throw new O(2,3,3010);K=new Eo(K.g);M=1E6;for(N=null;K.Da();){var V=Fo(K);if(2807729==V.id)M=Jo(V);else if(17545==V.id)if(4==V.g.byteLength)N=V.g.getFloat32(0);else if(8==V.g.byteLength)N=V.g.getFloat64(0);else throw new O(2,3,3003);}if(null==N)throw new O(2,3,3011);K=M/1E9;N*=K;M=Fo(new Eo(x));if(475249515!=M.id)throw new O(2,3,3007);H=Ko(M,H,K,N,d,c,C,B,G)}D=H;h.ic(D);r=new $i(D);k&&r.yb(B,G,!0);return E["return"](r)})}
593
+ function Qo(a){return a.Sc}function So(a){var b=zo(a,Qo,"RepresentationIndex");a=yo(a,Qo,"indexRange");a=eo(a||"");b&&(a=ao(b,"range",eo,a));return a}function Ro(a,b){Uo(a,b);if(!So(a))throw new O(2,4,4002);}function Uo(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Ib&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);}
594
+ function No(a){var b=a.L;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.td,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Vo(a,b){var c=Mo(a,Wo),d=Xo(a);if(!d.wa&&!d.timeline&&1<d.fc.length)throw new O(2,4,4002);if(!d.wa&&!a.Z.duration&&!d.timeline&&1==d.fc.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.ra.id&&a.L.id&&(f=b[a.ra.id+","+a.L.id])&&(e=f.segmentIndex);var g=Yo(a.Z.start,a.Z.duration,a.L.Na,d,c);c=!e;e?e.hc(g,a.presentationTimeline.ob()):e=new $i(g);a.presentationTimeline.ic(g);a.xb&&a.Z.yf||e.yb(a.Z.start,a.Z.duration?a.Z.start+a.Z.duration:
595
+ Infinity,c);f&&(f.segmentIndex=e);return{$b:function(){e&&0!=e.M.length||e.Mc(g);return Promise.resolve(e)}}}function Wo(a){return a.Db}function Xo(a){var b=Zo(a);a=xo(a,Wo);var c=a.mc;0==c&&(c=1);var d=0;a.wa?d=a.wa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{wa:a.wa,startTime:d,mc:c,rb:a.rb,timeline:a.timeline,fc:b}}
596
+ function Yo(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));for(var g=a-d.rb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Od:m.Od},n++){var p=d.fc[n];m.Od=Db(c,[p.Sg]);var r=void 0;r=null!=d.wa?l+d.wa:d.timeline?d.timeline[n].end:l+b;k.push(new Yh(a+l,a+r,function(w){return function(){return w.Od}}(m),p.start,p.end,e,g,a,h));l=r}return k}
597
+ function Zo(a){return[a.L.Db,a.Aa.Db,a.ra.Db].filter(Cb).map(function(b){return Tn(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.wf&&(a.wf=!0);var c=b.getAttribute("media");b=ao(b,"mediaRange",eo,{start:0,end:null});return{Sg:c,start:b.start,end:b.end}})};function $o(a,b,c,d,e,f){var g=ap(a),h=bp(a);cp(h);var k=ff(a);if(h.Jc)return Uo(a,g),{$b:function(){var r=wo(h.Jc,k.L.id,null,k.bandwidth||null,null);r=Db(k.L.Na,[r]);return To(k,b,g,r,0,null,h.rb)}};if(h.wa)return d||(a.presentationTimeline.le(h.wa),a.presentationTimeline.me(a.Z.start)),{$b:function(){return dp(k,h,e,g,f)}};var l=null;d=d=null;a.ra.id&&a.L.id&&(d=a.ra.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=ep(k,h,g);c=a.Z.start;var n=a.Z.duration?a.Z.start+a.Z.duration:Infinity,p=Infinity!=
598
+ n;l?(p&&(new $i(m)).yb(c,n,!0),l.hc(m,a.presentationTimeline.ob())):l=new $i(m);a.presentationTimeline.ic(m);p&&l.yb(c,n);d&&a.xb&&(d.segmentIndex=l);return{$b:function(){l&&0!=l.M.length||l.Mc(m);return Promise.resolve(l)}}}function fp(a){return a.Tc}function bp(a){var b=xo(a,fp),c=yo(a,fp,"media");a=yo(a,fp,"index");return{wa:b.wa,timescale:b.timescale,mc:b.mc,rb:b.rb,Re:b.Re,timeline:b.timeline,ke:c,Jc:a}}
599
+ function cp(a){var b=a.Jc?1:0;b+=a.timeline?1:0;b+=a.wa?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.Jc&&(a.timeline=null),a.wa=null);if(!a.Jc&&!a.ke)throw new O(2,4,4002);}
600
+ function dp(a,b,c,d,e){function f(K){var M=(K-r)*p,V=M+b.rb,Z=M+l;M=Z+p;var ha=Math.min(M,h());Z=new Yh(Z,ha,function(){var ja=wo(y,v,K,x,V*w);return Db(D,[ja])},0,null,d,C,l,h());Z.j=M;return Z}function g(){var K=[Math.max(k.ob(),l),Math.min(k.Ib(),h())].map(function(M){return M-l});return[Math.ceil(K[0]/p),Math.ceil(K[1]/p)-1].map(function(M){return M+r})}function h(){var K=null!=m&&e[m]||n;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.Z.start,m=a.ra.id,n=a.Z.duration,p=b.wa,r=b.mc,w=b.timescale,
601
+ y=b.ke,x=a.bandwidth||null,v=a.L.id,D=a.L.Na,C=l-b.rb,B=g();a=a.xb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var G=a;G<=B;++G){var E=f(G);c.push(E)}var H=new $i(c);c=k.Ib()<h();G=k.U();if(c||G){var N=Math.max(a,B+1);H.Fd(p,function(){var K=k.ob();H.Gb(K);var M=t(g());M.next();M=M.next().value;for(var V=[];N<=M;){var Z=f(N);V.push(Z);N++}return K>h()&&!V.length?null:V})}return Promise.resolve(H)}
602
+ function ep(a,b,c){var d=a.Z.start,e=a.Z.duration,f=d-b.rb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Nd:h.Nd,Rd:h.Rd,Ud:h.Ud,Kd:h.Kd,Wd:h.Wd,Ld:h.Ld},k++){var l=b.timeline[k],m=l.start,n=l.rh;l=l.end;h.Ud=k+b.mc;h.Wd=n+b.Re;h.Rd=a.L.id;h.Kd=a.bandwidth||null;h.Nd=b.ke;h.Ld=a.L.Na;g.push(new Yh(d+m,d+l,function(p){return function(){var r=wo(p.Nd,p.Rd,p.Ud,p.Kd||null,p.Wd);return Db(p.Ld,[r]).map(function(w){return w.toString()})}}(h),0,null,c,f,d,e))}return g}
603
+ function ap(a){var b=yo(a,fp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Na;return new Wh(function(){var f=wo(b,c,null,d,null);return Db(e,[f])},0,null,No(a))};function gp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}gp.prototype.release=function(){for(var a=t(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
604
+ function hp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,w,y,x,v,D,C,B,G,E,H,N,K,M,V,Z,ha,ja,xa,La;return I(function(Fa){switch(Fa.g){case 1:d=Jb;ip(b);jp(b);kp(b);lp(b);if(!c&&1==b.length){e=b[0];a.g=e.dd;a.h=e.Hd;a.j=e.textStreams;a.i=e.imageStreams;Fa.D(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Fa["return"]();k=b.map(function(Sa){return Sa.dd});l=b.map(function(Sa){return Sa.Hd});m=b.map(function(Sa){return Sa.textStreams});n=b.map(function(Sa){return Sa.imageStreams});
605
+ p=t(m);for(r=p.next();!r.done;r=p.next())w=r.value,w.push(mp(d.ha));y=t(n);for(x=y.next();!x.done;x=y.next())v=x.value,v.push(mp(d.xc));return u(Fa,np(a.g,k,f,op,pp),3);case 3:return u(Fa,np(a.h,l,f,op,pp),4);case 4:return u(Fa,np(a.j,m,f,op,pp),5);case 5:return u(Fa,np(a.i,n,f,op,pp),2);case 2:D=0;C=[];if(a.h.length&&a.g.length)for(K=t(a.g),M=K.next();!M.done;M=K.next())for(V=M.value,Z=t(a.h),ha=Z.next();!ha.done;ha=Z.next())ja=ha.value,xa=pg(V.drmInfos,ja.drmInfos),V.drmInfos.length&&ja.drmInfos.length&&
606
+ !xa.length||(La=D++,C.push({id:La,language:V.language,primary:V.primary,audio:V,video:ja,bandwidth:(V.bandwidth||0)+(ja.bandwidth||0),drmInfos:xa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),G=t(B),E=G.next();!E.done;E=G.next())H=E.value,N=D++,C.push({id:N,language:H.language,primary:H.primary,audio:H.type==d.Fb?H:null,video:H.type==d.Ma?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
607
+ a.l=C;z(Fa)}})}function ip(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.dd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&ec(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.dd=c}}
608
+ function kp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&ec(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
609
+ function jp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Hd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&ec(e.roles,h.roles)&&Df(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Hd=c}}
610
+ function lp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
611
+ function qp(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,w,y,x,v,D,C,B,G,E,H,N,K,M,V;return I(function(Z){switch(Z.g){case 1:b=Jb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(ha){return ha.filter(function(ja){return ja.type==b.Fb})});d=a.map(function(ha){return ha.filter(function(ja){return ja.type==b.Ma})});e=a.map(function(ha){return ha.filter(function(ja){return ja.type==b.ha})});f=a.map(function(ha){return ha.filter(function(ja){return ja.type==b.xc})});g=t(e);for(h=g.next();!h.done;h=g.next())k=
612
+ h.value,k.push(rp(b.ha));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(rp(b.xc));return u(Z,np([],c,0,sp,tp),2);case 2:return p=Z.h,u(Z,np([],d,0,sp,tp),3);case 3:return r=Z.h,u(Z,np([],e,0,sp,tp),4);case 4:return w=Z.h,u(Z,np([],f,0,sp,tp),5);case 5:y=Z.h;x=0;if(r.length&&p.length)for(G=t(p),E=G.next();!E.done;E=G.next())for(H=E.value,N=t(r),K=N.next();!K.done;K=N.next())M=K.value,V=x++,M.variantIds.push(V),H.variantIds.push(V);else for(v=r.concat(p),D=t(v),C=D.next();!C.done;C=D.next())B=
613
+ C.value,B.variantIds=[x++];return Z["return"](r.concat(p).concat(w).concat(y))}})}
614
+ function np(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,w,y,x,v,D,C,B,G,E,H,N,K;return I(function(M){switch(M.g){case 1:f=Jb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){M.D(4);break}m=l.value;return u(M,up(m,b,c,e,g),5);case 5:n=M.h;if(!n)throw new O(2,4,4037);l=k.next();M.D(2);break;case 4:p=t(g);for(r=p.next();!r.done;r=p.next())for(w=r.value,y=t(w),x=y.next();!x.done;x=y.next())v=x.value,(D=vp(v,b,d,e,g))&&a.push(D);C=t(g);for(r=C.next();!r.done;r=
615
+ C.next())for(B=r.value,G={},E=t(B),x=E.next();!x.done;G={vb:G.vb},x=E.next())if(G.vb=x.value,H=G.vb.type==f.ha&&!G.vb.language,N=G.vb.type==f.xc&&!G.vb.tilesLayout,!H&&!N&&(K=a.some(function(V){return function(Z){return Z.mimeType==V.vb.mimeType&&Ad(Z.codecs)==Ad(V.vb.codecs)}}(G))))throw new O(2,4,4037);return M["return"](a)}})}
616
+ function up(a,b,c,d,e){return I(function(f){if(1==f.g)return wp(b,a),a.matchedStreams?a.segmentIndex?u(f,xp(a,c),2):f.D(2):f["return"](!1);yp(a,c,d,e);return f["return"](!0)})}
617
+ function xp(a,b){var c,d,e,f,g,h,k;return I(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof cj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);z(l)})}
618
+ function vp(a,b,c,d,e){var f=c(a);wp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return I(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new cj;return u(g,xp(f,0),0)})});if(!f.matchedStreams)return null;yp(f,0,d,e);return f}function yp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==Sb(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
619
+ function op(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
620
+ function sp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
621
+ function pp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=pg(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||
622
+ (a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=op(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),pp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&pp(a.trickModeVideo,b)}
623
+ function tp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
624
+ function wp(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:zp,video:zp,text:Ap,image:Bp}[f.type],h={audio:Cp,video:Dp,text:Ep,image:Fp}[f.type],k=null;e=t(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return;c.push(f)}b.matchedStreams=c}function zp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Ad(b.codecs)!=Ad(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<pg(c,d).length:1)}return c?!1:!0}
625
+ function Ap(a,b){return a.language?b.language?0==Sb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Bp(a){return a.tilesLayout?!0:!1}
626
+ function Cp(a,b,c){if(a.id==c.id)return!0;var d=Sb(a.language,b.language),e=Sb(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;
627
+ d=Gp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Hp)return!0;if(d==Ip)return!1;d=Gp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Hp?!0:d==Ip?!1:a.bandwidth&&Jp(a.bandwidth,b.bandwidth,c.bandwidth)==Hp?!0:!1}
628
+ function Dp(a,b,c){if(a.id==c.id)return!0;var d=Gp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Hp)return!0;if(d==Ip)return!1;if(a.frameRate){d=Gp(a.frameRate,b.frameRate,c.frameRate);if(d==Hp)return!0;if(d==Ip)return!1}return a.bandwidth&&Jp(a.bandwidth,b.bandwidth,c.bandwidth)==Hp?!0:!1}
629
+ function Ep(a,b,c){if(a.id==c.id)return!0;var d=Sb(a.language,b.language),e=Sb(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!=
630
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Fp(a,b,c){return a.id==c.id?!0:Gp(a.width*a.height,b.width*b.height,c.width*c.height)==Hp?!0:!1}function rp(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}}
631
+ function mp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new $i([]),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}}
632
+ function Gp(a,b,c){if(b==a&&a!=c)return Ip;if(c==a&&a!=b)return Hp;if(b>a){if(c<=a||c-a<b-a)return Hp;if(c-a>b-a)return Ip}else{if(c>a)return Ip;if(a-c<a-b)return Hp;if(a-c>a-b)return Ip}return Kp}function Jp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Hp:b<a?Ip:Kp}var Hp=1,Kp=0,Ip=-1;function Lp(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.N={};this.j=new gp;this.H=0;this.J=new $b(5);this.G=new P(function(){Mp(a)});this.A=new gf;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=Lp.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return I(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,Np(c),2);d=e.h;c.h&&Op(c,d);if(!c.h)throw new O(2,7,7001);return e["return"](c.i)})};
633
+ q.stop=function(){for(var a=t(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.G&&(this.G.stop(),this.G=null);return this.A.destroy()};q.update=function(){var a=this,b;return I(function(c){if(1==c.g)return A(c,2),u(c,Np(a),4);if(2!=c.g)return va(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);z(c)})};q.onExpirationUpdated=function(){};
634
+ function Np(a){var b,c,d,e,f,g,h;return I(function(k){if(1==k.g)return b=nf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),hf(a.A,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,Pp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k["return"](h)})}
635
+ function Pp(a,b,c){var d,e,f,g,h;return I(function(k){if(1==k.g){d=lo(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](Qp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Bo(d,a.g.retryParameters,f,c,a.h.networkingEngine);hf(a.A,g);return u(k,g.promise,2)}h=k.h;return k["return"](Qp(a,h,c))})}
636
+ function Qp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,w,y,x,v,D,C,B,G,E,H,N,K,M,V,Z,ha,ja,xa,La,Fa,Sa;return I(function(Ga){switch(Ga.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Tn(b,"Location").map(Zn).filter(Cb);0<f.length&&(g=Db(e,f),e=a.m=g);h=Tn(b,"BaseURL");k=h.map(Zn);l=Db(e,k);m=0;h&&h.length&&(m=ao(h[0],"availabilityTimeOffset",io)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=ao(b,"minBufferTime",co)||0);a.H=ao(b,"minimumUpdatePeriod",co,-1);r=ao(b,"availabilityStartTime",bo);w=ao(b,
637
+ "timeShiftBufferDepth",co);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=ao(b,"suggestedPresentationDelay",co));v=a.g.dash.ignoreMaxSegmentDuration;D=null;v||(D=ao(b,"maxSegmentDuration",co));C=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,G=t(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.Gb(B.ob());else N=a.g.defaultPresentationDelay||1.5*p,K=null!=x?x:N,B=new Q(r,K,a.g.dash.autoCorrectDrift);B.Uc("static"==C);(M=B.U())&&
638
+ !isNaN(a.g.availabilityWindowOverride)&&(w=a.g.availabilityWindowOverride);null==w&&(w=Infinity);B.He(w);V=b.getAttribute("profiles")||"";Z={xb:"static"!=C,presentationTimeline:B,ra:null,Z:null,Aa:null,L:null,bandwidth:0,wf:!1,Yb:m,profiles:V.split(",")};ha=Rp(a,Z,l,b);ja=ha.duration;xa=ha.periods;"static"!=C&&ha.lf||B.bb(ja||Infinity);a.C&&!a.F&&(La=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?B.Ff(a.C):a.C&&Ua("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.");
639
+ B.le(D||1);return u(Ga,hp(a.j,xa,Z.xb),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Ga.D(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0,sequenceMode:!1};if(!B.Nf()){Ga.D(4);break}Fa=Tn(b,"UTCTiming");return u(Ga,Sp(a,l,Fa),5);case 5:Sa=Ga.h;if(!a.h)return Ga["return"]();B.Gf(Sa);case 4:B.ge();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Ga)}})}
640
+ function Rp(a,b,c,d){var e=ao(d,"mediaPresentationDuration",co),f=[],g=0;d=Tn(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=ao(k,"start",co,g),n=k.id,p=ao(k,"duration",co),r=null;if(l){var w=ao(l,"start",co);null!=w&&(r=w-m)}else null!=e&&(r=e-m);null==r&&(r=p);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=Tp(a,b,c,{start:m,duration:r,node:k,yf:null==r||!l});f.push(g);b.ra.id&&r&&(a.N[b.ra.id]=r);if(null==r){g=
641
+ null;break}g=m+r}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,lf:!1}:{periods:f,duration:g,lf:!0}}
642
+ function Tp(a,b,c,d){b.ra=Up(d.node,null,c);b.Z=d;b.ra.Yb=b.Yb;b.ra.id||(b.ra.id="__shaka_period_"+d.start);var e=Tn(d.node,"EventStream");c=b.presentationTimeline.ob();e=t(e);for(var f=e.next();!f.done;f=e.next())Vp(a,d.start,d.duration,f.value,c);c=Tn(d.node,"AdaptationSet").map(function(m){return Wp(a,b,m)}).filter(Cb);if(b.xb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.eh);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);
643
+ }d=c.filter(function(m){return!m.Ne});c=c.filter(function(m){return m.Ne});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ne.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={$c:h.$c},l=k.next())h.$c=l.value,h.$c.trickModeVideo=e.streams.find(function(m){return function(n){return Ad(m.$c.codecs)==Ad(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:Xp(d,"audio");g=a.g.disableVideo?[]:Xp(d,"video");f=a.g.disableText?
644
+ []:Xp(d,Ib);c=a.g.disableThumbnails?[]:Xp(d,"image");if(!g.length&&!e.length)throw new O(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.ra.id,dd:d,Hd:e,textStreams:g,imageStreams:f}}
645
+ function Xp(a,b){return a.filter(function(c){return c.contentType==b})}
646
+ function Wp(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Aa=Up(c,b.ra,null);var e=!1,f=Tn(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(Cb),h=void 0,k=b.Aa.contentType==Ib;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
647
+ l}}var n;m=Tn(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var r=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==r?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==r?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=Tn(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
648
+ 10)));m=Tn(c,"Accessibility");var w=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(r=p.value,p=r.getAttribute("schemeIdUri"),r=r.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=r){r=r.split(";");for(var y=t(r),x=y.next();!x.done;x=y.next()){var v=x.value,D=x=void 0;v.includes("=")?(v=v.split("="),x=v[0].startsWith("CC")?v[0]:"CC"+v[0],D=v[1]||"und"):(x="CC"+p,2==r.length?p+=2:p++,D=v);w.set(x,Mb(D))}}else w.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
649
+ 1,null!=r)for(r=t(r.split(";")),x=r.next();!x.done;x=r.next())x=x.value,v=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],v=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,v=x),w.set(y,Mb(v));else w.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=r&&(g.push(r),"captions"==r&&(h="caption"));if(l)return null;l=Tn(c,"ContentProtection");var C=mo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=Mb(c.getAttribute("lang")||"und"),G=c.getAttribute("label");(l=Tn(c,"Label"))&&l.length&&
650
+ (l=l[0],l.textContent&&(G=l.textContent));l=Tn(c,"Representation");c=l.map(function(E){if(E=Yp(a,b,C,h,B,G,e,g,w,E))E.hdr=E.hdr||n;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.Aa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new O(2,4,4003);}if(!b.Aa.contentType||"application"==b.Aa.contentType)for(b.Aa.contentType=Zp(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.Aa.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
651
+ m.value,p=t(C.drmInfos),r=p.next();!r.done;r=p.next())r=r.value,r.keyIds=r.keyIds&&m.keyIds?new Set([].concat(ia(r.keyIds),ia(m.keyIds))):r.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(Cb);return{id:b.Aa.id||"__fake__"+a.I++,contentType:b.Aa.contentType,language:B,Xi:e,streams:c,drmInfos:C.drmInfos,Ne:f,eh:k}}
652
+ function Yp(a,b,c,d,e,f,g,h,k,l){b.L=Up(l,b.Aa,null);a.C=Math.min(a.C,b.L.Yb);if(!$p(b.L))return null;var m=b.Z.start;b.bandwidth=ao(l,"bandwidth",go)||0;var n=b.L.contentType,p=n==Ib||"application"==n;n="image"==n;try{var r=function(H,N,K){return aq(a,H,N,K)};if(b.L.Sc)var w=Oo(b,r);else if(b.L.Db)w=Vo(b,a.l);else if(b.L.Tc)w=$o(b,r,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.L.Na,x=b.Z.duration||0;w={$b:function(){return Promise.resolve(bj(m,x,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
653
+ throw H;}r=Tn(l,"ContentProtection");r=po(r,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);r=new Set(r?[r]:[]);var v=!1;Tn(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(v=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var C;if(n&&((l=Tn(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
654
+ (C=l.getAttribute("value")),!C))return null;var B;l=b.L.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(B="PQ");var G=b.L.id?b.ra.id+","+b.L.id:"",E={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,N,K;return I(function(M){if(1==M.g){N=(H=G&&b.xb&&a.l[G])?a.l[G]:E;if(N.segmentIndex)return M.D(0);K=N;return u(M,w.$b(),3)}K.segmentIndex=M.h;z(M)})},closeSegmentIndex:function(){E.segmentIndex&&
655
+ (E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:r,language:e,label:f,type:b.Aa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.L.td,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:v,closedCaptions:k,
656
+ hdr:B,tilesLayout:C,matchedStreams:[]};G&&b.xb&&!a.l[G]&&(a.l[G]=E);return E}function Mp(a){var b,c;I(function(d){switch(d.g){case 1:return b=0,A(d,2),u(d,Np(a),4);case 4:b=d.h;va(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();Op(a,b);z(d)}})}function Op(a,b){0>a.H||a.G.T(Math.max(3,a.H-b,ac(a.J)))}
657
+ function Up(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,td:null,audioSamplingRate:null,Yb:0};c=c||b.Na;var d=Tn(a,"BaseURL"),e=d.map(Zn),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=ao(a,"frameRate",jo)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Tn(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
658
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Tn(a,"AudioChannelConfiguration");m=bq(m)||b.td;p=ao(a,"audioSamplingRate",ho)||b.audioSamplingRate;f||(f=Zp(g,h));var r=Sn(a,"SegmentBase"),w=Sn(a,"SegmentTemplate"),y=r?ao(r,"availabilityTimeOffset",io)||0:0,x=w?ao(w,"availabilityTimeOffset",io)||0:0;d=d&&d.length?ao(d[0],"availabilityTimeOffset",io)||0:0;d=b.Yb+d+y+x;return{Na:Db(c,e),Sc:r||b.Sc,Db:Sn(a,"SegmentList")||b.Db,Tc:w||b.Tc,width:ao(a,"width",ho)||b.width,height:ao(a,
659
+ "height",ho)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),td:m,audioSamplingRate:p,Yb:d}}
660
+ function bq(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
661
+ 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 $p(a){var b=a.Sc?1:0;b+=a.Db?1:0;b+=a.Tc?1:0;if(0==b)return a.contentType==Ib||"application"==a.contentType?!0:!1;1!=b&&(a.Sc&&(a.Db=null),a.Tc=null);return!0}
662
+ function cq(a,b,c,d){var e,f,g,h,k,l;return I(function(m){if(1==m.g)return e=Db(b,[c]),f=nf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),hf(a.A,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=ed(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
663
+ function Sp(a,b,c){var d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.D(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.D(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.D(8);
664
+ 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":Ua("NTP UTCTiming scheme is not supported");break;default:Ua("Unrecognized scheme in UTCTiming element",k)}n.D(9);break;case 7:return u(n,cq(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,cq(a,b,l,"GET"),11);case 11:return n["return"](n.h);
665
+ case 9:va(n,3);break;case 5:F(n);case 3:g=f.next();n.D(2);break;case 4:return Ua("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
666
+ function Vp(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=ao(d,"timescale",ho)||1;d=t(Tn(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=ao(k,"presentationTime",ho)||0,m=ao(k,"duration",ho)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
667
+ function aq(a,b,c,d){var e,f,g,h,k;return I(function(l){if(1==l.g)return e=tf,f=rj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),hf(a.A,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Zp(a,b){return Hd(yd(a,b))?Ib:a.split("/")[0]}J("shaka.dash.DashParser",Lp);vg.mpd=function(){return new Lp};tg["application/dash+xml"]=function(){return new Lp};tg["video/vnd.mpeg.dash.mpd"]=function(){return new Lp};function dq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function eq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}eq.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};
668
+ eq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function U(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function fq(a,b){var c=a.getAttribute(b);if(!c)throw new O(2,4,4023,b);return c.value}function gq(a,b,c){c=void 0===c?[]:c;this.h=b;this.i=a;this.g=c}function hq(a,b){this.name=a;this.value=b};function iq(a,b){return a.filter(function(c){return c.name==b})}function jq(a,b){return a.filter(function(c){return fq(c,"TYPE")==b})}function kq(a,b){var c=iq(a,b);return c.length?c[0]:null}function lq(a){var b=0;b=void 0===b?0:b;return(a=kq(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b};function mq(a){this.h=a;this.g=0}function nq(a){oq(a,/[ \t]+/gm)}function oq(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 pq(a){return a.g==a.h.length?null:(a=oq(a,/[^ \t\n]*/gm))?a[0]:null};function qq(){this.g=0}
669
+ function rq(a,b,c){b=ed(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=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=sq(a,g),--a.g,tq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=sq(a,h);if(uq.includes(h.name)){if(1!=b)throw new O(2,4,4017);
670
+ var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=sq(a,m),tq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==U(m,"TYPE")?k.push(m):"MAP"==U(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Db([d],[m.trim()])[0],h&&g.push(h),e.push(new gq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new gq("",g,k)));return new dq(c,b,f,e)}f.push(h);
671
+ "EXT-X-STREAM-INF"==h.name&&(h.g.push(new hq("URI",k)),e=!0)}}return new dq(c,b,f)}function sq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new O(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new mq(f);var h;(h=oq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=oq(f,k);)d.push(new hq(h[1],h[2]||h[3])),nq(f)}return new eq(c,e,d,g)}
672
+ var tq="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(" "),uq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function vq(){}function wq(a){try{var b=xq(a);return af({uri:a,Bf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ze(c)}}function xq(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=od(a):e=id(a);return{data:e,contentType:c}}
673
+ J("shaka.net.DataUriPlugin",vq);vq.parse=wq;kf("data",wq);function yq(){var a=this;this.h=this.j=null;this.ya=1;this.A=new Map;this.C=new Map;this.ma=new Set;this.g=new Map;this.i=null;this.K="";this.$=new qq;this.ea=0;this.S=!1;this.N=null;this.F=new P(function(){zq(a)});this.m=Aq;this.I=null;this.aa=0;this.H=Infinity;this.X=this.ba=0;this.G=new gf;this.P=[];this.J=new Map;this.za=!1;this.B=new Map;this.ua=new Map;this.l=!1}q=yq.prototype;q.configure=function(a){this.h=a};
674
+ q.start=function(a,b){var c=this,d,e;return I(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,Bq(c,a),2);if(3!=f.g)return d=f.h,c.K=d.uri,u(f,Cq(c,d.data,a),3);e=c.ea;0<e&&c.F.T(e);return f["return"](c.I)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.G&&(a.push(this.G.destroy()),this.G=null);this.h=this.j=null;this.ma.clear();this.I=null;this.g.clear();this.C.clear();this.B.clear();this.A.clear();return Promise.all(a)};
675
+ q.update=function(){var a=this,b,c,d;return I(function(e){if(1==e.g){if(a.m==Aq)return e["return"]();b=[];c=Array.from(a.g.values());return c.length?u(e,Dq(a,c[0]),2):e.D(2)}for(d=1;d<c.length;d++)b.push(Dq(a,c[d]));return u(e,Promise.all(b),0)})};
676
+ function Dq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,w;return I(function(y){if(1==y.g)return c=Eq,d=b.Tf,e=new lb(d),a.l&&b.Yf&&ob(e,new rb("_HLS_skip=YES")),u(y,Bq(a,e.toString()),2);f=y.h;g=rq(a.$,f.data,f.uri);if(1!=g.type)throw new O(2,4,4017);h=iq(g.g,"EXT-X-DEFINE");k=Fq(a,h);l=b.stream;m=Gq(a,g,l.type,b.Lc,k);l.segmentIndex.hc(m,a.i.ob());m.length&&(n=lq(g.g),p=b.Lc.get(n),l.segmentIndex.Gb(p));r=m[m.length-1];if(w=kq(g.g,"EXT-X-ENDLIST"))Hq(a,c.Sf),a.i.bb(r.endTime);z(y)})}q.onExpirationUpdated=function(){};
677
+ function Iq(a){if(!a.S){for(var b=-1,c=new Map,d=t(a.g.values()),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex;if(f&&(f=f.M[0]||null))for(var g=t(e.Lc),h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c.set(e,k);b=Math.max(b,k);break}}}if(!(0>b)){a.N=b;b=t(a.g.values());for(e=b.next();!e.done;e=b.next())if(d=e.value,e=d.stream.segmentIndex)f=a.N-c.get(d),e.M.splice(0,f),(e=e.M[0]||null)&&Jq(d,-e.startTime);a.S=!0}}}
678
+ function Kq(a){if(!a.S){for(var b=Infinity,c=t(a.g.values()),d=c.next();!d.done;d=c.next())if(d=d.value.stream.segmentIndex)d=d.M[0]||null,null!=d&&null!=d.g&&(b=Math.min(b,d.g));if(Infinity!=b){c=t(a.g.values());for(d=c.next();!d.done;d=c.next()){d=d.value;var e=d.stream.segmentIndex;null!=e&&(e=e.M[0]||null,null==e.g?Ta("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.Gd,"Expect AV sync issues!"):Jq(d,e.g-b-e.startTime))}a.S=!0}}}
679
+ function Jq(a,b){a.stream.segmentIndex.offset(b);a.ie+=b;for(var c=t(a.Lc),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.Lc.set(d,e+b)}}
680
+ function Cq(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,w,y,x,v,D,C,B,G,E,H,N,K,M,V,Z,ha,ja,xa,La,Fa,Sa,Ga,rc,Qc,Cd,Dd,qb,Ed,sc,De;return I(function(ab){switch(ab.g){case 1:d=rq(a.$,b,a.K);e=iq(d.g,"EXT-X-DEFINE");Lq(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.h.hls.mediaPlaylistFullMimeType,E=G.split(";")[0],H=E.split("/")[0],N=Fd(G),K=new Map,u(ab,Mq(a,d,c,c,N,H,"",!0,"Media Playlist",null,K,null,!1,!1,E),8);k=iq(d.g,"EXT-X-MEDIA");l=iq(d.g,"EXT-X-STREAM-INF");m=iq(d.g,"EXT-X-IMAGE-STREAM-INF");Nq(a,l);n=
681
+ iq(d.g,"EXT-X-SESSION-DATA");p=t(n);for(r=p.next();!r.done;r=p.next())if(w=r.value,y=U(w,"DATA-ID"),x=U(w,"URI"),v=U(w,"LANGUAGE"),D=U(w,"VALUE"),C=(new Map).set("id",y),x&&C.set("uri",Db([a.K],[x])[0]),v&&C.set("language",v),D&&C.set("value",D),B=new L("sessiondata",C),a.j)a.j.onEvent(B);return u(ab,Oq(a,k),4);case 4:return Pq(a,k),u(ab,Qq(a,l),5);case 5:return f=ab.h,u(ab,Rq(a,k),6);case 6:return g=ab.h,u(ab,Sq(a,m),7);case 7:h=ab.h;ab.D(3);break;case 8:M=ab.h,a.g.set(c,M),f.push({id:0,language:"und",
682
+ disabledUntilTime:0,primary:!0,audio:"audio"==H?M.stream:null,video:"video"==H?M.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.j)throw new O(2,7,7001);a.h.hls.ignoreManifestProgramDateTime?Iq(a):Kq(a);if(a.za&&0==f.length)throw new O(2,4,4034);V=Infinity;Z=t(a.g.values());for(ha=Z.next();!ha.done;ha=Z.next())ja=ha.value,"text"!=ja.stream.type&&(V=Math.min(V,ja.ie));a.m!=Aq?(a.i=new Q(0,a.h.defaultPresentationDelay?a.h.defaultPresentationDelay:
683
+ a.X?a.X:3*a.aa),a.i.Uc(!1)):(a.i=new Q(null,0),a.i.Uc(!0));if(a.m!=Aq)a.ea=a.H,xa=Eq,a.m==xa.Xe&&(La=a.i.zd,isNaN(a.h.availabilityWindowOverride)||(La=a.h.availabilityWindowOverride),a.i.He(La));else for(a.i.bb(V),Fa=t(a.g.values()),ha=Fa.next();!ha.done;ha=Fa.next())Sa=ha.value,Sa.stream.segmentIndex.yb(0,V);a.P=[];Ga=[];rc=t(f);for(Qc=rc.next();!Qc.done;Qc=rc.next())for(Cd=Qc.value,Dd=t([Cd.video,Cd.audio]),qb=Dd.next();!qb.done;qb=Dd.next())(Ed=qb.value)&&Ga.push(Ed);return u(ab,Promise.all(Ga.map(function(jg){return I(function(kg){return u(kg,
684
+ jg.createSegmentIndex(),0)})})),9);case 9:sc=t(Ga);for(qb=sc.next();!qb.done;qb=sc.next())De=qb.value,a.P.push(De.segmentIndex.M);Tq(a);a.i.ge();a.I={presentationTimeline:a.i,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.j.makeTextStreamsForClosedCaptions(a.I);z(ab)}})}function Lq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=U(e,"NAME");e=U(e,"VALUE");d&&e&&(a.A.has(d)||a.A.set(d,e))}}
685
+ function Fq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=U(f,"NAME");var g=U(f,"VALUE");f=U(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.A.get(f))&&c.set(f,e)}return c}function Nq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=U(e,"AUDIO");d=U(e,"VIDEO");var g=U(e,"SUBTITLES");e=Uq(a,e);if(g){var h=Gb(Ib,e);a.B.set(g,h);dc(e,h)}f&&(g=Fb("audio",e),a.B.set(f,g));d&&(f=Fb("video",e),a.B.set(d,f))}}
686
+ function Rq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r;return I(function(w){if(1==w.g)return c=jq(b,"SUBTITLES"),d=c.map(function(y){var x,v,D;return I(function(C){if(1==C.g){if(x=a.h.disableText)return C["return"](null);A(C,2);return u(C,Vq(a,y),4)}if(2!=C.g)return v=C.h,C["return"](v.stream);D=F(C);if(a.h.hls.ignoreTextStreamFailures)return C["return"](null);throw D;})}),u(w,Promise.all(d),2);e=w.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=fq(h,"GROUP-ID"),l=a.B.get(k))if(m=a.C.get(k))for(n=
687
+ t(m),p=n.next();!p.done;p=n.next())r=p.value,r.stream.codecs=l;return w["return"](e.filter(function(y){return y}))})}
688
+ function Sq(a,b){var c,d;return I(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return I(function(l){if(1==l.g){if(g=a.h.disableThumbnails)return l["return"](null);A(l,2);return u(l,Wq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=F(l);if(a.h.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
689
+ function Oq(a,b){var c;return I(function(d){b=b.filter(function(e){var f=U(e,"URI")||"";return"SUBTITLES"!=U(e,"TYPE")&&""!=f});c=b.map(function(e){return Vq(a,e)});return u(d,Promise.all(c),0)})}
690
+ function Qq(a,b){var c,d,e;return I(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,r,w;return I(function(y){if(1==y.g)return h=U(g,"FRAME-RATE"),k=Number(U(g,"AVERAGE-BANDWIDTH"))||Number(fq(g,"BANDWIDTH")),l=U(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,r=U(g,"VIDEO-RANGE"),u(y,Xq(a,g),2);if(w=y.h){for(var x=y["return"],v=w.audio,D=w.video,C=t(D),B=C.next();!B.done;B=C.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
691
+ void 0,B.frameRate=Number(h)||void 0,B.hdr=r||void 0;C=a.h.disableAudio;if(!v.length||C)v=[null];C=a.h.disableVideo;if(!D.length||C)D=[null];C=[];v=t(v);for(B=v.next();!B.done;B=v.next()){B=B.value;for(var G=t(D),E=G.next();!E.done;E=G.next()){var H=E.value;E=B?B.stream:null;var N=H?H.stream:null,K=B?B.stream.drmInfos:null,M=H?H.stream.drmInfos:null;H=(H?H.Gd:"")+" - "+(B?B.Gd:"");E&&N&&K.length&&M.length&&!(0<pg(K,M).length)||a.ma.has(H)||(E={id:a.ya++,language:E?E.language:"und",primary:!!E&&E.primary||
692
+ !!N&&N.primary,audio:E,video:N,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},C.push(E),a.ma.add(H))}}y=x.call(y,C)}else y=y["return"]([]);return y})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Ab,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
693
+ function Xq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,w,y;return I(function(x){if(1==x.g)return c=Jb,d=Uq(a,b),e=U(b,"AUDIO"),f=U(b,"VIDEO"),h=(g=e||f)&&a.C.has(g)?a.C.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=fq(b,"URI"),p=k.audio.find(function(v){return v&&v.Gd==n}),r=Gb(c.Ma,d),(w=Gb(c.Fb,d))&&!r?l=c.Fb:!h.length&&w&&r?(l=c.Ma,d=[[r,w].join()]):k.audio.length&&p?(l=c.Fb,m=!0):l=k.video.length?c.Fb:c.Ma,m?x.D(2):u(x,Yq(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);
694
+ Zq(k);return x["return"](k)})}function Uq(a,b){var c=[];a.h.disableVideo||c.push(a.h.hls.defaultVideoCodec);a.h.disableAudio||c.push(a.h.hls.defaultAudioCodec);var d=U(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Bd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function $q(a){a=U(a,"LANGUAGE")||"und";return Mb(a)}
695
+ function Zq(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function Pq(a,b){var c=jq(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=$q(e);var f=fq(e,"GROUP-ID");e=fq(e,"INSTREAM-ID");a.J.get(f)||a.J.set(f,new Map);a.J.get(f).set(e,d)}}
696
+ function Vq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,w,y;return I(function(x){if(1==x.g){c=fq(b,"GROUP-ID");d="";var v=fq(b,"TYPE").toLowerCase();"subtitles"==v&&(v=Ib);e=v;e!=Ib&&c&&a.B.has(c)&&(d=a.B.get(c));f=ar(fq(b,"URI"),a.A);if(a.g.has(f))return x["return"](a.g.get(f));g=$q(b);h=U(b,"NAME");k=U(b,"DEFAULT");l="YES"==k;"audio"==e?v=(v=U(b,"CHANNELS"))?parseInt(v.split("/")[0],10):null:v=null;m=v;"audio"==e?v=(v=U(b,"CHANNELS"))?v.includes("/JOC"):!1:v=!1;n=v;p=U(b,"CHARACTERISTICS");r=U(b,"FORCED");
697
+ w="YES"==r;return u(x,br(a,f,d,e,g,l,h,m,null,p,w,n),2)}y=x.h;a.C.has(c)?a.C.get(c).push(y):a.C.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)})}
698
+ function Wq(a,b){var c,d,e,f,g,h,k,l,m,n;return I(function(p){if(1==p.g){c=ar(fq(b,"URI"),a.A);d=U(b,"CODECS","jpeg")||"";if(a.g.has(c))return p["return"](a.g.get(c));e=$q(b);f=U(b,"NAME");g=U(b,"CHARACTERISTICS");return u(p,br(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=U(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=
699
+ Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=U(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.g.set(c,h);return p["return"](h)})}
700
+ function Yq(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g){e=ar(fq(b,"URI"),a.A);if(a.g.has(e))return k["return"](a.g.get(e));var l=U(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.J.get(l):null;g=Fb(d,c);return u(k,br(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)})}
701
+ function br(a,b,c,d,e,f,g,h,k,l,m,n){var p,r,w;return I(function(y){if(1==y.g)return p=Db([a.K],[b])[0],u(y,Bq(a,p),2);r=y.h;p=r.uri;w=rq(a.$,r.data,p);return y["return"](Mq(a,w,b,p,c,d,e,f,g,h,k,l,m,n))})}
702
+ function Mq(a,b,c,d,e,f,g,h,k,l,m,n,p,r,w){var y,x,v,D,C,B,G,E,H,N,K,M,V,Z,ha,ja,xa,La,Fa,Sa,Ga,rc,Qc,Cd,Dd,qb,Ed,sc,De,ab,jg,kg;return I(function(tc){if(1==tc.g){if(1!=b.type)throw new O(2,4,4017);y=iq(b.g,"EXT-X-DEFINE");x=Fq(a,y);cr(a,b);return w?tc.D(2):u(tc,dr(a,f,e,b,x),3)}2!=tc.g&&(w=tc.h);v=[];if(b.segments)for(D=t(b.segments),C=D.next();!C.done;C=D.next())B=C.value,G=iq(B.h,"EXT-X-KEY"),v.push.apply(v,ia(G));E=!1;H=[];N=new Set;K=t(v);for(M=K.next();!M.done;M=K.next())if(V=M.value,Z=fq(V,
703
+ "METHOD"),"NONE"!=Z){E=!0;if("AES-128"==Z)return a.za=!0,tc["return"](null);ha=fq(V,"KEYFORMAT");if(xa=(ja=er[ha])?ja(V,w):null){if(xa.keyIds)for(La=t(xa.keyIds),Fa=La.next();!Fa.done;Fa=La.next())Sa=Fa.value,N.add(Sa);H.push(xa)}}if(E&&!H.length)throw new O(2,4,4026);Di.includes(w)&&(e="");Ga=new Map;try{rc=Gq(a,b,f,Ga,x)}catch(Po){if(4035==Po.code)return Ua("Skipping unsupported HLS stream",w,c),tc["return"](null);throw Po;}Qc=rc[rc.length-1].endTime;Cd=new $i(rc);Dd=f==Ib?"subtitle":void 0;qb=
704
+ [];if(n)for(Ed=t(n.split(",")),sc=Ed.next();!sc.done;sc=Ed.next())De=sc.value,qb.push(De);jg=(ab=kq(b.g,"EXT-X-SERVER-CONTROL"))?null!=ab.getAttribute("CAN-SKIP-UNTIL"):!1;kg={id:a.ya++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Cd,mimeType:w,codecs:e,kind:Dd,encrypted:E,drmInfos:H,keyIds:N,language:g,label:k,type:f,primary:h,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:qb,
705
+ forced:p,channelsCount:l,audioSamplingRate:null,spatialAudio:r,closedCaptions:m,hdr:void 0,tilesLayout:void 0};return tc["return"]({stream:kg,Gd:c,Tf:d,ie:Qc,Lc:Ga,Yf:jg})})}
706
+ function cr(a,b){var c=kq(b.g,"EXT-X-PLAYLIST-TYPE"),d=kq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Hq(a,Aq);else{c?Hq(a,fr):Hq(a,gr);d=kq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=kq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ba=Number(fq(c,"PART-TARGET")),a.H=Math.min(a.ba,a.H),c=kq(b.g,"EXT-X-SERVER-CONTROL"),a.X=c?Number(fq(c,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.aa=Math.max(d,a.aa)}}
707
+ function hr(a,b,c,d){c=kq(c,"EXT-X-MAP");if(!c)return null;var e=fq(c,"URI");d=ar(Db([b],[e])[0],d);b=[d,U(c,"BYTERANGE","")].join("-");a.ua.has(b)||(c=ir(d,c),a.ua.set(b,c));return a.ua.get(b)}function ir(a,b){var c=0,d=null,e=U(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new Wh(function(){return[a]},c,d)}
708
+ function jr(a,b,c,d,e,f,g,h){var k=d.h,l=ar(d.i,f),m=kq(k,"EXTINF"),n=f=0,p=null;d.g.length&&!a.l&&Ua("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var r=null;if(!a.h.hls.ignoreManifestProgramDateTime){var w=kq(k,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(r=bo(w.value))}w=Zh;kq(k,"EXT-X-GAP")&&(w=2);if(!m){if(0==d.g.length)throw new O(2,4,4024,"EXTINF");
709
+ if(!a.l)return null}var y=[];if(a.l)for(var x={},v=0;v<d.g.length;x={Pd:x.Pd},v++){var D=d.g[v],C=0==v?c:y[y.length-1],B=0==v?e:C.endTime,G=Number(U(D,"DURATION"))||a.ba;if(G){G=B+G;var E=0,H=null;"EXT-X-PRELOAD-HINT"==D.name?E=(E=U(D,"BYTERANGE-START"))?Number(E):0:(E=U(D,"BYTERANGE"),H=t(kr(C,E)),E=H.next().value,H=H.next().value);if(C=U(D,"URI"))x.Pd=Db([g],[C])[0],C=Zh,"YES"==U(D,"GAP")&&(C=2),y.push(new Yh(B,G,function(N){return function(){return[N.Pd]}}(x),E,H,b,0,0,Infinity,[],"",null,null,
710
+ C))}}m?f=e+Number(m.value.split(",")[0]):f=y[y.length-1].endTime;(a=kq(k,"EXT-X-BYTERANGE"))?(p=t(kr(c,a.value)),n=p.next().value,p=p.next().value):y.length&&(n=y[0].Ta,p=y[y.length-1].Ca);c="";a=null;"image"==h&&(c="1x1",h=kq(k,"EXT-X-TILES"))&&(c=fq(h,"LAYOUT"),(h=U(h,"DURATION"))&&(a=Number(h)));return new Yh(e,f,function(){return l.length?[l]:[]},n,p,b,0,0,Infinity,y,c,a,r,w)}function kr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.Ca+1,d=c+d-1);return[c,d]}
711
+ function Tq(a){if(a.i){for(var b=t(a.P),c=b.next();!c.done;c=b.next())a.i.ic(c.value);a.P=[]}}
712
+ function Gq(a,b,c,d,e){var f=b.segments,g=lq(b.g),h=kq(b.g,"EXT-X-SKIP");h=h?Number(U(h,"SKIPPED-SEGMENTS")):0;var k=g+h,l=0;a.m!=Aq&&d.has(k)&&(l=d.get(k));for(var m=[],n=null,p=0;p<f.length;p++){var r=f[p],w=0==p?l:n.endTime;k=g+h+p;d.set(k,w);var y=hr(a,b.h,r.h,e);!a.l&&a.j.isAutoLowLatencyMode()&&(a.j.enableLowLatencyMode(),a.l=a.j.isLowLatencyMode());(n=y=jr(a,y,n,r,w,e,b.h,c))&&(a.h.hls.ignoreManifestProgramDateTime&&null!=a.N&&k<a.N||m.push(y))}if(a=m.some(function(x){return null!=x.g}))for(b=
713
+ {},c=0;c<m.length;b={rc:b.rc,qc:b.qc,Vc:b.Vc,sb:b.sb,pc:b.pc},c++)if(b.sb=m[c],null==b.sb.g)for(b.qc=0,b.rc=c,d=function(x){return function(){var v=m[x.rc];if(v){if(null!=v.g)return v.g+x.qc;x.qc-=v.endTime-v.startTime;x.rc+=1}return null}}(b),b.pc=0,b.Vc=c,e=function(x){return function(){var v=m[x.Vc];if(v){v!=x.sb&&(x.pc+=v.endTime-v.startTime);if(null!=v.g)return v.g+x.pc;--x.Vc}return null}}(b);null==b.sb.g;)b.sb.g=e(),null==b.sb.g&&(b.sb.g=d());if(a)for(a=t(m),b=a.next();!b.done;b=a.next())for(c=
714
+ b.value,b=c.g,c=t(c.h),d=c.next();!d.done;d=c.next())d=d.value,d.g=b,b+=d.endTime-d.startTime;return m}function ar(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new O(2,4,4039,f);}}return c}
715
+ function dr(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,w,y,x;return I(function(v){if(1==v.g){f=Jb;g=tf;h=Math.trunc((d.segments.length-1)/2);k=ar(d.segments[h].i,e);l=new lb(k);m=l.Ka.split(".").pop();n=lr[b];if(p=n[m])return v["return"](p);if(b==f.ha){if("vtt"==c||"wvtt"==c)return v["return"]("text/vtt");if(c&&""!==c)return v["return"]("application/mp4")}if(b==f.xc&&(!c||"jpeg"==c))return v["return"]("image/jpeg");r=nf([k],a.h.retryParameters);r.method="HEAD";return u(v,mr(a,r,g),2)}w=v.h;y=w.headers["content-type"];
716
+ if(!y){if(b==f.ha)return v["return"]("text/vtt");x=n.mp4;return v["return"](x)}return v["return"](y.split(";")[0])})}function Bq(a,b){var c=nf([b],a.h.retryParameters);a.j.modifyManifestRequest(c,{format:"h"});return mr(a,c,0)}function zq(a){var b,c;I(function(d){if(1==d.g){if(!a.j)return d["return"]();A(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.ea,a.F.T(b),va(d,0);c=F(d);if(!a.j)return d["return"]();c.severity=1;a.j.onError(c);a.F.T(.1);z(d)})}
717
+ function Hq(a,b){a.m=b;a.i&&a.i.Uc(a.m==Aq);a.m!=Aq||a.F.stop()}function mr(a,b,c){if(!a.G)throw new O(2,7,7001);b=a.j.networkingEngine.request(c,b);hf(a.G,b);return b.promise}J("shaka.hls.HlsParser",yq);
718
+ var lr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"},
719
+ image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},er={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new O(2,4,4040);return Eb("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=fq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=fq(a,"URI");b=xq(b);b=Gc(b.data);b=Eb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);
720
+ if(a=U(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=fq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=fq(a,"URI");a=xq(a);a=Gc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Rn(a,b,new Set,0);return Eb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Aq="VOD",gr="EVENT",fr="LIVE",Eq={Sf:Aq,Nh:gr,Xe:fr};
721
+ Vc("Tizen 3")||Vc("Tizen 2")||Xc()||(vg.m3u8=function(){return new yq},tg["application/x-mpegurl"]=function(){return new yq},tg["application/vnd.apple.mpegurl"]=function(){return new yq});function nr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Bf:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=hd(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function or(){}function pr(a,b,c,d,e){var f=new qr;Bf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new rr,h={bf:!1,Mf:!1};a=sr(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Ye(a,function(){h.bf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new P(function(){h.Mf=!0;g.abort()});k.T(b/1E3);a["finally"](function(){k.stop()})}return a}
722
+ function sr(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,w,y,x,v,D,C;return I(function(B){switch(B.g){case 1:return h=tr,k=ur,p=n=0,r=Date.now(),A(B,2),u(B,h(a,c),4);case 4:return l=B.h,f(vr(l.headers)),w=l.clone().body.getReader(),x=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,v=function(G){function E(){var H,N;return I(function(K){switch(K.g){case 1:return A(K,2),u(K,w.read(),4);case 4:H=K.h;va(K,3);break;case 2:return F(K),K["return"]();case 3:if(H.done){K.D(5);break}n+=H.value.byteLength;if(!g){K.D(5);
723
+ break}return u(K,g(H.value),5);case 5:N=Date.now();if(100<N-r||H.done)e(N-r,n-p,x-n),p=n,r=N;H.done?G.close():(G.enqueue(H.value),E());z(K)}})}E()},new k({start:v}),u(B,l.arrayBuffer(),5);case 5:m=B.h;va(B,3);break;case 2:D=F(B);if(d.bf)throw new O(1,1,7001,a,b);if(d.Mf)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,D,b);case 3:return C=vr(l.headers),B["return"](nr(C,m,l.status,a,l.url,b))}})}function vr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
724
+ function wr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}J("shaka.net.HttpFetchPlugin",or);or.isSupported=wr;or.parse=pr;var tr=window.fetch,rr=window.AbortController,ur=window.ReadableStream,qr=window.Headers;wr()&&(kf("http",pr,2,!0),kf("https",pr,2,!0),kf("blob",pr,2,!0));function xr(){}
725
+ function yr(a,b,c,d,e){var f=new zr,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new O(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var r=Ar(f);e(r);n=!0}};f.onload=function(){var r=Ar(f),w=f.response;try{var y=nr(r,w,f.status,a,f.responseURL,c);l(y)}catch(x){m(x)}};f.onerror=function(r){m(new O(1,1,1002,a,r,
726
+ c))};f.ontimeout=function(){m(new O(1,1,1003,a,c))};f.onprogress=function(r){var w=Date.now();if(100<w-g||r.lengthComputable&&r.loaded==r.total)d(w-g,r.loaded-h,r.total-r.loaded),h=r.loaded,g=w};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Ye(k,function(){f.abort();return Promise.resolve()})}
727
+ function Ar(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}J("shaka.net.HttpXHRPlugin",xr);xr.parse=yr;var zr=window.XMLHttpRequest;kf("http",yr,1,!0);kf("https",yr,1,!0);kf("blob",yr,1,!0);function Br(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Cr(a){return a.Pa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ta+":"+a.Ca}function Dr(a,b){return rj(a.g.Pa(),a.g.Ta,a.g.Ca,b.streaming.retryParameters)};function Er(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Fr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Er.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 Gr(a){var b=this;this.A=a;this.j=new Map;this.i=new uf(function(){return Hr(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Er}Gr.prototype.destroy=function(){return this.i.destroy()};function Ir(a,b,c){a.m=b;a.l=c}function Hr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
728
+ function Jr(a,b,c,d,e,f){vf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return I(function(w){if(1==w.g)return u(w,Kr(a,c),2);h=w.h;if(a.i.g)throw new O(2,9,7001);if(e)for(m in k=Gc(h),l=new Qn(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.l(p,r);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return w["return"](f(h))})});a.j.set(b,g)}function Lr(a){return I(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
729
+ function Kr(a,b){var c,d,e,f;return I(function(g){if(1==g.g)return c=tf,d=a.A.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;dc(a.h,e);return g["return"](f.data)})};function Mr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Nc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Mr.prototype.abort=function(){var a=this;return I(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);F(b);z(b)})};
730
+ function Nr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return I(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)})}})}Mr.prototype.store=function(){return this.h};Mr.prototype.promise=function(){return this.g};function Or(a){this.h=a;this.g=[]}Or.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Pr(a,b){return Qr(a,b,"readwrite")}function Qr(a,b,c){c=a.h.transaction([b],c);var d=new Mr(c,b);a.g.push(d);d.promise().then(function(){dc(a.g,d)},function(){dc(a.g,d)});return d};function Rr(a,b,c){this.h=new Or(a);this.i=b;this.g=c}q=Rr.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Sr(this.i)};q.removeSegments=function(a,b){return Tr(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return I(function(d){if(1==d.g)return u(d,Ur(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.ef(e)}))})};q.addManifests=function(){return Sr(this.g)};
731
+ q.updateManifest=function(){return Promise.reject(new O(2,9,9016,"Cannot modify values in "+this.g))};function Vr(a,b,c){a=Pr(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=Pr(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return Tr(this,this.g,a,b)};
732
+ q.getManifests=function(a){var b=this,c;return I(function(d){if(1==d.g)return u(d,Ur(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Ac(e)})))})};q.getAllManifests=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=Qr(a.h,a.g,"readonly"),c=new Map,u(d,Nr(b,function(e,f){var g;return I(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.ef=function(a){return a};q.Ac=function(a){return Promise.resolve(a)};
733
+ function Sr(a){return Promise.reject(new O(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){if(1==m.g){d=Pr(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={Zc:g.Zc},k=h.next())l=k.value,g.Zc=e.add(l),g.Zc.onsuccess=function(n){return function(){f.push(n.Zc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
734
+ function Tr(a,b,c,d){a=Pr(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Yc:e.Yc},f=c.next())e.Yc=f.value,b["delete"](e.Yc).onsuccess=function(g){return function(){return d(g.Yc)}}(e);return a.promise()}
735
+ function Ur(a,b,c){var d,e,f,g,h,k,l;return I(function(m){if(1==m.g){d=Qr(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={wc:h.wc,tc:h.tc},l=k.next())h.tc=l.value,h.wc=e.get(h.tc),h.wc.onsuccess=function(n){return function(){void 0==n.wc.result&&g.push(n.tc);f[n.tc]=n.wc.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 Wr(a){this.g=new Or(a)}Wr.prototype.destroy=function(){return this.g.destroy()};Wr.prototype.getAll=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=Qr(a.g,"session-ids","readonly"),c=[],u(d,Nr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};Wr.prototype.add=function(a){var b=Pr(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
736
+ Wr.prototype.remove=function(a){var b=this,c;return I(function(d){return 1==d.g?(c=Pr(b.g,"session-ids"),u(d,Nr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function Xr(){this.g=new Map}Xr.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Xr.prototype.init=function(){var a=this;Yr.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
737
+ function Zr(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Sa:d,Ba:f},Ba:e})})});if(b)return b;throw new O(2,9,9013,"Could not find a cell that supports add-operations");}function $r(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Sa:d,Ba:f},e)})})}
738
+ function as(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 bs(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function cs(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()}
739
+ function ds(a){var b,c,d;return I(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Yr,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function es(a,b){Yr.set(a,b)}J("shaka.offline.StorageMuxer",Xr);Xr.unregister=function(a){Yr["delete"](a)};Xr.register=es;Xr.prototype.destroy=Xr.prototype.destroy;var Yr=new Map;function fs(){Rr.apply(this,arguments)}qa(fs,Rr);fs.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return I(function(g){d=Pr(c.h,c.g);e=d.store();f=new Nc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new O(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
740
+ fs.prototype.Ac=function(a){var b,c,d,e,f,g;return I(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=gs(a.periods[c],e),b.push(f);return u(h,qp(b),2)}g=h.h;return h["return"]({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
741
+ function gs(a,b){hs(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return is(e,a.startTime,b)})}
742
+ function is(a,b,c){var d=a.initSegmentUri?js(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=js(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
743
+ 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}}fs.prototype.ef=function(a){return{data:a.data}};function js(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);}
744
+ function hs(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
745
+ f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function ks(){Rr.apply(this,arguments)}qa(ks,Rr);
746
+ ks.prototype.Ac=function(a){var b,c,d,e,f,g;return I(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(ls(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,qp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
744
747
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
745
- function Is(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,
746
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Js(){ns.apply(this,arguments)}qa(Js,ns);q=Js.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return rs(this,a,b)};q.Ac=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Ks(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Ks.prototype;
747
- q.init=function(){var a=this,b=new Mc,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 Cs(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Hs(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Hs(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
748
- e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Js(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new ss(d):null;a.m=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};
748
+ function ls(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,
749
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function ms(){Rr.apply(this,arguments)}qa(ms,Rr);q=ms.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return Vr(this,a,b)};q.Ac=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function ns(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=ns.prototype;
750
+ q.init=function(){var a=this,b=new Nc,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new fs(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new ks(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new ks(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
751
+ e=e.contains("manifest-v5")&&e.contains("segment-v5")?new ms(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new Wr(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=t(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new O(2,9,9001,c.error));d.preventDefault()};return b};
749
752
  q.destroy=function(){var a=this;return I(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
750
753
  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.m};
751
- q.erase=function(){var a=this;return I(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,Ls(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
752
- function Ls(){var a=new Mc,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}Bs("idb",function(){return Xc()||Tc()||!window.indexedDB?null:new Ks});function Ms(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Ms.prototype.Ra=function(){return this.i};Ms.prototype.Ba=function(){return this.h};Ms.prototype.key=function(){return this.l};Ms.prototype.toString=function(){return this.j};
753
- function Ns(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 Ms(b,c,d,Number(a[4])):null};function Os(a,b){this.h=a;this.g=b}
754
- function Ps(a,b){var c=new Q(null,0);c.bb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Qs(a,d,e,c);e=b.streams.filter(function(l){return l.type==Hb}).map(function(l){return Rs(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Rs(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=
754
+ q.erase=function(){var a=this;return I(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,os(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
755
+ function os(){var a=new Nc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new O(2,9,9001,b.error));c.preventDefault()};return a}es("idb",function(){return Yc()||Uc()||!window.indexedDB?null:new ns});function ps(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}ps.prototype.Sa=function(){return this.i};ps.prototype.Ba=function(){return this.h};ps.prototype.key=function(){return this.l};ps.prototype.toString=function(){return this.j};
756
+ function qs(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 ps(b,c,d,Number(a[4])):null};function rs(a,b){this.h=a;this.g=b}
757
+ function ss(a,b){var c=new Q(null,0);c.bb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=ts(a,d,e,c);e=b.streams.filter(function(l){return l.type==Ib}).map(function(l){return us(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return us(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
755
758
  g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1}}
756
- function Qs(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=
757
- e.value,g=Rs(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=Rs(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}
758
- function Rs(a,b,c){var d=b.segments.map(function(e){return Ss(a,e)});c.ic(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Yi(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,
759
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Ss(a,b){var c=new Ms("segment",a.h,a.g,b.dataKey);return new Wh(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Ts(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
760
- function Ts(a,b){var c=new Ms("segment",a.h,a.g,b);return new Uh(function(){return[c.toString()]},0,null)};function Us(){this.g=null}q=Us.prototype;q.configure=function(){};
761
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:d=Ns(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new ts;ua(m);return u(m,e.init(),4);case 4:return u(m,xs(e,d.Ra(),d.Ba()),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 Os(d.Ra(),d.Ba()),l=Ps(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()};
762
- q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:return d=c.g,e=new ts,B(m,2,3),u(m,e.init(),5);case 5:return u(m,xs(e,d.Ra(),d.Ba()),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.D(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:F(m),m.D(3)}})};
763
- rg["application/x-offline-manifest"]=function(){return new Us};function Vs(){}function Ws(a){var b=Ns(a);b&&"manifest"==b.g?(a={uri:a,wf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ze(a)):a=b&&"segment"==b.g?Xs(b.key(),b):Xe(new O(2,1,9004,a));return a}
764
- function Xs(a,b){var c=new ts;return Ze(void 0).na(function(){return c.init()}).na(function(){return xs(c,b.Ra(),b.Ba())}).na(function(d){return d.getSegments([b.key()])}).na(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}J("shaka.offline.OfflineScheme",Vs);Vs.plugin=Ws;hf("offline",Ws);function Ys(a,b,c){var d,e,f,g,h,k;return I(function(l){switch(l.g){case 1:d=[];for(var m=[],p=r(c),n=p.next();!n.done;n=p.next()){n=n.value;for(var t=!1,v=r(m),y=v.next();!y.done;y=v.next())if(y=y.value,Zs(y.info,n)){y.sessionIds.push(n.sessionId);t=!0;break}t||m.push({info:n,sessionIds:[n.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=$s(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l["return"](d)}})}
765
- function $s(a,b,c){var d,e;return I(function(f){switch(f.g){case 1:return d=new Cf({Ob:b,onError:function(){},ud:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),B(f,2),d.configure(a),u(f,Kf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return F(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return B(f,6),u(f,Vf(d),8);case 8:va(f,7);break;case 6:return F(f),u(f,d.destroy(),
766
- 9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return I(function(h){if(1==h.g)return B(h,2),u(h,Wf(d,g),4);if(2!=h.g)return e.push(g),va(h,0);F(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
767
- function Zs(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&dc(a.audioCapabilities,b.audioCapabilities,c)&&dc(a.videoCapabilities,b.videoCapabilities,c)};function at(a,b,c){var d=b.presentationTimeline.getDuration();b=bt(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function ct(a,b){var c=Ps(new Os(a.Ra(),a.Ba()),b),d=b.appMetadata||{};c=bt(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
768
- function bt(a){var b=[],c=ye(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(pe(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(qe(c.value));return b};function dt(){this.g={}}function et(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function ft(a,b){a.g[b.id]=b.bandwidth||2048}function gt(a,b){var c=a.g[b];null==c&&(c=0);return c};function ht(a){var b=this;if(a&&a.constructor!=S)throw new O(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Ec()):(this.h=Nk(),this.g=new gf);this.i=[];this.j=[];var c=!a;this.l=new sf(function(){var d,e,f,g,h;return I(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return ds(l)})),2);case 2:d=function(){};e=[];f=r(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return u(k,b.g.destroy(),4);
769
- case 4:b.h=null,b.g=null,z(k)}})})}function it(){if(Pc())a:{var a=r(us.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=ht.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Kk(a,b));return Pk(this.h,a)};q.getConfiguration=function(){var a=Nk();Pk(a,this.h,Nk());return a};q.Ec=function(){return this.g};
770
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new cs(this.g);this.j.push(f);b=jt(this,a,b||{},function(){var g;return I(function(h){if(1==h.g)return u(h,qg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h["return"](g())})},e,f);b=new We(b,function(){return ds(f)});b["finally"](function(){cc(d.j,f)});return kt(this,b)};
771
- function jt(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,x,w,D,C;return I(function(A){switch(A.g){case 1:return lt(),h=g=null,k=new ts,p=m=l=null,B(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,mt(a,b,g,e),6);case 6:n=A.h;nt(a);t=!n.presentationTimeline.T()&&!n.presentationTimeline.Lb();if(!t)throw new O(2,9,9005,b);return u(A,ot(a,n,function(G){p=p||G},e),7);case 7:h=A.h;nt(a);if(p)throw p;return u(A,pt(n,e),8);case 8:return u(A,k.init(),9);case 9:return nt(a),u(A,vs(k),10);case 10:return l=A.h,nt(a),v=qt(h,
772
- n,b,c,e,f),y=v.Jg,x=v.Je,u(A,l.Ba.addManifests([y]),11);case 11:w=A.h;nt(a);m=w[0];nt(a);if(p)throw p;return u(A,rt(a,x,m,y,f,e,l.Ba,n,h),12);case 12:return nt(a),D=new Ms("manifest",l.path.Ra,l.path.Ba,m),A["return"](ct(D,y));case 3:return wa(A),u(A,k.destroy(),13);case 13:if(!g){A.D(14);break}return u(A,g.stop(),14);case 14:if(!h){A.D(16);break}return u(A,h.destroy(),16);case 16:ya(A,0);break;case 2:C=F(A);if(null==m){A.D(18);break}return u(A,st(m),18);case 18:throw p||C;}})}
773
- function rt(a,b,c,d,e,f,g,h,k){var l,m,p,n,t,v,y,x,w,D;return I(function(C){switch(C.g){case 1:l={};m=0;p=function(A,G){var E,H,N,K,M,V,Y;return I(function(ha){if(1==ha.g){E={};H=r(A);for(N=H.next();!N.done;E={Eb:E.Eb},N=H.next())E.Eb=N.value,K=$r(E.Eb,f),M=E.Eb.i,V=E.Eb.h,Y=function(ja){return function(xa){var La,Fa,Sa;return I(function(Ga){if(1==Ga.g)return u(Ga,g.addSegments([{data:xa}]),2);La=Ga.h;nt(a);Fa=ja.Eb.g;Sa=Zr(Fa);l[Sa]=La[0];m+=xa.byteLength;z(Ga)})}}(E),fs(e,E.Eb.groupId,K,M,V,Y);
774
- return u(ha,hs(e),2)}if(!G)return ha.D(0);nt(a);tt(h,d,k,f);return u(ha,g.updateManifest(c,d),0)})};n=!1;B(C,2);if(!ut(h)||!n||vt(h)){C.D(4);break}return u(C,p(b.filter(function(A){return A.h}),!0),5);case 5:return nt(a),b=b.filter(function(A){return!A.h}),t=l,v=m,l={},m=0,u(C,wt(g,c,d,t,v,function(){return nt(a)}),6);case 6:nt(a);case 4:if(n){C.D(7);break}return u(C,p(b,!1),8);case 8:return nt(a),y=l,x=m,l={},m=0,u(C,wt(g,c,d,y,x,function(){return nt(a)}),9);case 9:nt(a);case 7:va(C,0);break;case 2:return w=
775
- F(C),D=Object.values(l),u(C,g.removeSegments(D,function(){}),10);case 10:throw w;}})}function st(a){var b,c,d,e;return I(function(f){switch(f.g){case 1:return b=new ts,u(f,b.init(),2);case 2:return u(f,vs(b),3);case 3:return c=f.h,d=new Ms("manifest",c.path.Ra,c.path.Ba,a),u(f,b.destroy(),4);case 4:return e=new ht,u(f,e.remove(d.toString()),0)}})}
776
- function wt(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,x;return I(function(w){switch(w.g){case 1:g=!1;B(w,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,p=r(m.segments),n=p.next();!n.done;n=p.next())t=n.value,v=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=v&&(t.dataKey=v,t.pendingSegmentRefId=void 0),v=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=v&&(t.initSegmentKey=v,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
777
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return y=F(w),u(w,st(b),5);case 5:if(g){w.D(6);break}x=Object.values(d);return u(w,a.removeSegments(x,function(){}),6);case 6:throw y;}})}
778
- function pt(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,x,w,D,C,A,G,E,H,N,K,M,V,Y,ha,ja;return I(function(xa){switch(xa.g){case 1:return c={width:Infinity,height:Infinity},$d(a,b.restrictions,c),u(xa,ce(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Od(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(pe(m));p=r(a.textStreams);for(n=p.next();!n.done;n=p.next())t=
779
- n.value,d.push(qe(t));v=r(a.imageStreams);for(y=v.next();!y.done;y=v.next())x=y.value,d.push(re(x));return u(xa,b.offline.trackSelectionCallback(d),3);case 3:w=xa.h;D=a.presentationTimeline.getDuration();C=0;A=r(w);for(G=A.next();!G.done;G=A.next())E=G.value,H=E.bandwidth*D/8,C+=H;B(xa,4);return u(xa,b.offline.downloadSizeCallback(C),6);case 6:N=xa.h;if(!N)throw new O(2,9,9014);va(xa,5);break;case 4:K=F(xa);if(K instanceof O)throw K;throw new O(2,9,9015);case 5:M=new Set;V=new Set;Y=new Set;ha=r(w);
780
- for(G=ha.next();!G.done;G=ha.next())ja=G.value,"variant"==ja.type&&M.add(ja.id),"text"==ja.type&&V.add(ja.id),"image"==ja.type&&Y.add(ja.id);a.variants=a.variants.filter(function(La){return M.has(La.id)});a.textStreams=a.textStreams.filter(function(La){return V.has(La.id)});a.imageStreams=a.imageStreams.filter(function(La){return Y.has(La.id)});xt(a);z(xa)}})}
781
- function qt(a,b,c,d,e,f){var g=at(c,b,d),h=e.offline.progressCallback;es(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&Sf(a,"cenc",t)});var k=ut(b)&&!vt(b),l=null;k&&(l=yt.get(a.g.keySystem));for(var m=new dt,p=r(b.textStreams),n=p.next();!n.done;n=p.next())m.g[n.value.id]=52;p=r(b.imageStreams);for(n=p.next();!n.done;n=p.next())ft(m,n.value);n=r(b.variants);for(p=n.next();!p.done;p=n.next())et(m,p.value);m=zt(f,m,b,e);f=m.streams;m=m.Je;n=a.g;p=e.offline.usePersistentLicense;
782
- n&&p&&(n.initData=[]);return{Jg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Dc(),streams:f,sessionIds:p?$f(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},Je:m}}function ut(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
783
- function vt(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function tt(a,b,c,d){b.expiration=c.Dc();c=$f(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(ut(a)&&d.offline.usePersistentLicense&&!c.length)throw new O(2,9,9007);}q.remove=function(a){return At(this,Bt(this,a))};
784
- function Bt(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:lt();c=Ns(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new ts;ua(k);return u(k,e.init(),4);case 4:return u(k,xs(e,d.Ra(),d.Ba()),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([Ct(a,h,e),Dt(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
785
- function Et(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:xd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:xd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Ct(a,b,c){return I(function(d){return u(d,Ft(a.g,a.h.drm,c,b),0)})}
786
- function Dt(a,b,c){function d(){}var e=Gt(c);ct(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Xg=function(){return At(this,Ht(this))};
787
- function Ht(a){var b,c,d,e,f,g,h,k,l,m;return I(function(p){switch(p.g){case 1:return lt(),b=a.g,c=a.h.drm,d=new ts,e=!1,ua(p),u(p,d.init(),4);case 4:f=[],ys(d,function(n){return f.push(n)}),g=r(f),h=g.next();case 5:if(h.done){p.D(2);break}k=h.value;return u(p,k.getAll(),8);case 8:return l=p.h,u(p,Ys(c,b,l),9);case 9:return m=p.h,u(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.D(5);break;case 2:return wa(p),u(p,d.destroy(),11);case 11:ya(p,3);break;case 3:return p["return"](!e)}})}
788
- q.list=function(){return At(this,It())};function It(){var a,b,c;return I(function(d){switch(d.g){case 1:return lt(),a=[],b=new ts,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),ws(b,function(e,f){c=c.then(function(){var g;return I(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=ct(new Ms("manifest",e.Ra,e.Ba,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)}})}
789
- function mt(a,b,c,d){var e,f,g,h,k;return I(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),nt(a),u(l,c.start(b,
790
- g),2);if(3!=l.g)return h=l.h,nt(a),k=Jt(h),u(l,Promise.all(fb(k,function(m){return m.createSegmentIndex()})),3);nt(a);if(e)throw e;return l["return"](h)})}function ot(a,b,c,d){var e;return I(function(f){switch(f.g){case 1:return e=new Cf({Ob:a.g,onError:c,ud:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,Hf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Vf(e),3);case 3:return u(f,Uf(e),4);case 4:return f["return"](e)}})}
791
- function zt(a,b,c,d){var e=new Map,f=Jt(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Kt(a,b,c,h,d,e);g.set(h.id,k)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Je:Array.from(e.values())}}
792
- function Kt(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
793
- tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;Lt(d,c.presentationTimeline.mb(),function(l){var m=Zr(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=gt(b,d.id)*n;n=bs(a.g,n);f.set(m,new Yr(l,n,k,!1))}l.i&&(p=Zr(l.i),f.has(p)||(n=.5*gt(b,d.id),n=bs(a.g,n),f.set(p,new Yr(l.i,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
794
- tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Lt(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 nt(a){if(a.l.g)throw new O(2,9,7001);}function lt(){if(!it())throw new O(2,9,9E3);}function At(a,b){return I(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);cc(a.i,b);return ya(c,0)})}
795
- function kt(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){cc(a.i,c)})}function Gt(a){var b=new Set;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.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
796
- function Ft(a,b,c,d){var e,f,g;return I(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=zs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Et(d,!1),videoCapabilities:Et(d,!0)}});return u(h,Ys(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)})}
797
- function Jt(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}
798
- function xt(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",ht);ht.deleteAll=function(){var a;return I(function(b){return 1==b.g?(a=new ts,ua(b),u(b,As(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):ya(b,0)})};ht.prototype.list=ht.prototype.list;
799
- ht.prototype.removeEmeSessions=ht.prototype.Xg;ht.prototype.remove=ht.prototype.remove;ht.prototype.store=ht.prototype.store;ht.prototype.getNetworkingEngine=ht.prototype.Ec;ht.prototype.getConfiguration=ht.prototype.getConfiguration;ht.prototype.configure=ht.prototype.configure;ht.prototype.destroy=ht.prototype.destroy;ht.support=it;
800
- var yt=(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");
801
- Tm.offline=it;function Mt(){}function Nt(){for(var a=r(Ot),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Rf()}catch(c){Ta("Error installing polyfill!",c)}}}function Pt(a,b){for(var c={priority:b||0,Rf:a},d=0;d<Ot.length;d++)if(Ot[d].priority<c.priority){Ot.splice(d,0,c);return}Ot.push(c)}J("shaka.polyfill",Mt);Mt.register=Pt;Mt.installAll=Nt;var Ot=[];function Qt(){}function Rt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())St(b.value)}function St(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}Mt.Aria=Qt;Qt.install=Rt;Pt(Rt);function Tt(){}function Ut(){Vt()}Mt.EncryptionScheme=Tt;Tt.install=Ut;Pt(Ut,-2);function Wt(){}
802
- function Xt(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
803
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Yt);document.addEventListener("webkitfullscreenerror",Yt);document.addEventListener("mozfullscreenchange",Yt);document.addEventListener("mozfullscreenerror",Yt);document.addEventListener("MSFullscreenChange",Yt);document.addEventListener("MSFullscreenError",Yt)}}
804
- function Yt(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Mt.Fullscreen=Wt;Wt.install=Xt;Pt(Xt);function Zt(){}function $t(){var a=!0;if(Yc()||Uc("PlayStation 5")||Zc()||Xc())a=!1;Xc()&&Uc("Android")&&(a=!0);a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),au=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=bu)}
805
- function bu(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,x;return I(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(!Pc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return w["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=Rc(g),!h)||a.audio&&(k=a.audio.contentType,
806
- l=Rc(k),!l))return w["return"](b)}else return w["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,w["return"](Promise.resolve(b));m=a.keySystemConfiguration;p=[];n=[];m.audio&&(t={robustness:m.audio.robustness||"",contentType:a.audio.contentType},p.push(t));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},n.push(v));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
807
- p.length&&(y.audioCapabilities=p);n.length&&(y.videoCapabilities=n);B(w,3);return u(w,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=w.h;va(w,4);break;case 3:F(w);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return w["return"](b)}})}Mt.MediaCapabilities=Zt;Zt.install=$t;var au=null;Zt.originalMcap=au;Pt($t,-1);function cu(){}function du(){var a=$c();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?eu():a?12>=a?(fu(),gu()):fu():(Uc("Tizen 2")||Uc("Tizen 3")||Uc("Tizen 4"))&&hu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&iu()}
808
- function fu(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ha.apply(0,arguments));b.abort=function(){};return b}}function gu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function hu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Ad(b)[0]&&a(b)}}
809
- function eu(){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)}}
810
- function iu(){var a=MediaSource.isTypeSupported;Uc("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Mt.MediaSource=cu;cu.install=du;Pt(du);function ju(){}function ku(){screen.orientation||void 0!=window.orientation&&lu()}function lu(){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 mu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new L("change");b.dispatchEvent(c)})}Mt.Orientation=ju;
811
- ju.install=ku;function mu(){eb.call(this);this.type="";this.angle=0}qa(mu,eb);
812
- mu.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)};
813
- mu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Pt(ku);function nu(){}function ou(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=pu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=qu,window.MediaKeys=ru,window.MediaKeySystemAccess=su,window.shakaMediaKeysPolyfill=!0)}function pu(){return Promise.reject(Error("The key system specified is not supported."))}
814
- function qu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Mt.PatchedMediaKeysNop=nu;nu.install=ou;function ru(){throw new TypeError("Illegal constructor.");}ru.prototype.createSession=function(){};ru.prototype.setServerCertificate=function(){};function su(){this.keySystem="";throw new TypeError("Illegal constructor.");}su.prototype.getConfiguration=function(){};su.prototype.createMediaKeys=function(){};Pt(ou,-10);function tu(){}
815
- function uu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)vu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=wu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=xu;window.MediaKeys=yu;window.MediaKeySystemAccess=zu;window.shakaMediaKeysPolyfill=!0}}
816
- function Au(a){var b=vu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function wu(a,b){try{var c=new zu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function xu(a){var b=this.mediaKeys;b&&b!=a&&Bu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Bu(a,this);return Promise.resolve()}Mt.PatchedMediaKeysWebkit=tu;tu.install=uu;
817
- function zu(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),
818
- 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"]):
819
- 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;}zu.prototype.createMediaKeys=function(){var a=new yu(this.g);return Promise.resolve(a)};zu.prototype.getConfiguration=function(){return this.h};function yu(a){this.l=a;this.h=null;this.g=new uf;this.i=[];this.j=new Map}
820
- function Bu(a,b){a.h=b;a.g.Pc();var c=vu;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=Cu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Wd()?"licenserequest":"licenserenewal").set("message",d.message),d=new L("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=Cu(a,d.sessionId))Du(d,"usable"),
821
- d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=Cu(a,d.sessionId);e&&e.handleError(d)}))}yu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new Eu(b,this.l,a);this.i.push(a);return a};yu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
822
- function Cu(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 Eu(a,b,c){eb.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Mc;this.keyStatuses=new Fu}qa(Eu,eb);q=Eu.prototype;
823
- 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?Du(this,"output-restricted"):1==b?Du(this,"expired"):Du(this,"internal-error"))};
824
- function Gu(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Fc(hd("LOAD_SESSION|"+c));else{var e=hd("PERSISTENT|");d=qd(e,b)}else d=Fc(b)}catch(g){return Promise.reject(g)}a.h=new Mc;var f=Au("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}})).S(.01)}return a.h}
825
- function Hu(a,b,c){if(a.g)a.g.then(function(){return Hu(a,b,c)})["catch"](function(){return Hu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=dd(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=nd(e.keys[0].k);e=nd(e.keys[0].kid)}else d=Fc(c),e=null;var f=Au("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
826
- function Du(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new L("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return Gu(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Gu(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Mc;Hu(this,b,a);return b};
827
- 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=Au("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 Fu(){this.size=0;this.g=void 0}q=Fu.prototype;q.Wd=function(){return this.g};
828
- q.forEach=function(a){this.g&&a(this.g,og.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=og.value();return this.g&&Dc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var vu="";Pt(uu);function Iu(){}function Ju(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Ku,Object.defineProperty(a,"disablePictureInPicture",{get:Lu,set:Mu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Nu,document.addEventListener("webkitpresentationmodechanged",Ou,!0))}}
829
- function Ou(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)}
830
- function Ku(){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 Nu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
831
- function Lu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Mu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Mt.PiPWebkit=Iu;Iu.install=Ju;Pt(Ju);function Pu(){}function Qu(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Ru))}function Ru(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Mt.RandomUUID=Pu;Pu.install=Qu;Pt(Qu);function Su(){}function Tu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Uu)}function Uu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Mt.StorageEstimate=Su;Su.install=Tu;Pt(Tu);function Vu(){}function Wu(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Xu})}function Xu(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Mt.Symbol=Vu;Vu.install=Wu;Pt(Wu);function Yu(){}function Zu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Mt.VideoPlayPromise=Yu;Yu.install=Zu;Pt(Zu);function $u(){}function av(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Wc())&&(a.getVideoPlaybackQuality=bv)}}function bv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Mt.VideoPlaybackQuality=$u;$u.install=av;Pt(av);function cv(){}function dv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=ev;else if(6==b)a=fv;else{try{var c=!!ev(1,2,"")}catch(d){c=!1}c&&(a=ev)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function ev(a,b,c){return new window.TextTrackCue(a,b,c)}function fv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Mt.VTTCue=cv;cv.install=dv;Pt(dv);function gv(){}gv.prototype.parseInit=function(){};gv.prototype.setSequenceMode=function(){};gv.prototype.parseMedia=function(a,b){var c=null,d=[],e=dd(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=hv.exec(f))){var g=iv.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new fc(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",gv);gv.prototype.parseMedia=gv.prototype.parseMedia;
832
- gv.prototype.setSequenceMode=gv.prototype.setSequenceMode;gv.prototype.parseInit=gv.prototype.parseInit;var hv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,iv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Hd["application/x-subtitle-lrc"]=function(){return new gv};function jv(){}jv.prototype.parseInit=function(){};jv.prototype.setSequenceMode=function(){};
833
- jv.prototype.parseMedia=function(a,b){var c=dd(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(C){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=vo(g,kv,"frameRate"),k=vo(g,kv,"subFrameRate"),l=vo(g,kv,"frameRateMultiplier"),
834
- m=vo(g,kv,"tickRate"),p=vo(g,kv,"cellResolution");c=g.getAttribute("xml:space")||"default";e=vo(g,lv,"extent");if("default"!=c&&"preserve"!=c)throw new O(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new mv(h,k,l,m);p=p?(p=/^(\d+) (\d+)$/.exec(p))?{columns:parseInt(p[1],10),rows:parseInt(p[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?to(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var n=r(g),t=n.next();!t.done;t=
835
- n.next()){var v=t.value;t=new hc;var y=v.getAttribute("xml:id");if(y){t.id=y;var x=null;e&&(x=nv.exec(e)||ov.exec(e));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,D;if(w=pv(v,l,"extent"))w=(D=nv.exec(w))||ov.exec(w),null!=w&&(t.width=Number(w[1]),t.height=Number(w[2]),D||(null!=y&&(t.width=100*t.width/y),null!=x&&(t.height=100*t.height/x)),t.widthUnits=D||null!=y?Ac:0,t.heightUnits=D||null!=x?Ac:0);if(v=pv(v,l,"origin"))w=(D=nv.exec(v))||ov.exec(v),null!=w&&(t.viewportAnchorX=Number(w[1]),t.viewportAnchorY=
836
- Number(w[2]),D||(null!=x&&(t.viewportAnchorY=100*t.viewportAnchorY/x),null!=y&&(t.viewportAnchorX=100*t.viewportAnchorX/y)),t.viewportAnchorUnits=D||null!=y?Ac:0)}else t=null;t&&m.push(t)}if(qo(f,"p").length)throw new O(2,2,2001,"<p> can only be inside <div> in TTML");e=r(qo(f,"div"));for(n=e.next();!n.done;n=e.next())if(qo(n.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");(f=qv(f,b.periodStart,h,k,l,g,m,c,p,null,!1))&&d.push(f)}return d};
837
- function qv(a,b,c,d,e,f,g,h,k,l,m){var p=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var n=document.createElement("span");n.textContent=a.textContent}else n=a;for(var t=null,v=r(rv),y=v.next();!y.done&&!(t=sv(n,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||t)m=!0;h="default"==(n.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(n.childNodes).every(function(A){return A.nodeType==Node.TEXT_NODE});
838
- a=[];if(!y)for(var x=r(n.childNodes),w=x.next();!w.done;w=x.next())(w=qv(w.value,b,c,d,e,f,g,h,k,n,m))&&a.push(w);d=null!=l;x=/\S/.test(n.textContent);var D=n.hasAttribute("begin")||n.hasAttribute("end")||n.hasAttribute("dur");if(!(D||x||"br"==n.tagName||0!=a.length||d&&!h))return null;w=tv(n,c);x=w.start;for(w=w.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)w=uv(p,c,x,w),x=w.start,w=w.end,p=p.parentNode;null==x&&(x=0);x+=b;w=null==w?Infinity:w+b;if(!D&&0<a.length)for(x=Infinity,w=0,b=r(a),
839
- c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),w=Math.max(w,c.endTime);if("br"==n.tagName)return e=new fc(x,w,""),e.lineBreak=!0,e;b="";y&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new fc(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=sv(n,"region",f,"")[0];if(n.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var C=k.getAttribute("xml:id");b.region=g.filter(function(A){return A.id==C})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&
840
- (g=sv(l,"region",f,"")[0]);vv(b,n,g,t,e,v,0==a.length);return b}
841
- function vv(a,b,c,d,e,f,g){f=f||g;"rtl"==wv(b,c,e,"direction",f)&&(a.direction="rtl");g=wv(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=gc);(g=wv(b,c,e,"textAlign",!0))?(a.positionAlign=xv[g],a.lineAlign=yv[g],a.textAlign=uc[g.toUpperCase()]):a.textAlign=jc;if(g=wv(b,c,e,"displayAlign",!0))a.displayAlign=vc[g.toUpperCase()];if(g=wv(b,c,e,"color",f))a.color=g;if(g=wv(b,c,e,"backgroundColor",
842
- f))a.backgroundColor=g;if(g=wv(b,c,e,"border",f))a.border=g;if(g=wv(b,c,e,"fontFamily",f))a.fontFamily=g;(g=wv(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=wv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=wv(b,c,e,"lineHeight",f))&&g.match(zv)&&(a.lineHeight=g);(g=wv(b,c,e,"fontSize",f))&&(g.match(zv)||g.match(Av))&&(a.fontSize=g);if(g=wv(b,c,e,"fontStyle",f))a.fontStyle=zc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
843
- d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=wv(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(zv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(zv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=wv(b,c,e,"letterSpacing",f))&&d.match(zv)&&(a.letterSpacing=d);(d=wv(b,c,e,"linePadding",f))&&d.match(zv)&&(a.linePadding=d);if(f=wv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=pv(c,e,"textDecoration"))&&Bv(a,c);(b=
844
- Cv(b,e,"textDecoration"))&&Bv(a,b)}
845
- function Bv(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")&&cc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&cc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
846
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&cc(a.textDecoration,"overline")}}function wv(a,b,c,d,e){e=void 0===e?!0:e;return(a=Cv(a,c,d))?a:e?pv(b,c,d):null}function pv(a,b,c){if(!a)return null;var d=vo(a,lv,c);return d?d:Dv(a,b,c)}function Cv(a,b,c){var d=vo(a,lv,c);return d?d:Dv(a,b,c)}
847
- function Dv(a,b,c){a=sv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=uo(a[e],"urn:ebu:tt:style",c);f||(f=vo(a[e],lv,c));f||(f=Cv(a[e],b,c));f&&(d=f)}return d}
848
- function sv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?uo(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 uv(a,b,c,d){a=tv(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}}
849
- function tv(a,b){var c=Ev(a.getAttribute("begin"),b),d=Ev(a.getAttribute("end"),b),e=Ev(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
850
- function Ev(a,b){var c=null;if(Fv.test(a)){c=Fv.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(Gv.test(a))c=Hv(Gv,a);else if(Iv.test(a))c=Hv(Iv,a);else if(Jv.test(a))c=Jv.exec(a),c=Number(c[1])/b.frameRate;else if(Kv.test(a))c=Kv.exec(a),c=Number(c[1])/b.g;else if(Lv.test(a))c=Hv(Lv,a);else if(a)throw new O(2,2,2001,"Could not parse cue time range in TTML");return c}
851
- function Hv(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",jv);jv.prototype.parseMedia=jv.prototype.parseMedia;jv.prototype.setSequenceMode=jv.prototype.setSequenceMode;jv.prototype.parseInit=jv.prototype.parseInit;
852
- function mv(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]))}
853
- var nv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Av=/^(\d{1,2}(?:\.\d+)?|100)%$/,zv=/^(\d+px|\d+em|\d*\.?\d+c)$/,ov=/^(\d+)px (\d+)px$/,Fv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Gv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Iv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Jv=/^(\d*(?:\.\d*)?)f$/,Kv=/^(\d*(?:\.\d*)?)t$/,Lv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),yv={left:mc,center:"center",right:"end",start:mc,
854
- end:"end"},xv={left:"line-left",center:"center",right:"line-right"},kv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],lv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],rv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Hd["application/ttml+xml"]=function(){return new jv};function Mv(){this.g=new jv}Mv.prototype.parseInit=function(a){var b=!1;(new yg).box("moov",Cg).box("trak",Cg).box("mdia",Cg).box("minf",Cg).box("stbl",Cg).Y("stsd",Eg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};Mv.prototype.setSequenceMode=function(){};Mv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new yg).box("mdat",Fg(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new O(2,2,2007);return e};
855
- J("shaka.text.Mp4TtmlParser",Mv);Mv.prototype.parseMedia=Mv.prototype.parseMedia;Mv.prototype.setSequenceMode=Mv.prototype.setSequenceMode;Mv.prototype.parseInit=Mv.prototype.parseInit;Hd['application/mp4; codecs="stpp"']=function(){return new Mv};Hd['application/mp4; codecs="stpp.ttml"']=function(){return new Mv};Hd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Mv};Hd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Mv};function Nv(){this.g=!1}Nv.prototype.parseInit=function(){};Nv.prototype.setSequenceMode=function(a){this.g=a};
856
- Nv.prototype.parseMedia=function(a,b){var c=dd(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.vttOffset;if(d[0].includes("X-TIMESTAMP-MAP")&&this.g){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=Ov(new Jq(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-
857
- c}}f=[];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 Jq(g);var h=new hc;Mq(g);Kq(g);for(var k=Mq(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
858
- (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Kq(g);k=Mq(g)}f.push(h)}e=new Map;Pv(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 fc(0,0,"");for(var p=!1,n=0;n<k.length;n++){var t=
859
- /^\s*([^:]+):\s*(.*)/.exec(k[n]);if(t){var v=t[2].trim().replace(";","");switch(t[1].trim()){case "background-color":p=!0;m.backgroundColor=v;break;case "color":p=!0;m.color=v;break;case "font-family":p=!0;m.fontFamily=v;break;case "font-size":p=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(p=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":p=!0;m.fontStyle=pc;break;case "italic":p=!0;m.fontStyle="italic";break;case "oblique":p=!0,m.fontStyle="oblique"}break;case "opacity":p=
860
- !0;m.opacity=parseFloat(v);break;case "white-space":p=!0,m.wrapLine="noWrap"!=v}}}p&&e.set(l,m)}n=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new Jq(h[0]);m=Ov(k);t=Lq(k,/[ \t]+--\x3e[ \t]+/g);p=Ov(k);if(null==m||null==t||null==p)throw new O(2,2,2001,"Could not parse cue time range in WebVTT");m+=n;p+=n;n=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=p,h.payload=
861
- ""):h=new fc(m,p,"");Qv(n,h,e);Kq(k);for(m=Mq(k);m;)Rv(h,m,f),Kq(k),m=Mq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function Pv(a){for(var b=r(Object.entries(xc)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new fc(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(yc));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new fc(0,0,""),e.backgroundColor=d,a.set(c,e)}
862
- function Qv(a,b,c){0===c.size&&Pv(c);a=Sv(a);var d=Ho("<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())Tv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
863
- function Sv(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 Uv(a,b){return a&&0<a.length?a:b}
864
- function Tv(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=Uv(h.backgroundColor,e.backgroundColor),e.color=Uv(h.color,e.color),e.fontFamily=Uv(h.fontFamily,e.fontFamily),e.fontSize=Uv(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=
865
- "italic";break;case "u":e.textDecoration.push("underline")}}if(xo(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())Tv(a.value,e,c,d)}
866
- function Rv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=jc:a.textAlign=uc[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"==
867
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Vv(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=wc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=lc,a.line=Number(c[1]),c[2]&&(a.lineAlign=wc[c[2].toUpperCase()])}function Vv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
868
- function Ov(a){a=Lq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}J("shaka.text.VttTextParser",Nv);Nv.prototype.parseMedia=Nv.prototype.parseMedia;Nv.prototype.setSequenceMode=Nv.prototype.setSequenceMode;Nv.prototype.parseInit=Nv.prototype.parseInit;Hd["text/vtt"]=function(){return new Nv};Hd['text/vtt; codecs="vtt"']=function(){return new Nv};
869
- Hd['text/vtt; codecs="wvtt"']=function(){return new Nv};function Wv(){this.g=null}Wv.prototype.parseInit=function(a){var b=this,c=!1;(new yg).box("moov",Cg).box("trak",Cg).box("mdia",Cg).Y("mdhd",function(d){d=Ph(d.reader,d.version);b.g=d.timescale}).box("minf",Cg).box("stbl",Cg).Y("stsd",Eg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};Wv.prototype.setSequenceMode=function(){};
870
- Wv.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 yg).box("moof",Cg).box("traf",Cg).Y("tfdt",function(A){g=!0;c=Oh(A.reader,A.version).Ue}).Y("tfhd",function(A){l=Nh(A.reader,A.flags).ef}).Y("trun",function(A){h=!0;d=Qh(A.reader,A.version,A.flags).zf}).box("mdat",Fg(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);for(var m=c,p=new vg(e,0),n=r(d),t=n.next();!t.done;t=n.next()){t=t.value;var v=t.ue||l,y=t.zd?
871
- c+t.zd:m;m=y+(v||0);var x=0;do{var w=p.R();x+=w;var D=p.R(),C=null;"vttc"==Gg(D)?8<w&&(C=p.Cb(w-8)):p.skip(w-8);v&&C&&(w=Xv(C,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(t.sampleSize&&x<t.sampleSize)}return f.filter(Bb)};function Xv(a,b,c){var d,e,f;(new yg).box("payl",Fg(function(g){d=dd(g)})).box("iden",Fg(function(g){e=dd(g)})).box("sttg",Fg(function(g){f=dd(g)})).parse(a);return d?Yv(d,e,f,b,c):null}
872
- function Yv(a,b,c,d,e){d=new fc(d,e,"");Qv(a,d,new Map);b&&(d.id=b);if(c)for(a=new Jq(c),b=Mq(a);b;)Rv(d,b,[]),Kq(a),b=Mq(a);return d}J("shaka.text.Mp4VttParser",Wv);Wv.prototype.parseMedia=Wv.prototype.parseMedia;Wv.prototype.setSequenceMode=Wv.prototype.setSequenceMode;Wv.prototype.parseInit=Wv.prototype.parseInit;Hd['application/mp4; codecs="wvtt"']=function(){return new Wv};function Zv(){}Zv.prototype.parseInit=function(){};Zv.prototype.setSequenceMode=function(){};Zv.prototype.parseMedia=function(a){var b=dd(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 Jq(c[0]),e=$v(d),f=Lq(d,/,/g);d=$v(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 fc(e,d,c.slice(1).join("\n").trim()))}return a};
873
- function $v(a){a=Lq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}J("shaka.text.SbvTextParser",Zv);Zv.prototype.parseMedia=Zv.prototype.parseMedia;Zv.prototype.setSequenceMode=Zv.prototype.setSequenceMode;Zv.prototype.parseInit=Zv.prototype.parseInit;Hd["text/x-subviewer"]=function(){return new Zv};function aw(){this.g=new Nv}aw.prototype.parseInit=function(){};aw.prototype.setSequenceMode=function(){};aw.prototype.parseMedia=function(a,b){var c=dd(a);c=bw(c);c=Fc(hd(c));return this.g.parseMedia(c,b)};function bw(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",aw);
874
- aw.srt2webvtt=bw;aw.prototype.parseMedia=aw.prototype.parseMedia;aw.prototype.setSequenceMode=aw.prototype.setSequenceMode;aw.prototype.parseInit=aw.prototype.parseInit;Hd["text/srt"]=function(){return new aw};function cw(){}cw.prototype.parseInit=function(){};cw.prototype.setSequenceMode=function(){};
875
- cw.prototype.parseMedia=function(a){var b="",c="";a=dd(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=dw.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=ew.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(fw);else if("Style"==e){e=f.split(fw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
876
- [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Sd:e.Sd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=ew.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(fw);else if("Dialogue"==f){g=g.split(fw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=gw(f.Start);var k=gw(f.End);g=new fc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Sd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Sd}}(e)))&&hw(g,f);d.push(g)}return d};
877
- function hw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=iw(c))a.color=c;if(c=b.BackColour)if(c=iw(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=nc;a.textAlign="start";break;case 2:a.displayAlign=nc;a.textAlign=jc;break;case 3:a.displayAlign=nc;a.textAlign="end";
878
- break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=jc;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=jc;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
879
- function iw(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 gw(a){a=jw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}J("shaka.text.SsaTextParser",cw);cw.prototype.parseMedia=cw.prototype.parseMedia;cw.prototype.setSequenceMode=cw.prototype.setSequenceMode;cw.prototype.parseInit=cw.prototype.parseInit;
880
- var dw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,ew=/^\s*([^:]+):\s*(.*)/,fw=/\s*,\s*/,jw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Hd["text/x-ssa"]=function(){return new cw};function kw(){}J("shaka.util.FairPlayUtils",kw);kw.commonFairPlayResponse=function(a,b){if(2===a){try{var c=dd(b.data)}catch(f){return}var d=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),d=!0);try{var e=JSON.parse(c);e.ckc&&(c=e.ckc,d=!0);e.CkcMessage&&(c=e.CkcMessage,d=!0);e.License&&(c=e.License,d=!0)}catch(f){}d&&(b.data=Gc(nd(c)))}};
881
- kw.spcFairPlayRequest=function(a,b){if(2===a){var c=Fc(b.body);c=md(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=hd("spc="+c)}};kw.initDataTransform=function(a,b,c){function d(h){Ic(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new O(2,6,6015);var e;"string"==typeof b?e=id(b,!0):e=b;a=gd(a);a=id(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f};
882
- kw.defaultGetContentId=function(a){a=gd(a);return(new kb(a)).Ya};kw.isFairPlaySupported=function(){var a;return I(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},B(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b["return"](!0);F(b);return b["return"](!1)})};/*
759
+ function ts(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
760
+ b.next())for(e=e.value,g=us(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=us(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
761
+ function us(a,b,c){var d=b.segments.map(function(e){return vs(a,e)});c.ic(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new $i(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,
762
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function vs(a,b){var c=new ps("segment",a.h,a.g,b.dataKey);return new Yh(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?ws(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
763
+ function ws(a,b){var c=new ps("segment",a.h,a.g,b);return new Wh(function(){return[c.toString()]},0,null)};function xs(){this.g=null}q=xs.prototype;q.configure=function(){};
764
+ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:d=qs(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new Xr;ua(m);return u(m,e.init(),4);case 4:return u(m,as(e,d.Sa(),d.Ba()),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 rs(d.Sa(),d.Ba()),l=ss(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()};
765
+ q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:return d=c.g,e=new Xr,A(m,2,3),u(m,e.init(),5);case 5:return u(m,as(e,d.Sa(),d.Ba()),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.D(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:F(m),m.D(3)}})};
766
+ tg["application/x-offline-manifest"]=function(){return new xs};function ys(){}function zs(a){var b=qs(a);b&&"manifest"==b.g?(a={uri:a,Bf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=af(a)):a=b&&"segment"==b.g?As(b.key(),b):Ze(new O(2,1,9004,a));return a}
767
+ function As(a,b){var c=new Xr;return af(void 0).na(function(){return c.init()}).na(function(){return as(c,b.Sa(),b.Ba())}).na(function(d){return d.getSegments([b.key()])}).na(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}J("shaka.offline.OfflineScheme",ys);ys.plugin=zs;kf("offline",zs);function Bs(a,b,c){var d,e,f,g,h,k;return I(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,w=t(m),y=w.next();!y.done;y=w.next())if(y=y.value,Cs(y.info,p)){y.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=Ds(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l["return"](d)}})}
768
+ function Ds(a,b,c){var d,e;return I(function(f){switch(f.g){case 1:return d=new Ef({Ob:b,onError:function(){},wd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),A(f,2),d.configure(a),u(f,Mf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return F(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return A(f,6),u(f,Xf(d),8);case 8:va(f,7);break;case 6:return F(f),u(f,d.destroy(),
769
+ 9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return I(function(h){if(1==h.g)return A(h,2),u(h,Yf(d,g),4);if(2!=h.g)return e.push(g),va(h,0);F(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
770
+ function Cs(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&ec(a.audioCapabilities,b.audioCapabilities,c)&&ec(a.videoCapabilities,b.videoCapabilities,c)};function Es(a,b,c){var d=b.presentationTimeline.getDuration();b=Fs(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Gs(a,b){var c=ss(new rs(a.Sa(),a.Ba()),b),d=b.appMetadata||{};c=Fs(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
771
+ function Fs(a){var b=[],c=Ae(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(re(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(se(c.value));return b};function Hs(){this.g={}}function Is(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Js(a,b){a.g[b.id]=b.bandwidth||2048}function Ks(a,b){var c=a.g[b];null==c&&(c=0);return c};function Ls(a){var b=this;if(a&&a.constructor!=S)throw new O(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Ec()):(this.h=Ok(),this.g=new jf);this.i=[];this.j=[];var c=!a;this.l=new uf(function(){var d,e,f,g,h;return I(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Hr(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return u(k,b.g.destroy(),4);
772
+ case 4:b.h=null,b.g=null,z(k)}})})}function Ms(){if(Rc())a:{var a=t(Yr.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=Ls.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Lk(a,b));return Qk(this.h,a)};q.getConfiguration=function(){var a=Ok();Qk(a,this.h,Ok());return a};q.Ec=function(){return this.g};
773
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Gr(this.g);this.j.push(f);b=Ns(this,a,b||{},function(){var g;return I(function(h){if(1==h.g)return u(h,sg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h["return"](g())})},e,f);b=new Ye(b,function(){return Hr(f)});b["finally"](function(){dc(d.j,f)});return Os(this,b)};
774
+ function Ns(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,w,y,x,v,D,C;return I(function(B){switch(B.g){case 1:return Ps(),h=g=null,k=new Xr,n=m=l=null,A(B,2,3),u(B,d(),5);case 5:return g=B.h,u(B,Qs(a,b,g,e),6);case 6:p=B.h;Rs(a);r=!p.presentationTimeline.U()&&!p.presentationTimeline.Lb();if(!r)throw new O(2,9,9005,b);return u(B,Ss(a,p,function(G){n=n||G},e),7);case 7:h=B.h;Rs(a);if(n)throw n;return u(B,Ts(p,e),8);case 8:return u(B,k.init(),9);case 9:return Rs(a),u(B,Zr(k),10);case 10:return l=B.h,Rs(a),w=Us(h,
775
+ p,b,c,e,f),y=w.Pg,x=w.Le,u(B,l.Ba.addManifests([y]),11);case 11:v=B.h;Rs(a);m=v[0];Rs(a);if(n)throw n;return u(B,Vs(a,x,m,y,f,e,l.Ba,p,h),12);case 12:return Rs(a),D=new ps("manifest",l.path.Sa,l.path.Ba,m),B["return"](Gs(D,y));case 3:return wa(B),u(B,k.destroy(),13);case 13:if(!g){B.D(14);break}return u(B,g.stop(),14);case 14:if(!h){B.D(16);break}return u(B,h.destroy(),16);case 16:ya(B,0);break;case 2:C=F(B);if(null==m){B.D(18);break}return u(B,Ws(m),18);case 18:throw n||C;}})}
776
+ function Vs(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,w,y,x,v,D;return I(function(C){switch(C.g){case 1:l={};m=0;n=function(B,G){var E,H,N,K,M,V,Z;return I(function(ha){if(1==ha.g){E={};H=t(B);for(N=H.next();!N.done;E={Eb:E.Eb},N=H.next())E.Eb=N.value,K=Dr(E.Eb,f),M=E.Eb.i,V=E.Eb.h,Z=function(ja){return function(xa){var La,Fa,Sa;return I(function(Ga){if(1==Ga.g)return u(Ga,g.addSegments([{data:xa}]),2);La=Ga.h;Rs(a);Fa=ja.Eb.g;Sa=Cr(Fa);l[Sa]=La[0];m+=xa.byteLength;z(Ga)})}}(E),Jr(e,E.Eb.groupId,K,M,V,Z);
777
+ return u(ha,Lr(e),2)}if(!G)return ha.D(0);Rs(a);Xs(h,d,k,f);return u(ha,g.updateManifest(c,d),0)})};p=!1;A(C,2);if(!Ys(h)||!p||Zs(h)){C.D(4);break}return u(C,n(b.filter(function(B){return B.h}),!0),5);case 5:return Rs(a),b=b.filter(function(B){return!B.h}),r=l,w=m,l={},m=0,u(C,$s(g,c,d,r,w,function(){return Rs(a)}),6);case 6:Rs(a);case 4:if(p){C.D(7);break}return u(C,n(b,!1),8);case 8:return Rs(a),y=l,x=m,l={},m=0,u(C,$s(g,c,d,y,x,function(){return Rs(a)}),9);case 9:Rs(a);case 7:va(C,0);break;case 2:return v=
778
+ F(C),D=Object.values(l),u(C,g.removeSegments(D,function(){}),10);case 10:throw v;}})}function Ws(a){var b,c,d,e;return I(function(f){switch(f.g){case 1:return b=new Xr,u(f,b.init(),2);case 2:return u(f,Zr(b),3);case 3:return c=f.h,d=new ps("manifest",c.path.Sa,c.path.Ba,a),u(f,b.destroy(),4);case 4:return e=new Ls,u(f,e.remove(d.toString()),0)}})}
779
+ function $s(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,w,y,x;return I(function(v){switch(v.g){case 1:g=!1;A(v,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())r=p.value,w=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=w&&(r.dataKey=w,r.pendingSegmentRefId=void 0),w=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=w&&(r.initSegmentKey=w,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
780
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(v,a.updateManifest(b,c),4);case 4:g=!0;f();va(v,0);break;case 2:return y=F(v),u(v,Ws(b),5);case 5:if(g){v.D(6);break}x=Object.values(d);return u(v,a.removeSegments(x,function(){}),6);case 6:throw y;}})}
781
+ function Ts(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,w,y,x,v,D,C,B,G,E,H,N,K,M,V,Z,ha,ja;return I(function(xa){switch(xa.g){case 1:return c={width:Infinity,height:Infinity},ae(a,b.restrictions,c),u(xa,ee(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Pd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(re(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=
782
+ p.value,d.push(se(r));w=t(a.imageStreams);for(y=w.next();!y.done;y=w.next())x=y.value,d.push(te(x));return u(xa,b.offline.trackSelectionCallback(d),3);case 3:v=xa.h;D=a.presentationTimeline.getDuration();C=0;B=t(v);for(G=B.next();!G.done;G=B.next())E=G.value,H=E.bandwidth*D/8,C+=H;A(xa,4);return u(xa,b.offline.downloadSizeCallback(C),6);case 6:N=xa.h;if(!N)throw new O(2,9,9014);va(xa,5);break;case 4:K=F(xa);if(K instanceof O)throw K;throw new O(2,9,9015);case 5:M=new Set;V=new Set;Z=new Set;ha=t(v);
783
+ for(G=ha.next();!G.done;G=ha.next())ja=G.value,"variant"==ja.type&&M.add(ja.id),"text"==ja.type&&V.add(ja.id),"image"==ja.type&&Z.add(ja.id);a.variants=a.variants.filter(function(La){return M.has(La.id)});a.textStreams=a.textStreams.filter(function(La){return V.has(La.id)});a.imageStreams=a.imageStreams.filter(function(La){return Z.has(La.id)});at(a);z(xa)}})}
784
+ function Us(a,b,c,d,e,f){var g=Es(c,b,d),h=e.offline.progressCallback;Ir(f,function(r,w){g.size=w;h(g,r)},function(r,w){k&&e.offline.usePersistentLicense&&l==w&&Uf(a,"cenc",r)});var k=Ys(b)&&!Zs(b),l=null;k&&(l=bt.get(a.g.keySystem));for(var m=new Hs,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Js(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())Is(m,n.value);m=ct(f,m,b,e);f=m.streams;m=m.Le;p=a.g;n=e.offline.usePersistentLicense;
785
+ p&&n&&(p.initData=[]);return{Pg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Dc(),streams:f,sessionIds:n?bg(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},Le:m}}function Ys(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
786
+ function Zs(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Xs(a,b,c,d){b.expiration=c.Dc();c=bg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Ys(a)&&d.offline.usePersistentLicense&&!c.length)throw new O(2,9,9007);}q.remove=function(a){return dt(this,et(this,a))};
787
+ function et(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:Ps();c=qs(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new Xr;ua(k);return u(k,e.init(),4);case 4:return u(k,as(e,d.Sa(),d.Ba()),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([ft(a,h,e),gt(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
788
+ function ht(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:yd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:yd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function ft(a,b,c){return I(function(d){return u(d,it(a.g,a.h.drm,c,b),0)})}
789
+ function gt(a,b,c){function d(){}var e=jt(c);Gs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.dh=function(){return dt(this,kt(this))};
790
+ function kt(a){var b,c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:return Ps(),b=a.g,c=a.h.drm,d=new Xr,e=!1,ua(n),u(n,d.init(),4);case 4:f=[],bs(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.D(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,Bs(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.D(5);break;case 2:return wa(n),u(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n["return"](!e)}})}
791
+ q.list=function(){return dt(this,lt())};function lt(){var a,b,c;return I(function(d){switch(d.g){case 1:return Ps(),a=[],b=new Xr,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),$r(b,function(e,f){c=c.then(function(){var g;return I(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Gs(new ps("manifest",e.Sa,e.Ba,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)}})}
792
+ function Qs(a,b,c,d){var e,f,g,h,k;return I(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),Rs(a),u(l,c.start(b,
793
+ g),2);if(3!=l.g)return h=l.h,Rs(a),k=mt(h),u(l,Promise.all(gb(k,function(m){return m.createSegmentIndex()})),3);Rs(a);if(e)throw e;return l["return"](h)})}function Ss(a,b,c,d){var e;return I(function(f){switch(f.g){case 1:return e=new Ef({Ob:a.g,onError:c,wd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,Jf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Xf(e),3);case 3:return u(f,Wf(e),4);case 4:return f["return"](e)}})}
794
+ function ct(a,b,c,d){var e=new Map,f=mt(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=nt(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Le:Array.from(e.values())}}
795
+ function nt(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
796
+ tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;ot(d,c.presentationTimeline.ob(),function(l){var m=Cr(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Ks(b,d.id)*p;p=Fr(a.g,p);f.set(m,new Br(l,p,k,!1))}l.i&&(n=Cr(l.i),f.has(n)||(p=.5*Ks(b,d.id),p=Fr(a.g,p),f.set(n,new Br(l.i,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
797
+ tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function ot(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 Rs(a){if(a.l.g)throw new O(2,9,7001);}function Ps(){if(!Ms())throw new O(2,9,9E3);}function dt(a,b){return I(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);dc(a.i,b);return ya(c,0)})}
798
+ function Os(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){dc(a.i,c)})}function jt(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
799
+ function it(a,b,c,d){var e,f,g;return I(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=cs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:ht(d,!1),videoCapabilities:ht(d,!0)}});return u(h,Bs(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)})}
800
+ function mt(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
801
+ function at(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}J("shaka.offline.Storage",Ls);Ls.deleteAll=function(){var a;return I(function(b){return 1==b.g?(a=new Xr,ua(b),u(b,ds(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):ya(b,0)})};Ls.prototype.list=Ls.prototype.list;
802
+ Ls.prototype.removeEmeSessions=Ls.prototype.dh;Ls.prototype.remove=Ls.prototype.remove;Ls.prototype.store=Ls.prototype.store;Ls.prototype.getNetworkingEngine=Ls.prototype.Ec;Ls.prototype.getConfiguration=Ls.prototype.getConfiguration;Ls.prototype.configure=Ls.prototype.configure;Ls.prototype.destroy=Ls.prototype.destroy;Ls.support=Ms;
803
+ var bt=(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");
804
+ xm.offline=Ms;function pt(){}function qt(){for(var a=t(rt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Xf()}catch(c){Ua("Error installing polyfill!",c)}}}function st(a,b){for(var c={priority:b||0,Xf:a},d=0;d<rt.length;d++)if(rt[d].priority<c.priority){rt.splice(d,0,c);return}rt.push(c)}J("shaka.polyfill",pt);pt.register=st;pt.installAll=qt;var rt=[];function tt(){}function ut(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())vt(b.value)}function vt(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)}})}pt.Aria=tt;tt.install=ut;st(ut);function wt(){}function xt(){yt()}pt.EncryptionScheme=wt;wt.install=xt;st(xt,-2);function zt(){}
805
+ function At(){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}}),
806
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Bt);document.addEventListener("webkitfullscreenerror",Bt);document.addEventListener("mozfullscreenchange",Bt);document.addEventListener("mozfullscreenerror",Bt);document.addEventListener("MSFullscreenChange",Bt);document.addEventListener("MSFullscreenError",Bt)}}
807
+ function Bt(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)}pt.Fullscreen=zt;zt.install=At;st(At);function Ct(){}function Dt(){var a=!0;if(Zc()||Vc("PlayStation 5")||$c()||Yc())a=!1;Yc()&&Vc("Android")&&(a=!0);a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Et=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Ft)}
808
+ function Ft(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,w,y,x;return I(function(v){switch(v.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return v["return"](b);if("media-source"==a.type){if(!Rc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return v["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=Sc(g),!h)||a.audio&&(k=a.audio.contentType,
809
+ l=Sc(k),!l))return v["return"](b)}else return v["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,v["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(r={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(r));m.video&&(w={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(w));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
810
+ n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);A(v,3);return u(v,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=v.h;va(v,4);break;case 3:F(v);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return v["return"](b)}})}pt.MediaCapabilities=Ct;Ct.install=Dt;var Et=null;Ct.originalMcap=Et;st(Dt,-1);function Gt(){}function Ht(){var a=ad();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?It():a?12>=a?(Jt(),Kt()):Jt():(Vc("Tizen 2")||Vc("Tizen 3")||Vc("Tizen 4"))&&Lt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Mt()}
811
+ function Jt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ha.apply(0,arguments));b.abort=function(){};return b}}function Kt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Lt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Bd(b)[0]&&a(b)}}
812
+ function It(){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)}}
813
+ function Mt(){var a=MediaSource.isTypeSupported;Vc("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)})}pt.MediaSource=Gt;Gt.install=Ht;st(Ht);function Nt(){}function Ot(){screen.orientation||void 0!=window.orientation&&Pt()}function Pt(){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 Qt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new L("change");b.dispatchEvent(c)})}pt.Orientation=Nt;
814
+ Nt.install=Ot;function Qt(){fb.call(this);this.type="";this.angle=0}qa(Qt,fb);
815
+ Qt.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)};
816
+ Qt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};st(Ot);function Rt(){}function St(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Tt,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Ut,window.MediaKeys=Vt,window.MediaKeySystemAccess=Wt,window.shakaMediaKeysPolyfill=!0)}function Tt(){return Promise.reject(Error("The key system specified is not supported."))}
817
+ function Ut(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}pt.PatchedMediaKeysNop=Rt;Rt.install=St;function Vt(){throw new TypeError("Illegal constructor.");}Vt.prototype.createSession=function(){};Vt.prototype.setServerCertificate=function(){};function Wt(){this.keySystem="";throw new TypeError("Illegal constructor.");}Wt.prototype.getConfiguration=function(){};Wt.prototype.createMediaKeys=function(){};st(St,-10);function Xt(){}
818
+ function Yt(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Zt="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=$t;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=au;window.MediaKeys=bu;window.MediaKeySystemAccess=cu;window.shakaMediaKeysPolyfill=!0}}
819
+ function du(a){var b=Zt;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function $t(a,b){try{var c=new cu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function au(a){var b=this.mediaKeys;b&&b!=a&&eu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&eu(a,this);return Promise.resolve()}pt.PatchedMediaKeysWebkit=Xt;Xt.install=Yt;
820
+ function cu(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
821
+ m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=t(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
822
+ 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;}cu.prototype.createMediaKeys=function(){var a=new bu(this.g);return Promise.resolve(a)};cu.prototype.getConfiguration=function(){return this.h};function bu(a){this.l=a;this.h=null;this.g=new wf;this.i=[];this.j=new Map}
823
+ function eu(a,b){a.h=b;a.g.Qc();var c=Zt;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Hc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=fu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.nd()?"licenserequest":"licenserenewal").set("message",d.message),d=new L("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=fu(a,d.sessionId))gu(d,"usable"),
824
+ d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=fu(a,d.sessionId);e&&e.handleError(d)}))}bu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new hu(b,this.l,a);this.i.push(a);return a};bu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
825
+ function fu(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 hu(a,b,c){fb.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Nc;this.keyStatuses=new iu}qa(hu,fb);q=hu.prototype;
826
+ 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?gu(this,"output-restricted"):1==b?gu(this,"expired"):gu(this,"internal-error"))};
827
+ function ju(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Gc(id("LOAD_SESSION|"+c));else{var e=id("PERSISTENT|");d=rd(e,b)}else d=Gc(b)}catch(g){return Promise.reject(g)}a.h=new Nc;var f=du("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}
828
+ function ku(a,b,c){if(a.g)a.g.then(function(){return ku(a,b,c)})["catch"](function(){return ku(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=ed(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=od(e.keys[0].k);e=od(e.keys[0].kid)}else d=Gc(c),e=null;var f=du("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
829
+ function gu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new L("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return ju(this,b,null)};q.load=function(a){return"persistent-license"==this.l?ju(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Nc;ku(this,b,a);return b};
830
+ 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=du("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 iu(){this.size=0;this.g=void 0}q=iu.prototype;q.nd=function(){return this.g};
831
+ q.forEach=function(a){this.g&&a(this.g,qg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=qg.value();return this.g&&Ec(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Zt="";st(Yt);function lu(){}function mu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=nu,Object.defineProperty(a,"disablePictureInPicture",{get:ou,set:pu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=qu,document.addEventListener("webkitpresentationmodechanged",ru,!0))}}
832
+ function ru(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)}
833
+ function nu(){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 qu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
834
+ function ou(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function pu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}pt.PiPWebkit=lu;lu.install=mu;st(mu);function su(){}function tu(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=uu))}function uu(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}pt.RandomUUID=su;su.install=tu;st(tu);function vu(){}function wu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=xu)}function xu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}pt.StorageEstimate=vu;vu.install=wu;st(wu);function yu(){}function zu(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Au})}function Au(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}pt.Symbol=yu;yu.install=zu;st(zu);function Bu(){}function Cu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}pt.VideoPlayPromise=Bu;Bu.install=Cu;st(Cu);function Du(){}function Eu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Xc())&&(a.getVideoPlaybackQuality=Fu)}}function Fu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}pt.VideoPlaybackQuality=Du;Du.install=Eu;st(Eu);function Gu(){}function Hu(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Iu;else if(6==b)a=Ju;else{try{var c=!!Iu(1,2,"")}catch(d){c=!1}c&&(a=Iu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Iu(a,b,c){return new window.TextTrackCue(a,b,c)}function Ju(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}pt.VTTCue=Gu;Gu.install=Hu;st(Hu);function Ku(){}Ku.prototype.parseInit=function(){};Ku.prototype.setSequenceMode=function(){};Ku.prototype.parseMedia=function(a,b){var c=null,d=[],e=ed(a).split(/\r?\n/);e=t(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Lu.exec(f))){var g=Mu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new gc(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",Ku);Ku.prototype.parseMedia=Ku.prototype.parseMedia;
835
+ Ku.prototype.setSequenceMode=Ku.prototype.setSequenceMode;Ku.prototype.parseInit=Ku.prototype.parseInit;var Lu=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Mu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Id["application/x-subtitle-lrc"]=function(){return new Ku};function Nu(){}Nu.prototype.parseInit=function(){};Nu.prototype.setSequenceMode=function(){};
836
+ Nu.prototype.parseMedia=function(a,b){var c=ed(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(C){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=Yn(g,Ou,"frameRate"),k=Yn(g,Ou,"subFrameRate"),l=Yn(g,Ou,"frameRateMultiplier"),
837
+ m=Yn(g,Ou,"tickRate"),n=Yn(g,Ou,"cellResolution");c=g.getAttribute("xml:space")||"default";e=Yn(g,Pu,"extent");if("default"!=c&&"preserve"!=c)throw new O(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Qu(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])?Wn(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=t(g),r=p.next();!r.done;r=
838
+ p.next()){var w=r.value;r=new ic;var y=w.getAttribute("xml:id");if(y){r.id=y;var x=null;e&&(x=Ru.exec(e)||Su.exec(e));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var v,D;if(v=Tu(w,l,"extent"))v=(D=Ru.exec(v))||Su.exec(v),null!=v&&(r.width=Number(v[1]),r.height=Number(v[2]),D||(null!=y&&(r.width=100*r.width/y),null!=x&&(r.height=100*r.height/x)),r.widthUnits=D||null!=y?Bc:0,r.heightUnits=D||null!=x?Bc:0);if(w=Tu(w,l,"origin"))v=(D=Ru.exec(w))||Su.exec(w),null!=v&&(r.viewportAnchorX=Number(v[1]),r.viewportAnchorY=
839
+ Number(v[2]),D||(null!=x&&(r.viewportAnchorY=100*r.viewportAnchorY/x),null!=y&&(r.viewportAnchorX=100*r.viewportAnchorX/y)),r.viewportAnchorUnits=D||null!=y?Bc:0)}else r=null;r&&m.push(r)}if(Tn(f,"p").length)throw new O(2,2,2001,"<p> can only be inside <div> in TTML");e=t(Tn(f,"div"));for(p=e.next();!p.done;p=e.next())if(Tn(p.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");(f=Uu(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
840
+ function Uu(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 r=null,w=t(Vu),y=w.next();!y.done&&!(r=Wu(p,"backgroundImage",d,"#",y.value)[0]);y=w.next());w=m;if("p"==a.nodeName||r)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});
841
+ a=[];if(!y)for(var x=t(p.childNodes),v=x.next();!v.done;v=x.next())(v=Uu(v.value,b,c,d,e,f,g,h,k,p,m))&&a.push(v);d=null!=l;x=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||x||"br"==p.tagName||0!=a.length||d&&!h))return null;v=Xu(p,c);x=v.start;for(v=v.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)v=Yu(n,c,x,v),x=v.start,v=v.end,n=n.parentNode;null==x&&(x=0);x+=b;v=null==v?Infinity:v+b;if(!D&&0<a.length)for(x=Infinity,v=0,b=t(a),
842
+ c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),v=Math.max(v,c.endTime);if("br"==p.tagName)return e=new gc(x,v,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new gc(x,v,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Wu(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var C=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==C})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
843
+ (g=Wu(l,"region",f,"")[0]);Zu(b,p,g,r,e,w,0==a.length);return b}
844
+ function Zu(a,b,c,d,e,f,g){f=f||g;"rtl"==$u(b,c,e,"direction",f)&&(a.direction="rtl");g=$u(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=hc);(g=$u(b,c,e,"textAlign",!0))?(a.positionAlign=av[g],a.lineAlign=bv[g],a.textAlign=vc[g.toUpperCase()]):a.textAlign=kc;if(g=$u(b,c,e,"displayAlign",!0))a.displayAlign=wc[g.toUpperCase()];if(g=$u(b,c,e,"color",f))a.color=g;if(g=$u(b,c,e,"backgroundColor",
845
+ f))a.backgroundColor=g;if(g=$u(b,c,e,"border",f))a.border=g;if(g=$u(b,c,e,"fontFamily",f))a.fontFamily=g;(g=$u(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=$u(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=$u(b,c,e,"lineHeight",f))&&g.match(cv)&&(a.lineHeight=g);(g=$u(b,c,e,"fontSize",f))&&(g.match(cv)||g.match(dv))&&(a.fontSize=g);if(g=$u(b,c,e,"fontStyle",f))a.fontStyle=Ac[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
846
+ d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=$u(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(cv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(cv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=$u(b,c,e,"letterSpacing",f))&&d.match(cv)&&(a.letterSpacing=d);(d=$u(b,c,e,"linePadding",f))&&d.match(cv)&&(a.linePadding=d);if(f=$u(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Tu(c,e,"textDecoration"))&&ev(a,c);(b=
847
+ fv(b,e,"textDecoration"))&&ev(a,b)}
848
+ function ev(a,b){for(var c=t(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&dc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&dc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
849
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&dc(a.textDecoration,"overline")}}function $u(a,b,c,d,e){e=void 0===e?!0:e;return(a=fv(a,c,d))?a:e?Tu(b,c,d):null}function Tu(a,b,c){if(!a)return null;var d=Yn(a,Pu,c);return d?d:gv(a,b,c)}function fv(a,b,c){var d=Yn(a,Pu,c);return d?d:gv(a,b,c)}
850
+ function gv(a,b,c){a=Wu(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Xn(a[e],"urn:ebu:tt:style",c);f||(f=Yn(a[e],Pu,c));f||(f=fv(a[e],b,c));f&&(d=f)}return d}
851
+ function Wu(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Xn(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Yu(a,b,c,d){a=Xu(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}}
852
+ function Xu(a,b){var c=hv(a.getAttribute("begin"),b),d=hv(a.getAttribute("end"),b),e=hv(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
853
+ function hv(a,b){var c=null;if(iv.test(a)){c=iv.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(jv.test(a))c=kv(jv,a);else if(lv.test(a))c=kv(lv,a);else if(mv.test(a))c=mv.exec(a),c=Number(c[1])/b.frameRate;else if(nv.test(a))c=nv.exec(a),c=Number(c[1])/b.g;else if(ov.test(a))c=kv(ov,a);else if(a)throw new O(2,2,2001,"Could not parse cue time range in TTML");return c}
854
+ function kv(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",Nu);Nu.prototype.parseMedia=Nu.prototype.parseMedia;Nu.prototype.setSequenceMode=Nu.prototype.setSequenceMode;Nu.prototype.parseInit=Nu.prototype.parseInit;
855
+ function Qu(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]))}
856
+ var Ru=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,dv=/^(\d{1,2}(?:\.\d+)?|100)%$/,cv=/^(\d+px|\d+em|\d*\.?\d+c)$/,Su=/^(\d+)px (\d+)px$/,iv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,jv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,lv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,mv=/^(\d*(?:\.\d*)?)f$/,nv=/^(\d*(?:\.\d*)?)t$/,ov=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),bv={left:nc,center:"center",right:"end",start:nc,
857
+ end:"end"},av={left:"line-left",center:"center",right:"line-right"},Ou=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Pu=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Vu=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Id["application/ttml+xml"]=function(){return new Nu};function pv(){this.g=new Nu}pv.prototype.parseInit=function(a){var b=!1;(new Ag).box("moov",Eg).box("trak",Eg).box("mdia",Eg).box("minf",Eg).box("stbl",Eg).Y("stsd",Gg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};pv.prototype.setSequenceMode=function(){};pv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Ag).box("mdat",Hg(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new O(2,2,2007);return e};
858
+ J("shaka.text.Mp4TtmlParser",pv);pv.prototype.parseMedia=pv.prototype.parseMedia;pv.prototype.setSequenceMode=pv.prototype.setSequenceMode;pv.prototype.parseInit=pv.prototype.parseInit;Id['application/mp4; codecs="stpp"']=function(){return new pv};Id['application/mp4; codecs="stpp.ttml"']=function(){return new pv};Id['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new pv};Id['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new pv};function qv(){this.g=!1}qv.prototype.parseInit=function(){};qv.prototype.setSequenceMode=function(a){this.g=a};
859
+ qv.prototype.parseMedia=function(a,b){var c=ed(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.vttOffset;if(d[0].includes("X-TIMESTAMP-MAP")&&this.g){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=rv(new mq(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-
860
+ c}}f=[];e=t(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new mq(g);var h=new ic;pq(g);nq(g);for(var k=pq(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))?
861
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");nq(g);k=pq(g)}f.push(h)}e=new Map;sv(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new gc(0,0,"");for(var n=!1,p=0;p<k.length;p++){var r=
862
+ /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(r){var w=r[2].trim().replace(";","");switch(r[1].trim()){case "background-color":n=!0;m.backgroundColor=w;break;case "color":n=!0;m.color=w;break;case "font-family":n=!0;m.fontFamily=w;break;case "font-size":n=!0;m.fontSize=w;break;case "font-weight":700<=parseInt(w,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(w){case "normal":n=!0;m.fontStyle=qc;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
863
+ !0;m.opacity=parseFloat(w);break;case "text-shadow":n=!0;m.textShadow=w;break;case "white-space":n=!0,m.wrapLine="noWrap"!=w}}}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 mq(h[0]);m=rv(k);r=oq(k,/[ \t]+--\x3e[ \t]+/g);n=rv(k);if(null==m||null==r||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(),
864
+ h.startTime=m,h.endTime=n,h.payload=""):h=new gc(m,n,"");tv(p,h,e);nq(k);for(m=pq(k);m;)uv(h,m,f),nq(k),m=pq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function sv(a){for(var b=t(Object.entries(yc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new gc(0,0,"");e.color=d;a.set(c,e)}b=t(Object.entries(zc));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new gc(0,0,""),e.backgroundColor=d,a.set(c,e)}
865
+ function tv(a,b,c){0===c.size&&sv(c);a=vv(a);var d=ko("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=t(d);for(d=a.next();!d.done;d=a.next())wv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
866
+ function vv(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 xv(a,b){return a&&0<a.length?a:b}
867
+ function wv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=xv(h.backgroundColor,e.backgroundColor),e.color=xv(h.color,e.color),e.fontFamily=xv(h.fontFamily,e.fontFamily),e.fontSize=xv(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=
868
+ "italic";break;case "u":e.textDecoration.push("underline")}}if($n(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())wv(a.value,e,c,d)}
869
+ function uv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=kc:a.textAlign=vc[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"==
870
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=yv(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=xc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=mc,a.line=Number(c[1]),c[2]&&(a.lineAlign=xc[c[2].toUpperCase()])}function yv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
871
+ function rv(a){a=oq(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",qv);qv.prototype.parseMedia=qv.prototype.parseMedia;qv.prototype.setSequenceMode=qv.prototype.setSequenceMode;qv.prototype.parseInit=qv.prototype.parseInit;Id["text/vtt"]=function(){return new qv};Id['text/vtt; codecs="vtt"']=function(){return new qv};
872
+ Id['text/vtt; codecs="wvtt"']=function(){return new qv};function zv(){this.g=null}zv.prototype.parseInit=function(a){var b=this,c=!1;(new Ag).box("moov",Eg).box("trak",Eg).box("mdia",Eg).Y("mdhd",function(d){d=Rh(d.reader,d.version);b.g=d.timescale}).box("minf",Eg).box("stbl",Eg).Y("stsd",Gg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};zv.prototype.setSequenceMode=function(){};
873
+ zv.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 Ag).box("moof",Eg).box("traf",Eg).Y("tfdt",function(B){g=!0;c=Qh(B.reader,B.version).Ye}).Y("tfhd",function(B){l=Ph(B.reader,B.flags).kf}).Y("trun",function(B){h=!0;d=Sh(B.reader,B.version,B.flags).Ef}).box("mdat",Hg(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 xg(e,0),p=t(d),r=p.next();!r.done;r=p.next()){r=r.value;var w=r.we||l,y=r.Dd?
874
+ c+r.Dd:m;m=y+(w||0);var x=0;do{var v=n.R();x+=v;var D=n.R(),C=null;"vttc"==Ig(D)?8<v&&(C=n.Cb(v-8)):n.skip(v-8);w&&C&&(v=Av(C,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(v))}while(r.sampleSize&&x<r.sampleSize)}return f.filter(Cb)};function Av(a,b,c){var d,e,f;(new Ag).box("payl",Hg(function(g){d=ed(g)})).box("iden",Hg(function(g){e=ed(g)})).box("sttg",Hg(function(g){f=ed(g)})).parse(a);return d?Bv(d,e,f,b,c):null}
875
+ function Bv(a,b,c,d,e){d=new gc(d,e,"");tv(a,d,new Map);b&&(d.id=b);if(c)for(a=new mq(c),b=pq(a);b;)uv(d,b,[]),nq(a),b=pq(a);return d}J("shaka.text.Mp4VttParser",zv);zv.prototype.parseMedia=zv.prototype.parseMedia;zv.prototype.setSequenceMode=zv.prototype.setSequenceMode;zv.prototype.parseInit=zv.prototype.parseInit;Id['application/mp4; codecs="wvtt"']=function(){return new zv};function Cv(){}Cv.prototype.parseInit=function(){};Cv.prototype.setSequenceMode=function(){};Cv.prototype.parseMedia=function(a){var b=ed(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new mq(c[0]),e=Dv(d),f=oq(d,/,/g);d=Dv(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 gc(e,d,c.slice(1).join("\n").trim()))}return a};
876
+ function Dv(a){a=oq(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",Cv);Cv.prototype.parseMedia=Cv.prototype.parseMedia;Cv.prototype.setSequenceMode=Cv.prototype.setSequenceMode;Cv.prototype.parseInit=Cv.prototype.parseInit;Id["text/x-subviewer"]=function(){return new Cv};function Ev(){this.g=new qv}Ev.prototype.parseInit=function(){};Ev.prototype.setSequenceMode=function(){};Ev.prototype.parseMedia=function(a,b){var c=ed(a);c=Fv(c);c=Gc(id(c));return this.g.parseMedia(c,b)};function Fv(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}J("shaka.text.SrtTextParser",Ev);
877
+ Ev.srt2webvtt=Fv;Ev.prototype.parseMedia=Ev.prototype.parseMedia;Ev.prototype.setSequenceMode=Ev.prototype.setSequenceMode;Ev.prototype.parseInit=Ev.prototype.parseInit;Id["text/srt"]=function(){return new Ev};function Gv(){}Gv.prototype.parseInit=function(){};Gv.prototype.setSequenceMode=function(){};
878
+ Gv.prototype.parseMedia=function(a){var b="",c="";a=ed(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=Hv.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Iv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Jv);else if("Style"==e){e=f.split(Jv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
879
+ [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Vd:e.Vd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Iv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Jv);else if("Dialogue"==f){g=g.split(Jv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Kv(f.Start);var k=Kv(f.End);g=new gc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Vd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Vd}}(e)))&&Lv(g,f);d.push(g)}return d};
880
+ function Lv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Mv(c))a.color=c;if(c=b.BackColour)if(c=Mv(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=oc;a.textAlign="start";break;case 2:a.displayAlign=oc;a.textAlign=kc;break;case 3:a.displayAlign=oc;a.textAlign="end";
881
+ break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=kc;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=kc;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
882
+ function Mv(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 Kv(a){a=Nv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}J("shaka.text.SsaTextParser",Gv);Gv.prototype.parseMedia=Gv.prototype.parseMedia;Gv.prototype.setSequenceMode=Gv.prototype.setSequenceMode;Gv.prototype.parseInit=Gv.prototype.parseInit;
883
+ var Hv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Iv=/^\s*([^:]+):\s*(.*)/,Jv=/\s*,\s*/,Nv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Id["text/x-ssa"]=function(){return new Gv};function Ov(){}J("shaka.util.FairPlayUtils",Ov);Ov.commonFairPlayResponse=function(a,b){if(2===a){try{var c=ed(b.data)}catch(f){return}var d=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),d=!0);try{var e=JSON.parse(c);e.ckc&&(c=e.ckc,d=!0);e.CkcMessage&&(c=e.CkcMessage,d=!0);e.License&&(c=e.License,d=!0)}catch(f){}d&&(b.data=Hc(od(c)))}};
884
+ Ov.spcFairPlayRequest=function(a,b){if(2===a){var c=Gc(b.body);c=nd(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=id("spc="+c)}};Ov.initDataTransform=function(a,b,c){function d(h){Jc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Gc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new O(2,6,6015);var e;"string"==typeof b?e=jd(b,!0):e=b;a=hd(a);a=jd(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f};
885
+ Ov.defaultGetContentId=function(a){a=hd(a);return(new lb(a)).Za};Ov.isFairPlaySupported=function(){var a;return I(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},A(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b["return"](!0);F(b);return b["return"](!1)})};/*
883
886
  @license
884
887
  EME Encryption Scheme Polyfill
885
888
  Copyright 2019 Google LLC
886
889
  SPDX-License-Identifier: Apache-2.0
887
890
  */
888
- function lw(){}var mw;function nw(){mw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(mw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=ow):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
889
- function ow(a,b){var c=this,d;return I(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,mw.call(c,a,b),2);d=e.h;if(pw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=mw,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=qw;return e["return"](qw.call(c,
891
+ function Pv(){}var Qv;function Rv(){Qv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Qv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Sv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
892
+ function Sv(a,b){var c=this,d;return I(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Qv.call(c,a,b),2);d=e.h;if(Tv(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Qv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Uv;return e["return"](Uv.call(c,
890
893
  a,b))})}
891
- function qw(a,b){var c=this,d,e,f,g,h,k,l,m,p,n;return I(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=rw(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=sw(h.videoCapabilities,d),l=sw(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw p=Error("Unsupported keySystem or supportedConfigurations."),
892
- p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return u(t,mw.call(c,a,e),2)}n=t.h;return t["return"](new tw(n,d))})}function sw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}J("EmeEncryptionSchemePolyfill",lw);lw.install=nw;function uw(){}var vw;
893
- function ww(){vw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(vw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=xw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
894
- function xw(a){var b=this,c,d,e;return I(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,vw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&pw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=vw,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
895
- navigator.mediaCapabilities.decodingInfo=yw;if(d){f.D(3);break}e=c;return u(f,zw(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](yw.call(b,a))}})}
896
- function yw(a){var b=this,c,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=rw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):u(m,vw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
897
- new tw(k.keySystemAccess,c);m.D(3);break}if(!a.keySystemConfiguration){m.D(3);break}l=k;return u(m,zw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
898
- function zw(a){var b,c;return I(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
899
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}J("McEncryptionSchemePolyfill",uw);uw.install=ww;function tw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
900
- tw.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};tw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
901
- function rw(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 pw(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 Aw(){}
902
- function Vt(){nw();ww()}J("EncryptionSchemePolyfills",Aw);Aw.install=Vt;"undefined"!==typeof module&&module.exports&&(module.exports=Aw);/*
894
+ function Uv(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return I(function(r){if(1==r.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Vv(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Wv(h.videoCapabilities,d),l=Wv(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."),
895
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(r,Qv.call(c,a,e),2)}p=r.h;return r["return"](new Xv(p,d))})}function Wv(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}J("EmeEncryptionSchemePolyfill",Pv);Pv.install=Rv;function Yv(){}var Zv;
896
+ function $v(){Zv?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Zv=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=aw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
897
+ function aw(a){var b=this,c,d,e;return I(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,Zv.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&Tv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Zv,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
898
+ navigator.mediaCapabilities.decodingInfo=bw;if(d){f.D(3);break}e=c;return u(f,cw(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](bw.call(b,a))}})}
899
+ function bw(a){var b=this,c,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Vv(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):u(m,Zv.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
900
+ new Xv(k.keySystemAccess,c);m.D(3);break}if(!a.keySystemConfiguration){m.D(3);break}l=k;return u(m,cw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
901
+ function cw(a){var b,c;return I(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
902
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}J("McEncryptionSchemePolyfill",Yv);Yv.install=$v;function Xv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
903
+ Xv.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Xv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
904
+ function Vv(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 Tv(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(){}
905
+ function yt(){Rv();$v()}J("EncryptionSchemePolyfills",dw);dw.install=yt;"undefined"!==typeof module&&module.exports&&(module.exports=dw);/*
903
906
  @license
904
907
  Copyright 2013 Ali Al Dallal
905
908
 
@@ -923,7 +926,7 @@ function Vt(){nw();ww()}J("EncryptionSchemePolyfills",Aw);Aw.install=Vt;"undefin
923
926
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
924
927
  SOFTWARE.
925
928
  */
926
- for(var Bw={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
929
+ for(var ew={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
927
930
  "ar-SA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",u:"Arabic (Saudi Arabia)"},"ay-BO":{s:"Aymar aru",u:"Aymara"},az:{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"az-AZ":{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"be-BY":{s:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",u:"Belarusian"},bg:{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",u:"Bulgarian"},"bg-BG":{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
928
931
  u:"Bulgarian"},bn:{s:"\u09ac\u09be\u0982\u09b2\u09be",u:"Bengali"},"bn-IN":{s:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",u:"Bengali (India)"},"bn-BD":{s:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",u:"Bengali (Bangladesh)"},"bs-BA":{s:"Bosanski",u:"Bosnian"},ca:{s:"Catal\u00e0",u:"Catalan"},"ca-ES":{s:"Catal\u00e0",u:"Catalan"},cak:{s:"Maya Kaqchikel",u:"Kaqchikel"},"ck-US":{s:"\u13e3\u13b3\u13a9 (tsalagi)",u:"Cherokee"},cs:{s:"\u010ce\u0161tina",
929
932
  u:"Czech"},"cs-CZ":{s:"\u010ce\u0161tina",u:"Czech"},cy:{s:"Cymraeg",u:"Welsh"},"cy-GB":{s:"Cymraeg",u:"Welsh"},da:{s:"Dansk",u:"Danish"},"da-DK":{s:"Dansk",u:"Danish"},de:{s:"Deutsch",u:"German"},"de-AT":{s:"Deutsch (\u00d6sterreich)",u:"German (Austria)"},"de-DE":{s:"Deutsch (Deutschland)",u:"German (Germany)"},"de-CH":{s:"Deutsch (Schweiz)",u:"German (Switzerland)"},dsb:{s:"Dolnoserb\u0161\u0107ina",u:"Lower Sorbian"},el:{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",u:"Greek"},"el-GR":{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
@@ -944,55 +947,55 @@ u:"Slovak"},"sk-SK":{s:"Sloven\u010dina (Slovakia)",u:"Slovak (Slovakia)"},sl:{s
944
947
  sw:{s:"Kiswahili",u:"Swahili"},"sw-KE":{s:"Kiswahili",u:"Swahili (Kenya)"},ta:{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},"ta-IN":{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},te:{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},"te-IN":{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},tg:{s:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",u:"Tajik"},"tg-TJ":{s:"\u0442\u043e\u04b7\u0438\u043a\u04e3",u:"Tajik"},th:{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
945
948
  u:"Thai"},"th-TH":{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",u:"Thai (Thailand)"},tl:{s:"Filipino",u:"Filipino"},"tl-PH":{s:"Filipino",u:"Filipino"},tlh:{s:"tlhIngan-Hol",u:"Klingon"},tr:{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tr-TR":{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tt-RU":{s:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",u:"Tatar"},uk:{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",u:"Ukrainian"},"uk-UA":{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
946
949
  u:"Ukrainian"},ur:{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},"ur-PK":{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},uz:{s:"O'zbek",u:"Uzbek"},"uz-UZ":{s:"O'zbek",u:"Uzbek"},vi:{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"vi-VN":{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"xh-ZA":{s:"isiXhosa",u:"Xhosa"},yi:{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",u:"Yiddish"},"yi-DE":{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",u:"Yiddish (German)"},zh:{s:"\u4e2d\u6587",u:"Chinese"},"zh-HANS":{s:"\u4e2d\u6587\u7b80\u4f53",
947
- u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},Cw=r(Object.keys(Bw)),Dw=Cw.next();!Dw.done;Dw=
948
- Cw.next()){var Ew=Dw.value;Bw[Ew.toLowerCase()]=Bw[Ew]};function W(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new uf;this.localization=this.controls.za;this.player=this.controls.bc();this.video=this.controls.Bb();this.adManager=this.player.fd();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
949
- W.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",W);W.prototype.release=W.prototype.release;function Fw(a){return Gw(a,"shaka-back-to-overflow-button")}function Gw(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function Hw(a){a&&(a=Gw(a,"shaka-chosen-item"))&&a.parentElement.focus()}function Iw(){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"))}
950
- function Jw(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 Kw(a,b){W.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=Jw(e-d,!1)+" / "+Jw(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=
951
- ""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.xa();c.g.ka(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.xa(),this.g.ka(.5))}qa(Kw,W);Kw.prototype.release=function(){this.g.stop();this.g=null;W.prototype.release.call(this)};J("shaka.ui.AdCounter",Kw);function Lw(a,b){W.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.o(this.localization,"locale-updated",function(){c.ad&&Mw(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&Mw(c)});this.eventManager.o(this.adManager,"ad-started",function(){Mw(c)});this.eventManager.o(this.adManager,
952
- "ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&Mw(this)}qa(Lw,W);function Mw(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",Lw);function Nw(a,b){W.call(this,a,b);var c=this;this.button=ek();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
953
- c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?Ow(c.controls):Pw(c.controls)});this.ad&&(this.g(),this.h())}qa(Nw,W);Nw.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.B.paused&&!a.$;return a};Nw.prototype.g=function(){};Nw.prototype.h=function(){};
954
- J("shaka.ui.PlayButton",Nw);function Qw(a,b){Nw.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}qa(Qw,Nw);Qw.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};Qw.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};J("shaka.ui.BigPlayButton",Qw);function Rw(a,b){W.call(this,a,b);var c=this;this.j=this.controls.i;this.h=this.controls.g;this.i=[];this.g=R("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";X(c.g,!0)}else X(c.g,
955
- !1)});this.eventManager.o(window,"click",function(){X(c.g,!1)});Sw(this)}qa(Rw,W);Rw.prototype.release=function(){this.h=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];W.prototype.release.call(this)};function Tw(a,b){Uw.set(a,b)}function Sw(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=Uw.get(c);d?a.i.push(d.create(a.g,a.controls)):Ta("Unrecognized context menu element:",c)}}J("shaka.ui.ContextMenu",Rw);
956
- Rw.registerElement=Tw;var Uw=new Map;function Vw(a,b,c,d){W.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);
957
- this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Mb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Mb()&&(e.g=!0,Ww(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(Ww(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,Ww(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
958
- "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}qa(Vw,W);q=Vw.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);W.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.S(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
959
- 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;
960
- 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.m=this.controls.i;this.h=new P(function(){c.video.currentTime=c.getValue()});this.A=new P(function(){Yw(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Zw(c)});this.eventManager.o(this.localization,
961
- "locale-changed",function(){return Zw(c)});this.eventManager.o(this.adManager,"ad-started",function(){$w(c)||X(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){$w(c)&&X(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;ax(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];ax(c)});this.setValue(this.video.currentTime);this.update();Zw(this);this.ad&&X(this.container,!1)}qa(Xw,Vw);q=Xw.prototype;
962
- q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);Vw.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Ee(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.S(.125))};q.onChangeEnd=function(){this.h.xa();this.controls.Ee(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
963
- q.update=function(){var a=this.m.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.Ia(),g=f.end-f.start;this.setRange(f.start,f.end);$w(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.m.showUnbufferedStart?
950
+ u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},fw=t(Object.keys(ew)),gw=fw.next();!gw.done;gw=
951
+ fw.next()){var hw=gw.value;ew[hw.toLowerCase()]=ew[hw]};function W(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new wf;this.localization=this.controls.za;this.player=this.controls.bc();this.video=this.controls.Bb();this.adManager=this.player.hd();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
952
+ W.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",W);W.prototype.release=W.prototype.release;function iw(a){return jw(a,"shaka-back-to-overflow-button")}function jw(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function kw(a){a&&(a=jw(a,"shaka-chosen-item"))&&a.parentElement.focus()}function lw(){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"))}
953
+ function mw(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 nw(a,b){W.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=mw(e-d,!1)+" / "+mw(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=
954
+ ""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.xa();c.g.ka(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.xa(),this.g.ka(.5))}qa(nw,W);nw.prototype.release=function(){this.g.stop();this.g=null;W.prototype.release.call(this)};J("shaka.ui.AdCounter",nw);function ow(a,b){W.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.o(this.localization,"locale-updated",function(){c.ad&&pw(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&pw(c)});this.eventManager.o(this.adManager,"ad-started",function(){pw(c)});this.eventManager.o(this.adManager,
955
+ "ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&pw(this)}qa(ow,W);function pw(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",ow);function qw(a,b){W.call(this,a,b);var c=this;this.button=fk();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
956
+ c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?rw(c.controls):sw(c.controls)});this.ad&&(this.g(),this.h())}qa(qw,W);qw.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.B.paused&&!a.$;return a};qw.prototype.g=function(){};qw.prototype.h=function(){};
957
+ J("shaka.ui.PlayButton",qw);function tw(a,b){qw.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}qa(tw,qw);tw.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};tw.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};J("shaka.ui.BigPlayButton",tw);function uw(a,b){W.call(this,a,b);var c=this;this.j=this.controls.i;this.h=this.controls.g;this.i=[];this.g=R("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";X(c.g,!0)}else X(c.g,
958
+ !1)});this.eventManager.o(window,"click",function(){X(c.g,!1)});vw(this)}qa(uw,W);uw.prototype.release=function(){this.h=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];W.prototype.release.call(this)};function ww(a,b){xw.set(a,b)}function vw(a){for(var b=t(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=xw.get(c);d?a.i.push(d.create(a.g,a.controls)):Ua("Unrecognized context menu element:",c)}}J("shaka.ui.ContextMenu",uw);
959
+ uw.registerElement=ww;var xw=new Map;function yw(a,b,c,d){W.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);
960
+ this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Mb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Mb()&&(e.g=!0,zw(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(zw(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,zw(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
961
+ "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}qa(yw,W);q=yw.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);W.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)};
962
+ q.setValue=function(a){this.g||(this.bar.value=a)};function zw(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",yw);yw.prototype.setValue=yw.prototype.setValue;yw.prototype.getValue=yw.prototype.getValue;yw.prototype.changeTo=yw.prototype.changeTo;yw.prototype.onChangeEnd=yw.prototype.onChangeEnd;yw.prototype.onChange=yw.prototype.onChange;
963
+ yw.prototype.onChangeStart=yw.prototype.onChangeStart;yw.prototype.setRange=yw.prototype.setRange;function Aw(a,b){yw.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.m=this.controls.i;this.h=new P(function(){c.video.currentTime=c.getValue()});this.A=new P(function(){Bw(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Cw(c)});this.eventManager.o(this.localization,
964
+ "locale-changed",function(){return Cw(c)});this.eventManager.o(this.adManager,"ad-started",function(){Dw(c)||X(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Dw(c)&&X(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Ew(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Ew(c)});this.setValue(this.video.currentTime);this.update();Cw(this);this.ad&&X(this.container,!1)}qa(Aw,yw);q=Aw.prototype;
965
+ q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);yw.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Ge(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.T(.125))};q.onChangeEnd=function(){this.h.xa();this.controls.Ge(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
966
+ q.update=function(){var a=this.m.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.Ia(),g=f.end-f.start;this.setRange(f.start,f.end);Dw(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.m.showUnbufferedStart?
964
967
  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)};
965
- function Yw(a){if(a.i.length){for(var b=a.player.Ia(),c=b.end-b.start,d=["to right"],e=[],f=a.m.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 "+
966
- 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 ax(a){Yw(a);var b=a.player.Ia();b=b.end-b.start;a.player.T()&&5<b&&a.A.ka(1)}function $w(a){var b=a.player.Ia();b=b.end-b.start;return a.player.T()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function Zw(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}J("shaka.ui.SeekBar",Xw);function bx(){}
967
- bx.prototype.create=function(a,b){return new Xw(a,b)};Xw.Factory=bx;function Z(a,b,c,d){eb.call(this);var e=this;this.U=!0;this.i=d;this.C=new In(c,a,this.i.castReceiverAppId);this.gb=!0;this.B=this.C.Bb();this.A=c;this.F=this.C.bc();this.ya=a;this.j=b;this.Wa=this.F.fd();this.m=this.l=null;this.$=!1;this.G=[];this.vb=[];this.ib=!1;this.aa=new P(function(){e.j.style.cursor="none";e.ib=!1;cx(e)});this.ea=new P(function(){e.g.removeAttribute("shown");e.I.S(2)});this.I=new P(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.La=new P(function(){e.Mb()&&
968
- dx(e)});this.J=null;this.H=[];this.za=ex();this.h=new uf;this.configure(this.i);fx(this);this.ma=new Set;gx(this);this.La.ka(.125);this.h.o(this.za,"locale-changed",function(f){e.Wa.setLocale(f.locales[0])})}qa(Z,eb);q=Z.prototype;
969
- q.destroy=function(){var a=this;return I(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.A){b.D(2);break}return u(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ea&&(a.ea.stop(),a.ea=null);a.I&&(a.I.stop(),a.I=null);a.La&&(a.La.stop(),a.La=null);hx(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.C){b.D(4);break}return u(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.ya){b.D(6);break}return u(b,a.ya.destroy(),7);case 7:a.ya=
970
- null;case 6:a.F=null,a.A=null,a.B=null,a.za=null,a.ma.clear(),eb.prototype.release.call(a),z(b)}})};function hx(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function ix(a,b){jx.set(a,b)}q.Qf=function(a){this.gb=a;gx(this)};q.Ig=function(){cx(this)};
971
- q.configure=function(a){this.i=a;this.C.Ze(a.castReceiverAppId);this.m&&(this.m=null);this.fb&&(this.fb=null);this.Xa&&(this.Xa=null);this.g?(fk(this.g),hx(this)):(kx(this),lx(this));this.j.classList.add("shaka-video-container");this.A.classList.add("shaka-video");mx(this);this.i.addBigPlayButton&&nx(this);this.i.customContextMenu&&(this.Xa=new Rw(this.X,this),this.H.push(this.Xa));this.ba||ox(this);this.hb=R("div");this.hb.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.hb);
972
- px(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ia(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));qx(this);this.vb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));cx(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.o(b,"click",c);this.h.o(b,"dblclick",c)}};
973
- q.Ae=function(a){(this.U=a)?(this.j.setAttribute("shaka-controls","true"),this.A.tabIndex=-1,this.A.controls=!1):this.j.removeAttribute("shaka-controls");cx(this)};q.Cf=function(a){this.A.controls=a;this.A.tabIndex=a?0:-1;a&&this.Ae(!1)};q.getAd=function(){return this.l};q.ag=function(){return this.C};q.ng=function(){return this.za};q.Cg=function(){return this.j};q.Bb=function(){return this.B};q.mg=function(){return this.A};q.bc=function(){return this.F};q.lg=function(){return this.ya};q.gg=function(){return this.g};
974
- q.wg=function(){return this.hb};q.dg=function(){return this.P};q.eg=function(){return this.i};q.Hg=function(){return this.$};q.Ee=function(a){this.$=a};q.Fg=function(){return this.gb};q.lf=function(){return this.m?this.m.getValue():this.B.currentTime};q.Df=function(a){this.J=a};q.$c=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.dc=function(){this.I.xa()};q.Yd=function(){return document.fullscreenEnabled||this.A.webkitSupportsFullscreen?!0:!1};
975
- q.Xd=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.A;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
976
- q.Ke=function(){var a=this,b,c;return I(function(d){switch(d.g){case 1:if(!document.fullscreenEnabled){b=a.A;b.webkitSupportsFullscreen&&(b.webkitDisplayingFullscreen?b.webkitExitFullscreen():b.webkitEnterFullscreen());d.D(0);break}if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),u(d,document.exitFullscreen(),0);B(d,5);if(!document.pictureInPictureElement){d.D(7);break}return u(d,document.exitPictureInPicture(),7);case 7:return u(d,a.j.requestFullscreen({navigationUI:"hide"}),
977
- 9);case 9:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){d.D(10);break}B(d,11);return u(d,screen.orientation.lock("landscape"),13);case 13:va(d,10,5);break;case 11:F(d,5);case 10:va(d,0);break;case 5:c=F(d),a.dispatchEvent(new L("error",(new Map).set("detail",c))),d.D(0)}})};q.Ff=function(){X(this.K,!0);X(this.P,!0);this.g.setAttribute("ad-active","true")};q.pf=function(){X(this.K,!1);X(this.P,!1);this.g.removeAttribute("ad-active")};
978
- function Pw(a){a.U&&a.B.duration&&(a.F.We(),a.B.paused&&!a.$?a.B.play():a.B.pause())}function Ow(a){a.l&&a.l.isPaused()?a.l.play():a.l&&a.l.pause()}
979
- function kx(a){a.g=R("div");a.g.classList.add("shaka-controls-container");a.j.appendChild(a.g);a.j.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.B.duration&&(a.Mb()?a.J=Date.now():(rx(a,b),b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){sx(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&a.Yd()&&a.Ke()})}function nx(a){var b=R("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.fb=new Qw(b,a);a.H.push(a.fb)}
980
- function mx(a){var b=R("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function tx(a){a.K=R("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.l&&a.l.isLinear();X(a.K,b);a.N.appendChild(a.K);b=new Lw(a.K,a);a.H.push(b);b=new Kw(a.K,a);a.H.push(b)}
981
- function ox(a){a.ba=R("div");a.ba.classList.add("shaka-spinner-container");a.j.appendChild(a.ba);var b=R("div");b.classList.add("shaka-spinner");a.ba.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");
968
+ function Bw(a){if(a.i.length){for(var b=a.player.Ia(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=t(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=t(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 "+
969
+ 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 Ew(a){Bw(a);var b=a.player.Ia();b=b.end-b.start;a.player.U()&&5<b&&a.A.ka(1)}function Dw(a){var b=a.player.Ia();b=b.end-b.start;return a.player.U()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function Cw(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}J("shaka.ui.SeekBar",Aw);function Fw(){}
970
+ Fw.prototype.create=function(a,b){return new Aw(a,b)};Aw.Factory=Fw;function Y(a,b,c,d){fb.call(this);var e=this;this.S=!0;this.i=d;this.C=new ln(c,a,this.i.castReceiverAppId,this.i.castAndroidReceiverCompatible);this.gb=!0;this.B=this.C.Bb();this.A=c;this.F=this.C.bc();this.ya=a;this.j=b;this.Xa=this.F.hd();this.m=this.l=null;this.$=!1;this.G=[];this.wb=[];this.ib=!1;this.aa=new P(function(){e.j.style.cursor="none";e.ib=!1;Gw(e)});this.ea=new P(function(){e.g.removeAttribute("shown");e.I.T(2)});this.I=new P(function(){for(var f=t(e.G),g=f.next();!g.done;g=f.next())X(g.value,
971
+ !1)});this.La=new P(function(){e.Mb()&&Hw(e)});this.J=null;this.H=[];this.za=Iw();this.h=new wf;this.configure(this.i);Jw(this);this.ma=new Set;Kw(this);this.La.ka(.125);this.h.o(this.za,"locale-changed",function(f){e.Xa.setLocale(f.locales[0])})}qa(Y,fb);q=Y.prototype;
972
+ q.destroy=function(){var a=this;return I(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.A){b.D(2);break}return u(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ea&&(a.ea.stop(),a.ea=null);a.I&&(a.I.stop(),a.I=null);a.La&&(a.La.stop(),a.La=null);Lw(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.C){b.D(4);break}return u(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.ya){b.D(6);break}return u(b,a.ya.destroy(),7);case 7:a.ya=
973
+ null;case 6:a.F=null,a.A=null,a.B=null,a.za=null,a.ma.clear(),fb.prototype.release.call(a),z(b)}})};function Lw(a){for(var b=t(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function Mw(a,b){Nw.set(a,b)}q.Wf=function(a){this.gb=a;Kw(this)};q.Og=function(){Gw(this)};
974
+ q.configure=function(a){this.i=a;this.C.df(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.m&&(this.m=null);this.fb&&(this.fb=null);this.Ya&&(this.Ya=null);this.g?(gk(this.g),Lw(this)):(Ow(this),Pw(this));this.j.classList.add("shaka-video-container");this.A.classList.add("shaka-video");Qw(this);this.i.addBigPlayButton&&Rw(this);this.i.customContextMenu&&(this.Ya=new uw(this.X,this),this.H.push(this.Ya));this.ba||Sw(this);this.hb=R("div");this.hb.classList.add("shaka-server-side-ad-container");
975
+ this.g.appendChild(this.hb);Tw(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ia(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Uw(this);this.wb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Gw(this);a=t(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.o(b,"click",c);this.h.o(b,"dblclick",
976
+ c)}};q.Ce=function(a){(this.S=a)?(this.j.setAttribute("shaka-controls","true"),this.A.tabIndex=-1,this.A.controls=!1):this.j.removeAttribute("shaka-controls");Gw(this)};q.Hf=function(a){this.A.controls=a;this.A.tabIndex=a?0:-1;a&&this.Ce(!1)};q.getAd=function(){return this.l};q.hg=function(){return this.C};q.ug=function(){return this.za};q.Ig=function(){return this.j};q.Bb=function(){return this.B};q.sg=function(){return this.A};q.bc=function(){return this.F};q.rg=function(){return this.ya};
977
+ q.mg=function(){return this.g};q.Cg=function(){return this.hb};q.jg=function(){return this.P};q.kg=function(){return this.i};q.Ng=function(){return this.$};q.Ge=function(a){this.$=a};q.Lg=function(){return this.gb};q.qf=function(){return this.m?this.m.getValue():this.B.currentTime};q.If=function(a){this.J=a};q.cd=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.dc=function(){this.I.xa()};
978
+ q.ae=function(){return document.fullscreenEnabled||this.A.webkitSupportsFullscreen?!0:!1};q.$d=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.A;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
979
+ q.Me=function(){var a=this,b,c;return I(function(d){switch(d.g){case 1:if(!document.fullscreenEnabled){b=a.A;b.webkitSupportsFullscreen&&(b.webkitDisplayingFullscreen?b.webkitExitFullscreen():b.webkitEnterFullscreen());d.D(0);break}if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),u(d,document.exitFullscreen(),0);A(d,5);if(!document.pictureInPictureElement){d.D(7);break}return u(d,document.exitPictureInPicture(),7);case 7:return u(d,a.j.requestFullscreen({navigationUI:"hide"}),
980
+ 9);case 9:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){d.D(10);break}A(d,11);return u(d,screen.orientation.lock("landscape"),13);case 13:va(d,10,5);break;case 11:F(d,5);case 10:va(d,0);break;case 5:c=F(d),a.dispatchEvent(new L("error",(new Map).set("detail",c))),d.D(0)}})};q.Kf=function(){X(this.K,!0);X(this.P,!0);this.g.setAttribute("ad-active","true")};q.uf=function(){X(this.K,!1);X(this.P,!1);this.g.removeAttribute("ad-active")};
981
+ function sw(a){a.S&&a.B.duration&&(a.F.$e(),a.B.paused&&!a.$?a.B.play():a.B.pause())}function rw(a){a.l&&a.l.isPaused()?a.l.play():a.l&&a.l.pause()}
982
+ function Ow(a){a.g=R("div");a.g.classList.add("shaka-controls-container");a.j.appendChild(a.g);a.j.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.B.duration&&(a.Mb()?a.J=Date.now():(Vw(a,b),b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){Ww(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&a.ae()&&a.Me()})}function Rw(a){var b=R("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.fb=new tw(b,a);a.H.push(a.fb)}
983
+ function Qw(a){var b=R("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function Xw(a){a.K=R("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.l&&a.l.isLinear();X(a.K,b);a.N.appendChild(a.K);b=new ow(a.K,a);a.H.push(b);b=new nw(a.K,a);a.H.push(b)}
984
+ function Sw(a){a.ba=R("div");a.ba.classList.add("shaka-spinner-container");a.j.appendChild(a.ba);var b=R("div");b.classList.add("shaka-spinner");a.ba.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");
982
985
  b.setAttribute("fill","none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
983
- function px(a){a.N=R("div");a.N.classList.add("shaka-bottom-controls");a.N.classList.add("shaka-no-propagation");a.g.appendChild(a.N);a.h.o(a.N,"click",function(d){d.target.closest(".shaka-overflow-button")||a.dc()});tx(a);a.X=R("div");a.X.classList.add("shaka-controls-button-panel");a.X.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.X.classList.add("shaka-tooltips-on");a.N.appendChild(a.X);for(var b=r(a.i.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,jx.get(c)?
984
- (c=jx.get(c).create(a.X,a),a.H.push(c)):Ta("Unrecognized control panel element requested:",c)}function qx(a){if(a.i.addSeekBar)a.m=ux.create(a.N,a),a.H.push(a.m);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function lx(a){a.P=R("div");a.P.classList.add("shaka-client-side-ad-container");X(a.P,!1);a.h.o(a.P,"click",function(){sx(a)});a.j.appendChild(a.P)}
985
- function fx(a){a.h.o(a.F,"buffering",function(){a.U&&X(a.ba,a.F.Jc())});a.U&&X(a.ba,a.F.Jc());a.h.o(window,"keydown",function(b){vx(a,b)});a.h.o(window,"click",function(){return a.dc()});a.h.o(a,"submenuopen",function(){a.dc()});a.h.o(a.B,"play",function(){cx(a)});a.h.o(a.B,"pause",function(){cx(a)});a.h.o(a.j,"mousemove",function(b){rx(a,b)});a.h.o(a.j,"touchmove",function(b){rx(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){rx(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.aa.xa()});
986
- a.h.o(a.C,"caststatuschanged",function(){gx(a)});a.h.o(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.g.contains(c)&&rx(a,b);if(a.i.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.m&&!d&&(b.preventDefault(),wx(a,a.m.getValue()-5));break;case "ArrowRight":a.m&&!d&&(b.preventDefault(),wx(a,a.m.getValue()+5));break;case "Home":a.m&&wx(a,a.F.Ia().start);break;
987
- case "End":a.m&&wx(a,a.F.Ia().end);break;case " ":e&&xx(a)}});a.h.o(a.j,"keyup",function(b){a.ma["delete"](b.key)});a.h.o(a.Wa,"ad-started",function(b){a.l=b.ad;a.Ff()});a.h.o(a.Wa,"ad-stopped",function(){a.l=null;a.pf()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return I(function(b){return u(b,yx(a),0)})});a.h.o(document,"fullscreenchange",function(){a.l&&a.l.resize(a.A.offsetWidth,a.A.offsetHeight)})}
988
- function yx(a){return I(function(b){return a.B&&0!=a.B.readyState&&!a.C.qa()&&a.i.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.D(0):b["return"]()})}
989
- function rx(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),cx(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.ib=!0,a.I.stop(),a.Mb()||(dx(a),cx(a)),a.aa.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.aa.S(3))}function zx(a){return window.matchMedia("hover: hover").matches?a.vb.some(function(b){return b.matches(":hover")}):!1}
990
- function cx(a){var b=a.l?a.l.isPaused():!1,c=a.B.paused&&!a.$,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.l||!a.l.isLinear())&&c||a.ib||d||zx(a)?(dx(a),a.g.setAttribute("shown","true"),a.ea.stop()):a.ea.S(a.i.fadeDelay)}function sx(a){a.U&&(a.$c()?a.I.xa():a.i.singleClickForPlayAndPause&&xx(a))}function xx(a){a.l&&a.l.isLinear()?Ow(a):Pw(a)}
991
- function gx(a){var b=a.C.qa();a.dispatchEvent(new L("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Mb=function(){return this.U?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function wx(a,b){a.m.changeTo(b);a.Mb()&&dx(a)}
992
- function dx(a){if(a.m)if(a.m.setValue(a.B.currentTime),a.m.update(),a.m.isShowing())for(var b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new L("timeandseekrangeupdated"))}
993
- function vx(a,b){a.ma.add(b.key);var c=a.$c();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),cx(a),a.h.o(window,"mousedown",function(){a.h.nc(window,"mousedown")}));"Escape"==b.key&&a.I.xa();c&&a.ma.has("Tab")&&Ax(a,b)}
994
- function Ax(a,b){var c=a.G.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.ma.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
995
- function ex(){var a=new Ub("en");a.ia("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..."],
986
+ function Tw(a){a.N=R("div");a.N.classList.add("shaka-bottom-controls");a.N.classList.add("shaka-no-propagation");a.g.appendChild(a.N);a.h.o(a.N,"click",function(d){d.target.closest(".shaka-overflow-button")||a.dc()});Xw(a);a.X=R("div");a.X.classList.add("shaka-controls-button-panel");a.X.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.X.classList.add("shaka-tooltips-on");a.N.appendChild(a.X);for(var b=t(a.i.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,Nw.get(c)?
987
+ (c=Nw.get(c).create(a.X,a),a.H.push(c)):Ua("Unrecognized control panel element requested:",c)}function Uw(a){if(a.i.addSeekBar)a.m=Yw.create(a.N,a),a.H.push(a.m);else{a=t(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function Pw(a){a.P=R("div");a.P.classList.add("shaka-client-side-ad-container");X(a.P,!1);a.h.o(a.P,"click",function(){Ww(a)});a.j.appendChild(a.P)}
988
+ function Jw(a){a.h.o(a.F,"buffering",function(){a.S&&X(a.ba,a.F.Kc())});a.S&&X(a.ba,a.F.Kc());a.h.o(window,"keydown",function(b){Zw(a,b)});a.h.o(window,"click",function(){return a.dc()});a.h.o(a,"submenuopen",function(){a.dc()});a.h.o(a.B,"play",function(){Gw(a)});a.h.o(a.B,"pause",function(){Gw(a)});a.h.o(a.j,"mousemove",function(b){Vw(a,b)});a.h.o(a.j,"touchmove",function(b){Vw(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){Vw(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.aa.xa()});
989
+ a.h.o(a.C,"caststatuschanged",function(){Kw(a)});a.h.o(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.g.contains(c)&&Vw(a,b);if(a.i.enableKeyboardPlaybackControls)switch(c=a.i.keyboardSeekDistance,b.key){case "ArrowLeft":a.m&&!d&&0<c&&(b.preventDefault(),$w(a,a.m.getValue()-c));break;case "ArrowRight":a.m&&!d&&0<c&&(b.preventDefault(),$w(a,a.m.getValue()+c));break;case "Home":a.m&&
990
+ $w(a,a.F.Ia().start);break;case "End":a.m&&$w(a,a.F.Ia().end);break;case " ":e&&ax(a)}});a.h.o(a.j,"keyup",function(b){a.ma["delete"](b.key)});a.h.o(a.Xa,"ad-started",function(b){a.l=b.ad;a.Kf()});a.h.o(a.Xa,"ad-stopped",function(){a.l=null;a.uf()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return I(function(b){return u(b,bx(a),0)})});a.h.o(document,"fullscreenchange",function(){a.l&&a.l.resize(a.A.offsetWidth,a.A.offsetHeight)})}
991
+ function bx(a){return I(function(b){return a.B&&0!=a.B.readyState&&!a.C.qa()&&a.i.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.D(0):b["return"]()})}
992
+ function Vw(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Gw(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.ib=!0,a.I.stop(),a.Mb()||(Hw(a),Gw(a)),a.aa.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.aa.T(3))}function cx(a){return window.matchMedia("hover: hover").matches?a.wb.some(function(b){return b.matches(":hover")}):!1}
993
+ function Gw(a){var b=a.l?a.l.isPaused():!1,c=a.B.paused&&!a.$,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.l||!a.l.isLinear())&&c||a.ib||d||cx(a)?(Hw(a),a.g.setAttribute("shown","true"),a.ea.stop()):a.ea.T(a.i.fadeDelay)}function Ww(a){a.S&&(a.cd()?a.I.xa():a.i.singleClickForPlayAndPause&&ax(a))}function ax(a){a.l&&a.l.isLinear()?rw(a):sw(a)}
994
+ function Kw(a){var b=a.C.qa();a.dispatchEvent(new L("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Mb=function(){return this.S?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function $w(a,b){a.m.changeTo(b);a.Mb()&&Hw(a)}
995
+ function Hw(a){if(a.m)if(a.m.setValue(a.B.currentTime),a.m.update(),a.m.isShowing())for(var b=t(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=t(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new L("timeandseekrangeupdated"))}
996
+ function Zw(a,b){a.ma.add(b.key);var c=a.cd();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Gw(a),a.h.o(window,"mousedown",function(){a.h.nc(window,"mousedown")}));"Escape"==b.key&&a.I.xa();c&&a.ma.has("Tab")&&dx(a,b)}
997
+ function dx(a,b){var c=a.G.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.ma.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
998
+ function Iw(){var a=new Vb("en");a.ia("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..."],
996
999
  ["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"],
997
1000
  ["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"],
998
1001
  ["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"],
@@ -1050,77 +1053,77 @@ a.ia("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
1050
1053
  ["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\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.ia("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],
1051
1054
  ["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY","\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"],
1052
1055
  ["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\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"],
1053
- ["RESOLUTION","\u89e3\u6790\u5ea6"],["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.Ye(navigator.languages||[]);return a}J("shaka.ui.Controls",Z);Z.prototype.isOpaque=Z.prototype.Mb;Z.prototype.hideAdUI=Z.prototype.pf;Z.prototype.showAdUI=Z.prototype.Ff;
1054
- Z.prototype.toggleFullScreen=Z.prototype.Ke;Z.prototype.isFullScreenEnabled=Z.prototype.Xd;Z.prototype.isFullScreenSupported=Z.prototype.Yd;Z.prototype.hideSettingsMenus=Z.prototype.dc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.$c;Z.prototype.setLastTouchEventTime=Z.prototype.Df;Z.prototype.getDisplayTime=Z.prototype.lf;Z.prototype.isCastAllowed=Z.prototype.Fg;Z.prototype.setSeeking=Z.prototype.Ee;Z.prototype.isSeeking=Z.prototype.Hg;Z.prototype.getConfig=Z.prototype.eg;
1055
- Z.prototype.getClientSideAdContainer=Z.prototype.dg;Z.prototype.getServerSideAdContainer=Z.prototype.wg;Z.prototype.getControlsContainer=Z.prototype.gg;Z.prototype.getLocalPlayer=Z.prototype.lg;Z.prototype.getPlayer=Z.prototype.bc;Z.prototype.getLocalVideo=Z.prototype.mg;Z.prototype.getVideo=Z.prototype.Bb;Z.prototype.getVideoContainer=Z.prototype.Cg;Z.prototype.getLocalization=Z.prototype.ng;Z.prototype.getCastProxy=Z.prototype.ag;Z.prototype.getAd=Z.prototype.getAd;
1056
- Z.prototype.setEnabledNativeControls=Z.prototype.Cf;Z.prototype.setEnabledShakaControls=Z.prototype.Ae;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Ig;Z.prototype.allowCast=Z.prototype.Qf;Z.registerSeekBar=function(a){ux=a};Z.registerElement=ix;Z.prototype.destroy=Z.prototype.destroy;var jx=new Map,ux=new bx;function Bx(a,b){W.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=ek();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=R("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
1057
- this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);Cx(this);this.eventManager.o(this.localization,"locale-updated",function(){Dx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Dx(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&X(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){X(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){X(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.Df(Date.now());
1058
- d.stopPropagation()});this.eventManager.o(this.g,"click",function(){Ex(c)});Dx(this);this.ad&&this.ad.isLinear()&&X(this.g,!1)}qa(Bx,W);Bx.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=[];W.prototype.release.call(this)};function Fx(a,b){Gx.set(a,b)}
1059
- function Cx(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,Gx.get(c)?(c=Gx.get(c),a.i.push(c.create(a.h,a.controls))):Ta("Unrecognized overflow menu element requested:",c)}function Ex(a){if(a.controls.$c())a.controls.dc();else{X(a.h,!0);cx(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};hb(a.h.childNodes,b)&&ib(a.h.childNodes,b)[0].focus()}}function Dx(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1060
- J("shaka.ui.OverflowMenu",Bx);Bx.registerElement=Fx;function Hx(){}Hx.prototype.create=function(a,b){return new Bx(a,b)};ix("overflow_menu",new Hx);var Gx=new Map;function Ix(a,b){W.call(this,a,b);var c=this;this.g=ek();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");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);
1061
- this.i=R("span");this.i.classList.add("shaka-current-selection-span");d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);Jx(this);Kx(this);this.eventManager.o(this.localization,"locale-updated",function(){Jx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Jx(c)});this.eventManager.o(this.g,"click",function(){c.controls.Bb().webkitShowPlaybackTargetPicker()});d=this.controls.Bb();this.eventManager.o(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=
1062
- c.player.mf()==gm;X(c.g,"available"==e.availability&&f)});this.eventManager.o(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){Kx(c)})}qa(Ix,W);function Kx(a){var b=a.controls.Bb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function Jx(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}J("shaka.ui.AirPlayButton",Ix);function Lx(){}Lx.prototype.create=function(a,b){return new Ix(a,b)};Fx("airplay",new Lx);
1063
- ix("airplay",new Lx);function Mx(a,b,c){this.i=a;this.h=Nx(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Zd()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,this.h);this.configure({});c.controls||a.He(b);b.ui=this;c.ui=this}q=Mx.prototype;q.destroy=function(){var a=this;return I(function(b){if(1==b.g)return a.g?u(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?u(b,a.i.destroy(),4):b.D(4);a.i=null;z(b)})};q.Zd=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Yc()&&1<navigator.maxTouchPoints};
1064
- q.getConfiguration=function(){var a=Nx(this);Jk(a,this.h,Nx(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Kk(a,b));Jk(this.h,a,Nx(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new L("uiupdated"))};q.fg=function(){return this.g};q.ih=function(a){this.g.Ae(a)};
1065
- function Nx(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(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
1066
- "picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!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)",level:"rgb(255, 255, 255)"},trackLabelFormat:Ox,fadeDelay:0,
1067
- doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Zd()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1068
- function Px(){var a,b,c,d,e,f,g,h,k,l,m,p,n;return I(function(t){switch(t.g){case 1:Nt();if(!ol())return Qx("shaka-ui-load-failed",Rx),t["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){t.D(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),Sx(f,e));t.D(2);break}h=r(a);k=h.next();
1069
- case 4:if(k.done){t.D(2);break}l=k.value;if(l.ui){t.D(5);break}m=null;p=r(b);for(d=p.next();!d.done;d=p.next())if(n=d.value,n.parentElement==l){m=n;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));B(t,7);return u(t,Sx(l,m),9);case 9:va(t,5);break;case 7:return F(t),Qx("shaka-ui-load-failed",Tx),t["return"]();case 5:k=h.next();t.D(4);break;case 2:Qx("shaka-ui-loaded"),z(t)}})}
1070
- function Qx(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1071
- function Sx(a,b){var c,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:c=new S(b);d=new Mx(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.Cf(!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"));
1072
- k=h.next();case 2:if(k.done){m.D(0);break}l=k.value;B(m,5);return u(m,d.g.bc().load(l.getAttribute("src")),7);case 7:m.D(0);break;case 5:F(m);case 3:k=h.next(),m.D(2)}})}J("shaka.ui.Overlay",Mx);Mx.prototype.setEnabled=Mx.prototype.ih;Mx.prototype.getControls=Mx.prototype.fg;Mx.prototype.configure=Mx.prototype.configure;Mx.prototype.getConfiguration=Mx.prototype.getConfiguration;Mx.prototype.isMobile=Mx.prototype.Zd;Mx.prototype.destroy=Mx.prototype.destroy;var Ox=0;
1073
- Mx.TrackLabelFormat={LANGUAGE:Ox,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var Rx=0,Tx=1;Mx.FailReasonCode={NO_BROWSER_SUPPORT:Rx,PLAYER_FAILED_TO_LOAD:Tx};"complete"==document.readyState?I(function(a){if(1==a.g)return u(a,Promise.resolve(),2);Px();z(a)}):window.addEventListener("load",Px);function Ux(a,b,c,d,e,f,g){function h(C,A){return C+": "+A}function k(C){return"variant"==C.type?C.audioRoles?C.audioRoles.join(", "):void 0:C.roles.join(", ")}var l=a.find(function(C){return 1==C.active}),m=Fw(b);fk(b);b.appendChild(m);m=new Map;for(var p=r(a),n=p.next();!n.done;n=p.next())n=n.value,m.has(n.language)||m.set(n.language,new Set),m.get(n.language).add(k(n));m=new Set;l=l?h(l.language,k(l)):"";p={};a=r(a);for(n=a.next();!n.done;p={Ua:p.Ua},n=a.next()){p.Ua=n.value;n=p.Ua.language;var t=
1074
- p.Ua.forced,v=f.resolve(Yb.Lf),y=k(p.Ua),x=h(n,y);if(!m.has(x)){m.add(x);var w=ek();w.addEventListener("click",function(C){return function(){c(C.Ua)}}(p));var D=R("span");w.appendChild(D);D.textContent=Vx(n,f);switch(g){case Ox:t&&(D.textContent+=" ("+v+")");break;case 1:y?D.textContent=y:(Ta("Track #"+p.Ua.id+" does not have a role, but the UI is configured to only show role."),D.textContent="?");t&&(D.textContent+=" ("+v+")");break;case 2:y&&(D.textContent+=": "+y);t&&(D.textContent+=" ("+v+")");
1075
- break;case 3:p.Ua.label?D.textContent=p.Ua.label:(Ta("Track #"+p.Ua.id+" does not have a label, but the UI is configured to only show labels."),D.textContent="?")}d&&x==l&&(w.appendChild(Iw()),D.classList.add("shaka-chosen-item"),w.ariaSelected="true",e.textContent=D.textContent);b.appendChild(w)}}}
1076
- function Vx(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=Qb(a);return a in Bw?Bw[a].s:c in Bw?Bw[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function Wx(a,b,c){W.call(this,a,b);var d=this;Xx(this,c);Yx(this);Zx(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new L("submenuopen")),X(d.menu,!0),Hw(d.menu)):X(d.menu,!1)})}qa(Wx,W);
1077
- function Xx(a,b){a.button=ek();a.button.classList.add("shaka-overflow-button");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");c.classList.add("shaka-overflow-menu-only");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)}
1078
- function Yx(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=ek();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.dc()});var b=R("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1079
- R("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function Zx(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){X(a.parent,!0);a.parent.childNodes[0].focus();cx(a.controls)}))}J("shaka.ui.SettingsMenu",Wx);function $x(a,b){Wx.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){ay(c)});this.eventManager.o(this.localization,"locale-changed",function(){ay(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Za().length;X(c.button,d);by(c)});this.eventManager.o(this.player,"variantchanged",
1080
- function(){by(c)});ay(this);by(this)}qa($x,Wx);function by(a){var b=a.player.Za();Ux(b,a.menu,function(c){a.player.Bd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);Hw(a.menu);a.controls.dispatchEvent(new L("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
1081
- function ay(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")}J("shaka.ui.AudioLanguageSelection",$x);function cy(){}cy.prototype.create=function(a,b){return new $x(a,b)};Fx("language",new cy);ix("language",new cy);function dy(a,b){W.call(this,a,b);var c=this;this.h=this.controls.C;this.g=ek();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");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");
1082
- d.appendChild(this.j);this.g.appendChild(d);this.parent.appendChild(this.g);ey(this);fy(this);this.eventManager.o(this.localization,"locale-updated",function(){ey(c)});this.eventManager.o(this.localization,"locale-changed",function(){ey(c)});this.eventManager.o(this.g,"click",function(){gy(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){fy(c)})}qa(dy,W);
1083
- function gy(a){var b;I(function(c){if(1==c.g){if(a.h.qa())return a.h.Gf(),c.D(0);B(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=F(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));z(c)})}function fy(a){var b=a.h.Ve()&&a.controls.gb,c=a.h.qa();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");hy(a)}
1084
- function hy(a){a.j.textContent=a.h.qa()?a.h.yd():a.localization.resolve("OFF")}function ey(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");hy(a)}J("shaka.ui.CastButton",dy);function iy(){}iy.prototype.create=function(a,b){return new dy(a,b)};Fx("cast",new iy);ix("cast",new iy);function jy(a,b){W.call(this,a,b);var c=this;this.g=ek();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);ky(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){ky(c)});this.eventManager.o(this.localization,"locale-changed",function(){ky(c)});
1085
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.zb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Me(d);c.g.setAttribute("shaka-status",d+"x")}})}qa(jy,W);function ky(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}J("shaka.ui.FastForwardButton",jy);function ly(){}ly.prototype.create=function(a,b){return new jy(a,b)};ix("fast_forward",new ly);function my(a,b){W.call(this,a,b);var c=this;this.h=this.controls.A;this.g=ek();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");ny(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);oy(this);this.eventManager.o(this.localization,"locale-updated",function(){oy(c)});this.eventManager.o(this.localization,"locale-changed",function(){oy(c)});this.eventManager.o(this.g,"click",function(){return I(function(d){return u(d,
1086
- c.controls.Ke(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.Xd()?"fullscreen_exit":"fullscreen";oy(c)});this.eventManager.o(this.h,"loadedmetadata",function(){ny(c)});this.eventManager.o(this.h,"loadeddata",function(){ny(c)})}qa(my,W);function ny(a){a.controls.Yd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function oy(a){a.g.ariaLabel=a.localization.resolve(a.controls.Xd()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
1087
- J("shaka.ui.FullscreenButton",my);function py(){}py.prototype.create=function(a,b){return new my(a,b)};ix("fullscreen",new py);function qy(a,b){W.call(this,a,b);var c=this;this.g=ek();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");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.j=R("span");this.j.textContent=this.localization.resolve("LOOP");d.appendChild(this.j);this.l=R("span");this.l.classList.add("shaka-current-selection-span");
1088
- d.appendChild(this.l);this.g.appendChild(d);ry(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){ry(c)});this.eventManager.o(this.localization,"locale-changed",function(){ry(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.xa();c.h.ka(1)});this.m=this.video.loop;this.h=new P(function(){c.m!=c.video.loop&&(ry(c),c.m=c.video.loop)});this.h.ka(1)}qa(qy,W);qy.prototype.release=function(){this.h.stop();this.h=null;W.prototype.release.call(this)};
1089
- function ry(a){a.j.textContent=a.localization.resolve("LOOP");a.l.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",qy);function sy(){}sy.prototype.create=function(a,b){return new qy(a,b)};Fx("loop",new sy);ix("loop",new sy);Tw("loop",new sy);function ty(a,b){W.call(this,a,b);var c=this;this.g=ek();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);uy(this);vy(this);this.eventManager.o(this.localization,"locale-updated",function(){uy(c)});this.eventManager.o(this.localization,"locale-changed",function(){uy(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
1090
- this.eventManager.o(this.video,"volumechange",function(){uy(c);vy(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){uy(c);vy(c)});this.eventManager.o(this.adManager,"ad-muted",function(){uy(c);vy(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;uy(c);vy(c)})}qa(ty,W);function uy(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1091
- function vy(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",ty);function wy(){}wy.prototype.create=function(a,b){return new ty(a,b)};ix("mute",new wy);function xy(a,b){W.call(this,a,b);var c=this;this.l=this.controls.A;this.g=ek();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");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);
1092
- this.h=R("span");this.h.classList.add("shaka-current-selection-span");d.appendChild(this.h);this.g.appendChild(d);yy(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){yy(c)});this.eventManager.o(this.localization,"locale-changed",function(){yy(c)});this.eventManager.o(this.g,"click",function(){zy(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent=
1056
+ ["RESOLUTION","\u89e3\u6790\u5ea6"],["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.cf(navigator.languages||[]);return a}J("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.Mb;Y.prototype.hideAdUI=Y.prototype.uf;Y.prototype.showAdUI=Y.prototype.Kf;
1057
+ Y.prototype.toggleFullScreen=Y.prototype.Me;Y.prototype.isFullScreenEnabled=Y.prototype.$d;Y.prototype.isFullScreenSupported=Y.prototype.ae;Y.prototype.hideSettingsMenus=Y.prototype.dc;Y.prototype.anySettingsMenusAreOpen=Y.prototype.cd;Y.prototype.setLastTouchEventTime=Y.prototype.If;Y.prototype.getDisplayTime=Y.prototype.qf;Y.prototype.isCastAllowed=Y.prototype.Lg;Y.prototype.setSeeking=Y.prototype.Ge;Y.prototype.isSeeking=Y.prototype.Ng;Y.prototype.getConfig=Y.prototype.kg;
1058
+ Y.prototype.getClientSideAdContainer=Y.prototype.jg;Y.prototype.getServerSideAdContainer=Y.prototype.Cg;Y.prototype.getControlsContainer=Y.prototype.mg;Y.prototype.getLocalPlayer=Y.prototype.rg;Y.prototype.getPlayer=Y.prototype.bc;Y.prototype.getLocalVideo=Y.prototype.sg;Y.prototype.getVideo=Y.prototype.Bb;Y.prototype.getVideoContainer=Y.prototype.Ig;Y.prototype.getLocalization=Y.prototype.ug;Y.prototype.getCastProxy=Y.prototype.hg;Y.prototype.getAd=Y.prototype.getAd;
1059
+ Y.prototype.setEnabledNativeControls=Y.prototype.Hf;Y.prototype.setEnabledShakaControls=Y.prototype.Ce;Y.prototype.configure=Y.prototype.configure;Y.prototype.loadComplete=Y.prototype.Og;Y.prototype.allowCast=Y.prototype.Wf;Y.registerSeekBar=function(a){Yw=a};Y.registerElement=Mw;Y.prototype.destroy=Y.prototype.destroy;var Nw=new Map,Yw=new Fw;function ex(a,b){W.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=fk();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=R("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
1060
+ this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);fx(this);this.eventManager.o(this.localization,"locale-updated",function(){gx(c)});this.eventManager.o(this.localization,"locale-changed",function(){gx(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&X(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){X(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){X(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.If(Date.now());
1061
+ d.stopPropagation()});this.eventManager.o(this.g,"click",function(){hx(c)});gx(this);this.ad&&this.ad.isLinear()&&X(this.g,!1)}qa(ex,W);ex.prototype.release=function(){this.j=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];W.prototype.release.call(this)};function ix(a,b){jx.set(a,b)}
1062
+ function fx(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,jx.get(c)?(c=jx.get(c),a.i.push(c.create(a.h,a.controls))):Ua("Unrecognized overflow menu element requested:",c)}function hx(a){if(a.controls.cd())a.controls.dc();else{X(a.h,!0);Gw(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};ib(a.h.childNodes,b)&&jb(a.h.childNodes,b)[0].focus()}}function gx(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1063
+ J("shaka.ui.OverflowMenu",ex);ex.registerElement=ix;function kx(){}kx.prototype.create=function(a,b){return new ex(a,b)};Mw("overflow_menu",new kx);var jx=new Map;function lx(a,b){W.call(this,a,b);var c=this;this.g=fk();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");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);
1064
+ this.i=R("span");this.i.classList.add("shaka-current-selection-span");d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);mx(this);nx(this);this.eventManager.o(this.localization,"locale-updated",function(){mx(c)});this.eventManager.o(this.localization,"locale-changed",function(){mx(c)});this.eventManager.o(this.g,"click",function(){c.controls.Bb().webkitShowPlaybackTargetPicker()});d=this.controls.Bb();this.eventManager.o(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=
1065
+ c.player.rf()==Zl;X(c.g,"available"==e.availability&&f)});this.eventManager.o(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){nx(c)})}qa(lx,W);function nx(a){var b=a.controls.Bb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function mx(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}J("shaka.ui.AirPlayButton",lx);function ox(){}ox.prototype.create=function(a,b){return new lx(a,b)};ix("airplay",new ox);
1066
+ Mw("airplay",new ox);function px(a,b,c){this.i=a;this.h=qx(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.be()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.Je(b);b.ui=this;c.ui=this}q=px.prototype;q.destroy=function(){var a=this;return I(function(b){if(1==b.g)return a.g?u(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?u(b,a.i.destroy(),4):b.D(4);a.i=null;z(b)})};q.be=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Zc()&&1<navigator.maxTouchPoints};
1067
+ q.getConfiguration=function(){var a=qx(this);Kk(a,this.h,qx(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Lk(a,b));Kk(this.h,a,qx(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new L("uiupdated"))};q.lg=function(){return this.g};q.oh=function(a){this.g.Ce(a)};
1068
+ function qx(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(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
1069
+ "picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,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)",level:"rgb(255, 255, 255)"},
1070
+ trackLabelFormat:rx,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.be()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1071
+ function sx(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return I(function(r){switch(r.g){case 1:qt();if(!ol())return tx("shaka-ui-load-failed",ux),r["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){r.D(2);break}if(b.length&&!a.length){c=t(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),vx(f,e));r.D(2);break}h=t(a);k=h.next();
1072
+ case 4:if(k.done){r.D(2);break}l=k.value;if(l.ui){r.D(5);break}m=null;n=t(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(r,7);return u(r,vx(l,m),9);case 9:va(r,5);break;case 7:return F(r),tx("shaka-ui-load-failed",wx),r["return"]();case 5:k=h.next();r.D(4);break;case 2:tx("shaka-ui-loaded"),z(r)}})}
1073
+ function tx(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1074
+ function vx(a,b){var c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:c=new S(b);d=new px(c,a,b);e="";f=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(e=a.dataset.shakaPlayerCastReceiverId,f="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId,f="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);e.length&&d.configure({castReceiverAppId:e,castAndroidReceiverCompatible:f});b.controls&&
1075
+ d.g.Hf(!0);if(g=b.getAttribute("src"))h=document.createElement("source"),h.setAttribute("src",g),b.appendChild(h),b.removeAttribute("src");k=t(b.querySelectorAll("source"));l=k.next();case 2:if(l.done){n.D(0);break}m=l.value;A(n,5);return u(n,d.g.bc().load(m.getAttribute("src")),7);case 7:n.D(0);break;case 5:F(n);case 3:l=k.next(),n.D(2)}})}J("shaka.ui.Overlay",px);px.prototype.setEnabled=px.prototype.oh;px.prototype.getControls=px.prototype.lg;px.prototype.configure=px.prototype.configure;
1076
+ px.prototype.getConfiguration=px.prototype.getConfiguration;px.prototype.isMobile=px.prototype.be;px.prototype.destroy=px.prototype.destroy;var rx=0;px.TrackLabelFormat={LANGUAGE:rx,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var ux=0,wx=1;px.FailReasonCode={NO_BROWSER_SUPPORT:ux,PLAYER_FAILED_TO_LOAD:wx};"complete"==document.readyState?I(function(a){if(1==a.g)return u(a,Promise.resolve(),2);sx();z(a)}):window.addEventListener("load",sx);function xx(a,b,c,d,e,f,g){function h(C,B){return C+": "+B}function k(C){return"variant"==C.type?C.audioRoles?C.audioRoles.join(", "):void 0:C.roles.join(", ")}var l=a.find(function(C){return 1==C.active}),m=iw(b);gk(b);b.appendChild(m);m=new Map;for(var n=t(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=t(a);for(p=a.next();!p.done;n={Va:n.Va},p=a.next()){n.Va=p.value;p=n.Va.language;var r=
1077
+ n.Va.forced,w=f.resolve(Zb.Rf),y=k(n.Va),x=h(p,y);if(!m.has(x)){m.add(x);var v=fk();v.addEventListener("click",function(C){return function(){c(C.Va)}}(n));var D=R("span");v.appendChild(D);D.textContent=yx(p,f);switch(g){case rx:r&&(D.textContent+=" ("+w+")");break;case 1:y?D.textContent=y:(Ua("Track #"+n.Va.id+" does not have a role, but the UI is configured to only show role."),D.textContent="?");r&&(D.textContent+=" ("+w+")");break;case 2:y&&(D.textContent+=": "+y);r&&(D.textContent+=" ("+w+")");
1078
+ break;case 3:n.Va.label?D.textContent=n.Va.label:(Ua("Track #"+n.Va.id+" does not have a label, but the UI is configured to only show labels."),D.textContent="?")}d&&x==l&&(v.appendChild(lw()),D.classList.add("shaka-chosen-item"),v.ariaSelected="true",e.textContent=D.textContent);b.appendChild(v)}}}
1079
+ function yx(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=Rb(a);return a in ew?ew[a].s:c in ew?ew[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function zx(a,b,c){W.call(this,a,b);var d=this;Ax(this,c);Bx(this);Cx(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new L("submenuopen")),X(d.menu,!0),kw(d.menu)):X(d.menu,!1)})}qa(zx,W);
1080
+ function Ax(a,b){a.button=fk();a.button.classList.add("shaka-overflow-button");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");c.classList.add("shaka-overflow-menu-only");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)}
1081
+ function Bx(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=fk();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.dc()});var b=R("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1082
+ R("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function Cx(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){X(a.parent,!0);a.parent.childNodes[0].focus();Gw(a.controls)}))}J("shaka.ui.SettingsMenu",zx);function Dx(a,b){zx.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){Ex(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ex(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Qa().length;X(c.button,d);Fx(c)});this.eventManager.o(this.player,"variantchanged",
1083
+ function(){Fx(c)});Ex(this);Fx(this)}qa(Dx,zx);function Fx(a){var b=a.player.Qa();xx(b,a.menu,function(c){a.player.Ed(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);kw(a.menu);a.controls.dispatchEvent(new L("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
1084
+ function Ex(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")}J("shaka.ui.AudioLanguageSelection",Dx);function Gx(){}Gx.prototype.create=function(a,b){return new Dx(a,b)};ix("language",new Gx);Mw("language",new Gx);function Hx(a,b){W.call(this,a,b);var c=this;this.h=this.controls.C;this.g=fk();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");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");
1085
+ d.appendChild(this.j);this.g.appendChild(d);this.parent.appendChild(this.g);Ix(this);Jx(this);this.eventManager.o(this.localization,"locale-updated",function(){Ix(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ix(c)});this.eventManager.o(this.g,"click",function(){Kx(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){Jx(c)})}qa(Hx,W);
1086
+ function Kx(a){var b;I(function(c){if(1==c.g){if(a.h.qa())return a.h.Lf(),c.D(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=F(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));z(c)})}function Jx(a){var b=a.h.Ze()&&a.controls.gb,c=a.h.qa();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Lx(a)}
1087
+ function Lx(a){a.j.textContent=a.h.qa()?a.h.Cd():a.localization.resolve("OFF")}function Ix(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Lx(a)}J("shaka.ui.CastButton",Hx);function Mx(){}Mx.prototype.create=function(a,b){return new Hx(a,b)};ix("cast",new Mx);Mw("cast",new Mx);function Nx(a,b){W.call(this,a,b);var c=this;this.g=fk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);Ox(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){Ox(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ox(c)});
1088
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.zb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Oe(d);c.g.setAttribute("shaka-status",d+"x")}})}qa(Nx,W);function Ox(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}J("shaka.ui.FastForwardButton",Nx);function Px(){}Px.prototype.create=function(a,b){return new Nx(a,b)};Mw("fast_forward",new Px);function Qx(a,b){W.call(this,a,b);var c=this;this.h=this.controls.A;this.g=fk();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");Rx(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);Sx(this);this.eventManager.o(this.localization,"locale-updated",function(){Sx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Sx(c)});this.eventManager.o(this.g,"click",function(){return I(function(d){return u(d,
1089
+ c.controls.Me(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.$d()?"fullscreen_exit":"fullscreen";Sx(c)});this.eventManager.o(this.h,"loadedmetadata",function(){Rx(c)});this.eventManager.o(this.h,"loadeddata",function(){Rx(c)})}qa(Qx,W);function Rx(a){a.controls.ae()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function Sx(a){a.g.ariaLabel=a.localization.resolve(a.controls.$d()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
1090
+ J("shaka.ui.FullscreenButton",Qx);function Tx(){}Tx.prototype.create=function(a,b){return new Qx(a,b)};Mw("fullscreen",new Tx);function Ux(a,b){W.call(this,a,b);var c=this;this.g=fk();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");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.j=R("span");this.j.textContent=this.localization.resolve("LOOP");d.appendChild(this.j);this.l=R("span");this.l.classList.add("shaka-current-selection-span");
1091
+ d.appendChild(this.l);this.g.appendChild(d);Vx(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){Vx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Vx(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.xa();c.h.ka(1)});this.m=this.video.loop;this.h=new P(function(){c.m!=c.video.loop&&(Vx(c),c.m=c.video.loop)});this.h.ka(1)}qa(Ux,W);Ux.prototype.release=function(){this.h.stop();this.h=null;W.prototype.release.call(this)};
1092
+ function Vx(a){a.j.textContent=a.localization.resolve("LOOP");a.l.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",Ux);function Wx(){}Wx.prototype.create=function(a,b){return new Ux(a,b)};ix("loop",new Wx);Mw("loop",new Wx);ww("loop",new Wx);function Xx(a,b){W.call(this,a,b);var c=this;this.g=fk();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);Yx(this);Zx(this);this.eventManager.o(this.localization,"locale-updated",function(){Yx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Yx(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
1093
+ this.eventManager.o(this.video,"volumechange",function(){Yx(c);Zx(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){Yx(c);Zx(c)});this.eventManager.o(this.adManager,"ad-muted",function(){Yx(c);Zx(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;Yx(c);Zx(c)})}qa(Xx,W);function Yx(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1094
+ function Zx(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",Xx);function $x(){}$x.prototype.create=function(a,b){return new Xx(a,b)};Mw("mute",new $x);function ay(a,b){W.call(this,a,b);var c=this;this.l=this.controls.A;this.g=fk();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");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);
1095
+ this.h=R("span");this.h.classList.add("shaka-current-selection-span");d.appendChild(this.h);this.g.appendChild(d);by(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){by(c)});this.eventManager.o(this.localization,"locale-changed",function(){by(c)});this.eventManager.o(this.g,"click",function(){cy(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent=
1093
1096
  "branding_watermark";c.g.ariaLabel=c.localization.resolve("EXIT_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("ON")});this.eventManager.o(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.o(this.controls,"caststatuschanged",function(e){e.newStatus?document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!1):
1094
- document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){Ay(c)})}qa(xy,W);function zy(a){var b;I(function(c){if(1==c.g)return B(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=F(c);a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));z(c)})}
1095
- function yy(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")}
1096
- function Ay(a){I(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.D(0);if(!a.player||!a.player.ec())return X(a.g,!0),b.D(0);X(a.g,!1);return document.pictureInPictureElement?u(b,document.exitPictureInPicture(),0):b.D(0)})}J("shaka.ui.PipButton",xy);function By(){}By.prototype.create=function(a,b){return new xy(a,b)};Fx("picture_in_picture",new By);ix("picture_in_picture",new By);Tw("picture_in_picture",new By);function Cy(a,b){Wx.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.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){Dy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Dy(c)});this.eventManager.o(this.player,"ratechange",function(){Ey(c,c.player.zb())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
1097
- "x",d]}));Dy(this);Fy(this);Ey(this,this.player.zb())}qa(Cy,Wx);function Dy(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")}
1098
- function Ey(a,b){var c=Gw(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(Iw()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1099
- "x")}function Fy(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={uc:b.uc},d=c.next()){b.uc=d.value;d=ek();var e=R("span");e.textContent=b.uc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.uc);a.video.defaultPlaybackRate=a.g.get(f.uc)}}(b));a.menu.appendChild(d)}Hw(a.menu)}J("shaka.ui.PlaybackRateSelection",Cy);function Gy(){}Gy.prototype.create=function(a,b){return new Cy(a,b)};Fx("playback_rate",new Gy);ix("playback_rate",new Gy);function Hy(a,b){W.call(this,a,b);var c=this;this.g=ek();this.g.classList.add("shaka-current-time");Iy(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.T()&&(c.video.currentTime=c.player.Ia().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.lf(),f=c.video.duration,g=c.player.Ia(),h=g.end-g.start;c.player.T()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(Iy(c,"- "+Jw(e,f)),c.g.disabled=
1100
- !1):(Iy(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=Jw(e,d),f&&(e+=" / "+Jw(f,d)),Iy(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.T()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}qa(Hy,W);function Iy(a,b){b!=a.g.textContent&&(a.g.textContent=b)}J("shaka.ui.PresentationTimeTracker",Hy);function Jy(){}Jy.prototype.create=function(a,b){return new Hy(a,b)};ix("time_and_duration",new Jy);function Ky(a,b){Wx.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){Ly(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ly(c)});this.eventManager.o(this.player,"variantchanged",function(){My(c)});this.eventManager.o(this.player,"trackschanged",function(){My(c)});this.eventManager.o(this.player,
1101
- "abrstatuschanged",function(){My(c)});My(this)}qa(Ky,Wx);
1102
- function My(a){var b=a.player.Za(),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(a.player.ec()?b.findIndex(function(m){return m.bandwidth==k.bandwidth}):b.findIndex(function(m){return m.height==k.height}))==l});a.player.ec()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=Fw(a.menu);fk(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;
1103
- for(var e={},f=r(b),g=f.next();!g.done;e={Xb:e.Xb},g=f.next()){e.Xb=g.value;g=ek();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.Xb;a.player.configure({abr:{enabled:!1}});a.player.ye(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=a.player.ec()?Math.round(e.Xb.bandwidth/1E3)+" kbits/s":e.Xb.height+"p";g.appendChild(h);d||e.Xb!=c||(g.ariaSelected="true",g.appendChild(Iw()),h.classList.add("shaka-chosen-item"),
1104
- a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=ek();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});My(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(Iw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",
1105
- a.currentSelection.textContent);a.menu.appendChild(e);Hw(a.menu);a.controls.dispatchEvent(new L("resolutionselectionupdated"));Ly(a)}
1106
- function Ly(a){var b=a.player.ec()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);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",Ky);function Ny(){}
1107
- Ny.prototype.create=function(a,b){return new Ky(a,b)};Fx("quality",new Ny);ix("quality",new Ny);function Oy(a,b){W.call(this,a,b);var c=this;this.g=ek();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);Py(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){Py(c)});this.eventManager.o(this.localization,"locale-changed",function(){Py(c)});
1108
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.zb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Me(d);c.g.setAttribute("shaka-status",d+"x")}})}qa(Oy,W);function Py(a){a.g.ariaLabel=a.localization.resolve("REWIND")}J("shaka.ui.RewindButton",Oy);function Qy(){}Qy.prototype.create=function(a,b){return new Oy(a,b)};ix("rewind",new Qy);function Ry(a,b){W.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=ek();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);Sy(this);this.i=new P(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1109
- d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){Sy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Sy(c)});this.eventManager.o(this.adManager,"ad-started",function(){Ty(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),X(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;X(c.g,!1);X(c.h,!1)});this.eventManager.o(this.g,
1110
- "click",function(){c.ad.skip()});this.ad&&Ty(this)}qa(Ry,W);Ry.prototype.release=function(){this.i.stop();this.i=null;W.prototype.release.call(this)};function Sy(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function Ty(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.xa(),a.i.ka(.5))}J("shaka.ui.SkipAdButton",Ry);function Uy(a,b){Nw.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}qa(Uy,Nw);Uy.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};Uy.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)}};
1111
- J("shaka.ui.SmallPlayButton",Uy);function Vy(){}Vy.prototype.create=function(a,b){return new Uy(a,b)};ix("play_pause",new Vy);function Wy(a,b){W.call(this,a,b);var c=R("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}qa(Wy,W);J("shaka.ui.Spacer",Wy);function Xy(){}Xy.prototype.create=function(a,b){return new Wy(a,b)};ix("spacer",new Xy);function Yy(a,b){function c(l){return Jw(h.h[l],!1)+" (m)"}function d(l){return Math.round(h.h[l]/1E3)+" (kbits/s)"}function e(l){return h.h[l].toFixed(2)+" (s)"}function f(l){return h.h[l]+" (frames)"}function g(l){return h.h[l]+" (px)"}W.call(this,a,b);var h=this;this.i=ek();this.i.classList.add("shaka-statistics-button");this.j=R("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);var k=R("label");k.classList.add("shaka-overflow-button-label");
1097
+ document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){dy(c)})}qa(ay,W);function cy(a){var b;I(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=F(c);a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));z(c)})}
1098
+ function by(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")}
1099
+ function dy(a){I(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.D(0);if(!a.player||!a.player.ec())return X(a.g,!0),b.D(0);X(a.g,!1);return document.pictureInPictureElement?u(b,document.exitPictureInPicture(),0):b.D(0)})}J("shaka.ui.PipButton",ay);function ey(){}ey.prototype.create=function(a,b){return new ay(a,b)};ix("picture_in_picture",new ey);Mw("picture_in_picture",new ey);ww("picture_in_picture",new ey);function fy(a,b){zx.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.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){gy(c)});this.eventManager.o(this.localization,"locale-changed",function(){gy(c)});this.eventManager.o(this.player,"ratechange",function(){hy(c,c.player.zb())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
1100
+ "x",d]}));gy(this);iy(this);hy(this,this.player.zb())}qa(fy,zx);function gy(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")}
1101
+ function hy(a,b){var c=jw(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(lw()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1102
+ "x")}function iy(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={uc:b.uc},d=c.next()){b.uc=d.value;d=fk();var e=R("span");e.textContent=b.uc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.uc);a.video.defaultPlaybackRate=a.g.get(f.uc)}}(b));a.menu.appendChild(d)}kw(a.menu)}J("shaka.ui.PlaybackRateSelection",fy);function jy(){}jy.prototype.create=function(a,b){return new fy(a,b)};ix("playback_rate",new jy);Mw("playback_rate",new jy);function ky(a,b){W.call(this,a,b);var c=this;this.g=fk();this.g.classList.add("shaka-current-time");ly(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.U()&&(c.video.currentTime=c.player.Ia().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.qf(),f=c.video.duration,g=c.player.Ia(),h=g.end-g.start;c.player.U()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(ly(c,"- "+mw(e,f)),c.g.disabled=
1103
+ !1):(ly(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=mw(e,d),f&&(e+=" / "+mw(f,d)),ly(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.U()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}qa(ky,W);function ly(a,b){b!=a.g.textContent&&(a.g.textContent=b)}J("shaka.ui.PresentationTimeTracker",ky);function my(){}my.prototype.create=function(a,b){return new ky(a,b)};Mw("time_and_duration",new my);function ny(a,b){zx.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){oy(c)});this.eventManager.o(this.localization,"locale-changed",function(){oy(c)});this.eventManager.o(this.player,"variantchanged",function(){py(c)});this.eventManager.o(this.player,"trackschanged",function(){py(c)});this.eventManager.o(this.player,
1104
+ "abrstatuschanged",function(){py(c)});py(this)}qa(ny,zx);
1105
+ function py(a){var b=a.player.Qa(),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(a.player.ec()?b.findIndex(function(m){return m.bandwidth==k.bandwidth}):b.findIndex(function(m){return m.height==k.height}))==l});a.player.ec()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=iw(a.menu);gk(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;
1106
+ for(var e={},f=t(b),g=f.next();!g.done;e={Xb:e.Xb},g=f.next()){e.Xb=g.value;g=fk();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.Xb;a.player.configure({abr:{enabled:!1}});a.player.Ae(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=a.player.ec()?Math.round(e.Xb.bandwidth/1E3)+" kbits/s":e.Xb.height+"p";g.appendChild(h);d||e.Xb!=c||(g.ariaSelected="true",g.appendChild(lw()),h.classList.add("shaka-chosen-item"),
1107
+ a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=fk();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});py(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(lw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",
1108
+ a.currentSelection.textContent);a.menu.appendChild(e);kw(a.menu);a.controls.dispatchEvent(new L("resolutionselectionupdated"));oy(a)}
1109
+ function oy(a){var b=a.player.ec()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);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",ny);function qy(){}
1110
+ qy.prototype.create=function(a,b){return new ny(a,b)};ix("quality",new qy);Mw("quality",new qy);function ry(a,b){W.call(this,a,b);var c=this;this.g=fk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);sy(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){sy(c)});this.eventManager.o(this.localization,"locale-changed",function(){sy(c)});
1111
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.zb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Oe(d);c.g.setAttribute("shaka-status",d+"x")}})}qa(ry,W);function sy(a){a.g.ariaLabel=a.localization.resolve("REWIND")}J("shaka.ui.RewindButton",ry);function ty(){}ty.prototype.create=function(a,b){return new ry(a,b)};Mw("rewind",new ty);function uy(a,b){W.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=fk();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);vy(this);this.i=new P(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1112
+ d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){vy(c)});this.eventManager.o(this.localization,"locale-changed",function(){vy(c)});this.eventManager.o(this.adManager,"ad-started",function(){wy(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),X(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;X(c.g,!1);X(c.h,!1)});this.eventManager.o(this.g,
1113
+ "click",function(){c.ad.skip()});this.ad&&wy(this)}qa(uy,W);uy.prototype.release=function(){this.i.stop();this.i=null;W.prototype.release.call(this)};function vy(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function wy(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.xa(),a.i.ka(.5))}J("shaka.ui.SkipAdButton",uy);function xy(a,b){qw.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}qa(xy,qw);xy.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};xy.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)}};
1114
+ J("shaka.ui.SmallPlayButton",xy);function yy(){}yy.prototype.create=function(a,b){return new xy(a,b)};Mw("play_pause",new yy);function zy(a,b){W.call(this,a,b);var c=R("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}qa(zy,W);J("shaka.ui.Spacer",zy);function Ay(){}Ay.prototype.create=function(a,b){return new zy(a,b)};Mw("spacer",new Ay);function By(a,b){function c(l){return mw(h.h[l],!1)+" (m)"}function d(l){return Math.round(h.h[l]/1E3)+" (kbits/s)"}function e(l){return h.h[l].toFixed(2)+" (s)"}function f(l){return h.h[l]+" (frames)"}function g(l){return h.h[l]+" (px)"}W.call(this,a,b);var h=this;this.i=fk();this.i.classList.add("shaka-statistics-button");this.j=R("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);var k=R("label");k.classList.add("shaka-overflow-button-label");
1112
1115
  this.A=R("span");k.appendChild(this.A);this.m=R("span");this.m.classList.add("shaka-current-selection-span");k.appendChild(this.m);this.i.appendChild(k);this.parent.appendChild(this.i);this.g=R("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-statistics-container");this.g.classList.add("shaka-hidden");this.controls.g.appendChild(this.g);this.F=[];this.G=["stateHistory","switchHistory"];this.h=this.player.getStats();
1113
- this.B={};this.C={width:g,height:g,completionPercent:function(l){return h.h[l]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f};this.l=new P(function(){h.h=h.player.getStats();for(var l=r(h.F),m=l.next();!m.done;m=l.next())m=m.value,h.B[m].textContent=h.C[m](m)});Zy(this);$y(this);this.eventManager.o(this.localization,
1114
- "locale-updated",function(){Zy(h)});this.eventManager.o(this.localization,"locale-changed",function(){Zy(h)});this.eventManager.o(this.i,"click",function(){X(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ka(.1),X(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),X(h.g,!1));Zy(h)})}qa(Yy,W);
1115
- function Zy(a){a.A.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
1116
- function $y(a){for(var b=r(a.controls.i.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=R("div"),h=R("label");h.textContent=c+":";g.appendChild(h);h=R("span");h.textContent=f.C[c](c);g.appendChild(h);f.B[c]=h;e.call(d,g);a.F.push(c)}else Ta("Unrecognized statistic element:",c)}Yy.prototype.release=function(){this.l.stop();this.l=null;W.prototype.release.call(this)};J("shaka.ui.StatisticsButton",Yy);function az(){}
1117
- az.prototype.create=function(a,b){return new Yy(a,b)};Fx("statistics",new az);Tw("statistics",new az);function bz(a,b){Wx.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Nb()?this.button.ariaPressed="true":this.button.ariaPressed="false";cz(this);this.eventManager.o(this.localization,"locale-updated",function(){dz(c);ez(c)});this.eventManager.o(this.localization,"locale-changed",function(){dz(c);ez(c)});this.eventManager.o(this.player,
1118
- "texttrackvisibility",function(){fz(c);ez(c)});this.eventManager.o(this.player,"textchanged",function(){ez(c)});this.eventManager.o(this.player,"trackschanged",function(){gz(c)});fz(this);dz(this);ez(this);gz(this)}qa(bz,Wx);function cz(a){var b=ek();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(Iw());a.g=R("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1119
- function fz(a){a.player.Nb()?(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption",a.button.ariaPressed="false");a.controls.dispatchEvent(new L("captionselectionupdated"))}
1120
- function ez(a){var b=a.player.Ab();Ux(b,a.menu,function(c){return hz(a,c)},a.player.Nb(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=ek();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Ge(!1);ez(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Nb()||(b.ariaSelected="true",b.appendChild(Iw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
1121
- a.currentSelection.textContent);Hw(a.menu);a.controls.dispatchEvent(new L("captionselectionupdated"))}function hz(a,b){return I(function(c){a.player.xe(b);return u(c,a.player.Ge(!0),0)})}function dz(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")}
1122
- function gz(a){var b=0<a.player.Ab().length;X(a.button,b);ez(a)}J("shaka.ui.TextSelection",bz);function iz(){}iz.prototype.create=function(a,b){return new bz(a,b)};Fx("captions",new iz);ix("captions",new iz);function jz(a,b){Vw.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.i;this.eventManager.o(this.video,"volumechange",function(){return kz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return lz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return lz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return kz(c)});this.eventManager.o(this.localization,"locale-updated",function(){return mz(c)});
1123
- this.eventManager.o(this.localization,"locale-changed",function(){return mz(c)});kz(this);mz(this);if(this.ad)this.onChange()}qa(jz,Vw);jz.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function kz(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);nz(a)}function lz(a){var b=a.ad.getVolume();a.setValue(b);nz(a)}
1124
- function nz(a){var b=a.h.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 mz(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}J("shaka.ui.VolumeBar",jz);function oz(){}oz.prototype.create=function(a,b){return new jz(a,b)};ix("volume",new oz);}).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})();
1116
+ this.B={};this.C={width:g,height:g,completionPercent:function(l){return h.h[l]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f,stallsDetected:function(l){return h.h[l]+" (stalls)"},gapsJumped:function(l){return h.h[l]+" (gaps)"}};this.l=new P(function(){h.h=h.player.getStats();for(var l=t(h.F),m=l.next();!m.done;m=
1117
+ l.next())m=m.value,h.B[m].textContent=h.C[m](m)});Cy(this);Dy(this);this.eventManager.o(this.localization,"locale-updated",function(){Cy(h)});this.eventManager.o(this.localization,"locale-changed",function(){Cy(h)});this.eventManager.o(this.i,"click",function(){X(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ka(.1),X(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),X(h.g,!1));Cy(h)})}qa(By,W);
1118
+ function Cy(a){a.A.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
1119
+ function Dy(a){for(var b=t(a.controls.i.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=R("div"),h=R("label");h.textContent=c+":";g.appendChild(h);h=R("span");h.textContent=f.C[c](c);g.appendChild(h);f.B[c]=h;e.call(d,g);a.F.push(c)}else Ua("Unrecognized statistic element:",c)}By.prototype.release=function(){this.l.stop();this.l=null;W.prototype.release.call(this)};J("shaka.ui.StatisticsButton",By);function Ey(){}
1120
+ Ey.prototype.create=function(a,b){return new By(a,b)};ix("statistics",new Ey);ww("statistics",new Ey);function Fy(a,b){zx.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Nb()?this.button.ariaPressed="true":this.button.ariaPressed="false";Gy(this);this.eventManager.o(this.localization,"locale-updated",function(){Hy(c);Iy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Hy(c);Iy(c)});this.eventManager.o(this.player,
1121
+ "texttrackvisibility",function(){Jy(c);Iy(c)});this.eventManager.o(this.player,"textchanged",function(){Iy(c)});this.eventManager.o(this.player,"trackschanged",function(){Ky(c)});Jy(this);Hy(this);Iy(this);Ky(this)}qa(Fy,zx);function Gy(a){var b=fk();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(lw());a.g=R("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1122
+ function Jy(a){a.player.Nb()?(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption",a.button.ariaPressed="false");a.controls.dispatchEvent(new L("captionselectionupdated"))}
1123
+ function Iy(a){var b=a.player.Ab();xx(b,a.menu,function(c){return Ly(a,c)},a.player.Nb(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=fk();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Ie(!1);Iy(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Nb()||(b.ariaSelected="true",b.appendChild(lw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
1124
+ a.currentSelection.textContent);kw(a.menu);a.controls.dispatchEvent(new L("captionselectionupdated"))}function Ly(a,b){return I(function(c){a.player.ze(b);return u(c,a.player.Ie(!0),0)})}function Hy(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")}
1125
+ function Ky(a){var b=0<a.player.Ab().length;X(a.button,b);Iy(a)}J("shaka.ui.TextSelection",Fy);function My(){}My.prototype.create=function(a,b){return new Fy(a,b)};ix("captions",new My);Mw("captions",new My);function Ny(a,b){yw.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.i;this.eventManager.o(this.video,"volumechange",function(){return Oy(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return Py(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return Py(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return Oy(c)});this.eventManager.o(this.localization,"locale-updated",function(){return Qy(c)});
1126
+ this.eventManager.o(this.localization,"locale-changed",function(){return Qy(c)});Oy(this);Qy(this);if(this.ad)this.onChange()}qa(Ny,yw);Ny.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function Oy(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);Ry(a)}function Py(a){var b=a.ad.getVolume();a.setValue(b);Ry(a)}
1127
+ function Ry(a){var b=a.h.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 Qy(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}J("shaka.ui.VolumeBar",Ny);function Sy(){}Sy.prototype.create=function(a,b){return new Ny(a,b)};Mw("volume",new Sy);}).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})();
1125
1128
 
1126
1129
  //# sourceMappingURL=shaka-player.ui.map