shaka-player 4.3.14 → 4.3.16

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 (75) hide show
  1. package/.github/workflows/appspot.yaml +4 -4
  2. package/.github/workflows/build-and-test.yaml +23 -10
  3. package/.github/workflows/custom-actions/set-commit-status/action.yaml +29 -7
  4. package/.github/workflows/demo-version-index.yaml +3 -3
  5. package/.github/workflows/nightly-demo.yaml +4 -4
  6. package/.github/workflows/release-please.yaml +25 -24
  7. package/.github/workflows/report-incremental-coverage.yaml +1 -1
  8. package/.github/workflows/selenium-lab-tests.yaml +30 -18
  9. package/.github/workflows/shaka-bot-commands/lib.sh +37 -12
  10. package/.github/workflows/shaka-bot-commands/main.sh +4 -2
  11. package/.github/workflows/sync-labels.yaml +1 -1
  12. package/.github/workflows/talk-to-shaka-bot.yaml +2 -1
  13. package/.github/workflows/update-issues.yaml +1 -1
  14. package/.github/workflows/update-screenshots.yaml +25 -38
  15. package/CHANGELOG.md +37 -0
  16. package/demo/demo.less +1 -5
  17. package/dist/controls.css +1 -1
  18. package/dist/controls.css.map +1 -1
  19. package/dist/demo.css +1 -1
  20. package/dist/demo.css.map +1 -1
  21. package/dist/deps.js +0 -1
  22. package/dist/locales.js +32 -32
  23. package/dist/shaka-player.compiled.d.ts +6 -10
  24. package/dist/shaka-player.compiled.debug.d.ts +6 -10
  25. package/dist/shaka-player.compiled.debug.externs.js +13 -11
  26. package/dist/shaka-player.compiled.debug.js +222 -217
  27. package/dist/shaka-player.compiled.debug.map +4 -4
  28. package/dist/shaka-player.compiled.externs.js +13 -11
  29. package/dist/shaka-player.compiled.js +855 -853
  30. package/dist/shaka-player.compiled.map +4 -4
  31. package/dist/shaka-player.ui.d.ts +6 -10
  32. package/dist/shaka-player.ui.debug.d.ts +6 -10
  33. package/dist/shaka-player.ui.debug.externs.js +13 -11
  34. package/dist/shaka-player.ui.debug.js +171 -167
  35. package/dist/shaka-player.ui.debug.map +4 -4
  36. package/dist/shaka-player.ui.externs.js +13 -11
  37. package/dist/shaka-player.ui.js +950 -948
  38. package/dist/shaka-player.ui.map +4 -4
  39. package/docs/tutorials/faq.md +25 -0
  40. package/docs/tutorials/offline.md +3 -0
  41. package/docs/tutorials/ui.md +4 -4
  42. package/externs/shaka/player.js +32 -19
  43. package/lib/cast/cast_proxy.js +1 -3
  44. package/lib/cast/cast_sender.js +8 -11
  45. package/lib/cea/cea608_memory.js +1 -1
  46. package/lib/dash/dash_parser.js +3 -0
  47. package/lib/dash/segment_template.js +5 -0
  48. package/lib/deprecate/deprecate.js +1 -1
  49. package/lib/hls/hls_parser.js +34 -17
  50. package/lib/media/drm_engine.js +17 -3
  51. package/lib/media/manifest_parser.js +2 -1
  52. package/lib/media/presentation_timeline.js +23 -0
  53. package/lib/media/segment_index.js +10 -0
  54. package/lib/media/streaming_engine.js +1 -13
  55. package/lib/player.js +19 -5
  56. package/lib/polyfill/mediasource.js +5 -36
  57. package/lib/text/ui_text_displayer.js +10 -1
  58. package/lib/text/vtt_text_parser.js +2 -1
  59. package/lib/util/error.js +1 -0
  60. package/lib/util/manifest_parser_utils.js +1 -0
  61. package/lib/util/stream_utils.js +8 -5
  62. package/package.json +2 -2
  63. package/test/cast/cast_proxy_unit.js +0 -46
  64. package/test/cast/cast_sender_unit.js +26 -26
  65. package/test/cea/cea608_memory_unit.js +3 -2
  66. package/test/hls/hls_live_unit.js +52 -0
  67. package/test/hls/hls_parser_unit.js +28 -0
  68. package/test/media/media_source_engine_integration.js +1 -1
  69. package/test/player_integration.js +9 -1
  70. package/test/player_load_graph_integration.js +13 -7
  71. package/test/player_src_equals_integration.js +2 -2
  72. package/test/player_unit.js +22 -4
  73. package/test/text/vtt_text_parser_unit.js +31 -0
  74. package/ui/less/containers.less +1 -0
  75. package/lib/polyfill/storage_estimate.js +0 -57
@@ -16,53 +16,53 @@
16
16
  SPDX-License-Identifier: Apache-2.0
17
17
  */
18
18
  var r;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
19
- 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 fa=ca(this);function ha(a,b){if(b)a:{var c=fa;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b})}}
19
+ 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 ha(a,b){if(b)a:{var c=da;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b})}}
20
20
  ha("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});
21
- ha("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=fa[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ja(aa(this))}})}return a});function ja(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
22
- function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ka(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 la="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},na;
23
- if("function"==typeof Object.setPrototypeOf)na=Object.setPrototypeOf;else{var oa;a:{var qa={a:!0},ra={};try{ra.__proto__=qa;oa=ra.a;break a}catch(a){}oa=!1}na=oa?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var sa=na;
24
- function ta(a,b){a.prototype=la(b.prototype);a.prototype.constructor=a;if(sa)sa(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.Ch=b.prototype}function ua(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function va(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ua.prototype.s=function(a){this.h=a};
25
- function wa(a,b){a.i={Je:b,Qe:!0};a.g=a.m||a.j}ua.prototype.return=function(a){this.i={return:a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ua.prototype.B=function(a){this.g=a};function B(a){a.g=0}function xa(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ya(a){a.m=0;a.j=2}function za(a,b){a.g=b;a.m=0}function Aa(a){a.m=0;var b=a.i.Je;a.i=null;return b}function Ba(a){a.u=[a.i];a.m=0;a.j=0}
26
- function Da(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.Qe?a.g=a.m||a.j:void 0!=c.B&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function Ea(a){this.g=new ua;this.h=a}function Fa(a,b){va(a.g);var c=a.g.l;if(c)return Ga(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ha(a)}
27
- function Ga(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,wa(a.g,g),Ha(a)}a.g.l=null;d.call(a.g,f);return Ha(a)}function Ha(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,wa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Qe)throw b.Je;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
28
- function Ia(a){this.next=function(b){va(a.g);a.g.l?b=Ga(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ha(a));return b};this.throw=function(b){va(a.g);a.g.l?b=Ga(a,a.g.l["throw"],b,a.g.s):(wa(a.g,b),b=Ha(a));return b};this.return=function(b){return Fa(a,b)};this[Symbol.iterator]=function(){return this}}function Ja(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())})}
29
- function D(a){return Ja(new Ia(new Ea(a)))}function Na(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
30
- ha("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=fa.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=
21
+ ha("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 ia(aa(this))}})}return a});function ia(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
22
+ function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ka(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 la="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ma;
23
+ if("function"==typeof Object.setPrototypeOf)ma=Object.setPrototypeOf;else{var oa;a:{var pa={a:!0},ra={};try{ra.__proto__=pa;oa=ra.a;break a}catch(a){}oa=!1}ma=oa?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var sa=ma;
24
+ function ta(a,b){a.prototype=la(b.prototype);a.prototype.constructor=a;if(sa)sa(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.Dh=b.prototype}function ua(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function va(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ua.prototype.s=function(a){this.h=a};
25
+ function wa(a,b){a.i={Ie:b,Pe:!0};a.g=a.m||a.j}ua.prototype.return=function(a){this.i={return:a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ua.prototype.B=function(a){this.g=a};function B(a){a.g=0}function xa(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ya(a){a.m=0;a.j=2}function za(a,b){a.g=b;a.m=0}function Aa(a){a.m=0;var b=a.i.Ie;a.i=null;return b}function Ba(a){a.u=[a.i];a.m=0;a.j=0}
26
+ function Ca(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.Pe?a.g=a.m||a.j:void 0!=c.B&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function Da(a){this.g=new ua;this.h=a}function Ea(a,b){va(a.g);var c=a.g.l;if(c)return Fa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ga(a)}
27
+ function Fa(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,wa(a.g,g),Ga(a)}a.g.l=null;d.call(a.g,f);return Ga(a)}function Ga(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,wa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Pe)throw b.Ie;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
28
+ function Ha(a){this.next=function(b){va(a.g);a.g.l?b=Fa(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ga(a));return b};this.throw=function(b){va(a.g);a.g.l?b=Fa(a,a.g.l["throw"],b,a.g.s):(wa(a.g,b),b=Ga(a));return b};this.return=function(b){return Ea(a,b)};this[Symbol.iterator]=function(){return this}}function Ia(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
29
+ function D(a){return Ia(new Ha(new Da(a)))}function Ja(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
30
+ ha("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
31
31
  g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.H(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.D(g):this.m(g)}};
32
- b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.J(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.u()};b.prototype.G=function(){var g=this;e(function(){if(g.A()){var h=fa.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.A=
33
- function(){if(this.o)return!1;var g=fa.CustomEvent,h=fa.Event,k=fa.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=fa.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.u=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
34
- b.prototype.H=function(g){var h=this.j();g.Pc(h.resolve,h.reject)};b.prototype.J=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,q){return"function"==typeof p?function(v){try{l(p(v))}catch(w){m(w)}}:q}var l,m,n=new b(function(p,q){l=p;m=q});this.Pc(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Pc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
35
- break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).Pc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(w){p[v]=w;q--;0==q&&l(p)}}var p=[],q=0;do p.push(void 0),q++,d(k.value).Pc(n(p.length-1),m),k=h.next();
36
- while(!k.done)})};return b});function Oa(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
37
- ha("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(!Oa(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({}),
38
- 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(!Oa(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Oa(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Oa(k,
39
- g)&&Oa(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Oa(k,g)&&Oa(k[g],this.g)?delete k[g][this.g]:!1};return b});
40
- ha("Map",function(a){function b(){var h={};return h.Ua=h.next=h.head=h}function c(h,k){var l=h.g;return ja(function(){if(l){for(;l.head!=h.g;)l=l.Ua;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&&Oa(h.h,l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,ia:n}}return{id:l,
41
- list:m,index:-1,ia: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||
42
- "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.ia?l.ia.value=k:(l.ia={next:this.g,Ua:this.g.Ua,head:this.g,key:h,value:k},l.list.push(l.ia),this.g.Ua.next=l.ia,this.g.Ua=l.ia,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.ia&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ia.Ua.next=h.ia.next,h.ia.next.Ua=h.ia.Ua,
43
- h.ia.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Ua=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ia};e.prototype.get=function(h){return(h=d(this,h).ia)&&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(),
32
+ b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.J(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.u()};b.prototype.G=function(){var g=this;e(function(){if(g.A()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.A=
33
+ function(){if(this.o)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.u=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
34
+ b.prototype.H=function(g){var h=this.j();g.Oc(h.resolve,h.reject)};b.prototype.J=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,q){return"function"==typeof p?function(v){try{l(p(v))}catch(w){m(w)}}:q}var l,m,n=new b(function(p,q){l=p;m=q});this.Oc(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Oc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
35
+ break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).Oc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(w){p[v]=w;q--;0==q&&l(p)}}var p=[],q=0;do p.push(void 0),q++,d(k.value).Oc(n(p.length-1),m),k=h.next();
36
+ while(!k.done)})};return b});function Ma(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
37
+ ha("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(!Ma(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({}),
38
+ 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(!Ma(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ma(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ma(k,
39
+ g)&&Ma(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ma(k,g)&&Ma(k[g],this.g)?delete k[g][this.g]:!1};return b});
40
+ ha("Map",function(a){function b(){var h={};return h.Ta=h.next=h.head=h}function c(h,k){var l=h.g;return ia(function(){if(l){for(;l.head!=h.g;)l=l.Ta;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&&Ma(h.h,l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,ha:n}}return{id:l,
41
+ list:m,index:-1,ha: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||
42
+ "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.ha?l.ha.value=k:(l.ha={next:this.g,Ta:this.g.Ta,head:this.g,key:h,value:k},l.list.push(l.ha),this.g.Ta.next=l.ha,this.g.Ta=l.ha,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.ha&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ha.Ta.next=h.ha.next,h.ha.next.Ta=h.ha.Ta,
43
+ h.ha.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Ta=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ha};e.prototype.get=function(h){return(h=d(this,h).ha)&&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(),
44
44
  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});
45
45
  ha("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||
46
46
  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;b.prototype[Symbol.iterator]=
47
- b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Pa(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{Oe:e,v:f}}return{Oe:-1,v:void 0}}ha("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Pa(this,b,c).Oe}});ha("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
48
- ha("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});function Ra(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+""}
49
- ha("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ra(this,b,"includes").indexOf(b,c||0)}});ha("Array.prototype.find",function(a){return a?a:function(b,c){return Pa(this,b,c).v}});ha("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Ra(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});
50
- function Sa(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}ha("Array.prototype.keys",function(a){return a?a:function(){return Sa(this,function(b){return b})}});var Ua="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)Oa(d,e)&&(a[e]=d[e])}return a};
51
- ha("Object.assign",function(a){return a||Ua});ha("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}});ha("Array.prototype.values",function(a){return a?a:function(){return Sa(this,function(b,c){return c})}});
47
+ b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Na(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{Ne:e,v:f}}return{Ne:-1,v:void 0}}ha("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Na(this,b,c).Ne}});ha("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
48
+ ha("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});function Oa(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+""}
49
+ ha("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Oa(this,b,"includes").indexOf(b,c||0)}});ha("Array.prototype.find",function(a){return a?a:function(b,c){return Na(this,b,c).v}});ha("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Oa(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});
50
+ function Qa(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}ha("Array.prototype.keys",function(a){return a?a:function(){return Qa(this,function(b){return b})}});var Sa="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)Ma(d,e)&&(a[e]=d[e])}return a};
51
+ ha("Object.assign",function(a){return a||Sa});ha("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}});ha("Array.prototype.values",function(a){return a?a:function(){return Qa(this,function(b,c){return c})}});
52
52
  ha("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});
53
53
  ha("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b});
54
- ha("Array.prototype.entries",function(a){return a?a:function(){return Sa(this,function(b,c){return[b,c]})}});ha("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});ha("String.prototype.repeat",function(a){return a?a:function(b){var c=Ra(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});
55
- ha("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Oa(b,d)&&c.push(b[d]);return c}});ha("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});ha("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});ha("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Oa(b,d)&&c.push([d,b[d]]);return c}});var Va=this||self;
56
- function G(a,b){a=a.split(".");var c=Va;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};function Wa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Wa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Xa(a){return a.h/(1-Math.pow(a.g,a.i))};function Za(){this.h=new Wa(2);this.j=new Wa(5);this.g=0;this.i=128E3;this.l=16E3}Za.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)};Za.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Za.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Xa(this.h),Xa(this.j))};function $a(){}function bb(){}function cb(){}function db(a){var b=Na.apply(1,arguments);eb.has(a)||(eb.add(a),cb.apply($a,ka(b)))}function fb(){}function gb(){}function hb(){}function ib(){}var eb=new Set;window.console&&(cb=function(){return console.warn.apply(console,ka(Na.apply(0,arguments)))},bb=function(){console.error.apply(console,ka(Na.apply(0,arguments)))});function jb(a){if(kb.has(a))return kb.get(a);var b=MediaSource.isTypeSupported(a);kb.set(a,b);return b}var kb=new Map;function lb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function mb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function nb(a,b,c){c||(c=lb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={rd:d.rd},e=a.next()){d.rd=e.value;e=b.findIndex(function(f){return function(g){return c(f.rd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
57
- function ob(a,b,c){c||(c=lb);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 pb(a,b,c){this.startTime=a;this.direction=qb;this.endTime=b;this.payload=c;this.region=new rb;this.position=null;this.positionAlign=sb;this.size=0;this.textAlign=tb;this.writingMode=ub;this.lineInterpretation=vb;this.line=null;this.lineHeight="";this.lineAlign=wb;this.displayAlign=xb;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=yb;this.fontStyle=zb;this.linePadding=this.letterSpacing=
58
- 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}}pb.prototype.clone=function(){var a=new pb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
59
- function Ab(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(!ob(a.nestedCues,b.nestedCues,Ab))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(!ob(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}G("shaka.text.Cue",pb);var sb="auto";
60
- pb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:sb};var tb="center",Bb={LEFT:"left",RIGHT:"right",CENTER:tb,START:"start",END:"end"};pb.textAlign=Bb;var xb="after",Cb={BEFORE:"before",CENTER:"center",AFTER:xb};pb.displayAlign=Cb;var qb="ltr";pb.direction={HORIZONTAL_LEFT_TO_RIGHT:qb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var ub="horizontal-tb";pb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:ub,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var vb=0;
61
- pb.lineInterpretation={LINE_NUMBER:vb,PERCENTAGE:1};var wb="start",Db={CENTER:"center",START:wb,END:"end"};pb.lineAlign=Db;var Eb={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};pb.defaultTextColor=Eb;var Fb={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};pb.defaultTextBackgroundColor=Fb;var yb=400;pb.fontWeight={NORMAL:yb,BOLD:700};
62
- var zb="normal",Hb={NORMAL:zb,ITALIC:"italic",OBLIQUE:"oblique"};pb.fontStyle=Hb;pb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function rb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Ib;this.scroll=Jb}G("shaka.text.CueRegion",rb);var Ib=1;rb.units={PX:0,PERCENTAGE:Ib,LINES:2};var Jb="";rb.scrollMode={NONE:Jb,UP:"up"};function Kb(){}function Lb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Mb(a)==Mb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Nb(a);b=Nb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Mb(a){return a instanceof ArrayBuffer?a:a.buffer}function Ob(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
63
- function Nb(a,b,c){c=void 0===c?Infinity:c;return Pb(a,void 0===b?0:b,c,Uint8Array)}function Qb(a,b,c){c=void 0===c?Infinity:c;return Pb(a,void 0===b?0:b,c,Uint16Array)}function Rb(a,b,c){c=void 0===c?Infinity:c;return Pb(a,void 0===b?0:b,c,DataView)}function Pb(a,b,c,d){var e=Mb(a),f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}
64
- G("shaka.util.BufferUtils",Kb);Kb.toDataView=Rb;Kb.toUint16=Qb;Kb.toUint8=Nb;Kb.toArrayBuffer=Ob;Kb.equal=Lb;function L(a,b,c){var d=Na.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}L.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};G("shaka.util.Error",L);L.Severity={RECOVERABLE:1,CRITICAL:2};L.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
65
- L.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,
54
+ ha("Array.prototype.entries",function(a){return a?a:function(){return Qa(this,function(b,c){return[b,c]})}});ha("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});ha("String.prototype.repeat",function(a){return a?a:function(b){var c=Oa(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});
55
+ ha("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ma(b,d)&&c.push(b[d]);return c}});ha("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});ha("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});ha("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ma(b,d)&&c.push([d,b[d]]);return c}});var Ta=this||self;
56
+ function G(a,b){a=a.split(".");var c=Ta;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};function Ua(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Ua.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Va(a){return a.h/(1-Math.pow(a.g,a.i))};function Wa(){this.h=new Ua(2);this.j=new Ua(5);this.g=0;this.i=128E3;this.l=16E3}Wa.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)};Wa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Wa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Va(this.h),Va(this.j))};function Za(){}function ab(){}function bb(){}function cb(a){var b=Ja.apply(1,arguments);db.has(a)||(db.add(a),bb.apply(Za,ka(b)))}function eb(){}function fb(){}function gb(){}function hb(){}var db=new Set;window.console&&(bb=function(){return console.warn.apply(console,ka(Ja.apply(0,arguments)))},ab=function(){console.error.apply(console,ka(Ja.apply(0,arguments)))});function ib(a){if(jb.has(a))return jb.get(a);var b=MediaSource.isTypeSupported(a);jb.set(a,b);return b}var jb=new Map;function kb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function lb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function mb(a,b,c){c||(c=kb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={rd:d.rd},e=a.next()){d.rd=e.value;e=b.findIndex(function(f){return function(g){return c(f.rd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
57
+ function nb(a,b,c){c||(c=kb);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 ob(a,b,c){this.startTime=a;this.direction=pb;this.endTime=b;this.payload=c;this.region=new qb;this.position=null;this.positionAlign=rb;this.size=0;this.textAlign=sb;this.writingMode=tb;this.lineInterpretation=ub;this.line=null;this.lineHeight="";this.lineAlign=vb;this.displayAlign=wb;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=xb;this.fontStyle=yb;this.linePadding=this.letterSpacing=
58
+ 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}}ob.prototype.clone=function(){var a=new ob(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
59
+ function zb(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(!nb(a.nestedCues,b.nestedCues,zb))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(!nb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}G("shaka.text.Cue",ob);var rb="auto";
60
+ ob.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:rb};var sb="center",Ab={LEFT:"left",RIGHT:"right",CENTER:sb,START:"start",END:"end"};ob.textAlign=Ab;var wb="after",Bb={BEFORE:"before",CENTER:"center",AFTER:wb};ob.displayAlign=Bb;var pb="ltr";ob.direction={HORIZONTAL_LEFT_TO_RIGHT:pb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var tb="horizontal-tb";ob.writingMode={HORIZONTAL_TOP_TO_BOTTOM:tb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var ub=0;
61
+ ob.lineInterpretation={LINE_NUMBER:ub,PERCENTAGE:1};var vb="start",Cb={CENTER:"center",START:vb,END:"end"};ob.lineAlign=Cb;var Db={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};ob.defaultTextColor=Db;var Eb={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};ob.defaultTextBackgroundColor=Eb;var xb=400;ob.fontWeight={NORMAL:xb,BOLD:700};
62
+ var yb="normal",Fb={NORMAL:yb,ITALIC:"italic",OBLIQUE:"oblique"};ob.fontStyle=Fb;ob.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function qb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Hb;this.scroll=Ib}G("shaka.text.CueRegion",qb);var Hb=1;qb.units={PX:0,PERCENTAGE:Hb,LINES:2};var Ib="";qb.scrollMode={NONE:Ib,UP:"up"};function Jb(){}function Kb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Lb(a)==Lb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Mb(a);b=Mb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Lb(a){return a instanceof ArrayBuffer?a:a.buffer}function Nb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
63
+ function Mb(a,b,c){c=void 0===c?Infinity:c;return Ob(a,void 0===b?0:b,c,Uint8Array)}function Pb(a,b,c){c=void 0===c?Infinity:c;return Ob(a,void 0===b?0:b,c,Uint16Array)}function Qb(a,b,c){c=void 0===c?Infinity:c;return Ob(a,void 0===b?0:b,c,DataView)}function Ob(a,b,c,d){var e=Lb(a),f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}
64
+ G("shaka.util.BufferUtils",Jb);Jb.toDataView=Qb;Jb.toUint16=Pb;Jb.toUint8=Mb;Jb.toArrayBuffer=Nb;Jb.equal=Kb;function K(a,b,c){var d=Ja.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}K.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};G("shaka.util.Error",K);K.Severity={RECOVERABLE:1,CRITICAL:2};K.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
65
+ K.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,
66
66
  CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_SRC_EQUALS:2016,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,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,
67
67
  WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,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,
68
68
  DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,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,
@@ -74,918 +74,920 @@ LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT
74
74
  Copyright 2008 The Closure Library Authors
75
75
  SPDX-License-Identifier: Apache-2.0
76
76
  */
77
- var Sb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
77
+ var Rb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
78
78
  @license
79
79
  Copyright 2006 The Closure Library Authors
80
80
  SPDX-License-Identifier: Apache-2.0
81
81
  */
82
- function Tb(a){var b;a instanceof Tb?(Ub(this,a.Ga),this.vb=a.vb,this.Ja=a.Ja,Vb(this,a.Pb),this.ta=a.ta,Wb(this,a.g.clone()),this.lb=a.lb):a&&(b=String(a).match(Sb))?(Ub(this,b[1]||"",!0),this.vb=Xb(b[2]||""),this.Ja=Xb(b[3]||"",!0),Vb(this,b[4]),this.ta=Xb(b[5]||"",!0),Wb(this,b[6]||"",!0),this.lb=Xb(b[7]||"")):this.g=new Yb(null)}r=Tb.prototype;r.Ga="";r.vb="";r.Ja="";r.Pb=null;r.ta="";r.lb="";
83
- r.toString=function(){var a=[],b=this.Ga;b&&a.push(Zb(b,$b,!0),":");if(b=this.Ja){a.push("//");var c=this.vb;c&&a.push(Zb(c,$b,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Pb;null!=b&&a.push(":",String(b))}if(b=this.ta)this.Ja&&"/"!=b.charAt(0)&&a.push("/"),a.push(Zb(b,"/"==b.charAt(0)?ac:bc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.lb)&&a.push("#",Zb(b,cc));return a.join("")};
84
- r.resolve=function(a){var b=this.clone();"data"===b.Ga&&(b=new Tb);var c=!!a.Ga;c?Ub(b,a.Ga):c=!!a.vb;c?b.vb=a.vb:c=!!a.Ja;c?b.Ja=a.Ja:c=null!=a.Pb;var d=a.ta;if(c)Vb(b,a.Pb);else if(c=!!a.ta){if("/"!=d.charAt(0))if(this.Ja&&!this.ta)d="/"+d;else{var e=b.ta.lastIndexOf("/");-1!=e&&(d=b.ta.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
85
- h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.ta=d:c=""!==a.g.toString();c?Wb(b,a.g.clone()):c=!!a.lb;c&&(b.lb=a.lb);return b};r.clone=function(){return new Tb(this)};function Ub(a,b,c){a.Ga=c?Xb(b,!0):b;a.Ga&&(a.Ga=a.Ga.replace(/:$/,""))}function Vb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Pb=b}else a.Pb=null}function Wb(a,b,c){b instanceof Yb?a.g=b:(c||(b=Zb(b,dc)),a.g=new Yb(b))}
86
- function Xb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Zb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,ec),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function ec(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var $b=/[#\/\?@]/g,bc=/[#\?:]/g,ac=/[#\?]/g,dc=/[#\?@]/g,cc=/#/g;function Yb(a){this.g=a||null}
87
- function fc(a){if(!a.oa&&(a.oa={},a.Sc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=Yb.prototype;r.oa=null;r.Sc=null;r.add=function(a,b){fc(this);this.g=null;var c=this.oa.hasOwnProperty(a)?this.oa[a]:null;c||(this.oa[a]=c=[]);c.push(b);this.Sc++;return this};
88
- r.set=function(a,b){fc(this);this.g=null;this.oa.hasOwnProperty(a)?this.oa[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.oa)return"";var a=[],b;for(b in this.oa)for(var c=encodeURIComponent(b),d=this.oa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};r.clone=function(){var a=new Yb;a.g=this.g;if(this.oa){var b={},c;for(c in this.oa)b[c]=this.oa[c].concat();a.oa=b;a.Sc=this.Sc}return a};function gc(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new Tb(a[0]);b=new Tb(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new Tb(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new Tb(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
89
- function hc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}function ic(a,b){if(1==b.length)return b[0];a=jc(a,b);if(null!=a)return a;throw new L(2,4,4025,b);}
90
- function jc(a,b){for(var c=t(kc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==lc?"":null}var lc="text",mc={ra:"video",jb:"audio",Z:lc,$b:"image",Lg:"application"},kc={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function nc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}nc.prototype.resolve=function(){};nc.prototype.reject=function(){};function oc(a){this.h=a;this.g=void 0}oc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function pc(a){this.h=a;this.g=null}pc.prototype.O=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 M(a){this.h=a;this.g=null}M.prototype.Rb=function(){this.stop();this.h();return this};M.prototype.O=function(a){var b=this;this.stop();this.g=(new pc(function(){b.h()})).O(a);return this};M.prototype.Fa=function(a){var b=this;this.stop();this.g=(new pc(function(){b.g.O(a);b.h()})).O(a);return this};M.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};G("shaka.util.Timer",M);M.prototype.stop=M.prototype.stop;M.prototype.tickEvery=M.prototype.Fa;M.prototype.tickAfter=M.prototype.O;
91
- M.prototype.tickNow=M.prototype.Rb;function qc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function rc(a){return""!=sc().canPlayType(a)}function tc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}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")}
82
+ function Sb(a){var b;a instanceof Sb?(Tb(this,a.Ga),this.wb=a.wb,this.Ja=a.Ja,Ub(this,a.Pb),this.sa=a.sa,Vb(this,a.g.clone()),this.lb=a.lb):a&&(b=String(a).match(Rb))?(Tb(this,b[1]||"",!0),this.wb=Wb(b[2]||""),this.Ja=Wb(b[3]||"",!0),Ub(this,b[4]),this.sa=Wb(b[5]||"",!0),Vb(this,b[6]||"",!0),this.lb=Wb(b[7]||"")):this.g=new Xb(null)}r=Sb.prototype;r.Ga="";r.wb="";r.Ja="";r.Pb=null;r.sa="";r.lb="";
83
+ r.toString=function(){var a=[],b=this.Ga;b&&a.push(Yb(b,Zb,!0),":");if(b=this.Ja){a.push("//");var c=this.wb;c&&a.push(Yb(c,Zb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Pb;null!=b&&a.push(":",String(b))}if(b=this.sa)this.Ja&&"/"!=b.charAt(0)&&a.push("/"),a.push(Yb(b,"/"==b.charAt(0)?$b:ac,!0));(b=this.g.toString())&&a.push("?",b);(b=this.lb)&&a.push("#",Yb(b,bc));return a.join("")};
84
+ r.resolve=function(a){var b=this.clone();"data"===b.Ga&&(b=new Sb);var c=!!a.Ga;c?Tb(b,a.Ga):c=!!a.wb;c?b.wb=a.wb:c=!!a.Ja;c?b.Ja=a.Ja:c=null!=a.Pb;var d=a.sa;if(c)Ub(b,a.Pb);else if(c=!!a.sa){if("/"!=d.charAt(0))if(this.Ja&&!this.sa)d="/"+d;else{var e=b.sa.lastIndexOf("/");-1!=e&&(d=b.sa.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(""):".."==
85
+ 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.sa=d:c=""!==a.g.toString();c?Vb(b,a.g.clone()):c=!!a.lb;c&&(b.lb=a.lb);return b};r.clone=function(){return new Sb(this)};function Tb(a,b,c){a.Ga=c?Wb(b,!0):b;a.Ga&&(a.Ga=a.Ga.replace(/:$/,""))}function Ub(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Pb=b}else a.Pb=null}function Vb(a,b,c){b instanceof Xb?a.g=b:(c||(b=Yb(b,cc)),a.g=new Xb(b))}
86
+ function Wb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Yb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,dc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function dc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Zb=/[#\/\?@]/g,ac=/[#\?:]/g,$b=/[#\?]/g,cc=/[#\?@]/g,bc=/#/g;function Xb(a){this.g=a||null}
87
+ function ec(a){if(!a.na&&(a.na={},a.Rc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=Xb.prototype;r.na=null;r.Rc=null;r.add=function(a,b){ec(this);this.g=null;var c=this.na.hasOwnProperty(a)?this.na[a]:null;c||(this.na[a]=c=[]);c.push(b);this.Rc++;return this};
88
+ r.set=function(a,b){ec(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.na)return"";var a=[],b;for(b in this.na)for(var c=encodeURIComponent(b),d=this.na[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};r.clone=function(){var a=new Xb;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.Rc=this.Rc}return a};function fc(a,b){if(0==b.length)return a;if(1==a.length&&1==b.length){var c=new Sb(a[0]);b=new Sb(b[0]);return[c.resolve(b).toString()]}b=b.map(function(g){return new Sb(g)});c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=new Sb(d.value);for(var e=t(b),f=e.next();!f.done;f=e.next())c.push(d.resolve(f.value).toString())}return c}
89
+ function gc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}function hc(a,b){if(1==b.length)return b[0];a=ic(a,b);if(null!=a)return a;throw new K(2,4,4025,b);}
90
+ function ic(a,b){for(var c=t(jc[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==kc?"":null}var kc="text",lc={qa:"video",ib:"audio",Y:kc,$b:"image",Mg:"application"},jc={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/,/^iamf/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};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.O=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 pc(a){this.h=a;this.g=null}pc.prototype.Rb=function(){this.stop();this.h();return this};pc.prototype.O=function(a){var b=this;this.stop();this.g=(new oc(function(){b.h()})).O(a);return this};pc.prototype.Fa=function(a){var b=this;this.stop();this.g=(new oc(function(){b.g.O(a);b.h()})).O(a);return this};pc.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};G("shaka.util.Timer",pc);pc.prototype.stop=pc.prototype.stop;pc.prototype.tickEvery=pc.prototype.Fa;
91
+ pc.prototype.tickAfter=pc.prototype.O;pc.prototype.tickNow=pc.prototype.Rb;function qc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function rc(a){return""!=sc().canPlayType(a)}function tc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}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")}
92
92
  function zc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!wc()&&!vc("PC=EOS")&&!vc("PC=APL")&&!vc("VirginMedia")&&!vc("SOPOpenBrowser")&&!Ac()&&!vc("AFT")&&!vc("WPE")}function Ac(){return vc("PlayStation 4")}function Bc(){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)}
93
- function sc(){if(Cc)return Cc;Dc||(Dc=new M(function(){Cc=null}));(Cc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Cc=document.createElement("video"));Dc.O(1);return Cc}var Dc=null,Cc=null;function Ec(){}
94
- function Fc(a){if(!a)return"";a=Nb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Ac())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&bb('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
93
+ function sc(){if(Cc)return Cc;Dc||(Dc=new pc(function(){Cc=null}));(Cc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Cc=document.createElement("video"));Dc.O(1);return Cc}var Dc=null,Cc=null;function Ec(){}
94
+ function Fc(a){if(!a)return"";a=Mb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Ac())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&ab('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
95
95
  (a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
96
- function Gc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new L(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Rb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Hc.value()(d)}
97
- function Ic(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Nb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Fc(c);if(254==c[0]&&255==c[1])return Gc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Gc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Gc(a,!1);if(0==c[1]&&0==c[3])return Gc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Fc(a);throw new L(2,2,2003);}
98
- function Jc(a){if(window.TextEncoder&&!Ac()){var b=new TextEncoder;return Ob(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 Ob(b)}function Kc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}G("shaka.util.StringUtils",Ec);Ec.resetFromCharCode=function(){Hc.g=void 0};Ec.toUTF16=Kc;Ec.toUTF8=Jc;Ec.fromBytesAutoDetect=Ic;Ec.fromUTF16=Gc;
99
- Ec.fromUTF8=Fc;var Hc=new oc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ya:65536};0<b.Ya;b={Ya:b.Ya},b.Ya/=2)if(a(b.Ya))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ya)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ya));return e}}(b);return null});function Lc(){}function Mc(a){a=Nb(a);a=Hc.value()(a);return btoa(a)}function Nc(a,b){b=void 0==b?!0:b;a=Mc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Oc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Pc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
100
- function Qc(a){var b=Nb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Rc(){for(var a=Na.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(Nb(d),c),c+=d.byteLength;return b}G("shaka.util.Uint8ArrayUtils",Lc);Lc.concat=Rc;Lc.toHex=Qc;Lc.fromHex=Pc;Lc.fromBase64=Oc;Lc.toBase64=Nc;Lc.toStandardBase64=Mc;function Sc(){}G("shaka.dependencies",Sc);Sc.has=function(a){return Tc.has(a)};Sc.add=function(a,b){if(!Uc[a])throw Error(a+" is not supported");Tc.set(a,function(){return b})};var Uc={muxjs:"muxjs"};Sc.Allowed=Uc;var Tc=new Map([["muxjs",function(){return window.muxjs}]]);function Vc(a){var b=this;this.o=a;this.m=Tc.get("muxjs")();this.h=this.g=null;this.l=[];this.i=[];this.j=!1;this.m&&(this.g=new this.m.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.g.on("data",function(c){b.i=c.captions;b.l.push(Rc(c.initSegment,c.data))}),this.g.on("done",function(){var c={data:Rc.apply(Lc,ka(b.l)),captions:b.i};b.h.resolve(c);b.j=!1}))}Vc.prototype.destroy=function(){this.g&&this.g.dispose();this.g=null;return Promise.resolve()};
101
- function Wc(a,b){var c=Xc(a),d="audio/aac"==a.toLowerCase().split(";")[0];if(!Tc.get("muxjs")()||!c&&!d)return!1;if(d)return jb('audio/mp4; codecs="mp4a.40.2"');if(b)return jb(Yc(b,a));b=Yc("audio",a);a=Yc("video",a);return jb(b)||jb(a)}function Xc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}function Zc(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp4a.40.2"':Xc(b)?Yc(a,b):b}
102
- function Yc(a,b){b=b.replace(/mp2t/i,"mp4");"audio"==a&&(b=b.replace("video","audio"));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){var c="avc1.",d=a[1],e=Number(a[2]);c=("66"==d?c+"4200":"77"==d?c+"4d00":c+"6400")+(e>>4).toString(16);c+=(e&15).toString(16);b=b.replace(a[0],c)}return b}function $c(a,b){a.j=!0;a.h=new nc;a.l=[];a.i=[];b=Nb(b);a.g.push(b);a.g.flush();a.j&&a.h.reject(new L(2,3,3018));return a.h};function ad(){}function bd(a,b){b&&(a+='; codecs="'+b+'"');return a}function cd(a,b,c){b=bd(a,b);return Wc(b,c)?Zc(c,b):"video/mp2t"!=a&&"audio"==c?b.replace("video","audio"):b}
96
+ function Gc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new K(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Qb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Hc.value()(d)}
97
+ function Ic(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Mb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Fc(c);if(254==c[0]&&255==c[1])return Gc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Gc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Gc(a,!1);if(0==c[1]&&0==c[3])return Gc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Fc(a);throw new K(2,2,2003);}
98
+ function Jc(a){if(window.TextEncoder&&!Ac()){var b=new TextEncoder;return Nb(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 Nb(b)}function Kc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}G("shaka.util.StringUtils",Ec);Ec.resetFromCharCode=function(){Hc.g=void 0};Ec.toUTF16=Kc;Ec.toUTF8=Jc;Ec.fromBytesAutoDetect=Ic;Ec.fromUTF16=Gc;
99
+ Ec.fromUTF8=Fc;var Hc=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={Xa:65536};0<b.Xa;b={Xa:b.Xa},b.Xa/=2)if(a(b.Xa))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Xa)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Xa));return e}}(b);return null});function Lc(){}function Mc(a){a=Mb(a);a=Hc.value()(a);return btoa(a)}function Nc(a,b){b=void 0==b?!0:b;a=Mc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Oc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Pc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
100
+ function Qc(a){var b=Mb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Rc(){for(var a=Ja.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(Mb(d),c),c+=d.byteLength;return b}G("shaka.util.Uint8ArrayUtils",Lc);Lc.concat=Rc;Lc.toHex=Qc;Lc.fromHex=Pc;Lc.fromBase64=Oc;Lc.toBase64=Nc;Lc.toStandardBase64=Mc;function Sc(){}G("shaka.dependencies",Sc);Sc.has=function(a){return Tc.has(a)};Sc.add=function(a,b){if(!Uc[a])throw Error(a+" is not supported");Tc.set(a,function(){return b})};var Uc={muxjs:"muxjs"};Sc.Allowed=Uc;var Tc=new Map([["muxjs",function(){return window.muxjs}]]);function Vc(a){var b=this;this.o=a;this.m=Tc.get("muxjs")();this.h=this.g=null;this.l=[];this.i=[];this.j=!1;this.m&&(this.g=new this.m.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.g.on("data",function(c){b.i=c.captions;b.l.push(Rc(c.initSegment,c.data))}),this.g.on("done",function(){var c={data:Rc.apply(Lc,ka(b.l)),captions:b.i};b.h.resolve(c);b.j=!1}))}Vc.prototype.destroy=function(){this.g&&this.g.dispose();this.g=null;return Promise.resolve()};
101
+ function Wc(a,b){var c=Xc(a),d="audio/aac"==a.toLowerCase().split(";")[0];if(!Tc.get("muxjs")()||!c&&!d)return!1;if(d)return ib('audio/mp4; codecs="mp4a.40.2"');if(b)return ib(Yc(b,a));b=Yc("audio",a);a=Yc("video",a);return ib(b)||ib(a)}function Xc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}function Zc(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp4a.40.2"':Xc(b)?Yc(a,b):b}
102
+ function Yc(a,b){b=b.replace(/mp2t/i,"mp4");"audio"==a&&(b=b.replace("video","audio"));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){var c="avc1.",d=a[1],e=Number(a[2]);c=("66"==d?c+"4200":"77"==d?c+"4d00":c+"6400")+(e>>4).toString(16);c+=(e&15).toString(16);b=b.replace(a[0],c)}return b}function $c(a,b){a.j=!0;a.h=new mc;a.l=[];a.i=[];b=Mb(b);a.g.push(b);a.g.flush();a.j&&a.h.reject(new K(2,3,3018));return a.h};function ad(){}function bd(a,b){b&&(a+='; codecs="'+b+'"');return a}function cd(a,b,c){b=bd(a,b);return Wc(b,c)?Zc(c,b):"video/mp2t"!=a&&"audio"==c?b.replace("video","audio"):b}
103
103
  function dd(a){var b=ed(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";
104
- 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 ed(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}G("shaka.util.MimeUtils",ad);ad.getFullType=bd;
105
- (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function gd(a){this.i=null;this.j=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.A="";this.o=new Map}function hd(a){return id[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}gd.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
106
- function jd(a,b,c,d,e){var f,g,h,k;return D(function(l){if(1==l.g)return u(l,Promise.resolve(),2);if(!a.i||!a.j)return l.return();if(null==c||null==d)return a.i.parseInit(Nb(b)),l.return();f=a.u?c:a.s;g={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Nb(b),g,e);k=h.filter(function(m){return m.startTime>=a.l&&m.startTime<a.m});a.j.append(k);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);B(l)})}
107
- gd.prototype.remove=function(a,b){var c=this;return D(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.j||!c.j.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));B(d)})};function kd(a,b,c){a.l=b;a.m=c}function ld(a,b,c){a.A=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
108
- 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 pb(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)}
109
- 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.A&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
110
- a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}G("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){return a.concat(b)}function qd(){}function rd(a){return null!=a};function sd(){}function td(a,b){a=ud(a);b=ud(b);return a.split("-")[0]==b.split("-")[0]}function vd(a,b){a=ud(a);b=ud(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function wd(a,b){a=ud(a);b=ud(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function ud(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=xd.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
111
- function yd(a,b){a=ud(a);b=ud(b);return b==a?4:vd(b,a)?3:wd(b,a)?2:vd(a,b)?1:0}function zd(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=xd.get(a)||a}function Ad(a){return a.language?ud(a.language):a.audio&&a.audio.language?ud(a.audio.language):a.video&&a.video.language?ud(a.video.language):"und"}
112
- function Bd(a,b){a=ud(a);var c=new Set,d=t(b);for(b=d.next();!b.done;b=d.next())c.add(ud(b.value));d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,vd(b,a))return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,wd(b,a))return b;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,vd(a,b))return b;return null}G("shaka.util.LanguageUtils",sd);sd.findClosestLocale=Bd;sd.getLocaleForVariant=Ad;
113
- sd.getLocaleForText=function(a){return ud(a.language||"und")};sd.getBase=zd;sd.relatedness=yd;sd.areSiblings=function(a,b){var c=zd(a),d=zd(b);return a!=c&&b!=d&&c==d};sd.normalize=ud;sd.isSiblingOf=wd;sd.isParentOf=vd;sd.areLanguageCompatible=td;sd.areLocaleCompatible=function(a,b){a=ud(a);b=ud(b);return a==b};
114
- var xd=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",
104
+ 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 gd(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function ed(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
105
+ G("shaka.util.MimeUtils",ad);ad.getFullType=bd;(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function hd(a){this.i=null;this.j=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.A="";this.o=new Map}function id(a){return jd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}hd.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
106
+ function kd(a,b,c,d,e){var f,g,h,k;return D(function(l){if(1==l.g)return u(l,Promise.resolve(),2);if(!a.i||!a.j)return l.return();if(null==c||null==d)return a.i.parseInit(Mb(b)),l.return();f=a.u?c:a.s;g={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Mb(b),g,e);k=h.filter(function(m){return m.startTime>=a.l&&m.startTime<a.m});a.j.append(k);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);B(l)})}
107
+ hd.prototype.remove=function(a,b){var c=this;return D(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.j||!c.j.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));B(d)})};function ld(a,b,c){a.l=b;a.m=c}function md(a,b,c){a.A=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
108
+ function nd(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 ob(c.startTime,c.endTime,c.text)});return b}function od(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())od(a,d.value,c)}
109
+ function pd(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,[]);od(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.A&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
110
+ a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}G("shaka.text.TextEngine",hd);hd.prototype.destroy=hd.prototype.destroy;hd.findParser=function(a){return jd[a]};hd.unregisterParser=function(a){delete jd[a]};hd.registerParser=function(a,b){jd[a]=b};var jd={};function qd(a,b){return a.concat(b)}function rd(){}function sd(a){return null!=a};function td(){}function ud(a,b){a=vd(a);b=vd(b);return a.split("-")[0]==b.split("-")[0]}function wd(a,b){a=vd(a);b=vd(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function xd(a,b){a=vd(a);b=vd(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function vd(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=yd.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
111
+ function zd(a,b){a=vd(a);b=vd(b);return b==a?4:wd(b,a)?3:xd(b,a)?2:wd(a,b)?1:0}function Ad(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=yd.get(a)||a}function Bd(a){return a.language?vd(a.language):a.audio&&a.audio.language?vd(a.audio.language):a.video&&a.video.language?vd(a.video.language):"und"}
112
+ function Cd(a,b){a=vd(a);var c=new Set,d=t(b);for(b=d.next();!b.done;b=d.next())c.add(vd(b.value));d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,wd(b,a))return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,xd(b,a))return b;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,wd(a,b))return b;return null}G("shaka.util.LanguageUtils",td);td.findClosestLocale=Cd;td.getLocaleForVariant=Bd;
113
+ td.getLocaleForText=function(a){return vd(a.language||"und")};td.getBase=Ad;td.relatedness=zd;td.areSiblings=function(a,b){var c=Ad(a),d=Ad(b);return a!=c&&b!=d&&c==d};td.normalize=vd;td.isSiblingOf=xd;td.isParentOf=wd;td.areLanguageCompatible=ud;td.areLocaleCompatible=function(a,b){a=vd(a);b=vd(b);return a==b};
114
+ var yd=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",
115
115
  "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",
116
116
  "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",
117
117
  "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",
118
118
  "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",
119
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Cd(){this.g={}}r=Cd.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};r.forEach=function(a){for(var b in this.g)a(b,this.g[b])};r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function Dd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Ed(f,b,c);f=Fd(f,d);b=Gd(f);b=Hd(b);var g=Id(b,e);a.variants=a.variants.filter(function(h){return Jd(h)==g?!0:!1})}function Gd(a){var b=new Cd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Jd(c);b.push(d,c)}return b}
120
- function Hd(a){var b=0,c=new Map,d=a.size();a.forEach(function(e,f){f=t(f);for(var g=f.next();!g.done;g=f.next()){g=g.value;var h=g.video;if(h&&h.width&&h.height){h=h.width*h.height*(h.frameRate||1);c.has(h)||c.set(h,new Cd);var k=c.get(h);k.push(e,g);k.size()===d&&(b=Math.max(b,h))}}});return b?c.get(b):a}
121
- function Ed(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={Dd:d.Dd},e=b.next())if(d.Dd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Dd)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={od:d.od},b=c.next())if(d.od=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.od)}}(d)),b.length){a=b;break}return a}
122
- function Id(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c==Kd||c==Ld){if(a=Md(a,c),1==a.size())return a.keys()[0]}else if(c==Nd)break;return Od(a)}function Md(a,b){var c=0,d=new Cd;a.forEach(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}
123
- function Od(a){var b="",c=Infinity;a.forEach(function(d,e){var f=0,g=0;e=t(e);for(var h=e.next();!h.done;h=e.next())f+=h.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Jd(a){var b="";a.video&&(b=dd(a.video.codecs));var c="";a.audio&&(c=dd(a.audio.codecs));return b+"-"+c}function Pd(a,b,c){a.variants=a.variants.filter(function(d){return Qd(d,b,c)})}
124
- function Qd(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}
125
- function Rd(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=Qd(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Sd(a,b){return D(function(c){if(1==c.g)return u(c,Td(b,0<b.offlineSessionIds.length),2);Ud(a,b);Vd(b);return u(c,Wd(b),0)})}
126
- function Td(a,b){var c,d,e;return D(function(f){if(1==f.g)return u(f,Xd(a.variants,b,!1),2);c=mc;d=uc();e=vc("Firefox")&&vc("Android");a.variants=a.variants.filter(function(g){var h=g.video,k=h&&h.width||0,l=h&&h.height||0;if(d&&h&&(1920<k||1080<l)&&(h.codecs.includes("avc1.")||h.codecs.includes("avc3.")))return gb(Yd(g)),!1;if(h){k=Zd(h.codecs);if(h.codecs.includes(",")){l=h.codecs.split(",");k=ic(c.ra,l);k=Zd(k);l=ic(c.jb,l);l=$d(l);var m=cd(h.mimeType,l,c.jb);if(!jb(m))return!1;k=[k,l].join()}l=
127
- cd(h.mimeType,k,c.ra);if(!jb(l))return!1;h.codecs=k}h=g.audio;if(e&&h&&h.encrypted&&h.codecs.toLowerCase().includes("opus"))return gb(Yd(g)),!1;if(h){k=$d(h.codecs);l=cd(h.mimeType,k,c.jb);if(!jb(l))return!1;h.codecs=k}(h=g.decodingInfos.some(function(n){return n.supported}))||gb(Yd(g));return h});B(f)})}
128
- function Xd(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return D(function(v){if(d=a.some(function(w){return w.decodingInfos.length}))return v.return();e=navigator.mediaCapabilities;f=[];g=function(w,x){var y;return D(function(C){if(1==C.g)return xa(C,2),u(C,e.decodingInfo(x),4);if(2!=C.g)return y=C.h,w.decodingInfos.push(y),za(C,0);Aa(C);JSON.stringify(x);B(C)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=ae(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,f.push(g(l,q));return u(v,Promise.all(f),
119
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Dd(){this.g={}}r=Dd.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};r.forEach=function(a){for(var b in this.g)a(b,this.g[b])};r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function Ed(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Fd(f,b,c);f=Gd(f,d);b=Hd(f);b=Id(b);var g=Jd(b,e);a.variants=a.variants.filter(function(h){return Kd(h)==g?!0:!1})}function Hd(a){var b=new Dd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Kd(c);b.push(d,c)}return b}
120
+ function Id(a){var b=0,c=new Map,d=a.size();a.forEach(function(e,f){f=t(f);for(var g=f.next();!g.done;g=f.next()){g=g.value;var h=g.video;if(h&&h.width&&h.height){h=h.width*h.height*(h.frameRate||1);c.has(h)||c.set(h,new Dd);var k=c.get(h);k.push(e,g);k.size()===d&&(b=Math.max(b,h))}}});return b?c.get(b):a}
121
+ function Fd(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={Dd:d.Dd},e=b.next())if(d.Dd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Dd)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={od:d.od},b=c.next())if(d.od=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.od)}}(d)),b.length){a=b;break}return a}
122
+ function Jd(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c==Ld||c==Md){if(a=Nd(a,c),1==a.size())return a.keys()[0]}else if(c==Od)break;return Pd(a)}function Nd(a,b){var c=0,d=new Dd;a.forEach(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}
123
+ function Pd(a){var b="",c=Infinity;a.forEach(function(d,e){var f=0,g=0;e=t(e);for(var h=e.next();!h.done;h=e.next())f+=h.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Kd(a){var b="";a.video&&(b=dd(a.video.codecs));var c="";a.audio&&(c=dd(a.audio.codecs));return b+"-"+c}function Qd(a,b,c){a.variants=a.variants.filter(function(d){return Rd(d,b,c)})}
124
+ function Rd(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}
125
+ function Sd(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=Rd(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Td(a,b){return D(function(c){if(1==c.g)return u(c,Ud(b,0<b.offlineSessionIds.length),2);Vd(a,b);Wd(b);return u(c,Xd(b),0)})}
126
+ function Ud(a,b){var c,d,e;return D(function(f){if(1==f.g)return u(f,Yd(a.variants,b,!1),2);c=lc;d=uc();e=vc("Firefox")&&vc("Android");a.variants=a.variants.filter(function(g){var h=g.video,k=h&&h.width||0,l=h&&h.height||0;if(d&&h&&(1920<k||1080<l)&&(h.codecs.includes("avc1.")||h.codecs.includes("avc3.")))return fb(Zd(g)),!1;if(h){k=$d(h.codecs);if(h.codecs.includes(",")){l=h.codecs.split(",");k=hc(c.qa,l);k=$d(k);l=hc(c.ib,l);l=ae(l);var m=cd(h.mimeType,l,c.ib);if(!ib(m))return!1;k=[k,l].join()}l=
127
+ cd(h.mimeType,k,c.qa);if(!ib(l))return!1;h.codecs=k}h=g.audio;if(e&&h&&h.encrypted&&h.codecs.toLowerCase().includes("opus"))return fb(Zd(g)),!1;if(h){k=ae(h.codecs);l=cd(h.mimeType,k,c.ib);if(!ib(l))return!1;h.codecs=k}(h=g.decodingInfos.some(function(n){return n.supported}))||fb(Zd(g));return h});B(f)})}
128
+ function Yd(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return D(function(v){if(d=a.some(function(w){return w.decodingInfos.length}))return v.return();e=navigator.mediaCapabilities;f=[];g=function(w,x){var y;return D(function(C){if(1==C.g)return xa(C,2),u(C,e.decodingInfo(x),4);if(2!=C.g)return y=C.h,w.decodingInfos.push(y),za(C,0);Aa(C);JSON.stringify(x);B(C)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=be(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,f.push(g(l,q));return u(v,Promise.all(f),
129
129
  0)})}
130
- function ae(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=ic("video",g);f=Zd(f);g=ic("audio",g);g=$d(g);g=cd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Zd(f);f=cd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
131
- break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=$d(d.codecs),f=cd(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,[]);
130
+ function be(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=hc("video",g);f=$d(f);g=hc("audio",g);g=ae(g);g=cd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=$d(f);f=cd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
131
+ break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=ae(d.codecs),f=cd(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,[]);
132
132
  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,q=t(h.initData),v=q.next();!v.done;v=q.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
133
133
  (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(""!=h.audioRobustness?m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness}:m.audio||(m.audio={}));e&&(""!=h.videoRobustness?m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness}:m.video||(m.video={}))}l.keySystemConfiguration=m;a.push(l)}return a}
134
- function $d(a){return"fLaC"!==a||Bc()?"Opus"===a?"opus":a:"flac"}function Zd(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function Ud(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!be(d,a.audio)||c&&a&&a.video&&!be(c,a.video)?!1:!0})}
135
- function Vd(a){a.textStreams=a.textStreams.filter(function(b){return hd(bd(b.mimeType,b.codecs))})}function Wd(a){var b,c,d,e,f,g,h,k;return D(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.B(4);break}e=d.value;f=e.mimeType;if(ce.has(f)){l.B(5);break}g=de.get(f);if(!g){ce.set(f,!1);l.B(5);break}return u(l,ee(g),7);case 7:h=l.h,ce.set(f,h);case 5:(k=ce.get(f))&&b.push(e);d=c.next();l.B(2);break;case 4:a.imageStreams=b,B(l)}})}
136
- function ee(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 be(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
137
- function fe(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,
134
+ function ae(a){return"flac"==a.toLowerCase()?Bc()?"fLaC":"flac":"Opus"===a?"opus":a}function $d(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function Vd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!ce(d,a.audio)||c&&a&&a.video&&!ce(c,a.video)?!1:!0})}
135
+ function Wd(a){a.textStreams=a.textStreams.filter(function(b){return id(bd(b.mimeType,b.codecs))})}function Xd(a){var b,c,d,e,f,g,h,k;return D(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.B(4);break}e=d.value;f=e.mimeType;if(de.has(f)){l.B(5);break}g=ee.get(f);if(!g){de.set(f,!1);l.B(5);break}return u(l,fe(g),7);case 7:h=l.h,de.set(f,h);case 5:(k=de.get(f))&&b.push(e);d=c.next();l.B(2);break;case 4:a.imageStreams=b,B(l)}})}
136
+ function fe(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 ce(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
137
+ function ge(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,
138
138
  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,
139
139
  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,a.hdr=c.hdr||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}
140
- function ge(a){return{id:a.id,active:!1,type:lc,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
140
+ function he(a){return{id:a.id,active:!1,type:kc,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,
141
141
  originalAudioId:null,originalTextId:a.originalId,originalImageId:null}}
142
- function he(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:[],
143
- 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 ie(a){a.__shaka_id||(a.__shaka_id=je++);return a.__shaka_id}
144
- function ke(a){var b=le(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");"subtitles"==a.kind&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function me(a){var b=le(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
145
- function le(a){var b=a.language;return{id:ie(a),active:!1,type:"",bandwidth:0,language:ud(b||"und"),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,
146
- originalTextId:null,originalImageId:null,zh:b}}function ne(a){return a.allowedByApplication&&a.allowedByKeySystem}function oe(a){return a.filter(function(b){return ne(b)})}
147
- function Fd(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;a=c.filter(function(g){return g<=b});return a.length?d.get(Math.max.apply(Math,ka(a))):d.get(Math.min.apply(Math,ka(c)))}
148
- function pe(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=Bd(ud(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return ud(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=qe(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(pd,[]);return a.length?
149
- qe(e,a[0]):e}function qe(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Yd(a){var b=[];a.audio&&b.push(re(a.audio));a.video&&b.push(re(a.video));return b.join(", ")}
150
- function re(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"}
151
- var je=0,Kd="smooth",Ld="powerEfficient",Nd="bandwidth",ce=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),de=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function se(){var a=this;this.l=null;this.o=!1;this.i=new Za;this.u=null;navigator.connection&&navigator.connection.addEventListener&&(this.u=function(){if(a.o&&a.g.useNetworkInformation){a.i=new Za;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.l(b)}},navigator.connection.addEventListener("change",this.u));this.m=[];this.A=1;this.F=!1;this.h=this.j=this.g=this.s=null;this.D=new M(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();b&&a.l(b)}})}r=se.prototype;
142
+ function ie(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:[],
143
+ 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 je(a){a.__shaka_id||(a.__shaka_id=ke++);return a.__shaka_id}
144
+ function le(a){var b=me(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="unknown");"subtitles"==a.kind&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function ne(a){var b=me(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
145
+ function me(a){var b=a.language;return{id:je(a),active:!1,type:"",bandwidth:0,language:vd(b||"und"),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,
146
+ originalTextId:null,originalImageId:null,Ah:b}}function oe(a){return a.allowedByApplication&&a.allowedByKeySystem}function pe(a){return a.filter(function(b){return oe(b)})}
147
+ function Gd(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;a=c.filter(function(g){return g<=b});return a.length?d.get(Math.max.apply(Math,ka(a))):d.get(Math.min.apply(Math,ka(c)))}
148
+ function qe(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=Cd(vd(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return vd(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=re(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(qd,[]);return a.length?
149
+ re(e,a[0]):e}function re(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Zd(a){var b=[];a.audio&&b.push(se(a.audio));a.video&&b.push(se(a.video));return b.join(", ")}
150
+ function se(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"}
151
+ var ke=0,Ld="smooth",Md="powerEfficient",Od="bandwidth",de=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),ee=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function te(){var a=this;this.l=null;this.o=!1;this.i=new Wa;this.u=null;navigator.connection&&navigator.connection.addEventListener&&(this.u=function(){if(a.o&&a.g.useNetworkInformation){a.i=new Wa;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.l(b)}},navigator.connection.addEventListener("change",this.u));this.m=[];this.A=1;this.F=!1;this.h=this.j=this.g=this.s=null;this.D=new pc(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();b&&a.l(b)}})}r=te.prototype;
152
152
  r.stop=function(){this.l=null;this.o=!1;this.m=[];this.A=1;this.j=this.s=null;this.h&&(this.h.disconnect(),this.h=null);this.D.stop()};r.release=function(){navigator.connection&&navigator.connection.removeEventListener&&(navigator.connection.removeEventListener("change",this.u),this.u=null);this.D=null};r.init=function(a){this.l=a};
153
- r.chooseVariant=function(){var a=Infinity,b=Infinity;this.g.restrictToScreenSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=window.screen.height*b,b*=window.screen.width);this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.clientHeight*b,b*=this.j.clientWidth);a=te(this.g.restrictions,this.m,a,b);b=this.i.getBandwidthEstimate(ue(this));this.m.length&&!a.length&&(a=te(null,this.m,Infinity,Infinity),a=[a[0]]);for(var c=a[0]||null,
153
+ r.chooseVariant=function(){var a=Infinity,b=Infinity;this.g.restrictToScreenSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=window.screen.height*b,b*=window.screen.width);this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.clientHeight*b,b*=this.j.clientWidth);a=ue(this.g.restrictions,this.m,a,b);b=this.i.getBandwidthEstimate(ve(this));this.m.length&&!a.length&&(a=ue(null,this.m,Infinity,Infinity),a=[a[0]]);for(var c=a[0]||null,
154
154
  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.s=Date.now();return c};r.enable=function(){this.o=!0};r.disable=function(){this.o=!1};
155
- r.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.s&&this.o)a:{if(!this.F){a=this.i;if(!(a.g>=a.i))break a;this.F=!0}else if(Date.now()-this.s<1E3*this.g.switchInterval)break a;a=this.chooseVariant();this.i.getBandwidthEstimate(ue(this));a&&this.l(a)}};r.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(ue(this))};r.setVariants=function(a){this.m=a};r.playbackRateChanged=function(a){this.A=a};
156
- r.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.D.O(ve)}),this.h.observe(this.j))};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function ue(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
157
- function te(a,b,c,d){a&&(b=b.filter(function(e){return Qd(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}G("shaka.abr.SimpleAbrManager",se);se.prototype.configure=se.prototype.configure;se.prototype.setMediaElement=se.prototype.setMediaElement;se.prototype.playbackRateChanged=se.prototype.playbackRateChanged;se.prototype.setVariants=se.prototype.setVariants;se.prototype.getBandwidthEstimate=se.prototype.getBandwidthEstimate;se.prototype.segmentDownloaded=se.prototype.segmentDownloaded;
158
- se.prototype.disable=se.prototype.disable;se.prototype.enable=se.prototype.enable;se.prototype.chooseVariant=se.prototype.chooseVariant;se.prototype.init=se.prototype.init;se.prototype.release=se.prototype.release;se.prototype.stop=se.prototype.stop;var ve=1;function we(a,b){this.g=a;this.h=b}we.prototype.toString=function(){return"v"+this.g+"."+this.h};function xe(a,b){var c=new we(5,0),d=ye,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function ze(a,b,c,d){cb([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Ae(a,b,c,d){bb([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var ye=null;G("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function Be(a,b){this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value)}Be.prototype.add=function(a){return Ce(this.h,a)?(this.g.add(a),!0):!1};
159
- function Ce(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)&&De(c,d)&&Ee(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(a=a.video,b=b.video,c=!(De(a,b)&&Ee(a.roles,b.roles)));return c?!1:!0}Be.prototype.values=function(){return this.g.values()};
160
- function De(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return ed(d)[0]});b=b.codecs.split(",").map(function(d){return ed(d)[0]});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function Ee(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Fe(a){this.g=a;this.h=new Ge(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Fe.prototype.create=function(a){var b=this,c=a.filter(function(d){return Ce(b.g,d)});return c.length?new Be(c[0],c):this.h.create(a)};function Ge(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
161
- Ge.prototype.create=function(a){var b=[];b=He(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Ie(b,this.j);a.length&&(b=a);this.g&&(a=Fd(b,this.g),a.length&&(b=a));this.h&&(a=Je(b,this.h),a.length&&(b=a));a=new Be(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,Ce(a.h,c)&&a.add(c);return a};function He(a,b){b=ud(b);var c=Bd(b,a.map(function(d){return Ad(d)}));return c?a.filter(function(d){return c==Ad(d)}):[]}
162
- function Ie(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Je(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Ke(){this.g=Le;this.h=(new Map).set(Le,2).set(Me,1)}function Ne(a,b,c){a.h.set(Le,c).set(Me,b)}var Me=0,Le=1;function Oe(a,b){var c=Pe();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
163
- function Qe(a){var b,c;return D(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new L(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return u(d,new Promise(function(e){(new M(e)).O(c/1E3)}),2)}a.h*=a.m;B(d)})}function Pe(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Re(a,b){this.promise=a;this.i=b;this.g=!1}function Se(a){return new Re(Promise.reject(a),function(){return Promise.resolve()})}function Te(){var a=Promise.reject(new L(2,7,7001));a.catch(function(){});return new Re(a,function(){return Promise.resolve()})}function Ue(a){return new Re(Promise.resolve(a),function(){return Promise.resolve()})}function Ve(a){return new Re(a,function(){return a.catch(function(){})})}Re.prototype.abort=function(){this.g=!0;return this.i()};
164
- function We(a){return new Re(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Re.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
165
- Re.prototype.$=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Xe(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 L(2,7,7001);this.promise.then(c(!0),c(!1));return new Re(f,function(){return d()})};
166
- function Xe(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()}}}G("shaka.util.AbortableOperation",Re);Re.prototype.chain=Re.prototype.$;Re.prototype["finally"]=Re.prototype.finally;Re.all=We;Re.prototype.abort=Re.prototype.abort;Re.notAbortable=Ve;Re.completed=Ue;Re.aborted=Te;Re.failed=Se;function O(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}
167
- function Ye(a){var b=new O(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}O.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};O.prototype.stopImmediatePropagation=function(){this.g=!0};O.prototype.stopPropagation=function(){};G("shaka.util.FakeEvent",O);
168
- var Ze={Ng:"abrstatuschanged",Og:"adaptation",Pg:"buffering",Qg:"downloadfailed",Rg:"downloadheadersreceived",Sg:"drmsessionupdate",Ug:"emsg",fh:"prft",Error:"error",Vg:"expirationupdated",Wg:"gapjumped",Yg:"loaded",Zg:"loading",ah:"manifestparsed",bh:"mediaqualitychanged",Metadata:"metadata",dh:"onstatechange",eh:"onstateidle",gh:"ratechange",ih:"segmentappended",jh:"sessiondata",kh:"stalldetected",lh:"streaming",mh:"textchanged",nh:"texttrackvisibility",oh:"timelineregionadded",ph:"timelineregionenter",
169
- qh:"timelineregionexit",rh:"trackschanged",th:"unloading",uh:"variantchanged"};function $e(){this.fa=new Cd;this.$c=this}$e.prototype.addEventListener=function(a,b){this.fa&&this.fa.push(a,b)};$e.prototype.removeEventListener=function(a,b){this.fa&&this.fa.remove(a,b)};$e.prototype.dispatchEvent=function(a){if(!this.fa)return!0;var b=this.fa.get(a.type)||[],c=this.fa.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.$c;a.currentTarget=this.$c;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
170
- $e.prototype.release=function(){this.fa=null};function af(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 WeakSet;return b(a)}function bf(a){var b={},c;for(c in a)b[c]=a[c];return b};function cf(){this.g=[]}function df(a,b){a.g.push(b.finally(function(){mb(a.g,b)}))}cf.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 ef(a,b,c){$e.call(this);this.i=!1;this.m=new cf;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}ta(ef,$e);r=ef.prototype;r.ne=function(a){this.o=a};function ff(a,b,c,d){c=c||gf;var e=hf[a];if(!e||c>=e.priority)hf[a]={priority:c,pg:b,qg:void 0===d?!1:d}}r.rg=function(a){this.g.add(a)};r.Gg=function(a){this.g.delete(a)};r.wf=function(){this.g.clear()};r.sg=function(a){this.h.add(a)};r.Hg=function(a){this.h.delete(a)};r.xf=function(){this.h.clear()};
171
- function jf(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();$e.prototype.release.call(this);return this.m.destroy()};
172
- r.request=function(a,b){var c=this,d=new kf;if(this.i){var e=Promise.reject(new L(2,7,7001));e.catch(function(){});return new lf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?af(b.retryParameters):Pe();b.uris=af(b.uris);e=mf(this,a,b);var f=e.$(function(){return nf(c,a,b,new Oe(b.retryParameters,!1),0,null,d)}),g=f.$(function(n){return of(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
173
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.$(function(n){var p=Date.now()-l,q=n.response;q.timeMs+=k;q.timeMs+=p;n.bg||!c.l||q.fromCache||"HEAD"==b.method||a!=pf||c.l(q.timeMs,q.data.byteLength);return q},function(n){n&&(n.severity=2);throw n;});e=new lf(m.promise,function(){return m.abort()},d);df(this.m,e);return e};
174
- function mf(a,b,c){var d=Ue(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={xd:e.xd},f=a.next())e.xd=f.value,d=d.$(function(g){return function(){c.body&&(c.body=Ob(c.body));return g.xd(b,c)}}(e));return d.$(void 0,function(g){if(g instanceof L&&7001==g.code)throw g;throw new L(2,1,1006,g);})}
175
- function nf(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Tb(c.uris[e]),k=h.Ga,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Ub(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=hf[k])?k.pg:null;if(!m)return Se(new L(2,1,1E3,h));var n=k.qg,p=null,q=null,v=!1,w=!1,x;return Ve(Qe(d)).$(function(){if(a.i)return Te();x=Date.now();var y=m(c.uris[e],c,b,function(z,E,F){p&&p.stop();q&&q.O(A/1E3);a.l&&b==pf&&(a.l(z,E),l=!0,g.g=F)},function(z){a.j&&a.j(z,c,b);w=!0});
176
- if(!n)return y;var C=c.retryParameters.connectionTimeout;C&&(p=new M(function(){v=!0;y.abort()}),p.O(C/1E3));var A=c.retryParameters.stallTimeout;A&&(q=new M(function(){v=!0;y.abort()}));return y}).$(function(y){p&&p.stop();q&&q.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-x);var C={response:y,bg:l};!w&&a.j&&a.j(y.headers,c,b);return C},function(y){p&&p.stop();q&&q.stop();if(a.s){var C=null,A=0;y instanceof L&&(C=y,1001==y.code&&(A=y.data[1]));a.s(c,C,A,v)}if(a.i)return Te();v&&(y=new L(1,1,1003,
177
- c.uris[e],b));if(y instanceof L){if(7001==y.code)throw y;if(1010==y.code)throw f;if(1==y.severity)return C=(new Map).set("error",y),C=new O("retry",C),a.dispatchEvent(C),e=(e+1)%c.uris.length,nf(a,b,c,d,e,y,g)}throw y;})}
178
- function of(a,b,c){var d=Ue(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={yd:e.yd},f=a.next())e.yd=f.value,d=d.$(function(g){return function(){var h=c.response;h.data&&(h.data=Ob(h.data));return g.yd(b,h)}}(e));return d.$(function(){return c},function(g){var h=2;if(g instanceof L){if(7001==g.code)throw g;h=g.severity}throw new L(h,1,1007,g);})}G("shaka.net.NetworkingEngine",ef);ef.prototype.request=ef.prototype.request;ef.prototype.destroy=ef.prototype.destroy;ef.makeRequest=jf;
179
- ef.defaultRetryParameters=function(){return Pe()};ef.prototype.clearAllResponseFilters=ef.prototype.xf;ef.prototype.unregisterResponseFilter=ef.prototype.Hg;ef.prototype.registerResponseFilter=ef.prototype.sg;ef.prototype.clearAllRequestFilters=ef.prototype.wf;ef.prototype.unregisterRequestFilter=ef.prototype.Gg;ef.prototype.registerRequestFilter=ef.prototype.rg;ef.unregisterScheme=function(a){delete hf[a]};ef.registerScheme=ff;ef.prototype.setForceHTTPS=ef.prototype.ne;function kf(){this.g=0}
180
- ef.NumBytesRemainingClass=kf;function lf(a,b,c){Re.call(this,a,b);this.h=c}ta(lf,Re);ef.PendingRequest=lf;var pf=1;ef.RequestType={MANIFEST:0,SEGMENT:pf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var gf=3;ef.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:gf};var hf={};function qf(a){this.g=!1;this.h=new nc;this.i=a}qf.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 rf(a,b){if(a.g){if(b instanceof L&&7003==b.code)throw b;throw new L(2,7,7003,b);}};function sf(){this.g=new Cd}r=sf.prototype;r.release=function(){this.Ma();this.g=null};r.C=function(a,b,c,d){this.g&&(a=new tf(a,b,c,d),this.g.push(b,a))};r.ca=function(a,b,c,d){function e(g){f.Ec(a,b,e);c(g)}var f=this;this.C(a,b,e,d)};r.Ec=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.Ec(),this.g.remove(b,e))}};
181
- r.Ma=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ka(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Ec();this.g.g={}}};G("shaka.util.EventManager",sf);sf.prototype.removeAll=sf.prototype.Ma;sf.prototype.unlisten=sf.prototype.Ec;sf.prototype.listenOnce=sf.prototype.ca;sf.prototype.listen=sf.prototype.C;sf.prototype.release=sf.prototype.release;function tf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=uf(a,d);this.target.addEventListener(b,c,this.g)}
182
- tf.prototype.Ec=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function uf(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 vf(a)?b:b.capture||!1}
183
- function vf(a){var b=wf;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}wf=b}return b||!1}var wf=void 0;function xf(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function yf(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function zf(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 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;a=t(a);for(var c=a.next();!c.done;c=a.next()){var d=t(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function Cf(a,b){this.S=Rb(a);this.h=b==Df;this.g=0}r=Cf.prototype;r.ja=function(){return this.g<this.S.byteLength};r.ba=function(){return this.g};r.Kf=function(){return this.S.byteLength};r.Va=function(){try{var a=this.S.getUint8(this.g);this.g+=1;return a}catch(b){throw Ef();}};r.de=function(){try{var a=this.S.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Ef();}};r.K=function(){try{var a=this.S.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Ef();}};
184
- r.Ue=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Ef();}};r.eb=function(){try{if(this.h){var a=this.S.getUint32(this.g,!0);var b=this.S.getUint32(this.g+4,!0)}else b=this.S.getUint32(this.g,!1),a=this.S.getUint32(this.g+4,!1)}catch(c){throw Ef();}if(2097151<b)throw new L(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.cb=function(a){if(this.g+a>this.S.byteLength)throw Ef();var b=Nb(this.S,this.g,a);this.g+=a;return b};
185
- r.skip=function(a){if(this.g+a>this.S.byteLength)throw Ef();this.g+=a};r.yg=function(a){if(this.g<a)throw Ef();this.g-=a};r.seek=function(a){if(0>a||a>this.S.byteLength)throw Ef();this.g=a};r.xc=function(){for(var a=this.g;this.ja()&&0!=this.S.getUint8(this.g);)this.g+=1;a=Nb(this.S,a,this.g-a);this.g+=1;return Fc(a)};function Ef(){return new L(2,3,3E3)}G("shaka.util.DataViewReader",Cf);Cf.prototype.readTerminatedString=Cf.prototype.xc;Cf.prototype.seek=Cf.prototype.seek;Cf.prototype.rewind=Cf.prototype.yg;
186
- Cf.prototype.skip=Cf.prototype.skip;Cf.prototype.readBytes=Cf.prototype.cb;Cf.prototype.readUint64=Cf.prototype.eb;Cf.prototype.readInt32=Cf.prototype.Ue;Cf.prototype.readUint32=Cf.prototype.K;Cf.prototype.readUint16=Cf.prototype.de;Cf.prototype.readUint8=Cf.prototype.Va;Cf.prototype.getLength=Cf.prototype.Kf;Cf.prototype.getPosition=Cf.prototype.ba;Cf.prototype.hasMoreData=Cf.prototype.ja;var Df=1;Cf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Df};function Ff(){this.i=[];this.h=[];this.g=!1}r=Ff.prototype;r.box=function(a,b){a=Gf(a);this.i[a]=Hf;this.h[a]=b;return this};r.M=function(a,b){a=Gf(a);this.i[a]=If;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Cf(a,0);for(this.g=!1;a.ja()&&!this.g;)this.vc(0,a,b,c)};
187
- r.vc=function(a,b,c,d){var e=b.ba();if(d&&e+8>b.S.byteLength)this.g=!0;else{var f=b.K(),g=b.K(),h=Jf(g),k=!1;switch(f){case 0:f=b.S.byteLength-e;break;case 1:if(d&&b.ba()+8>b.S.byteLength){this.g=!0;return}f=b.eb();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==If){if(d&&b.ba()+4>b.S.byteLength){this.g=!0;return}n=b.K();m=n>>>24;n&=16777215}g=e+f;c&&g>b.S.byteLength&&(g=b.S.byteLength);d&&g>b.S.byteLength?this.g=!0:(d=g-b.ba(),b=0<d?b.cb(d):new Uint8Array(0),b=new Cf(b,0),l({name:h,parser:this,
188
- partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.ba(),b.S.byteLength-b.ba()))}};function Kf(a){for(var b=Lf(a);a.reader.ja()&&!a.parser.g;)a.parser.vc(a.start+b,a.reader,a.partialOkay)}function Mf(a){for(var b=Lf(a),c=a.reader.K(),d=0;d<c&&(a.parser.vc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Nf(a){var b=Lf(a);for(a.reader.skip(78);a.reader.ja()&&!a.parser.g;)a.parser.vc(a.start+b,a.reader,a.partialOkay)}
189
- function Of(a){return function(b){a(b.reader.cb(b.reader.S.byteLength-b.reader.ba()))}}function Gf(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Jf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Lf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}G("shaka.util.Mp4Parser",Ff);Ff.headerSize=Lf;Ff.typeToString=Jf;Ff.allData=Of;Ff.visualSampleEntry=Nf;Ff.sampleDescription=Mf;Ff.children=Kf;
190
- Ff.prototype.parseNext=Ff.prototype.vc;Ff.prototype.parse=Ff.prototype.parse;Ff.prototype.stop=Ff.prototype.stop;Ff.prototype.fullBox=Ff.prototype.M;Ff.prototype.box=Ff.prototype.box;var Hf=0,If=1;function Pf(a){var b=this;this.g=[];this.h=[];this.data=[];(new Ff).box("moov",Kf).box("moof",Kf).M("pssh",function(c){if(!(1<c.version)){var d=Nb(c.reader.S,-12,c.size);b.data.push(d);b.g.push(Qc(c.reader.cb(16)));if(0<c.version){d=c.reader.K();for(var e=0;e<d;e++){var f=Qc(c.reader.cb(16));b.h.push(f)}}}}).parse(a)}
191
- function Qf(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=Rb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Pc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Rf(a,b){a=Sf(a,b);return 1!=a.length?null:a[0]}function Tf(a,b,c){a=Uf(a,b,c);return 1!=a.length?null:a[0]}function Sf(a,b){var c=[];a=t(a.childNodes);for(var d=a.next();!d.done;d=a.next())d=d.value,d instanceof Element&&d.tagName==b&&c.push(d);return c}function Vf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
192
- function Uf(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 Wf(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Xf(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 Yf(a){return Array.from(a.childNodes).every(Zf)?a.textContent.trim():null}
193
- function Zf(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function $f(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 ag(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}
194
- function bg(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}
195
- function cg(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 dg(a){a=Number(a);return 0===a%1?a:null}function eg(a){a=Number(a);return 0===a%1&&0<a?a:null}function fg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function gg(a){a=Number(a);return isNaN(a)?null:a}function hg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
196
- function ig(a,b){var c=new DOMParser,d=jg.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function kg(a,b){try{var c=Fc(a);return ig(c,b)}catch(d){return null}}
197
- var jg=new oc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function lg(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.H=new Set;this.l=this.u=null;this.ga=this.aa=!1;this.J=0;this.g=null;this.s=new sf;this.i=new Map;this.A=[];this.o=new nc;this.h=null;this.m=function(d){c.o.reject(d);a.onError(d)};this.la=new Map;this.ea=new Map;this.V=new M(function(){return mg(c)});this.N=!1;this.L=[];this.P=!1;this.fa=(new M(function(){ng(c)})).Fa(b);this.o.catch(function(){});this.j=new qf(function(){return og(c)});this.W=!1;this.F=this.G=null}r=lg.prototype;
198
- r.destroy=function(){return this.j.destroy()};function og(a){return D(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.o.reject(),a.fa.stop(),a.fa=null,a.V.stop(),a.V=null,u(b,pg(a),2);case 2:if(!a.l){b.B(3);break}xa(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:za(b,5);break;case 4:Aa(b);case 5:a.l=null;case 3:a.g=null,a.H.clear(),a.u=null,a.A=[],a.h=null,a.m=function(){},a.D=null,a.W=!1,a.G=null,B(b)}})}r.configure=function(a){this.h=a};
199
- function qg(a,b,c){a.ga=!0;a.A=[];a.N=c;return rg(a,b)}function sg(a,b,c){a.A=c;a.N=0<c.length;return rg(a,b)}
200
- function tg(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 ug(a,g,[])}
201
- function rg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C;return D(function(A){if(1==A.g){if(c=vg(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(z){return z.video&&z.video.drmInfos.length||z.audio&&z.audio.drmInfos.length?!0:!1});g||(h=zf(a.h.servers),wg(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=xg(m),p=t(n),q=p.next();!q.done;q=p.next())v=q.value,k.add(v);w=t(k);for(q=w.next();!q.done;q=
202
- w.next())x=q.value,yg(x,zf(a.h.servers),zf(a.h.advanced||{}),a.h.keySystemsMapping);return u(A,Xd(b,a.N,a.W),2)}y=g||Object.keys(a.h.servers).length;if(!y)return a.aa=!0,A.return(Promise.resolve());C=ug(a,void 0,b);return A.return(g?C:C.catch(function(){}))})}
203
- function zg(a){var b;return D(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.G){c.B(2);break}return u(c,a.G,3);case 3:return rf(a.j),c.return();case 2:return xa(c,4),a.G=a.l.setMediaKeys(a.u),u(c,a.G,6);case 6:za(c,5);break;case 4:b=Aa(c),a.m(new L(2,6,6003,b.message));case 5:rf(a.j),B(c)}})}function Ag(a,b){return D(function(c){if(1==c.g)return u(c,zg(a),2);Bg(a,b.initDataType,Nb(b.initData));B(c)})}
204
- r.ac=function(a){var b=this;return D(function(c){if(1==c.g){if(!b.u)return b.s.ca(a,"encrypted",function(){b.m(new L(2,6,6010))}),c.return();b.l=a;b.s.ca(b.l,"play",function(){for(var d=t(b.L),e=d.next();!e.done;e=d.next())Cg(b,e.value);b.P=!0;b.L=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.s.C(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return pg(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
205
- b.A.length?u(c,zg(b),2):c.B(2)}Dg(b);b.F||b.A.length||b.h.parseInbandPsshEnabled||b.s.C(b.l,"encrypted",function(d){return Ag(b,d)});B(c)})};
206
- function Eg(a){var b,c,d,e,f;return D(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=jf([a.g.serverCertificateUri],a.h.retryParameters);xa(g,3);c=a.D.rb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Nb(d.data);za(g,4);break;case 3:throw e=Aa(g),new L(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();
207
- xa(g,6);return u(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:za(g,0);break;case 6:throw f=Aa(g),new L(2,6,6004,f.message);}})}function Fg(a,b){var c,d,e;return D(function(f){if(1==f.g)return u(f,Gg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Na=new nc,d.push(e.Na);d.push(c.remove());return u(f,Promise.all(d),3)}a.i.delete(c);B(f)})}
208
- function Dg(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,Bg(a,d.initDataType,d.initData);c=t(a.A);for(d=c.next();!d.done;d=c.next())Gg(a,d.value);b.length||a.A.length||a.o.resolve();return a.o}function Bg(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(Lb(c,e.value.initData)&&!vc("Tizen 2"))return;0<a.i.size&&Hg(a)&&(a.o.resolve(),a.o=new nc,a.o.catch(function(){}));Ig(a,b,c,a.g.sessionType)}}
209
- function Jg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Kg(a){a=a.i.keys();a=xf(a,function(b){return b.sessionId});return Array.from(a)}r.mc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Tc=function(){return Af(this.ea)};
210
- function ug(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w;return D(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=Lg(a,c,d);x.B(2);break}return u(x,Mg(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new L(2,6,6001);rf(a.j);xa(x,4);a.H.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.H.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.H.add(q.contentType.toLowerCase());if(c.length){var y=
211
- f.keySystem;var C=d.get(f.keySystem);var A=[],z=[],E=[],F=[],H=new Set;Ng(C,A,E,z,F,H);var I=a.N?"persistent-license":"temporary";y={keySystem:y,licenseServerUri:A[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||I,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:z[0],initData:F,keyIds:H};C=t(C);for(A=C.next();!A.done;A=
212
- C.next())A=A.value,A.distinctiveIdentifierRequired&&(y.distinctiveIdentifierRequired=A.distinctiveIdentifierRequired),A.persistentStateRequired&&(y.persistentStateRequired=A.persistentStateRequired);C=y}else C=f.keySystem,y=b.get(f.keySystem),A=[],z=[],E=[],F=[],H=new Set,Ng(y.drmInfos,A,E,z,F,H),C={keySystem:C,licenseServerUri:A[0],distinctiveIdentifierRequired:"required"==y.distinctiveIdentifier,persistentStateRequired:"required"==y.persistentState,sessionType:y.sessionTypes[0]||"temporary",audioRobustness:(y.audioCapabilities?
213
- y.audioCapabilities[0].robustness:"")||"",videoRobustness:(y.videoCapabilities?y.videoCapabilities[0].robustness:"")||"",serverCertificate:E[0],serverCertificateUri:z[0],initData:F,keyIds:H};a.g=C;if(!a.g.licenseServerUri)throw new L(2,6,6012,a.g.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,rf(a.j),a.u=v,a.aa=!0,u(x,Eg(a),7);case 7:rf(a.j);za(x,0);break;case 4:w=Aa(x);rf(a.j,w);a.g=null;a.H.clear();if(w instanceof L)throw w;throw new L(2,6,6002,w.message);}})}
214
- function Lg(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(xg(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 L(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={vd:d.vd},e=a.next())for(d.vd=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==
155
+ r.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.s&&this.o)a:{if(!this.F){a=this.i;if(!(a.g>=a.i))break a;this.F=!0}else if(Date.now()-this.s<1E3*this.g.switchInterval)break a;a=this.chooseVariant();this.i.getBandwidthEstimate(ve(this));a&&this.l(a)}};r.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(ve(this))};r.setVariants=function(a){this.m=a};r.playbackRateChanged=function(a){this.A=a};
156
+ r.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.D.O(we)}),this.h.observe(this.j))};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function ve(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
157
+ function ue(a,b,c,d){a&&(b=b.filter(function(e){return Rd(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}G("shaka.abr.SimpleAbrManager",te);te.prototype.configure=te.prototype.configure;te.prototype.setMediaElement=te.prototype.setMediaElement;te.prototype.playbackRateChanged=te.prototype.playbackRateChanged;te.prototype.setVariants=te.prototype.setVariants;te.prototype.getBandwidthEstimate=te.prototype.getBandwidthEstimate;te.prototype.segmentDownloaded=te.prototype.segmentDownloaded;
158
+ te.prototype.disable=te.prototype.disable;te.prototype.enable=te.prototype.enable;te.prototype.chooseVariant=te.prototype.chooseVariant;te.prototype.init=te.prototype.init;te.prototype.release=te.prototype.release;te.prototype.stop=te.prototype.stop;var we=1;function xe(a,b){this.g=a;this.h=b}xe.prototype.toString=function(){return"v"+this.g+"."+this.h};function ye(a,b){var c=new xe(5,0),d=ze,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Ae(a,b,c,d){bb([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Be(a,b,c,d){ab([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var ze=null;G("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function Ce(a,b){this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value)}Ce.prototype.add=function(a){return De(this.h,a)?(this.g.add(a),!0):!1};
159
+ function De(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)&&Ee(c,d)&&Fe(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(a=a.video,b=b.video,c=!(Ee(a,b)&&Fe(a.roles,b.roles)));return c?!1:!0}Ce.prototype.values=function(){return this.g.values()};
160
+ function Ee(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return ed(d)[0]});b=b.codecs.split(",").map(function(d){return ed(d)[0]});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function Fe(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Ge(a){this.g=a;this.h=new He(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Ge.prototype.create=function(a){var b=this,c=a.filter(function(d){return De(b.g,d)});return c.length?new Ce(c[0],c):this.h.create(a)};function He(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
161
+ He.prototype.create=function(a){var b=[];b=Ie(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Je(b,this.j);a.length&&(b=a);this.g&&(a=Gd(b,this.g),a.length&&(b=a));this.h&&(a=Ke(b,this.h),a.length&&(b=a));a=new Ce(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,De(a.h,c)&&a.add(c);return a};function Ie(a,b){b=vd(b);var c=Cd(b,a.map(function(d){return Bd(d)}));return c?a.filter(function(d){return c==Bd(d)}):[]}
162
+ function Je(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Ke(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Le(){this.g=Me;this.h=(new Map).set(Me,2).set(Ne,1)}function Oe(a,b,c){a.h.set(Me,c).set(Ne,b)}var Ne=0,Me=1;function Pe(a,b){var c=Qe();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
163
+ function Re(a){var b,c;return D(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new K(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return u(d,new Promise(function(e){(new pc(e)).O(c/1E3)}),2)}a.h*=a.m;B(d)})}function Qe(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Se(a,b){this.promise=a;this.i=b;this.g=!1}function Te(a){return new Se(Promise.reject(a),function(){return Promise.resolve()})}function Ue(){var a=Promise.reject(new K(2,7,7001));a.catch(function(){});return new Se(a,function(){return Promise.resolve()})}function Ve(a){return new Se(Promise.resolve(a),function(){return Promise.resolve()})}function We(a){return new Se(a,function(){return a.catch(function(){})})}Se.prototype.abort=function(){this.g=!0;return this.i()};
164
+ function Xe(a){return new Se(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Se.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
165
+ Se.prototype.Z=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Ye(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 K(2,7,7001);this.promise.then(c(!0),c(!1));return new Se(f,function(){return d()})};
166
+ function Ye(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()}}}G("shaka.util.AbortableOperation",Se);Se.prototype.chain=Se.prototype.Z;Se.prototype["finally"]=Se.prototype.finally;Se.all=Xe;Se.prototype.abort=Se.prototype.abort;Se.notAbortable=We;Se.completed=Ve;Se.aborted=Ue;Se.failed=Te;function N(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}
167
+ function Ze(a){var b=new N(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}N.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};N.prototype.stopImmediatePropagation=function(){this.g=!0};N.prototype.stopPropagation=function(){};G("shaka.util.FakeEvent",N);
168
+ var $e={Og:"abrstatuschanged",Pg:"adaptation",Qg:"buffering",Rg:"downloadfailed",Sg:"downloadheadersreceived",Tg:"drmsessionupdate",Vg:"emsg",gh:"prft",Error:"error",Wg:"expirationupdated",Xg:"gapjumped",Zg:"loaded",$g:"loading",bh:"manifestparsed",dh:"mediaqualitychanged",Metadata:"metadata",eh:"onstatechange",fh:"onstateidle",hh:"ratechange",jh:"segmentappended",kh:"sessiondata",lh:"stalldetected",mh:"streaming",nh:"textchanged",oh:"texttrackvisibility",ph:"timelineregionadded",qh:"timelineregionenter",
169
+ rh:"timelineregionexit",sh:"trackschanged",uh:"unloading",vh:"variantchanged"};function af(){this.ea=new Dd;this.$c=this}af.prototype.addEventListener=function(a,b){this.ea&&this.ea.push(a,b)};af.prototype.removeEventListener=function(a,b){this.ea&&this.ea.remove(a,b)};af.prototype.dispatchEvent=function(a){if(!this.ea)return!0;var b=this.ea.get(a.type)||[],c=this.ea.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.$c;a.currentTarget=this.$c;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
170
+ af.prototype.release=function(){this.ea=null};function bf(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 WeakSet;return b(a)}function cf(a){var b={},c;for(c in a)b[c]=a[c];return b};function df(){this.g=[]}function ef(a,b){a.g.push(b.finally(function(){lb(a.g,b)}))}df.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 ff(a,b,c){af.call(this);this.i=!1;this.m=new df;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}ta(ff,af);r=ff.prototype;r.ne=function(a){this.o=a};function gf(a,b,c,d){c=c||hf;var e=jf[a];if(!e||c>=e.priority)jf[a]={priority:c,qg:b,rg:void 0===d?!1:d}}r.sg=function(a){this.g.add(a)};r.Hg=function(a){this.g.delete(a)};r.wf=function(){this.g.clear()};r.tg=function(a){this.h.add(a)};r.Ig=function(a){this.h.delete(a)};r.xf=function(){this.h.clear()};
171
+ function kf(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();af.prototype.release.call(this);return this.m.destroy()};
172
+ r.request=function(a,b){var c=this,d=new lf;if(this.i){var e=Promise.reject(new K(2,7,7001));e.catch(function(){});return new mf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?bf(b.retryParameters):Qe();b.uris=bf(b.uris);e=nf(this,a,b);var f=e.Z(function(){return of(c,a,b,new Pe(b.retryParameters,!1),0,null,d)}),g=f.Z(function(n){return pf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
173
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.Z(function(n){var p=Date.now()-l,q=n.response;q.timeMs+=k;q.timeMs+=p;n.cg||!c.l||q.fromCache||"HEAD"==b.method||a!=qf||c.l(q.timeMs,q.data.byteLength);return q},function(n){n&&(n.severity=2);throw n;});e=new mf(m.promise,function(){return m.abort()},d);ef(this.m,e);return e};
174
+ function nf(a,b,c){var d=Ve(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={xd:e.xd},f=a.next())e.xd=f.value,d=d.Z(function(g){return function(){c.body&&(c.body=Nb(c.body));return g.xd(b,c)}}(e));return d.Z(void 0,function(g){if(g instanceof K&&7001==g.code)throw g;throw new K(2,1,1006,g);})}
175
+ function of(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Sb(c.uris[e]),k=h.Ga,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Tb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=jf[k])?k.qg:null;if(!m)return Te(new K(2,1,1E3,h));var n=k.rg,p=null,q=null,v=!1,w=!1,x;return We(Re(d)).Z(function(){if(a.i)return Ue();x=Date.now();var y=m(c.uris[e],c,b,function(z,E,F){p&&p.stop();q&&q.O(A/1E3);a.l&&b==qf&&(a.l(z,E),l=!0,g.g=F)},function(z){a.j&&a.j(z,c,b);w=!0});
176
+ if(!n)return y;var C=c.retryParameters.connectionTimeout;C&&(p=new pc(function(){v=!0;y.abort()}),p.O(C/1E3));var A=c.retryParameters.stallTimeout;A&&(q=new pc(function(){v=!0;y.abort()}));return y}).Z(function(y){p&&p.stop();q&&q.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-x);var C={response:y,cg:l};!w&&a.j&&a.j(y.headers,c,b);return C},function(y){p&&p.stop();q&&q.stop();if(a.s){var C=null,A=0;y instanceof K&&(C=y,1001==y.code&&(A=y.data[1]));a.s(c,C,A,v)}if(a.i)return Ue();v&&(y=new K(1,1,1003,
177
+ c.uris[e],b));if(y instanceof K){if(7001==y.code)throw y;if(1010==y.code)throw f;if(1==y.severity)return C=(new Map).set("error",y),C=new N("retry",C),a.dispatchEvent(C),e=(e+1)%c.uris.length,of(a,b,c,d,e,y,g)}throw y;})}
178
+ function pf(a,b,c){var d=Ve(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={yd:e.yd},f=a.next())e.yd=f.value,d=d.Z(function(g){return function(){var h=c.response;h.data&&(h.data=Nb(h.data));return g.yd(b,h)}}(e));return d.Z(function(){return c},function(g){var h=2;if(g instanceof K){if(7001==g.code)throw g;h=g.severity}throw new K(h,1,1007,g);})}G("shaka.net.NetworkingEngine",ff);ff.prototype.request=ff.prototype.request;ff.prototype.destroy=ff.prototype.destroy;ff.makeRequest=kf;
179
+ ff.defaultRetryParameters=function(){return Qe()};ff.prototype.clearAllResponseFilters=ff.prototype.xf;ff.prototype.unregisterResponseFilter=ff.prototype.Ig;ff.prototype.registerResponseFilter=ff.prototype.tg;ff.prototype.clearAllRequestFilters=ff.prototype.wf;ff.prototype.unregisterRequestFilter=ff.prototype.Hg;ff.prototype.registerRequestFilter=ff.prototype.sg;ff.unregisterScheme=function(a){delete jf[a]};ff.registerScheme=gf;ff.prototype.setForceHTTPS=ff.prototype.ne;function lf(){this.g=0}
180
+ ff.NumBytesRemainingClass=lf;function mf(a,b,c){Se.call(this,a,b);this.h=c}ta(mf,Se);ff.PendingRequest=mf;var qf=1;ff.RequestType={MANIFEST:0,SEGMENT:qf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var hf=3;ff.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:hf};var jf={};function rf(a){this.g=!1;this.h=new mc;this.i=a}rf.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 sf(a,b){if(a.g){if(b instanceof K&&7003==b.code)throw b;throw new K(2,7,7003,b);}};function tf(){this.g=new Dd}r=tf.prototype;r.release=function(){this.Ma();this.g=null};r.C=function(a,b,c,d){this.g&&(a=new uf(a,b,c,d),this.g.push(b,a))};r.ba=function(a,b,c,d){function e(g){f.Dc(a,b,e);c(g)}var f=this;this.C(a,b,e,d)};r.Dc=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.Dc(),this.g.remove(b,e))}};
181
+ r.Ma=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ka(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Dc();this.g.g={}}};G("shaka.util.EventManager",tf);tf.prototype.removeAll=tf.prototype.Ma;tf.prototype.unlisten=tf.prototype.Dc;tf.prototype.listenOnce=tf.prototype.ba;tf.prototype.listen=tf.prototype.C;tf.prototype.release=tf.prototype.release;function uf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=vf(a,d);this.target.addEventListener(b,c,this.g)}
182
+ uf.prototype.Dc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function vf(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 wf(a)?b:b.capture||!1}
183
+ function wf(a){var b=xf;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}xf=b}return b||!1}var xf=void 0;function yf(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function zf(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Af(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 Bf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Cf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next()){var d=t(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function Df(a,b){this.S=Qb(a);this.h=b==Ef;this.g=0}r=Df.prototype;r.ia=function(){return this.g<this.S.byteLength};r.aa=function(){return this.g};r.Lf=function(){return this.S.byteLength};r.Ua=function(){try{var a=this.S.getUint8(this.g);this.g+=1;return a}catch(b){throw Ff();}};r.ce=function(){try{var a=this.S.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Ff();}};r.K=function(){try{var a=this.S.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Ff();}};
184
+ r.Te=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Ff();}};r.cb=function(){try{if(this.h){var a=this.S.getUint32(this.g,!0);var b=this.S.getUint32(this.g+4,!0)}else b=this.S.getUint32(this.g,!1),a=this.S.getUint32(this.g+4,!1)}catch(c){throw Ff();}if(2097151<b)throw new K(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.bb=function(a){if(this.g+a>this.S.byteLength)throw Ff();var b=Mb(this.S,this.g,a);this.g+=a;return b};
185
+ r.skip=function(a){if(this.g+a>this.S.byteLength)throw Ff();this.g+=a};r.zg=function(a){if(this.g<a)throw Ff();this.g-=a};r.seek=function(a){if(0>a||a>this.S.byteLength)throw Ff();this.g=a};r.xc=function(){for(var a=this.g;this.ia()&&0!=this.S.getUint8(this.g);)this.g+=1;a=Mb(this.S,a,this.g-a);this.g+=1;return Fc(a)};function Ff(){return new K(2,3,3E3)}G("shaka.util.DataViewReader",Df);Df.prototype.readTerminatedString=Df.prototype.xc;Df.prototype.seek=Df.prototype.seek;Df.prototype.rewind=Df.prototype.zg;
186
+ Df.prototype.skip=Df.prototype.skip;Df.prototype.readBytes=Df.prototype.bb;Df.prototype.readUint64=Df.prototype.cb;Df.prototype.readInt32=Df.prototype.Te;Df.prototype.readUint32=Df.prototype.K;Df.prototype.readUint16=Df.prototype.ce;Df.prototype.readUint8=Df.prototype.Ua;Df.prototype.getLength=Df.prototype.Lf;Df.prototype.getPosition=Df.prototype.aa;Df.prototype.hasMoreData=Df.prototype.ia;var Ef=1;Df.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Ef};function Gf(){this.i=[];this.h=[];this.g=!1}r=Gf.prototype;r.box=function(a,b){a=Hf(a);this.i[a]=If;this.h[a]=b;return this};r.M=function(a,b){a=Hf(a);this.i[a]=Jf;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Df(a,0);for(this.g=!1;a.ia()&&!this.g;)this.vc(0,a,b,c)};
187
+ r.vc=function(a,b,c,d){var e=b.aa();if(d&&e+8>b.S.byteLength)this.g=!0;else{var f=b.K(),g=b.K(),h=Kf(g),k=!1;switch(f){case 0:f=b.S.byteLength-e;break;case 1:if(d&&b.aa()+8>b.S.byteLength){this.g=!0;return}f=b.cb();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Jf){if(d&&b.aa()+4>b.S.byteLength){this.g=!0;return}n=b.K();m=n>>>24;n&=16777215}g=e+f;c&&g>b.S.byteLength&&(g=b.S.byteLength);d&&g>b.S.byteLength?this.g=!0:(d=g-b.aa(),b=0<d?b.bb(d):new Uint8Array(0),b=new Df(b,0),l({name:h,parser:this,
188
+ partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.aa(),b.S.byteLength-b.aa()))}};function Lf(a){for(var b=Mf(a);a.reader.ia()&&!a.parser.g;)a.parser.vc(a.start+b,a.reader,a.partialOkay)}function Nf(a){for(var b=Mf(a),c=a.reader.K(),d=0;d<c&&(a.parser.vc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Of(a){var b=Mf(a);for(a.reader.skip(78);a.reader.ia()&&!a.parser.g;)a.parser.vc(a.start+b,a.reader,a.partialOkay)}
189
+ function Pf(a){return function(b){a(b.reader.bb(b.reader.S.byteLength-b.reader.aa()))}}function Hf(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 Kf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Mf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}G("shaka.util.Mp4Parser",Gf);Gf.headerSize=Mf;Gf.typeToString=Kf;Gf.allData=Pf;Gf.visualSampleEntry=Of;Gf.sampleDescription=Nf;Gf.children=Lf;
190
+ Gf.prototype.parseNext=Gf.prototype.vc;Gf.prototype.parse=Gf.prototype.parse;Gf.prototype.stop=Gf.prototype.stop;Gf.prototype.fullBox=Gf.prototype.M;Gf.prototype.box=Gf.prototype.box;var If=0,Jf=1;function Qf(a){var b=this;this.g=[];this.h=[];this.data=[];(new Gf).box("moov",Lf).box("moof",Lf).M("pssh",function(c){if(!(1<c.version)){var d=Mb(c.reader.S,-12,c.size);b.data.push(d);b.g.push(Qc(c.reader.bb(16)));if(0<c.version){d=c.reader.K();for(var e=0;e<d;e++){var f=Qc(c.reader.bb(16));b.h.push(f)}}}}).parse(a)}
191
+ function Rf(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=Qb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Pc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Sf(a,b){a=Tf(a,b);return 1!=a.length?null:a[0]}function Uf(a,b,c){a=Vf(a,b,c);return 1!=a.length?null:a[0]}function Tf(a,b){var c=[];a=t(a.childNodes);for(var d=a.next();!d.done;d=a.next())d=d.value,d instanceof Element&&d.tagName==b&&c.push(d);return c}function Wf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
192
+ function Vf(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 Xf(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Yf(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 Zf(a){return Array.from(a.childNodes).every($f)?a.textContent.trim():null}
193
+ function $f(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function ag(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 bg(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}
194
+ function cg(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}
195
+ function dg(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 eg(a){a=Number(a);return 0===a%1?a:null}function fg(a){a=Number(a);return 0===a%1&&0<a?a:null}function gg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function hg(a){a=Number(a);return isNaN(a)?null:a}function ig(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
196
+ function jg(a,b){var c=new DOMParser,d=kg.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function lg(a,b){try{var c=Fc(a);return jg(c,b)}catch(d){return null}}
197
+ var kg=new nc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function mg(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.H=new Set;this.l=this.u=null;this.fa=this.$=!1;this.J=0;this.g=null;this.s=new tf;this.i=new Map;this.A=[];this.m=new mc;this.h=null;this.o=function(d){c.m.reject(d);a.onError(d)};this.ka=new Map;this.da=new Map;this.L=new pc(function(){return ng(c)});this.P=!1;this.N=[];this.V=!1;this.ea=(new pc(function(){og(c)})).Fa(b);this.m.catch(function(){});this.j=new rf(function(){return pg(c)});this.W=!1;this.F=this.G=null}r=mg.prototype;
198
+ r.destroy=function(){return this.j.destroy()};function pg(a){return D(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.m.reject(),a.ea.stop(),a.ea=null,a.L.stop(),a.L=null,u(b,qg(a),2);case 2:if(!a.l){b.B(3);break}xa(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:za(b,5);break;case 4:Aa(b);case 5:a.l=null;case 3:a.g=null,a.H.clear(),a.u=null,a.A=[],a.h=null,a.o=function(){},a.D=null,a.W=!1,a.G=null,B(b)}})}r.configure=function(a){this.h=a};
199
+ function rg(a,b,c){a.fa=!0;a.A=[];a.P=c;return sg(a,b)}function tg(a,b,c){a.A=c;a.P=0<c.length;return sg(a,b)}
200
+ function ug(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 vg(a,g,[])}
201
+ function sg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C;return D(function(A){if(1==A.g){if(c=wg(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(z){return z.video&&z.video.drmInfos.length||z.audio&&z.audio.drmInfos.length?!0:!1});g||(h=Af(a.h.servers),xg(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=yg(m),p=t(n),q=p.next();!q.done;q=p.next())v=q.value,k.add(v);w=t(k);for(q=w.next();!q.done;q=
202
+ w.next())x=q.value,zg(x,Af(a.h.servers),Af(a.h.advanced||{}),a.h.keySystemsMapping);return u(A,Yd(b,a.P,a.W),2)}y=g||Object.keys(a.h.servers).length;if(!y)return a.$=!0,A.return(Promise.resolve());C=vg(a,void 0,b);return A.return(g?C:C.catch(function(){}))})}
203
+ function Ag(a){var b;return D(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.G){c.B(2);break}return u(c,a.G,3);case 3:return sf(a.j),c.return();case 2:return xa(c,4),a.G=a.l.setMediaKeys(a.u),u(c,a.G,6);case 6:za(c,5);break;case 4:b=Aa(c),a.o(new K(2,6,6003,b.message));case 5:sf(a.j),B(c)}})}function Bg(a,b){return D(function(c){if(1==c.g)return u(c,Ag(a),2);Cg(a,b.initDataType,Mb(b.initData));B(c)})}
204
+ r.ac=function(a){var b=this;return D(function(c){if(1==c.g){if(!b.u)return b.s.ba(a,"encrypted",function(){b.o(new K(2,6,6010))}),c.return();b.l=a;b.s.ba(b.l,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Dg(b,e.value);b.V=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.s.C(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return qg(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
205
+ b.A.length?u(c,Ag(b),2):c.B(2)}Eg(b);b.F||b.A.length||b.h.parseInbandPsshEnabled||b.s.C(b.l,"encrypted",function(d){return Bg(b,d)});B(c)})};
206
+ function Fg(a){var b,c,d,e,f;return D(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=kf([a.g.serverCertificateUri],a.h.retryParameters);xa(g,3);c=a.D.rb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Mb(d.data);za(g,4);break;case 3:throw e=Aa(g),new K(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();
207
+ xa(g,6);return u(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:za(g,0);break;case 6:throw f=Aa(g),new K(2,6,6004,f.message);}})}function Gg(a,b){var c,d,e;return D(function(f){if(1==f.g)return u(f,Hg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.ya=new mc,d.push(e.ya);d.push(c.remove());return u(f,Promise.all(d),3)}a.i.delete(c);B(f)})}
208
+ function Eg(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,Cg(a,d.initDataType,d.initData);c=t(a.A);for(d=c.next();!d.done;d=c.next())Hg(a,d.value);b.length||a.A.length||a.m.resolve();return a.m}function Cg(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(Kb(c,e.value.initData)&&!vc("Tizen 2"))return;0<a.i.size&&Ig(a)&&(a.m.resolve(),a.m=new mc,a.m.catch(function(){}));Jg(a,b,c,a.g.sessionType)}}
209
+ function Kg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Lg(a){a=a.i.keys();a=yf(a,function(b){return b.sessionId});return Array.from(a)}r.mc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Tc=function(){return Bf(this.da)};
210
+ function vg(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w;return D(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=Mg(a,c,d);x.B(2);break}return u(x,Ng(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new K(2,6,6001);sf(a.j);xa(x,4);a.H.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.H.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.H.add(q.contentType.toLowerCase());if(c.length){var y=
211
+ f.keySystem;var C=d.get(f.keySystem);var A=[],z=[],E=[],F=[],H=new Set;Og(C,A,E,z,F,H);var I=a.P?"persistent-license":"temporary";y={keySystem:y,licenseServerUri:A[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||I,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:z[0],initData:F,keyIds:H};C=t(C);for(A=C.next();!A.done;A=
212
+ C.next())A=A.value,A.distinctiveIdentifierRequired&&(y.distinctiveIdentifierRequired=A.distinctiveIdentifierRequired),A.persistentStateRequired&&(y.persistentStateRequired=A.persistentStateRequired);C=y}else C=f.keySystem,y=b.get(f.keySystem),A=[],z=[],E=[],F=[],H=new Set,Og(y.drmInfos,A,E,z,F,H),C={keySystem:C,licenseServerUri:A[0],distinctiveIdentifierRequired:"required"==y.distinctiveIdentifier,persistentStateRequired:"required"==y.persistentState,sessionType:y.sessionTypes[0]||"temporary",audioRobustness:(y.audioCapabilities?
213
+ y.audioCapabilities[0].robustness:"")||"",videoRobustness:(y.videoCapabilities?y.videoCapabilities[0].robustness:"")||"",serverCertificate:E[0],serverCertificateUri:z[0],initData:F,keyIds:H};a.g=C;if(!a.g.licenseServerUri)throw new K(2,6,6012,a.g.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,sf(a.j),a.u=v,a.$=!0,u(x,Fg(a),7);case 7:sf(a.j);za(x,0);break;case 4:w=Aa(x);sf(a.j,w);a.g=null;a.H.clear();if(w instanceof K)throw w;throw new K(2,6,6002,w.message);}})}
214
+ function Mg(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(yg(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 K(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={vd:d.vd},e=a.next())for(d.vd=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==
215
215
  l.vd}}(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}
216
- function Mg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w,x;return D(function(y){switch(y.g){case 1:if(1==b.size&&b.has(""))throw new L(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){y.B(4);break}k=h.value;if(!b.has(k)){y.B(3);break}l=b.get(k);xa(y,6);return u(y,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
217
- y.h,y.return(c);case 6:Aa(y);case 7:rf(a.j);case 3:h=g.next();y.B(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){y.B(11);break}p=n.value;q=t(b.keys());h=q.next();case 12:if(h.done){n=m.next();y.B(9);break}v=h.value;w=b.get(v);x=w.drmInfos.some(function(C){return!!C.licenseServerUri});if(x!=p){y.B(13);break}xa(y,15);return u(y,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=y.h,y.return(c);case 15:Aa(y);case 16:rf(a.j);case 13:h=q.next();y.B(12);break;case 11:return y.return(c)}})}
218
- function vg(a){a=zf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=f;22!=g.length&&(g=Nc(Pc(f),!1));f=e;22!=f.length&&(f=Nc(Pc(e),!1));e={kty:"oct",kid:g,k:f};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Nb(Jc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",
216
+ function Ng(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w,x;return D(function(y){switch(y.g){case 1:if(1==b.size&&b.has(""))throw new K(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){y.B(4);break}k=h.value;if(!b.has(k)){y.B(3);break}l=b.get(k);xa(y,6);return u(y,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
217
+ y.h,y.return(c);case 6:Aa(y);case 7:sf(a.j);case 3:h=g.next();y.B(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){y.B(11);break}p=n.value;q=t(b.keys());h=q.next();case 12:if(h.done){n=m.next();y.B(9);break}v=h.value;w=b.get(v);x=w.drmInfos.some(function(C){return!!C.licenseServerUri});if(x!=p){y.B(13);break}xa(y,15);return u(y,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=y.h,y.return(c);case 15:Aa(y);case 16:sf(a.j);case 13:h=q.next();y.B(12);break;case 11:return y.return(c)}})}
218
+ function wg(a){a=Af(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=f;22!=g.length&&(g=Nc(Pc(f),!1));f=e;22!=f.length&&(f=Nc(Pc(e),!1));e={kty:"oct",kid:g,k:f};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Mb(Jc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",
219
219
  videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
220
- function Gg(a,b){var c,d,e,f,g;return D(function(h){switch(h.g){case 1:try{c=a.u.createSession("persistent-license")}catch(k){return d=new L(2,6,6005,k.message),a.m(d),h.return(Promise.reject(d))}a.s.C(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.L.push(k):Cg(a,k)});a.s.C(c,"keystatuseschange",function(k){return Og(a,k)});e={initData:null,initDataType:null,loaded:!1,Zd:Infinity,Na:null,type:"persistent-license"};a.i.set(c,e);xa(h,2);return u(h,c.load(b),4);case 4:f=
221
- h.h;rf(a.j);if(!f)return a.i.delete(c),a.m(new L(2,6,6013)),h.return(Promise.resolve());e.loaded=!0;Hg(a)&&a.o.resolve();return h.return(c);case 2:g=Aa(h),rf(a.j,g),a.i.delete(c),a.m(new L(2,6,6005,g.message));case 3:return h.return(Promise.resolve())}})}
222
- function Ig(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.m(new L(2,6,6005,f.message));return}a.s.C(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.L.push(f):Cg(a,f)});a.s.C(e,"keystatuseschange",function(f){return Og(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Zd:Infinity,Na:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof L||(b=new L(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Nc(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
223
- 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 L(2,6,6006,f.message,f,h))}})}
224
- function Cg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w;D(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&Nc(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=jf([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),
225
- Jg(a.g.keySystem)&&Pg(g),h=Date.now(),xa(x,2),l=a.D.rb.request(2,g),u(x,l.promise,4);case 4:k=x.h;za(x,3);break;case 2:return m=Aa(x),n=new L(2,6,6007,m),a.m(n),d&&d.Na&&d.Na.reject(n),x.return();case 3:if(a.j.g)return x.return();a.J+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Nc(k.data);xa(x,5);return u(x,c.update(k.data),7);case 7:za(x,6);break;case 5:return p=Aa(x),q=new L(2,6,6008,p.message),a.m(q),d&&d.Na&&d.Na.reject(q),x.return();case 6:if(a.j.g)return x.return();v=new O("drmsessionupdate");
226
- a.D.onEvent(v);d&&(d.Na&&d.Na.resolve(),w=new M(function(){d.loaded=!0;Hg(a)&&a.o.resolve()}),w.O(Qg));B(x)}})}
227
- function Pg(a){var b=Gc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=ig(b,"PlayReadyKeyMessage");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Oc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
228
- function Og(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Jg(a.g.keySystem)&&16==g.byteLength&&(tc()||Ac())){h=Rb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Qc(g).slice(0,32);a.la.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Na&&(a.i.delete(b),b.close().catch(function(){}));
229
- Hg(a)&&(a.o.resolve(),a.V.O(Rg))}function mg(a){var b=a.la,c=a.ea;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 L(2,6,6014));a.D.gd(Af(c))}
230
- function Sg(){var a,b,c,d,e,f,g,h;return D(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,n,
231
- p;return D(function(q){switch(q.g){case 1:xa(q,2);if("org.w3.clearkey"===l&&Bc())throw Error("Unsupported keySystem");return u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,vc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(q,m.createMediaKeys(),5);case 5:za(q,0);break;case 2:Aa(q),f.set(l,null),B(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k.return(Af(f))})}
232
- function Tg(a){var b;return D(function(c){if(1==c.g)return b=new Promise(function(d,e){(new M(e)).O(Ug)}),xa(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return za(c,0);Aa(c);B(c)})}
233
- function pg(a){var b;return D(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 D(function(g){if(1==g.g)return xa(g,2),a.ga||a.A.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Tg(e),5):u(g,e.remove(),5);if(2!=g.g)return za(g,0);Aa(g);B(g)})})),0)})}
234
- function Vg(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(ka(d.keyIds),ka(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
220
+ function Hg(a,b){var c,d,e,f,g;return D(function(h){switch(h.g){case 1:try{c=a.u.createSession("persistent-license")}catch(k){return d=new K(2,6,6005,k.message),a.o(d),h.return(Promise.reject(d))}a.s.C(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.V?a.N.push(k):Dg(a,k)});a.s.C(c,"keystatuseschange",function(k){return Pg(a,k)});e={initData:null,initDataType:null,loaded:!1,Yd:Infinity,ya:null,type:"persistent-license"};a.i.set(c,e);xa(h,2);return u(h,c.load(b),4);case 4:f=
221
+ h.h;sf(a.j);if(!f)return a.i.delete(c),a.o(new K(2,6,6013)),h.return(Promise.resolve());e.loaded=!0;Ig(a)&&a.m.resolve();return h.return(c);case 2:g=Aa(h),sf(a.j,g),a.i.delete(c),a.o(new K(2,6,6005,g.message));case 3:return h.return(Promise.resolve())}})}
222
+ function Jg(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.o(new K(2,6,6005,f.message));return}a.s.C(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.V?a.N.push(f):Dg(a,f)});a.s.C(e,"keystatuseschange",function(f){return Pg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Yd:Infinity,ya:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof K||(b=new K(2,6,6016,f));a.o(b);return}a.h.logLicenseExchange&&Nc(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
223
+ 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.o(new K(2,6,6006,f.message,f,h))}})}
224
+ function Dg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w;D(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&Nc(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=kf([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),
225
+ Kg(a.g.keySystem)&&Qg(g),h=Date.now(),xa(x,2),l=a.D.rb.request(2,g),u(x,l.promise,4);case 4:k=x.h;za(x,3);break;case 2:m=Aa(x);if(a.j.g)return x.return();n=new K(2,6,6007,m);1==a.i.size?(a.o(n),d&&d.ya&&d.ya.reject(n)):(d&&d.ya&&d.ya.reject(n),a.i.delete(c),Ig(a)&&(a.m.resolve(),a.L.O(.1)));return x.return();case 3:if(a.j.g)return x.return();a.J+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Nc(k.data);xa(x,5);return u(x,c.update(k.data),7);case 7:za(x,6);break;case 5:return p=Aa(x),q=new K(2,6,6008,
226
+ p.message),a.o(q),d&&d.ya&&d.ya.reject(q),x.return();case 6:if(a.j.g)return x.return();v=new N("drmsessionupdate");a.D.onEvent(v);d&&(d.ya&&d.ya.resolve(),w=new pc(function(){d.loaded=!0;Ig(a)&&a.m.resolve()}),w.O(Rg));B(x)}})}
227
+ function Qg(a){var b=Gc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=jg(b,"PlayReadyKeyMessage");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Oc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
228
+ function Pg(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Kg(a.g.keySystem)&&16==g.byteLength&&(tc()||Ac())){h=Qb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Qc(g).slice(0,32);a.ka.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.ya&&(a.i.delete(b),b.close().catch(function(){}));
229
+ Ig(a)&&(a.m.resolve(),a.L.O(Sg))}function ng(a){var b=a.ka,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.o(new K(2,6,6014));a.D.gd(Bf(c))}
230
+ function Tg(){var a,b,c,d,e,f,g,h;return D(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,n,
231
+ p;return D(function(q){switch(q.g){case 1:xa(q,2);if("org.w3.clearkey"===l&&Bc())throw Error("Unsupported keySystem");return u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,vc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(q,m.createMediaKeys(),5);case 5:za(q,0);break;case 2:Aa(q),f.set(l,null),B(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k.return(Bf(f))})}
232
+ function Ug(a){var b;return D(function(c){if(1==c.g)return b=new Promise(function(d,e){(new pc(e)).O(Vg)}),xa(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return za(c,0);Aa(c);B(c)})}
233
+ function qg(a){var b;return D(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 D(function(g){if(1==g.g)return xa(g,2),a.fa||a.A.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Ug(e),5):u(g,e.remove(),5);if(2!=g.g)return za(g,0);Aa(g);B(g)})})),0)})}
234
+ function Wg(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(ka(d.keyIds),ka(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
235
235
  f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}}return c}
236
- function xg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function ng(a){a.i.forEach(function(b,c){var d=b.Zd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Zd=e)})}function Hg(a){a=a.i.values();return yf(a,function(b){return b.loaded})}
237
- function wg(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
238
- function Ng(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={qa:g.qa},h=a.next()){g.qa=h.value;b.includes(g.qa.licenseServerUri)||b.push(g.qa.licenseServerUri);d.includes(g.qa.serverCertificateUri)||d.push(g.qa.serverCertificateUri);g.qa.serverCertificate&&(c.some(function(m){return function(n){return Lb(n,m.qa.serverCertificate)}}(g))||c.push(g.qa.serverCertificate));if(g.qa.initData){h={};for(var k=t(g.qa.initData),l=k.next();!l.done;h={Ic:h.Ic},l=k.next())h.Ic=l.value,e.some(function(m){return function(n){var p=
239
- m.Ic;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Lb(n.initData,p.initData)}}(h))||e.push(h.Ic)}if(g.qa.keyIds)for(h=t(g.qa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
240
- function yg(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=
241
- 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 Ug=1,Qg=5,Rg=.5,Wg=new oc(function(){return Ob(new Uint8Array([0]))});function Xg(){}function Yg(a,b,c,d){var e,f,g,h;return D(function(k){if(1==k.g){if(d&&(e=Zg[d.toLowerCase()]))return k.return(e);if(f=$g(a))if(g=ah[f])return k.return(g);return d?k.B(2):u(k,bh(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=Zg[d]))return k.return(h);throw new L(2,4,4E3,a);})}function bh(a,b,c){var d,e,f;return D(function(g){if(1==g.g)return d=jf([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():"")})}
242
- function $g(a){a=(new Tb(a)).ta.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}G("shaka.media.ManifestParser",Xg);Xg.unregisterParserByMime=function(a){delete Zg[a]};Xg.registerParserByMime=function(a,b){Zg[a]=b};Xg.registerParserByExtension=function(a,b){ah[a]=b};var Zg={},ah={};function ch(a){function b(){d=!0}function c(l){f.push(l);Kf(l)}a=Nb(a);var d=!1,e,f=[],g=[];(new Ff).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).M("stsd",function(l){e=l;f.push(l);Mf(l)}).M("encv",b).M("enca",b).M("dvav",function(l){g.push({box:l,xa:1701733238})}).M("dva1",function(l){g.push({box:l,xa:1701733238})}).M("dvh1",function(l){g.push({box:l,xa:1701733238})}).M("dvhe",function(l){g.push({box:l,xa:1701733238})}).M("hev1",function(l){g.push({box:l,xa:1701733238})}).M("hvc1",
243
- function(l){g.push({box:l,xa:1701733238})}).M("avc1",function(l){g.push({box:l,xa:1701733238})}).M("avc3",function(l){g.push({box:l,xa:1701733238})}).M("ac-3",function(l){g.push({box:l,xa:1701733217})}).M("ec-3",function(l){g.push({box:l,xa:1701733217})}).M("ac-4",function(l){g.push({box:l,xa:1701733217})}).M("mp4a",function(l){g.push({box:l,xa:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw ib(Qc(a)),new L(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,
244
- a=dh(a,e,k.box,f,k.xa);return a}
245
- function dh(a,b,c,d,e){var f=eh.value(),g=a.subarray(c.start,c.start+c.size),h=Rb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Rb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);fh(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,fh(e,d.start,d.size+k.byteLength);k=Rb(e,b.start);b=Lf(b);a=k.getUint32(b);
246
- k.setUint32(b,a+1);return e}function fh(a,b,c){a=Rb(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 eh=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 gh(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(z){return null!=z&&""!=z.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(z){return null!=z&&""!=z.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=hh(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],q=-1,v=-1,w=0;w<p.length;w++)if(null!=p[w]&&""!==p[w].g.trim()){q=w;break}for(w=p.length-1;0<=w;w--)if(null!=p[w]&&""!==p[w].g.trim()){v=w;break}if(-1===
247
- q||-1===v)p=ih(d,e),a.nestedCues.push(p);else{for(;q<=v;q++)if(w=p[q]){var x=w.l,y=w.i,C=w.j,A=w.h;if(x!=h||y!=k||C!=l||A!=m)n.payload&&a.nestedCues.push(n),n=hh(d,e,x,y,C,A),h=x,k=y,l=C,m=A;n.payload+=w.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=ih(d,e),a.nestedCues.push(n));n=hh(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
248
- function hh(a,b,c,d,e,f){a=new pb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function ih(a,b){a=new pb(a,b,"");a.lineBreak=!0;return a}function jh(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function kh(a,b){this.i=[];this.g=1;this.h=0;this.u=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";lh(this)}function mh(a,b,c){return gh(new pb(b,c,""),"CC"+((a.u<<1|a.s)+1),a.i,b,c)}function lh(a){nh(a,0,15);a.g=1}function oh(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case ph:d=qh.has(c)?qh.get(c):String.fromCharCode(c);break;case rh:d=sh.get(c);break;case th:a.i[a.g].pop();d=uh.get(c);break;case vh:a.i[a.g].pop(),d=wh.get(c)}d&&a.i[a.g].push(new jh(d,a.m,a.j,a.o,a.l))}}
249
- function xh(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].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 nh(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
250
- var ph=0,rh=1,th=2,vh=3,qh=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"]]),sh=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"]]),uh=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
251
- [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"]]),wh=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
252
- [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 yh(a,b){this.h=zh;this.o=new kh(a,b);this.i=new kh(a,b);this.l=new kh(a,b);this.g=this.i;this.j=0;this.m=null}function Ah(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Bh&&a.h!==Ch&&(e=mh(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,nh(c,0,15),c=a.l,c.g=0<c.h?c.h:0,nh(c,0,15),d.g=15);a.h=Bh;d.h=b;return e}function Dh(a){a.h=Eh;a.g=a.l;a.g.h=0}function Fh(a){db("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=Ch}
253
- var zh=0,Eh=1,Bh=3,Ch=4,Gh="black green blue cyan red yellow magenta black".split(" "),Hh="white green blue cyan red yellow magenta white_italics".split(" ");function Ih(){this.l=!1;this.A=this.F=0;this.D=Jh;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";Kh(this)}function Kh(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Lh())}function Lh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Mh(a,b){Nh(a)&&(a.i[a.h][a.g]=new jh(b,a.u,a.o,a.m,a.s),a.g++)}function Nh(a){var b=a.g<a.A&&0<=a.g;return a.h<a.F&&0<=a.h&&b}Ih.prototype.isVisible=function(){return this.l};
254
- function Oh(a,b,c){var d=new pb(a.j,b,"");d.textAlign=a.D===Ph?"left":a.D===Qh?"right":tb;if(c=gh(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Ph=0,Qh=1,Jh=2;function Rh(){this.i=[];this.h=null;this.g=0}function Sh(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 Th(a.h)),a.h=null,a.g=0))}function Th(a){this.g=0;this.h=a}Th.prototype.ja=function(){return this.g<this.h.length};Th.prototype.ba=function(){return this.g};function Uh(a){if(!a.ja())throw new L(2,2,3E3);return a.h[a.g++]}Th.prototype.skip=function(a){if(this.g+a>this.h.length)throw new L(2,2,3E3);this.g+=a};function Vh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
255
- function Wh(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=Uh(b).value;b=null;c=t(Xh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Oh(e,d,a.i)),Kh(e);return b}if(137===c)for(b=Uh(b).value,b=t(Xh(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=Uh(b).value;b=null;c=t(Xh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Oh(e,d,a.i)),e.l=!1;return b}if(139===c){c=Uh(b).value;
256
- b=null;c=t(Xh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Oh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Uh(b).value,Yh(a,b,d);if(143===c)return d=Yh(a,255,d),Zh(a),d;if(144===c)b.skip(1),d=Uh(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=Uh(b).value,c=Uh(b).value,b.skip(1),a.g&&(b=$h((c&48)>>4,(c&12)>>2,c&3),a.g.s=$h((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Uh(b).value,b=Uh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
257
- b.skip(1),d=Uh(b).value,b.skip(1),a.g&&(a.g.D=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Ih;f.j=d;a.h[c]=f}d=Uh(b).value;Uh(b);Uh(b);f=Uh(b).value;var g=Uh(b).value;b=Uh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.u=!1,b.o=!1,b.s="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.F=(f&15)+1;b.A=(g&63)+1;a.g=a.h[c]}}}return null}function Xh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
258
- function Yh(a,b,c){var d=null;b=t(Xh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Oh(f,c,a.i));a.h[e]=null}return d}function Zh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function $h(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return ai[a<<2|b<<1|c]}
259
- var bi=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"]]),ai="black blue green cyan red magenta yellow white".split(" ");function ci(){this.h=[];this.g=[];this.i=new Rh;this.l=0;this.s=new Map([["CC1",new yh(0,0)],["CC2",new yh(0,1)],["CC3",new yh(1,0)],["CC4",new yh(1,1)]]);this.o=this.m=0;this.j=new Map;di(this)}function di(a){a.m=0;a.o=0;a=t(a.s.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,lh(b.i),lh(b.l),lh(b.o)}
260
- function ei(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=fi(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())Sh(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=gi(a,e.value),c.push.apply(c,ka(e));a.i.i=[];a.h=[];a.g=[];return c}
261
- function fi(a,b){var c=b.type;if(16===(b.Ba&112)){var d=b.Ba>>3&1;0===c?a.m=d:a.o=d}c=a.s.get("CC"+((c<<1|(c?a.o:a.m))+1));if(255===b.Ba&&255===b.Pa||!b.Ba&&!b.Pa||!hi(b.Ba)||!hi(b.Pa))return 45<=++a.l&&di(a),null;a.l=0;b.Ba&=127;b.Pa&=127;if(!b.Ba&&!b.Pa)return null;a=null;if(16===(b.Ba&112))a:{d=b.Ba;a=b.Pa;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var e=(a&30)>>1;d="white";var f=!1;7>e?d=Hh[e]:7===e&&(f=
262
- !0);a=1===(a&1);if(c.h!==Ch){e=c.g;if(c.h===Bh&&b!==e.g){var g=1+b-e.h;xh(e,g,1+e.g-e.h,e.h);nh(e,0,g-1);nh(e,b+1,15-b)}e.g=b;c.g.m=a;c.g.j=f;c.g.l=d;c.g.o="black"}}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",oh(c.g,ph,32),d=!1,b=Hh[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Gh[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))oh(c.g,rh,a);else if(18===
263
- (d&246)&&32===(a&224))oh(c.g,d&1?vh:th,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Pa){case 32:Dh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Ah(c,2,a);break;case 38:d=Ah(c,3,a);break;case 39:d=Ah(c,4,a);break;case 40:oh(c.g,ph,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=a;break;case 42:lh(c.o);Fh(c);break;case 43:Fh(c);break;case 44:b=c.i;d=null;c.h!==Ch&&(d=mh(b,c.j,a));nh(b,0,15);break;case 45:b=c.g;c.h!==Bh?d=null:(d=mh(b,c.j,a),f=b.g-b.h+1,xh(b,f-1,f,b.h),nh(b,0,
264
- f-1),nh(b,b.g,15-b.g),c.j=a);break;case 46:nh(c.l,0,15);break;case 47:b=null,c.h!==Ch&&(b=mh(c.i,c.j,a)),d=c.l,c.l=c.i,c.i=d,Dh(c),c.j=a,d=b}a=d;break a}a=null}else d=b.Pa,oh(c.g,ph,b.Ba),oh(c.g,ph,d);return a}
265
- function gi(a,b){var c=[];try{for(;b.ja();){var d=Uh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Uh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Vh(e));for(var g=a.j.get(e),h=b.ba();b.ba()-h<f;){e=b;var k=Uh(e),l=k.value,m=k.pts;if(16===l){var n=Uh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!Nh(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.A-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=Oh(q,p,g.i));if(q.h+1>=q.F){p=q;for(var v=0,w=1;16>w;w++,
266
- v++)p.i[v]=p.i[w];for(w=0;1>w;w++,v++)p.i[v]=Lh()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=Oh(q,p,g.i));q.i[q.h]=Lh();q.g=0;break;case 12:q.isVisible()&&(e=Oh(q,p,g.i)),Kh(q),p=q,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Wh(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?Mh(g.g,"\u266a"):Mh(g.g,
267
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Mh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(bi.has(e)){var y=bi.get(e);Mh(g.g,y)}else Mh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Mh(g.g,"_"):Mh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(C){if(C instanceof L&&3E3===C.code)db("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function hi(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function ii(){}ii.prototype.init=function(){};ii.prototype.parse=function(){return[]};function ji(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(ka(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function ki(a,b){var c=null,d=null,e=null,f=a.K();b&1&&(e=a.eb());b&2&&a.skip(4);b&8&&(c=a.K());b&16&&(d=a.K());return{trackId:f,He:c,Bf:d,vh:e}}function li(a,b){return{Be:1==b?a.eb():a.K()}}function mi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.K()}}
268
- function ni(a,b,c){var d=a.K(),e=[],f=null;c&1&&(f=a.K());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={ie:null,sampleSize:null,jd:null};c&256&&(h.ie=a.K());c&512&&(h.sampleSize=a.K());c&1024&&a.skip(4);c&2048&&(h.jd=0==b?a.K():a.Ue());e.push(h)}return{Bh:d,We:e,Af:f}};function oi(){this.j=new Map;this.i=this.h=0;this.g=pi}
269
- oi.prototype.init=function(a){function b(f){f=f.name;f in qi&&(c.g=qi[f])}var c=this,d=[],e=[];(new Ff).box("moov",Kf).box("mvex",Kf).M("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.K();g=g.K();c.h=f;c.i=g}).box("trak",Kf).M("tkhd",function(f){var g=f.reader;1==f.version?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));f=g.K();d.push(f)}).box("mdia",Kf).M("mdhd",function(f){f=mi(f.reader,f.version);e.push(f.timescale)}).box("minf",Kf).box("stbl",Kf).M("stsd",Mf).box("avc1",b).box("avc3",b).box("hev1",
270
- b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("encv",Nf).box("sinf",Kf).box("frma",function(f){f=f.reader.K();f=Jf(f);f in qi&&(c.g=qi[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new L(2,2,2010);this.g==pi&&cb("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
271
- oi.prototype.parse=function(a){var b=this;if(this.g==pi)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Ff).box("moof",function(l){f=l.start;g=[];Kf(l)}).box("traf",Kf).M("trun",function(l){l=ni(l.reader,l.version,l.flags);g.push(l)}).M("tfhd",function(l){l=ki(l.reader,l.flags);d=l.He||b.h;e=l.Bf||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).M("tfdt",function(l){h=li(l.reader,l.version).Be}).box("mdat",function(l){if(null===h)throw cb("Unable to find base media decode time for CEA captions!"),
272
- new L(2,2,2010);ri(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
273
- function ri(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(v){return v.We});n=[].concat.apply([],ka(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Af);b.ja();){g=b.K();var p=b.Va(),q=null;q=!1;h=1;switch(a.g){case si:q=p&31;q=6==q;break;case ti:h=2;b.skip(1);q=p>>1&63;q=39==q||40==q;break;default:return}if(q)for(p=0,l<n.length&&(p=n[l].jd||0),p=(c+p)/d,h=t(ji(b.cb(g-h))),q=h.next();!q.done;q=h.next())k.push({og:q.value,pts:p});else try{b.skip(g-h)}catch(v){break}m-=g+4;0==m&&(c=l<n.length?
274
- c+(n[l].ie||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}var pi=0,si=1,ti=2,qi={avc1:si,avc3:si,hev1:ti,hvc1:ti,dvh1:ti,dvhe:ti};function ui(a){this.h=new ii;a.includes("video/mp4")&&(this.h=new oi);this.g=new ci}ui.prototype.init=function(a){this.h.init(a)};
275
- function vi(a,b){b=a.h.parse(b);b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Nb(d.og);if(0<e.length&&(c=a.g,d=d.pts,e=new Cf(e,0),!(8>e.S.byteLength)&&181===e.Va()&&49===e.de()&&1195456820===e.K()&&3===e.Va())){var f=e.Va();if(0!==(f&64)){f&=31;e.skip(1);for(var g=0;g<f;g++){var h=e.Va(),k=(h&4)>>2,l=e.Va(),m=e.Va();k&&(h&=3,0===h||1===h?c.h.push({pts:d,type:h,Ba:l,Pa:m,order:c.h.length}):(c.g.push({pts:d,type:h,value:l,order:c.g.length}),c.g.push({pts:d,type:2,value:m,order:c.g.length})))}}}}return ei(a.g)}
276
- ;function wi(a,b,c,d,e,f){this.va=a;this.Ea=b;this.na=c;this.Sd=void 0===d?null:d;this.timescale=void 0===e?null:e;this.l=void 0===f?null:f}wi.prototype.pc=function(){return this.Ea};wi.prototype.lc=function(){return this.na};function xi(a,b){return a===b?!0:a&&b?a.pc()==b.pc()&&a.lc()==b.lc()&&ob(a.va().sort(),b.va().sort()):a==b}G("shaka.media.InitSegmentReference",wi);wi.prototype.getEndByte=wi.prototype.lc;wi.prototype.getStartByte=wi.prototype.pc;
277
- function Q(a,b,c,d,e,f,g,h,k,l,m,n,p,q,v){l=void 0===l?[]:l;q=void 0===q?yi:q;this.startTime=a;this.i=this.endTime=b;this.u=c;this.Ea=d;this.na=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.o=void 0===n?null:n;this.X=void 0===p?null:p;this.status=q;this.s=!1;this.l=void 0===v?null:v;this.m=null;this.j=0}r=Q.prototype;r.va=function(){return this.u()};r.getStartTime=function(){return this.startTime};r.If=function(){return this.endTime};
278
- r.pc=function(){return this.Ea};r.lc=function(){return this.na};r.Zf=function(){return this.tilesLayout};r.Yf=function(){return this.o};r.Jb=function(){return this.status};r.hg=function(){this.status=zi};r.Re=function(){this.s=!0};r.eg=function(){return this.s};r.cf=function(a){this.m=a};r.Wf=function(){return this.m};r.offset=function(a){this.startTime+=a;this.endTime+=a;this.i+=a;for(var b=t(this.h),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.i+=a};
279
- r.se=function(a){null==this.X?bb("Sync attempted without sync time!"):(a=this.X-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};G("shaka.media.SegmentReference",Q);Q.prototype.syncAgainst=Q.prototype.se;Q.prototype.offset=Q.prototype.offset;Q.prototype.getThumbnailSprite=Q.prototype.Wf;Q.prototype.setThumbnailSprite=Q.prototype.cf;Q.prototype.isPreload=Q.prototype.eg;Q.prototype.markAsPreload=Q.prototype.Re;Q.prototype.markAsUnavailable=Q.prototype.hg;Q.prototype.getStatus=Q.prototype.Jb;
280
- Q.prototype.getTileDuration=Q.prototype.Yf;Q.prototype.getTilesLayout=Q.prototype.Zf;Q.prototype.getEndByte=Q.prototype.lc;Q.prototype.getStartByte=Q.prototype.pc;Q.prototype.getEndTime=Q.prototype.If;Q.prototype.getStartTime=Q.prototype.getStartTime;Q.prototype.getUris=Q.prototype.va;var yi=0,zi=1;Q.Status={Mg:yi,sh:zi,$g: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)}
281
- function Di(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Ei(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,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}
282
- 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};/*
236
+ function yg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function og(a){a.i.forEach(function(b,c){var d=b.Yd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Yd=e)})}function Ig(a){a=a.i.values();return zf(a,function(b){return b.loaded})}
237
+ function xg(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
238
+ function Og(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={pa:g.pa},h=a.next()){g.pa=h.value;b.includes(g.pa.licenseServerUri)||b.push(g.pa.licenseServerUri);d.includes(g.pa.serverCertificateUri)||d.push(g.pa.serverCertificateUri);g.pa.serverCertificate&&(c.some(function(m){return function(n){return Kb(n,m.pa.serverCertificate)}}(g))||c.push(g.pa.serverCertificate));if(g.pa.initData){h={};for(var k=t(g.pa.initData),l=k.next();!l.done;h={Hc:h.Hc},l=k.next())h.Hc=l.value,e.some(function(m){return function(n){var p=
239
+ m.Hc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Kb(n.initData,p.initData)}}(h))||e.push(h.Hc)}if(g.pa.keyIds)for(h=t(g.pa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
240
+ function zg(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=
241
+ 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 Vg=1,Rg=5,Sg=.5,Xg=new nc(function(){return Nb(new Uint8Array([0]))});function Yg(){}function Zg(a,b,c,d){var e,f,g,h;return D(function(k){if(1==k.g){if(d&&(e=$g[d.toLowerCase()]))return k.return(e);if(f=ah(a))if(g=bh[f])return k.return(g);return d?k.B(2):u(k,ch(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=$g[d]))return k.return(h);throw new K(2,4,4E3,a,d);})}function ch(a,b,c){var d,e,f;return D(function(g){if(1==g.g)return d=kf([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():"")})}
242
+ function ah(a){a=(new Sb(a)).sa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}G("shaka.media.ManifestParser",Yg);Yg.unregisterParserByMime=function(a){delete $g[a]};Yg.registerParserByMime=function(a,b){$g[a]=b};Yg.registerParserByExtension=function(a,b){bh[a]=b};var $g={},bh={};function dh(a){function b(){d=!0}function c(l){f.push(l);Lf(l)}a=Mb(a);var d=!1,e,f=[],g=[];(new Gf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).M("stsd",function(l){e=l;f.push(l);Nf(l)}).M("encv",b).M("enca",b).M("dvav",function(l){g.push({box:l,wa:1701733238})}).M("dva1",function(l){g.push({box:l,wa:1701733238})}).M("dvh1",function(l){g.push({box:l,wa:1701733238})}).M("dvhe",function(l){g.push({box:l,wa:1701733238})}).M("hev1",function(l){g.push({box:l,wa:1701733238})}).M("hvc1",
243
+ function(l){g.push({box:l,wa:1701733238})}).M("avc1",function(l){g.push({box:l,wa:1701733238})}).M("avc3",function(l){g.push({box:l,wa:1701733238})}).M("ac-3",function(l){g.push({box:l,wa:1701733217})}).M("ec-3",function(l){g.push({box:l,wa:1701733217})}).M("ac-4",function(l){g.push({box:l,wa:1701733217})}).M("mp4a",function(l){g.push({box:l,wa:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw hb(Qc(a)),new K(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,
244
+ a=eh(a,e,k.box,f,k.wa);return a}
245
+ function eh(a,b,c,d,e){var f=fh.value(),g=a.subarray(c.start,c.start+c.size),h=Qb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Qb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);gh(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,gh(e,d.start,d.size+k.byteLength);k=Qb(e,b.start);b=Mf(b);a=k.getUint32(b);
246
+ k.setUint32(b,a+1);return e}function gh(a,b,c){a=Qb(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 fh=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 hh(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(z){return null!=z&&""!=z.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(z){return null!=z&&""!=z.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=ih(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],q=-1,v=-1,w=0;w<p.length;w++)if(null!=p[w]&&""!==p[w].g.trim()){q=w;break}for(w=p.length-1;0<=w;w--)if(null!=p[w]&&""!==p[w].g.trim()){v=w;break}if(-1===
247
+ q||-1===v)p=jh(d,e),a.nestedCues.push(p);else{for(;q<=v;q++)if(w=p[q]){var x=w.l,y=w.i,C=w.j,A=w.h;if(x!=h||y!=k||C!=l||A!=m)n.payload&&a.nestedCues.push(n),n=ih(d,e,x,y,C,A),h=x,k=y,l=C,m=A;n.payload+=w.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=jh(d,e),a.nestedCues.push(n));n=ih(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
248
+ function ih(a,b,c,d,e,f){a=new ob(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function jh(a,b){a=new ob(a,b,"");a.lineBreak=!0;return a}function kh(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function lh(a,b){this.i=[];this.g=1;this.h=0;this.u=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";mh(this)}function nh(a,b,c){return hh(new ob(b,c,""),"CC"+((a.u<<1|a.s)+1),a.i,b,c)}function mh(a){oh(a,0,15);a.g=1}function ph(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case qh:d=rh.has(c)?rh.get(c):String.fromCharCode(c);break;case sh:d=th.get(c);break;case uh:a.i[a.g].pop();d=vh.get(c);break;case wh:a.i[a.g].pop(),d=xh.get(c)}d&&a.i[a.g].push(new kh(d,a.m,a.j,a.o,a.l))}}
249
+ function yh(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].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 oh(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
250
+ var qh=0,sh=1,uh=2,wh=3,rh=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"]]),th=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),vh=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,
251
+ "\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"]]),xh=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
252
+ [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 zh(a,b){this.h=Ah;this.o=new lh(a,b);this.i=new lh(a,b);this.l=new lh(a,b);this.g=this.i;this.j=0;this.m=null}function Bh(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Ch&&a.h!==Dh&&(e=nh(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,oh(c,0,15),c=a.l,c.g=0<c.h?c.h:0,oh(c,0,15),d.g=15);a.h=Ch;d.h=b;return e}function Eh(a){a.h=Fh;a.g=a.l;a.g.h=0}function Gh(a){cb("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=Dh}
253
+ var Ah=0,Fh=1,Ch=3,Dh=4,Hh="black green blue cyan red yellow magenta black".split(" "),Ih="white green blue cyan red yellow magenta white_italics".split(" ");function Jh(){this.l=!1;this.A=this.F=0;this.D=Kh;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";Lh(this)}function Lh(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Mh())}function Mh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Nh(a,b){Oh(a)&&(a.i[a.h][a.g]=new kh(b,a.u,a.o,a.m,a.s),a.g++)}function Oh(a){var b=a.g<a.A&&0<=a.g;return a.h<a.F&&0<=a.h&&b}Jh.prototype.isVisible=function(){return this.l};
254
+ function Ph(a,b,c){var d=new ob(a.j,b,"");d.textAlign=a.D===Qh?"left":a.D===Rh?"right":sb;if(c=hh(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Qh=0,Rh=1,Kh=2;function Sh(){this.i=[];this.h=null;this.g=0}function Th(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 Uh(a.h)),a.h=null,a.g=0))}function Uh(a){this.g=0;this.h=a}Uh.prototype.ia=function(){return this.g<this.h.length};Uh.prototype.aa=function(){return this.g};function Vh(a){if(!a.ia())throw new K(2,2,3E3);return a.h[a.g++]}Uh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new K(2,2,3E3);this.g+=a};function Wh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
255
+ function Xh(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=Vh(b).value;b=null;c=t(Yh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Ph(e,d,a.i)),Lh(e);return b}if(137===c)for(b=Vh(b).value,b=t(Yh(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=Vh(b).value;b=null;c=t(Yh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Ph(e,d,a.i)),e.l=!1;return b}if(139===c){c=Vh(b).value;
256
+ b=null;c=t(Yh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Ph(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Vh(b).value,Zh(a,b,d);if(143===c)return d=Zh(a,255,d),$h(a),d;if(144===c)b.skip(1),d=Vh(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=Vh(b).value,c=Vh(b).value,b.skip(1),a.g&&(b=ai((c&48)>>4,(c&12)>>2,c&3),a.g.s=ai((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Vh(b).value,b=Vh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
257
+ b.skip(1),d=Vh(b).value,b.skip(1),a.g&&(a.g.D=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Jh;f.j=d;a.h[c]=f}d=Vh(b).value;Vh(b);Vh(b);f=Vh(b).value;var g=Vh(b).value;b=Vh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.u=!1,b.o=!1,b.s="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.F=(f&15)+1;b.A=(g&63)+1;a.g=a.h[c]}}}return null}function Yh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
258
+ function Zh(a,b,c){var d=null;b=t(Yh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Ph(f,c,a.i));a.h[e]=null}return d}function $h(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function ai(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return bi[a<<2|b<<1|c]}
259
+ var ci=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"]]),bi="black blue green cyan red magenta yellow white".split(" ");function di(){this.h=[];this.g=[];this.i=new Sh;this.l=0;this.s=new Map([["CC1",new zh(0,0)],["CC2",new zh(0,1)],["CC3",new zh(1,0)],["CC4",new zh(1,1)]]);this.o=this.m=0;this.j=new Map;ei(this)}function ei(a){a.m=0;a.o=0;a=t(a.s.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,mh(b.i),mh(b.l),mh(b.o)}
260
+ function fi(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=gi(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())Th(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=hi(a,e.value),c.push.apply(c,ka(e));a.i.i=[];a.h=[];a.g=[];return c}
261
+ function gi(a,b){var c=b.type;if(16===(b.Ba&112)){var d=b.Ba>>3&1;0===c?a.m=d:a.o=d}c=a.s.get("CC"+((c<<1|(c?a.o:a.m))+1));if(255===b.Ba&&255===b.Oa||!b.Ba&&!b.Oa||!ii(b.Ba)||!ii(b.Oa))return 45<=++a.l&&ei(a),null;a.l=0;b.Ba&=127;b.Oa&=127;if(!b.Ba&&!b.Oa)return null;a=null;if(16===(b.Ba&112))a:{d=b.Ba;a=b.Oa;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var e=(a&30)>>1;d="white";var f=!1;7>e?d=Ih[e]:7===e&&(f=
262
+ !0);a=1===(a&1);if(c.h!==Dh){e=c.g;if(c.h===Ch&&b!==e.g){var g=1+b-e.h;yh(e,g,1+e.g-e.h,e.h);oh(e,0,g-1);oh(e,b+1,15-b)}e.g=b;c.g.m=a;c.g.j=f;c.g.l=d;c.g.o="black"}}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",ph(c.g,qh,32),d=!1,b=Ih[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Hh[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))ph(c.g,sh,a);else if(18===
263
+ (d&246)&&32===(a&224))ph(c.g,d&1?wh:uh,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Oa){case 32:Eh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Bh(c,2,a);break;case 38:d=Bh(c,3,a);break;case 39:d=Bh(c,4,a);break;case 40:ph(c.g,qh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=a;break;case 42:mh(c.o);Gh(c);break;case 43:Gh(c);break;case 44:b=c.i;d=null;c.h!==Dh&&(d=nh(b,c.j,a));oh(b,0,15);break;case 45:b=c.g;c.h!==Ch?d=null:(d=nh(b,c.j,a),f=b.g-b.h+1,yh(b,f-1,f,b.h),oh(b,0,
264
+ f-1),oh(b,b.g,15-b.g),c.j=a);break;case 46:oh(c.l,0,15);break;case 47:b=null,c.h!==Dh&&(b=nh(c.i,c.j,a)),d=c.l,c.l=c.i,c.i=d,Eh(c),c.j=a,d=b}a=d;break a}a=null}else d=b.Oa,ph(c.g,qh,b.Ba),ph(c.g,qh,d);return a}
265
+ function hi(a,b){var c=[];try{for(;b.ia();){var d=Vh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Vh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Wh(e));for(var g=a.j.get(e),h=b.aa();b.aa()-h<f;){e=b;var k=Vh(e),l=k.value,m=k.pts;if(16===l){var n=Vh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!Oh(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.A-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=Ph(q,p,g.i));if(q.h+1>=q.F){p=q;for(var v=0,w=1;16>w;w++,
266
+ v++)p.i[v]=p.i[w];for(w=0;1>w;w++,v++)p.i[v]=Mh()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=Ph(q,p,g.i));q.i[q.h]=Mh();q.g=0;break;case 12:q.isVisible()&&(e=Ph(q,p,g.i)),Lh(q),p=q,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Xh(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?Nh(g.g,"\u266a"):Nh(g.g,
267
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Nh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(ci.has(e)){var y=ci.get(e);Nh(g.g,y)}else Nh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Nh(g.g,"_"):Nh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(C){if(C instanceof K&&3E3===C.code)cb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function ii(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function ji(){}ji.prototype.init=function(){};ji.prototype.parse=function(){return[]};function ki(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(ka(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function li(a,b){var c=null,d=null,e=null,f=a.K();b&1&&(e=a.cb());b&2&&a.skip(4);b&8&&(c=a.K());b&16&&(d=a.K());return{trackId:f,Ge:c,Bf:d,wh:e}}function mi(a,b){return{Ae:1==b?a.cb():a.K()}}function ni(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.K()}}
268
+ function oi(a,b,c){var d=a.K(),e=[],f=null;c&1&&(f=a.K());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={he:null,sampleSize:null,jd:null};c&256&&(h.he=a.K());c&512&&(h.sampleSize=a.K());c&1024&&a.skip(4);c&2048&&(h.jd=0==b?a.K():a.Te());e.push(h)}return{Ch:d,Ve:e,Af:f}};function pi(){this.j=new Map;this.i=this.h=0;this.g=qi}
269
+ pi.prototype.init=function(a){function b(f){f=f.name;f in ri&&(c.g=ri[f])}var c=this,d=[],e=[];(new Gf).box("moov",Lf).box("mvex",Lf).M("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.K();g=g.K();c.h=f;c.i=g}).box("trak",Lf).M("tkhd",function(f){var g=f.reader;1==f.version?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));f=g.K();d.push(f)}).box("mdia",Lf).M("mdhd",function(f){f=ni(f.reader,f.version);e.push(f.timescale)}).box("minf",Lf).box("stbl",Lf).M("stsd",Nf).box("avc1",b).box("avc3",b).box("hev1",
270
+ b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("encv",Of).box("sinf",Lf).box("frma",function(f){f=f.reader.K();f=Kf(f);f in ri&&(c.g=ri[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new K(2,2,2010);this.g==qi&&bb("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
271
+ pi.prototype.parse=function(a){var b=this;if(this.g==qi)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Gf).box("moof",function(l){f=l.start;g=[];Lf(l)}).box("traf",Lf).M("trun",function(l){l=oi(l.reader,l.version,l.flags);g.push(l)}).M("tfhd",function(l){l=li(l.reader,l.flags);d=l.Ge||b.h;e=l.Bf||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).M("tfdt",function(l){h=mi(l.reader,l.version).Ae}).box("mdat",function(l){if(null===h)throw bb("Unable to find base media decode time for CEA captions!"),
272
+ new K(2,2,2010);si(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
273
+ function si(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(v){return v.Ve});n=[].concat.apply([],ka(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Af);b.ia();){g=b.K();var p=b.Ua(),q=null;q=!1;h=1;switch(a.g){case ti:q=p&31;q=6==q;break;case ui:h=2;b.skip(1);q=p>>1&63;q=39==q||40==q;break;default:return}if(q)for(p=0,l<n.length&&(p=n[l].jd||0),p=(c+p)/d,h=t(ki(b.bb(g-h))),q=h.next();!q.done;q=h.next())k.push({pg:q.value,pts:p});else try{b.skip(g-h)}catch(v){break}m-=g+4;0==m&&(c=l<n.length?
274
+ c+(n[l].he||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}var qi=0,ti=1,ui=2,ri={avc1:ti,avc3:ti,hev1:ui,hvc1:ui,dvh1:ui,dvhe:ui};function vi(a){this.h=new ji;a.includes("video/mp4")&&(this.h=new pi);this.g=new di}vi.prototype.init=function(a){this.h.init(a)};
275
+ function wi(a,b){b=a.h.parse(b);b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Mb(d.pg);if(0<e.length&&(c=a.g,d=d.pts,e=new Df(e,0),!(8>e.S.byteLength)&&181===e.Ua()&&49===e.ce()&&1195456820===e.K()&&3===e.Ua())){var f=e.Ua();if(0!==(f&64)){f&=31;e.skip(1);for(var g=0;g<f;g++){var h=e.Ua(),k=(h&4)>>2,l=e.Ua(),m=e.Ua();k&&(h&=3,0===h||1===h?c.h.push({pts:d,type:h,Ba:l,Oa:m,order:c.h.length}):(c.g.push({pts:d,type:h,value:l,order:c.g.length}),c.g.push({pts:d,type:2,value:m,order:c.g.length})))}}}}return fi(a.g)}
276
+ ;function xi(a,b,c,d,e,f){this.ua=a;this.Ea=b;this.ma=c;this.Sd=void 0===d?null:d;this.timescale=void 0===e?null:e;this.m=void 0===f?null:f}xi.prototype.pc=function(){return this.Ea};xi.prototype.lc=function(){return this.ma};function yi(a,b){return a===b?!0:a&&b?a.pc()==b.pc()&&a.lc()==b.lc()&&nb(a.ua().sort(),b.ua().sort()):a==b}G("shaka.media.InitSegmentReference",xi);xi.prototype.getEndByte=xi.prototype.lc;xi.prototype.getStartByte=xi.prototype.pc;
277
+ function P(a,b,c,d,e,f,g,h,k,l,m,n,p,q,v){l=void 0===l?[]:l;q=void 0===q?zi:q;this.startTime=a;this.j=this.endTime=b;this.A=c;this.Ea=d;this.ma=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.i=l;this.tilesLayout=void 0===m?"":m;this.s=void 0===n?null:n;this.g=void 0===p?null:p;this.status=q;this.u=!1;this.m=void 0===v?null:v;this.o=null;this.l=0}r=P.prototype;r.ua=function(){return this.A()};r.getStartTime=function(){return this.startTime};r.If=function(){return this.endTime};
278
+ r.pc=function(){return this.Ea};r.lc=function(){return this.ma};r.$f=function(){return this.tilesLayout};r.Zf=function(){return this.s};r.Jb=function(){return this.status};r.ig=function(){this.status=Ai};r.Qe=function(){this.u=!0};r.fg=function(){return this.u};r.cf=function(a){this.o=a};r.Xf=function(){return this.o};r.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.i),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
279
+ r.re=function(a){null==this.g?ab("Sync attempted without sync time!"):(a=this.g-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};G("shaka.media.SegmentReference",P);P.prototype.syncAgainst=P.prototype.re;P.prototype.offset=P.prototype.offset;P.prototype.getThumbnailSprite=P.prototype.Xf;P.prototype.setThumbnailSprite=P.prototype.cf;P.prototype.isPreload=P.prototype.fg;P.prototype.markAsPreload=P.prototype.Qe;P.prototype.markAsUnavailable=P.prototype.ig;P.prototype.getStatus=P.prototype.Jb;
280
+ P.prototype.getTileDuration=P.prototype.Zf;P.prototype.getTilesLayout=P.prototype.$f;P.prototype.getEndByte=P.prototype.lc;P.prototype.getStartByte=P.prototype.pc;P.prototype.getEndTime=P.prototype.If;P.prototype.getStartTime=P.prototype.getStartTime;P.prototype.getUris=P.prototype.ua;var zi=0,Ai=1;P.Status={Ng:zi,th:Ai,ah:2};function Bi(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 Ci(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Di(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)}
281
+ function Ei(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Fi(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}function Gi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Fi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}
282
+ function Fi(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};/*
283
283
  @license
284
284
  Shaka Player
285
285
  Copyright 2022 Google LLC
286
286
  SPDX-License-Identifier: Apache-2.0
287
287
  */
288
- function Gi(){}function Hi(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
289
- function Ii(a){var b={key:a.type,description:"",data:""};if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=Fc(Nb(a.data,1,c));a=Fc(Nb(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;c=a.data.subarray(1).indexOf(0);if(-1===c)return null;d=Fc(Nb(a.data,1,c));a=Fc(Nb(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("PRIV"===a.type){if(2>
290
- a.size)return null;d=a.data.indexOf(0);if(-1===d)return null;d=Fc(Nb(a.data,0,d));a=Ob(a.data.subarray(d.length+1));b.description=d;b.data=a;return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Fc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Fc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Ob(a.data),b):null}
291
- function Ji(a){for(var b=0,c=[];b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9];){var d=Hi(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Hi(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Ii(e))&&c.push(f);b+=e.size+10}b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]&&(b+=10)}return c}
292
- G("shaka.util.Id3Utils",Gi);Gi.getID3Frames=Ji;function Ki(){this.m=null;this.o=!1;this.s=this.i=null;this.A=[];this.j=this.g=null;this.u=[];this.l=null;this.h=[]}
293
- Ki.prototype.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,Li(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71===a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h===e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.m=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.m:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Yc:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&
288
+ function Hi(){}function Ii(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
289
+ function Ji(a){var b={key:a.type,description:"",data:""};if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=Fc(Mb(a.data,1,c));a=Fc(Mb(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;c=a.data.subarray(1).indexOf(0);if(-1===c)return null;d=Fc(Mb(a.data,1,c));a=Fc(Mb(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("PRIV"===a.type){if(2>
290
+ a.size)return null;d=a.data.indexOf(0);if(-1===d)return null;d=Fc(Mb(a.data,0,d));a=Nb(a.data.subarray(d.length+1));b.description=d;b.data=a;return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Fc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Fc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Nb(a.data),b):null}
291
+ function Ki(a){for(var b=0,c=[];b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9];){var d=Ii(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Ii(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Ji(e))&&c.push(f);b+=e.size+10}b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]&&(b+=10)}return c}
292
+ G("shaka.util.Id3Utils",Hi);Hi.getID3Frames=Ki;function Li(){this.m=null;this.o=!1;this.s=this.i=null;this.A=[];this.j=this.g=null;this.u=[];this.l=null;this.h=[]}
293
+ Li.prototype.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,Mi(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71===a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h===e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.m=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.m:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Yc:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&
294
294
  15)<<8|f[h+11]);h<k;){var l=(f[h+1]&31)<<8|f[h+2];switch(f[h]){case 15:-1===g.audio&&(g.audio=l,g.audioCodec="aac");break;case 21:-1===g.Yc&&(g.Yc=l);break;case 27:-1===g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1===g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1===g.video&&(g.video=l,g.videoCodec="hvc")}h+=((f[h+3]&15)<<8|f[h+4])+5}f=g;-1!=f.video&&(this.s=f.video);-1!=f.audio&&(this.j=f.audio);-1!=f.Yc&&(this.l=f.Yc);d&&!this.o&&(d=!1,e=b-188);this.o=!0;break;case this.s:f=
295
- a.subarray(h,e+188);null==this.i&&(h=Mi(f))&&null!=h.pts&&(this.i=h.pts/9E4);this.A.push(f);break;case this.j:f=a.subarray(h,e+188);null==this.g&&(h=Mi(f))&&null!=h.pts&&(this.g=h.pts/9E4);this.u.push(f);break;case this.l:this.h.push(a.subarray(h,e+188));break;default:d=!0}}return this};
296
- function Mi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),Ah:6+(a[4]<<8|a[5]),pts:null,dts:null},c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));b.data=a.subarray(9+a[8]);return b}
297
- function Ni(a){for(var b=[],c=new Uint8Array(0),d=a.h.length-1;0<=d;d--){c=Rc(a.h[d],c);var e=Mi(c);e&&(b.unshift({cueTime:e.pts?e.pts/9E4:null,data:e.data,frames:Ji(e.data),dts:e.dts,pts:e.pts}),c=new Uint8Array(0))}return b}Ki.prototype.getStartTime=function(){return{audio:this.g,video:this.i}};function Li(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71===a[c]&&71===a[c+188]&&71===a[c+376])return c;c++}return-1}G("shaka.util.TsParser",Ki);function Oi(a,b,c){this.g=null;this.i=-1;this.j=a;this.h=b;this.l=c;"undefined"===typeof libDPIModule&&cb("Could not Find LCEVC Library dependencies on this page");"undefined"===typeof LcevcDil?cb("Could not Find LCEVC Library on this page"):LcevcDil.SupportObject.SupportStatus||cb(LcevcDil.SupportObject.SupportError);"undefined"!==typeof LcevcDil&&"undefined"!==typeof libDPIModule&&this.h instanceof HTMLCanvasElement&&LcevcDil.SupportObject.SupportStatus&&!this.g&&LcevcDil.SupportObject.webGLSupport(this.h)&&
298
- (this.h.classList.remove("shaka-hidden"),this.g=new LcevcDil.LcevcDil(this.j,this.h,this.l))}Oi.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Pi(a,b){var c=Qi;switch(b.mimeType){case "video/webm":c=Ri;break;case "video/mp4":c=Si}a.g&&(a.i=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(c))}G("shaka.lcevc.Dil",Oi);Oi.prototype.release=Oi.prototype.release;var Qi=0,Ri=1,Si=2;function Ti(a,b,c,d){var e=this;this.l=a;this.G=null;this.m=b;this.h={};this.L={};this.P={};this.g=null;this.H=!1;this.V=c||function(){};this.F=d||null;this.i={};this.u=new sf;this.o={};this.s=null;this.J=new nc;this.N="";this.j=Ui(this,this.J);this.D=new qf(function(){return Vi(e)});this.A=!1;this.W=new nc}function Ui(a,b){var c=new MediaSource;a.u.ca(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.N=Wi(c);a.l.src=a.N;return c}r=Ti.prototype;r.destroy=function(){return this.D.destroy()};
299
- function Vi(a){var b,c,d,e,f,g,h,k;return D(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(qd)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new L(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.o)b.push(a.o[k].destroy());return u(l,Promise.all(b),2)}a.u&&(a.u.release(),a.u=null);a.l&&(a.l.removeAttribute("src"),a.l.load(),a.l=null);a.G=null;a.j=null;a.g=null;a.m=null;a.h={};a.o={};a.s=null;
295
+ a.subarray(h,e+188);null==this.i&&(h=Ni(f))&&null!=h.pts&&(this.i=h.pts/9E4);this.A.push(f);break;case this.j:f=a.subarray(h,e+188);null==this.g&&(h=Ni(f))&&null!=h.pts&&(this.g=h.pts/9E4);this.u.push(f);break;case this.l:this.h.push(a.subarray(h,e+188));break;default:d=!0}}return this};
296
+ function Ni(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),Bh:6+(a[4]<<8|a[5]),pts:null,dts:null},c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));b.data=a.subarray(9+a[8]);return b}
297
+ function Oi(a){for(var b=[],c=new Uint8Array(0),d=a.h.length-1;0<=d;d--){c=Rc(a.h[d],c);var e=Ni(c);e&&(b.unshift({cueTime:e.pts?e.pts/9E4:null,data:e.data,frames:Ki(e.data),dts:e.dts,pts:e.pts}),c=new Uint8Array(0))}return b}Li.prototype.getStartTime=function(){return{audio:this.g,video:this.i}};function Mi(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71===a[c]&&71===a[c+188]&&71===a[c+376])return c;c++}return-1}G("shaka.util.TsParser",Li);function Pi(a,b,c){this.g=null;this.i=-1;this.j=a;this.h=b;this.l=c;"undefined"===typeof libDPIModule&&bb("Could not Find LCEVC Library dependencies on this page");"undefined"===typeof LcevcDil?bb("Could not Find LCEVC Library on this page"):LcevcDil.SupportObject.SupportStatus||bb(LcevcDil.SupportObject.SupportError);"undefined"!==typeof LcevcDil&&"undefined"!==typeof libDPIModule&&this.h instanceof HTMLCanvasElement&&LcevcDil.SupportObject.SupportStatus&&!this.g&&LcevcDil.SupportObject.webGLSupport(this.h)&&
298
+ (this.h.classList.remove("shaka-hidden"),this.g=new LcevcDil.LcevcDil(this.j,this.h,this.l))}Pi.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Qi(a,b){var c=Ri;switch(b.mimeType){case "video/webm":c=Si;break;case "video/mp4":c=Ti}a.g&&(a.i=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(c))}G("shaka.lcevc.Dil",Pi);Pi.prototype.release=Pi.prototype.release;var Ri=0,Si=1,Ti=2;function Ui(a,b,c,d){var e=this;this.l=a;this.G=null;this.m=b;this.h={};this.L={};this.P={};this.g=null;this.H=!1;this.V=c||function(){};this.F=d||null;this.i={};this.u=new tf;this.o={};this.s=null;this.J=new mc;this.N="";this.j=Vi(this,this.J);this.D=new rf(function(){return Wi(e)});this.A=!1;this.W=new mc}function Vi(a,b){var c=new MediaSource;a.u.ba(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.N=Xi(c);a.l.src=a.N;return c}r=Ui.prototype;r.destroy=function(){return this.D.destroy()};
299
+ function Wi(a){var b,c,d,e,f,g,h,k;return D(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(rd)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new K(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.o)b.push(a.o[k].destroy());return u(l,Promise.all(b),2)}a.u&&(a.u.release(),a.u=null);a.l&&(a.l.removeAttribute("src"),a.l.load(),a.l=null);a.G=null;a.j=null;a.g=null;a.m=null;a.h={};a.o={};a.s=null;
300
300
  a.i={};a.F=null;B(l)})}
301
- r.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n;return D(function(p){if(1==p.g)return e=mc,u(p,d.J,2);d.A=c;f={};g=t(a.keys());for(h=g.next();!h.done;f={pa:f.pa},h=g.next())if(f.pa=h.value,k=a.get(f.pa),l=bd(k.mimeType,k.codecs),f.pa==e.Z)Xi(d,l,c,k.external);else{!b&&jb(l)||!Wc(l,f.pa)||(d.o[f.pa]=new Vc(l),l=Zc(f.pa,l));m=l+d.G.sourceBufferExtraFeatures;rf(d.D);n=void 0;try{n=d.j.addSourceBuffer(m)}catch(q){throw new L(2,3,3015,q,"The mediaSource_ status was"+d.j.readyState+
302
- "expected 'open'");}d.u.C(n,"error",function(q){return function(){d.i[q.pa][0].p.reject(new L(2,3,3014,d.l.error?d.l.error.code:0))}}(f));d.u.C(n,"updateend",function(q){return function(){return Yi(d,q.pa)}}(f));d.h[f.pa]=n;d.L[f.pa]=l;d.i[f.pa]=[];d.P[f.pa]=!!k.drmInfos.length}B(p)})};r.configure=function(a){this.G=a};
303
- function Xi(a,b,c,d){a.g||(a.g=new gd(a.m));var e=a.g;a=d||a.H;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,id[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):cb('Text parsers should have a "setSequenceMode" method!'),e.u=a)}function Zi(a){return a.j?"ended"==a.j.readyState:!0}function $i(a,b){return b==lc?a.g.g:Ai(aj(a,b))}function bj(a,b){return b==lc?a.g.h:Bi(aj(a,b))}
304
- function cj(a,b,c){if(b==lc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=aj(a,b);return Di(a,c)}r.Qa=function(){var a={total:Ei(this.l.buffered),audio:Ei(aj(this,"audio")),video:Ei(aj(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 aj(a,b){try{return a.h[b].buffered}catch(c){return null}}
305
- function dj(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,n,p,q,v,w,x,y,C,A,z,E,F,H,I,J,K,P,T,da;return D(function(N){switch(N.g){case 1:h=mc;if(b!=h.Z){N.B(2);break}if(!a.A){N.B(3);break}return u(N,a.W,4);case 4:k=N.h,a.g.s=k;case 3:return u(N,jd(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.va()[0]:null),5);case 5:return N.return();case 2:l=Nb(c);m=a.L[b];a.o[b]&&(m=a.o[b].o);0>Li(l)?ej.includes(m)&&(v=Ji(l),v.length&&d&&(w={cueTime:d.startTime,data:l,frames:v,dts:d.startTime,pts:d.startTime},
306
- a.V([w],0,d.endTime))):(n=(new Ki).parse(l),p=d.startTime-(n.getStartTime()[b]||0),q=Ni(n),q.length&&a.V(q,p,d?d.endTime:null));if(!a.o[b]){e&&b==h.ra&&(a.g||Xi(a,"application/cea-608",a.A,!1),a.s||(a.s=new ui(m)),d?(x=vi(a.s,c),x.length&&(y=a.h[h.ra].timestampOffset,od(a.g,x,d.startTime,d.endTime,y))):a.s.init(c));N.B(6);break}f&&a.o[b].g.resetCaptions();return u(N,$c(a.o[b],c),7);case 7:C=N.h,a.g||Xi(a,"application/cea-608",a.A,!1),C.captions&&C.captions.length&&(A=a.h[h.ra].timestampOffset,z=md(C.captions),
307
- od(a.g,z,d?d.startTime:null,d?d.endTime:null,A)),c=C.data;case 6:c=fj(a,c,d?d.startTime:null,b);E=a.h[b];F=gj;if(!a.A||E.mode==F||!d){N.B(8);break}H=a.j.duration;I=b==h.ra||!(h.ra in a.h);if(!I){N.B(9);break}J=[E.appendWindowStart,E.appendWindowEnd];E.appendWindowStart=0;E.appendWindowEnd=Infinity;K=E.timestampOffset;E.timestampOffset=0;return u(N,hj(a,b,function(){return ij(a,b,c)}),10);case 10:return u(N,hj(a,b,function(){return jj(a,b)}),11);case 11:return E.timestampOffset=K,E.appendWindowStart=
308
- J[0],E.appendWindowEnd=J[1],P=Ai(aj(a,b)),T=(d.startTime||0)-(P||0),a.W.resolve(T),u(N,hj(a,b,function(){return kj(a,b,0,H)}),12);case 12:if(b!=h.ra){N.B(9);break}return u(N,hj(a,b,function(){a.l.currentTime-=.001;Yi(a,b)}),9);case 9:return E.mode=F,u(N,a.Da(H),8);case 8:return d&&a.A&&b!=h.Z&&(f||g)&&(da=d.startTime,hj(a,b,function(){return jj(a,b)}),hj(a,b,function(){return lj(a,b,da)})),u(N,hj(a,b,function(){ij(a,b,c)}),16);case 16:B(N)}})}function mj(a,b){var c=bj(a,"video")||0;ld(a.g,b,c)}
309
- function nj(a){a.g&&ld(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return D(function(f){e=mc;return a==e.Z?u(f,d.g.remove(b,c),0):u(f,hj(d,a,function(){return kj(d,a,b,c)}),0)})};function oj(a,b){var c;return D(function(d){c=mc;return b==c.Z?a.g?u(d,a.g.remove(0,Infinity),0):d.return():u(d,hj(a,b,function(){return kj(a,b,0,a.j.duration)}),0)})}r.flush=function(a){var b=this,c;return D(function(d){c=mc;return a==c.Z?d.return():u(d,hj(b,a,function(){b.l.currentTime-=.001;Yi(b,a)}),0)})};
310
- function pj(a,b,c,d,e,f){var g;return D(function(h){g=mc;return b==g.Z?(f||(a.g.s=c),kd(a.g,d,e),h.return()):u(h,Promise.all([hj(a,b,function(){return jj(a,b)}),f?Promise.resolve():hj(a,b,function(){return lj(a,b,c)}),hj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Yi(a,b)})]),0)})}function qj(a,b,c){var d;return D(function(e){d=mc;if(b==d.Z)return e.return();hj(a,b,function(){return jj(a,b)});return u(e,hj(a,b,function(){return lj(a,b,c)}),0)})}
311
- r.endOfStream=function(a){var b=this;return D(function(c){return u(c,rj(b,function(){Zi(b)||"closed"===b.j.readyState||(a?b.j.endOfStream(a):b.j.endOfStream())}),0)})};r.Da=function(a){var b=this;return D(function(c){return u(c,rj(b,function(){if(a<b.j.duration)for(var d in b.h){var e={start:function(){},p:new nc};b.i[d].unshift(e)}b.j.duration=a}),0)})};r.getDuration=function(){return this.j.duration};
312
- function ij(a,b,c){if("video"==b&&a.F){var d=a.F;d.g&&d.g.appendBuffer(c,"video",d.i)}a.h[b].appendBuffer(c)}function kj(a,b,c,d){d<=c?Yi(a,b):a.h[b].remove(c,d)}function jj(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Yi(a,b)}function lj(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Yi(a,b)}function Yi(a,b){var c=a.i[b][0];c&&(c.p.resolve(),sj(a,b))}
313
- function hj(a,b,c){rf(a.D);c={start:c,p:new nc};a.i[b].push(c);1==a.i[b].length&&tj(a,b);return c.p}
314
- function rj(a,b){var c,d,e,f,g,h;return D(function(k){switch(k.g){case 1:rf(a.D);c=[];d={};for(e in a.h)d.Xb=new nc,f={start:function(l){return function(){return l.Xb.resolve()}}(d),p:d.Xb},a.i[e].push(f),c.push(d.Xb),1==a.i[e].length&&f.start(),d={Xb:d.Xb};xa(k,2);return u(k,Promise.all(c),4);case 4:za(k,3);break;case 2:throw g=Aa(k),g;case 3:try{b()}catch(l){throw new L(2,3,3015,l);}finally{for(h in a.h)sj(a,h)}B(k)}})}function sj(a,b){a.i[b].shift();tj(a,b)}
315
- function tj(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new L(2,3,3017,b)):c.p.reject(new L(2,3,3015,d)),sj(a,b)}}function fj(a,b,c,d){var e=a.P[d];null==c&&e&&(wc()||uc()||vc("SOPOpenBrowser"))&&"mp4"==a.L[d].split(";")[0].split("/")[1]&&(b=ch(b));return b}var Wi=window.URL.createObjectURL,gj="sequence",ej=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function S(a,b,c){this.i=a;this.m=b;this.o=this.j=Infinity;this.g=1;this.h=this.l=null;this.u=0;this.A=!0;this.D=0;this.F=void 0===c?!0:c;this.G=0;this.s=!1}r=S.prototype;r.getDuration=function(){return this.j};r.Of=function(){return this.g};r.pe=function(a){this.i=a};r.Da=function(a){this.j=a};r.Tf=function(){return this.i};r.$e=function(a){this.u=a};r.Dc=function(a){this.A=a};r.re=function(a){this.o=a};r.af=function(a){this.m=a};r.Hf=function(){return this.m};
316
- r.Nb=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.u)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.Xd(b);this.h=Math.max(this.h,c);null!=this.i&&this.F&&!this.s&&(this.i=d-this.h-this.g)}};r.Rd=function(){this.s=!0};r.fg=function(){return this.s};r.Xd=function(a){this.l=null==this.l?a:Math.min(this.l,a)};
317
- r.Wd=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.T=function(){return Infinity==this.j&&!this.A};r.pb=function(){return Infinity!=this.j&&!this.A};r.Ka=function(){return Math.max(this.D,this.bb()-this.o)};r.df=function(a){this.D=a};r.bb=function(){return this.T()||this.pb()?Math.min(Math.max(0,(Date.now()+this.u)/1E3-this.g-this.i)+this.G,this.j):this.h?Math.min(this.h,this.j):this.j};
318
- r.oc=function(a){var b=Math.max(this.l,this.D);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.bb()-this.o+a,this.Ra()))};r.Ib=function(){return this.oc(0)};r.Ra=function(){return Math.max(0,this.bb()-(this.T()||this.pb()?this.m:0))};r.hf=function(){return null==this.i||null!=this.h&&this.F?!1:!0};r.Ze=function(a){this.G=a};G("shaka.media.PresentationTimeline",S);S.prototype.setAvailabilityTimeOffset=S.prototype.Ze;S.prototype.usingPresentationStartTime=S.prototype.hf;
319
- S.prototype.getSeekRangeEnd=S.prototype.Ra;S.prototype.getSeekRangeStart=S.prototype.Ib;S.prototype.getSafeSeekRangeStart=S.prototype.oc;S.prototype.getSegmentAvailabilityEnd=S.prototype.bb;S.prototype.setUserSeekStart=S.prototype.df;S.prototype.getSegmentAvailabilityStart=S.prototype.Ka;S.prototype.isInProgress=S.prototype.pb;S.prototype.isLive=S.prototype.T;S.prototype.offset=S.prototype.offset;S.prototype.notifyMaxSegmentDuration=S.prototype.Wd;S.prototype.notifyMinSegmentStartTime=S.prototype.Xd;
320
- S.prototype.isStartTimeLocked=S.prototype.fg;S.prototype.lockStartTime=S.prototype.Rd;S.prototype.notifySegments=S.prototype.Nb;S.prototype.getDelay=S.prototype.Hf;S.prototype.setDelay=S.prototype.af;S.prototype.setSegmentAvailabilityDuration=S.prototype.re;S.prototype.setStatic=S.prototype.Dc;S.prototype.setClockOffset=S.prototype.$e;S.prototype.getPresentationStartTime=S.prototype.Tf;S.prototype.setDuration=S.prototype.Da;S.prototype.setPresentationStartTime=S.prototype.pe;
321
- S.prototype.getMaxSegmentDuration=S.prototype.Of;S.prototype.getDuration=S.prototype.getDuration;function uj(a,b,c){this.l=c;this.j=a;this.s=vj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}uj.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function wj(a,b){a.i=b}function xj(a){this.g=a}function vj(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 yj(a,b,c,d,e){var f=this;this.s=e;this.g=a;this.u=b;this.F=c;this.l=new sf;this.j=!1;this.D=a.readyState;this.A=this.i=0;this.h=d;this.o=!1;this.l.C(a,"waiting",function(){return zj(f)});this.m=(new M(function(){zj(f)})).Fa(.25)}yj.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.u=this.s=null};yj.prototype.$d=function(){this.o=!0;zj(this)};
322
- function zj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.D&&(a.D=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=vj(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.l(new O("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Fi(c,b,a.F.gapDetectionThreshold),null==
323
- d||0==d&&!a.o||(e=c.start(d),e>=a.u.Ra()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.A++,a.s(new O("gapjumped")))))}}};function Aj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Bj.value().get(b),c.ca(a,b,d))}var Bj=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 Cj(a,b,c,d){var e=this;this.g=a;this.l=b;this.o=c;this.j=d;this.m=!1;this.h=new sf;this.i=new Dj(a);Aj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ej(e,e.j)})}Cj.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 Fj(a){return a.m?a.g.currentTime:a.j}function Gj(a,b){0<a.g.readyState?Hj(a.i,b):Aj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ej(a,a.j)})}
324
- function Ej(a,b){.001>Math.abs(a.g.currentTime-b)?Ij(a):(a.h.ca(a.g,"seeking",function(){Ij(a)}),Hj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Ij(a){a.m=!0;a.h.C(a.g,"seeking",function(){return a.l()});a.o(a.g.currentTime)}function Dj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new M(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Dj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
325
- function Hj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Fa(.1)};function Jj(a){this.g=a;this.j=!1;this.h=null;this.i=new sf}r=Jj.prototype;r.Ed=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ca(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Aj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.Fd=function(a){this.h=this.j?this.h:a};r.Mc=function(){return(this.j?this.g.currentTime:this.h)||0};r.ze=function(){return 0};
326
- r.ye=function(){return 0};r.Te=function(){};
327
- function Kj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.A=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=Lj(a,c,f);this.j=new yj(a,b.presentationTimeline,c,this.o,f);this.h=new Cj(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=Fj(g.h);h=Mj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;Gj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},Nj(this,d));this.m=new M(function(){if(0!=g.i.readyState&&
328
- !g.i.paused){var h=Fj(g.h),k=g.g.Ib(),l=g.g.Ra();3>l-k&&(k=l-3);h<k&&(h=Mj(g,h),g.i.currentTime=h)}})}r=Kj.prototype;r.Ed=function(){this.m.Fa(.25)};r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.u=function(){}};r.Fd=function(a){Gj(this.h,a)};r.Mc=function(){var a=Fj(this.h);return 0<this.i.readyState&&!this.i.paused?Oj(this,a):a};r.ze=function(){return this.o?this.o.o:0};
329
- r.ye=function(){return this.j.A};function Nj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Ib():a.g.Ra():0>b&&(b=a.g.Ra()+b);return Pj(a,Oj(a,b))}r.Te=function(){this.j.$d()};function Pj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
330
- function Mj(a,b){var c=Math.max(a.A,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Ib(),f=a.g.Ra(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.oc(c),k=a.g.oc(d);c=a.g.oc(c+d);return b>=g?Pj(a,b):b>f?f:b<e?Ci(a.i.buffered,k)?k:c:b>=h||Ci(a.i.buffered,b)?b:c}function Oj(a,b){var c=a.g.Ib();if(b<c)return c;a=a.g.Ra();return b>a?a:b}
331
- function Lj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new uj(new xj(a),b.stallThreshold,c);wj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Qj(a){this.g=a;this.h=null;this.i=0;this.j=!1}r=Qj.prototype;r.release=function(){this.j||(this.g=[],this.h&&this.h.stop(),this.h=null)};r.ig=function(){this.j=!0};function Rj(a,b){a=t(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}r.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};
332
- r.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.j)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};r.uc=function(a){if(!this.j&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,ka(a))}};
333
- r.Mb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.uc(a);this.kb(b)};r.kb=function(a){if(!this.j){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
334
- r.ab=function(a,b,c){c=void 0===c?!1:c;if(!this.j){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new Q(a.startTime,b,a.u,a.Ea,a.na,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.o,a.X,a.status,a.l),this.g[this.g.length-1].j=a.j)}};
335
- r.ld=function(a,b){var c=this;this.j||(this.h&&this.h.stop(),this.h=new M(function(){var d=b();d?c.g.push.apply(c.g,ka(d)):(c.h.stop(),c.h=null)}),this.h.Fa(a))};Qj.prototype[Symbol.iterator]=function(){return this.mb(0)};Qj.prototype.mb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Sj(this,b,d)};
336
- function Tj(a,b,c){return new Qj([new Q(a,a+b,function(){return c},0,null,null,a,a,a+b)])}G("shaka.media.SegmentIndex",Qj);Qj.forSingleSegment=Tj;Qj.prototype.getIteratorForTime=Qj.prototype.mb;Qj.prototype.updateEvery=Qj.prototype.ld;Qj.prototype.fit=Qj.prototype.ab;Qj.prototype.evict=Qj.prototype.kb;Qj.prototype.mergeAndEvict=Qj.prototype.Mb;Qj.prototype.offset=Qj.prototype.offset;Qj.prototype.get=Qj.prototype.get;Qj.prototype.find=Qj.prototype.find;Qj.prototype.markImmutable=Qj.prototype.ig;
337
- Qj.prototype.release=Qj.prototype.release;function Sj(a,b,c){this.i=a;this.g=b;this.h=c}Sj.prototype.zf=function(){return this.g};Sj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.h.length&&a.va().length&&this.h>=a.h.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.h.length?a.h[this.h]:a};
338
- Sj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.h.length?(this.h++,a.va().length&&this.h==a.h.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};G("shaka.media.SegmentIterator",Sj);Sj.prototype.next=Sj.prototype.next;Sj.prototype.current=Sj.prototype.current;Sj.prototype.currentPosition=Sj.prototype.zf;function Uj(){Qj.call(this,[]);this.l=[]}ta(Uj,Qj);r=Uj.prototype;r.clone=function(){var a=new Uj;a.l=this.l.slice();return a};
339
- r.release=function(){for(var a=t(this.l),b=a.next();!b.done;b=a.next())b.value.release();this.l=[]};r.find=function(a){for(var b=0,c=t(this.l),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.i+d.g.length}return null};r.get=function(a){for(var b=0,c=t(this.l),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.i+d.g.length}return null};r.offset=function(){};r.uc=function(){};r.kb=function(){};r.Mb=function(){};r.ab=function(){};r.ld=function(){};
340
- G("shaka.media.MetaSegmentIndex",Uj);Uj.prototype.updateEvery=Uj.prototype.ld;Uj.prototype.fit=Uj.prototype.ab;Uj.prototype.mergeAndEvict=Uj.prototype.Mb;Uj.prototype.evict=Uj.prototype.kb;Uj.prototype.merge=Uj.prototype.uc;Uj.prototype.offset=Uj.prototype.offset;Uj.prototype.get=Uj.prototype.get;Uj.prototype.find=Uj.prototype.find;Uj.prototype.release=Uj.prototype.release;function Vj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Wc();this.h=new M(function(){b.g.Se(.25*b.i)})}Vj.prototype.release=function(){this.set(this.kc());this.h&&(this.h.stop(),this.h=null);this.g=null};Vj.prototype.set=function(a){this.i=a;Wj(this)};Vj.prototype.kc=function(){return this.g.kc()};function Wj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Wc()!=b&&a.g.qe(b);return}catch(c){}a.h.Fa(.25);0!=a.g.Wc()&&a.g.qe(0)};function Xj(a){var b=this;this.h=a;this.g=new Set;this.i=(new M(function(){Yj(b,!1)})).Fa(.25)}Xj.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Yj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Zj(a){$e.call(this);this.g=new Map;this.h=a}ta(Zj,$e);Zj.prototype.release=function(){this.g.clear();$e.prototype.release.call(this)};function ak(a,b){var c=a.g.get(b);c||(c={wc:[],Fe:null,contentType:b},a.g.set(b,c));return c}function bk(a,b,c){var d=ak(a,b.contentType);ck(a,d);a={Sd:b,position:c};d=d.wc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
341
- Zj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.wc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Sd;break a}}d=null}if(e=d)e=c.Fe,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);
342
- 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.Fe=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function ck(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.wc;b.wc=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.wc=[]};function dk(a){$e.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new M(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 O("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Fa(2)}ta(dk,$e);dk.prototype.release=function(){this.g.clear();this.h.stop();$e.prototype.release.call(this)};function ek(a,b){$e.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{xb:null,wb:fk,ob:function(d,e){return gk(c,"enter",d,e)}},{xb:hk,wb:fk,ob:function(d,e){return gk(c,"enter",d,e)}},{xb:ik,wb:fk,ob:function(d,e){return gk(c,"enter",d,e)}},{xb:fk,wb:hk,ob:function(d,e){return gk(c,"exit",d,e)}},{xb:fk,wb:ik,ob:function(d,e){return gk(c,"exit",d,e)}},{xb:hk,wb:ik,ob:function(d,e){return gk(c,"skip",d,e)}},{xb:ik,wb:hk,ob:function(d,e){return gk(c,"skip",d,e)}}];this.h=new sf;this.h.C(this.i,
343
- "regionremove",function(d){c.g.delete(d.region)})}ta(ek,$e);ek.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;$e.prototype.release.call(this)};ek.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;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?hk:a>d.endTime?ik:fk;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.xb==e&&h.wb==f&&h.ob(d,b)}}};
344
- function gk(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var hk=1,fk=2,ik=3;function jk(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function kk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?lk:mk};d.ot=nk(c);var e=d.ot===ok||d.ot===pk||d.ot===qk||d.ot===rk;e&&(d.bl=sk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==rk&&(d.tb=tk(a,d.ot)/1E3);uk(a,b,d)}}catch(f){db("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
301
+ r.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n;return D(function(p){if(1==p.g)return e=lc,u(p,d.J,2);d.A=c;f={};g=t(a.keys());for(h=g.next();!h.done;f={oa:f.oa},h=g.next())if(f.oa=h.value,k=a.get(f.oa),l=bd(k.mimeType,k.codecs),f.oa==e.Y)Yi(d,l,c,k.external);else{!b&&ib(l)||!Wc(l,f.oa)||(d.o[f.oa]=new Vc(l),l=Zc(f.oa,l));m=l+d.G.sourceBufferExtraFeatures;sf(d.D);n=void 0;try{n=d.j.addSourceBuffer(m)}catch(q){throw new K(2,3,3015,q,"The mediaSource_ status was"+d.j.readyState+
302
+ "expected 'open'");}d.u.C(n,"error",function(q){return function(){d.i[q.oa][0].p.reject(new K(2,3,3014,d.l.error?d.l.error.code:0))}}(f));d.u.C(n,"updateend",function(q){return function(){return Zi(d,q.oa)}}(f));d.h[f.oa]=n;d.L[f.oa]=l;d.i[f.oa]=[];d.P[f.oa]=!!k.drmInfos.length}B(p)})};r.configure=function(a){this.G=a};
303
+ function Yi(a,b,c,d){a.g||(a.g=new hd(a.m));var e=a.g;a=d||a.H;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,jd[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):bb('Text parsers should have a "setSequenceMode" method!'),e.u=a)}function $i(a){return a.j?"ended"==a.j.readyState:!0}function aj(a,b){return b==kc?a.g.g:Bi(bj(a,b))}function cj(a,b){return b==kc?a.g.h:Ci(bj(a,b))}
304
+ function dj(a,b,c){if(b==kc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=bj(a,b);return Ei(a,c)}r.Pa=function(){var a={total:Fi(this.l.buffered),audio:Fi(bj(this,"audio")),video:Fi(bj(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 bj(a,b){try{return a.h[b].buffered}catch(c){return null}}
305
+ function ej(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,n,p,q,v,w,x,y,C,A,z,E,F,H,I,L,J,M,T,W;return D(function(O){switch(O.g){case 1:h=lc;if(b!=h.Y){O.B(2);break}if(!a.A){O.B(3);break}return u(O,a.W,4);case 4:k=O.h,a.g.s=k;case 3:return u(O,kd(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.ua()[0]:null),5);case 5:return O.return();case 2:l=Mb(c);m=a.L[b];a.o[b]&&(m=a.o[b].o);0>Mi(l)?fj.includes(m)&&(v=Ki(l),v.length&&d&&(w={cueTime:d.startTime,data:l,frames:v,dts:d.startTime,pts:d.startTime},
306
+ a.V([w],0,d.endTime))):(n=(new Li).parse(l),p=d.startTime-(n.getStartTime()[b]||0),q=Oi(n),q.length&&a.V(q,p,d?d.endTime:null));if(!a.o[b]){e&&b==h.qa&&(a.g||Yi(a,"application/cea-608",a.A,!1),a.s||(a.s=new vi(m)),d?(x=wi(a.s,c),x.length&&(y=a.h[h.qa].timestampOffset,pd(a.g,x,d.startTime,d.endTime,y))):a.s.init(c));O.B(6);break}f&&a.o[b].g.resetCaptions();return u(O,$c(a.o[b],c),7);case 7:C=O.h,a.g||Yi(a,"application/cea-608",a.A,!1),C.captions&&C.captions.length&&(A=a.h[h.qa].timestampOffset,z=nd(C.captions),
307
+ pd(a.g,z,d?d.startTime:null,d?d.endTime:null,A)),c=C.data;case 6:c=gj(a,c,d?d.startTime:null,b);E=a.h[b];F=hj;if(!a.A||E.mode==F||!d){O.B(8);break}H=a.j.duration;I=b==h.qa||!(h.qa in a.h);if(!I){O.B(9);break}L=[E.appendWindowStart,E.appendWindowEnd];E.appendWindowStart=0;E.appendWindowEnd=Infinity;J=E.timestampOffset;E.timestampOffset=0;return u(O,ij(a,b,function(){return jj(a,b,c)}),10);case 10:return u(O,ij(a,b,function(){return kj(a,b)}),11);case 11:return E.timestampOffset=J,E.appendWindowStart=
308
+ L[0],E.appendWindowEnd=L[1],M=Bi(bj(a,b)),T=(d.startTime||0)-(M||0),a.W.resolve(T),u(O,ij(a,b,function(){return lj(a,b,0,H)}),12);case 12:if(b!=h.qa){O.B(9);break}return u(O,ij(a,b,function(){a.l.currentTime-=.001;Zi(a,b)}),9);case 9:return E.mode=F,u(O,a.Da(H),8);case 8:return d&&a.A&&b!=h.Y&&(f||g)&&(W=d.startTime,ij(a,b,function(){return kj(a,b)}),ij(a,b,function(){return mj(a,b,W)})),u(O,ij(a,b,function(){jj(a,b,c)}),16);case 16:B(O)}})}function nj(a,b){var c=cj(a,"video")||0;md(a.g,b,c)}
309
+ function oj(a){a.g&&md(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return D(function(f){e=lc;return a==e.Y?u(f,d.g.remove(b,c),0):u(f,ij(d,a,function(){return lj(d,a,b,c)}),0)})};function pj(a,b){var c;return D(function(d){c=lc;return b==c.Y?a.g?u(d,a.g.remove(0,Infinity),0):d.return():u(d,ij(a,b,function(){return lj(a,b,0,a.j.duration)}),0)})}r.flush=function(a){var b=this,c;return D(function(d){c=lc;return a==c.Y?d.return():u(d,ij(b,a,function(){b.l.currentTime-=.001;Zi(b,a)}),0)})};
310
+ function qj(a,b,c,d,e,f){var g;return D(function(h){g=lc;return b==g.Y?(f||(a.g.s=c),ld(a.g,d,e),h.return()):u(h,Promise.all([ij(a,b,function(){return kj(a,b)}),f?Promise.resolve():ij(a,b,function(){return mj(a,b,c)}),ij(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Zi(a,b)})]),0)})}function rj(a,b,c){var d;return D(function(e){d=lc;if(b==d.Y)return e.return();ij(a,b,function(){return kj(a,b)});return u(e,ij(a,b,function(){return mj(a,b,c)}),0)})}
311
+ r.endOfStream=function(a){var b=this;return D(function(c){return u(c,sj(b,function(){$i(b)||"closed"===b.j.readyState||(a?b.j.endOfStream(a):b.j.endOfStream())}),0)})};r.Da=function(a){var b=this;return D(function(c){return u(c,sj(b,function(){if(a<b.j.duration)for(var d in b.h){var e={start:function(){},p:new mc};b.i[d].unshift(e)}b.j.duration=a}),0)})};r.getDuration=function(){return this.j.duration};
312
+ function jj(a,b,c){if("video"==b&&a.F){var d=a.F;d.g&&d.g.appendBuffer(c,"video",d.i)}a.h[b].appendBuffer(c)}function lj(a,b,c,d){d<=c?Zi(a,b):a.h[b].remove(c,d)}function kj(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Zi(a,b)}function mj(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Zi(a,b)}function Zi(a,b){var c=a.i[b][0];c&&(c.p.resolve(),tj(a,b))}
313
+ function ij(a,b,c){sf(a.D);c={start:c,p:new mc};a.i[b].push(c);1==a.i[b].length&&uj(a,b);return c.p}
314
+ function sj(a,b){var c,d,e,f,g,h;return D(function(k){switch(k.g){case 1:sf(a.D);c=[];d={};for(e in a.h)d.Xb=new mc,f={start:function(l){return function(){return l.Xb.resolve()}}(d),p:d.Xb},a.i[e].push(f),c.push(d.Xb),1==a.i[e].length&&f.start(),d={Xb:d.Xb};xa(k,2);return u(k,Promise.all(c),4);case 4:za(k,3);break;case 2:throw g=Aa(k),g;case 3:try{b()}catch(l){throw new K(2,3,3015,l);}finally{for(h in a.h)tj(a,h)}B(k)}})}function tj(a,b){a.i[b].shift();uj(a,b)}
315
+ function uj(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new K(2,3,3017,b)):c.p.reject(new K(2,3,3015,d)),tj(a,b)}}function gj(a,b,c,d){var e=a.P[d];null==c&&e&&(wc()||uc()||vc("SOPOpenBrowser"))&&"mp4"==a.L[d].split(";")[0].split("/")[1]&&(b=dh(b));return b}var Xi=window.URL.createObjectURL,hj="sequence",fj=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Q(a,b,c){this.i=a;this.m=b;this.o=this.j=Infinity;this.g=1;this.h=this.l=null;this.u=0;this.D=!0;this.F=0;this.G=void 0===c?!0:c;this.H=0;this.s=!1;this.A=null}r=Q.prototype;r.getDuration=function(){return this.j};r.Pf=function(){return this.g};r.af=function(a){this.i=a};r.Da=function(a){this.j=a};r.Uf=function(){return this.i};r.Ze=function(a){this.u=a};r.Cc=function(a){this.D=a};r.qe=function(a){this.o=a};r.me=function(a){this.m=a};r.Hf=function(){return this.m};
316
+ r.Nb=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.u)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.Wd(b);this.h=Math.max(this.h,c);null!=this.i&&this.G&&!this.s&&(this.i=d-this.h-this.g)}};r.Rd=function(){this.s=!0};r.gg=function(){return this.s};r.$e=function(a){this.A=a};r.Kf=function(){return this.A};
317
+ r.Wd=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.Vd=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.T=function(){return Infinity==this.j&&!this.D};r.pb=function(){return Infinity!=this.j&&!this.D};r.Ka=function(){return Math.max(this.F,this.ab()-this.o)};r.df=function(a){this.F=a};
318
+ r.ab=function(){return this.T()||this.pb()?Math.min(Math.max(0,(Date.now()+this.u)/1E3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j};r.oc=function(a){var b=Math.max(this.l,this.F);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.ab()-this.o+a,this.Qa()))};r.Ib=function(){return this.oc(0)};r.Qa=function(){return Math.max(0,this.ab()-(this.T()||this.pb()?this.m:0))};r.hf=function(){return null==this.i||null!=this.h&&this.G?!1:!0};
319
+ r.Ye=function(a){this.H=a};G("shaka.media.PresentationTimeline",Q);Q.prototype.setAvailabilityTimeOffset=Q.prototype.Ye;Q.prototype.usingPresentationStartTime=Q.prototype.hf;Q.prototype.getSeekRangeEnd=Q.prototype.Qa;Q.prototype.getSeekRangeStart=Q.prototype.Ib;Q.prototype.getSafeSeekRangeStart=Q.prototype.oc;Q.prototype.getSegmentAvailabilityEnd=Q.prototype.ab;Q.prototype.setUserSeekStart=Q.prototype.df;Q.prototype.getSegmentAvailabilityStart=Q.prototype.Ka;Q.prototype.isInProgress=Q.prototype.pb;
320
+ Q.prototype.isLive=Q.prototype.T;Q.prototype.offset=Q.prototype.offset;Q.prototype.notifyMaxSegmentDuration=Q.prototype.Vd;Q.prototype.notifyMinSegmentStartTime=Q.prototype.Wd;Q.prototype.getInitialProgramDateTime=Q.prototype.Kf;Q.prototype.setInitialProgramDateTime=Q.prototype.$e;Q.prototype.isStartTimeLocked=Q.prototype.gg;Q.prototype.lockStartTime=Q.prototype.Rd;Q.prototype.notifySegments=Q.prototype.Nb;Q.prototype.getDelay=Q.prototype.Hf;Q.prototype.setDelay=Q.prototype.me;
321
+ Q.prototype.setSegmentAvailabilityDuration=Q.prototype.qe;Q.prototype.setStatic=Q.prototype.Cc;Q.prototype.setClockOffset=Q.prototype.Ze;Q.prototype.getPresentationStartTime=Q.prototype.Uf;Q.prototype.setDuration=Q.prototype.Da;Q.prototype.setPresentationStartTime=Q.prototype.af;Q.prototype.getMaxSegmentDuration=Q.prototype.Pf;Q.prototype.getDuration=Q.prototype.getDuration;function vj(a,b,c){this.l=c;this.j=a;this.s=wj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}vj.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function xj(a,b){a.i=b}function yj(a){this.g=a}function wj(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(Fi(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 zj(a,b,c,d,e){var f=this;this.s=e;this.g=a;this.u=b;this.F=c;this.l=new tf;this.j=!1;this.D=a.readyState;this.A=this.i=0;this.h=d;this.o=!1;this.l.C(a,"waiting",function(){return Aj(f)});this.m=(new pc(function(){Aj(f)})).Fa(.25)}zj.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.u=this.s=null};zj.prototype.Zd=function(){this.o=!0;Aj(this)};
322
+ function Aj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.D&&(a.D=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=wj(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.l(new N("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Gi(c,b,a.F.gapDetectionThreshold),null==
323
+ d||0==d&&!a.o||(e=c.start(d),e>=a.u.Qa()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.A++,a.s(new N("gapjumped")))))}}};function Bj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Cj.value().get(b),c.ba(a,b,d))}var Cj=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 Dj(a,b,c,d){var e=this;this.g=a;this.l=b;this.o=c;this.j=d;this.m=!1;this.h=new tf;this.i=new Ej(a);Bj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Fj(e,e.j)})}Dj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Gj(a){return a.m?a.g.currentTime:a.j}function Hj(a,b){0<a.g.readyState?Ij(a.i,b):Bj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Fj(a,a.j)})}
324
+ function Fj(a,b){.001>Math.abs(a.g.currentTime-b)?Jj(a):(a.h.ba(a.g,"seeking",function(){Jj(a)}),Ij(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Jj(a){a.m=!0;a.h.C(a.g,"seeking",function(){return a.l()});a.o(a.g.currentTime)}function Ej(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new pc(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Ej.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
325
+ function Ij(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Fa(.1)};function Kj(a){this.g=a;this.j=!1;this.h=null;this.i=new tf}r=Kj.prototype;r.Ed=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ba(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Bj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.Fd=function(a){this.h=this.j?this.h:a};r.Lc=function(){return(this.j?this.g.currentTime:this.h)||0};r.ye=function(){return 0};
326
+ r.xe=function(){return 0};r.Se=function(){};
327
+ function Lj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.A=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=Mj(a,c,f);this.j=new zj(a,b.presentationTimeline,c,this.o,f);this.h=new Dj(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=Gj(g.h);h=Nj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;Hj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},Oj(this,d));this.m=new pc(function(){if(0!=g.i.readyState&&
328
+ !g.i.paused){var h=Gj(g.h),k=g.g.Ib(),l=g.g.Qa();3>l-k&&(k=l-3);h<k&&(h=Nj(g,h),g.i.currentTime=h)}})}r=Lj.prototype;r.Ed=function(){this.m.Fa(.25)};r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.u=function(){}};r.Fd=function(a){Hj(this.h,a)};r.Lc=function(){var a=Gj(this.h);return 0<this.i.readyState&&!this.i.paused?Pj(this,a):a};r.ye=function(){return this.o?this.o.o:0};
329
+ r.xe=function(){return this.j.A};function Oj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Ib():a.g.Qa():0>b&&(b=a.g.Qa()+b);return Qj(a,Pj(a,b))}r.Se=function(){this.j.Zd()};function Qj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
330
+ function Nj(a,b){var c=Math.max(a.A,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Ib(),f=a.g.Qa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.oc(c),k=a.g.oc(d);c=a.g.oc(c+d);return b>=g?Qj(a,b):b>f?f:b<e?Di(a.i.buffered,k)?k:c:b>=h||Di(a.i.buffered,b)?b:c}function Pj(a,b){var c=a.g.Ib();if(b<c)return c;a=a.g.Qa();return b>a?a:b}
331
+ function Mj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new vj(new yj(a),b.stallThreshold,c);xj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Rj(a){this.g=a;this.h=null;this.j=0;this.l=!1}r=Rj.prototype;r.release=function(){this.l||(this.g=[],this.h&&this.h.stop(),this.h=null)};r.jg=function(){this.l=!0};r.Sc=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};r.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.j}return this.g.length&&a<this.g[0].startTime?this.j:null};
332
+ r.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.l)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};r.uc=function(a){if(!this.l&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,ka(a))}};
333
+ r.Mb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.uc(a);this.kb(b)};r.kb=function(a){if(!this.l){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
334
+ r.$a=function(a,b,c){c=void 0===c?!1:c;if(!this.l){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.j++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new P(a.startTime,b,a.A,a.Ea,a.ma,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.i,a.tilesLayout,a.s,a.g,a.status,a.m),this.g[this.g.length-1].l=a.l)}};
335
+ r.ld=function(a,b){var c=this;this.l||(this.h&&this.h.stop(),this.h=new pc(function(){var d=b();d?c.g.push.apply(c.g,ka(d)):(c.h.stop(),c.h=null)}),this.h.Fa(a))};Rj.prototype[Symbol.iterator]=function(){return this.mb(0)};Rj.prototype.mb=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.i.length)for(var e=c.i.length-1;0<=e;--e){var f=c.i[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Sj(this,b,d)};
336
+ function Tj(a,b,c){return new Rj([new P(a,a+b,function(){return c},0,null,null,a,a,a+b)])}G("shaka.media.SegmentIndex",Rj);Rj.forSingleSegment=Tj;Rj.prototype.getIteratorForTime=Rj.prototype.mb;Rj.prototype.updateEvery=Rj.prototype.ld;Rj.prototype.fit=Rj.prototype.$a;Rj.prototype.evict=Rj.prototype.kb;Rj.prototype.mergeAndEvict=Rj.prototype.Mb;Rj.prototype.offset=Rj.prototype.offset;Rj.prototype.get=Rj.prototype.get;Rj.prototype.find=Rj.prototype.find;Rj.prototype.markImmutable=Rj.prototype.jg;
337
+ Rj.prototype.release=Rj.prototype.release;function Sj(a,b,c){this.i=a;this.g=b;this.h=c}Sj.prototype.zf=function(){return this.g};Sj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.i.length&&a.ua().length&&this.h>=a.i.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.i.length?a.i[this.h]:a};
338
+ Sj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.i.length?(this.h++,a.ua().length&&this.h==a.i.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};G("shaka.media.SegmentIterator",Sj);Sj.prototype.next=Sj.prototype.next;Sj.prototype.current=Sj.prototype.current;Sj.prototype.currentPosition=Sj.prototype.zf;function Uj(){Rj.call(this,[]);this.i=[]}ta(Uj,Rj);r=Uj.prototype;r.clone=function(){var a=new Uj;a.i=this.i.slice();return a};
339
+ r.release=function(){for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[]};r.Sc=function(a){for(var b=t(this.i),c=b.next();!c.done;c=b.next())c.value.Sc(a)};r.find=function(a){for(var b=0,c=t(this.i),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.j+d.g.length}return null};r.get=function(a){for(var b=0,c=t(this.i),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.j+d.g.length}return null};r.offset=function(){};
340
+ r.uc=function(){};r.kb=function(){};r.Mb=function(){};r.$a=function(){};r.ld=function(){};G("shaka.media.MetaSegmentIndex",Uj);Uj.prototype.updateEvery=Uj.prototype.ld;Uj.prototype.fit=Uj.prototype.$a;Uj.prototype.mergeAndEvict=Uj.prototype.Mb;Uj.prototype.evict=Uj.prototype.kb;Uj.prototype.merge=Uj.prototype.uc;Uj.prototype.offset=Uj.prototype.offset;Uj.prototype.get=Uj.prototype.get;Uj.prototype.find=Uj.prototype.find;Uj.prototype.forEachTopLevelReference=Uj.prototype.Sc;Uj.prototype.release=Uj.prototype.release;function Vj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Wc();this.h=new pc(function(){b.g.Re(.25*b.i)})}Vj.prototype.release=function(){this.set(this.kc());this.h&&(this.h.stop(),this.h=null);this.g=null};Vj.prototype.set=function(a){this.i=a;Wj(this)};Vj.prototype.kc=function(){return this.g.kc()};function Wj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Wc()!=b&&a.g.pe(b);return}catch(c){}a.h.Fa(.25);0!=a.g.Wc()&&a.g.pe(0)};function Xj(a){var b=this;this.h=a;this.g=new Set;this.i=(new pc(function(){Yj(b,!1)})).Fa(.25)}Xj.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Yj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Zj(a){af.call(this);this.g=new Map;this.h=a}ta(Zj,af);Zj.prototype.release=function(){this.g.clear();af.prototype.release.call(this)};function ak(a,b){var c=a.g.get(b);c||(c={wc:[],Ee:null,contentType:b},a.g.set(b,c));return c}function bk(a,b,c){var d=ak(a,b.contentType);ck(a,d);a={Sd:b,position:c};d=d.wc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
341
+ Zj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.wc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Sd;break a}}d=null}if(e=d)e=c.Ee,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);
342
+ 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.Ee=d,JSON.stringify(d),c=new N("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function ck(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.wc;b.wc=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.wc=[]};function dk(a){af.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new pc(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 N("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Fa(2)}ta(dk,af);dk.prototype.release=function(){this.g.clear();this.h.stop();af.prototype.release.call(this)};function ek(a,b){af.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{yb:null,xb:fk,ob:function(d,e){return gk(c,"enter",d,e)}},{yb:hk,xb:fk,ob:function(d,e){return gk(c,"enter",d,e)}},{yb:ik,xb:fk,ob:function(d,e){return gk(c,"enter",d,e)}},{yb:fk,xb:hk,ob:function(d,e){return gk(c,"exit",d,e)}},{yb:fk,xb:ik,ob:function(d,e){return gk(c,"exit",d,e)}},{yb:hk,xb:ik,ob:function(d,e){return gk(c,"skip",d,e)}},{yb:ik,xb:hk,ob:function(d,e){return gk(c,"skip",d,e)}}];this.h=new tf;this.h.C(this.i,
343
+ "regionremove",function(d){c.g.delete(d.region)})}ta(ek,af);ek.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;af.prototype.release.call(this)};ek.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;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?hk:a>d.endTime?ik:fk;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.yb==e&&h.xb==f&&h.ob(d,b)}}};
344
+ function gk(a,b,c,d){b=new N(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var hk=1,fk=2,ik=3;function jk(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function kk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?lk:mk};d.ot=nk(c);var e=d.ot===ok||d.ot===pk||d.ot===qk||d.ot===rk;e&&(d.bl=sk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==rk&&(d.tb=tk(a,d.ot)/1E3);uk(a,b,d)}}catch(f){cb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
345
345
  function vk(a,b,c){try{if(!a.g.enabled)return b;var d=wk(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=pk;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=qk;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=xk;break a}e=void 0}d.ot=e;d.su=
346
- !0;var f=yk(d);return zk(b,f)}catch(g){return db("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function wk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
346
+ !0;var f=yk(d);return zk(b,f)}catch(g){return cb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function wk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
347
347
  function uk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,wk(a));c.pr=a.h.Uc();var e=c.ot===ok||c.ot===qk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Ak(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=yk(c);f&&(b.uris=b.uris.map(function(g){return zk(g,f)}))}}}
348
- function nk(a){var b=a.type;if(a.init)return Bk;if("video"==b)return a.codecs.includes(",")?qk:ok;if("audio"==b)return pk;if("text"==b)return"application/mp4"===a.mimeType?rk:Ck}function sk(a,b){b=a.h.Qa()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
349
- function tk(a,b){var c=a.h.Sa();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case ok:return a.videoBandwidth||NaN;case pk:return a.audioBandwidth||NaN;default:return a.bandwidth}}
348
+ function nk(a){var b=a.type;if(a.init)return Bk;if("video"==b)return a.codecs.includes(",")?qk:ok;if("audio"==b)return pk;if("text"==b)return"application/mp4"===a.mimeType?rk:Ck}function sk(a,b){b=a.h.Pa()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
349
+ function tk(a,b){var c=a.h.Ra();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case ok:return a.videoBandwidth||NaN;case pk:return a.audioBandwidth||NaN;default:return a.bandwidth}}
350
350
  function yk(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"===
351
351
  l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Ak(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=yk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
352
- function zk(a,b){if(!b||a.includes("offline:"))return a;a=new Tb(a);a.g.set("CMCD",b);return a.toString()}var xk="m",pk="a",ok="v",qk="av",Bk="i",Ck="c",rk="tt",mk="v",lk="l";G("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",hh:"s",OTHER:"o"});function Dk(a,b,c,d,e){a=jf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Ek(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.u=1;this.o=this.l=null;this.F=0;this.D=!1;this.j=new Map;this.A=!1;this.G=null;this.s=!1;this.i=new qf(function(){return Fk(c)})}r=Ek.prototype;r.destroy=function(){return this.i.destroy()};function Fk(a){var b,c,d,e;return D(function(f){if(1==f.g){b=[];c=t(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,Gk(e),b.push(Hk(e));return u(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.h=null;B(f)})}
353
- r.configure=function(a){this.h=a;this.G=new Oe({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};r.start=function(){var a=this;return D(function(b){if(1==b.g)return u(b,Ik(a),2);rf(a.i);a.A=!0;B(b)})};
354
- function Jk(a,b){var c,d,e,f,g,h,k;D(function(l){switch(l.g){case 1:return c=mc,a.F++,d=a.F,xa(l,2),u(l,oj(a.g.R,c.Z),4);case 4:za(l,3);break;case 2:if(e=Aa(l),a.g)a.g.onError(e);case 3:f=bd(b.mimeType,b.codecs),Xi(a.g.R,f,a.m.sequenceMode,b.external),g=a.g.R.m,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.F==d&&(k=Kk(b),a.j.set(c.Z,k),Lk(a,k,0)),B(l)}})}function Mk(a){var b=a.j.get(lc);b&&(Gk(b),Hk(b).catch(function(){}),a.j.delete(lc));a.o=null}
355
- function Nk(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.ub&&(Ok(a,b,!1,0,!1),c.ub=d);else if(d=c.ub)c.ub=null,Ok(a,d,!0,0,!1)}}function Pk(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.A&&(b.video&&Ok(a,b.video,c,d,e,f),b.audio&&Ok(a,b.audio,c,d,e,f))}function Qk(a,b){D(function(c){if(1==c.g)return a.o=b,a.A?b.segmentIndex?c.B(2):u(c,b.createSegmentIndex(),2):c.return();Ok(a,b,!0,0,!1);B(c)})}
356
- function Ok(a,b,c,d,e,f){var g=a.j.get(b.type);g||b.type!=lc?g&&(g.ub&&(b.trickModeVideo?(g.ub=b,b=b.trickModeVideo):g.ub=null),g.stream!=b||e)&&(b.type==lc&&Xi(a.g.R,bd(b.mimeType,b.codecs),a.m.sequenceMode,b.external),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.Y=null,g.Ae=!!f,c&&(g.dc?g.nd=!0:g.ua?(g.gb=!0,g.Rc=d,g.nd=!0):(Gk(g),Rk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Sk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Jk(a,b)}
357
- function Sk(a,b){var c,d;return D(function(e){if(1==e.g){if(!b.ya)return e.return();c=b.stream;d=b.ya;return c.segmentIndex?e.B(2):u(e,c.createSegmentIndex(),2)}if(b.ya!=d||b.stream!=c)return e.return();var f=a.g.Vc();var g=bj(a.g.R,b.type),h=b.stream.segmentIndex.find(b.sa?b.sa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.na?k.na-k.Ea:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.na?k.na-k.Ea:null)||0),k=a.g.getBandwidthEstimate(),
358
- f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.ya.h.g>h?!0:!1):f=!1;f&&b.ya.abort();B(e)})}
359
- r.Ac=function(){if(this.g)for(var a=this.g.Vc(),b=t(this.j.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.j.get(d);var e=null;c.Y&&(e=c.Y.current());if(!e||e.startTime>a||e.endTime<a)c.Y=null;e=this.g.R;d==lc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=aj(e,d),e=Ci(e,a));if(!e){(null!=bj(this.g.R,d)||c.ua)&&Tk(this,c);c.ya&&(c.ya.abort(),c.ya=null);if(d===lc&&(d=this.g.R,d.s))for(d=d.s.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,di(d),d=t(d.j.values()),e=d.next();!e.done;e=
360
- d.next())Zh(e.value);c.Ac=!0}}};function Tk(a,b){b.dc||b.gb||(b.ua?(b.gb=!0,b.Rc=0):null==$i(a.g.R,b.type)?null==b.Oa&&Lk(a,b,0):(Gk(b),Rk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
361
- function Ik(a){var b,c,d,e,f,g,h,k,l,m;return D(function(n){if(1==n.g){b=mc;if(!a.l)throw new L(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.jb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.ra,a.l.video),d.add(a.l.video));a.o&&(c.set(b.Z,a.o),d.add(a.o));e=a.g.R;f=a.h.forceTransmux;return u(n,e.init(c,f,a.m.sequenceMode),2)}rf(a.i);a.updateDuration();g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||(m=Kk(l),a.j.set(k,m),Lk(a,m,0));B(n)})}
362
- function Kk(a){return{stream:a,type:a.type,Y:null,sa:null,bd:null,Pd:null,Od:null,Nd:null,ub:null,endOfStream:!1,ua:!1,Oa:null,gb:!1,Rc:0,nd:!1,dc:!1,Ac:!0,Vd:!1,fe:!1,sc:!1,ya:null}}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.R.Da(a):this.g.R.Da(Math.pow(2,32))};
363
- function Uk(a,b){var c,d,e,f,g;return D(function(h){switch(h.g){case 1:rf(a.i);if(b.ua||null==b.Oa||b.dc)return h.return();b.Oa=null;if(!b.gb){h.B(2);break}return u(h,Rk(a,b,b.nd,b.Rc),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.ua||b.Oa||Lk(a,b,0),h.return();case 4:xa(h,6);d=Vk(a,b);null!=d&&(Lk(a,b,d),b.sc=!1);za(h,7);break;case 6:return e=
364
- Aa(h),u(h,Wk(a,e),8);case 8:return h.return();case 7:f=Array.from(a.j.values());if(!a.A||!f.every(function(k){return k.endOfStream})){h.B(0);break}return u(h,a.g.R.endOfStream(),10);case 10:rf(a.i),g=a.g.R.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Da(g),B(h)}})}
365
- function Vk(a,b){if(Xk(b))return mj(a.g.R,b.stream.originalId||""),null;b.type==lc&&nj(a.g.R);var c=a.g.Vc(),d=b.sa?b.sa.endTime:c,e=cj(a.g.R,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.u,g=a.m.presentationTimeline.getDuration()-d,h=bj(a.g.R,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.j.get(lc))&&Xk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Yk(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;
366
- f=Infinity;g=Array.from(a.j.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Xk(h)||h.Y&&!h.Y.current()||(f=Math.min(f,h.sa?h.sa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;Zk(a,b,c,e).catch(function(){});return null}
367
- function Yk(a,b,c,d){if(b.Y)return b.Y.current();if(b.sa||d)return c=b.sa?b.sa.endTime:d,b.Vd=!0,b.Y=b.stream.segmentIndex.mb(c),b.Y&&b.Y.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.Y=b.stream.segmentIndex.mb(d),e=b.Y&&b.Y.next().value);e||(b.Y=b.stream.segmentIndex.mb(c),e=b.Y&&b.Y.next().value);return e}
368
- function Zk(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A;return D(function(z){switch(z.g){case 1:e=mc;f=b.stream;g=b.Y;b.ua=!0;xa(z,2);if(2==d.Jb())throw new L(1,1,1011);return u(z,$k(a,b,d),4);case 4:rf(a.i);if(a.s)return z.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h&&!d.l)return n=new Uint8Array(0),q=p=!1,w=function(E){var F,H,I,J;return D(function(K){if(1==K.g){if(p)return K.return();q=!0;rf(a.i);if(a.s)return K.return();xa(K,
369
- 2);n=al(n,E);F=!1;H=0;(new Ff).box("mdat",function(P){H=P.size+P.start;F=!0}).parse(n,!1,!0);if(!F)return K.B(4);I=n.subarray(0,H);n=n.subarray(H);return u(K,bl(a,b,c,f,d,I),4)}if(2!=K.g)return za(K,0);v=J=Aa(K);B(K)})},u(z,cl(a,b,d,w),9);l=cl(a,b,d);return u(z,l,7);case 7:return m=z.h,rf(a.i),a.s?z.return():b.gb?(b.ua=!1,Lk(a,b,0),z.return()):u(z,bl(a,b,c,f,d,m),6);case 9:x=z.h;if(v)throw v;if(q){z.B(6);break}p=!0;rf(a.i);return a.s?z.return():b.gb?(b.ua=!1,Lk(a,b,0),z.return()):u(z,bl(a,b,c,f,d,
370
- x),6);case 6:rf(a.i);if(a.s)return z.return();b.sa=d;g.next();b.ua=!1;b.fe=!1;y=a.g.R.Qa();C=y[b.type];hb(JSON.stringify(C));b.gb||a.g.$d(d.startTime,d.endTime,b.type);Lk(a,b,0);za(z,0);break;case 2:A=Aa(z);rf(a.i,A);if(a.s)return z.return();b.ua=!1;if(7001==A.code)b.ua=!1,Gk(b),Lk(a,b,0),z.B(0);else if(b.type==e.Z&&a.h.ignoreTextStreamFailures)a.j.delete(e.Z),z.B(0);else if(3017==A.code)dl(a,b,A),z.B(0);else return b.sc=!0,A.severity=2,u(z,Wk(a,A),0)}})}
371
- function el(a,b,c){var d,e,f,g;return D(function(h){if(1==h.g)return d=b,d.cryptoKey?h.B(2):u(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=Nb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c.g,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function al(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
372
- function dl(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.fe})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.sc=!0;a.s=!0;a.g.onError(c);return}b.fe=!0}Lk(a,b,4)}
373
- function $k(a,b,c){var d,e,f,g,h,k,l,m;return D(function(n){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Pd||e!=b.Od||f!=b.Nd)h=function(){var p;return D(function(q){if(1==q.g)return xa(q,2),b.Od=e,b.Nd=f,b.Pd=g,u(q,pj(a.g.R,b.type,g,e,f,a.m.sequenceMode),4);if(2!=q.g)return za(q,0);p=Aa(q);b.Od=null;b.Nd=null;b.Pd=null;throw p;})},d.push(h());!xi(c.g,b.bd)&&(b.bd=c.g)&&(k=cl(a,b,c.g),l=function(){var p,q,v,w;return D(function(x){switch(x.g){case 1:return xa(x,
374
- 2),u(x,k,4);case 4:return p=x.h,rf(a.i),q=new Ff,q.box("moov",Kf).box("trak",Kf).box("mdia",Kf).M("mdhd",function(y){y=mi(y.reader||0,y.version||0);c.g.timescale=y.timescale}).parse(p),v=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(x,a.g.Ce(b.type,p),5);case 5:return u(x,dj(a.g.R,b.type,p,null,v),6);case 6:za(x,0);break;case 2:throw w=Aa(x),b.bd=null,w;}})},a.g.lg(c.startTime,c.g),d.push(l()));a.m.sequenceMode&&(m=b.sa?b.sa.j:null,c.j!=m||b.Vd)&&(b.Vd=!1,d.push(qj(a.g.R,b.type,c.startTime)));
375
- return u(n,Promise.all(d),0)})}
376
- function bl(a,b,c,d,e,f){var g,h,k,l,m,n;return D(function(p){switch(p.g){case 1:g=d.closedCaptions&&0<d.closedCaptions.size;k=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;l=a.h.parsePrftBox&&!a.D;if(k||l)h=new Ff;k&&h.M("emsg",function(q){var v=d.emsgSchemeIdUris;if(0===q.version){var w=q.reader.xc();var x=q.reader.xc();var y=q.reader.K();var C=q.reader.K();var A=q.reader.K();var z=q.reader.K();var E=e.startTime+C/y}else y=q.reader.K(),E=q.reader.eb()/y+e.timestampOffset,
377
- C=E-e.startTime,A=q.reader.K(),z=q.reader.K(),w=q.reader.xc(),x=q.reader.xc();q=q.reader.cb(q.reader.S.byteLength-q.reader.ba());if(v&&v.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.mg():(v=(new Map).set("detail",{startTime:E,endTime:E+A/y,schemeIdUri:w,value:x,timescale:y,presentationTimeDelta:C,eventDuration:A,id:z,messageData:q}),v=new O("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=w&&"https://developer.apple.com/streaming/emsg-id3"!=
378
- w||(w=Ji(q),w.length&&e&&a.g.ng([{cueTime:e.startTime,data:q,frames:w,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});l&&h.M("prft",function(q){a:{if(!a.D&&e.g.timescale){q.reader.K();var v=q.reader.K(),w=q.reader.K();v=1E3*v+w/Math.pow(2,32)*1E3;if(0===q.version)var x=q.reader.K();else try{x=q.reader.eb()}catch(y){a.D=!0;x=void 0;break a}q=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+v)).getTime();x=(new Map).set("detail",{wallClockTime:q,programStartDate:new Date(q-x/e.g.timescale*
379
- 1E3)});x=new O("prft",x);a.g.onEvent(x);a.D=!0}x=void 0}return x});(k||l)&&h.parse(f);return u(p,fl(a,b,c),2);case 2:return rf(a.i),m=b.Ac,b.Ac=!1,n=b.Ae,b.Ae=!1,u(p,a.g.Ce(b.type,f),3);case 3:return u(p,dj(a.g.R,b.type,f,e,g,m,n),4);case 4:rf(a.i),B(p)}})}
380
- function fl(a,b,c){var d,e,f,g;return D(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=$i(a.g.R,b.type);if(null==e)return h.return();f=c-e;g=f-d;return 1>=g?h.return():u(h,a.g.R.remove(b.type,e,e+g),2)}rf(a.i);B(h)})}function Xk(a){return a&&a.type==lc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
381
- function cl(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v;return D(function(w){switch(w.g){case 1:return e=pf,f=Dk(c.va(),c.Ea,c.na,a.h.retryParameters,d),g=b.stream,h=c instanceof wi,k=c,l=h?0:k.endTime-k.startTime,a.g.modifySegmentRequest(f,{type:g.type,init:h,duration:l,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),m=a.g.rb.request(e,f),b.ya=m,u(w,m.promise,2);case 2:n=w.h;b.ya=null;p=n.data;if(!c.l){w.B(3);break}q=b.Y;v=h?null:k.startTime;q||null==v||(q=b.stream.segmentIndex.mb(v));return u(w,
382
- el(p,c.l,q),4);case 4:p=w.h;case 3:return w.return(p)}})}function Rk(a,b,c,d){var e,f;return D(function(g){if(1==g.g)return b.gb=!1,b.nd=!1,b.Rc=0,b.dc=!0,b.sa=null,b.bd=null,b.Y=null,d?(e=a.g.Vc(),f=a.g.R.getDuration(),u(g,a.g.R.remove(b.type,e+d,f),3)):u(g,oj(a.g.R,b.type),4);if(3!=g.g)return rf(a.i),c?u(g,a.g.R.flush(b.type),3):g.B(3);rf(a.i);b.dc=!1;b.endOfStream=!1;b.ua||b.Oa||Lk(a,b,0);B(g)})}
383
- function Lk(a,b,c){var d=b.type;if(d!=lc||a.j.has(d))b.Oa=(new pc(function(){var e;return D(function(f){if(1==f.g)return xa(f,2),u(f,Uk(a,b),4);if(2!=f.g)return za(f,0);e=Aa(f);if(a.g)a.g.onError(e);B(f)})})).O(c)}function Gk(a){null!=a.Oa&&(a.Oa.stop(),a.Oa=null)}function Hk(a){return D(function(b){return a.ya?u(b,a.ya.abort(),0):b.B(0)})}function Wk(a,b){return D(function(c){if(1==c.g)return u(c,Qe(a.G),2);rf(a.i);a.g.onError(b);b.handled||a.h.failureCallback(b);B(c)})};function gl(a,b){var c=hl(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return il(d)});this.s=new qf(function(){return jl(d)})}gl.prototype.destroy=function(){return this.s.destroy()};function jl(a){var b,c,d;return D(function(e){if(1==e.g)return a.h&&a.h.abort(),kl(a),u(e,a.u,2);a.g&&a.g.La.sb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.La.sb();a.g=null;a.m=[];a.j=null;B(e)})}
384
- function ll(a,b){var c={Ob:function(){},fd:function(){},sb:function(){},onError:function(){},hd:function(){},yh:function(){}};a.m.push({create:b,La:c});a.h&&a.h.abort();kl(a);return c}
385
- function il(a){return D(function(b){if(a.s.g)b=b.B(0);else{if(0==a.m.length||a.g&&!a.g.nb)var c=!1;else{a.g&&(a.g.La.sb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.La.Ob(),a.g={node:d.node,payload:d.payload,nb:d.nb,La:c.La}):c.La.hd();c=!0}c?c=Promise.resolve():a.g?c=ml(a):(a.j.kg(a.i),a.o=new nc,c=a.o);b=u(b,c,1)}return b})}
386
- function ml(a){var b,c;return D(function(d){switch(d.g){case 1:return a.i=a.j.Qf(a.i,a.l,a.g.node,a.g.payload),xa(d,2),a.h=a.j.Cf(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.La.fd(),a.g=null);za(d,0);break;case 2:b=Aa(d);if(7001==b.code)a.g.La.sb();else a.g.La.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,B(d)}})}function kl(a){a.o&&(a.o.resolve(),a.o=null)};function nl(a){var b=[],c=700<=a.fontWeight,d="italic"==a.fontStyle,e=a.textDecoration.includes("underline");c&&b.push("b");d&&b.push("i");e&&b.push("u");c=b.reduce(function(f,g){return f+"<"+g+">"},"");b=b.reduceRight(function(f,g){return f+"</"+g+">"},"");return a.lineBreak?"\n":a.nestedCues.length?a.nestedCues.map(nl).join(""):c+a.payload+b}
352
+ function zk(a,b){if(!b||a.includes("offline:"))return a;a=new Sb(a);a.g.set("CMCD",b);return a.toString()}var xk="m",pk="a",ok="v",qk="av",Bk="i",Ck="c",rk="tt",mk="v",lk="l";G("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",ih:"s",OTHER:"o"});function Dk(a,b,c,d,e){a=kf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Ek(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.u=1;this.o=this.l=null;this.F=0;this.D=!1;this.j=new Map;this.A=!1;this.G=null;this.s=!1;this.i=new rf(function(){return Fk(c)})}r=Ek.prototype;r.destroy=function(){return this.i.destroy()};function Fk(a){var b,c,d,e;return D(function(f){if(1==f.g){b=[];c=t(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,Gk(e),b.push(Hk(e));return u(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.h=null;B(f)})}
353
+ r.configure=function(a){this.h=a;this.G=new Pe({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};r.start=function(){var a=this;return D(function(b){if(1==b.g)return u(b,Ik(a),2);sf(a.i);a.A=!0;B(b)})};
354
+ function Jk(a,b){var c,d,e,f,g,h,k;D(function(l){switch(l.g){case 1:return c=lc,a.F++,d=a.F,xa(l,2),u(l,pj(a.g.R,c.Y),4);case 4:za(l,3);break;case 2:if(e=Aa(l),a.g)a.g.onError(e);case 3:f=bd(b.mimeType,b.codecs),Yi(a.g.R,f,a.m.sequenceMode,b.external),g=a.g.R.m,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.F==d&&(k=Kk(b),a.j.set(c.Y,k),Lk(a,k,0)),B(l)}})}function Mk(a){var b=a.j.get(kc);b&&(Gk(b),Hk(b).catch(function(){}),a.j.delete(kc));a.o=null}
355
+ function Nk(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.vb&&(Ok(a,b,!1,0,!1),c.vb=d);else if(d=c.vb)c.vb=null,Ok(a,d,!0,0,!1)}}function Pk(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.A&&(b.video&&Ok(a,b.video,c,d,e,f),b.audio&&Ok(a,b.audio,c,d,e,f))}function Qk(a,b){D(function(c){if(1==c.g)return a.o=b,a.A?b.segmentIndex?c.B(2):u(c,b.createSegmentIndex(),2):c.return();Ok(a,b,!0,0,!1);B(c)})}
356
+ function Ok(a,b,c,d,e,f){var g=a.j.get(b.type);g||b.type!=kc?g&&(g.vb&&(b.trickModeVideo?(g.vb=b,b=b.trickModeVideo):g.vb=null),g.stream!=b||e)&&(b.type==kc&&Yi(a.g.R,bd(b.mimeType,b.codecs),a.m.sequenceMode,b.external),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.X=null,g.ze=!!f,c&&(g.dc?g.nd=!0:g.ta?(g.fb=!0,g.Qc=d,g.nd=!0):(Gk(g),Rk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Sk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Jk(a,b)}
357
+ function Sk(a,b){var c,d;return D(function(e){if(1==e.g){if(!b.xa)return e.return();c=b.stream;d=b.xa;return c.segmentIndex?e.B(2):u(e,c.createSegmentIndex(),2)}if(b.xa!=d||b.stream!=c)return e.return();var f=a.g.Vc();var g=cj(a.g.R,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.ma?k.ma-k.Ea:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.ma?k.ma-k.Ea:null)||0),k=a.g.getBandwidthEstimate(),
358
+ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.xa.h.g>h?!0:!1):f=!1;f&&b.xa.abort();B(e)})}
359
+ r.zc=function(){if(this.g)for(var a=this.g.Vc(),b=t(this.j.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.j.get(d);var e=null;c.X&&(e=c.X.current());if(!e||e.startTime>a||e.endTime<a)c.X=null;e=this.g.R;d==kc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=bj(e,d),e=Di(e,a));if(!e){(null!=cj(this.g.R,d)||c.ta)&&Tk(this,c);c.xa&&(c.xa.abort(),c.xa=null);if(d===kc&&(d=this.g.R,d.s))for(d=d.s.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,ei(d),d=t(d.j.values()),e=d.next();!e.done;e=
360
+ d.next())$h(e.value);c.zc=!0}}};function Tk(a,b){b.dc||b.fb||(b.ta?(b.fb=!0,b.Qc=0):null==aj(a.g.R,b.type)?null==b.Na&&Lk(a,b,0):(Gk(b),Rk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
361
+ function Ik(a){var b,c,d,e,f,g,h,k,l,m;return D(function(n){if(1==n.g){b=lc;if(!a.l)throw new K(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.ib,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.qa,a.l.video),d.add(a.l.video));a.o&&(c.set(b.Y,a.o),d.add(a.o));e=a.g.R;f=a.h.forceTransmux;return u(n,e.init(c,f,a.m.sequenceMode),2)}sf(a.i);a.updateDuration();g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||(m=Kk(l),a.j.set(k,m),Lk(a,m,0));B(n)})}
362
+ function Kk(a){return{stream:a,type:a.type,X:null,ra:null,bd:null,Pd:null,Od:null,Nd:null,vb:null,endOfStream:!1,ta:!1,Na:null,fb:!1,Qc:0,nd:!1,dc:!1,zc:!0,ee:!1,sc:!1,xa:null}}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.R.Da(a):this.g.R.Da(Math.pow(2,32))};
363
+ function Uk(a,b){var c,d,e,f,g;return D(function(h){switch(h.g){case 1:sf(a.i);if(b.ta||null==b.Na||b.dc)return h.return();b.Na=null;if(!b.fb){h.B(2);break}return u(h,Rk(a,b,b.nd,b.Qc),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.ta||b.Na||Lk(a,b,0),h.return();case 4:xa(h,6);d=Vk(a,b);null!=d&&(Lk(a,b,d),b.sc=!1);za(h,7);break;case 6:return e=
364
+ Aa(h),u(h,Wk(a,e),8);case 8:return h.return();case 7:f=Array.from(a.j.values());if(!a.A||!f.every(function(k){return k.endOfStream})){h.B(0);break}return u(h,a.g.R.endOfStream(),10);case 10:sf(a.i),g=a.g.R.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Da(g),B(h)}})}
365
+ function Vk(a,b){if(Xk(b))return nj(a.g.R,b.stream.originalId||""),null;b.type==kc&&oj(a.g.R);var c=a.g.Vc(),d=b.ra?b.ra.endTime:c,e=dj(a.g.R,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.u,g=a.m.presentationTimeline.getDuration()-d,h=cj(a.g.R,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.j.get(kc))&&Xk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=Yk(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;
366
+ f=Infinity;g=Array.from(a.j.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Xk(h)||h.X&&!h.X.current()||(f=Math.min(f,h.ra?h.ra.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;Zk(a,b,c,e).catch(function(){});return null}
367
+ function Yk(a,b,c,d){if(b.X)return b.X.current();if(b.ra||d)return b.X=b.stream.segmentIndex.mb(b.ra?b.ra.endTime:d),b.X&&b.X.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.X=b.stream.segmentIndex.mb(d),e=b.X&&b.X.next().value);e||(b.X=b.stream.segmentIndex.mb(c),e=b.X&&b.X.next().value);return e}
368
+ function Zk(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A;return D(function(z){switch(z.g){case 1:e=lc;f=b.stream;g=b.X;b.ta=!0;xa(z,2);if(2==d.Jb())throw new K(1,1,1011);return u(z,$k(a,b,d),4);case 4:sf(a.i);if(a.s)return z.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h&&!d.m)return n=new Uint8Array(0),q=p=!1,w=function(E){var F,H,I,L;return D(function(J){if(1==J.g){if(p)return J.return();q=!0;sf(a.i);if(a.s)return J.return();xa(J,
369
+ 2);n=al(n,E);F=!1;H=0;(new Gf).box("mdat",function(M){H=M.size+M.start;F=!0}).parse(n,!1,!0);if(!F)return J.B(4);I=n.subarray(0,H);n=n.subarray(H);return u(J,bl(a,b,c,f,d,I),4)}if(2!=J.g)return za(J,0);v=L=Aa(J);B(J)})},u(z,cl(a,b,d,w),9);l=cl(a,b,d);return u(z,l,7);case 7:return m=z.h,sf(a.i),a.s?z.return():b.fb?(b.ta=!1,Lk(a,b,0),z.return()):u(z,bl(a,b,c,f,d,m),6);case 9:x=z.h;if(v)throw v;if(q){z.B(6);break}p=!0;sf(a.i);return a.s?z.return():b.fb?(b.ta=!1,Lk(a,b,0),z.return()):u(z,bl(a,b,c,f,d,
370
+ x),6);case 6:sf(a.i);if(a.s)return z.return();b.ra=d;g.next();b.ta=!1;b.ee=!1;y=a.g.R.Pa();C=y[b.type];gb(JSON.stringify(C));b.fb||a.g.Zd(d.startTime,d.endTime,b.type);Lk(a,b,0);za(z,0);break;case 2:A=Aa(z);sf(a.i,A);if(a.s)return z.return();b.ta=!1;if(7001==A.code)b.ta=!1,Gk(b),Lk(a,b,0),z.B(0);else if(b.type==e.Y&&a.h.ignoreTextStreamFailures)a.j.delete(e.Y),z.B(0);else if(3017==A.code)dl(a,b,A),z.B(0);else return b.sc=!0,A.severity=2,u(z,Wk(a,A),0)}})}
371
+ function el(a,b,c){var d,e,f,g;return D(function(h){if(1==h.g)return d=b,d.cryptoKey?h.B(2):u(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=Mb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c.g,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function al(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
372
+ function dl(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.ee})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.sc=!0;a.s=!0;a.g.onError(c);return}b.ee=!0}Lk(a,b,4)}
373
+ function $k(a,b,c){var d,e,f,g,h,k,l,m;return D(function(n){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Pd||e!=b.Od||f!=b.Nd)h=function(){var p;return D(function(q){if(1==q.g)return xa(q,2),b.Od=e,b.Nd=f,b.Pd=g,u(q,qj(a.g.R,b.type,g,e,f,a.m.sequenceMode),4);if(2!=q.g)return za(q,0);p=Aa(q);b.Od=null;b.Nd=null;b.Pd=null;throw p;})},d.push(h());!yi(c.h,b.bd)&&(b.bd=c.h)&&(k=cl(a,b,c.h),l=function(){var p,q,v,w;return D(function(x){switch(x.g){case 1:return xa(x,
374
+ 2),u(x,k,4);case 4:return p=x.h,sf(a.i),q=new Gf,q.box("moov",Lf).box("trak",Lf).box("mdia",Lf).M("mdhd",function(y){y=ni(y.reader||0,y.version||0);c.h.timescale=y.timescale}).parse(p),v=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(x,a.g.Be(b.type,p),5);case 5:return u(x,ej(a.g.R,b.type,p,null,v),6);case 6:za(x,0);break;case 2:throw w=Aa(x),b.bd=null,w;}})},a.g.mg(c.startTime,c.h),d.push(l()));a.m.sequenceMode&&(m=b.ra?b.ra.l:null,c.l!=m&&d.push(rj(a.g.R,b.type,c.startTime)));return u(n,
375
+ Promise.all(d),0)})}
376
+ function bl(a,b,c,d,e,f){var g,h,k,l,m,n;return D(function(p){switch(p.g){case 1:g=d.closedCaptions&&0<d.closedCaptions.size;k=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;l=a.h.parsePrftBox&&!a.D;if(k||l)h=new Gf;k&&h.M("emsg",function(q){var v=d.emsgSchemeIdUris;if(0===q.version){var w=q.reader.xc();var x=q.reader.xc();var y=q.reader.K();var C=q.reader.K();var A=q.reader.K();var z=q.reader.K();var E=e.startTime+C/y}else y=q.reader.K(),E=q.reader.cb()/y+e.timestampOffset,
377
+ C=E-e.startTime,A=q.reader.K(),z=q.reader.K(),w=q.reader.xc(),x=q.reader.xc();q=q.reader.bb(q.reader.S.byteLength-q.reader.aa());if(v&&v.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.ng():(v=(new Map).set("detail",{startTime:E,endTime:E+A/y,schemeIdUri:w,value:x,timescale:y,presentationTimeDelta:C,eventDuration:A,id:z,messageData:q}),v=new N("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=w&&"https://developer.apple.com/streaming/emsg-id3"!=
378
+ w||(w=Ki(q),w.length&&e&&a.g.og([{cueTime:e.startTime,data:q,frames:w,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});l&&h.M("prft",function(q){a:{if(!a.D&&e.h.timescale){q.reader.K();var v=q.reader.K(),w=q.reader.K();v=1E3*v+w/Math.pow(2,32)*1E3;if(0===q.version)var x=q.reader.K();else try{x=q.reader.cb()}catch(y){a.D=!0;x=void 0;break a}q=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+v)).getTime();x=(new Map).set("detail",{wallClockTime:q,programStartDate:new Date(q-x/e.h.timescale*
379
+ 1E3)});x=new N("prft",x);a.g.onEvent(x);a.D=!0}x=void 0}return x});(k||l)&&h.parse(f);return u(p,fl(a,b,c),2);case 2:return sf(a.i),m=b.zc,b.zc=!1,n=b.ze,b.ze=!1,u(p,a.g.Be(b.type,f),3);case 3:return u(p,ej(a.g.R,b.type,f,e,g,m,n),4);case 4:sf(a.i),B(p)}})}
380
+ function fl(a,b,c){var d,e,f,g;return D(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=aj(a.g.R,b.type);if(null==e)return h.return();f=c-e;g=f-d;return 1>=g?h.return():u(h,a.g.R.remove(b.type,e,e+g),2)}sf(a.i);B(h)})}function Xk(a){return a&&a.type==kc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
381
+ function cl(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v;return D(function(w){switch(w.g){case 1:return e=qf,f=Dk(c.ua(),c.Ea,c.ma,a.h.retryParameters,d),g=b.stream,h=c instanceof xi,k=c,l=h?0:k.endTime-k.startTime,a.g.modifySegmentRequest(f,{type:g.type,init:h,duration:l,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),m=a.g.rb.request(e,f),b.xa=m,u(w,m.promise,2);case 2:n=w.h;b.xa=null;p=n.data;if(!c.m){w.B(3);break}q=b.X;v=h?null:k.startTime;q||null==v||(q=b.stream.segmentIndex.mb(v));return u(w,
382
+ el(p,c.m,q),4);case 4:p=w.h;case 3:return w.return(p)}})}function Rk(a,b,c,d){var e,f;return D(function(g){if(1==g.g)return b.fb=!1,b.nd=!1,b.Qc=0,b.dc=!0,b.ra=null,b.bd=null,b.X=null,d?(e=a.g.Vc(),f=a.g.R.getDuration(),u(g,a.g.R.remove(b.type,e+d,f),3)):u(g,pj(a.g.R,b.type),4);if(3!=g.g)return sf(a.i),c?u(g,a.g.R.flush(b.type),3):g.B(3);sf(a.i);b.dc=!1;b.endOfStream=!1;b.ta||b.Na||Lk(a,b,0);B(g)})}
383
+ function Lk(a,b,c){var d=b.type;if(d!=kc||a.j.has(d))b.Na=(new oc(function(){var e;return D(function(f){if(1==f.g)return xa(f,2),u(f,Uk(a,b),4);if(2!=f.g)return za(f,0);e=Aa(f);if(a.g)a.g.onError(e);B(f)})})).O(c)}function Gk(a){null!=a.Na&&(a.Na.stop(),a.Na=null)}function Hk(a){return D(function(b){return a.xa?u(b,a.xa.abort(),0):b.B(0)})}function Wk(a,b){return D(function(c){if(1==c.g)return u(c,Re(a.G),2);sf(a.i);a.g.onError(b);b.handled||a.h.failureCallback(b);B(c)})};function gl(a,b){var c=hl(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return il(d)});this.s=new rf(function(){return jl(d)})}gl.prototype.destroy=function(){return this.s.destroy()};function jl(a){var b,c,d;return D(function(e){if(1==e.g)return a.h&&a.h.abort(),kl(a),u(e,a.u,2);a.g&&a.g.La.sb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.La.sb();a.g=null;a.m=[];a.j=null;B(e)})}
384
+ function ll(a,b){var c={Ob:function(){},fd:function(){},sb:function(){},onError:function(){},hd:function(){},zh:function(){}};a.m.push({create:b,La:c});a.h&&a.h.abort();kl(a);return c}
385
+ function il(a){return D(function(b){if(a.s.g)b=b.B(0);else{if(0==a.m.length||a.g&&!a.g.nb)var c=!1;else{a.g&&(a.g.La.sb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.La.Ob(),a.g={node:d.node,payload:d.payload,nb:d.nb,La:c.La}):c.La.hd();c=!0}c?c=Promise.resolve():a.g?c=ml(a):(a.j.lg(a.i),a.o=new mc,c=a.o);b=u(b,c,1)}return b})}
386
+ function ml(a){var b,c;return D(function(d){switch(d.g){case 1:return a.i=a.j.Rf(a.i,a.l,a.g.node,a.g.payload),xa(d,2),a.h=a.j.Cf(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.La.fd(),a.g=null);za(d,0);break;case 2:b=Aa(d);if(7001==b.code)a.g.La.sb();else a.g.La.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,B(d)}})}function kl(a){a.o&&(a.o.resolve(),a.o=null)};function nl(a){var b=[],c=700<=a.fontWeight,d="italic"==a.fontStyle,e=a.textDecoration.includes("underline");c&&b.push("b");d&&b.push("i");e&&b.push("u");c=b.reduce(function(f,g){return f+"<"+g+">"},"");b=b.reduceRight(function(f,g){return f+"</"+g+">"},"");return a.lineBreak?"\n":a.nestedCues.length?a.nestedCues.map(nl).join(""):c+a.payload+b}
387
387
  function ol(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.isContainer)ol(c.nestedCues,b);else{var d=c.clone();d.nestedCues=[];d.payload=nl(c);b.push(d)}return b};function pl(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,d.mode="disabled",d.label==b&&(this.g=d);this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}r=pl.prototype;r.remove=function(a,b){if(!this.g)return!1;ql(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
388
- r.append=function(a){var b=ol(a,[]),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={zb:d.zb},e=b.next())d.zb=e.value,a.some(function(f){return function(g){return g.startTime==f.zb.startTime&&g.endTime==f.zb.endTime&&g.text==f.zb.payload?!0:!1}}(d))||(e=rl(d.zb))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
388
+ r.append=function(a){var b=ol(a,[]),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={Ab:d.Ab},e=b.next())d.Ab=e.value,a.some(function(f){return function(g){return g.startTime==f.Ab.startTime&&g.endTime==f.Ab.endTime&&g.text==f.Ab.payload?!0:!1}}(d))||(e=rl(d.Ab))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
389
389
  c.indexOf(g)});a=t(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};r.destroy=function(){this.g&&(ql(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
390
390
  function rl(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}
391
- function ql(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}G("shaka.text.SimpleTextDisplayer",pl);pl.prototype.setTextVisibility=pl.prototype.setTextVisibility;pl.prototype.isTextVisible=pl.prototype.isTextVisible;pl.prototype.destroy=pl.prototype.destroy;pl.prototype.append=pl.prototype.append;pl.prototype.remove=pl.prototype.remove;function sl(){}function tl(a){for(;a.firstChild;)a.removeChild(a.firstChild)}G("shaka.util.Dom",sl);sl.removeAllChildren=tl;function ul(a,b){var c=this;this.m=!1;this.i=[];this.A=a;this.s=b;this.j=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);this.D=(new M(function(){vl(c)})).Fa(.25);this.h=new Map;this.l=new sf;this.l.C(document,"fullscreenchange",function(){vl(c,!0)});this.l.C(this.A,
392
- "resize",function(){var d=c.A,e=d.videoWidth;d=d.videoHeight;e&&d?c.j=e/d:c.j=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){vl(c,!0)}),this.o.observe(this.g));this.u=new Map}r=ul.prototype;r.append=function(a){var b=[].concat(ka(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={Hc:c.Hc},d=a.next())c.Hc=d.value,b.some(function(e){return function(f){return Ab(f,e.Hc)}}(c))||this.i.push(c.Hc);vl(this)};
393
- r.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.i=[];this.D&&this.D.stop();this.h.clear();this.l&&(this.l.release(),this.l=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};r.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});vl(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.m};
391
+ function ql(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}G("shaka.text.SimpleTextDisplayer",pl);pl.prototype.setTextVisibility=pl.prototype.setTextVisibility;pl.prototype.isTextVisible=pl.prototype.isTextVisible;pl.prototype.destroy=pl.prototype.destroy;pl.prototype.append=pl.prototype.append;pl.prototype.remove=pl.prototype.remove;function sl(){}function tl(a){for(;a.firstChild;)a.removeChild(a.firstChild)}G("shaka.util.Dom",sl);sl.removeAllChildren=tl;function ul(a,b){var c=this;this.m=!1;this.i=[];this.u=a;this.s=b;this.l=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);this.D=(new pc(function(){c.u.paused||vl(c)})).Fa(.25);this.h=new Map;this.j=new tf;this.j.C(document,"fullscreenchange",function(){vl(c,!0)});this.j.C(this.u,
392
+ "seeking",function(){vl(c,!0)});this.j.C(this.u,"resize",function(){var d=c.u,e=d.videoWidth;d=d.videoHeight;e&&d?c.l=e/d:c.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){vl(c,!0)}),this.o.observe(this.g));this.A=new Map}r=ul.prototype;r.append=function(a){var b=[].concat(ka(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={Gc:c.Gc},d=a.next())c.Gc=d.value,b.some(function(e){return function(f){return zb(f,e.Gc)}}(c))||this.i.push(c.Gc);vl(this)};
393
+ r.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.i=[];this.D&&this.D.stop();this.h.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};r.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});vl(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.m};
394
394
  r.setTextVisibility=function(a){this.m=a};function wl(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
395
- function xl(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.kf:null;l&&(g.push(l.Hd),l.yc&&g.push(l.yc),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?wl(a,n)||(f=!0):(yl(a,k,e),l=a.h.get(k),n=l.kf,f=!0));0<k.nestedCues.length&&n&&xl(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,q){return p.startTime!=
396
- q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.yc?(c.appendChild(d.yc),d.yc.appendChild(d.Hd)):c.appendChild(d.Hd)}}function vl(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.u.values());for(var d=b.next();!d.done;d=b.next())tl(d.value);tl(a.g);a.h.clear();a.u.clear()}if(a.m){b=new Map;d=t(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));xl(a,a.i,a.g,c,[])}}}
397
- function yl(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&zl(a,f,b,c,d);c=null;if(b.region&&b.region.id){c=b.region;e=a.j===4/3?2.5:1.9;var g=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==Ib?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Ib?"%":"px");if(a.u.has(g))c=a.u.get(g);else{var h=document.createElement("span"),k=c.heightUnits==Ib?"%":"px",l=c.widthUnits==Ib?"%":"px",m=c.viewportAnchorUnits==
398
- Ib?"%":"px";h.id="shaka-text-region---"+g;h.classList.add("shaka-text-region");h.style.position="absolute";2===c.heightUnits&&2===c.widthUnits?(h.style.height=5.33*c.height+"%",h.style.width=c.width*e+"%"):(h.style.height=c.height+k,h.style.width=c.width+l);2===c.viewportAnchorUnits?(k=c.viewportAnchorY/75*100,l=c.viewportAnchorX/(a.j===4/3?160:210)*100,k-=c.regionAnchorY*c.height*5.33/100,l-=c.regionAnchorX*c.width*e/100,h.style.top=k+"%",h.style.left=l+"%"):(h.style.top=c.viewportAnchorY-c.regionAnchorY*
399
- c.height/100+m,h.style.left=c.viewportAnchorX-c.regionAnchorX*c.width/100+m);h.style.display="flex";h.style.flexDirection="column";h.style.alignItems="center";h.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.u.set(g,h);c=h}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{Hd:f,kf:e,yc:c})}
400
- function Al(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==sb?c:"left"===a||"start"===a&&b===qb||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===qb?"line-right":"center"}
395
+ function xl(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.kf:null;l&&(g.push(l.Hd),l.ub&&g.push(l.ub),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?wl(a,n)||(f=!0):(yl(a,k,e),l=a.h.get(k),n=l.kf,f=!0));0<k.nestedCues.length&&n&&xl(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,q){return p.startTime!=
396
+ q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.ub?(d.ub.contains(c)&&d.ub.removeChild(c),c.appendChild(d.ub),d.ub.appendChild(d.Hd)):c.appendChild(d.Hd)}}
397
+ function vl(a,b){if(a.g){var c=a.u.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.A.values());for(var d=b.next();!d.done;d=b.next())tl(d.value);tl(a.g);a.h.clear();a.A.clear()}if(a.m){b=new Map;d=t(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));xl(a,a.i,a.g,c,[])}}}
398
+ function yl(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&zl(a,f,b,c,d);c=null;if(b.region&&b.region.id){c=b.region;e=a.l===4/3?2.5:1.9;var g=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==Hb?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Hb?"%":"px");if(a.A.has(g))c=a.A.get(g);else{var h=document.createElement("span"),k=c.heightUnits==Hb?"%":"px",l=c.widthUnits==Hb?"%":"px",m=c.viewportAnchorUnits==
399
+ Hb?"%":"px";h.id="shaka-text-region---"+g;h.classList.add("shaka-text-region");h.style.position="absolute";2===c.heightUnits&&2===c.widthUnits?(h.style.height=5.33*c.height+"%",h.style.width=c.width*e+"%"):(h.style.height=c.height+k,h.style.width=c.width+l);2===c.viewportAnchorUnits?(k=c.viewportAnchorY/75*100,l=c.viewportAnchorX/(a.l===4/3?160:210)*100,k-=c.regionAnchorY*c.height*5.33/100,l-=c.regionAnchorX*c.width*e/100,h.style.top=k+"%",h.style.left=l+"%"):(h.style.top=c.viewportAnchorY-c.regionAnchorY*
400
+ c.height/100+m,h.style.left=c.viewportAnchorX-c.regionAnchorX*c.width/100+m);h.style.display="flex";h.style.flexDirection="column";h.style.alignItems="center";h.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.A.set(g,h);c=h}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{Hd:f,kf:e,ub:c})}
401
+ function Al(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==rb?c:"left"===a||"start"===a&&b===pb||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===pb?"line-right":"center"}
401
402
  function zl(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=Bl(c.linePadding,c,a.s);f.paddingRight=Bl(c.linePadding,c,a.s);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
402
403
  "no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=Cl(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=Cl(d,function(m){return m.fontFamily}))&&(l.style.fontFamily=b);k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display=
403
- "flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Bl(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==vb&&(g=1,h=16,a.j&&1>a.j&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==ub?(f.width="100%",c.lineAlign==
404
- wb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==wb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==wb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==ub?f.paddingLeft=c.position:f.paddingTop=c.position);a=Al(c);"line-left"==a?f.cssFloat="left":"line-right"==a&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");
405
- f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==ub?f.width=c.size+"%":f.height=c.size+"%")}
404
+ "flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Bl(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==ub&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==tb?(f.width="100%",c.lineAlign==
405
+ vb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==vb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==vb?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==tb?f.paddingLeft=c.position:f.paddingTop=c.position);a=Al(c);"line-left"==a?f.cssFloat="left":"line-right"==a&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");
406
+ f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==tb?f.width=c.size+"%":f.height=c.size+"%")}
406
407
  function Bl(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 Cl(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}G("shaka.text.UITextDisplayer",ul);ul.prototype.setTextVisibility=ul.prototype.setTextVisibility;
407
408
  ul.prototype.isTextVisible=ul.prototype.isTextVisible;ul.prototype.remove=ul.prototype.remove;ul.prototype.destroy=ul.prototype.destroy;ul.prototype.append=ul.prototype.append;function Dl(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=ol(a,[]);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
408
- break;case "right":g.push("align:right");break;case tb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}G("shaka.text.WebVttGenerator",function(){});function El(){}
409
- function Fl(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]=af(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=af(l)),k=Fl(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?(bb("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&cb("Unexpected number of arguments for "+k),a[h]=b[h]):(bb("Invalid config, unrecognized key "+
410
- k),g=!1)}return g}function Gl(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 Hl(a,b){return a&&b}G("shaka.util.ConfigUtils",El);El.convertToConfigObject=Gl;El.mergeConfigObjects=Fl;function Il(){}function Jl(a){a=Ic(a);return(new Tb(a)).Ja}function Kl(a,b,c){function d(h){Rb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Nb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new L(2,6,6015);var e;"string"==typeof b?e=Kc(b,!0):e=b;a=Ic(a);a=Kc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}G("shaka.util.FairPlayUtils",Il);
411
- Il.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Fc(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Ob(Oc(c)))}};Il.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};Il.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
412
- Il.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Nb(b.body),a=Nc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Jc("spc="+a))};Il.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ic(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Qb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Kl(a,d,b)};
409
+ break;case "right":g.push("align:right");break;case sb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}G("shaka.text.WebVttGenerator",function(){});function El(){}
410
+ function Fl(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]=bf(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=bf(l)),k=Fl(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?(ab("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&bb("Unexpected number of arguments for "+k),a[h]=b[h]):(ab("Invalid config, unrecognized key "+
411
+ k),g=!1)}return g}function Gl(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 Hl(a,b){return a&&b}G("shaka.util.ConfigUtils",El);El.convertToConfigObject=Gl;El.mergeConfigObjects=Fl;function Il(){}function Jl(a){a=Ic(a);return(new Sb(a)).Ja}function Kl(a,b,c){function d(h){Qb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Mb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new K(2,6,6015);var e;"string"==typeof b?e=Kc(b,!0):e=b;a=Ic(a);a=Kc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}G("shaka.util.FairPlayUtils",Il);
412
+ Il.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Fc(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Nb(Oc(c)))}};Il.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};Il.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
413
+ Il.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Mb(b.body),a=Nc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Jc("spc="+a))};Il.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ic(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Pb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Kl(a,d,b)};
413
414
  Il.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ic(a).split(";").pop();return Kl(a,c,b)};Il.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ic(a).split("skd://").pop();return Kl(a,c,b)};Il.initDataTransform=Kl;Il.defaultGetContentId=Jl;
414
415
  Il.isFairPlaySupported=function(){var a;return D(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},xa(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);Aa(b);return b.return(!1)})};function Ll(){}
415
- function Ml(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Pe(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){window.shakaMediaKeysPolyfill&&"skd"==h&&(h=k.serverCertificate,k=Jl(g),g=Kl(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:uc()},c={retryParameters:Pe(),availabilityWindowOverride:NaN,disableAudio:!1,
416
+ function Ml(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Qe(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){window.shakaMediaKeysPolyfill&&"skd"==h&&(h=k.serverCertificate,k=Jl(g),g=Kl(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:uc()},c={retryParameters:Qe(),availabilityWindowOverride:NaN,disableAudio:!1,
416
417
  disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,dash:{clockSyncUri:"",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",
417
418
  "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return Hl([g],g)},sequenceMode:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,
418
- mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3}},d={retryParameters:Pe(),failureCallback:function(g){return Hl([g])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmux:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,
419
+ mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3}},d={retryParameters:Qe(),failureCallback:function(g){return Hl([g])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmux:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,
419
420
  autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1};if(vc("Web0S")||wc()||yc()||vc("Hisense")||vc("VIDAA"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return D(function(h){return h.return(g)})},downloadSizeCallback:function(g){var h;return D(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+
420
- g<.95*h.quota)})},progressCallback:function(g,h){return Hl([g,h])},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,mediaSource:{sourceBufferExtraFeatures:""},offline:e,abrFactory:function(){return new se},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,
421
+ g<.95*h.quota)})},progressCallback:function(g,h){return Hl([g,h])},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,mediaSource:{sourceBufferExtraFeatures:""},offline:e,abrFactory:function(){return new te},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,
421
422
  minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1},autoShowText:3,preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,
422
423
  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},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1}};e.trackSelectionCallback=function(g){return D(function(h){return h.return(Nl(g,f.preferredAudioLanguage))})};return f}
423
424
  function Ol(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Fl(a,b,c||Ml(),d,"")}
424
- function Nl(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=Bd(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return ud(g.language)==e}));0==d.length&&(d=c.filter(function(g){return g.primary}));0==d.length&&(c.map(function(g){return g.language}),d=c);var f=d.filter(function(g){return g.height&&480>=g.height});f.length&&(f.sort(function(g,h){return h.height-g.height}),d=f.filter(function(g){return g.height==f[0].height}));b=[];d.length&&(c=Math.floor(d.length/
425
- 2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=lc&&"image"!=d.type||b.push(d);return b}G("shaka.util.PlayerConfiguration",Ll);Ll.mergeConfigObjects=Ol;Ll.createDefault=Ml;function Pl(){this.g=null;this.h=[]}function Ql(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 Rl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}
426
- function Sl(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 Tl(){this.i=this.h=null;this.g=[]}function Ul(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 Vl(){this.u=this.A=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.N=this.P=this.H=this.J=this.L=this.l=this.o=NaN;this.g=new Pl;this.h=new Tl};function U(a,b){$e.call(this);var c=this;this.l=Wl;this.Xc=this.g=null;this.ea=!1;this.ad=new sf;this.cc=new sf;this.u=new sf;this.Ha=new sf;this.bc=this.i=this.cd=this.D=this.j=this.la=this.L=this.jf=this.V=this.za=this.N=this.Zc=this.J=this.yb=this.A=this.H=this.m=this.F=null;this.jc=!1;this.Ud=this.s=null;this.ce=1E9;this.h=Xl(this);this.Cb={width:Infinity,height:Infinity};this.o=null;this.Ab=new Ge(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Bb=
427
- this.h.preferredTextLanguage;this.ic=this.h.preferredTextRole;this.hc=this.h.preferForcedSubs;this.fc=[];this.qc=null;b&&b(this);this.F=Yl(this);this.F.ne(this.h.streaming.forceHTTPS);this.G=null;Zl&&(this.G=Zl());this.ad.C(window,"online",function(){c.ge()});this.P={name:"detach"};this.W={name:"attach"};this.ga={name:"unload"};this.he={name:"manifest-parser"};this.be={name:"manifest"};this.Db={name:"media-source"};this.Yd={name:"drm-engine"};this.aa={name:"load"};this.te={name:"src-equals-drm-engine"};
428
- this.Eb={name:"src-equals"};var d=new Map;d.set(this.W,function(e,f){return Ve($l(c,e,f))});d.set(this.P,function(e){e.mediaElement&&(c.cc.Ma(),e.mediaElement=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return Ve(e)});d.set(this.ga,function(e){return Ve(am(c,e))});d.set(this.Db,function(e){e=bm(c,e);return Ve(e)});d.set(this.he,function(e,f){e=cm(c,e,f);return Ve(e)});d.set(this.be,function(e){return dm(c,e)});d.set(this.Yd,function(e){e=em(c,e);return Ve(e)});d.set(this.aa,function(e,f){return Ve(fm(c,
429
- e,f))});d.set(this.te,function(e,f){e=gm(c,e,f);return Ve(e)});d.set(this.Eb,function(e,f){return hm(c,e,f)});this.Ia=new gl(this.P,{Qf:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.W);e==c.W&&(k=g==c.P||f.mediaElement!=h.mediaElement?c.P:g==c.W?c.W:g==c.Db||g==c.aa?c.Db:g==c.Eb?c.te:null);e==c.Db&&(k=g==c.aa&&f.mediaElement==h.mediaElement?c.he:c.ga);e==c.he&&(k=im(c.aa,c.be,c.ga,g,f,h));e==c.be&&(k=im(c.aa,c.Yd,c.ga,g,f,h));e==c.Yd&&(k=im(c.aa,c.aa,c.ga,g,f,h));e==c.te&&(k=g==c.Eb&&f.mediaElement==
430
- h.mediaElement?c.Eb:c.ga);if(e==c.aa||e==c.Eb)k=c.ga;e==c.ga&&(k=h.mediaElement&&f.mediaElement==h.mediaElement?c.W:c.P);return k},Cf:function(e,f,g){c.dispatchEvent(jm("onstatechange",(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return D(function(f){return 1==f.g?u(f,am(c,e),2):f.return(e.mediaElement?c.W:c.P)})},kg:function(e){c.dispatchEvent(jm("onstateidle",(new Map).set("state",e.name)))}});this.gf=new M(function(){Rd(c.i.variants,c.h.restrictions,c.Cb)&&km(c)});
431
- a&&this.ac(a,!0)}ta(U,$e);function lm(a){null!=a.L&&(a.L.release(),a.L=null)}function mm(a,b){if(b.lcevc.enabled){var c=a.Sa();c&&c[0]&&c[0].videoMimeType==nm.ts&&(tc()||navigator.userAgent.match(/Edge\//))&&(b.streaming.forceTransmux||cb("LCEVC Warning: For MPEG-2 TS decoding the config.streaming.forceTransmux must be enabled."));lm(a);null==a.L&&(a.L=new Oi(a.g,a.jf,b.lcevc),a.H&&(a.H.F=a.L))}else lm(a)}function jm(a,b){return new O(a,b)}r=U.prototype;
425
+ function Nl(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=Cd(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return vd(g.language)==e}));0==d.length&&(d=c.filter(function(g){return g.primary}));0==d.length&&(c.map(function(g){return g.language}),d=c);var f=d.filter(function(g){return g.height&&480>=g.height});f.length&&(f.sort(function(g,h){return h.height-g.height}),d=f.filter(function(g){return g.height==f[0].height}));b=[];d.length&&(c=Math.floor(d.length/
426
+ 2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=kc&&"image"!=d.type||b.push(d);return b}G("shaka.util.PlayerConfiguration",Ll);Ll.mergeConfigObjects=Ol;Ll.createDefault=Ml;function Pl(){this.g=null;this.h=[]}function Ql(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 Rl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}
427
+ function Sl(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 Tl(){this.i=this.h=null;this.g=[]}function Ul(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 Vl(){this.u=this.A=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.N=this.P=this.H=this.J=this.L=this.l=this.o=NaN;this.g=new Pl;this.h=new Tl};function S(a,b){af.call(this);var c=this;this.l=Wl;this.Xc=this.g=null;this.da=!1;this.ad=new tf;this.cc=new tf;this.u=new tf;this.Ha=new tf;this.bc=this.i=this.cd=this.D=this.j=this.ka=this.L=this.jf=this.V=this.za=this.N=this.Zc=this.J=this.zb=this.A=this.H=this.m=this.F=null;this.jc=!1;this.Ud=this.s=null;this.be=1E9;this.h=Xl(this);this.Db={width:Infinity,height:Infinity};this.o=null;this.Bb=new He(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Cb=
428
+ this.h.preferredTextLanguage;this.ic=this.h.preferredTextRole;this.hc=this.h.preferForcedSubs;this.fc=[];this.qc=null;b&&b(this);this.F=Yl(this);this.F.ne(this.h.streaming.forceHTTPS);this.G=null;Zl&&(this.G=Zl());this.ad.C(window,"online",function(){c.fe()});this.P={name:"detach"};this.W={name:"attach"};this.fa={name:"unload"};this.ge={name:"manifest-parser"};this.ae={name:"manifest"};this.Eb={name:"media-source"};this.Xd={name:"drm-engine"};this.$={name:"load"};this.se={name:"src-equals-drm-engine"};
429
+ this.Fb={name:"src-equals"};var d=new Map;d.set(this.W,function(e,f){return We($l(c,e,f))});d.set(this.P,function(e){e.mediaElement&&(c.cc.Ma(),e.mediaElement=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return We(e)});d.set(this.fa,function(e){return We(am(c,e))});d.set(this.Eb,function(e){e=bm(c,e);return We(e)});d.set(this.ge,function(e,f){e=cm(c,e,f);return We(e)});d.set(this.ae,function(e){return dm(c,e)});d.set(this.Xd,function(e){e=em(c,e);return We(e)});d.set(this.$,function(e,f){return We(fm(c,
430
+ e,f))});d.set(this.se,function(e,f){e=gm(c,e,f);return We(e)});d.set(this.Fb,function(e,f){return hm(c,e,f)});this.Ia=new gl(this.P,{Rf:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.W);e==c.W&&(k=g==c.P||f.mediaElement!=h.mediaElement?c.P:g==c.W?c.W:g==c.Eb||g==c.$?c.Eb:g==c.Fb?c.se:null);e==c.Eb&&(k=g==c.$&&f.mediaElement==h.mediaElement?c.ge:c.fa);e==c.ge&&(k=im(c.$,c.ae,c.fa,g,f,h));e==c.ae&&(k=im(c.$,c.Xd,c.fa,g,f,h));e==c.Xd&&(k=im(c.$,c.$,c.fa,g,f,h));e==c.se&&(k=g==c.Fb&&f.mediaElement==
431
+ h.mediaElement?c.Fb:c.fa);if(e==c.$||e==c.Fb)k=c.fa;e==c.fa&&(k=h.mediaElement&&f.mediaElement==h.mediaElement?c.W:c.P);return k},Cf:function(e,f,g){c.dispatchEvent(jm("onstatechange",(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return D(function(f){return 1==f.g?u(f,am(c,e),2):f.return(e.mediaElement?c.W:c.P)})},lg:function(e){c.dispatchEvent(jm("onstateidle",(new Map).set("state",e.name)))}});this.gf=new pc(function(){Sd(c.i.variants,c.h.restrictions,c.Db)&&km(c)});
432
+ a&&this.ac(a,!0)}ta(S,af);function lm(a){null!=a.L&&(a.L.release(),a.L=null)}function mm(a,b){if(b.lcevc.enabled){var c=a.Ra();c&&c[0]&&c[0].videoMimeType==nm.ts&&(tc()||navigator.userAgent.match(/Edge\//))&&(b.streaming.forceTransmux||bb("LCEVC Warning: For MPEG-2 TS decoding the config.streaming.forceTransmux must be enabled."));lm(a);null==a.L&&(a.L=new Pi(a.g,a.jf,b.lcevc),a.H&&(a.H.F=a.L))}else lm(a)}function jm(a,b){return new N(a,b)}r=S.prototype;
432
433
  r.destroy=function(){var a=this,b;return D(function(c){switch(c.g){case 1:if(a.l==om)return c.return();lm(a);a.l=om;b=ll(a.Ia,function(){return{node:a.P,payload:hl(),nb:!1}});return u(c,new Promise(function(d){b.Ob=function(){};b.fd=function(){d()};b.sb=function(){d()};b.onError=function(){d()};b.hd=function(){d()}}),2);case 2:return u(c,a.Ia.destroy(),3);case 3:a.ad&&(a.ad.release(),a.ad=null);a.cc&&(a.cc.release(),a.cc=null);a.u&&(a.u.release(),a.u=null);a.Ha&&(a.Ha.release(),a.Ha=null);a.Ud=null;
433
- a.h=null;a.o=null;a.Xc=null;a.V=null;if(!a.F){c.B(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:a.s&&(a.s.release(),a.s=null),$e.prototype.release.call(a),B(c)}})};r.ac=function(a,b){b=void 0===b?!0:b;if(this.l==om)return Promise.reject(pm());var c=hl();c.mediaElement=a;qc()||(b=!1);var d=b?this.Db:this.W;a=ll(this.Ia,function(){return{node:d,payload:c,nb:!1}});a.Ob=function(){};return qm(a)};r.rf=function(a){this.jf=a};
434
- r.detach=function(){var a=this;if(this.l==om)return Promise.reject(pm());var b=ll(this.Ia,function(){return{node:a.P,payload:hl(),nb:!1}});b.Ob=function(){};return qm(b)};r.we=function(a){var b=this;a=void 0===a?!0:a;if(this.l==om)return Promise.reject(pm());this.jc=!1;qc()||(a=!1);lm(this);var c=hl(),d=ll(this.Ia,function(e){var f=e.mediaElement&&a?b.Db:e.mediaElement?b.W:b.P;c.mediaElement=e.mediaElement;return{node:f,payload:c,nb:!1}});d.Ob=function(){};return qm(d)};r.Kg=function(a){this.qc=a};
435
- r.load=function(a,b,c){var d=this;this.qc=null;this.jc=!1;if(this.l==om)return Promise.reject(pm());this.dispatchEvent(jm("loading"));var e=hl();e.uri=a;e.kd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=rm(this,e)?this.Eb:this.aa,g=ll(this.Ia,function(h){if(null==h.mediaElement)return null;e.mediaElement=h.mediaElement;return{node:f,payload:e,nb:!0}});this.o=new Vl;this.V=sm(this);g.Ob=function(){};return new Promise(function(h,k){g.hd=function(){return k(new L(2,7,7002))};g.fd=
436
- function(){h();d.dispatchEvent(jm("loaded"))};g.sb=function(){return k(pm())};g.onError=function(l){return k(l)}})};function rm(a,b){if(!qc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=$g(d),c=nm[c]);if(c){if(""==(b.mediaElement||sc()).canPlayType(c))return!1;if(!qc()||!(c in Zg||$g(d)in ah)||("application/x-mpegurl"===c||"application/vnd.apple.mpegurl"===c)&&a.h.streaming.preferNativeHls)return!0;if(zc())return a.h.streaming.useNativeHlsOnSafari}return!1}
434
+ a.h=null;a.o=null;a.Xc=null;a.V=null;if(!a.F){c.B(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:a.s&&(a.s.release(),a.s=null),af.prototype.release.call(a),B(c)}})};r.ac=function(a,b){b=void 0===b?!0:b;if(this.l==om)return Promise.reject(pm());var c=hl();c.mediaElement=a;qc()||(b=!1);var d=b?this.Eb:this.W;a=ll(this.Ia,function(){return{node:d,payload:c,nb:!1}});a.Ob=function(){};return qm(a)};r.rf=function(a){this.jf=a};
435
+ r.detach=function(){var a=this;if(this.l==om)return Promise.reject(pm());var b=ll(this.Ia,function(){return{node:a.P,payload:hl(),nb:!1}});b.Ob=function(){};return qm(b)};r.ve=function(a){var b=this;a=void 0===a?!0:a;if(this.l==om)return Promise.reject(pm());this.jc=!1;qc()||(a=!1);lm(this);var c=hl(),d=ll(this.Ia,function(e){var f=e.mediaElement&&a?b.Eb:e.mediaElement?b.W:b.P;c.mediaElement=e.mediaElement;return{node:f,payload:c,nb:!1}});d.Ob=function(){};return qm(d)};r.Lg=function(a){this.qc=a};
436
+ r.load=function(a,b,c){var d=this;this.qc=null;this.jc=!1;if(this.l==om)return Promise.reject(pm());this.dispatchEvent(jm("loading"));var e=hl();e.uri=a;e.kd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=rm(this,e)?this.Fb:this.$,g=ll(this.Ia,function(h){if(null==h.mediaElement)return null;e.mediaElement=h.mediaElement;return{node:f,payload:e,nb:!0}});this.o=new Vl;this.V=sm(this);g.Ob=function(){};return new Promise(function(h,k){g.hd=function(){return k(new K(2,7,7002))};g.fd=
437
+ function(){h();d.dispatchEvent(jm("loaded"))};g.sb=function(){return k(pm())};g.onError=function(l){return k(l)}})};function rm(a,b){if(!qc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=ah(d),c=nm[c]);if(c){if(""==(b.mediaElement||sc()).canPlayType(c))return!1;if(!qc()||!(c in $g||ah(d)in bh)||gd(c)&&a.h.streaming.preferNativeHls)return!0;if(zc())return a.h.streaming.useNativeHlsOnSafari}return!1}
437
438
  function $l(a,b,c){null==b.mediaElement&&(b.mediaElement=c.mediaElement,a.cc.C(b.mediaElement,"error",function(){var d=tm(a);d&&um(a,d)}));a.g=b.mediaElement;return Promise.resolve()}
438
- function am(a,b){var c,d,e,f,g,h,k,l,m;return D(function(n){switch(n.g){case 1:return a.l!=om&&(a.l=Wl),c=a.fc.map(function(p){return p()}),a.fc=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(jm("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;a.za&&(a.za.release(),a.za=null);b.mediaElement&&(a.u.Ma(),a.Ha.Ma());a.gf.stop();a.yb&&(a.yb.release(),a.yb=null);a.Zc&&(a.Zc.stop(),a.Zc=null);if(!a.D){n.B(3);break}return u(n,a.D.stop(),4);case 4:a.D=null,a.cd=null;case 3:if(!a.s){n.B(5);break}return u(n,
439
- a.s.stop(),5);case 5:if(!a.j){n.B(7);break}return u(n,a.j.destroy(),8);case 8:a.j=null;case 7:a.J&&(a.J.release(),a.J=null);a.A&&(a.A.release(),a.A=null);if(!a.H){n.B(9);break}return u(n,a.H.destroy(),10);case 10:a.H=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.mediaElement||!b.mediaElement.src){n.B(11);break}return u(n,new Promise(function(p){return(new M(p)).O(.1)}),12);case 12:for(b.mediaElement.removeAttribute("src"),b.mediaElement.load();b.mediaElement.lastChild;)b.mediaElement.removeChild(b.mediaElement.firstChild);
440
- case 11:if(!a.m){n.B(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.bc=null;a.N=null;if(a.i){d=t(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.o=new Vl;a.ae=null;vm(a);B(n)}})}
441
- function bm(a,b){var c,d,e,f,g;return D(function(h){if(1==h.g)return c=a.h.textDisplayFactory,d=c(),a.ae=c,e=wm(b.mediaElement,d,function(k,l,m){xm(a,k,l,m)},a.L),e.configure(a.h.mediaSource),f=a.h.manifest,g=f.segmentRelativeVttTiming,e.H=g,u(h,e.J,2);a.H=e;B(h)})}
442
- function cm(a,b,c){var d,e,f,g;return D(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.F,a.bc=d,f=a,u(h,Yg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.cd=h.h;a.D=a.cd();g=af(a.h.manifest);c.mediaElement&&"AUDIO"===c.mediaElement.nodeName&&(g.disableVideo=!0);a.D.configure(g);B(h)})}
443
- function dm(a,b){var c=b.uri;b=a.F;a.za=new dk(function(){return a.zc()});a.za.addEventListener("regionadd",function(f){f=f.region;ym(a,"timelineregionadded",f);if(a.G)a.G.onDashTimedMetadata(f)});a.la=null;a.h.streaming.observeQualityChanges&&(a.la=new Zj(function(){return a.Qa()}),a.la.addEventListener("qualitychange",function(f){var g=f.quality;f=f.position;g=(new Map).set("mediaQuality",{bandwidth:g.bandwidth,audioSamplingRate:g.audioSamplingRate,codecs:g.codecs,contentType:g.contentType,frameRate:g.frameRate,
444
- height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(jm("mediaqualitychanged",g))}));var d={networkingEngine:b,modifyManifestRequest:function(f,g){var h=a.V;try{h.g.enabled&&(h.o=g.format,uk(h,f,{ot:xk,su:!h.i}))}catch(k){db("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",k)}},modifySegmentRequest:function(f,g){kk(a.V,f,g)},filter:function(f){return zm(a,f)},makeTextStreamsForClosedCaptions:function(f){return Am(a,
445
- f)},onTimelineRegionAdded:function(f){var g=a.za;a:{var h=t(g.g);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.schemeIdUri==f.schemeIdUri&&k.id==f.id&&k.startTime==f.startTime&&k.endTime==f.endTime){h=k;break a}h=null}null==h&&(g.g.add(f),f=new O("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return um(a,f)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
446
- enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(f){var g=a.m?a.m.g:null;g&&a.m.u&&Bm(a,g.keySystem,f)}},e=Date.now()/1E3;return new Re(function(){var f,g,h,k;return D(function(l){if(1==l.g)return f=a,u(l,a.D.start(c,d),2);f.i=l.h;g=jm("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new L(2,4,4036);Cm(a.i);h=Date.now()/1E3;k=h-e;a.o.F=k;B(l)})}(),function(){return a.D.stop()})}
447
- function em(a,b){var c,d,e,f;return D(function(g){return 1==g.g?(c=Date.now()/1E3,d=!0,a.m=Dm(a,{rb:a.F,onError:function(h){um(a,h)},gd:function(h){Em(a,h)},onExpirationUpdated:function(h,k){Fm(a,h,k)},onEvent:function(h){a.dispatchEvent(h);"drmsessionupdate"==h.type&&d&&(d=!1,a.o.j=Date.now()/1E3-c,a.L&&(h=a.L,h.g&&h.h.classList.add("shaka-hidden")))}}),a.m.configure(a.h.drm),(e=Rd(a.i.variants,a.h.restrictions,a.Cb))&&a.j&&Gm(a),f=oe(a.i.variants),u(g,sg(a.m,f,a.i.offlineSessionIds),2)):3!=g.g?
439
+ function am(a,b){var c,d,e,f,g,h,k,l,m;return D(function(n){switch(n.g){case 1:return a.l!=om&&(a.l=Wl),c=a.fc.map(function(p){return p()}),a.fc=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(jm("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;a.za&&(a.za.release(),a.za=null);b.mediaElement&&(a.u.Ma(),a.Ha.Ma());a.gf.stop();a.zb&&(a.zb.release(),a.zb=null);a.Zc&&(a.Zc.stop(),a.Zc=null);if(!a.D){n.B(3);break}return u(n,a.D.stop(),4);case 4:a.D=null,a.cd=null;case 3:if(!a.s){n.B(5);break}return u(n,
440
+ a.s.stop(),5);case 5:if(!a.j){n.B(7);break}return u(n,a.j.destroy(),8);case 8:a.j=null;case 7:a.J&&(a.J.release(),a.J=null);a.A&&(a.A.release(),a.A=null);if(!a.H){n.B(9);break}return u(n,a.H.destroy(),10);case 10:a.H=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.mediaElement||!b.mediaElement.src){n.B(11);break}return u(n,new Promise(function(p){return(new pc(p)).O(.1)}),12);case 12:for(b.mediaElement.removeAttribute("src"),b.mediaElement.load();b.mediaElement.lastChild;)b.mediaElement.removeChild(b.mediaElement.firstChild);
441
+ case 11:if(!a.m){n.B(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.bc=null;a.N=null;if(a.i){d=t(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.o=new Vl;a.$d=null;vm(a);B(n)}})}
442
+ function bm(a,b){var c,d,e,f,g;return D(function(h){if(1==h.g)return c=a.h.textDisplayFactory,d=c(),a.$d=c,e=wm(b.mediaElement,d,function(k,l,m){xm(a,k,l,m)},a.L),e.configure(a.h.mediaSource),f=a.h.manifest,g=f.segmentRelativeVttTiming,e.H=g,u(h,e.J,2);a.H=e;B(h)})}
443
+ function cm(a,b,c){var d,e,f,g;return D(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.F,a.bc=d,f=a,u(h,Zg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.cd=h.h;a.D=a.cd();g=bf(a.h.manifest);c.mediaElement&&"AUDIO"===c.mediaElement.nodeName&&(g.disableVideo=!0);a.D.configure(g);B(h)})}
444
+ function dm(a,b){var c=b.uri;b=a.F;a.za=new dk(function(){return a.yc()});a.za.addEventListener("regionadd",function(f){f=f.region;ym(a,"timelineregionadded",f);if(a.G)a.G.onDashTimedMetadata(f)});a.ka=null;a.h.streaming.observeQualityChanges&&(a.ka=new Zj(function(){return a.Pa()}),a.ka.addEventListener("qualitychange",function(f){var g=f.quality;f=f.position;g=(new Map).set("mediaQuality",{bandwidth:g.bandwidth,audioSamplingRate:g.audioSamplingRate,codecs:g.codecs,contentType:g.contentType,frameRate:g.frameRate,
445
+ height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(jm("mediaqualitychanged",g))}));var d={networkingEngine:b,modifyManifestRequest:function(f,g){var h=a.V;try{h.g.enabled&&(h.o=g.format,uk(h,f,{ot:xk,su:!h.i}))}catch(k){cb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",k)}},modifySegmentRequest:function(f,g){kk(a.V,f,g)},filter:function(f){return zm(a,f)},makeTextStreamsForClosedCaptions:function(f){return Am(a,
446
+ f)},onTimelineRegionAdded:function(f){var g=a.za;a:{var h=t(g.g);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.schemeIdUri==f.schemeIdUri&&k.id==f.id&&k.startTime==f.startTime&&k.endTime==f.endTime){h=k;break a}h=null}null==h&&(g.g.add(f),f=new N("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return um(a,f)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
447
+ enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(f){var g=a.m?a.m.g:null;g&&a.m.u&&Bm(a,g.keySystem,f)}},e=Date.now()/1E3;return new Se(function(){var f,g,h,k;return D(function(l){if(1==l.g)return f=a,u(l,a.D.start(c,d),2);f.i=l.h;g=jm("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new K(2,4,4036);Cm(a.i);h=Date.now()/1E3;k=h-e;a.o.F=k;B(l)})}(),function(){return a.D.stop()})}
448
+ function em(a,b){var c,d,e,f;return D(function(g){return 1==g.g?(c=Date.now()/1E3,d=!0,a.m=Dm(a,{rb:a.F,onError:function(h){um(a,h)},gd:function(h){Em(a,h)},onExpirationUpdated:function(h,k){Fm(a,h,k)},onEvent:function(h){a.dispatchEvent(h);"drmsessionupdate"==h.type&&d&&(d=!1,a.o.j=Date.now()/1E3-c,a.L&&(h=a.L,h.g&&h.h.classList.add("shaka-hidden")))}}),a.m.configure(a.h.drm),(e=Sd(a.i.variants,a.h.restrictions,a.Db))&&a.j&&Gm(a),f=pe(a.i.variants),u(g,tg(a.m,f,a.i.offlineSessionIds),2)):3!=g.g?
448
449
  u(g,a.m.ac(b.mediaElement),3):u(g,zm(a,a.i),0)})}
449
- function fm(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A;return D(function(z){switch(z.g){case 1:b.startTime=c.startTime;null!=a.qc&&(b.startTime=a.qc,a.qc=null);d=b.mediaElement;e=b.uri;a.bc=e;a.J=new Vj({Wc:function(){return d.playbackRate},kc:function(){return d.defaultPlaybackRate},qe:function(E){d.playbackRate=E},Se:function(E){d.currentTime+=E}});f=function(){return Hm(a)};g=function(){return Im(a)};a.u.C(d,"playing",f);a.u.C(d,"pause",f);a.u.C(d,"ended",f);a.u.C(d,"ratechange",g);mm(a,a.h);
450
- h=a.h.abrFactory;a.s&&a.Ud==h||(a.Ud=h,a.s=h(),"function"!=typeof a.s.setMediaElement&&(xe("AbrManager","Please use an AbrManager with setMediaElement function."),a.s.setMediaElement=function(){}),a.s.configure(a.h.abr));a.Ab=new Ge(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Bb=a.h.preferredTextLanguage;a.ic=a.h.preferredTextRole;a.hc=a.h.preferForcedSubs;Jm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.s.init(function(E,F,H){a.j&&E!=a.j.l&&
451
- Km(a,E,!0,void 0===F?!1:F,void 0===H?0:H)});a.s.setMediaElement(d);Dd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Lm(a);a.j.configure(a.h.streaming);a.l=Mm;d.textTracks&&a.u.C(d.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Nm(a,E)}});a.dispatchEvent(jm("streaming"));k=null;(l=a.j.l)||(k=km(a));m=[];n=l||k;p=t([n.video,n.audio]);for(q=p.next();!q.done;q=p.next())(v=q.value)&&!v.segmentIndex&&
452
- m.push(v.createSegmentIndex());if(!(0<m.length)){z.B(2);break}return u(z,Promise.all(m),2);case 2:if(a.D&&a.D.onInitialVariantChosen)a.D.onInitialVariantChosen(n);Jm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.A=Om(a,b.startTime);a.yb=Pm(a,b.kd);w=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Qm(a,w);if(l){z.B(4);break}Km(a,k,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){z.B(4);break}x=a.A.Mc();return u(z,Rm(k,x),6);case 6:y=z.h,a.A.Fd(y);case 4:return a.A.Ed(),
453
- C=a.Kb().find(function(E){return E.active}),C||((A=pe(a.i.textStreams,a.Bb,a.ic,a.hc)[0]||null)&&Ul(a.o.h,A,!0),k&&(A?(k.audio&&Sm(a,k.audio,A)&&(a.ea=!0),a.ea&&a.H.m.setTextVisibility(!0),Tm(a)):a.ea=!1),A&&(a.h.streaming.alwaysStreamText||a.Md())&&Qk(a.j,A)),u(z,a.j.start(),7);case 7:a.h.abr.enabled&&(a.s.enable(),Um(a)),Ud(a.j?a.j.l:null,a.i),Vm(a.i),Gm(a),Wm(a),a.i.variants.some(function(E){return E.primary}),a.jc=!0,a.u.ca(d,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.kd}),B(z)}})}
454
- function gm(a,b,c){var d,e,f,g,h,k,l;return D(function(m){return 1==m.g?(d=mc,e=Date.now()/1E3,f=!0,a.m=Dm(a,{rb:a.F,onError:function(n){um(a,n)},gd:function(n){Em(a,n)},onExpirationUpdated:function(n,p){Fm(a,n,p)},onEvent:function(n){a.dispatchEvent(n);"drmsessionupdate"==n.type&&f&&(f=!1,a.o.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=$g(g),k=nm[h],"application/x-mpegurl"==k&&zc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
455
- primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?fd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.ra,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,
456
- decodingInfos:[]},a.m.W=!0,u(m,sg(a.m,[l],[]),2)):u(m,a.m.ac(b.mediaElement),0)})}
457
- function hm(a,b,c){function d(){return Hm(a)}b.uri=c.uri;b.startTime=c.startTime;a.bc=b.uri;var e=b.mediaElement;a.A=new Jj(e);var f=!1;a.fc.push(function(){f=!0});null!=b.startTime&&a.A.Fd(b.startTime);a.J=new Vj({Wc:function(){return e.playbackRate},kc:function(){return e.defaultPlaybackRate},qe:function(k){e.playbackRate=k},Se:function(k){e.currentTime+=k}});Qm(a,a.h.streaming.rebufferingGoal);a.u.C(e,"playing",d);a.u.C(e,"pause",d);a.u.C(e,"ended",d);a.u.C(e,"ratechange",function(){return Im(a)});
458
- "none"!=e.preload&&a.u.ca(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.kd});e.audioTracks&&(a.u.C(e.audioTracks,"addtrack",function(){return Gm(a)}),a.u.C(e.audioTracks,"removetrack",function(){return Gm(a)}),a.u.C(e.audioTracks,"change",function(){return Gm(a)}));e.textTracks&&(a.u.C(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Xm(a,k);break;case "chapters":Nm(a,k);break;default:Gm(a)}}),a.u.C(e.textTracks,"removetrack",function(){return Gm(a)}),
459
- a.u.C(e.textTracks,"change",function(){return Gm(a)}));var g=$g(b.uri);e.src=vk(a.V,b.uri,nm[g]);(wc()||vc("Web0S"))&&e.load();a.l=Ym;a.dispatchEvent(jm("streaming"));var h=new nc;Aj(e,HTMLMediaElement.HAVE_METADATA,a.u,function(){a.A.Ed();h.resolve()});Aj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.u,function(){var k;return D(function(l){if(1==l.g)return Zm(a),k=$m(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.ea=!0),l.B(2)):u(l,new Promise(function(m){a.u.ca(e.textTracks,"change",
460
- m);(new M(m)).O(1)}),2);if(f)return l.return();an(a);B(l)})});e.error?h.reject(tm(a)):"none"==e.preload&&(cb('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.u.ca(e,"error",function(){h.reject(tm(a))});return(new Re(h,function(){h.reject(new L(2,7,7001));return Promise.resolve()})).$(function(){a.jc=
461
- !0})}function Zm(a){var b=a.h.preferredAudioLanguage;""!=b&&a.Xe(b,a.h.preferredVariantRole)}function an(a){var b=a.h.preferredTextLanguage;""!=b&&a.ke(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
462
- function Xm(a,b){if("metadata"==b.kind){b.mode="hidden";a.u.C(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,bn(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new M(function(){var d=cn(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Rb().O(.5);a.fc.push(function(){c.stop()})}}
450
+ function fm(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A;return D(function(z){switch(z.g){case 1:b.startTime=c.startTime;null!=a.qc&&(b.startTime=a.qc,a.qc=null);d=b.mediaElement;e=b.uri;a.bc=e;a.J=new Vj({Wc:function(){return d.playbackRate},kc:function(){return d.defaultPlaybackRate},pe:function(E){d.playbackRate=E},Re:function(E){d.currentTime+=E}});f=function(){return Hm(a)};g=function(){return Im(a)};a.u.C(d,"playing",f);a.u.C(d,"pause",f);a.u.C(d,"ended",f);a.u.C(d,"ratechange",g);mm(a,a.h);
451
+ h=a.h.abrFactory;a.s&&a.Ud==h||(a.Ud=h,a.s=h(),"function"!=typeof a.s.setMediaElement&&(ye("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),a.s.setMediaElement=function(){}),a.s.configure(a.h.abr));a.Bb=new He(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Cb=a.h.preferredTextLanguage;a.ic=a.h.preferredTextRole;a.hc=a.h.preferForcedSubs;Jm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.s.init(function(E,
452
+ F,H){a.j&&E!=a.j.l&&Km(a,E,!0,void 0===F?!1:F,void 0===H?0:H)});a.s.setMediaElement(d);Ed(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Lm(a);a.j.configure(a.h.streaming);a.l=Mm;d.textTracks&&a.u.C(d.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Nm(a,E)}});a.dispatchEvent(jm("streaming"));k=null;(l=a.j.l)||(k=km(a));m=[];n=l||k;p=t([n.video,n.audio]);for(q=p.next();!q.done;q=p.next())(v=
453
+ q.value)&&!v.segmentIndex&&m.push(v.createSegmentIndex());if(!(0<m.length)){z.B(2);break}return u(z,Promise.all(m),2);case 2:if(a.D&&a.D.onInitialVariantChosen)a.D.onInitialVariantChosen(n);Jm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.A=Om(a,b.startTime);a.zb=Pm(a,b.kd);w=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Qm(a,w);if(l){z.B(4);break}Km(a,k,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){z.B(4);break}x=a.A.Lc();return u(z,Rm(k,x),6);case 6:y=z.h,a.A.Fd(y);
454
+ case 4:return a.A.Ed(),C=a.Kb().find(function(E){return E.active}),C||((A=qe(a.i.textStreams,a.Cb,a.ic,a.hc)[0]||null)&&Ul(a.o.h,A,!0),k&&(A?(k.audio&&Sm(a,k.audio,A)&&(a.da=!0),a.da&&a.H.m.setTextVisibility(!0),Tm(a)):a.da=!1),A&&(a.h.streaming.alwaysStreamText||a.Md())&&Qk(a.j,A)),u(z,a.j.start(),7);case 7:a.h.abr.enabled&&(a.s.enable(),Um(a)),Vd(a.j?a.j.l:null,a.i),Vm(a.i),Gm(a),Wm(a),a.i.variants.some(function(E){return E.primary}),a.jc=!0,a.u.ba(d,"loadedmetadata",function(){a.o.m=Date.now()/
455
+ 1E3-c.kd}),B(z)}})}
456
+ function gm(a,b,c){var d,e,f,g,h,k,l;return D(function(m){return 1==m.g?(d=lc,e=Date.now()/1E3,f=!0,a.m=Dm(a,{rb:a.F,onError:function(n){um(a,n)},gd:function(n){Em(a,n)},onExpirationUpdated:function(n,p){Fm(a,n,p)},onEvent:function(n){a.dispatchEvent(n);"drmsessionupdate"==n.type&&f&&(f=!1,a.o.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=ah(g),k=nm[h],"application/x-mpegurl"==k&&zc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,primary:!1,
457
+ 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.qa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
458
+ a.m.W=!0,u(m,tg(a.m,[l],[]),2)):u(m,a.m.ac(b.mediaElement),0)})}
459
+ function hm(a,b,c){function d(){return Hm(a)}b.uri=c.uri;b.startTime=c.startTime;a.bc=b.uri;var e=b.mediaElement;a.A=new Kj(e);var f=!1;a.fc.push(function(){f=!0});null!=b.startTime&&a.A.Fd(b.startTime);a.J=new Vj({Wc:function(){return e.playbackRate},kc:function(){return e.defaultPlaybackRate},pe:function(k){e.playbackRate=k},Re:function(k){e.currentTime+=k}});Qm(a,a.h.streaming.rebufferingGoal);a.u.C(e,"playing",d);a.u.C(e,"pause",d);a.u.C(e,"ended",d);a.u.C(e,"ratechange",function(){return Im(a)});
460
+ "none"!=e.preload&&a.u.ba(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.kd});e.audioTracks&&(a.u.C(e.audioTracks,"addtrack",function(){return Gm(a)}),a.u.C(e.audioTracks,"removetrack",function(){return Gm(a)}),a.u.C(e.audioTracks,"change",function(){return Gm(a)}));e.textTracks&&(a.u.C(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Xm(a,k);break;case "chapters":Nm(a,k);break;default:Gm(a)}}),a.u.C(e.textTracks,"removetrack",function(){return Gm(a)}),
461
+ a.u.C(e.textTracks,"change",function(){return Gm(a)}));var g=ah(b.uri);g=nm[g];e.src=vk(a.V,b.uri,g);(wc()||vc("Web0S"))&&e.load();"none"!=e.preload&&!e.autoplay&&gd(g)&&Bc()&&e.load();a.l=Ym;a.dispatchEvent(jm("streaming"));var h=new mc;Bj(e,HTMLMediaElement.HAVE_METADATA,a.u,function(){a.A.Ed();h.resolve()});Bj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.u,function(){var k;return D(function(l){if(1==l.g)return Zm(a),k=$m(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.da=!0),l.B(2)):
462
+ u(l,new Promise(function(m){a.u.ba(e.textTracks,"change",m);(new pc(m)).O(1)}),2);if(f)return l.return();an(a);B(l)})});e.error?h.reject(tm(a)):"none"==e.preload&&(bb('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.u.ba(e,"error",function(){h.reject(tm(a))});return(new Se(h,function(){h.reject(new K(2,
463
+ 7,7001));return Promise.resolve()})).Z(function(){a.jc=!0})}function Zm(a){var b=a.h.preferredAudioLanguage;""!=b&&a.We(b,a.h.preferredVariantRole)}function an(a){var b=a.h.preferredTextLanguage;""!=b&&a.je(b,a.h.preferredTextRole,a.h.preferForcedSubs)}
464
+ function Xm(a,b){if("metadata"==b.kind){b.mode="hidden";a.u.C(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,bn(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new pc(function(){var d=cn(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Rb().O(.5);a.fc.push(function(){c.stop()})}}
463
465
  function xm(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())bn(a,f,g,"org.id3",k.value);if(a.G)a.G.onHlsTimedMetadata(e,f)}}function bn(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(jm("metadata",b))}
464
- function Nm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new M(function(){b.mode="hidden"})).Rb().O(.5);a.fc.push(function(){c.stop()})}}function Cm(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 Dm(a,b){return new lg(b,a.h.drm.updateExpirationTime)}
465
- function Yl(a){return new ef(function(b,c){a.s&&a.s.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(jm("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(jm("downloadfailed",b))})}
466
- function Om(a,b){return new Kj(a.g,a.i,a.h.streaming,b,function(){a.yb&&Yj(a.yb,!0);a.j&&a.j.Ac();a.N&&dn(a)},function(c){return a.dispatchEvent(c)})}
467
- function Pm(a,b){b=new ek(a.za,a.T()||0<b);b.addEventListener("enter",function(d){ym(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){ym(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(ym(a,"timelineregionenter",e),ym(a,"timelineregionexit",e))});var c=new Xj(a.g);c.g.add(b);a.la&&c.g.add(a.la);return c}function Qm(a,b){a.N=new Ke;a.N.g=Me;Ne(a.N,b,Math.min(.5,b/2));vm(a);a.Zc=(new M(function(){dn(a)})).Fa(.25)}
468
- function dn(a){switch(a.l){case Ym:if(a.g.ended)var b=!0;else{var c=Bi(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Mm:a:if(a.g.ended||Zi(a.H))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.bb();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?Le:Me;c.g=d;b!=d&&vm(a)}function wm(a,b,c,d){return new Ti(a,b,c,d)}
469
- function sm(a){return new jk({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Qa:function(){return a.Qa()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Sa:function(){return a.Sa()},Uc:function(){return a.Uc()},T:function(){return a.T()}},a.h.cmcd)}
470
- function Lm(a){return new Ek(a.i,{Vc:function(){return a.A?a.A.Mc():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},modifySegmentRequest:function(b,c){kk(a.V,b,c)},R:a.H,rb:a.F,onError:function(b){return um(a,b)},onEvent:function(b){return a.dispatchEvent(b)},mg:function(){a.D&&a.D.update&&a.D.update()},$d:function(b,c,d){a.A&&a.A.Te();dn(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(jm("segmentappended",b))},lg:function(b,c){(c=c.Sd)&&a.la&&
471
- bk(a.la,c,b)},Ce:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new Pf(Nb(c));var e=0,f=t(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Bg(d,"cenc",e);d=d.o}}else d=Promise.resolve();return d},ng:function(b,c,d){xm(a,b,c,d)}})}
472
- r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Gl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(xe("streaming.forceTransmuxTS configuration","Please Use streaming.forceTransmux instead."),a.streaming.forceTransmux=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=
466
+ function Nm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new pc(function(){b.mode="hidden"})).Rb().O(.5);a.fc.push(function(){c.stop()})}}function Cm(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 Dm(a,b){return new mg(b,a.h.drm.updateExpirationTime)}
467
+ function Yl(a){return new ff(function(b,c){a.s&&a.s.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(jm("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(jm("downloadfailed",b))})}
468
+ function Om(a,b){return new Lj(a.g,a.i,a.h.streaming,b,function(){a.zb&&Yj(a.zb,!0);a.j&&a.j.zc();a.N&&dn(a)},function(c){return a.dispatchEvent(c)})}
469
+ function Pm(a,b){b=new ek(a.za,a.T()||0<b);b.addEventListener("enter",function(d){ym(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){ym(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(ym(a,"timelineregionenter",e),ym(a,"timelineregionexit",e))});var c=new Xj(a.g);c.g.add(b);a.ka&&c.g.add(a.ka);return c}function Qm(a,b){a.N=new Le;a.N.g=Ne;Oe(a.N,b,Math.min(.5,b/2));vm(a);a.Zc=(new pc(function(){dn(a)})).Fa(.25)}
470
+ function dn(a){switch(a.l){case Ym:if(a.g.ended)var b=!0;else{var c=Ci(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Mm:a:if(a.g.ended||$i(a.H))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.ab();var d=Ci(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ei(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?Me:Ne;c.g=d;b!=d&&vm(a)}function wm(a,b,c,d){return new Ui(a,b,c,d)}
471
+ function sm(a){return new jk({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Pa:function(){return a.Pa()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Ra:function(){return a.Ra()},Uc:function(){return a.Uc()},T:function(){return a.T()}},a.h.cmcd)}
472
+ function Lm(a){return new Ek(a.i,{Vc:function(){return a.A?a.A.Lc():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},modifySegmentRequest:function(b,c){kk(a.V,b,c)},R:a.H,rb:a.F,onError:function(b){return um(a,b)},onEvent:function(b){return a.dispatchEvent(b)},ng:function(){a.D&&a.D.update&&a.D.update()},Zd:function(b,c,d){a.A&&a.A.Se();dn(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(jm("segmentappended",b))},mg:function(b,c){(c=c.Sd)&&a.ka&&
473
+ bk(a.ka,c,b)},Be:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){c=new Qf(Mb(c));var e=0,f=t(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Cg(d,"cenc",e);d=d.m}}else d=Promise.resolve();return d},og:function(b,c,d){xm(a,b,c,d)}})}
474
+ r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Gl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(ye("streaming.forceTransmuxTS configuration","Please Use streaming.forceTransmux instead."),a.streaming.forceTransmux=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=
473
475
  .01));var c=Ol(this.h,a,Xl(this));en(this);return c};
474
- function en(a){if(a.D){var b=af(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.D.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{fn(a,a.i)}catch(f){um(a,f)}a.s&&Wm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||gn(a)}a.F&&a.F.ne(a.h.streaming.forceHTTPS);if(a.H&&(a.H.configure(a.h.mediaSource),a.H.H=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.ae!=b)){var c=b(),d=a.H,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),
475
- e.destroy());d.g&&(d.g.j=c);a.ae=b;a.j&&(b=a.j,(c=b.j.get(lc))&&Ok(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.h.abr),a.h.abr.enabled?a.s.enable():a.s.disable(),Um(a));a.N&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ne(a.N,b,Math.min(.5,b/2)));a.i&&Jm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=Xl(this);Ol(a,this.h,Xl(this));return a};
476
- r.Ff=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.zc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.xg=function(){for(var a in this.h)delete this.h[a];Ol(this.h,Xl(this),Xl(this));en(this)};r.Lf=function(){return this.l};r.Pf=function(){return this.g};r.nc=function(){return this.F};r.Jd=function(){return this.bc};
477
- r.Le=function(){return this.G?this.G:null};r.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};r.pb=function(){return this.i?this.i.presentationTimeline.pb():!1};r.cg=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};
478
- r.zc=function(){if(!this.jc)return{start:0,end:0};if(this.i){var a=this.i.presentationTimeline;return{start:a.Ib(),end:a.Ra()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.ag=function(){this.T()&&(this.g.currentTime=this.zc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.mc=function(){return this.m?this.m.mc():Infinity};
479
- r.Tc=function(){return this.m?this.m.Tc():{}};r.Kd=function(){return this.N?this.N.g==Me:!1};r.Uc=function(){return this.g?this.J?this.J.i:1:0};r.Fg=function(a){var b=this;0==a?cb("A trick play rate of 0 is unsupported!"):(this.Ha.Ma(),this.g.paused&&this.g.play(),this.J.set(a),this.l==Mm&&(this.s.playbackRateChanged(a),Nk(this.j,1<Math.abs(a))),this.T()&&this.Ha.C(this.g,"timeupdate",function(){var c=b.g.currentTime,d=b.zc(),e=b.h.streaming.safeSeekOffset;0<a?c>=d.end&&b.Gd():c<=d.start+e&&b.Gd()}))};
476
+ function en(a){if(a.D){var b=bf(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.D.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{fn(a,a.i)}catch(f){um(a,f)}a.s&&Wm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||gn(a)}a.F&&a.F.ne(a.h.streaming.forceHTTPS);if(a.H&&(a.H.configure(a.h.mediaSource),a.H.H=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.$d!=b)){var c=b(),d=a.H,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),
477
+ e.destroy());d.g&&(d.g.j=c);a.$d=b;a.j&&(b=a.j,(c=b.j.get(kc))&&Ok(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.h.abr),a.h.abr.enabled?a.s.enable():a.s.disable(),Um(a));a.N&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Oe(a.N,b,Math.min(.5,b/2)));a.i&&Jm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=Xl(this);Ol(a,this.h,Xl(this));return a};
478
+ r.Ff=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.yc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.yg=function(){for(var a in this.h)delete this.h[a];Ol(this.h,Xl(this),Xl(this));en(this)};r.Mf=function(){return this.l};r.Qf=function(){return this.g};r.nc=function(){return this.F};r.Jd=function(){return this.bc};
479
+ r.Ke=function(){return this.G?this.G:null};r.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};r.pb=function(){return this.i?this.i.presentationTimeline.pb():!1};r.dg=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};
480
+ r.yc=function(){if(!this.jc)return{start:0,end:0};if(this.i){var a=this.i.presentationTimeline;return{start:a.Ib(),end:a.Qa()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.bg=function(){this.T()&&(this.g.currentTime=this.yc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.mc=function(){return this.m?this.m.mc():Infinity};
481
+ r.Tc=function(){return this.m?this.m.Tc():{}};r.Kd=function(){return this.N?this.N.g==Ne:!1};r.Uc=function(){return this.g?this.J?this.J.i:1:0};
482
+ r.Gg=function(a){var b=this;0==a?bb("A trick play rate of 0 is unsupported!"):(this.Ha.Ma(),this.g.paused&&this.g.play(),this.J.set(a),this.l==Mm&&(this.s.playbackRateChanged(a),Nk(this.j,1<Math.abs(a))),this.T()&&this.Ha.C(this.g,"timeupdate",function(){var c=b.g.currentTime,d=b.yc(),e=b.h.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.Gd():Math.floor(c)<=Math.floor(d.start+e)&&b.Gd()}))};
480
483
  r.Gd=function(){var a=this.J.kc();this.l==Ym&&this.J.set(a);this.l==Mm&&(this.J.set(a),this.s.playbackRateChanged(a),Nk(this.j,!1));this.Ha.Ma()};
481
- r.Sa=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,ne(e)){var f=fe(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 me(g)}):[]};
482
- r.Kb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ge(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?$m(this).map(function(f){return ke(f)}):[]};r.Jf=function(){return this.i?this.i.imageStreams.map(function(a){return he(a)}):[]};
483
- r.Xf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A,z,E,F;return D(function(H){if(1==H.g)return c.i?(d=c.i.imageStreams.find(function(I){return I.id==a}))?d.segmentIndex?H.B(3):u(H,d.createSegmentIndex(),3):H.return(null):H.B(2);if(2!=H.g){e=d.segmentIndex.find(b);if(null==e)return H.return(null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return H.return(null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;q=l/n;v=m*n;
484
- w=f.i-f.startTime;x=f.o||w/v;y=f.startTime;A=C=0;1<v&&(z=Math.floor((b-f.startTime)/x),y=f.startTime+z*x,C=z%m*p,A=Math.floor(z/m)*q);E=!1;if(F=f.m)E=!0,q=F.height,C=F.positionX,A=F.positionY,p=F.width;return H.return({imageHeight:l,imageWidth:k,height:q,positionX:C,positionY:A,startTime:y,duration:x,uris:f.va(),width:p,sprite:E})}return H.return(null)})};
485
- r.Ye=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(Ul(this.o.h,b,!1),Qk(this.j,b),hn(this),this.Bb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=$m(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ie(c)==a.id?c.mode=this.ea?"showing":"hidden":c.mode="disabled";hn(this)}};
486
- r.le=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&&cb("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&&ne(d)&&(Km(this,d,!1,b,c),this.Ab=new Fe(d),Wm(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,
487
- ie(c)==a.id){jn(this,c);break}};r.Ef=function(){return kn(this.Sa())};r.Vf=function(){return kn(this.Kb())};r.Df=function(){return Array.from(ln(this.Sa()))};r.Uf=function(){return Array.from(ln(this.Kb()))};
488
- r.Xe=function(a,b,c){c=void 0===c?0:c;if(this.i&&this.A){this.Ab=new Ge(a,b||"",c,"");a=function(f,g){return f.video||g.video?f.video&&g.video?Math.abs((f.video.height||0)-(g.video.height||0))+Math.abs((f.video.width||0)-(g.video.width||0)):Infinity:0};b=this.j.l;var d=this.Ab.create(this.i.variants);c=null;d=t(d.values());for(var e=d.next();!e.done;e=d.next())if(e=e.value,!c||a(c,b)>a(e,b))c=e;c?(a=fe(c),this.le(a,!0)):gn(this)}else this.g&&this.g.audioTracks&&(a=pe(this.Sa(),a,b||"",!1)[0])&&this.le(a)};
489
- r.ke=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.A){if(this.Bb=a,this.ic=b||"",this.hc=c,(a=pe(this.i.textStreams,this.Bb,this.ic,this.hc)[0]||null)&&a!=this.j.o&&(Ul(this.o.h,a,!1),this.h.streaming.alwaysStreamText||this.Md()))Qk(this.j,a),hn(this)}else(a=pe(this.Kb(),a,b||"",c)[0])&&this.Ye(a)};
490
- r.zg=function(a){if(this.i&&this.A){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.Ab=new Ge(b.language,"",0,a),gn(this))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&jn(this,b)}};
491
- r.Md=function(){var a=this.ea;return this.H?this.H.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?$m(this).some(function(b){return"showing"==b.mode}):a};r.Me=function(){return this.g&&this.g.src&&this.g.textTracks?mn(this).map(function(a){return ke(a)}):[]};
492
- r.Gf=function(a){var b=ud(a),c=mn(this).filter(function(h){return ud(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
484
+ r.Ra=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,oe(e)){var f=ge(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 ne(g)}):[]};
485
+ r.Kb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=he(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?$m(this).map(function(f){return le(f)}):[]};r.Jf=function(){return this.i?this.i.imageStreams.map(function(a){return ie(a)}):[]};
486
+ r.Yf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A,z,E,F;return D(function(H){if(1==H.g)return c.i?(d=c.i.imageStreams.find(function(I){return I.id==a}))?d.segmentIndex?H.B(3):u(H,d.createSegmentIndex(),3):H.return(null):H.B(2);if(2!=H.g){e=d.segmentIndex.find(b);if(null==e)return H.return(null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return H.return(null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;q=l/n;v=m*n;
487
+ w=f.j-f.startTime;x=f.s||w/v;y=f.startTime;A=C=0;1<v&&(z=Math.floor((b-f.startTime)/x),y=f.startTime+z*x,C=z%m*p,A=Math.floor(z/m)*q);E=!1;if(F=f.o)E=!0,q=F.height,C=F.positionX,A=F.positionY,p=F.width;return H.return({imageHeight:l,imageWidth:k,height:q,positionX:C,positionY:A,startTime:y,duration:x,uris:f.ua(),width:p,sprite:E})}return H.return(null)})};
488
+ r.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.o&&(Ul(this.o.h,b,!1),Qk(this.j,b),hn(this),this.Cb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=$m(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,je(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";hn(this)}};
489
+ r.ke=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&&bb("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&&oe(d)&&(Km(this,d,!1,b,c),this.Bb=new Ge(d),Wm(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,
490
+ je(c)==a.id){jn(this,c);break}};r.Ef=function(){return kn(this.Ra())};r.Wf=function(){return kn(this.Kb())};r.Df=function(){return Array.from(ln(this.Ra()))};r.Vf=function(){return Array.from(ln(this.Kb()))};
491
+ r.We=function(a,b,c){c=void 0===c?0:c;if(this.i&&this.A){this.Bb=new He(a,b||"",c,"");a=function(f,g){return f.video||g.video?f.video&&g.video?Math.abs((f.video.height||0)-(g.video.height||0))+Math.abs((f.video.width||0)-(g.video.width||0)):Infinity:0};b=this.j.l;var d=this.Bb.create(this.i.variants);c=null;d=t(d.values());for(var e=d.next();!e.done;e=d.next())if(e=e.value,!c||a(c,b)>a(e,b))c=e;c?(a=ge(c),this.ke(a,!0)):gn(this)}else this.g&&this.g.audioTracks&&(a=qe(this.Ra(),a,b||"",!1)[0])&&this.ke(a)};
492
+ r.je=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.A){if(this.Cb=a,this.ic=b||"",this.hc=c,(a=qe(this.i.textStreams,this.Cb,this.ic,this.hc)[0]||null)&&a!=this.j.o&&(Ul(this.o.h,a,!1),this.h.streaming.alwaysStreamText||this.Md()))Qk(this.j,a),hn(this)}else(a=qe(this.Kb(),a,b||"",c)[0])&&this.Xe(a)};
493
+ r.Ag=function(a){if(this.i&&this.A){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.Bb=new He(b.language,"",0,a),gn(this))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&jn(this,b)}};
494
+ r.Md=function(){var a=this.da;return this.H?this.H.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?$m(this).some(function(b){return"showing"==b.mode}):a};r.Le=function(){return this.g&&this.g.src&&this.g.textTracks?mn(this).map(function(a){return le(a)}):[]};
495
+ r.Gf=function(a){var b=vd(a),c=mn(this).filter(function(h){return vd(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
493
496
  function $m(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function cn(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function mn(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
494
- r.bf=function(a){a=!!a;if(this.ea!=a){this.ea=a;if(this.l==Mm)this.H.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=pe(this.i.textStreams,this.Bb,this.ic,this.hc),0<a.length&&(Qk(this.j,a[0]),hn(this))):Mk(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=$m(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")}Tm(this)}};
495
- r.Sf=function(){if(!this.T())return null;var a=this.Ia.l,b=0;if(this.A)b=this.A.Mc();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.i+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
496
- r.Ne=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.Qa=function(){if(this.l==Mm)return this.H.Qa();var a={total:[],audio:[],video:[],text:[]};this.l==Ym&&(a.total=Ei(this.g.buffered));return a};
497
+ r.bf=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==Mm)this.H.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=qe(this.i.textStreams,this.Cb,this.ic,this.hc),0<a.length&&(Qk(this.j,a[0]),hn(this))):Mk(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=$m(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")}Tm(this)}};
498
+ r.Tf=function(){if(!this.T())return null;var a=this.Ia.l,b=0;if(this.A)b=this.A.Lc();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?(a=this.i.presentationTimeline,new Date(1E3*((a.A||a.i)+b))):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
499
+ r.Me=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.Pa=function(){if(this.l==Mm)return this.H.Pa();var a={total:[],audio:[],video:[],text:[]};this.l==Ym&&(a.total=Fi(this.g.buffered));return a};
497
500
  r.getStats=function(){if(this.l!=Mm&&this.l!=Ym)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:[]};Hm(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.o;b=
498
- Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.A&&(this.o.N=this.A.ye(),this.o.P=this.A.ze());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.o;var d=Number(c.totalVideoFrames);b.L=Number(c.droppedVideoFrames);b.J=d;this.o.H=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.J?c.J:NaN):c=NaN;this.o.s=c;if(this.l==Mm){if(c=this.j.l)this.o.A=(this.J?this.J.i:1)*c.bandwidth;c&&c.video&&(b=this.o,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.T()&&(c=this.Ne().valueOf()+
501
+ Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.A&&(this.o.N=this.A.xe(),this.o.P=this.A.ye());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.o;var d=Number(c.totalVideoFrames);b.L=Number(c.droppedVideoFrames);b.J=d;this.o.H=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.J?c.J:NaN):c=NaN;this.o.s=c;if(this.l==Mm){if(c=this.j.l)this.o.A=(this.J?this.J.i:1)*c.bandwidth;c&&c.video&&(b=this.o,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.T()&&(c=this.Me().valueOf()+
499
502
  1E3*a.currentTime,this.o.D=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.o.G=this.i.presentationTimeline.g);c=this.s.getBandwidthEstimate();this.o.u=c}this.l==Ym&&(c=this.o,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var e=this.o;a=e.o;c=e.l;b=e.A;d=e.J;var f=e.L,g=e.H,h=e.P,k=e.N,l=e.u,m=e.i,n=e.m,p=e.F,q=e.j,v=Rl(e.g,"playing"),w=Rl(e.g,"paused"),x=Rl(e.g,"buffering"),y=e.s,C=e.D,A=e.G,z=Sl(e.g),E=[];e=t(e.h.g);for(var F=e.next();!F.done;F=e.next())F=F.value,E.push({timestamp:F.timestamp,
500
503
  id:F.id,type:F.type,fromAdaptation:F.fromAdaptation,bandwidth:F.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:q,playTime:v,pauseTime:w,bufferingTime:x,licenseTime:y,liveLatency:C,maxSegmentDuration:A,stateHistory:z,switchHistory:E}};
501
- r.nf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,v,w,x,y,C,A;return D(function(z){switch(z.g){case 1:if(h.l!=Mm&&h.l!=Ym)throw new L(1,7,7004);"subtitles"!=c&&"captions"!=c&&cb("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){z.B(2);break}return u(z,nn(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(E){}if(h.l!=Ym){z.B(4);break}g&&(c="forced");return u(z,on(h,a,b,c,d,f||"",k),5);case 5:l=ud(b);m=h.Kb();
502
- if(n=m.find(function(E){return ud(E.language)==l&&E.label==(f||"")&&E.kind==c}))return Gm(h),z.return(n);throw new L(1,2,2012);case 4:p=mc;q=h.i.presentationTimeline.getDuration();if(Infinity==q)throw new L(1,4,4033);if(!k.length){z.B(6);break}return u(z,pn(h,a,h.F,h.h.streaming.retryParameters),7);case 7:v=z.h,w=qn(h,v,d,k),x=new Blob([w],{type:"text/vtt"}),a=Wi(x),d="text/vtt";case 6:y={id:h.ce++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Tj(0,q,[a]),mimeType:d||
503
- "",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.Z,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!0};C=bd(y.mimeType,y.codecs);A=hd(C);if(!A)throw new L(2,2,2014,d);h.i.textStreams.push(y);Gm(h);return z.return(ge(y))}})};
504
- r.pf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C;return D(function(A){switch(A.g){case 1:if(c.l!=Mm&&c.l!=Ym)throw new L(1,7,7004);if(c.l==Ym)throw new L(1,2,2016);if(b){A.B(2);break}return u(A,nn(c,a),3);case 3:b=A.h;case 2:if("text/vtt"!=b)throw new L(1,2,2017,a);d=mc;e=c.i.presentationTimeline.getDuration();if(Infinity==e)throw new L(1,4,4045);return u(A,pn(c,a,c.F,c.h.streaming.retryParameters),4);case 4:f=A.h;g=id[b];if(!g)throw new L(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,
505
- segmentEnd:e,vttOffset:0};l=Nb(f);m=h.parseMedia(l,k,a);n=[];p={};q=t(m);for(v=q.next();!v.done;p={Zb:p.Zb,hb:p.hb},v=q.next())p.hb=v.value,p.Zb=null,w=function(z){return function(){null==z.Zb&&(z.Zb=gc([a],[z.hb.payload]));return z.Zb||[]}}(p),x=new Q(p.hb.startTime,p.hb.endTime,w,0,null,null,0,0,Infinity),p.hb.payload.includes("#xywh")&&(y=p.hb.payload.split("#xywh=")[1].split(","),4===y.length&&x.cf({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],
506
- 10)})),n.push(x);C={id:c.ce++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Qj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.$b,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",external:!0};c.i.imageStreams.push(C);Gm(c);return A.return(he(C))}})};
507
- r.mf=function(a,b,c){var d=this,e,f,g,h;return D(function(k){switch(k.g){case 1:if(d.l!=Mm&&d.l!=Ym)throw new L(1,7,7004);if(c){k.B(2);break}return u(k,nn(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return u(k,on(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Me();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return u(k,new Promise(function(l,m){d.u.ca(f,"load",l);d.u.ca(f,"error",function(){m(new L(1,2,2015))})}),6);case 6:return k.return(h);
508
- case 5:throw new L(1,2,2012);}})};function nn(a,b){var c,d;return D(function(e){switch(e.g){case 1:c=$g(b);if(d=rn[c])return e.return(d);xa(e,2);return u(e,bh(b,a.F,a.h.streaming.retryParameters),4);case 4:d=e.h;za(e,3);break;case 2:Aa(e);case 3:if(d)return e.return(d);throw new L(1,2,2011,c);}})}
509
- function on(a,b,c,d,e,f,g){var h,k,l,m;return D(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,pn(a,b,a.F,a.h.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=qn(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Wi(l),e="text/vtt");m=document.createElement("track");var p=a.V,q=b;try{if(p.g.enabled){var v=wk(p);v.ot=Ck;v.su=!0;var w=yk(v);var x=zk(q,w)}else x=q}catch(y){db("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",y),x=q}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
510
- a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function pn(a,b,c,d){var e,f,g;return D(function(h){if(1==h.g){e=pf;f=jf([b],d);f.method="GET";var k=a.V;try{k.g.enabled&&uk(k,f,{ot:Ck,su:!0})}catch(l){db("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)})}
511
- function qn(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=Nb(b),b=c.parseMedia(b,a,null),Dl(b,d);throw new L(2,2,2014,c);}r.oe=function(a,b){this.Cb.width=a;this.Cb.height=b};r.ge=function(a){if(this.l==Mm){var b=this.j;a=void 0===a?.1:a;if(b.i.g)b=!1;else if(b.s)b=!1;else{for(var c=t(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.sc||d.ua||d.Oa||(d.sc=!1,Lk(b,d,a));b=!0}}else b=!1;return b};
512
- r.Mf=function(){cb("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.Nf=function(){return this.cd};
513
- function Xl(a){var b=Ml();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.ge(d))}};b.textDisplayFactory=function(){return a.Xc?new ul(a.g,a.Xc):new pl(a.g,"Shaka Player TextTrack")};return b}r.ef=function(a){this.Xc=a};
514
- function Am(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Uj;h={id:a.ce++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
515
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:lc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1};b.textStreams.push(h);c.add(g)}}function zm(a,b){return D(function(c){if(1==c.g)return u(c,sn(a,b),2);fn(a,b);B(c)})}
516
- function sn(a,b){var c;return D(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Sd(c,b),2);Vm(b);B(d)})}function fn(a,b){if(a.l!=om){Rd(b.variants,a.h.restrictions,a.Cb)&&a.j&&Gm(a);var c=a.m?a.m.g:null;if(c&&a.m.u)for(var d=t(b.variants),e=d.next();!e.done;e=d.next())e=e.value,Bm(a,c.keySystem,e.video),Bm(a,c.keySystem,e.audio);tn(a,b)}}
517
- function Bm(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Bg(a.m,e.initDataType,e.initData)}}}
504
+ r.nf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,v,w,x,y,C,A;return D(function(z){switch(z.g){case 1:if(h.l!=Mm&&h.l!=Ym)throw new K(1,7,7004);"subtitles"!=c&&"captions"!=c&&bb("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){z.B(2);break}return u(z,nn(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(E){}if(h.l!=Ym){z.B(4);break}g&&(c="forced");return u(z,on(h,a,b,c,d,f||"",k),5);case 5:l=vd(b);m=h.Kb();
505
+ if(n=m.find(function(E){return vd(E.language)==l&&E.label==(f||"")&&E.kind==c}))return Gm(h),z.return(n);throw new K(1,2,2012);case 4:p=lc;q=h.i.presentationTimeline.getDuration();if(Infinity==q)throw new K(1,4,4033);if(!k.length){z.B(6);break}return u(z,pn(h,a,h.F,h.h.streaming.retryParameters),7);case 7:v=z.h,w=qn(h,v,d,k),x=new Blob([w],{type:"text/vtt"}),a=Xi(x),d="text/vtt";case 6:y={id:h.be++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Tj(0,q,[a]),mimeType:d||
506
+ "",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.Y,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!0};C=bd(y.mimeType,y.codecs);A=id(C);if(!A)throw new K(2,2,2014,d);h.i.textStreams.push(y);Gm(h);return z.return(he(y))}})};
507
+ r.pf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C;return D(function(A){switch(A.g){case 1:if(c.l!=Mm&&c.l!=Ym)throw new K(1,7,7004);if(c.l==Ym)throw new K(1,2,2016);if(b){A.B(2);break}return u(A,nn(c,a),3);case 3:b=A.h;case 2:if("text/vtt"!=b)throw new K(1,2,2017,a);d=lc;e=c.i.presentationTimeline.getDuration();if(Infinity==e)throw new K(1,4,4045);return u(A,pn(c,a,c.F,c.h.streaming.retryParameters),4);case 4:f=A.h;g=jd[b];if(!g)throw new K(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,
508
+ segmentEnd:e,vttOffset:0};l=Mb(f);m=h.parseMedia(l,k,a);n=[];p={};q=t(m);for(v=q.next();!v.done;p={Zb:p.Zb,gb:p.gb},v=q.next())p.gb=v.value,p.Zb=null,w=function(z){return function(){null==z.Zb&&(z.Zb=fc([a],[z.gb.payload]));return z.Zb||[]}}(p),x=new P(p.gb.startTime,p.gb.endTime,w,0,null,null,0,0,Infinity),p.gb.payload.includes("#xywh")&&(y=p.gb.payload.split("#xywh=")[1].split(","),4===y.length&&x.cf({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],
509
+ 10)})),n.push(x);C={id:c.be++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Rj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.$b,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",external:!0};c.i.imageStreams.push(C);Gm(c);return A.return(ie(C))}})};
510
+ r.mf=function(a,b,c){var d=this,e,f,g,h;return D(function(k){switch(k.g){case 1:if(d.l!=Mm&&d.l!=Ym)throw new K(1,7,7004);if(c){k.B(2);break}return u(k,nn(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return u(k,on(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Le();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return u(k,new Promise(function(l,m){d.u.ba(f,"load",l);d.u.ba(f,"error",function(){m(new K(1,2,2015))})}),6);case 6:return k.return(h);
511
+ case 5:throw new K(1,2,2012);}})};function nn(a,b){var c,d;return D(function(e){switch(e.g){case 1:c=ah(b);if(d=rn[c])return e.return(d);xa(e,2);return u(e,ch(b,a.F,a.h.streaming.retryParameters),4);case 4:d=e.h;za(e,3);break;case 2:Aa(e);case 3:if(d)return e.return(d);throw new K(1,2,2011,c);}})}
512
+ function on(a,b,c,d,e,f,g){var h,k,l,m;return D(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,pn(a,b,a.F,a.h.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=qn(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Xi(l),e="text/vtt");m=document.createElement("track");var p=a.V,q=b;try{if(p.g.enabled){var v=wk(p);v.ot=Ck;v.su=!0;var w=yk(v);var x=zk(q,w)}else x=q}catch(y){cb("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",y),x=q}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
513
+ a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function pn(a,b,c,d){var e,f,g;return D(function(h){if(1==h.g){e=qf;f=kf([b],d);f.method="GET";var k=a.V;try{k.g.enabled&&uk(k,f,{ot:Ck,su:!0})}catch(l){cb("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)})}
514
+ function qn(a,b,c,d){var e=jd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Mb(b),b=c.parseMedia(b,a,null),Dl(b,d);throw new K(2,2,2014,c);}r.oe=function(a,b){this.Db.width=a;this.Db.height=b};r.fe=function(a){if(this.l==Mm){var b=this.j;a=void 0===a?.1:a;if(b.i.g)b=!1;else if(b.s)b=!1;else{for(var c=t(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.sc||d.ta||d.Na||(d.sc=!1,Lk(b,d,a));b=!0}}else b=!1;return b};
515
+ r.Nf=function(){bb("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.Of=function(){return this.cd};
516
+ function Xl(a){var b=Ml();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.fe(d))}};b.textDisplayFactory=function(){return a.Xc?new ul(a.g,a.Xc):new pl(a.g,"Shaka Player TextTrack")};return b}r.ef=function(a){this.Xc=a};
517
+ function Am(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Uj;h={id:a.be++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
518
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:kc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1};b.textStreams.push(h);c.add(g)}}function zm(a,b){return D(function(c){if(1==c.g)return u(c,sn(a,b),2);fn(a,b);B(c)})}
519
+ function sn(a,b){var c;return D(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Td(c,b),2);Vm(b);B(d)})}function fn(a,b){if(a.l!=om){Sd(b.variants,a.h.restrictions,a.Db)&&a.j&&Gm(a);var c=a.m?a.m.g:null;if(c&&a.m.u)for(var d=t(b.variants),e=d.next();!e.done;e=d.next())e=e.value,Bm(a,c.keySystem,e.video),Bm(a,c.keySystem,e.audio);tn(a,b)}}
520
+ function Bm(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Cg(a.m,e.initDataType,e.initData)}}}
518
521
  function Rm(a,b){var c,d,e,f,g;return D(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return D(function(q){if(1==q.g)return k?u(q,k.createSegmentIndex(),2):q.return(null);n=(m=k.segmentIndex.mb(l))?m.next().value:null;if(!n)return q.return(null);p=n.startTime;return q.return(p)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
519
- function vm(a){var b=a.Kd();if(a.o&&a.N&&a.A){var c=a.J;c.j=b;Wj(c);a.V&&(c=a.V,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Hm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(jm("buffering",b))}function Im(a){var b=a.g.playbackRate;0!=b&&(a.J&&a.J.set(b),b=jm("ratechange"),a.dispatchEvent(b))}function Hm(a){if(a.o&&a.N){var b=a.o.g;a.N.g==Me?Ql(b,"buffering"):a.g.paused?Ql(b,"paused"):a.g.ended?Ql(b,"ended"):Ql(b,"playing")}}
520
- function Wm(a){try{tn(a,a.i)}catch(c){return um(a,c),!1}var b=a.i.variants.filter(function(c){return ne(c)});b=a.Ab.create(b);a.s.setVariants(Array.from(b.values()));return!0}function km(a){return Wm(a)?a.s.chooseVariant():null}function gn(a){var b=km(a);b&&Km(a,b,!0,!0,0)}
521
- function Km(a,b,c,d,e){var f=a.j.l;if(b==f)d&&Pk(a.j,b,d,e,!0);else{var g=a.o.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Pk(a.j,b,d,e,void 0,c);d=null;f&&(d=fe(f));b=fe(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.L&&Pi(a.L,b),c=jm("adaptation",c),un(a,c)):vn(a,d,b)}}
522
- function jn(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=me(c);b=me(b);vn(a,c,b)}function Sm(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=ud(a.h.preferredTextLanguage);c=ud(c.language);if(2==a.h.autoShowText)return td(c,d);if(3==a.h.autoShowText)return a=ud(b.language),td(c,d)&&!td(a,c);cb("Invalid autoShowText setting!");return!1}function Gm(a){var b=jm("trackschanged");un(a,b)}
523
- function vn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&Pi(a.L,c);c=jm("variantchanged",b);un(a,c)}function hn(a){var b=jm("textchanged");un(a,b)}function Tm(a){var b=jm("texttrackvisibility");un(a,b)}function Um(a){var b=(new Map).set("newStatus",a.h.abr.enabled);un(a,jm("abrstatuschanged",b))}
524
- function wn(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||a.l!=Mm||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;b=a.Sa().find(function(g){return g.active});for(var d=a.i,e=t(d.variants),f=e.next();!f.done;f=e.next())f=f.value,f.id===b.id&&(f.disabledUntilTime=Date.now()/1E3+c);Rd(d.variants,a.h.restrictions,a.Cb);b=km(a);if(!b)return!1;d=a.Qa().video.reduce(function(g,h){return g+h.end-h.start},0);Km(a,b,!1,!0,d);a.gf.O(c);return!0}
522
+ function vm(a){var b=a.Kd();if(a.o&&a.N&&a.A){var c=a.J;c.j=b;Wj(c);a.V&&(c=a.V,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Hm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(jm("buffering",b))}function Im(a){var b=a.g.playbackRate;0!=b&&(a.J&&a.J.set(b),b=jm("ratechange"),a.dispatchEvent(b))}function Hm(a){if(a.o&&a.N){var b=a.o.g;a.N.g==Ne?Ql(b,"buffering"):a.g.paused?Ql(b,"paused"):a.g.ended?Ql(b,"ended"):Ql(b,"playing")}}
523
+ function Wm(a){try{tn(a,a.i)}catch(c){return um(a,c),!1}var b=a.i.variants.filter(function(c){return oe(c)});b=a.Bb.create(b);a.s.setVariants(Array.from(b.values()));return!0}function km(a){return Wm(a)?a.s.chooseVariant():null}function gn(a){var b=km(a);b&&Km(a,b,!0,!0,0)}
524
+ function Km(a,b,c,d,e){var f=a.j.l;if(b==f)d&&Pk(a.j,b,d,e,!0);else{var g=a.o.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Pk(a.j,b,d,e,void 0,c);d=null;f&&(d=ge(f));b=ge(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.L&&Qi(a.L,b),c=jm("adaptation",c),un(a,c)):vn(a,d,b)}}
525
+ function jn(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=ne(c);b=ne(b);vn(a,c,b)}function Sm(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=vd(a.h.preferredTextLanguage);c=vd(c.language);if(2==a.h.autoShowText)return ud(c,d);if(3==a.h.autoShowText)return a=vd(b.language),ud(c,d)&&!ud(a,c);bb("Invalid autoShowText setting!");return!1}function Gm(a){var b=jm("trackschanged");un(a,b)}
526
+ function vn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&Qi(a.L,c);c=jm("variantchanged",b);un(a,c)}function hn(a){var b=jm("textchanged");un(a,b)}function Tm(a){var b=jm("texttrackvisibility");un(a,b)}function Um(a){var b=(new Map).set("newStatus",a.h.abr.enabled);un(a,jm("abrstatuschanged",b))}
527
+ function wn(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||a.l!=Mm||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;b=a.Ra().find(function(g){return g.active});for(var d=a.i,e=t(d.variants),f=e.next();!f.done;f=e.next())f=f.value,f.id===b.id&&(f.disabledUntilTime=Date.now()/1E3+c);Sd(d.variants,a.h.restrictions,a.Db);b=km(a);if(!b)return!1;d=a.Pa().video.reduce(function(g,h){return g+h.end-h.start},0);Km(a,b,!1,!0,d);a.gf.O(c);return!0}
525
528
  function um(a,b){if(a.l!=om)if(wn(a,b))b.handled=!0;else{var c=jm("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function ym(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(jm(b,c))}
526
- function tm(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 L(2,3,3016,b,c,a.g.error.message)}
529
+ function tm(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 K(2,3,3016,b,c,a.g.error.message)}
527
530
  function Em(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())if(l=l.value,(l=b[d?"00":l])||a.m.F)f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!xn.includes(l)}h!=f.allowedByKeySystem&&
528
531
  (e=!0)}}}if(e&&(Gm(a),!Wm(a)))return;(b=a.j.l)&&!b.allowedByKeySystem&&gn(a)}}function Fm(a,b,c){if(a.D&&a.D.onExpirationUpdated)a.D.onExpirationUpdated(b,c);b=jm("expirationupdated");a.dispatchEvent(b)}function Jm(a,b,c){0<b&&(a.T()||a.df(b));b=a.getDuration();c<b&&(a.T()||a.Da(c))}
529
532
  function tn(a,b){a=a.m?a.m.Tc():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?xn.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
530
- missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new L(2,4,4012,a);}function Vm(a){if(!a.variants.some(ne))throw new L(2,4,4032);}function un(a,b){D(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=om&&a.dispatchEvent(b);B(c)})}function ln(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(ud(c.language)):b.add("und");return b}
531
- function kn(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=ud(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){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
532
- h.push({language:l,role:m,label:n})}});return h}function pm(){return new L(2,7,7E3)}function im(a,b,c,d,e,f){return d==a&&e.mediaElement==f.mediaElement&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function hl(){return{mediaElement:null,mimeType:null,startTime:null,kd:NaN,uri:null}}function qm(a){return new Promise(function(b,c){a.sb=function(){return c(pm())};a.fd=function(){return b()};a.onError=function(d){return c(d)};a.hd=function(){return c(pm())}})}G("shaka.Player",U);
533
- U.prototype.setVideoContainer=U.prototype.ef;U.prototype.getManifestParserFactory=U.prototype.Nf;U.prototype.getManifest=U.prototype.Mf;U.prototype.retryStreaming=U.prototype.ge;U.prototype.setMaxHardwareResolution=U.prototype.oe;U.prototype.addChaptersTrack=U.prototype.mf;U.prototype.addThumbnailsTrack=U.prototype.pf;U.prototype.addTextTrackAsync=U.prototype.nf;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Qa;U.prototype.getPresentationStartTimeAsDate=U.prototype.Ne;
534
- U.prototype.getPlayheadTimeAsDate=U.prototype.Sf;U.prototype.setTextTrackVisibility=U.prototype.bf;U.prototype.getChapters=U.prototype.Gf;U.prototype.getChaptersTracks=U.prototype.Me;U.prototype.isTextTrackVisible=U.prototype.Md;U.prototype.selectVariantsByLabel=U.prototype.zg;U.prototype.selectTextLanguage=U.prototype.ke;U.prototype.selectAudioLanguage=U.prototype.Xe;U.prototype.getTextLanguages=U.prototype.Uf;U.prototype.getAudioLanguages=U.prototype.Df;U.prototype.getTextLanguagesAndRoles=U.prototype.Vf;
535
- U.prototype.getAudioLanguagesAndRoles=U.prototype.Ef;U.prototype.selectVariantTrack=U.prototype.le;U.prototype.selectTextTrack=U.prototype.Ye;U.prototype.getThumbnails=U.prototype.Xf;U.prototype.getImageTracks=U.prototype.Jf;U.prototype.getTextTracks=U.prototype.Kb;U.prototype.getVariantTracks=U.prototype.Sa;U.prototype.cancelTrickPlay=U.prototype.Gd;U.prototype.trickPlay=U.prototype.Fg;U.prototype.getPlaybackRate=U.prototype.Uc;U.prototype.isBuffering=U.prototype.Kd;U.prototype.getKeyStatuses=U.prototype.Tc;
536
- U.prototype.getExpiration=U.prototype.mc;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.ag;U.prototype.seekRange=U.prototype.zc;U.prototype.isAudioOnly=U.prototype.cg;U.prototype.isInProgress=U.prototype.pb;U.prototype.isLive=U.prototype.T;U.prototype.getAdManager=U.prototype.Le;U.prototype.getAssetUri=U.prototype.Jd;U.prototype.getNetworkingEngine=U.prototype.nc;U.prototype.getMediaElement=U.prototype.Pf;
537
- U.prototype.getLoadMode=U.prototype.Lf;U.prototype.resetConfiguration=U.prototype.xg;U.prototype.getBufferFullness=U.prototype.Ff;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.Kg;U.prototype.unload=U.prototype.we;U.prototype.detach=U.prototype.detach;U.prototype.attachCanvas=U.prototype.rf;U.prototype.attach=U.prototype.ac;
538
- U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return D(function(h){if(1==h.g)return b={},a?u(h,Sg(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(qc()){for(var l in Zg)k[l]=!0;for(var m in ah)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]=qc()?!!Zg[n]:rc(n);for(var p in l)k[p]=
539
- qc()?!!ah[p]:rc(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="ac-4",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",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(ka(ej));
540
- k={};p=t(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=qc()?hd(l)?!0:jb(l)||Wc(l):rc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=yn;for(g in f)e[g]=f[g]();return h.return(e)})};
541
- U.isBrowserSupported=function(){window.Promise||cb("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||vc("Trident/"))return!1;var a=Bc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:qc()?!0:rc("application/x-mpegurl")};U.setAdManagerFactory=function(a){Zl=a};
542
- U.registerSupportPlugin=function(a,b){yn[a]=b};U.prototype.destroy=U.prototype.destroy;var om=0,Wl=1,Mm=2,Ym=3;U.LoadMode={DESTROYED:om,NOT_LOADED:Wl,MEDIA_SOURCE:Mm,SRC_EQUALS:Ym};U.version="v4.3.14";var zn=["4","3"];ye=new function(a){this.g=a;this.i=ze;this.h=Ae}(new we(Number(zn[0]),Number(zn[1])));
533
+ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new K(2,4,4012,a);}function Vm(a){if(!a.variants.some(oe))throw new K(2,4,4032);}function un(a,b){D(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=om&&a.dispatchEvent(b);B(c)})}function ln(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(vd(c.language)):b.add("und");return b}
534
+ function kn(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=vd(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){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
535
+ h.push({language:l,role:m,label:n})}});return h}function pm(){return new K(2,7,7E3)}function im(a,b,c,d,e,f){return d==a&&e.mediaElement==f.mediaElement&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function hl(){return{mediaElement:null,mimeType:null,startTime:null,kd:NaN,uri:null}}function qm(a){return new Promise(function(b,c){a.sb=function(){return c(pm())};a.fd=function(){return b()};a.onError=function(d){return c(d)};a.hd=function(){return c(pm())}})}G("shaka.Player",S);
536
+ S.prototype.setVideoContainer=S.prototype.ef;S.prototype.getManifestParserFactory=S.prototype.Of;S.prototype.getManifest=S.prototype.Nf;S.prototype.retryStreaming=S.prototype.fe;S.prototype.setMaxHardwareResolution=S.prototype.oe;S.prototype.addChaptersTrack=S.prototype.mf;S.prototype.addThumbnailsTrack=S.prototype.pf;S.prototype.addTextTrackAsync=S.prototype.nf;S.prototype.getStats=S.prototype.getStats;S.prototype.getBufferedInfo=S.prototype.Pa;S.prototype.getPresentationStartTimeAsDate=S.prototype.Me;
537
+ S.prototype.getPlayheadTimeAsDate=S.prototype.Tf;S.prototype.setTextTrackVisibility=S.prototype.bf;S.prototype.getChapters=S.prototype.Gf;S.prototype.getChaptersTracks=S.prototype.Le;S.prototype.isTextTrackVisible=S.prototype.Md;S.prototype.selectVariantsByLabel=S.prototype.Ag;S.prototype.selectTextLanguage=S.prototype.je;S.prototype.selectAudioLanguage=S.prototype.We;S.prototype.getTextLanguages=S.prototype.Vf;S.prototype.getAudioLanguages=S.prototype.Df;S.prototype.getTextLanguagesAndRoles=S.prototype.Wf;
538
+ S.prototype.getAudioLanguagesAndRoles=S.prototype.Ef;S.prototype.selectVariantTrack=S.prototype.ke;S.prototype.selectTextTrack=S.prototype.Xe;S.prototype.getThumbnails=S.prototype.Yf;S.prototype.getImageTracks=S.prototype.Jf;S.prototype.getTextTracks=S.prototype.Kb;S.prototype.getVariantTracks=S.prototype.Ra;S.prototype.cancelTrickPlay=S.prototype.Gd;S.prototype.trickPlay=S.prototype.Gg;S.prototype.getPlaybackRate=S.prototype.Uc;S.prototype.isBuffering=S.prototype.Kd;S.prototype.getKeyStatuses=S.prototype.Tc;
539
+ S.prototype.getExpiration=S.prototype.mc;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.bg;S.prototype.seekRange=S.prototype.yc;S.prototype.isAudioOnly=S.prototype.dg;S.prototype.isInProgress=S.prototype.pb;S.prototype.isLive=S.prototype.T;S.prototype.getAdManager=S.prototype.Ke;S.prototype.getAssetUri=S.prototype.Jd;S.prototype.getNetworkingEngine=S.prototype.nc;S.prototype.getMediaElement=S.prototype.Qf;
540
+ S.prototype.getLoadMode=S.prototype.Mf;S.prototype.resetConfiguration=S.prototype.yg;S.prototype.getBufferFullness=S.prototype.Ff;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.configure=S.prototype.configure;S.prototype.load=S.prototype.load;S.prototype.updateStartTime=S.prototype.Lg;S.prototype.unload=S.prototype.ve;S.prototype.detach=S.prototype.detach;S.prototype.attachCanvas=S.prototype.rf;S.prototype.attach=S.prototype.ac;
541
+ S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return D(function(h){if(1==h.g)return b={},a?u(h,Tg(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(qc()){for(var l in $g)k[l]=!0;for(var m in bh)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]=qc()?!!$g[n]:rc(n);for(var p in l)k[p]=
542
+ qc()?!!bh[p]:rc(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="ac-4",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",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(ka(fj));
543
+ k={};p=t(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=qc()?id(l)?!0:ib(l)||Wc(l):rc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=yn;for(g in f)e[g]=f[g]();return h.return(e)})};
544
+ S.isBrowserSupported=function(){window.Promise||bb("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||vc("Trident/"))return!1;var a=Bc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:qc()?!0:rc("application/x-mpegurl")};S.setAdManagerFactory=function(a){Zl=a};
545
+ S.registerSupportPlugin=function(a,b){yn[a]=b};S.prototype.destroy=S.prototype.destroy;var om=0,Wl=1,Mm=2,Ym=3;S.LoadMode={DESTROYED:om,NOT_LOADED:Wl,MEDIA_SOURCE:Mm,SRC_EQUALS:Ym};S.version="v4.3.16";var zn=["4","3"];ze=new function(a){this.g=a;this.i=Ae;this.h=Be}(new xe(Number(zn[0]),Number(zn[1])));
543
546
  var xn=["output-restricted","internal-error"],yn={},Zl=null,nm={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"},rn={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
544
- ssa:"text/x-ssa",ass:"text/x-ssa"};function An(){this.h=[];this.j=this.i=this.g=0};function W(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.j=this.g.getVolume();this.l=new sf;this.l.C(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.l.C(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=W.prototype;r.getDuration=function(){return this.h.getDuration()};r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.g.getRemainingTime()};r.isPaused=function(){return this.i};
547
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function An(){this.h=[];this.j=this.i=this.g=0};function U(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.j=this.g.getVolume();this.l=new tf;this.l.C(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.l.C(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=U.prototype;r.getDuration=function(){return this.h.getDuration()};r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.g.getRemainingTime()};r.isPaused=function(){return this.i};
545
548
  r.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.g.getAdSkippableState()};r.skip=function(){return this.g.skip()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.resume()};r.getVolume=function(){return this.g.getVolume()};r.setVolume=function(a){return this.g.setVolume(a)};r.isMuted=function(){return 0==this.g.getVolume()};
546
549
  r.isLinear=function(){return this.h.isLinear()};r.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){a?(this.j=this.getVolume(),this.setVolume(0)):this.setVolume(this.j)};r.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
547
- r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.h.getTitle()};r.getDescription=function(){return this.h.getDescription()};r.release=function(){this.g=this.h=null};G("shaka.ads.ClientSideAd",W);W.prototype.release=W.prototype.release;W.prototype.getDescription=W.prototype.getDescription;W.prototype.getTitle=W.prototype.getTitle;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;
548
- W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;W.prototype.isLinear=W.prototype.isLinear;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;W.prototype.skip=W.prototype.skip;W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;
549
- W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function Bn(a,b,c,d){var e=this;this.o=a;this.i=b;this.u=!1;this.s=null;this.A=NaN;this.l=d;this.j=null;this.h=new sf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.3.14");this.g=null;this.h.ca(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Cn(e,f)});this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
550
- function(f){Dn(e,f)});this.h.C(this.i,"ended",function(){e.m.contentComplete()});this.h.ca(this.i,"play",function(){e.u=!0})}Bn.prototype.stop=function(){this.g&&this.g.stop();this.o&&tl(this.o)};Bn.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function Dn(a,b){b.getError();En(a,null);a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
551
- function Cn(a,b){a.l(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.A)));a.g=b.getAdsManager(a.i);a.l(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=t(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Fn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Gn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.C(a.i,"loadeddata",
552
- function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Gn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Gn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.C(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Gn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.u?a.g.start():a.h.ca(a.i,"play",
550
+ r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.h.getTitle()};r.getDescription=function(){return this.h.getDescription()};r.release=function(){this.g=this.h=null};G("shaka.ads.ClientSideAd",U);U.prototype.release=U.prototype.release;U.prototype.getDescription=U.prototype.getDescription;U.prototype.getTitle=U.prototype.getTitle;U.prototype.getPositionInSequence=U.prototype.getPositionInSequence;
551
+ U.prototype.getSequenceLength=U.prototype.getSequenceLength;U.prototype.setMuted=U.prototype.setMuted;U.prototype.resize=U.prototype.resize;U.prototype.isLinear=U.prototype.isLinear;U.prototype.isMuted=U.prototype.isMuted;U.prototype.setVolume=U.prototype.setVolume;U.prototype.getVolume=U.prototype.getVolume;U.prototype.play=U.prototype.play;U.prototype.pause=U.prototype.pause;U.prototype.skip=U.prototype.skip;U.prototype.canSkipNow=U.prototype.canSkipNow;U.prototype.getTimeUntilSkippable=U.prototype.getTimeUntilSkippable;
552
+ U.prototype.isSkippable=U.prototype.isSkippable;U.prototype.isPaused=U.prototype.isPaused;U.prototype.getRemainingTime=U.prototype.getRemainingTime;U.prototype.getMinSuggestedDuration=U.prototype.getMinSuggestedDuration;U.prototype.getDuration=U.prototype.getDuration;function Bn(a,b,c,d){var e=this;this.o=a;this.i=b;this.u=!1;this.s=null;this.A=NaN;this.l=d;this.j=null;this.h=new tf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.3.16");this.g=null;this.h.ba(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Cn(e,f)});this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
553
+ function(f){Dn(e,f)});this.h.C(this.i,"ended",function(){e.m.contentComplete()});this.h.ba(this.i,"play",function(){e.u=!0})}Bn.prototype.stop=function(){this.g&&this.g.stop();this.o&&tl(this.o)};Bn.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function Dn(a,b){b.getError();En(a,null);a.l(new N("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
554
+ function Cn(a,b){a.l(new N("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.A)));a.g=b.getAdsManager(a.i);a.l(new N("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=t(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new N("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Fn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Gn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.C(a.i,"loadeddata",
555
+ function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Gn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Gn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.C(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Gn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.u?a.g.start():a.h.ba(a.i,"play",
553
556
  function(){a.u=!0;a.g.start()})}catch(e){En(a,null)}}function Gn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
554
- function Fn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new O(d,c))}a.h.C(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Dn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Hn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.STARTED,function(c){Hn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.C(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
557
+ function Fn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new N(d,c))}a.h.C(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Dn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Hn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.STARTED,function(c){Hn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.C(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
555
558
  function(c){b(c,"ad-third-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){En(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){En(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
556
559
  a.h.C(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.C(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.C(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.C(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
557
560
  a.h.C(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.C(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.C(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.C(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.C(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.C(a.g,
558
561
  google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.C(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.C(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
559
- function Hn(a,b){var c=b.getAd();c?(a.j=new W(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new O("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause(),a.i.muted?(b=a.j,b.j=a.i.volume,b.g.setVolume(0)):a.j.setVolume(a.i.volume))):cb("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
560
- function En(a,b){a.l(new O("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.ended||a.i.play())};function X(a,b){this.i=a;this.h=null;this.g=b}r=X.prototype;r.getDuration=function(){return this.h?this.h.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.i.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
562
+ function Hn(a,b){var c=b.getAd();c?(a.j=new U(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new N("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause(),a.i.muted?(b=a.j,b.j=a.i.volume,b.g.setVolume(0)):a.j.setVolume(a.i.volume))):bb("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
563
+ function En(a,b){a.l(new N("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.ended||a.i.play())};function X(a,b){this.i=a;this.h=null;this.g=b}r=X.prototype;r.getDuration=function(){return this.h?this.h.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.i.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
561
564
  r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};r.isLinear=function(){return!0};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};
562
565
  r.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.i.getTitle()};r.getDescription=function(){return this.i.getDescription()};r.release=function(){this.g=this.h=this.i=null};G("shaka.ads.ServerSideAd",X);X.prototype.release=X.prototype.release;X.prototype.getDescription=X.prototype.getDescription;X.prototype.getTitle=X.prototype.getTitle;
563
566
  X.prototype.getPositionInSequence=X.prototype.getPositionInSequence;X.prototype.getSequenceLength=X.prototype.getSequenceLength;X.prototype.setMuted=X.prototype.setMuted;X.prototype.resize=X.prototype.resize;X.prototype.isLinear=X.prototype.isLinear;X.prototype.isMuted=X.prototype.isMuted;X.prototype.setVolume=X.prototype.setVolume;X.prototype.getVolume=X.prototype.getVolume;X.prototype.play=X.prototype.play;X.prototype.pause=X.prototype.pause;X.prototype.skip=X.prototype.skip;
564
- X.prototype.canSkipNow=X.prototype.canSkipNow;X.prototype.getTimeUntilSkippable=X.prototype.getTimeUntilSkippable;X.prototype.isSkippable=X.prototype.isSkippable;X.prototype.isPaused=X.prototype.isPaused;X.prototype.getRemainingTime=X.prototype.getRemainingTime;X.prototype.getMinSuggestedDuration=X.prototype.getMinSuggestedDuration;X.prototype.getDuration=X.prototype.getDuration;function In(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.G=NaN;this.i=d;this.F=!1;this.u=this.m=this.o=null;this.A="";this.D=[];this.h=new sf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new O("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Jn(e,f)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.A.length?
565
- e.j.resolve(e.A):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new X(f,e.l);e.u&&(e.m.h=e.u);e.i(new O("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
566
- var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.u=f.getStreamData().adProgressData;e.m&&(e.m.h=e.u)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new O("ad-first-quartile"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new O("ad-midpoint"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new O("ad-third-quartile"))});
567
- this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new O("ad-complete"));e.i(new O("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new O("ad-skipped"));e.i(new O("ad-stopped"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.D=
568
- f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}In.prototype.stop=function(){this.A="";this.o=null;this.D=[]};In.prototype.release=function(){this.stop();this.h&&this.h.release()};In.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
569
- function Jn(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.F||a.h.C(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){$e.call(this);this.g=this.i=null;this.h=new An;this.j=navigator.language}ta(Y,$e);r=Y.prototype;r.setLocale=function(a){this.j=a};r.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new L(2,10,1E4);this.i&&this.i.release();this.i=new Bn(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)})};
570
- r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);$e.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.h=new An};r.requestClientSideAds=function(a){if(!this.i)throw new L(1,10,10001);var b=this.i;b.A=Date.now()/1E3;b.m.requestAds(a)};
571
- r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new L(2,10,10002);this.g&&this.g.release();this.g=new In(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)})};
572
- r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new L(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&cb('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.3.14";c=this.g;c.j?a=Promise.reject(new L(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
573
- (c.F=!0),c.j=new nc,c.g.requestStream(a),c.A=b||"",c.G=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new L(1,10,10003);(a.mpt||a.mpv)&&cb('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.3.14";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new L(1,10,10003);return this.g.D};
567
+ X.prototype.canSkipNow=X.prototype.canSkipNow;X.prototype.getTimeUntilSkippable=X.prototype.getTimeUntilSkippable;X.prototype.isSkippable=X.prototype.isSkippable;X.prototype.isPaused=X.prototype.isPaused;X.prototype.getRemainingTime=X.prototype.getRemainingTime;X.prototype.getMinSuggestedDuration=X.prototype.getMinSuggestedDuration;X.prototype.getDuration=X.prototype.getDuration;function In(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.G=NaN;this.i=d;this.F=!1;this.u=this.m=this.o=null;this.A="";this.D=[];this.h=new tf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new N("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Jn(e,f)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.A.length?
568
+ e.j.resolve(e.A):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new X(f,e.l);e.u&&(e.m.h=e.u);e.i(new N("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
569
+ var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.u=f.getStreamData().adProgressData;e.m&&(e.m.h=e.u)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new N("ad-first-quartile"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new N("ad-midpoint"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new N("ad-third-quartile"))});
570
+ this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new N("ad-complete"));e.i(new N("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new N("ad-skipped"));e.i(new N("ad-stopped"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.D=
571
+ f;e.i(new N("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}In.prototype.stop=function(){this.A="";this.o=null;this.D=[]};In.prototype.release=function(){this.stop();this.h&&this.h.release()};In.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
572
+ function Jn(a,b){a.i(new N("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.F||a.h.C(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){af.call(this);this.g=this.i=null;this.h=new An;this.j=navigator.language}ta(Y,af);r=Y.prototype;r.setLocale=function(a){this.j=a};r.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new K(2,10,1E4);this.i&&this.i.release();this.i=new Bn(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)})};
573
+ r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);af.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new N("ad-stopped"));this.h=new An};r.requestClientSideAds=function(a){if(!this.i)throw new K(1,10,10001);var b=this.i;b.A=Date.now()/1E3;b.m.requestAds(a)};
574
+ r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new K(2,10,10002);this.g&&this.g.release();this.g=new In(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)})};
575
+ r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new K(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&bb('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.3.16";c=this.g;c.j?a=Promise.reject(new K(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
576
+ (c.F=!0),c.j=new mc,c.g.requestStream(a),c.A=b||"",c.G=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new K(1,10,10003);(a.mpt||a.mpv)&&bb('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.3.16";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new K(1,10,10003);return this.g.D};
574
577
  r.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};G("shaka.ads.AdManager",Y);
575
578
  Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;
576
579
  Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";
577
580
  Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";
578
- Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";Zl=function(){return new Y};function Kn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof O){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=t(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=t(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
579
- TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(Ei(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
581
+ Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";Zl=function(){return new Y};function Kn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof N){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=t(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=t(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
582
+ TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(Fi(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
580
583
  function Ln(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=Mn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
581
584
  function Mn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
582
585
  var Nn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),On="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Pn=["loop","playbackRate"],Qn=["pause","play"],Rn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
583
586
  isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Sn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Tn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Un=[["getConfiguration","configure"]],Vn=[["isTextTrackVisible","setTextTrackVisibility"]],Wn="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
584
- Xn=["attach","attachCanvas","detach","load","unload"];function Yn(a,b,c,d,e,f,g){var h=this;this.G=a;this.N=g;this.j=new M(b);this.P=c;this.u=!1;this.s=d;this.F=e;this.J=f;this.h=this.m=!1;this.L="";this.o=null;this.A=function(){return Zn(h)};this.D=function(k,l){k=Ln(l);switch(k.type){case "event":var m=k.targetName,n=Ye(k.event);h.s(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.u&&(h.P(),h.u=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new L(p.severity,p.category,
585
- p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.l=null;$n.add(this)}r=Yn.prototype;r.destroy=function(){$n.delete(this);ao(this);bo&&co(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.D=this.A=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.wa=function(){return this.h};r.ee=function(){return this.L};
586
- r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Rb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.N,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t($n),d=c.next();!d.done;d=c.next())eo(d.value,b)},function(b){for(var c=t($n),d=c.next();!d.done;d=c.next())d=d.value,fo="available"==b,d.j.Rb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});fo&&this.j.O(go);(a=bo)&&a.status!=chrome.cast.SessionStatus.STOPPED?
587
- eo(this,a):bo=null}else window.__onGCastApiAvailable!==ho&&(io=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=ho)};r.me=function(a){this.o=a;this.h&&jo(this,{type:"appData",appData:this.o})};r.cast=function(a){var b=this;return D(function(c){if(!b.m)throw new L(1,8,8E3);if(!fo)throw new L(1,8,8001);if(b.h)throw new L(1,8,8002);b.l=new nc;chrome.cast.requestSession(function(d){return ko(b,a,d)},function(d){return lo(b,d)});return u(c,b.l,0)})};
588
- function mo(a){if(a.h){var b=a.J();chrome.cast.requestSession(function(c){return ko(a,b,c)},function(c){return lo(a,c)})}}r.Gb=function(){if(this.h){ao(this);if(bo){co(this);try{bo.stop(function(){},function(){})}catch(a){}bo=null}Zn(this)}};
589
- r.get=function(a,b){var c=this;if("video"==a){if(Qn.includes(b))return function(){return c.Ve.apply(c,[a,b].concat(ka(Na.apply(0,arguments))))}}else if("player"==a){if(Tn[b]&&!this.get("player","isLive")())return function(){};if(Wn.includes(b))return function(){return c.Ve.apply(c,[a,b].concat(ka(Na.apply(0,arguments))))};if(Xn.includes(b))return function(){return c.ug.apply(c,[a,b].concat(ka(Na.apply(0,arguments))))};if(Rn[b]||Sn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
590
- r.set=function(a,b,c){this.g[a][b]=c;jo(this,{type:"set",targetName:a,property:b,value:c})};function ko(a,b,c){bo=c;c.addUpdateListener(a.A);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);Zn(a);jo(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function lo(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 L(2,8,c,b))}
591
- r.Ve=function(a,b){jo(this,{type:"call",targetName:a,methodName:b,args:Na.apply(2,arguments)})};r.ug=function(a,b){var c=Na.apply(2,arguments),d=new nc,e=this.H.toString();this.H++;this.i[e]=d;try{jo(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function eo(a,b){var c=a.J();a.l=new nc;a.u=!0;ko(a,c,b)}function co(a){var b=bo;b.removeUpdateListener(a.A);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
592
- function Zn(a){var b=bo?"connected"==bo.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};ao(a)}a.h=b;a.L=b?bo.receiver.friendlyName:"";a.j.Rb()}function ao(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new L(1,7,7E3))}}function jo(a,b){b=Kn(b);var c=bo;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},fb)}catch(d){throw b=new L(2,8,8005,d),c=new O("error",(new Map).set("detail",b)),a.s("player",c),a.Gb(),b;}}var go=.02,fo=!1,bo=null,io=null,$n=new Set;
593
- function ho(a){io?window.__onGCastApiAvailable=io:delete window.__onGCastApiAvailable;io=null;if(a)for(var b=t($n),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function no(a,b,c,d){d=void 0===d?!1:d;$e.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.D=c;this.A=d;this.u=new Map;this.g=new Yn(c,function(){return oo(e)},function(){return po(e)},function(f,g){return qo(e,f,g)},function(){return ro(e)},function(){return so(e)},d);to(this)}ta(no,$e);r=no.prototype;
594
- r.destroy=function(a){a&&this.g.Gb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;$e.prototype.release.call(this);return Promise.all(a)};r.$f=function(){return this.l};r.Rf=function(){return this.s};r.uf=function(){return this.g.m&&fo};r.wa=function(){return this.g.wa()};r.ee=function(){return this.g.ee()};
595
- r.cast=function(){var a=this,b;return D(function(c){return 1==c.g?(b=so(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.we(),0):c.return()})};r.me=function(a){this.g.me(a)};r.Eg=function(){mo(this.g)};r.Gb=function(){this.g.Gb()};
596
- r.vf=function(a,b){b=void 0===b?!1:b;var c=this;return D(function(d){if(1==d.g){if(a==c.D&&b==c.A)return d.return();c.D=a;c.A=b;c.g.Gb();return u(d,c.g.destroy(),2)}c.g=null;c.g=new Yn(a,function(){return oo(c)},function(){return po(c)},function(e,f){return qo(c,e,f)},function(){return ro(c)},function(){return so(c)},b);c.g.init();B(d)})};
597
- function to(a){a.g.init();a.m=new sf;for(var b=t(Nn),c=b.next();!c.done;c=b.next())a.m.C(a.i,c.value,function(f){a.g.wa()||(f=Ye(f),a.j.dispatchEvent(f))});for(var d in Ze)a.m.C(a.h,Ze[d],function(f){a.g.wa()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Vb=e,Object.defineProperty(a.l,b.Vb,{configurable:!1,enumerable:!0,get:function(f){return function(){return uo(a,f.Vb)}}(b),set:function(f){return function(g){var h=f.Vb;a.g.wa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Vb:b.Vb};a.s={};vo(a,
598
- function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return wo(a,f)}})});xo(a);a.j=new $e;a.j.$c=a.l;a.o=new $e;a.o.$c=a.s}function xo(a){var b=new Map;vo(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.u.set(c,d):a.u.set(d,c)):b.set(d,c)})}
599
- function vo(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
600
- function so(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Jd(),startTime:null};a.i.pause();for(var c=t(Pn),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(Un);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(Vn);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 oo(a){var b=new O("caststatuschanged");a.dispatchEvent(b)}
601
- function po(a){var b=new O(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
602
- function ro(a){for(var b=t(Un),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")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(Pn);for(d=c.next();!d.done;d=c.next())d=
603
- d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Pn),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(Vn);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.bf(h);g&&a.h.ke(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new O("error",l);a.h.dispatchEvent(l)})}
604
- function uo(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.wa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.wa()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
605
- function wo(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.nc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.Le()};
606
- if("setVideoContainer"==b)return function(c){return a.h.ef(c)};if(a.g.wa()){if("getManifest"==b||"drmInfo"==b)return function(){cb(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){cb(b+"() does not work while casting!");return Promise.resolve()}}return a.g.wa()&&0==Object.keys(a.g.g.video).length&&(Rn[b]||Sn[b])||!a.g.wa()?a.h[b].bind(a.h):a.g.get("player",b)}
607
- function qo(a,b,c){a.g.wa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}G("shaka.cast.CastProxy",no);no.prototype.changeReceiverId=no.prototype.vf;no.prototype.forceDisconnect=no.prototype.Gb;no.prototype.suggestDisconnect=no.prototype.Eg;no.prototype.setAppData=no.prototype.me;no.prototype.cast=no.prototype.cast;no.prototype.receiverName=no.prototype.ee;no.prototype.isCasting=no.prototype.wa;no.prototype.canCast=no.prototype.uf;no.prototype.getPlayer=no.prototype.Rf;
608
- no.prototype.getVideo=no.prototype.$f;no.prototype.destroy=no.prototype.destroy;function yo(a,b,c,d){$e.call(this);var e=this;this.g=a;this.h=b;this.j=new sf;this.H={video:a,player:b};this.D=c||function(){};this.J=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.A=!1;this.u=!0;this.s=this.l=null;this.G=new M(function(){zo(e)});Ao(this)}ta(yo,$e);r=yo.prototype;r.isConnected=function(){return this.F};r.dg=function(){return this.o};r.Cg=function(a){this.i=a};r.yf=function(){this.i=null};
609
- r.Dg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Bg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Ag=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
610
- r.destroy=function(){var a=this,b,c;return D(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.H=null,a.D=null,a.F=!1,a.o=!0,a.l=null,a.s=null,$e.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();B(d)})};
611
- function Ao(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Bo(a)};b.onSenderDisconnected=function(){return Bo(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Co(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Co(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return Do(a,
612
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Eo(a,e)};b.start();b=t(Nn);for(var c=b.next();!c.done;c=b.next())a.j.C(a.g,c.value,function(e){return Fo(a,"video",e)});for(var d in Ze)a.j.C(a.h,Ze[d],function(e){return Fo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.oe(3840,2160):a.h.oe(1920,1080);a.j.C(a.g,"loadeddata",function(){a.A=!0});a.j.C(a.h,"loading",function(){a.o=
613
- !1;Go(a)});a.j.C(a.g,"playing",function(){a.o=!1;Go(a)});a.j.C(a.g,"pause",function(){Go(a)});a.j.C(a.h,"unloading",function(){a.o=!0;Go(a)});a.j.C(a.g,"ended",function(){(new M(function(){a.g&&a.g.ended&&(a.o=!0,Go(a))})).O(Ho)})}function Bo(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Go(a)}
614
- function Go(a){var b;D(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c.return();b=new O("caststatuschanged");a.dispatchEvent(b);Io(a)||Jo(a);B(c)})}
615
- function Ko(a,b,c){var d,e,f,g,h,k,l,m,n,p;D(function(q){switch(q.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.D(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,xa(q,5),u(q,a.h.load(b.manifest,b.startTime),7)):u(q,Promise.resolve(),3);case 7:za(q,3);break;case 5:return g=Aa(q),h=(new Map).set("detail",g),k=new O("error",h),a.h&&a.h.dispatchEvent(k),q.return();case 3:if(!a.h)return q.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
616
- a.g.autoplay=f;b.manifest&&(a.g.play(),Jo(a));B(q)}})}function Fo(a,b,c){a.h&&(zo(a),Co(a,{type:"event",targetName:b,event:c},a.l))}
617
- function zo(a){a.G.O(Lo);for(var b={video:{},player:{}},c=t(On),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 Tn)0==a.m%Tn[e]&&(b.player[e]=a.h[e]());for(var f in Rn)0==a.m%Rn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Co(a,{type:"update",update:b},a.l);for(var g in Sn)0==a.m%Sn[g]&&(b={player:{}},b.player[g]=a.h[g](),Co(a,{type:"update",update:b},a.l));a.A&&(a.m+=
618
- 1);Io(a)}function Io(a){return a.u&&(a.g.duration||a.h.T())?(Mo(a),a.u=!1,!0):!1}function Mo(a,b){var c={contentId:a.h.Jd(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Jo(a,void 0===b?0:b,c)}
619
- function Eo(a,b){var c=Ln(b.data);switch(c.type){case "init":a.m=0;a.A=!1;a.u=!0;Ko(a,c.initState,c.appData);zo(a);break;case "appData":a.D(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
620
- "player"==d&&"load"==e&&(a.m=0,a.A=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return No(a,g,f,null)},function(h){return No(a,g,f,h)})}}
621
- function Do(a,b){var c=Ln(b.data);switch(c.type){case "PLAY":a.g.play();Jo(a);break;case "PAUSE":a.g.pause();Jo(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Jo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Jo(a));break;case "STOP":a.h.we().then(function(){a.h&&Jo(a)});break;case "GET_STATUS":Mo(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
622
- null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Jo(a);break;case "LOAD":a.m=0;a.A=!1;a.u=!1;b=c.media;d=c.currentTime;e=a.J(b.contentId);f=c.autoplay||!0;a.D(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Mo(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Co(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:Co(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
623
- function No(a,b,c,d){a.h&&Co(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Co(a,b,c,d){a.F&&(a=Kn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Jo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Oo:a.h.Kd()?Po:a.g.paused?Qo:Ro,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Co(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
624
- G("shaka.cast.CastReceiver",yo);yo.prototype.destroy=yo.prototype.destroy;yo.prototype.setContentArtist=yo.prototype.Ag;yo.prototype.setContentImage=yo.prototype.Bg;yo.prototype.setContentTitle=yo.prototype.Dg;yo.prototype.clearContentMetadata=yo.prototype.yf;yo.prototype.setContentMetadata=yo.prototype.Cg;yo.prototype.isIdle=yo.prototype.dg;yo.prototype.isConnected=yo.prototype.isConnected;var Lo=.5,Ho=5,Oo="IDLE",Ro="PLAYING",Po="BUFFERING",Qo="PAUSED";function So(a,b,c){var d=To(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 L(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.je?(e=h.init||e,!1):!0}),f.length&&(a=Uo(e,f,c,g),0==a.length&&(a=[hc("",e)])));if(d.length&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(hc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
625
- t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Ge:g,wh:e,drmInfos:a,Ke:!0}}function Vo(a,b,c,d){var e=So(a,c,d);if(b.Ke){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.Ke=!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 L(2,4,4008);return e.Ge||b.Ge}
626
- function Wo(a){var b=0,c=Rb(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=Nb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
627
- function Xo(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 Yo(a){a=Tf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Oc(a.textContent);a=Wo(a).filter(function(b){return b.type===Zo})[0];if(!a)return"";a=Gc(a.value,!0);return(a=ig(a,"WRMHEADER"))?Xo(a):""}
628
- function Uo(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.je];if(g){var h;if(h=Tf(f.node,"urn:microsoft:playready","pro")){h=Oc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Qf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.je)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,
629
- 226,251,75]),m=new Uint8Array([]);k=[{initData:Qf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=hc(g,f.init||a||h||k);if(g=$o.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function To(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=ap(c.value))&&b.push(c);return b}
630
- function ap(a){var b=a.getAttribute("schemeIdUri"),c=Wf(a,"urn:mpeg:cenc:2013","default_KID"),d=Uf(a,"urn:mpeg:cenc:2013","pssh").map(Yf);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new L(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Oc(f),keyId:null}})}catch(f){throw new L(2,4,4007);}return{node:a,je:b,keyId:c,init:0<e.length?e:null}}
631
- var Zo=1,$o=(new Map).set("com.widevine.alpha",function(a){return(a=Tf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Yo).set("com.microsoft.playready.recommendation",Yo).set("com.microsoft.playready.software",Yo).set("com.microsoft.playready.hardware",Yo).set("org.w3.clearkey",function(a){return(a=Tf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function bp(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=
587
+ Xn=["attach","attachCanvas","detach","load","unload"];function Yn(a,b,c,d,e,f,g){var h=this;this.G=a;this.L=g;this.l=new pc(b);this.N=c;this.s=!1;this.u=d;this.F=e;this.P=f;this.h=this.m=!1;this.J="";this.o=null;this.A=function(){return Zn(h)};this.D=function(k,l){k=Ln(l);switch(k.type){case "event":var m=k.targetName,n=Ze(k.event);h.u(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.s&&(h.N(),h.s=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new K(p.severity,p.category,
588
+ p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;$n.add(this)}r=Yn.prototype;r.destroy=function(){$n.delete(this);ao(this);bo&&co(this);this.l&&(this.l.stop(),this.l=null);this.F=this.u=null;this.h=this.m=!1;this.D=this.A=this.j=this.i=this.g=this.o=null;return Promise.resolve()};r.va=function(){return this.h};r.de=function(){return this.J};
589
+ r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Rb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.L,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t($n),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new mc;d.s=!0;eo(d,e)}},function(b){for(var c=t($n),d=c.next();!d.done;d=c.next())d=d.value,fo="available"==b,d.l.Rb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});fo&&this.l.O(go);(a=bo)&&
590
+ a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new mc,this.s=!0,eo(this,a)):bo=null}else window.__onGCastApiAvailable!==ho&&(io=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=ho)};r.le=function(a){this.o=a;this.h&&jo(this,{type:"appData",appData:this.o})};
591
+ r.cast=function(){var a=this;return D(function(b){if(!a.m)throw new K(1,8,8E3);if(!fo)throw new K(1,8,8001);if(a.h)throw new K(1,8,8002);a.j=new mc;chrome.cast.requestSession(function(c){return eo(a,c)},function(c){return ko(a,c)});return u(b,a.j,0)})};function lo(a){a.h&&chrome.cast.requestSession(function(b){return eo(a,b)},function(b){return ko(a,b)})}r.Gb=function(){if(this.h){ao(this);if(bo){co(this);try{bo.stop(function(){},function(){})}catch(a){}bo=null}Zn(this)}};
592
+ r.get=function(a,b){var c=this;if("video"==a){if(Qn.includes(b))return function(){return c.Ue.apply(c,[a,b].concat(ka(Ja.apply(0,arguments))))}}else if("player"==a){if(Tn[b]&&!this.get("player","isLive")())return function(){};if(Wn.includes(b))return function(){return c.Ue.apply(c,[a,b].concat(ka(Ja.apply(0,arguments))))};if(Xn.includes(b))return function(){return c.vg.apply(c,[a,b].concat(ka(Ja.apply(0,arguments))))};if(Rn[b]||Sn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
593
+ r.set=function(a,b,c){this.g[a][b]=c;jo(this,{type:"set",targetName:a,property:b,value:c})};function eo(a,b){var c=a.P();bo=b;b.addUpdateListener(a.A);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);Zn(a);jo(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function ko(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new K(2,8,c,b))}
594
+ r.Ue=function(a,b){jo(this,{type:"call",targetName:a,methodName:b,args:Ja.apply(2,arguments)})};r.vg=function(a,b){var c=Ja.apply(2,arguments),d=new mc,e=this.H.toString();this.H++;this.i[e]=d;try{jo(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function co(a){var b=bo;b.removeUpdateListener(a.A);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
595
+ function Zn(a){var b=bo?"connected"==bo.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};ao(a)}a.h=b;a.J=b?bo.receiver.friendlyName:"";a.l.Rb()}function ao(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new K(1,7,7E3))}}function jo(a,b){b=Kn(b);var c=bo;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},eb)}catch(d){throw b=new K(2,8,8005,d),c=new N("error",(new Map).set("detail",b)),a.u("player",c),a.Gb(),b;}}var go=.02,fo=!1,bo=null,io=null,$n=new Set;
596
+ function ho(a){io?window.__onGCastApiAvailable=io:delete window.__onGCastApiAvailable;io=null;if(a)for(var b=t($n),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function mo(a,b,c,d){d=void 0===d?!1:d;af.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.D=c;this.A=d;this.u=new Map;this.g=new Yn(c,function(){return no(e)},function(){return oo(e)},function(f,g){return po(e,f,g)},function(){return qo(e)},function(){return ro(e)},d);so(this)}ta(mo,af);r=mo.prototype;
597
+ r.destroy=function(a){a&&this.g.Gb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;af.prototype.release.call(this);return Promise.all(a)};r.ag=function(){return this.l};r.Sf=function(){return this.s};r.uf=function(){return this.g.m&&fo};r.va=function(){return this.g.va()};r.de=function(){return this.g.de()};
598
+ r.cast=function(){var a=this;return D(function(b){return 1==b.g?u(b,a.g.cast(),2):a.h?u(b,a.h.ve(),0):b.return()})};r.le=function(a){this.g.le(a)};r.Fg=function(){lo(this.g)};r.Gb=function(){this.g.Gb()};
599
+ r.vf=function(a,b){b=void 0===b?!1:b;var c=this;return D(function(d){if(1==d.g){if(a==c.D&&b==c.A)return d.return();c.D=a;c.A=b;c.g.Gb();return u(d,c.g.destroy(),2)}c.g=null;c.g=new Yn(a,function(){return no(c)},function(){return oo(c)},function(e,f){return po(c,e,f)},function(){return qo(c)},function(){return ro(c)},b);c.g.init();B(d)})};
600
+ function so(a){a.g.init();a.m=new tf;for(var b=t(Nn),c=b.next();!c.done;c=b.next())a.m.C(a.i,c.value,function(f){a.g.va()||(f=Ze(f),a.j.dispatchEvent(f))});for(var d in $e)a.m.C(a.h,$e[d],function(f){a.g.va()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Vb=e,Object.defineProperty(a.l,b.Vb,{configurable:!1,enumerable:!0,get:function(f){return function(){return to(a,f.Vb)}}(b),set:function(f){return function(g){var h=f.Vb;a.g.va()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Vb:b.Vb};a.s={};uo(a,
601
+ function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return vo(a,f)}})});wo(a);a.j=new af;a.j.$c=a.l;a.o=new af;a.o.$c=a.s}function wo(a){var b=new Map;uo(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.u.set(c,d):a.u.set(d,c)):b.set(d,c)})}
602
+ function uo(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
603
+ function ro(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Jd(),startTime:null};a.i.pause();for(var c=t(Pn),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(Un);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(Vn);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 no(a){var b=new N("caststatuschanged");a.dispatchEvent(b)}
604
+ function oo(a){var b=new N(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
605
+ function qo(a){for(var b=t(Un),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")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(Pn);for(d=c.next();!d.done;d=c.next())d=
606
+ d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Pn),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(Vn);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.bf(h);g&&a.h.je(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new N("error",l);a.h.dispatchEvent(l)})}
607
+ function to(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.va()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.va()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
608
+ function vo(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.nc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.Ke()};
609
+ if("setVideoContainer"==b)return function(c){return a.h.ef(c)};if(a.g.va()){if("getManifest"==b||"drmInfo"==b)return function(){bb(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){bb(b+"() does not work while casting!");return Promise.resolve()}}return a.g.va()&&0==Object.keys(a.g.g.video).length&&(Rn[b]||Sn[b])||!a.g.va()?a.h[b].bind(a.h):a.g.get("player",b)}
610
+ function po(a,b,c){a.g.va()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}G("shaka.cast.CastProxy",mo);mo.prototype.changeReceiverId=mo.prototype.vf;mo.prototype.forceDisconnect=mo.prototype.Gb;mo.prototype.suggestDisconnect=mo.prototype.Fg;mo.prototype.setAppData=mo.prototype.le;mo.prototype.cast=mo.prototype.cast;mo.prototype.receiverName=mo.prototype.de;mo.prototype.isCasting=mo.prototype.va;mo.prototype.canCast=mo.prototype.uf;mo.prototype.getPlayer=mo.prototype.Sf;
611
+ mo.prototype.getVideo=mo.prototype.ag;mo.prototype.destroy=mo.prototype.destroy;function xo(a,b,c,d){af.call(this);var e=this;this.g=a;this.h=b;this.j=new tf;this.H={video:a,player:b};this.D=c||function(){};this.J=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.A=!1;this.u=!0;this.s=this.l=null;this.G=new pc(function(){yo(e)});zo(this)}ta(xo,af);r=xo.prototype;r.isConnected=function(){return this.F};r.eg=function(){return this.o};r.Dg=function(a){this.i=a};r.yf=function(){this.i=null};
612
+ r.Eg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Cg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Bg=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
613
+ r.destroy=function(){var a=this,b,c;return D(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.H=null,a.D=null,a.F=!1,a.o=!0,a.l=null,a.s=null,af.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();B(d)})};
614
+ function zo(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Ao(a)};b.onSenderDisconnected=function(){return Ao(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Bo(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Bo(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return Co(a,
615
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Do(a,e)};b.start();b=t(Nn);for(var c=b.next();!c.done;c=b.next())a.j.C(a.g,c.value,function(e){return Eo(a,"video",e)});for(var d in $e)a.j.C(a.h,$e[d],function(e){return Eo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.oe(3840,2160):a.h.oe(1920,1080);a.j.C(a.g,"loadeddata",function(){a.A=!0});a.j.C(a.h,"loading",function(){a.o=
616
+ !1;Fo(a)});a.j.C(a.g,"playing",function(){a.o=!1;Fo(a)});a.j.C(a.g,"pause",function(){Fo(a)});a.j.C(a.h,"unloading",function(){a.o=!0;Fo(a)});a.j.C(a.g,"ended",function(){(new pc(function(){a.g&&a.g.ended&&(a.o=!0,Fo(a))})).O(Go)})}function Ao(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Fo(a)}
617
+ function Fo(a){var b;D(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c.return();b=new N("caststatuschanged");a.dispatchEvent(b);Ho(a)||Io(a);B(c)})}
618
+ function Jo(a,b,c){var d,e,f,g,h,k,l,m,n,p;D(function(q){switch(q.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.D(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,xa(q,5),u(q,a.h.load(b.manifest,b.startTime),7)):u(q,Promise.resolve(),3);case 7:za(q,3);break;case 5:return g=Aa(q),h=(new Map).set("detail",g),k=new N("error",h),a.h&&a.h.dispatchEvent(k),q.return();case 3:if(!a.h)return q.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
619
+ a.g.autoplay=f;b.manifest&&(a.g.play(),Io(a));B(q)}})}function Eo(a,b,c){a.h&&(yo(a),Bo(a,{type:"event",targetName:b,event:c},a.l))}
620
+ function yo(a){a.G.O(Ko);for(var b={video:{},player:{}},c=t(On),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 Tn)0==a.m%Tn[e]&&(b.player[e]=a.h[e]());for(var f in Rn)0==a.m%Rn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Bo(a,{type:"update",update:b},a.l);for(var g in Sn)0==a.m%Sn[g]&&(b={player:{}},b.player[g]=a.h[g](),Bo(a,{type:"update",update:b},a.l));a.A&&(a.m+=
621
+ 1);Ho(a)}function Ho(a){return a.u&&(a.g.duration||a.h.T())?(Lo(a),a.u=!1,!0):!1}function Lo(a,b){var c={contentId:a.h.Jd(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Io(a,void 0===b?0:b,c)}
622
+ function Do(a,b){var c=Ln(b.data);switch(c.type){case "init":a.m=0;a.A=!1;a.u=!0;Jo(a,c.initState,c.appData);yo(a);break;case "appData":a.D(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
623
+ "player"==d&&"load"==e&&(a.m=0,a.A=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return Mo(a,g,f,null)},function(h){return Mo(a,g,f,h)})}}
624
+ function Co(a,b){var c=Ln(b.data);switch(c.type){case "PLAY":a.g.play();Io(a);break;case "PAUSE":a.g.pause();Io(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Io(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Io(a));break;case "STOP":a.h.ve().then(function(){a.h&&Io(a)});break;case "GET_STATUS":Lo(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
625
+ null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Io(a);break;case "LOAD":a.m=0;a.A=!1;a.u=!1;b=c.media;d=c.currentTime;e=a.J(b.contentId);f=c.autoplay||!0;a.D(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Lo(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Bo(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:Bo(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
626
+ function Mo(a,b,c,d){a.h&&Bo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Bo(a,b,c,d){a.F&&(a=Kn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Io(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?No:a.h.Kd()?Oo:a.g.paused?Po:Qo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Bo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
627
+ G("shaka.cast.CastReceiver",xo);xo.prototype.destroy=xo.prototype.destroy;xo.prototype.setContentArtist=xo.prototype.Bg;xo.prototype.setContentImage=xo.prototype.Cg;xo.prototype.setContentTitle=xo.prototype.Eg;xo.prototype.clearContentMetadata=xo.prototype.yf;xo.prototype.setContentMetadata=xo.prototype.Dg;xo.prototype.isIdle=xo.prototype.eg;xo.prototype.isConnected=xo.prototype.isConnected;var Ko=.5,Go=5,No="IDLE",Qo="PLAYING",Oo="BUFFERING",Po="PAUSED";function Ro(a,b,c){var d=So(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 K(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.ie?(e=h.init||e,!1):!0}),f.length&&(a=To(e,f,c,g),0==a.length&&(a=[gc("",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(gc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
628
+ t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Fe:g,xh:e,drmInfos:a,Je:!0}}function Uo(a,b,c,d){var e=Ro(a,c,d);if(b.Je){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.Je=!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 K(2,4,4008);return e.Fe||b.Fe}
629
+ function Vo(a){var b=0,c=Qb(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=Mb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
630
+ function Wo(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 Xo(a){a=Uf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Oc(a.textContent);a=Vo(a).filter(function(b){return b.type===Yo})[0];if(!a)return"";a=Gc(a.value,!0);return(a=jg(a,"WRMHEADER"))?Wo(a):""}
631
+ function To(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.ie];if(g){var h;if(h=Uf(f.node,"urn:microsoft:playready","pro")){h=Oc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Rf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.ie)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,
632
+ 226,251,75]),m=new Uint8Array([]);k=[{initData:Rf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=gc(g,f.init||a||h||k);if(g=Zo.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function So(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=$o(c.value))&&b.push(c);return b}
633
+ function $o(a){var b=a.getAttribute("schemeIdUri"),c=Xf(a,"urn:mpeg:cenc:2013","default_KID"),d=Vf(a,"urn:mpeg:cenc:2013","pssh").map(Zf);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new K(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Oc(f),keyId:null}})}catch(f){throw new K(2,4,4007);}return{node:a,ie:b,keyId:c,init:0<e.length?e:null}}
634
+ var Yo=1,Zo=(new Map).set("com.widevine.alpha",function(a){return(a=Uf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Xo).set("com.microsoft.playready.recommendation",Xo).set("com.microsoft.playready.software",Xo).set("com.microsoft.playready.hardware",Xo).set("org.w3.clearkey",function(a){return(a=Uf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function ap(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=
632
635
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
633
- function cp(a,b){var c=dp(a,b,"timescale"),d=1;c&&(d=eg(c)||1);var e=dp(a,b,"duration");c=eg(e||"");"image"==a.I.contentType&&(c=gg(e||""));c&&(c/=d);var f=dp(a,b,"startNumber");e=Number(dp(a,b,"presentationTimeOffset"))||0;var g=fg(f||"");if(null==f||null==g)g=1;f=ep(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.U.duration||Infinity;f=Sf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],n=f[l+1],p=$f(m,"t",fg),q=$f(m,"d",fg);m=$f(m,"r",dg);null!=p&&(p-=e);if(!q)break;p=null!=p?p:k;m=m||0;if(0>
634
- m)if(n){n=$f(n,"t",fg);if(null==n)break;else if(p>=n)break;m=Math.ceil((n-p)/q)-1}else{if(Infinity==a)break;else if(p/b>=a)break;m=Math.ceil((a*b-p)/q)-1}0<h.length&&p!=k&&(h[h.length-1].end=p/b);for(n=0;n<=m;++n)k=p+q,h.push({start:p/b,end:k/b,Ig:p}),p=k}b=h}return{timescale:d,ka:c,Qb:g,Wa:e/d||0,xe:e,timeline:b}}function fp(a,b){return[b(a.I),b(a.ma),b(a.da)].filter(rd)}function dp(a,b,c){b=fp(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.getAttribute(c));d=b.next());return a}
635
- function ep(a,b,c){b=fp(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=Rf(d.value,c));d=b.next());return a}
636
- function gp(a,b,c,d,e,f){for(var g=Wf(a,"http://www.w3.org/1999/xlink","href"),h=Wf(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 Se(new L(2,4,4028));if("onLoad"!=h)return Se(new L(2,4,4027));var m=gc([d],[g]);return e.request(0,jf(m,b)).$(function(n){n=kg(n.data,a.tagName);if(!n)return Se(new L(2,4,4001,g));
637
- 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 hp(a,b,c,m[0],e,f+1)})}
638
- function hp(a,b,c,d,e,f){f=void 0===f?0:f;if(Wf(a,"http://www.w3.org/1999/xlink","href")){var g=gp(a,b,c,d,e,f);c&&(g=g.$(void 0,function(){return hp(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"==Wf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(hp(k,b,c,d,e,f)));return We(g).$(function(){return a})};function ip(a,b,c,d,e,f,g){var h,k=(new Ff).M("sidx",function(l){h=jp(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new L(2,3,3004);}
639
- function jp(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.K();if(0==k)throw new L(2,3,3005);if(0==g.version){var l=g.reader.K();var m=g.reader.K()}else l=g.reader.eb(),m=g.reader.eb();g.reader.skip(2);var n=g.reader.de();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.K(),q=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.K();g.reader.skip(4);if(1==q)throw new L(2,3,3006);h.push(new Q(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function kp(a){this.h=Rb(a);this.g=new Cf(this.h,0)}kp.prototype.ja=function(){return this.g.ja()};
640
- function lp(a){var b=mp(a);if(7<b.length)throw new L(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=mp(a);a:{d=t(np);for(var e=d.next();!e.done;e=d.next())if(Lb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ba();else{if(8==b.length&&b[1]&224)throw new L(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.ba()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ba();d=Rb(a.h,a.g.ba(),b);a.g.skip(b);return new op(c,
641
- d)}function mp(a){var b=a.g.ba(),c=a.g.Va();if(0==c)throw new L(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Nb(a.h,b,c)}var np=[[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 op(a,b){this.id=a;this.g=b}
642
- function pp(a){if(8<a.g.byteLength)throw new L(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new L(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 qp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new kp(a.g);for(var n=null,p=null;a.ja();){var q=lp(a);if(187==q.id){var v=rp(q);v&&(q=c*v.Jg,v=b+v.tg,null!=n&&m.push(new Q(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new Q(n+g,d+g,l,p,null,f,g,h,k));return m}
643
- function rp(a){var b=new kp(a.g);a=lp(b);if(179!=a.id)throw new L(2,3,3013);a=pp(a);b=lp(b);if(183!=b.id)throw new L(2,3,3012);b=new kp(b.g);for(var c=0;b.ja();){var d=lp(b);if(241==d.id){c=pp(d);break}}return{Jg:a,tg:c}};function sp(a,b){b=ep(a,b,"Initialization");if(!b)return null;var c=a.I.Aa,d=b.getAttribute("sourceURL");d&&(c=gc(a.I.Aa,[d]));d=0;var e=null;if(b=$f(b,"range",cg))d=b.start,e=b.end;return new wi(function(){return c},d,e,tp(a))}
644
- function up(a,b){var c=Number(dp(a,vp,"presentationTimeOffset"))||0,d=dp(a,vp,"timescale"),e=1;d&&(e=eg(d)||1);var f=c/e||0,g=sp(a,vp);wp(a,g);var h=bf(a);return{Hb:function(){var k=ep(h,vp,"RepresentationIndex");var l=h.I.Aa;k&&(k=k.getAttribute("sourceURL"))&&(l=gc(h.I.Aa,[k]));k=xp(h);return yp(h,b,g,l,k.start,k.end,f)}}}
645
- function yp(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,w,x,y,C,A,z,E;return D(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.$a||!a.U.Ld,l=a.U.start,m=a.U.duration,n=a.I.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.va(),c.Ea,c.na):null],p=null,u(F,Promise.all(v),2);w=F.h;x=w[0];y=w[1]||null;C=null;A=l-g;z=l;E=m?l+m:Infinity;if("mp4"==n)var H=ip(x,e,d,c,A,z,E);else{H=new kp(y);if(440786851!=lp(H).id)throw new L(2,3,3008);var I=lp(H);if(408125543!=I.id)throw new L(2,3,3009);H=I.g.byteOffset;
646
- I=new kp(I.g);for(var J=null;I.ja();){var K=lp(I);if(357149030==K.id){J=K;break}}if(!J)throw new L(2,3,3010);J=new kp(J.g);K=1E6;for(I=null;J.ja();){var P=lp(J);if(2807729==P.id)K=pp(P);else if(17545==P.id)if(4==P.g.byteLength)I=P.g.getFloat32(0);else if(8==P.g.byteLength)I=P.g.getFloat64(0);else throw new L(2,3,3003);}if(null==I)throw new L(2,3,3011);J=K/1E9;I*=J;K=lp(new kp(x));if(475249515!=K.id)throw new L(2,3,3007);H=qp(K,H,J,I,d,c,A,z,E)}C=H;h.Nb(C);q=new Qj(C);k&&q.ab(z,E,!0);return F.return(q)})}
647
- function vp(a){return a.Bc}function xp(a){var b=ep(a,vp,"RepresentationIndex");a=dp(a,vp,"indexRange");a=cg(a||"");b&&(a=$f(b,"range",cg,a));return a}function wp(a,b){zp(a,b);if(!xp(a))throw new L(2,4,4002);}function zp(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=lc&&"mp4"!=c&&"webm"!=c)throw new L(2,4,4006);if("webm"==c&&!b)throw new L(2,4,4005);}
648
- function tp(a){var b=a.I;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.ed,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Ap(a,b){var c=sp(a,Bp),d=Cp(a);if(!d.ka&&!d.timeline&&1<d.Lb.length)throw new L(2,4,4002);if(!d.ka&&!a.U.duration&&!d.timeline&&1==d.Lb.length)throw new L(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new L(2,4,4002);var e=null,f=null;a.da.id&&a.I.id&&(f=b[a.da.id+","+a.I.id])&&(e=f.segmentIndex);var g=Dp(a.U.start,a.U.duration,a.I.Aa,d,c);b=!e;e?e.Mb(g,a.presentationTimeline.Ka()):e=new Qj(g);a.presentationTimeline.Nb(g);a.$a&&a.U.Ld||e.ab(a.U.start,a.U.duration?a.U.start+a.U.duration:
649
- Infinity,b);f&&(f.segmentIndex=e);return{Hb:function(){e&&0!=e.g.length||e.uc(g);return Promise.resolve(e)}}}function Bp(a){return a.fb}function Cp(a){var b=Ep(a);a=cp(a,Bp);var c=a.Qb;0==c&&(c=1);var d=0;a.ka?d=a.ka*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ka:a.ka,startTime:d,Qb:c,Wa:a.Wa,timeline:a.timeline,Lb:b}}
650
- function Dp(a,b,c,d,e){var f=d.Lb.length;d.timeline&&d.timeline.length!=d.Lb.length&&(f=Math.min(d.timeline.length,d.Lb.length));for(var g=a-d.Wa,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={td:m.td},n++){var p=d.Lb[n];m.td=gc(c,[p.jg]);var q=void 0;q=null!=d.ka?l+d.ka:d.timeline?d.timeline[n].end:l+b;k.push(new Q(a+l,a+q,function(v){return function(){return v.td}}(m),p.start,p.end,e,g,a,h));l=q}return k}
651
- function Ep(a){return[a.I.fb,a.ma.fb,a.da.fb].filter(rd).map(function(b){return Sf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Pe&&(a.Pe=!0);var c=b.getAttribute("media");b=$f(b,"mediaRange",cg,{start:0,end:null});return{jg:c,start:b.start,end:b.end}})};function Fp(a,b,c,d,e,f){var g=Gp(a),h=Hp(a);Ip(h);var k=bf(a);if(h.tc)return zp(a,g),{Hb:function(){var q=bp(h.tc,k.I.id,null,k.bandwidth||null,null);q=gc(k.I.Aa,[q]);return yp(k,b,g,q,0,null,h.Wa)}};if(h.ka)return d||"image"===a.ma.contentType||(a.presentationTimeline.Wd(h.ka),a.presentationTimeline.Xd(a.U.start)),{Hb:function(){return Jp(k,h,e,g,f)}};var l=null;d=d=null;a.da.id&&a.I.id&&(d=a.da.id+","+a.I.id,d=c[d])&&(l=d.segmentIndex);var m=Kp(k,h,g);c=a.U.start;var n=a.U.duration?a.U.start+a.U.duration:
652
- Infinity,p=!(a.$a&&a.U.Ld);l?(p&&(new Qj(m)).ab(c,n,!0),l.Mb(m,a.presentationTimeline.Ka())):l=new Qj(m);a.presentationTimeline.Nb(m);p&&l.ab(c,n);d&&a.$a&&(d.segmentIndex=l);return{Hb:function(){l&&0!=l.g.length||l.uc(m);return Promise.resolve(l)}}}function Lp(a){return a.Cc}function Hp(a){var b=cp(a,Lp),c=dp(a,Lp,"media");a=dp(a,Lp,"index");return{ka:b.ka,timescale:b.timescale,Qb:b.Qb,Wa:b.Wa,xe:b.xe,timeline:b.timeline,Td:c,tc:a}}
653
- function Ip(a){var b=a.tc?1:0;b+=a.timeline?1:0;b+=a.ka?1:0;if(0==b)throw new L(2,4,4002);1!=b&&(a.tc&&(a.timeline=null),a.ka=null);if(!a.tc&&!a.Td)throw new L(2,4,4002);}
654
- function Jp(a,b,c,d,e){function f(J){var K=(J-q)*p,P=K+b.Wa,T=K+l;K=T+p;var da=Math.min(K,h());T=new Q(T,da,function(){var N=bp(w,y,J,x,P*v);return gc(C,[N])},0,null,d,A,l,h());T.i=K;return T}function g(){var J=[Math.max(k.Ka(),l),Math.min(k.bb(),h())].map(function(K){return K-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(K){return K+q})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.U.start,m=a.da.id,n=a.U.duration,p=b.ka,q=b.Qb,v=b.timescale,
655
- w=b.Td,x=a.bandwidth||null,y=a.I.id,C=a.I.Aa,A=l-b.Wa,z=g();a=a.$a?Math.max(z[0],z[1]-c+1):z[0];z=z[1];c=[];for(var E=a;E<=z;++E){var F=f(E);c.push(F)}var H=new Qj(c);c=k.bb()<h();E=k.T();if(c||E){var I=Math.max(a,z+1);H.ld(p,function(){var J=k.Ka();H.kb(J);var K=t(g());K.next();K=K.next().value;for(var P=[];I<=K;){var T=f(I);P.push(T);I++}return J>h()&&!P.length?null:P})}return Promise.resolve(H)}
656
- function Kp(a,b,c){var d=a.U.start,e=a.U.duration,f=d-b.Wa;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={sd:h.sd,wd:h.wd,zd:h.zd,pd:h.pd,Cd:h.Cd,qd:h.qd},k++){var l=b.timeline[k],m=l.start,n=l.Ig;l=l.end;h.zd=k+b.Qb;h.Cd=n+b.xe;h.wd=a.I.id;h.pd=a.bandwidth||null;h.sd=b.Td;h.qd=a.I.Aa;g.push(new Q(d+m,d+l,function(p){return function(){var q=bp(p.sd,p.wd,p.zd,p.pd||null,p.Cd);return gc(p.qd,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
657
- function Gp(a){var b=dp(a,Lp,"initialization");if(!b)return null;var c=a.I.id,d=a.bandwidth||null,e=a.I.Aa;return new wi(function(){var f=bp(b,c,null,d,null);return gc(e,[f])},0,null,tp(a))};function Mp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Mp.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=[]};
658
- function Np(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A,z,E,F,H,I,J,K,P,T,da,N,ia,La,Ka,ab,Ta,Ma;return D(function(Ca){if(1==Ca.g){h=mc;for(var ma=t(b),ea=ma.next();!ea.done;ea=ma.next()){ea=ea.value;for(var pa=[],Ya=t(ea.Oc),R=Ya.next();!R.done;R=Ya.next()){R=R.value;for(var Qa=!1,Gb=t(pa),V=Gb.next();!V.done;V=Gb.next())V=V.value,R.id!=V.id&&R.channelsCount==V.channelsCount&&R.language==V.language&&R.bandwidth==V.bandwidth&&R.label==V.label&&R.codecs==V.codecs&&R.mimeType==V.mimeType&&nb(R.roles,
659
- V.roles)&&R.audioSamplingRate==V.audioSamplingRate&&R.primary==V.primary&&(Qa=!0);Qa||pa.push(R)}ea.Oc=pa}ma=t(b);for(ea=ma.next();!ea.done;ea=ma.next()){ea=ea.value;pa=[];Ya=t(ea.md);for(R=Ya.next();!R.done;R=Ya.next()){R=R.value;Qa=!1;Gb=t(pa);for(V=Gb.next();!V.done;V=Gb.next())V=V.value,R.id!=V.id&&R.width==V.width&&R.frameRate==V.frameRate&&R.codecs==V.codecs&&R.mimeType==V.mimeType&&R.label==V.label&&nb(R.roles,V.roles)&&Bf(R.closedCaptions,V.closedCaptions)&&R.bandwidth==V.bandwidth&&(Qa=!0);
660
- Qa||pa.push(R)}ea.md=pa}ma=t(b);for(ea=ma.next();!ea.done;ea=ma.next()){ea=ea.value;pa=[];Ya=t(ea.textStreams);for(R=Ya.next();!R.done;R=Ya.next()){R=R.value;Qa=!1;Gb=t(pa);for(V=Gb.next();!V.done;V=Gb.next())V=V.value,R.id!=V.id&&R.language==V.language&&R.label==V.label&&R.codecs==V.codecs&&R.mimeType==V.mimeType&&R.bandwidth==V.bandwidth&&nb(R.roles,V.roles)&&(Qa=!0);Qa||pa.push(R)}ea.textStreams=pa}ma=t(b);for(ea=ma.next();!ea.done;ea=ma.next()){ea=ea.value;pa=[];Ya=t(ea.imageStreams);for(R=Ya.next();!R.done;R=
661
- Ya.next()){R=R.value;Qa=!1;Gb=t(pa);for(V=Gb.next();!V.done;V=Gb.next())V=V.value,R.id!=V.id&&R.width==V.width&&R.codecs==V.codecs&&R.mimeType==V.mimeType&&(Qa=!0);Qa||pa.push(R)}ea.imageStreams=pa}if(!c&&1==b.length)return k=b[0],a.g=k.Oc,a.h=k.md,a.j=k.textStreams,a.i=k.imageStreams,Ca.B(2);l=-1;for(m=0;m<b.length;m++)n=b[m],a.m.has(n.id)||(a.m.add(n.id),-1==l&&(l=m));if(-1==l)return Ca.return();ma=[];ea=[];pa=[];Ya=[];R=t(b);for(Qa=R.next();!Qa.done;Qa=R.next())Qa=Qa.value,ma.push(Qa.Oc),ea.push(Qa.md),
662
- pa.push(Qa.textStreams),Ya.push(Qa.imageStreams);d=ma;e=ea;f=pa;g=Ya;p=d;q=e;v=f;w=g;x=t(v);for(y=x.next();!y.done;y=x.next())C=y.value,C.push(Op(h.Z));A=t(w);for(z=A.next();!z.done;z=A.next())E=z.value,E.push(Op(h.$b));return u(Ca,Promise.all([Pp(a.g,p,l,Qp,Rp),Pp(a.h,q,l,Qp,Rp),Pp(a.j,v,l,Qp,Rp),Pp(a.i,w,l,Qp,Rp)]),2)}F=0;H=[];if(a.h.length&&a.g.length)for(da=t(a.g),N=da.next();!N.done;N=da.next())for(ia=N.value,La=t(a.h),Ka=La.next();!Ka.done;Ka=La.next())ab=Ka.value,Ta=Vg(ia.drmInfos,ab.drmInfos),
663
- ia.drmInfos.length&&ab.drmInfos.length&&!Ta.length||(Ma=F++,H.push({id:Ma,language:ia.language,primary:ia.primary,audio:ia,video:ab,bandwidth:(ia.bandwidth||0)+(ab.bandwidth||0),drmInfos:Ta,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(I=a.h.concat(a.g),J=t(I),K=J.next();!K.done;K=J.next())P=K.value,T=F++,H.push({id:T,language:P.language,primary:P.primary,audio:P.type==h.jb?P:null,video:P.type==h.ra?P:null,bandwidth:P.bandwidth||0,drmInfos:P.drmInfos,allowedByApplication:!0,
664
- allowedByKeySystem:!0,decodingInfos:[]});a.l=H;B(Ca)})}
665
- function Sp(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A,z,E,F,H,I,J,K,P;return D(function(T){switch(T.g){case 1:b=mc;if(1==a.length)return T.return(a[0]);c=a.map(function(da){return da.filter(function(N){return N.type==b.jb})});d=a.map(function(da){return da.filter(function(N){return N.type==b.ra})});e=a.map(function(da){return da.filter(function(N){return N.type==b.Z})});f=a.map(function(da){return da.filter(function(N){return N.type==b.$b})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
666
- k.push(Tp(b.Z));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Tp(b.$b));return u(T,Pp([],c,0,Up,Vp),2);case 2:return p=T.h,u(T,Pp([],d,0,Up,Vp),3);case 3:return q=T.h,u(T,Pp([],e,0,Up,Vp),4);case 4:return v=T.h,u(T,Pp([],f,0,Up,Vp),5);case 5:w=T.h;x=0;if(q.length&&p.length)for(E=t(p),F=E.next();!F.done;F=E.next())for(H=F.value,I=t(q),J=I.next();!J.done;J=I.next())K=J.value,P=x++,K.variantIds.push(P),H.variantIds.push(P);else for(y=q.concat(p),C=t(y),A=C.next();!A.done;A=C.next())z=A.value,
667
- z.variantIds=[x++];return T.return(q.concat(p).concat(v).concat(w))}})}
668
- function Pp(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,w,x,y,C,A,z,E,F,H,I,J;return D(function(K){switch(K.g){case 1:f=mc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){K.B(4);break}m=l.value;return u(K,Wp(m,b,c,e,g),5);case 5:n=K.h;if(!n)throw new L(2,4,4037);l=k.next();K.B(2);break;case 4:p=t(g);for(q=p.next();!q.done;q=p.next())for(v=q.value,w=t(v),x=w.next();!x.done;x=w.next())y=x.value,(C=Xp(y,b,d,e,g))&&a.push(C);A=t(g);for(q=A.next();!q.done;q=
669
- A.next())for(z=q.value,E={},F=t(z),x=F.next();!x.done;E={Za:E.Za},x=F.next())if(E.Za=x.value,H=E.Za.type==f.Z&&!E.Za.language,I=E.Za.type==f.$b&&!E.Za.tilesLayout,!H&&!I&&(J=a.some(function(P){return function(T){return T.mimeType==P.Za.mimeType&&dd(T.codecs)==dd(P.Za.codecs)}}(E))))throw new L(2,4,4037);return K.return(a)}})}function Wp(a,b,c,d,e){return D(function(f){if(1==f.g)return Yp(b,a),a.matchedStreams?a.segmentIndex?u(f,Zp(a,c),2):f.B(2):f.return(!1);$p(a,c,d,e);return f.return(!0)})}
670
- function Zp(a,b){var c,d,e,f,g,h,k;return D(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof Uj)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.l.push(k.segmentIndex);B(l)})}
671
- function Xp(a,b,c,d,e){var f=c(a);Yp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return D(function(g){if(f.segmentIndex)return g.B(0);f.segmentIndex=new Uj;return u(g,Zp(f,0),0)})});if(!f.matchedStreams||!f.matchedStreams.length)return null;$p(f,0,d,e);return f}function $p(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==yd(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
672
- function Qp(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}
673
- function Up(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
674
- function Rp(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(ka(f),ka(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=Vg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new L(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
675
- (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=Qp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Rp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Rp(a.trickModeVideo,b)}
676
- function Vp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ka(a.keyIds),ka(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ka(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
677
- function Yp(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:aq,video:aq,text:bq,image:cq}[e.type],g={audio:dq,video:eq,text:fq,image:gq}[e.type],h=null;d=t(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}function aq(a,b){var c;!(c=b.mimeType!=a.mimeType||dd(b.codecs)!=dd(a.codecs))&&(c=a.drmInfos)&&(a=a.drmInfos,b=b.drmInfos,c=!(a.length&&b.length?0<Vg(a,b).length:1));return c?!1:!0}
678
- function bq(a,b){return a.language?b.language?a.forced!==b.forced||0==yd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function cq(a){return a.tilesLayout?!0:!1}
679
- function dq(a,b,c){if(a.id==c.id)return!0;var d=yd(a.language,b.language),e=yd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}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;
680
- if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=hq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==iq)return!0;if(d==jq)return!1;d=hq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==iq?!0:d==jq?!1:a.bandwidth&&kq(a.bandwidth,b.bandwidth,c.bandwidth)==iq?!0:!1}
681
- function eq(a,b,c){if(a.id==c.id)return!0;var d=hq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==iq)return!0;if(d==jq)return!1;if(a.frameRate){d=hq(a.frameRate,b.frameRate,c.frameRate);if(d==iq)return!0;if(d==jq)return!1}return a.bandwidth&&kq(a.bandwidth,b.bandwidth,c.bandwidth)==iq?!0:!1}
682
- function fq(a,b,c){if(a.id==c.id)return!0;var d=yd(a.language,b.language),e=yd(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(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}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&&
683
- b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function gq(a,b,c){return a.id==c.id?!0:hq(a.width*a.height,b.width*b.height,c.width*c.height)==iq?!0:!1}
684
- function Tp(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,external:!1}}
685
- function Op(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Qj([]),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,external:!1}}
686
- function hq(a,b,c){if(b==a&&a!=c)return jq;if(c==a&&a!=b)return iq;if(b>a){if(c<=a||c-a<b-a)return iq;if(c-a>b-a)return jq}else{if(c>a)return jq;if(a-c<a-b)return iq;if(a-c>a-b)return jq}return lq}function kq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?iq:b<a?jq:lq}var iq=1,lq=0,jq=-1;function mq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.G=1;this.l={};this.L={};this.j=new Mp;this.D=0;this.H=new Wa(5);this.F=new M(function(){nq(a)});this.s=new cf;this.u=null;this.J=[];this.A=Infinity;this.o=!1}r=mq.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this,d;return D(function(e){if(1==e.g)return c.o=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,oq(c),2);d=e.h;c.h&&pq(c,d);if(!c.h)throw new L(2,7,7001);return e.return(c.i)})};
687
- r.stop=function(){for(var a=t(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.F&&(this.F.stop(),this.F=null);return this.s.destroy()};r.update=function(){var a=this,b;return D(function(c){if(1==c.g)return xa(c,2),u(c,oq(a),4);if(2!=c.g)return za(c,0);b=Aa(c);if(!a.h||!b)return c.return();a.h.onError(b);B(c)})};r.onExpirationUpdated=function(){};
688
- r.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.T()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.bb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.D=b.endTime-a,pq(this,0))}}};
689
- function oq(a){var b,c,d,e,f,g,h;return D(function(k){if(1==k.g)return b=jf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),df(a.s,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k.return(0);f.uri&&f.uri!=f.originalUri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,qq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.H.sample(1,h);return k.return(h)})}
690
- function qq(a,b,c){var d,e,f,g,h;return D(function(k){if(1==k.g){d=kg(b,"MPD");if(!d)throw new L(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(rq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=hp(d,a.g.retryParameters,f,c,a.h.networkingEngine);df(a.s,g);return u(k,g.promise,2)}h=k.h;return k.return(rq(a,h,c))})}
691
- function rq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A,z,E,F,H,I,J,K,P,T,da,N,ia,La,Ka,ab,Ta;return D(function(Ma){switch(Ma.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Sf(b,"Location").map(Yf).filter(rd);0<f.length&&(g=gc(e,f),e=a.m=g);h=Sf(b,"BaseURL");k=h.map(Yf);l=gc(e,k);m=0;h&&h.length&&(m=$f(h[0],"availabilityTimeOffset",gg)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=$f(b,"minBufferTime",bg)||0);a.D=$f(b,"minimumUpdatePeriod",bg,-1);q=$f(b,"availabilityStartTime",ag);v=$f(b,
692
- "timeShiftBufferDepth",bg);w=a.g.dash.ignoreSuggestedPresentationDelay;x=null;w||(x=$f(b,"suggestedPresentationDelay",bg));y=a.g.dash.ignoreMaxSegmentDuration;C=null;y||(C=$f(b,"maxSegmentDuration",bg));A=b.getAttribute("type")||"static";if(a.i)for(z=a.i.presentationTimeline,E=t(Object.values(a.l)),F=E.next();!F.done;F=E.next())H=F.value,H.segmentIndex&&H.segmentIndex.kb(z.Ka());else I=a.g.defaultPresentationDelay||1.5*p,J=null!=x?x:I,z=new S(q,J,a.g.dash.autoCorrectDrift);z.Dc("static"==A);(K=z.T())&&
693
- !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);z.re(v);P=b.getAttribute("profiles")||"";T={$a:"static"!=A,presentationTimeline:z,da:null,U:null,ma:null,I:null,bandwidth:0,Pe:!1,Fb:m,profiles:P.split(",")};da=sq(a,T,l,b);N=da.duration;ia=da.periods;"static"!=A&&da.Ie||z.Da(N||Infinity);a.A&&!a.o&&(La=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.o=a.h.isLowLatencyMode());a.o?z.Ze(a.A):a.A&&cb("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.");
694
- z.Wd(C||1);return u(Ma,Np(a.j,ia,T.$a),2);case 2:a.o&&(p=0);if(a.i){a.i.variants=a.j.l;Ka=a.j.j.slice();0<Ka.length&&(a.i.textStreams=Ka);a.i.imageStreams=a.j.i;a.h.filter(a.i);Ma.B(3);break}a.i={presentationTimeline:z,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0,sequenceMode:a.g.dash.sequenceMode};if(!z.hf()){Ma.B(4);break}ab=Sf(b,"UTCTiming");return u(Ma,tq(a,l,ab),5);case 5:Ta=Ma.h;if(!a.h)return Ma.return();z.$e(Ta);case 4:z.Rd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),
695
- B(Ma)}})}
696
- function sq(a,b,c,d){var e=$f(d,"mediaPresentationDuration",bg),f=[],g=0;d=Sf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=$f(k,"start",bg,g),n=k.id,p=$f(k,"duration",bg),q=null;if(l){var v=$f(l,"start",bg);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.u&&null!==n&&null!==m&&m<a.u)||a.J.includes(n)||h+1==d.length){null!==m&&(null===a.u||m>a.u)&&(a.u=m);g=uq(a,b,c,{start:m,duration:q,node:k,Ld:null==q||!l});f.push(g);b.da.id&&q&&(a.L[b.da.id]=q);if(null==q){g=
697
- null;break}g=m+q}}a.J=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,Ie:!1}:{periods:f,duration:g,Ie:!0}}
698
- function uq(a,b,c,d){b.da=vq(d.node,null,c);b.U=d;b.da.Fb=b.Fb;b.da.id||(b.da.id="__shaka_period_"+d.start);var e=Sf(d.node,"EventStream");c=b.presentationTimeline.Ka();e=t(e);for(var f=e.next();!f.done;f=e.next())wq(a,d.start,d.duration,f.value,c);c=Sf(d.node,"AdaptationSet").map(function(m){return xq(a,b,m)}).filter(rd);if(b.$a){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.wg);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new L(2,4,4018);
699
- }d=c.filter(function(m){return!m.ve});c=c.filter(function(m){return m.ve});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ve.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={Lc:h.Lc},l=k.next())h.Lc=l.value,h.Lc.trickModeVideo=e.streams.find(function(m){return function(n){return dd(m.Lc.codecs)==dd(n.codecs)}}(h))}}}c=yq(a.g.disableAudio,d,"audio");e=yq(a.g.disableVideo,d,"video");f=yq(a.g.disableText,
700
- d,lc);d=yq(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new L(2,4,4004);return{id:b.da.id,Oc:c,md:e,textStreams:f,imageStreams:d}}function yq(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,ka(e.streams));return d},[])}
701
- function xq(a,b,c){function d(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ma=vq(c,b.da,null);var e=!1,f=Sf(c,"Role"),g=f.map(function(F){return F.getAttribute("value")}).filter(rd),h=void 0,k=b.ma.contentType==lc;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
702
- l}}var n;m=Sf(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var q=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==q?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q?n=d(parseInt(p.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=q&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=q&&(l=!0)}m=Sf(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==
703
- p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),10)));m=Sf(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(q=p.value,p=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=q){q=q.split(";");for(var w=t(q),x=w.next();!x.done;x=w.next()){var y=x.value,C=x=void 0;y.includes("=")?(y=y.split("="),x=y[0].startsWith("CC")?y[0]:"CC"+y[0],C=y[1]||"und"):(x="CC"+p,2==q.length?p+=2:p++,C=y);v.set(x,ud(C))}}else v.set("CC1",
704
- "und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=1,null!=q)for(q=t(q.split(";")),x=q.next();!x.done;x=q.next())x=x.value,y=w=void 0,x.includes("=")?(x=x.split("="),w="svc"+x[0],y=x[1].split(",")[0].split(":").pop()):(w="svc"+p,p++,y=x),v.set(w,ud(y));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=Sf(c,"ContentProtection");var A=So(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),z=ud(c.getAttribute("lang")||"und"),
705
- E=c.getAttribute("label");(l=Sf(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(E=l.textContent));l=Sf(c,"Representation");c=l.map(function(F){if(F=zq(a,b,A,h,z,E,e,g,v,F))F.hdr=F.hdr||n;return F}).filter(function(F){return!!F});if(0==c.length){f="image"==b.ma.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new L(2,4,4003);}if(!b.ma.contentType||"application"==b.ma.contentType)for(b.ma.contentType=Aq(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=
706
- b.ma.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=m.value,p=t(A.drmInfos),q=p.next();!q.done;q=p.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ka(q.keyIds),ka(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(F){return F.getAttribute("id")}).filter(rd);return{id:b.ma.id||"__fake__"+a.G++,contentType:b.ma.contentType,language:z,xh:e,streams:c,drmInfos:A.drmInfos,ve:f,wg:k}}
707
- function zq(a,b,c,d,e,f,g,h,k,l){b.I=vq(l,b.ma,null);a.A=Math.min(a.A,b.I.Fb);if(!Bq(b.I))return null;var m=b.U.start;b.bandwidth=$f(l,"bandwidth",eg)||0;var n=b.I.contentType,p=n==lc||"application"==n;n="image"==n;try{var q=function(F,H,I){return Cq(a,F,H,I)};if(b.I.Bc)var v=up(b,q);else if(b.I.fb)v=Ap(b,a.l);else if(b.I.Cc)v=Fp(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.L);else{var w=b.I.Aa,x=b.U.duration||0;v={Hb:function(){return Promise.resolve(Tj(m,x,w))}}}}catch(F){if((p||n)&&4002==F.code)return null;
708
- throw F;}q=Sf(l,"ContentProtection");q=Vo(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var y=!1;Sf(l,"SupplementalProperty").some(function(F){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==F.getAttribute("schemeIdUri")&&"JOC"==F.getAttribute("value")})&&(y=!0);var C=!1;p&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var A;if(n&&((l=Sf(l,"EssentialProperty").find(function(F){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(F.getAttribute("schemeIdUri"))}))&&
709
- (A=l.getAttribute("value")),!A))return null;var z;l=b.I.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"))&&(z="PQ");l=b.I.id?b.da.id+","+b.I.id:"";var E=l&&a.l[l]?a.l[l]:{id:a.G++,originalId:b.I.id,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){E.segmentIndex&&(E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:b.I.codecs,
710
- frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.ma.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.I.ed,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:y,closedCaptions:k,hdr:z,tilesLayout:A,matchedStreams:[],external:!1};E.createSegmentIndex=function(){var F;return D(function(H){if(1==
711
- H.g){if(E.segmentIndex)return H.B(0);F=E;return u(H,v.Hb(),3)}F.segmentIndex=H.h;B(H)})};l&&b.$a&&!a.l[l]&&(a.l[l]=E);return E}function nq(a){var b,c;D(function(d){switch(d.g){case 1:return b=0,xa(d,2),u(d,oq(a),4);case 4:b=d.h;za(d,3);break;case 2:c=Aa(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();pq(a,b);B(d)}})}function pq(a,b){0>a.D||a.F.O(Math.max(3,a.D-b,Xa(a.H)))}
712
- function vq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ed:null,audioSamplingRate:null,Fb:0};c=c||b.Aa;var d=Sf(a,"BaseURL"),e=d.map(Yf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=$f(a,"frameRate",hg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Sf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
713
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Sf(a,"AudioChannelConfiguration");m=Dq(m)||b.ed;p=$f(a,"audioSamplingRate",fg)||b.audioSamplingRate;f||(f=Aq(g,h));var q=Rf(a,"SegmentBase"),v=Rf(a,"SegmentTemplate"),w=q?$f(q,"availabilityTimeOffset",gg)||0:0,x=v?$f(v,"availabilityTimeOffset",gg)||0:0;d=d&&d.length?$f(d[0],"availabilityTimeOffset",gg)||0:0;d=b.Fb+d+w+x;return{Aa:gc(c,e),Bc:q||b.Bc,fb:Rf(a,"SegmentList")||b.fb,Cc:v||b.Cc,width:$f(a,"width",fg)||b.width,height:$f(a,
714
- "height",fg)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),ed:m,audioSamplingRate:p,Fb:d}}
715
- function Dq(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=
716
- 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 Bq(a){var b=a.Bc?1:0;b+=a.fb?1:0;b+=a.Cc?1:0;if(0==b)return a.contentType==lc||"application"==a.contentType?!0:!1;1!=b&&(a.Bc&&(a.fb=null),a.Cc=null);return!0}
717
- function Eq(a,b,c,d){var e,f,g,h,k,l;return D(function(m){if(1==m.g)return e=gc(b,[c]),f=jf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),df(a.s,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m.return(0);k=h.headers.date}else k=Fc(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
718
- function tq(a,b,c){var d,e,f,g,h,k,l,m;return D(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.B(4);break}h=g.value;xa(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.B(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.B(8);
719
- 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":cb("NTP UTCTiming scheme is not supported");break;default:cb("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return u(n,Eq(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return u(n,Eq(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:za(n,
720
- 3);break;case 5:Aa(n);case 3:g=f.next();n.B(2);break;case 4:return cb("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
721
- function wq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=$f(d,"timescale",fg)||1;d=t(Sf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=$f(k,"presentationTime",fg)||0,m=$f(k,"duration",fg)||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))}}
722
- function Cq(a,b,c,d){var e,f,g,h,k;return D(function(l){if(1==l.g)return e=pf,f=Dk(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),df(a.s,h),u(l,h.promise,2);k=l.h;return l.return(k.data)})}function Aq(a,b){return hd(bd(a,b))?lc:a.split("/")[0]}G("shaka.dash.DashParser",mq);ah.mpd=function(){return new mq};Zg["application/dash+xml"]=function(){return new mq};Zg["video/vnd.mpeg.dash.mpd"]=function(){return new mq};function Fq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Gq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Gq.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};
723
- Gq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Hq(a,b){a=a.getAttribute(b);if(!a)throw new L(2,4,4023,b);return a.value}function Iq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function Jq(a,b){this.name=a;this.value=b};function Kq(a,b){return a.filter(function(c){return c.name==b})}function Lq(a,b){return a.filter(function(c){return Hq(c,"TYPE")==b})}function Mq(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Nq(a,b){var c=0;c=void 0===c?0:c;return(a=Mq(a,b))?Number(a.value):c}function Oq(a,b){return gc([a],[b])[0]};function Pq(a){this.h=a;this.g=0}function Qq(a){Rq(a,/[ \t]+/gm)}function Rq(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Sq(a){return a.g==a.h.length?null:(a=Rq(a,/[^ \t\n]*/gm))?a[0]:null};function Tq(){this.g=0}
724
- function Uq(a,b,c){b=Fc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new L(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=Vq(a,g),--a.g,Wq.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=Vq(a,h);if(Xq.includes(h.name)){if(1!=b)throw new L(2,4,4017);
725
- 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=Vq(a,m),Wq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?null!=Z(m,"BYTERANGE-START")?null!=Z(m,"BYTERANGE-LENGTH")&&k.push(m):k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Oq(d,m.trim()),h&&g.push(h),e.push(new Iq(m,g,k)),g=[],k=[]);k.length&&
726
- (h&&g.push(h),e.push(new Iq("",g,k)));return new Fq(c,b,f,e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Jq("URI",k)),e=!0)}}return new Fq(c,b,f)}function Vq(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new L(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Pq(d);var f;(f=Rq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Rq(d,g);)c.push(new Jq(f[1],f[2]||f[3])),Qq(d)}return new Gq(a,b,c,e)}
727
- var Wq="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 EXT-X-PART-INF".split(" "),Xq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Yq(){}function Zq(a){try{var b=$q(a);return Ue({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Se(c)}}
728
- function $q(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new L(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new L(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Oc(a):e=Jc(a);return{data:e,contentType:c}}G("shaka.net.DataUriPlugin",Yq);Yq.parse=Zq;ff("data",Zq);function ar(){var a=this;this.g=this.j=null;this.Ha=1;this.o=new Map;this.A=new Map;this.G=new Map;this.G.set("video",new Map);this.G.set("audio",new Map);this.G.set(lc,new Map);this.G.set("image",new Map);this.za=new Set;this.h=new Map;this.i=null;this.V="";this.fa=new Tq;this.aa=0;this.D=-1;this.J=Infinity;this.Ia=!1;this.m=new M(function(){br(a)});this.W=cr;this.F=null;this.ga=0;this.L=Infinity;this.ea=this.la=0;this.H=new cf;this.s=new Map;this.u=new Map;this.P=new Map;this.N=new Map;this.l=!1}
729
- r=ar.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this,d;return D(function(e){return 1==e.g?(c.j=b,c.l=b.isLowLatencyMode(),u(e,dr(c,a),2)):3!=e.g?(d=e.h,c.V=d.uri,u(e,er(c,d.data,a),3)):e.return(c.F)})};r.stop=function(){this.m&&(this.m.stop(),this.m=null);var a=[];this.H&&(a.push(this.H.destroy()),this.H=null);this.g=this.j=null;this.za.clear();this.F=null;this.h.clear();this.A.clear();this.u.clear();this.o.clear();this.P.clear();this.N.clear();return Promise.all(a)};
730
- r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return D(function(m){if(1==m.g){if(!fr(a))return m.return();b=[];c=Array.from(a.h.values());d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(gr(a,g));return u(m,Promise.all(b),2)}hr(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.rc});d.length&&!h&&(k=ir,jr(a,k.lf),l=d.map(function(n){return n.Ta}),a.i.Da(Math.min.apply(Math,ka(l))),a.j.updateDuration());h&&kr(a);
731
- B(m)})};function lr(a,b){return fr(a)?a.G.get(b.type):b.dd}
732
- function gr(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A;return D(function(z){if(1==z.g)return c=b.Nc,d=new Tb(c),a.l&&b.Qc&&Wb(d,new Yb("_HLS_skip=YES")),u(z,dr(a,d.toString()),2);e=z.h;if(!b.stream.segmentIndex)return z.return();f=Uq(a.fa,e.data,e.uri);if(1!=f.type)throw new L(2,4,4017);g=Kq(f.g,"EXT-X-DEFINE");h=mr(a,g);k=b.stream;l=lr(a,b);m=nr(f,k.mimeType);n=m.keyIds;p=m.drmInfos;q=function(E,F){return E.size===F.size&&[].concat(ka(E)).every(function(H){return F.has(H)})};q(k.keyIds,n)||(k.keyIds=
733
- n,k.drmInfos=p,a.j.newDrmInfo(k));v=or(a,f,k.type,l,h);k.segmentIndex.Mb(v,a.i.Ka());v.length&&(w=Nq(f.g,"EXT-X-MEDIA-SEQUENCE"),x=l.get(w),k.segmentIndex.kb(x));y=v[0];b.qb=y.startTime;C=v[v.length-1];b.Ta=C.endTime;if(A=Mq(f.g,"EXT-X-ENDLIST"))b.rc=!0;B(z)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};
734
- function pr(a,b){for(var c=-1==a.D,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=lr(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.D=Math.max(a.D,k));e.Id=k;break}}}}if(!(0>a.D))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(d.g.splice(0,a.D-c.Id),d=d.g[0]||null)d=-d.startTime,c.stream.segmentIndex.offset(d),qr(a,c,d)}
735
- function rr(a,b){if(Infinity==a.J){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.X&&(a.J=Math.min(a.J,d.X))}}b=a.J;if(Infinity!=b)for(d=t(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.X)bb("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.Fc,"Expect AV sync issues!");else for(qr(a,c,f.X-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.se(b)}}}
736
- function qr(a,b,c){b.qb+=c;b.Ta+=c;a=lr(a,b);b=t(a);for(var d=b.next();!d.done;d=b.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.set(d,e+c)}}
737
- function er(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A,z,E,F,H,I,J,K,P,T,da,N,ia,La,Ka,ab;return D(function(Ta){switch(Ta.g){case 1:d=Uq(a.fa,b,a.V);e=Kq(d.g,"EXT-X-DEFINE");for(var Ma=t(e),Ca=Ma.next();!Ca.done;Ca=Ma.next()){var ma=Ca.value;Ca=Z(ma,"NAME");ma=Z(ma,"VALUE");Ca&&ma&&(a.o.has(Ca)||a.o.set(Ca,ma))}f=[];g=[];h=[];if(1==d.type)return F=a.g.hls.mediaPlaylistFullMimeType,d.segments.length&&(H=new Tb(d.segments[0].i),I=H.ta.split(".").pop(),(J=sr[I])?F=J:"ts"!==I&&"mp4"!==I&&(tr[I]?(J=
738
- tr[I],K=a.g.hls.defaultAudioCodec,F=J+'; codecs="'+K+'"'):ur[I]&&(J=ur[I],P=a.g.hls.defaultVideoCodec,F=J+'; codecs="'+P+'"'))),T=F.split(";")[0],da=T.split("/")[0],N=fd(F),ia=new Map,u(Ta,vr(a,d,c,c,N,da,"",!0,"Media Playlist",null,ia,null,!1,!1,T),5);k=Kq(d.g,"EXT-X-MEDIA");l=Kq(d.g,"EXT-X-STREAM-INF");m=Kq(d.g,"EXT-X-IMAGE-STREAM-INF");n=Kq(d.g,"EXT-X-SESSION-KEY");Ma=t(l);for(Ca=Ma.next();!Ca.done;Ca=Ma.next()){var ea=Ca.value;ma=Z(ea,"AUDIO");Ca=Z(ea,"VIDEO");var pa=Z(ea,"SUBTITLES");ea=wr(a,
739
- ea);if(pa){var Ya=jc(lc,ea);a.u.set(pa,Ya);mb(ea,Ya)}ma&&(pa=jc("audio",ea),pa||(pa=a.g.hls.defaultAudioCodec),a.u.set(ma,pa));Ca&&(ma=jc("video",ea),ma||(ma=a.g.hls.defaultVideoCodec),a.u.set(Ca,ma))}p=Kq(d.g,"EXT-X-SESSION-DATA");q=t(p);for(v=q.next();!v.done;v=q.next())if(w=v.value,x=Z(w,"DATA-ID"),y=Z(w,"URI"),C=Z(w,"LANGUAGE"),A=Z(w,"VALUE"),z=(new Map).set("id",x),y&&z.set("uri",Oq(a.V,y)),C&&z.set("language",C),A&&z.set("value",A),E=new O("sessiondata",z),a.j)a.j.onEvent(E);xr(a,k);Ma=Lq(k,
740
- "CLOSED-CAPTIONS");Ma=t(Ma);for(Ca=Ma.next();!Ca.done;Ca=Ma.next())ma=Ca.value,pa=Z(ma,"LANGUAGE"),Ca=yr(ma),pa||(pa=Z(ma,"NAME"))&&(Ca=pa),pa=Hq(ma,"GROUP-ID"),ma=Hq(ma,"INSTREAM-ID").replace("SERVICE","svc"),a.s.get(pa)||a.s.set(pa,new Map),a.s.get(pa).set(ma,Ca);f=zr(a,l,n);g=Ar(a,k);return u(Ta,Br(a,m),4);case 4:h=Ta.h;Ta.B(3);break;case 5:La=Ta.h,a.h.set(c,La),f.push({id:0,language:"und",disabledUntilTime:0,primary:!0,audio:"audio"==da?La.stream:null,video:"video"==da?La.stream:null,bandwidth:0,
741
- allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.j)throw new L(2,7,7001);a.i=new S(null,0);a.i.Dc(!0);1==d.type&&(fr(a)&&(Cr(a,d),Ka=a.aa,a.m.O(Ka)),ab=Array.from(a.h.values()),Dr(a,ab),kr(a));a.F={presentationTimeline:a.i,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.j.makeTextStreamsForClosedCaptions(a.F);B(Ta)}})}
742
- function kr(a){if(fr(a)){a.aa=a.L;if(a.W==Er){var b=Fr(a);a.g.hls.useSafariBehaviorForLive&&(b=a.i.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.i.re(b)}if(!a.i.s){b=Array.from(a.h.values()).filter(function(d){return d.stream.segmentIndex});b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,("audio"==c.type||"video"==c.type)&&(c=c.stream.segmentIndex.get(0))&&c.X&&a.i.pe(c.X)}}else a.i.Da(Gr(a));a.i.Rd()}
743
- function mr(a,b){var c=new Map;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.o.get(e))&&c.set(e,d)}return c}
744
- function Ar(a,b){var c=Lq(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Hr(a,g).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Hq(d.value,"GROUP-ID");if(d=a.u.get(e))if(e=a.A.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Ir(lc,d)||Jr(lc)}}return b.filter(function(g){return g})}
745
- function Br(a,b){var c,d;return D(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return D(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);xa(l,2);return u(l,Kr(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=Aa(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
746
- function xr(a,b){b=b.filter(function(d){var e=Z(d,"URI")||"";return"SUBTITLES"!=Z(d,"TYPE")&&""!=e});b=t(b);for(var c=b.next();!c.done;c=b.next())Hr(a,c.value)}
747
- function zr(a,b,c){var d=[],e=new Set;if(0<c.length){c=t(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=Hq(f,"METHOD");if("NONE"!=g&&"AES-128"!=g&&(g=Z(f,"KEYFORMAT")||"identity",f=(g=Lr[g])?g(f,""):null)){if(f.keyIds){g=t(f.keyIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}d.push(f)}}}b=b.map(function(k){var l=Z(k,"FRAME-RATE"),m=Number(Z(k,"AVERAGE-BANDWIDTH"))||Number(Hq(k,"BANDWIDTH")),n=Z(k,"RESOLUTION");n=t(n?n.split("x"):[null,null]);var p=n.next().value,q=n.next().value,
748
- v=Z(k,"VIDEO-RANGE");k=Mr(a,k);n=k.audio;k=k.video;for(var w=t(k),x=w.next();!x.done;x=w.next())if(x=x.value.stream)x.width=Number(p)||void 0,x.height=Number(q)||void 0,x.frameRate=Number(l)||void 0,x.hdr=v||void 0;l=a.g.disableAudio;if(!n.length||l)n=[null];l=a.g.disableVideo;if(!k.length||l)k=[null];l=[];n=t(n);for(p=n.next();!p.done;p=n.next())for(p=p.value,q=t(k),v=q.next();!v.done;v=q.next()){var y=v.value;if(v=p?p.stream:null)v.drmInfos=d,v.keyIds=e;if(w=y?y.stream:null)w.drmInfos=d,w.keyIds=
749
- e;x=p?p.stream.drmInfos:null;var C=y?y.stream.drmInfos:null;y=(y?y.Fc:"")+" - "+(p?p.Fc:"");v&&w&&x.length&&C.length&&!(0<Vg(x,C).length)||a.za.has(y)||(v={id:a.Ha++,language:v?v.language:"und",primary:!!v&&v.primary||!!w&&w.primary,audio:v,video:w,bandwidth:m,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},l.push(v),a.za.add(y))}return l}).reduce(pd,[]);return b=b.filter(function(k){return null!=k})}
750
- function Mr(a,b){var c=wr(a,b),d=Z(b,"AUDIO"),e=Z(b,"VIDEO"),f=d||e;f=f&&a.A.has(f)?a.A.get(f):[];d={audio:d?f:[],video:e?f:[]};e=!1;var g=Hq(b,"URI"),h=d.audio.find(function(m){return m&&m.Fc==g}),k=jc("video",c),l=jc("audio",c);l&&!k?(f="audio",e=0<d.audio.length):!f.length&&l&&k?(f="video",c=[[k,l].join()]):d.audio.length&&h?(f="audio",e=!0):f=d.video.length&&!d.audio.length?"audio":"video";e||(a=Nr(a,b,c,f),d[a.stream.type]=[a]);return d}
751
- function wr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);c=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);a=new Set;b=[];c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=ed(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function yr(a){a=Z(a,"LANGUAGE")||"und";return ud(a)}
752
- function Hr(a,b){var c=Hq(b,"GROUP-ID"),d="",e=Hq(b,"TYPE").toLowerCase();"subtitles"==e&&(e=lc);var f=e;f==lc?d=Z(b,"CODECS")||"":c&&a.u.has(c)&&(d=a.u.get(c));e=Or(Hq(b,"URI"),a.o);if(a.h.has(e))return a.h.get(e);var g=yr(b),h=Z(b,"NAME"),k="YES"==Z(b,"DEFAULT");var l="audio"==f?(l=Z(b,"CHANNELS"))?parseInt(l.split("/")[0],10):null:null;var m="audio"==f?(m=Z(b,"CHANNELS"))?m.includes("/JOC"):!1:!1;var n=Z(b,"CHARACTERISTICS");b="YES"==Z(b,"FORCED");d=Pr(a,e,d,f,g,k,h,l,null,n,b,m);a.A.has(c)?a.A.get(c).push(d):
636
+ function bp(a,b){var c=cp(a,b,"timescale"),d=1;c&&(d=fg(c)||1);var e=cp(a,b,"duration");c=fg(e||"");"image"==a.I.contentType&&(c=hg(e||""));c&&(c/=d);var f=cp(a,b,"startNumber");e=Number(cp(a,b,"presentationTimeOffset"))||0;var g=gg(f||"");if(null==f||null==g)g=1;f=dp(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.U.duration||Infinity;f=Tf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],n=f[l+1],p=ag(m,"t",gg),q=ag(m,"d",gg);m=ag(m,"r",eg);null!=p&&(p-=e);if(!q)break;p=null!=p?p:k;m=m||0;if(0>
637
+ m)if(n){n=ag(n,"t",gg);if(null==n)break;else if(p>=n)break;m=Math.ceil((n-p)/q)-1}else{if(Infinity==a)break;else if(p/b>=a)break;m=Math.ceil((a*b-p)/q)-1}0<h.length&&p!=k&&(h[h.length-1].end=p/b);for(n=0;n<=m;++n)k=p+q,h.push({start:p/b,end:k/b,Jg:p}),p=k}b=h}return{timescale:d,ja:c,Qb:g,Va:e/d||0,we:e,timeline:b}}function ep(a,b){return[b(a.I),b(a.la),b(a.ca)].filter(sd)}function cp(a,b,c){b=ep(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.getAttribute(c));d=b.next());return a}
638
+ function dp(a,b,c){b=ep(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=Sf(d.value,c));d=b.next());return a}
639
+ function fp(a,b,c,d,e,f){for(var g=Xf(a,"http://www.w3.org/1999/xlink","href"),h=Xf(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 Te(new K(2,4,4028));if("onLoad"!=h)return Te(new K(2,4,4027));var m=fc([d],[g]);return e.request(0,kf(m,b)).Z(function(n){n=lg(n.data,a.tagName);if(!n)return Te(new K(2,4,4001,g));
640
+ 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 gp(a,b,c,m[0],e,f+1)})}
641
+ function gp(a,b,c,d,e,f){f=void 0===f?0:f;if(Xf(a,"http://www.w3.org/1999/xlink","href")){var g=fp(a,b,c,d,e,f);c&&(g=g.Z(void 0,function(){return gp(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"==Xf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(gp(k,b,c,d,e,f)));return Xe(g).Z(function(){return a})};function hp(a,b,c,d,e,f,g){var h,k=(new Gf).M("sidx",function(l){h=ip(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new K(2,3,3004);}
642
+ function ip(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.K();if(0==k)throw new K(2,3,3005);if(0==g.version){var l=g.reader.K();var m=g.reader.K()}else l=g.reader.cb(),m=g.reader.cb();g.reader.skip(2);var n=g.reader.ce();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.K(),q=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.K();g.reader.skip(4);if(1==q)throw new K(2,3,3006);h.push(new P(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function jp(a){this.h=Qb(a);this.g=new Df(this.h,0)}jp.prototype.ia=function(){return this.g.ia()};
643
+ function kp(a){var b=lp(a);if(7<b.length)throw new K(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=lp(a);a:{d=t(mp);for(var e=d.next();!e.done;e=d.next())if(Kb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.aa();else{if(8==b.length&&b[1]&224)throw new K(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.aa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.aa();d=Qb(a.h,a.g.aa(),b);a.g.skip(b);return new np(c,
644
+ d)}function lp(a){var b=a.g.aa(),c=a.g.Ua();if(0==c)throw new K(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Mb(a.h,b,c)}var mp=[[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 np(a,b){this.id=a;this.g=b}
645
+ function op(a){if(8<a.g.byteLength)throw new K(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new K(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 pp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new jp(a.g);for(var n=null,p=null;a.ia();){var q=kp(a);if(187==q.id){var v=qp(q);v&&(q=c*v.Kg,v=b+v.ug,null!=n&&m.push(new P(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new P(n+g,d+g,l,p,null,f,g,h,k));return m}
646
+ function qp(a){var b=new jp(a.g);a=kp(b);if(179!=a.id)throw new K(2,3,3013);a=op(a);b=kp(b);if(183!=b.id)throw new K(2,3,3012);b=new jp(b.g);for(var c=0;b.ia();){var d=kp(b);if(241==d.id){c=op(d);break}}return{Kg:a,ug:c}};function rp(a,b){b=dp(a,b,"Initialization");if(!b)return null;var c=a.I.Aa,d=b.getAttribute("sourceURL");d&&(c=fc(a.I.Aa,[d]));d=0;var e=null;if(b=ag(b,"range",dg))d=b.start,e=b.end;return new xi(function(){return c},d,e,sp(a))}
647
+ function tp(a,b){var c=Number(cp(a,up,"presentationTimeOffset"))||0,d=cp(a,up,"timescale"),e=1;d&&(e=fg(d)||1);var f=c/e||0,g=rp(a,up);vp(a,g);var h=cf(a);return{Hb:function(){var k=dp(h,up,"RepresentationIndex");var l=h.I.Aa;k&&(k=k.getAttribute("sourceURL"))&&(l=fc(h.I.Aa,[k]));k=wp(h);return xp(h,b,g,l,k.start,k.end,f)}}}
648
+ function xp(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,w,x,y,C,A,z,E;return D(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.Za||!a.U.Ld,l=a.U.start,m=a.U.duration,n=a.I.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.ua(),c.Ea,c.ma):null],p=null,u(F,Promise.all(v),2);w=F.h;x=w[0];y=w[1]||null;C=null;A=l-g;z=l;E=m?l+m:Infinity;if("mp4"==n)var H=hp(x,e,d,c,A,z,E);else{H=new jp(y);if(440786851!=kp(H).id)throw new K(2,3,3008);var I=kp(H);if(408125543!=I.id)throw new K(2,3,3009);H=I.g.byteOffset;
649
+ I=new jp(I.g);for(var L=null;I.ia();){var J=kp(I);if(357149030==J.id){L=J;break}}if(!L)throw new K(2,3,3010);L=new jp(L.g);J=1E6;for(I=null;L.ia();){var M=kp(L);if(2807729==M.id)J=op(M);else if(17545==M.id)if(4==M.g.byteLength)I=M.g.getFloat32(0);else if(8==M.g.byteLength)I=M.g.getFloat64(0);else throw new K(2,3,3003);}if(null==I)throw new K(2,3,3011);L=J/1E9;I*=L;J=kp(new jp(x));if(475249515!=J.id)throw new K(2,3,3007);H=pp(J,H,L,I,d,c,A,z,E)}C=H;h.Nb(C);q=new Rj(C);k&&q.$a(z,E,!0);return F.return(q)})}
650
+ function up(a){return a.Ac}function wp(a){var b=dp(a,up,"RepresentationIndex");a=cp(a,up,"indexRange");a=dg(a||"");b&&(a=ag(b,"range",dg,a));return a}function vp(a,b){yp(a,b);if(!wp(a))throw new K(2,4,4002);}function yp(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=kc&&"mp4"!=c&&"webm"!=c)throw new K(2,4,4006);if("webm"==c&&!b)throw new K(2,4,4005);}
651
+ function sp(a){var b=a.I;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.ed,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function zp(a,b){var c=rp(a,Ap),d=Bp(a);if(!d.ja&&!d.timeline&&1<d.Lb.length)throw new K(2,4,4002);if(!d.ja&&!a.U.duration&&!d.timeline&&1==d.Lb.length)throw new K(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new K(2,4,4002);var e=null,f=null;a.ca.id&&a.I.id&&(f=b[a.ca.id+","+a.I.id])&&(e=f.segmentIndex);var g=Cp(a.U.start,a.U.duration,a.I.Aa,d,c);b=!e;e?e.Mb(g,a.presentationTimeline.Ka()):e=new Rj(g);a.presentationTimeline.Nb(g);a.Za&&a.U.Ld||e.$a(a.U.start,a.U.duration?a.U.start+a.U.duration:
652
+ Infinity,b);f&&(f.segmentIndex=e);return{Hb:function(){e&&0!=e.g.length||e.uc(g);return Promise.resolve(e)}}}function Ap(a){return a.eb}function Bp(a){var b=Dp(a);a=bp(a,Ap);var c=a.Qb;0==c&&(c=1);var d=0;a.ja?d=a.ja*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ja:a.ja,startTime:d,Qb:c,Va:a.Va,timeline:a.timeline,Lb:b}}
653
+ function Cp(a,b,c,d,e){var f=d.Lb.length;d.timeline&&d.timeline.length!=d.Lb.length&&(f=Math.min(d.timeline.length,d.Lb.length));for(var g=a-d.Va,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={td:m.td},n++){var p=d.Lb[n];m.td=fc(c,[p.kg]);var q=void 0;q=null!=d.ja?l+d.ja:d.timeline?d.timeline[n].end:l+b;k.push(new P(a+l,a+q,function(v){return function(){return v.td}}(m),p.start,p.end,e,g,a,h));l=q}return k}
654
+ function Dp(a){return[a.I.eb,a.la.eb,a.ca.eb].filter(sd).map(function(b){return Tf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Oe&&(a.Oe=!0);var c=b.getAttribute("media");b=ag(b,"mediaRange",dg,{start:0,end:null});return{kg:c,start:b.start,end:b.end}})};function Ep(a,b,c,d,e,f){var g=Fp(a),h=Gp(a);Hp(h);var k=cf(a);if(h.tc)return yp(a,g),{Hb:function(){var q=ap(h.tc,k.I.id,null,k.bandwidth||null,null);q=fc(k.I.Aa,[q]);return xp(k,b,g,q,0,null,h.Va)}};if(h.ja)return d||"image"===a.la.contentType||(a.presentationTimeline.Vd(h.ja),a.presentationTimeline.Wd(a.U.start)),{Hb:function(){return Ip(k,h,e,g,f)}};var l=null;d=d=null;a.ca.id&&a.I.id&&(d=a.ca.id+","+a.I.id,d=c[d])&&(l=d.segmentIndex);var m=Jp(k,h,g);c=a.U.start;var n=a.U.duration?a.U.start+a.U.duration:
655
+ Infinity,p=!(a.Za&&a.U.Ld);l?(p&&(new Rj(m)).$a(c,n,!0),l.Mb(m,a.presentationTimeline.Ka())):l=new Rj(m);a.presentationTimeline.Nb(m);p&&l.$a(c,n);d&&a.Za&&(d.segmentIndex=l);return{Hb:function(){l&&0!=l.g.length||l.uc(m);return Promise.resolve(l)}}}function Kp(a){return a.Bc}function Gp(a){var b=bp(a,Kp),c=cp(a,Kp,"media");a=cp(a,Kp,"index");return{ja:b.ja,timescale:b.timescale,Qb:b.Qb,Va:b.Va,we:b.we,timeline:b.timeline,Td:c,tc:a}}
656
+ function Hp(a){var b=a.tc?1:0;b+=a.timeline?1:0;b+=a.ja?1:0;if(0==b)throw new K(2,4,4002);1!=b&&(a.tc&&(a.timeline=null),a.ja=null);if(!a.tc&&!a.Td)throw new K(2,4,4002);}
657
+ function Ip(a,b,c,d,e){function f(J){var M=(J-q)*p,T=M+b.Va,W=M+l;M=W+p;var O=Math.min(M,h());W=new P(W,O,function(){var fa=ap(w,y,J,x,T*v);return fc(C,[fa])},0,null,d,A,l,h());W.j=M;return W}function g(){var J=[Math.max(k.Ka(),l),Math.min(k.ab(),h())].map(function(M){return M-l});J=[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1];a.I.jb&&J[1]++;return J.map(function(M){return M+q})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.U.start,m=a.ca.id,n=a.U.duration,
658
+ p=b.ja,q=b.Qb,v=b.timescale,w=b.Td,x=a.bandwidth||null,y=a.I.id,C=a.I.Aa,A=l-b.Va,z=g();c=a.Za?Math.max(z[0],z[1]-c+1):z[0];z=z[1];for(var E=[],F=c;F<=z;++F){var H=f(F);E.push(H)}var I=new Rj(E);E=k.ab()<h();F=k.T();if(E||F){var L=Math.max(c,z+1);I.ld(p,function(){var J=k.Ka();I.kb(J);var M=t(g());M.next();M=M.next().value;for(var T=[];L<=M;){var W=f(L);T.push(W);L++}return J>h()&&!T.length?null:T})}return Promise.resolve(I)}
659
+ function Jp(a,b,c){var d=a.U.start,e=a.U.duration,f=d-b.Va;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={sd:h.sd,wd:h.wd,zd:h.zd,pd:h.pd,Cd:h.Cd,qd:h.qd},k++){var l=b.timeline[k],m=l.start,n=l.Jg;l=l.end;h.zd=k+b.Qb;h.Cd=n+b.we;h.wd=a.I.id;h.pd=a.bandwidth||null;h.sd=b.Td;h.qd=a.I.Aa;g.push(new P(d+m,d+l,function(p){return function(){var q=ap(p.sd,p.wd,p.zd,p.pd||null,p.Cd);return fc(p.qd,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
660
+ function Fp(a){var b=cp(a,Kp,"initialization");if(!b)return null;var c=a.I.id,d=a.bandwidth||null,e=a.I.Aa;return new xi(function(){var f=ap(b,c,null,d,null);return fc(e,[f])},0,null,sp(a))};function Lp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Lp.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=[]};
661
+ function Mp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A,z,E,F,H,I,L,J,M,T,W,O,fa,Ka,La,Xa,Ra,$a;return D(function(ja){if(1==ja.g){h=lc;for(var na=t(b),ea=na.next();!ea.done;ea=na.next()){ea=ea.value;for(var qa=[],Ya=t(ea.Nc),R=Ya.next();!R.done;R=Ya.next()){R=R.value;for(var Pa=!1,Gb=t(qa),V=Gb.next();!V.done;V=Gb.next())V=V.value,R.id!=V.id&&R.channelsCount==V.channelsCount&&R.language==V.language&&R.bandwidth==V.bandwidth&&R.label==V.label&&R.codecs==V.codecs&&R.mimeType==V.mimeType&&mb(R.roles,
662
+ V.roles)&&R.audioSamplingRate==V.audioSamplingRate&&R.primary==V.primary&&(Pa=!0);Pa||qa.push(R)}ea.Nc=qa}na=t(b);for(ea=na.next();!ea.done;ea=na.next()){ea=ea.value;qa=[];Ya=t(ea.md);for(R=Ya.next();!R.done;R=Ya.next()){R=R.value;Pa=!1;Gb=t(qa);for(V=Gb.next();!V.done;V=Gb.next())V=V.value,R.id!=V.id&&R.width==V.width&&R.frameRate==V.frameRate&&R.codecs==V.codecs&&R.mimeType==V.mimeType&&R.label==V.label&&mb(R.roles,V.roles)&&Cf(R.closedCaptions,V.closedCaptions)&&R.bandwidth==V.bandwidth&&(Pa=!0);
663
+ Pa||qa.push(R)}ea.md=qa}na=t(b);for(ea=na.next();!ea.done;ea=na.next()){ea=ea.value;qa=[];Ya=t(ea.textStreams);for(R=Ya.next();!R.done;R=Ya.next()){R=R.value;Pa=!1;Gb=t(qa);for(V=Gb.next();!V.done;V=Gb.next())V=V.value,R.id!=V.id&&R.language==V.language&&R.label==V.label&&R.codecs==V.codecs&&R.mimeType==V.mimeType&&R.bandwidth==V.bandwidth&&mb(R.roles,V.roles)&&(Pa=!0);Pa||qa.push(R)}ea.textStreams=qa}na=t(b);for(ea=na.next();!ea.done;ea=na.next()){ea=ea.value;qa=[];Ya=t(ea.imageStreams);for(R=Ya.next();!R.done;R=
664
+ Ya.next()){R=R.value;Pa=!1;Gb=t(qa);for(V=Gb.next();!V.done;V=Gb.next())V=V.value,R.id!=V.id&&R.width==V.width&&R.codecs==V.codecs&&R.mimeType==V.mimeType&&(Pa=!0);Pa||qa.push(R)}ea.imageStreams=qa}if(!c&&1==b.length)return k=b[0],a.g=k.Nc,a.h=k.md,a.j=k.textStreams,a.i=k.imageStreams,ja.B(2);l=-1;for(m=0;m<b.length;m++)n=b[m],a.m.has(n.id)||(a.m.add(n.id),-1==l&&(l=m));if(-1==l)return ja.return();na=[];ea=[];qa=[];Ya=[];R=t(b);for(Pa=R.next();!Pa.done;Pa=R.next())Pa=Pa.value,na.push(Pa.Nc),ea.push(Pa.md),
665
+ qa.push(Pa.textStreams),Ya.push(Pa.imageStreams);d=na;e=ea;f=qa;g=Ya;p=d;q=e;v=f;w=g;x=t(v);for(y=x.next();!y.done;y=x.next())C=y.value,C.push(Np(h.Y));A=t(w);for(z=A.next();!z.done;z=A.next())E=z.value,E.push(Np(h.$b));return u(ja,Promise.all([Op(a.g,p,l,Pp,Qp),Op(a.h,q,l,Pp,Qp),Op(a.j,v,l,Pp,Qp),Op(a.i,w,l,Pp,Qp)]),2)}F=0;H=[];if(a.h.length&&a.g.length)for(W=t(a.g),O=W.next();!O.done;O=W.next())for(fa=O.value,Ka=t(a.h),La=Ka.next();!La.done;La=Ka.next())Xa=La.value,Ra=Wg(fa.drmInfos,Xa.drmInfos),
666
+ fa.drmInfos.length&&Xa.drmInfos.length&&!Ra.length||($a=F++,H.push({id:$a,language:fa.language,primary:fa.primary,audio:fa,video:Xa,bandwidth:(fa.bandwidth||0)+(Xa.bandwidth||0),drmInfos:Ra,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(I=a.h.concat(a.g),L=t(I),J=L.next();!J.done;J=L.next())M=J.value,T=F++,H.push({id:T,language:M.language,primary:M.primary,audio:M.type==h.ib?M:null,video:M.type==h.qa?M:null,bandwidth:M.bandwidth||0,drmInfos:M.drmInfos,allowedByApplication:!0,
667
+ allowedByKeySystem:!0,decodingInfos:[]});a.l=H;B(ja)})}
668
+ function Rp(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A,z,E,F,H,I,L,J,M;return D(function(T){switch(T.g){case 1:b=lc;if(1==a.length)return T.return(a[0]);c=a.map(function(W){return W.filter(function(O){return O.type==b.ib})});d=a.map(function(W){return W.filter(function(O){return O.type==b.qa})});e=a.map(function(W){return W.filter(function(O){return O.type==b.Y})});f=a.map(function(W){return W.filter(function(O){return O.type==b.$b})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,k.push(Sp(b.Y));
669
+ l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Sp(b.$b));return u(T,Op([],c,0,Tp,Up),2);case 2:return p=T.h,u(T,Op([],d,0,Tp,Up),3);case 3:return q=T.h,u(T,Op([],e,0,Tp,Up),4);case 4:return v=T.h,u(T,Op([],f,0,Tp,Up),5);case 5:w=T.h;x=0;if(q.length&&p.length)for(E=t(p),F=E.next();!F.done;F=E.next())for(H=F.value,I=t(q),L=I.next();!L.done;L=I.next())J=L.value,M=x++,J.variantIds.push(M),H.variantIds.push(M);else for(y=q.concat(p),C=t(y),A=C.next();!A.done;A=C.next())z=A.value,z.variantIds=
670
+ [x++];return T.return(q.concat(p).concat(v).concat(w))}})}
671
+ function Op(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,w,x,y,C,A,z,E,F,H,I,L;return D(function(J){switch(J.g){case 1:f=lc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){J.B(4);break}m=l.value;return u(J,Vp(m,b,c,e,g),5);case 5:n=J.h;if(!n)throw new K(2,4,4037);l=k.next();J.B(2);break;case 4:p=t(g);for(q=p.next();!q.done;q=p.next())for(v=q.value,w=t(v),x=w.next();!x.done;x=w.next())y=x.value,(C=Wp(y,b,d,e,g))&&a.push(C);A=t(g);for(q=A.next();!q.done;q=
672
+ A.next())for(z=q.value,E={},F=t(z),x=F.next();!x.done;E={Ya:E.Ya},x=F.next())if(E.Ya=x.value,H=E.Ya.type==f.Y&&!E.Ya.language,I=E.Ya.type==f.$b&&!E.Ya.tilesLayout,!H&&!I&&(L=a.some(function(M){return function(T){return T.mimeType==M.Ya.mimeType&&dd(T.codecs)==dd(M.Ya.codecs)}}(E))))throw new K(2,4,4037);return J.return(a)}})}function Vp(a,b,c,d,e){return D(function(f){if(1==f.g)return Xp(b,a),a.matchedStreams?a.segmentIndex?u(f,Yp(a,c),2):f.B(2):f.return(!1);Zp(a,c,d,e);return f.return(!0)})}
673
+ function Yp(a,b){var c,d,e,f,g,h,k;return D(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof Uj)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.i.push(k.segmentIndex);B(l)})}
674
+ function Wp(a,b,c,d,e){var f=c(a);Xp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return D(function(g){if(f.segmentIndex)return g.B(0);f.segmentIndex=new Uj;return u(g,Yp(f,0),0)})});if(!f.matchedStreams||!f.matchedStreams.length)return null;Zp(f,0,d,e);return f}function Zp(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==zd(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
675
+ function Pp(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}
676
+ function Tp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
677
+ function Qp(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(ka(f),ka(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=Wg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new K(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
678
+ (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=Pp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Qp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Qp(a.trickModeVideo,b)}
679
+ function Up(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ka(a.keyIds),ka(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ka(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
680
+ function Xp(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:$p,video:$p,text:aq,image:bq}[e.type],g={audio:cq,video:dq,text:eq,image:fq}[e.type],h=null;d=t(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}function $p(a,b){var c;!(c=b.mimeType!=a.mimeType||dd(b.codecs)!=dd(a.codecs))&&(c=a.drmInfos)&&(a=a.drmInfos,b=b.drmInfos,c=!(a.length&&b.length?0<Wg(a,b).length:1));return c?!1:!0}
681
+ function aq(a,b){return a.language?b.language?a.forced!==b.forced||0==zd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function bq(a){return a.tilesLayout?!0:!1}
682
+ function cq(a,b,c){if(a.id==c.id)return!0;var d=zd(a.language,b.language),e=zd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}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;
683
+ if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=gq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==hq)return!0;if(d==iq)return!1;d=gq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==hq?!0:d==iq?!1:a.bandwidth&&jq(a.bandwidth,b.bandwidth,c.bandwidth)==hq?!0:!1}
684
+ function dq(a,b,c){if(a.id==c.id)return!0;var d=gq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==hq)return!0;if(d==iq)return!1;if(a.frameRate){d=gq(a.frameRate,b.frameRate,c.frameRate);if(d==hq)return!0;if(d==iq)return!1}return a.bandwidth&&jq(a.bandwidth,b.bandwidth,c.bandwidth)==hq?!0:!1}
685
+ function eq(a,b,c){if(a.id==c.id)return!0;var d=zd(a.language,b.language),e=zd(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(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}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&&
686
+ b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function fq(a,b,c){return a.id==c.id?!0:gq(a.width*a.height,b.width*b.height,c.width*c.height)==hq?!0:!1}
687
+ function Sp(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,external:!1}}
688
+ function Np(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Rj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1}}
689
+ function gq(a,b,c){if(b==a&&a!=c)return iq;if(c==a&&a!=b)return hq;if(b>a){if(c<=a||c-a<b-a)return hq;if(c-a>b-a)return iq}else{if(c>a)return iq;if(a-c<a-b)return hq;if(a-c>a-b)return iq}return kq}function jq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?hq:b<a?iq:kq}var hq=1,kq=0,iq=-1;function lq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.G=1;this.l={};this.L={};this.j=new Lp;this.D=0;this.H=new Ua(5);this.F=new pc(function(){mq(a)});this.s=new df;this.u=null;this.J=[];this.A=Infinity;this.o=!1}r=lq.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this,d;return D(function(e){if(1==e.g)return c.o=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,nq(c),2);d=e.h;c.h&&oq(c,d);if(!c.h)throw new K(2,7,7001);return e.return(c.i)})};
690
+ r.stop=function(){for(var a=t(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.F&&(this.F.stop(),this.F=null);return this.s.destroy()};r.update=function(){var a=this,b;return D(function(c){if(1==c.g)return xa(c,2),u(c,nq(a),4);if(2!=c.g)return za(c,0);b=Aa(c);if(!a.h||!b)return c.return();a.h.onError(b);B(c)})};r.onExpirationUpdated=function(){};
691
+ r.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.T()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.ab();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.D=b.endTime-a,oq(this,0))}}};
692
+ function nq(a){var b,c,d,e,f,g,h;return D(function(k){if(1==k.g)return b=kf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),ef(a.s,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k.return(0);f.uri&&f.uri!=f.originalUri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,pq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.H.sample(1,h);return k.return(h)})}
693
+ function pq(a,b,c){var d,e,f,g,h;return D(function(k){if(1==k.g){d=lg(b,"MPD");if(!d)throw new K(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(qq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=gp(d,a.g.retryParameters,f,c,a.h.networkingEngine);ef(a.s,g);return u(k,g.promise,2)}h=k.h;return k.return(qq(a,h,c))})}
694
+ function qq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A,z,E,F,H,I,L,J,M,T,W,O,fa,Ka,La,Xa,Ra,$a;return D(function(ja){switch(ja.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Tf(b,"Location").map(Zf).filter(sd);0<f.length&&(g=fc(e,f),e=a.m=g);h=Tf(b,"BaseURL");k=h.map(Zf);l=fc(e,k);m=0;h&&h.length&&(m=ag(h[0],"availabilityTimeOffset",hg)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=ag(b,"minBufferTime",cg)||0);a.D=ag(b,"minimumUpdatePeriod",cg,-1);q=ag(b,"availabilityStartTime",bg);v=
695
+ ag(b,"timeShiftBufferDepth",cg);w=a.g.dash.ignoreSuggestedPresentationDelay;x=null;w||(x=ag(b,"suggestedPresentationDelay",cg));y=a.g.dash.ignoreMaxSegmentDuration;C=null;y||(C=ag(b,"maxSegmentDuration",cg));A=b.getAttribute("type")||"static";if(a.i)for(z=a.i.presentationTimeline,E=t(Object.values(a.l)),F=E.next();!F.done;F=E.next())H=F.value,H.segmentIndex&&H.segmentIndex.kb(z.Ka());else I=a.g.defaultPresentationDelay||1.5*p,L=null!=x?x:I,z=new Q(q,L,a.g.dash.autoCorrectDrift);z.Cc("static"==A);
696
+ (J=z.T())&&!isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);z.qe(v);M=b.getAttribute("profiles")||"";T={Za:"static"!=A,presentationTimeline:z,ca:null,U:null,la:null,I:null,bandwidth:0,Oe:!1,jb:m,profiles:M.split(",")};W=rq(a,T,l,b);O=W.duration;fa=W.periods;"static"!=A&&W.He||z.Da(O||Infinity);a.A&&!a.o&&(Ka=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.o=a.h.isLowLatencyMode());a.o?z.Ye(a.A):a.A&&bb("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.");
697
+ z.Vd(C||1);return u(ja,Mp(a.j,fa,T.Za),2);case 2:a.o&&(p=0,La=null!=x?x:a.g.defaultPresentationDelay,z.me(La));if(a.i){a.i.variants=a.j.l;Xa=a.j.j.slice();0<Xa.length&&(a.i.textStreams=Xa);a.i.imageStreams=a.j.i;a.h.filter(a.i);ja.B(3);break}a.i={presentationTimeline:z,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0,sequenceMode:a.g.dash.sequenceMode};if(!z.hf()){ja.B(4);break}Ra=Tf(b,"UTCTiming");return u(ja,sq(a,l,Ra),5);case 5:$a=ja.h;if(!a.h)return ja.return();
698
+ z.Ze($a);case 4:z.Rd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),B(ja)}})}
699
+ function rq(a,b,c,d){var e=ag(d,"mediaPresentationDuration",cg),f=[],g=0;d=Tf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=ag(k,"start",cg,g),n=k.id,p=ag(k,"duration",cg),q=null;if(l){var v=ag(l,"start",cg);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.u&&null!==n&&null!==m&&m<a.u)||a.J.includes(n)||h+1==d.length){null!==m&&(null===a.u||m>a.u)&&(a.u=m);g=tq(a,b,c,{start:m,duration:q,node:k,Ld:null==q||!l});f.push(g);b.ca.id&&q&&(a.L[b.ca.id]=q);if(null==q){g=
700
+ null;break}g=m+q}}a.J=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,He:!1}:{periods:f,duration:g,He:!0}}
701
+ function tq(a,b,c,d){b.ca=uq(d.node,null,c);b.U=d;b.ca.jb=b.jb;b.ca.id||(b.ca.id="__shaka_period_"+d.start);var e=Tf(d.node,"EventStream");c=b.presentationTimeline.Ka();e=t(e);for(var f=e.next();!f.done;f=e.next())vq(a,d.start,d.duration,f.value,c);c=Tf(d.node,"AdaptationSet").map(function(m){return wq(a,b,m)}).filter(sd);if(b.Za){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.xg);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new K(2,4,4018);
702
+ }d=c.filter(function(m){return!m.ue});c=c.filter(function(m){return m.ue});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ue.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={Kc:h.Kc},l=k.next())h.Kc=l.value,h.Kc.trickModeVideo=e.streams.find(function(m){return function(n){return dd(m.Kc.codecs)==dd(n.codecs)}}(h))}}}c=xq(a.g.disableAudio,d,"audio");e=xq(a.g.disableVideo,d,"video");f=xq(a.g.disableText,
703
+ d,kc);d=xq(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new K(2,4,4004);return{id:b.ca.id,Nc:c,md:e,textStreams:f,imageStreams:d}}function xq(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,ka(e.streams));return d},[])}
704
+ function wq(a,b,c){function d(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.la=uq(c,b.ca,null);var e=!1,f=Tf(c,"Role"),g=f.map(function(F){return F.getAttribute("value")}).filter(sd),h=void 0,k=b.la.contentType==kc;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=
705
+ l}}var n;m=Tf(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var q=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==q?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q?n=d(parseInt(p.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=q&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=q&&(l=!0)}m=Tf(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==
706
+ p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),10)));m=Tf(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(q=p.value,p=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=q){q=q.split(";");for(var w=t(q),x=w.next();!x.done;x=w.next()){var y=x.value,C=x=void 0;y.includes("=")?(y=y.split("="),x=y[0].startsWith("CC")?y[0]:"CC"+y[0],C=y[1]||"und"):(x="CC"+p,2==q.length?p+=2:p++,C=y);v.set(x,vd(C))}}else v.set("CC1",
707
+ "und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=1,null!=q)for(q=t(q.split(";")),x=q.next();!x.done;x=q.next())x=x.value,y=w=void 0,x.includes("=")?(x=x.split("="),w="svc"+x[0],y=x[1].split(",")[0].split(":").pop()):(w="svc"+p,p++,y=x),v.set(w,vd(y));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=Tf(c,"ContentProtection");var A=Ro(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),z=vd(c.getAttribute("lang")||"und"),
708
+ E=c.getAttribute("label");(l=Tf(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(E=l.textContent));l=Tf(c,"Representation");c=l.map(function(F){if(F=yq(a,b,A,h,z,E,e,g,v,F))F.hdr=F.hdr||n;return F}).filter(function(F){return!!F});if(0==c.length){f="image"==b.la.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new K(2,4,4003);}if(!b.la.contentType||"application"==b.la.contentType)for(b.la.contentType=zq(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=
709
+ b.la.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=m.value,p=t(A.drmInfos),q=p.next();!q.done;q=p.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ka(q.keyIds),ka(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(F){return F.getAttribute("id")}).filter(sd);return{id:b.la.id||"__fake__"+a.G++,contentType:b.la.contentType,language:z,yh:e,streams:c,drmInfos:A.drmInfos,ue:f,xg:k}}
710
+ function yq(a,b,c,d,e,f,g,h,k,l){b.I=uq(l,b.la,null);a.A=Math.min(a.A,b.I.jb);if(!Aq(b.I))return null;var m=b.U.start;b.bandwidth=ag(l,"bandwidth",fg)||0;var n=b.I.contentType,p=n==kc||"application"==n;n="image"==n;try{var q=function(F,H,I){return Bq(a,F,H,I)};if(b.I.Ac)var v=tp(b,q);else if(b.I.eb)v=zp(b,a.l);else if(b.I.Bc)v=Ep(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.L);else{var w=b.I.Aa,x=b.U.duration||0;v={Hb:function(){return Promise.resolve(Tj(m,x,w))}}}}catch(F){if((p||n)&&4002==F.code)return null;
711
+ throw F;}q=Tf(l,"ContentProtection");q=Uo(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var y=!1;Tf(l,"SupplementalProperty").some(function(F){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==F.getAttribute("schemeIdUri")&&"JOC"==F.getAttribute("value")})&&(y=!0);var C=!1;p&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var A;if(n&&((l=Tf(l,"EssentialProperty").find(function(F){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(F.getAttribute("schemeIdUri"))}))&&
712
+ (A=l.getAttribute("value")),!A))return null;var z;l=b.I.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"))&&(z="PQ");l=b.I.id?b.ca.id+","+b.I.id:"";var E=l&&a.l[l]?a.l[l]:{id:a.G++,originalId:b.I.id,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){E.segmentIndex&&(E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:b.I.codecs,
713
+ frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.la.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.I.ed,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:y,closedCaptions:k,hdr:z,tilesLayout:A,matchedStreams:[],external:!1};E.createSegmentIndex=function(){var F;return D(function(H){if(1==
714
+ H.g){if(E.segmentIndex)return H.B(0);F=E;return u(H,v.Hb(),3)}F.segmentIndex=H.h;B(H)})};l&&b.Za&&!a.l[l]&&(a.l[l]=E);return E}function mq(a){var b,c;D(function(d){switch(d.g){case 1:return b=0,xa(d,2),u(d,nq(a),4);case 4:b=d.h;za(d,3);break;case 2:c=Aa(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();oq(a,b);B(d)}})}function oq(a,b){0>a.D||a.F.O(Math.max(3,a.D-b,Va(a.H)))}
715
+ function uq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ed:null,audioSamplingRate:null,jb:0};c=c||b.Aa;var d=Tf(a,"BaseURL"),e=d.map(Zf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=ag(a,"frameRate",ig)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Tf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
716
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Tf(a,"AudioChannelConfiguration");m=Cq(m)||b.ed;p=ag(a,"audioSamplingRate",gg)||b.audioSamplingRate;f||(f=zq(g,h));var q=Sf(a,"SegmentBase"),v=Sf(a,"SegmentTemplate"),w=q?ag(q,"availabilityTimeOffset",hg)||0:0,x=v?ag(v,"availabilityTimeOffset",hg)||0:0;d=d&&d.length?ag(d[0],"availabilityTimeOffset",hg)||0:0;d=b.jb+d+w+x;return{Aa:fc(c,e),Ac:q||b.Ac,eb:Sf(a,"SegmentList")||b.eb,Bc:v||b.Bc,width:ag(a,"width",gg)||b.width,height:ag(a,
717
+ "height",gg)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),ed:m,audioSamplingRate:p,jb:d}}
718
+ function Cq(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=
719
+ 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 Aq(a){var b=a.Ac?1:0;b+=a.eb?1:0;b+=a.Bc?1:0;if(0==b)return a.contentType==kc||"application"==a.contentType?!0:!1;1!=b&&(a.Ac&&(a.eb=null),a.Bc=null);return!0}
720
+ function Dq(a,b,c,d){var e,f,g,h,k,l;return D(function(m){if(1==m.g)return e=fc(b,[c]),f=kf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),ef(a.s,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m.return(0);k=h.headers.date}else k=Fc(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
721
+ function sq(a,b,c){var d,e,f,g,h,k,l,m;return D(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.B(4);break}h=g.value;xa(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.B(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.B(8);
722
+ 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":bb("NTP UTCTiming scheme is not supported");break;default:bb("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return u(n,Dq(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return u(n,Dq(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:za(n,
723
+ 3);break;case 5:Aa(n);case 3:g=f.next();n.B(2);break;case 4:return bb("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
724
+ function vq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=ag(d,"timescale",gg)||1;d=t(Tf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=ag(k,"presentationTime",gg)||0,m=ag(k,"duration",gg)||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))}}
725
+ function Bq(a,b,c,d){var e,f,g,h,k;return D(function(l){if(1==l.g)return e=qf,f=Dk(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),ef(a.s,h),u(l,h.promise,2);k=l.h;return l.return(k.data)})}function zq(a,b){return id(bd(a,b))?kc:a.split("/")[0]}G("shaka.dash.DashParser",lq);bh.mpd=function(){return new lq};$g["application/dash+xml"]=function(){return new lq};$g["video/vnd.mpeg.dash.mpd"]=function(){return new lq};function Eq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Fq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Fq.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};
726
+ Fq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Gq(a,b){a=a.getAttribute(b);if(!a)throw new K(2,4,4023,b);return a.value}function Hq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function Iq(a,b){this.name=a;this.value=b};function Jq(a,b){return a.filter(function(c){return c.name==b})}function Kq(a,b){return a.filter(function(c){return Gq(c,"TYPE")==b})}function Lq(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Mq(a,b){var c=0;c=void 0===c?0:c;return(a=Lq(a,b))?Number(a.value):c}function Nq(a,b){return fc([a],[b])[0]};function Oq(a){this.h=a;this.g=0}function Pq(a){Qq(a,/[ \t]+/gm)}function Qq(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Rq(a){return a.g==a.h.length?null:(a=Qq(a,/[^ \t\n]*/gm))?a[0]:null};function Sq(){this.g=0}
727
+ function Tq(a,b,c){b=Fc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new K(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=Uq(a,g),--a.g,Vq.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=Uq(a,h);if(Wq.includes(h.name)){if(1!=b)throw new K(2,4,4017);
728
+ 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=Uq(a,m),Vq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?null!=Z(m,"BYTERANGE-START")?null!=Z(m,"BYTERANGE-LENGTH")&&k.push(m):k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Nq(d,m.trim()),h&&g.push(h),e.push(new Hq(m,g,k)),g=[],k=[]);k.length&&
729
+ (h&&g.push(h),e.push(new Hq("",g,k)));return new Eq(c,b,f,e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Iq("URI",k)),e=!0)}}return new Eq(c,b,f)}function Uq(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new K(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Oq(d);var f;(f=Qq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Qq(d,g);)c.push(new Iq(f[1],f[2]||f[3])),Pq(d)}return new Fq(a,b,c,e)}
730
+ var Vq="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 EXT-X-PART-INF".split(" "),Wq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Xq(){}function Yq(a){try{var b=Zq(a);return Ve({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Te(c)}}
731
+ function Zq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new K(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new K(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Oc(a):e=Jc(a);return{data:e,contentType:c}}G("shaka.net.DataUriPlugin",Xq);Xq.parse=Yq;gf("data",Yq);function $q(){var a=this;this.g=this.j=null;this.Ha=1;this.o=new Map;this.A=new Map;this.G=new Map;this.G.set("video",new Map);this.G.set("audio",new Map);this.G.set(kc,new Map);this.G.set("image",new Map);this.za=new Set;this.h=new Map;this.i=null;this.V="";this.ea=new Sq;this.$=0;this.D=-1;this.J=Infinity;this.Ia=!1;this.m=new pc(function(){ar(a)});this.W=br;this.F=null;this.fa=0;this.L=Infinity;this.da=this.ka=0;this.H=new df;this.s=new Map;this.u=new Map;this.P=new Map;this.N=new Map;this.l=!1}
732
+ r=$q.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this,d;return D(function(e){return 1==e.g?(c.j=b,c.l=b.isLowLatencyMode(),u(e,cr(c,a),2)):3!=e.g?(d=e.h,c.V=d.uri,u(e,dr(c,d.data,a),3)):e.return(c.F)})};r.stop=function(){this.m&&(this.m.stop(),this.m=null);var a=[];this.H&&(a.push(this.H.destroy()),this.H=null);this.g=this.j=null;this.za.clear();this.F=null;this.h.clear();this.A.clear();this.u.clear();this.o.clear();this.P.clear();this.N.clear();return Promise.all(a)};
733
+ r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return D(function(m){if(1==m.g){if(!er(a))return m.return();b=[];c=Array.from(a.h.values());d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(fr(a,g));return u(m,Promise.all(b),2)}gr(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.rc});d.length&&!h&&(k=hr,ir(a,k.lf),l=d.map(function(n){return n.Sa}),a.i.Da(Math.min.apply(Math,ka(l))),a.j.updateDuration());h&&jr(a);
734
+ B(m)})};function kr(a,b){return er(a)?a.G.get(b.type):b.dd}
735
+ function fr(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A;return D(function(z){if(1==z.g)return c=b.Mc,d=new Sb(c),a.l&&b.Pc&&Vb(d,new Xb("_HLS_skip=YES")),u(z,cr(a,d.toString()),2);e=z.h;if(!b.stream.segmentIndex)return z.return();f=Tq(a.ea,e.data,e.uri);if(1!=f.type)throw new K(2,4,4017);g=Jq(f.g,"EXT-X-DEFINE");h=lr(a,g);k=b.stream;l=kr(a,b);m=mr(f,k.mimeType);n=m.keyIds;p=m.drmInfos;q=function(E,F){return E.size===F.size&&[].concat(ka(E)).every(function(H){return F.has(H)})};q(k.keyIds,n)||(k.keyIds=
736
+ n,k.drmInfos=p,a.j.newDrmInfo(k));v=nr(a,f,k.type,l,h);k.segmentIndex.Mb(v,a.i.Ka());v.length&&(w=Mq(f.g,"EXT-X-MEDIA-SEQUENCE"),x=l.get(w),k.segmentIndex.kb(x));y=v[0];b.qb=y.startTime;C=v[v.length-1];b.Sa=C.endTime;if(A=Lq(f.g,"EXT-X-ENDLIST"))b.rc=!0;B(z)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};
737
+ function or(a,b){for(var c=-1==a.D,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=kr(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.D=Math.max(a.D,k));e.Id=k;break}}}}if(!(0>a.D))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(e=a.D-c.Id,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),pr(a,c,d)}
738
+ function qr(a,b){if(Infinity==a.J){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.g&&(a.J=Math.min(a.J,d.g))}}b=a.J;if(Infinity!=b)for(d=t(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.g)ab("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.Ec,"Expect AV sync issues!");else for(pr(a,c,f.g-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.re(b)}}}
739
+ function pr(a,b,c){b.qb+=c;b.Sa+=c;a=kr(a,b);b=t(a);for(var d=b.next();!d.done;d=b.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.set(d,e+c)}}
740
+ function dr(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A,z,E,F,H,I,L,J,M,T,W,O,fa,Ka,La,Xa;return D(function(Ra){switch(Ra.g){case 1:d=Tq(a.ea,b,a.V);e=Jq(d.g,"EXT-X-DEFINE");for(var $a=t(e),ja=$a.next();!ja.done;ja=$a.next()){var na=ja.value;ja=Z(na,"NAME");na=Z(na,"VALUE");ja&&na&&(a.o.has(ja)||a.o.set(ja,na))}f=[];g=[];h=[];if(1==d.type)return F=a.g.hls.mediaPlaylistFullMimeType,d.segments.length&&(H=new Sb(d.segments[0].i),I=H.sa.split(".").pop(),(L=rr[I])?F=L:"ts"!==I&&"mp4"!==I&&(sr[I]?(L=sr[I],
741
+ J=a.g.hls.defaultAudioCodec,F=L+'; codecs="'+J+'"'):tr[I]&&(L=tr[I],M=a.g.hls.defaultVideoCodec,F=L+'; codecs="'+M+'"'))),T=F.split(";")[0],W=T.split("/")[0],O=fd(F),fa=new Map,u(Ra,ur(a,d,c,c,O,W,"",!0,"Media Playlist",null,fa,null,!1,!1,T),5);k=Jq(d.g,"EXT-X-MEDIA");l=Jq(d.g,"EXT-X-STREAM-INF");m=Jq(d.g,"EXT-X-IMAGE-STREAM-INF");n=Jq(d.g,"EXT-X-SESSION-KEY");$a=t(l);for(ja=$a.next();!ja.done;ja=$a.next()){var ea=ja.value;na=Z(ea,"AUDIO");ja=Z(ea,"VIDEO");var qa=Z(ea,"SUBTITLES");ea=vr(a,ea);if(qa){var Ya=
742
+ ic(kc,ea);a.u.set(qa,Ya);lb(ea,Ya)}na&&(qa=ic("audio",ea),qa||(qa=a.g.hls.defaultAudioCodec),a.u.set(na,qa));ja&&(na=ic("video",ea),na||(na=a.g.hls.defaultVideoCodec),a.u.set(ja,na))}p=Jq(d.g,"EXT-X-SESSION-DATA");q=t(p);for(v=q.next();!v.done;v=q.next())if(w=v.value,x=Z(w,"DATA-ID"),y=Z(w,"URI"),C=Z(w,"LANGUAGE"),A=Z(w,"VALUE"),z=(new Map).set("id",x),y&&z.set("uri",Nq(a.V,y)),C&&z.set("language",C),A&&z.set("value",A),E=new N("sessiondata",z),a.j)a.j.onEvent(E);wr(a,k);$a=Kq(k,"CLOSED-CAPTIONS");
743
+ $a=t($a);for(ja=$a.next();!ja.done;ja=$a.next())na=ja.value,qa=Z(na,"LANGUAGE"),ja=xr(na),qa||(qa=Z(na,"NAME"))&&(ja=qa),qa=Gq(na,"GROUP-ID"),na=Gq(na,"INSTREAM-ID").replace("SERVICE","svc"),a.s.get(qa)||a.s.set(qa,new Map),a.s.get(qa).set(na,ja);f=yr(a,l,n);g=zr(a,k);return u(Ra,Ar(a,m),4);case 4:h=Ra.h;Ra.B(3);break;case 5:Ka=Ra.h,a.h.set(c,Ka),f.push({id:0,language:"und",disabledUntilTime:0,primary:!0,audio:"audio"==W?Ka.stream:null,video:"video"==W?Ka.stream:null,bandwidth:0,allowedByApplication:!0,
744
+ allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.j)throw new K(2,7,7001);a.i=new Q(null,0);a.i.Cc(!0);1==d.type&&(er(a)&&(Br(a,d),La=a.$,a.m.O(La)),Xa=Array.from(a.h.values()),Cr(a,Xa),jr(a));a.F={presentationTimeline:a.i,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.j.makeTextStreamsForClosedCaptions(a.F);B(Ra)}})}
745
+ function jr(a){if(er(a)){a.$=a.L;if(a.W==Dr){for(var b,c=b=Infinity,d=t(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Sa),c=Math.min(c,e.qb));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.i.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.i.qe(b)}if(!a.i.s)for(b=t(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
746
+ c.g&&a.i.$e(c.g)}else a.i.Da(Er(a));a.i.Rd()}function lr(a,b){var c=new Map;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.o.get(e))&&c.set(e,d)}return c}
747
+ function zr(a,b){var c=Kq(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Fr(a,g).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Gq(d.value,"GROUP-ID");if(d=a.u.get(e))if(e=a.A.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Gr(kc,d)||Hr(kc)}}return b.filter(function(g){return g})}
748
+ function Ar(a,b){var c,d;return D(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return D(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);xa(l,2);return u(l,Ir(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=Aa(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
749
+ function wr(a,b){b=b.filter(function(d){var e=Z(d,"URI")||"";return"SUBTITLES"!=Z(d,"TYPE")&&""!=e});b=t(b);for(var c=b.next();!c.done;c=b.next())Fr(a,c.value)}
750
+ function yr(a,b,c){var d=[],e=new Set;if(0<c.length){c=t(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=Gq(f,"METHOD");if("NONE"!=g&&"AES-128"!=g&&(g=Z(f,"KEYFORMAT")||"identity",f=(g=Jr[g])?g(f,""):null)){if(f.keyIds){g=t(f.keyIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}d.push(f)}}}b=b.map(function(k){var l=Z(k,"FRAME-RATE"),m=Number(Z(k,"AVERAGE-BANDWIDTH"))||Number(Gq(k,"BANDWIDTH")),n=Z(k,"RESOLUTION");n=t(n?n.split("x"):[null,null]);var p=n.next().value,q=n.next().value,
751
+ v=Z(k,"VIDEO-RANGE");k=Kr(a,k);n=k.audio;k=k.video;for(var w=t(k),x=w.next();!x.done;x=w.next())if(x=x.value.stream)x.width=Number(p)||void 0,x.height=Number(q)||void 0,x.frameRate=Number(l)||void 0,x.hdr=v||void 0;l=a.g.disableAudio;if(!n.length||l)n=[null];l=a.g.disableVideo;if(!k.length||l)k=[null];l=[];n=t(n);for(p=n.next();!p.done;p=n.next())for(p=p.value,q=t(k),v=q.next();!v.done;v=q.next()){var y=v.value;if(v=p?p.stream:null)v.drmInfos=d,v.keyIds=e;if(w=y?y.stream:null)w.drmInfos=d,w.keyIds=
752
+ e;x=p?p.stream.drmInfos:null;var C=y?y.stream.drmInfos:null;y=(y?y.Ec:"")+" - "+(p?p.Ec:"");v&&w&&x.length&&C.length&&!(0<Wg(x,C).length)||a.za.has(y)||(v={id:a.Ha++,language:v?v.language:"und",primary:!!v&&v.primary||!!w&&w.primary,audio:v,video:w,bandwidth:m,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},l.push(v),a.za.add(y))}return l}).reduce(qd,[]);return b=b.filter(function(k){return null!=k})}
753
+ function Kr(a,b){var c=vr(a,b),d=Z(b,"AUDIO"),e=Z(b,"VIDEO"),f=d||e;f=f&&a.A.has(f)?a.A.get(f):[];d={audio:d?f:[],video:e?f:[]};e=!1;var g=Gq(b,"URI"),h=d.audio.find(function(m){return m&&m.Ec==g}),k=ic("video",c),l=ic("audio",c);l&&!k?(f="audio",e=0<d.audio.length):!f.length&&l&&k?(f="video",c=[[k,l].join()]):d.audio.length&&h?(f="audio",e=!0):f=d.video.length&&!d.audio.length?"audio":"video";e||(a=Lr(a,b,c,f),d[a.stream.type]=[a]);return d}
754
+ function vr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);c=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);a=new Set;b=[];c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=ed(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function xr(a){a=Z(a,"LANGUAGE")||"und";return vd(a)}
755
+ function Fr(a,b){var c=Gq(b,"GROUP-ID"),d="",e=Gq(b,"TYPE").toLowerCase();"subtitles"==e&&(e=kc);var f=e;f==kc?d=Z(b,"CODECS")||"":c&&a.u.has(c)&&(d=a.u.get(c));e=Mr(Gq(b,"URI"),a.o);if(a.h.has(e))return a.h.get(e);var g=xr(b),h=Z(b,"NAME"),k="YES"==Z(b,"DEFAULT");var l="audio"==f?(l=Z(b,"CHANNELS"))?parseInt(l.split("/")[0],10):null:null;var m="audio"==f?(m=Z(b,"CHANNELS"))?m.includes("/JOC"):!1:!1;var n=Z(b,"CHARACTERISTICS");b="YES"==Z(b,"FORCED");d=Nr(a,e,d,f,g,k,h,l,null,n,b,m);a.A.has(c)?a.A.get(c).push(d):
753
756
  a.A.set(c,[d]);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
754
- function Kr(a,b){var c,d,e,f,g,h,k,l,m,n;return D(function(p){if(1==p.g){c=Or(Hq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return p.return(a.h.get(c));e=yr(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=Pr(a,c,d,"image",e,!1,f,null,null,g,!1,!1);return a.h.has(c)?p.return(a.h.get(c)):(k=Z(b,"RESOLUTION"))?u(p,h.stream.createSegmentIndex(),3):p.B(2)}2!=p.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
755
- Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p.return(h)})}function Nr(a,b,c,d){var e=Or(Hq(b,"URI"),a.o);if(a.h.has(e))return a.h.get(e);a:{b=Z(b,"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.s.get(b);break a}if(!b&&a.s.size)for(b=t(a.s.keys()).next();!b.done;){b=a.s.get(b.value);break a}}b=null}c=ic(d,c);d=Pr(a,e,c,d,"und",!1,null,null,b,null,!1,!1);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
756
- function Pr(a,b,c,d,e,f,g,h,k,l,m,n){function p(C){var A,z,E,F,H,I,J,K,P,T,da,N,ia,La;return D(function(Ka){if(1==Ka.g)return u(Ka,dr(a,w.Nc),2);if(3!=Ka.g){A=Ka.h;if(C.aborted)return Ka.return();z=A.uri;E=Uq(a.fa,A.data,z);F=fr(a);return u(Ka,vr(a,E,b,z,c,d,e,f,g,h,k,l,m,n),3)}H=Ka.h;if(C.aborted)return Ka.return();I=H.stream;fr(a)&&!F&&Cr(a,E);w.Nc=z;w.qb=H.qb;w.Ta=H.Ta;w.Qc=H.Qc;w.rc=H.rc;w.dd=H.dd;w.Qd=!0;v.segmentIndex=I.segmentIndex;v.encrypted=I.encrypted;v.drmInfos=I.drmInfos;v.keyIds=I.keyIds;
757
- v.mimeType=I.mimeType;ej.includes(v.mimeType)&&(v.codecs="");v.drmInfos.length&&a.j.newDrmInfo(v);J=mc;if(d==J.ra||d==J.jb)for(K=t(a.h.values()),P=K.next();!P.done;P=K.next())T=P.value,T.Qd||T.type!=d||(T.stream.mimeType=I.mimeType,ej.includes(T.stream.mimeType)&&(T.stream.codecs=""));d==J.Z&&(da=I.segmentIndex.get(0))&&da.g&&(v.mimeType="application/mp4");Qr(a)&&(a.Ia?Dr(a,[w]):(a.Ia=!0,N=Array.from(a.h.values()),ia=N.filter(function(ab){return ab.stream.segmentIndex}),Dr(a,ia),kr(a),La=a.aa,0<La&&
758
- a.m.O(La)));B(Ka)})}var q=Oq(a.V,b),v=Rr(a,c,d,e,f,g,h,k,l,m,n);ej.includes(v.mimeType)&&(v.codecs="");var w={stream:v,type:d,Fc:b,Nc:q,qb:0,Ta:0,dd:new Map,Qc:!1,rc:!1,Id:-1,Qd:!1},x=null,y=new AbortController;v.createSegmentIndex=function(){if(x)return x;y=new AbortController;return x=new Promise(function(C){C(p(y.signal))})};v.closeSegmentIndex=function(){x&&!v.segmentIndex&&y.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);x=null};return w}
759
- function Gr(a){var b=Infinity;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Ta));return b}function Fr(a){var b=Infinity,c=Infinity;a=t(a.h.values());for(var d=a.next();!d.done;d=a.next())d=d.value,d.stream.segmentIndex&&"text"!=d.stream.type&&(b=Math.min(b,d.Ta),c=Math.min(c,d.qb));return b-c}
760
- function hr(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&Rj(d.segmentIndex,function(e){c.push(e)});a.i.Nb(c)}function Dr(a,b){if(!fr(a))for(var c=Gr(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.ab(0,c);c=t(b);for(e=c.next();!e.done;e=c.next())e=e.value.stream,ej.includes(e.mimeType)&&(e.codecs="");hr(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?pr(a,b):rr(a,b)}
761
- function Qr(a){if(!a.F)return!1;var b=[],c=[];a=t(a.F.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
762
- function vr(a,b,c,d,e,f,g,h,k,l,m,n,p,q,v){var w,x,y,C,A,z,E,F,H,I,J,K,P,T,da,N;return D(function(ia){if(1==ia.g){if(1!=b.type)throw new L(2,4,4017);w=Kq(b.g,"EXT-X-DEFINE");x=mr(a,w);Sr(a,b);return v?ia.B(2):u(ia,Tr(a,f,e,b,x),3)}2!=ia.g&&(v=ia.h);y=nr(b,v);C=y.drmInfos;A=y.keyIds;z=y.encrypted;E=y.qf;if(z&&!C.length&&!E)throw new L(2,4,4026);F=fr(a)?a.G.get(f):new Map;H=a.l;I=or(a,b,f,F,x);H!=a.l&&Sr(a,b);J=I[0].startTime;K=I[I.length-1].endTime;P=new Qj(I);da=(T=Mq(b.g,"EXT-X-SERVER-CONTROL"))?
763
- null!=T.getAttribute("CAN-SKIP-UNTIL"):!1;N=Rr(a,e,f,g,h,k,l,m,n,p,q);N.segmentIndex=P;N.encrypted=z;N.drmInfos=C;N.keyIds=A;N.mimeType=v;return ia.return({stream:N,type:f,Fc:c,Nc:d,qb:J,Ta:K,Qc:da,rc:!1,Id:-1,dd:F,Qd:!1})})}
764
- function Rr(a,b,c,d,e,f,g,h,k,l,m){var n=Ir(c,b)||Jr(c),p=[];if(k){k=t(k.split(","));for(var q=k.next();!q.done;q=k.next())p.push(q.value)}k=void 0;c==lc&&(k=p.includes("public.accessibility.transcribes-spoken-dialog")&&p.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle");p.length||"subtitle"!==k||p.push("subtitle");return{id:a.Ha++,originalId:f,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:n,codecs:b,kind:k,encrypted:!1,drmInfos:[],
757
+ function Ir(a,b){var c,d,e,f,g,h,k,l,m,n;return D(function(p){if(1==p.g){c=Mr(Gq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return p.return(a.h.get(c));e=xr(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=Nr(a,c,d,"image",e,!1,f,null,null,g,!1,!1);return a.h.has(c)?p.return(a.h.get(c)):(k=Z(b,"RESOLUTION"))?u(p,h.stream.createSegmentIndex(),3):p.B(2)}2!=p.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
758
+ Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p.return(h)})}function Lr(a,b,c,d){var e=Mr(Gq(b,"URI"),a.o);if(a.h.has(e))return a.h.get(e);a:{b=Z(b,"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.s.get(b);break a}if(!b&&a.s.size)for(b=t(a.s.keys()).next();!b.done;){b=a.s.get(b.value);break a}}b=null}c=hc(d,c);d=Nr(a,e,c,d,"und",!1,null,null,b,null,!1,!1);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
759
+ function Nr(a,b,c,d,e,f,g,h,k,l,m,n){function p(C){var A,z,E,F,H,I,L,J,M,T,W,O,fa,Ka;return D(function(La){if(1==La.g)return u(La,cr(a,w.Mc),2);if(3!=La.g){A=La.h;if(C.aborted)return La.return();z=A.uri;E=Tq(a.ea,A.data,z);F=er(a);return u(La,ur(a,E,b,z,c,d,e,f,g,h,k,l,m,n),3)}H=La.h;if(C.aborted)return La.return();I=H.stream;er(a)&&!F&&Br(a,E);w.Mc=z;w.qb=H.qb;w.Sa=H.Sa;w.Pc=H.Pc;w.rc=H.rc;w.dd=H.dd;w.Qd=!0;v.segmentIndex=I.segmentIndex;v.encrypted=I.encrypted;v.drmInfos=I.drmInfos;v.keyIds=I.keyIds;
760
+ v.mimeType=I.mimeType;fj.includes(v.mimeType)&&(v.codecs="");v.drmInfos.length&&a.j.newDrmInfo(v);L=lc;if(d==L.qa||d==L.ib)for(J=t(a.h.values()),M=J.next();!M.done;M=J.next())T=M.value,T.Qd||T.type!=d||(T.stream.mimeType=I.mimeType,fj.includes(T.stream.mimeType)&&(T.stream.codecs=""));d==L.Y&&(W=I.segmentIndex.get(0))&&W.h&&(v.mimeType="application/mp4");Or(a)&&(a.Ia?Cr(a,[w]):(a.Ia=!0,O=Array.from(a.h.values()),fa=O.filter(function(Xa){return Xa.stream.segmentIndex}),Cr(a,fa),jr(a),Ka=a.$,0<Ka&&
761
+ a.m.O(Ka)));B(La)})}var q=Nq(a.V,b),v=Pr(a,c,d,e,f,g,h,k,l,m,n);fj.includes(v.mimeType)&&(v.codecs="");var w={stream:v,type:d,Ec:b,Mc:q,qb:0,Sa:0,dd:new Map,Pc:!1,rc:!1,Id:-1,Qd:!1},x=null,y=new AbortController;v.createSegmentIndex=function(){if(x)return x;y=new AbortController;return x=new Promise(function(C){C(p(y.signal))})};v.closeSegmentIndex=function(){x&&!v.segmentIndex&&y.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);x=null};return w}
762
+ function Er(a){var b=Infinity;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Sa));return b}function gr(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Sc(function(e){c.push(e)});a.i.Nb(c)}
763
+ function Cr(a,b){if(!er(a))for(var c=Er(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.$a(0,c);c=t(b);for(e=c.next();!e.done;e=c.next())e=e.value.stream,fj.includes(e.mimeType)&&(e.codecs="");gr(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?or(a,b):qr(a,b)}
764
+ function Or(a){if(!a.F)return!1;var b=[],c=[];a=t(a.F.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
765
+ function ur(a,b,c,d,e,f,g,h,k,l,m,n,p,q,v){var w,x,y,C,A,z,E,F,H,I,L,J,M,T,W,O;return D(function(fa){if(1==fa.g){if(1!=b.type)throw new K(2,4,4017);w=Jq(b.g,"EXT-X-DEFINE");x=lr(a,w);Qr(a,b);return v?fa.B(2):u(fa,Rr(a,f,e,b,x),3)}2!=fa.g&&(v=fa.h);y=mr(b,v);C=y.drmInfos;A=y.keyIds;z=y.encrypted;E=y.qf;if(z&&!C.length&&!E)throw new K(2,4,4026);F=er(a)?a.G.get(f):new Map;H=a.l;I=nr(a,b,f,F,x);H!=a.l&&Qr(a,b);L=I[0].startTime;J=I[I.length-1].endTime;M=new Rj(I);W=(T=Lq(b.g,"EXT-X-SERVER-CONTROL"))?null!=
766
+ T.getAttribute("CAN-SKIP-UNTIL"):!1;O=Pr(a,e,f,g,h,k,l,m,n,p,q);O.segmentIndex=M;O.encrypted=z;O.drmInfos=C;O.keyIds=A;O.mimeType=v;return fa.return({stream:O,type:f,Ec:c,Mc:d,qb:L,Sa:J,Pc:W,rc:!1,Id:-1,dd:F,Qd:!1})})}
767
+ function Pr(a,b,c,d,e,f,g,h,k,l,m){var n=Gr(c,b)||Hr(c),p=[];if(k){k=t(k.split(","));for(var q=k.next();!q.done;q=k.next())p.push(q.value)}k=void 0;c==kc&&(k=p.includes("public.accessibility.transcribes-spoken-dialog")&&p.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle");p.length||"subtitle"!==k||p.push("subtitle");return{id:a.Ha++,originalId:f,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:n,codecs:b,kind:k,encrypted:!1,drmInfos:[],
765
768
  keyIds:new Set,language:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:p,forced:l,channelsCount:g,audioSamplingRate:null,spatialAudio:m,closedCaptions:h,hdr:void 0,tilesLayout:void 0,external:!1}}
766
- function nr(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.done;d=a.next())d=Kq(d.value.g,"EXT-X-KEY"),c.push.apply(c,ka(d))}d=a=!1;var e=[],f=new Set;c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=Hq(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=Z(g,"KEYFORMAT")||"identity",g=(h=Lr[h])?h(g,b):null){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,qf:d}}
767
- function Ur(a,b,c){if(!window.crypto||!window.crypto.subtle)throw cb("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new L(2,4,4042);var d=0,e=Z(b,"IV","");if(e){var f=Pc(e.substr(2));if(16!=f.byteLength)throw new L(2,4,4043);}else d=Nq(c.g,"EXT-X-MEDIA-SEQUENCE");c=Oq(c.h,Hq(b,"URI"));var g=jf([c],a.g.retryParameters);b=b.toString()+"-"+d;if(!a.N.has(b)){var h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,
768
- l,m;return D(function(n){if(1==n.g)return u(n,Vr(a,g,6),2);if(3!=n.g){k=n.h;if(!k.data||16!=k.data.byteLength)throw new L(2,4,4044);l={name:"AES-CBC"};m=h;return u(n,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=n.h;h.fetchKey=void 0;B(n)})}};a.N.set(b,h)}return a.N.get(b)}
769
- function Sr(a,b){var c=Mq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Mq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)jr(a,cr);else{c?jr(a,Er):jr(a,Wr);d=Mq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new L(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Mq(b.g,"EXT-X-PART-INF");a.l&&c?(a.la=Number(Hq(c,"PART-TARGET")),a.L=Math.min(a.la,a.L),b=Mq(b.g,"EXT-X-SERVER-CONTROL"),a.ea=b?Number(Hq(b,"PART-HOLD-BACK")):0):a.L=Math.min(d,a.L);a.ga=Math.max(d,a.ga)}}
770
- function Cr(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ea)b=a.ea;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.ga*c}a.i.pe(0);a.i.af(b);a.i.Dc(!1)}
771
- function Xr(a,b,c,d){var e=Mq(c,"EXT-X-MAP");if(!e)return null;var f=Hq(e,"URI");f=Or(Oq(b.h,f),d);d=[f,Z(e,"BYTERANGE","")].join("-");if(!a.P.has(d)){var g=void 0,h=null;c=t(c);for(var k=c.next();!k.done;k=c.next())k=k.value,"EXT-X-KEY"==k.name?"AES-128"==Hq(k,"METHOD")&&k.id<e.id&&(g=Ur(a,k,b)):"EXT-X-BYTERANGE"==k.name&&k.id<e.id&&(h=k);b=Yr(f,e,h,g);a.P.set(d,b)}return a.P.get(d)}
772
- function Yr(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new wi(function(){return[a]},e,f,null,null,d)}
773
- function Zr(a,b,c,d,e,f,g,h,k){var l=d.g,m=Or(d.i,f),n=Mq(l,"EXTINF"),p=0;f=0;var q=null;d.h.length&&!a.l&&cb("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Mq(l,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=ag(w.value))}w=yi;Mq(l,"EXT-X-GAP")&&(w=2);if(!n){if(0==d.h.length)throw new L(2,4,4024,
774
- "EXTINF");if(!a.l)return null}var x=[];if(a.l){p={};for(var y=0;y<d.h.length;p={ud:p.ud},y++){var C=d.h[y],A=0==y?c:x[x.length-1],z=0==y?e:A.endTime,E=Number(Z(C,"DURATION"))||a.la;if(E){E=z+E;var F=0,H=null;"EXT-X-PRELOAD-HINT"==C.name?F=(F=Z(C,"BYTERANGE-START"))?Number(F):0:(F=Z(C,"BYTERANGE"),H=t($r(A,F)),F=H.next().value,H=H.next().value);if(A=Z(C,"URI"))p.ud=Oq(g,A),A=yi,"YES"==Z(C,"GAP")&&(A=2),z=new Q(z,E,function(I){return function(){return[I.ud]}}(p),F,H,b,0,0,Infinity,[],"",null,null,A),
775
- "EXT-X-PRELOAD-HINT"==C.name&&z.Re(),x.push(z)}}}if(n){a=Number(n.value.split(",")[0]);if(0==a)return null;p=e+a}else if(x.length)p=x[x.length-1].endTime;else return null;(a=Mq(l,"EXT-X-BYTERANGE"))?(q=t($r(c,a.value)),f=q.next().value,q=q.next().value):x.length&&(f=x[0].Ea,q=x[x.length-1].na);c="";a=null;"image"==h&&(c="1x1",h=Mq(l,"EXT-X-TILES"))&&(c=Hq(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new Q(e,p,function(){return m.length?[m]:[]},f,q,b,0,0,Infinity,x,c,a,v,w,k)}
776
- function $r(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.na+1,d=c+b-1);return[c,d]}
777
- function or(a,b,c,d,e){var f=b.segments,g=void 0,h=Nq(b.g,"EXT-X-DISCONTINUITY-SEQUENCE"),k=Nq(b.g,"EXT-X-MEDIA-SEQUENCE"),l=Mq(b.g,"EXT-X-SKIP");l=l?Number(Z(l,"SKIPPED-SEGMENTS")):0;var m=k+l,n=0;fr(a)&&d.has(m)&&(n=d.get(m));0===n&&a.W==Er&&0<d.size&&!d.has(m)&&(n=a.i.Ka());for(var p=[],q=null,v=0;v<f.length;v++){var w=f[v],x=0==v?n:q.endTime;m=k+l+v;Mq(w.g,"EXT-X-DISCONTINUITY")&&h++;var y=t(w.g);for(var C=y.next();!C.done;C=y.next())C=C.value,"EXT-X-KEY"==C.name&&("AES-128"==Hq(C,"METHOD")?g=
778
- Ur(a,C,b):g=void 0);d.set(m,x);y=Xr(a,b,w.g,e);!a.l&&a.j.isAutoLowLatencyMode()&&(a.j.enableLowLatencyMode(),a.l=a.j.isLowLatencyMode());if(w=Zr(a,y,q,w,x,e,b.h,c,g))q=w,w.j=h,a.g.hls.ignoreManifestProgramDateTime&&null!=a.D&&m<a.D||p.push(w)}if(b=p.some(function(A){return null!=A.X}))for(c={},d=0;d<p.length;c={Ub:c.Ub,Tb:c.Tb,Gc:c.Gc,Xa:c.Xa,Sb:c.Sb},d++)if(c.Xa=p[d],null==c.Xa.X)for(c.Tb=0,c.Ub=d,e=function(A){return function(){var z=p[A.Ub];if(z){if(null!=z.X)return z.X+A.Tb;A.Tb-=z.endTime-z.startTime;
779
- A.Ub+=1}return null}}(c),c.Sb=0,c.Gc=d,f=function(A){return function(){var z=p[A.Gc];if(z){z!=A.Xa&&(A.Sb+=z.endTime-z.startTime);if(null!=z.X)return z.X+A.Sb;--A.Gc}return null}}(c);null==c.Xa.X;)c.Xa.X=f(),null==c.Xa.X&&(c.Xa.X=e());if(b)for(c=t(p),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.X,e=t(e.h),f=e.next();!f.done;f=e.next())f=f.value,f.X=d,d+=f.endTime-f.startTime;a=a.J;if(b&&Infinity!=a)for(b=t(p),d=b.next();!d.done;d=b.next())d.value.se(a);return p}
780
- function Or(a,b){if(!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new L(2,4,4039,e);}}return a}function Ir(a,b){if(a==lc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":null:"image/jpeg"}
781
- function Jr(a){return a==lc?"text/vtt":as[a].mp4}function Tr(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v;return D(function(w){if(1==w.g){f=pf;g=Math.trunc((d.segments.length-1)/2);h=Or(d.segments[g].i,e);k=new Tb(h);l=k.ta.split(".").pop();m=as[b];if((n=m[l])||(n=sr[l])||(n=Ir(b,c)))return w.return(n);p=jf([h],a.g.retryParameters);p.method="HEAD";return u(w,Vr(a,p,f),2)}q=w.h;return(v=q.headers["content-type"])?w.return(v.split(";")[0]):w.return(Jr(b))})}
782
- function dr(a,b){b=jf([b],a.g.retryParameters);a.j.modifyManifestRequest(b,{format:"h"});return Vr(a,b,0)}function br(a){var b,c;D(function(d){if(1==d.g){if(!a.j)return d.return();xa(d,2);return u(d,a.update(),4)}if(2!=d.g)return fr(a)&&(b=a.aa,a.m.O(b)),za(d,0);c=Aa(d);if(!a.j)return d.return();c.severity=1;a.j.onError(c);a.m.O(.1);B(d)})}function fr(a){return a.W!=cr}function jr(a,b){a.W=b;a.i&&a.i.Dc(!fr(a));fr(a)||a.m.stop()}
783
- function Vr(a,b,c){if(!a.H)throw new L(2,7,7001);b=a.j.networkingEngine.request(c,b);df(a.H,b);return b.promise}G("shaka.hls.HlsParser",ar);
784
- var sr={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},tr={mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},ur={mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},as={audio:tr,video:ur,text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
785
- vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Lr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new L(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new L(2,4,4041);return hc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Hq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
786
- b=Hq(a,"URI");b=$q(b);b=Nb(b.data);b=hc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Hq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Hq(a,"URI");a=$q(a);a=Nb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Qf(a,b,new Set,0);return hc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
787
- Hq(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?hc("org.w3.clearkey",null):null}},cr="VOD",Wr="EVENT",Er="LIVE",ir={lf:cr,Tg:Wr,Xg:Er};vc("Tizen 3")||vc("Tizen 2")||xc()||(ah.m3u8=function(){return new ar},Zg["application/x-mpegurl"]=function(){return new ar},Zg["application/vnd.apple.mpegurl"]=function(){return new ar});function bs(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Ic(b)}catch(g){}throw new L(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function cs(){}function ds(a,b,c,d,e){var f=new es;zf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new fs,h={De:!1,ff:!1};a=gs(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 Re(a,function(){h.De=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new M(function(){h.ff=!0;g.abort()});k.O(b/1E3);a.finally(function(){k.stop()})}return a}
788
- function gs(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,w,x,y,C,A;return D(function(z){switch(z.g){case 1:return h=hs,k=is,p=n=0,q=Date.now(),xa(z,2),u(z,h(a,c),4);case 4:l=z.h;f(js(l.headers));if("HEAD"==c.method){z.B(5);break}v=l.clone().body.getReader();x=(w=l.headers.get("Content-Length"))?parseInt(w,10):0;y=function(E){function F(){var H,I;return D(function(J){switch(J.g){case 1:return xa(J,2),u(J,v.read(),4);case 4:H=J.h;za(J,3);break;case 2:return Aa(J),J.return();case 3:if(H.done){J.B(5);break}n+=
789
- H.value.byteLength;if(!g){J.B(5);break}return u(J,g(H.value),5);case 5:I=Date.now();if(100<I-q||H.done)e(I-q,n-p,x-n),p=n,q=I;H.done?E.close():(E.enqueue(H.value),F());B(J)}})}F()};new k({start:y});return u(z,l.arrayBuffer(),6);case 6:m=z.h;case 5:za(z,3);break;case 2:C=Aa(z);if(d.De)throw new L(1,1,7001,a,b);if(d.ff)throw new L(1,1,1003,a,b);throw new L(1,1,1002,a,C,b);case 3:return A=js(l.headers),z.return(bs(A,m,l.status,a,l.url,b))}})}
790
- function js(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function ks(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}G("shaka.net.HttpFetchPlugin",cs);cs.isSupported=ks;cs.parse=ds;var hs=window.fetch,fs=window.AbortController,is=window.ReadableStream,es=window.Headers;
791
- ks()&&(ff("http",ds,2,!0),ff("https",ds,2,!0),ff("blob",ds,2,!0));function ls(){}
792
- function ms(a,b,c,d,e){var f=new ns,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 L(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=os(f);e(q);n=!0}};f.onload=function(){var q=os(f),v=f.response;try{var w=bs(q,v,f.status,a,f.responseURL,c);l(w)}catch(x){m(x)}};f.onerror=function(q){m(new L(1,1,1002,a,q,
793
- c))};f.ontimeout=function(){m(new L(1,1,1003,a,c))};f.onprogress=function(q){var v=Date.now();if(100<v-g||q.lengthComputable&&q.loaded==q.total)d(v-g,q.loaded-h,q.total-q.loaded),h=q.loaded,g=v};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Re(k,function(){f.abort();return Promise.resolve()})}
794
- function os(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}G("shaka.net.HttpXHRPlugin",ls);ls.parse=ms;var ns=window.XMLHttpRequest;ff("http",ms,1,!0);ff("https",ms,1,!0);ff("blob",ms,1,!0);function ps(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function qs(a){return a.va().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ea+":"+a.na}function rs(a,b){return Dk(a.g.va(),a.g.Ea,a.g.na,b.streaming.retryParameters)};function ss(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function ts(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}ss.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 us(a){var b=this;this.o=a;this.j=new Map;this.i=new qf(function(){return vs(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new ss}us.prototype.destroy=function(){return this.i.destroy()};function ws(a,b,c){a.m=b;a.l=c}function vs(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
795
- function xs(a,b,c,d,e,f){rf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return D(function(v){if(1==v.g)return u(v,ys(a,c),2);h=v.h;if(a.i.g)throw new L(2,9,7001);if(e)for(m in k=Nb(h),l=new Pf(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,q);a.g.close(d,h.byteLength);var w=a.g;a.m(0==w.i?0:w.j/w.i,a.g.h);return v.return(f(h))})});a.j.set(b,g)}function zs(a){return D(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
796
- function ys(a,b){var c,d,e,f;return D(function(g){if(1==g.g)return c=pf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;mb(a.h,e);return g.return(f.data)})};function As(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()}}As.prototype.abort=function(){var a=this;return D(function(b){if(1==b.g){try{a.i.abort()}catch(c){}xa(b,2);return u(b,a.g,4)}if(2!=b.g)return za(b,0);Aa(b);B(b)})};
797
- function Bs(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return D(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();B(g)})}})}As.prototype.store=function(){return this.h};As.prototype.promise=function(){return this.g};function Cs(a){this.h=a;this.g=[]}Cs.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Ds(a,b){return Es(a,b,"readwrite")}function Es(a,b,c){c=a.h.transaction([b],c);var d=new As(c,b);a.g.push(d);d.promise().then(function(){mb(a.g,d)},function(){mb(a.g,d)});return d};function Fs(a,b,c){this.h=new Cs(a);this.i=b;this.g=c}r=Fs.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Gs(this.i)};r.removeSegments=function(a,b){return Hs(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return D(function(d){if(1==d.g)return u(d,Is(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Ee(e)}))})};r.addManifests=function(){return Gs(this.g)};
798
- r.updateManifest=function(){return Promise.reject(new L(2,9,9016,"Cannot modify values in "+this.g))};function Js(a,b,c){a=Ds(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Ds(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return Hs(this,this.g,a,b)};
799
- r.getManifests=function(a){var b=this,c;return D(function(d){if(1==d.g)return u(d,Is(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.ec(e)})))})};r.getAllManifests=function(){var a=this,b,c;return D(function(d){return 1==d.g?(b=Es(a.h,a.g,"readonly"),c=new Map,u(d,Bs(b,function(e,f){var g;return D(function(h){if(1==h.g)return u(h,a.ec(f),2);g=h.h;c.set(e,g);B(h)})}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};r.Ee=function(a){return a};r.ec=function(a){return Promise.resolve(a)};
800
- function Gs(a){return Promise.reject(new L(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return D(function(m){if(1==m.g){d=Ds(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={Kc:g.Kc},k=h.next())l=k.value,g.Kc=e.add(l),g.Kc.onsuccess=function(n){return function(){f.push(n.Kc.result)}}(g);return u(m,d.promise(),2)}return m.return(f)})};
801
- function Hs(a,b,c,d){a=Ds(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Jc:e.Jc},f=c.next())e.Jc=f.value,b.delete(e.Jc).onsuccess=function(g){return function(){return d(g.Jc)}}(e);return a.promise()}
802
- function Is(a,b,c){var d,e,f,g,h,k,l;return D(function(m){if(1==m.g){d=Es(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Yb:h.Yb,Wb:h.Wb},l=k.next())h.Wb=l.value,h.Yb=e.get(h.Wb),h.Yb.onsuccess=function(n){return function(){void 0==n.Yb.result&&g.push(n.Wb);f[n.Wb]=n.Yb.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new L(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Ks(a){this.g=new Cs(a)}Ks.prototype.destroy=function(){return this.g.destroy()};Ks.prototype.getAll=function(){var a=this,b,c;return D(function(d){return 1==d.g?(b=Es(a.g,"session-ids","readonly"),c=[],u(d,Bs(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};Ks.prototype.add=function(a){var b=Ds(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()};
803
- Ks.prototype.remove=function(a){var b=this,c;return D(function(d){return 1==d.g?(c=Ds(b.g,"session-ids"),u(d,Bs(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):u(d,c.promise(),0)})};function Ls(){this.g=new Map}Ls.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)};Ls.prototype.init=function(){var a=this;Ms.forEach(function(e,f){(e=e())&&a.g.set(f,e)});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)};
804
- function Ns(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ca:d,ha:f},ha:e})})});if(b)return b;throw new L(2,9,9013,"Could not find a cell that supports add-operations");}function Os(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ca:d,ha:f},e)})})}
805
- function Ps(a,b,c){a=a.g.get(b);if(!a)throw new L(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new L(2,9,9013,"Could not find cell with name "+c);return b}function Qs(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Rs(a){var b=Array.from(a.g.keys());if(!b.length)throw new L(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
806
- function Ss(a){var b,c,d;return D(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Ms,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Ts(a,b){Ms.set(a,b)}G("shaka.offline.StorageMuxer",Ls);Ls.unregister=function(a){Ms.delete(a)};Ls.register=Ts;Ls.prototype.destroy=Ls.prototype.destroy;var Ms=new Map;function Us(){Fs.apply(this,arguments)}ta(Us,Fs);Us.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return D(function(g){d=Ds(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 L(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
807
- Us.prototype.ec=function(a){var b,c,d,e,f,g;return D(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=Vs(a.periods[c],e),b.push(f);return u(h,Sp(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})})};
808
- function Vs(a,b){Ws(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Xs(e,a.startTime,b)})}
809
- function Xs(a,b,c){var d=a.initSegmentUri?Ys(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=Ys(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
810
- 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,external:!1}}Us.prototype.Ee=function(a){return{data:a.data}};function Ys(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 L(2,9,9004,"Could not parse uri "+a);}
811
- function Ws(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++,
812
- 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 Zs(){Fs.apply(this,arguments)}ta(Zs,Fs);
813
- Zs.prototype.ec=function(a){var b,c,d,e,f,g;return D(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($s(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,Sp(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
769
+ function mr(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.done;d=a.next())d=Jq(d.value.g,"EXT-X-KEY"),c.push.apply(c,ka(d))}d=a=!1;var e=[],f=new Set;c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=Gq(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=Z(g,"KEYFORMAT")||"identity",g=(h=Jr[h])?h(g,b):null){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,qf:d}}
770
+ function Sr(a,b,c){if(!window.crypto||!window.crypto.subtle)throw bb("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new K(2,4,4042);var d=0,e=Z(b,"IV","");if(e){var f=Pc(e.substr(2));if(16!=f.byteLength)throw new K(2,4,4043);}else d=Mq(c.g,"EXT-X-MEDIA-SEQUENCE");c=Nq(c.h,Gq(b,"URI"));var g=kf([c],a.g.retryParameters);b=b.toString()+"-"+d;if(!a.N.has(b)){var h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,
771
+ l,m;return D(function(n){if(1==n.g)return u(n,Tr(a,g,6),2);if(3!=n.g){k=n.h;if(!k.data||16!=k.data.byteLength)throw new K(2,4,4044);l={name:"AES-CBC"};m=h;return u(n,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=n.h;h.fetchKey=void 0;B(n)})}};a.N.set(b,h)}return a.N.get(b)}
772
+ function Qr(a,b){var c=Lq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Lq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)ir(a,br);else{c?ir(a,Dr):ir(a,Ur);d=Lq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new K(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Lq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ka=Number(Gq(c,"PART-TARGET")),a.L=Math.min(a.ka,a.L),b=Lq(b.g,"EXT-X-SERVER-CONTROL"),a.da=b?Number(Gq(b,"PART-HOLD-BACK")):0):a.L=Math.min(d,a.L);a.fa=Math.max(d,a.fa)}}
773
+ function Br(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.da)b=a.da;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.fa*c}a.i.af(0);a.i.me(b);a.i.Cc(!1)}
774
+ function Vr(a,b,c,d){var e=Lq(c,"EXT-X-MAP");if(!e)return null;var f=Gq(e,"URI");f=Mr(Nq(b.h,f),d);d=[f,Z(e,"BYTERANGE","")].join("-");if(!a.P.has(d)){var g=void 0,h=null;c=t(c);for(var k=c.next();!k.done;k=c.next())k=k.value,"EXT-X-KEY"==k.name?"AES-128"==Gq(k,"METHOD")&&k.id<e.id&&(g=Sr(a,k,b)):"EXT-X-BYTERANGE"==k.name&&k.id<e.id&&(h=k);b=Wr(f,e,h,g);a.P.set(d,b)}return a.P.get(d)}
775
+ function Wr(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new xi(function(){return[a]},e,f,null,null,d)}
776
+ function Xr(a,b,c,d,e,f,g,h,k){var l=d.g,m=Mr(d.i,f),n=Lq(l,"EXTINF"),p=0;f=0;var q=null;d.h.length&&!a.l&&bb("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Lq(l,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=bg(w.value))}w=zi;Lq(l,"EXT-X-GAP")&&(w=2);if(!n){if(0==d.h.length)throw new K(2,4,4024,
777
+ "EXTINF");if(!a.l)return null}var x=[];if(a.l){p={};for(var y=0;y<d.h.length;p={ud:p.ud},y++){var C=d.h[y],A=0==y?c:x[x.length-1],z=0==y?e:A.endTime,E=Number(Z(C,"DURATION"))||a.ka;if(E){E=z+E;var F=0,H=null;"EXT-X-PRELOAD-HINT"==C.name?F=(F=Z(C,"BYTERANGE-START"))?Number(F):0:(F=Z(C,"BYTERANGE"),H=t(Yr(A,F)),F=H.next().value,H=H.next().value);if(A=Z(C,"URI"))p.ud=Nq(g,A),A=zi,"YES"==Z(C,"GAP")&&(A=2),z=new P(z,E,function(I){return function(){return[I.ud]}}(p),F,H,b,0,0,Infinity,[],"",null,null,A),
778
+ "EXT-X-PRELOAD-HINT"==C.name&&z.Qe(),x.push(z)}}}if(n){a=Number(n.value.split(",")[0]);if(0==a)return null;p=e+a}else if(x.length)p=x[x.length-1].endTime;else return null;(a=Lq(l,"EXT-X-BYTERANGE"))?(q=t(Yr(c,a.value)),f=q.next().value,q=q.next().value):x.length&&(f=x[0].Ea,q=x[x.length-1].ma);c="";a=null;"image"==h&&(c="1x1",h=Lq(l,"EXT-X-TILES"))&&(c=Gq(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new P(e,p,function(){return m.length?[m]:[]},f,q,b,0,0,Infinity,x,c,a,v,w,k)}
779
+ function Yr(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ma+1,d=c+b-1);return[c,d]}
780
+ function nr(a,b,c,d,e){var f=b.segments,g=void 0,h=Mq(b.g,"EXT-X-DISCONTINUITY-SEQUENCE"),k=Mq(b.g,"EXT-X-MEDIA-SEQUENCE"),l=Lq(b.g,"EXT-X-SKIP");l=l?Number(Z(l,"SKIPPED-SEGMENTS")):0;var m=k+l,n=0;er(a)&&d.has(m)&&(n=d.get(m));0===n&&a.W==Dr&&0<d.size&&!d.has(m)&&(n=a.i.Ka());for(var p=[],q=null,v=0;v<f.length;v++){var w=f[v],x=0==v?n:q.endTime;m=k+l+v;Lq(w.g,"EXT-X-DISCONTINUITY")&&h++;var y=t(w.g);for(var C=y.next();!C.done;C=y.next())C=C.value,"EXT-X-KEY"==C.name&&("AES-128"==Gq(C,"METHOD")?g=
781
+ Sr(a,C,b):g=void 0);d.set(m,x);y=Vr(a,b,w.g,e);!a.l&&a.j.isAutoLowLatencyMode()&&(a.j.enableLowLatencyMode(),a.l=a.j.isLowLatencyMode());if(w=Xr(a,y,q,w,x,e,b.h,c,g))q=w,w.l=h,a.g.hls.ignoreManifestProgramDateTime&&null!=a.D&&m<a.D||p.push(w)}if(b=p.some(function(A){return null!=A.g}))for(c={},d=0;d<p.length;c={Ub:c.Ub,Tb:c.Tb,Fc:c.Fc,Wa:c.Wa,Sb:c.Sb},d++)if(c.Wa=p[d],null==c.Wa.g)for(c.Tb=0,c.Ub=d,e=function(A){return function(){var z=p[A.Ub];if(z){if(null!=z.g)return z.g+A.Tb;A.Tb-=z.endTime-z.startTime;
782
+ A.Ub+=1}return null}}(c),c.Sb=0,c.Fc=d,f=function(A){return function(){var z=p[A.Fc];if(z){z!=A.Wa&&(A.Sb+=z.endTime-z.startTime);if(null!=z.g)return z.g+A.Sb;--A.Fc}return null}}(c);null==c.Wa.g;)c.Wa.g=f(),null==c.Wa.g&&(c.Wa.g=e());if(b)for(c=t(p),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=t(e.i),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.J;if(b&&Infinity!=a)for(b=t(p),d=b.next();!d.done;d=b.next())d.value.re(a);return p}
783
+ function Mr(a,b){if(!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new K(2,4,4039,e);}}return a}function Gr(a,b){if(a==kc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":null:"image/jpeg"}
784
+ function Hr(a){return a==kc?"text/vtt":Zr[a].mp4}function Rr(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v;return D(function(w){if(1==w.g){f=qf;g=Math.trunc((d.segments.length-1)/2);h=Mr(d.segments[g].i,e);k=new Sb(h);l=k.sa.split(".").pop();m=Zr[b];if((n=m[l])||(n=rr[l])||(n=Gr(b,c)))return w.return(n);p=kf([h],a.g.retryParameters);p.method="HEAD";return u(w,Tr(a,p,f),2)}q=w.h;return(v=q.headers["content-type"])?w.return(v.split(";")[0]):w.return(Hr(b))})}
785
+ function cr(a,b){b=kf([b],a.g.retryParameters);a.j.modifyManifestRequest(b,{format:"h"});return Tr(a,b,0)}function ar(a){var b,c;D(function(d){if(1==d.g){if(!a.j)return d.return();xa(d,2);return u(d,a.update(),4)}if(2!=d.g)return er(a)&&(b=a.$,a.m.O(b)),za(d,0);c=Aa(d);if(!a.j)return d.return();c.severity=1;a.j.onError(c);a.m.O(.1);B(d)})}function er(a){return a.W!=br}function ir(a,b){a.W=b;a.i&&a.i.Cc(!er(a));er(a)||a.m.stop()}
786
+ function Tr(a,b,c){if(!a.H)throw new K(2,7,7001);b=a.j.networkingEngine.request(c,b);ef(a.H,b);return b.promise}G("shaka.hls.HlsParser",$q);
787
+ var rr={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},sr={mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},tr={mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},Zr={audio:sr,video:tr,text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
788
+ vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Jr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new K(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new K(2,4,4041);return gc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Gq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
789
+ b=Gq(a,"URI");b=Zq(b);b=Mb(b.data);b=gc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Gq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Gq(a,"URI");a=Zq(a);a=Mb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Rf(a,b,new Set,0);return gc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a,
790
+ b){if("video/mp2t"==b)throw new K(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new K(2,4,4041);a=Gq(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?gc("org.w3.clearkey",null):null}},br="VOD",Ur="EVENT",Dr="LIVE",hr={lf:br,Ug:Ur,Yg:Dr};vc("Tizen 3")||vc("Tizen 2")||xc()||(bh.m3u8=function(){return new $q},$g["application/x-mpegurl"]=function(){return new $q},$g["application/vnd.apple.mpegurl"]=function(){return new $q});function $r(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Ic(b)}catch(g){}throw new K(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function as(){}function bs(a,b,c,d,e){var f=new cs;Af(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ds,h={Ce:!1,ff:!1};a=es(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 Se(a,function(){h.Ce=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new pc(function(){h.ff=!0;g.abort()});k.O(b/1E3);a.finally(function(){k.stop()})}return a}
791
+ function es(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,w,x,y,C,A;return D(function(z){switch(z.g){case 1:return h=fs,k=gs,p=n=0,q=Date.now(),xa(z,2),u(z,h(a,c),4);case 4:l=z.h;f(hs(l.headers));if("HEAD"==c.method){z.B(5);break}v=l.clone().body.getReader();x=(w=l.headers.get("Content-Length"))?parseInt(w,10):0;y=function(E){function F(){var H,I;return D(function(L){switch(L.g){case 1:return xa(L,2),u(L,v.read(),4);case 4:H=L.h;za(L,3);break;case 2:return Aa(L),L.return();case 3:if(H.done){L.B(5);break}n+=
792
+ H.value.byteLength;if(!g){L.B(5);break}return u(L,g(H.value),5);case 5:I=Date.now();if(100<I-q||H.done)e(I-q,n-p,x-n),p=n,q=I;H.done?E.close():(E.enqueue(H.value),F());B(L)}})}F()};new k({start:y});return u(z,l.arrayBuffer(),6);case 6:m=z.h;case 5:za(z,3);break;case 2:C=Aa(z);if(d.Ce)throw new K(1,1,7001,a,b);if(d.ff)throw new K(1,1,1003,a,b);throw new K(1,1,1002,a,C,b);case 3:return A=hs(l.headers),z.return($r(A,m,l.status,a,l.url,b))}})}
793
+ function hs(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function is(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}G("shaka.net.HttpFetchPlugin",as);as.isSupported=is;as.parse=bs;var fs=window.fetch,ds=window.AbortController,gs=window.ReadableStream,cs=window.Headers;
794
+ is()&&(gf("http",bs,2,!0),gf("https",bs,2,!0),gf("blob",bs,2,!0));function js(){}
795
+ function ks(a,b,c,d,e){var f=new ls,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 K(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=ms(f);e(q);n=!0}};f.onload=function(){var q=ms(f),v=f.response;try{var w=$r(q,v,f.status,a,f.responseURL,c);l(w)}catch(x){m(x)}};f.onerror=function(q){m(new K(1,1,1002,a,q,
796
+ c))};f.ontimeout=function(){m(new K(1,1,1003,a,c))};f.onprogress=function(q){var v=Date.now();if(100<v-g||q.lengthComputable&&q.loaded==q.total)d(v-g,q.loaded-h,q.total-q.loaded),h=q.loaded,g=v};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Se(k,function(){f.abort();return Promise.resolve()})}
797
+ function ms(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}G("shaka.net.HttpXHRPlugin",js);js.parse=ks;var ls=window.XMLHttpRequest;gf("http",ks,1,!0);gf("https",ks,1,!0);gf("blob",ks,1,!0);function ns(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function os(a){return a.ua().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ea+":"+a.ma}function ps(a,b){return Dk(a.g.ua(),a.g.Ea,a.g.ma,b.streaming.retryParameters)};function qs(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function rs(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}qs.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 ss(a){var b=this;this.o=a;this.j=new Map;this.i=new rf(function(){return ts(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new qs}ss.prototype.destroy=function(){return this.i.destroy()};function us(a,b,c){a.m=b;a.l=c}function ts(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
798
+ function vs(a,b,c,d,e,f){sf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return D(function(v){if(1==v.g)return u(v,ws(a,c),2);h=v.h;if(a.i.g)throw new K(2,9,7001);if(e)for(m in k=Mb(h),l=new Qf(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,q);a.g.close(d,h.byteLength);var w=a.g;a.m(0==w.i?0:w.j/w.i,a.g.h);return v.return(f(h))})});a.j.set(b,g)}function xs(a){return D(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
799
+ function ws(a,b){var c,d,e,f;return D(function(g){if(1==g.g)return c=qf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;lb(a.h,e);return g.return(f.data)})};function ys(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()}}ys.prototype.abort=function(){var a=this;return D(function(b){if(1==b.g){try{a.i.abort()}catch(c){}xa(b,2);return u(b,a.g,4)}if(2!=b.g)return za(b,0);Aa(b);B(b)})};
800
+ function zs(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return D(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();B(g)})}})}ys.prototype.store=function(){return this.h};ys.prototype.promise=function(){return this.g};function As(a){this.h=a;this.g=[]}As.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Bs(a,b){return Cs(a,b,"readwrite")}function Cs(a,b,c){c=a.h.transaction([b],c);var d=new ys(c,b);a.g.push(d);d.promise().then(function(){lb(a.g,d)},function(){lb(a.g,d)});return d};function Ds(a,b,c){this.h=new As(a);this.i=b;this.g=c}r=Ds.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Es(this.i)};r.removeSegments=function(a,b){return Fs(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return D(function(d){if(1==d.g)return u(d,Gs(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.De(e)}))})};r.addManifests=function(){return Es(this.g)};
801
+ r.updateManifest=function(){return Promise.reject(new K(2,9,9016,"Cannot modify values in "+this.g))};function Hs(a,b,c){a=Bs(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Bs(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return Fs(this,this.g,a,b)};
802
+ r.getManifests=function(a){var b=this,c;return D(function(d){if(1==d.g)return u(d,Gs(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.ec(e)})))})};r.getAllManifests=function(){var a=this,b,c;return D(function(d){return 1==d.g?(b=Cs(a.h,a.g,"readonly"),c=new Map,u(d,zs(b,function(e,f){var g;return D(function(h){if(1==h.g)return u(h,a.ec(f),2);g=h.h;c.set(e,g);B(h)})}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};r.De=function(a){return a};r.ec=function(a){return Promise.resolve(a)};
803
+ function Es(a){return Promise.reject(new K(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return D(function(m){if(1==m.g){d=Bs(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={Jc:g.Jc},k=h.next())l=k.value,g.Jc=e.add(l),g.Jc.onsuccess=function(n){return function(){f.push(n.Jc.result)}}(g);return u(m,d.promise(),2)}return m.return(f)})};
804
+ function Fs(a,b,c,d){a=Bs(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Ic:e.Ic},f=c.next())e.Ic=f.value,b.delete(e.Ic).onsuccess=function(g){return function(){return d(g.Ic)}}(e);return a.promise()}
805
+ function Gs(a,b,c){var d,e,f,g,h,k,l;return D(function(m){if(1==m.g){d=Cs(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Yb:h.Yb,Wb:h.Wb},l=k.next())h.Wb=l.value,h.Yb=e.get(h.Wb),h.Yb.onsuccess=function(n){return function(){void 0==n.Yb.result&&g.push(n.Wb);f[n.Wb]=n.Yb.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new K(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Is(a){this.g=new As(a)}Is.prototype.destroy=function(){return this.g.destroy()};Is.prototype.getAll=function(){var a=this,b,c;return D(function(d){return 1==d.g?(b=Cs(a.g,"session-ids","readonly"),c=[],u(d,zs(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};Is.prototype.add=function(a){var b=Bs(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()};
806
+ Is.prototype.remove=function(a){var b=this,c;return D(function(d){return 1==d.g?(c=Bs(b.g,"session-ids"),u(d,zs(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):u(d,c.promise(),0)})};function Js(){this.g=new Map}Js.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)};Js.prototype.init=function(){var a=this;Ks.forEach(function(e,f){(e=e())&&a.g.set(f,e)});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)};
807
+ function Ls(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ca:d,ga:f},ga:e})})});if(b)return b;throw new K(2,9,9013,"Could not find a cell that supports add-operations");}function Ms(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ca:d,ga:f},e)})})}
808
+ function Ns(a,b,c){a=a.g.get(b);if(!a)throw new K(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new K(2,9,9013,"Could not find cell with name "+c);return b}function Os(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Ps(a){var b=Array.from(a.g.keys());if(!b.length)throw new K(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
809
+ function Qs(a){var b,c,d;return D(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Ks,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Rs(a,b){Ks.set(a,b)}G("shaka.offline.StorageMuxer",Js);Js.unregister=function(a){Ks.delete(a)};Js.register=Rs;Js.prototype.destroy=Js.prototype.destroy;var Ks=new Map;function Ss(){Ds.apply(this,arguments)}ta(Ss,Ds);Ss.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return D(function(g){d=Bs(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 K(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
810
+ Ss.prototype.ec=function(a){var b,c,d,e,f,g;return D(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=Ts(a.periods[c],e),b.push(f);return u(h,Rp(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})})};
811
+ function Ts(a,b){Us(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Vs(e,a.startTime,b)})}
812
+ function Vs(a,b,c){var d=a.initSegmentUri?Ws(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=Ws(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
813
+ 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,external:!1}}Ss.prototype.De=function(a){return{data:a.data}};function Ws(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 K(2,9,9004,"Could not parse uri "+a);}
814
+ function Us(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++,
815
+ 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 Xs(){Ds.apply(this,arguments)}ta(Xs,Ds);
816
+ Xs.prototype.ec=function(a){var b,c,d,e,f,g;return D(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(Ys(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,Rp(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
814
817
  Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
815
- function $s(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,
816
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1}};function at(){Fs.apply(this,arguments)}ta(at,Fs);r=at.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Js(this,a,b)};r.ec=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function bt(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=bt.prototype;
817
- r.init=function(){var a=this,b=new nc,c=!1,d=new M(function(){c=!0;b.reject(new L(2,9,9017))});d.O(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Us(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Zs(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
818
- new Zs(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new at(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Ks(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new L(2,
818
+ function Ys(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,
819
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1}};function Zs(){Ds.apply(this,arguments)}ta(Zs,Ds);r=Zs.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Hs(this,a,b)};r.ec=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function $s(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=$s.prototype;
820
+ r.init=function(){var a=this,b=new mc,c=!1,d=new pc(function(){c=!0;b.reject(new K(2,9,9017))});d.O(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Ss(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Xs(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
821
+ new Xs(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Zs(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Is(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new K(2,
819
822
  9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return D(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),B(b)}})};
820
823
  r.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};r.getEmeSessionCell=function(){return this.m};
821
- r.erase=function(){var a=this;return D(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,ct(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
822
- function ct(){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 L(2,9,9001,b.error));c.preventDefault()};return a}Ts("idb",function(){return yc()||uc()||!window.indexedDB?null:new bt});function dt(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}dt.prototype.Ca=function(){return this.i};dt.prototype.ha=function(){return this.h};dt.prototype.key=function(){return this.l};dt.prototype.toString=function(){return this.j};
823
- function et(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 dt(b,c,d,Number(a[4])):null};function ft(a,b){this.h=a;this.g=b}
824
- function gt(a,b){var c=new S(null,0);c.Da(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=ht(a,d,e,c);e=b.streams.filter(function(l){return l.type==lc}).map(function(l){return it(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return it(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=
824
+ r.erase=function(){var a=this;return D(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,at(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
825
+ function at(){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 K(2,9,9001,b.error));c.preventDefault()};return a}Rs("idb",function(){return yc()||uc()||!window.indexedDB?null:new $s});function bt(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}bt.prototype.Ca=function(){return this.i};bt.prototype.ga=function(){return this.h};bt.prototype.key=function(){return this.l};bt.prototype.toString=function(){return this.j};
826
+ function ct(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 bt(b,c,d,Number(a[4])):null};function dt(a,b){this.h=a;this.g=b}
827
+ function et(a,b){var c=new Q(null,0);c.Da(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=ft(a,d,e,c);e=b.streams.filter(function(l){return l.type==kc}).map(function(l){return gt(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return gt(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=
825
828
  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}}
826
- function ht(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=
827
- b.next())for(e=e.value,g=it(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=it(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}
828
- function it(a,b,c){var d=b.segments.map(function(e){return jt(a,e)});c.Nb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Qj(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,
829
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,external:b.external}}function jt(a,b){var c=new dt("segment",a.h,a.g,b.dataKey);return new Q(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?kt(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
830
- function kt(a,b){var c=new dt("segment",a.h,a.g,b);return new wi(function(){return[c.toString()]},0,null)};function lt(){this.g=null}r=lt.prototype;r.configure=function(){};
831
- r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return D(function(m){switch(m.g){case 1:d=et(a);c.g=d;if(null==d||"manifest"!=d.g)throw new L(2,1,9004,a);e=new Ls;ya(m);return u(m,e.init(),4);case 4:return u(m,Ps(e,d.Ca(),d.ha()),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 ft(d.Ca(),d.ha()),l=gt(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Ba(m),u(m,e.destroy(),7);case 7:Da(m,0)}})};r.stop=function(){return Promise.resolve()};
829
+ function ft(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=
830
+ b.next())for(e=e.value,g=gt(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=gt(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}
831
+ function gt(a,b,c){var d=b.segments.map(function(e){return ht(a,e)});c.Nb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Rj(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
832
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,external:b.external}}function ht(a,b){var c=new bt("segment",a.h,a.g,b.dataKey);return new P(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?it(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
833
+ function it(a,b){var c=new bt("segment",a.h,a.g,b);return new xi(function(){return[c.toString()]},0,null)};function jt(){this.g=null}r=jt.prototype;r.configure=function(){};
834
+ r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return D(function(m){switch(m.g){case 1:d=ct(a);c.g=d;if(null==d||"manifest"!=d.g)throw new K(2,1,9004,a);e=new Js;ya(m);return u(m,e.init(),4);case 4:return u(m,Ns(e,d.Ca(),d.ga()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new dt(d.Ca(),d.ga()),l=et(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Ba(m),u(m,e.destroy(),7);case 7:Ca(m,0)}})};r.stop=function(){return Promise.resolve()};
832
835
  r.update=function(){};
833
- r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return D(function(m){switch(m.g){case 1:return d=c.g,e=new Ls,xa(m,2,3),u(m,e.init(),5);case 5:return u(m,Ps(e,d.Ca(),d.ha()),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.B(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Ba(m),u(m,e.destroy(),10);case 10:Da(m,0);break;case 2:Aa(m),m.B(3)}})};
834
- r.onInitialVariantChosen=function(){};Zg["application/x-offline-manifest"]=function(){return new lt};function mt(){}function nt(a){var b=et(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ue(a)):a=b&&"segment"==b.g?ot(b.key(),b):Se(new L(2,1,9004,a));return a}
835
- function ot(a,b){var c=new Ls;return Ue(void 0).$(function(){return c.init()}).$(function(){return Ps(c,b.Ca(),b.ha())}).$(function(d){return d.getSegments([b.key()])}).$(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}G("shaka.offline.OfflineScheme",mt);mt.plugin=nt;ff("offline",nt);function pt(a,b,c){var d,e,f,g,h,k;return D(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,v=t(m),w=v.next();!w.done;w=v.next())if(w=w.value,qt(w.info,p)){w.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=rt(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
836
- function rt(a,b,c){var d,e;return D(function(f){switch(f.g){case 1:return d=new lg({rb:b,onError:function(){},gd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),xa(f,2),d.configure(a),u(f,tg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:za(f,3);break;case 2:return Aa(f),u(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return D(function(h){if(1==
837
- h.g)return xa(h,2),u(h,Fg(d,g),4);if(2!=h.g)return e.push(g),za(h,0);Aa(h);B(h)})})),6);case 6:return u(f,d.destroy(),7);case 7:return f.return(e)}})}function qt(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&nb(a.audioCapabilities,b.audioCapabilities,c)&&nb(a.videoCapabilities,b.videoCapabilities,c)};function st(a,b,c){var d=b.presentationTimeline.getDuration();b=tt(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function ut(a,b){var c=gt(new ft(a.Ca(),a.ha()),b),d=b.appMetadata||{};c=tt(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}}
838
- function tt(a){var b=[],c=oe(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(fe(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ge(c.value));return b};function vt(){this.g={}}function wt(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 xt(a,b){a.g[b.id]=b.bandwidth||2048}function yt(a,b){a=a.g[b];null==a&&(a=0);return a};function zt(a){var b=this;if(a&&a.constructor!=U)throw new L(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.nc()):(this.h=Ml(),this.g=new ef);this.i=[];this.j=[];var c=!a;this.l=new qf(function(){var d,e,f,g,h;return D(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return vs(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.B(4);break}return u(k,b.g.destroy(),4);
839
- case 4:b.h=null,b.g=null,B(k)}})})}function At(){if(qc())a:{var a=t(Ms.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=zt.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Gl(a,b));return Ol(this.h,a)};r.getConfiguration=function(){var a=Ml();Ol(a,this.h,Ml());return a};r.nc=function(){return this.g};
840
- r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new us(this.g);this.j.push(f);b=Bt(this,a,b||{},function(){var g;return D(function(h){if(1==h.g)return u(h,Yg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new Re(b,function(){return vs(f)});b.finally(function(){mb(d.j,f)});return Ct(this,b)};
841
- function Bt(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,w,x,y,C,A;return D(function(z){switch(z.g){case 1:return Dt(),h=g=null,k=new Ls,n=m=l=null,xa(z,2,3),u(z,d(),5);case 5:return g=z.h,u(z,Et(a,b,g,e),6);case 6:p=z.h;Ft(a);q=!p.presentationTimeline.T()&&!p.presentationTimeline.pb();if(!q)throw new L(2,9,9005,b);return u(z,Gt(a,p,function(E){n=n||E},e),7);case 7:h=z.h;Ft(a);if(n)throw n;return u(z,Ht(p,e),8);case 8:return u(z,k.init(),9);case 9:return Ft(a),u(z,Ns(k),10);case 10:return l=z.h,Ft(a),v=It(h,
842
- p,b,c,e,f),w=v.gg,x=v.ue,u(z,l.ha.addManifests([w]),11);case 11:y=z.h;Ft(a);m=y[0];Ft(a);if(n)throw n;return u(z,Jt(a,x,m,w,f,e,l.ha,p,h),12);case 12:return Ft(a),Kt(p,w,h,e),u(z,l.ha.updateManifest(m,w),13);case 13:return Ft(a),C=new dt("manifest",l.path.Ca,l.path.ha,m),z.return(ut(C,w));case 3:return Ba(z),u(z,k.destroy(),14);case 14:if(!g){z.B(15);break}return u(z,g.stop(),15);case 15:if(!h){z.B(17);break}return u(z,h.destroy(),17);case 17:Da(z,0);break;case 2:A=Aa(z);if(null==m){z.B(19);break}return u(z,
843
- Lt(m),19);case 19:throw n||A;}})}
844
- function Jt(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,w,x,y,C;return D(function(A){switch(A.g){case 1:l={};m=0;n=function(z,E){var F,H,I,J,K,P,T;return D(function(da){if(1==da.g){F={};H=t(z);for(I=H.next();!I.done;F={ib:F.ib},I=H.next())F.ib=I.value,J=rs(F.ib,f),K=F.ib.i,P=F.ib.h,T=function(N){return function(ia){var La,Ka,ab;return D(function(Ta){if(1==Ta.g)return u(Ta,g.addSegments([{data:ia}]),2);La=Ta.h;Ft(a);Ka=N.ib.g;ab=qs(Ka);l[ab]=La[0];m+=ia.byteLength;B(Ta)})}}(F),xs(e,F.ib.groupId,J,K,P,T);return u(da,
845
- zs(e),2)}if(!E)return da.B(0);Ft(a);Kt(h,d,k,f);return u(da,g.updateManifest(c,d),0)})};p=!1;xa(A,2);if(!Mt(h)||!p||Nt(h)){A.B(4);break}return u(A,n(b.filter(function(z){return z.h}),!0),5);case 5:return Ft(a),b=b.filter(function(z){return!z.h}),q=l,v=m,l={},m=0,u(A,Ot(g,c,d,q,v,function(){return Ft(a)}),6);case 6:Ft(a);case 4:if(p){A.B(7);break}return u(A,n(b,!1),8);case 8:return Ft(a),w=l,x=m,l={},m=0,u(A,Ot(g,c,d,w,x,function(){return Ft(a)}),9);case 9:Ft(a);case 7:za(A,0);break;case 2:return y=
846
- Aa(A),C=Object.values(l),u(A,g.removeSegments(C,function(){}),10);case 10:throw y;}})}function Lt(a){var b,c,d,e;return D(function(f){switch(f.g){case 1:return b=new Ls,u(f,b.init(),2);case 2:return u(f,Ns(b),3);case 3:return c=f.h,d=new dt("manifest",c.path.Ca,c.path.ha,a),u(f,b.destroy(),4);case 4:return e=new zt,u(f,e.remove(d.toString()),0)}})}
847
- function Ot(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,w,x;return D(function(y){switch(y.g){case 1:g=!1;xa(y,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.value,v=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=v&&(q.dataKey=v,q.pendingSegmentRefId=void 0),v=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=v&&(q.initSegmentKey=v,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
848
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(y,a.updateManifest(b,c),4);case 4:g=!0;f();za(y,0);break;case 2:return w=Aa(y),u(y,Lt(b),5);case 5:if(g){y.B(6);break}x=Object.values(d);return u(y,a.removeSegments(x,function(){}),6);case 6:throw w;}})}
849
- function Ht(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A,z,E,F,H,I,J,K,P,T,da,N;return D(function(ia){switch(ia.g){case 1:return c={width:Infinity,height:Infinity},Pd(a,b.restrictions,c),u(ia,Td(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Dd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(fe(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,
850
- d.push(ge(q));v=t(a.imageStreams);for(w=v.next();!w.done;w=v.next())x=w.value,d.push(he(x));return u(ia,b.offline.trackSelectionCallback(d),3);case 3:y=ia.h;C=a.presentationTimeline.getDuration();A=0;z=t(y);for(E=z.next();!E.done;E=z.next())F=E.value,H=F.bandwidth*C/8,A+=H;xa(ia,4);return u(ia,b.offline.downloadSizeCallback(A),6);case 6:I=ia.h;if(!I)throw new L(2,9,9014);za(ia,5);break;case 4:J=Aa(ia);if(J instanceof L)throw J;throw new L(2,9,9015);case 5:K=new Set;P=new Set;T=new Set;da=t(y);for(E=
851
- da.next();!E.done;E=da.next())N=E.value,"variant"==N.type&&K.add(N.id),"text"==N.type&&P.add(N.id),"image"==N.type&&T.add(N.id);a.variants=a.variants.filter(function(La){return K.has(La.id)});a.textStreams=a.textStreams.filter(function(La){return P.has(La.id)});a.imageStreams=a.imageStreams.filter(function(La){return T.has(La.id)});Pt(a);B(ia)}})}
852
- function It(a,b,c,d,e,f){var g=st(c,b,d),h=e.offline.progressCallback;ws(f,function(q,v){g.size=v;h(g,q)},function(q,v){k&&e.offline.usePersistentLicense&&l==v&&Bg(a,"cenc",q)});var k=Mt(b)&&!Nt(b),l=null;k&&(l=Qt.get(a.g.keySystem));for(var m=new vt,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())xt(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())wt(m,n.value);m=Rt(f,m,b,e);f=m.streams;m=m.ue;p=a.g;n=e.offline.usePersistentLicense;
853
- p&&n&&(p.initData=[]);return{gg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.mc(),streams:f,sessionIds:n?Kg(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},ue:m}}function Mt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
854
- function Nt(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 Kt(a,b,c,d){b.expiration=c.mc();c=Kg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Mt(a)&&d.offline.usePersistentLicense&&!c.length)throw new L(2,9,9007);}r.remove=function(a){return St(this,Tt(this,a))};
855
- function Tt(a,b){var c,d,e,f,g,h;return D(function(k){switch(k.g){case 1:Dt();c=et(b);if(null==c||"manifest"!=c.g)throw new L(2,9,9004,b);d=c;e=new Ls;ya(k);return u(k,e.init(),4);case 4:return u(k,Ps(e,d.Ca(),d.ha()),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([Ut(a,h,e),Vt(f,d,h)]),2);case 2:return Ba(k),u(k,e.destroy(),8);case 8:Da(k,0)}})}
856
- function Wt(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:bd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:bd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Ut(a,b,c){return D(function(d){return u(d,Xt(a.g,a.h.drm,c,b),0)})}
857
- function Vt(a,b,c){function d(){}var e=Yt(c);ut(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.vg=function(){return St(this,Zt(this))};
858
- function Zt(a){var b,c,d,e,f,g,h,k,l,m;return D(function(n){switch(n.g){case 1:return Dt(),b=a.g,c=a.h.drm,d=new Ls,e=!1,ya(n),u(n,d.init(),4);case 4:f=[],Qs(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,pt(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.B(5);break;case 2:return Ba(n),u(n,d.destroy(),11);case 11:Da(n,3);break;case 3:return n.return(!e)}})}
859
- r.list=function(){return St(this,$t())};function $t(){var a,b,c;return D(function(d){switch(d.g){case 1:return Dt(),a=[],b=new Ls,ya(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Os(b,function(e,f){c=c.then(function(){var g;return D(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=ut(new dt("manifest",e.Ca,e.ha,l),k);a.push(k)});B(h)})})}),u(d,c,2);case 2:return Ba(d),u(d,b.destroy(),6);case 6:Da(d,3);break;case 3:return d.return(a)}})}
860
- function Et(a,b,c,d){var e,f,g,h,k;return D(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){}},
861
- c.configure(d.manifest),Ft(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Ft(a),k=au(h),u(l,Promise.all(xf(k,function(m){return m.createSegmentIndex()})),3);Ft(a);if(e)throw e;return l.return(h)})}function Gt(a,b,c,d){var e;return D(function(f){return 1==f.g?(e=new lg({rb:a.g,onError:c,gd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,qg(e,b.variants,d.offline.usePersistentLicense),2)):3!=f.g?u(f,Dg(e),3):f.return(e)})}
862
- function Rt(a,b,c,d){var e=new Map,f=au(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=bu(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()),ue:Array.from(e.values())}}
863
- function bu(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,
864
- tilesLayout:d.tilesLayout,external:d.external},h=e.offline.numberOfParallelDownloads,k=0;cu(d,c.presentationTimeline.Ka(),function(l){var m=qs(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=yt(b,d.id)*p;p=ts(a.g,p);f.set(m,new ps(l,p,k,!1))}l.g&&(n=qs(l.g),f.has(n)||(p=.5*yt(b,d.id),p=ts(a.g,p),f.set(n,new ps(l.g,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,
865
- timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function cu(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 Ft(a){if(a.l.g)throw new L(2,9,7001);}function Dt(){if(!At())throw new L(2,9,9E3);}function St(a,b){return D(function(c){if(1==c.g)return a.i.push(b),ya(c),u(c,b,4);if(2!=c.g)return c.return(c.h);Ba(c);mb(a.i,b);return Da(c,0)})}
866
- function Ct(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){mb(a.i,c)})}function Yt(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)}
867
- function Xt(a,b,c,d){var e,f,g;return D(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Rs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Wt(d,!1),videoCapabilities:Wt(d,!0)}});return u(h,pt(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)})}
868
- function au(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}
869
- function Pt(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());}G("shaka.offline.Storage",zt);zt.deleteAll=function(){var a;return D(function(b){return 1==b.g?(a=new Ls,ya(b),u(b,Ss(a),2)):5!=b.g?(Ba(b),u(b,a.destroy(),5)):Da(b,0)})};zt.prototype.list=zt.prototype.list;
870
- zt.prototype.removeEmeSessions=zt.prototype.vg;zt.prototype.remove=zt.prototype.remove;zt.prototype.store=zt.prototype.store;zt.prototype.getNetworkingEngine=zt.prototype.nc;zt.prototype.getConfiguration=zt.prototype.getConfiguration;zt.prototype.configure=zt.prototype.configure;zt.prototype.destroy=zt.prototype.destroy;zt.support=At;
871
- var Qt=(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");
872
- yn.offline=At;function du(){}function eu(a,b){a={priority:b||0,tf:a};for(b=0;b<fu.length;b++)if(fu[b].priority<a.priority){fu.splice(b,0,a);return}fu.push(a)}G("shaka.polyfill",du);du.register=eu;du.installAll=function(){for(var a=t(fu),b=a.next();!b.done;b=a.next()){b=b.value;try{b.tf()}catch(c){cb("Error installing polyfill!",c)}}};var fu=[];function gu(){this.g=new hu}function iu(){window.AbortController||(window.AbortController=gu,window.AbortSignal=hu)}gu.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new O("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};fa.Object.defineProperties(gu.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});du.AbortController=gu;gu.install=iu;
873
- function hu(){$e.call(this);this.h=!1;this.g=void 0;this.onabort=null}ta(hu,$e);fa.Object.defineProperties(hu.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});eu(iu);function ju(){}function ku(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())lu(b.value)}function lu(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)}})}du.Aria=ju;ju.install=ku;eu(ku);function mu(){}function nu(){ou()}du.EncryptionScheme=mu;mu.install=nu;eu(nu,-2);function pu(){}
874
- function qu(){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}}),
875
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",ru);document.addEventListener("webkitfullscreenerror",ru);document.addEventListener("mozfullscreenchange",ru);document.addEventListener("mozfullscreenerror",ru);document.addEventListener("MSFullscreenChange",ru);document.addEventListener("MSFullscreenError",ru)}}
876
- function ru(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)}du.Fullscreen=pu;pu.install=qu;eu(qu);function su(){}function tu(){var a=!0;if(zc()||vc("PlayStation 5")||Ac()||vc("Web0S")||wc()||yc()||vc("PC=EOS")||vc("Hisense")||vc("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),uu=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=vu)}
877
- function vu(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C;return D(function(A){switch(A.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return A.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!qc())return A.return(b);if(c){if(yc())if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var z=c.contentType;c.width&&c.height&&(z+="; width="+c.width+"; height="+c.height);c.framerate&&(z+="; framerate="+c.framerate);"pq"===c.transferFunction&&
878
- (z+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(z)}else e=jb(c.contentType);else wc()?(f=c.contentType,c.width&&c.height&&(f+="; width="+c.width,f+="; height="+c.height),c.framerate&&(f+="; framerate="+c.framerate),c.bitrate&&(f+="; bitrate="+c.bitrate),e=jb(f)):e=jb(c.contentType);if(!e)return A.return(b)}if(d&&(yc()&&d.spatialRendering?(h=d.contentType+"; spatialRendering=true",g=jb(h)):g=jb(d.contentType),!g))return A.return(b)}else if("file"==a.type){if(c&&(k=c.contentType,l=rc(k),
836
+ r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return D(function(m){switch(m.g){case 1:return d=c.g,e=new Js,xa(m,2,3),u(m,e.init(),5);case 5:return u(m,Ns(e,d.Ca(),d.ga()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.B(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Ba(m),u(m,e.destroy(),10);case 10:Ca(m,0);break;case 2:Aa(m),m.B(3)}})};
837
+ r.onInitialVariantChosen=function(){};$g["application/x-offline-manifest"]=function(){return new jt};function kt(){}function lt(a){var b=ct(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ve(a)):a=b&&"segment"==b.g?mt(b.key(),b):Te(new K(2,1,9004,a));return a}
838
+ function mt(a,b){var c=new Js;return Ve(void 0).Z(function(){return c.init()}).Z(function(){return Ns(c,b.Ca(),b.ga())}).Z(function(d){return d.getSegments([b.key()])}).Z(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}G("shaka.offline.OfflineScheme",kt);kt.plugin=lt;gf("offline",lt);function nt(a,b,c){var d,e,f,g,h,k;return D(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,v=t(m),w=v.next();!w.done;w=v.next())if(w=w.value,ot(w.info,p)){w.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=pt(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
839
+ function pt(a,b,c){var d,e;return D(function(f){switch(f.g){case 1:return d=new mg({rb:b,onError:function(){},gd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),xa(f,2),d.configure(a),u(f,ug(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:za(f,3);break;case 2:return Aa(f),u(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return D(function(h){if(1==
840
+ h.g)return xa(h,2),u(h,Gg(d,g),4);if(2!=h.g)return e.push(g),za(h,0);Aa(h);B(h)})})),6);case 6:return u(f,d.destroy(),7);case 7:return f.return(e)}})}function ot(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&mb(a.audioCapabilities,b.audioCapabilities,c)&&mb(a.videoCapabilities,b.videoCapabilities,c)};function qt(a,b,c){var d=b.presentationTimeline.getDuration();b=rt(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function st(a,b){var c=et(new dt(a.Ca(),a.ga()),b),d=b.appMetadata||{};c=rt(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}}
841
+ function rt(a){var b=[],c=pe(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(ge(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(he(c.value));return b};function tt(){this.g={}}function ut(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 vt(a,b){a.g[b.id]=b.bandwidth||2048}function wt(a,b){a=a.g[b];null==a&&(a=0);return a};function xt(a){var b=this;if(a&&a.constructor!=S)throw new K(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.nc()):(this.h=Ml(),this.g=new ff);this.i=[];this.j=[];var c=!a;this.l=new rf(function(){var d,e,f,g,h;return D(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return ts(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.B(4);break}return u(k,b.g.destroy(),4);
842
+ case 4:b.h=null,b.g=null,B(k)}})})}function yt(){if(qc())a:{var a=t(Ks.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=xt.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Gl(a,b));return Ol(this.h,a)};r.getConfiguration=function(){var a=Ml();Ol(a,this.h,Ml());return a};r.nc=function(){return this.g};
843
+ r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new ss(this.g);this.j.push(f);b=zt(this,a,b||{},function(){var g;return D(function(h){if(1==h.g)return u(h,Zg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new Se(b,function(){return ts(f)});b.finally(function(){lb(d.j,f)});return At(this,b)};
844
+ function zt(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,w,x,y,C,A;return D(function(z){switch(z.g){case 1:return Bt(),h=g=null,k=new Js,n=m=l=null,xa(z,2,3),u(z,d(),5);case 5:return g=z.h,u(z,Ct(a,b,g,e),6);case 6:p=z.h;Dt(a);q=!p.presentationTimeline.T()&&!p.presentationTimeline.pb();if(!q)throw new K(2,9,9005,b);return u(z,Et(a,p,function(E){n=n||E},e),7);case 7:h=z.h;Dt(a);if(n)throw n;return u(z,Ft(p,e),8);case 8:return u(z,k.init(),9);case 9:return Dt(a),u(z,Ls(k),10);case 10:return l=z.h,Dt(a),v=Gt(h,
845
+ p,b,c,e,f),w=v.hg,x=v.te,u(z,l.ga.addManifests([w]),11);case 11:y=z.h;Dt(a);m=y[0];Dt(a);if(n)throw n;return u(z,Ht(a,x,m,w,f,e,l.ga,p,h),12);case 12:return Dt(a),It(p,w,h,e),u(z,l.ga.updateManifest(m,w),13);case 13:return Dt(a),C=new bt("manifest",l.path.Ca,l.path.ga,m),z.return(st(C,w));case 3:return Ba(z),u(z,k.destroy(),14);case 14:if(!g){z.B(15);break}return u(z,g.stop(),15);case 15:if(!h){z.B(17);break}return u(z,h.destroy(),17);case 17:Ca(z,0);break;case 2:A=Aa(z);if(null==m){z.B(19);break}return u(z,
846
+ Jt(m),19);case 19:throw n||A;}})}
847
+ function Ht(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,w,x,y,C;return D(function(A){switch(A.g){case 1:l={};m=0;n=function(z,E){var F,H,I,L,J,M,T;return D(function(W){if(1==W.g){F={};H=t(z);for(I=H.next();!I.done;F={hb:F.hb},I=H.next())F.hb=I.value,L=ps(F.hb,f),J=F.hb.i,M=F.hb.h,T=function(O){return function(fa){var Ka,La,Xa;return D(function(Ra){if(1==Ra.g)return u(Ra,g.addSegments([{data:fa}]),2);Ka=Ra.h;Dt(a);La=O.hb.g;Xa=os(La);l[Xa]=Ka[0];m+=fa.byteLength;B(Ra)})}}(F),vs(e,F.hb.groupId,L,J,M,T);return u(W,
848
+ xs(e),2)}if(!E)return W.B(0);Dt(a);It(h,d,k,f);return u(W,g.updateManifest(c,d),0)})};p=!1;xa(A,2);if(!Kt(h)||!p||Lt(h)){A.B(4);break}return u(A,n(b.filter(function(z){return z.h}),!0),5);case 5:return Dt(a),b=b.filter(function(z){return!z.h}),q=l,v=m,l={},m=0,u(A,Mt(g,c,d,q,v,function(){return Dt(a)}),6);case 6:Dt(a);case 4:if(p){A.B(7);break}return u(A,n(b,!1),8);case 8:return Dt(a),w=l,x=m,l={},m=0,u(A,Mt(g,c,d,w,x,function(){return Dt(a)}),9);case 9:Dt(a);case 7:za(A,0);break;case 2:return y=
849
+ Aa(A),C=Object.values(l),u(A,g.removeSegments(C,function(){}),10);case 10:throw y;}})}function Jt(a){var b,c,d,e;return D(function(f){switch(f.g){case 1:return b=new Js,u(f,b.init(),2);case 2:return u(f,Ls(b),3);case 3:return c=f.h,d=new bt("manifest",c.path.Ca,c.path.ga,a),u(f,b.destroy(),4);case 4:return e=new xt,u(f,e.remove(d.toString()),0)}})}
850
+ function Mt(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,w,x;return D(function(y){switch(y.g){case 1:g=!1;xa(y,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.value,v=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=v&&(q.dataKey=v,q.pendingSegmentRefId=void 0),v=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=v&&(q.initSegmentKey=v,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
851
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(y,a.updateManifest(b,c),4);case 4:g=!0;f();za(y,0);break;case 2:return w=Aa(y),u(y,Jt(b),5);case 5:if(g){y.B(6);break}x=Object.values(d);return u(y,a.removeSegments(x,function(){}),6);case 6:throw w;}})}
852
+ function Ft(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C,A,z,E,F,H,I,L,J,M,T,W,O;return D(function(fa){switch(fa.g){case 1:return c={width:Infinity,height:Infinity},Qd(a,b.restrictions,c),u(fa,Ud(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Ed(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(ge(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,
853
+ d.push(he(q));v=t(a.imageStreams);for(w=v.next();!w.done;w=v.next())x=w.value,d.push(ie(x));return u(fa,b.offline.trackSelectionCallback(d),3);case 3:y=fa.h;C=a.presentationTimeline.getDuration();A=0;z=t(y);for(E=z.next();!E.done;E=z.next())F=E.value,H=F.bandwidth*C/8,A+=H;xa(fa,4);return u(fa,b.offline.downloadSizeCallback(A),6);case 6:I=fa.h;if(!I)throw new K(2,9,9014);za(fa,5);break;case 4:L=Aa(fa);if(L instanceof K)throw L;throw new K(2,9,9015);case 5:J=new Set;M=new Set;T=new Set;W=t(y);for(E=
854
+ W.next();!E.done;E=W.next())O=E.value,"variant"==O.type&&J.add(O.id),"text"==O.type&&M.add(O.id),"image"==O.type&&T.add(O.id);a.variants=a.variants.filter(function(Ka){return J.has(Ka.id)});a.textStreams=a.textStreams.filter(function(Ka){return M.has(Ka.id)});a.imageStreams=a.imageStreams.filter(function(Ka){return T.has(Ka.id)});Nt(a);B(fa)}})}
855
+ function Gt(a,b,c,d,e,f){var g=qt(c,b,d),h=e.offline.progressCallback;us(f,function(q,v){g.size=v;h(g,q)},function(q,v){k&&e.offline.usePersistentLicense&&l==v&&Cg(a,"cenc",q)});var k=Kt(b)&&!Lt(b),l=null;k&&(l=Ot.get(a.g.keySystem));for(var m=new tt,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())vt(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())ut(m,n.value);m=Pt(f,m,b,e);f=m.streams;m=m.te;p=a.g;n=e.offline.usePersistentLicense;
856
+ p&&n&&(p.initData=[]);return{hg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.mc(),streams:f,sessionIds:n?Lg(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},te:m}}function Kt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
857
+ function Lt(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 It(a,b,c,d){b.expiration=c.mc();c=Lg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Kt(a)&&d.offline.usePersistentLicense&&!c.length)throw new K(2,9,9007);}r.remove=function(a){return Qt(this,Rt(this,a))};
858
+ function Rt(a,b){var c,d,e,f,g,h;return D(function(k){switch(k.g){case 1:Bt();c=ct(b);if(null==c||"manifest"!=c.g)throw new K(2,9,9004,b);d=c;e=new Js;ya(k);return u(k,e.init(),4);case 4:return u(k,Ns(e,d.Ca(),d.ga()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([St(a,h,e),Tt(f,d,h)]),2);case 2:return Ba(k),u(k,e.destroy(),8);case 8:Ca(k,0)}})}
859
+ function Ut(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:bd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:bd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function St(a,b,c){return D(function(d){return u(d,Vt(a.g,a.h.drm,c,b),0)})}
860
+ function Tt(a,b,c){function d(){}var e=Wt(c);st(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.wg=function(){return Qt(this,Xt(this))};
861
+ function Xt(a){var b,c,d,e,f,g,h,k,l,m;return D(function(n){switch(n.g){case 1:return Bt(),b=a.g,c=a.h.drm,d=new Js,e=!1,ya(n),u(n,d.init(),4);case 4:f=[],Os(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,nt(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.B(5);break;case 2:return Ba(n),u(n,d.destroy(),11);case 11:Ca(n,3);break;case 3:return n.return(!e)}})}
862
+ r.list=function(){return Qt(this,Yt())};function Yt(){var a,b,c;return D(function(d){switch(d.g){case 1:return Bt(),a=[],b=new Js,ya(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Ms(b,function(e,f){c=c.then(function(){var g;return D(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=st(new bt("manifest",e.Ca,e.ga,l),k);a.push(k)});B(h)})})}),u(d,c,2);case 2:return Ba(d),u(d,b.destroy(),6);case 6:Ca(d,3);break;case 3:return d.return(a)}})}
863
+ function Ct(a,b,c,d){var e,f,g,h,k;return D(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){}},
864
+ c.configure(d.manifest),Dt(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Dt(a),k=Zt(h),u(l,Promise.all(yf(k,function(m){return m.createSegmentIndex()})),3);Dt(a);if(e)throw e;return l.return(h)})}function Et(a,b,c,d){var e;return D(function(f){return 1==f.g?(e=new mg({rb:a.g,onError:c,gd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,rg(e,b.variants,d.offline.usePersistentLicense),2)):3!=f.g?u(f,Eg(e),3):f.return(e)})}
865
+ function Pt(a,b,c,d){var e=new Map,f=Zt(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=$t(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()),te:Array.from(e.values())}}
866
+ function $t(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,
867
+ tilesLayout:d.tilesLayout,external:d.external},h=e.offline.numberOfParallelDownloads,k=0;au(d,c.presentationTimeline.Ka(),function(l){var m=os(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=wt(b,d.id)*p;p=rs(a.g,p);f.set(m,new ns(l,p,k,!1))}l.h&&(n=os(l.h),f.has(n)||(p=.5*wt(b,d.id),p=rs(a.g,p),f.set(n,new ns(l.h,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,
868
+ timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function au(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 Dt(a){if(a.l.g)throw new K(2,9,7001);}function Bt(){if(!yt())throw new K(2,9,9E3);}function Qt(a,b){return D(function(c){if(1==c.g)return a.i.push(b),ya(c),u(c,b,4);if(2!=c.g)return c.return(c.h);Ba(c);lb(a.i,b);return Ca(c,0)})}
869
+ function At(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){lb(a.i,c)})}function Wt(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)}
870
+ function Vt(a,b,c,d){var e,f,g;return D(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Ps(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Ut(d,!1),videoCapabilities:Ut(d,!0)}});return u(h,nt(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)})}
871
+ function Zt(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}
872
+ function Nt(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());}G("shaka.offline.Storage",xt);xt.deleteAll=function(){var a;return D(function(b){return 1==b.g?(a=new Js,ya(b),u(b,Qs(a),2)):5!=b.g?(Ba(b),u(b,a.destroy(),5)):Ca(b,0)})};xt.prototype.list=xt.prototype.list;
873
+ xt.prototype.removeEmeSessions=xt.prototype.wg;xt.prototype.remove=xt.prototype.remove;xt.prototype.store=xt.prototype.store;xt.prototype.getNetworkingEngine=xt.prototype.nc;xt.prototype.getConfiguration=xt.prototype.getConfiguration;xt.prototype.configure=xt.prototype.configure;xt.prototype.destroy=xt.prototype.destroy;xt.support=yt;
874
+ var Ot=(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");
875
+ yn.offline=yt;function bu(){}function cu(a,b){a={priority:b||0,tf:a};for(b=0;b<du.length;b++)if(du[b].priority<a.priority){du.splice(b,0,a);return}du.push(a)}G("shaka.polyfill",bu);bu.register=cu;bu.installAll=function(){for(var a=t(du),b=a.next();!b.done;b=a.next()){b=b.value;try{b.tf()}catch(c){bb("Error installing polyfill!",c)}}};var du=[];function eu(){this.g=new fu}function gu(){window.AbortController||(window.AbortController=eu,window.AbortSignal=fu)}eu.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new N("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(eu.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});bu.AbortController=eu;eu.install=gu;
876
+ function fu(){af.call(this);this.h=!1;this.g=void 0;this.onabort=null}ta(fu,af);da.Object.defineProperties(fu.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});cu(gu);function hu(){}function iu(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())ju(b.value)}function ju(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)}})}bu.Aria=hu;hu.install=iu;cu(iu);function ku(){}function lu(){mu()}bu.EncryptionScheme=ku;ku.install=lu;cu(lu,-2);function nu(){}
877
+ function ou(){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}}),
878
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",pu);document.addEventListener("webkitfullscreenerror",pu);document.addEventListener("mozfullscreenchange",pu);document.addEventListener("mozfullscreenerror",pu);document.addEventListener("MSFullscreenChange",pu);document.addEventListener("MSFullscreenError",pu)}}
879
+ function pu(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)}bu.Fullscreen=nu;nu.install=ou;cu(ou);function qu(){}function ru(){var a=!0;if(zc()||vc("PlayStation 5")||Ac()||vc("Web0S")||wc()||yc()||vc("PC=EOS")||vc("Hisense")||vc("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),su=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=tu)}
880
+ function tu(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,w,x,y,C;return D(function(A){switch(A.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return A.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!qc())return A.return(b);if(c){if(yc())if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var z=c.contentType;c.width&&c.height&&(z+="; width="+c.width+"; height="+c.height);c.framerate&&(z+="; framerate="+c.framerate);"pq"===c.transferFunction&&
881
+ (z+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(z)}else e=ib(c.contentType);else wc()?(f=c.contentType,c.width&&c.height&&(f+="; width="+c.width,f+="; height="+c.height),c.framerate&&(f+="; framerate="+c.framerate),c.bitrate&&(f+="; bitrate="+c.bitrate),e=ib(f)):e=ib(c.contentType);if(!e)return A.return(b)}if(d&&(yc()&&d.spatialRendering?(h=d.contentType+"; spatialRendering=true",g=ib(h)):g=ib(d.contentType),!g))return A.return(b)}else if("file"==a.type){if(c&&(k=c.contentType,l=rc(k),
879
882
  !l)||d&&(m=d.contentType,n=rc(m),!n))return A.return(b)}else return A.return(b);if(!a.keySystemConfiguration)return b.supported=!0,A.return(Promise.resolve(b));p=a.keySystemConfiguration;q=[];v=[];p.audio&&(w={robustness:p.audio.robustness||"",contentType:a.audio.contentType},wc()&&a.audio.contentType.includes('codecs="ac-3"')&&(w={robustness:w.robustness,contentType:'audio/mp4; codecs="ec-3"'}),q.push(w));p.video&&(x={robustness:p.video.robustness||"",contentType:a.video.contentType},v.push(x));
880
- y={initDataTypes:[p.initDataType],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};q.length&&(y.audioCapabilities=q);v.length&&(y.videoCapabilities=v);xa(A,3);return u(A,navigator.requestMediaKeySystemAccess(p.keySystem,[y]),5);case 5:C=A.h;za(A,4);break;case 3:Aa(A);case 4:C&&(b.supported=!0,b.keySystemAccess=C);case 2:return A.return(b)}})}du.MediaCapabilities=su;su.install=tu;var uu=null;su.originalMcap=uu;eu(tu,-1);function wu(){}function xu(){var a=Bc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?yu():a?12>=a?(zu(),Au()):15>=a&&zu():tc()?Bu():(vc("Tizen 2")||vc("Tizen 3")||vc("Tizen 4"))&&Cu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Du()}
881
- function zu(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Na.apply(0,arguments));b.abort=function(){};return b}}function Au(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Bu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
882
- function Cu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=ed(b)[0]&&a(b)}}function yu(){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)}}
883
- function Du(){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)})}du.MediaSource=wu;wu.install=xu;eu(xu);function Eu(){}function Fu(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?Gu():void 0!=window.orientation&&Hu())}function Gu(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
884
- function Hu(){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 Iu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new O("change");b.dispatchEvent(c)})}du.Orientation=Eu;Eu.install=Fu;function Iu(){$e.call(this);this.type="";this.angle=0}ta(Iu,$e);
885
- Iu.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)};
886
- Iu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};eu(Fu);function Ju(){}var Ku,Lu,Mu,Nu,Ou,Pu;function Qu(a,b){try{var c=new Ru(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Su(a){var b=this.mediaKeys;b&&b!=a&&Tu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Tu(a,this):Promise.resolve()}
887
- function Uu(a){a=Nb(a.initData);if(Rb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Gc(a.subarray(4),!0);a=Jc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Ob(a);this.dispatchEvent(b)}du.PatchedMediaKeysApple=Ju;
888
- Ju.uninstall=function(){Ku&&(Ku=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Lu),HTMLMediaElement.prototype.setMediaKeys=Mu,window.MediaKeys=Nu,window.MediaKeySystemAccess=Ou,navigator.requestMediaKeySystemAccess=Pu,Lu=Pu=Mu=Ou=Nu=null,window.shakaMediaKeysPolyfill=!1)};
889
- Ju.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Ku=!0,Lu=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Mu=HTMLMediaElement.prototype.setMediaKeys,Nu=window.MediaKeys,Ou=window.MediaKeySystemAccess,Pu=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Su;window.MediaKeys=Vu;window.MediaKeySystemAccess=Ru;navigator.requestMediaKeySystemAccess=
890
- Qu;window.shakaMediaKeysPolyfill=!0}};
891
- function Ru(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
883
+ y={initDataTypes:[p.initDataType],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};q.length&&(y.audioCapabilities=q);v.length&&(y.videoCapabilities=v);xa(A,3);return u(A,navigator.requestMediaKeySystemAccess(p.keySystem,[y]),5);case 5:C=A.h;za(A,4);break;case 3:Aa(A);case 4:C&&(b.supported=!0,b.keySystemAccess=C);case 2:return A.return(b)}})}bu.MediaCapabilities=qu;qu.install=ru;var su=null;qu.originalMcap=su;cu(ru,-1);function uu(){}function vu(){var a=Bc();window.MediaSource&&(yc()?wu():a?12>=a?(xu(),yu()):15>=a&&xu():tc()?wu():(vc("Tizen 2")||vc("Tizen 3")||vc("Tizen 4"))&&zu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Au()}function xu(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ja.apply(0,arguments));b.abort=function(){};return b}}
884
+ function yu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function wu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}function zu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=ed(b)[0]&&a(b)}}
885
+ function Au(){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)})}bu.MediaSource=uu;uu.install=vu;cu(vu);function Bu(){}function Cu(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?Du():void 0!=window.orientation&&Eu())}function Du(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
886
+ function Eu(){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 Fu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new N("change");b.dispatchEvent(c)})}bu.Orientation=Bu;Bu.install=Cu;function Fu(){af.call(this);this.type="";this.angle=0}ta(Fu,af);
887
+ Fu.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)};
888
+ Fu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};cu(Cu);function Gu(){}var Hu,Iu,Ju,Ku,Lu,Mu;function Nu(a,b){try{var c=new Ou(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Pu(a){var b=this.mediaKeys;b&&b!=a&&Qu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Qu(a,this):Promise.resolve()}
889
+ function Ru(a){a=Mb(a.initData);if(Qb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Gc(a.subarray(4),!0);a=Jc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Nb(a);this.dispatchEvent(b)}bu.PatchedMediaKeysApple=Gu;
890
+ Gu.uninstall=function(){Hu&&(Hu=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Iu),HTMLMediaElement.prototype.setMediaKeys=Ju,window.MediaKeys=Ku,window.MediaKeySystemAccess=Lu,navigator.requestMediaKeySystemAccess=Mu,Iu=Mu=Ju=Lu=Ku=null,window.shakaMediaKeysPolyfill=!1)};
891
+ Gu.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Hu=!0,Iu=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Ju=HTMLMediaElement.prototype.setMediaKeys,Ku=window.MediaKeys,Lu=window.MediaKeySystemAccess,Mu=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Pu;window.MediaKeys=Su;window.MediaKeySystemAccess=Ou;navigator.requestMediaKeySystemAccess=
892
+ Nu;window.shakaMediaKeysPolyfill=!0}};
893
+ function Ou(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
892
894
  g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
893
- Ru.prototype.createMediaKeys=function(){var a=new Vu(this.keySystem);return Promise.resolve(a)};Ru.prototype.getConfiguration=function(){return this.g};function Vu(a){this.h=new WebKitMediaKeys(a);this.g=new sf}Vu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Wu(this.h,a)};Vu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
894
- function Tu(a,b){a.g.Ma();if(!b)return Promise.resolve();a.g.C(b,"webkitneedkey",Uu);try{return Aj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Wu(a){$e.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new sf;this.sessionId="";this.expiration=NaN;this.closed=new nc;this.keyStatuses=new Xu}ta(Wu,$e);r=Wu.prototype;
895
- r.generateRequest=function(a,b){var c=this;this.h=new nc;try{var d=this.l.createSession("video/mp4",Nb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.C(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Jb()?"license-request":"license-renewal").set("message",Ob(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.C(d,"webkitkeyadded",function(){c.g&&(Yu(c,"usable"),c.g.resolve(),c.g=null)});this.j.C(d,"webkitkeyerror",
896
- function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Yu(c,"output-not-allowed");break;default:Yu(c,"internal-error")}});Yu(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
897
- r.update=function(a){this.g=new nc;try{this.i.update(Nb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ma()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Yu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new O("keystatuseschange");a.dispatchEvent(b)}
898
- function Xu(){this.size=0;this.g=void 0}r=Xu.prototype;r.Jb=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,Wg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Wg.value();return this.g&&Lb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};function Zu(){}function $u(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=av,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=bv,window.MediaKeys=cv,window.MediaKeySystemAccess=dv,window.shakaMediaKeysPolyfill=!0)}function av(){return Promise.reject(Error("The key system specified is not supported."))}
899
- function bv(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}du.PatchedMediaKeysNop=Zu;Zu.install=$u;function cv(){throw new TypeError("Illegal constructor.");}cv.prototype.createSession=function(){};cv.prototype.setServerCertificate=function(){};function dv(){this.keySystem="";throw new TypeError("Illegal constructor.");}dv.prototype.getConfiguration=function(){};dv.prototype.createMediaKeys=function(){};eu($u,-10);function ev(){}
900
- function fv(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)gv="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=hv;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=iv;window.MediaKeys=jv;window.MediaKeySystemAccess=kv;window.shakaMediaKeysPolyfill=!0}}
901
- function lv(a){var b=gv;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function hv(a,b){try{var c=new kv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function iv(a){var b=this.mediaKeys;b&&b!=a&&mv(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&mv(a,this);return Promise.resolve()}du.PatchedMediaKeysWebkit=ev;ev.install=fv;
902
- function kv(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");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
895
+ Ou.prototype.createMediaKeys=function(){var a=new Su(this.keySystem);return Promise.resolve(a)};Ou.prototype.getConfiguration=function(){return this.g};function Su(a){this.h=new WebKitMediaKeys(a);this.g=new tf}Su.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Tu(this.h,a)};Su.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
896
+ function Qu(a,b){a.g.Ma();if(!b)return Promise.resolve();a.g.C(b,"webkitneedkey",Ru);try{return Bj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Tu(a){af.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new tf;this.sessionId="";this.expiration=NaN;this.closed=new mc;this.keyStatuses=new Uu}ta(Tu,af);r=Tu.prototype;
897
+ r.generateRequest=function(a,b){var c=this;this.h=new mc;try{var d=this.l.createSession("video/mp4",Mb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.C(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Jb()?"license-request":"license-renewal").set("message",Nb(e.message));e=new N("message",e);c.dispatchEvent(e)});this.j.C(d,"webkitkeyadded",function(){c.g&&(Vu(c,"usable"),c.g.resolve(),c.g=null)});this.j.C(d,"webkitkeyerror",
898
+ function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Vu(c,"output-not-allowed");break;default:Vu(c,"internal-error")}});Vu(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
899
+ r.update=function(a){this.g=new mc;try{this.i.update(Mb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ma()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Vu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new N("keystatuseschange");a.dispatchEvent(b)}
900
+ function Uu(){this.size=0;this.g=void 0}r=Uu.prototype;r.Jb=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,Xg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Xg.value();return this.g&&Kb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};function Wu(){}function Xu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Yu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Zu,window.MediaKeys=$u,window.MediaKeySystemAccess=av,window.shakaMediaKeysPolyfill=!0)}function Yu(){return Promise.reject(Error("The key system specified is not supported."))}
901
+ function Zu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}bu.PatchedMediaKeysNop=Wu;Wu.install=Xu;function $u(){throw new TypeError("Illegal constructor.");}$u.prototype.createSession=function(){};$u.prototype.setServerCertificate=function(){};function av(){this.keySystem="";throw new TypeError("Illegal constructor.");}av.prototype.getConfiguration=function(){};av.prototype.createMediaKeys=function(){};cu(Xu,-10);function bv(){}
902
+ function cv(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)dv="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=ev;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=fv;window.MediaKeys=gv;window.MediaKeySystemAccess=hv;window.shakaMediaKeysPolyfill=!0}}
903
+ function iv(a){var b=dv;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function ev(a,b){try{var c=new hv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function fv(a){var b=this.mediaKeys;b&&b!=a&&jv(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&jv(a,this);return Promise.resolve()}bu.PatchedMediaKeysWebkit=bv;bv.install=cv;
904
+ function hv(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");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
903
905
  l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
904
- d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}kv.prototype.createMediaKeys=function(){var a=new jv(this.g);return Promise.resolve(a)};kv.prototype.getConfiguration=function(){return this.h};function jv(a){this.l=a;this.h=null;this.g=new sf;this.i=[];this.j=new Map}
905
- function mv(a,b){a.h=b;a.g.Ma();var c=gv;b&&(a.g.C(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Ob(d.initData);a.h.dispatchEvent(e)}),a.g.C(b,c+"keymessage",function(d){var e=nv(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Jb()?"licenserequest":"licenserenewal").set("message",d.message),d=new O("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.C(b,c+"keyadded",function(d){if(d=nv(a,d.sessionId))ov(d,"usable"),
906
- d.g&&d.g.resolve(),d.g=null}),a.g.C(b,c+"keyerror",function(d){var e=nv(a,d.sessionId);e&&e.handleError(d)}))}jv.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 pv(b,this.l,a);this.i.push(a);return a};jv.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
907
- function nv(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 pv(a,b,c){$e.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 qv}ta(pv,$e);r=pv.prototype;
908
- r.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?ov(this,"output-restricted"):1==b?ov(this,"expired"):ov(this,"internal-error"))};
909
- function rv(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=Nb(Jc("LOAD_SESSION|"+c));else{var e=Jc("PERSISTENT|");d=Rc(e,b)}else d=Nb(b)}catch(g){return Promise.reject(g)}a.h=new nc;var f=lv("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new M(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).O(.01)}return a.h}
910
- function sv(a,b,c){if(a.g)a.g.then(function(){return sv(a,b,c)}).catch(function(){return sv(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Fc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Oc(e.keys[0].k);e=Oc(e.keys[0].kid)}else d=Nb(c),e=null;var f=lv("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
911
- function ov(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new O("keystatuseschange");a.dispatchEvent(b)}r.generateRequest=function(a,b){return rv(this,b,null)};r.load=function(a){return"persistent-license"==this.l?rv(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new nc;sv(this,b,a);return b};
912
- r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=lv("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function qv(){this.size=0;this.g=void 0}r=qv.prototype;r.Jb=function(){return this.g};
913
- r.forEach=function(a){this.g&&a(this.g,Wg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Wg.value();return this.g&&Lb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var gv="";eu(fv);function tv(){}function uv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=vv,Object.defineProperty(a,"disablePictureInPicture",{get:wv,set:xv,enumerable:!0,configurable:!0}),document.exitPictureInPicture=yv,document.addEventListener("webkitpresentationmodechanged",zv,!0))}}
914
- function zv(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)}
915
- function vv(){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 yv(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
916
- function wv(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function xv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}du.PiPWebkit=tv;tv.install=uv;eu(uv);function Av(){}function Bv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Cv))}function Cv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}du.RandomUUID=Av;Av.install=Bv;eu(Bv);function Dv(){}function Ev(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Fv)}function Fv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}du.StorageEstimate=Dv;Dv.install=Ev;eu(Ev);function Gv(){}function Hv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Iv})}function Iv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}du.Symbol=Gv;Gv.install=Hv;eu(Hv);function Jv(){}function Kv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}du.VideoPlayPromise=Jv;Jv.install=Kv;eu(Kv);function Lv(){}function Mv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||xc())&&(a.getVideoPlaybackQuality=Nv)}}function Nv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}du.VideoPlaybackQuality=Lv;Lv.install=Mv;eu(Mv);function Ov(){}function Pv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Qv;else if(6==b)a=Rv;else{try{var c=!!Qv(1,2,"")}catch(d){c=!1}c&&(a=Qv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Qv(a,b,c){return new window.TextTrackCue(a,b,c)}function Rv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}du.VTTCue=Ov;Ov.install=Pv;eu(Pv);function Sv(){}Sv.prototype.parseInit=function(){};Sv.prototype.setSequenceMode=function(){};Sv.prototype.parseMedia=function(a,b){var c=null,d=[];a=Fc(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=Tv.exec(e))){var f=Uv.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new pb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};G("shaka.text.LrcTextParser",Sv);Sv.prototype.parseMedia=Sv.prototype.parseMedia;
917
- Sv.prototype.setSequenceMode=Sv.prototype.setSequenceMode;Sv.prototype.parseInit=Sv.prototype.parseInit;var Tv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Uv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;id["application/x-subtitle-lrc"]=function(){return new Sv};function Vv(){}Vv.prototype.parseInit=function(){};Vv.prototype.setSequenceMode=function(){};
918
- Vv.prototype.parseMedia=function(a,b,c){var d=Fc(a);a=[];if(""==d)return a;var e=ig(d,"tt");if(!e)throw new L(2,2,2005,"Failed to parse TTML.");d=e.getElementsByTagName("body")[0];if(!d)return[];var f=Xf(e,Wv,"frameRate"),g=Xf(e,Wv,"subFrameRate"),h=Xf(e,Wv,"frameRateMultiplier"),k=Xf(e,Wv,"tickRate"),l=Xf(e,Wv,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=Xf(e,Xv,"extent");if("default"!=m&&"preserve"!=m)throw new L(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new Yv(f,
919
- g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{columns:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?Vf(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var p=t(e),q=p.next();!q.done;q=p.next()){var v=q.value;q=new rb;var w=v.getAttribute("xml:id");if(w){q.id=w;var x=null;n&&(x=Zv.exec(n)||$v.exec(n));w=x?Number(x[1]):null;x=x?Number(x[2]):null;var y,C=aw(v,h,"extent");if(C){var A=(y=Zv.exec(C))||
920
- $v.exec(C);null!=A&&(q.width=Number(A[1]),q.height=Number(A[2]),y||(null!=w&&(q.width=100*q.width/w),null!=x&&(q.height=100*q.height/x)),q.widthUnits=y||null!=w?Ib:0,q.heightUnits=y||null!=x?Ib:0)}if(v=aw(v,h,"origin"))if(A=(y=Zv.exec(v))||$v.exec(v),null!=A)q.viewportAnchorX=Number(A[1]),q.viewportAnchorY=Number(A[2]),y?C||(q.width=100-q.viewportAnchorX,q.widthUnits=Ib,q.height=100-q.viewportAnchorY,q.heightUnits=Ib):(null!=x&&(q.viewportAnchorY=100*q.viewportAnchorY/x),null!=w&&(q.viewportAnchorX=
921
- 100*q.viewportAnchorX/w)),q.viewportAnchorUnits=y||null!=w?Ib:0}else q=null;q&&k.push(q)}if(Sf(d,"p").length)throw new L(2,2,2001,"<p> can only be inside <div> in TTML");n=t(Sf(d,"div"));for(p=n.next();!p.done;p=n.next())if(Sf(p.value,"span").length)throw new L(2,2,2001,"<span> can only be inside <p> in TTML");if(b=bw(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
922
- function bw(a,b,c,d,e,f,g,h,k,l,m,n){var p=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var q=document.createElement("span");q.textContent=a.textContent}else q=a;for(var v=null,w=t(cw),x=w.next();!x.done&&!(v=dw(q,"backgroundImage",d,"#",x.value)[0]);x=w.next());w=null;var y=Xf(q,cw,"backgroundImage");n&&y&&!y.startsWith("#")&&(x=new Tb(n),y=new Tb(y),(x=x.resolve(y).toString())&&(w=x));if("p"==a.nodeName||v||w)m=!0;a=m;x="default"==(q.getAttribute("xml:space")||
923
- (h?"default":"preserve"));y=Array.from(q.childNodes).every(function(E){return E.nodeType==Node.TEXT_NODE});h=[];if(!y)for(var C=t(q.childNodes),A=C.next();!A.done;A=C.next())(A=bw(A.value,b,c,d,e,f,g,x,k,q,m,n))&&h.push(A);d=null!=l;n=/\S/.test(q.textContent);A=q.hasAttribute("begin")||q.hasAttribute("end")||q.hasAttribute("dur");if(!(A||n||"br"==q.tagName||0!=h.length||d&&!x))return null;C=ew(q,c);n=C.start;for(C=C.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)C=fw(p,c,n,C),n=C.start,C=
924
- C.end,p=p.parentNode;null==n&&(n=0);n+=b.periodStart;C=null==C?Infinity:C+b.periodStart;n=Math.max(n,b.segmentStart);C=Math.min(C,b.segmentEnd);if(!A&&0<h.length)for(n=Infinity,C=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),C=Math.max(C,c.endTime);if("br"==q.tagName)return e=new pb(n,C,""),e.lineBreak=!0,e;b="";y&&(b=q.textContent,x&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new pb(n,C,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=dw(q,"region",f,"")[0];
925
- if(q.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(E){return E.id==z})[0]}g=k;l&&d&&!q.getAttribute("region")&&!q.getAttribute("style")&&(g=dw(l,"region",f,"")[0]);gw(b,q,g,v,w,e,a,0==h.length);return b}
926
- function gw(a,b,c,d,e,f,g,h){g=g||h;"rtl"==hw(b,c,f,"direction",g)&&(a.direction="rtl");h=hw(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=qb);(h=hw(b,c,f,"textAlign",!0))?(a.positionAlign=iw[h],a.lineAlign=jw[h],a.textAlign=Bb[h.toUpperCase()]):a.textAlign=tb;if(h=hw(b,c,f,"displayAlign",!0))a.displayAlign=Cb[h.toUpperCase()];if(h=hw(b,c,f,"color",g))a.color=h;if(h=hw(b,c,f,"backgroundColor",
927
- g))a.backgroundColor=h;if(h=hw(b,c,f,"border",g))a.border=h;if(h=hw(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=hw(b,c,f,"fontWeight",g))&&
928
- "bold"==h&&(a.fontWeight=700);h=hw(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=hw(b,c,f,"lineHeight",g))&&h.match(kw)&&(a.lineHeight=h);(h=hw(b,c,f,"fontSize",g))&&(h.match(kw)||h.match(lw))&&(a.fontSize=h);if(h=hw(b,c,f,"fontStyle",g))a.fontStyle=Hb[h.toUpperCase()];d?(e=d.getAttribute("imageType")||d.getAttribute("imagetype"),h=d.getAttribute("encoding"),d=d.textContent.trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=hw(b,
929
- c,f,"textOutline",g))d=d.split(" "),d[0].match(kw)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(kw)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=hw(b,c,f,"letterSpacing",g))&&d.match(kw)&&(a.letterSpacing=d);(d=hw(b,c,f,"linePadding",g))&&d.match(kw)&&(a.linePadding=d);if(g=hw(b,c,f,"opacity",g))a.opacity=parseFloat(g);(c=aw(c,f,"textDecoration"))&&mw(a,c);(b=nw(b,f,"textDecoration"))&&mw(a,b)}
930
- function mw(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&mb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&mb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
931
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&mb(a.textDecoration,"overline")}}function hw(a,b,c,d,e){e=void 0===e?!0:e;return(a=nw(a,c,d))?a:e?aw(b,c,d):null}function aw(a,b,c){if(!a)return null;var d=Xf(a,Xv,c);return d?d:ow(a,b,c)}function nw(a,b,c){var d=Xf(a,Xv,c);return d?d:ow(a,b,c)}
932
- function ow(a,b,c){a=dw(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Wf(a[e],"urn:ebu:tt:style",c);f||(f=Xf(a[e],Xv,c));f||(f=nw(a[e],b,c));f&&(d=f)}return d}
933
- function dw(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Wf(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 fw(a,b,c,d){a=ew(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}}
934
- function ew(a,b){var c=pw(a.getAttribute("begin"),b),d=pw(a.getAttribute("end"),b);a=pw(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
935
- function pw(a,b){var c=null;if(qw.test(a)){a=qw.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(rw.test(a))c=sw(rw,a);else if(tw.test(a))c=sw(tw,a);else if(uw.test(a))a=uw.exec(a),c=Number(a[1])/b.frameRate;else if(vw.test(a))a=vw.exec(a),c=Number(a[1])/b.g;else if(ww.test(a))c=sw(ww,a);else if(a)throw new L(2,2,2001,"Could not parse cue time range in TTML");return c}
936
- function sw(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}G("shaka.text.TtmlTextParser",Vv);Vv.prototype.parseMedia=Vv.prototype.parseMedia;Vv.prototype.setSequenceMode=Vv.prototype.setSequenceMode;Vv.prototype.parseInit=Vv.prototype.parseInit;
937
- function Yv(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]))}
938
- var Zv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,lw=/^(\d{1,2}(?:\.\d+)?|100)%$/,kw=/^(\d+px|\d+em|\d*\.?\d+c)$/,$v=/^(\d+)px (\d+)px$/,qw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,rw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,tw=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,uw=/^(\d*(?:\.\d*)?)f$/,vw=/^(\d*(?:\.\d*)?)t$/,ww=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),jw={left:wb,center:"center",right:"end",start:wb,
939
- end:"end"},iw={left:"line-left",center:"center",right:"line-right"},Wv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Xv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],cw=["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 Vv};function xw(){this.g=new Vv}xw.prototype.parseInit=function(a){var b=!1;(new Ff).box("moov",Kf).box("trak",Kf).box("mdia",Kf).box("minf",Kf).box("stbl",Kf).M("stsd",Mf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new L(2,2,2007);};xw.prototype.setSequenceMode=function(){};xw.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Ff).box("mdat",Of(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new L(2,2,2007);return f};
940
- G("shaka.text.Mp4TtmlParser",xw);xw.prototype.parseMedia=xw.prototype.parseMedia;xw.prototype.setSequenceMode=xw.prototype.setSequenceMode;xw.prototype.parseInit=xw.prototype.parseInit;id['application/mp4; codecs="stpp"']=function(){return new xw};id['application/mp4; codecs="stpp.ttml"']=function(){return new xw};id['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new xw};id['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new xw};function yw(){this.g=!1}yw.prototype.parseInit=function(){};yw.prototype.setSequenceMode=function(a){this.g=a};
941
- yw.prototype.parseMedia=function(a,b){a=Fc(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new L(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.g){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=zw(new Pq(d[1]));if(null==a)throw new L(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
942
- e/9E4-a}}b=[];e=t(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Pq(d);var f=new rb;Sq(d);Qq(d);for(var g=Sq(d);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?
943
- (h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Qq(d);g=Sq(d)}b.push(f)}e=new Map;Aw(e);d=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&
944
- (g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new pb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var q=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=q;break;case "color":m=!0;l.color=q;break;case "font-family":m=!0;l.fontFamily=q;break;case "font-size":m=!0;l.fontSize=q;break;case "font-weight":if(700<=parseInt(q,10)||"bold"==
945
- q)m=!0,l.fontWeight=700;break;case "font-style":switch(q){case "normal":m=!0;l.fontStyle=zb;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(q);break;case "text-shadow":m=!0;l.textShadow=q;break;case "white-space":m=!0,l.wrapLine="noWrap"!=q}}}m&&e.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else{h=null;f[0].includes("--\x3e")||(h=f[0],f.splice(0,1));
946
- g=new Pq(f[0]);k=zw(g);n=Rq(g,/[ \t]+--\x3e[ \t]+/g);l=zw(g);if(null==k||null==n||null==l)throw new L(2,2,2001,"Could not parse cue time range in WebVTT");k+=m;l+=m;f=f.slice(1).join("\n").trim();e.has("global")?(m=e.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new pb(k,l,"");Qq(g);for(k=Sq(g);k;)Bw(m,k,b),Qq(g),k=Sq(g);Cw(f,m,e);null!=h&&(m.id=h);f=m}f&&d.push(f)}return d};
947
- function Aw(a){for(var b=t(Object.entries(Eb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new pb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Fb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new pb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
948
- function Cw(a,b,c){if(a.includes("<")){0===c.size&&Aw(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}d=[];f=-1;for(e=0;e<a.length;e++)"<"===a[e]?f=e+
949
- 1:">"===a[e]&&0<f&&(f=a.substr(f,e-f),f.match(Dw)&&d.push(f),f=-1);d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,a=a.replace("<"+e+">",'<div time="'+e+'">'),a+="</div>";a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){a=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)d+="/"+k+">";else{if(!l.startsWith("v")){d+=e[h];continue}d+="/"+l+">"}h+=k.length+1}else d+=e[h]}else d+=e[h]}else"<"===e[h]?
950
- (g=h+1,"v"!=e[g]&&(g=-1)):">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=ig("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=Ew(a);return}a=t(e);for(e=a.next();!e.done;e=a.next())Fw(e.value,b,d,c);b.nestedCues=d}else b.payload=
951
- Ew(a)}else b.payload=Ew(a)}function Gw(a,b){return a&&0<a.length?a:b}
952
- function Fw(a,b,c,d){var e=b.clone();e.nestedCues=[];e.payload="";e.line=null;e.region=new rb;e.position=null;e.size=0;if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/(?=[ .])+/g)),g=f.next();!g.done;g=f.next()){var h=g=g.value;if(h.startsWith(".voice-")){var k=h.split("-").pop();h='v[voice="'+k+'"]';d.has(h)||(h="v[voice="+k+"]")}d.has(h)&&(h=d.get(h))&&(e.backgroundColor=Gw(h.backgroundColor,e.backgroundColor),e.color=Gw(h.color,e.color),e.fontFamily=Gw(h.fontFamily,
953
- e.fontFamily),e.fontSize=Gw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.textShadow=h.textShadow,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=zw(new Pq(g)))e.startTime=g}}if(Zf(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=
954
- a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=Ew(a),c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())Fw(a.value,e,c,d)}
955
- function Bw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=tb:a.textAlign=Bb[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|middle|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||
956
- "end"==b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Hw(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=Db[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=vb,a.line=Number(c[1]),c[2]&&(a.lineAlign=Db[c[2].toUpperCase()])}function Hw(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
957
- function zw(a){a=Rq(a,Dw);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)}function Ew(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}G("shaka.text.VttTextParser",yw);yw.prototype.parseMedia=yw.prototype.parseMedia;
958
- yw.prototype.setSequenceMode=yw.prototype.setSequenceMode;yw.prototype.parseInit=yw.prototype.parseInit;var Dw=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;id["text/vtt"]=function(){return new yw};id['text/vtt; codecs="vtt"']=function(){return new yw};id['text/vtt; codecs="wvtt"']=function(){return new yw};function Iw(){this.g=null}Iw.prototype.parseInit=function(a){var b=this,c=!1;(new Ff).box("moov",Kf).box("trak",Kf).box("mdia",Kf).M("mdhd",function(d){d=mi(d.reader,d.version);b.g=d.timescale}).box("minf",Kf).box("stbl",Kf).M("stsd",Mf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new L(2,2,2008);if(!c)throw new L(2,2,2008);};Iw.prototype.setSequenceMode=function(){};
959
- Iw.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new L(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Ff).box("moof",Kf).box("traf",Kf).M("tfdt",function(A){g=!0;c=li(A.reader,A.version).Be}).M("tfhd",function(A){l=ki(A.reader,A.flags).He}).M("trun",function(A){h=!0;d=ni(A.reader,A.version,A.flags).We}).box("mdat",Of(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new L(2,2,2008);a=c;for(var m=new Cf(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=p.value;
960
- var q=p.ie||l,v=p.jd?c+p.jd:a;a=v+(q||0);var w=0;do{var x=m.K();w+=x;var y=m.K(),C=null;"vttc"==Jf(y)?8<x&&(C=m.cb(x-8)):m.skip(x-8);q&&C&&(x=Jw(C,b.periodStart+v/this.g,b.periodStart+a/this.g),f.push(x))}while(p.sampleSize&&w<p.sampleSize)}return f.filter(rd)};function Jw(a,b,c){var d,e,f;(new Ff).box("payl",Of(function(g){d=Fc(g)})).box("iden",Of(function(g){e=Fc(g)})).box("sttg",Of(function(g){f=Fc(g)})).parse(a);return d?Kw(d,e,f,b,c):null}
961
- function Kw(a,b,c,d,e){d=new pb(d,e,"");Cw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Pq(c),b=Sq(a);b;)Bw(d,b,[]),Qq(a),b=Sq(a);return d}G("shaka.text.Mp4VttParser",Iw);Iw.prototype.parseMedia=Iw.prototype.parseMedia;Iw.prototype.setSequenceMode=Iw.prototype.setSequenceMode;Iw.prototype.parseInit=Iw.prototype.parseInit;id['application/mp4; codecs="wvtt"']=function(){return new Iw};function Lw(){}Lw.prototype.parseInit=function(){};Lw.prototype.setSequenceMode=function(){};Lw.prototype.parseMedia=function(a){var b=Fc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Pq(c[0]),e=Mw(d),f=Rq(d,/,/g);d=Mw(d);if(null==e||null==f||null==d)throw new L(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new pb(e,d,c.slice(1).join("\n").trim()))}return a};
962
- function Mw(a){a=Rq(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)}G("shaka.text.SbvTextParser",Lw);Lw.prototype.parseMedia=Lw.prototype.parseMedia;Lw.prototype.setSequenceMode=Lw.prototype.setSequenceMode;Lw.prototype.parseInit=Lw.prototype.parseInit;id["text/x-subviewer"]=function(){return new Lw};function Nw(){this.g=new yw}Nw.prototype.parseInit=function(){};Nw.prototype.setSequenceMode=function(){};Nw.prototype.parseMedia=function(a,b,c){a=Fc(a);a=Ow(a);a=Nb(Jc(a));return this.g.parseMedia(a,b,c)};function Ow(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}G("shaka.text.SrtTextParser",Nw);
963
- Nw.srt2webvtt=Ow;Nw.prototype.parseMedia=Nw.prototype.parseMedia;Nw.prototype.setSequenceMode=Nw.prototype.setSequenceMode;Nw.prototype.parseInit=Nw.prototype.parseInit;id["text/srt"]=function(){return new Nw};function Pw(){}Pw.prototype.parseInit=function(){};Pw.prototype.setSequenceMode=function(){};
964
- Pw.prototype.parseMedia=function(a){var b="",c="";a=Fc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=Qw.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=Rw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Sw);else if("Style"==e){e=f.split(Sw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
965
- [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Bd:e.Bd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Rw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Sw);else if("Dialogue"==f){g=g.split(Sw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Tw(f.Start);var k=Tw(f.End);g=new pb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Bd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Bd}}(e)))&&Uw(g,f);d.push(g)}return d};
966
- function Uw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Vw(c))a.color=c;if(c=b.BackColour)if(c=Vw(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=xb;a.textAlign="start";break;case 2:a.displayAlign=xb;a.textAlign=tb;break;case 3:a.displayAlign=xb;a.textAlign="end";
967
- break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=tb;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=tb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
968
- function Vw(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 Tw(a){a=Ww.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}G("shaka.text.SsaTextParser",Pw);Pw.prototype.parseMedia=Pw.prototype.parseMedia;Pw.prototype.setSequenceMode=Pw.prototype.setSequenceMode;Pw.prototype.parseInit=Pw.prototype.parseInit;
969
- var Qw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Rw=/^\s*([^:]+):\s*(.*)/,Sw=/\s*,\s*/,Ww=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;id["text/x-ssa"]=function(){return new Pw};/*
906
+ d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}hv.prototype.createMediaKeys=function(){var a=new gv(this.g);return Promise.resolve(a)};hv.prototype.getConfiguration=function(){return this.h};function gv(a){this.l=a;this.h=null;this.g=new tf;this.i=[];this.j=new Map}
907
+ function jv(a,b){a.h=b;a.g.Ma();var c=dv;b&&(a.g.C(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Nb(d.initData);a.h.dispatchEvent(e)}),a.g.C(b,c+"keymessage",function(d){var e=kv(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Jb()?"licenserequest":"licenserenewal").set("message",d.message),d=new N("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.C(b,c+"keyadded",function(d){if(d=kv(a,d.sessionId))lv(d,"usable"),
908
+ d.g&&d.g.resolve(),d.g=null}),a.g.C(b,c+"keyerror",function(d){var e=kv(a,d.sessionId);e&&e.handleError(d)}))}gv.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 mv(b,this.l,a);this.i.push(a);return a};gv.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
909
+ function kv(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 mv(a,b,c){af.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 nv}ta(mv,af);r=mv.prototype;
910
+ r.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?lv(this,"output-restricted"):1==b?lv(this,"expired"):lv(this,"internal-error"))};
911
+ function ov(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=Mb(Jc("LOAD_SESSION|"+c));else{var e=Jc("PERSISTENT|");d=Rc(e,b)}else d=Mb(b)}catch(g){return Promise.reject(g)}a.h=new mc;var f=iv("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new pc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).O(.01)}return a.h}
912
+ function pv(a,b,c){if(a.g)a.g.then(function(){return pv(a,b,c)}).catch(function(){return pv(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Fc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Oc(e.keys[0].k);e=Oc(e.keys[0].kid)}else d=Mb(c),e=null;var f=iv("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
913
+ function lv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new N("keystatuseschange");a.dispatchEvent(b)}r.generateRequest=function(a,b){return ov(this,b,null)};r.load=function(a){return"persistent-license"==this.l?ov(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new mc;pv(this,b,a);return b};
914
+ r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=iv("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function nv(){this.size=0;this.g=void 0}r=nv.prototype;r.Jb=function(){return this.g};
915
+ r.forEach=function(a){this.g&&a(this.g,Xg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Xg.value();return this.g&&Kb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var dv="";cu(cv);function qv(){}function rv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=sv,Object.defineProperty(a,"disablePictureInPicture",{get:tv,set:uv,enumerable:!0,configurable:!0}),document.exitPictureInPicture=vv,document.addEventListener("webkitpresentationmodechanged",wv,!0))}}
916
+ function wv(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)}
917
+ function sv(){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 vv(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
918
+ function tv(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function uv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}bu.PiPWebkit=qv;qv.install=rv;cu(rv);function xv(){}function yv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=zv))}function zv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}bu.RandomUUID=xv;xv.install=yv;cu(yv);function Av(){}function Bv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Cv})}function Cv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}bu.Symbol=Av;Av.install=Bv;cu(Bv);function Dv(){}function Ev(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}bu.VideoPlayPromise=Dv;Dv.install=Ev;cu(Ev);function Fv(){}function Gv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||xc())&&(a.getVideoPlaybackQuality=Hv)}}function Hv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}bu.VideoPlaybackQuality=Fv;Fv.install=Gv;cu(Gv);function Iv(){}function Jv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Kv;else if(6==b)a=Lv;else{try{var c=!!Kv(1,2,"")}catch(d){c=!1}c&&(a=Kv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Kv(a,b,c){return new window.TextTrackCue(a,b,c)}function Lv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}bu.VTTCue=Iv;Iv.install=Jv;cu(Jv);function Mv(){}Mv.prototype.parseInit=function(){};Mv.prototype.setSequenceMode=function(){};Mv.prototype.parseMedia=function(a,b){var c=null,d=[];a=Fc(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=Nv.exec(e))){var f=Ov.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new ob(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};G("shaka.text.LrcTextParser",Mv);Mv.prototype.parseMedia=Mv.prototype.parseMedia;
919
+ Mv.prototype.setSequenceMode=Mv.prototype.setSequenceMode;Mv.prototype.parseInit=Mv.prototype.parseInit;var Nv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Ov=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;jd["application/x-subtitle-lrc"]=function(){return new Mv};function Pv(){}Pv.prototype.parseInit=function(){};Pv.prototype.setSequenceMode=function(){};
920
+ Pv.prototype.parseMedia=function(a,b,c){var d=Fc(a);a=[];if(""==d)return a;var e=jg(d,"tt");if(!e)throw new K(2,2,2005,"Failed to parse TTML.");d=e.getElementsByTagName("body")[0];if(!d)return[];var f=Yf(e,Qv,"frameRate"),g=Yf(e,Qv,"subFrameRate"),h=Yf(e,Qv,"frameRateMultiplier"),k=Yf(e,Qv,"tickRate"),l=Yf(e,Qv,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=Yf(e,Rv,"extent");if("default"!=m&&"preserve"!=m)throw new K(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new Sv(f,
921
+ g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{columns:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?Wf(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var p=t(e),q=p.next();!q.done;q=p.next()){var v=q.value;q=new qb;var w=v.getAttribute("xml:id");if(w){q.id=w;var x=null;n&&(x=Tv.exec(n)||Uv.exec(n));w=x?Number(x[1]):null;x=x?Number(x[2]):null;var y,C=Vv(v,h,"extent");if(C){var A=(y=Tv.exec(C))||
922
+ Uv.exec(C);null!=A&&(q.width=Number(A[1]),q.height=Number(A[2]),y||(null!=w&&(q.width=100*q.width/w),null!=x&&(q.height=100*q.height/x)),q.widthUnits=y||null!=w?Hb:0,q.heightUnits=y||null!=x?Hb:0)}if(v=Vv(v,h,"origin"))if(A=(y=Tv.exec(v))||Uv.exec(v),null!=A)q.viewportAnchorX=Number(A[1]),q.viewportAnchorY=Number(A[2]),y?C||(q.width=100-q.viewportAnchorX,q.widthUnits=Hb,q.height=100-q.viewportAnchorY,q.heightUnits=Hb):(null!=x&&(q.viewportAnchorY=100*q.viewportAnchorY/x),null!=w&&(q.viewportAnchorX=
923
+ 100*q.viewportAnchorX/w)),q.viewportAnchorUnits=y||null!=w?Hb:0}else q=null;q&&k.push(q)}if(Tf(d,"p").length)throw new K(2,2,2001,"<p> can only be inside <div> in TTML");n=t(Tf(d,"div"));for(p=n.next();!p.done;p=n.next())if(Tf(p.value,"span").length)throw new K(2,2,2001,"<span> can only be inside <p> in TTML");if(b=Wv(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
924
+ function Wv(a,b,c,d,e,f,g,h,k,l,m,n){var p=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var q=document.createElement("span");q.textContent=a.textContent}else q=a;for(var v=null,w=t(Xv),x=w.next();!x.done&&!(v=Yv(q,"backgroundImage",d,"#",x.value)[0]);x=w.next());w=null;var y=Yf(q,Xv,"backgroundImage");n&&y&&!y.startsWith("#")&&(x=new Sb(n),y=new Sb(y),(x=x.resolve(y).toString())&&(w=x));if("p"==a.nodeName||v||w)m=!0;a=m;x="default"==(q.getAttribute("xml:space")||
925
+ (h?"default":"preserve"));y=Array.from(q.childNodes).every(function(E){return E.nodeType==Node.TEXT_NODE});h=[];if(!y)for(var C=t(q.childNodes),A=C.next();!A.done;A=C.next())(A=Wv(A.value,b,c,d,e,f,g,x,k,q,m,n))&&h.push(A);d=null!=l;n=/\S/.test(q.textContent);A=q.hasAttribute("begin")||q.hasAttribute("end")||q.hasAttribute("dur");if(!(A||n||"br"==q.tagName||0!=h.length||d&&!x))return null;C=Zv(q,c);n=C.start;for(C=C.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)C=$v(p,c,n,C),n=C.start,C=
926
+ C.end,p=p.parentNode;null==n&&(n=0);n+=b.periodStart;C=null==C?Infinity:C+b.periodStart;n=Math.max(n,b.segmentStart);C=Math.min(C,b.segmentEnd);if(!A&&0<h.length)for(n=Infinity,C=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),C=Math.max(C,c.endTime);if("br"==q.tagName)return e=new ob(n,C,""),e.lineBreak=!0,e;b="";y&&(b=q.textContent,x&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new ob(n,C,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Yv(q,"region",f,"")[0];
927
+ if(q.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(E){return E.id==z})[0]}g=k;l&&d&&!q.getAttribute("region")&&!q.getAttribute("style")&&(g=Yv(l,"region",f,"")[0]);aw(b,q,g,v,w,e,a,0==h.length);return b}
928
+ function aw(a,b,c,d,e,f,g,h){g=g||h;"rtl"==bw(b,c,f,"direction",g)&&(a.direction="rtl");h=bw(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=pb);(h=bw(b,c,f,"textAlign",!0))?(a.positionAlign=cw[h],a.lineAlign=dw[h],a.textAlign=Ab[h.toUpperCase()]):a.textAlign=sb;if(h=bw(b,c,f,"displayAlign",!0))a.displayAlign=Bb[h.toUpperCase()];if(h=bw(b,c,f,"color",g))a.color=h;if(h=bw(b,c,f,"backgroundColor",
929
+ g))a.backgroundColor=h;if(h=bw(b,c,f,"border",g))a.border=h;if(h=bw(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=bw(b,c,f,"fontWeight",g))&&
930
+ "bold"==h&&(a.fontWeight=700);h=bw(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=bw(b,c,f,"lineHeight",g))&&h.match(ew)&&(a.lineHeight=h);(h=bw(b,c,f,"fontSize",g))&&(h.match(ew)||h.match(fw))&&(a.fontSize=h);if(h=bw(b,c,f,"fontStyle",g))a.fontStyle=Fb[h.toUpperCase()];d?(e=d.getAttribute("imageType")||d.getAttribute("imagetype"),h=d.getAttribute("encoding"),d=d.textContent.trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=bw(b,
931
+ c,f,"textOutline",g))d=d.split(" "),d[0].match(ew)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(ew)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=bw(b,c,f,"letterSpacing",g))&&d.match(ew)&&(a.letterSpacing=d);(d=bw(b,c,f,"linePadding",g))&&d.match(ew)&&(a.linePadding=d);if(g=bw(b,c,f,"opacity",g))a.opacity=parseFloat(g);(c=Vv(c,f,"textDecoration"))&&gw(a,c);(b=hw(b,f,"textDecoration"))&&gw(a,b)}
932
+ function gw(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&lb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&lb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
933
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&lb(a.textDecoration,"overline")}}function bw(a,b,c,d,e){e=void 0===e?!0:e;return(a=hw(a,c,d))?a:e?Vv(b,c,d):null}function Vv(a,b,c){if(!a)return null;var d=Yf(a,Rv,c);return d?d:iw(a,b,c)}function hw(a,b,c){var d=Yf(a,Rv,c);return d?d:iw(a,b,c)}
934
+ function iw(a,b,c){a=Yv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Xf(a[e],"urn:ebu:tt:style",c);f||(f=Yf(a[e],Rv,c));f||(f=hw(a[e],b,c));f&&(d=f)}return d}
935
+ function Yv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Xf(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 $v(a,b,c,d){a=Zv(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}}
936
+ function Zv(a,b){var c=jw(a.getAttribute("begin"),b),d=jw(a.getAttribute("end"),b);a=jw(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
937
+ function jw(a,b){var c=null;if(kw.test(a)){a=kw.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(lw.test(a))c=mw(lw,a);else if(nw.test(a))c=mw(nw,a);else if(ow.test(a))a=ow.exec(a),c=Number(a[1])/b.frameRate;else if(pw.test(a))a=pw.exec(a),c=Number(a[1])/b.g;else if(qw.test(a))c=mw(qw,a);else if(a)throw new K(2,2,2001,"Could not parse cue time range in TTML");return c}
938
+ function mw(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}G("shaka.text.TtmlTextParser",Pv);Pv.prototype.parseMedia=Pv.prototype.parseMedia;Pv.prototype.setSequenceMode=Pv.prototype.setSequenceMode;Pv.prototype.parseInit=Pv.prototype.parseInit;
939
+ function Sv(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]))}
940
+ var Tv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,fw=/^(\d{1,2}(?:\.\d+)?|100)%$/,ew=/^(\d+px|\d+em|\d*\.?\d+c)$/,Uv=/^(\d+)px (\d+)px$/,kw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,lw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,nw=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,ow=/^(\d*(?:\.\d*)?)f$/,pw=/^(\d*(?:\.\d*)?)t$/,qw=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),dw={left:vb,center:"center",right:"end",start:vb,
941
+ end:"end"},cw={left:"line-left",center:"center",right:"line-right"},Qv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Rv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Xv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];jd["application/ttml+xml"]=function(){return new Pv};function rw(){this.g=new Pv}rw.prototype.parseInit=function(a){var b=!1;(new Gf).box("moov",Lf).box("trak",Lf).box("mdia",Lf).box("minf",Lf).box("stbl",Lf).M("stsd",Nf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new K(2,2,2007);};rw.prototype.setSequenceMode=function(){};rw.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Gf).box("mdat",Pf(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new K(2,2,2007);return f};
942
+ G("shaka.text.Mp4TtmlParser",rw);rw.prototype.parseMedia=rw.prototype.parseMedia;rw.prototype.setSequenceMode=rw.prototype.setSequenceMode;rw.prototype.parseInit=rw.prototype.parseInit;jd['application/mp4; codecs="stpp"']=function(){return new rw};jd['application/mp4; codecs="stpp.ttml"']=function(){return new rw};jd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new rw};jd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new rw};function sw(){this.g=!1}sw.prototype.parseInit=function(){};sw.prototype.setSequenceMode=function(a){this.g=a};
943
+ sw.prototype.parseMedia=function(a,b){a=Fc(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new K(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.g){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=tw(new Oq(d[1]));if(null==a)throw new K(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
944
+ e/9E4-a}}b=[];e=t(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Oq(d);var f=new qb;Rq(d);Pq(d);for(var g=Rq(d);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?
945
+ (h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Pq(d);g=Rq(d)}b.push(f)}e=new Map;uw(e);d=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&
946
+ (g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new ob(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var q=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=q;break;case "color":m=!0;l.color=q;break;case "font-family":m=!0;l.fontFamily=q;break;case "font-size":m=!0;l.fontSize=q;break;case "font-weight":if(700<=parseInt(q,10)||"bold"==
947
+ q)m=!0,l.fontWeight=700;break;case "font-style":switch(q){case "normal":m=!0;l.fontStyle=yb;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(q);break;case "text-shadow":m=!0;l.textShadow=q;break;case "white-space":m=!0,l.wrapLine="noWrap"!=q}}}m&&e.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else{h=null;f[0].includes("--\x3e")||(h=f[0],f.splice(0,1));
948
+ g=new Oq(f[0]);k=tw(g);n=Qq(g,/[ \t]+--\x3e[ \t]+/g);l=tw(g);if(null==k||null==n||null==l)throw new K(2,2,2001,"Could not parse cue time range in WebVTT");k+=m;l+=m;f=f.slice(1).join("\n").trim();e.has("global")?(m=e.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new ob(k,l,"");Pq(g);for(k=Rq(g);k;)vw(m,k,b),Pq(g),k=Rq(g);ww(f,m,e);null!=h&&(m.id=h);f=m}f&&d.push(f)}return d};
949
+ function uw(a){for(var b=t(Object.entries(Db)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new ob(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Eb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new ob(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
950
+ function ww(a,b,c){if(a.includes("<")){0===c.size&&uw(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}d=[];f=-1;for(e=0;e<a.length;e++)"<"===a[e]?f=e+
951
+ 1:">"===a[e]&&0<f&&(f=a.substr(f,e-f),f.match(xw)&&d.push(f),f=-1);d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,a=a.replace("<"+e+">",'<div time="'+e+'">'),a+="</div>";a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){a=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)d+="/"+k+">";else{if(!l.startsWith("v")){d+=e[h];continue}d+="/"+l+">"}h+=k.length+1}else d+=e[h]}else d+=e[h]}else"<"===e[h]?
952
+ (g=h+1,"v"!=e[g]&&(g=-1)):">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=jg("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=yw(a);return}a=t(e);for(e=a.next();!e.done;e=a.next())zw(e.value,b,d,c);b.nestedCues=d}else b.payload=
953
+ yw(a)}else b.payload=yw(a)}function Aw(a,b){return a&&0<a.length?a:b}
954
+ function zw(a,b,c,d){var e=b.clone();e.nestedCues=[];e.payload="";e.line=null;e.region=new qb;e.position=null;e.size=0;if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/(?=[ .])+/g)),g=f.next();!g.done;g=f.next()){var h=g=g.value;if(h.startsWith(".voice-")){var k=h.split("-").pop();h='v[voice="'+k+'"]';d.has(h)||(h="v[voice="+k+"]")}d.has(h)&&(h=d.get(h))&&(e.backgroundColor=Aw(h.backgroundColor,e.backgroundColor),e.color=Aw(h.color,e.color),e.fontFamily=Aw(h.fontFamily,
955
+ e.fontFamily),e.fontSize=Aw(h.fontSize,e.fontSize),e.textShadow=Aw(h.textShadow,e.textShadow),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=tw(new Oq(g)))e.startTime=g}}if($f(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=
956
+ d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=yw(a),c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())zw(a.value,e,c,d)}
957
+ function vw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=sb:a.textAlign=Ab[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|middle|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||
958
+ "end"==b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Bw(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=Cb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=ub,a.line=Number(c[1]),c[2]&&(a.lineAlign=Cb[c[2].toUpperCase()])}function Bw(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
959
+ function tw(a){a=Qq(a,xw);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)}function yw(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}G("shaka.text.VttTextParser",sw);sw.prototype.parseMedia=sw.prototype.parseMedia;
960
+ sw.prototype.setSequenceMode=sw.prototype.setSequenceMode;sw.prototype.parseInit=sw.prototype.parseInit;var xw=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;jd["text/vtt"]=function(){return new sw};jd['text/vtt; codecs="vtt"']=function(){return new sw};jd['text/vtt; codecs="wvtt"']=function(){return new sw};function Cw(){this.g=null}Cw.prototype.parseInit=function(a){var b=this,c=!1;(new Gf).box("moov",Lf).box("trak",Lf).box("mdia",Lf).M("mdhd",function(d){d=ni(d.reader,d.version);b.g=d.timescale}).box("minf",Lf).box("stbl",Lf).M("stsd",Nf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new K(2,2,2008);if(!c)throw new K(2,2,2008);};Cw.prototype.setSequenceMode=function(){};
961
+ Cw.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new K(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Gf).box("moof",Lf).box("traf",Lf).M("tfdt",function(A){g=!0;c=mi(A.reader,A.version).Ae}).M("tfhd",function(A){l=li(A.reader,A.flags).Ge}).M("trun",function(A){h=!0;d=oi(A.reader,A.version,A.flags).Ve}).box("mdat",Pf(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new K(2,2,2008);a=c;for(var m=new Df(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=p.value;
962
+ var q=p.he||l,v=p.jd?c+p.jd:a;a=v+(q||0);var w=0;do{var x=m.K();w+=x;var y=m.K(),C=null;"vttc"==Kf(y)?8<x&&(C=m.bb(x-8)):m.skip(x-8);q&&C&&(x=Dw(C,b.periodStart+v/this.g,b.periodStart+a/this.g),f.push(x))}while(p.sampleSize&&w<p.sampleSize)}return f.filter(sd)};function Dw(a,b,c){var d,e,f;(new Gf).box("payl",Pf(function(g){d=Fc(g)})).box("iden",Pf(function(g){e=Fc(g)})).box("sttg",Pf(function(g){f=Fc(g)})).parse(a);return d?Ew(d,e,f,b,c):null}
963
+ function Ew(a,b,c,d,e){d=new ob(d,e,"");ww(a,d,new Map);b&&(d.id=b);if(c)for(a=new Oq(c),b=Rq(a);b;)vw(d,b,[]),Pq(a),b=Rq(a);return d}G("shaka.text.Mp4VttParser",Cw);Cw.prototype.parseMedia=Cw.prototype.parseMedia;Cw.prototype.setSequenceMode=Cw.prototype.setSequenceMode;Cw.prototype.parseInit=Cw.prototype.parseInit;jd['application/mp4; codecs="wvtt"']=function(){return new Cw};function Fw(){}Fw.prototype.parseInit=function(){};Fw.prototype.setSequenceMode=function(){};Fw.prototype.parseMedia=function(a){var b=Fc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Oq(c[0]),e=Gw(d),f=Qq(d,/,/g);d=Gw(d);if(null==e||null==f||null==d)throw new K(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new ob(e,d,c.slice(1).join("\n").trim()))}return a};
964
+ function Gw(a){a=Qq(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)}G("shaka.text.SbvTextParser",Fw);Fw.prototype.parseMedia=Fw.prototype.parseMedia;Fw.prototype.setSequenceMode=Fw.prototype.setSequenceMode;Fw.prototype.parseInit=Fw.prototype.parseInit;jd["text/x-subviewer"]=function(){return new Fw};function Hw(){this.g=new sw}Hw.prototype.parseInit=function(){};Hw.prototype.setSequenceMode=function(){};Hw.prototype.parseMedia=function(a,b,c){a=Fc(a);a=Iw(a);a=Mb(Jc(a));return this.g.parseMedia(a,b,c)};function Iw(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}G("shaka.text.SrtTextParser",Hw);
965
+ Hw.srt2webvtt=Iw;Hw.prototype.parseMedia=Hw.prototype.parseMedia;Hw.prototype.setSequenceMode=Hw.prototype.setSequenceMode;Hw.prototype.parseInit=Hw.prototype.parseInit;jd["text/srt"]=function(){return new Hw};function Jw(){}Jw.prototype.parseInit=function(){};Jw.prototype.setSequenceMode=function(){};
966
+ Jw.prototype.parseMedia=function(a){var b="",c="";a=Fc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=Kw.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=Lw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Mw);else if("Style"==e){e=f.split(Mw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
967
+ [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Bd:e.Bd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Lw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Mw);else if("Dialogue"==f){g=g.split(Mw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Nw(f.Start);var k=Nw(f.End);g=new ob(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Bd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Bd}}(e)))&&Ow(g,f);d.push(g)}return d};
968
+ function Ow(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Pw(c))a.color=c;if(c=b.BackColour)if(c=Pw(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=wb;a.textAlign="start";break;case 2:a.displayAlign=wb;a.textAlign=sb;break;case 3:a.displayAlign=wb;a.textAlign="end";
969
+ break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=sb;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=sb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
970
+ function Pw(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 Nw(a){a=Qw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}G("shaka.text.SsaTextParser",Jw);Jw.prototype.parseMedia=Jw.prototype.parseMedia;Jw.prototype.setSequenceMode=Jw.prototype.setSequenceMode;Jw.prototype.parseInit=Jw.prototype.parseInit;
971
+ var Kw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Lw=/^\s*([^:]+):\s*(.*)/,Mw=/\s*,\s*/,Qw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;jd["text/x-ssa"]=function(){return new Jw};/*
970
972
  @license
971
973
  EME Encryption Scheme Polyfill
972
974
  Copyright 2019 Google LLC
973
975
  SPDX-License-Identifier: Apache-2.0
974
976
  */
975
- function Xw(){}var Yw;function Zw(){Yw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Yw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=$w):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
976
- function $w(a,b){var c=this,d;return D(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Yw.call(c,a,b),2);d=e.h;if(ax(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Yw,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=bx;return e.return(bx.call(c,
977
+ function Rw(){}var Sw;function Tw(){Sw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Sw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Uw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
978
+ function Uw(a,b){var c=this,d;return D(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Sw.call(c,a,b),2);d=e.h;if(Vw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Sw,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Ww;return e.return(Ww.call(c,
977
979
  a,b))})}
978
- function bx(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return D(function(q){if(1==q.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=cx(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=dx(h.videoCapabilities,d),l=dx(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."),
979
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(q,Yw.call(c,a,e),2)}p=q.h;return q.return(new ex(p,d))})}function dx(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}G("EmeEncryptionSchemePolyfill",Xw);Xw.install=Zw;function fx(){}var gx;
980
- function hx(){gx?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(gx=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=ix):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
981
- function ix(a){var b=this,c,d,e;return D(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,gx.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&ax(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=gx,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
982
- navigator.mediaCapabilities.decodingInfo=jx;if(d){f.B(3);break}e=c;return u(f,kx(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(jx.call(b,a))}})}
983
- function jx(a){var b=this,c,d,e,f,g,h,k,l;return D(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=cx(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):u(m,gx.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
984
- new ex(k.keySystemAccess,c);m.B(3);break}if(!a.keySystemConfiguration){m.B(3);break}l=k;return u(m,kx(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
985
- function kx(a){var b,c;return D(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,
986
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}G("McEncryptionSchemePolyfill",fx);fx.install=hx;function ex(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
987
- ex.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};ex.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
988
- function cx(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function ax(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}
989
- function lx(){}function ou(){Zw();hx()}G("EncryptionSchemePolyfills",lx);lx.install=ou;"undefined"!==typeof module&&module.exports&&(module.exports=lx);}).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})();
980
+ function Ww(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return D(function(q){if(1==q.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Xw(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Yw(h.videoCapabilities,d),l=Yw(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."),
981
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(q,Sw.call(c,a,e),2)}p=q.h;return q.return(new Zw(p,d))})}function Yw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}G("EmeEncryptionSchemePolyfill",Rw);Rw.install=Tw;function $w(){}var ax;
982
+ function bx(){ax?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(ax=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=cx):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
983
+ function cx(a){var b=this,c,d,e;return D(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,ax.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&Vw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=ax,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
984
+ navigator.mediaCapabilities.decodingInfo=dx;if(d){f.B(3);break}e=c;return u(f,ex(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(dx.call(b,a))}})}
985
+ function dx(a){var b=this,c,d,e,f,g,h,k,l;return D(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=Xw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):u(m,ax.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
986
+ new Zw(k.keySystemAccess,c);m.B(3);break}if(!a.keySystemConfiguration){m.B(3);break}l=k;return u(m,ex(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
987
+ function ex(a){var b,c;return D(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,
988
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}G("McEncryptionSchemePolyfill",$w);$w.install=bx;function Zw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
989
+ Zw.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};Zw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
990
+ function Xw(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Vw(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}
991
+ function fx(){}function mu(){Tw();bx()}G("EncryptionSchemePolyfills",fx);fx.install=mu;"undefined"!==typeof module&&module.exports&&(module.exports=fx);}).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})();
990
992
 
991
993
  //# sourceMappingURL=shaka-player.compiled.map