shaka-player 3.1.3 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/AUTHORS +3 -0
  2. package/CHANGELOG.md +175 -3
  3. package/CONTRIBUTORS +3 -0
  4. package/README.md +4 -4
  5. package/build/generateExterns.js +1 -1
  6. package/build/types/polyfill +1 -0
  7. package/demo/common/asset.js +9 -7
  8. package/demo/common/assets.js +11 -2
  9. package/demo/common/message_ids.js +2 -1
  10. package/demo/config.js +5 -2
  11. package/demo/index.html +1 -1
  12. package/demo/locales/en.json +2 -1
  13. package/demo/locales/source.json +8 -4
  14. package/demo/main.js +2 -1
  15. package/dist/controls.css +2 -2
  16. package/dist/controls.css.map +1 -1
  17. package/dist/demo.compiled.debug.js +15 -15
  18. package/dist/demo.compiled.debug.map +2 -2
  19. package/dist/demo.compiled.js +15 -15
  20. package/dist/demo.compiled.map +2 -2
  21. package/dist/deps.js +22 -21
  22. package/dist/locales.js +36 -36
  23. package/dist/receiver.compiled.debug.js +9 -9
  24. package/dist/receiver.compiled.debug.map +2 -2
  25. package/dist/receiver.compiled.js +9 -9
  26. package/dist/receiver.compiled.map +2 -2
  27. package/dist/shaka-player.compiled.d.ts +58 -10
  28. package/dist/shaka-player.compiled.debug.d.ts +58 -10
  29. package/dist/shaka-player.compiled.debug.externs.js +777 -717
  30. package/dist/shaka-player.compiled.debug.js +639 -607
  31. package/dist/shaka-player.compiled.debug.map +4 -4
  32. package/dist/shaka-player.compiled.externs.js +777 -717
  33. package/dist/shaka-player.compiled.js +826 -819
  34. package/dist/shaka-player.compiled.map +4 -4
  35. package/dist/shaka-player.ui.d.ts +58 -10
  36. package/dist/shaka-player.ui.debug.d.ts +58 -10
  37. package/dist/shaka-player.ui.debug.externs.js +529 -469
  38. package/dist/shaka-player.ui.debug.js +676 -645
  39. package/dist/shaka-player.ui.debug.map +4 -4
  40. package/dist/shaka-player.ui.externs.js +529 -469
  41. package/dist/shaka-player.ui.js +963 -955
  42. package/dist/shaka-player.ui.map +4 -4
  43. package/docs/tutorials/fairplay.md +1 -1
  44. package/docs/tutorials/ui.md +5 -5
  45. package/externs/aria.js +6 -0
  46. package/externs/shaka/ads.js +24 -1
  47. package/externs/shaka/manifest.js +6 -1
  48. package/externs/shaka/offline.js +5 -0
  49. package/externs/shaka/player.js +53 -9
  50. package/externs/shaka/text.js +10 -10
  51. package/externs/texttrack.js +3 -0
  52. package/karma.conf.js +1 -0
  53. package/lib/ads/ad_manager.js +16 -15
  54. package/lib/ads/client_side_ad_manager.js +52 -88
  55. package/lib/ads/server_side_ad_manager.js +26 -12
  56. package/lib/cast/cast_proxy.js +11 -2
  57. package/lib/cast/cast_receiver.js +2 -1
  58. package/lib/cast/cast_sender.js +2 -2
  59. package/lib/cast/cast_utils.js +6 -1
  60. package/lib/cea/cea608_data_channel.js +56 -56
  61. package/lib/cea/cea608_memory.js +33 -33
  62. package/lib/cea/cea708_service.js +43 -43
  63. package/lib/cea/cea708_window.js +38 -38
  64. package/lib/cea/cea_decoder.js +13 -14
  65. package/lib/cea/cea_utils.js +23 -23
  66. package/lib/cea/dtvcc_packet_builder.js +7 -7
  67. package/lib/cea/i_caption_decoder.js +2 -3
  68. package/lib/cea/i_cea_parser.js +2 -2
  69. package/lib/cea/mp4_cea_parser.js +6 -6
  70. package/lib/dash/dash_parser.js +98 -2
  71. package/lib/dash/segment_list.js +1 -1
  72. package/lib/dash/segment_template.js +1 -1
  73. package/lib/hls/hls_parser.js +159 -29
  74. package/lib/media/closed_caption_parser.js +1 -2
  75. package/lib/media/drm_engine.js +169 -192
  76. package/lib/media/gap_jumping_controller.js +4 -2
  77. package/lib/media/media_source_engine.js +1 -2
  78. package/lib/media/segment_index.js +3 -1
  79. package/lib/media/segment_reference.js +19 -2
  80. package/lib/media/streaming_engine.js +8 -7
  81. package/lib/net/networking_engine.js +3 -1
  82. package/lib/offline/download_manager.js +1 -2
  83. package/lib/offline/indexeddb/v1_storage_cell.js +1 -0
  84. package/lib/offline/indexeddb/v2_storage_cell.js +1 -0
  85. package/lib/offline/manifest_converter.js +3 -1
  86. package/lib/offline/storage.js +12 -14
  87. package/lib/player.js +437 -167
  88. package/lib/polyfill/aria.js +82 -0
  89. package/lib/polyfill/media_capabilities.js +7 -1
  90. package/lib/polyfill/mediasource.js +6 -0
  91. package/lib/polyfill/orientation.js +1 -1
  92. package/lib/polyfill/patchedmediakeys_apple.js +4 -4
  93. package/lib/polyfill/patchedmediakeys_ms.js +4 -4
  94. package/lib/polyfill/patchedmediakeys_webkit.js +4 -4
  95. package/lib/routing/walker.js +2 -3
  96. package/lib/text/mp4_ttml_parser.js +3 -0
  97. package/lib/text/srt_text_parser.js +4 -4
  98. package/lib/text/text_engine.js +16 -4
  99. package/lib/text/ttml_text_parser.js +5 -0
  100. package/lib/text/ui_text_displayer.js +85 -37
  101. package/lib/text/vtt_text_parser.js +2 -2
  102. package/lib/text/web_vtt_generator.js +55 -12
  103. package/lib/util/error.js +6 -0
  104. package/lib/util/fake_event.js +53 -7
  105. package/lib/util/manifest_parser_utils.js +1 -0
  106. package/lib/util/mp4_box_parsers.js +20 -20
  107. package/lib/util/multi_map.js +8 -0
  108. package/lib/util/periods.js +4 -1
  109. package/lib/util/platform.js +13 -1
  110. package/lib/util/player_configuration.js +13 -1
  111. package/lib/util/stream_utils.js +153 -85
  112. package/lib/util/xml_utils.js +31 -12
  113. package/package.json +1 -1
  114. package/roadmap.md +24 -22
  115. package/shaka-player.uncompiled.js +1 -0
  116. package/test/cast/cast_proxy_unit.js +12 -6
  117. package/test/cast/cast_utils_unit.js +2 -1
  118. package/test/cea/cea608_memory_unit.js +1 -1
  119. package/test/cea/cea708_service_unit.js +8 -8
  120. package/test/cea/cea708_window_unit.js +6 -6
  121. package/test/cea/cea_decoder_unit.js +1 -1
  122. package/test/cea/dtvcc_packet_builder_unit.js +2 -2
  123. package/test/dash/dash_parser_manifest_unit.js +230 -2
  124. package/test/hls/hls_parser_unit.js +255 -1
  125. package/test/media/closed_caption_parser_unit.js +6 -1
  126. package/test/media/drm_engine_integration.js +86 -12
  127. package/test/media/drm_engine_unit.js +353 -450
  128. package/test/offline/manifest_convert_unit.js +2 -0
  129. package/test/offline/storage_integration.js +9 -19
  130. package/test/player_integration.js +90 -0
  131. package/test/player_src_equals_integration.js +52 -0
  132. package/test/player_unit.js +11 -33
  133. package/test/test/assets/3675/chunk-stream0-00001.m4s +0 -0
  134. package/test/test/assets/3675/chunk-stream0-00002.m4s +0 -0
  135. package/test/test/assets/3675/chunk-stream0-00003.m4s +0 -0
  136. package/test/test/assets/3675/chunk-stream0-00004.m4s +0 -0
  137. package/test/test/assets/3675/chunk-stream0-00005.m4s +0 -0
  138. package/test/test/assets/3675/chunk-stream0-00006.m4s +0 -0
  139. package/test/test/assets/3675/chunk-stream0-00007.m4s +0 -0
  140. package/test/test/assets/3675/dash_0.mpd +30 -0
  141. package/test/test/assets/3675/dash_1.mpd +30 -0
  142. package/test/test/assets/3675/dash_2.mpd +30 -0
  143. package/test/test/assets/3675/dash_3.mpd +30 -0
  144. package/test/test/assets/3675/dash_4.mpd +30 -0
  145. package/test/test/assets/3675/dash_5.mpd +26 -0
  146. package/test/test/assets/3675/init-stream0.m4s +0 -0
  147. package/test/test/assets/chapters.srt +11 -0
  148. package/test/test/assets/chapters.vtt +10 -0
  149. package/test/test/util/cea_utils.js +12 -12
  150. package/test/test/util/fake_ad_manager.js +8 -1
  151. package/test/test/util/manifest_generator.js +2 -0
  152. package/test/test/util/manifest_parser_util.js +3 -1
  153. package/test/text/ttml_text_parser_unit.js +9 -0
  154. package/test/text/ui_text_displayer_unit.js +29 -17
  155. package/test/text/web_vtt_generator_unit.js +81 -7
  156. package/test/ui/localization_unit.js +15 -14
  157. package/test/ui/text_displayer_layout_unit.js +13 -1
  158. package/test/util/stream_utils_unit.js +153 -10
  159. package/ui/airplay_button.js +1 -1
  160. package/ui/audio_language_selection.js +2 -5
  161. package/ui/cast_button.js +6 -9
  162. package/ui/constants.js +0 -3
  163. package/ui/controls.js +4 -6
  164. package/ui/fast_forward_button.js +2 -3
  165. package/ui/fullscreen_button.js +1 -3
  166. package/ui/language_utils.js +1 -1
  167. package/ui/less/containers.less +3 -7
  168. package/ui/locales/ru.json +6 -6
  169. package/ui/localization.js +28 -51
  170. package/ui/loop_button.js +1 -3
  171. package/ui/mute_button.js +1 -3
  172. package/ui/overflow_menu.js +2 -3
  173. package/ui/pip_button.js +7 -10
  174. package/ui/playback_rate_selection.js +3 -6
  175. package/ui/presentation_time.js +1 -3
  176. package/ui/resolution_selection.js +4 -7
  177. package/ui/rewind_button.js +2 -3
  178. package/ui/seek_bar.js +2 -4
  179. package/ui/spacer.js +1 -1
  180. package/ui/text_selection.js +8 -11
  181. package/ui/ui_utils.js +1 -1
  182. package/ui/volume_bar.js +1 -3
@@ -9,868 +9,875 @@
9
9
  Copyright The Closure Library Authors.
10
10
  SPDX-License-Identifier: Apache-2.0
11
11
  */
12
- var q;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};
13
- function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=ca(this);function fa(a,b){if(b)a:{for(var c=ea,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];if(!(f in c))break a;c=c[f]}d=d[d.length-1];e=c[d];f=b(e);f!=e&&null!=f&&ba(c,d,{configurable:!0,writable:!0,value:f})}}
14
- fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
15
- fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
- function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ia(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
17
- if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ka;
18
- function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.xg=b.prototype}function qa(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function ra(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}qa.prototype.u=function(a){this.h=a};
19
- function sa(a,b){a.i={Yd:b,ce:!0};a.g=a.m||a.j}qa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function v(a,b,c){a.g=c;return{value:b}}qa.prototype.v=function(a){this.g=a};function z(a){a.g=0}function B(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ta(a){a.m=0;a.j=2}function ua(a,b){a.g=b;a.m=0}function va(a){a.m=0;var b=a.i.Yd;a.i=null;return b}function wa(a){a.C=[a.i];a.m=0;a.j=0}
20
- function xa(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.ce?a.g=a.m||a.j:void 0!=c.v&&a.j<c.v?(a.g=c.v,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new qa;this.h=a}function za(a,b){ra(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ba(a)}
21
- function Aa(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.s=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(a.g,g),Ba(a)}a.g.l=null;d.call(a.g,f);return Ba(a)}
22
- function Ba(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.ce)throw b.Yd;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
- function Ca(a){this.next=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Ba(a));return b};this["throw"]=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l["throw"],b,a.g.u):(sa(a.g,b),b=Ba(a));return b};this["return"]=function(b){return za(a,b)};this[Symbol.iterator]=function(){return this}}function Ea(a,b){var c=new Ca(new ya(b));oa&&a.prototype&&oa(c,a.prototype);return c}
24
- function Fa(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function F(a){return Fa(new Ca(new ya(a)))}
25
- fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.s=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=ea.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
26
- 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.I),reject:g(this.l)}};b.prototype.I=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.N(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.H(g):this.m(g)}};
27
- b.prototype.H=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.S(h,g):this.m(g)};b.prototype.l=function(g){this.u(2,g)};b.prototype.m=function(g){this.u(1,g)};b.prototype.u=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.L();this.C()};b.prototype.L=function(){var g=this;e(function(){if(g.F()){var h=ea.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
28
- function(){if(this.s)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.C=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
29
- b.prototype.N=function(g){var h=this.j();g.tc(h.resolve,h.reject)};b.prototype.S=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,r){return"function"==typeof p?function(u){try{l(p(u))}catch(x){m(x)}}:r}var l,m,n=new b(function(p,r){l=p;m=r});this.tc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.tc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
- break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.s=!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).tc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(x){p[u]=x;r--;0==r&&l(p)}}var p=[],r=0;do p.push(void 0),r++,d(k.value).tc(n(p.length-1),m),k=h.next();
31
- while(!k.done)})};return b});function Ga(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
- fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ga(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
33
- m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ga(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ga(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
34
- Ga(k,g)&&Ga(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ga(k,g)&&Ga(k[g],this.g)?delete k[g][this.g]:!1};return b});
35
- fa("Map",function(a){function b(){var h={};return h.Sa=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.Sa;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&&Ga(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,ga:p}}return{id:l,
36
- list:m,index:-1,ga:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
37
- "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ga?l.ga.value=k:(l.ga={next:this.g,Sa:this.g.Sa,head:this.g,key:h,value:k},l.list.push(l.ga),this.g.Sa.next=l.ga,this.g.Sa=l.ga,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.ga&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ga.Sa.next=h.ga.next,h.ga.next.Sa=h.ga.Sa,
38
- h.ga.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Sa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ga};e.prototype.get=function(h){return(h=d(this,h).ga)&&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(),
12
+ var q;function ca(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var da="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};
13
+ function ea(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=ea(this);function ha(a,b){if(b)a:{for(var c=fa,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];if(!(f in c))break a;c=c[f]}d=d[d.length-1];e=c[d];f=b(e);f!=e&&null!=f&&da(c,d,{configurable:!0,writable:!0,value:f})}}
14
+ 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;da(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
15
+ 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]&&da(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(ca(this))}})}return a});function ia(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
+ function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:ca(a)}}function ja(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ka="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},la;
17
+ if("function"==typeof Object.setPrototypeOf)la=Object.setPrototypeOf;else{var ma;a:{var na={a:!0},oa={};try{oa.__proto__=na;ma=oa.a;break a}catch(a){}ma=!1}la=ma?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=la;
18
+ function ra(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(qa)qa(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.Cg=b.prototype}function sa(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.D=this.i=null}function ta(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}sa.prototype.u=function(a){this.h=a};
19
+ function ua(a,b){a.i={ae:b,ge:!0};a.g=a.m||a.j}sa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function v(a,b,c){a.g=c;return{value:b}}sa.prototype.v=function(a){this.g=a};function z(a){a.g=0}function A(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function va(a){a.m=0;a.j=2}function wa(a,b){a.g=b;a.m=0}function E(a){a.m=0;var b=a.i.ae;a.i=null;return b}function xa(a){a.D=[a.i];a.m=0;a.j=0}
20
+ function Aa(a,b){var c=a.D.splice(0)[0];(c=a.i=a.i||c)?c.ge?a.g=a.m||a.j:void 0!=c.v&&a.j<c.v?(a.g=c.v,a.i=null):a.g=a.j:a.g=b}function Ba(a){this.g=new sa;this.h=a}function Da(a,b){ta(a.g);var c=a.g.l;if(c)return Ea(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Fa(a)}
21
+ function Ea(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.s=!1,e;var f=e.value}catch(g){return a.g.l=null,ua(a.g,g),Fa(a)}a.g.l=null;d.call(a.g,f);return Fa(a)}
22
+ function Fa(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ua(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.ge)throw b.ae;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
+ function Ha(a){this.next=function(b){ta(a.g);a.g.l?b=Ea(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Fa(a));return b};this["throw"]=function(b){ta(a.g);a.g.l?b=Ea(a,a.g.l["throw"],b,a.g.u):(ua(a.g,b),b=Fa(a));return b};this["return"]=function(b){return Da(a,b)};this[Symbol.iterator]=function(){return this}}function Ia(a,b){var c=new Ha(new Ba(b));qa&&a.prototype&&qa(c,a.prototype);return c}
24
+ 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())})}function K(a){return Ja(new Ha(new Ba(a)))}
25
+ ha("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.s=!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=
26
+ g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.I),reject:g(this.l)}};b.prototype.I=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.O(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.H(g):this.m(g)}};
27
+ b.prototype.H=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.T(h,g):this.m(g)};b.prototype.l=function(g){this.u(2,g)};b.prototype.m=function(g){this.u(1,g)};b.prototype.u=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.L();this.D()};b.prototype.L=function(){var g=this;e(function(){if(g.F()){var h=fa.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
28
+ function(){if(this.s)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.D=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
29
+ b.prototype.O=function(g){var h=this.j();g.wc(h.resolve,h.reject)};b.prototype.T=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,r){return"function"==typeof p?function(u){try{l(p(u))}catch(y){m(y)}}:r}var l,m,n=new b(function(p,r){l=p;m=r});this.wc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.wc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
+ break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.s=!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).wc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(y){p[u]=y;r--;0==r&&l(p)}}var p=[],r=0;do p.push(void 0),r++,d(k.value).wc(n(p.length-1),m),k=h.next();
31
+ while(!k.done)})};return b});function Ka(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
+ 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(!Ka(k,g)){var l=new c;da(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
33
+ m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ka(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ka(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
34
+ Ka(k,g)&&Ka(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ka(k,g)&&Ka(k[g],this.g)?delete k[g][this.g]:!1};return b});
35
+ 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 ia(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&&Ka(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,ia:p}}return{id:l,
36
+ 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||
37
+ "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.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,
38
+ 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(),
39
39
  m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
40
- fa("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
40
+ 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||
41
41
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
42
- b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});
43
- function Ha(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+""}fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ha(this,b,"includes").indexOf(b,c||0)}});
44
- function La(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{ha:e,we:f}}return{ha:-1,we:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return La(this,b,c).ha}});function Ma(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}
45
- fa("Array.prototype.values",function(a){return a?a:function(){return Ma(this,function(b,c){return c})}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return La(this,b,c).we}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Ha(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});fa("Array.prototype.keys",function(a){return a?a:function(){return Ma(this,function(b){return b})}});
46
- var Na="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ga(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||Na});
47
- fa("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}});
48
- fa("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;})})}});fa("Array.prototype.entries",function(a){return a?a:function(){return Ma(this,function(b,c){return[b,c]})}});
49
- fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Ha(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}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ga(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
50
- fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ga(b,d)&&c.push([d,b[d]]);return c}});var Oa=this||self;function J(a,b){var c=a.split("."),d=Oa;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
42
+ b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function La(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{ga:e,Ae:f}}return{ga:-1,Ae:void 0}}ha("Array.prototype.findIndex",function(a){return a?a:function(b,c){return La(this,b,c).ga}});
43
+ ha("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});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,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});
44
+ function Ma(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}ha("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ma(this,b,"includes").indexOf(b,c||0)}});ha("Array.prototype.find",function(a){return a?a:function(b,c){return La(this,b,c).Ae}});
45
+ ha("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Ma(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});function Na(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}
46
+ ha("Array.prototype.keys",function(a){return a?a:function(){return Na(this,function(b){return b})}});var Oa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ka(d,e)&&(a[e]=d[e])}return a};ha("Object.assign",function(a){return a||Oa});
47
+ 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 Na(this,function(b,c){return c})}});
48
+ 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;})})}});ha("Array.prototype.entries",function(a){return a?a:function(){return Na(this,function(b,c){return[b,c]})}});
49
+ ha("String.prototype.repeat",function(a){return a?a:function(b){var c=Ma(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ha("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ka(b,d)&&c.push(b[d]);return c}});ha("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
50
+ ha("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ka(b,d)&&c.push([d,b[d]]);return c}});var Pa=this||self;function M(a,b){var c=a.split("."),d=Pa;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
51
51
  @license
52
52
  Shaka Player
53
53
  Copyright 2016 Google LLC
54
54
  SPDX-License-Identifier: Apache-2.0
55
55
  */
56
- function Pa(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}function Qa(a,b,c){var d=Math.pow(a.i,b);c=c*(1-d)+d*a.g;isNaN(c)||(a.g=c,a.h+=b)}function Ra(a){return a.g/(1-Math.pow(a.i,a.h))};function Sa(){this.h=new Pa(2);this.i=new Pa(5);this.g=0}Sa.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(Ra(this.h),Ra(this.i))};function Ta(){}function Ua(){}function Va(){}function Wa(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];Ya.has(a)||(Ya.add(a),Va.apply(Ta,ia(c)))}function Za(){}function $a(){}function ab(){}function eb(){}var Ya=new Set;
57
- if(window.console&&window.console.log.bind){var fb={},gb=(fb[1]=console.error.bind(console),fb[2]=console.warn.bind(console),fb[3]=console.info.bind(console),fb[4]=console.log.bind(console),fb[5]=console.debug.bind(console),fb[6]=console.debug.bind(console),fb);Va=gb[2];Ua=gb[1]};function hb(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function ib(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}
58
- var kb=function jb(a){var c;return Ea(jb,function(d){1==d.g&&(c=0);if(3!=d.g)return c<a?v(d,c,3):d.v(0);c++;return d.v(2)})},mb=function lb(a){var c,d,e,f,g,h;return Ea(lb,function(k){1==k.g&&(c=-1,e=d=void 0,f=t(a),g=f.next());if(5!=k.g){if(g.done)return-1==c?k.v(0):v(k,{ha:c,uf:d,item:e,next:void 0},0);h=g.value;return 0<=c?v(k,{ha:c,item:e,uf:d,next:h},5):k.v(5)}c++;d=e;e=h;g=f.next();return k.v(2)})};function nb(){}function ob(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(pb(a)==pb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=qb(a),d=qb(b),e=t(kb(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}function pb(a){return a instanceof ArrayBuffer?a:a.buffer}function rb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
59
- function qb(a,b,c){c=void 0===c?Infinity:c;return sb(a,void 0===b?0:b,c,Uint8Array)}function tb(a,b,c){c=void 0===c?Infinity:c;return sb(a,void 0===b?0:b,c,DataView)}function sb(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(pb(a),b,Math.min(b+Math.max(c,0),e)-b)}J("shaka.util.BufferUtils",nb);nb.toDataView=tb;nb.toUint8=qb;nb.toArrayBuffer=rb;nb.equal=ob;function M(a,b,c,d){for(var e=[],f=3;f<arguments.length;++f)e[f-3]=arguments[f];this.severity=a;this.category=b;this.code=c;this.data=e;this.handled=!1}M.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};J("shaka.util.Error",M);M.Severity={RECOVERABLE:1,CRITICAL:2};M.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
60
- M.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,
56
+ function Qa(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}function Ra(a,b,c){var d=Math.pow(a.i,b);c=c*(1-d)+d*a.g;isNaN(c)||(a.g=c,a.h+=b)}function Sa(a){return a.g/(1-Math.pow(a.i,a.h))};function Ua(){this.h=new Qa(2);this.i=new Qa(5);this.g=0}Ua.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(Sa(this.h),Sa(this.i))};function Va(){}function Wa(){}function Xa(){}function Ya(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];Za.has(a)||(Za.add(a),Xa.apply(Va,ja(c)))}function $a(){}function ab(){}function bb(){}function cb(){}var Za=new Set;
57
+ if(window.console&&window.console.log.bind){var db={},fb=(db[1]=console.error.bind(console),db[2]=console.warn.bind(console),db[3]=console.info.bind(console),db[4]=console.log.bind(console),db[5]=console.debug.bind(console),db[6]=console.debug.bind(console),db);Xa=fb[2];Wa=fb[1]};function gb(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function hb(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}
58
+ var jb=function ib(a){var c;return Ia(ib,function(d){1==d.g&&(c=0);if(3!=d.g)return c<a?v(d,c,3):d.v(0);c++;return d.v(2)})},lb=function kb(a){var c,d,e,f,g,h;return Ia(kb,function(k){1==k.g&&(c=-1,e=d=void 0,f=t(a),g=f.next());if(5!=k.g){if(g.done)return-1==c?k.v(0):v(k,{ga:c,Df:d,item:e,next:void 0},0);h=g.value;return 0<=c?v(k,{ga:c,item:e,Df:d,next:h},5):k.v(5)}c++;d=e;e=h;g=f.next();return k.v(2)})};function mb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function nb(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function ob(a,b,c){c||(c=mb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Vc:d.Vc},e=a.next()){d.Vc=e.value;e=b.findIndex(function(f){return function(g){return c(f.Vc,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
59
+ function pb(a,b,c){c||(c=mb);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 qb(a,b,c){this.startTime=a;this.direction=rb;this.endTime=b;this.payload=c;this.region=new sb;this.position=null;this.positionAlign=tb;this.size=0;this.textAlign=ub;this.writingMode=vb;this.lineInterpretation=wb;this.line=null;this.lineHeight="";this.lineAlign=xb;this.displayAlign=yb;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=zb;this.fontStyle=Ab;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
60
+ [];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=!1;this.cellResolution={columns:32,rows:15}}qb.prototype.clone=function(){var a=new qb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
61
+ function Bb(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(!pb(a.nestedCues,b.nestedCues,Bb))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(!pb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}M("shaka.text.Cue",qb);var tb="auto";
62
+ qb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:tb};var ub="center",Db={LEFT:"left",RIGHT:"right",CENTER:ub,START:"start",END:"end"};qb.textAlign=Db;var yb="after",Eb={BEFORE:"before",CENTER:"center",AFTER:yb};qb.displayAlign=Eb;var rb="ltr";qb.direction={HORIZONTAL_LEFT_TO_RIGHT:rb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var vb="horizontal-tb";qb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:vb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var wb=0;
63
+ qb.lineInterpretation={LINE_NUMBER:wb,PERCENTAGE:1};var xb="start",Fb={CENTER:"center",START:xb,END:"end"};qb.lineAlign=Fb;var Gb={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};qb.defaultTextColor=Gb;var Hb={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};qb.defaultTextBackgroundColor=Hb;var zb=400;qb.fontWeight={NORMAL:zb,BOLD:700};
64
+ var Ab="normal",Ib={NORMAL:Ab,ITALIC:"italic",OBLIQUE:"oblique"};qb.fontStyle=Ib;qb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function sb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Jb;this.scroll=Kb}M("shaka.text.CueRegion",sb);var Jb=1;sb.units={PX:0,PERCENTAGE:Jb,LINES:2};var Kb="";sb.scrollMode={NONE:Kb,UP:"up"};function Lb(){}function Mb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Nb(a)==Nb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Ob(a),d=Ob(b),e=t(jb(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}function Nb(a){return a instanceof ArrayBuffer?a:a.buffer}function Pb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
65
+ function Ob(a,b,c){c=void 0===c?Infinity:c;return Qb(a,void 0===b?0:b,c,Uint8Array)}function Rb(a,b,c){c=void 0===c?Infinity:c;return Qb(a,void 0===b?0:b,c,DataView)}function Qb(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Nb(a),b,Math.min(b+Math.max(c,0),e)-b)}M("shaka.util.BufferUtils",Lb);Lb.toDataView=Rb;Lb.toUint8=Ob;Lb.toArrayBuffer=Pb;Lb.equal=Mb;function Sb(a,b){this.g=a;this.h=b}Sb.prototype.toString=function(){return"v"+this.g+"."+this.h};function Tb(a,b){var c=new Sb(4,0),d=Ub,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Vb(a,b,c,d){Xa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Wb(a,b,c,d){Wa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Ub=null;function Xb(a,b){return a.concat(b)}function Yb(){}function Zb(a){return null!=a}function $b(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(Tb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){Tb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function ac(){}M("shaka.dependencies",ac);ac.has=function(a){return bc.has(a)};ac.add=function(a,b){if(!cc[a])throw Error(a+" is not supported");bc.set(a,function(){return b})};var cc={muxjs:"muxjs"};ac.Allowed=cc;var bc=new Map([["muxjs",function(){return window.muxjs}]]);function N(a,b,c,d){for(var e=[],f=3;f<arguments.length;++f)e[f-3]=arguments[f];this.severity=a;this.category=b;this.code=c;this.data=e;this.handled=!1}N.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};M("shaka.util.Error",N);N.Severity={RECOVERABLE:1,CRITICAL:2};N.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
66
+ N.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,
61
67
  TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,
62
68
  MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,
63
69
  HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,
64
70
  HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,
65
- ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,
66
- INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function ub(a){this.h=a;this.g=void 0}ub.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function vb(){}function wb(a){if(!a)return"";a=qb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=(new TextDecoder).decode(a);a.includes("\ufffd")&&Ua('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!');return a}
67
- function xb(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new M(2,2,2004);var d=Math.floor(a.byteLength/2);c=new Uint16Array(d);a=tb(a);d=t(kb(d));for(var e=d.next();!e.done;e=d.next())e=e.value,c[e]=a.getUint16(2*e,b);return yb.value()(c)}
68
- function zb(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=qb(a);if(239==c[0]&&187==c[1]&&191==c[2])return wb(c);if(254==c[0]&&255==c[1])return xb(c.subarray(2),!1);if(255==c[0]&&254==c[1])return xb(c.subarray(2),!0);if(0==c[0]&&0==c[2])return xb(a,!1);if(0==c[1]&&0==c[3])return xb(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return wb(a);throw new M(2,2,2003);}function Ab(a){var b=new TextEncoder;return rb(b.encode(a))}
69
- function Bb(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=t(mb(a)),f=e.next();!f.done;f=e.next())f=f.value,d.setUint16(2*f.ha,f.item.charCodeAt(0),b);return c}J("shaka.util.StringUtils",vb);vb.resetFromCharCode=function(){yb.g=void 0};vb.toUTF16=Bb;vb.toUTF8=Ab;vb.fromBytesAutoDetect=zb;vb.fromUTF16=xb;vb.fromUTF8=wb;
70
- var yb=new ub(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ua:65536};0<b.Ua;b={Ua:b.Ua},b.Ua/=2)if(a(b.Ua))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ua)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ua));return e}}(b);return null});function Cb(a,b){this.P=tb(a);this.h=b==Eb;this.g=0}q=Cb.prototype;q.na=function(){return this.g<this.P.byteLength};q.Z=function(){return this.g};q.Se=function(){return this.P.byteLength};q.$=function(){try{var a=this.P.getUint8(this.g);this.g+=1;return a}catch(b){throw Fb();}};q.Eb=function(){try{var a=this.P.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Fb();}};q.M=function(){try{var a=this.P.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Fb();}};
71
- q.je=function(){try{var a=this.P.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Fb();}};q.Fb=function(){try{if(this.h){var a=this.P.getUint32(this.g,!0);var b=this.P.getUint32(this.g+4,!0)}else b=this.P.getUint32(this.g,!1),a=this.P.getUint32(this.g+4,!1)}catch(c){throw Fb();}if(2097151<b)throw new M(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.$a=function(a){if(this.g+a>this.P.byteLength)throw Fb();var b=qb(this.P,this.g,a);this.g+=a;return b};
72
- q.skip=function(a){if(this.g+a>this.P.byteLength)throw Fb();this.g+=a};q.le=function(a){if(this.g<a)throw Fb();this.g-=a};q.seek=function(a){if(0>a||a>this.P.byteLength)throw Fb();this.g=a};q.$b=function(){for(var a=this.g;this.na()&&0!=this.P.getUint8(this.g);)this.g+=1;a=qb(this.P,a,this.g-a);this.g+=1;return wb(a)};function Fb(){return new M(2,3,3E3)}J("shaka.util.DataViewReader",Cb);Cb.prototype.readTerminatedString=Cb.prototype.$b;Cb.prototype.seek=Cb.prototype.seek;Cb.prototype.rewind=Cb.prototype.le;
73
- Cb.prototype.skip=Cb.prototype.skip;Cb.prototype.readBytes=Cb.prototype.$a;Cb.prototype.readUint64=Cb.prototype.Fb;Cb.prototype.readInt32=Cb.prototype.je;Cb.prototype.readUint32=Cb.prototype.M;Cb.prototype.readUint16=Cb.prototype.Eb;Cb.prototype.readUint8=Cb.prototype.$;Cb.prototype.getLength=Cb.prototype.Se;Cb.prototype.getPosition=Cb.prototype.Z;Cb.prototype.hasMoreData=Cb.prototype.na;var Eb=1;Cb.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Eb};function Gb(a,b){this.g=a;this.h=b}Gb.prototype.toString=function(){return"v"+this.g+"."+this.h};function Hb(a,b){var c=new Gb(4,0),d=Ib,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Jb(a,b,c,d){Va([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Kb(a,b,c,d){Ua([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Ib=null;function Lb(a,b){return a.concat(b)}function Mb(){}function Nb(a){return null!=a}function Ob(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(Hb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){Hb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Pb(){this.i=[];this.h=[];this.g=!1}q=Pb.prototype;q.box=function(a,b){var c=Qb(a);this.i[c]=Sb;this.h[c]=b;return this};q.T=function(a,b){var c=Qb(a);this.i[c]=Tb;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Cb(a,0);for(this.g=!1;a.na()&&!this.g;)this.Ic(0,a,b,c)};
74
- q.Ic=function(a,b,c,d){var e=b.Z();if(d&&e+8>b.P.byteLength)this.g=!0;else{var f=b.M(),g=b.M(),h=!1;switch(f){case 0:f=b.P.byteLength-e;break;case 1:if(d&&b.Z()+8>b.P.byteLength){this.g=!0;return}f=b.Fb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Tb){if(d&&b.Z()+4>b.P.byteLength){this.g=!0;return}m=b.M();l=m>>>24;m&=16777215}g=e+f;c&&g>b.P.byteLength&&(g=b.P.byteLength);d&&g>b.P.byteLength?this.g=!0:(d=g-b.Z(),b=0<d?b.$a(d):new Uint8Array(0),b=new Cb(b,0),k({parser:this,partialOkay:c||
75
- !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.Z(),b.P.byteLength-b.Z()))}};function Ub(a){for(var b=Vb(a);a.reader.na()&&!a.parser.g;)a.parser.Ic(a.start+b,a.reader,a.partialOkay)}function Wb(a){var b=Vb(a),c=a.reader.M();c=t(kb(c));for(var d=c.next();!d.done&&(a.parser.Ic(a.start+b,a.reader,a.partialOkay),!a.parser.g);d=c.next());}function Xb(a){return function(b){a(b.reader.$a(b.reader.P.byteLength-b.reader.Z()))}}
76
- function Qb(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 Yb(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Vb(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}J("shaka.util.Mp4Parser",Pb);Pb.headerSize=Vb;Pb.typeToString=Yb;Pb.allData=Xb;Pb.sampleDescription=Wb;Pb.children=Ub;Pb.prototype.parseNext=Pb.prototype.Ic;Pb.prototype.parse=Pb.prototype.parse;Pb.prototype.stop=Pb.prototype.stop;
77
- Pb.prototype.fullBox=Pb.prototype.T;Pb.prototype.box=Pb.prototype.box;var Sb=0,Tb=1;function Zb(a){this.h=a;this.g=null}Zb.prototype.U=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};Zb.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function N(a){this.h=a;this.g=null}N.prototype.dc=function(){this.stop();this.h();return this};N.prototype.U=function(a){var b=this;this.stop();this.g=(new Zb(function(){b.h()})).U(a);return this};N.prototype.Ca=function(a){var b=this;this.stop();this.g=(new Zb(function(){b.g.U(a);b.h()})).U(a);return this};N.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};J("shaka.util.Timer",N);N.prototype.stop=N.prototype.stop;N.prototype.tickEvery=N.prototype.Ca;N.prototype.tickAfter=N.prototype.U;
78
- N.prototype.tickNow=N.prototype.dc;function $b(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function ac(a){return""!=bc().canPlayType(a)}function cc(){return dc("Xbox One")}function ec(){return dc("Tizen")}function fc(){return dc("CrKey")}function gc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!ec()}function hc(){if(!gc())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}
79
- function dc(a){return(navigator.userAgent||"").includes(a)}function bc(){if(ic)return ic;jc||(jc=new N(function(){ic=null}));(ic=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(ic=document.createElement("video"));jc.U(1);return ic}var jc=null,ic=null;function kc(){}function lc(a){a=qb(a);a=yb.value()(a);return btoa(a)}function mc(a,b){b=void 0==b?!0:b;var c=lc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function nc(a){var b=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));a=new Uint8Array(b.length);b=t(mb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.ha]=c.item.charCodeAt(0);return a}
80
- function oc(a){var b=a.length/2,c=new Uint8Array(b);b=t(kb(b));for(var d=b.next();!d.done;d=b.next())d=d.value,c[d]=window.parseInt(a.substr(2*d,2),16);return c}function pc(a){var b=qb(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}
81
- function qc(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];var d=0,e=t(b);for(c=e.next();!c.done;c=e.next())d+=c.value.byteLength;d=new Uint8Array(d);e=0;b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,d.set(qb(c),e),e+=c.byteLength;return d}J("shaka.util.Uint8ArrayUtils",kc);kc.concat=qc;kc.toHex=pc;kc.fromHex=oc;kc.fromBase64=nc;kc.toBase64=mc;kc.toStandardBase64=lc;
82
- kc.equal=function(a,b){Hb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return ob(a,b)};function rc(a){function b(){d=!0}function c(l){f.push(l);Ub(l)}a=qb(a);var d=!1,e,f=[],g=[];(new Pb).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).T("stsd",function(l){e=l;f.push(l);Wb(l)}).T("encv",b).T("enca",b).T("avc1",function(l){g.push({box:l,Xb:1701733238})}).T("avc3",function(l){g.push({box:l,Xb:1701733238})}).T("ac-3",function(l){g.push({box:l,Xb:1701733217})}).T("ec-3",function(l){g.push({box:l,Xb:1701733217})}).T("mp4a",function(l){g.push({box:l,Xb:1701733217})}).parse(a);
83
- if(d)return a;if(0==g.length||!e)throw eb(pc(a)),new M(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=sc(a,e,k.box,f,k.Xb);return a}
84
- function sc(a,b,c,d,e){var f=tc.value(),g=a.subarray(c.start,c.start+c.size),h=tb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=tb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);uc(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=cc()?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,uc(e,d.start,d.size+k.byteLength);k=tb(e,b.start);b=Vb(b);a=k.getUint32(b);
85
- k.setUint32(b,a+1);return e}function uc(a,b,c){a=tb(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 tc=new ub(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 vc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function wc(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function xc(a,b,c){c||(c=vc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Sc:d.Sc},e=a.next()){d.Sc=e.value;e=b.findIndex(function(f){return function(g){return c(f.Sc,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
86
- function yc(a,b,c){c||(c=vc);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 zc(a,b,c){this.startTime=a;this.direction=Ac;this.endTime=b;this.payload=c;this.region=new Bc;this.position=null;this.positionAlign=Cc;this.size=0;this.textAlign=Dc;this.writingMode=Ec;this.lineInterpretation=Fc;this.line=null;this.lineHeight="";this.lineAlign=Gc;this.displayAlign=Hc;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Ic;this.fontStyle=Jc;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
87
- [];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=!1;this.cellResolution={columns:32,rows:15}}zc.prototype.clone=function(){var a=new zc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
88
- function Kc(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(!yc(a.nestedCues,b.nestedCues,Kc))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(!yc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}J("shaka.text.Cue",zc);var Cc="auto";
89
- zc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Cc};var Dc="center",Lc={LEFT:"left",RIGHT:"right",CENTER:Dc,START:"start",END:"end"};zc.textAlign=Lc;var Hc="after",Mc={BEFORE:"before",CENTER:"center",AFTER:Hc};zc.displayAlign=Mc;var Ac="ltr";zc.direction={HORIZONTAL_LEFT_TO_RIGHT:Ac,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Ec="horizontal-tb";zc.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Ec,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Fc=0;
90
- zc.lineInterpretation={LINE_NUMBER:Fc,PERCENTAGE:1};var Gc="start",Nc={CENTER:"center",START:Gc,END:"end"};zc.lineAlign=Nc;var Oc={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};zc.defaultTextColor=Oc;var Pc={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};zc.defaultTextBackgroundColor=Pc;var Ic=400;zc.fontWeight={NORMAL:Ic,BOLD:700};
91
- var Jc="normal",Qc={NORMAL:Jc,ITALIC:"italic",OBLIQUE:"oblique"};zc.fontStyle=Qc;zc.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function Bc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Rc;this.scroll=Sc}J("shaka.text.CueRegion",Bc);var Rc=1;Bc.units={PX:0,PERCENTAGE:Rc,LINES:2};var Sc="";Bc.scrollMode={NONE:Sc,UP:"up"};function Tc(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Uc(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,u=-1,x=0;x<p.length;x++)if(null!=p[x]&&""!==p[x].g.trim()){r=x;break}for(x=p.length-1;0<=x;x--)if(null!=p[x]&&""!==p[x].g.trim()){u=x;break}if(-1===
92
- r||-1===u)p=Vc(d,e),a.nestedCues.push(p);else{for(;r<=u;r++)if(x=p[r]){var w=x.l,y=x.i,C=x.j,D=x.h;if(w!=h||y!=k||C!=l||D!=m)n.payload&&a.nestedCues.push(n),n=Uc(d,e,w,y,C,D),h=w,k=y,l=C,m=D;n.payload+=x.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Vc(d,e),a.nestedCues.push(n));n=Uc(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
93
- function Uc(a,b,c,d,e,f){a=new zc(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Vc(a,b){var c=new zc(a,b,"");c.lineBreak=!0;return c}function Wc(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Xc(){this.l=!1;this.F=this.I=0;this.H=Yc;this.i=[];this.g=this.h=this.j=0;this.C=this.s=!1;this.u="white";this.m="black";Zc(this)}function Zc(a){a.i=[];for(var b=0;15>b;b++)a.i.push($c())}function $c(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function ad(a,b){bd(a)&&(a.i[a.h][a.g]=new Wc(b,a.C,a.s,a.m,a.u),a.g++)}function bd(a){var b=a.g<a.F&&0<=a.g;return a.h<a.I&&0<=a.h&&b}Xc.prototype.isVisible=function(){return this.l};
94
- function cd(a,b,c){var d=new zc(a.j,b,"");d.textAlign=a.H===dd?"left":a.H===ed?"right":Dc;if(c=Tc(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var dd=0,ed=1,Yc=2;function fd(){this.i=[];this.h=null;this.g=0}function gd(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 hd(a.h)),a.h=null,a.g=0))}function hd(a){this.g=0;this.h=a}hd.prototype.na=function(){return this.g<this.h.length};hd.prototype.Z=function(){return this.g};function id(a){if(!a.na())throw new M(2,2,3E3);return a.h[a.g++]}hd.prototype.skip=function(a){if(this.g+a>this.h.length)throw new M(2,2,3E3);this.g+=a};function jd(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
95
- function kd(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=id(b).value;b=null;c=t(ld(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=cd(e,d,a.i)),Zc(e);return b}if(137===c)for(b=id(b).value,b=t(ld(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=id(b).value;b=null;c=t(ld(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=cd(e,d,a.i)),e.l=!1;return b}if(139===c){c=id(b).value;
96
- b=null;c=t(ld(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=cd(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=id(b).value,md(a,b,d);if(143===c)return d=md(a,255,d),nd(a),d;if(144===c)b.skip(1),d=id(b).value,a.g&&(a.g.s=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=id(b).value,c=id(b).value,b.skip(1),a.g&&(b=od((c&48)>>4,(c&12)>>2,c&3),a.g.u=od((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=id(b).value,b=id(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
97
- b.skip(1),d=id(b).value,b.skip(1),a.g&&(a.g.H=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Xc;f.j=d;a.h[c]=f}d=id(b).value;id(b);id(b);f=id(b).value;var g=id(b).value;b=id(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.s=!1,b.u="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.I=(f&15)+1;b.F=(g&63)+1;a.g=a.h[c]}}}return null}
98
- var ld=function pd(a,b){var d,e;return Ea(pd,function(f){1==f.g&&(d=0);if(5!=f.g)return 8>d?(e=1===(b&1))&&a.h[d]?v(f,d,5):f.v(5):f.v(0);b>>=1;d++;return f.v(2)})};function md(a,b,c){var d=null;b=t(ld(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=cd(f,c,a.i));a.h[e]=null}return d}function nd(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function od(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return qd[a<<2|b<<1|c]}
99
- var rd=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"]]),qd="black blue green cyan red magenta yellow white".split(" ");function sd(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.u=b;this.j=this.m=!1;this.l="white";this.s="black";td(this)}function ud(a,b,c){return Tc(new zc(b,c,""),"CC"+(a.C<<1|a.u+1),a.i,b,c)}function td(a){vd(a,0,15);a.g=1}function wd(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case xd:d=yd.has(c)?yd.get(c):String.fromCharCode(c);break;case zd:d=Ad.get(c);break;case Bd:a.i[a.g].pop();d=Cd.get(c);break;case Dd:a.i[a.g].pop(),d=Ed.get(c)}d&&a.i[a.g].push(new Wc(d,a.m,a.j,a.s,a.l))}}
100
- function Fd(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function vd(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
101
- var xd=0,zd=1,Bd=2,Dd=3,yd=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"]]),Ad=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"]]),Cd=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
102
- [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"]]),Ed=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
103
- [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 Gd(a,b){this.h=Hd;this.s=new sd(a,b);this.i=new sd(a,b);this.l=new sd(a,b);this.g=this.i;this.j=0;this.m=null}function Id(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Jd&&a.h!==Kd&&(e=ud(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,vd(c,0,15),c=a.l,c.g=0<c.h?c.h:0,vd(c,0,15),d.g=15);a.h=Jd;d.h=b;return e}function Ld(a){a.h=Md;a.g=a.l;a.g.h=0}function Nd(a){Wa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.s;a.h=Kd}
104
- var Hd=0,Md=1,Jd=3,Kd=4,Od="black green blue cyan red yellow magenta black".split(" "),Pd="white green blue cyan red yellow magenta white_italics".split(" ");function Qd(){this.h=[];this.g=[];this.i=new fd;this.l=0;this.u=new Map([["CC1",new Gd(0,0)],["CC2",new Gd(0,1)],["CC3",new Gd(1,0)],["CC4",new Gd(1,1)]]);this.s=this.m=0;this.j=new Map;Rd(this)}function Rd(a){a.m=0;a.s=0;a=t(a.u.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,td(b.i),td(b.l),td(b.s)}
105
- function Sd(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=Td(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())gd(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=Ud(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
106
- function Td(a,b){var c=b.type;if(16===(b.Aa&112)){var d=b.Aa>>3&1;0===c?a.m=d:a.s=d}c=a.u.get("CC"+(c<<1|(c?a.s:a.m)+1));if(255===b.Aa&&255===b.Pa||!b.Aa&&!b.Pa||!Vd(b.Aa)||!Vd(b.Pa))return 45<=++a.l&&Rd(a),null;a.l=0;b.Aa&=127;b.Pa&=127;if(!b.Aa&&!b.Pa)return null;d=null;if(16===(b.Aa&112))a:{var e=b.Aa;d=b.Pa;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Pd[f]:7===f&&(h=!0);
107
- d=1===(d&1);if(c.h!==Kd){f=c.g;if(c.h===Jd&&e!==f.g){var k=1+e-f.h;Fd(f,k,1+f.g-f.h,f.h);vd(f,0,k-1);vd(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.s="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",wd(c.g,xd,32),g=!1,e=Pd[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=Od[(d&14)>>1]),c.g.s=g;else if(17===(e&247)&&48===(d&240))wd(c.g,zd,d);else if(18===
108
- (e&246)&&32===(d&224))wd(c.g,e&1?Dd:Bd,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Pa){case 32:Ld(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=Id(c,2,d);break;case 38:e=Id(c,3,d);break;case 39:e=Id(c,4,d);break;case 40:wd(c.g,xd,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:td(c.s);Nd(c);break;case 43:Nd(c);break;case 44:e=c.i;g=null;c.h!==Kd&&(g=ud(e,c.j,d));vd(e,0,15);e=g;break;case 45:e=c.g;c.h!==Jd?e=null:(g=ud(e,c.j,d),h=e.g-e.h+1,Fd(e,h-1,h,e.h),vd(e,
109
- 0,h-1),vd(e,e.g,15-e.g),c.j=d,e=g);break;case 46:vd(c.l,0,15);break;case 47:e=null,c.h!==Kd&&(e=ud(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Ld(c),c.j=d}d=e;break a}d=null}else e=b.Pa,wd(c.g,xd,b.Aa),wd(c.g,xd,e);return d}
110
- function Ud(a,b){var c=[];try{for(;b.na();){var d=id(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=id(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new jd(e));for(var g=a.j.get(e),h=b.Z();b.Z()-h<f;){e=b;var k=id(e),l=k.value,m=k.pts;if(16===l){var n=id(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var r=g.g;e=null;switch(l){case 8:!bd(r)||0>=r.g&&0>=r.h||(0>=r.g?(r.g=r.F-1,r.h--):r.g--,r.i[r.h][r.g]=null);break;case 13:r.isVisible()&&(e=cd(r,p,g.i));if(r.h+1>=r.I){p=r;for(var u=0,x=1;15>x;x++,
111
- u++)p.i[u]=p.i[x];for(x=0;1>x;x++,u++)p.i[u]=$c()}else r.h++;r.g=0;break;case 14:r.isVisible()&&(e=cd(r,p,g.i));r.i[r.h]=$c();r.g=0;break;case 12:r.isVisible()&&(e=cd(r,p,g.i)),Zc(r),p=r,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=kd(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?ad(g.g,"\u266a"):ad(g.g,
112
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&ad(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(rd.has(e)){var y=rd.get(e);ad(g.g,y)}else ad(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?ad(g.g,"_"):ad(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(C){if(C instanceof M&&3E3===C.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function Vd(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Wd(){}var Yd=function Xd(a,b){var d,e,f,g;return Ea(Xd,function(h){if(1==h.g){for(var k=b,l=0,m=0;m<k.length;)2==l&&3==k[m]?(l=0,k=[].concat(ia(k)),k.splice(m,1),k=new Uint8Array(k)):0==k[m]?l++:l=0,m++;d=k;e=0}if(4!=h.g){if(!(e<d.length))return h.v(0);for(f=0;255==d[e];)f+=255,e++;f+=d[e++];for(g=0;255==d[e];)g+=255,e++;g+=d[e++];return 4!=f?h.v(4):v(h,d.subarray(e,e+g),4)}e+=g;return h.v(2)})};function Zd(a,b){var c=null,d=null,e=a.M();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.M());b&16&&(d=a.M());return{trackId:e,Wd:c,Ke:d}}function $d(a,b){return{ed:1==b?a.Fb():a.M()}}function ae(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.M()}}
113
- function be(a,b,c){var d=a.M(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=t(kb(d)),g=f.next();!g.done;g=f.next())g={Fd:null,sampleSize:null,Kc:null},c&256&&(g.Fd=a.M()),c&512&&(g.sampleSize=a.M()),c&1024&&a.skip(4),c&2048&&(g.Kc=0==b?a.M():a.je()),e.push(g);return{wg:d,me:e}};function de(){this.j=new Wd;this.i=new Map;this.h=this.g=0}
114
- de.prototype.init=function(a){var b=this,c=[],d=[];(new Pb).box("moov",Ub).box("mvex",Ub).T("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.M();f=f.M();b.g=e;b.h=f}).box("trak",Ub).T("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.M();c.push(e)}).box("mdia",Ub).T("mdhd",function(e){e=ae(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new M(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
115
- de.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Pb).box("moof",Ub).box("traf",Ub).T("trun",function(k){f=be(k.reader,k.version,k.flags).me}).T("tfhd",function(k){k=Zd(k.reader,k.flags);d=k.Wd||b.g;e=k.Ke||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).T("tfdt",function(k){g=$d(k.reader,k.version).ed}).box("mdat",function(k){if(null===g)throw new M(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,r=f,u=0,x=p;for(r.length&&(x=r[0].sampleSize||p);k.na();){var w=k.M();if(6==
116
- (k.$()&31)){var y=0;r.length>u&&(y=r[u].Kc||0);y=(l+y)/m;for(var C=t(Yd(b.j,k.$a(w-1))),D=C.next();!D.done;D=C.next())c.push({sf:D.value,pts:y})}else k.skip(w-1);x-=w+4;0==x&&(l=r.length>u?l+(r[u].Fd||n):l+n,u++,x=r.length>u?r[u].sampleSize||p:p)}}).parse(a,!1);return c};function ee(){this.h=new de;this.g=new Qd}ee.prototype.init=function(a){this.h.init(a)};
117
- function fe(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=qb(e.sf);if(0<f.length&&(d=a.g,e=e.pts,f=new Cb(f,0),181===f.$()&&49===f.Eb()&&1195456820===f.M()&&3===f.$())){var g=f.$();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.$(),l=(k&4)>>2,m=f.$(),n=f.$();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Aa:m,Pa:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return Sd(a.g)}
118
- ;function ge(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function he(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function ie(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(je(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
119
- function ke(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=je(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function je(a){if(!a)return[];for(var b=[],c=t(kb(a.length)),d=c.next();!d.done;d=c.next())d=d.value,b.push({start:a.start(d),end:a.end(d)});return b};/*
71
+ ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,
72
+ STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};/*
120
73
  @license
121
74
  Copyright 2008 The Closure Library Authors
122
75
  SPDX-License-Identifier: Apache-2.0
123
76
  */
124
- var le=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;/*
77
+ var dc=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;/*
125
78
  @license
126
79
  Copyright 2006 The Closure Library Authors
127
80
  SPDX-License-Identifier: Apache-2.0
128
81
  */
129
- function me(a){var b;a instanceof me?(ne(this,a.Ea),this.ob=a.ob,this.Ga=a.Ga,oe(this,a.Db),this.xa=a.xa,pe(this,a.g.clone()),this.fb=a.fb):a&&(b=String(a).match(le))?(ne(this,b[1]||"",!0),this.ob=qe(b[2]||""),this.Ga=qe(b[3]||"",!0),oe(this,b[4]),this.xa=qe(b[5]||"",!0),pe(this,b[6]||"",!0),this.fb=qe(b[7]||"")):this.g=new re(null)}q=me.prototype;q.Ea="";q.ob="";q.Ga="";q.Db=null;q.xa="";q.fb="";
130
- q.toString=function(){var a=[],b=this.Ea;b&&a.push(se(b,te,!0),":");if(b=this.Ga){a.push("//");var c=this.ob;c&&a.push(se(c,te,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Db;null!=b&&a.push(":",String(b))}if(b=this.xa)this.Ga&&"/"!=b.charAt(0)&&a.push("/"),a.push(se(b,"/"==b.charAt(0)?ue:ve,!0));(b=this.g.toString())&&a.push("?",b);(b=this.fb)&&a.push("#",se(b,we));return a.join("")};
131
- q.resolve=function(a){var b=this.clone();"data"===b.Ea&&(b=new me);var c=!!a.Ea;c?ne(b,a.Ea):c=!!a.ob;c?b.ob=a.ob:c=!!a.Ga;c?b.Ga=a.Ga:c=null!=a.Db;var d=a.xa;if(c)oe(b,a.Db);else if(c=!!a.xa){if("/"!=d.charAt(0))if(this.Ga&&!this.xa)d="/"+d;else{var e=b.xa.lastIndexOf("/");-1!=e&&(d=b.xa.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(""):".."==
132
- 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.xa=d:c=""!==a.g.toString();c?pe(b,a.g.clone()):c=!!a.fb;c&&(b.fb=a.fb);return b};q.clone=function(){return new me(this)};function ne(a,b,c){a.Ea=c?qe(b,!0):b;a.Ea&&(a.Ea=a.Ea.replace(/:$/,""))}function oe(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Db=b}else a.Db=null}function pe(a,b,c){b instanceof re?a.g=b:(c||(b=se(b,xe)),a.g=new re(b))}
133
- function qe(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function se(a,b,c){return null!=a?(a=encodeURI(a).replace(b,ye),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function ye(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var te=/[#\/\?@]/g,ve=/[#\?:]/g,ue=/[#\?]/g,xe=/[#\?@]/g,we=/#/g;function re(a){this.g=a||null}q=re.prototype;q.ua=null;q.vc=null;
134
- q.add=function(a,b){if(!this.ua&&(this.ua={},this.vc=0,this.g))for(var c=this.g.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.g=null;(c=this.ua.hasOwnProperty(a)&&this.ua[a])||(this.ua[a]=c=[]);c.push(b);this.vc++;return this};
135
- q.toString=function(){if(this.g)return this.g;if(!this.ua)return"";var a=[],b;for(b in this.ua)for(var c=encodeURIComponent(b),d=this.ua[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new re;a.g=this.g;if(this.ua){var b={},c;for(c in this.ua)b[c]=this.ua[c].concat();a.ua=b;a.vc=this.vc}return a};function ze(a,b){if(0==b.length)return a;var c=b.map(function(d){return new me(d)});return a.map(function(d){return new me(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Lb,[]).map(function(d){return d.toString()})}function Ae(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,sessionType:"",initData:b||[],keyIds:new Set}}
136
- function Be(a,b){if(1==b.length)return b[0];var c=Ce(a,b);if(null!=c)return c;throw new M(2,4,4025,b);}function Ce(a,b){for(var c=t(De[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==Ee?"":null}var Ee="text",Fe={Na:"video",bb:"audio",aa:Ee,mc:"image",Rf:"application"},De={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ge(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Ge.prototype.resolve=function(){};Ge.prototype.reject=function(){};function He(){}J("shaka.dependencies",He);He.has=function(a){return Ie.has(a)};He.add=function(a,b){if(!Je[a])throw Error(a+" is not supported");Ie.set(a,function(){return b})};var Je={muxjs:"muxjs"};He.Allowed=Je;var Ie=new Map([["muxjs",function(){return window.muxjs}]]);function Ke(){var a=this;this.s=Ie.get("muxjs")();this.g=new this.s.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(qc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:qc.apply(kc,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Ke.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
137
- function Le(a,b){if(!Ie.get("muxjs")()||!Me(a))return!1;if(b)return MediaSource.isTypeSupported(Ne(b,a));var c=Ne("audio",a),d=Ne("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Me(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
138
- function Ne(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function Oe(a,b){a.l=!0;a.h=new Ge;a.m=[];a.j=[];a.i=[];var c=qb(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new M(2,3,3018));return a.h};function Pe(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function Qe(a,b,c){a=Pe(a,b);return Ie.get("muxjs")()&&Me(a)?Ne(c,a):a}function Re(a){var b=[a.mimeType];Se.forEach(function(c,d){var e=a[d];e&&b.push(c+'="'+e+'"')});"PQ"==a.hdr&&b.push('eotf="smpte2084"');return b.join(";")}function Te(a){a=a.split(".");var b=a[0];a.pop();return b}function Ue(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}
139
- var Se=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Ve(a){this.s=null;this.i=a;this.j=this.C=0;this.l=Infinity;this.h=this.g=null;this.u="";this.m=new Map}function We(a){return Xe[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Ve.prototype.destroy=function(){this.i=this.s=null;this.m.clear();return Promise.resolve()};
140
- function Ye(a,b,c,d){var e,f,g;return F(function(h){if(1==h.g)return v(h,Promise.resolve(),2);if(!a.s||!a.i)return h["return"]();if(null==c||null==d)return a.s.parseInit(qb(b)),h["return"]();e={periodStart:a.C,segmentStart:c,segmentEnd:d};f=a.s.parseMedia(qb(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.l});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.l);z(h)})}
141
- Ve.prototype.remove=function(a,b){var c=this;return F(function(d){if(1==d.g)return v(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));z(d)})};function Ze(a,b,c){a.j=b;a.l=c}function $e(a,b,c){a.u=b;if(b=a.m.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
142
- function af(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 zc(c.startTime,c.endTime,c.text)});return b}
143
- function bf(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,[]);k.startTime+=e;k.endTime+=e;k.startTime>=a.j&&k.startTime<a.l&&(g.get(h).get(f).push(k),h==a.u&&a.i.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.m.has(f)||a.m.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.m.get(f).set(h,k);a.g=null==
144
- a.g?Math.max(c,a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.l))}J("shaka.text.TextEngine",Ve);Ve.prototype.destroy=Ve.prototype.destroy;Ve.findParser=function(a){return Xe[a]};Ve.unregisterParser=function(a){delete Xe[a]};Ve.registerParser=function(a,b){Xe[a]=b};var Xe={};function cf(a){this.g=!1;this.h=new Ge;this.i=a}cf.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 df(a,b){if(a.g){if(b instanceof M&&7003==b.code)throw b;throw new M(2,7,7003,b);}};function ef(){this.g={}}ef.prototype.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};ef.prototype.get=function(a){return(a=this.g[a])?a.slice():null};ef.prototype.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function ff(a,b){for(var c in a.g)b(c,a.g[c])}ef.prototype.size=function(){return Object.keys(this.g).length};function gf(){this.g=new ef}q=gf.prototype;q.release=function(){this.mb();this.g=null};q.B=function(a,b,c,d){this.g&&(a=new hf(a,b,c,d),this.g.push(b,a))};q.va=function(a,b,c,d){function e(g){f.Da(a,b,e);c(g)}var f=this;this.B(a,b,e,d)};q.Da=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.Da(),this.g.remove(b,e))}};
145
- q.mb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Da();this.g.g={}}};J("shaka.util.EventManager",gf);gf.prototype.removeAll=gf.prototype.mb;gf.prototype.unlisten=gf.prototype.Da;gf.prototype.listenOnce=gf.prototype.va;gf.prototype.listen=gf.prototype.B;gf.prototype.release=gf.prototype.release;function hf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=jf(a,d);this.target.addEventListener(b,c,this.g)}
146
- hf.prototype.Da=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function jf(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return kf(a)?b:b.capture||!1}
147
- function kf(a){var b=lf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}lf=b}return b||!1}var lf=void 0;function mf(a,b,c,d){var e=this;this.g=a;this.m=c;this.j={};this.I={};this.i=null;this.L=d||function(){};this.l={};this.h=new gf;this.u={};this.C=b;this.F=new Ge;this.s=nf(this,this.F);this.J=new cf(function(){return of(e)});this.H=""}function nf(a,b){var c=new MediaSource;a.h.va(c,"sourceopen",function(){URL.revokeObjectURL(a.H);b.resolve()});a.H=pf(c);a.g.src=a.H;return c}function rf(a){var b=Pe(a.mimeType,a.codecs),c=Re(a);return We(b)||MediaSource.isTypeSupported(c)||Le(b,a.type)}q=mf.prototype;
148
- q.destroy=function(){return this.J.destroy()};
149
- function of(a){var b,c,d,e,f,g,h,k;return F(function(l){if(1==l.g){b=[];for(c in a.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p["catch"](Mb)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new M(2,7,7003,void 0));a.i&&b.push(a.i.destroy());a.m&&b.push(a.m.destroy());for(k in a.u)b.push(a.u[k].destroy());return v(l,Promise.all(b),2)}a.h&&(a.h.release(),a.h=null);a.g&&(a.g.removeAttribute("src"),a.g.load(),a.g=null);a.s=null;a.i=null;a.m=null;a.j={};a.u={};a.C=null;a.l=
150
- {};z(l)})}
151
- q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return F(function(m){if(1==m.g)return d=Fe,v(m,c.F,2);e={};f=t(a.keys());for(g=f.next();!g.done;e={ra:e.ra},g=f.next())e.ra=g.value,h=a.get(e.ra),k=Pe(h.mimeType,h.codecs),e.ra==d.aa?sf(c,k):(!b&&MediaSource.isTypeSupported(k)||!Le(k,e.ra)||(c.u[e.ra]=new Ke,k=Ne(e.ra,k)),l=c.s.addSourceBuffer(k),c.h.B(l,"error",function(n){return function(){c.l[n.ra][0].p.reject(new M(2,3,3014,c.g.error?c.g.error.code:0))}}(e)),c.h.B(l,"updateend",function(n){return function(){return uf(c,n.ra)}}(e)),
152
- c.j[e.ra]=l,c.I[e.ra]=k,c.l[e.ra]=[]);z(m)})};function sf(a,b){a.i||(a.i=new Ve(a.m));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.i.s=Ob(Xe[b]))}function vf(a){return a.s?"ended"==a.s.readyState:!0}function wf(a,b){if(b==Ee)var c=a.i.g;else c=xf(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function yf(a,b){return b==Ee?a.i.h:ge(xf(a,b))}
153
- function zf(a,b,c){if(b==Ee)return a=a.i,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=xf(a,b);return ie(a,c)}q.xc=function(){var a={total:je(this.g.buffered),audio:je(xf(this,"audio")),video:je(xf(this,"video")),text:[]};if(this.i){var b=this.i.g,c=this.i.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function xf(a,b){try{return a.j[b].buffered}catch(c){return null}}
154
- function Af(a,b,c,d,e,f){var g,h,k,l,m,n,p,r;return F(function(u){if(1==u.g){g=Fe;if(b==g.aa)return v(u,Ye(a.i,c,d,e),0);if(a.u[b])return v(u,Oe(a.u[b],c),10);if(f)return a.i||sf(a,"text/vtt"),null==d&&null==e?a.C.init(c):(h=fe(a.C,c),h.length&&(k=a.j[g.Na].timestampOffset,bf(a.i,h,d,e,k))),c=Bf(a,c,d,b),v(u,Cf(a,b,function(){a.j[b].appendBuffer(c)}),0);c=Bf(a,c,d,b);return v(u,Cf(a,b,function(){a.j[b].appendBuffer(c)}),0)}l=u.h;a.i||sf(a,"text/vtt");l.metadata&&(m=a.j[b].timestampOffset,a.L(l.metadata,
155
- m,e));l.captions&&l.captions.length&&(n=a.j[g.Na].timestampOffset,p=af(l.captions),bf(a.i,p,d,e,n));r=l.data;r=Bf(a,r,d,b);return v(u,Cf(a,b,function(){a.j[b].appendBuffer(r)}),0)})}function Df(a,b){var c=yf(a,"video")||0;$e(a.i,b,c)}function Ef(a){a.i&&$e(a.i,"",0)}q.remove=function(a,b,c){var d=this,e;return F(function(f){e=Fe;return a==e.aa?v(f,d.i.remove(b,c),0):v(f,Cf(d,a,function(){c<=b?uf(d,a):d.j[a].remove(b,c)}),0)})};
156
- function Ff(a,b){var c;return F(function(d){c=Fe;return b==c.aa?a.i?v(d,a.i.remove(0,Infinity),0):d["return"]():v(d,Cf(a,b,function(){var e=a.s.duration;0>=e?uf(a,b):a.j[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return F(function(d){c=Fe;return a==c.aa?d["return"]():v(d,Cf(b,a,function(){b.g.currentTime-=.001;uf(b,a)}),0)})};
157
- function Gf(a,b,c,d,e){var f;return F(function(g){f=Fe;return b==f.aa?(a.i.C=c,Ze(a.i,d,e),g["return"]()):v(g,Promise.all([Cf(a,b,function(){var h=a.j[b].appendWindowStart,k=a.j[b].appendWindowEnd;a.j[b].abort();a.j[b].appendWindowStart=h;a.j[b].appendWindowEnd=k;uf(a,b)}),Cf(a,b,function(){var h=c;0>h&&(h+=.001);a.j[b].timestampOffset=h;uf(a,b)}),Cf(a,b,function(){a.j[b].appendWindowStart=0;a.j[b].appendWindowEnd=e;a.j[b].appendWindowStart=d;uf(a,b)})]),0)})}
158
- q.endOfStream=function(a){var b=this;return F(function(c){return v(c,Hf(b,function(){vf(b)||(a?b.s.endOfStream(a):b.s.endOfStream())}),0)})};q.Ja=function(a){var b=this;return F(function(c){return v(c,Hf(b,function(){b.s.duration=a}),0)})};q.getDuration=function(){return this.s.duration};function uf(a,b){var c=a.l[b][0];c&&(c.p.resolve(),If(a,b))}function Cf(a,b,c){df(a.J);c={start:c,p:new Ge};a.l[b].push(c);1==a.l[b].length&&Jf(a,b);return c.p}
159
- function Hf(a,b){var c,d,e,f,g,h;return F(function(k){switch(k.g){case 1:df(a.J);c=[];d={};for(e in a.j)d.Jb=new Ge,f={start:function(l){return function(){return l.Jb.resolve()}}(d),p:d.Jb},a.l[e].push(f),c.push(d.Jb),1==a.l[e].length&&f.start(),d={Jb:d.Jb};B(k,2);return v(k,Promise.all(c),4);case 4:ua(k,3);break;case 2:throw g=va(k),g;case 3:try{b()}catch(l){throw new M(2,3,3015,l);}finally{for(h in a.j)If(a,h)}z(k)}})}function If(a,b){a.l[b].shift();Jf(a,b)}
160
- function Jf(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new M(2,3,3017,b)):c.p.reject(new M(2,3,3015,d)),If(a,b)}}function Bf(a,b,c,d){var e=a.g.mediaKeys;null==c&&e&&(ec()||cc())&&"mp4"==a.I[d].split(";")[0].split("/")[1]&&(b=rc(b));return b}var pf=window.URL.createObjectURL;function Kf(a,b){a=Lf(a);b=Lf(b);return a.split("-")[0]==b.split("-")[0]}function Mf(a,b){a=Lf(a);b=Lf(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Nf(a,b){a=Lf(a);b=Lf(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Lf(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Of.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Pf(a,b){a=Lf(a);b=Lf(b);return b==a?4:Mf(b,a)?3:Nf(b,a)?2:Mf(a,b)?1:0}
161
- function Qf(a){return a.language?Lf(a.language):a.audio&&a.audio.language?Lf(a.audio.language):a.video&&a.video.language?Lf(a.video.language):"und"}
162
- function Rf(a,b){for(var c=Lf(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(Lf(f.value));e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Mf(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Nf(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Mf(c,f))return f;return null}
163
- var Of=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",
82
+ function ec(a){var b;a instanceof ec?(fc(this,a.Ga),this.rb=a.rb,this.Ia=a.Ia,gc(this,a.Fb),this.za=a.za,hc(this,a.g.clone()),this.hb=a.hb):a&&(b=String(a).match(dc))?(fc(this,b[1]||"",!0),this.rb=ic(b[2]||""),this.Ia=ic(b[3]||"",!0),gc(this,b[4]),this.za=ic(b[5]||"",!0),hc(this,b[6]||"",!0),this.hb=ic(b[7]||"")):this.g=new jc(null)}q=ec.prototype;q.Ga="";q.rb="";q.Ia="";q.Fb=null;q.za="";q.hb="";
83
+ q.toString=function(){var a=[],b=this.Ga;b&&a.push(kc(b,lc,!0),":");if(b=this.Ia){a.push("//");var c=this.rb;c&&a.push(kc(c,lc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Fb;null!=b&&a.push(":",String(b))}if(b=this.za)this.Ia&&"/"!=b.charAt(0)&&a.push("/"),a.push(kc(b,"/"==b.charAt(0)?mc:nc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.hb)&&a.push("#",kc(b,oc));return a.join("")};
84
+ q.resolve=function(a){var b=this.clone();"data"===b.Ga&&(b=new ec);var c=!!a.Ga;c?fc(b,a.Ga):c=!!a.rb;c?b.rb=a.rb:c=!!a.Ia;c?b.Ia=a.Ia:c=null!=a.Fb;var d=a.za;if(c)gc(b,a.Fb);else if(c=!!a.za){if("/"!=d.charAt(0))if(this.Ia&&!this.za)d="/"+d;else{var e=b.za.lastIndexOf("/");-1!=e&&(d=b.za.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.za=d:c=""!==a.g.toString();c?hc(b,a.g.clone()):c=!!a.hb;c&&(b.hb=a.hb);return b};q.clone=function(){return new ec(this)};function fc(a,b,c){a.Ga=c?ic(b,!0):b;a.Ga&&(a.Ga=a.Ga.replace(/:$/,""))}function gc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Fb=b}else a.Fb=null}function hc(a,b,c){b instanceof jc?a.g=b:(c||(b=kc(b,pc)),a.g=new jc(b))}
86
+ function ic(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function kc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,qc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function qc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var lc=/[#\/\?@]/g,nc=/[#\?:]/g,mc=/[#\?]/g,pc=/[#\?@]/g,oc=/#/g;function jc(a){this.g=a||null}q=jc.prototype;q.wa=null;q.yc=null;
87
+ q.add=function(a,b){if(!this.wa&&(this.wa={},this.yc=0,this.g))for(var c=this.g.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.g=null;(c=this.wa.hasOwnProperty(a)&&this.wa[a])||(this.wa[a]=c=[]);c.push(b);this.yc++;return this};
88
+ q.toString=function(){if(this.g)return this.g;if(!this.wa)return"";var a=[],b;for(b in this.wa)for(var c=encodeURIComponent(b),d=this.wa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new jc;a.g=this.g;if(this.wa){var b={},c;for(c in this.wa)b[c]=this.wa[c].concat();a.wa=b;a.yc=this.yc}return a};function rc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new ec(d)});return a.map(function(d){return new ec(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Xb,[]).map(function(d){return d.toString()})}function sc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
89
+ function tc(a,b){if(1==b.length)return b[0];var c=uc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function uc(a,b){for(var c=t(vc[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==wc?"":null}var wc="text",xc={Pa:"video",eb:"audio",ba:wc,Ob:"image",$f:"application"},vc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function yc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}yc.prototype.resolve=function(){};yc.prototype.reject=function(){};function zc(a){this.h=a;this.g=void 0}zc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Ac(){}function Bc(a){if(!a)return"";a=Ob(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=(new TextDecoder).decode(a);a.includes("\ufffd")&&Wa('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!');return a}
90
+ function Cc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(2,2,2004);var d=Math.floor(a.byteLength/2);c=new Uint16Array(d);a=Rb(a);d=t(jb(d));for(var e=d.next();!e.done;e=d.next())e=e.value,c[e]=a.getUint16(2*e,b);return Dc.value()(c)}
91
+ function Ec(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Ob(a);if(239==c[0]&&187==c[1]&&191==c[2])return Bc(c);if(254==c[0]&&255==c[1])return Cc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Cc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Cc(a,!1);if(0==c[1]&&0==c[3])return Cc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Bc(a);throw new N(2,2,2003);}function Fc(a){var b=new TextEncoder;return Pb(b.encode(a))}
92
+ function Gc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=t(lb(a)),f=e.next();!f.done;f=e.next())f=f.value,d.setUint16(2*f.ga,f.item.charCodeAt(0),b);return c}M("shaka.util.StringUtils",Ac);Ac.resetFromCharCode=function(){Dc.g=void 0};Ac.toUTF16=Gc;Ac.toUTF8=Fc;Ac.fromBytesAutoDetect=Ec;Ac.fromUTF16=Cc;Ac.fromUTF8=Bc;
93
+ var Dc=new zc(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={Wa:65536};0<b.Wa;b={Wa:b.Wa},b.Wa/=2)if(a(b.Wa))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Wa)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Wa));return e}}(b);return null});function Hc(){}function Ic(a){a=Ob(a);a=Dc.value()(a);return btoa(a)}function Jc(a,b){b=void 0==b?!0:b;var c=Ic(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Kc(a){var b=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));a=new Uint8Array(b.length);b=t(lb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.ga]=c.item.charCodeAt(0);return a}
94
+ function Lc(a){var b=a.length/2,c=new Uint8Array(b);b=t(jb(b));for(var d=b.next();!d.done;d=b.next())d=d.value,c[d]=window.parseInt(a.substr(2*d,2),16);return c}function Mc(a){var b=Ob(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}
95
+ function Nc(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];var d=0,e=t(b);for(c=e.next();!c.done;c=e.next())d+=c.value.byteLength;d=new Uint8Array(d);e=0;b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,d.set(Ob(c),e),e+=c.byteLength;return d}M("shaka.util.Uint8ArrayUtils",Hc);Hc.concat=Nc;Hc.toHex=Mc;Hc.fromHex=Lc;Hc.fromBase64=Kc;Hc.toBase64=Jc;Hc.toStandardBase64=Ic;
96
+ Hc.equal=function(a,b){Tb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Mb(a,b)};function Oc(){var a=this;this.s=bc.get("muxjs")();this.g=new this.s.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(Nc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:Nc.apply(Hc,ja(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Oc.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
97
+ function Pc(a,b){if(!bc.get("muxjs")()||!Qc(a))return!1;if(b)return MediaSource.isTypeSupported(Rc(b,a));var c=Rc("audio",a),d=Rc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Qc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
98
+ function Rc(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function Sc(a,b){a.l=!0;a.h=new yc;a.m=[];a.j=[];a.i=[];var c=Ob(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function Tc(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function Uc(a,b,c){a=Tc(a,b);return bc.get("muxjs")()&&Qc(a)?Rc(c,a):a}function Vc(a){a=a.split(".");var b=a[0];a.pop();return b}function Wc(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Xc(a){this.s=null;this.i=a;this.j=this.D=0;this.l=Infinity;this.h=this.g=null;this.u="";this.m=new Map}function Yc(a){return Zc[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Xc.prototype.destroy=function(){this.i=this.s=null;this.m.clear();return Promise.resolve()};
99
+ function $c(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g)return v(h,Promise.resolve(),2);if(!a.s||!a.i)return h["return"]();if(null==c||null==d)return a.s.parseInit(Ob(b)),h["return"]();e={periodStart:a.D,segmentStart:c,segmentEnd:d};f=a.s.parseMedia(Ob(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.l});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.l);z(h)})}
100
+ Xc.prototype.remove=function(a,b){var c=this;return K(function(d){if(1==d.g)return v(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));z(d)})};function ad(a,b,c){a.j=b;a.l=c}function bd(a,b,c){a.u=b;if(b=a.m.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
101
+ function cd(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 qb(c.startTime,c.endTime,c.text)});return b}function dd(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())dd(a,d.value,c)}
102
+ function ed(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,[]);dd(a,k,e);k.startTime>=a.j&&k.startTime<a.l&&(g.get(h).get(f).push(k),h==a.u&&a.i.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.m.has(f)||a.m.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.m.get(f).set(h,k);a.g=null==a.g?Math.max(c,
103
+ a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.l))}M("shaka.text.TextEngine",Xc);Xc.prototype.destroy=Xc.prototype.destroy;Xc.findParser=function(a){return Zc[a]};Xc.unregisterParser=function(a){delete Zc[a]};Xc.registerParser=function(a,b){Zc[a]=b};var Zc={};function fd(a,b){a=gd(a);b=gd(b);return a.split("-")[0]==b.split("-")[0]}function hd(a,b){a=gd(a);b=gd(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function id(a,b){a=gd(a);b=gd(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function gd(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=jd.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function kd(a,b){a=gd(a);b=gd(b);return b==a?4:hd(b,a)?3:id(b,a)?2:hd(a,b)?1:0}
104
+ function ld(a){return a.language?gd(a.language):a.audio&&a.audio.language?gd(a.audio.language):a.video&&a.video.language?gd(a.video.language):"und"}
105
+ function md(a,b){for(var c=gd(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(gd(f.value));e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,hd(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,id(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,hd(c,f))return f;return null}
106
+ var jd=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",
164
107
  "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",
165
108
  "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",
166
109
  "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",
167
110
  "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",
168
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Sf(a,b){var c=Tf(a.variants,b);c=Uf(c);c=Vf(c);var d=Wf(c);a.variants=a.variants.filter(function(e){return Xf(e)==d?!0:!1})}function Uf(a){var b=new ef;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Xf(c);b.push(d,c)}return b}
169
- function Vf(a){var b=0,c=new Map,d=a.size();ff(a,function(e,f){for(var g=t(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new ef);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}function Wf(a){var b="",c=Infinity;ff(a,function(d,e){for(var f=0,g=0,h=t(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}
170
- function Xf(a){var b="";a.video&&(b=Te(a.video.codecs));var c="";a.audio&&(c=Te(a.audio.codecs));return b+"-"+c}function Yf(a,b,c){a.variants=a.variants.filter(function(d){return Zf(d,b,c)})}
171
- function Zf(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
172
- function $f(a,b,c,d){return F(function(e){if(1==e.g)return d?v(e,cg(c,0<c.offlineSessionIds.length),2):(ag(c,a),bg(c),e.v(2));dg(b,c);eg(c);fg(c);z(e)})}function ag(a,b){a.variants=a.variants.filter(function(c){return b&&b.L?gg(b,c)?!0:!1:!0})}
173
- function cg(a,b){return F(function(c){if(1==c.g)return v(c,hg(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(cc()&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return $a(ig(d)),!1;(e=d.decodingInfos.some(function(f){return f.supported}))||$a(ig(d));return e});z(c)})}
174
- function bg(a){a.variants=a.variants.filter(function(b){var c=b.audio;b=b.video;return c&&!rf(c)||b&&!rf(b)||cc()&&b&&(b.width&&1920<b.width||b.height&&1080<b.height)&&b.codecs.includes("avc1.")?!1:!0})}
175
- function hg(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return F(function(u){if(d=a.some(function(x){return x.decodingInfos.length}))return u["return"]();e=window.shakaMediaCapabilities;f=[];g=function(x,w){var y;return F(function(C){if(1==C.g)return B(C,2),v(C,e.decodingInfo(w),4);if(2!=C.g)return y=C.h,x.decodingInfos.push(y),ua(C,0);va(C);JSON.stringify(w);z(C)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=jg(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())r=p.value,f.push(g(l,r));return v(u,Promise.all(f),
111
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function nd(){this.g={}}q=nd.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function od(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function pd(a){this.h=a;this.g=null}pd.prototype.V=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};pd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Jb=function(){this.stop();this.h();return this};O.prototype.V=function(a){var b=this;this.stop();this.g=(new pd(function(){b.h()})).V(a);return this};O.prototype.Da=function(a){var b=this;this.stop();this.g=(new pd(function(){b.g.V(a);b.h()})).V(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Da;O.prototype.tickAfter=O.prototype.V;
112
+ O.prototype.tickNow=O.prototype.Jb;function qd(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function rd(a){return""!=sd().canPlayType(a)}function td(){return ud("Tizen")}function vd(){return ud("CrKey")}function wd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!td()}function xd(){if(!wd())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}
113
+ function ud(a){return(navigator.userAgent||"").includes(a)}function sd(){if(yd)return yd;zd||(zd=new O(function(){yd=null}));(yd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(yd=document.createElement("video"));zd.V(1);return yd}var zd=null,yd=null;function Ad(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Bd(f,b,c);f=Cd(f,d);b=Dd(f);b=Ed(b);var g=Fd(b,e);a.variants=a.variants.filter(function(h){return Gd(h)==g?!0:!1})}function Dd(a){var b=new nd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Gd(c);b.push(d,c)}return b}
114
+ function Ed(a){var b=0,c=new Map,d=a.size();od(a,function(e,f){for(var g=t(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new nd);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
115
+ function Bd(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={fd:d.fd},e=b.next())if(d.fd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.fd)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={Sc:d.Sc},b=c.next())if(d.Sc=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Sc)}}(d)),b.length){a=b;break}return a}
116
+ function Fd(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Hd||d==Id){if(a=Jd(a,d),1==a.size())return a.keys()[0]}else if(d==Kd)break;return Ld(a)}function Jd(a,b){var c=0,d=new nd;od(a,function(e,f){for(var g=0,h=0,k=t(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
117
+ function Ld(a){var b="",c=Infinity;od(a,function(d,e){for(var f=0,g=0,h=t(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Gd(a){var b="";a.video&&(b=Vc(a.video.codecs));var c="";a.audio&&(c=Vc(a.audio.codecs));return b+"-"+c}function Md(a,b,c){a.variants=a.variants.filter(function(d){return Nd(d,b,c)})}
118
+ function Nd(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
119
+ function Od(a,b){return K(function(c){if(1==c.g)return v(c,Pd(b,0<b.offlineSessionIds.length),2);Qd(a,b);Rd(b);Sd(b);z(c)})}function Pd(a,b){return K(function(c){if(1==c.g)return v(c,Td(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(ud("Xbox One")&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return ab(Ud(d)),!1;(e=d.decodingInfos.some(function(f){return f.supported}))||ab(Ud(d));return e});z(c)})}
120
+ function Td(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return K(function(u){if(d=a.some(function(y){return y.decodingInfos.length}))return u["return"]();e=window.shakaMediaCapabilities;f=[];g=function(y,w){var x;return K(function(C){if(1==C.g)return A(C,2),v(C,e.decodingInfo(w),4);if(2!=C.g)return x=C.h,y.decodingInfos.push(x),wa(C,0);E(C);JSON.stringify(w);z(C)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Vd(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())r=p.value,f.push(g(l,r));return v(u,Promise.all(f),
176
121
  0)})}
177
- function jg(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=Be("video",g);f="vp9"==f?"vp09.00.10.08":f;g=Be("audio",g);g=Qe(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Qe(e.mimeType,"vp9"==f?"vp09.00.10.08":f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1}}d&&
178
- (f="ac-3"==d.codecs.toLowerCase()&&ec()?"ec-3":d.codecs,f=Qe(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,[]);f.get(k.keySystem).push(k)}g=b?"required":"optional";b=
179
- b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,r=t(h.initData),u=r.next();!u.done;u=r.next())p.add(u.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&(m.distinctiveIdentifier=
180
- "required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}
181
- function dg(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!kg(d,a.audio)||c&&a&&a.video&&!kg(c,a.video)?!1:!0})}function eg(a){a.textStreams=a.textStreams.filter(function(b){return We(Pe(b.mimeType,b.codecs))})}function fg(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(dc("Web0S")||ec()||fc())&&c.push("image/webp");return c.includes(b.mimeType)})}
182
- function kg(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
183
- function lg(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=t(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=t(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
122
+ function Vd(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=tc("video",g);f="vp9"==f?"vp09.00.10.08":f;g=tc("audio",g);g=Uc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Uc(e.mimeType,"vp9"==f?"vp09.00.10.08":f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};
123
+ if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f="ac-3"==d.codecs.toLowerCase()&&td()?"ec-3":d.codecs,f=Uc(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;
124
+ 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,[]);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,
125
+ r=t(h.initData),u=r.next();!u.done;u=r.next())p.add(u.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=
126
+ m;a.push(l)}return a}function Qd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Wd(d,a.audio)||c&&a&&a.video&&!Wd(c,a.video)?!1:!0})}function Rd(a){a.textStreams=a.textStreams.filter(function(b){return Yc(Tc(b.mimeType,b.codecs))})}function Sd(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(ud("Web0S")||td()||vd())&&c.push("image/webp");return c.includes(b.mimeType)})}
127
+ function Wd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
128
+ function Xd(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=t(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=t(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
184
129
  frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),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,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||
185
130
  null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.label=b.label,a.audioRoles=b.roles);return a}
186
- function mg(a){return{id:a.id,active:!1,type:Ee,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,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,originalAudioId:null,
131
+ function Yd(a){return{id:a.id,active:!1,type:wc,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,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,originalAudioId:null,
187
132
  originalTextId:a.originalId,originalImageId:null}}
188
- function ng(a){return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:a.width||null,height:a.height||null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:a.tilesLayout||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
189
- originalTextId:null,originalImageId:a.originalId}}function og(a){a.__shaka_id||(a.__shaka_id=pg++);return a.__shaka_id}function qg(a){var b=rg(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}
190
- function rg(a){return{id:og(a),active:!1,type:"",bandwidth:0,language:Lf(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null}}
191
- function sg(a){return a.allowedByApplication&&a.allowedByKeySystem}function tg(a){return a.filter(function(b){return sg(b)})}
192
- function Tf(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ia(e))):d.get(Math.min.apply(Math,ia(c)))}
193
- function ug(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=Rf(Lf(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Lf(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=vg(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(Lb,[]);return a.length?
194
- vg(e,a[0]):e}function vg(a,b){return a.filter(function(c){return c.roles.includes(b)})}function ig(a){var b=[];a.audio&&b.push(wg(a.audio));a.video&&b.push(wg(a.video));return b.join(", ")}
195
- function wg(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}var pg=0;function xg(){var a=this;this.j=null;this.i=!1;this.g=new Sa;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.o.useNetworkInformation&&a.i){a.g=new Sa;var b=a.chooseVariant();b&&a.j(b)}});this.h=[];this.m=1;this.s=!1;this.o=this.l=null}q=xg.prototype;q.stop=function(){this.j=null;this.i=!1;this.h=[];this.m=1;this.l=null};q.init=function(a){this.j=a};
196
- q.chooseVariant=function(){var a=yg(this.o.restrictions,this.h),b=this.g.getBandwidthEstimate(zg(this));this.h.length&&!a.length&&(a=yg(null,this.h),a=[a[0]]);var c=a[0]||null;a=t(mb(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.item;var f=isNaN(this.m)?1:Math.abs(this.m);e=f*(e.next||{bandwidth:Infinity}).bandwidth/this.o.bandwidthUpgradeTarget;b>=f*d.bandwidth/this.o.bandwidthDowngradeTarget&&b<=e&&(c=d)}this.l=Date.now();return c};q.enable=function(){this.i=!0};
197
- q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){var c=this.g;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.g+=b;Qa(c.h,e,d);Qa(c.i,e,d)}if(null!=this.l&&this.i)a:{if(!this.s){if(!(128E3<=this.g.g))break a;this.s=!0}else if(Date.now()-this.l<1E3*this.o.switchInterval)break a;c=this.chooseVariant();this.g.getBandwidthEstimate(zg(this));c&&this.j(c)}};q.getBandwidthEstimate=function(){return this.g.getBandwidthEstimate(this.o.defaultBandwidthEstimate)};q.setVariants=function(a){this.h=a};
198
- q.playbackRateChanged=function(a){this.m=a};q.configure=function(a){this.o=a};function zg(a){var b=a.o.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.o.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function yg(a,b){a&&(b=b.filter(function(c){return Zf(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}J("shaka.abr.SimpleAbrManager",xg);xg.prototype.configure=xg.prototype.configure;
199
- xg.prototype.playbackRateChanged=xg.prototype.playbackRateChanged;xg.prototype.setVariants=xg.prototype.setVariants;xg.prototype.getBandwidthEstimate=xg.prototype.getBandwidthEstimate;xg.prototype.segmentDownloaded=xg.prototype.segmentDownloaded;xg.prototype.disable=xg.prototype.disable;xg.prototype.enable=xg.prototype.enable;xg.prototype.chooseVariant=xg.prototype.chooseVariant;xg.prototype.init=xg.prototype.init;xg.prototype.stop=xg.prototype.stop;function Ag(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=t(b),d=c.next();!d.done;d=c.next())this.add(d.value)}Ag.prototype.add=function(a){return Bg(this.h,a)?(this.g.add(a),!0):!1};
200
- function Bg(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)&&Cg(c,d)&&Dg(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(Cg(c,d)&&Dg(c.roles,d.roles)));return c?!1:!0}Ag.prototype.values=function(){return this.g.values()};
201
- function Cg(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(g){return Te(g)}),d=b.codecs.split(",").map(function(g){return Te(g)});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=t(kb(c.length)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}
202
- function Dg(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=t(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function Eg(a){this.g=a;this.h=new Fg(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Eg.prototype.create=function(a){var b=this,c=a.filter(function(d){return Bg(b.g,d)});return c.length?new Ag(c[0],c):this.h.create(a)};function Fg(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
203
- Fg.prototype.create=function(a){var b=[];b=Gg(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Hg(b,this.j);a.length&&(b=a);this.g&&(a=Tf(b,this.g),a.length&&(b=a));this.h&&(a=Ig(b,this.h),a.length&&(b=a));a=new Ag(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,Bg(a.h,c)&&a.add(c);return a};function Gg(a,b){var c=Lf(b),d=Rf(c,a.map(function(e){return Qf(e)}));return d?a.filter(function(e){return d==Qf(e)}):[]}
204
- function Hg(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Ig(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Jg(){this.g=Kg;this.h=(new Map).set(Kg,2).set(Lg,1)}function Mg(a,b,c){a.h.set(Kg,c).set(Lg,b)}var Lg=0,Kg=1;function Ng(a,b){var c=Og();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=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}
205
- function Pg(a){var b,c;return F(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new M(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.s);return v(d,new Promise(function(e){(new N(e)).U(c/1E3)}),2)}a.h*=a.m;z(d)})}function Og(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Qg(a,b){this.promise=a;this.i=b;this.g=!1}function Rg(a){return new Qg(Promise.reject(a),function(){return Promise.resolve()})}function Sg(){var a=Promise.reject(new M(2,7,7001));a["catch"](function(){});return new Qg(a,function(){return Promise.resolve()})}function Tg(a){return new Qg(Promise.resolve(a),function(){return Promise.resolve()})}function Ug(a){return new Qg(a,function(){return a["catch"](function(){})})}Qg.prototype.abort=function(){this.g=!0;return this.i()};
206
- function Vg(a){return new Qg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Qg.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
207
- Qg.prototype.ba=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Wg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Ge,g=new M(2,7,7001);this.promise.then(c(!0),c(!1));return new Qg(f,function(){return d()})};
208
- function Wg(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}J("shaka.util.AbortableOperation",Qg);Qg.prototype.chain=Qg.prototype.ba;Qg.prototype["finally"]=Qg.prototype["finally"];Qg.all=Vg;Qg.prototype.abort=Qg.prototype.abort;Qg.notAbortable=Ug;Qg.completed=Tg;Qg.aborted=Sg;Qg.failed=Rg;function P(a,b){b=void 0===b?{}:b;for(var 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}P.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};P.prototype.stopImmediatePropagation=function(){this.g=!0};
209
- P.prototype.stopPropagation=function(){};J("shaka.util.FakeEvent",P);function Xg(){this.qc=new ef;this.pc=this}Xg.prototype.addEventListener=function(a,b){this.qc.push(a,b)};Xg.prototype.removeEventListener=function(a,b){this.qc.remove(a,b)};Xg.prototype.dispatchEvent=function(a){var b=this.qc.get(a.type)||[],c=this.qc.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.pc;a.currentTarget=this.pc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};function Yg(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Zg(a){var b={},c;for(c in a)b[c]=a[c];return b};function $g(){this.g=[]}function ah(a,b){a.g.push(b["finally"](function(){wc(a.g,b)}))}$g.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 bh(a){Xg.call(this);this.i=!1;this.l=new $g;this.g=new Set;this.h=new Set;this.j=a||null;this.m=!1}pa(bh,Xg);q=bh.prototype;q.Kd=function(a){this.m=a};function ch(a,b,c,d){c=c||dh;var e=eh[a];if(!e||c>=e.priority)eh[a]={priority:c,tf:b,vf:void 0===d?!1:d}}q.wf=function(a){this.g.add(a)};q.Nf=function(a){this.g["delete"](a)};q.He=function(){this.g.clear()};q.xf=function(a){this.h.add(a)};q.Of=function(a){this.h["delete"](a)};q.Ie=function(){this.h.clear()};
210
- function fh(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();return this.l.destroy()};
211
- q.request=function(a,b){var c=this,d=new gh;if(this.i){var e=Promise.reject(new M(2,7,7001));e["catch"](function(){});return new hh(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Yg(b.retryParameters):Og();b.uris=Yg(b.uris);e=ih(this,a,b);var f=e.ba(function(){return jh(c,a,b,new Ng(b.retryParameters,!1),0,null,d)}),g=f.ba(function(n){return kh(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
212
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.ba(function(n){var p=Date.now()-l,r=n.response;r.timeMs+=k;r.timeMs+=p;n.jf||!c.j||r.fromCache||a!=lh||c.j(r.timeMs,r.data.byteLength);return r},function(n){n&&(n.severity=2);throw n;});e=new hh(m.promise,function(){return m.abort()},d);ah(this.l,e);return e};
213
- function ih(a,b,c){var d=Tg(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={Xc:e.Xc},f=a.next())e.Xc=f.value,d=d.ba(function(g){return function(){c.body&&(c.body=rb(c.body));return g.Xc(b,c)}}(e));return d.ba(void 0,function(g){if(g instanceof M&&7001==g.code)throw g;throw new M(2,1,1006,g);})}
214
- function jh(a,b,c,d,e,f,g){a.m&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new me(c.uris[e]),k=h.Ea,l=!1;k||(k=location.protocol,k=k.slice(0,-1),ne(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=eh[k])?k.tf:null;if(!m)return Rg(new M(2,1,1E3,h));var n=k.vf,p=null,r=null,u=!1,x;return Ug(Pg(d)).ba(function(){if(a.i)return Sg();x=Date.now();var w=m(c.uris[e],c,b,function(D,A,E){p&&p.stop();r&&r.U(C/1E3);a.j&&b==lh&&(a.j(D,A),l=!0,g.g=E)});if(!n)return w;var y=c.retryParameters.connectionTimeout;
215
- y&&(p=new N(function(){u=!0;w.abort()}),p.U(y/1E3));var C=c.retryParameters.stallTimeout;C&&(r=new N(function(){u=!0;w.abort()}));return w}).ba(function(w){p&&p.stop();r&&r.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-x);return{response:w,jf:l}},function(w){p&&p.stop();r&&r.stop();if(a.i)return Sg();u&&(w=new M(1,1,1003,c.uris[e],b));if(w instanceof M){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity){var y=new P("retry",{error:w});a.dispatchEvent(y);e=(e+1)%c.uris.length;return jh(a,
216
- b,c,d,e,w,g)}}throw w;})}function kh(a,b,c){var d=Tg(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={Yc:e.Yc},f=a.next())e.Yc=f.value,d=d.ba(function(g){return function(){var h=c.response;h.data&&(h.data=rb(h.data));return g.Yc(b,h)}}(e));return d.ba(function(){return c},function(g){var h=2;if(g instanceof M){if(7001==g.code)throw g;h=g.severity}throw new M(h,1,1007,g);})}J("shaka.net.NetworkingEngine",bh);bh.prototype.request=bh.prototype.request;bh.prototype.destroy=bh.prototype.destroy;
217
- bh.makeRequest=fh;bh.defaultRetryParameters=function(){return Og()};bh.prototype.clearAllResponseFilters=bh.prototype.Ie;bh.prototype.unregisterResponseFilter=bh.prototype.Of;bh.prototype.registerResponseFilter=bh.prototype.xf;bh.prototype.clearAllRequestFilters=bh.prototype.He;bh.prototype.unregisterRequestFilter=bh.prototype.Nf;bh.prototype.registerRequestFilter=bh.prototype.wf;bh.unregisterScheme=function(a){delete eh[a]};bh.registerScheme=ch;bh.prototype.setForceHTTPS=bh.prototype.Kd;
218
- function gh(){this.g=0}bh.NumBytesRemainingClass=gh;function hh(a,b,c){Qg.call(this,a,b);this.h=c}pa(hh,Qg);bh.PendingRequest=hh;var lh=1;bh.RequestType={MANIFEST:0,SEGMENT:lh,LICENSE:2,APP:3,TIMING:4};var dh=3;bh.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:dh};var eh={};function mh(){}function nh(a){a=zb(a);return(new me(a)).Ga}function oh(a,b,c){function d(h){tb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(qb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new M(2,6,6015);var e;"string"==typeof b?e=Bb(b,!0):e=b;a=zb(a);a=Bb(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}J("shaka.util.FairPlayUtils",mh);mh.initDataTransform=oh;mh.defaultGetContentId=nh;function ph(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 qh(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function rh(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function sh(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.u=new Set;this.g=this.m=null;this.pa=this.L=!1;this.H=0;this.i=null;this.h=new gf;this.j=new Map;this.C=[];this.s=new Ge;this.o=null;this.l=function(d){c.s.reject(d);a.onError(d)};this.qa=new Map;this.da=new Map;this.S=new N(function(){return th(c)});this.F=!1;this.I=[];this.N=!1;this.oa=(new N(function(){uh(c)})).Ca(b);this.s["catch"](function(){});this.J=new cf(function(){return vh(c)});this.X=!1}q=sh.prototype;q.destroy=function(){return this.J.destroy()};
219
- function vh(a){return F(function(b){switch(b.g){case 1:return a.h.release(),a.h=null,a.s.reject(),a.oa.stop(),a.oa=null,a.S.stop(),a.S=null,v(b,wh(a),2);case 2:if(!a.g){b.v(3);break}B(b,4);return v(b,a.g.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:va(b);case 5:a.g=null;case 3:a.i=null,a.u.clear(),a.m=null,a.C=[],a.o=null,a.l=function(){},a.D=null,a.X=!1,z(b)}})}q.configure=function(a){this.o=a};function xh(a,b,c,d){a.pa=!0;a.C=[];a.F=c;return yh(a,b,!!d)}
220
- function zh(a,b,c,d){a.C=c;a.F=0<c.length;return yh(a,b,!!d)}function Ah(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,initData:null,keyIds:null}];g.set(b,e);return Bh(a,g,[],!1)}
221
- function yh(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,x,w,y;return F(function(C){if(1==C.g){if(d=Ch(a))for(e=t(b),f=e.next();!f.done;f=e.next())g=f.value,g.video&&(g.video.drmInfos=[d]),g.audio&&(g.audio.drmInfos=[d]);h=b.some(function(D){return D.video&&D.video.drmInfos.length||D.audio&&D.audio.drmInfos.length?!0:!1});h||(k=ph(a.o.servers),Dh(b,k));l=t(b);for(f=l.next();!f.done;f=l.next())for(m=f.value,n=Eh(m),p=t(n),r=p.next();!r.done;r=p.next())u=r.value,Fh(u,ph(a.o.servers),ph(a.o.advanced||{}));return c?
222
- v(C,hg(b,a.F,a.X),2):(x=Gh(a,b),C.v(2))}w=h||Object.keys(a.o.servers).length;if(!w)return a.L=!0,C["return"](Promise.resolve());y=Bh(a,x,b,c);return C["return"](h?y:y["catch"](function(){}))})}
223
- q.Nb=function(a){var b=this,c,d;return F(function(e){if(1==e.g){if(!b.m)return b.h.va(a,"encrypted",function(){b.l(new M(2,6,6010))}),e["return"]();b.g=a;b.h.va(b.g,"play",function(){for(var f=t(b.I),g=f.next();!g.done;g=f.next())Hh(b,g.value);b.N=!0;b.I=[]});"webkitCurrentPlaybackTargetIsWireless"in b.g&&b.h.B(b.g,"webkitcurrentplaybacktargetiswirelesschanged",function(){return wh(b)});c=b.g.setMediaKeys(b.m);c=c["catch"](function(f){return Promise.reject(new M(2,6,6003,f.message))});return v(e,
224
- c,2)}df(b.J);Ih(b);b.i.initData.length||b.C.length||(d=function(f){return Jh(b,f.initDataType,qb(f.initData))},b.h.B(b.g,"encrypted",d));z(e)})};function Kh(a){var b;return F(function(c){if(1==c.g){if(!(a.m&&a.i&&a.i.serverCertificate&&a.i.serverCertificate.length))return c.v(0);B(c,3);return v(c,a.m.setServerCertificate(a.i.serverCertificate),5)}if(3!=c.g)return ua(c,0);b=va(c);throw new M(2,6,6004,b.message);})}
225
- function Lh(a,b){var c,d,e;return F(function(f){if(1==f.g)return v(f,Oh(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.j.get(c))e.Ka=new Ge,d.push(e.Ka);d.push(c.remove());return v(f,Promise.all(d),3)}a.j["delete"](c);z(f)})}function Ih(a){for(var b=(a.i?a.i.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,Jh(a,d.initDataType,d.initData);c=t(a.C);for(d=c.next();!d.done;d=c.next())Oh(a,d.value);b.length||a.C.length||a.s.resolve();return a.s}
226
- function Jh(a,b,c){var d=a.j.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(ob(c,e.value.initData)&&!dc("Tizen 2"))return;Ph(a,b,c)}function Qh(a){return a?a.keySystem:""}function Rh(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Sh(a,b){if(navigator.userAgent.match(/Edge\//))return!0;b=b.toLowerCase();if(ec()&&b.includes('codecs="ac-3"')){var c=b.replace("ac-3","ec-3");return a.u.has(b)||a.u.has(c)}return a.u.has(b)}
227
- function Th(a){a=a.j.keys();a=hb(a,function(b){return b.sessionId});return Array.from(a)}q.Rb=function(){var a=Infinity,b=this.j.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.zc=function(){return qh(this.da)};
228
- function Gh(a,b){for(var c=new Set,d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Eh(e.value));for(e=f.next();!e.done;e=f.next())c.add(e.value)}d=t(c);for(e=d.next();!e.done;e=d.next())Fh(e.value,ph(a.o.servers),ph(a.o.advanced||{}));f=a.F?"required":"optional";var g=a.F?["persistent-license"]:["temporary"];d=new Map;c=t(c);for(e=c.next();!e.done;e=c.next())e=e.value,d.set(e.keySystem,{initDataTypes:["cenc"],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:f,
229
- sessionTypes:g,label:e.keySystem,drmInfos:[]});c=t(b);for(e=c.next();!e.done;e=c.next())for(e=e.value,f=t([e.audio,e.video]),e=f.next();!e.done;e=f.next())if(g=e.value){var h=Uh(g),k=null;"ac-3"==g.codecs.toLowerCase()&&ec()&&(k=Uh(g,"ec-3"));var l=t(g.drmInfos);for(e=l.next();!e.done;e=l.next()){var m=e.value;e=d.get(m.keySystem);e.drmInfos.push(m);m.initData&&m.initData.length&&(e.initDataTypes=[].concat(ia(new Set(m.initData.map(function(p){return p.initDataType})))));m.distinctiveIdentifierRequired&&
230
- (e.distinctiveIdentifier="required");m.persistentStateRequired&&(e.persistentState="required");m.sessionType&&(e.sessionTypes=[m.sessionType]);m="audio"==g.type?m.audioRobustness:m.videoRobustness;var n={robustness:m||"",contentType:h};"audio"==g.type?e.audioCapabilities.push(n):e.videoCapabilities.push(n);k&&(m={robustness:m||"",contentType:k},"audio"==g.type?e.audioCapabilities.push(m):e.videoCapabilities.push(m))}}return d}
231
- function Uh(a,b){var c=Pe(a.mimeType,b||a.codecs);return Le(c)?Ne(a.type,c):c}
232
- function Bh(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,x,w;return F(function(y){switch(y.g){case 1:e=new Map;if(d){a:{for(var C=t(c),D=C.next();!D.done;D=C.next()){var A=t(Eh(D.value));for(D=A.next();!D.done;D=A.next()){var E=D.value;e.has(E.keySystem)||e.set(E.keySystem,[]);e.get(E.keySystem).push(E)}}if(1==e.size&&e.has(""))throw new M(2,6,6E3);C=t([!0,!1]);for(A=C.next();!A.done;A=C.next())for(A=A.value,E=t(c),D=E.next();!D.done;D=E.next()){var G=t(D.value.decodingInfos);for(D=G.next();!D.done;D=G.next()){var H=
233
- D.value;if(H.supported&&H.keySystemAccess){D=e.get(H.keySystemAccess.keySystem);var L=t(D);for(D=L.next();!D.done;D=L.next())if(!!D.value.licenseServerUri==A){f=H.keySystemAccess;break a}}}}f=null}y.v(2);break}return v(y,Vh(a,b),3);case 3:f=y.h;case 2:g=f;if(!g)throw new M(2,6,6001);df(a.J);B(y,4);a.u.clear();h=g.getConfiguration();k=h.audioCapabilities||[];l=h.videoCapabilities||[];m=t(k);for(n=m.next();!n.done;n=m.next())p=n.value,a.u.add(p.contentType.toLowerCase());r=t(l);for(n=r.next();!n.done;n=
234
- r.next())u=n.value,a.u.add(u.contentType.toLowerCase());if(d){A=g.keySystem;C=e.get(g.keySystem);E=[];D=[];G=[];H=new Set;Wh(C,E,D,G,H);L=a.F?"persistent-license":"temporary";A={keySystem:A,licenseServerUri:E[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||L,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:D[0],initData:G,keyIds:H};C=t(C);for(E=
235
- C.next();!E.done;E=C.next())E=E.value,E.distinctiveIdentifierRequired&&(A.distinctiveIdentifierRequired=E.distinctiveIdentifierRequired),E.persistentStateRequired&&(A.persistentStateRequired=E.persistentStateRequired);C=A}else C=g.keySystem,A=b.get(g.keySystem),E=[],D=[],G=[],H=new Set,Wh(A.drmInfos,E,D,G,H),C={keySystem:C,licenseServerUri:E[0],distinctiveIdentifierRequired:"required"==A.distinctiveIdentifier,persistentStateRequired:"required"==A.persistentState,sessionType:A.sessionTypes[0]||"temporary",
236
- audioRobustness:(A.audioCapabilities?A.audioCapabilities[0].robustness:"")||"",videoRobustness:(A.videoCapabilities?A.videoCapabilities[0].robustness:"")||"",serverCertificate:D[0],initData:G,keyIds:H};a.i=C;if(!a.i.licenseServerUri)throw new M(2,6,6012,a.i.keySystem);return v(y,g.createMediaKeys(),6);case 6:return x=y.h,df(a.J),a.m=x,a.L=!0,v(y,Kh(a),7);case 7:df(a.J);ua(y,0);break;case 4:w=va(y);df(a.J,w);a.i=null;a.u.clear();if(w instanceof M)throw w;throw new M(2,6,6002,w.message);}})}
237
- function Vh(a,b){var c,d,e,f,g,h,k,l,m,n,p,r;return F(function(u){switch(u.g){case 1:if(1==b.size&&b.has(""))throw new M(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([!0,!1]);h=g.next();case 2:if(h.done){u.v(4);break}k=h.value;l=t(b.keys());m=l.next();case 5:if(m.done){h=g.next();u.v(2);break}n=m.value;p=b.get(n);r=p.drmInfos.some(function(x){return!!x.licenseServerUri});
238
- if(r!=k){u.v(6);break}B(u,8);return v(u,navigator.requestMediaKeySystemAccess(n,[p]),10);case 10:return c=u.h,u["return"](c);case 8:va(u);case 9:df(a.J);case 6:m=l.next();u.v(5);break;case 4:return u["return"](c)}})}
239
- function Ch(a){a=ph(a.o.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=oc(f),h=oc(e);g={kty:"oct",kid:mc(g,!1),k:mc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:qb(Ab(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
240
- sessionType:"",initData:d,keyIds:new Set(c)}}
241
- function Oh(a,b){var c,d,e,f,g;return F(function(h){switch(h.g){case 1:try{c=a.m.createSession("persistent-license")}catch(k){return d=new M(2,6,6005,k.message),a.l(d),h["return"](Promise.reject(d))}a.h.B(c,"message",function(k){a.g&&a.o.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.N?a.I.push(k):Hh(a,k)});a.h.B(c,"keystatuseschange",function(k){return Xh(a,k)});e={initData:null,loaded:!1,yd:Infinity,Ka:null,type:"persistent-license"};a.j.set(c,e);B(h,2);return v(h,c.load(b),4);case 4:f=h.h;df(a.J);
242
- if(!f)return a.j["delete"](c),a.l(new M(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Yh(a)&&a.s.resolve();return h["return"](c);case 2:g=va(h),df(a.J,g),a.j["delete"](c),a.l(new M(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
243
- function Ph(a,b,c){var d=a.i.sessionType;try{var e=a.m.createSession(d)}catch(f){a.l(new M(2,6,6005,f.message));return}a.h.B(e,"message",function(f){a.g&&a.o.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.N?a.I.push(f):Hh(a,f)});a.h.B(e,"keystatuseschange",function(f){return Xh(a,f)});a.j.set(e,{initData:c,loaded:!1,yd:Infinity,Ka:null,type:d});try{c=a.o.initDataTransform(c,b,a.i)}catch(f){b=f;f instanceof M||(b=new M(2,6,6016,f));a.l(b);return}a.o.logLicenseExchange&&mc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.J.g){a.j["delete"](e);
244
- var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.l(new M(2,6,6006,f.message,f,h))}})}function Zh(a,b,c){"skd"==b&&(b=c.serverCertificate,c=nh(a),a=oh(a,c,b));return a}
245
- function Hh(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,x;F(function(w){switch(w.g){case 1:return c=b.target,a.o.logLicenseExchange&&mc(b.message),d=a.j.get(c),e=a.i.licenseServerUri,f=a.o.advanced[a.i.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=fh([e],a.o.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Rh(a.i.keySystem)&&$h(g),h=Date.now(),B(w,2),l=a.D.Ab.request(2,g),v(w,
246
- l.promise,4);case 4:k=w.h;ua(w,3);break;case 2:return m=va(w),n=new M(2,6,6007,m),a.l(n),d&&d.Ka&&d.Ka.reject(n),w["return"]();case 3:if(a.J.g)return w["return"]();a.H+=(Date.now()-h)/1E3;a.o.logLicenseExchange&&mc(k.data);B(w,5);return v(w,c.update(k.data),7);case 7:ua(w,6);break;case 5:return p=va(w),r=new M(2,6,6008,p.message),a.l(r),d&&d.Ka&&d.Ka.reject(r),w["return"]();case 6:u=new P("drmsessionupdate"),a.D.onEvent(u),d&&(d.Ka&&d.Ka.resolve(),x=new N(function(){d.loaded=!0;Yh(a)&&a.s.resolve()}),
247
- x.U(ai)),z(w)}})}function $h(a){var b=xb(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=nc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
248
- function Xh(a,b){var c=b.target,d=a.j.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Rh(a.i.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=tb(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=pc(h);a.qa.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ka&&(a.j["delete"](c),c.close()["catch"](function(){}));
249
- Yh(a)&&(a.s.resolve(),a.S.U(bi))}function th(a){var b=a.qa,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.l(new M(2,6,6014));a.D.Gc(qh(c))}
250
- function ci(){var a,b,c,d,e,f,g,h;return F(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
251
- c],f=new Map,g=function(l){var m,n,p;return F(function(r){switch(r.g){case 1:return B(r,2),v(r,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=r.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,dc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),v(r,m.createMediaKeys(),5);case 5:ua(r,0);break;case 2:va(r),f.set(l,null),z(r)}})},h=a.map(function(l){return g(l)}),v(k,Promise.all(h),2)):k["return"](qh(f))})}
252
- function di(a){var b;return F(function(c){if(1==c.g)return b=new Promise(function(d,e){(new N(e)).U(ei)}),B(c,2),v(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ua(c,0);va(c);z(c)})}
253
- function wh(a){var b;return F(function(c){b=Array.from(a.j.entries());a.j.clear();return v(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return F(function(g){if(1==g.g)return B(g,2),a.pa||a.C.includes(e.sessionId)||"persistent-license"!==f.type?v(g,di(e),5):v(g,e.remove(),5);if(2!=g.g)return ua(g,0);va(g);z(g)})})),0)})}
254
- function gg(a,b){var c=b.audio,d=b.video;if(c&&c.encrypted&&(c=Uh(c),!Sh(a,c))||d&&d.encrypted&&(d=Uh(d),!Sh(a,d)))return!1;var e=Qh(a.i);d=Eh(b);return 0==d.length||d.some(function(f){return f.keySystem==e})}
255
- function fi(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=t(b),g=f.next();!g.done;g=f.next())if(g=g.value,e.keySystem==g.keySystem){f=[];f=f.concat(e.initData||[]);f=f.concat(g.initData||[]);var h=e.keyIds&&g.keyIds?new Set([].concat(ia(e.keyIds),ia(g.keyIds))):e.keyIds||g.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||g.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||
256
- g.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||g.persistentStateRequired,videoRobustness:e.videoRobustness||g.videoRobustness,audioRobustness:e.audioRobustness||g.audioRobustness,serverCertificate:e.serverCertificate||g.serverCertificate,initData:f,keyIds:h});break}}return c}function Eh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
257
- function uh(a){a.j.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 Yh(a){a=a.j.values();return ib(a,function(b){return b.loaded})}
258
- function Dh(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:new Set})});for(var d=t(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
259
- function Wh(a,b,c,d,e){var f={};a=t(a);for(var g=a.next();!g.done;f={ya:f.ya},g=a.next()){f.ya=g.value;b.includes(f.ya.licenseServerUri)||b.push(f.ya.licenseServerUri);f.ya.serverCertificate&&(c.some(function(l){return function(m){return ob(m,l.ya.serverCertificate)}}(f))||c.push(f.ya.serverCertificate));if(f.ya.initData){g={};for(var h=t(f.ya.initData),k=h.next();!k.done;g={ic:g.ic},k=h.next())g.ic=k.value,d.some(function(l){return function(m){var n=l.ic;return m.keyId&&m.keyId==n.keyId?!0:m.initDataType==
260
- n.initDataType&&ob(m.initData,n.initData)}}(g))||d.push(g.ic)}if(f.ya.keyIds)for(g=t(f.ya.keyIds),h=g.next();!h.done;h=g.next())e.add(h.value)}}
261
- function Fh(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
262
- (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var ei=1,ai=5,bi=.5,gi=new ub(function(){return rb(new Uint8Array([0]))});function hi(){}function ii(a,b,c,d){var e,f,g,h;return F(function(k){if(1==k.g){if(d&&(e=ji[d.toLowerCase()]))return k["return"](e);if(f=ki(a))if(g=li[f])return k["return"](g);return d?k.v(2):v(k,mi(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=ji[d]))return k["return"](h);throw new M(2,4,4E3,a);})}
263
- function mi(a,b,c){var d,e,f;return F(function(g){if(1==g.g)return d=fh([a],c),d.method="HEAD",v(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function ki(a){a=(new me(a)).xa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}J("shaka.media.ManifestParser",hi);hi.unregisterParserByMime=function(a){delete ji[a]};hi.registerParserByMime=function(a,b){ji[a]=b};
264
- hi.registerParserByExtension=function(a,b){li[a]=b};var ji={},li={};function ni(a,b,c){this.ma=a;this.ja=b;this.ea=c}ni.prototype.Ub=function(){return this.ja};ni.prototype.Qb=function(){return this.ea};function oi(a,b){return a&&b?a.Ub()==b.Ub()&&a.Qb()==b.Qb()&&yc(a.ma(),b.ma()):a==b}J("shaka.media.InitSegmentReference",ni);ni.prototype.getEndByte=ni.prototype.Qb;ni.prototype.getStartByte=ni.prototype.Ub;
265
- function pi(a,b,c,d,e,f,g,h,k,l){l=void 0===l?[]:l;this.startTime=a;this.j=this.endTime=b;this.i=c;this.ja=d;this.ea=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l}q=pi.prototype;q.ma=function(){return this.i()};q.cf=function(){return this.startTime};q.Qe=function(){return this.endTime};q.Ub=function(){return this.ja};q.Qb=function(){return this.ea};J("shaka.media.SegmentReference",pi);pi.prototype.getEndByte=pi.prototype.Qb;pi.prototype.getStartByte=pi.prototype.Ub;
266
- pi.prototype.getEndTime=pi.prototype.Qe;pi.prototype.getStartTime=pi.prototype.cf;pi.prototype.getUris=pi.prototype.ma;function S(a,b,c){this.j=a;this.Jc=b;this.m=this.l=Infinity;this.g=1;this.h=this.i=null;this.s=0;this.u=!0;this.C=0;this.F=void 0===c?!0:c;this.H=0}q=S.prototype;q.getDuration=function(){return this.l};q.We=function(){return this.g};q.Ja=function(a){this.l=a};q.bf=function(){return this.j};q.re=function(a){this.s=a};q.cc=function(a){this.u=a};q.Nd=function(a){this.m=a};q.If=function(a){this.Jc=a};q.Pe=function(){return this.Jc};
267
- q.Bb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.wd(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.j&&this.F&&(this.j=(Date.now()+this.s)/1E3-this.h-this.g)}};q.wd=function(a){this.i=null==this.i?a:Math.min(this.i,a)};q.vd=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.i&&(this.i+=a);null!=this.h&&(this.h+=a)};q.Y=function(){return Infinity==this.l&&!this.u};
268
- q.kb=function(){return Infinity!=this.l&&!this.u};q.Za=function(){return Math.max(this.C,this.gb()-this.m)};q.se=function(a){this.C=a};q.gb=function(){return this.Y()||this.kb()?Math.min(Math.max(0,(Date.now()+this.s)/1E3-this.g-this.j)+this.H,this.l):this.h||this.l};q.Tb=function(a){var b=Math.max(this.i,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.gb()-this.m+a,this.Qa()))};q.xb=function(){return this.Tb(0)};
269
- q.Qa=function(){return Math.max(0,this.gb()-(this.Y()||this.kb()?this.Jc:0))};q.ve=function(){return null==this.j||null!=this.h&&this.F?!1:!0};q.qe=function(a){this.H=a};J("shaka.media.PresentationTimeline",S);S.prototype.setAvailabilityTimeOffset=S.prototype.qe;S.prototype.usingPresentationStartTime=S.prototype.ve;S.prototype.getSeekRangeEnd=S.prototype.Qa;S.prototype.getSeekRangeStart=S.prototype.xb;S.prototype.getSafeSeekRangeStart=S.prototype.Tb;S.prototype.getSegmentAvailabilityEnd=S.prototype.gb;
270
- S.prototype.setUserSeekStart=S.prototype.se;S.prototype.getSegmentAvailabilityStart=S.prototype.Za;S.prototype.isInProgress=S.prototype.kb;S.prototype.isLive=S.prototype.Y;S.prototype.offset=S.prototype.offset;S.prototype.notifyMaxSegmentDuration=S.prototype.vd;S.prototype.notifyMinSegmentStartTime=S.prototype.wd;S.prototype.notifySegments=S.prototype.Bb;S.prototype.getDelay=S.prototype.Pe;S.prototype.setDelay=S.prototype.If;S.prototype.setSegmentAvailabilityDuration=S.prototype.Nd;
271
- S.prototype.setStatic=S.prototype.cc;S.prototype.setClockOffset=S.prototype.re;S.prototype.getPresentationStartTime=S.prototype.bf;S.prototype.setDuration=S.prototype.Ja;S.prototype.getMaxSegmentDuration=S.prototype.We;S.prototype.getDuration=S.prototype.getDuration;function qi(a,b){this.j=a;this.m=ri(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.s=b;this.i=function(){}}qi.prototype.release=function(){this.j=null;this.i=function(){}};function si(a,b){a.i=b}function ti(a){this.g=a}function ri(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(je(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 ui(a,b,c,d,e){var f=this;this.g=a;this.C=b;this.o=c;this.u=e;this.h=new gf;this.s=!1;this.F=a.readyState;this.j=!1;this.i=d;this.m=!1;this.h.B(a,"waiting",function(){return vi(f)});this.l=(new N(function(){vi(f)})).Ca(.25)}ui.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.l&&(this.l.stop(),this.l=null);this.i&&(this.i.release(),this.i=null);this.g=this.C=this.u=null};ui.prototype.zd=function(){this.m=!0;vi(this)};
272
- function vi(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.s)return}else a.s=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.F&&(a.j=!1,a.F=a.g.readyState);var b;if(!(b=!a.i)){b=a.i;var c=b.j,d=ri(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.s&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){var g=a.o.smallGapLimit;e=a.g.currentTime;b=a.g.buffered;c=ke(b,e,a.o.gapDetectionThreshold);if(!(null==
273
- c||0==c&&!a.m||(d=b.start(c),d>=a.C.Qa()))){f=d-e;g=f<=g;var h=!1;.001>f||(g||a.j||(a.j=!0,e=new P("largegap",{currentTime:e,gapSize:f}),e.cancelable=!0,a.u(e),a.o.jumpLargeGaps&&!e.defaultPrevented&&(h=!0)),!g&&!h)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function wi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=xi.value().get(b),c.va(a,b,d))}var xi=new ub(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function yi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new gf;this.i=new zi(a);wi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ai(d,d.j)})}yi.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 Bi(a){return a.m?a.g.currentTime:a.j}function Ci(a,b){0<a.g.readyState?Di(a.i,b):wi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ai(a,a.j)})}
274
- function Ai(a,b){.001>Math.abs(a.g.currentTime-b)?Ei(a):(a.h.va(a.g,"seeking",function(){Ei(a)}),Di(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Ei(a){a.m=!0;a.h.B(a.g,"seeking",function(){return a.l()})}function zi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new N(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}zi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
275
- function Di(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ca(.1)};function Fi(a){function b(){null==c.i||0==c.i?c.j=!0:(c.h.va(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.i))}var c=this;this.g=a;this.j=!1;this.i=null;this.h=new gf;wi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,function(){b()})}Fi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.g=null};Fi.prototype.m=function(a){this.i=this.j?this.i:a};Fi.prototype.l=function(){return(this.j?this.g.currentTime:this.i)||0};Fi.prototype.F=function(){};
276
- function Gi(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.H=b.minBufferTime||0;this.o=c;this.C=e;this.u=null;this.j=new ui(a,b.presentationTimeline,c,Hi(a,c),f);this.h=new yi(a,function(){a:{var h=g.j;h.s=!0;h.m=!1;h.j=!1;var k=Bi(g.h);h=Ii(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;Ci(g.h,h);h=void 0;break a}g.C();h=void 0}return h},Ji(this,d));this.s=(new N(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Bi(g.h),k=g.g.xb(),l=g.g.Qa();3>l-k&&(k=
277
- l-3);h<k&&(h=Ii(g,h),g.i.currentTime=h)}})).Ca(.25)}Gi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.s&&(this.s.stop(),this.s=null);this.i=this.h=this.g=this.o=null;this.C=function(){}};Gi.prototype.m=function(a){Ci(this.h,a)};Gi.prototype.l=function(){var a=Bi(this.h);return 0<this.i.readyState&&!this.i.paused?Ki(this,a):a};
278
- function Ji(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.xb():a.g.Qa():0>b&&(b=a.g.Qa()+b);return Li(a,Ki(a,b))}Gi.prototype.F=function(){this.j.zd()};function Li(a,b){var c=a.g.getDuration();return b>=c?c-a.o.durationBackoff:b}function Ii(a,b){var c=Math.max(a.H,a.o.rebufferingGoal),d=a.o.safeSeekOffset,e=a.g.xb(),f=a.g.Qa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Tb(c),k=a.g.Tb(d);c=a.g.Tb(c+d);return b>=g?Li(a,b):b>f?f:b<e?he(a.i.buffered,k)?k:c:b>=h||he(a.i.buffered,b)?b:c}
279
- function Ki(a,b){var c=a.g.xb();if(b<c)return c;c=a.g.Qa();return b>c?c:b}function Hi(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new qi(new ti(a),b.stallThreshold);si(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function U(a){this.g=a;this.h=null;this.i=0;this.j=!1}q=U.prototype;q.destroy=function(){Hb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.j||(this.g=[],this.h&&this.h.stop(),this.h=null)};q.mf=function(){this.j=!0};
280
- q.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};q.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.j)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
281
- q.Ec=function(a){!this.j&&a.length&&(this.g=this.g.filter(function(b){return b.startTime<a[0].startTime}),this.g.push.apply(this.g,ia(a)))};q.zb=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.Ec(a);this.eb(b)};q.eb=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}};
282
- q.Ya=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 pi(a.startTime,b,a.i,a.ja,a.ea,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd))}};
283
- q.Mc=function(a,b){var c=this;this.j||(this.h&&this.h.stop(),this.h=new N(function(){var d=b();d?c.g.push.apply(c.g,ia(d)):(c.h.stop(),c.h=null)}),this.h.Ca(a))};U.prototype[Symbol.iterator]=function(){return this.wb(0)};U.prototype.wb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Mi(this,b,d)};
284
- function Ni(a,b,c){return new U([new pi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}J("shaka.media.SegmentIndex",U);U.forSingleSegment=Ni;U.prototype.getIteratorForTime=U.prototype.wb;U.prototype.updateEvery=U.prototype.Mc;U.prototype.fit=U.prototype.Ya;U.prototype.evict=U.prototype.eb;U.prototype.mergeAndEvict=U.prototype.zb;U.prototype.merge=U.prototype.Ec;U.prototype.offset=U.prototype.offset;U.prototype.get=U.prototype.get;U.prototype.find=U.prototype.find;U.prototype.markImmutable=U.prototype.mf;
285
- U.prototype.release=U.prototype.release;U.prototype.destroy=U.prototype.destroy;function Mi(a,b,c){this.i=a;this.h=b;this.g=c}Mi.prototype.seek=function(a){Hb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.wb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
286
- Mi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.ma().length&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};Mi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.g.length?(this.g++,a.ma().length&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};J("shaka.media.SegmentIterator",Mi);Mi.prototype.next=Mi.prototype.next;Mi.prototype.current=Mi.prototype.current;
287
- Mi.prototype.seek=Mi.prototype.seek;function Oi(){U.call(this,[]);this.l=[]}pa(Oi,U);q=Oi.prototype;q.clone=function(){var a=new Oi;a.l=this.l.slice();return a};q.release=function(){for(var a=t(this.l),b=a.next();!b.done;b=a.next())b.value.release();this.l=[]};q.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};
288
- q.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};q.offset=function(){};q.Ec=function(){};q.eb=function(){};q.zb=function(){};q.Ya=function(){};q.Mc=function(){};J("shaka.media.MetaSegmentIndex",Oi);Oi.prototype.updateEvery=Oi.prototype.Mc;Oi.prototype.fit=Oi.prototype.Ya;Oi.prototype.mergeAndEvict=Oi.prototype.zb;Oi.prototype.evict=Oi.prototype.eb;Oi.prototype.merge=Oi.prototype.Ec;
289
- Oi.prototype.offset=Oi.prototype.offset;Oi.prototype.get=Oi.prototype.get;Oi.prototype.find=Oi.prototype.find;Oi.prototype.release=Oi.prototype.release;function Pi(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Bc();this.h=new N(function(){b.g.he(.25*b.i)})}Pi.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Pi.prototype.set=function(a){this.i=a;Qi(this)};Pi.prototype.yc=function(){return this.g.yc()};function Qi(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Bc()!=b&&a.g.Md(b);return}catch(c){}a.h.Ca(.25);0!=a.g.Bc()&&a.g.Md(0)};function Ri(a){var b=this;this.h=a;this.g=new Set;this.i=(new N(function(){Si(b,!1)})).Ca(.25)}Ri.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()};
290
- function Si(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.h.currentTime,f=b,g=t(d.l.g),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.j.get(h),l=e<h.startTime?Ti:e>h.endTime?Ui:Vi;d.j.set(h,l);for(var m=t(d.m),n=m.next();!n.done;n=m.next())n=n.value,n.rb==k&&n.qb==l&&n.jb(h,f)}}};function Wi(a){var b=this;this.h=function(){};this.g=new Set;this.j=a;this.i=(new N(function(){for(var c=b.j(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&b.g["delete"](e)})).Ca(2)}Wi.prototype.release=function(){this.h=function(){};this.g.clear();this.i.stop()};function Xi(a,b){a.h=b};function Yi(a){var b=this;this.l=a;this.j=new Map;this.g=function(){};this.h=function(){};this.i=function(){};this.m=[{rb:null,qb:Vi,jb:function(c,d){return b.g(c,d)}},{rb:Ti,qb:Vi,jb:function(c,d){return b.g(c,d)}},{rb:Ui,qb:Vi,jb:function(c,d){return b.g(c,d)}},{rb:Vi,qb:Ti,jb:function(c,d){return b.h(c,d)}},{rb:Vi,qb:Ui,jb:function(c,d){return b.h(c,d)}},{rb:Ti,qb:Ui,jb:function(c,d){return b.i(c,d)}},{rb:Ui,qb:Ti,jb:function(c,d){return b.i(c,d)}}]}
291
- Yi.prototype.release=function(){this.l=null;this.j.clear();this.g=function(){};this.h=function(){};this.i=function(){}};function Zi(a,b,c,d){a.g=b;a.h=c;a.i=d}var Ti=1,Vi=2,Ui=3;function $i(a,b,c,d,e){a=fh(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function aj(a,b){var c=this;this.D=b;this.A=a;this.o=null;this.l=1;this.i=this.h=null;this.g=new Map;this.m=!1;this.s=null;this.j=!1;this.J=new cf(function(){return bj(c)})}aj.prototype.destroy=function(){return this.J.destroy()};function bj(a){var b,c,d,e;return F(function(f){if(1==f.g){b=[];c=t(a.g.values());for(d=c.next();!d.done;d=c.next())e=d.value,cj(e),b.push(dj(e));return v(f,Promise.all(b),2)}a.g.clear();a.D=null;a.A=null;a.o=null;z(f)})}
292
- aj.prototype.configure=function(a){this.o=a;this.s=new Ng({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)};aj.prototype.start=function(){var a=this;return F(function(b){if(1==b.g)return v(b,ej(a),2);df(a.J);a.m=!0;z(b)})};
293
- function fj(a,b){var c,d,e,f,g,h;F(function(k){switch(k.g){case 1:return c=Fe,B(k,2),v(k,Ff(a.D.R,c.aa),4);case 4:ua(k,3);break;case 2:if(d=va(k),a.D)a.D.onError(d);case 3:e=Pe(b.mimeType,b.codecs);sf(a.D.R,e);f=a.D.R.m;if(g=f.isTextVisible()||a.o.alwaysStreamText)h=gj(b),a.g.set(c.aa,h),hj(a,h,0);z(k)}})}function ij(a){var b=a.g.get(Ee);b&&(cj(b),dj(b)["catch"](function(){}),a.g["delete"](Ee));a.i=null}
294
- function jj(a,b){var c=a.g.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.nb&&(kj(a,e,!1,0,!1),c.nb=d)}else if(d=c.nb)c.nb=null,kj(a,d,!0,0,!1)}}function lj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.h=b;a.m&&(b.video&&kj(a,b.video,c,d,e),b.audio&&kj(a,b.audio,c,d,e))}function mj(a,b){a.i=b;a.m&&kj(a,b,!0,0,!1)}
295
- function kj(a,b,c,d,e){var f=a.g.get(b.type);f||b.type!=Ee?f&&(f.nb&&(b.trickModeVideo?(f.nb=b,b=b.trickModeVideo):f.nb=null),f.stream!=b||e)&&(b.type==Ee&&sf(a.D.R,Pe(b.mimeType,b.codecs)),f.stream=b,f.ca=null,c&&(f.Ob?f.Pc=!0:f.Ra?(f.pb=!0,f.uc=d,f.Pc=!0):(cj(f),nj(a,f,!0,d)["catch"](function(g){if(a.D)a.D.onError(g)}))),oj(a,f)["catch"](function(g){if(a.D)a.D.onError(g)})):fj(a,b)}
296
- function oj(a,b){var c,d;return F(function(e){if(1==e.g){if(!b.wa)return e["return"]();c=b.stream;d=b.wa;return c.segmentIndex?e.v(2):v(e,c.createSegmentIndex(),2)}if(b.wa!=d||b.stream!=c)return e["return"]();var f=a.D.Ac();var g=yf(a.D.R,b.type),h=b.stream.segmentIndex.find(b.Ba?b.Ba.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ea?k.ea-k.ja:null:null;k&&!h&&(h=(k.endTime-k.startTime)*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.ea?k.ea-k.ja:null)||0),k=a.D.getBandwidthEstimate(),
297
- f=8*h/k<(g||0)-f-Math.max(a.A.minBufferTime||0,a.o.rebufferingGoal)||b.wa.h.g>h?!0:!1):f=!1;f&&b.wa.abort();z(e)})}function pj(a,b){b.Ob||b.pb||(b.Ra?(b.pb=!0,b.uc=0):null==wf(a.D.R,b.type)?null==b.La&&hj(a,b,0):(cj(b),nj(a,b,!1,0)["catch"](function(c){if(a.D)a.D.onError(c)})))}
298
- function ej(a){var b,c,d,e,f,g,h,k,l,m;return F(function(n){if(1==n.g){b=Fe;if(!a.h)throw new M(2,5,5006);c=new Map;d=new Set;a.h.audio&&(c.set(b.bb,a.h.audio),d.add(a.h.audio));a.h.video&&(c.set(b.Na,a.h.video),d.add(a.h.video));a.i&&(c.set(b.aa,a.i),d.add(a.i));e=a.D.R;f=a.o.forceTransmuxTS;return v(n,e.init(c,f),2)}df(a.J);var p=a.A.presentationTimeline.getDuration();Infinity>p?a.D.R.Ja(p):a.D.R.Ja(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.g.has(k)||
299
- (m=gj(l),a.g.set(k,m),hj(a,m,0));z(n)})}function gj(a){return{stream:a,type:a.type,ca:null,Ba:null,Dc:null,sd:null,rd:null,qd:null,nb:null,endOfStream:!1,Ra:!1,La:null,pb:!1,uc:0,Pc:!1,Ob:!1,Dd:!1,Vb:!1,wa:null}}
300
- aj.prototype.Yb=function(a){var b=this,c,d,e,f,g;return F(function(h){switch(h.g){case 1:df(b.J);if(a.Ra||null==a.La||a.Ob)return h["return"]();a.La=null;if(!a.pb){h.v(2);break}return v(h,nj(b,a,a.Pc,a.uc),3);case 3:return h["return"]();case 2:if(a.stream.segmentIndex){h.v(4);break}c=a.stream;return v(h,a.stream.createSegmentIndex(),5);case 5:if(c!=a.stream)return null==a.La&&hj(b,a,0),h["return"]();case 4:B(h,6);d=qj(b,a);null!=d&&(hj(b,a,d),a.Vb=!1);ua(h,7);break;case 6:return e=va(h),v(h,rj(b,
301
- e),8);case 8:return h["return"]();case 7:f=Array.from(b.g.values());if(!b.m||!f.every(function(k){return k.endOfStream})){h.v(0);break}return v(h,b.D.R.endOfStream(),10);case 10:df(b.J),g=b.D.R.getDuration(),0!=g&&g<b.A.presentationTimeline.getDuration()&&b.A.presentationTimeline.Ja(g),z(h)}})};
302
- function qj(a,b){if(sj(b))return Df(a.D.R,b.stream.originalId||""),null;b.type==Ee&&Ef(a.D.R);var c=a.D.Ac(),d=b.Ba?b.Ba.endTime:c,e=zf(a.D.R,b.type,c),f=Math.max(a.A.minBufferTime||0,a.o.rebufferingGoal,a.o.bufferingGoal)*a.l;if(d>=a.A.presentationTimeline.getDuration())return b.endOfStream=!0,"video"==b.type&&(c=a.g.get(Ee))&&sj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return.5;e=yf(a.D.R,b.type);e=tj(a,b,c,e);if(!e)return 1;f=Infinity;var g=Array.from(a.g.values());g=t(g);for(var h=
303
- g.next();!h.done;h=g.next())h=h.value,sj(h)||h.ca&&!h.ca.current()||(f=Math.min(f,h.Ba?h.Ba.endTime:c));if(d>=f+a.A.presentationTimeline.g)return 1;uj(a,b,c,e)["catch"](function(){});return null}
304
- function tj(a,b,c,d){if(b.ca)return b.ca.current();if(b.Ba||d)return b.ca=b.stream.segmentIndex.wb(b.Ba?b.Ba.endTime:d),b.ca&&b.ca.next().value;a=a.o.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ca=b.stream.segmentIndex.wb(d),e=b.ca&&b.ca.next().value);e||(b.ca=b.stream.segmentIndex.wb(c),e=b.ca&&b.ca.next().value);return e}
305
- function uj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,x;return F(function(w){switch(w.g){case 1:return e=Fe,f=b.stream,g=b.ca,b.Ra=!0,B(w,2),v(w,vj(a,b,d),4);case 4:df(a.J);if(a.j)return w["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.o.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(y){var C,D,A;return F(function(E){df(a.J);if(a.j)return E["return"]();n=wj(n,y);C=!1;D=0;(new Pb).box("mdat",function(G){D=G.size+G.start;C=!0}).parse(n,!1,!0);if(!C)return E.v(0);
306
- A=n.subarray(0,D);n=n.subarray(D);return v(E,xj(a,b,c,f,d,A),0)})},v(w,yj(a,b,d,p),6);l=yj(a,b,d);return v(w,l,7);case 7:return m=w.h,df(a.J),a.j?w["return"]():b.pb?(b.Ra=!1,hj(a,b,0),w["return"]()):v(w,xj(a,b,c,f,d,m),6);case 6:df(a.J);if(a.j)return w["return"]();b.Ba=d;g.next();b.Ra=!1;b.Dd=!1;r=a.D.R.xc();u=r[b.type];ab(JSON.stringify(u));b.pb||a.D.zd();hj(a,b,0);ua(w,0);break;case 2:x=va(w);df(a.J,x);if(a.j)return w["return"]();b.Ra=!1;if(7001==x.code)b.Ra=!1,b.La=null,hj(a,b,0),w.v(0);else if(b.type==
307
- e.aa&&a.o.ignoreTextStreamFailures)a.g["delete"](e.aa),w.v(0);else if(3017==x.code)zj(a,b,x),w.v(0);else if(1001==x.code&&x.data&&404==x.data[1])b.Ra=!1,b.La=null,hj(a,b,1),w.v(0);else return b.Vb=!0,x.severity=2,v(w,rj(a,x),0)}})}function wj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
308
- function zj(a,b,c){if(!Array.from(a.g.values()).some(function(e){return e!=b&&e.Dd})){var d=Math.round(100*a.l);if(20<d)a.l-=.2;else if(4<d)a.l-=.04;else{b.Vb=!0;a.j=!0;a.D.onError(c);return}b.Dd=!0}hj(a,b,4)}
309
- function vj(a,b,c){var d,e,f,g,h,k,l;return F(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.sd||e!=b.rd||f!=b.qd)h=function(){var n;return F(function(p){if(1==p.g)return B(p,2),b.rd=e,b.qd=f,b.sd=g,v(p,Gf(a.D.R,b.type,g,e,f),4);if(2!=p.g)return ua(p,0);n=va(p);b.rd=null;b.qd=null;b.sd=null;throw n;})},d.push(h());!oi(c.h,b.Dc)&&(b.Dc=c.h)&&(k=yj(a,b,c.h),l=function(){var n,p,r;return F(function(u){switch(u.g){case 1:return B(u,2),v(u,k,4);
310
- case 4:return n=u.h,df(a.J),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,v(u,Af(a.D.R,b.type,n,null,null,p),5);case 5:ua(u,0);break;case 2:throw r=va(u),b.Dc=null,r;}})},d.push(l()));return v(m,Promise.all(d),0)})}
311
- function xj(a,b,c,d,e,f){var g;return F(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new Pb).T("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.$b();var n=k.reader.$b();var p=k.reader.M();var r=k.reader.M();var u=k.reader.M();var x=k.reader.M();var w=e.startTime+r/p}else p=k.reader.M(),w=k.reader.Fb()/p+e.timestampOffset,r=w-e.startTime,u=k.reader.M(),x=k.reader.M(),m=k.reader.$b(),n=k.reader.$b();
312
- k=k.reader.$a(k.reader.P.byteLength-k.reader.Z());l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.D.rf():(l=new P(Aj,{detail:{startTime:w,endTime:w+u/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:r,eventDuration:u,id:x,messageData:k}}),a.D.onEvent(l)))}).parse(f),v(h,Bj(a,b,c),2);if(3!=h.g)return df(a.J),v(h,Af(a.D.R,b.type,f,e.startTime,e.endTime,g),3);df(a.J);z(h)})}
313
- function Bj(a,b,c){var d,e,f,g;return F(function(h){if(1==h.g){d=Math.max(a.o.bufferBehind,a.A.presentationTimeline.g);e=wf(a.D.R,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():v(h,a.D.R.remove(b.type,e,e+g),2)}df(a.J);z(h)})}function sj(a){return a&&a.type==Ee&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
314
- function yj(a,b,c,d){var e,f,g,h;return F(function(k){if(1==k.g)return e=lh,f=$i(c.ma(),c.ja,c.ea,a.o.retryParameters,d),g=a.D.Ab.request(e,f),b.wa=g,v(k,g.promise,2);h=k.h;b.wa=null;return k["return"](h.data)})}
315
- function nj(a,b,c,d){var e,f;return F(function(g){if(1==g.g)return b.pb=!1,b.Pc=!1,b.uc=0,b.Ob=!0,b.Ba=null,b.Dc=null,b.ca=null,d?(e=a.D.Ac(),f=a.D.R.getDuration(),v(g,a.D.R.remove(b.type,e+d,f),3)):v(g,Ff(a.D.R,b.type),4);if(3!=g.g)return df(a.J),c?v(g,a.D.R.flush(b.type),3):g.v(3);df(a.J);b.Ob=!1;b.endOfStream=!1;hj(a,b,0);z(g)})}
316
- function hj(a,b,c){var d=b.type;if(d!=Ee||a.g.has(d))b.La=(new Zb(function(){var e;return F(function(f){if(1==f.g)return B(f,2),v(f,a.Yb(b),4);if(2!=f.g)return ua(f,0);e=va(f);if(a.D)a.D.onError(e);z(f)})})).U(c)}function cj(a){null!=a.La&&(a.La.stop(),a.La=null)}function dj(a){return F(function(b){return a.wa?v(b,a.wa.abort(),0):b.v(0)})}function rj(a,b){return F(function(c){if(1==c.g)return v(c,Pg(a.s),2);df(a.J);a.D.onError(b);b.handled||a.o.failureCallback(b);z(c)})};function Cj(a,b){var c=Dj(),d=this;this.j=b;this.i=a;this.l=c;this.s=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Ej(d)});this.J=new cf(function(){return Fj(d)})}Cj.prototype.destroy=function(){return this.J.destroy()};function Fj(a){var b,c,d;return F(function(e){if(1==e.g)return a.h&&a.h.abort(),Gj(a),v(e,a.u,2);a.g&&a.g.Ha.lb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ha.lb();a.g=null;a.m=[];a.j=null;z(e)})}
317
- function Hj(a,b){var c={Cb:function(){},Fc:function(){},lb:function(){},onError:function(){},Hc:function(){},vg:function(){}};a.m.push({create:b,Ha:c});a.h&&a.h.abort();Gj(a);return c}
318
- function Ej(a){return F(function(b){if(a.J.g)b=b.v(0);else{if(0==a.m.length||a.g&&!a.g.ib)var c=!1;else{a.g&&(a.g.Ha.lb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ha.Cb(),a.g={node:d.node,payload:d.payload,ib:d.ib,Ha:c.Ha}):c.Ha.Hc();c=!0}c?c=Promise.resolve():a.g?c=Ij(a):(a.j.qf(a.i),a.s=new Ge,c=a.s);b=v(b,c,1)}return b})}
319
- function Ij(a){var b,c;return F(function(d){switch(d.g){case 1:return a.i=a.j.Ye(a.i,a.l,a.g.node,a.g.payload),B(d,2),a.h=a.j.Me(a.i,a.l,a.g.payload),v(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ha.Fc(),a.g=null);ua(d,0);break;case 2:b=va(d);if(7001==b.code)a.g.Ha.lb();else a.g.Ha.onError(b);a.g=null;a.h=null;c=a;return v(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function Gj(a){a.s&&(a.s.resolve(),a.s=null)};function Jj(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Jj.prototype;q.remove=function(a,b){if(!this.g)return!1;Kj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
320
- q.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(n,p){return n+"<"+p+">"},"");h=h.reduceRight(function(n,p){return n+"</"+p+">"},"");return g.lineBreak||g.spacer?(g.spacer&&Hb("shaka.extern.Cue","Please use lineBreak instead of spacer."),"\n"):g.nestedCues.length?g.nestedCues.map(b).join(""):k+g.payload+h}var c=a.map(function(g){if(g.nestedCues.length){var h=
321
- g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):[];var e={};c=t(c);for(var f=c.next();!f.done;e={sb:e.sb},f=c.next())e.sb=f.value,a.some(function(g){return function(h){return h.startTime==g.sb.startTime&&h.endTime==g.sb.endTime&&h.text==g.sb.payload?!0:!1}}(e))||(f=Lj(e.sb))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-
322
- d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=t(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};q.destroy=function(){this.g&&(Kj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
323
- function Lj(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}
324
- function Kj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}J("shaka.text.SimpleTextDisplayer",Jj);Jj.prototype.setTextVisibility=Jj.prototype.setTextVisibility;Jj.prototype.isTextVisible=Jj.prototype.isTextVisible;Jj.prototype.destroy=Jj.prototype.destroy;Jj.prototype.append=Jj.prototype.append;Jj.prototype.remove=Jj.prototype.remove;function Mj(){}function Nj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}J("shaka.util.Dom",Mj);Mj.removeAllChildren=Nj;function Oj(a,b){var c=this;this.m=!1;this.l=[];this.g=a;this.u=b;this.i=document.createElement("div");this.i.classList.add("shaka-text-container");this.i.style.textAlign="center";this.i.style.display="flex";this.i.style.flexDirection="column";this.i.style.alignItems="center";this.i.style.justifyContent="flex-end";this.u.appendChild(this.i);this.C=(new N(function(){Pj(c)})).Ca(.25);this.j=new Map;this.h=new gf;this.h.B(document,"fullscreenchange",function(){Pj(c,!0)});this.s=null;"ResizeObserver"in
325
- window&&(this.s=new ResizeObserver(function(){Pj(c,!0)}),this.s.observe(this.i))}q=Oj.prototype;q.append=function(a){var b=[].concat(ia(this.l)),c={};a=t(a);for(var d=a.next();!d.done;c={fc:c.fc},d=a.next())c.fc=d.value,b.some(function(e){return function(f){return Kc(f,e.fc)}}(c))||this.l.push(c.fc);Pj(this)};
326
- q.destroy=function(){this.u.removeChild(this.i);this.i=null;this.m=!1;this.l=[];this.C&&this.C.stop();this.j.clear();this.h&&(this.h.release(),this.h=null);this.s&&(this.s.disconnect(),this.s=null)};q.remove=function(a,b){if(!this.i)return!1;this.l=this.l.filter(function(c){return c.startTime<a||c.endTime>=b});Pj(this);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};
327
- function Qj(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;var l=a.j.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.xe:null;l&&(g.push(l.Ud),m||(f=!0,a.j["delete"](k),l=null));m&&(h.push(k),l||(Rj(a,k,e),l=a.j.get(k),n=l.xe,f=!0));0<k.nestedCues.length&&n&&Qj(a,k.nestedCues,n,d,!0)}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(p,r){return p.startTime!=r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(k=h.next();!k.done;k=
328
- h.next())d=a.j.get(k.value),c.appendChild(d.Ud)}}function Pj(a,b){if(a.i){var c=a.g.currentTime;(!a.m||(void 0===b?0:b))&&0<a.j.size&&(Nj(a.i),a.j.clear());if(a.m){for(var d=new Map,e=t(a.j.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.j.get(f));Qj(a,a.l,a.i,c,!1)}}}
329
- function Rj(a,b,c){var d=c?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Hb("shaka.extern.Cue","Please use lineBreak instead of spacer."),d="br";var e=document.createElement(d);"br"!=d&&Sj(a,e,b,c);d=e;!c&&b.nestedCues.length&&(d=document.createElement("span"),d.classList.add("shaka-text-wrapper"),e.appendChild(d));a.j.set(b,{Ud:e,xe:d})}
330
- function Sj(a,b,c,d){var e=b.style,f=0==c.nestedCues.length;e.whiteSpace="pre-wrap";var g=c.payload.replace(/\s+$/g,function(h){return"\u00a0".repeat(h.length)});d?b.textContent=g:g.length&&(e=document.createElement("span"),e.textContent=g,b.appendChild(e),e=e.style);e.backgroundColor=c.backgroundColor;e.border=c.border;e.color=c.color;e.direction=c.direction;e.opacity=c.opacity;e.paddingLeft=Tj(c.linePadding,c,a.u);e.paddingRight=Tj(c.linePadding,c,a.u);c.backgroundImage&&(e.backgroundImage="url('"+
331
- c.backgroundImage+"')",e.backgroundRepeat="no-repeat",e.backgroundSize="contain",e.backgroundPosition="center",""==c.backgroundColor&&(e.backgroundColor="transparent"));d?e.display="inline":(e.display="flex",e.flexDirection="column",e.alignItems="center",e.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");f||(e.margin="0");e.fontFamily=c.fontFamily;e.fontWeight=c.fontWeight.toString();e.fontStyle=c.fontStyle;e.letterSpacing=c.letterSpacing;e.fontSize=
332
- Tj(c.fontSize,c,a.u);c.line?1==c.lineInterpretation&&(e.position="absolute",c.writingMode==Ec?c.lineAlign==Gc?e.top=c.line+"%":"end"==c.lineAlign&&(e.bottom=c.line+"%"):"vertical-lr"==c.writingMode?c.lineAlign==Gc?e.left=c.line+"%":"end"==c.lineAlign&&(e.right=c.line+"%"):c.lineAlign==Gc?e.right=c.line+"%":"end"==c.lineAlign&&(e.left=c.line+"%")):c.region&&c.region.id&&(!d&&!f||c.backgroundImage)&&(a=c.region.widthUnits==Rc?"%":"px",b=c.region.viewportAnchorUnits==Rc?"%":"px",e.height=c.region.height+
333
- (c.region.heightUnits==Rc?"%":"px"),e.width=c.region.width+a,e.position="absolute",e.top=c.region.viewportAnchorY+b,e.left=c.region.viewportAnchorX+b);e.lineHeight=c.lineHeight;c.position&&(c.writingMode==Ec?e.paddingLeft=c.position:e.paddingTop=c.position);"line-left"==c.positionAlign?e.cssFloat="left":"line-right"==c.positionAlign&&(e.cssFloat="right");e.textAlign=c.textAlign;e.textDecoration=c.textDecoration.join(" ");e.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&
334
- e.writingMode==c.writingMode||(e.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Ec?e.width=c.size+"%":e.height=c.size+"%")}function Tj(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),Mf:d[2]}:null;if(!d)return a;var e=d.value;switch(d.Mf){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}J("shaka.text.UITextDisplayer",Oj);Oj.prototype.setTextVisibility=Oj.prototype.setTextVisibility;
335
- Oj.prototype.isTextVisible=Oj.prototype.isTextVisible;Oj.prototype.remove=Oj.prototype.remove;Oj.prototype.destroy=Oj.prototype.destroy;Oj.prototype.append=Oj.prototype.append;function Uj(a){function b(f){var g=[],h=700<=f.fontWeight,k="italic"==f.fontStyle,l=f.textDecoration.includes("underline");h&&g.push("b");k&&g.push("i");l&&g.push("u");h=g.reduce(function(m,n){return m+"<"+n+">"},"");g=g.reduceRight(function(m,n){return m+"</"+n+">"},"");return f.lineBreak||f.spacer?(f.spacer&&Hb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):f.nestedCues.length?f.nestedCues.map(b).join(""):h+f.payload+g}var c=a.map(function(f){if(f.nestedCues.length){var g=f.clone();
336
- g.nestedCues=[];g.payload=b(f);return g}return f});a="WEBVTT\n\n";c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=function(f){var g=Math.floor(f/3600),h=Math.floor(f/60%60),k=Math.floor(f%60);f=Math.floor(1E3*f%1E3);return(10>g?"0":"")+g+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>f?10>f?"00":"0":"")+f};a+=e(d.startTime)+" --\x3e "+e(d.endTime)+"\n";a+=d.payload+"\n\n"}return a}J("shaka.text.WebVttGenerator",function(){});function Vj(){}
337
- function Wj(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]=Yg(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Yg(l)),k=Wj(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Va("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
338
- k),g=!1)}return g}function Xj(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}J("shaka.util.ConfigUtils",Vj);Vj.convertToConfigObject=Xj;Vj.mergeConfigObjects=Wj;function Yj(){}
339
- function Zj(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Og(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Zh,logLicenseExchange:!1,updateExpirationTime:1},c={retryParameters:Og(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,
340
- autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"}},
341
- hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},d={retryParameters:Og(),failureCallback:function(g){return[g]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,
342
- forceHTTPS:!1,preferNativeHls:!1};if(navigator.userAgent.match(/Edge\//)||ec()||fc())d.gapDetectionThreshold=.5;if(dc("Web0S")||ec()||fc())d.stallSkip=0;var e={trackSelectionCallback:function(g){return F(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return F(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?v(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return[g,
343
- h]},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new xg},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",
344
- preferredAudioChannelCount:2,preferForcedSubs:!1,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,useMediaCapabilities:!1,textDisplayFactory:function(){return null}};e.trackSelectionCallback=function(g){return F(function(h){return h["return"](ak(g,f.preferredAudioLanguage))})};return f}
345
- function bk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return Wj(a,b,c||Zj(),d,"")}
346
- function ak(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Rf(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Lf(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
347
- 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Ee&&"image"!=g.type||c.push(g);return c}J("shaka.util.PlayerConfiguration",Yj);Yj.mergeConfigObjects=bk;function ck(){this.g=null;this.h=[]}function dk(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 ek(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
348
- function fk(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 gk(){this.i=this.h=null;this.g=[]}function hk(a,b,c){a.h!=b&&(a.h=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}))}function ik(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 jk(){this.s=this.u=this.I=this.F=this.m=this.j=this.H=this.l=this.i=this.L=this.N=this.S=this.C=this.X=NaN;this.h=new ck;this.g=new gk};function V(a,b){Xg.call(this);var c=this;this.l=kk;this.nc=this.g=null;this.X=!1;this.h=new gf;this.cd=this.u=this.Wa=this.A=this.rc=this.s=this.i=this.ec=this.I=this.oc=this.F=this.Fa=this.C=this.L=this.m=this.O=null;this.kd=1E9;this.o=lk(this);this.jd={width:Infinity,height:Infinity};this.j=null;this.oa=new Fg(this.o.preferredAudioLanguage,this.o.preferredVariantRole,this.o.preferredAudioChannelCount);this.pa=this.o.preferredTextLanguage;this.Lb=this.o.preferredTextRole;this.Xa=this.o.preferForcedSubs;
349
- this.dd=[];b&&b(this);this.O=mk(this);this.O.Kd(this.o.streaming.forceHTTPS);this.H=null;nk&&(this.H=Ob(nk));this.h.B(window,"online",function(){c.Ed()});this.sa={name:"detach"};this.Oa={name:"attach"};this.S={name:"unload"};this.md={name:"manifest-parser"};this.hd={name:"manifest"};this.qa={name:"media-source"};this.fd={name:"drm-engine"};this.N={name:"load"};this.nd={name:"src-equals-drm-engine"};this.Ma={name:"src-equals"};var d=new Map;d.set(this.Oa,function(e,f){return Ug(ok(c,e,f))});d.set(this.sa,
350
- function(e){e.G&&(c.h.Da(e.G,"error"),e.G=null);c.H&&c.H.release();c.g=null;e=Promise.resolve();return Ug(e)});d.set(this.S,function(e){return Ug(pk(c,e))});d.set(this.qa,function(e){e=qk(c,e);return Ug(e)});d.set(this.md,function(e,f){var g=rk(c,e,f);return Ug(g)});d.set(this.hd,function(e){return sk(c,e)});d.set(this.fd,function(e){e=tk(c,e);return Ug(e)});d.set(this.N,function(e,f){return Ug(uk(c,e,f))});d.set(this.nd,function(e,f){var g=vk(c,e,f);return Ug(g)});d.set(this.Ma,function(e,f){return wk(c,
351
- e,f)});this.da=new Cj(this.sa,{Ye:function(e,f,g,h){var k=null;e==c.sa&&(k=g==c.sa?c.sa:c.Oa);e==c.Oa&&(k=g==c.sa||f.G!=h.G?c.sa:g==c.Oa?c.Oa:g==c.qa||g==c.N?c.qa:g==c.Ma?c.nd:null);e==c.qa&&(k=g==c.N&&f.G==h.G?c.md:c.S);e==c.md&&(k=xk(c.N,c.hd,c.S,g,f,h));e==c.hd&&(k=xk(c.N,c.fd,c.S,g,f,h));e==c.fd&&(k=xk(c.N,c.N,c.S,g,f,h));e==c.nd&&(k=g==c.Ma&&f.G==h.G?c.Ma:c.S);if(e==c.N||e==c.Ma)k=c.S;e==c.S&&(k=h.G&&f.G==h.G?c.Oa:c.sa);return k},Me:function(e,f,g){c.dispatchEvent(yk(zk,{state:e.name}));return d.get(e)(f,
352
- g)},handleError:function(e){return F(function(f){return 1==f.g?v(f,pk(c,e),2):f["return"](e.G?c.Oa:c.sa)})},qf:function(e){c.dispatchEvent(yk(Ak,{state:e.name}))}});a&&this.Nb(a,!0)}pa(V,Xg);function yk(a,b){return new P(a,b)}q=V.prototype;
353
- q.destroy=function(){var a=this,b;return F(function(c){switch(c.g){case 1:if(a.l==Bk)return c["return"]();a.l=Bk;b=Hj(a.da,function(){return{node:a.sa,payload:Dj(),ib:!1}});return v(c,new Promise(function(d){b.Cb=function(){};b.Fc=function(){d()};b.lb=function(){d()};b.onError=function(){d()};b.Hc=function(){d()}}),2);case 2:return v(c,a.da.destroy(),3);case 3:a.h&&(a.h.release(),a.h=null);a.cd=null;a.u=null;a.o=null;a.j=null;a.nc=null;if(!a.O){c.v(0);break}return v(c,a.O.destroy(),5);case 5:a.O=
354
- null,z(c)}})};q.Nb=function(a,b){b=void 0===b?!0:b;if(this.l==Bk)return Promise.reject(Ck());var c=Dj();c.G=a;$b()||(b=!1);var d=b?this.qa:this.Oa,e=Hj(this.da,function(){return{node:d,payload:c,ib:!1}});e.Cb=function(){};return Dk(e)};q.detach=function(){var a=this;if(this.l==Bk)return Promise.reject(Ck());var b=Hj(this.da,function(){return{node:a.sa,payload:Dj(),ib:!1}});b.Cb=function(){};return Dk(b)};
355
- q.Qd=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Bk)return Promise.reject(Ck());$b()||(a=!1);var c=Dj(),d=Hj(this.da,function(e){var f=e.G&&a?b.qa:e.G?b.Oa:b.sa;c.G=e.G;return{node:f,payload:c,ib:!1}});d.Cb=function(){};return Dk(d)};
356
- q.load=function(a,b,c){var d=this;if(this.l==Bk)return Promise.reject(Ck());this.dispatchEvent(yk(Ek));var e=Dj();e.uri=a;e.Od=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Fk(this,e)?this.Ma:this.N,g=Hj(this.da,function(h){if(null==h.G)return null;e.G=h.G;return{node:f,payload:e,ib:!0}});this.j=new jk;g.Cb=function(){};return new Promise(function(h,k){g.Hc=function(){return k(new M(2,7,7002))};g.Fc=function(){h();d.dispatchEvent(yk(Gk))};g.lb=function(){return k(Ck())};g.onError=
357
- function(l){return k(l)}})};
358
- function Fk(a,b){if(!$b())return!0;var c=b.mimeType,d=b.uri||"";c||(c={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",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[ki(d)]);if(c){if(""==(b.G||bc()).canPlayType(c))return!1;if(!$b()||!(c in ji||ki(d)in li)||a.o.streaming.preferNativeHls)return!0;if(gc())return a.o.streaming.useNativeHlsOnSafari}return!1}
359
- function ok(a,b,c){null==b.G&&(b.G=c.G,a.h.B(b.G,"error",function(){var d=Hk(a);d&&Ik(a,d)}));a.g=b.G;return Promise.resolve()}
360
- function pk(a,b){var c,d,e,f,g,h,k,l,m;return F(function(n){switch(n.g){case 1:return a.l!=Bk&&(a.l=kk),c=a.dd.map(function(p){return p()}),a.dd=[],v(n,Promise.all(c),2);case 2:a.dispatchEvent(yk(Jk));b.mimeType=null;b.startTime=null;b.uri=null;b.G&&(a.h.Da(b.G,"loadedmetadata"),a.h.Da(b.G,"playing"),a.h.Da(b.G,"pause"),a.h.Da(b.G,"ended"),a.h.Da(b.G,"ratechange"));a.Fa&&(a.Fa.release(),a.Fa=null);a.oc&&(a.oc.stop(),a.oc=null);if(!a.s){n.v(3);break}return v(n,a.s.stop(),4);case 4:a.s=null,a.rc=null;
361
- case 3:if(!a.u){n.v(5);break}return v(n,a.u.stop(),5);case 5:if(!a.i){n.v(7);break}return v(n,a.i.destroy(),8);case 8:a.i=null;case 7:a.F&&(a.F.release(),a.F=null);a.C&&(a.C.release(),a.C=null);if(!a.L){n.v(9);break}return v(n,a.L.destroy(),10);case 10:a.L=null;case 9:if(a.H)a.H.onAssetUnload();if(!b.G||!b.G.src){n.v(11);break}return v(n,new Promise(function(p){return(new N(p)).U(.1)}),12);case 12:for(b.G.removeAttribute("src"),b.G.load();b.G.lastChild;)b.G.removeChild(b.G.firstChild);case 11:if(!a.m){n.v(13);
362
- break}return v(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.Wa=null;a.I=null;if(a.A){d=t(a.A.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.A.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.A=null;a.j=new jk;a.gd=null;Kk(a);z(n)}})}
363
- function qk(a,b){var c,d,e,f;return F(function(g){if(1==g.g)return c=new ee,d=a.o.textDisplayFactory,e=Ob(d),a.gd=d,f=Lk(b.G,c,e,function(h,k,l){h=t(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,r=t(m.frames),u=r.next();!u.done;u=r.next())Mk(a,n,p,"ID3",u.value);if(a.H)a.H.onHlsTimedMetadata(m,n)}}),v(g,f.F,2);a.L=f;z(g)})}
364
- function rk(a,b,c){var d,e,f,g;return F(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.O,a.Wa=d,f=a,v(h,ii(d,e,a.o.manifest.retryParameters,b.mimeType),2);f.rc=h.h;a.s=Ob(a.rc);g=Yg(a.o.manifest);c.G&&"AUDIO"===c.G.nodeName&&(g.disableVideo=!0);a.s.configure(g);z(h)})}
365
- function sk(a,b){var c=b.uri,d=a.O;a.ec=new Wi(function(){return a.Gd()});Xi(a.ec,function(g){Nk(a,Ok,g);if(a.H)a.H.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return F(function(h){return h["return"](a.wc(g))})},makeTextStreamsForClosedCaptions:function(g){return Pk(a,g)},onTimelineRegionAdded:function(g){var h=a.ec;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=
366
- l;break a}k=null}null==k&&(h.g.add(g),h.h(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Ik(a,g)},isLowLatencyMode:function(){return a.o.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.o.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Qg(function(){var g,h,k,l;return F(function(m){if(1==m.g)return g=a,v(m,a.s.start(c,e),2);g.A=m.h;h=yk(Qk);a.dispatchEvent(h);if(0==
367
- a.A.variants.length)throw new M(2,4,4036);Rk(a.A);k=Date.now()/1E3;l=k-f;a.j.H=l;z(m)})}(),function(){return a.s.stop()})}
368
- function tk(a,b){var c,d;return F(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Sk(a,{Ab:a.O,onError:function(f){Ik(a,f)},Gc:function(f){Tk(a,f)},onExpirationUpdated:function(f,g){Uk(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Vk&&d&&(d=!1,a.j.j=Date.now()/1E3-c)}}),a.o.useMediaCapabilities||bg(a.A),a.m.configure(a.o.drm),v(e,zh(a.m,a.A.variants,a.A.offlineSessionIds,a.o.useMediaCapabilities),2)):3!=e.g?v(e,a.m.Nb(b.G),3):v(e,a.wc(a.A),0)})}
369
- function uk(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return F(function(x){switch(x.g){case 1:b.startTime=c.startTime;d=b.G;e=b.uri;a.Wa=e;a.F=new Pi({Bc:function(){return b.G.playbackRate},yc:function(){return b.G.defaultPlaybackRate},Md:function(w){b.G.playbackRate=w},he:function(w){b.G.currentTime+=w}});f=function(){return Wk(a)};g=function(){return Xk(a)};a.h.B(d,"playing",f);a.h.B(d,"pause",f);a.h.B(d,"ended",f);a.h.B(d,"ratechange",g);h=a.o.abrFactory;a.u&&a.cd==h||(a.cd=h,a.u=Ob(h),"function"!=typeof a.u.playbackRateChanged&&
370
- (Hb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.u.playbackRateChanged=function(){}),a.u.configure(a.o.abr));a.oa=new Fg(a.o.preferredAudioLanguage,a.o.preferredVariantRole,a.o.preferredAudioChannelCount);a.pa=a.o.preferredTextLanguage;a.Lb=a.o.preferredTextRole;a.Xa=a.o.preferForcedSubs;Yk(a.A.presentationTimeline,a.o.playRangeStart,a.o.playRangeEnd);a.u.init(function(w,y,C){y=void 0===y?!1:y;C=void 0===C?0:C;a.i&&w!=a.i.h&&(hk(a.j.g,w,!0),lj(a.i,w,y,C),Zk(a))});
371
- a.C=$k(a,b.startTime);a.Fa=al(a);k=Math.max(a.A.minBufferTime,a.o.streaming.rebufferingGoal);bl(a,k);Sf(a.A,a.o.preferredAudioChannelCount);a.i=cl(a);a.i.configure(a.o.streaming);a.l=dl;a.dispatchEvent(yk(el));l=null;if(m=a.Cc().find(function(w){return w.active})){x.v(2);break}l=fl(a)?a.u.chooseVariant():null;gl(a,l,!0,!1,0);if(!a.o.streaming.startAtSegmentBoundary){x.v(3);break}n=a.C.l();return v(x,hl(l,n),4);case 4:p=x.h,a.C.m(p);case 3:Zk(a);case 2:return r=a.hb().find(function(w){return w.active}),
372
- r||((u=ug(a.A.textStreams,a.pa,a.Lb,a.Xa)[0]||null)&&ik(a.j.g,u,!0),l&&(u?(l.audio&&il(a,l.audio,u)&&(a.X=!0),a.X&&a.L.m.setTextVisibility(!0),jl(a)):a.X=!1),u&&(a.o.streaming.alwaysStreamText||a.pd())&&mj(a.i,u)),v(x,a.i.start(),5);case 5:a.o.abr.enabled&&(a.u.enable(),kl(a)),dg(a.i?a.i.h:null,a.A),ll(a.A),ml(a),fl(a),a.A.variants.some(function(w){return w.primary}),a.h.va(d,"loadedmetadata",function(){a.j.l=Date.now()/1E3-c.Od}),z(x)}})}
373
- function vk(a,b,c){var d,e,f,g;return F(function(h){return 1==h.g?(d=Fe,e=Date.now()/1E3,f=!0,a.m=Sk(a,{Ab:a.O,onError:function(k){Ik(a,k)},Gc:function(k){Tk(a,k)},onExpirationUpdated:function(k,l){Uk(a,k,l)},onEvent:function(k){a.dispatchEvent(k);k.type==Vk&&f&&(f=!1,a.j.j=Date.now()/1E3-e)}}),a.m.configure(a.o.drm),g={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:
374
- "video/mp4",codecs:c.mimeType?Ue(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.X=!0,v(h,zh(a.m,[g],[]),2)):v(h,a.m.Nb(b.G),0)})}
375
- function wk(a,b,c){function d(){return Wk(a)}b.uri=c.uri;b.startTime=c.startTime;a.Wa=b.uri;a.C=new Fi(b.G);null!=b.startTime&&a.C.m(b.startTime);a.F=new Pi({Bc:function(){return b.G.playbackRate},yc:function(){return b.G.defaultPlaybackRate},Md:function(g){b.G.playbackRate=g},he:function(g){b.G.currentTime+=g}});bl(a,a.o.streaming.rebufferingGoal);a.h.B(b.G,"playing",d);a.h.B(b.G,"pause",d);a.h.B(b.G,"ended",d);a.h.B(b.G,"ratechange",function(){return Xk(a)});"none"!=a.g.preload&&a.h.va(a.g,"loadedmetadata",
376
- function(){a.j.l=Date.now()/1E3-c.Od});a.g.audioTracks&&(a.h.B(a.g.audioTracks,"addtrack",function(){return ml(a)}),a.h.B(a.g.audioTracks,"removetrack",function(){return ml(a)}),a.h.B(a.g.audioTracks,"change",function(){return ml(a)}));a.g.textTracks&&(a.h.B(a.g.textTracks,"addtrack",function(g){ml(a);nl(a,g)}),a.h.B(a.g.textTracks,"removetrack",function(){return ml(a)}),a.h.B(a.g.textTracks,"change",function(){return ml(a)}));b.G.src=b.uri;(ec()||dc("Web0S"))&&b.G.load();a.l=ol;a.dispatchEvent(yk(el));
377
- var e=new Ge;wi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){e.resolve()});var f=!1;a.dd.push(function(){f=!0});wi(a.g,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){var g;return F(function(h){if(1==h.g){if(f)return h["return"]();pl(a);g=ql(a);return g.find(function(k){return"disabled"!=k.mode})?h.v(2):v(h,new Promise(function(k){a.h.va(a.g.textTracks,"change",k);(new N(k)).U(1)}),2)}if(f)return h["return"]();rl(a);z(h)})});a.g.error?e.reject(Hk(a)):"none"==a.g.preload&&(Va('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),
378
- e.resolve());a.h.va(a.g,"error",function(){e.reject(Hk(a))});return new Qg(e,function(){e.reject(new M(2,7,7001));return Promise.resolve()})}function pl(a){var b=a.o.preferredAudioLanguage;if(""!=b){a.Hd(b);var c=a.o.preferredVariantRole;""!=c&&a.Hd(b,c)}}function rl(a){var b=a.o.preferredTextLanguage,c=a.o.preferForcedSubs;if(""!=b){a.Id(b,"",c);var d=a.o.preferredTextRole;""!=d&&a.Id(b,d,c)}}
379
- function nl(a,b){var c=b.track;"metadata"==c.kind&&(c.mode="hidden",a.h.B(c,"cuechange",function(){if(c.activeCues)for(var d=t(c.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Mk(a,e.startTime,e.endTime,e.type,e.value),a.H)a.H.onCueMetadataChange(e.value)}),(new N(function(){var d=sl(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).dc().U(.5))}function Mk(a,b,c,d,e){a.dispatchEvent(yk(tl,{startTime:b,endTime:c,rg:d,payload:e}))}
380
- function Rk(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 Sk(a,b){return new sh(b,a.o.drm.updateExpirationTime)}function mk(a){return new bh(function(b,c){a.u&&a.u.segmentDownloaded(b,c)})}
381
- function $k(a,b){return new Gi(a.g,a.A,a.o.streaming,b,function(){a.Fa&&Si(a.Fa,!0);if(a.i)for(var c=a.i,d=c.D.Ac(),e=c.o.smallGapLimit,f=t(c.g.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.g.get(g);h.ca=null;var k=c.D.R;g==Ee?(k=k.i,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=xf(k,g),k=he(k,d,e));if(!k&&(null!=yf(c.D.R,g)&&pj(c,h),h.wa&&(h.wa.abort(),h.wa=null),g===Ee))for(g=c.D.R.C.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Rd(g),g=t(g.j.values()),h=g.next();!h.done;h=g.next())nd(h.value)}a.I&&
382
- ul(a)},function(c){return a.dispatchEvent(c)})}function al(a){var b=new Yi(a.ec);Zi(b,function(d){Nk(a,vl,d)},function(d){Nk(a,wl,d)},function(d,e){e||(Nk(a,vl,d),Nk(a,wl,d))});var c=new Ri(a.g);c.g.add(b);return c}function bl(a,b){a.I=new Jg;a.I.g=Lg;Mg(a.I,b,Math.min(.5,b/2));Kk(a);a.oc=(new N(function(){ul(a)})).Ca(.25)}
383
- function ul(a){switch(a.l){case ol:if(a.g.ended)var b=!0;else{var c=ge(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case dl:a:if(a.g.ended||vf(a.L))b=!0;else{if(a.A.presentationTimeline.Y()){c=a.A.presentationTimeline.gb();var d=ge(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=ie(a.g.buffered,a.g.currentTime);c=a.I;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Kg:Lg;c.g=d;b!=d&&Kk(a)}function Lk(a,b,c,d){return new mf(a,b,c,d)}
384
- function cl(a){return new aj(a.A,{Ac:function(){return a.C.l()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},R:a.L,Ab:a.O,onError:function(b){return Ik(a,b)},onEvent:function(b){return a.dispatchEvent(b)},rf:function(){a.s&&a.s.update&&a.s.update()},zd:function(){a.C&&a.C.F();ul(a)}})}
385
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Xj(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Hb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
386
- 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=bk(this.o,a,lk(this));xl(this);return c};
387
- function xl(a){if(a.s){var b=Yg(a.o.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.s.configure(b)}a.m&&a.m.configure(a.o.drm);if(a.i){a.i.configure(a.o.streaming);try{yl(a,a.A)}catch(f){Ik(a,f)}a.u&&fl(a);b=a.i.h;!b||b.allowedByApplication&&b.allowedByKeySystem||zl(a)}a.O&&a.O.Kd(a.o.streaming.forceHTTPS);if(a.L&&(b=a.o.textDisplayFactory,a.gd!=b)){var c=Ob(b),d=a.L,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.i&&(d.i.i=c);a.gd=b;a.i&&(b=a.i,(c=b.g.get(Ee))&&
388
- kj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.o.abr),a.o.abr.enabled?a.u.enable():a.u.disable(),kl(a));a.I&&(b=a.o.streaming.rebufferingGoal,a.A&&(b=Math.max(b,a.A.minBufferTime)),Mg(a.I,b,Math.min(.5,b/2)));a.A&&Yk(a.A.presentationTimeline,a.o.playRangeStart,a.o.playRangeEnd)}q.getConfiguration=function(){var a=lk(this);bk(a,this.o,lk(this));return a};q.Cf=function(){for(var a in this.o)delete this.o[a];bk(this.o,lk(this),lk(this));xl(this)};q.Te=function(){return this.l};q.Xe=function(){return this.g};
389
- q.Sb=function(){return this.O};q.ld=function(){return this.Wa};q.$d=function(){return this.H?this.H:null};q.Y=function(){return this.A?this.A.presentationTimeline.Y():this.g&&this.g.src?Infinity==this.g.duration:!1};q.kb=function(){return this.A?this.A.presentationTimeline.kb():!1};q.kf=function(){if(this.A){var a=this.A.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};
390
- q.Gd=function(){if(this.A){var a=this.A.presentationTimeline;return{start:a.xb(),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}};q.keySystem=function(){return Qh(this.drmInfo())};q.drmInfo=function(){return this.m?this.m.i:null};q.Rb=function(){return this.m?this.m.Rb():Infinity};q.zc=function(){return this.m?this.m.zc():{}};q.od=function(){return this.I?this.I.g==Lg:!1};q.Ze=function(){return this.g?this.F?this.F.i:1:0};
391
- q.Lf=function(a){0==a?Va("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.F.set(a),this.l==dl&&(this.u.playbackRateChanged(a),jj(this.i,1<Math.abs(a))))};q.Fe=function(){var a=this.F.yc();this.l==ol&&this.F.set(a);this.l==dl&&(this.F.set(a),this.u.playbackRateChanged(a),jj(this.i,!1))};
392
- q.Cc=function(){if(this.A){for(var a=this.i?this.i.h:null,b=[],c=0,d=t(this.A.variants),e=d.next();!e.done;e=d.next())if(e=e.value,sg(e)){var f=lg(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 qg(g)}):[]};
393
- q.hb=function(){if(this.A){for(var a=this.i?this.i.i:null,b=[],c=t(this.A.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=mg(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?ql(this).map(function(f){var g=rg(f);g.active="disabled"!=f.mode;g.type="text";g.originalTextId=f.id;"captions"==f.kind&&(g.mimeType="application/cea-608");f.kind&&(g.roles=[f.kind]);"forced"==f.kind&&(g.forced=!0);return g}):[]};
394
- q.Re=function(){return this.A?this.A.imageStreams.map(function(a){return ng(a)}):[]};
395
- q.gf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,x,w,y,C,D;return F(function(A){if(1==A.g)return c.A?(d=c.A.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?A.v(3):v(A,d.createSegmentIndex(),3):A["return"](null):A.v(2);if(2!=A.g){e=d.segmentIndex.find(b);if(null==e)return A["return"](null);f=d.segmentIndex.get(e);g=/(\d+)x(\d+)/.exec(d.tilesLayout);if(!g)return A["return"](null);h=d.width||0;k=d.height||0;l=parseInt(g[1],10);m=parseInt(g[2],10);n=h/l;p=k/m;r=l*m;u=f.j-f.startTime;
396
- x=u/r;w=f.startTime;C=y=0;1<r&&(D=Math.floor((b-f.startTime)/x),w=f.startTime+D*x,y=D%l*n,C=Math.floor(D/l)*p);return A["return"]({height:p,positionX:y,positionY:C,startTime:w,duration:x,uris:f.ma(),width:n})}return A["return"](null)})};
397
- q.oe=function(a){if(this.A&&this.i){var b=this.A.textStreams.find(function(d){return d.id==a.id});b&&b!=this.i.i&&(ik(this.j.g,b,!1),mj(this.i,b),Al(this),this.pa=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=ql(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,og(c)==a.id?c.mode=this.X?"showing":"hidden":c.mode="disabled";Al(this)}};
398
- q.pe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.A&&this.i){this.o.abr.enabled&&Va("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.A.variants.find(function(e){return e.id==a.id});d&&sg(d)&&(gl(this,d,!1,b,c),this.oa=new Eg(d),fl(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,
399
- og(c)==a.id){Bl(this,c);break}};q.Oe=function(){return Cl(this.Cc())};q.ff=function(){return Cl(this.hb())};q.Ne=function(){return Array.from(Dl(this.Cc()))};q.ef=function(){return Array.from(Dl(this.hb()))};
400
- q.Hd=function(a,b){if(this.A&&this.C){this.oa=new Fg(a,b||"",0,"");if(!this.o.abr.enabled){var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.i.h,e=this.oa.create(this.A.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;if(f){c=lg(f);this.pe(c,!0);return}}zl(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
401
- c=Lf(a);f=d=null;e=t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=qg(g);Lf(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Bl(this,f):d&&Bl(this,d)}};
402
- q.Id=function(a,b,c){c=void 0===c?!1:c;if(this.A&&this.C){if(this.pa=a,this.Lb=b||"",this.Xa=c,(a=ug(this.A.textStreams,this.pa,this.Lb,this.Xa)[0]||null)&&a!=this.i.i&&(ik(this.j.g,a,!1),this.o.streaming.alwaysStreamText||this.pd()))mj(this.i,a),Al(this)}else{var d=Lf(a);(a=this.hb().find(function(e){return Lf(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.oe(a)}};
403
- q.Df=function(a){if(this.A&&this.C){for(var b=null,c=t(this.A.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.oa=new Fg(b.language,"",0,a),zl(this))}};q.pd=function(){var a=this.X;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?ql(this).some(function(b){return"showing"==b.mode}):a};
404
- function ql(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function sl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}
405
- q.Jf=function(a){a=!!a;if(this.X!=a){this.X=a;if(this.l==dl)this.L.m.setTextVisibility(a),this.o.streaming.alwaysStreamText||(a?this.i.i||(a=ug(this.A.textStreams,this.pa,this.Lb,this.Xa),0<a.length&&(mj(this.i,a[0]),Al(this))):ij(this.i));else if(this.g&&this.g.src&&this.g.textTracks){var b=ql(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")}jl(this)}};
406
- q.af=function(){if(!this.Y())return null;var a=this.da.l,b=0;if(this.C)b=this.C.l();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.A?new Date(1E3*(this.A.presentationTimeline.j+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
407
- q.ae=function(){if(!this.Y())return null;if(this.A)return new Date(1E3*this.A.presentationTimeline.j);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.xc=function(){if(this.l==dl)return this.L.xc();var a={total:[],audio:[],video:[],text:[]};this.l==ol&&(a.total=je(this.g.buffered));return a};
408
- q.getStats=function(){if(this.l!=dl&&this.l!=ol)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Wk(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.j;b=Math.round(100*b);c.i=isNaN(c.i)?
409
- b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.j,b=Number(a.totalVideoFrames),c.S=Number(a.droppedVideoFrames),c.N=b,this.j.L=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.H?a.H:NaN):a=NaN;this.j.m=a;if(this.l==dl){if(a=this.i.h)this.j.u=(this.F?this.F.i:1)*a.bandwidth;a&&a.video&&(c=this.j,b=a.video.height||NaN,c.X=a.video.width||NaN,c.C=b);this.Y()&&(a=this.ae().valueOf()+1E3*this.Gd().end,this.j.F=(Date.now()-a)/1E3);this.A&&this.A.presentationTimeline&&
410
- (this.j.I=this.A.presentationTimeline.g);a=this.u.getBandwidthEstimate();this.j.s=a}var d=this.j;a=d.X;c=d.C;b=d.u;var e=d.N,f=d.S,g=d.L,h=d.s,k=d.i,l=d.l,m=d.H,n=d.j,p=ek(d.h,"playing"),r=ek(d.h,"paused"),u=ek(d.h,"buffering"),x=d.m,w=d.F,y=d.I,C=fk(d.h),D=[];d=t(d.g.g);for(var A=d.next();!A.done;A=d.next())A=A.value,D.push({timestamp:A.timestamp,id:A.id,type:A.type,fromAdaptation:A.fromAdaptation,bandwidth:A.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
411
- estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:r,bufferingTime:u,licenseTime:x,liveLatency:w,maxSegmentDuration:y,stateHistory:C,switchHistory:D}};
412
- q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Hb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=dl&&this.l!=ol)throw new M(1,7,7004);if(!d){var h=ki(a);d={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"}[h];if(!d)throw new M(1,2,2011,h);}if(this.l==ol){if("text/vtt"!=d)throw new M(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=a;d.label=
413
- f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.hb().find(function(k){return k.language==b&&k.label==(f||"")&&k.kind==c}))return ml(this),a;throw new M(1,2,2012);}h=this.A.presentationTimeline.getDuration();if(Infinity==h)throw new M(1,4,4033);a={id:this.kd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ni(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],
414
- keyIds:new Set,language:b,label:f||null,type:Ee,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};if(!We(Pe(a.mimeType,a.codecs)))throw new M(2,2,2014,d);this.A.textStreams.push(a);ml(this);return mg(a)};
415
- q.Be=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,x,w,y,C,D;return F(function(A){switch(A.g){case 1:if(h.l!=dl&&h.l!=ol)throw new M(1,7,7004);if(d){A.v(2);break}k=ki(a);if(d={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"}[k]){A.v(3);break}B(A,4);return v(A,mi(a,h.O,h.o.streaming.retryParameters),6);case 6:d=A.h;ua(A,3);break;case 4:va(A);case 3:if(!d)throw new M(1,
416
- 2,2011,k);case 2:if(h.l!=ol){A.v(7);break}if("text/vtt"==d){A.v(8);break}return v(A,El(a,h.O,h.o.streaming.retryParameters),9);case 9:l=A.h,m=Fl(h,l,d),n=new Blob([m],{type:"text/vtt"}),a=pf(n),d="text/vtt";case 8:g&&(c="forced");p=document.createElement("track");p.src=a;p.label=f||"";p.kind=c;p.srclang=b;h.g.getAttribute("crossorigin")||h.g.setAttribute("crossorigin","anonymous");h.g.appendChild(p);r=h.hb();if(u=r.find(function(E){return E.language==b&&E.label==(f||"")&&E.kind==c}))return ml(h),
417
- A["return"](u);throw new M(1,2,2012);case 7:x=Fe;w=h.A.presentationTimeline.getDuration();if(Infinity==w)throw new M(1,4,4033);y={id:h.kd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ni(0,w,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:x.aa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};C=
418
- Pe(y.mimeType,y.codecs);D=We(C);if(!D)throw new M(2,2,2014,d);h.A.textStreams.push(y);ml(h);return A["return"](mg(y))}})};function El(a,b,c){var d,e,f;return F(function(g){if(1==g.g)return d=lh,e=fh([a],c),e.method="GET",v(g,b.request(d,e).promise,2);f=g.h;return g["return"](f.data)})}function Fl(a,b,c){var d=Xe[c];if(d)return c=d(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=qb(b),b=c.parseMedia(b,a),Uj(b);throw new M(2,2,2014,c);}
419
- q.Ld=function(a,b){this.jd.width=a;this.jd.height=b};q.Ed=function(){if(this.l==dl){var a=this.i;if(a.J.g)a=!1;else if(a.j)a=!1;else{for(var b=t(a.g.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Vb&&(c.Vb=!1,hj(a,c,.1));a=!0}}else a=!1;return a};q.Ue=function(){Va("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.A};
420
- q.Ve=function(){return this.rc};function lk(a){var b=Zj();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.Y()&&d.includes(c.code)&&(c.severity=1,a.Ed())};b.textDisplayFactory=function(){return a.nc?new Oj(a.g,a.nc):new Jj(a.g)};return b}q.te=function(a){this.nc=a};
421
- function Pk(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 Oi;h={id:a.kd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
422
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Ee,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}q.wc=function(a){var b=this;return F(function(c){if(1==c.g)return v(c,Gl(b,a),2);yl(b,a);z(c)})};
423
- function Gl(a,b){var c;return F(function(d){if(1==d.g)return c=a.i?a.i.h:null,v(d,$f(a.m,c,b,a.o.useMediaCapabilities),2);ll(b);z(d)})}
424
- function yl(a,b){if(a.l!=Bk){for(var c=a.o.restrictions,d=a.jd,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Zf(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.i&&ml(a);if((c=a.m?a.m.i:null)&&a.m.m)for(d=t(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=t(f.initData||[]),g=f.next();!g.done;g=
425
- f.next())g=g.value,Jh(a.m,g.initDataType,g.initData);Hl(a,b)}}
426
- function hl(a,b){var c,d,e,f,g;return F(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n;return F(function(p){if(1==p.g)return k?v(p,k.createSegmentIndex(),2):p["return"](null);m=k.segmentIndex[Symbol.iterator]().seek(l);if(!m)return p["return"](null);n=m.startTime;return p["return"](n)})},v(h,e(c,b),2);if(3!=h.g)return f=h.h,v(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)})}
427
- function Kk(a){var b=a.od();if(a.j&&a.I&&a.C){var c=a.F;c.j=b;Qi(c);Wk(a)}a.dispatchEvent(yk(Il,{buffering:b}))}function Xk(a){var b=a.g.playbackRate;0!=b&&(a.F&&a.F.set(b),b=yk(Jl),a.dispatchEvent(b))}function Wk(a){if(a.j&&a.I){var b=a.j.h;a.I.g==Lg?dk(b,"buffering"):a.g.paused?dk(b,"paused"):a.g.ended?dk(b,"ended"):dk(b,"playing")}}
428
- function fl(a){try{Hl(a,a.A)}catch(c){return Ik(a,c),!1}var b=a.A.variants.filter(function(c){return sg(c)});b=a.oa.create(b);a.u.setVariants(Array.from(b.values()));return!0}function zl(a){var b;if(b=fl(a)?a.u.chooseVariant():null)gl(a,b,!0,!0,0),Zk(a)}function gl(a,b,c,d,e){var f=a.i.h;b==f?d&&lj(a.i,b,d,e,!0):(hk(a.j.g,b,c),lj(a.i,b,d,e),c=null,f&&(c=lg(f)),b=lg(b),Kl(a,c,b))}
429
- function Bl(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=qg(c);var d=qg(b);Kl(a,c,d)}function il(a,b,c){a=Lf(a.o.preferredTextLanguage);b=Lf(b.language);c=Lf(c.language);return Kf(c,a)&&!Kf(b,c)}function Zk(a){var b=yk(Ll);Ml(a,b)}function ml(a){var b=yk(Nl);Ml(a,b)}function Kl(a,b,c){b=yk(Ol,{ug:b,tg:c});Ml(a,b)}function Al(a){var b=yk(Pl);Ml(a,b)}function jl(a){var b=yk(Ql);Ml(a,b)}
430
- function kl(a){var b=yk(Rl,{sg:a.o.abr.enabled});Ml(a,b)}function Ik(a,b){if(a.l!=Bk){var c=yk(Sl,{detail:b});a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Nk(a,b,c){a.dispatchEvent(yk(b,{detail:{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement}}))}
431
- function Hk(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 M(2,3,3016,b,c,a.g.error.message)}
432
- function Tk(a,b){if(a.i){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.A.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Tl.includes(l)}h!=f.allowedByKeySystem&&
433
- (e=!0)}}}e&&fl(a);(d=a.i.h)&&!d.allowedByKeySystem&&zl(a);e&&ml(a)}}function Uk(a,b,c){if(a.s&&a.s.onExpirationUpdated)a.s.onExpirationUpdated(b,c);b=yk(Ul);a.dispatchEvent(b)}function Yk(a,b,c){0<b&&(a.Y()||a.se(b));b=a.getDuration();c<b&&(a.Y()||a.Ja(c))}
434
- function Hl(a,b){var c=a.m?a.m.zc():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=t(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var r=c[d?"00":p];r?Tl.includes(r)&&h.add(r):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
435
- missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new M(2,4,4012,c);}function ll(a){if(!a.variants.some(sg))throw new M(2,4,4032);}function Ml(a,b){F(function(c){if(1==c.g)return v(c,Promise.resolve(),2);a.l!=Bk&&a.dispatchEvent(b);z(c)})}function Dl(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(Lf(c.language)):b.add("und");return b}
436
- function Cl(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=Lf(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=t(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
437
- h.push({language:l,role:n,label:p})}});return h}function Ck(){return new M(2,7,7E3)}function xk(a,b,c,d,e,f){return d==a&&e.G==f.G&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Dj(){return{G:null,mimeType:null,startTime:null,Od:NaN,uri:null}}function Dk(a){return new Promise(function(b,c){a.lb=function(){return c(Ck())};a.Fc=function(){return b()};a.onError=function(d){return c(d)};a.Hc=function(){return c(Ck())}})}J("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.te;
438
- V.prototype.getManifestParserFactory=V.prototype.Ve;V.prototype.getManifest=V.prototype.Ue;V.prototype.retryStreaming=V.prototype.Ed;V.prototype.setMaxHardwareResolution=V.prototype.Ld;V.prototype.addTextTrackAsync=V.prototype.Be;V.prototype.addTextTrack=V.prototype.addTextTrack;V.prototype.getStats=V.prototype.getStats;V.prototype.getBufferedInfo=V.prototype.xc;V.prototype.getPresentationStartTimeAsDate=V.prototype.ae;V.prototype.getPlayheadTimeAsDate=V.prototype.af;
439
- V.prototype.setTextTrackVisibility=V.prototype.Jf;V.prototype.isTextTrackVisible=V.prototype.pd;V.prototype.selectVariantsByLabel=V.prototype.Df;V.prototype.selectTextLanguage=V.prototype.Id;V.prototype.selectAudioLanguage=V.prototype.Hd;V.prototype.getTextLanguages=V.prototype.ef;V.prototype.getAudioLanguages=V.prototype.Ne;V.prototype.getTextLanguagesAndRoles=V.prototype.ff;V.prototype.getAudioLanguagesAndRoles=V.prototype.Oe;V.prototype.selectVariantTrack=V.prototype.pe;
440
- V.prototype.selectTextTrack=V.prototype.oe;V.prototype.getThumbnails=V.prototype.gf;V.prototype.getImageTracks=V.prototype.Re;V.prototype.getTextTracks=V.prototype.hb;V.prototype.getVariantTracks=V.prototype.Cc;V.prototype.cancelTrickPlay=V.prototype.Fe;V.prototype.trickPlay=V.prototype.Lf;V.prototype.getPlaybackRate=V.prototype.Ze;V.prototype.isBuffering=V.prototype.od;V.prototype.getKeyStatuses=V.prototype.zc;V.prototype.getExpiration=V.prototype.Rb;V.prototype.drmInfo=V.prototype.drmInfo;
441
- V.prototype.keySystem=V.prototype.keySystem;V.prototype.seekRange=V.prototype.Gd;V.prototype.isAudioOnly=V.prototype.kf;V.prototype.isInProgress=V.prototype.kb;V.prototype.isLive=V.prototype.Y;V.prototype.getAdManager=V.prototype.$d;V.prototype.getAssetUri=V.prototype.ld;V.prototype.getNetworkingEngine=V.prototype.Sb;V.prototype.getMediaElement=V.prototype.Xe;V.prototype.getLoadMode=V.prototype.Te;V.prototype.resetConfiguration=V.prototype.Cf;V.prototype.getConfiguration=V.prototype.getConfiguration;
442
- V.prototype.configure=V.prototype.configure;V.prototype.load=V.prototype.load;V.prototype.unload=V.prototype.Qd;V.prototype.detach=V.prototype.detach;V.prototype.attach=V.prototype.Nb;
443
- V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return F(function(h){if(1==h.g)return b={},a?v(h,ci(),3):h.v(2);2!=h.g&&(b=h.h);var k={};if($b()){for(var l in ji)k[l]=!0;for(var m in li)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]=$b()?!!ji[n]:ac(n);for(var p in l)k[p]=
444
- $b()?!!li[p]:ac(l[p]);c=k;k={};p=t('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
445
- for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=$b()?We(l)?!0:MediaSource.isTypeSupported(l)||Le(l):ac(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Vl;for(g in f)e[g]=f[g]();return h["return"](e)})};
446
- V.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Va("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||dc("Trident/"))return!1;var a=hc();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
447
- !1:$b()?!0:ac("application/x-mpegurl")};V.setAdManagerFactory=function(a){nk=a};V.registerSupportPlugin=function(a,b){Vl[a]=b};V.prototype.destroy=V.prototype.destroy;
448
- var Rl="abrstatuschanged",Ll="adaptation",Il="buffering",Vk="drmsessionupdate",Aj="emsg",Sl="error",Ul="expirationupdated",Gk="loaded",Ek="loading",Qk="manifestparsed",tl="metadata",zk="onstatechange",Ak="onstateidle",Jl="ratechange",el="streaming",Pl="textchanged",Ql="texttrackvisibility",Ok="timelineregionadded",vl="timelineregionenter",wl="timelineregionexit",Nl="trackschanged",Jk="unloading",Ol="variantchanged",Wl={Sf:Rl,Tf:Ll,Uf:Il,Vf:Vk,Xf:Aj,Error:Sl,Yf:Ul,Zf:"largegap",$f:Gk,ag:Ek,bg:Qk,Metadata:tl,
449
- cg:zk,dg:Ak,eg:Jl,fg:"sessiondata",gg:el,hg:Pl,ig:Ql,jg:Ok,kg:vl,lg:wl,mg:Nl,ng:Jk,og:Ol},Bk=0,kk=1,dl=2,ol=3;V.LoadMode={DESTROYED:Bk,NOT_LOADED:kk,MEDIA_SOURCE:dl,SRC_EQUALS:ol};V.version="v3.1.3";var Xl=["3","1"];Ib=new function(a){this.g=a;this.i=Jb;this.h=Kb}(new Gb(Number(Xl[0]),Number(Xl[1])));var Tl=["output-restricted","internal-error"],Vl={},nk=null;function Yl(){this.h=[];this.j=this.i=this.g=0};function W(a,b){var c=this;this.i=a;this.g=b;this.j=!1;this.l=this.g.getVolume();this.h=new gf;this.h.B(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.j=!0});this.h.B(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.j=!1})}q=W.prototype;q.getDuration=function(){return this.i.getDuration()};q.getMinSuggestedDuration=function(){return this.i.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.j};
133
+ function Zd(a){return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:a.width||null,height:a.height||null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:a.tilesLayout||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
134
+ originalTextId:null,originalImageId:a.originalId}}function $d(a){a.__shaka_id||(a.__shaka_id=ae++);return a.__shaka_id}function be(a){var b=de(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}
135
+ function ee(a){var b=de(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}
136
+ function de(a){return{id:$d(a),active:!1,type:"",bandwidth:0,language:gd(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null}}
137
+ function fe(a){return a.allowedByApplication&&a.allowedByKeySystem}function ge(a){return a.filter(function(b){return fe(b)})}
138
+ function Cd(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ja(e))):d.get(Math.min.apply(Math,ja(c)))}
139
+ function he(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=md(gd(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return gd(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=ie(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(Xb,[]);return a.length?
140
+ ie(e,a[0]):e}function ie(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Ud(a){var b=[];a.audio&&b.push(je(a.audio));a.video&&b.push(je(a.video));return b.join(", ")}
141
+ function je(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}var ae=0,Hd="smooth",Id="powerEfficient",Kd="bandwidth";function ke(){var a=this;this.j=null;this.i=!1;this.g=new Ua;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.o.useNetworkInformation&&a.i){a.g=new Ua;var b=a.chooseVariant();b&&a.j(b)}});this.h=[];this.m=1;this.s=!1;this.o=this.l=null}q=ke.prototype;q.stop=function(){this.j=null;this.i=!1;this.h=[];this.m=1;this.l=null};q.init=function(a){this.j=a};
142
+ q.chooseVariant=function(){var a=le(this.o.restrictions,this.h),b=this.g.getBandwidthEstimate(me(this));this.h.length&&!a.length&&(a=le(null,this.h),a=[a[0]]);var c=a[0]||null;a=t(lb(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.item;var f=isNaN(this.m)?1:Math.abs(this.m);e=f*(e.next||{bandwidth:Infinity}).bandwidth/this.o.bandwidthUpgradeTarget;b>=f*d.bandwidth/this.o.bandwidthDowngradeTarget&&b<=e&&(c=d)}this.l=Date.now();return c};q.enable=function(){this.i=!0};
143
+ q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){var c=this.g;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.g+=b;Ra(c.h,e,d);Ra(c.i,e,d)}if(null!=this.l&&this.i)a:{if(!this.s){if(!(128E3<=this.g.g))break a;this.s=!0}else if(Date.now()-this.l<1E3*this.o.switchInterval)break a;c=this.chooseVariant();this.g.getBandwidthEstimate(me(this));c&&this.j(c)}};q.getBandwidthEstimate=function(){return this.g.getBandwidthEstimate(this.o.defaultBandwidthEstimate)};q.setVariants=function(a){this.h=a};
144
+ q.playbackRateChanged=function(a){this.m=a};q.configure=function(a){this.o=a};function me(a){var b=a.o.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.o.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function le(a,b){a&&(b=b.filter(function(c){return Nd(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}M("shaka.abr.SimpleAbrManager",ke);ke.prototype.configure=ke.prototype.configure;
145
+ ke.prototype.playbackRateChanged=ke.prototype.playbackRateChanged;ke.prototype.setVariants=ke.prototype.setVariants;ke.prototype.getBandwidthEstimate=ke.prototype.getBandwidthEstimate;ke.prototype.segmentDownloaded=ke.prototype.segmentDownloaded;ke.prototype.disable=ke.prototype.disable;ke.prototype.enable=ke.prototype.enable;ke.prototype.chooseVariant=ke.prototype.chooseVariant;ke.prototype.init=ke.prototype.init;ke.prototype.stop=ke.prototype.stop;function ne(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=t(b),d=c.next();!d.done;d=c.next())this.add(d.value)}ne.prototype.add=function(a){return oe(this.h,a)?(this.g.add(a),!0):!1};
146
+ function oe(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)&&pe(c,d)&&qe(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(pe(c,d)&&qe(c.roles,d.roles)));return c?!1:!0}ne.prototype.values=function(){return this.g.values()};
147
+ function pe(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(g){return Vc(g)}),d=b.codecs.split(",").map(function(g){return Vc(g)});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=t(jb(c.length)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}
148
+ function qe(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=t(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function re(a){this.g=a;this.h=new se(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}re.prototype.create=function(a){var b=this,c=a.filter(function(d){return oe(b.g,d)});return c.length?new ne(c[0],c):this.h.create(a)};function se(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
149
+ se.prototype.create=function(a){var b=[];b=te(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=ue(b,this.j);a.length&&(b=a);this.g&&(a=Cd(b,this.g),a.length&&(b=a));this.h&&(a=ve(b,this.h),a.length&&(b=a));a=new ne(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,oe(a.h,c)&&a.add(c);return a};function te(a,b){var c=gd(b),d=md(c,a.map(function(e){return ld(e)}));return d?a.filter(function(e){return d==ld(e)}):[]}
150
+ function ue(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function ve(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function we(){this.g=xe;this.h=(new Map).set(xe,2).set(ye,1)}function ze(a,b,c){a.h.set(xe,c).set(ye,b)}var ye=0,xe=1;function Ae(a,b){var c=Be();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=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}
151
+ function Ce(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new N(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.s);return v(d,new Promise(function(e){(new O(e)).V(c/1E3)}),2)}a.h*=a.m;z(d)})}function Be(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function De(a,b){this.promise=a;this.i=b;this.g=!1}function Ee(a){return new De(Promise.reject(a),function(){return Promise.resolve()})}function Fe(){var a=Promise.reject(new N(2,7,7001));a["catch"](function(){});return new De(a,function(){return Promise.resolve()})}function Ge(a){return new De(Promise.resolve(a),function(){return Promise.resolve()})}function He(a){return new De(a,function(){return a["catch"](function(){})})}De.prototype.abort=function(){this.g=!0;return this.i()};
152
+ function Ie(a){return new De(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}De.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
153
+ De.prototype.ca=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Je(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new yc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new De(f,function(){return d()})};
154
+ function Je(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",De);De.prototype.chain=De.prototype.ca;De.prototype["finally"]=De.prototype["finally"];De.all=Ie;De.prototype.abort=De.prototype.abort;De.notAbortable=He;De.completed=Ge;De.aborted=Fe;De.failed=Ee;function R(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
155
+ function Ke(a){var b=new R(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}R.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};R.prototype.stopImmediatePropagation=function(){this.g=!0};R.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",R);function Le(){this.tc=new nd;this.sc=this}Le.prototype.addEventListener=function(a,b){this.tc.push(a,b)};Le.prototype.removeEventListener=function(a,b){this.tc.remove(a,b)};Le.prototype.dispatchEvent=function(a){var b=this.tc.get(a.type)||[],c=this.tc.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.sc;a.currentTarget=this.sc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};function Me(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Ne(a){var b={},c;for(c in a)b[c]=a[c];return b};function Oe(){this.g=[]}function Pe(a,b){a.g.push(b["finally"](function(){nb(a.g,b)}))}Oe.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 Qe(a){Le.call(this);this.i=!1;this.l=new Oe;this.g=new Set;this.h=new Set;this.j=a||null;this.m=!1}ra(Qe,Le);q=Qe.prototype;q.Nd=function(a){this.m=a};function Re(a,b,c,d){c=c||Se;var e=Te[a];if(!e||c>=e.priority)Te[a]={priority:c,Cf:b,Ef:void 0===d?!1:d}}q.Ff=function(a){this.g.add(a)};q.Wf=function(a){this.g["delete"](a)};q.Me=function(){this.g.clear()};q.Gf=function(a){this.h.add(a)};q.Xf=function(a){this.h["delete"](a)};q.Ne=function(){this.h.clear()};
156
+ function Ue(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();return this.l.destroy()};
157
+ q.request=function(a,b){var c=this,d=new Ve;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new We(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Me(b.retryParameters):Be();b.uris=Me(b.uris);e=Xe(this,a,b);var f=e.ca(function(){return Ye(c,a,b,new Ae(b.retryParameters,!1),0,null,d)}),g=f.ca(function(n){return Ze(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
158
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.ca(function(n){var p=Date.now()-l,r=n.response;r.timeMs+=k;r.timeMs+=p;n.tf||!c.j||r.fromCache||a!=$e||c.j(r.timeMs,r.data.byteLength);return r},function(n){n&&(n.severity=2);throw n;});e=new We(m.promise,function(){return m.abort()},d);Pe(this.l,e);return e};
159
+ function Xe(a,b,c){var d=Ge(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={ad:e.ad},f=a.next())e.ad=f.value,d=d.ca(function(g){return function(){c.body&&(c.body=Pb(c.body));return g.ad(b,c)}}(e));return d.ca(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
160
+ function Ye(a,b,c,d,e,f,g){a.m&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new ec(c.uris[e]),k=h.Ga,l=!1;k||(k=location.protocol,k=k.slice(0,-1),fc(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Te[k])?k.Cf:null;if(!m)return Ee(new N(2,1,1E3,h));var n=k.Ef,p=null,r=null,u=!1,y;return He(Ce(d)).ca(function(){if(a.i)return Fe();y=Date.now();var w=m(c.uris[e],c,b,function(D,B,F){p&&p.stop();r&&r.V(C/1E3);a.j&&b==$e&&(a.j(D,B),l=!0,g.g=F)});if(!n)return w;var x=c.retryParameters.connectionTimeout;
161
+ x&&(p=new O(function(){u=!0;w.abort()}),p.V(x/1E3));var C=c.retryParameters.stallTimeout;C&&(r=new O(function(){u=!0;w.abort()}));return w}).ca(function(w){p&&p.stop();r&&r.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-y);return{response:w,tf:l}},function(w){p&&p.stop();r&&r.stop();if(a.i)return Fe();u&&(w=new N(1,1,1003,c.uris[e],b));if(w instanceof N){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity){var x=(new Map).set("error",w);x=new R("retry",x);a.dispatchEvent(x);e=(e+1)%c.uris.length;
162
+ return Ye(a,b,c,d,e,w,g)}}throw w;})}function Ze(a,b,c){var d=Ge(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={bd:e.bd},f=a.next())e.bd=f.value,d=d.ca(function(g){return function(){var h=c.response;h.data&&(h.data=Pb(h.data));return g.bd(b,h)}}(e));return d.ca(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}M("shaka.net.NetworkingEngine",Qe);Qe.prototype.request=Qe.prototype.request;Qe.prototype.destroy=Qe.prototype.destroy;
163
+ Qe.makeRequest=Ue;Qe.defaultRetryParameters=function(){return Be()};Qe.prototype.clearAllResponseFilters=Qe.prototype.Ne;Qe.prototype.unregisterResponseFilter=Qe.prototype.Xf;Qe.prototype.registerResponseFilter=Qe.prototype.Gf;Qe.prototype.clearAllRequestFilters=Qe.prototype.Me;Qe.prototype.unregisterRequestFilter=Qe.prototype.Wf;Qe.prototype.registerRequestFilter=Qe.prototype.Ff;Qe.unregisterScheme=function(a){delete Te[a]};Qe.registerScheme=Re;Qe.prototype.setForceHTTPS=Qe.prototype.Nd;
164
+ function Ve(){this.g=0}Qe.NumBytesRemainingClass=Ve;function We(a,b,c){De.call(this,a,b);this.h=c}ra(We,De);Qe.PendingRequest=We;var $e=1;Qe.RequestType={MANIFEST:0,SEGMENT:$e,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Se=3;Qe.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Se};var Te={};function af(a){this.g=!1;this.h=new yc;this.i=a}af.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 bf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function cf(){this.g=new nd}q=cf.prototype;q.release=function(){this.pb();this.g=null};q.A=function(a,b,c,d){this.g&&(a=new df(a,b,c,d),this.g.push(b,a))};q.xa=function(a,b,c,d){function e(g){f.Ea(a,b,e);c(g)}var f=this;this.A(a,b,e,d)};q.Ea=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.Ea(),this.g.remove(b,e))}};
165
+ q.pb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ja(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Ea();this.g.g={}}};M("shaka.util.EventManager",cf);cf.prototype.removeAll=cf.prototype.pb;cf.prototype.unlisten=cf.prototype.Ea;cf.prototype.listenOnce=cf.prototype.xa;cf.prototype.listen=cf.prototype.A;cf.prototype.release=cf.prototype.release;function df(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=ef(a,d);this.target.addEventListener(b,c,this.g)}
166
+ df.prototype.Ea=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function ef(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 ff(a)?b:b.capture||!1}
167
+ function ff(a){var b=gf;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}gf=b}return b||!1}var gf=void 0;function hf(){}function jf(a){a=Ec(a);return(new ec(a)).Ia}function kf(a,b,c){function d(h){Rb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ob(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Gc(b,!0):e=b;a=Ec(a);a=Gc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",hf);hf.initDataTransform=kf;hf.defaultGetContentId=jf;function lf(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 mf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function nf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function qf(a,b){var c=this;b=void 0===b?1:b;this.C=a;this.D=new Set;this.g=this.m=null;this.ra=this.Z=!1;this.F=0;this.i=null;this.h=new cf;this.j=new Map;this.u=[];this.s=new yc;this.o=null;this.l=function(d){c.s.reject(d);a.onError(d)};this.sa=new Map;this.ea=new Map;this.O=new O(function(){return rf(c)});this.I=!1;this.H=[];this.L=!1;this.qa=(new O(function(){sf(c)})).Da(b);this.s["catch"](function(){});this.J=new af(function(){return tf(c)});this.T=!1}q=qf.prototype;q.destroy=function(){return this.J.destroy()};
168
+ function tf(a){return K(function(b){switch(b.g){case 1:return a.h.release(),a.h=null,a.s.reject(),a.qa.stop(),a.qa=null,a.O.stop(),a.O=null,v(b,uf(a),2);case 2:if(!a.g){b.v(3);break}A(b,4);return v(b,a.g.setMediaKeys(null),6);case 6:wa(b,5);break;case 4:E(b);case 5:a.g=null;case 3:a.i=null,a.D.clear(),a.m=null,a.u=[],a.o=null,a.l=function(){},a.C=null,a.T=!1,z(b)}})}q.configure=function(a){this.o=a};function vf(a,b,c){a.ra=!0;a.u=[];a.I=c;return wf(a,b)}
169
+ function xf(a,b,c){a.u=c;a.I=0<c.length;return wf(a,b)}function yf(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 zf(a,g,[])}
170
+ function wf(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,y;return K(function(w){if(1==w.g){if(c=Af(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(x){return x.video&&x.video.drmInfos.length||x.audio&&x.audio.drmInfos.length?!0:!1});g||(h=lf(a.o.servers),Bf(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Cf(l),n=t(m),p=n.next();!p.done;p=n.next())r=p.value,Df(r,lf(a.o.servers),lf(a.o.advanced||{}));return v(w,
171
+ Td(b,a.I,a.T),2)}u=g||Object.keys(a.o.servers).length;if(!u)return a.Z=!0,w["return"](Promise.resolve());y=zf(a,void 0,b);return w["return"](g?y:y["catch"](function(){}))})}
172
+ q.Rb=function(a){var b=this,c,d;return K(function(e){if(1==e.g){if(!b.m)return b.h.xa(a,"encrypted",function(){b.l(new N(2,6,6010))}),e["return"]();b.g=a;b.h.xa(b.g,"play",function(){for(var f=t(b.H),g=f.next();!g.done;g=f.next())Ef(b,g.value);b.L=!0;b.H=[]});"webkitCurrentPlaybackTargetIsWireless"in b.g&&b.h.A(b.g,"webkitcurrentplaybacktargetiswirelesschanged",function(){return uf(b)});c=b.g.setMediaKeys(b.m);c=c["catch"](function(f){return Promise.reject(new N(2,6,6003,f.message))});return v(e,
173
+ c,2)}bf(b.J);Ff(b);b.i.initData.length||b.u.length||(d=function(f){return Gf(b,f.initDataType,Ob(f.initData))},b.h.A(b.g,"encrypted",d));z(e)})};
174
+ function Hf(a){var b,c,d,e,f;return K(function(g){switch(g.g){case 1:if(!a.m||!a.i)return g["return"]();if(!a.i.serverCertificateUri||a.i.serverCertificate&&a.i.serverCertificate.length){g.v(2);break}b=Ue([a.i.serverCertificateUri],a.o.retryParameters);A(g,3);c=a.C.nb.request(5,b);return v(g,c.promise,5);case 5:d=g.h;a.i.serverCertificate=Ob(d.data);wa(g,4);break;case 3:throw e=E(g),new N(2,6,6017,e);case 4:if(a.J.g)return g["return"]();case 2:if(!a.i.serverCertificate||!a.i.serverCertificate.length)return g["return"]();
175
+ A(g,6);return v(g,a.m.setServerCertificate(a.i.serverCertificate),8);case 8:wa(g,0);break;case 6:throw f=E(g),new N(2,6,6004,f.message);}})}function If(a,b){var c,d,e;return K(function(f){if(1==f.g)return v(f,Jf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.j.get(c))e.Ma=new yc,d.push(e.Ma);d.push(c.remove());return v(f,Promise.all(d),3)}a.j["delete"](c);z(f)})}
176
+ function Ff(a){for(var b=(a.i?a.i.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,Gf(a,d.initDataType,d.initData);c=t(a.u);for(d=c.next();!d.done;d=c.next())Jf(a,d.value);b.length||a.u.length||a.s.resolve();return a.s}function Gf(a,b,c){var d=a.j.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Mb(c,e.value.initData)&&!ud("Tizen 2"))return;Kf(a,b,c,a.i.sessionType)}function Lf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
177
+ function Mf(a){a=a.j.keys();a=gb(a,function(b){return b.sessionId});return Array.from(a)}q.Vb=function(){var a=Infinity,b=this.j.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Bc=function(){return mf(this.ea)};
178
+ function zf(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,y;return K(function(w){switch(w.g){case 1:d=new Map;if(c.length){e=Nf(a,c,d);w.v(2);break}return v(w,Of(a,b),3);case 3:e=w.h;case 2:f=e;if(!f)throw new N(2,6,6001);bf(a.J);A(w,4);a.D.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.D.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())r=m.value,a.D.add(r.contentType.toLowerCase());if(c.length){var x=
179
+ f.keySystem;var C=d.get(f.keySystem);var D=[],B=[],F=[],G=[],H=new Set;Pf(C,D,F,B,G,H);var L=a.I?"persistent-license":"temporary";x={keySystem:x,licenseServerUri:D[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||L,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:H};C=t(C);for(D=C.next();!D.done;D=
180
+ C.next())D=D.value,D.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=D.distinctiveIdentifierRequired),D.persistentStateRequired&&(x.persistentStateRequired=D.persistentStateRequired);C=x}else C=f.keySystem,x=b.get(f.keySystem),D=[],B=[],F=[],G=[],H=new Set,Pf(x.drmInfos,D,F,B,G,H),C={keySystem:C,licenseServerUri:D[0],distinctiveIdentifierRequired:"required"==x.distinctiveIdentifier,persistentStateRequired:"required"==x.persistentState,sessionType:x.sessionTypes[0]||"temporary",audioRobustness:(x.audioCapabilities?
181
+ x.audioCapabilities[0].robustness:"")||"",videoRobustness:(x.videoCapabilities?x.videoCapabilities[0].robustness:"")||"",serverCertificate:F[0],serverCertificateUri:B[0],initData:G,keyIds:H};a.i=C;if(!a.i.licenseServerUri)throw new N(2,6,6012,a.i.keySystem);return v(w,f.createMediaKeys(),6);case 6:return u=w.h,bf(a.J),a.m=u,a.Z=!0,v(w,Hf(a),7);case 7:bf(a.J);wa(w,0);break;case 4:y=E(w);bf(a.J,y);a.i=null;a.D.clear();if(y instanceof N)throw y;throw new N(2,6,6002,y.message);}})}
182
+ function Nf(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Cf(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new N(2,6,6E3);d={};a=t(a.o.preferredKeySystems);for(e=a.next();!e.done;d={Zc:d.Zc},e=a.next())for(d.Zc=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==
183
+ l.Zc}}(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}
184
+ function Of(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,y,w;return K(function(x){switch(x.g){case 1:if(1==b.size&&b.has(""))throw new N(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.o.preferredKeySystems);h=g.next();case 2:if(h.done){x.v(4);break}k=h.value;if(!b.has(k)){x.v(3);break}l=b.get(k);A(x,6);return v(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
185
+ x.h,x["return"](c);case 6:E(x);case 7:bf(a.J);case 3:h=g.next();x.v(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){x.v(11);break}p=n.value;r=t(b.keys());h=r.next();case 12:if(h.done){n=m.next();x.v(9);break}u=h.value;y=b.get(u);w=y.drmInfos.some(function(C){return!!C.licenseServerUri});if(w!=p){x.v(13);break}A(x,15);return v(x,navigator.requestMediaKeySystemAccess(u,[y]),17);case 17:return c=x.h,x["return"](c);case 15:E(x);case 16:bf(a.J);case 13:h=r.next();x.v(12);break;case 11:return x["return"](c)}})}
186
+ function Af(a){a=lf(a.o.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Lc(f),h=Lc(e);g={kty:"oct",kid:Jc(g,!1),k:Jc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Ob(Fc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
187
+ serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
188
+ function Jf(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:try{c=a.m.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.l(d),h["return"](Promise.reject(d))}a.h.A(c,"message",function(k){a.g&&a.o.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.L?a.H.push(k):Ef(a,k)});a.h.A(c,"keystatuseschange",function(k){return Qf(a,k)});e={initData:null,loaded:!1,Dd:Infinity,Ma:null,type:"persistent-license"};a.j.set(c,e);A(h,2);return v(h,c.load(b),4);case 4:f=h.h;bf(a.J);
189
+ if(!f)return a.j["delete"](c),a.l(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Rf(a)&&a.s.resolve();return h["return"](c);case 2:g=E(h),bf(a.J,g),a.j["delete"](c),a.l(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
190
+ function Kf(a,b,c,d){try{var e=a.m.createSession(d)}catch(f){a.l(new N(2,6,6005,f.message));return}a.h.A(e,"message",function(f){a.g&&a.o.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.L?a.H.push(f):Ef(a,f)});a.h.A(e,"keystatuseschange",function(f){return Qf(a,f)});a.j.set(e,{initData:c,loaded:!1,Dd:Infinity,Ma:null,type:d});try{c=a.o.initDataTransform(c,b,a.i)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.l(b);return}a.o.logLicenseExchange&&Jc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.J.g){a.j["delete"](e);
191
+ var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.l(new N(2,6,6006,f.message,f,h))}})}function Sf(a,b,c){"skd"==b&&(b=c.serverCertificate,c=jf(a),a=kf(a,c,b));return a}
192
+ function Ef(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,y;K(function(w){switch(w.g){case 1:return c=b.target,a.o.logLicenseExchange&&Jc(b.message),d=a.j.get(c),e=a.i.licenseServerUri,f=a.o.advanced[a.i.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=Ue([e],a.o.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Lf(a.i.keySystem)&&Tf(g),h=Date.now(),A(w,2),l=a.C.nb.request(2,g),v(w,
193
+ l.promise,4);case 4:k=w.h;wa(w,3);break;case 2:return m=E(w),n=new N(2,6,6007,m),a.l(n),d&&d.Ma&&d.Ma.reject(n),w["return"]();case 3:if(a.J.g)return w["return"]();a.F+=(Date.now()-h)/1E3;a.o.logLicenseExchange&&Jc(k.data);A(w,5);return v(w,c.update(k.data),7);case 7:wa(w,6);break;case 5:return p=E(w),r=new N(2,6,6008,p.message),a.l(r),d&&d.Ma&&d.Ma.reject(r),w["return"]();case 6:u=new R("drmsessionupdate"),a.C.onEvent(u),d&&(d.Ma&&d.Ma.resolve(),y=new O(function(){d.loaded=!0;Rf(a)&&a.s.resolve()}),
194
+ y.V(Uf)),z(w)}})}function Tf(a){var b=Cc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Kc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
195
+ function Qf(a,b){var c=b.target,d=a.j.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Lf(a.i.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Rb(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=Mc(h);a.sa.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ma&&(a.j["delete"](c),c.close()["catch"](function(){}));
196
+ Rf(a)&&(a.s.resolve(),a.O.V(Vf))}function rf(a){var b=a.sa,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.l(new N(2,6,6014));a.C.Ic(mf(c))}
197
+ function Wf(){var a,b,c,d,e,f,g,h;return K(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
198
+ c],f=new Map,g=function(l){var m,n,p;return K(function(r){switch(r.g){case 1:return A(r,2),v(r,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=r.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,ud("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),v(r,m.createMediaKeys(),5);case 5:wa(r,0);break;case 2:E(r),f.set(l,null),z(r)}})},h=a.map(function(l){return g(l)}),v(k,Promise.all(h),2)):k["return"](mf(f))})}
199
+ function Xf(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).V(Yf)}),A(c,2),v(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return wa(c,0);E(c);z(c)})}
200
+ function uf(a){var b;return K(function(c){b=Array.from(a.j.entries());a.j.clear();return v(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return A(g,2),a.ra||a.u.includes(e.sessionId)||"persistent-license"!==f.type?v(g,Xf(e),5):v(g,e.remove(),5);if(2!=g.g)return wa(g,0);E(g);z(g)})})),0)})}
201
+ function Zf(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={Fa:f.Fa},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Fa=[];f.Fa=f.Fa.concat(e.initData||[]);f.Fa=f.Fa.concat(h.initData||[]);f.Fa=f.Fa.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Fa.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ja(e.keyIds),ja(h.keyIds))):
202
+ e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
203
+ initData:f.Fa,keyIds:g});break}}return c}function Cf(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function sf(a){a.j.forEach(function(b,c){var d=b.Dd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.Dd=e)})}function Rf(a){a=a.j.values();return hb(a,function(b){return b.loaded})}
204
+ function Bf(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=t(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
205
+ function Pf(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 Mb(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={mc:h.mc},l=k.next())h.mc=l.value,e.some(function(m){return function(n){var p=
206
+ m.mc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Mb(n.initData,p.initData)}}(h))||e.push(h.mc)}if(g.pa.keyIds)for(h=t(g.pa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
207
+ function Df(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
208
+ (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var Yf=1,Uf=5,Vf=.5,$f=new zc(function(){return Pb(new Uint8Array([0]))});function ag(){}function bg(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){if(d&&(e=cg[d.toLowerCase()]))return k["return"](e);if(f=dg(a))if(g=eg[f])return k["return"](g);return d?k.v(2):v(k,fg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=cg[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
209
+ function fg(a,b,c){var d,e,f;return K(function(g){if(1==g.g)return d=Ue([a],c),d.method="HEAD",v(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function dg(a){a=(new ec(a)).za.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",ag);ag.unregisterParserByMime=function(a){delete cg[a]};ag.registerParserByMime=function(a,b){cg[a]=b};
210
+ ag.registerParserByExtension=function(a,b){eg[a]=b};var cg={},eg={};function gg(a,b){this.R=Rb(a);this.h=b==hg;this.g=0}q=gg.prototype;q.oa=function(){return this.g<this.R.byteLength};q.$=function(){return this.g};q.Ze=function(){return this.R.byteLength};q.aa=function(){try{var a=this.R.getUint8(this.g);this.g+=1;return a}catch(b){throw ig();}};q.Gb=function(){try{var a=this.R.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw ig();}};q.N=function(){try{var a=this.R.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw ig();}};
211
+ q.ne=function(){try{var a=this.R.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw ig();}};q.Hb=function(){try{if(this.h){var a=this.R.getUint32(this.g,!0);var b=this.R.getUint32(this.g+4,!0)}else b=this.R.getUint32(this.g,!1),a=this.R.getUint32(this.g+4,!1)}catch(c){throw ig();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.bb=function(a){if(this.g+a>this.R.byteLength)throw ig();var b=Ob(this.R,this.g,a);this.g+=a;return b};
212
+ q.skip=function(a){if(this.g+a>this.R.byteLength)throw ig();this.g+=a};q.pe=function(a){if(this.g<a)throw ig();this.g-=a};q.seek=function(a){if(0>a||a>this.R.byteLength)throw ig();this.g=a};q.dc=function(){for(var a=this.g;this.oa()&&0!=this.R.getUint8(this.g);)this.g+=1;a=Ob(this.R,a,this.g-a);this.g+=1;return Bc(a)};function ig(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",gg);gg.prototype.readTerminatedString=gg.prototype.dc;gg.prototype.seek=gg.prototype.seek;gg.prototype.rewind=gg.prototype.pe;
213
+ gg.prototype.skip=gg.prototype.skip;gg.prototype.readBytes=gg.prototype.bb;gg.prototype.readUint64=gg.prototype.Hb;gg.prototype.readInt32=gg.prototype.ne;gg.prototype.readUint32=gg.prototype.N;gg.prototype.readUint16=gg.prototype.Gb;gg.prototype.readUint8=gg.prototype.aa;gg.prototype.getLength=gg.prototype.Ze;gg.prototype.getPosition=gg.prototype.$;gg.prototype.hasMoreData=gg.prototype.oa;var hg=1;gg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:hg};function jg(){this.i=[];this.h=[];this.g=!1}q=jg.prototype;q.box=function(a,b){var c=kg(a);this.i[c]=lg;this.h[c]=b;return this};q.U=function(a,b){var c=kg(a);this.i[c]=mg;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new gg(a,0);for(this.g=!1;a.oa()&&!this.g;)this.Kc(0,a,b,c)};
214
+ q.Kc=function(a,b,c,d){var e=b.$();if(d&&e+8>b.R.byteLength)this.g=!0;else{var f=b.N(),g=b.N(),h=!1;switch(f){case 0:f=b.R.byteLength-e;break;case 1:if(d&&b.$()+8>b.R.byteLength){this.g=!0;return}f=b.Hb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==mg){if(d&&b.$()+4>b.R.byteLength){this.g=!0;return}m=b.N();l=m>>>24;m&=16777215}g=e+f;c&&g>b.R.byteLength&&(g=b.R.byteLength);d&&g>b.R.byteLength?this.g=!0:(d=g-b.$(),b=0<d?b.bb(d):new Uint8Array(0),b=new gg(b,0),k({parser:this,partialOkay:c||
215
+ !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.$(),b.R.byteLength-b.$()))}};function ng(a){for(var b=og(a);a.reader.oa()&&!a.parser.g;)a.parser.Kc(a.start+b,a.reader,a.partialOkay)}function pg(a){var b=og(a),c=a.reader.N();c=t(jb(c));for(var d=c.next();!d.done&&(a.parser.Kc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d=c.next());}function qg(a){return function(b){a(b.reader.bb(b.reader.R.byteLength-b.reader.$()))}}
216
+ function kg(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 rg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function og(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",jg);jg.headerSize=og;jg.typeToString=rg;jg.allData=qg;jg.sampleDescription=pg;jg.children=ng;jg.prototype.parseNext=jg.prototype.Kc;jg.prototype.parse=jg.prototype.parse;jg.prototype.stop=jg.prototype.stop;
217
+ jg.prototype.fullBox=jg.prototype.U;jg.prototype.box=jg.prototype.box;var lg=0,mg=1;function sg(a){function b(){d=!0}function c(l){f.push(l);ng(l)}a=Ob(a);var d=!1,e,f=[],g=[];(new jg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).U("stsd",function(l){e=l;f.push(l);pg(l)}).U("encv",b).U("enca",b).U("avc1",function(l){g.push({box:l,ac:1701733238})}).U("avc3",function(l){g.push({box:l,ac:1701733238})}).U("ac-3",function(l){g.push({box:l,ac:1701733217})}).U("ec-3",function(l){g.push({box:l,ac:1701733217})}).U("mp4a",function(l){g.push({box:l,ac:1701733217})}).parse(a);
218
+ if(d)return a;if(0==g.length||!e)throw cb(Mc(a)),new N(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=tg(a,e,k.box,f,k.ac);return a}
219
+ function tg(a,b,c,d,e){var f=ug.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);vg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=ud("Xbox One")?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,vg(e,d.start,d.size+k.byteLength);k=Rb(e,b.start);b=og(b);
220
+ a=k.getUint32(b);k.setUint32(b,a+1);return e}function vg(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 ug=new zc(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 wg(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=xg(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,u=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){r=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){u=y;break}if(-1===
221
+ r||-1===u)p=yg(d,e),a.nestedCues.push(p);else{for(;r<=u;r++)if(y=p[r]){var w=y.l,x=y.i,C=y.j,D=y.h;if(w!=h||x!=k||C!=l||D!=m)n.payload&&a.nestedCues.push(n),n=xg(d,e,w,x,C,D),h=w,k=x,l=C,m=D;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=yg(d,e),a.nestedCues.push(n));n=xg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
222
+ function xg(a,b,c,d,e,f){a=new qb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function yg(a,b){var c=new qb(a,b,"");c.lineBreak=!0;return c}function zg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Ag(a,b){this.i=[];this.g=1;this.h=0;this.D=a;this.u=b;this.j=this.m=!1;this.l="white";this.s="black";Bg(this)}function Cg(a,b,c){return wg(new qb(b,c,""),"CC"+(a.D<<1|a.u+1),a.i,b,c)}function Bg(a){Dg(a,0,15);a.g=1}function Eg(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Fg:d=Gg.has(c)?Gg.get(c):String.fromCharCode(c);break;case Hg:d=Ig.get(c);break;case Jg:a.i[a.g].pop();d=Kg.get(c);break;case Lg:a.i[a.g].pop(),d=Mg.get(c)}d&&a.i[a.g].push(new zg(d,a.m,a.j,a.s,a.l))}}
223
+ function Ng(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Dg(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
224
+ var Fg=0,Hg=1,Jg=2,Lg=3,Gg=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"]]),Ig=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"]]),Kg=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
225
+ [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"]]),Mg=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
226
+ [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 Og(a,b){this.h=Pg;this.s=new Ag(a,b);this.i=new Ag(a,b);this.l=new Ag(a,b);this.g=this.i;this.j=0;this.m=null}function Qg(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Rg&&a.h!==Sg&&(e=Cg(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Dg(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Dg(c,0,15),d.g=15);a.h=Rg;d.h=b;return e}function Tg(a){a.h=Ug;a.g=a.l;a.g.h=0}function Vg(a){Ya("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.s;a.h=Sg}
227
+ var Pg=0,Ug=1,Rg=3,Sg=4,Wg="black green blue cyan red yellow magenta black".split(" "),Xg="white green blue cyan red yellow magenta white_italics".split(" ");function Yg(){this.l=!1;this.F=this.I=0;this.H=Zg;this.i=[];this.g=this.h=this.j=0;this.D=this.s=!1;this.u="white";this.m="black";$g(this)}function $g(a){a.i=[];for(var b=0;15>b;b++)a.i.push(ah())}function ah(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function bh(a,b){ch(a)&&(a.i[a.h][a.g]=new zg(b,a.D,a.s,a.m,a.u),a.g++)}function ch(a){var b=a.g<a.F&&0<=a.g;return a.h<a.I&&0<=a.h&&b}Yg.prototype.isVisible=function(){return this.l};
228
+ function dh(a,b,c){var d=new qb(a.j,b,"");d.textAlign=a.H===eh?"left":a.H===fh?"right":ub;if(c=wg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var eh=0,fh=1,Zg=2;function gh(){this.i=[];this.h=null;this.g=0}function hh(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 ih(a.h)),a.h=null,a.g=0))}function ih(a){this.g=0;this.h=a}ih.prototype.oa=function(){return this.g<this.h.length};ih.prototype.$=function(){return this.g};function jh(a){if(!a.oa())throw new N(2,2,3E3);return a.h[a.g++]}ih.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function kh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
229
+ function lh(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=jh(b).value;b=null;c=t(mh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=dh(e,d,a.i)),$g(e);return b}if(137===c)for(b=jh(b).value,b=t(mh(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=jh(b).value;b=null;c=t(mh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=dh(e,d,a.i)),e.l=!1;return b}if(139===c){c=jh(b).value;
230
+ b=null;c=t(mh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=dh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=jh(b).value,nh(a,b,d);if(143===c)return d=nh(a,255,d),oh(a),d;if(144===c)b.skip(1),d=jh(b).value,a.g&&(a.g.s=0<(d&128),a.g.D=0<(d&64));else if(145===c)d=jh(b).value,c=jh(b).value,b.skip(1),a.g&&(b=ph((c&48)>>4,(c&12)>>2,c&3),a.g.u=ph((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=jh(b).value,b=jh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
231
+ b.skip(1),d=jh(b).value,b.skip(1),a.g&&(a.g.H=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Yg;f.j=d;a.h[c]=f}d=jh(b).value;jh(b);jh(b);f=jh(b).value;var g=jh(b).value;b=jh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.D=!1,b.s=!1,b.u="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.I=(f&15)+1;b.F=(g&63)+1;a.g=a.h[c]}}}return null}
232
+ var mh=function qh(a,b){var d,e;return Ia(qh,function(f){1==f.g&&(d=0);if(5!=f.g)return 8>d?(e=1===(b&1))&&a.h[d]?v(f,d,5):f.v(5):f.v(0);b>>=1;d++;return f.v(2)})};function nh(a,b,c){var d=null;b=t(mh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=dh(f,c,a.i));a.h[e]=null}return d}function oh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function ph(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return rh[a<<2|b<<1|c]}
233
+ var sh=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"]]),rh="black blue green cyan red magenta yellow white".split(" ");function th(){this.h=[];this.g=[];this.i=new gh;this.l=0;this.u=new Map([["CC1",new Og(0,0)],["CC2",new Og(0,1)],["CC3",new Og(1,0)],["CC4",new Og(1,1)]]);this.s=this.m=0;this.j=new Map;uh(this)}function uh(a){a.m=0;a.s=0;a=t(a.u.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Bg(b.i),Bg(b.l),Bg(b.s)}
234
+ function vh(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=wh(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())hh(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=xh(a,e.value),c.push.apply(c,ja(e));a.i.i=[];a.h=[];a.g=[];return c}
235
+ function wh(a,b){var c=b.type;if(16===(b.Ba&112)){var d=b.Ba>>3&1;0===c?a.m=d:a.s=d}c=a.u.get("CC"+(c<<1|(c?a.s:a.m)+1));if(255===b.Ba&&255===b.Ra||!b.Ba&&!b.Ra||!yh(b.Ba)||!yh(b.Ra))return 45<=++a.l&&uh(a),null;a.l=0;b.Ba&=127;b.Ra&=127;if(!b.Ba&&!b.Ra)return null;d=null;if(16===(b.Ba&112))a:{var e=b.Ba;d=b.Ra;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Xg[f]:7===f&&(h=!0);
236
+ d=1===(d&1);if(c.h!==Sg){f=c.g;if(c.h===Rg&&e!==f.g){var k=1+e-f.h;Ng(f,k,1+f.g-f.h,f.h);Dg(f,0,k-1);Dg(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.s="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Eg(c.g,Fg,32),g=!1,e=Xg[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=Wg[(d&14)>>1]),c.g.s=g;else if(17===(e&247)&&48===(d&240))Eg(c.g,Hg,d);else if(18===
237
+ (e&246)&&32===(d&224))Eg(c.g,e&1?Lg:Jg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Ra){case 32:Tg(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=Qg(c,2,d);break;case 38:e=Qg(c,3,d);break;case 39:e=Qg(c,4,d);break;case 40:Eg(c.g,Fg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Bg(c.s);Vg(c);break;case 43:Vg(c);break;case 44:e=c.i;g=null;c.h!==Sg&&(g=Cg(e,c.j,d));Dg(e,0,15);e=g;break;case 45:e=c.g;c.h!==Rg?e=null:(g=Cg(e,c.j,d),h=e.g-e.h+1,Ng(e,h-1,h,e.h),Dg(e,
238
+ 0,h-1),Dg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Dg(c.l,0,15);break;case 47:e=null,c.h!==Sg&&(e=Cg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Tg(c),c.j=d}d=e;break a}d=null}else e=b.Ra,Eg(c.g,Fg,b.Ba),Eg(c.g,Fg,e);return d}
239
+ function xh(a,b){var c=[];try{for(;b.oa();){var d=jh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=jh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new kh(e));for(var g=a.j.get(e),h=b.$();b.$()-h<f;){e=b;var k=jh(e),l=k.value,m=k.pts;if(16===l){var n=jh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var r=g.g;e=null;switch(l){case 8:!ch(r)||0>=r.g&&0>=r.h||(0>=r.g?(r.g=r.F-1,r.h--):r.g--,r.i[r.h][r.g]=null);break;case 13:r.isVisible()&&(e=dh(r,p,g.i));if(r.h+1>=r.I){p=r;for(var u=0,y=1;15>y;y++,
240
+ u++)p.i[u]=p.i[y];for(y=0;1>y;y++,u++)p.i[u]=ah()}else r.h++;r.g=0;break;case 14:r.isVisible()&&(e=dh(r,p,g.i));r.i[r.h]=ah();r.g=0;break;case 12:r.isVisible()&&(e=dh(r,p,g.i)),$g(r),p=r,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=lh(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?bh(g.g,"\u266a"):bh(g.g,
241
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&bh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(sh.has(e)){var x=sh.get(e);bh(g.g,x)}else bh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?bh(g.g,"_"):bh(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(C){if(C instanceof N&&3E3===C.code)Ya("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function yh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function zh(){}var Bh=function Ah(a,b){var d,e,f,g;return Ia(Ah,function(h){if(1==h.g){for(var k=b,l=0,m=0;m<k.length;)2==l&&3==k[m]?(l=0,k=[].concat(ja(k)),k.splice(m,1),k=new Uint8Array(k)):0==k[m]?l++:l=0,m++;d=k;e=0}if(4!=h.g){if(!(e<d.length))return h.v(0);for(f=0;255==d[e];)f+=255,e++;f+=d[e++];for(g=0;255==d[e];)g+=255,e++;g+=d[e++];return 4!=f?h.v(4):v(h,d.subarray(e,e+g),4)}e+=g;return h.v(2)})};function Ch(a,b){var c=null,d=null,e=a.N();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.N());b&16&&(d=a.N());return{trackId:e,Zd:c,Pe:d}}function Dh(a,b){return{jd:1==b?a.Hb():a.N()}}function Eh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.N()}}
242
+ function Fh(a,b,c){var d=a.N(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=t(jb(d)),g=f.next();!g.done;g=f.next())g={Jd:null,sampleSize:null,Mc:null},c&256&&(g.Jd=a.N()),c&512&&(g.sampleSize=a.N()),c&1024&&a.skip(4),c&2048&&(g.Mc=0==b?a.N():a.ne()),e.push(g);return{Bg:d,qe:e}};function Gh(){this.j=new zh;this.i=new Map;this.h=this.g=0}
243
+ Gh.prototype.init=function(a){var b=this,c=[],d=[];(new jg).box("moov",ng).box("mvex",ng).U("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.N();f=f.N();b.g=e;b.h=f}).box("trak",ng).U("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.N();c.push(e)}).box("mdia",ng).U("mdhd",function(e){e=Eh(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new N(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
244
+ Gh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new jg).box("moof",ng).box("traf",ng).U("trun",function(k){f=Fh(k.reader,k.version,k.flags).qe}).U("tfhd",function(k){k=Ch(k.reader,k.flags);d=k.Zd||b.g;e=k.Pe||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).U("tfdt",function(k){g=Dh(k.reader,k.version).jd}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,r=f,u=0,y=p;for(r.length&&(y=r[0].sampleSize||p);k.oa();){var w=k.N();if(6==
245
+ (k.aa()&31)){var x=0;r.length>u&&(x=r[u].Mc||0);x=(l+x)/m;for(var C=t(Bh(b.j,k.bb(w-1))),D=C.next();!D.done;D=C.next())c.push({Bf:D.value,pts:x})}else k.skip(w-1);y-=w+4;0==y&&(l=r.length>u?l+(r[u].Jd||n):l+n,u++,y=r.length>u?r[u].sampleSize||p:p)}}).parse(a,!1);return c};function Jh(){this.h=new Gh;this.g=new th}Jh.prototype.init=function(a){this.h.init(a)};
246
+ function Kh(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Ob(e.Bf);if(0<f.length&&(d=a.g,e=e.pts,f=new gg(f,0),181===f.aa()&&49===f.Gb()&&1195456820===f.N()&&3===f.aa())){var g=f.aa();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.aa(),l=(k&4)>>2,m=f.aa(),n=f.aa();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Ba:m,Ra:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return vh(a.g)}
247
+ ;function Lh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Mh(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function Nh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(Oh(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
248
+ function Ph(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Oh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Oh(a){if(!a)return[];for(var b=[],c=t(jb(a.length)),d=c.next();!d.done;d=c.next())d=d.value,b.push({start:a.start(d),end:a.end(d)});return b};function Qh(a,b,c,d){var e=this;this.g=a;this.m=c;this.j={};this.I={};this.i=null;this.L=d||function(){};this.l={};this.h=new cf;this.u={};this.D=b;this.F=new yc;this.s=Rh(this,this.F);this.J=new af(function(){return Sh(e)});this.H=""}function Rh(a,b){var c=new MediaSource;a.h.xa(c,"sourceopen",function(){URL.revokeObjectURL(a.H);b.resolve()});a.H=Th(c);a.g.src=a.H;return c}q=Qh.prototype;q.destroy=function(){return this.J.destroy()};
249
+ function Sh(a){var b,c,d,e,f,g,h,k;return K(function(l){if(1==l.g){b=[];for(c in a.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p["catch"](Yb)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.i&&b.push(a.i.destroy());a.m&&b.push(a.m.destroy());for(k in a.u)b.push(a.u[k].destroy());return v(l,Promise.all(b),2)}a.h&&(a.h.release(),a.h=null);a.g&&(a.g.removeAttribute("src"),a.g.load(),a.g=null);a.s=null;a.i=null;a.m=null;a.j={};a.u={};a.D=null;a.l=
250
+ {};z(l)})}
251
+ q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g)return d=xc,v(m,c.F,2);e={};f=t(a.keys());for(g=f.next();!g.done;e={ta:e.ta},g=f.next())e.ta=g.value,h=a.get(e.ta),k=Tc(h.mimeType,h.codecs),e.ta==d.ba?Uh(c,k):(!b&&MediaSource.isTypeSupported(k)||!Pc(k,e.ta)||(c.u[e.ta]=new Oc,k=Rc(e.ta,k)),l=c.s.addSourceBuffer(k),c.h.A(l,"error",function(n){return function(){c.l[n.ta][0].p.reject(new N(2,3,3014,c.g.error?c.g.error.code:0))}}(e)),c.h.A(l,"updateend",function(n){return function(){return Vh(c,n.ta)}}(e)),
252
+ c.j[e.ta]=l,c.I[e.ta]=k,c.l[e.ta]=[]);z(m)})};function Uh(a,b){a.i||(a.i=new Xc(a.m));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.i.s=$b(Zc[b]))}function Wh(a){return a.s?"ended"==a.s.readyState:!0}function Xh(a,b){if(b==wc)var c=a.i.g;else c=Yh(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function Zh(a,b){return b==wc?a.i.h:Lh(Yh(a,b))}
253
+ function $h(a,b,c){if(b==wc)return a=a.i,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Yh(a,b);return Nh(a,c)}q.zc=function(){var a={total:Oh(this.g.buffered),audio:Oh(Yh(this,"audio")),video:Oh(Yh(this,"video")),text:[]};if(this.i){var b=this.i.g,c=this.i.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Yh(a,b){try{return a.j[b].buffered}catch(c){return null}}
254
+ function ai(a,b,c,d,e,f){var g,h,k,l,m,n,p,r;return K(function(u){if(1==u.g){g=xc;if(b==g.ba)return v(u,$c(a.i,c,d,e),0);if(a.u[b])return v(u,Sc(a.u[b],c),10);if(f)return a.i||Uh(a,"text/vtt"),null==d&&null==e?a.D.init(c):(h=Kh(a.D,c),h.length&&(k=a.j[g.Pa].timestampOffset,ed(a.i,h,d,e,k))),c=bi(a,c,d,b),v(u,ci(a,b,function(){a.j[b].appendBuffer(c)}),0);c=bi(a,c,d,b);return v(u,ci(a,b,function(){a.j[b].appendBuffer(c)}),0)}l=u.h;a.i||Uh(a,"text/vtt");l.metadata&&(m=a.j[b].timestampOffset,a.L(l.metadata,
255
+ m,e));l.captions&&l.captions.length&&(n=a.j[g.Pa].timestampOffset,p=cd(l.captions),ed(a.i,p,d,e,n));r=l.data;r=bi(a,r,d,b);return v(u,ci(a,b,function(){a.j[b].appendBuffer(r)}),0)})}function di(a,b){var c=Zh(a,"video")||0;bd(a.i,b,c)}function ei(a){a.i&&bd(a.i,"",0)}q.remove=function(a,b,c){var d=this,e;return K(function(f){e=xc;return a==e.ba?v(f,d.i.remove(b,c),0):v(f,ci(d,a,function(){c<=b?Vh(d,a):d.j[a].remove(b,c)}),0)})};
256
+ function fi(a,b){var c;return K(function(d){c=xc;return b==c.ba?a.i?v(d,a.i.remove(0,Infinity),0):d["return"]():v(d,ci(a,b,function(){var e=a.s.duration;0>=e?Vh(a,b):a.j[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return K(function(d){c=xc;return a==c.ba?d["return"]():v(d,ci(b,a,function(){b.g.currentTime-=.001;Vh(b,a)}),0)})};
257
+ function gi(a,b,c,d,e){var f;return K(function(g){f=xc;return b==f.ba?(a.i.D=c,ad(a.i,d,e),g["return"]()):v(g,Promise.all([ci(a,b,function(){var h=a.j[b].appendWindowStart,k=a.j[b].appendWindowEnd;a.j[b].abort();a.j[b].appendWindowStart=h;a.j[b].appendWindowEnd=k;Vh(a,b)}),ci(a,b,function(){var h=c;0>h&&(h+=.001);a.j[b].timestampOffset=h;Vh(a,b)}),ci(a,b,function(){a.j[b].appendWindowStart=0;a.j[b].appendWindowEnd=e;a.j[b].appendWindowStart=d;Vh(a,b)})]),0)})}
258
+ q.endOfStream=function(a){var b=this;return K(function(c){return v(c,hi(b,function(){Wh(b)||(a?b.s.endOfStream(a):b.s.endOfStream())}),0)})};q.La=function(a){var b=this;return K(function(c){return v(c,hi(b,function(){b.s.duration=a}),0)})};q.getDuration=function(){return this.s.duration};function Vh(a,b){var c=a.l[b][0];c&&(c.p.resolve(),ii(a,b))}function ci(a,b,c){bf(a.J);c={start:c,p:new yc};a.l[b].push(c);1==a.l[b].length&&ji(a,b);return c.p}
259
+ function hi(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:bf(a.J);c=[];d={};for(e in a.j)d.Mb=new yc,f={start:function(l){return function(){return l.Mb.resolve()}}(d),p:d.Mb},a.l[e].push(f),c.push(d.Mb),1==a.l[e].length&&f.start(),d={Mb:d.Mb};A(k,2);return v(k,Promise.all(c),4);case 4:wa(k,3);break;case 2:throw g=E(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.j)ii(a,h)}z(k)}})}function ii(a,b){a.l[b].shift();ji(a,b)}
260
+ function ji(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),ii(a,b)}}function bi(a,b,c,d){var e=a.g.mediaKeys;null==c&&e&&(td()||ud("Xbox One"))&&"mp4"==a.I[d].split(";")[0].split("/")[1]&&(b=sg(b));return b}var Th=window.URL.createObjectURL;function ki(a,b,c){this.na=a;this.ka=b;this.fa=c}ki.prototype.Yb=function(){return this.ka};ki.prototype.Ub=function(){return this.fa};function li(a,b){return a&&b?a.Yb()==b.Yb()&&a.Ub()==b.Ub()&&pb(a.na(),b.na()):a==b}M("shaka.media.InitSegmentReference",ki);ki.prototype.getEndByte=ki.prototype.Ub;ki.prototype.getStartByte=ki.prototype.Yb;
261
+ function mi(a,b,c,d,e,f,g,h,k,l,m){l=void 0===l?[]:l;this.startTime=a;this.j=this.endTime=b;this.i=c;this.ka=d;this.fa=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m}q=mi.prototype;q.na=function(){return this.i()};q.kf=function(){return this.startTime};q.Xe=function(){return this.endTime};q.Yb=function(){return this.ka};q.Ub=function(){return this.fa};q.qf=function(){return this.tilesLayout};
262
+ M("shaka.media.SegmentReference",mi);mi.prototype.getTilesLayout=mi.prototype.qf;mi.prototype.getEndByte=mi.prototype.Ub;mi.prototype.getStartByte=mi.prototype.Yb;mi.prototype.getEndTime=mi.prototype.Xe;mi.prototype.getStartTime=mi.prototype.kf;mi.prototype.getUris=mi.prototype.na;function T(a,b,c){this.j=a;this.Lc=b;this.m=this.l=Infinity;this.g=1;this.h=this.i=null;this.s=0;this.u=!0;this.D=0;this.F=void 0===c?!0:c;this.H=0}q=T.prototype;q.getDuration=function(){return this.l};q.cf=function(){return this.g};q.La=function(a){this.l=a};q.jf=function(){return this.j};q.ve=function(a){this.s=a};q.ic=function(a){this.u=a};q.Qd=function(a){this.m=a};q.Rf=function(a){this.Lc=a};q.We=function(){return this.Lc};
263
+ q.Db=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Bd(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.j&&this.F&&(this.j=(Date.now()+this.s)/1E3-this.h-this.g)}};q.Bd=function(a){this.i=null==this.i?a:Math.min(this.i,a)};q.zd=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.i&&(this.i+=a);null!=this.h&&(this.h+=a)};q.Y=function(){return Infinity==this.l&&!this.u};
264
+ q.mb=function(){return Infinity!=this.l&&!this.u};q.ab=function(){return Math.max(this.D,this.ib()-this.m)};q.we=function(a){this.D=a};q.ib=function(){return this.Y()||this.mb()?Math.min(Math.max(0,(Date.now()+this.s)/1E3-this.g-this.j)+this.H,this.l):this.h||this.l};q.Xb=function(a){var b=Math.max(this.i,this.D);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.ib()-this.m+a,this.Sa()))};q.Ab=function(){return this.Xb(0)};
265
+ q.Sa=function(){return Math.max(0,this.ib()-(this.Y()||this.mb()?this.Lc:0))};q.ze=function(){return null==this.j||null!=this.h&&this.F?!1:!0};q.ue=function(a){this.H=a};M("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.ue;T.prototype.usingPresentationStartTime=T.prototype.ze;T.prototype.getSeekRangeEnd=T.prototype.Sa;T.prototype.getSeekRangeStart=T.prototype.Ab;T.prototype.getSafeSeekRangeStart=T.prototype.Xb;T.prototype.getSegmentAvailabilityEnd=T.prototype.ib;
266
+ T.prototype.setUserSeekStart=T.prototype.we;T.prototype.getSegmentAvailabilityStart=T.prototype.ab;T.prototype.isInProgress=T.prototype.mb;T.prototype.isLive=T.prototype.Y;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.zd;T.prototype.notifyMinSegmentStartTime=T.prototype.Bd;T.prototype.notifySegments=T.prototype.Db;T.prototype.getDelay=T.prototype.We;T.prototype.setDelay=T.prototype.Rf;T.prototype.setSegmentAvailabilityDuration=T.prototype.Qd;
267
+ T.prototype.setStatic=T.prototype.ic;T.prototype.setClockOffset=T.prototype.ve;T.prototype.getPresentationStartTime=T.prototype.jf;T.prototype.setDuration=T.prototype.La;T.prototype.getMaxSegmentDuration=T.prototype.cf;T.prototype.getDuration=T.prototype.getDuration;function ni(a,b){this.j=a;this.m=oi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.s=b;this.i=function(){}}ni.prototype.release=function(){this.j=null;this.i=function(){}};function pi(a,b){a.i=b}function qi(a){this.g=a}function oi(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(Oh(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 ri(a,b,c,d,e){var f=this;this.g=a;this.D=b;this.o=c;this.u=e;this.h=new cf;this.s=!1;this.F=a.readyState;this.j=!1;this.i=d;this.m=!1;this.h.A(a,"waiting",function(){return si(f)});this.l=(new O(function(){si(f)})).Da(.25)}ri.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.l&&(this.l.stop(),this.l=null);this.i&&(this.i.release(),this.i=null);this.g=this.D=this.u=null};ri.prototype.Ed=function(){this.m=!0;si(this)};
268
+ function si(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.s)return}else a.s=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.F&&(a.j=!1,a.F=a.g.readyState);var b;if(!(b=!a.i)){b=a.i;var c=b.j,d=oi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.s&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.o.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=Ph(b,g,a.o.gapDetectionThreshold);if(!(null==
269
+ c||0==c&&!a.m||(d=b.start(c),d>=a.D.Sa()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new R("largegap",g),g.cancelable=!0,a.u(g),a.o.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function ti(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=ui.value().get(b),c.xa(a,b,d))}var ui=new zc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function vi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new cf;this.i=new wi(a);ti(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){xi(d,d.j)})}vi.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 yi(a){return a.m?a.g.currentTime:a.j}function zi(a,b){0<a.g.readyState?Ai(a.i,b):ti(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){xi(a,a.j)})}
270
+ function xi(a,b){.001>Math.abs(a.g.currentTime-b)?Bi(a):(a.h.xa(a.g,"seeking",function(){Bi(a)}),Ai(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Bi(a){a.m=!0;a.h.A(a.g,"seeking",function(){return a.l()})}function wi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}wi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
271
+ function Ai(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Da(.1)};function Ci(a){function b(){null==c.i||0==c.i?c.j=!0:(c.h.xa(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.i))}var c=this;this.g=a;this.j=!1;this.i=null;this.h=new cf;ti(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,function(){b()})}Ci.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.g=null};Ci.prototype.m=function(a){this.i=this.j?this.i:a};Ci.prototype.l=function(){return(this.j?this.g.currentTime:this.i)||0};Ci.prototype.F=function(){};
272
+ function Di(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.H=b.minBufferTime||0;this.o=c;this.D=e;this.u=null;this.j=new ri(a,b.presentationTimeline,c,Ei(a,c),f);this.h=new vi(a,function(){a:{var h=g.j;h.s=!0;h.m=!1;h.j=!1;var k=yi(g.h);h=Fi(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;zi(g.h,h);h=void 0;break a}g.D();h=void 0}return h},Gi(this,d));this.s=(new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=yi(g.h),k=g.g.Ab(),l=g.g.Sa();3>l-k&&(k=
273
+ l-3);h<k&&(h=Fi(g,h),g.i.currentTime=h)}})).Da(.25)}Di.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.s&&(this.s.stop(),this.s=null);this.i=this.h=this.g=this.o=null;this.D=function(){}};Di.prototype.m=function(a){zi(this.h,a)};Di.prototype.l=function(){var a=yi(this.h);return 0<this.i.readyState&&!this.i.paused?Hi(this,a):a};
274
+ function Gi(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Ab():a.g.Sa():0>b&&(b=a.g.Sa()+b);return Ii(a,Hi(a,b))}Di.prototype.F=function(){this.j.Ed()};function Ii(a,b){var c=a.g.getDuration();return b>=c?c-a.o.durationBackoff:b}function Fi(a,b){var c=Math.max(a.H,a.o.rebufferingGoal),d=a.o.safeSeekOffset,e=a.g.Ab(),f=a.g.Sa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Xb(c),k=a.g.Xb(d);c=a.g.Xb(c+d);return b>=g?Ii(a,b):b>f?f:b<e?Mh(a.i.buffered,k)?k:c:b>=h||Mh(a.i.buffered,b)?b:c}
275
+ function Hi(a,b){var c=a.g.Ab();if(b<c)return c;c=a.g.Sa();return b>c?c:b}function Ei(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new ni(new qi(a),b.stallThreshold);pi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function U(a){this.M=a;this.g=null;this.h=0;this.i=!1}q=U.prototype;q.destroy=function(){Tb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.M=[],this.g&&this.g.stop(),this.g=null)};q.wf=function(){this.i=!0};
276
+ q.find=function(a){for(var b=this.M.length-1,c=b;0<=c;--c){var d=this.M[c],e=c<b?this.M[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.M.length&&a<this.M[0].startTime?this.h:null};q.get=function(a){if(0==this.M.length)return null;a-=this.h;return 0>a||a>=this.M.length?null:this.M[a]};q.offset=function(a){if(!this.i)for(var b=t(this.M),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
277
+ q.Gc=function(a){!this.i&&a.length&&(this.M=this.M.filter(function(b){return b.startTime<a[0].startTime}),this.M.push.apply(this.M,ja(a)))};q.Cb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.M.length||d.endTime>c.M[0].startTime)});this.Gc(a);this.gb(b)};q.gb=function(a){if(!this.i){var b=this.M.length;this.M=this.M.filter(function(c){return c.endTime>a});this.h+=b-this.M.length}};
278
+ q.$a=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.M.length;)if(this.M[this.M.length-1].startTime>=b)this.M.pop();else break;for(;this.M.length;)if(this.M[0].endTime<=a)this.M.shift(),c||this.h++;else break;0!=this.M.length&&(a=this.M[this.M.length-1],this.M[this.M.length-1]=new mi(a.startTime,b,a.i,a.ka,a.fa,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout))}};
279
+ q.Oc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.M.push.apply(c.M,ja(d)):(c.g.stop(),c.g=null)}),this.g.Da(a))};U.prototype[Symbol.iterator]=function(){return this.zb(0)};U.prototype.zb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Ji(this,b,d)};
280
+ function Ki(a,b,c){return new U([new mi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",U);U.forSingleSegment=Ki;U.prototype.getIteratorForTime=U.prototype.zb;U.prototype.updateEvery=U.prototype.Oc;U.prototype.fit=U.prototype.$a;U.prototype.evict=U.prototype.gb;U.prototype.mergeAndEvict=U.prototype.Cb;U.prototype.merge=U.prototype.Gc;U.prototype.offset=U.prototype.offset;U.prototype.get=U.prototype.get;U.prototype.find=U.prototype.find;U.prototype.markImmutable=U.prototype.wf;
281
+ U.prototype.release=U.prototype.release;U.prototype.destroy=U.prototype.destroy;function Ji(a,b,c){this.i=a;this.h=b;this.g=c}Ji.prototype.seek=function(a){Tb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.zb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
282
+ Ji.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.na().length&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};Ji.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.g.length?(this.g++,a.na().length&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",Ji);Ji.prototype.next=Ji.prototype.next;Ji.prototype.current=Ji.prototype.current;
283
+ Ji.prototype.seek=Ji.prototype.seek;function Li(){U.call(this,[]);this.j=[]}ra(Li,U);q=Li.prototype;q.clone=function(){var a=new Li;a.j=this.j.slice();return a};q.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.M.length}return null};
284
+ q.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.M.length}return null};q.offset=function(){};q.Gc=function(){};q.gb=function(){};q.Cb=function(){};q.$a=function(){};q.Oc=function(){};M("shaka.media.MetaSegmentIndex",Li);Li.prototype.updateEvery=Li.prototype.Oc;Li.prototype.fit=Li.prototype.$a;Li.prototype.mergeAndEvict=Li.prototype.Cb;Li.prototype.evict=Li.prototype.gb;Li.prototype.merge=Li.prototype.Gc;
285
+ Li.prototype.offset=Li.prototype.offset;Li.prototype.get=Li.prototype.get;Li.prototype.find=Li.prototype.find;Li.prototype.release=Li.prototype.release;function Mi(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Dc();this.h=new O(function(){b.g.le(.25*b.i)})}Mi.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Mi.prototype.set=function(a){this.i=a;Ni(this)};Mi.prototype.Ac=function(){return this.g.Ac()};function Ni(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Dc()!=b&&a.g.Pd(b);return}catch(c){}a.h.Da(.25);0!=a.g.Dc()&&a.g.Pd(0)};function Oi(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){Pi(b,!1)})).Da(.25)}Oi.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()};
286
+ function Pi(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.h.currentTime,f=b,g=t(d.l.g),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.j.get(h),l=e<h.startTime?Qi:e>h.endTime?Ri:Si;d.j.set(h,l);for(var m=t(d.m),n=m.next();!n.done;n=m.next())n=n.value,n.ub==k&&n.tb==l&&n.lb(h,f)}}};function Ti(a){var b=this;this.h=function(){};this.g=new Set;this.j=a;this.i=(new O(function(){for(var c=b.j(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&b.g["delete"](e)})).Da(2)}Ti.prototype.release=function(){this.h=function(){};this.g.clear();this.i.stop()};function Ui(a,b){a.h=b};function Vi(a){var b=this;this.l=a;this.j=new Map;this.g=function(){};this.h=function(){};this.i=function(){};this.m=[{ub:null,tb:Si,lb:function(c,d){return b.g(c,d)}},{ub:Qi,tb:Si,lb:function(c,d){return b.g(c,d)}},{ub:Ri,tb:Si,lb:function(c,d){return b.g(c,d)}},{ub:Si,tb:Qi,lb:function(c,d){return b.h(c,d)}},{ub:Si,tb:Ri,lb:function(c,d){return b.h(c,d)}},{ub:Qi,tb:Ri,lb:function(c,d){return b.i(c,d)}},{ub:Ri,tb:Qi,lb:function(c,d){return b.i(c,d)}}]}
287
+ Vi.prototype.release=function(){this.l=null;this.j.clear();this.g=function(){};this.h=function(){};this.i=function(){}};function Wi(a,b,c,d){a.g=b;a.h=c;a.i=d}var Qi=1,Si=2,Ri=3;function Xi(a,b,c,d,e){a=Ue(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Yi(a,b){var c=this;this.C=b;this.B=a;this.o=null;this.l=1;this.i=this.h=null;this.g=new Map;this.m=!1;this.s=null;this.j=!1;this.J=new af(function(){return Zi(c)})}Yi.prototype.destroy=function(){return this.J.destroy()};function Zi(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=t(a.g.values());for(d=c.next();!d.done;d=c.next())e=d.value,$i(e),b.push(aj(e));return v(f,Promise.all(b),2)}a.g.clear();a.C=null;a.B=null;a.o=null;z(f)})}
288
+ Yi.prototype.configure=function(a){this.o=a;this.s=new Ae({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)};Yi.prototype.start=function(){var a=this;return K(function(b){if(1==b.g)return v(b,bj(a),2);bf(a.J);a.m=!0;z(b)})};
289
+ function cj(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=xc,A(k,2),v(k,fi(a.C.S,c.ba),4);case 4:wa(k,3);break;case 2:if(d=E(k),a.C)a.C.onError(d);case 3:e=Tc(b.mimeType,b.codecs);Uh(a.C.S,e);f=a.C.S.m;if(g=f.isTextVisible()||a.o.alwaysStreamText)h=dj(b),a.g.set(c.ba,h),ej(a,h,0);z(k)}})}function fj(a){var b=a.g.get(wc);b&&($i(b),aj(b)["catch"](function(){}),a.g["delete"](wc));a.i=null}
290
+ function gj(a,b){var c=a.g.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.qb&&(hj(a,e,!1,0,!1),c.qb=d)}else if(d=c.qb)c.qb=null,hj(a,d,!0,0,!1)}}function ij(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.h=b;a.m&&(b.video&&hj(a,b.video,c,d,e),b.audio&&hj(a,b.audio,c,d,e))}function jj(a,b){a.i=b;a.m&&hj(a,b,!0,0,!1)}
291
+ function hj(a,b,c,d,e){var f=a.g.get(b.type);f||b.type!=wc?f&&(f.qb&&(b.trickModeVideo?(f.qb=b,b=b.trickModeVideo):f.qb=null),f.stream!=b||e)&&(b.type==wc&&Uh(a.C.S,Tc(b.mimeType,b.codecs)),f.stream=b,f.da=null,c&&(f.Sb?f.Rc=!0:f.Ta?(f.sb=!0,f.xc=d,f.Rc=!0):($i(f),kj(a,f,!0,d)["catch"](function(g){if(a.C)a.C.onError(g)}))),lj(a,f)["catch"](function(g){if(a.C)a.C.onError(g)})):cj(a,b)}
292
+ function lj(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.ya)return e["return"]();c=b.stream;d=b.ya;return c.segmentIndex?e.v(2):v(e,c.createSegmentIndex(),2)}if(b.ya!=d||b.stream!=c)return e["return"]();var f=a.C.Cc();var g=Zh(a.C.S,b.type),h=b.stream.segmentIndex.find(b.Ca?b.Ca.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.fa?k.fa-k.ka:null:null;k&&!h&&(h=(k.endTime-k.startTime)*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.fa?k.fa-k.ka:null)||0),k=a.C.getBandwidthEstimate(),
293
+ f=8*h/k<(g||0)-f-Math.max(a.B.minBufferTime||0,a.o.rebufferingGoal)||b.ya.h.g>h?!0:!1):f=!1;f&&b.ya.abort();z(e)})}function mj(a,b){b.Sb||b.sb||(b.Ta?(b.sb=!0,b.xc=0):null==Xh(a.C.S,b.type)?null==b.Na&&ej(a,b,0):($i(b),kj(a,b,!1,0)["catch"](function(c){if(a.C)a.C.onError(c)})))}
294
+ function bj(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){if(1==n.g){b=xc;if(!a.h)throw new N(2,5,5006);c=new Map;d=new Set;a.h.audio&&(c.set(b.eb,a.h.audio),d.add(a.h.audio));a.h.video&&(c.set(b.Pa,a.h.video),d.add(a.h.video));a.i&&(c.set(b.ba,a.i),d.add(a.i));e=a.C.S;f=a.o.forceTransmuxTS;return v(n,e.init(c,f),2)}bf(a.J);var p=a.B.presentationTimeline.getDuration();Infinity>p?a.C.S.La(p):a.C.S.La(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.g.has(k)||
295
+ (m=dj(l),a.g.set(k,m),ej(a,m,0));z(n)})}function dj(a){return{stream:a,type:a.type,da:null,Ca:null,Fc:null,wd:null,vd:null,ud:null,qb:null,endOfStream:!1,Ta:!1,Na:null,sb:!1,xc:0,Rc:!1,Sb:!1,Hd:!1,Zb:!1,ya:null}}
296
+ Yi.prototype.bc=function(a){var b=this,c,d,e,f,g;return K(function(h){switch(h.g){case 1:bf(b.J);if(a.Ta||null==a.Na||a.Sb)return h["return"]();a.Na=null;if(!a.sb){h.v(2);break}return v(h,kj(b,a,a.Rc,a.xc),3);case 3:return h["return"]();case 2:if(a.stream.segmentIndex){h.v(4);break}c=a.stream;return v(h,a.stream.createSegmentIndex(),5);case 5:if(c!=a.stream)return null==a.Na&&ej(b,a,0),h["return"]();case 4:A(h,6);d=nj(b,a);null!=d&&(ej(b,a,d),a.Zb=!1);wa(h,7);break;case 6:return e=E(h),v(h,oj(b,e),
297
+ 8);case 8:return h["return"]();case 7:f=Array.from(b.g.values());if(!b.m||!f.every(function(k){return k.endOfStream})){h.v(0);break}return v(h,b.C.S.endOfStream(),10);case 10:bf(b.J),g=b.C.S.getDuration(),0!=g&&g<b.B.presentationTimeline.getDuration()&&b.B.presentationTimeline.La(g),z(h)}})};
298
+ function nj(a,b){if(pj(b))return di(a.C.S,b.stream.originalId||""),null;b.type==wc&&ei(a.C.S);var c=a.C.Cc(),d=b.Ca?b.Ca.endTime:c,e=$h(a.C.S,b.type,c),f=Math.max(a.B.minBufferTime||0,a.o.rebufferingGoal,a.o.bufferingGoal)*a.l;if(d>=a.B.presentationTimeline.getDuration())return b.endOfStream=!0,"video"==b.type&&(c=a.g.get(wc))&&pj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.o.updateIntervalSeconds/2;e=Zh(a.C.S,b.type);e=qj(a,b,c,e);if(!e)return a.o.updateIntervalSeconds;f=Infinity;
299
+ var g=Array.from(a.g.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,pj(h)||h.da&&!h.da.current()||(f=Math.min(f,h.Ca?h.Ca.endTime:c));if(d>=f+a.B.presentationTimeline.g)return a.o.updateIntervalSeconds;rj(a,b,c,e)["catch"](function(){});return null}
300
+ function qj(a,b,c,d){if(b.da)return b.da.current();if(b.Ca||d)return b.da=b.stream.segmentIndex.zb(b.Ca?b.Ca.endTime:d),b.da&&b.da.next().value;a=a.o.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.da=b.stream.segmentIndex.zb(d),e=b.da&&b.da.next().value);e||(b.da=b.stream.segmentIndex.zb(c),e=b.da&&b.da.next().value);return e}
301
+ function rj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,y;return K(function(w){switch(w.g){case 1:return e=xc,f=b.stream,g=b.da,b.Ta=!0,A(w,2),v(w,sj(a,b,d),4);case 4:bf(a.J);if(a.j)return w["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.o.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(x){var C,D,B;return K(function(F){bf(a.J);if(a.j)return F["return"]();n=tj(n,x);C=!1;D=0;(new jg).box("mdat",function(G){D=G.size+G.start;C=!0}).parse(n,!1,!0);if(!C)return F.v(0);
302
+ B=n.subarray(0,D);n=n.subarray(D);return v(F,uj(a,b,c,f,d,B),0)})},v(w,vj(a,b,d,p),6);l=vj(a,b,d);return v(w,l,7);case 7:return m=w.h,bf(a.J),a.j?w["return"]():b.sb?(b.Ta=!1,ej(a,b,0),w["return"]()):v(w,uj(a,b,c,f,d,m),6);case 6:bf(a.J);if(a.j)return w["return"]();b.Ca=d;g.next();b.Ta=!1;b.Hd=!1;r=a.C.S.zc();u=r[b.type];bb(JSON.stringify(u));b.sb||a.C.Ed();ej(a,b,0);wa(w,0);break;case 2:y=E(w);bf(a.J,y);if(a.j)return w["return"]();b.Ta=!1;if(7001==y.code)b.Ta=!1,b.Na=null,ej(a,b,0),w.v(0);else if(b.type==
303
+ e.ba&&a.o.ignoreTextStreamFailures)a.g["delete"](e.ba),w.v(0);else if(3017==y.code)wj(a,b,y),w.v(0);else if(1001==y.code&&y.data&&404==y.data[1])b.Ta=!1,b.Na=null,ej(a,b,1),w.v(0);else return b.Zb=!0,y.severity=2,v(w,oj(a,y),0)}})}function tj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
304
+ function wj(a,b,c){if(!Array.from(a.g.values()).some(function(e){return e!=b&&e.Hd})){var d=Math.round(100*a.l);if(20<d)a.l-=.2;else if(4<d)a.l-=.04;else{b.Zb=!0;a.j=!0;a.C.onError(c);return}b.Hd=!0}ej(a,b,4)}
305
+ function sj(a,b,c){var d,e,f,g,h,k,l;return K(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.wd||e!=b.vd||f!=b.ud)h=function(){var n;return K(function(p){if(1==p.g)return A(p,2),b.vd=e,b.ud=f,b.wd=g,v(p,gi(a.C.S,b.type,g,e,f),4);if(2!=p.g)return wa(p,0);n=E(p);b.vd=null;b.ud=null;b.wd=null;throw n;})},d.push(h());!li(c.h,b.Fc)&&(b.Fc=c.h)&&(k=vj(a,b,c.h),l=function(){var n,p,r;return K(function(u){switch(u.g){case 1:return A(u,2),v(u,k,4);
306
+ case 4:return n=u.h,bf(a.J),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,v(u,ai(a.C.S,b.type,n,null,null,p),5);case 5:wa(u,0);break;case 2:throw r=E(u),b.Fc=null,r;}})},d.push(l()));return v(m,Promise.all(d),0)})}
307
+ function uj(a,b,c,d,e,f){var g;return K(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new jg).U("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.dc();var n=k.reader.dc();var p=k.reader.N();var r=k.reader.N();var u=k.reader.N();var y=k.reader.N();var w=e.startTime+r/p}else p=k.reader.N(),w=k.reader.Hb()/p+e.timestampOffset,r=w-e.startTime,u=k.reader.N(),y=k.reader.N(),m=k.reader.dc(),n=k.reader.dc();
308
+ k=k.reader.bb(k.reader.R.byteLength-k.reader.$());l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.C.Af():(l=(new Map).set("detail",{startTime:w,endTime:w+u/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:r,eventDuration:u,id:y,messageData:k}),l=new R(xj,l),a.C.onEvent(l)))}).parse(f),v(h,yj(a,b,c),2);if(3!=h.g)return bf(a.J),v(h,ai(a.C.S,b.type,f,e.startTime,e.endTime,g),3);bf(a.J);z(h)})}
309
+ function yj(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.o.bufferBehind,a.B.presentationTimeline.g);e=Xh(a.C.S,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():v(h,a.C.S.remove(b.type,e,e+g),2)}bf(a.J);z(h)})}function pj(a){return a&&a.type==wc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
310
+ function vj(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g)return e=$e,f=Xi(c.na(),c.ka,c.fa,a.o.retryParameters,d),g=a.C.nb.request(e,f),b.ya=g,v(k,g.promise,2);h=k.h;b.ya=null;return k["return"](h.data)})}
311
+ function kj(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.sb=!1,b.Rc=!1,b.xc=0,b.Sb=!0,b.Ca=null,b.Fc=null,b.da=null,d?(e=a.C.Cc(),f=a.C.S.getDuration(),v(g,a.C.S.remove(b.type,e+d,f),3)):v(g,fi(a.C.S,b.type),4);if(3!=g.g)return bf(a.J),c?v(g,a.C.S.flush(b.type),3):g.v(3);bf(a.J);b.Sb=!1;b.endOfStream=!1;ej(a,b,0);z(g)})}
312
+ function ej(a,b,c){var d=b.type;if(d!=wc||a.g.has(d))b.Na=(new pd(function(){var e;return K(function(f){if(1==f.g)return A(f,2),v(f,a.bc(b),4);if(2!=f.g)return wa(f,0);e=E(f);if(a.C)a.C.onError(e);z(f)})})).V(c)}function $i(a){null!=a.Na&&(a.Na.stop(),a.Na=null)}function aj(a){return K(function(b){return a.ya?v(b,a.ya.abort(),0):b.v(0)})}function oj(a,b){return K(function(c){if(1==c.g)return v(c,Ce(a.s),2);bf(a.J);a.C.onError(b);b.handled||a.o.failureCallback(b);z(c)})};function zj(a,b){var c=Aj(),d=this;this.j=b;this.i=a;this.l=c;this.s=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Bj(d)});this.J=new af(function(){return Cj(d)})}zj.prototype.destroy=function(){return this.J.destroy()};function Cj(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),Dj(a),v(e,a.u,2);a.g&&a.g.Ja.ob();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ja.ob();a.g=null;a.m=[];a.j=null;z(e)})}
313
+ function Ej(a,b){var c={Eb:function(){},Hc:function(){},ob:function(){},onError:function(){},Jc:function(){},Ag:function(){}};a.m.push({create:b,Ja:c});a.h&&a.h.abort();Dj(a);return c}
314
+ function Bj(a){return K(function(b){if(a.J.g)b=b.v(0);else{if(0==a.m.length||a.g&&!a.g.kb)var c=!1;else{a.g&&(a.g.Ja.ob(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ja.Eb(),a.g={node:d.node,payload:d.payload,kb:d.kb,Ja:c.Ja}):c.Ja.Jc();c=!0}c?c=Promise.resolve():a.g?c=Fj(a):(a.j.zf(a.i),a.s=new yc,c=a.s);b=v(b,c,1)}return b})}
315
+ function Fj(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.ef(a.i,a.l,a.g.node,a.g.payload),A(d,2),a.h=a.j.Re(a.i,a.l,a.g.payload),v(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ja.Hc(),a.g=null);wa(d,0);break;case 2:b=E(d);if(7001==b.code)a.g.Ja.ob();else a.g.Ja.onError(b);a.g=null;a.h=null;c=a;return v(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function Dj(a){a.s&&(a.s.resolve(),a.s=null)};function Gj(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Gj.prototype;q.remove=function(a,b){if(!this.g)return!1;Hj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
316
+ q.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(n,p){return n+"<"+p+">"},"");h=h.reduceRight(function(n,p){return n+"</"+p+">"},"");return g.lineBreak||g.spacer?(g.spacer&&Tb("shaka.extern.Cue","Please use lineBreak instead of spacer."),"\n"):g.nestedCues.length?g.nestedCues.map(b).join(""):k+g.payload+h}var c=a.map(function(g){if(g.nestedCues.length){var h=
317
+ g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):[];var e={};c=t(c);for(var f=c.next();!f.done;e={vb:e.vb},f=c.next())e.vb=f.value,a.some(function(g){return function(h){return h.startTime==g.vb.startTime&&h.endTime==g.vb.endTime&&h.text==g.vb.payload?!0:!1}}(e))||(f=Ij(e.vb))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-
318
+ d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=t(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};q.destroy=function(){this.g&&(Hj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
319
+ function Ij(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}
320
+ function Hj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}M("shaka.text.SimpleTextDisplayer",Gj);Gj.prototype.setTextVisibility=Gj.prototype.setTextVisibility;Gj.prototype.isTextVisible=Gj.prototype.isTextVisible;Gj.prototype.destroy=Gj.prototype.destroy;Gj.prototype.append=Gj.prototype.append;Gj.prototype.remove=Gj.prototype.remove;function Jj(){}function Kj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Jj);Jj.removeAllChildren=Kj;function Lj(a,b){var c=this;this.m=!1;this.l=[];this.g=a;this.u=b;this.i=document.createElement("div");this.i.classList.add("shaka-text-container");this.i.style.textAlign="center";this.i.style.display="flex";this.i.style.flexDirection="column";this.i.style.alignItems="center";this.i.style.justifyContent="flex-end";this.u.appendChild(this.i);this.D=(new O(function(){Mj(c)})).Da(.25);this.j=new Map;this.h=new cf;this.h.A(document,"fullscreenchange",function(){Mj(c,!0)});this.s=null;"ResizeObserver"in
321
+ window&&(this.s=new ResizeObserver(function(){Mj(c,!0)}),this.s.observe(this.i))}q=Lj.prototype;q.append=function(a){var b=[].concat(ja(this.l)),c={};a=t(a);for(var d=a.next();!d.done;c={kc:c.kc},d=a.next())c.kc=d.value,b.some(function(e){return function(f){return Bb(f,e.kc)}}(c))||this.l.push(c.kc);Mj(this)};
322
+ q.destroy=function(){this.u.removeChild(this.i);this.i=null;this.m=!1;this.l=[];this.D&&this.D.stop();this.j.clear();this.h&&(this.h.release(),this.h=null);this.s&&(this.s.disconnect(),this.s=null)};q.remove=function(a,b){if(!this.i)return!1;var c=this.l.length;this.l=this.l.filter(function(d){return d.startTime<a||d.endTime>=b});Mj(this,c>this.l.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a};
323
+ function Nj(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.j.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Be:null;l&&(g.push(l.Xd),m||(f=!0,a.j["delete"](k),l=null));m&&(h.push(k),l||(Oj(a,k,e),l=a.j.get(k),n=l.Be,f=!0));0<k.nestedCues.length&&n&&Nj(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(p,r){return p.startTime!=r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});
324
+ h=t(h);for(k=h.next();!k.done;k=h.next())d=a.j.get(k.value),c.appendChild(d.Xd)}}function Mj(a,b){if(a.i){var c=a.g.currentTime;(!a.m||(void 0===b?0:b))&&0<a.j.size&&(Kj(a.i),a.j.clear());if(a.m){for(var d=new Map,e=t(a.j.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.j.get(f));Nj(a,a.l,a.i,c,[])}}}
325
+ function Oj(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Tb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";var f=document.createElement(e);"br"!=e&&Pj(a,f,b,c);c=f;!d&&b.nestedCues.length&&(c=document.createElement("span"),c.classList.add("shaka-text-wrapper"),f.appendChild(c));a.j.set(b,{Xd:f,Be:c})}
326
+ function Pj(a,b,c,d){var e=b.style,f=0==c.nestedCues.length,g=1<d.length;e.whiteSpace="pre-wrap";var h=c.payload.replace(/\s+$/g,function(l){return"\u00a0".repeat(l.length)});e.backgroundColor=c.backgroundColor;e.border=c.border;e.color=c.color;e.direction=c.direction;e.opacity=c.opacity;e.paddingLeft=Qj(c.linePadding,c,a.u);e.paddingRight=Qj(c.linePadding,c,a.u);if(c.backgroundImage)e.backgroundImage="url('"+c.backgroundImage+"')",e.backgroundRepeat="no-repeat",e.backgroundSize="contain",e.backgroundPosition=
327
+ "center";else{if(c.nestedCues.length)var k=b;else k=document.createElement("span"),b.appendChild(k);c.border&&(k.style.border=c.border);(b=Rj(d,function(l){return l.backgroundColor}))?k.style.backgroundColor=b:h&&(k.style.backgroundColor="rgba(0, 0, 0, 0.8)");h&&(k.textContent=h)}g?e.display="inline":(e.display="flex",e.flexDirection="column",e.alignItems="center",e.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");f||(e.margin="0");e.fontFamily=c.fontFamily;
328
+ e.fontWeight=c.fontWeight.toString();e.fontStyle=c.fontStyle;e.letterSpacing=c.letterSpacing;e.fontSize=Qj(c.fontSize,c,a.u);c.line?1==c.lineInterpretation&&(e.position="absolute",e.left="0",e.top="0",c.writingMode==vb?(e.width="100%",c.lineAlign==xb?e.top=c.line+"%":"end"==c.lineAlign&&(e.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(e.height="100%",c.lineAlign==xb?e.left=c.line+"%":"end"==c.lineAlign&&(e.right=c.line+"%")):(e.height="100%",c.lineAlign==xb?e.right=c.line+"%":"end"==c.lineAlign&&
329
+ (e.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Jb?"%":"px",f=c.region.viewportAnchorUnits==Jb?"%":"px",e.height=c.region.height+(c.region.heightUnits==Jb?"%":"px"),e.width=c.region.width+a,e.position="absolute",e.top=c.region.viewportAnchorY+f,e.left=c.region.viewportAnchorX+f);e.lineHeight=c.lineHeight;c.position&&(c.writingMode==vb?e.paddingLeft=c.position:e.paddingTop=c.position);"line-left"==c.positionAlign?e.cssFloat="left":"line-right"==c.positionAlign&&(e.cssFloat="right");
330
+ e.textAlign=c.textAlign;e.textDecoration=c.textDecoration.join(" ");e.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&e.writingMode==c.writingMode||(e.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==vb?e.width=c.size+"%":e.height=c.size+"%")}
331
+ function Qj(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),Vf:d[2]}:null;if(!d)return a;var e=d.value;switch(d.Vf){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function Rj(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",Lj);Lj.prototype.setTextVisibility=Lj.prototype.setTextVisibility;
332
+ Lj.prototype.isTextVisible=Lj.prototype.isTextVisible;Lj.prototype.remove=Lj.prototype.remove;Lj.prototype.destroy=Lj.prototype.destroy;Lj.prototype.append=Lj.prototype.append;function Sj(a,b){function c(h){for(var k=h,l=t(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,r){return p+"<"+r+">"},
333
+ "");k=k.reduceRight(function(p,r){return p+"</"+r+">"},"");return h.lineBreak||h.spacer?(h.spacer&&Tb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=t(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");
334
+ break;case "right":k.push("align:right");break;case ub:k.push("align:middle");break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}M("shaka.text.WebVttGenerator",function(){});function Tj(){}
335
+ function Uj(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]=Me(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Me(l)),k=Uj(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?(Wa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Xa("Unexpected number of arguments for "+k),a[h]=b[h]):(Wa("Invalid config, unrecognized key "+
336
+ k),g=!1)}return g}function Vj(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}M("shaka.util.ConfigUtils",Tj);Tj.convertToConfigObject=Vj;Tj.mergeConfigObjects=Uj;function Wj(){}
337
+ function Xj(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Be(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Sf,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Be(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
338
+ ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},
339
+ manifestPreprocessor:function(g){return g}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,useFullSegmentsForStartTime:!1}},d={retryParameters:Be(),failureCallback:function(g){return[g]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,
340
+ inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1};if(navigator.userAgent.match(/Edge\//)||td()||vd())d.gapDetectionThreshold=.5;if(ud("Web0S")||td()||vd())d.stallSkip=0;var e={trackSelectionCallback:function(g){return K(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return K(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?v(k,navigator.storage.estimate(),3):k["return"](!0);
341
+ h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return[g,h]},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new ke},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity}},
342
+ preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}};e.trackSelectionCallback=
343
+ function(g){return K(function(h){return h["return"](Yj(g,f.preferredAudioLanguage))})};return f}function Zj(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Uj(a,b,c||Xj(),d,"")}
344
+ function Yj(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=md(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return gd(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
345
+ 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=wc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",Wj);Wj.mergeConfigObjects=Zj;function ak(){this.g=null;this.h=[]}function bk(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 ck(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
346
+ function dk(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 ek(){this.i=this.h=null;this.g=[]}function fk(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 gk(){this.s=this.u=this.I=this.F=this.m=this.j=this.H=this.l=this.i=this.L=this.O=this.T=this.D=this.Z=NaN;this.g=new ak;this.h=new ek};function V(a,b){Le.call(this);var c=this;this.l=hk;this.qc=this.g=null;this.Z=!1;this.h=new cf;this.gd=this.u=this.Ya=this.B=this.uc=this.s=this.i=this.jc=this.I=this.rc=this.H=this.Ha=this.F=this.L=this.m=this.P=null;this.od=1E9;this.o=ik(this);this.nd={width:Infinity,height:Infinity};this.j=null;this.qa=new se(this.o.preferredAudioLanguage,this.o.preferredVariantRole,this.o.preferredAudioChannelCount);this.ra=this.o.preferredTextLanguage;this.Pb=this.o.preferredTextRole;this.Za=this.o.preferForcedSubs;
347
+ this.hd=[];b&&b(this);this.P=jk(this);this.P.Nd(this.o.streaming.forceHTTPS);this.D=null;kk&&(this.D=$b(kk));this.h.A(window,"online",function(){c.Id()});this.ua={name:"detach"};this.Qa={name:"attach"};this.T={name:"unload"};this.qd={name:"manifest-parser"};this.md={name:"manifest"};this.sa={name:"media-source"};this.kd={name:"drm-engine"};this.O={name:"load"};this.rd={name:"src-equals-drm-engine"};this.Oa={name:"src-equals"};var d=new Map;d.set(this.Qa,function(e,f){return He(lk(c,e,f))});d.set(this.ua,
348
+ function(e){e.G&&(c.h.Ea(e.G,"error"),e.G=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return He(e)});d.set(this.T,function(e){return He(mk(c,e))});d.set(this.sa,function(e){e=nk(c,e);return He(e)});d.set(this.qd,function(e,f){var g=ok(c,e,f);return He(g)});d.set(this.md,function(e){return pk(c,e)});d.set(this.kd,function(e){e=qk(c,e);return He(e)});d.set(this.O,function(e,f){return He(rk(c,e,f))});d.set(this.rd,function(e,f){var g=sk(c,e,f);return He(g)});d.set(this.Oa,function(e,f){return tk(c,
349
+ e,f)});this.ea=new zj(this.ua,{ef:function(e,f,g,h){var k=null;e==c.ua&&(k=g==c.ua?c.ua:c.Qa);e==c.Qa&&(k=g==c.ua||f.G!=h.G?c.ua:g==c.Qa?c.Qa:g==c.sa||g==c.O?c.sa:g==c.Oa?c.rd:null);e==c.sa&&(k=g==c.O&&f.G==h.G?c.qd:c.T);e==c.qd&&(k=uk(c.O,c.md,c.T,g,f,h));e==c.md&&(k=uk(c.O,c.kd,c.T,g,f,h));e==c.kd&&(k=uk(c.O,c.O,c.T,g,f,h));e==c.rd&&(k=g==c.Oa&&f.G==h.G?c.Oa:c.T);if(e==c.O||e==c.Oa)k=c.T;e==c.T&&(k=h.G&&f.G==h.G?c.Qa:c.ua);return k},Re:function(e,f,g){c.dispatchEvent(vk(wk,(new Map).set("state",
350
+ e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==f.g?v(f,mk(c,e),2):f["return"](e.G?c.Qa:c.ua)})},zf:function(e){c.dispatchEvent(vk(xk,(new Map).set("state",e.name)))}});a&&this.Rb(a,!0)}ra(V,Le);function vk(a,b){return new R(a,b)}q=V.prototype;
351
+ q.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==yk)return c["return"]();a.l=yk;b=Ej(a.ea,function(){return{node:a.ua,payload:Aj(),kb:!1}});return v(c,new Promise(function(d){b.Eb=function(){};b.Hc=function(){d()};b.ob=function(){d()};b.onError=function(){d()};b.Jc=function(){d()}}),2);case 2:return v(c,a.ea.destroy(),3);case 3:a.h&&(a.h.release(),a.h=null);a.gd=null;a.u=null;a.o=null;a.j=null;a.qc=null;if(!a.P){c.v(0);break}return v(c,a.P.destroy(),5);case 5:a.P=
352
+ null,z(c)}})};q.Rb=function(a,b){b=void 0===b?!0:b;if(this.l==yk)return Promise.reject(zk());var c=Aj();c.G=a;qd()||(b=!1);var d=b?this.sa:this.Qa,e=Ej(this.ea,function(){return{node:d,payload:c,kb:!1}});e.Eb=function(){};return Ak(e)};q.detach=function(){var a=this;if(this.l==yk)return Promise.reject(zk());var b=Ej(this.ea,function(){return{node:a.ua,payload:Aj(),kb:!1}});b.Eb=function(){};return Ak(b)};
353
+ q.Td=function(a){var b=this;a=void 0===a?!0:a;if(this.l==yk)return Promise.reject(zk());qd()||(a=!1);var c=Aj(),d=Ej(this.ea,function(e){var f=e.G&&a?b.sa:e.G?b.Qa:b.ua;c.G=e.G;return{node:f,payload:c,kb:!1}});d.Eb=function(){};return Ak(d)};
354
+ q.load=function(a,b,c){var d=this;if(this.l==yk)return Promise.reject(zk());this.dispatchEvent(vk(Bk));var e=Aj();e.uri=a;e.Rd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Ck(this,e)?this.Oa:this.O,g=Ej(this.ea,function(h){if(null==h.G)return null;e.G=h.G;return{node:f,payload:e,kb:!0}});this.j=new gk;g.Eb=function(){};return new Promise(function(h,k){g.Jc=function(){return k(new N(2,7,7002))};g.Hc=function(){h();d.dispatchEvent(vk(Dk))};g.ob=function(){return k(zk())};g.onError=
355
+ function(l){return k(l)}})};function Ck(a,b){if(!qd())return!0;var c=b.mimeType,d=b.uri||"";c||(c=dg(d),c=Ek[c]);if(c){if(""==(b.G||sd()).canPlayType(c))return!1;if(!qd()||!(c in cg||dg(d)in eg)||a.o.streaming.preferNativeHls)return!0;if(wd())return a.o.streaming.useNativeHlsOnSafari}return!1}function lk(a,b,c){null==b.G&&(b.G=c.G,a.h.A(b.G,"error",function(){var d=Fk(a);d&&Gk(a,d)}));a.g=b.G;return Promise.resolve()}
356
+ function mk(a,b){var c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return a.l!=yk&&(a.l=hk),c=a.hd.map(function(p){return p()}),a.hd=[],v(n,Promise.all(c),2);case 2:a.dispatchEvent(vk(Hk));b.mimeType=null;b.startTime=null;b.uri=null;b.G&&(a.h.Ea(b.G,"loadedmetadata"),a.h.Ea(b.G,"playing"),a.h.Ea(b.G,"pause"),a.h.Ea(b.G,"ended"),a.h.Ea(b.G,"ratechange"));a.Ha&&(a.Ha.release(),a.Ha=null);a.rc&&(a.rc.stop(),a.rc=null);if(!a.s){n.v(3);break}return v(n,a.s.stop(),4);case 4:a.s=null,a.uc=null;
357
+ case 3:if(!a.u){n.v(5);break}return v(n,a.u.stop(),5);case 5:if(!a.i){n.v(7);break}return v(n,a.i.destroy(),8);case 8:a.i=null;case 7:a.H&&(a.H.release(),a.H=null);a.F&&(a.F.release(),a.F=null);if(!a.L){n.v(9);break}return v(n,a.L.destroy(),10);case 10:a.L=null;case 9:if(a.D)a.D.onAssetUnload();if(!b.G||!b.G.src){n.v(11);break}return v(n,new Promise(function(p){return(new O(p)).V(.1)}),12);case 12:for(b.G.removeAttribute("src"),b.G.load();b.G.lastChild;)b.G.removeChild(b.G.firstChild);case 11:if(!a.m){n.v(13);
358
+ break}return v(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.Ya=null;a.I=null;if(a.B){d=t(a.B.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.B.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.B=null;a.j=new gk;a.ld=null;Ik(a);z(n)}})}
359
+ function nk(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=new Jh,d=a.o.textDisplayFactory,e=$b(d),a.ld=d,f=Jk(b.G,c,e,function(h,k,l){h=t(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,r=t(m.frames),u=r.next();!u.done;u=r.next())Kk(a,n,p,"ID3",u.value);if(a.D)a.D.onHlsTimedMetadata(m,n)}}),v(g,f.F,2);a.L=f;z(g)})}
360
+ function ok(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.P,a.Ya=d,f=a,v(h,bg(d,e,a.o.manifest.retryParameters,b.mimeType),2);f.uc=h.h;a.s=$b(a.uc);g=Me(a.o.manifest);c.G&&"AUDIO"===c.G.nodeName&&(g.disableVideo=!0);a.s.configure(g);z(h)})}
361
+ function pk(a,b){var c=b.uri,d=a.P;a.jc=new Ti(function(){return a.ec()});Ui(a.jc,function(g){Lk(a,Mk,g);if(a.D)a.D.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return Nk(a,g)},makeTextStreamsForClosedCaptions:function(g){return Ok(a,g)},onTimelineRegionAdded:function(g){var h=a.jc;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),
362
+ h.h(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Gk(a,g)},isLowLatencyMode:function(){return a.o.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.o.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new De(function(){var g,h,k,l;return K(function(m){if(1==m.g)return g=a,v(m,a.s.start(c,e),2);g.B=m.h;h=vk(Pk);a.dispatchEvent(h);if(0==a.B.variants.length)throw new N(2,
363
+ 4,4036);Qk(a.B);k=Date.now()/1E3;l=k-f;a.j.H=l;z(m)})}(),function(){return a.s.stop()})}function qk(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Rk(a,{nb:a.P,onError:function(f){Gk(a,f)},Ic:function(f){Sk(a,f)},onExpirationUpdated:function(f,g){Tk(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Uk&&d&&(d=!1,a.j.j=Date.now()/1E3-c)}}),a.m.configure(a.o.drm),v(e,xf(a.m,a.B.variants,a.B.offlineSessionIds),2)):3!=e.g?v(e,a.m.Rb(b.G),3):v(e,Nk(a,a.B),0)})}
364
+ function rk(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return K(function(y){switch(y.g){case 1:b.startTime=c.startTime;d=b.G;e=b.uri;a.Ya=e;a.H=new Mi({Dc:function(){return b.G.playbackRate},Ac:function(){return b.G.defaultPlaybackRate},Pd:function(w){b.G.playbackRate=w},le:function(w){b.G.currentTime+=w}});f=function(){return Vk(a)};g=function(){return Wk(a)};a.h.A(d,"playing",f);a.h.A(d,"pause",f);a.h.A(d,"ended",f);a.h.A(d,"ratechange",g);h=a.o.abrFactory;a.u&&a.gd==h||(a.gd=h,a.u=$b(h),"function"!=typeof a.u.playbackRateChanged&&
365
+ (Tb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.u.playbackRateChanged=function(){}),a.u.configure(a.o.abr));a.qa=new se(a.o.preferredAudioLanguage,a.o.preferredVariantRole,a.o.preferredAudioChannelCount);a.ra=a.o.preferredTextLanguage;a.Pb=a.o.preferredTextRole;a.Za=a.o.preferForcedSubs;Xk(a.B.presentationTimeline,a.o.playRangeStart,a.o.playRangeEnd);a.u.init(function(w,x,C){a.i&&w!=a.i.h&&Yk(a,w,!0,void 0===x?!1:x,void 0===C?0:C)});a.F=Zk(a,b.startTime);a.Ha=$k(a);
366
+ k=Math.max(a.B.minBufferTime,a.o.streaming.rebufferingGoal);al(a,k);Ad(a.B,a.o.preferredVideoCodecs,a.o.preferredAudioCodecs,a.o.preferredAudioChannelCount,a.o.preferredDecodingAttributes);a.i=bl(a);a.i.configure(a.o.streaming);a.l=cl;a.dispatchEvent(vk(dl));l=null;if(m=a.Ec().find(function(w){return w.active})){y.v(2);break}l=el(a)?a.u.chooseVariant():null;Yk(a,l,!0,!1,0);if(!a.o.streaming.startAtSegmentBoundary){y.v(3);break}n=a.F.l();return v(y,fl(l,n),4);case 4:p=y.h,a.F.m(p);case 3:gl(a,null,
367
+ Xd(l));case 2:return r=a.jb().find(function(w){return w.active}),r||((u=he(a.B.textStreams,a.ra,a.Pb,a.Za)[0]||null)&&fk(a.j.h,u,!0),l&&(u?(l.audio&&hl(a,l.audio,u)&&(a.Z=!0),a.Z&&a.L.m.setTextVisibility(!0),il(a)):a.Z=!1),u&&(a.o.streaming.alwaysStreamText||a.td())&&jj(a.i,u)),v(y,a.i.start(),5);case 5:a.o.abr.enabled&&(a.u.enable(),jl(a)),Qd(a.i?a.i.h:null,a.B),kl(a.B),ll(a),el(a),a.B.variants.some(function(w){return w.primary}),a.h.xa(d,"loadedmetadata",function(){a.j.l=Date.now()/1E3-c.Rd}),z(y)}})}
368
+ function sk(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=xc,e=Date.now()/1E3,f=!0,a.m=Rk(a,{nb:a.P,onError:function(n){Gk(a,n)},Ic:function(n){Sk(a,n)},onExpirationUpdated:function(n,p){Tk(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==Uk&&f&&(f=!1,a.j.j=Date.now()/1E3-e)}}),a.m.configure(a.o.drm),g=c.uri||"",h=dg(g),k=Ek[h],"application/x-mpegurl"==k&&wd()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
369
+ createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Wc(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Pa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.T=!0,v(m,xf(a.m,[l],[]),2)):v(m,a.m.Rb(b.G),
370
+ 0)})}
371
+ function tk(a,b,c){function d(){return Vk(a)}b.uri=c.uri;b.startTime=c.startTime;a.Ya=b.uri;a.F=new Ci(b.G);null!=b.startTime&&a.F.m(b.startTime);a.H=new Mi({Dc:function(){return b.G.playbackRate},Ac:function(){return b.G.defaultPlaybackRate},Pd:function(g){b.G.playbackRate=g},le:function(g){b.G.currentTime+=g}});al(a,a.o.streaming.rebufferingGoal);a.h.A(b.G,"playing",d);a.h.A(b.G,"pause",d);a.h.A(b.G,"ended",d);a.h.A(b.G,"ratechange",function(){return Wk(a)});"none"!=a.g.preload&&a.h.xa(a.g,"loadedmetadata",
372
+ function(){a.j.l=Date.now()/1E3-c.Rd});a.g.audioTracks&&(a.h.A(a.g.audioTracks,"addtrack",function(){return ll(a)}),a.h.A(a.g.audioTracks,"removetrack",function(){return ll(a)}),a.h.A(a.g.audioTracks,"change",function(){return ll(a)}));a.g.textTracks&&(a.h.A(a.g.textTracks,"addtrack",function(g){if(g.track)switch(g=g.track,g.kind){case "metadata":ml(a,g);break;case "chapters":nl(a,g);break;default:ll(a)}}),a.h.A(a.g.textTracks,"removetrack",function(){return ll(a)}),a.h.A(a.g.textTracks,"change",
373
+ function(){return ll(a)}));b.G.src=b.uri;(td()||ud("Web0S"))&&b.G.load();a.l=ol;a.dispatchEvent(vk(dl));var e=new yc;ti(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){e.resolve()});var f=!1;a.hd.push(function(){f=!0});ti(a.g,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){var g;return K(function(h){if(1==h.g){if(f)return h["return"]();pl(a);g=ql(a);return g.find(function(k){return"disabled"!=k.mode})?h.v(2):v(h,new Promise(function(k){a.h.xa(a.g.textTracks,"change",k);(new O(k)).V(1)}),2)}if(f)return h["return"]();
374
+ rl(a);z(h)})});a.g.error?e.reject(Fk(a)):"none"==a.g.preload&&(Xa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),e.resolve());a.h.xa(a.g,"error",function(){e.reject(Fk(a))});return new De(e,function(){e.reject(new N(2,7,7001));return Promise.resolve()})}
375
+ function pl(a){var b=a.o.preferredAudioLanguage;if(""!=b){a.Kd(b);var c=a.o.preferredVariantRole;""!=c&&a.Kd(b,c)}}function rl(a){var b=a.o.preferredTextLanguage,c=a.o.preferForcedSubs;if(""!=b){a.Ld(b,"",c);var d=a.o.preferredTextRole;""!=d&&a.Ld(b,d,c)}}
376
+ function ml(a,b){"metadata"==b.kind&&(b.mode="hidden",a.h.A(b,"cuechange",function(){if(b.activeCues)for(var c=t(b.activeCues),d=c.next();!d.done;d=c.next())if(d=d.value,Kk(a,d.startTime,d.endTime,d.type,d.value),a.D)a.D.onCueMetadataChange(d.value)}),(new O(function(){var c=sl(a);c=t(c);for(var d=c.next();!d.done;d=c.next())d.value.mode="hidden"})).Jb().V(.5))}function Kk(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(vk(tl,b))}
377
+ function nl(a,b){b&&"chapters"==b.kind&&(b.mode="hidden",(new O(function(){var c=ul(a);c=t(c);for(var d=c.next();!d.done;d=c.next())d.value.mode="hidden"})).Jb().V(.5))}function Qk(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 Rk(a,b){return new qf(b,a.o.drm.updateExpirationTime)}function jk(a){return new Qe(function(b,c){a.u&&a.u.segmentDownloaded(b,c)})}
378
+ function Zk(a,b){return new Di(a.g,a.B,a.o.streaming,b,function(){a.Ha&&Pi(a.Ha,!0);if(a.i)for(var c=a.i,d=c.C.Cc(),e=c.o.smallGapLimit,f=t(c.g.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.g.get(g);h.da=null;var k=c.C.S;g==wc?(k=k.i,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=Yh(k,g),k=Mh(k,d,e));if(!k&&(null!=Zh(c.C.S,g)&&mj(c,h),h.ya&&(h.ya.abort(),h.ya=null),g===wc))for(g=c.C.S.D.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,uh(g),g=t(g.j.values()),h=g.next();!h.done;h=g.next())oh(h.value)}a.I&&
379
+ vl(a)},function(c){return a.dispatchEvent(c)})}function $k(a){var b=new Vi(a.jc);Wi(b,function(d){Lk(a,wl,d)},function(d){Lk(a,xl,d)},function(d,e){e||(Lk(a,wl,d),Lk(a,xl,d))});var c=new Oi(a.g);c.g.add(b);return c}function al(a,b){a.I=new we;a.I.g=ye;ze(a.I,b,Math.min(.5,b/2));Ik(a);a.rc=(new O(function(){vl(a)})).Da(.25)}
380
+ function vl(a){switch(a.l){case ol:if(a.g.ended)var b=!0;else{var c=Lh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case cl:a:if(a.g.ended||Wh(a.L))b=!0;else{if(a.B.presentationTimeline.Y()){c=a.B.presentationTimeline.ib();var d=Lh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Nh(a.g.buffered,a.g.currentTime);c=a.I;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?xe:ye;c.g=d;b!=d&&Ik(a)}function Jk(a,b,c,d){return new Qh(a,b,c,d)}
381
+ function bl(a){return new Yi(a.B,{Cc:function(){return a.F.l()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},S:a.L,nb:a.P,onError:function(b){return Gk(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Af:function(){a.s&&a.s.update&&a.s.update()},Ed:function(){a.F&&a.F.F();vl(a)}})}
382
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Vj(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Tb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
383
+ 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Zj(this.o,a,ik(this));yl(this);return c};
384
+ function yl(a){if(a.s){var b=Me(a.o.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.s.configure(b)}a.m&&a.m.configure(a.o.drm);if(a.i){a.i.configure(a.o.streaming);try{zl(a,a.B)}catch(f){Gk(a,f)}a.u&&el(a);b=a.i.h;!b||b.allowedByApplication&&b.allowedByKeySystem||Al(a)}a.P&&a.P.Nd(a.o.streaming.forceHTTPS);if(a.L&&(b=a.o.textDisplayFactory,a.ld!=b)){var c=$b(b),d=a.L,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.i&&(d.i.i=c);a.ld=b;a.i&&(b=a.i,(c=b.g.get(wc))&&
385
+ hj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.o.abr),a.o.abr.enabled?a.u.enable():a.u.disable(),jl(a));a.I&&(b=a.o.streaming.rebufferingGoal,a.B&&(b=Math.max(b,a.B.minBufferTime)),ze(a.I,b,Math.min(.5,b/2)));a.B&&Xk(a.B.presentationTimeline,a.o.playRangeStart,a.o.playRangeEnd)}q.getConfiguration=function(){var a=ik(this);Zj(a,this.o,ik(this));return a};
386
+ q.Ue=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.ec().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.Lf=function(){for(var a in this.o)delete this.o[a];Zj(this.o,ik(this),ik(this));yl(this)};q.$e=function(){return this.l};q.df=function(){return this.g};q.Wb=function(){return this.P};q.pd=function(){return this.Ya};
387
+ q.ce=function(){return this.D?this.D:null};q.Y=function(){return this.B?this.B.presentationTimeline.Y():this.g&&this.g.src?Infinity==this.g.duration:!1};q.mb=function(){return this.B?this.B.presentationTimeline.mb():!1};q.uf=function(){if(this.B){var a=this.B.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};
388
+ q.ec=function(){if(this.B){var a=this.B.presentationTimeline;return{start:a.Ab(),end:a.Sa()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.sf=function(){this.Y()&&(this.g.currentTime=this.ec().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.i:null};q.Vb=function(){return this.m?this.m.Vb():Infinity};q.Bc=function(){return this.m?this.m.Bc():{}};
389
+ q.sd=function(){return this.I?this.I.g==ye:!1};q.ff=function(){return this.g?this.H?this.H.i:1:0};q.Uf=function(a){0==a?Xa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.H.set(a),this.l==cl&&(this.u.playbackRateChanged(a),gj(this.i,1<Math.abs(a))))};q.Ke=function(){var a=this.H.Ac();this.l==ol&&this.H.set(a);this.l==cl&&(this.H.set(a),this.u.playbackRateChanged(a),gj(this.i,!1))};
390
+ q.Ec=function(){if(this.B){for(var a=this.i?this.i.h:null,b=[],c=0,d=t(this.B.variants),e=d.next();!e.done;e=d.next())if(e=e.value,fe(e)){var f=Xd(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 ee(g)}):[]};
391
+ q.jb=function(){if(this.B){for(var a=this.i?this.i.i:null,b=[],c=t(this.B.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Yd(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?ql(this).map(function(f){return be(f)}):[]};q.Ye=function(){return this.B?this.B.imageStreams.map(function(a){return Zd(a)}):[]};
392
+ q.pf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,y,w,x,C,D,B;return K(function(F){if(1==F.g)return c.B?(d=c.B.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.v(3):v(F,d.createSegmentIndex(),3):F["return"](null):F.v(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;r=l/n;
393
+ u=m*n;y=f.j-f.startTime;w=y/u;x=f.startTime;D=C=0;1<u&&(B=Math.floor((b-f.startTime)/w),x=f.startTime+B*w,C=B%m*p,D=Math.floor(B/m)*r);return F["return"]({height:r,positionX:C,positionY:D,startTime:x,duration:w,uris:f.na(),width:p})}return F["return"](null)})};
394
+ q.se=function(a){if(this.B&&this.i){var b=this.B.textStreams.find(function(d){return d.id==a.id});b&&b!=this.i.i&&(fk(this.j.h,b,!1),jj(this.i,b),Bl(this),this.ra=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=ql(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,$d(c)==a.id?c.mode=this.Z?"showing":"hidden":c.mode="disabled";Bl(this)}};
395
+ q.te=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.B&&this.i){this.o.abr.enabled&&Xa("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.B.variants.find(function(e){return e.id==a.id});d&&fe(d)&&(Yk(this,d,!1,b,c),this.qa=new re(d),el(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,
396
+ $d(c)==a.id){Cl(this,c);break}};q.Te=function(){return Dl(this.Ec())};q.nf=function(){return Dl(this.jb())};q.Se=function(){return Array.from(El(this.Ec()))};q.mf=function(){return Array.from(El(this.jb()))};
397
+ q.Kd=function(a,b){if(this.B&&this.F){this.qa=new se(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.i.h,e=this.qa.create(this.B.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=Xd(f),this.te(c,!0)):Al(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=gd(a);f=d=null;e=
398
+ t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=ee(g);gd(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Cl(this,f):d&&Cl(this,d)}};
399
+ q.Ld=function(a,b,c){c=void 0===c?!1:c;if(this.B&&this.F){if(this.ra=a,this.Pb=b||"",this.Za=c,(a=he(this.B.textStreams,this.ra,this.Pb,this.Za)[0]||null)&&a!=this.i.i&&(fk(this.j.h,a,!1),this.o.streaming.alwaysStreamText||this.td()))jj(this.i,a),Bl(this)}else{var d=gd(a);(a=this.jb().find(function(e){return gd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.se(a)}};
400
+ q.Mf=function(a){if(this.B&&this.F){for(var b=null,c=t(this.B.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.qa=new se(b.language,"",0,a),Al(this))}};q.td=function(){var a=this.Z;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?ql(this).some(function(b){return"showing"==b.mode}):a};q.de=function(){return this.g&&this.g.src&&this.g.textTracks?ul(this).map(function(a){return be(a)}):[]};
401
+ q.Ve=function(a){var b=gd(a),c=ul(this).find(function(e){return gd(e.language)==b});if(!c||!c.cues)return[];a=[];c=t(c.cues);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({title:d.text,startTime:d.startTime,endTime:d.endTime});return a};function ql(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function sl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}
402
+ function ul(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}q.Sf=function(a){a=!!a;if(this.Z!=a){this.Z=a;if(this.l==cl)this.L.m.setTextVisibility(a),this.o.streaming.alwaysStreamText||(a?this.i.i||(a=he(this.B.textStreams,this.ra,this.Pb,this.Za),0<a.length&&(jj(this.i,a[0]),Bl(this))):fj(this.i));else if(this.g&&this.g.src&&this.g.textTracks){var b=ql(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")}il(this)}};
403
+ q.hf=function(){if(!this.Y())return null;var a=this.ea.l,b=0;if(this.F)b=this.F.l();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.B?new Date(1E3*(this.B.presentationTimeline.j+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
404
+ q.ee=function(){if(!this.Y())return null;if(this.B)return new Date(1E3*this.B.presentationTimeline.j);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.zc=function(){if(this.l==cl)return this.L.zc();var a={total:[],audio:[],video:[],text:[]};this.l==ol&&(a.total=Oh(this.g.buffered));return a};
405
+ q.getStats=function(){if(this.l!=cl&&this.l!=ol)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Vk(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.j;b=Math.round(100*b);c.i=isNaN(c.i)?
406
+ b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.j,b=Number(a.totalVideoFrames),c.T=Number(a.droppedVideoFrames),c.O=b,this.j.L=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.F?a.F:NaN):a=NaN;this.j.m=a;if(this.l==cl){if(a=this.i.h)this.j.u=(this.H?this.H.i:1)*a.bandwidth;a&&a.video&&(c=this.j,b=a.video.height||NaN,c.Z=a.video.width||NaN,c.D=b);this.Y()&&(a=this.ee().valueOf()+1E3*this.ec().end,this.j.F=(Date.now()-a)/1E3);this.B&&this.B.presentationTimeline&&
407
+ (this.j.I=this.B.presentationTimeline.g);a=this.u.getBandwidthEstimate();this.j.s=a}var d=this.j;a=d.Z;c=d.D;b=d.u;var e=d.O,f=d.T,g=d.L,h=d.s,k=d.i,l=d.l,m=d.H,n=d.j,p=ck(d.g,"playing"),r=ck(d.g,"paused"),u=ck(d.g,"buffering"),y=d.m,w=d.F,x=d.I,C=dk(d.g),D=[];d=t(d.h.g);for(var B=d.next();!B.done;B=d.next())B=B.value,D.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
408
+ estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:r,bufferingTime:u,licenseTime:y,liveLatency:w,maxSegmentDuration:x,stateHistory:C,switchHistory:D}};
409
+ q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Tb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=cl&&this.l!=ol)throw new N(1,7,7004);if(!d){var h=dg(a);d=Fl[h];if(!d)throw new N(1,2,2011,h);}if(this.l==ol){if("text/vtt"!=d)throw new N(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=a;d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.jb().find(function(k){return k.language==
410
+ b&&k.label==(f||"")&&k.kind==c}))return ll(this),a;throw new N(1,2,2012);}h=this.B.presentationTimeline.getDuration();if(Infinity==h)throw new N(1,4,4033);a={id:this.od++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ki(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:wc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
411
+ closedCaptions:null};if(!Yc(Tc(a.mimeType,a.codecs)))throw new N(2,2,2014,d);this.B.textStreams.push(a);ll(this);return Yd(a)};
412
+ q.Ge=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,y,w,x,C;return K(function(D){switch(D.g){case 1:if(h.l!=cl&&h.l!=ol)throw new N(1,7,7004);if(d){D.v(2);break}return v(D,Gl(h,a),3);case 3:d=D.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(B){}if(h.l!=ol){D.v(4);break}g&&(c="forced");return v(D,Hl(h,a,b,c,d,f||"",k),5);case 5:l=h.jb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return ll(h),D["return"](m);throw new N(1,2,2012);case 4:n=
413
+ xc;p=h.B.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){D.v(6);break}return v(D,Il(a,h.P,h.o.streaming.retryParameters),7);case 7:r=D.h,u=Jl(h,r,d,k),y=new Blob([u],{type:"text/vtt"}),a=Th(y),d="text/vtt";case 6:w={id:h.od++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ki(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.ba,primary:!1,trickModeVideo:null,
414
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};x=Tc(w.mimeType,w.codecs);C=Yc(x);if(!C)throw new N(2,2,2014,d);h.B.textStreams.push(w);ll(h);return D["return"](Yd(w))}})};
415
+ q.Fe=function(a,b,c){var d=this,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:if(d.l!=cl&&d.l!=ol)throw new N(1,7,7004);if(c){n.v(2);break}return v(n,Gl(d,a),3);case 3:c=n.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(p){}return v(n,Hl(d,a,b,"chapters",c,"",e),4);case 4:f=d.de();if(g=f.find(function(p){return p.language==b})){h=ul(d);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,nl(d,m);return n["return"](g)}throw new N(1,2,2012);}})};
416
+ function Gl(a,b){var c,d;return K(function(e){switch(e.g){case 1:c=dg(b);if(d=Fl[c])return e["return"](d);A(e,2);return v(e,fg(b,a.P,a.o.streaming.retryParameters),4);case 4:d=e.h;wa(e,3);break;case 2:E(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
417
+ function Hl(a,b,c,d,e,f,g){var h,k,l,m;return K(function(n){if(1==n.g)return"text/vtt"!=e||g.length?v(n,Il(b,a.P,a.o.streaming.retryParameters),3):n.v(2);2!=n.g&&(h=n.h,k=Jl(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Th(l),e="text/vtt");m=document.createElement("track");m.src=b;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);z(n)})}
418
+ function Il(a,b,c){var d,e,f;return K(function(g){if(1==g.g)return d=$e,e=Ue([a],c),e.method="GET",v(g,b.request(d,e).promise,2);f=g.h;return g["return"](f.data)})}function Jl(a,b,c,d){var e=Zc[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Ob(b),b=c.parseMedia(b,a),Sj(b,d);throw new N(2,2,2014,c);}q.Od=function(a,b){this.nd.width=a;this.nd.height=b};
419
+ q.Id=function(){if(this.l==cl){var a=this.i;if(a.J.g)a=!1;else if(a.j)a=!1;else{for(var b=t(a.g.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Zb&&(c.Zb=!1,ej(a,c,.1));a=!0}}else a=!1;return a};q.af=function(){Xa("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.B};q.bf=function(){return this.uc};
420
+ function ik(a){var b=Xj();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.Y()&&d.includes(c.code)&&(c.severity=1,a.Id())};b.textDisplayFactory=function(){return a.qc?new Lj(a.g,a.qc):new Gj(a.g)};return b}q.xe=function(a){this.qc=a};
421
+ function Ok(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 Li;h={id:a.od++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
422
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:wc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function Nk(a,b){return K(function(c){if(1==c.g)return v(c,Kl(a,b),2);zl(a,b);z(c)})}
423
+ function Kl(a,b){var c;return K(function(d){if(1==d.g)return c=a.i?a.i.h:null,v(d,Od(c,b),2);kl(b);z(d)})}
424
+ function zl(a,b){if(a.l!=yk){for(var c=a.o.restrictions,d=a.nd,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Nd(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.i&&ll(a);if((c=a.m?a.m.i:null)&&a.m.m)for(d=t(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=t(f.initData||[]),g=f.next();!g.done;g=
425
+ f.next())g=g.value,Gf(a.m,g.initDataType,g.initData);Ll(a,b)}}
426
+ function fl(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n;return K(function(p){if(1==p.g)return k?v(p,k.createSegmentIndex(),2):p["return"](null);m=k.segmentIndex[Symbol.iterator]().seek(l);if(!m)return p["return"](null);n=m.startTime;return p["return"](n)})},v(h,e(c,b),2);if(3!=h.g)return f=h.h,v(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)})}
427
+ function Ik(a){var b=a.sd();if(a.j&&a.I&&a.F){var c=a.H;c.j=b;Ni(c);Vk(a)}b=(new Map).set("buffering",b);a.dispatchEvent(vk(Ml,b))}function Wk(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=vk(Nl),a.dispatchEvent(b))}function Vk(a){if(a.j&&a.I){var b=a.j.g;a.I.g==ye?bk(b,"buffering"):a.g.paused?bk(b,"paused"):a.g.ended?bk(b,"ended"):bk(b,"playing")}}
428
+ function el(a){try{Ll(a,a.B)}catch(c){return Gk(a,c),!1}var b=a.B.variants.filter(function(c){return fe(c)});b=a.qa.create(b);a.u.setVariants(Array.from(b.values()));return!0}function Al(a){var b;(b=el(a)?a.u.chooseVariant():null)&&Yk(a,b,!0,!0,0)}
429
+ function Yk(a,b,c,d,e){var f=a.i.h;if(b==f)d&&ij(a.i,b,d,e,!0);else{var g=a.j.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));ij(a.i,b,d,e);d=null;f&&(d=Xd(f));b=Xd(b);c?gl(a,d,b):Ol(a,d,b)}}function Cl(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=ee(c);var d=ee(b);Ol(a,c,d)}
430
+ function hl(a,b,c){a=gd(a.o.preferredTextLanguage);b=gd(b.language);c=gd(c.language);return fd(c,a)&&!fd(b,c)}function gl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=vk(Pl,b);Ql(a,b)}function ll(a){var b=vk(Rl);Ql(a,b)}function Ol(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=vk(Sl,b);Ql(a,b)}function Bl(a){var b=vk(Tl);Ql(a,b)}function il(a){var b=vk(Ul);Ql(a,b)}function jl(a){var b=(new Map).set("newStatus",a.o.abr.enabled);Ql(a,vk(Vl,b))}
431
+ function Gk(a,b){if(a.l!=yk){var c=vk(Wl,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Lk(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(vk(b,c))}
432
+ function Fk(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new N(2,3,3016,b,c,a.g.error.message)}
433
+ function Sk(a,b){if(a.i){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.B.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Xl.includes(l)}h!=f.allowedByKeySystem&&
434
+ (e=!0)}}}e&&el(a);(d=a.i.h)&&!d.allowedByKeySystem&&Al(a);e&&ll(a)}}function Tk(a,b,c){if(a.s&&a.s.onExpirationUpdated)a.s.onExpirationUpdated(b,c);b=vk(Yl);a.dispatchEvent(b)}function Xk(a,b,c){0<b&&(a.Y()||a.we(b));b=a.getDuration();c<b&&(a.Y()||a.La(c))}
435
+ function Ll(a,b){var c=a.m?a.m.Bc():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=t(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var r=c[d?"00":p];r?Xl.includes(r)&&h.add(r):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
436
+ missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function kl(a){if(!a.variants.some(fe))throw new N(2,4,4032);}function Ql(a,b){K(function(c){if(1==c.g)return v(c,Promise.resolve(),2);a.l!=yk&&a.dispatchEvent(b);z(c)})}function El(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(gd(c.language)):b.add("und");return b}
437
+ function Dl(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=gd(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=t(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
438
+ h.push({language:l,role:n,label:p})}});return h}function zk(){return new N(2,7,7E3)}function uk(a,b,c,d,e,f){return d==a&&e.G==f.G&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Aj(){return{G:null,mimeType:null,startTime:null,Rd:NaN,uri:null}}function Ak(a){return new Promise(function(b,c){a.ob=function(){return c(zk())};a.Hc=function(){return b()};a.onError=function(d){return c(d)};a.Jc=function(){return c(zk())}})}M("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.xe;
439
+ V.prototype.getManifestParserFactory=V.prototype.bf;V.prototype.getManifest=V.prototype.af;V.prototype.retryStreaming=V.prototype.Id;V.prototype.setMaxHardwareResolution=V.prototype.Od;V.prototype.addChaptersTrack=V.prototype.Fe;V.prototype.addTextTrackAsync=V.prototype.Ge;V.prototype.addTextTrack=V.prototype.addTextTrack;V.prototype.getStats=V.prototype.getStats;V.prototype.getBufferedInfo=V.prototype.zc;V.prototype.getPresentationStartTimeAsDate=V.prototype.ee;
440
+ V.prototype.getPlayheadTimeAsDate=V.prototype.hf;V.prototype.setTextTrackVisibility=V.prototype.Sf;V.prototype.getChapters=V.prototype.Ve;V.prototype.getChaptersTracks=V.prototype.de;V.prototype.isTextTrackVisible=V.prototype.td;V.prototype.selectVariantsByLabel=V.prototype.Mf;V.prototype.selectTextLanguage=V.prototype.Ld;V.prototype.selectAudioLanguage=V.prototype.Kd;V.prototype.getTextLanguages=V.prototype.mf;V.prototype.getAudioLanguages=V.prototype.Se;V.prototype.getTextLanguagesAndRoles=V.prototype.nf;
441
+ V.prototype.getAudioLanguagesAndRoles=V.prototype.Te;V.prototype.selectVariantTrack=V.prototype.te;V.prototype.selectTextTrack=V.prototype.se;V.prototype.getThumbnails=V.prototype.pf;V.prototype.getImageTracks=V.prototype.Ye;V.prototype.getTextTracks=V.prototype.jb;V.prototype.getVariantTracks=V.prototype.Ec;V.prototype.cancelTrickPlay=V.prototype.Ke;V.prototype.trickPlay=V.prototype.Uf;V.prototype.getPlaybackRate=V.prototype.ff;V.prototype.isBuffering=V.prototype.sd;V.prototype.getKeyStatuses=V.prototype.Bc;
442
+ V.prototype.getExpiration=V.prototype.Vb;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.sf;V.prototype.seekRange=V.prototype.ec;V.prototype.isAudioOnly=V.prototype.uf;V.prototype.isInProgress=V.prototype.mb;V.prototype.isLive=V.prototype.Y;V.prototype.getAdManager=V.prototype.ce;V.prototype.getAssetUri=V.prototype.pd;V.prototype.getNetworkingEngine=V.prototype.Wb;V.prototype.getMediaElement=V.prototype.df;
443
+ V.prototype.getLoadMode=V.prototype.$e;V.prototype.resetConfiguration=V.prototype.Lf;V.prototype.getBufferFullness=V.prototype.Ue;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;V.prototype.load=V.prototype.load;V.prototype.unload=V.prototype.Td;V.prototype.detach=V.prototype.detach;V.prototype.attach=V.prototype.Rb;
444
+ V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?v(h,Wf(),3):h.v(2);2!=h.g&&(b=h.h);var k={};if(qd()){for(var l in cg)k[l]=!0;for(var m in eg)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]=qd()?!!cg[n]:rd(n);for(var p in l)k[p]=
445
+ qd()?!!eg[p]:rd(l[p]);c=k;k={};p=t('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
446
+ for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=qd()?Yc(l)?!0:MediaSource.isTypeSupported(l)||Pc(l):rd(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Zl;for(g in f)e[g]=f[g]();return h["return"](e)})};
447
+ V.isBrowserSupported=function(){window.Promise||Xa("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Xa("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||ud("Trident/"))return!1;var a=xd();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
448
+ !1:qd()?!0:rd("application/x-mpegurl")};V.setAdManagerFactory=function(a){kk=a};V.registerSupportPlugin=function(a,b){Zl[a]=b};V.prototype.destroy=V.prototype.destroy;
449
+ var Vl="abrstatuschanged",Pl="adaptation",Ml="buffering",Uk="drmsessionupdate",xj="emsg",Wl="error",Yl="expirationupdated",Dk="loaded",Bk="loading",Pk="manifestparsed",tl="metadata",wk="onstatechange",xk="onstateidle",Nl="ratechange",dl="streaming",Tl="textchanged",Ul="texttrackvisibility",Mk="timelineregionadded",wl="timelineregionenter",xl="timelineregionexit",Rl="trackschanged",Hk="unloading",Sl="variantchanged",$l={ag:Vl,bg:Pl,cg:Ml,dg:Uk,fg:xj,Error:Wl,gg:Yl,hg:"largegap",ig:Dk,jg:Bk,kg:Pk,Metadata:tl,
450
+ lg:wk,mg:xk,ng:Nl,og:"sessiondata",pg:dl,qg:Tl,rg:Ul,sg:Mk,tg:wl,ug:xl,vg:Rl,wg:Hk,xg:Sl},yk=0,hk=1,cl=2,ol=3;V.LoadMode={DESTROYED:yk,NOT_LOADED:hk,MEDIA_SOURCE:cl,SRC_EQUALS:ol};V.version="v3.2.2";var am=["3","2"];Ub=new function(a){this.g=a;this.i=Vb;this.h=Wb}(new Sb(Number(am[0]),Number(am[1])));
451
+ var Xl=["output-restricted","internal-error"],Zl={},kk=null,Ek={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"},Fl={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
452
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function bm(){this.h=[];this.j=this.i=this.g=0};function W(a,b){var c=this;this.i=a;this.g=b;this.j=!1;this.l=this.g.getVolume();this.h=new cf;this.h.A(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.j=!0});this.h.A(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.j=!1})}q=W.prototype;q.getDuration=function(){return this.i.getDuration()};q.getMinSuggestedDuration=function(){return this.i.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.j};
450
453
  q.isSkippable=function(){return 0<=this.i.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
451
- q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.i=null};J("shaka.ads.ClientSideAd",W);
454
+ q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.i=null};M("shaka.ads.ClientSideAd",W);
452
455
  W.prototype.release=W.prototype.release;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;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;
453
- W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;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 Zl(a,b,c,d){var e=this;this.m=a;this.g=b;this.u=null;this.C=NaN;this.j=d;this.s=null;this.h=new gf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.g);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.1.3");this.i=null;this.h.va(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){$l(e,f)});this.h.B(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
454
- function(f){am(e,f)});this.g.onended=function(){e.l.contentComplete()}}Zl.prototype.stop=function(){this.i&&this.i.stop();this.m&&Nj(this.m)};Zl.prototype.release=function(){this.stop();this.u&&this.u.disconnect();this.h&&this.h.release();this.i&&this.i.destroy();this.l.destroy()};function am(a,b){b.getError();bm(a,null);a.j(new P("ad-cue-points-changed",{cuepoints:[]}))}
455
- function $l(a,b){a.j(new P("ads-loaded",{loadTime:Date.now()/1E3-a.C}));a.i=b.getAdsManager(a.g);a.j(new P("ima-ad-manager-loaded",{imaAdManager:a.i}));var c=a.i.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push(new cm(e.value));a.j(new P("ad-cue-points-changed",{cuepoints:d}))}dm(a);try{a.i.init(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.B(a.g,"loadeddata",function(){a.i.resize(a.g.offsetWidth,
456
- a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.u=new ResizeObserver(function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.u.observe(a.g)),a.i.start()}catch(f){bm(a,null)}}
457
- function dm(a){a.h.B(a.i,google.ima.AdErrorEvent.Type.AD_ERROR,function(b){am(a,b)});a.h.B(a.i,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(b){em(a,b)});a.h.B(a.i,google.ima.AdEvent.Type.STARTED,function(b){em(a,b)});a.h.B(a.i,google.ima.AdEvent.Type.FIRST_QUARTILE,function(b){a.j(new P("ad-first-quartile",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.MIDPOINT,function(b){a.j(new P("ad-midpoint",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.THIRD_QUARTILE,function(b){a.j(new P("ad-third-quartile",
458
- {originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.COMPLETE,function(b){a.j(new P("ad-complete",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(b){bm(a,b)});a.h.B(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(b){bm(a,b)});a.h.B(a.i,google.ima.AdEvent.Type.SKIPPED,function(b){a.j(new P("ad-skipped",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.VOLUME_CHANGED,function(b){a.j(new P("ad-volume-changed",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.VOLUME_MUTED,
459
- function(b){a.j(new P("ad-muted",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.PAUSED,function(b){a.s.j=!0;a.j(new P("ad-paused",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.RESUMED,function(b){a.s.j=!1;a.j(new P("ad-resumed",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(b){a.j(new P("ad-skip-state-changed",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.CLICK,function(b){a.j(new P("ad-clicked",{originalEvent:b}))});a.h.B(a.i,
460
- google.ima.AdEvent.Type.AD_PROGRESS,function(b){a.j(new P("ad-progress",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.AD_BUFFERING,function(b){a.j(new P("ad-buffering",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.IMPRESSION,function(b){a.j(new P("ad-impression",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.DURATION_CHANGE,function(b){a.j(new P("ad-duration-changed",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.USER_CLOSE,function(b){a.j(new P("ad-closed",{originalEvent:b}))});
461
- a.h.B(a.i,google.ima.AdEvent.Type.LOADED,function(b){a.j(new P("ad-loaded",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(b){a.j(new P("all-ads-completed",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.LINEAR_CHANGED,function(b){a.j(new P("ad-linear-changed",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.AD_METADATA,function(b){a.j(new P("ad-metadata",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.LOG,function(b){a.j(new P("ad-recoverable-error",
462
- {originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.AD_BREAK_READY,function(b){a.j(new P("ad-break-ready",{originalEvent:b}))});a.h.B(a.i,google.ima.AdEvent.Type.INTERACTION,function(b){a.j(new P("ad-interaction",{originalEvent:b}))})}function em(a,b){var c=b.getAd();a.s=new W(c,a.i);a.j(new P("ad-started",{ad:a.s,sdkAdObject:c,originalEvent:b}));a.m.setAttribute("ad-active","true");a.g.pause()}
463
- function bm(a,b){a.j(new P("ad-stopped",{originalEvent:b}));a.m.removeAttribute("ad-active");a.g.play()};function X(a,b){this.i=a;this.h=null;this.g=b}q=X.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
456
+ W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;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 cm(a,b,c,d){var e=this;this.m=a;this.g=b;this.u=null;this.D=NaN;this.j=d;this.s=null;this.h=new cf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.g);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.2");this.i=null;this.h.xa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){dm(e,f)});this.h.A(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
457
+ function(f){em(e,f)});this.g.onended=function(){e.l.contentComplete()}}cm.prototype.stop=function(){this.i&&this.i.stop();this.m&&Kj(this.m)};cm.prototype.release=function(){this.stop();this.u&&this.u.disconnect();this.h&&this.h.release();this.i&&this.i.destroy();this.l.destroy()};function em(a,b){b.getError();fm(a,null);a.j(new R("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
458
+ function dm(a,b){a.j(new R("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.D)));a.i=b.getAdsManager(a.g);a.j(new R("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.i)));var c=a.i.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new R("ad-cue-points-changed",(new Map).set("cuepoints",d)))}gm(a);try{a.i.init(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
459
+ a.h.A(a.g,"loadeddata",function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.u=new ResizeObserver(function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.u.observe(a.g)),a.i.start()}catch(f){fm(a,null)}}
460
+ function gm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new R(d,e))}a.h.A(a.i,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){em(a,c)});a.h.A(a.i,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){hm(a,c)});a.h.A(a.i,google.ima.AdEvent.Type.STARTED,function(c){hm(a,c)});a.h.A(a.i,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.A(a.i,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.A(a.i,google.ima.AdEvent.Type.THIRD_QUARTILE,
461
+ function(c){b(c,"ad-third-quartile")});a.h.A(a.i,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.A(a.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){fm(a,c)});a.h.A(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){fm(a,c)});a.h.A(a.i,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.A(a.i,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.A(a.i,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
462
+ a.h.A(a.i,google.ima.AdEvent.Type.PAUSED,function(c){a.s.j=!0;b(c,"ad-paused")});a.h.A(a.i,google.ima.AdEvent.Type.RESUMED,function(c){a.s.j=!1;b(c,"ad-resumed")});a.h.A(a.i,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.A(a.i,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.A(a.i,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.A(a.i,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.A(a.i,
463
+ google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.A(a.i,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.A(a.i,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.A(a.i,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.A(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.A(a.i,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.A(a.i,google.ima.AdEvent.Type.AD_METADATA,
464
+ function(c){b(c,"ad-metadata")});a.h.A(a.i,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.A(a.i,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.A(a.i,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function hm(a,b){var c=b.getAd();a.s=new W(c,a.i);c=(new Map).set("ad",a.s).set("sdkAdObject",c).set("originalEvent",b);a.j(new R("ad-started",c));a.m.setAttribute("ad-active","true");a.g.pause()}
465
+ function fm(a,b){a.j(new R("ad-stopped",(new Map).set("originalEvent",b)));a.m.removeAttribute("ad-active");a.g.play()};function X(a,b){this.i=a;this.h=null;this.g=b}q=X.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
464
466
  q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};
465
- q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};J("shaka.ads.ServerSideAd",X);X.prototype.release=X.prototype.release;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.isMuted=X.prototype.isMuted;X.prototype.setVolume=X.prototype.setVolume;
467
+ q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",X);X.prototype.release=X.prototype.release;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.isMuted=X.prototype.isMuted;X.prototype.setVolume=X.prototype.setVolume;
466
468
  X.prototype.getVolume=X.prototype.getVolume;X.prototype.play=X.prototype.play;X.prototype.pause=X.prototype.pause;X.prototype.skip=X.prototype.skip;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;
467
- X.prototype.getDuration=X.prototype.getDuration;function fm(a,b,c,d){var e=this;this.u=a;this.g=b;this.l=null;this.I=NaN;this.j=d;this.H=!1;this.C=this.m=this.s=null;this.F="";this.h=new gf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.i=new google.ima.dai.api.StreamManager(this.g,this.u,a);this.j(new P("ima-stream-manager-loaded",{imaStreamManager:this.i}));this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){gm(e,f)});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?e.l.resolve(e.F):
468
- e.l.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.l=null});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new X(f,e.g);e.C&&(e.m.h=e.C);e.j(new P("ad-started",{ad:e.m}));e.u.setAttribute("ad-active","true")});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active");var f=e.g.currentTime;
469
- e.s&&e.s>f&&(e.g.currentTime=e.s,e.s=null)});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.h=e.C)});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.j(new P("ad-first-quartile"))});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.j(new P("ad-midpoint"))});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.j(new P("ad-third-quartile"))});
470
- this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.j(new P("ad-complete"));e.j(new P("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.B(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.j(new P("ad-skipped"));e.j(new P("ad-stopped"))});this.h.B(this.i,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(new cm(h.start,h.end));e.j(new P("ad-cue-points-changed",
471
- {cuepoints:f}))})}fm.prototype.stop=function(){this.F="";this.s=null};fm.prototype.release=function(){this.stop();this.h&&this.h.release()};fm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.i.onTimedMetadata(b)}};
472
- function gm(a,b){a.j(new P("ads-loaded",{loadTime:Date.now()/1E3-a.I}));var c=b.getStreamData().url;a.l.resolve(c);a.l=null;a.H||a.h.B(a.g,"seeked",function(){var d=a.g.currentTime;if(0!=d){a.i.streamTimeForContentTime(d);var e=a.i.previousCuePointForStreamTime(d);e&&!e.played&&(a.s=d,a.g.currentTime=e.start)}})};function Z(){Xg.call(this);this.g=this.h=null;this.j=new Yl;this.i=navigator.language}pa(Z,Xg);q=Z.prototype;q.setLocale=function(a){this.i=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new M(2,10,1E4);this.h&&this.h.release();this.h=new Zl(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
473
- q.release=function(){this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null)};q.onAssetUnload=function(){this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new P("ad-stopped"));this.j=new Yl};q.requestClientSideAds=function(a){if(!this.h)throw new M(1,10,10001);var b=this.h;b.C=Date.now()/1E3;b.l.requestAds(a)};
474
- q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new M(2,10,10002);this.g&&this.g.release();this.g=new fm(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
475
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new M(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.1.3";c=this.g;var d=b;c.l?c=Promise.reject(new M(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
476
- (c.H=!0),c.l=new Ge,c.i.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.l);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new M(1,10,10003);(a.mpt||a.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.1.3";this.g.i.replaceAdTagParameters(a)};
477
- q.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.i.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.i.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};J("shaka.ads.AdManager",Z);
478
- Z.prototype.onCueMetadataChange=Z.prototype.onCueMetadataChange;Z.prototype.onHlsTimedMetadata=Z.prototype.onHlsTimedMetadata;Z.prototype.onDashTimedMetadata=Z.prototype.onDashTimedMetadata;Z.prototype.getStats=Z.prototype.getStats;Z.prototype.replaceServerSideAdTagParameters=Z.prototype.replaceServerSideAdTagParameters;Z.prototype.requestServerSideStream=Z.prototype.requestServerSideStream;Z.prototype.initServerSide=Z.prototype.initServerSide;Z.prototype.requestClientSideAds=Z.prototype.requestClientSideAds;
479
- Z.prototype.onAssetUnload=Z.prototype.onAssetUnload;Z.prototype.release=Z.prototype.release;Z.prototype.initClientSide=Z.prototype.initClientSide;Z.prototype.setLocale=Z.prototype.setLocale;function cm(a,b){this.start=a;this.end=void 0===b?null:b}Z.ADS_LOADED="ads-loaded";Z.AD_STARTED="ad-started";Z.AD_FIRST_QUARTILE="ad-first-quartile";Z.AD_MIDPOINT="ad-midpoint";Z.AD_THIRD_QUARTILE="ad-third-quartile";Z.AD_COMPLETE="ad-complete";Z.AD_STOPPED="ad-stopped";Z.AD_SKIPPED="ad-skipped";
480
- Z.AD_VOLUME_CHANGED="ad-volume-changed";Z.AD_MUTED="ad-muted";Z.AD_PAUSED="ad-paused";Z.AD_RESUMED="ad-resumed";Z.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Z.CUEPOINTS_CHANGED="ad-cue-points-changed";Z.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Z.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Z.AD_CLICKED="ad-clicked";Z.AD_PROGRESS="ad-progress";Z.AD_BUFFERING="ad-buffering";Z.AD_IMPRESSION="ad-impression";Z.AD_DURATION_CHANGED="ad-duration-changed";Z.AD_CLOSED="ad-closed";
481
- Z.AD_LOADED="ad-loaded";Z.ALL_ADS_COMPLETED="all-ads-completed";Z.AD_LINEAR_CHANGED="ad-linear-changed";Z.AD_METADATA="ad-metadata";Z.AD_RECOVERABLE_ERROR="ad-recoverable-error";Z.AD_BREAK_READY="ad-break-ready";Z.AD_INTERACTION="ad-interaction";nk=function(){return new Z};function hm(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof P){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=t(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=t(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
482
- TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(je(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
483
- function im(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=jm(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
484
- function jm(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
485
- var km="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),lm="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),mm=["loop","playbackRate"],nm=["pause","play"],om={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,getStats:5,getVariantTracks:2,
486
- getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},pm={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},qm=[["getConfiguration","configure"]],rm=[["isTextTrackVisible","setTextTrackVisibility"]],sm="addTextTrack addTextTrackAsync cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),
487
- tm=["attach","detach","load","unload"];function um(a,b,c,d,e,f){var g=this;this.L=a;this.j=new N(b);this.da=c;this.C=!1;this.u=d;this.I=e;this.S=f;this.h=this.m=!1;this.X="";this.s=null;this.F=function(){return vm(g)};this.H=function(h,k){var l=im(k);switch(l.type){case "event":var m=l.targetName;l=l.event;l=new P(l.type,l);g.u(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.C&&(g.da(),g.C=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new M(l.severity,
488
- l.category,l.code);for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.N=0;this.i={};this.l=null;wm.add(this)}q=um.prototype;q.destroy=function(){wm["delete"](this);xm(this);ym&&zm(this);this.j&&(this.j.stop(),this.j=null);this.I=this.u=null;this.h=this.m=!1;this.H=this.F=this.l=this.i=this.g=this.s=null;return Promise.resolve()};q.ta=function(){return this.h};q.Cd=function(){return this.X};
489
- q.init=function(){if(this.L.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.dc();var a=new chrome.cast.SessionRequest(this.L);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(wm),d=c.next();!d.done;d=c.next())Am(d.value,b)},function(b){for(var c=t(wm),d=c.next();!d.done;d=c.next())d=d.value,Bm="available"==b,d.j.dc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Bm&&this.j.U(Cm);(a=ym)&&a.status!=chrome.cast.SessionStatus.STOPPED?Am(this,
490
- a):ym=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Dm),window.__onGCastApiAvailable!=Dm&&Va("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.Jd=function(a){this.s=a;this.h&&Em(this,{type:"appData",appData:this.s})};
491
- q.cast=function(a){var b=this;return F(function(c){if(!b.m)throw new M(1,8,8E3);if(!Bm)throw new M(1,8,8001);if(b.h)throw new M(1,8,8002);b.l=new Ge;chrome.cast.requestSession(function(d){return Fm(b,a,d)},function(d){return Gm(b,d)});return v(c,b.l,0)})};function Hm(a){if(a.h){var b=a.S();chrome.cast.requestSession(function(c){return Fm(a,b,c)},function(c){return Gm(a,c)})}}q.ub=function(){if(this.h){xm(this);if(ym){zm(this);try{ym.stop(function(){},function(){})}catch(a){}ym=null}vm(this)}};
492
- q.get=function(a,b){var c=this;if("video"==a){if(nm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.ke.apply(c,[a,b].concat(ia(e)))}}else if("player"==a){if(pm[b]&&!this.get("player","isLive")())return function(){};if(sm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.ke.apply(c,[a,b].concat(ia(e)))};if(tm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.zf.apply(c,
493
- [a,b].concat(ia(e)))};if(om[b])return function(){return c.g[a][b]}}return this.g[a][b]};q.set=function(a,b,c){this.g[a][b]=c;Em(this,{type:"set",targetName:a,property:b,value:c})};function Fm(a,b,c){ym=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.H);vm(a);Em(a,{type:"init",initState:b,appData:a.s});a.l.resolve()}
494
- function Gm(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 M(2,8,c,b))}q.ke=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];Em(this,{type:"call",targetName:a,methodName:b,args:d})};q.zf=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];e=new Ge;var f=this.N.toString();this.N++;this.i[f]=e;try{Em(this,{type:"asyncCall",targetName:a,methodName:b,args:d,id:f})}catch(g){e.reject(g)}return e};
495
- function Am(a,b){var c=a.S();a.l=new Ge;a.C=!0;Fm(a,c,b)}function zm(a){var b=ym;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.H)}function vm(a){var b=ym?"connected"==ym.status:!1;if(a.h&&!b){a.I();for(var c in a.g)a.g[c]={};xm(a)}a.h=b;a.X=b?ym.receiver.friendlyName:"";a.j.dc()}function xm(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new M(1,7,7E3))}}
496
- function Em(a,b){var c=hm(b),d=ym;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Za)}catch(e){throw c=new M(2,8,8005,e),d=new P("error",{detail:c}),a.u("player",d),a.ub(),c;}}var Cm=.02,Bm=!1,ym=null,wm=new Set;function Dm(a){if(a){a=t(wm);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Im(a,b,c){Xg.call(this);var d=this;this.j=a;this.i=b;this.h=this.s=this.l=this.u=this.m=null;this.F=c;this.C=new Map;this.g=new um(c,function(){return Jm(d)},function(){return Km(d)},function(e,f){return Lm(d,e,f)},function(){return Mm(d)},function(){return Nm(d)});Om(this)}pa(Im,Xg);q=Im.prototype;
497
- q.destroy=function(a){a&&this.g.ub();this.h&&(this.h.release(),this.h=null);a=[];this.i&&(a.push(this.i.destroy()),this.i=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.m=this.j=null;return Promise.all(a)};q.hf=function(){return this.m};q.$e=function(){return this.u};q.De=function(){return this.g.m&&Bm};q.ta=function(){return this.g.ta()};q.Cd=function(){return this.g.Cd()};
498
- q.cast=function(){var a=this,b;return F(function(c){return 1==c.g?(b=Nm(a),v(c,a.g.cast(b),2)):a.i?v(c,a.i.Qd(),0):c["return"]()})};q.Jd=function(a){this.g.Jd(a)};q.Kf=function(){Hm(this.g)};q.ub=function(){this.g.ub()};
499
- q.Ge=function(a){var b=this;return F(function(c){if(1==c.g){if(a==b.F)return c["return"]();b.F=a;b.g.ub();return v(c,b.g.destroy(),2)}b.g=null;b.g=new um(a,function(){return Jm(b)},function(){return Km(b)},function(d,e){return Lm(b,d,e)},function(){return Mm(b)},function(){return Nm(b)});b.g.init();z(c)})};
500
- function Om(a){a.g.init();a.h=new gf;for(var b=t(km),c=b.next();!c.done;c=b.next())a.h.B(a.j,c.value,function(f){a.g.ta()||(f=new P(f.type,f),a.l.dispatchEvent(f))});for(var d in Wl)a.h.B(a.i,Wl[d],function(f){a.g.ta()||a.s.dispatchEvent(f)});a.m={};b={};for(var e in a.j)b.Hb=e,Object.defineProperty(a.m,b.Hb,{configurable:!1,enumerable:!0,get:function(f){return function(){return Pm(a,f.Hb)}}(b),set:function(f){return function(g){var h=f.Hb;a.g.ta()?a.g.set("video",h,g):a.j[h]=g}}(b)}),b={Hb:b.Hb};
501
- a.u={};Qm(a,function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Rm(a,f)}})});Sm(a);a.l=new Xg;a.l.pc=a.m;a.s=new Xg;a.s.pc=a.u}function Sm(a){var b=new Map;Qm(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.C.set(c,e):a.C.set(e,c)}else b.set(d,c)})}
502
- function Qm(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.i,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=t(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
503
- function Nm(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.i.ld(),startTime:null};a.j.pause();for(var c=t(mm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.j[d];a.j.ended||(b.startTime=a.j.currentTime);c=t(qm);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.i[e[0]]();b.player[d]=e}c=t(rm);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.i[e[0]](),b.playerAfterLoad[d]=e;return b}function Jm(a){var b=new P("caststatuschanged");a.dispatchEvent(b)}
504
- function Km(a){var b=new P(a.m.paused?"pause":"play");a.l.dispatchEvent(b)}
505
- function Mm(a){for(var b=t(qm),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.i[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.j.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.j.autoplay=!1,b=a.i.load(e,d));var g={};c=t(mm);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.j){for(var h=t(mm),k=h.next();!k.done;k=h.next())k=k.value,a.j[k]=g[k];h=t(rm);for(k=
506
- h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.i[k](l)}a.j.autoplay=f;e&&a.j.play()}},function(h){h=new P(Sl,{detail:h});a.i.dispatchEvent(h)})}
507
- function Pm(a,b){if("addEventListener"==b)return function(d,e,f){return a.l.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.l.removeEventListener(d,e,f)};if(a.g.ta()&&0==Object.keys(a.g.g.video).length){var c=a.j[b];if("function"!=typeof c)return c}return a.g.ta()?a.g.get("video",b):(c=a.j[b],"function"==typeof c&&(c=c.bind(a.j)),c)}
508
- function Rm(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.m};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.i.Sb()};if("getAdManager"==b)return function(){return a.i.$d()};if("setVideoContainer"==b)return function(c){return a.i.te(c)};
509
- if(a.g.ta()){if("getManifest"==b||"drmInfo"==b)return function(){Va(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Va(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ta()&&0==Object.keys(a.g.g.video).length&&om[b]||!a.g.ta()?a.i[b].bind(a.i):a.g.get("player",b)}function Lm(a,b,c){a.g.ta()&&("video"==b?a.l.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}J("shaka.cast.CastProxy",Im);Im.prototype.changeReceiverId=Im.prototype.Ge;
510
- Im.prototype.forceDisconnect=Im.prototype.ub;Im.prototype.suggestDisconnect=Im.prototype.Kf;Im.prototype.setAppData=Im.prototype.Jd;Im.prototype.cast=Im.prototype.cast;Im.prototype.receiverName=Im.prototype.Cd;Im.prototype.isCasting=Im.prototype.ta;Im.prototype.canCast=Im.prototype.De;Im.prototype.getPlayer=Im.prototype.$e;Im.prototype.getVideo=Im.prototype.hf;Im.prototype.destroy=Im.prototype.destroy;function Tm(a,b,c,d){Xg.call(this);var e=this;this.g=a;this.i=b;this.h=new gf;this.N={video:a,player:b};this.H=c||function(){};this.S=d||function(f){return f};this.j=null;this.I=!1;this.s=!0;this.m=0;this.F=!1;this.C=!0;this.u=this.l=null;this.L=new N(function(){Um(e)});Vm(this)}pa(Tm,Xg);q=Tm.prototype;q.isConnected=function(){return this.I};q.lf=function(){return this.s};q.Gf=function(a){this.j=a};q.Je=function(){this.j=null};
511
- q.Hf=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.title=a};q.Ff=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.images=[{url:a}]};q.Ef=function(a){this.j||(this.j={});this.j.artist=a;this.j.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
512
- q.destroy=function(){var a=this,b,c;return F(function(d){if(1==d.g)return a.h&&(a.h.release(),a.h=null),b=[],a.i&&(b.push(a.i.destroy()),a.i=null),a.L&&(a.L.stop(),a.L=null),a.g=null,a.N=null,a.H=null,a.I=!1,a.s=!0,a.l=null,a.u=null,v(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
513
- function Vm(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Wm(a)};b.onSenderDisconnected=function(){return Wm(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&an(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);an(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return bn(a,
514
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return cn(a,e)};b.start();b=t(km);for(var c=b.next();!c.done;c=b.next())a.h.B(a.g,c.value,function(e){return dn(a,"video",e)});for(var d in Wl)a.h.B(a.i,Wl[d],function(e){return dn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.i.Ld(3840,2160):a.i.Ld(1920,1080);a.h.B(a.g,"loadeddata",function(){a.F=!0});a.h.B(a.i,"loading",function(){a.s=
515
- !1;en(a)});a.h.B(a.g,"playing",function(){a.s=!1;en(a)});a.h.B(a.g,"pause",function(){en(a)});a.h.B(a.i,"unloading",function(){a.s=!0;en(a)});a.h.B(a.g,"ended",function(){(new N(function(){a.g&&a.g.ended&&(a.s=!0,en(a))})).U(fn)})}function Wm(a){a.m=0;a.C=!0;a.I=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;en(a)}
516
- function en(a){var b;F(function(c){if(1==c.g)return v(c,Promise.resolve(),2);if(!a.i)return c["return"]();b=new P("caststatuschanged");a.dispatchEvent(b);gn(a)||hn(a);z(c)})}
517
- function jn(a,b,c){var d,e,f,g,h,k,l,m,n,p;F(function(r){switch(r.g){case 1:for(d in b.player)e=b.player[d],a.i[d](e);a.H(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,B(r,5),v(r,a.i.load(b.manifest,b.startTime),7)):v(r,Promise.resolve(),3);case 7:ua(r,3);break;case 5:return g=va(r),h=Sl,k=new P(h,{detail:g}),a.i&&a.i.dispatchEvent(k),r["return"]();case 3:if(!a.i)return r["return"]();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.i[n](p);a.g.autoplay=
518
- f;b.manifest&&(a.g.play(),hn(a));z(r)}})}function dn(a,b,c){a.i&&(Um(a),an(a,{type:"event",targetName:b,event:c},a.l))}
519
- function Um(a){a.L.U(kn);for(var b={video:{},player:{}},c=t(lm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.i.Y())for(var e in pm)0==a.m%pm[e]&&(b.player[e]=a.i[e]());for(var f in om)0==a.m%om[f]&&(b.player[f]=a.i[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.F&&(a.m+=1);an(a,{type:"update",update:b},a.l);gn(a)}function gn(a){return a.C&&(a.g.duration||a.i.Y())?(ln(a),a.C=!1,!0):!1}
520
- function ln(a,b){var c={contentId:a.i.ld(),streamType:a.i.Y()?"LIVE":"BUFFERED",contentType:""};a.i.Y()||(c.duration=a.g.duration);a.j&&(c.metadata=a.j);hn(a,void 0===b?0:b,c)}
521
- function cn(a,b){var c=im(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;jn(a,c.initState,c.appData);Um(a);break;case "appData":a.H(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.N[d][e]=c;break;case "call":d=a.N[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
522
- c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.N[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return mn(a,h,g,null)},function(k){return mn(a,h,g,k)})}}
523
- function bn(a,b){var c=im(b.data);switch(c.type){case "PLAY":a.g.play();hn(a);break;case "PAUSE":a.g.pause();hn(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),hn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),hn(a));break;case "STOP":a.i.Qd().then(function(){a.i&&hn(a)});break;case "GET_STATUS":ln(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
524
- null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||hn(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;d=c.media;e=c.currentTime;f=a.S(d.contentId);g=c.autoplay||!0;a.H(d.customData);g&&(a.g.autoplay=!0);a.i.load(f,e).then(function(){a.i&&ln(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");an(a,{requestId:Number(c.requestId),type:k},a.u)});break;default:an(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
525
- function mn(a,b,c,d){a.i&&an(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function an(a,b,c,d){a.I&&(a=hm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function hn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?nn:a.i.od()?on:a.g.paused?pn:qn,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);an(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
526
- J("shaka.cast.CastReceiver",Tm);Tm.prototype.destroy=Tm.prototype.destroy;Tm.prototype.setContentArtist=Tm.prototype.Ef;Tm.prototype.setContentImage=Tm.prototype.Ff;Tm.prototype.setContentTitle=Tm.prototype.Hf;Tm.prototype.clearContentMetadata=Tm.prototype.Je;Tm.prototype.setContentMetadata=Tm.prototype.Gf;Tm.prototype.isIdle=Tm.prototype.lf;Tm.prototype.isConnected=Tm.prototype.isConnected;var kn=.5,fn=5,nn="IDLE",qn="PLAYING",on="BUFFERING",pn="PAUSED";function rn(a){var b=this;this.g=[];this.h=[];this.data=[];(new Pb).box("moov",Ub).T("pssh",function(c){if(!(1<c.version)){var d=qb(c.reader.P,-12,c.size);b.data.push(d);b.g.push(pc(c.reader.$a(16)));if(0<c.version){d=c.reader.M();d=t(kb(d));for(var e=d.next();!e.done;e=d.next())e=pc(c.reader.$a(16)),b.h.push(e)}}}).parse(a)}
527
- function sn(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=tb(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function tn(a){if(!a)return a;var b=new rn(a);if(1>=b.data.length)return a;a=[];var c={};b=t(b.data);for(var d=b.next();!d.done;c={hc:c.hc},d=b.next())c.hc=d.value,a.some(function(e){return function(f){return ob(f,e.hc)}}(c))||a.push(c.hc);return qc.apply(kc,ia(a))};function un(a,b){var c=vn(a,b);return 1!=c.length?null:c[0]}function wn(a,b,c){a=xn(a,b,c);return 1!=a.length?null:a[0]}function vn(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName==b})}function yn(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}function xn(a,b,c){return Array.from(a.childNodes).filter(function(d){return d instanceof Element&&d.localName==c&&d.namespaceURI==b})}
528
- function zn(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function An(a){return Array.from(a.childNodes).every(Bn)?a.textContent.trim():null}function Bn(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Cn(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 Dn(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}
529
- function En(a){if(!a)return null;a=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}function Fn(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}
530
- function Gn(a){a=Number(a);return 0===a%1?a:null}function Hn(a){a=Number(a);return 0===a%1&&0<a?a:null}function In(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Jn(a){a=Number(a);return isNaN(a)?null:a}function Kn(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(a)?null:a}
531
- function Ln(a,b){var c=new DOMParser,d=null,e=null;try{e=c.parseFromString(a,"text/xml")}catch(f){}e&&e.documentElement.tagName==b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d}function Mn(a,b){try{var c=wb(a);return Ln(c,b)}catch(d){return null}};function Nn(a,b,c){var d=On(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 M(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.ne?(e=h.init||e,!1):!0}),f.length&&(a=Pn(e,f,c),0==a.length&&(a=[Ae("",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(Ae(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
532
- t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Vd:g,pg:e,drmInfos:a,Zd:!0}}function Qn(a,b,c,d){var e=Nn(a,c,d);if(b.Zd){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.Zd=!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 M(2,4,4008);return e.Vd||b.Vd}
533
- function Rn(a){var b=0,c=tb(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=qb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
534
- function Sn(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 Tn(a){a=wn(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=nc(a.textContent);a=Rn(a).filter(function(b){return b.type===Un})[0];if(!a)return"";a=xb(a.value,!0);return(a=Ln(a,"WRMHEADER"))?Sn(a):""}
535
- function Pn(a,b,c){var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.ne];if(f){var g;if(g=wn(e.node,"urn:microsoft:playready","pro")){g=nc(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:sn(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=Ae(f,e.init||a||g);if(f=Vn.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
536
- function On(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Wn(c.value))&&b.push(c);return b}
537
- function Wn(a){var b=a.getAttribute("schemeIdUri"),c=zn(a,"urn:mpeg:cenc:2013","default_KID"),d=xn(a,"urn:mpeg:cenc:2013","pssh").map(An);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new M(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:nc(f),keyId:null}})}catch(f){throw new M(2,4,4007);}return{node:a,ne:b,keyId:c,init:0<e.length?e:null}}
538
- var Un=1,Vn=(new Map).set("com.widevine.alpha",function(a){return(a=wn(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Tn).set("com.microsoft.playready.recommendation",Tn).set("com.microsoft.playready.software",Tn).set("com.microsoft.playready.hardware",Tn);function Xn(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=
469
+ X.prototype.getDuration=X.prototype.getDuration;function im(a,b,c,d){var e=this;this.u=a;this.g=b;this.l=null;this.L=NaN;this.j=d;this.I=!1;this.D=this.m=this.s=null;this.F="";this.H=[];this.h=new cf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.i=new google.ima.dai.api.StreamManager(this.g,this.u,a);this.j(new R("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.i)));this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){jm(e,f)});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
470
+ e.l.resolve(e.F):e.l.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.l=null});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new X(f,e.g);e.D&&(e.m.h=e.D);e.j(new R("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active");
471
+ var f=e.g.currentTime;e.s&&e.s>f&&(e.g.currentTime=e.s,e.s=null)});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.D=f.getStreamData().adProgressData;e.m&&(e.m.h=e.D)});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.j(new R("ad-first-quartile"))});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.j(new R("ad-midpoint"))});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.j(new R("ad-third-quartile"))});
472
+ this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.j(new R("ad-complete"));e.j(new R("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.j(new R("ad-skipped"));e.j(new R("ad-stopped"))});this.h.A(this.i,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.H=
473
+ f;e.j(new R("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}im.prototype.stop=function(){this.F="";this.s=null;this.H=[]};im.prototype.release=function(){this.stop();this.h&&this.h.release()};im.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.i.onTimedMetadata(b)}};
474
+ function jm(a,b){a.j(new R("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.L)));var c=b.getStreamData().url;a.l.resolve(c);a.l=null;a.I||a.h.A(a.g,"seeked",function(){var d=a.g.currentTime;if(0!=d){a.i.streamTimeForContentTime(d);var e=a.i.previousCuePointForStreamTime(d);e&&!e.played&&(a.s=d,a.g.currentTime=e.start)}})};function Y(){Le.call(this);this.g=this.h=null;this.j=new bm;this.i=navigator.language}ra(Y,Le);q=Y.prototype;q.setLocale=function(a){this.i=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.h&&this.h.release();this.h=new cm(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
475
+ q.release=function(){this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null)};q.onAssetUnload=function(){this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new R("ad-stopped"));this.j=new bm};q.requestClientSideAds=function(a){if(!this.h)throw new N(1,10,10001);var b=this.h;b.D=Date.now()/1E3;b.l.requestAds(a)};
476
+ q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new im(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
477
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Xa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.2.2";c=this.g;var d=b;c.l?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
478
+ (c.I=!0),c.l=new yc,c.i.requestStream(a),c.F=d||"",c.L=Date.now()/1E3,c=c.l);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Xa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.2.2";this.g.i.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.H};
479
+ q.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.i.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.i.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};M("shaka.ads.AdManager",Y);
480
+ 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;
481
+ 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";
482
+ 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";
483
+ 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";kk=function(){return new Y};function km(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof R){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=t(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=t(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
484
+ TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(Oh(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
485
+ function lm(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=mm(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
486
+ function mm(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
487
+ var nm="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),om="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),pm=["loop","playbackRate"],qm=["pause","play"],rm={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
488
+ getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},sm={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},tm=[["getConfiguration","configure"]],um=[["isTextTrackVisible","setTextTrackVisibility"]],vm="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay goToLive".split(" "),
489
+ wm=["attach","detach","load","unload"];function xm(a,b,c,d,e,f){var g=this;this.L=a;this.j=new O(b);this.ea=c;this.D=!1;this.u=d;this.I=e;this.T=f;this.h=this.m=!1;this.Z="";this.s=null;this.F=function(){return ym(g)};this.H=function(h,k){var l=lm(k);switch(l.type){case "event":var m=l.targetName;l=Ke(l.event);g.u(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.D&&(g.ea(),g.D=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new N(l.severity,l.category,
490
+ l.code);for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.O=0;this.i={};this.l=null;zm.add(this)}q=xm.prototype;q.destroy=function(){zm["delete"](this);Am(this);Bm&&Cm(this);this.j&&(this.j.stop(),this.j=null);this.I=this.u=null;this.h=this.m=!1;this.H=this.F=this.l=this.i=this.g=this.s=null;return Promise.resolve()};q.va=function(){return this.h};q.Gd=function(){return this.Z};
491
+ q.init=function(){if(this.L.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Jb();var a=new chrome.cast.SessionRequest(this.L);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(zm),d=c.next();!d.done;d=c.next())Dm(d.value,b)},function(b){for(var c=t(zm),d=c.next();!d.done;d=c.next())d=d.value,Em="available"==b,d.j.Jb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Em&&this.j.V(Fm);(a=Bm)&&a.status!=chrome.cast.SessionStatus.STOPPED?Dm(this,
492
+ a):Bm=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Gm),window.__onGCastApiAvailable!=Gm&&Xa("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.Md=function(a){this.s=a;this.h&&Hm(this,{type:"appData",appData:this.s})};
493
+ q.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new N(1,8,8E3);if(!Em)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new yc;chrome.cast.requestSession(function(d){return Im(b,a,d)},function(d){return Jm(b,d)});return v(c,b.l,0)})};function Km(a){if(a.h){var b=a.T();chrome.cast.requestSession(function(c){return Im(a,b,c)},function(c){return Jm(a,c)})}}q.xb=function(){if(this.h){Am(this);if(Bm){Cm(this);try{Bm.stop(function(){},function(){})}catch(a){}Bm=null}ym(this)}};
494
+ q.get=function(a,b){var c=this;if("video"==a){if(qm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.oe.apply(c,[a,b].concat(ja(e)))}}else if("player"==a){if(sm[b]&&!this.get("player","isLive")())return function(){};if(vm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.oe.apply(c,[a,b].concat(ja(e)))};if(wm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.If.apply(c,
495
+ [a,b].concat(ja(e)))};if(rm[b])return function(){return c.g[a][b]}}return this.g[a][b]};q.set=function(a,b,c){this.g[a][b]=c;Hm(this,{type:"set",targetName:a,property:b,value:c})};function Im(a,b,c){Bm=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.H);ym(a);Hm(a,{type:"init",initState:b,appData:a.s});a.l.resolve()}
496
+ function Jm(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new N(2,8,c,b))}q.oe=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];Hm(this,{type:"call",targetName:a,methodName:b,args:d})};q.If=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];e=new yc;var f=this.O.toString();this.O++;this.i[f]=e;try{Hm(this,{type:"asyncCall",targetName:a,methodName:b,args:d,id:f})}catch(g){e.reject(g)}return e};
497
+ function Dm(a,b){var c=a.T();a.l=new yc;a.D=!0;Im(a,c,b)}function Cm(a){var b=Bm;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.H)}function ym(a){var b=Bm?"connected"==Bm.status:!1;if(a.h&&!b){a.I();for(var c in a.g)a.g[c]={};Am(a)}a.h=b;a.Z=b?Bm.receiver.friendlyName:"";a.j.Jb()}function Am(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}
498
+ function Hm(a,b){var c=km(b),d=Bm;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},$a)}catch(e){throw c=new N(2,8,8005,e),d=new R("error",(new Map).set("detail",c)),a.u("player",d),a.xb(),c;}}var Fm=.02,Em=!1,Bm=null,zm=new Set;function Gm(a){if(a){a=t(zm);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Lm(a,b,c){Le.call(this);var d=this;this.j=a;this.i=b;this.h=this.s=this.l=this.u=this.m=null;this.F=c;this.D=new Map;this.g=new xm(c,function(){return Mm(d)},function(){return Nm(d)},function(e,f){return Om(d,e,f)},function(){return Pm(d)},function(){return Qm(d)});Rm(this)}ra(Lm,Le);q=Lm.prototype;
499
+ q.destroy=function(a){a&&this.g.xb();this.h&&(this.h.release(),this.h=null);a=[];this.i&&(a.push(this.i.destroy()),this.i=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.m=this.j=null;return Promise.all(a)};q.rf=function(){return this.m};q.gf=function(){return this.u};q.Ie=function(){return this.g.m&&Em};q.va=function(){return this.g.va()};q.Gd=function(){return this.g.Gd()};
500
+ q.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=Qm(a),v(c,a.g.cast(b),2)):a.i?v(c,a.i.Td(),0):c["return"]()})};q.Md=function(a){this.g.Md(a)};q.Tf=function(){Km(this.g)};q.xb=function(){this.g.xb()};
501
+ q.Le=function(a){var b=this;return K(function(c){if(1==c.g){if(a==b.F)return c["return"]();b.F=a;b.g.xb();return v(c,b.g.destroy(),2)}b.g=null;b.g=new xm(a,function(){return Mm(b)},function(){return Nm(b)},function(d,e){return Om(b,d,e)},function(){return Pm(b)},function(){return Qm(b)});b.g.init();z(c)})};
502
+ function Rm(a){a.g.init();a.h=new cf;for(var b=t(nm),c=b.next();!c.done;c=b.next())a.h.A(a.j,c.value,function(f){a.g.va()||(f=Ke(f),a.l.dispatchEvent(f))});for(var d in $l)a.h.A(a.i,$l[d],function(f){a.g.va()||a.s.dispatchEvent(f)});a.m={};b={};for(var e in a.j)b.Kb=e,Object.defineProperty(a.m,b.Kb,{configurable:!1,enumerable:!0,get:function(f){return function(){return Sm(a,f.Kb)}}(b),set:function(f){return function(g){var h=f.Kb;a.g.va()?a.g.set("video",h,g):a.j[h]=g}}(b)}),b={Kb:b.Kb};a.u={};Tm(a,
503
+ function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Um(a,f)}})});Vm(a);a.l=new Le;a.l.sc=a.m;a.s=new Le;a.s.sc=a.u}function Vm(a){var b=new Map;Tm(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.D.set(c,e):a.D.set(e,c)}else b.set(d,c)})}
504
+ function Tm(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.i,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=t(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
505
+ function Qm(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.i.pd(),startTime:null};a.j.pause();for(var c=t(pm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.j[d];a.j.ended||(b.startTime=a.j.currentTime);c=t(tm);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.i[e[0]]();b.player[d]=e}c=t(um);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.i[e[0]](),b.playerAfterLoad[d]=e;return b}function Mm(a){var b=new R("caststatuschanged");a.dispatchEvent(b)}
506
+ function Nm(a){var b=new R(a.m.paused?"pause":"play");a.l.dispatchEvent(b)}
507
+ function Pm(a){for(var b=t(tm),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.i[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.j.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.j.autoplay=!1,b=a.i.load(e,d));var g={};c=t(pm);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.j){for(var h=t(pm),k=h.next();!k.done;k=h.next())k=k.value,a.j[k]=g[k];h=t(um);for(k=
508
+ h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.i[k](l)}a.j.autoplay=f;e&&a.j.play()}},function(h){h=(new Map).set("detail",h);h=new R(Wl,h);a.i.dispatchEvent(h)})}
509
+ function Sm(a,b){if("addEventListener"==b)return function(d,e,f){return a.l.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.l.removeEventListener(d,e,f)};if(a.g.va()&&0==Object.keys(a.g.g.video).length){var c=a.j[b];if("function"!=typeof c)return c}return a.g.va()?a.g.get("video",b):(c=a.j[b],"function"==typeof c&&(c=c.bind(a.j)),c)}
510
+ function Um(a,b){a.D.has(b)&&(b=a.D.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.m};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.i.Wb()};if("getDrmEngine"==b)return function(){return a.i.m};if("getAdManager"==b)return function(){return a.i.ce()};
511
+ if("setVideoContainer"==b)return function(c){return a.i.xe(c)};if(a.g.va()){if("getManifest"==b||"drmInfo"==b)return function(){Xa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Xa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.va()&&0==Object.keys(a.g.g.video).length&&rm[b]||!a.g.va()?a.i[b].bind(a.i):a.g.get("player",b)}function Om(a,b,c){a.g.va()&&("video"==b?a.l.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}
512
+ M("shaka.cast.CastProxy",Lm);Lm.prototype.changeReceiverId=Lm.prototype.Le;Lm.prototype.forceDisconnect=Lm.prototype.xb;Lm.prototype.suggestDisconnect=Lm.prototype.Tf;Lm.prototype.setAppData=Lm.prototype.Md;Lm.prototype.cast=Lm.prototype.cast;Lm.prototype.receiverName=Lm.prototype.Gd;Lm.prototype.isCasting=Lm.prototype.va;Lm.prototype.canCast=Lm.prototype.Ie;Lm.prototype.getPlayer=Lm.prototype.gf;Lm.prototype.getVideo=Lm.prototype.rf;Lm.prototype.destroy=Lm.prototype.destroy;function Wm(a,b,c,d){Le.call(this);var e=this;this.g=a;this.i=b;this.h=new cf;this.O={video:a,player:b};this.H=c||function(){};this.T=d||function(f){return f};this.j=null;this.I=!1;this.s=!0;this.m=0;this.F=!1;this.D=!0;this.u=this.l=null;this.L=new O(function(){dn(e)});en(this)}ra(Wm,Le);q=Wm.prototype;q.isConnected=function(){return this.I};q.vf=function(){return this.s};q.Pf=function(a){this.j=a};q.Oe=function(){this.j=null};
513
+ q.Qf=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.title=a};q.Of=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.images=[{url:a}]};q.Nf=function(a){this.j||(this.j={});this.j.artist=a;this.j.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
514
+ q.destroy=function(){var a=this,b,c;return K(function(d){if(1==d.g)return a.h&&(a.h.release(),a.h=null),b=[],a.i&&(b.push(a.i.destroy()),a.i=null),a.L&&(a.L.stop(),a.L=null),a.g=null,a.O=null,a.H=null,a.I=!1,a.s=!0,a.l=null,a.u=null,v(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
515
+ function en(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return fn(a)};b.onSenderDisconnected=function(){return fn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&gn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);gn(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return hn(a,
516
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return jn(a,e)};b.start();b=t(nm);for(var c=b.next();!c.done;c=b.next())a.h.A(a.g,c.value,function(e){return kn(a,"video",e)});for(var d in $l)a.h.A(a.i,$l[d],function(e){return kn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.i.Od(3840,2160):a.i.Od(1920,1080);a.h.A(a.g,"loadeddata",function(){a.F=!0});a.h.A(a.i,"loading",function(){a.s=
517
+ !1;ln(a)});a.h.A(a.g,"playing",function(){a.s=!1;ln(a)});a.h.A(a.g,"pause",function(){ln(a)});a.h.A(a.i,"unloading",function(){a.s=!0;ln(a)});a.h.A(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.s=!0,ln(a))})).V(mn)})}function fn(a){a.m=0;a.D=!0;a.I=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;ln(a)}
518
+ function ln(a){var b;K(function(c){if(1==c.g)return v(c,Promise.resolve(),2);if(!a.i)return c["return"]();b=new R("caststatuschanged");a.dispatchEvent(b);nn(a)||on(a);z(c)})}
519
+ function pn(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;K(function(u){switch(u.g){case 1:for(d in b.player)e=b.player[d],a.i[d](e);a.H(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,A(u,5),v(u,a.i.load(b.manifest,b.startTime),7)):v(u,Promise.resolve(),3);case 7:wa(u,3);break;case 5:return g=E(u),h=Wl,k=(new Map).set("detail",g),l=new R(h,k),a.i&&a.i.dispatchEvent(l),u["return"]();case 3:if(!a.i)return u["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)r=b.playerAfterLoad[p],
520
+ a.i[p](r);a.g.autoplay=f;b.manifest&&(a.g.play(),on(a));z(u)}})}function kn(a,b,c){a.i&&(dn(a),gn(a,{type:"event",targetName:b,event:c},a.l))}
521
+ function dn(a){a.L.V(qn);for(var b={video:{},player:{}},c=t(om),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.i.Y())for(var e in sm)0==a.m%sm[e]&&(b.player[e]=a.i[e]());for(var f in rm)0==a.m%rm[f]&&(b.player[f]=a.i[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.F&&(a.m+=1);gn(a,{type:"update",update:b},a.l);nn(a)}function nn(a){return a.D&&(a.g.duration||a.i.Y())?(rn(a),a.D=!1,!0):!1}
522
+ function rn(a,b){var c={contentId:a.i.pd(),streamType:a.i.Y()?"LIVE":"BUFFERED",contentType:""};a.i.Y()||(c.duration=a.g.duration);a.j&&(c.metadata=a.j);on(a,void 0===b?0:b,c)}
523
+ function jn(a,b){var c=lm(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.D=!0;pn(a,c.initState,c.appData);dn(a);break;case "appData":a.H(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.O[d][e]=c;break;case "call":d=a.O[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
524
+ c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.O[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.D=!0}));c.then(function(){return sn(a,h,g,null)},function(k){return sn(a,h,g,k)})}}
525
+ function hn(a,b){var c=lm(b.data);switch(c.type){case "PLAY":a.g.play();on(a);break;case "PAUSE":a.g.pause();on(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),on(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),on(a));break;case "STOP":a.i.Td().then(function(){a.i&&on(a)});break;case "GET_STATUS":rn(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
526
+ null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||on(a);break;case "LOAD":a.m=0;a.F=!1;a.D=!1;d=c.media;e=c.currentTime;f=a.T(d.contentId);g=c.autoplay||!0;a.H(d.customData);g&&(a.g.autoplay=!0);a.i.load(f,e).then(function(){a.i&&rn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");gn(a,{requestId:Number(c.requestId),type:k},a.u)});break;default:gn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
527
+ function sn(a,b,c,d){a.i&&gn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function gn(a,b,c,d){a.I&&(a=km(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function on(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?tn:a.i.sd()?un:a.g.paused?vn:wn,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);gn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
528
+ M("shaka.cast.CastReceiver",Wm);Wm.prototype.destroy=Wm.prototype.destroy;Wm.prototype.setContentArtist=Wm.prototype.Nf;Wm.prototype.setContentImage=Wm.prototype.Of;Wm.prototype.setContentTitle=Wm.prototype.Qf;Wm.prototype.clearContentMetadata=Wm.prototype.Oe;Wm.prototype.setContentMetadata=Wm.prototype.Pf;Wm.prototype.isIdle=Wm.prototype.vf;Wm.prototype.isConnected=Wm.prototype.isConnected;var qn=.5,mn=5,tn="IDLE",wn="PLAYING",un="BUFFERING",vn="PAUSED";function xn(a){var b=this;this.g=[];this.h=[];this.data=[];(new jg).box("moov",ng).U("pssh",function(c){if(!(1<c.version)){var d=Ob(c.reader.R,-12,c.size);b.data.push(d);b.g.push(Mc(c.reader.bb(16)));if(0<c.version){d=c.reader.N();d=t(jb(d));for(var e=d.next();!e.done;e=d.next())e=Mc(c.reader.bb(16)),b.h.push(e)}}}).parse(a)}
529
+ function yn(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Rb(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function zn(a){if(!a)return a;var b=new xn(a);if(1>=b.data.length)return a;a=[];var c={};b=t(b.data);for(var d=b.next();!d.done;c={lc:c.lc},d=b.next())c.lc=d.value,a.some(function(e){return function(f){return Mb(f,e.lc)}}(c))||a.push(c.lc);return Nc.apply(Hc,ja(a))};function An(a,b){var c=Bn(a,b);return 1!=c.length?null:c[0]}function Cn(a,b,c){a=Dn(a,b,c);return 1!=a.length?null:a[0]}function Bn(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName==b})}function En(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}function Dn(a,b,c){return Array.from(a.childNodes).filter(function(d){return d instanceof Element&&d.localName==c&&d.namespaceURI==b})}
530
+ function Fn(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Gn(a){return Array.from(a.childNodes).every(Hn)?a.textContent.trim():null}function Hn(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function In(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 Jn(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}
531
+ function Kn(a){if(!a)return null;a=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}function Ln(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}
532
+ function Mn(a){a=Number(a);return 0===a%1?a:null}function Nn(a){a=Number(a);return 0===a%1&&0<a?a:null}function On(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Pn(a){a=Number(a);return isNaN(a)?null:a}function Qn(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(a)?null:a}
533
+ function Rn(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function Sn(a,b){try{var c=Bc(a);return Rn(c,b)}catch(d){return null}};function Tn(a,b,c){var d=Un(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.re?(e=h.init||e,!1):!0}),f.length&&(a=Vn(e,f,c),0==a.length&&(a=[sc("",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(sc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
534
+ t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Yd:g,yg:e,drmInfos:a,be:!0}}function Wn(a,b,c,d){var e=Tn(a,c,d);if(b.be){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.be=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new N(2,4,4008);return e.Yd||b.Yd}
535
+ function Xn(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=Ob(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
536
+ function Yn(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 Zn(a){a=Cn(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Kc(a.textContent);a=Xn(a).filter(function(b){return b.type===$n})[0];if(!a)return"";a=Cc(a.value,!0);return(a=Rn(a,"WRMHEADER"))?Yn(a):""}
537
+ function Vn(a,b,c){var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.re];if(f){var g;if(g=Cn(e.node,"urn:microsoft:playready","pro")){g=Kc(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:yn(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=sc(f,e.init||a||g);if(f=ao.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
538
+ function Un(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=bo(c.value))&&b.push(c);return b}
539
+ function bo(a){var b=a.getAttribute("schemeIdUri"),c=Fn(a,"urn:mpeg:cenc:2013","default_KID"),d=Dn(a,"urn:mpeg:cenc:2013","pssh").map(Gn);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Kc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,re:b,keyId:c,init:0<e.length?e:null}}
540
+ var $n=1,ao=(new Map).set("com.widevine.alpha",function(a){return(a=Cn(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Zn).set("com.microsoft.playready.recommendation",Zn).set("com.microsoft.playready.software",Zn).set("com.microsoft.playready.hardware",Zn);function co(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=
539
541
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
540
- function Yn(a,b){var c=Zn(a,b,"timescale"),d=1;c&&(d=Hn(c)||1);var e=Zn(a,b,"duration");c=Hn(e||"");"image"==a.K.contentType&&(c=Jn(e||""));c&&(c/=d);var f=Zn(a,b,"startNumber");e=Number(Zn(a,b,"presentationTimeOffset"))||0;var g=In(f||"");if(null==f||null==g)g=1;var h=$n(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.V.duration||Infinity,l=vn(h,"S");h=[];var m=-e;l=t(mb(l));for(var n=l.next();!n.done;n=l.next()){n=n.value;var p=n.item,r=n.next,u=Cn(p,"t",In);n=Cn(p,"d",In);var x=Cn(p,"r",Gn);null!=
541
- u&&(u-=e);if(!n)break;p=null!=u?u:m;u=x||0;if(0>u)if(r){r=Cn(r,"t",In);if(null==r)break;else if(p>=r)break;u=Math.ceil((r-p)/n)-1}else{if(Infinity==k)break;else if(p/f>=k)break;u=Math.ceil((k*f-p)/n)-1}0<h.length&&p!=m&&(h[h.length-1].end=p/f);r=t(kb(u+1));for(u=r.next();!u.done;u=r.next())m=p+n,h.push({start:p/f,end:m/f,Pf:p}),p=m}f=h}return{timescale:d,ia:c,Gb:g,Ta:e/d||0,Rd:e,timeline:f}}
542
- function Zn(a,b,c){return[b(a.K),b(a.ka),b(a.fa)].filter(Nb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}function $n(a,b,c){return[b(a.K),b(a.ka),b(a.fa)].filter(Nb).map(function(d){return un(d,c)}).reduce(function(d,e){return d||e})}
543
- function ao(a,b,c,d,e,f){for(var g=zn(a,"http://www.w3.org/1999/xlink","href"),h=zn(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 Rg(new M(2,4,4028));if("onLoad"!=h)return Rg(new M(2,4,4027));var m=ze([d],[g]);return e.request(0,fh(m,b)).ba(function(n){n=Mn(n.data,a.tagName);if(!n)return Rg(new M(2,4,4001,g));
544
- for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return bo(a,b,c,m[0],e,f+1)})}
545
- function bo(a,b,c,d,e,f){f=void 0===f?0:f;if(zn(a,"http://www.w3.org/1999/xlink","href")){var g=ao(a,b,c,d,e,f);c&&(g=g.ba(void 0,function(){return bo(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==zn(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(bo(k,b,c,d,e,f)));return Vg(g).ba(function(){return a})};function co(a,b,c,d,e,f,g){var h,k=(new Pb).T("sidx",function(l){h=eo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new M(2,3,3004);}
546
- function eo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.M();if(0==k)throw new M(2,3,3005);if(0==g.version){var l=g.reader.M();var m=g.reader.M()}else l=g.reader.Fb(),m=g.reader.Fb();g.reader.skip(2);var n=g.reader.Eb();a=a+g.size+m;n=t(kb(n));for(m=n.next();!m.done;m=n.next()){var p=g.reader.M();m=(p&2147483648)>>>31;p&=2147483647;var r=g.reader.M();g.reader.skip(4);if(1==m)throw new M(2,3,3006);h.push(new pi(l/k+c,(l+r)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=r;a+=p}g.parser.stop();
547
- return h};function fo(a){this.h=tb(a);this.g=new Cb(this.h,0)}fo.prototype.na=function(){return this.g.na()};
548
- function go(a){var b=ho(a);if(7<b.length)throw new M(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=ho(a);a:{d=t(io);for(var e=d.next();!e.done;e=d.next())if(ob(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Z();else{if(8==b.length&&b[1]&224)throw new M(2,3,3001);d=0;e=t(mb(b));for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=f.item;d=0==f.ha?g&(1<<8-b.length)-1:256*d+g}b=d}b=a.g.Z()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Z();d=tb(a.h,
549
- a.g.Z(),b);a.g.skip(b);return new jo(c,d)}function ho(a){var b=a.g.Z(),c=a.g.$();if(0==c)throw new M(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return qb(a.h,b,c)}var io=[[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 jo(a,b){this.id=a;this.g=b}
550
- function ko(a){if(8<a.g.byteLength)throw new M(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new M(2,3,3001);for(var b=0,c=t(kb(a.g.byteLength)),d=c.next();!d.done;d=c.next())d=a.g.getUint8(d.value),b=256*b+d;return b};function lo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new fo(a.g);for(var n=null,p=null;a.na();){var r=go(a);if(187==r.id){var u=mo(r);u&&(r=c*u.Qf,u=b+u.yf,null!=n&&m.push(new pi(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new pi(n+g,d+g,l,p,null,f,g,h,k));return m}
551
- function mo(a){var b=new fo(a.g);a=go(b);if(179!=a.id)throw new M(2,3,3013);a=ko(a);b=go(b);if(183!=b.id)throw new M(2,3,3012);b=new fo(b.g);for(var c=0;b.na();){var d=go(b);if(241==d.id){c=ko(d);break}}return{Qf:a,yf:c}};function no(a,b){var c=$n(a,b,"Initialization");if(!c)return null;var d=a.K.za,e=c.getAttribute("sourceURL");e&&(d=ze(a.K.za,[e]));e=0;var f=null;if(c=Cn(c,"range",Fn))e=c.start,f=c.end;return new ni(function(){return d},e,f)}
552
- function oo(a,b){var c=Number(Zn(a,po,"presentationTimeOffset"))||0,d=Zn(a,po,"timescale"),e=1;d&&(e=Hn(d)||1);var f=c/e||0,g=no(a,po);qo(a,g);var h=Zg(a);return{vb:function(){var k=$n(h,po,"RepresentationIndex"),l=h.K.za;k&&(k=k.getAttribute("sourceURL"))&&(l=ze(h.K.za,[k]));k=ro(h);return so(h,b,g,l,k.start,k.end,f)}}}
553
- function so(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,x,w,y,C,D,A,E;return F(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.cb||!a.V.de,l=a.V.start,m=a.V.duration,n=a.K.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f),"webm"==n?p(c.ma(),c.ja,c.ea):null],p=null,v(G,Promise.all(u),2);x=G.h;w=x[0];y=x[1]||null;C=null;D=l-g;A=l;E=m?l+m:Infinity;if("mp4"==n)var H=co(w,e,d,c,D,A,E);else{H=new fo(y);if(440786851!=go(H).id)throw new M(2,3,3008);var L=go(H);if(408125543!=L.id)throw new M(2,3,3009);H=L.g.byteOffset;
554
- L=new fo(L.g);for(var I=null;L.na();){var K=go(L);if(357149030==K.id){I=K;break}}if(!I)throw new M(2,3,3010);I=new fo(I.g);K=1E6;for(L=null;I.na();){var Q=go(I);if(2807729==Q.id)K=ko(Q);else if(17545==Q.id)if(4==Q.g.byteLength)L=Q.g.getFloat32(0);else if(8==Q.g.byteLength)L=Q.g.getFloat64(0);else throw new M(2,3,3003);}if(null==L)throw new M(2,3,3011);I=K/1E9;L*=I;K=go(new fo(w));if(475249515!=K.id)throw new M(2,3,3007);H=lo(K,H,I,L,d,c,D,A,E)}C=H;h.Bb(C);r=new U(C);k&&r.Ya(A,E,!0);return G["return"](r)})}
555
- function po(a){return a.ac}function ro(a){var b=$n(a,po,"RepresentationIndex");a=Zn(a,po,"indexRange");a=Fn(a||"");b&&(a=Cn(b,"range",Fn,a));return a}function qo(a,b){to(a,b);if(!ro(a))throw new M(2,4,4002);}function to(a,b){var c=a.K.mimeType.split("/")[1];if(a.K.contentType!=Ee&&"mp4"!=c&&"webm"!=c)throw new M(2,4,4006);if("webm"==c&&!b)throw new M(2,4,4005);};function uo(a,b){var c=no(a,vo),d=wo(a);if(!d.ia&&!d.timeline&&1<d.yb.length)throw new M(2,4,4002);if(!d.ia&&!a.V.duration&&!d.timeline&&1==d.yb.length)throw new M(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new M(2,4,4002);var e=null,f=null;a.fa.id&&a.K.id&&(f=a.fa.id+","+a.K.id,e=b[f]);c=xo(a.V.start,a.V.duration,a.K.za,d,c);d=!e;e?e.zb(c,a.presentationTimeline.Za()):(a.presentationTimeline.Bb(c),e=new U(c),f&&a.cb&&(b[f]=e));a.cb&&a.V.de||e.Ya(a.V.start,a.V.duration?a.V.start+a.V.duration:
556
- Infinity,d);return{vb:function(){return Promise.resolve(e)}}}function vo(a){return a.ab}function wo(a){var b=yo(a);a=Yn(a,vo);var c=a.Gb;0==c&&(c=1);var d=0;a.ia?d=a.ia*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ia:a.ia,startTime:d,Gb:c,Ta:a.Ta,timeline:a.timeline,yb:b}}
557
- function xo(a,b,c,d,e){var f=d.yb.length;d.timeline&&d.timeline.length!=d.yb.length&&(f=Math.min(d.timeline.length,d.yb.length));var g=a-d.Ta,h=b?a+b:Infinity,k=[],l=d.startTime,m={};f=t(kb(f));for(var n=f.next();!n.done;m={Uc:m.Uc},n=f.next()){n=n.value;var p=d.yb[n];m.Uc=ze(c,[p.pf]);var r=void 0;r=null!=d.ia?l+d.ia:d.timeline?d.timeline[n].end:l+b;k.push(new pi(a+l,a+r,function(u){return function(){return u.Uc}}(m),p.start,p.end,e,g,a,h));l=r}return k}
558
- function yo(a){return[a.K.ab,a.ka.ab,a.fa.ab].filter(Nb).map(function(b){return vn(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.be&&(a.be=!0);var c=b.getAttribute("media");b=Cn(b,"mediaRange",Fn,{start:0,end:null});return{pf:c,start:b.start,end:b.end}})};function zo(a,b,c,d,e,f){var g=Ao(a),h=Bo(a);Co(h);var k=Zg(a);if(h.Wb)return to(a,g),{vb:function(){var u=Xn(h.Wb,k.K.id,null,k.bandwidth||null,null);u=ze(k.K.za,[u]);return so(k,b,g,u,0,null,h.Ta)}};if(h.ia)return d||(a.presentationTimeline.vd(h.ia),a.presentationTimeline.wd(a.V.start)),{vb:function(){return Do(k,h,e,g,f)}};var l=null;d=null;a.fa.id&&a.K.id&&(d=a.fa.id+","+a.K.id,l=c[d]);var m=Eo(k,h,g),n=a.V.start,p=a.V.duration?a.V.start+a.V.duration:Infinity,r=Infinity!=p;l?(r&&(new U(m)).Ya(n,
559
- p,!0),l.zb(m,a.presentationTimeline.Za())):(a.presentationTimeline.Bb(m),l=new U(m),d&&a.cb&&(c[d]=l));r&&l.Ya(n,p);return{vb:function(){return Promise.resolve(l)}}}function Fo(a){return a.bc}function Bo(a){var b=Yn(a,Fo),c=Zn(a,Fo,"media");a=Zn(a,Fo,"index");return{ia:b.ia,timescale:b.timescale,Gb:b.Gb,Ta:b.Ta,Rd:b.Rd,timeline:b.timeline,ud:c,Wb:a}}
560
- function Co(a){var b=a.Wb?1:0;b+=a.timeline?1:0;b+=a.ia?1:0;if(0==b)throw new M(2,4,4002);1!=b&&(a.Wb&&(a.timeline=null),a.ia=null);if(!a.Wb&&!a.ud)throw new M(2,4,4002);}
561
- function Do(a,b,c,d,e){function f(I){var K=(I-r)*p,Q=K+b.Ta,R=K+l;K=R+p;var O=Math.min(K,h());R=new pi(R,O,function(){var T=Xn(x,y,I,w,Q*u);return ze(C,[T])},0,null,d,D,l,h());R.j=K;return R}function g(){var I=[Math.max(k.Za(),l),Math.min(k.gb(),h())].map(function(K){return K-l});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(K){return K+r})}function h(){var I=null!=m&&e[m]||n;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.V.start,m=a.fa.id,n=a.V.duration,p=b.ia,r=b.Gb,u=b.timescale,
562
- x=b.ud,w=a.bandwidth||null,y=a.K.id,C=a.K.za,D=l-b.Ta,A=g();a=a.cb?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var E=a;E<=A;++E){var G=f(E);c.push(G)}var H=new U(c);c=k.gb()<h();E=k.Y();if(c||E){var L=Math.max(a,A+1);H.Mc(p,function(){var I=k.Za();H.eb(I);var K=t(g());K.next();K=K.next().value;for(var Q=[];L<=K;){var R=f(L);Q.push(R);L++}return I>h()&&!Q.length?null:Q})}return Promise.resolve(H)}
563
- function Eo(a,b,c){var d=a.V.start,e=a.V.duration,f=d-b.Ta;e=e?d+e:Infinity;for(var g=[],h={},k=t(mb(b.timeline)),l=k.next();!l.done;h={Tc:h.Tc,Wc:h.Wc,Zc:h.Zc,Qc:h.Qc,bd:h.bd,Rc:h.Rc},l=k.next()){l=l.value;var m=l.item,n=m.start,p=m.Pf;m=m.end;h.Zc=l.ha+b.Gb;h.bd=p+b.Rd;h.Wc=a.K.id;h.Qc=a.bandwidth||null;h.Tc=b.ud;h.Rc=a.K.za;g.push(new pi(d+n,d+m,function(r){return function(){var u=Xn(r.Tc,r.Wc,r.Zc,r.Qc||null,r.bd);return ze(r.Rc,[u]).map(function(x){return x.toString()})}}(h),0,null,c,f,d,e))}return g}
564
- function Ao(a){var b=Zn(a,Fo,"initialization");if(!b)return null;var c=a.K.id,d=a.bandwidth||null,e=a.K.za;return new ni(function(){var f=Xn(b,c,null,d,null);return ze(e,[f])},0,null)};function Go(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Go.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=[]};
565
- function Ho(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,x,w,y,C,D,A,E,G,H,L,I,K,Q,R,O,T,Y,da,Ia,Ja,Xa,Db;return F(function(Da){switch(Da.g){case 1:d=Fe;Io(b);Jo(b);Ko(b);Lo(b);if(!c&&1==b.length){e=b[0];a.g=e.sc;a.h=e.Oc;a.j=e.textStreams;a.i=e.imageStreams;Da.v(2);break}f=-1;g=t(mb(b));for(h=g.next();!h.done;h=g.next())l=k=h.value,m=l.ha,n=l.item,a.m.has(n.id)||(a.m.add(n.id),-1==f&&(f=m));if(-1==f)return Da["return"]();p=b.map(function(Ka){return Ka.sc});r=b.map(function(Ka){return Ka.Oc});u=b.map(function(Ka){return Ka.textStreams});
566
- x=b.map(function(Ka){return Ka.imageStreams});w=t(u);for(y=w.next();!y.done;y=w.next())C=y.value,C.push(Mo(d.aa));D=t(x);for(A=D.next();!A.done;A=D.next())E=A.value,E.push(Mo(d.mc));return v(Da,No(a.g,p,f,Oo,Po),3);case 3:return v(Da,No(a.h,r,f,Oo,Po),4);case 4:return v(Da,No(a.j,u,f,Oo,Po),5);case 5:return v(Da,No(a.i,x,f,Oo,Po),2);case 2:G=0;H=[];if(a.h.length&&a.g.length)for(O=t(a.g),T=O.next();!T.done;T=O.next())for(Y=T.value,da=t(a.h),Ia=da.next();!Ia.done;Ia=da.next())Ja=Ia.value,Xa=fi(Y.drmInfos,
567
- Ja.drmInfos),Y.drmInfos.length&&Ja.drmInfos.length&&!Xa.length||(Db=G++,H.push({id:Db,language:Y.language,primary:Y.primary,audio:Y,video:Ja,bandwidth:(Y.bandwidth||0)+(Ja.bandwidth||0),drmInfos:Xa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(L=a.h.concat(a.g),I=t(L),K=I.next();!K.done;K=I.next())Q=K.value,R=G++,H.push({id:R,language:Q.language,primary:Q.primary,audio:Q.type==d.bb?Q:null,video:Q.type==d.Na?Q:null,bandwidth:Q.bandwidth||0,drmInfos:Q.drmInfos,allowedByApplication:!0,
568
- allowedByKeySystem:!0,decodingInfos:[]});a.l=H;z(Da)}})}
569
- function Io(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.sc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&xc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.sc=c}}
570
- function Ko(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&xc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
571
- function Jo(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Oc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&xc(e.roles,h.roles)&&rh(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Oc=c}}
572
- function Lo(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
573
- function Qo(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,x,w,y,C,D,A,E,G,H,L,I,K,Q;return F(function(R){switch(R.g){case 1:b=Fe;if(1==a.length)return R["return"](a[0]);c=a.map(function(O){return O.filter(function(T){return T.type==b.bb})});d=a.map(function(O){return O.filter(function(T){return T.type==b.Na})});e=a.map(function(O){return O.filter(function(T){return T.type==b.aa})});f=a.map(function(O){return O.filter(function(T){return T.type==b.mc})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,k.push(Ro(b.aa));
574
- l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Ro(b.mc));return v(R,No([],c,0,So,To),2);case 2:return p=R.h,v(R,No([],d,0,So,To),3);case 3:return r=R.h,v(R,No([],e,0,So,To),4);case 4:return u=R.h,v(R,No([],f,0,So,To),5);case 5:x=R.h;w=0;if(r.length&&p.length)for(E=t(p),G=E.next();!G.done;G=E.next())for(H=G.value,L=t(r),I=L.next();!I.done;I=L.next())K=I.value,Q=w++,K.variantIds.push(Q),H.variantIds.push(Q);else for(y=r.concat(p),C=t(y),D=C.next();!D.done;D=C.next())A=D.value,A.variantIds=
575
- [w++];return R["return"](r.concat(p).concat(u).concat(x))}})}
576
- function No(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,x,w,y,C,D,A,E,G,H,L,I,K,Q,R,O,T;return F(function(Y){switch(Y.g){case 1:f=Fe;g=[];h=t(mb(b));for(k=h.next();!k.done;k=h.next())m=l=k.value,n=m.ha,p=m.item,n>=c?g.push(new Set(p)):g.push(new Set);r=t(a);u=r.next();case 2:if(u.done){Y.v(4);break}x=u.value;return v(Y,Uo(x,b,c,e,g),5);case 5:w=Y.h;if(!w)throw new M(2,4,4037);u=r.next();Y.v(2);break;case 4:y=t(g),C=y.next();case 6:if(C.done){Y.v(8);break}D=C.value;A=t(D);E=A.next();case 9:if(E.done){C=y.next();
577
- Y.v(6);break}G=E.value;return v(Y,Vo(G,b,d,e,g),12);case 12:(H=Y.h)&&a.push(H);E=A.next();Y.v(9);break;case 8:L=t(g);for(C=L.next();!C.done;C=L.next())for(I=C.value,K={},Q=t(I),E=Q.next();!E.done;K={Va:K.Va},E=Q.next())if(K.Va=E.value,R=K.Va.type==f.aa&&!K.Va.language,O=K.Va.type==f.mc&&!K.Va.tilesLayout,!R&&!O&&(T=a.some(function(da){return function(Ia){return Ia.mimeType==da.Va.mimeType&&Te(Ia.codecs)==Te(da.Va.codecs)}}(K))))throw new M(2,4,4037);return Y["return"](a)}})}
578
- function Uo(a,b,c,d,e){var f;return F(function(g){if(1==g.g)return(f=Wo(b,a))?v(g,Xo(f),2):g["return"](!1);Yo(a,f,c,d,e);return g["return"](!0)})}function Xo(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push(c.createSegmentIndex()),c.trickModeVideo&&!c.trickModeVideo.segmentIndex&&b.push(c.trickModeVideo.createSegmentIndex());return Promise.all(b)}
579
- function Vo(a,b,c,d,e){var f,g;return F(function(h){if(1==h.g)return f=c(a),(g=Wo(b,f))?f.createSegmentIndex?v(h,Xo(g),2):h.v(2):h["return"](null);Yo(f,g,0,d,e);return h["return"](f)})}function Yo(a,b,c,d,e){b=t(mb(b));for(var f=b.next();!f.done;f=b.next()){var g=f.value;f=g.ha;g=g.item;if(f>=c){d(a,g);var h=!0;"audio"==a.type&&0==Pf(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}}
580
- function Oo(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Oi;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}function So(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
581
- function Po(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=fi(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new M(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
582
- (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)}}a.segmentIndex.l.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Oo(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),Po(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Po(a.trickModeVideo,b)}
583
- function To(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
584
- function Wo(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Zo,video:Zo,text:$o,image:ap}[f.type],h={audio:bp,video:cp,text:dp,image:ep}[f.type],k=null;e=t(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return null;c.push(f)}return c}function Zo(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Te(b.codecs)!=Te(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<fi(c,d).length:1)}return c?!1:!0}
585
- function $o(a,b){return a.language?b.language?0==Pf(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function ap(a){return a.tilesLayout?!0:!1}
586
- function bp(a,b,c){if(a.id==c.id)return!0;var d=Pf(a.language,b.language),e=Pf(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;
587
- d=fp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==gp)return!0;if(d==hp)return!1;d=fp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==gp?!0:d==hp?!1:a.bandwidth&&ip(a.bandwidth,b.bandwidth,c.bandwidth)==gp?!0:!1}
588
- function cp(a,b,c){if(a.id==c.id)return!0;var d=fp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==gp)return!0;if(d==hp)return!1;if(a.frameRate){d=fp(a.frameRate,b.frameRate,c.frameRate);if(d==gp)return!0;if(d==hp)return!1}return a.bandwidth&&ip(a.bandwidth,b.bandwidth,c.bandwidth)==gp?!0:!1}
589
- function dp(a,b,c){if(a.id==c.id)return!0;var d=Pf(a.language,b.language),e=Pf(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
590
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function ep(a,b,c){return a.id==c.id?!0:fp(a.width*a.height,b.width*b.height,c.width*c.height)==gp?!0:!1}function Ro(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}}
591
- function Mo(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U([]),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}}
592
- function fp(a,b,c){if(b==a&&a!=c)return hp;if(c==a&&a!=b)return gp;if(b>a){if(c<=a||c-a<b-a)return gp;if(c-a>b-a)return hp}else{if(c>a)return hp;if(a-c<a-b)return gp;if(a-c>a-b)return hp}return jp}function ip(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?gp:b<a?hp:jp}var gp=1,jp=0,hp=-1;function kp(){var a=this;this.D=this.o=null;this.h=[];this.A=null;this.C=1;this.l={};this.H={};this.g=new Go;this.u=0;this.F=new Pa(5);this.s=new N(function(){a.Yb()});this.i=new $g;this.j=Infinity;this.m=!1}q=kp.prototype;q.configure=function(a){this.o=a};q.start=function(a,b){var c=this,d;return F(function(e){if(1==e.g)return c.m=b.isLowLatencyMode(),c.h=[a],c.D=b,v(e,lp(c),2);d=e.h;c.D&&mp(c,d);if(!c.D)throw new M(2,7,7001);return e["return"](c.A)})};
593
- q.stop=function(){for(var a=t(Object.values(this.l)),b=a.next();!b.done;b=a.next())b.value.release();this.g&&this.g.release();this.o=this.D=null;this.h=[];this.A=null;this.l={};this.g=null;null!=this.s&&(this.s.stop(),this.s=null);return this.i.destroy()};q.update=function(){var a=this,b;return F(function(c){if(1==c.g)return B(c,2),v(c,lp(a),4);if(2!=c.g)return ua(c,0);b=va(c);if(!a.D||!b)return c["return"]();a.D.onError(b);z(c)})};q.onExpirationUpdated=function(){};
594
- function lp(a){var b,c,d,e,f,g,h;return F(function(k){if(1==k.g)return b=fh(a.h,a.o.retryParameters),c=a.D.networkingEngine,d=Date.now(),e=c.request(0,b),ah(a.i,e),v(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.D)return k["return"](0);f.uri&&!a.h.includes(f.uri)&&a.h.unshift(f.uri);return v(k,np(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;Qa(a.F,1,h);return k["return"](h)})}
595
- function np(a,b,c){var d,e,f,g,h;return F(function(k){if(1==k.g){d=Mn(b,"MPD");if(!d)throw new M(2,4,4001,c);if(e=a.o.dash.disableXlinkProcessing)return k["return"](op(a,d,c));f=a.o.dash.xlinkFailGracefully;g=bo(d,a.o.retryParameters,f,c,a.D.networkingEngine);ah(a.i,g);return v(k,g.promise,2)}h=k.h;return k["return"](op(a,h,c))})}
596
- function op(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,x,w,y,C,D,A,E,G,H,L,I,K,Q,R,O,T,Y,da,Ia;return F(function(Ja){switch(Ja.g){case 1:d=[c];e=vn(b,"Location").map(An).filter(Nb);0<e.length&&(f=ze(d,e),d=a.h=f);g=vn(b,"BaseURL");h=g.map(An);k=ze(d,h);l=0;g&&g.length&&(l=Cn(g[0],"availabilityTimeOffset",Jn)||0);m=a.o.dash.ignoreMinBufferTime;n=0;m||(n=Cn(b,"minBufferTime",En)||0);a.u=Cn(b,"minimumUpdatePeriod",En,-1);p=Cn(b,"availabilityStartTime",Dn);r=Cn(b,"timeShiftBufferDepth",En);u=a.o.dash.ignoreSuggestedPresentationDelay;
597
- x=null;u||(x=Cn(b,"suggestedPresentationDelay",En));w=a.o.dash.ignoreMaxSegmentDuration;y=null;w||(y=Cn(b,"maxSegmentDuration",En));C=b.getAttribute("type")||"static";if(a.A)for(D=a.A.presentationTimeline,A=t(Object.values(a.l)),E=A.next();!E.done;E=A.next())G=E.value,G.eb(D.Za());else H=a.o.defaultPresentationDelay||1.5*n,L=null!=x?x:H,D=new S(p,L,a.o.dash.autoCorrectDrift);I=b.getAttribute("profiles")||"";K={cb:"static"!=C,presentationTimeline:D,fa:null,V:null,ka:null,K:null,bandwidth:0,be:!1,tb:l,
598
- profiles:I.split(",")};var Xa=Cn(b,"mediaPresentationDuration",En),Db=[],Da=0,Ka=vn(b,"Period");Ka=t(mb(Ka));for(var bb=Ka.next();!bb.done;bb=Ka.next()){var Rb=bb.value;bb=Rb.item;Rb=Rb.next;Da=Cn(bb,"start",En,Da);var qf=Cn(bb,"duration",En),cb=null;if(Rb){var ce=Cn(Rb,"start",En);null!=ce&&(cb=ce-Da)}else null!=Xa&&(cb=Xa-Da);null==cb&&(cb=qf);bb=pp(a,K,k,{start:Da,duration:cb,node:bb,de:null==cb||!Rb});Db.push(bb);K.fa.id&&cb&&(a.H[K.fa.id]=cb);if(null==cb){Da=null;break}Da+=cb}Q=null!=Xa?{periods:Db,
599
- duration:Xa,Xd:!1}:{periods:Db,duration:Da,Xd:!0};R=Q.duration;O=Q.periods;D.cc("static"==C);"static"!=C&&Q.Xd||D.Ja(R||Infinity);a.j&&!a.m&&(T=a.D.isAutoLowLatencyMode())&&(a.D.enableLowLatencyMode(),a.m=a.D.isLowLatencyMode());a.m?D.qe(a.j):a.j&&Va("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");(Y=D.Y())&&!isNaN(a.o.availabilityWindowOverride)&&
600
- (r=a.o.availabilityWindowOverride);null==r&&(r=Infinity);D.Nd(r);D.vd(y||1);return v(Ja,Ho(a.g,O,K.cb),2);case 2:if(a.A){a.A.variants=a.g.l;a.A.textStreams=a.g.j;a.A.imageStreams=a.g.i;a.D.filter(a.A);Ja.v(3);break}a.A={presentationTimeline:D,variants:a.g.l,textStreams:a.g.j,imageStreams:a.g.i,offlineSessionIds:[],minBufferTime:n||0};if(!D.ve()){Ja.v(3);break}da=vn(b,"UTCTiming");return v(Ja,qp(a,k,da),5);case 5:Ia=Ja.h;if(!a.D)return Ja["return"]();D.re(Ia);case 3:a.D.makeTextStreamsForClosedCaptions(a.A),
601
- z(Ja)}})}
602
- function pp(a,b,c,d){b.fa=rp(d.node,null,c);b.V=d;b.fa.tb=b.tb;b.fa.id||(b.fa.id="__shaka_period_"+d.start);c=vn(d.node,"EventStream");c=t(c);for(var e=c.next();!e.done;e=c.next())sp(a,d.start,d.duration,e.value);c=vn(d.node,"AdaptationSet").map(function(m){return tp(a,b,m)}).filter(Nb);if(b.cb){d=[];e=t(c);for(var f=e.next();!f.done;f=e.next()){f=t(f.value.Bf);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new M(2,4,4018);}d=c.filter(function(m){return!m.Pd});c=
603
- c.filter(function(m){return m.Pd});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Pd.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 Te(m.lc.codecs)==Te(n.codecs)}}(h))}}}e=a.o.disableAudio?[]:up(d,"audio");g=a.o.disableVideo?[]:up(d,"video");f=a.o.disableText?[]:up(d,Ee);c=a.o.disableThumbnails?
604
- []:up(d,"image");if(!g.length&&!e.length)throw new M(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.fa.id,sc:d,Oc:e,textStreams:g,imageStreams:f}}
605
- function up(a,b){return a.filter(function(c){return c.contentType==b})}
606
- function tp(a,b,c){b.ka=rp(c,b.fa,null);var d=!1,e=vn(c,"Role"),f=e.map(function(A){return A.getAttribute("value")}).filter(Nb),g=void 0,h=b.ka.contentType==Ee;h&&(g="subtitle");e=t(e);for(var k=e.next();!k.done;k=e.next()){k=k.value;var l=k.getAttribute("schemeIdUri");if(null==l||"urn:mpeg:dash:role:2011"==l)switch(k=k.getAttribute("value"),k){case "main":d=!0;break;case "caption":case "subtitle":g=k}}l=vn(c,"EssentialProperty");e=null;k=!1;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,
607
- "http://dashif.org/guidelines/trickmode"==m.getAttribute("schemeIdUri")?e=m.getAttribute("value"):k=!0;l=vn(c,"Accessibility");var n=new Map;l=t(l);for(m=l.next();!m.done;m=l.next()){var p=m.value;m=p.getAttribute("schemeIdUri");p=p.getAttribute("value");if("urn:scte:dash:cc:cea-608:2015"==m)if(m=1,null!=p){p=p.split(";");for(var r=t(p),u=r.next();!u.done;u=r.next()){var x=u.value,w=u=void 0;x.includes("=")?(x=x.split("="),u=x[0].startsWith("CC")?x[0]:"CC"+x[0],w=x[1]||"und"):(u="CC"+m,2==p.length?
608
- m+=2:m++,w=x);n.set(u,Lf(w))}}else n.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==m)if(m=1,null!=p)for(p=t(p.split(";")),u=p.next();!u.done;u=p.next())u=u.value,x=r=void 0,u.includes("=")?(u=u.split("="),r="svc"+u[0],x=u[1].split(",")[0].split(":").pop()):(r="svc"+m,m++,x=u),n.set(r,Lf(x));else n.set("svc1","und");else"urn:mpeg:dash:role:2011"==m&&null!=p&&(f.push(p),"captions"==p&&(g="caption"))}if(k)return null;k=vn(c,"ContentProtection");var y=Nn(k,a.o.dash.ignoreDrmInfo,a.o.dash.keySystemsByURI),
609
- C=Lf(c.getAttribute("lang")||"und"),D=c.getAttribute("label");(k=vn(c,"Label"))&&k.length&&(k=k[0],k.textContent&&(D=k.textContent));k=vn(c,"Representation");c=k.map(function(A){return vp(a,b,y,g,C,D,d,f,n,A)}).filter(function(A){return!!A});if(0==c.length){e="image"==b.ka.contentType;if(a.o.dash.ignoreEmptyAdaptationSet||h||e)return null;throw new M(2,4,4003);}if(!b.ka.contentType||"application"==b.ka.contentType)for(b.ka.contentType=wp(c[0].mimeType,c[0].codecs),h=t(c),l=h.next();!l.done;l=h.next())l.value.type=
610
- b.ka.contentType;h=t(c);for(l=h.next();!l.done;l=h.next())for(l=l.value,m=t(y.drmInfos),p=m.next();!p.done;p=m.next())p=p.value,p.keyIds=p.keyIds&&l.keyIds?new Set([].concat(ia(p.keyIds),ia(l.keyIds))):p.keyIds||l.keyIds;h=k.map(function(A){return A.getAttribute("id")}).filter(Nb);return{id:b.ka.id||"__fake__"+a.C++,contentType:b.ka.contentType,language:C,qg:d,streams:c,drmInfos:y.drmInfos,Pd:e,Bf:h}}
611
- function vp(a,b,c,d,e,f,g,h,k,l){b.K=rp(l,b.ka,null);a.j=Math.min(a.j,b.K.tb);if(!xp(b.K))return null;var m=b.V.start;b.bandwidth=Cn(l,"bandwidth",Hn)||0;var n=b.K.contentType,p=n==Ee||"application"==n;n="image"==n;try{var r=function(G,H,L){return yp(a,G,H,L)};if(b.K.ac)var u=oo(b,r);else if(b.K.ab)u=uo(b,a.l);else if(b.K.bc)u=zo(b,r,a.l,!!a.A,a.o.dash.initialSegmentLimit,a.H);else{var x=b.K.za,w=b.V.duration||0;u={vb:function(){return Promise.resolve(Ni(m,w,x))}}}}catch(G){if((p||n)&&4002==G.code)return null;
612
- throw G;}r=vn(l,"ContentProtection");r=Qn(r,c,a.o.dash.ignoreDrmInfo,a.o.dash.keySystemsByURI);r=new Set(r?[r]:[]);var y=!1;vn(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(b.K.mimeType="audio/eac3-joc",y=!0);var C=!1;p&&(C=h.includes("forced_subtitle"));var D;if(n&&((l=vn(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
613
- (D=l.getAttribute("value")),!D))return null;var A;l=b.K.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(A="PQ");var E={id:a.C++,originalId:b.K.id,createSegmentIndex:function(){var G;return F(function(H){if(1==H.g){if(E.segmentIndex)return H.v(0);G=E;return v(H,u.vb(),3)}G.segmentIndex=H.h;z(H)})},segmentIndex:null,mimeType:b.K.mimeType,codecs:b.K.codecs,frameRate:b.K.frameRate,pixelAspectRatio:b.K.pixelAspectRatio,
614
- bandwidth:b.bandwidth,width:b.K.width,height:b.K.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:r,language:e,label:f,type:b.ka.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.K.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.K.xd,audioSamplingRate:b.K.audioSamplingRate,spatialAudio:y,closedCaptions:k,hdr:A,tilesLayout:D};return E}
615
- q.Yb=function(){var a=this,b,c;return F(function(d){switch(d.g){case 1:return b=0,B(d,2),v(d,lp(a),4);case 4:b=d.h;ua(d,3);break;case 2:c=va(d),a.D&&(c.severity=1,a.D.onError(c));case 3:if(!a.D)return d["return"]();mp(a,b);z(d)}})};function mp(a,b){0>a.u||a.s.U(Math.max(3,a.u-b,Ra(a.F)))}
616
- function rp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,xd:null,audioSamplingRate:null,tb:0};c=c||b.za;var d=vn(a,"BaseURL"),e=d.map(An),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Cn(a,"frameRate",Kn)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=vn(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
617
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=vn(a,"AudioChannelConfiguration");m=zp(m)||b.xd;p=Cn(a,"audioSamplingRate",In)||b.audioSamplingRate;f||(f=wp(g,h));var r=un(a,"SegmentBase"),u=un(a,"SegmentTemplate"),x=r?Cn(r,"availabilityTimeOffset",Jn)||0:0,w=u?Cn(u,"availabilityTimeOffset",Jn)||0:0;d=d&&d.length?Cn(d[0],"availabilityTimeOffset",Jn)||0:0;d=b.tb+d+x+w;return{za:ze(c,e),ac:r||b.ac,ab:un(a,"SegmentList")||b.ab,bc:u||b.bc,width:Cn(a,"width",In)||b.width,height:Cn(a,
618
- "height",In)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),xd:m,audioSamplingRate:p,tb:d}}
619
- function zp(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=
620
- 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 xp(a){var b=a.ac?1:0;b+=a.ab?1:0;b+=a.bc?1:0;if(0==b)return a.contentType==Ee||"application"==a.contentType?!0:!1;1!=b&&(a.ac&&(a.ab=null),a.bc=null);return!0}
621
- function Ap(a,b,c,d){var e,f,g,h,k,l;return F(function(m){if(1==m.g)return e=ze(b,[c]),f=fh(e,a.o.retryParameters),f.method=d,g=a.D.networkingEngine.request(4,f),ah(a.i,g),v(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=wb(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
622
- function qp(a,b,c){var d,e,f,g,h,k,l,m;return F(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.o.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.v(4);break}h=g.value;B(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.v(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.v(8);
623
- case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n["return"](isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}n.v(9);break;case 7:return v(n,Ap(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return v(n,Ap(a,b,l,"GET"),11);case 11:return n["return"](n.h);
624
- case 9:ua(n,3);break;case 5:va(n);case 3:g=f.next();n.v(2);break;case 4:return Va("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
625
- function sp(a,b,c,d){var e=d.getAttribute("schemeIdUri")||"",f=d.getAttribute("value")||"",g=Cn(d,"timescale",In)||1;d=t(vn(d,"Event"));for(var h=d.next();!h.done;h=d.next()){h=h.value;var k=Cn(h,"presentationTime",In)||0,l=Cn(h,"duration",In)||0;k=k/g+b;l=k+l/g;null!=c&&(k=Math.min(k,b+c),l=Math.min(l,b+c));h={schemeIdUri:e,value:f,startTime:k,endTime:l,id:h.getAttribute("id")||"",eventElement:h};a.D.onTimelineRegionAdded(h)}}
626
- function yp(a,b,c,d){var e,f,g,h,k;return F(function(l){if(1==l.g)return e=lh,f=$i(b,c,d,a.o.retryParameters),g=a.D.networkingEngine,h=g.request(e,f),ah(a.i,h),v(l,h.promise,2);k=l.h;return l["return"](k.data)})}function wp(a,b){return We(Pe(a,b))?Ee:a.split("/")[0]}J("shaka.dash.DashParser",kp);li.mpd=function(){return new kp};ji["application/dash+xml"]=function(){return new kp};ji["video/vnd.mpeg.dash.mpd"]=function(){return new kp};function Bp(a,b,c,d){this.g=a;this.type=b;this.W=c;this.segments=d||null}function Cp(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Cp.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};
627
- Cp.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Dp(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Ep(a,b){var c=a.getAttribute(b);if(!c)throw new M(2,4,4023,b);return c.value}function Fp(a,b,c){c=void 0===c?[]:c;this.W=b;this.g=a;this.h=c}function Gp(a,b){this.name=a;this.value=b};function Hp(a,b){return a.filter(function(c){return c.name==b})}function Ip(a,b){return a.filter(function(c){return Ep(c,"TYPE")==b})}function Jp(a,b){var c=Hp(a,b);return c.length?c[0]:null}function Kp(a,b,c){c=void 0===c?0:c;return(a=Jp(a,b))?Number(a.value):c};function Lp(a){this.h=a;this.g=0}function Mp(a){Np(a,/[ \t]+/gm)}function Np(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function Op(a){return a.g==a.h.length?null:(a=Np(a,/[^ \t\n]*/gm))?a[0]:null};function Pp(){this.g=0}
628
- function Qp(a,b,c){b=wb(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 M(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=Rp(a.g++,g),--a.g,Sp.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;g=t(mb(d));for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=k.ha;var l=k.item;k=k.next;if(/^#(?!EXT)/m.test(l)||e)e=!1;else{l=Rp(a.g++,
629
- l);if(Tp.includes(l.name)){if(1!=b)throw new M(2,4,4017);k=d.splice(h,d.length-h);d=c;e=[];g=[];h=[];l=null;k=t(k);for(var m=k.next();!m.done;m=k.next())m=m.value,/^(#EXT)/.test(m)?(m=Rp(a.g++,m),Sp.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?l=m:"EXT-X-PART"==m.name?h.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Dp(m,"TYPE")?h.push(m):"MAP"==Dp(m,"TYPE")&&(m.name="EXT-X-MAP",l=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=ze([d],[m.trim()])[0],l&&g.push(l),e.push(new Fp(m,g,h)),g=[],h=[]);h.length&&
630
- (l&&g.push(l),e.push(new Fp("",g,h)));return new Bp(c,b,f,e)}f.push(l);"EXT-X-STREAM-INF"==l.name&&(l.g.push(new Gp("URI",k)),e=!0)}}return new Bp(c,b,f)}function Rp(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new M(2,4,4016,b);var d=c[1],e=c[2];c=[];var f;if(e){e=new Lp(e);var g;(g=Np(e,/^([^,=]+)(?:,|$)/g))&&(f=g[1]);for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=Np(e,h);)c.push(new Gp(g[1],g[2]||g[3]))}return new Cp(a,d,c,f)}
631
- var Sp="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Tp="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Up(){}function Vp(a){try{var b=Wp(a);return Tg({uri:a,ie:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Rg(c)}}function Wp(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new M(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new M(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=nc(a):e=Ab(a);return{data:e,contentType:c}}
632
- J("shaka.net.DataUriPlugin",Up);Up.parse=Vp;ch("data",Vp);function Xp(){var a=this;this.o=this.D=null;this.Ma=1;this.u=new Map;this.m=new Map;this.Fa=new Set;this.h=new Map;this.g=null;this.L="";this.X=new Pp;this.qa=0;this.s=new N(function(){a.Yb()});this.j=Yp;this.A=null;this.oa=0;this.F=Infinity;this.S=this.Xa=0;this.C=new $g;this.pa=[];this.I=new Map;this.Wa=!1;this.l=new Map;this.N=null;this.da=new Map;this.H=new Map;this.i=!1}q=Xp.prototype;q.configure=function(a){this.o=a};
633
- q.start=function(a,b){var c=this,d,e;return F(function(f){if(1==f.g)return c.D=b,c.i=b.isLowLatencyMode(),v(f,Zp(c,fh([a],c.o.retryParameters),0),2);if(3!=f.g)return d=f.h,c.L=d.uri,v(f,$p(c,d.data),3);e=c.qa;0<e&&c.s.U(e);return f["return"](c.A)})};q.stop=function(){this.s&&(this.s.stop(),this.s=null);var a=[];this.C&&(a.push(this.C.destroy()),this.C=null);this.o=this.D=null;this.Fa.clear();this.A=null;this.h.clear();this.m.clear();this.l.clear();this.u.clear();return Promise.all(a)};
634
- q.update=function(){var a=this,b,c,d;return F(function(e){if(1==e.g){if(a.j==Yp)return e["return"]();b=[];a.N=null;c=Array.from(a.h.values());return c.length?v(e,aq(a,c[0]),2):e.v(2)}for(d=1;d<c.length;d++)b.push(aq(a,c[d]));return v(e,Promise.all(b),0)})};
635
- function aq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u;return F(function(x){if(1==x.g)return c=bq,d=b.Ae,e=new me(d),a.i&&b.Ee&&pe(e,new re("_HLS_skip=YES")),v(x,Zp(a,fh([e.toString()],a.o.retryParameters),0),2);if(3!=x.g){f=x.h;g=Qp(a.X,f.data,f.uri);if(1!=g.type)throw new M(2,4,4017);h=Hp(g.W,"EXT-X-DEFINE");k=cq(a,h);l=b.stream;return v(x,dq(a,b.Nc,g,l.mimeType,b.td,k,b.Le),3)}m=x.h;l.segmentIndex.zb(m,a.g.Za());m.length&&(n=Kp(g.W,"EXT-X-MEDIA-SEQUENCE",0),p=b.td.get(n),l.segmentIndex.eb(p));r=m[m.length-
636
- 1];if(u=Jp(g.W,"EXT-X-ENDLIST"))eq(a,c.ze),a.g.Ja(r.endTime);z(x)})}q.onExpirationUpdated=function(){};
637
- function $p(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,x,w,y,C,D,A,E,G,H,L,I,K;return F(function(Q){switch(Q.g){case 1:c=Qp(a.X,b,a.L);if(0!=c.type)throw new M(2,4,4022);d=Hp(c.W,"EXT-X-DEFINE");for(var R=t(d),O=R.next();!O.done;O=R.next()){var T=O.value;O=Dp(T,"NAME");T=Dp(T,"VALUE");O&&T&&(a.u.has(O)||a.u.set(O,T))}e=Hp(c.W,"EXT-X-MEDIA");f=Hp(c.W,"EXT-X-STREAM-INF");R=t(f);for(O=R.next();!O.done;O=R.next()){var Y=O.value;T=Dp(Y,"AUDIO");O=Dp(Y,"VIDEO");var da=Dp(Y,"SUBTITLES");Y=fq(a,Y);if(da){var Ia=
638
- Ce(Ee,Y);a.l.set(da,Ia);wc(Y,Ia)}T&&(da=Be("audio",Y),a.l.set(T,da));O&&(T=Be("video",Y),a.l.set(O,T))}g=Hp(c.W,"EXT-X-SESSION-DATA");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Dp(l,"DATA-ID"),n=Dp(l,"URI"),p=Dp(l,"LANGUAGE"),r=Dp(l,"VALUE"),u={id:m},n&&(u.uri=ze([a.L],[n])[0]),p&&(u.language=p),r&&(u.value=r),x=new P("sessiondata",u),a.D)a.D.onEvent(x);return v(Q,gq(a,e),2);case 2:R=Ip(e,"CLOSED-CAPTIONS");R=t(R);for(O=R.next();!O.done;O=R.next())da=O.value,O=hq(da),T=Ep(da,"GROUP-ID"),
639
- da=Ep(da,"INSTREAM-ID"),a.I.get(T)||a.I.set(T,new Map),a.I.get(T).set(da,O);return v(Q,iq(a,f),3);case 3:return w=Q.h,v(Q,jq(a,e),4);case 4:y=Q.h;if(!a.D)throw new M(2,7,7001);if(a.Wa&&0==w.length)throw new M(2,4,4034);D=C=Infinity;A=t(a.h.values());for(E=A.next();!E.done;E=A.next())G=E.value,C=Math.min(C,G.ge),"text"!=G.stream.type&&(D=Math.min(D,G.nf-G.ge));a.j!=Yp?(a.g=new S(0,a.o.defaultPresentationDelay?a.o.defaultPresentationDelay:a.S?a.S:3*a.oa),a.g.cc(!1)):(a.g=new S(null,0),a.g.cc(!0));kq(a);
640
- if(a.j!=Yp)a.qa=a.F,H=bq,a.j==H.ye&&(L=a.g.Jc,isNaN(a.o.availabilityWindowOverride)||(L=a.o.availabilityWindowOverride),a.g.Nd(L));else for(a.g.Ja(D),a.g.offset(-C),I=t(a.h.values()),E=I.next();!E.done;E=I.next())K=E.value,K.stream.segmentIndex.offset(-C),K.stream.segmentIndex.Ya(0,D);a.A={presentationTimeline:a.g,variants:w,textStreams:y,imageStreams:[],offlineSessionIds:[],minBufferTime:0};a.D.makeTextStreamsForClosedCaptions(a.A);z(Q)}})}
641
- function cq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Dp(f,"NAME");var g=Dp(f,"VALUE");f=Dp(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.u.get(f))&&c.set(f,e)}return c}
642
- function jq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r;return F(function(u){if(1==u.g)return c=Ip(b,"SUBTITLES"),d=c.map(function(x){var w,y,C;return F(function(D){if(1==D.g){if(w=a.o.disableText)return D["return"](null);B(D,2);return v(D,lq(a,x),4)}if(2!=D.g)return y=D.h,D["return"](y.stream);C=va(D);if(a.o.hls.ignoreTextStreamFailures)return D["return"](null);throw C;})}),v(u,Promise.all(d),2);e=u.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Ep(h,"GROUP-ID"),l=a.l.get(k))if(m=a.m.get(k))for(n=
643
- t(m),p=n.next();!p.done;p=n.next())r=p.value,r.stream.codecs=l;return u["return"](e.filter(function(x){return x}))})}function gq(a,b){var c;return F(function(d){if(1==d.g)return b=b.filter(function(e){var f=Dp(e,"URI")||"";return"SUBTITLES"!=Dp(e,"TYPE")&&""!=f}),b.length?v(d,lq(a,b[0]),2):d.v(2);c=b.slice(1).map(function(e){return lq(a,e)});return v(d,Promise.all(c),0)})}
644
- function iq(a,b){var c,d,e;return F(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,r,u;return F(function(x){if(1==x.g)return h=Dp(g,"FRAME-RATE"),k=Number(Dp(g,"AVERAGE-BANDWIDTH"))||Number(Ep(g,"BANDWIDTH")),l=Dp(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,r=Dp(g,"VIDEO-RANGE"),v(x,mq(a,g),2);if(u=x.h){for(var w=x["return"],y=u.audio,C=u.video,D=t(C),A=D.next();!A.done;A=D.next())if(A=A.value.stream)A.width=Number(n)||void 0,A.height=Number(p)||
645
- void 0,A.frameRate=Number(h)||void 0,A.hdr=r||void 0;D=a.o.disableAudio;if(!y.length||D)y=[null];D=a.o.disableVideo;if(!C.length||D)C=[null];D=[];y=t(y);for(A=y.next();!A.done;A=y.next()){A=A.value;for(var E=t(C),G=E.next();!G.done;G=E.next()){var H=G.value;G=A?A.stream:null;var L=H?H.stream:null,I=A?A.stream.drmInfos:null,K=H?H.stream.drmInfos:null;H=(H?H.Nc:"")+" - "+(A?A.Nc:"");G&&L&&I.length&&K.length&&!(0<fi(I,K).length)||a.Fa.has(H)||(G={id:a.Ma++,language:G?G.language:"und",primary:!!G&&G.primary||
646
- !!L&&L.primary,audio:G,video:L,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},D.push(G),a.Fa.add(H))}}x=w.call(x,D)}else x=x["return"]([]);return x})}),v(f,Promise.all(c),2);d=f.h;e=d.reduce(Lb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
647
- function mq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,x;return F(function(w){if(1==w.g)return c=Fe,d=fq(a,b),e=Dp(b,"AUDIO"),f=Dp(b,"VIDEO"),h=(g=e||f)&&a.m.has(g)?a.m.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=Ep(b,"URI"),p=k.audio.find(function(y){return y&&y.Nc==n}),r=Ce(c.Na,d),(u=Ce(c.bb,d))&&!r?l=c.bb:!h.length&&u&&r?(l=c.Na,d=[[r,u].join()]):k.audio.length&&p?(l=c.bb,m=!0):l=k.video.length?c.bb:c.Na,m?w.v(2):v(w,nq(a,b,d,l),3);2!=w.g&&(x=w.h);if(x)k[x.stream.type]=[x];else if(null===x)return w["return"](null);
648
- oq(k);return w["return"](k)})}function fq(a,b){var c=[];a.o.disableVideo||c.push("avc1.42E01E");a.o.disableAudio||c.push("mp4a.40.2");var d=Dp(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Te(f);c.has(g)||(e.push(f),c.add(g))}return e}function hq(a){a=Dp(a,"LANGUAGE")||"und";return Lf(a)}
649
- function oq(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}
650
- function lq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,x;return F(function(w){if(1==w.g){c=Ep(b,"GROUP-ID");d="";var y=Ep(b,"TYPE").toLowerCase();"subtitles"==y&&(y=Ee);e=y;e!=Ee&&c&&a.l.has(c)&&(d=a.l.get(c));f=pq(Ep(b,"URI"),a.u);if(a.h.has(f))return w["return"](a.h.get(f));g=hq(b);h=Dp(b,"NAME");k=b.getAttribute("DEFAULT");l="YES"==k;"audio"==e?y=(y=Dp(b,"CHANNELS"))?parseInt(y.split("/")[0],10):null:y=null;m=y;"audio"==e?y=(y=Dp(b,"CHANNELS"))?y.includes("/JOC"):!1:y=!1;n=y;p=Dp(b,"CHARACTERISTICS");
651
- r=Dp(b,"FORCED");u="YES"==r;return v(w,qq(a,f,d,e,g,l,h,m,null,p,u,n),2)}x=w.h;a.m.has(c)?a.m.get(c).push(x):a.m.set(c,[x]);if(null==x)return w["return"](null);if(a.h.has(f))return w["return"](a.h.get(f));a.h.set(f,x);return w["return"](x)})}
652
- function nq(a,b,c,d){var e,f,g,h;return F(function(k){if(1==k.g){e=pq(Ep(b,"URI"),a.u);if(a.h.has(e))return k["return"](a.h.get(e));var l=Dp(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.I.get(l):null;g=Be(d,c);return v(k,qq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.h.has(e))return k["return"](a.h.get(e));a.h.set(e,h);return k["return"](h)})}
653
- function qq(a,b,c,d,e,f,g,h,k,l,m,n){var p,r,u,x,w,y,C,D,A,E,G,H,L,I,K,Q,R,O,T,Y,da,Ia,Ja,Xa,Db,Da,Ka,bb,Rb,qf,cb,ce,Mh,Nh,tf,Xm,Ym,Zm,$m;return F(function(db){switch(db.g){case 1:return p=ze([a.L],[b])[0],v(db,Zp(a,fh([p],a.o.retryParameters),0),2);case 2:r=db.h;p=r.uri;u=Qp(a.X,r.data,p);if(1!=u.type)throw new M(2,4,4017);x=[];if(u.segments)for(w=t(u.segments),y=w.next();!y.done;y=w.next())C=y.value,D=Hp(C.W,"EXT-X-KEY"),x.push.apply(x,ia(D));A=!1;E=[];G=new Set;H=t(x);for(L=H.next();!L.done;L=
654
- H.next())if(I=L.value,K=Ep(I,"METHOD"),"NONE"!=K){A=!0;if("AES-128"==K)return a.Wa=!0,db["return"](null);Q=Ep(I,"KEYFORMAT");if(O=(R=rq[Q])?R(I):null){if(O.keyIds)for(T=t(O.keyIds),Y=T.next();!Y.done;Y=T.next())da=Y.value,G.add(da);E.push(O)}}if(A&&!E.length)throw new M(2,4,4026);Ia=Hp(u.W,"EXT-X-DEFINE");Ja=cq(a,Ia);sq(a,u);return v(db,tq(a,d,c,u,Ja),3);case 3:return Xa=db.h,uq.includes(Xa)&&(c=""),Db=new Map,Da=new Map,B(db,4),v(db,dq(a,b,u,Xa,Db,Ja,Da),6);case 6:Ka=db.h;ua(db,5);break;case 4:bb=
655
- va(db);if(4035==bb.code)return Va("Skipping unsupported HLS stream",Xa,b),db["return"](null);throw bb;case 5:Rb=Ka[0].startTime;qf=Ka[Ka.length-1].endTime;cb=new U(Ka);ce=d==Ee?"subtitle":void 0;Mh=[];if(l)for(Nh=t(l.split(",")),tf=Nh.next();!tf.done;tf=Nh.next())Xm=tf.value,Mh.push(Xm);Zm=(Ym=Jp(u.W,"EXT-X-SERVER-CONTROL"))?null!=Ym.getAttribute("CAN-SKIP-UNTIL"):!1;$m={id:a.Ma++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:cb,mimeType:Xa,codecs:c,kind:ce,encrypted:A,
656
- drmInfos:E,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Mh,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return db["return"]({stream:$m,Nc:b,Ae:p,ge:Rb,nf:qf,td:Db,Le:Da,Ee:Zm})}})}
657
- function sq(a,b){var c=Jp(b.W,"EXT-X-PLAYLIST-TYPE"),d=Jp(b.W,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)eq(a,Yp);else{c?eq(a,vq):eq(a,wq);d=Jp(b.W,"EXT-X-TARGETDURATION");if(!d)throw new M(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Jp(b.W,"EXT-X-PART-INF");a.i&&c?(a.Xa=Number(Ep(c,"PART-TARGET")),a.F=Math.min(a.Xa,a.F),c=Jp(b.W,"EXT-X-SERVER-CONTROL"),a.S=c?Number(Ep(c,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.oa=Math.max(d,a.oa)}}
658
- function xq(a,b,c,d){c=Jp(c,"EXT-X-MAP");if(!c)return null;var e=Ep(c,"URI");d=pq(ze([b],[e])[0],d);b=[d,Dp(c,"BYTERANGE","")].join("-");a.da.has(b)||(c=yq(d,c),a.da.set(b,c));return a.da.get(b)}function yq(a,b){var c=0,d=null,e=Dp(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new ni(function(){return[a]},c,d)}
659
- function zq(a,b,c,d,e,f,g,h){var k=d.W,l=pq(d.g,g),m=Jp(k,"EXTINF"),n=g=0,p=null,r=[];if(a.i&&d.h.length){a={};d=t(mb(d.h));for(var u=d.next();!u.done;a={Vc:a.Vc},u=d.next()){u=u.value;var x=u.ha;u=u.item;var w=0==x?c:r[r.length-1];x=0==x?e:w.endTime;var y=Number(Dp(u,"DURATION"));y=x+y;var C=0,D=null;"EXT-X-PRELOAD-HINT"==u.name?C=(w=Dp(u,"BYTERANGE-START"))?Number(w):0:(C=Dp(u,"BYTERANGE"),w=t(Aq(w,C)),C=w.next().value,D=w.next().value);u=Dp(u,"URI");a.Vc=ze([h],[u])[0];r.push(new pi(x,y,function(A){return function(){return[A.Vc]}}(a),
660
- C,D,b,f,0,Infinity))}}else if(!m)throw new M(2,4,4024,"EXTINF");m?g=e+Number(m.value.split(",")[0]):g=r[r.length-1].endTime;(h=Jp(k,"EXT-X-BYTERANGE"))?(c=t(Aq(c,h.value)),n=c.next().value,p=c.next().value):r.length&&(n=r[0].ja,p=r[r.length-1].ea);return new pi(e,g,function(){return l.length?[l]:[]},n,p,b,f,0,Infinity,r)}function Aq(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ea+1,d=c+d-1);return[c,d]}
661
- function kq(a){if(a.g){for(var b=t(a.pa),c=b.next();!c.done;c=b.next())a.g.Bb(c.value);a.pa=[]}}
662
- function dq(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,x,w,y,C,D,A,E,G,H,L,I,K,Q,R,O,T,Y;return F(function(da){switch(da.g){case 1:h=c.segments;l=Kp(c.W,"EXT-X-MEDIA-SEQUENCE",0);n=(m=Jp(c.W,"EXT-X-SKIP"))?Number(Dp(m,"SKIPPED-SEGMENTS")):0;p=l+n;if(a.j!=Yp&&e.has(p)){r=e.get(p);da.v(2);break}if(null!=a.N){da.v(3);break}k=xq(a,c.g,h[0].W,f);u=a;return v(da,Bq(a,b,k,d,p,!1,h[0],f),4);case 4:u.N=da.h;case 3:r=a.N;case 2:x=h[0].g;$a(x.split("/").pop());w=Kp(c.W,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.i&&(g.has(w)||
663
- g.set(w,p),n))for(;g.has(w+1)&&g.get(w+1)<p;)w++;y=a.H.get(w)||0;C=[];D=function(Ia){return mb(Ia)};A=t(D(h));E=A.next();case 5:if(E.done){da.v(7);break}H=G=E.value;L=H.ha;I=H.item;K=C[C.length-1];Q=0==L?r:K.endTime;p=l+n+L;e.set(p,Q);k=xq(a,c.g,I.W,f);R=Jp(I.W,"EXT-X-DISCONTINUITY");if(!R){da.v(8);break}w++;g.set(w,p);return v(da,Cq(a,w,b,k,d,p,I,f,Q),9);case 9:y=da.h;case 8:!a.i&&(O=a.D.isAutoLowLatencyMode())&&(a.D.enableLowLatencyMode(),a.i=a.D.isLowLatencyMode());T=Jp(I.W,"EXTINF");a.i||T?(Y=
664
- zq(a,k,K,I,Q,y,f,c.g),C.push(Y)):a.i||Va("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");E=A.next();da.v(5);break;case 7:return a.pa.push(C),kq(a),da["return"](C)}})}
665
- function Cq(a,b,c,d,e,f,g,h,k){var l,m;return F(function(n){if(1==n.g)return l=0,a.H.has(b)?(l=a.H.get(b),n.v(2)):v(n,Bq(a,c,d,e,f,!0,g,h),3);2!=n.g&&(m=n.h,l=k-m,a.H.set(b,l));return n["return"](l)})}
666
- function Dq(a,b){var c,d,e,f,g,h;return F(function(k){switch(k.g){case 1:c=lh;d=$i(b.ma(),b.ja,b.ea,a.o.retryParameters);if(a.o.hls.useFullSegmentsForStartTime)return k["return"](Zp(a,d,c));e=$i(b.ma(),b.ja,b.ja+2048-1,a.o.retryParameters);B(k,2);return v(k,Zp(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=va(k);if(7001==g.code)throw g;Va("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",
667
- e.uris[0]);return v(k,Zp(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
668
- function Bq(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,u,x;return F(function(w){switch(w.g){case 1:k=zq(a,c,null,g,0,0,h,"");if(a.A&&!f&&(l=a.h.get(b),m=l.td.get(e),void 0!=m))return w["return"](m);d=d.toLowerCase();if(uq.includes(d))throw Va("Raw formats are not yet supported. Skipping "+d),new M(1,4,4035);if("video/webm"==d)throw Va("WebM in HLS is not yet supported. Skipping."),new M(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.v(2);break}n=[Dq(a,k)];c&&n.push(Dq(a,c));return v(w,Promise.all(n),3);case 3:return p=
669
- w.h,r=p[0],u=p[1]||p[0],w["return"](Eq(b,r.uri,r.data,u.data));case 2:if("video/mp2t"!=d){w.v(4);break}return v(w,Dq(a,k),5);case 5:return x=w.h,w["return"](Fq(b,x.uri,x.data));case 4:throw new M(2,4,4030,b);}})}
670
- function Eq(a,b,c,d){var e=0;(new Pb).box("moov",Ub).box("trak",Ub).box("mdia",Ub).T("mdhd",function(h){e=ae(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new M(2,4,4030,a,b);var f=0,g=!1;(new Pb).box("moof",Ub).box("traf",Ub).T("tfdt",function(h){f=$d(h.reader,h.version).ed/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new M(2,4,4030,a,b);return f}
671
- function Fq(a,b,c){function d(){f.seek(g+188);h=f.$();71!=h&&(f.seek(g+192),h=f.$());71!=h&&(f.seek(g+204),h=f.$());71!=h&&e();f.le(1)}function e(){throw new M(2,4,4030,a,b);}var f=new Cb(c,0),g=0,h=0;for(c=Math.min(f.P.byteLength-188,940);;){g=f.Z();h=f.$();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Eb();if(8191==(k&8191))d();else if(k&16384)if(k=(f.$()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.$(),f.skip(k)),1!=f.M()>>8)d();else{f.skip(3);c=f.$()>>6;0!=c&&1!=c||e();0==f.$()&&e();c=f.$();k=f.Eb();var l=
672
- f.Eb();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function pq(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new M(2,4,4039,f);}}return c}
673
- function tq(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,x;return F(function(w){if(1==w.g){f=Fe;g=lh;h=pq(d.segments[0].g,e);k=new me(h);l=k.xa.split(".").pop();m=Gq[b];if(n=m[l])return w["return"](n);if(b==f.aa)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");p=fh([h],a.o.retryParameters);p.method="HEAD";return v(w,Zp(a,p,g),2)}r=w.h;u=r.headers["content-type"];return u?w["return"](u.split(";")[0]):(x=m.mp4,w["return"](x))})}
674
- q.Yb=function(){var a=this,b,c;return F(function(d){if(1==d.g){if(!a.D)return d["return"]();B(d,2);return v(d,a.update(),4)}if(2!=d.g)return b=a.qa,a.s.U(b),ua(d,0);c=va(d);if(!a.D)return d["return"]();c.severity=1;a.D.onError(c);a.s.U(.1);z(d)})};function eq(a,b){a.j=b;a.g&&a.g.cc(a.j==Yp);a.j!=Yp||a.s.stop()}function Zp(a,b,c){if(!a.C)throw new M(2,7,7001);b=a.D.networkingEngine.request(c,b);ah(a.C,b);return b.promise}J("shaka.hls.HlsParser",Xp);
675
- var uq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Gq={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
676
- vtt:"text/vtt",ttml:"application/ttml+xml"}},rq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Ep(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Ep(a,"URI");b=Wp(b);b=qb(b.data);b=Ae("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Dp(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Ep(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Ep(a,"URI");a=Wp(a);
677
- a=qb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=sn(a,b);return Ae("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Yp="VOD",wq="EVENT",vq="LIVE",bq={ze:Yp,Wf:wq,ye:vq};li.m3u8=function(){return new Xp};ji["application/x-mpegurl"]=function(){return new Xp};ji["application/vnd.apple.mpegurl"]=function(){return new Xp};function Hq(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,ie:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=zb(b)}catch(g){}throw new M(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Iq(){}function Jq(a,b,c,d){var e=new Kq;ph(b.headers).forEach(function(k,l){e.append(l,k)});var f=new Lq,g={Sd:!1,ue:!1};a=Mq(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new Qg(a,function(){g.Sd=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new N(function(){g.ue=!0;f.abort()});h.U(b/1E3);a["finally"](function(){h.stop()})}return a}
678
- function Mq(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,x,w,y,C,D;return F(function(A){switch(A.g){case 1:return g=Nq,h=Oq,n=m=0,p=Date.now(),B(A,2),v(A,g(a,c),4);case 4:return k=A.h,r=k.clone().body.getReader(),x=(u=k.headers.get("Content-Length"))?parseInt(u,10):0,w=function(E){function G(){var H,L;return F(function(I){switch(I.g){case 1:return B(I,2),v(I,r.read(),4);case 4:H=I.h;ua(I,3);break;case 2:return va(I),I["return"]();case 3:if(H.done){I.v(5);break}m+=H.value.byteLength;if(!f){I.v(5);break}return v(I,
679
- f(H.value),5);case 5:L=Date.now();if(100<L-p||H.done)e(L-p,m-n,x-m),n=m,p=L;H.done?E.close():(E.enqueue(H.value),G());z(I)}})}G()},new h({start:w}),v(A,k.arrayBuffer(),5);case 5:l=A.h;ua(A,3);break;case 2:y=va(A);if(d.Sd)throw new M(1,1,7001,a,b);if(d.ue)throw new M(1,1,1003,a,b);throw new M(1,1,1002,a,y,b);case 3:return C={},D=k.headers,D.forEach(function(E,G){C[G.trim()]=E}),A["return"](Hq(C,l,k.status,a,k.url,b))}})}
680
- function Pq(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}J("shaka.net.HttpFetchPlugin",Iq);Iq.isSupported=Pq;Iq.parse=Jq;var Nq=window.fetch,Lq=window.AbortController,Oq=window.ReadableStream,Kq=window.Headers;Pq()&&(ch("http",Jq,2,!0),ch("https",Jq,2,!0));function Qq(){}
681
- function Rq(a,b,c,d){var e=new Sq,f=Date.now(),g=0,h=new Promise(function(k,l){e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onabort=function(){l(new M(1,1,7001,a,c))};e.onload=function(n){n=n.target;var p=n.getAllResponseHeaders().trim().split("\r\n"),r={};p=t(p);for(var u=p.next();!u.done;u=p.next())u=u.value.split(": "),r[u[0].toLowerCase()]=u.slice(1).join(": ");try{var x=Hq(r,n.response,n.status,a,n.responseURL,
682
- c);k(x)}catch(w){l(w)}};e.onerror=function(n){l(new M(1,1,1002,a,n,c))};e.ontimeout=function(){l(new M(1,1,1003,a,c))};e.onprogress=function(n){var p=Date.now();if(100<p-f||n.lengthComputable&&n.loaded==n.total)d(p-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=p};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new Qg(h,function(){e.abort();return Promise.resolve()})}J("shaka.net.HttpXHRPlugin",Qq);Qq.parse=Rq;var Sq=window.XMLHttpRequest;
683
- ch("http",Rq,1,!0);ch("https",Rq,1,!0);function Tq(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Uq(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Tq.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 Vq(a){var b=this;this.O=a;this.g=new Map;this.J=new cf(function(){var c=Array.from(b.g.values());return Promise.all(c.map(function(d){return d["catch"](function(){})}))});this.h=[];this.fe=function(){};this.ee=function(){};this.Mb=new Tq}Vq.prototype.destroy=function(){return this.J.destroy()};function Wq(a,b,c){a.fe=b;a.ee=c}function Xq(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
684
- function Yq(a,b,c,d,e,f){df(a.J);var g=Uq(a.Mb,d);d=(a.g.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return F(function(u){if(1==u.g)return v(u,Zq(a,c),2);h=u.h;if(a.J.g)throw new M(2,9,7001);if(e)for(m in k=qb(h),l=new rn(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.ee(p,r);a.Mb.close(g,h.byteLength);var x=a.Mb;a.fe(0==x.i?0:x.j/x.i,a.Mb.h);return u["return"](f(h))})});a.g.set(b,d);return d}
685
- function $q(a,b,c){df(a.J);var d=(a.g.get(b)||Promise.resolve()).then(function(){return F(function(e){return v(e,c(),0)})});a.g.set(b,d)}function ar(a){return F(function(b){return 1==b.g?v(b,Promise.all(a.g.values()),2):b["return"](a.Mb.h)})}function Zq(a,b){var c,d,e,f;return F(function(g){if(1==g.g)return c=lh,d=a.O.request(c,b),e=function(){return d.abort()},a.h.push(e),v(g,d.promise,2);f=g.h;wc(a.h,e);return g["return"](f.data)})};function br(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Ge;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}br.prototype.abort=function(){var a=this;return F(function(b){if(1==b.g){try{a.i.abort()}catch(c){}B(b,2);return v(b,a.g,4)}if(2!=b.g)return ua(b,0);va(b);z(b)})};
686
- function cr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return F(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return v(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}br.prototype.store=function(){return this.h};br.prototype.promise=function(){return this.g};function dr(a){this.h=a;this.g=[]}dr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function er(a,b){return fr(a,b,"readwrite")}function fr(a,b,c){c=a.h.transaction([b],c);var d=new br(c,b);a.g.push(d);d.promise().then(function(){wc(a.g,d)},function(){wc(a.g,d)});return d};function gr(a,b,c){this.g=new dr(a);this.i=b;this.h=c}q=gr.prototype;q.destroy=function(){return this.g.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return hr(this.i)};q.removeSegments=function(a,b){return ir(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return F(function(d){if(1==d.g)return v(d,jr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Td(e)}))})};q.addManifests=function(){return hr(this.h)};
687
- q.updateManifestExpiration=function(a,b){var c=er(this.g,this.h),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return ir(this,this.h,a,b)};q.getManifests=function(a){var b=this,c;return F(function(d){if(1==d.g)return v(d,jr(b,b.h,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Pb(e)})))})};
688
- q.getAllManifests=function(){var a=this,b,c;return F(function(d){return 1==d.g?(b=fr(a.g,a.h,"readonly"),c=new Map,v(d,cr(b,function(e,f){var g;return F(function(h){if(1==h.g)return v(h,a.Pb(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?v(d,b.promise(),3):d["return"](c)})};q.Td=function(a){return a};q.Pb=function(a){return Promise.resolve(a)};function hr(a){return Promise.reject(new M(2,9,9011,"Cannot add new value to "+a))}
689
- q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return F(function(m){if(1==m.g){d=er(c.g,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 v(m,d.promise(),2)}return m["return"](f)})};
690
- function ir(a,b,c,d){a=er(a.g,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()}
691
- function jr(a,b,c){var d,e,f,g,h,k,l;return F(function(m){if(1==m.g){d=fr(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Kb:h.Kb,Ib:h.Ib},l=k.next())h.Ib=l.value,h.Kb=e.get(h.Ib),h.Kb.onsuccess=function(n){return function(){void 0==n.Kb.result&&g.push(n.Ib);f[n.Ib]=n.Kb.result}}(h);return v(m,d.promise(),2)}if(g.length)throw new M(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function kr(a){this.g=new dr(a)}kr.prototype.destroy=function(){return this.g.destroy()};kr.prototype.getAll=function(){var a=this,b,c;return F(function(d){return 1==d.g?(b=fr(a.g,"session-ids","readonly"),c=[],v(d,cr(b,function(e,f){c.push(f)}),2)):3!=d.g?v(d,b.promise(),3):d["return"](c)})};kr.prototype.add=function(a){var b=er(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()};
692
- kr.prototype.remove=function(a){var b=this,c;return F(function(d){return 1==d.g?(c=er(b.g,"session-ids"),v(d,cr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):v(d,c.promise(),0)})};function lr(){this.g=new Map}lr.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)};lr.prototype.init=function(){var a=this;mr.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
693
- function nr(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ia:d,la:f},la:e})})});if(b)return b;throw new M(2,9,9013,"Could not find a cell that supports add-operations");}function or(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ia:d,la:f},e)})})}
694
- function pr(a,b,c){a=a.g.get(b);if(!a)throw new M(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new M(2,9,9013,"Could not find cell with name "+c);return b}function qr(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function rr(a){var b=Array.from(a.g.keys());if(!b.length)throw new M(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
695
- function sr(a){var b,c,d;return F(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=mr,d.forEach(function(f){(f=f())&&b.push(f)})),v(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.v(0):v(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function tr(a,b){mr.set(a,b)}J("shaka.offline.StorageMuxer",lr);lr.unregister=function(a){mr["delete"](a)};lr.register=tr;lr.prototype.destroy=lr.prototype.destroy;var mr=new Map;function ur(){gr.apply(this,arguments)}pa(ur,gr);ur.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return F(function(g){d=er(c.g,c.h);e=d.store();f=new Ge;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new M(2,9,9012,"Could not find values for "+a))};return v(g,Promise.all([d.promise(),f]),0)})};
696
- ur.prototype.Pb=function(a){var b,c,d,e,f,g;return F(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=vr(a.periods[c],e),b.push(f);return v(h,Qo(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})})};
697
- function vr(a,b){wr(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return xr(e,a.startTime,b)})}
698
- function xr(a,b,c){var d=a.initSegmentUri?yr(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=yr(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
699
- dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}ur.prototype.Td=function(a){return{data:a.data}};function yr(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new M(2,9,9004,"Could not parse uri "+a);}
700
- function wr(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=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++,
701
- 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 zr(){gr.apply(this,arguments)}pa(zr,gr);
702
- zr.prototype.Pb=function(a){var b,c,d,e,f,g;return F(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(Ar(n,k.startTime,k.startTime+e));f=l;b.push(f)}return v(h,Qo(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
542
+ function eo(a,b){var c=fo(a,b,"timescale"),d=1;c&&(d=Nn(c)||1);var e=fo(a,b,"duration");c=Nn(e||"");"image"==a.K.contentType&&(c=Pn(e||""));c&&(c/=d);var f=fo(a,b,"startNumber");e=Number(fo(a,b,"presentationTimeOffset"))||0;var g=On(f||"");if(null==f||null==g)g=1;var h=go(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.X.duration||Infinity,l=Bn(h,"S");h=[];var m=-e;l=t(lb(l));for(var n=l.next();!n.done;n=l.next()){n=n.value;var p=n.item,r=n.next,u=In(p,"t",On);n=In(p,"d",On);var y=In(p,"r",Mn);null!=
543
+ u&&(u-=e);if(!n)break;p=null!=u?u:m;u=y||0;if(0>u)if(r){r=In(r,"t",On);if(null==r)break;else if(p>=r)break;u=Math.ceil((r-p)/n)-1}else{if(Infinity==k)break;else if(p/f>=k)break;u=Math.ceil((k*f-p)/n)-1}0<h.length&&p!=m&&(h[h.length-1].end=p/f);r=t(jb(u+1));for(u=r.next();!u.done;u=r.next())m=p+n,h.push({start:p/f,end:m/f,Yf:p}),p=m}f=h}return{timescale:d,ja:c,Ib:g,Va:e/d||0,Ud:e,timeline:f}}
544
+ function fo(a,b,c){return[b(a.K),b(a.la),b(a.ha)].filter(Zb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}function go(a,b,c){return[b(a.K),b(a.la),b(a.ha)].filter(Zb).map(function(d){return An(d,c)}).reduce(function(d,e){return d||e})}
545
+ function ho(a,b,c,d,e,f){for(var g=Fn(a,"http://www.w3.org/1999/xlink","href"),h=Fn(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 Ee(new N(2,4,4028));if("onLoad"!=h)return Ee(new N(2,4,4027));var m=rc([d],[g]);return e.request(0,Ue(m,b)).ca(function(n){n=Sn(n.data,a.tagName);if(!n)return Ee(new N(2,4,4001,g));
546
+ 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 io(a,b,c,m[0],e,f+1)})}
547
+ function io(a,b,c,d,e,f){f=void 0===f?0:f;if(Fn(a,"http://www.w3.org/1999/xlink","href")){var g=ho(a,b,c,d,e,f);c&&(g=g.ca(void 0,function(){return io(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"==Fn(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(io(k,b,c,d,e,f)));return Ie(g).ca(function(){return a})};function jo(a,b,c,d,e,f,g){var h,k=(new jg).U("sidx",function(l){h=ko(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
548
+ function ko(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.N();var m=g.reader.N()}else l=g.reader.Hb(),m=g.reader.Hb();g.reader.skip(2);var n=g.reader.Gb();a=a+g.size+m;n=t(jb(n));for(m=n.next();!m.done;m=n.next()){var p=g.reader.N();m=(p&2147483648)>>>31;p&=2147483647;var r=g.reader.N();g.reader.skip(4);if(1==m)throw new N(2,3,3006);h.push(new mi(l/k+c,(l+r)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=r;a+=p}g.parser.stop();
549
+ return h};function lo(a){this.h=Rb(a);this.g=new gg(this.h,0)}lo.prototype.oa=function(){return this.g.oa()};
550
+ function mo(a){var b=no(a);if(7<b.length)throw new N(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=no(a);a:{d=t(oo);for(var e=d.next();!e.done;e=d.next())if(Mb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.$();else{if(8==b.length&&b[1]&224)throw new N(2,3,3001);d=0;e=t(lb(b));for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=f.item;d=0==f.ga?g&(1<<8-b.length)-1:256*d+g}b=d}b=a.g.$()+b<=a.h.byteLength?b:a.h.byteLength-a.g.$();d=Rb(a.h,
551
+ a.g.$(),b);a.g.skip(b);return new po(c,d)}function no(a){var b=a.g.$(),c=a.g.aa();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ob(a.h,b,c)}var oo=[[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 po(a,b){this.id=a;this.g=b}
552
+ function qo(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(2,3,3001);for(var b=0,c=t(jb(a.g.byteLength)),d=c.next();!d.done;d=c.next())d=a.g.getUint8(d.value),b=256*b+d;return b};function ro(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new lo(a.g);for(var n=null,p=null;a.oa();){var r=mo(a);if(187==r.id){var u=so(r);u&&(r=c*u.Zf,u=b+u.Hf,null!=n&&m.push(new mi(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new mi(n+g,d+g,l,p,null,f,g,h,k));return m}
553
+ function so(a){var b=new lo(a.g);a=mo(b);if(179!=a.id)throw new N(2,3,3013);a=qo(a);b=mo(b);if(183!=b.id)throw new N(2,3,3012);b=new lo(b.g);for(var c=0;b.oa();){var d=mo(b);if(241==d.id){c=qo(d);break}}return{Zf:a,Hf:c}};function to(a,b){var c=go(a,b,"Initialization");if(!c)return null;var d=a.K.Aa,e=c.getAttribute("sourceURL");e&&(d=rc(a.K.Aa,[e]));e=0;var f=null;if(c=In(c,"range",Ln))e=c.start,f=c.end;return new ki(function(){return d},e,f)}
554
+ function uo(a,b){var c=Number(fo(a,vo,"presentationTimeOffset"))||0,d=fo(a,vo,"timescale"),e=1;d&&(e=Nn(d)||1);var f=c/e||0,g=to(a,vo);wo(a,g);var h=Ne(a);return{yb:function(){var k=go(h,vo,"RepresentationIndex"),l=h.K.Aa;k&&(k=k.getAttribute("sourceURL"))&&(l=rc(h.K.Aa,[k]));k=xo(h);return yo(h,b,g,l,k.start,k.end,f)}}}
555
+ function yo(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,y,w,x,C,D,B,F;return K(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.fb||!a.X.he,l=a.X.start,m=a.X.duration,n=a.K.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f),"webm"==n?p(c.na(),c.ka,c.fa):null],p=null,v(G,Promise.all(u),2);y=G.h;w=y[0];x=y[1]||null;C=null;D=l-g;B=l;F=m?l+m:Infinity;if("mp4"==n)var H=jo(w,e,d,c,D,B,F);else{H=new lo(x);if(440786851!=mo(H).id)throw new N(2,3,3008);var L=mo(H);if(408125543!=L.id)throw new N(2,3,3009);H=L.g.byteOffset;
556
+ L=new lo(L.g);for(var I=null;L.oa();){var J=mo(L);if(357149030==J.id){I=J;break}}if(!I)throw new N(2,3,3010);I=new lo(I.g);J=1E6;for(L=null;I.oa();){var P=mo(I);if(2807729==P.id)J=qo(P);else if(17545==P.id)if(4==P.g.byteLength)L=P.g.getFloat32(0);else if(8==P.g.byteLength)L=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==L)throw new N(2,3,3011);I=J/1E9;L*=I;J=mo(new lo(w));if(475249515!=J.id)throw new N(2,3,3007);H=ro(J,H,I,L,d,c,D,B,F)}C=H;h.Db(C);r=new U(C);k&&r.$a(B,F,!0);return G["return"](r)})}
557
+ function vo(a){return a.fc}function xo(a){var b=go(a,vo,"RepresentationIndex");a=fo(a,vo,"indexRange");a=Ln(a||"");b&&(a=In(b,"range",Ln,a));return a}function wo(a,b){zo(a,b);if(!xo(a))throw new N(2,4,4002);}function zo(a,b){var c=a.K.mimeType.split("/")[1];if(a.K.contentType!=wc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);};function Ao(a,b){var c=to(a,Bo),d=Co(a);if(!d.ja&&!d.timeline&&1<d.Bb.length)throw new N(2,4,4002);if(!d.ja&&!a.X.duration&&!d.timeline&&1==d.Bb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.ha.id&&a.K.id&&(f=a.ha.id+","+a.K.id,e=b[f]);c=Do(a.X.start,a.X.duration,a.K.Aa,d,c);d=!e;e?e.Cb(c,a.presentationTimeline.ab()):(e=new U(c),f&&a.fb&&(b[f]=e));a.presentationTimeline.Db(c);a.fb&&a.X.he||e.$a(a.X.start,a.X.duration?a.X.start+a.X.duration:
558
+ Infinity,d);return{yb:function(){return Promise.resolve(e)}}}function Bo(a){return a.cb}function Co(a){var b=Eo(a);a=eo(a,Bo);var c=a.Ib;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,Ib:c,Va:a.Va,timeline:a.timeline,Bb:b}}
559
+ function Do(a,b,c,d,e){var f=d.Bb.length;d.timeline&&d.timeline.length!=d.Bb.length&&(f=Math.min(d.timeline.length,d.Bb.length));var g=a-d.Va,h=b?a+b:Infinity,k=[],l=d.startTime,m={};f=t(jb(f));for(var n=f.next();!n.done;m={Xc:m.Xc},n=f.next()){n=n.value;var p=d.Bb[n];m.Xc=rc(c,[p.yf]);var r=void 0;r=null!=d.ja?l+d.ja:d.timeline?d.timeline[n].end:l+b;k.push(new mi(a+l,a+r,function(u){return function(){return u.Xc}}(m),p.start,p.end,e,g,a,h));l=r}return k}
560
+ function Eo(a){return[a.K.cb,a.la.cb,a.ha.cb].filter(Zb).map(function(b){return Bn(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.fe&&(a.fe=!0);var c=b.getAttribute("media");b=In(b,"mediaRange",Ln,{start:0,end:null});return{yf:c,start:b.start,end:b.end}})};function Fo(a,b,c,d,e,f){var g=Go(a),h=Ho(a);Io(h);var k=Ne(a);if(h.$b)return zo(a,g),{yb:function(){var u=co(h.$b,k.K.id,null,k.bandwidth||null,null);u=rc(k.K.Aa,[u]);return yo(k,b,g,u,0,null,h.Va)}};if(h.ja)return d||(a.presentationTimeline.zd(h.ja),a.presentationTimeline.Bd(a.X.start)),{yb:function(){return Jo(k,h,e,g,f)}};var l=null;d=null;a.ha.id&&a.K.id&&(d=a.ha.id+","+a.K.id,l=c[d]);var m=Ko(k,h,g),n=a.X.start,p=a.X.duration?a.X.start+a.X.duration:Infinity,r=Infinity!=p;l?(r&&(new U(m)).$a(n,
561
+ p,!0),l.Cb(m,a.presentationTimeline.ab())):(l=new U(m),d&&a.fb&&(c[d]=l));a.presentationTimeline.Db(m);r&&l.$a(n,p);return{yb:function(){return Promise.resolve(l)}}}function Lo(a){return a.hc}function Ho(a){var b=eo(a,Lo),c=fo(a,Lo,"media");a=fo(a,Lo,"index");return{ja:b.ja,timescale:b.timescale,Ib:b.Ib,Va:b.Va,Ud:b.Ud,timeline:b.timeline,yd:c,$b:a}}
562
+ function Io(a){var b=a.$b?1:0;b+=a.timeline?1:0;b+=a.ja?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.$b&&(a.timeline=null),a.ja=null);if(!a.$b&&!a.yd)throw new N(2,4,4002);}
563
+ function Jo(a,b,c,d,e){function f(I){var J=(I-r)*p,P=J+b.Va,Q=J+l;J=Q+p;var ba=Math.min(J,h());Q=new mi(Q,ba,function(){var aa=co(y,x,I,w,P*u);return rc(C,[aa])},0,null,d,D,l,h());Q.j=J;return Q}function g(){var I=[Math.max(k.ab(),l),Math.min(k.ib(),h())].map(function(J){return J-l});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(J){return J+r})}function h(){var I=null!=m&&e[m]||n;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.X.start,m=a.ha.id,n=a.X.duration,p=b.ja,r=b.Ib,u=b.timescale,
564
+ y=b.yd,w=a.bandwidth||null,x=a.K.id,C=a.K.Aa,D=l-b.Va,B=g();a=a.fb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var F=a;F<=B;++F){var G=f(F);c.push(G)}var H=new U(c);c=k.ib()<h();F=k.Y();if(c||F){var L=Math.max(a,B+1);H.Oc(p,function(){var I=k.ab();H.gb(I);var J=t(g());J.next();J=J.next().value;for(var P=[];L<=J;){var Q=f(L);P.push(Q);L++}return I>h()&&!P.length?null:P})}return Promise.resolve(H)}
565
+ function Ko(a,b,c){var d=a.X.start,e=a.X.duration,f=d-b.Va;e=e?d+e:Infinity;for(var g=[],h={},k=t(lb(b.timeline)),l=k.next();!l.done;h={Wc:h.Wc,$c:h.$c,cd:h.cd,Tc:h.Tc,ed:h.ed,Uc:h.Uc},l=k.next()){l=l.value;var m=l.item,n=m.start,p=m.Yf;m=m.end;h.cd=l.ga+b.Ib;h.ed=p+b.Ud;h.$c=a.K.id;h.Tc=a.bandwidth||null;h.Wc=b.yd;h.Uc=a.K.Aa;g.push(new mi(d+n,d+m,function(r){return function(){var u=co(r.Wc,r.$c,r.cd,r.Tc||null,r.ed);return rc(r.Uc,[u]).map(function(y){return y.toString()})}}(h),0,null,c,f,d,e))}return g}
566
+ function Go(a){var b=fo(a,Lo,"initialization");if(!b)return null;var c=a.K.id,d=a.bandwidth||null,e=a.K.Aa;return new ki(function(){var f=co(b,c,null,d,null);return rc(e,[f])},0,null)};function Mo(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Mo.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=[]};
567
+ function No(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,y,w,x,C,D,B,F,G,H,L,I,J,P,Q,ba,aa,S,ya,pa,Ca,Ga,Cb;return K(function(Ta){switch(Ta.g){case 1:d=xc;Oo(b);Po(b);Qo(b);Ro(b);if(!c&&1==b.length){e=b[0];a.g=e.vc;a.h=e.Qc;a.j=e.textStreams;a.i=e.imageStreams;Ta.v(2);break}f=-1;g=t(lb(b));for(h=g.next();!h.done;h=g.next())l=k=h.value,m=l.ga,n=l.item,a.m.has(n.id)||(a.m.add(n.id),-1==f&&(f=m));if(-1==f)return Ta["return"]();p=b.map(function(za){return za.vc});r=b.map(function(za){return za.Qc});u=b.map(function(za){return za.textStreams});
568
+ y=b.map(function(za){return za.imageStreams});w=t(u);for(x=w.next();!x.done;x=w.next())C=x.value,C.push(So(d.ba));D=t(y);for(B=D.next();!B.done;B=D.next())F=B.value,F.push(So(d.Ob));return v(Ta,To(a.g,p,f,Uo,Vo),3);case 3:return v(Ta,To(a.h,r,f,Uo,Vo),4);case 4:return v(Ta,To(a.j,u,f,Uo,Vo),5);case 5:return v(Ta,To(a.i,y,f,Uo,Vo),2);case 2:G=0;H=[];if(a.h.length&&a.g.length)for(ba=t(a.g),aa=ba.next();!aa.done;aa=ba.next())for(S=aa.value,ya=t(a.h),pa=ya.next();!pa.done;pa=ya.next())Ca=pa.value,Ga=
569
+ Zf(S.drmInfos,Ca.drmInfos),S.drmInfos.length&&Ca.drmInfos.length&&!Ga.length||(Cb=G++,H.push({id:Cb,language:S.language,primary:S.primary,audio:S,video:Ca,bandwidth:(S.bandwidth||0)+(Ca.bandwidth||0),drmInfos:Ga,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(L=a.h.concat(a.g),I=t(L),J=I.next();!J.done;J=I.next())P=J.value,Q=G++,H.push({id:Q,language:P.language,primary:P.primary,audio:P.type==d.eb?P:null,video:P.type==d.Pa?P:null,bandwidth:P.bandwidth||0,drmInfos:P.drmInfos,
570
+ allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});a.l=H;z(Ta)}})}
571
+ function Oo(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.vc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&ob(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.vc=c}}
572
+ function Qo(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&ob(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
573
+ function Po(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Qc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&ob(e.roles,h.roles)&&nf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Qc=c}}
574
+ function Ro(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
575
+ function Wo(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,y,w,x,C,D,B,F,G,H,L,I,J,P;return K(function(Q){switch(Q.g){case 1:b=xc;if(1==a.length)return Q["return"](a[0]);c=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.eb})});d=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Pa})});e=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.ba})});f=a.map(function(ba){return ba.filter(function(aa){return aa.type==b.Ob})});g=t(e);for(h=g.next();!h.done;h=g.next())k=
576
+ h.value,k.push(Xo(b.ba));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Xo(b.Ob));return v(Q,To([],c,0,Yo,Zo),2);case 2:return p=Q.h,v(Q,To([],d,0,Yo,Zo),3);case 3:return r=Q.h,v(Q,To([],e,0,Yo,Zo),4);case 4:return u=Q.h,v(Q,To([],f,0,Yo,Zo),5);case 5:y=Q.h;w=0;if(r.length&&p.length)for(F=t(p),G=F.next();!G.done;G=F.next())for(H=G.value,L=t(r),I=L.next();!I.done;I=L.next())J=I.value,P=w++,J.variantIds.push(P),H.variantIds.push(P);else for(x=r.concat(p),C=t(x),D=C.next();!D.done;D=C.next())B=
577
+ D.value,B.variantIds=[w++];return Q["return"](r.concat(p).concat(u).concat(y))}})}
578
+ function To(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,y,w,x,C,D,B,F,G,H,L,I,J,P,Q,ba,aa;return K(function(S){switch(S.g){case 1:f=xc;g=[];h=t(lb(b));for(k=h.next();!k.done;k=h.next())m=l=k.value,n=m.ga,p=m.item,n>=c?g.push(new Set(p)):g.push(new Set);r=t(a);u=r.next();case 2:if(u.done){S.v(4);break}y=u.value;return v(S,$o(y,b,c,e,g),5);case 5:w=S.h;if(!w)throw new N(2,4,4037);u=r.next();S.v(2);break;case 4:x=t(g),C=x.next();case 6:if(C.done){S.v(8);break}D=C.value;B=t(D);F=B.next();case 9:if(F.done){C=x.next();
579
+ S.v(6);break}G=F.value;return v(S,ap(G,b,d,e,g),12);case 12:(H=S.h)&&a.push(H);F=B.next();S.v(9);break;case 8:L=t(g);for(C=L.next();!C.done;C=L.next())for(I=C.value,J={},P=t(I),F=P.next();!F.done;J={Xa:J.Xa},F=P.next())if(J.Xa=F.value,Q=J.Xa.type==f.ba&&!J.Xa.language,ba=J.Xa.type==f.Ob&&!J.Xa.tilesLayout,!Q&&!ba&&(aa=a.some(function(ya){return function(pa){return pa.mimeType==ya.Xa.mimeType&&Vc(pa.codecs)==Vc(ya.Xa.codecs)}}(J))))throw new N(2,4,4037);return S["return"](a)}})}
580
+ function $o(a,b,c,d,e){var f;return K(function(g){if(1==g.g)return(f=bp(b,a))?v(g,cp(f),2):g["return"](!1);dp(a,f,c,d,e);return g["return"](!0)})}function cp(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push(c.createSegmentIndex()),c.trickModeVideo&&!c.trickModeVideo.segmentIndex&&b.push(c.trickModeVideo.createSegmentIndex());return Promise.all(b)}
581
+ function ap(a,b,c,d,e){var f,g;return K(function(h){if(1==h.g)return f=c(a),(g=bp(b,f))?f.createSegmentIndex?v(h,cp(g),2):h.v(2):h["return"](null);dp(f,g,0,d,e);return h["return"](f)})}function dp(a,b,c,d,e){b=t(lb(b));for(var f=b.next();!f.done;f=b.next()){var g=f.value;f=g.ga;g=g.item;if(f>=c){d(a,g);var h=!0;"audio"==a.type&&0==kd(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}}
582
+ function Uo(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Li;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}function Yo(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
583
+ function Vo(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));var c=b.keyIds;c=new Set([].concat(ja(a.keyIds),ja(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=Zf(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new N(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
584
+ (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)}}a.segmentIndex.j.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Uo(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),Vo(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Vo(a.trickModeVideo,b)}
585
+ function Zo(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ja(a.keyIds),ja(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ja(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
586
+ function bp(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:ep,video:ep,text:fp,image:gp}[f.type],h={audio:hp,video:ip,text:jp,image:kp}[f.type],k=null;e=t(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return null;c.push(f)}return c}function ep(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Vc(b.codecs)!=Vc(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<Zf(c,d).length:1)}return c?!1:!0}
587
+ function fp(a,b){return a.language?b.language?0==kd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function gp(a){return a.tilesLayout?!0:!1}
588
+ function hp(a,b,c){if(a.id==c.id)return!0;var d=kd(a.language,b.language),e=kd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;
589
+ d=lp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==mp)return!0;if(d==np)return!1;d=lp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==mp?!0:d==np?!1:a.bandwidth&&op(a.bandwidth,b.bandwidth,c.bandwidth)==mp?!0:!1}
590
+ function ip(a,b,c){if(a.id==c.id)return!0;var d=lp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==mp)return!0;if(d==np)return!1;if(a.frameRate){d=lp(a.frameRate,b.frameRate,c.frameRate);if(d==mp)return!0;if(d==np)return!1}return a.bandwidth&&op(a.bandwidth,b.bandwidth,c.bandwidth)==mp?!0:!1}
591
+ function jp(a,b,c){if(a.id==c.id)return!0;var d=kd(a.language,b.language),e=kd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
592
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function kp(a,b,c){return a.id==c.id?!0:lp(a.width*a.height,b.width*b.height,c.width*c.height)==mp?!0:!1}function Xo(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}}
593
+ function So(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U([]),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}}
594
+ function lp(a,b,c){if(b==a&&a!=c)return np;if(c==a&&a!=b)return mp;if(b>a){if(c<=a||c-a<b-a)return mp;if(c-a>b-a)return np}else{if(c>a)return np;if(a-c<a-b)return mp;if(a-c>a-b)return np}return pp}function op(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?mp:b<a?np:pp}var mp=1,pp=0,np=-1;function qp(){var a=this;this.C=this.o=null;this.h=[];this.B=null;this.F=1;this.m={};this.L={};this.g=new Mo;this.D=0;this.H=new Qa(5);this.u=new O(function(){a.bc()});this.i=new Oe;this.j=null;this.I=[];this.l=Infinity;this.s=!1}q=qp.prototype;q.configure=function(a){this.o=a};q.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.s=b.isLowLatencyMode(),c.h=[a],c.C=b,v(e,rp(c),2);d=e.h;c.C&&sp(c,d);if(!c.C)throw new N(2,7,7001);return e["return"](c.B)})};
595
+ q.stop=function(){for(var a=t(Object.values(this.m)),b=a.next();!b.done;b=a.next())b.value.release();this.g&&this.g.release();this.o=this.C=null;this.h=[];this.B=null;this.m={};this.g=null;null!=this.u&&(this.u.stop(),this.u=null);return this.i.destroy()};q.update=function(){var a=this,b;return K(function(c){if(1==c.g)return A(c,2),v(c,rp(a),4);if(2!=c.g)return wa(c,0);b=E(c);if(!a.C||!b)return c["return"]();a.C.onError(b);z(c)})};q.onExpirationUpdated=function(){};
596
+ function rp(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=Ue(a.h,a.o.retryParameters),c=a.C.networkingEngine,d=Date.now(),e=c.request(0,b),Pe(a.i,e),v(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.C)return k["return"](0);f.uri&&!a.h.includes(f.uri)&&a.h.unshift(f.uri);return v(k,tp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;Ra(a.H,1,h);return k["return"](h)})}
597
+ function tp(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=Sn(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.o.dash.disableXlinkProcessing)return k["return"](up(a,d,c));f=a.o.dash.xlinkFailGracefully;g=io(d,a.o.retryParameters,f,c,a.C.networkingEngine);Pe(a.i,g);return v(k,g.promise,2)}h=k.h;return k["return"](up(a,h,c))})}
598
+ function up(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,y,w,x,C,D,B,F,G,H,L,I,J,P,Q,ba,aa,S,ya,pa,Ca;return K(function(Ga){switch(Ga.g){case 1:(d=a.o.dash.manifestPreprocessor)&&d(b);e=[c];f=Bn(b,"Location").map(Gn).filter(Zb);0<f.length&&(g=rc(e,f),e=a.h=g);h=Bn(b,"BaseURL");k=h.map(Gn);l=rc(e,k);m=0;h&&h.length&&(m=In(h[0],"availabilityTimeOffset",Pn)||0);n=a.o.dash.ignoreMinBufferTime;p=0;n||(p=In(b,"minBufferTime",Kn)||0);a.D=In(b,"minimumUpdatePeriod",Kn,-1);r=In(b,"availabilityStartTime",Jn);u=In(b,
599
+ "timeShiftBufferDepth",Kn);y=a.o.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=In(b,"suggestedPresentationDelay",Kn));x=a.o.dash.ignoreMaxSegmentDuration;C=null;x||(C=In(b,"maxSegmentDuration",Kn));D=b.getAttribute("type")||"static";if(a.B)for(B=a.B.presentationTimeline,F=t(Object.values(a.m)),G=F.next();!G.done;G=F.next())H=G.value,H.gb(B.ab());else L=a.o.defaultPresentationDelay||1.5*p,I=null!=w?w:L,B=new T(r,I,a.o.dash.autoCorrectDrift);J=b.getAttribute("profiles")||"";P={fb:"static"!=D,presentationTimeline:B,
600
+ ha:null,X:null,la:null,K:null,bandwidth:0,fe:!1,wb:m,profiles:J.split(",")};Q=vp(a,P,l,b);ba=Q.duration;aa=Q.periods;B.ic("static"==D);"static"!=D&&Q.$d||B.La(ba||Infinity);a.l&&!a.s&&(S=a.C.isAutoLowLatencyMode())&&(a.C.enableLowLatencyMode(),a.s=a.C.isLowLatencyMode());a.s?B.ue(a.l):a.l&&Xa("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.");(ya=B.Y())&&
601
+ !isNaN(a.o.availabilityWindowOverride)&&(u=a.o.availabilityWindowOverride);null==u&&(u=Infinity);B.Qd(u);B.zd(C||1);return v(Ga,No(a.g,aa,P.fb),2);case 2:if(a.B){a.B.variants=a.g.l;a.B.textStreams=a.g.j.slice();a.B.imageStreams=a.g.i;a.C.filter(a.B);Ga.v(3);break}a.B={presentationTimeline:B,variants:a.g.l,textStreams:a.g.j.slice(),imageStreams:a.g.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.ze()){Ga.v(3);break}pa=Bn(b,"UTCTiming");return v(Ga,wp(a,l,pa),5);case 5:Ca=Ga.h;if(!a.C)return Ga["return"]();
602
+ B.ve(Ca);case 3:a.C.makeTextStreamsForClosedCaptions(a.B),z(Ga)}})}
603
+ function vp(a,b,c,d){var e=In(d,"mediaPresentationDuration",Kn),f=[],g=0;d=Bn(d,"Period");for(var h=t(lb(d)),k=h.next();!k.done;k=h.next()){var l=k.value;k=l.ga;var m=l.item,n=l.next;l=In(m,"start",Kn,g);var p=m.id,r=In(m,"duration",Kn),u=null;if(n){var y=In(n,"start",Kn);null!=y&&(u=y-l)}else null!=e&&(u=e-l);null==u&&(u=r);if(!(null!==a.j&&null!==p&&null!==l&&l<a.j)||a.I.includes(p)||k+1==d.length){null!==l&&(null===a.j||l>a.j)&&(a.j=l);g=xp(a,b,c,{start:l,duration:u,node:m,he:null==u||!n});f.push(g);
604
+ b.ha.id&&u&&(a.L[b.ha.id]=u);if(null==u){g=null;break}g=l+u}}a.I=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,$d:!1}:{periods:f,duration:g,$d:!0}}
605
+ function xp(a,b,c,d){b.ha=yp(d.node,null,c);b.X=d;b.ha.wb=b.wb;b.ha.id||(b.ha.id="__shaka_period_"+d.start);c=Bn(d.node,"EventStream");c=t(c);for(var e=c.next();!e.done;e=c.next())zp(a,d.start,d.duration,e.value);c=Bn(d.node,"AdaptationSet").map(function(m){return Ap(a,b,m)}).filter(Zb);if(b.fb){d=[];e=t(c);for(var f=e.next();!f.done;f=e.next()){f=t(f.value.Kf);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);}d=c.filter(function(m){return!m.Sd});
606
+ c=c.filter(function(m){return m.Sd});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Sd.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={pc:h.pc},l=k.next())h.pc=l.value,h.pc.trickModeVideo=e.streams.find(function(m){return function(n){return Vc(m.pc.codecs)==Vc(n.codecs)}}(h))}}}e=a.o.disableAudio?[]:Bp(d,"audio");g=a.o.disableVideo?[]:Bp(d,"video");f=a.o.disableText?[]:Bp(d,wc);c=a.o.disableThumbnails?
607
+ []:Bp(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ja(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ja(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ja(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ja(h.value.streams));return{id:b.ha.id,vc:d,Qc:e,textStreams:g,imageStreams:f}}
608
+ function Bp(a,b){return a.filter(function(c){return c.contentType==b})}
609
+ function Ap(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.la=yp(c,b.ha,null);var e=!1,f=Bn(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Zb),h=void 0,k=b.la.contentType==wc;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=
610
+ l}}var n;m=Bn(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var r=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==r?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==r?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=Bn(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
611
+ 10)));m=Bn(c,"Accessibility");var u=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(r=p.value,p=r.getAttribute("schemeIdUri"),r=r.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=r){r=r.split(";");for(var y=t(r),w=y.next();!w.done;w=y.next()){var x=w.value,C=w=void 0;x.includes("=")?(x=x.split("="),w=x[0].startsWith("CC")?x[0]:"CC"+x[0],C=x[1]||"und"):(w="CC"+p,2==r.length?p+=2:p++,C=x);u.set(w,gd(C))}}else u.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
612
+ 1,null!=r)for(r=t(r.split(";")),w=r.next();!w.done;w=r.next())w=w.value,x=y=void 0,w.includes("=")?(w=w.split("="),y="svc"+w[0],x=w[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,x=w),u.set(y,gd(x));else u.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=r&&(g.push(r),"captions"==r&&(h="caption"));if(l)return null;l=Bn(c,"ContentProtection");var D=Tn(l,a.o.dash.ignoreDrmInfo,a.o.dash.keySystemsByURI),B=gd(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=Bn(c,"Label"))&&l.length&&
613
+ (l=l[0],l.textContent&&(F=l.textContent));l=Bn(c,"Representation");c=l.map(function(G){if(G=Cp(a,b,D,h,B,F,e,g,u,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.la.contentType;if(a.o.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.la.contentType||"application"==b.la.contentType)for(b.la.contentType=Dp(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.la.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
614
+ m.value,p=t(D.drmInfos),r=p.next();!r.done;r=p.next())r=r.value,r.keyIds=r.keyIds&&m.keyIds?new Set([].concat(ja(r.keyIds),ja(m.keyIds))):r.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Zb);return{id:b.la.id||"__fake__"+a.F++,contentType:b.la.contentType,language:B,zg:e,streams:c,drmInfos:D.drmInfos,Sd:f,Kf:k}}
615
+ function Cp(a,b,c,d,e,f,g,h,k,l){b.K=yp(l,b.la,null);a.l=Math.min(a.l,b.K.wb);if(!Ep(b.K))return null;var m=b.X.start;b.bandwidth=In(l,"bandwidth",Nn)||0;var n=b.K.contentType,p=n==wc||"application"==n;n="image"==n;try{var r=function(G,H,L){return Fp(a,G,H,L)};if(b.K.fc)var u=uo(b,r);else if(b.K.cb)u=Ao(b,a.m);else if(b.K.hc)u=Fo(b,r,a.m,!!a.B,a.o.dash.initialSegmentLimit,a.L);else{var y=b.K.Aa,w=b.X.duration||0;u={yb:function(){return Promise.resolve(Ki(m,w,y))}}}}catch(G){if((p||n)&&4002==G.code)return null;
616
+ throw G;}r=Bn(l,"ContentProtection");r=Wn(r,c,a.o.dash.ignoreDrmInfo,a.o.dash.keySystemsByURI);r=new Set(r?[r]:[]);var x=!1;Bn(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(b.K.mimeType="audio/eac3-joc",x=!0);var C=!1;p&&(C=h.includes("forced_subtitle"));var D;if(n&&((l=Bn(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
617
+ (D=l.getAttribute("value")),!D))return null;var B;l=b.K.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(B="PQ");var F={id:a.F++,originalId:b.K.id,createSegmentIndex:function(){var G;return K(function(H){if(1==H.g){if(F.segmentIndex)return H.v(0);G=F;return v(H,u.yb(),3)}G.segmentIndex=H.h;z(H)})},segmentIndex:null,mimeType:b.K.mimeType,codecs:b.K.codecs,frameRate:b.K.frameRate,pixelAspectRatio:b.K.pixelAspectRatio,
618
+ bandwidth:b.bandwidth,width:b.K.width,height:b.K.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:r,language:e,label:f,type:b.la.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.K.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.K.Cd,audioSamplingRate:b.K.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:B,tilesLayout:D};return F}
619
+ q.bc=function(){var a=this,b,c;return K(function(d){switch(d.g){case 1:return b=0,A(d,2),v(d,rp(a),4);case 4:b=d.h;wa(d,3);break;case 2:c=E(d),a.C&&(c.severity=1,a.C.onError(c));case 3:if(!a.C)return d["return"]();sp(a,b);z(d)}})};function sp(a,b){0>a.D||a.u.V(Math.max(3,a.D-b,Sa(a.H)))}
620
+ function yp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Cd:null,audioSamplingRate:null,wb:0};c=c||b.Aa;var d=Bn(a,"BaseURL"),e=d.map(Gn),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=In(a,"frameRate",Qn)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Bn(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
621
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Bn(a,"AudioChannelConfiguration");m=Gp(m)||b.Cd;p=In(a,"audioSamplingRate",On)||b.audioSamplingRate;f||(f=Dp(g,h));var r=An(a,"SegmentBase"),u=An(a,"SegmentTemplate"),y=r?In(r,"availabilityTimeOffset",Pn)||0:0,w=u?In(u,"availabilityTimeOffset",Pn)||0:0;d=d&&d.length?In(d[0],"availabilityTimeOffset",Pn)||0:0;d=b.wb+d+y+w;return{Aa:rc(c,e),fc:r||b.fc,cb:An(a,"SegmentList")||b.cb,hc:u||b.hc,width:In(a,"width",On)||b.width,height:In(a,
622
+ "height",On)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Cd:m,audioSamplingRate:p,wb:d}}
623
+ function Gp(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=
624
+ 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 Ep(a){var b=a.fc?1:0;b+=a.cb?1:0;b+=a.hc?1:0;if(0==b)return a.contentType==wc||"application"==a.contentType?!0:!1;1!=b&&(a.fc&&(a.cb=null),a.hc=null);return!0}
625
+ function Hp(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=rc(b,[c]),f=Ue(e,a.o.retryParameters),f.method=d,g=a.C.networkingEngine.request(4,f),Pe(a.i,g),v(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=Bc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
626
+ function wp(a,b,c){var d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.o.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.v(4);break}h=g.value;A(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.v(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.v(8);
627
+ 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":Xa("NTP UTCTiming scheme is not supported");break;default:Xa("Unrecognized scheme in UTCTiming element",k)}n.v(9);break;case 7:return v(n,Hp(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return v(n,Hp(a,b,l,"GET"),11);case 11:return n["return"](n.h);
628
+ case 9:wa(n,3);break;case 5:E(n);case 3:g=f.next();n.v(2);break;case 4:return Xa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
629
+ function zp(a,b,c,d){var e=d.getAttribute("schemeIdUri")||"",f=d.getAttribute("value")||"",g=In(d,"timescale",On)||1;d=t(Bn(d,"Event"));for(var h=d.next();!h.done;h=d.next()){h=h.value;var k=In(h,"presentationTime",On)||0,l=In(h,"duration",On)||0;k=k/g+b;l=k+l/g;null!=c&&(k=Math.min(k,b+c),l=Math.min(l,b+c));h={schemeIdUri:e,value:f,startTime:k,endTime:l,id:h.getAttribute("id")||"",eventElement:h};a.C.onTimelineRegionAdded(h)}}
630
+ function Fp(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=$e,f=Xi(b,c,d,a.o.retryParameters),g=a.C.networkingEngine,h=g.request(e,f),Pe(a.i,h),v(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Dp(a,b){return Yc(Tc(a,b))?wc:a.split("/")[0]}M("shaka.dash.DashParser",qp);eg.mpd=function(){return new qp};cg["application/dash+xml"]=function(){return new qp};cg["video/vnd.mpeg.dash.mpd"]=function(){return new qp};function Ip(a,b,c,d){this.g=a;this.type=b;this.W=c;this.segments=d||null}function Jp(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Jp.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};
631
+ Jp.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 Kp(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function Lp(a,b,c){c=void 0===c?[]:c;this.W=b;this.g=a;this.h=c}function Mp(a,b){this.name=a;this.value=b};function Np(a,b){return a.filter(function(c){return c.name==b})}function Op(a,b){return a.filter(function(c){return Kp(c,"TYPE")==b})}function Pp(a,b){var c=Np(a,b);return c.length?c[0]:null}function Qp(a,b,c){c=void 0===c?0:c;return(a=Pp(a,b))?Number(a.value):c};function Rp(a){this.h=a;this.g=0}function Sp(a){Tp(a,/[ \t]+/gm)}function Tp(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function Up(a){return a.g==a.h.length?null:(a=Tp(a,/[^ \t\n]*/gm))?a[0]:null};function Vp(){this.g=0}
632
+ function Wp(a,b,c){b=Bc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new N(2,4,4015);b=0;for(var e=!0,f=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Xp(a.g++,g),--a.g,Yp.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;g=t(lb(d));for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=k.ga;var l=k.item;k=k.next;if(/^#(?!EXT)/m.test(l)||e)e=!1;else{l=Xp(a.g++,
633
+ l);if(Zp.includes(l.name)){if(1!=b)throw new N(2,4,4017);k=d.splice(h,d.length-h);d=c;e=[];g=[];h=[];l=null;k=t(k);for(var m=k.next();!m.done;m=k.next())m=m.value,/^(#EXT)/.test(m)?(m=Xp(a.g++,m),Yp.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?l=m:"EXT-X-PART"==m.name?h.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?h.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",l=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=rc([d],[m.trim()])[0],l&&g.push(l),e.push(new Lp(m,g,h)),g=[],h=[]);h.length&&(l&&
634
+ g.push(l),e.push(new Lp("",g,h)));return new Ip(c,b,f,e)}f.push(l);"EXT-X-STREAM-INF"==l.name&&(l.g.push(new Mp("URI",k)),e=!0)}}return new Ip(c,b,f)}function Xp(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new N(2,4,4016,b);var d=c[1],e=c[2];c=[];var f;if(e){e=new Rp(e);var g;(g=Tp(e,/^([^,=]+)(?:,|$)/g))&&(f=g[1]);for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=Tp(e,h);)c.push(new Mp(g[1],g[2]||g[3]))}return new Jp(a,d,c,f)}
635
+ var Yp="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Zp="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function $p(){}function aq(a){try{var b=bq(a);return Ge({uri:a,me:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ee(c)}}function bq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Kc(a):e=Fc(a);return{data:e,contentType:c}}
636
+ M("shaka.net.DataUriPlugin",$p);$p.parse=aq;Re("data",aq);function cq(){var a=this;this.o=this.C=null;this.Oa=1;this.l=new Map;this.s=new Map;this.Ha=new Set;this.g=new Map;this.h=null;this.L="";this.ea=new Vp;this.sa=0;this.u=new O(function(){a.bc()});this.j=dq;this.B=null;this.ra=0;this.F=Infinity;this.Z=this.Za=0;this.D=new Oe;this.T=[];this.I=new Map;this.Ya=!1;this.m=new Map;this.O=null;this.qa=new Map;this.H=new Map;this.i=!1}q=cq.prototype;q.configure=function(a){this.o=a};
637
+ q.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.C=b,c.i=b.isLowLatencyMode(),v(f,eq(c,Ue([a],c.o.retryParameters),0),2);if(3!=f.g)return d=f.h,c.L=d.uri,v(f,fq(c,d.data),3);e=c.sa;0<e&&c.u.V(e);return f["return"](c.B)})};q.stop=function(){this.u&&(this.u.stop(),this.u=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.o=this.C=null;this.Ha.clear();this.B=null;this.g.clear();this.s.clear();this.m.clear();this.l.clear();return Promise.all(a)};
638
+ q.update=function(){var a=this,b,c,d;return K(function(e){if(1==e.g){if(a.j==dq)return e["return"]();b=[];a.O=null;c=Array.from(a.g.values());return c.length?v(e,gq(a,c[0]),2):e.v(2)}for(d=1;d<c.length;d++)b.push(gq(a,c[d]));return v(e,Promise.all(b),0)})};
639
+ function gq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u;return K(function(y){if(1==y.g)return c=hq,d=b.Ee,e=new ec(d),a.i&&b.Je&&hc(e,new jc("_HLS_skip=YES")),v(y,eq(a,Ue([e.toString()],a.o.retryParameters),0),2);if(3!=y.g){f=y.h;g=Wp(a.ea,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=Np(g.W,"EXT-X-DEFINE");k=iq(a,h);l=b.stream;return v(y,jq(a,b.Pc,g,l.type,l.mimeType,b.xd,k,b.Qe),3)}m=y.h;l.segmentIndex.Cb(m,a.h.ab());m.length&&(n=Qp(g.W,"EXT-X-MEDIA-SEQUENCE",0),p=b.xd.get(n),l.segmentIndex.gb(p));
640
+ r=m[m.length-1];if(u=Pp(g.W,"EXT-X-ENDLIST"))kq(a,c.De),a.h.La(r.endTime);z(y)})}q.onExpirationUpdated=function(){};
641
+ function fq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,y,w,x,C,D,B,F,G,H,L,I,J,P,Q,ba,aa,S,ya,pa,Ca,Ga,Cb,Ta;return K(function(za){switch(za.g){case 1:c=Wp(a.ea,b,a.L);if(0!=c.type)throw new N(2,4,4022);d=Np(c.W,"EXT-X-DEFINE");lq(a,d);e=Np(c.W,"EXT-X-MEDIA");f=Np(c.W,"EXT-X-STREAM-INF");g=Np(c.W,"EXT-X-IMAGE-STREAM-INF");mq(a,f);h=Np(c.W,"EXT-X-SESSION-DATA");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Z(m,"DATA-ID"),p=Z(m,"URI"),r=Z(m,"LANGUAGE"),u=Z(m,"VALUE"),y=(new Map).set("id",n),p&&y.set("uri",
642
+ rc([a.L],[p])[0]),r&&y.set("language",r),u&&y.set("value",u),w=new R("sessiondata",y),a.C)a.C.onEvent(w);return v(za,nq(a,e),2);case 2:return oq(a,e),v(za,pq(a,f),3);case 3:return x=za.h,v(za,qq(a,e),4);case 4:return C=za.h,v(za,rq(a,g),5);case 5:D=za.h;if(!a.C)throw new N(2,7,7001);if(a.Ya&&0==x.length)throw new N(2,4,4034);F=B=Infinity;G=t(a.g.values());for(H=G.next();!H.done;H=G.next())L=H.value,B=Math.min(B,L.ke),"text"!=L.stream.type&&(F=Math.min(F,L.xf-L.ke));a.j!=dq?(a.h=new T(0,a.o.defaultPresentationDelay?
643
+ a.o.defaultPresentationDelay:a.Z?a.Z:3*a.ra),a.h.ic(!1)):(a.h=new T(null,0),a.h.ic(!0));sq(a);if(a.j!=dq)a.sa=a.F,I=hq,a.j==I.Ce&&(J=a.h.Lc,isNaN(a.o.availabilityWindowOverride)||(J=a.o.availabilityWindowOverride),a.h.Qd(J));else for(a.h.La(F),a.h.offset(-B),P=t(a.g.values()),H=P.next();!H.done;H=P.next())Q=H.value,Q.stream.segmentIndex.offset(-B),Q.stream.segmentIndex.$a(0,F);a.T=[];ba=[];aa=t(x);for(S=aa.next();!S.done;S=aa.next())for(ya=S.value,pa=t([ya.video,ya.audio]),Ca=pa.next();!Ca.done;Ca=
644
+ pa.next())(Ga=Ca.value)&&ba.push(Ga);return v(za,Promise.all(ba.map(function(ce){return K(function(of){return v(of,ce.createSegmentIndex(),0)})})),6);case 6:Cb=t(ba);for(Ca=Cb.next();!Ca.done;Ca=Cb.next())Ta=Ca.value,a.T.push(Ta.segmentIndex.M);sq(a);a.B={presentationTimeline:a.h,variants:x,textStreams:C,imageStreams:D,offlineSessionIds:[],minBufferTime:0};a.C.makeTextStreamsForClosedCaptions(a.B);z(za)}})}
645
+ function lq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Z(e,"NAME");e=Z(e,"VALUE");d&&e&&(a.l.has(d)||a.l.set(d,e))}}function iq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.l.get(f))&&c.set(f,e)}return c}
646
+ function mq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Z(e,"AUDIO");d=Z(e,"VIDEO");var g=Z(e,"SUBTITLES");e=tq(a,e);if(g){var h=uc(wc,e);a.m.set(g,h);nb(e,h)}f&&(g=tc("audio",e),a.m.set(f,g));d&&(f=tc("video",e),a.m.set(d,f))}}
647
+ function qq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r;return K(function(u){if(1==u.g)return c=Op(b,"SUBTITLES"),d=c.map(function(y){var w,x,C;return K(function(D){if(1==D.g){if(w=a.o.disableText)return D["return"](null);A(D,2);return v(D,uq(a,y),4)}if(2!=D.g)return x=D.h,D["return"](x.stream);C=E(D);if(a.o.hls.ignoreTextStreamFailures)return D["return"](null);throw C;})}),v(u,Promise.all(d),2);e=u.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Kp(h,"GROUP-ID"),l=a.m.get(k))if(m=a.s.get(k))for(n=
648
+ t(m),p=n.next();!p.done;p=n.next())r=p.value,r.stream.codecs=l;return u["return"](e.filter(function(y){return y}))})}
649
+ function rq(a,b){var c,d;return K(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return K(function(l){if(1==l.g){if(g=a.o.disableThumbnails)return l["return"](null);A(l,2);return v(l,vq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=E(l);if(a.o.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),v(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
650
+ function nq(a,b){var c;return K(function(d){if(1==d.g)return b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f}),b.length?v(d,uq(a,b[0]),2):d.v(2);c=b.slice(1).map(function(e){return uq(a,e)});return v(d,Promise.all(c),0)})}
651
+ function pq(a,b){var c,d,e;return K(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,r,u;return K(function(y){if(1==y.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(Kp(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,r=Z(g,"VIDEO-RANGE"),v(y,wq(a,g),2);if(u=y.h){for(var w=y["return"],x=u.audio,C=u.video,D=t(C),B=D.next();!B.done;B=D.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
652
+ void 0,B.frameRate=Number(h)||void 0,B.hdr=r||void 0;D=a.o.disableAudio;if(!x.length||D)x=[null];D=a.o.disableVideo;if(!C.length||D)C=[null];D=[];x=t(x);for(B=x.next();!B.done;B=x.next()){B=B.value;for(var F=t(C),G=F.next();!G.done;G=F.next()){var H=G.value;G=B?B.stream:null;var L=H?H.stream:null,I=B?B.stream.drmInfos:null,J=H?H.stream.drmInfos:null;H=(H?H.Pc:"")+" - "+(B?B.Pc:"");G&&L&&I.length&&J.length&&!(0<Zf(I,J).length)||a.Ha.has(H)||(G={id:a.Oa++,language:G?G.language:"und",primary:!!G&&G.primary||
653
+ !!L&&L.primary,audio:G,video:L,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},D.push(G),a.Ha.add(H))}}y=w.call(y,D)}else y=y["return"]([]);return y})}),v(f,Promise.all(c),2);d=f.h;e=d.reduce(Xb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
654
+ function wq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,y;return K(function(w){if(1==w.g)return c=xc,d=tq(a,b),e=Z(b,"AUDIO"),f=Z(b,"VIDEO"),h=(g=e||f)&&a.s.has(g)?a.s.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=Kp(b,"URI"),p=k.audio.find(function(x){return x&&x.Pc==n}),r=uc(c.Pa,d),(u=uc(c.eb,d))&&!r?l=c.eb:!h.length&&u&&r?(l=c.Pa,d=[[r,u].join()]):k.audio.length&&p?(l=c.eb,m=!0):l=k.video.length?c.eb:c.Pa,m?w.v(2):v(w,xq(a,b,d,l),3);2!=w.g&&(y=w.h);if(y)k[y.stream.type]=[y];else if(null===y)return w["return"](null);
655
+ yq(k);return w["return"](k)})}function tq(a,b){var c=[];a.o.disableVideo||c.push("avc1.42E01E");a.o.disableAudio||c.push("mp4a.40.2");var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Vc(f);c.has(g)||(e.push(f),c.add(g))}return e}function zq(a){a=Z(a,"LANGUAGE")||"und";return gd(a)}
656
+ function yq(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function oq(a,b){var c=Op(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=zq(e);var f=Kp(e,"GROUP-ID");e=Kp(e,"INSTREAM-ID");a.I.get(f)||a.I.set(f,new Map);a.I.get(f).set(e,d)}}
657
+ function uq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,y;return K(function(w){if(1==w.g){c=Kp(b,"GROUP-ID");d="";var x=Kp(b,"TYPE").toLowerCase();"subtitles"==x&&(x=wc);e=x;e!=wc&&c&&a.m.has(c)&&(d=a.m.get(c));f=Aq(Kp(b,"URI"),a.l);if(a.g.has(f))return w["return"](a.g.get(f));g=zq(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?x=(x=Z(b,"CHANNELS"))?parseInt(x.split("/")[0],10):null:x=null;m=x;"audio"==e?x=(x=Z(b,"CHANNELS"))?x.includes("/JOC"):!1:x=!1;n=x;p=Z(b,"CHARACTERISTICS");r=Z(b,"FORCED");
658
+ u="YES"==r;return v(w,Bq(a,f,d,e,g,l,h,m,null,p,u,n),2)}y=w.h;a.s.has(c)?a.s.get(c).push(y):a.s.set(c,[y]);if(null==y)return w["return"](null);if(a.g.has(f))return w["return"](a.g.get(f));a.g.set(f,y);return w["return"](y)})}
659
+ function vq(a,b){var c,d,e,f,g,h;return K(function(k){if(1==k.g){c=Aq(Kp(b,"URI"),a.l);d=Z(b,"CODECS","jpeg")||"";if(a.g.has(c))return k["return"](a.g.get(c));e=zq(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return v(k,Bq(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.g.has(c))return k["return"](a.g.get(c));a.g.set(c,h);return k["return"](h)})}
660
+ function xq(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=Aq(Kp(b,"URI"),a.l);if(a.g.has(e))return k["return"](a.g.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.I.get(l):null;g=tc(d,c);return v(k,Bq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.g.has(e))return k["return"](a.g.get(e));a.g.set(e,h);return k["return"](h)})}
661
+ function Bq(a,b,c,d,e,f,g,h,k,l,m,n){var p,r,u,y,w,x,C,D,B,F,G,H,L,I,J,P,Q,ba,aa,S,ya,pa,Ca,Ga,Cb,Ta,za,ce,of,Xm,Ym,Zm,Hh,Ih,pf,$m,an,bn,cn;return K(function(eb){switch(eb.g){case 1:return p=rc([a.L],[b])[0],v(eb,eq(a,Ue([p],a.o.retryParameters),0),2);case 2:r=eb.h;p=r.uri;u=Wp(a.ea,r.data,p);if(1!=u.type)throw new N(2,4,4017);y=[];if(u.segments)for(w=t(u.segments),x=w.next();!x.done;x=w.next())C=x.value,D=Np(C.W,"EXT-X-KEY"),y.push.apply(y,ja(D));B=!1;F=[];G=new Set;H=t(y);for(L=H.next();!L.done;L=
662
+ H.next())if(I=L.value,J=Kp(I,"METHOD"),"NONE"!=J){B=!0;if("AES-128"==J)return a.Ya=!0,eb["return"](null);P=Kp(I,"KEYFORMAT");if(ba=(Q=Cq[P])?Q(I):null){if(ba.keyIds)for(aa=t(ba.keyIds),S=aa.next();!S.done;S=aa.next())ya=S.value,G.add(ya);F.push(ba)}}if(B&&!F.length)throw new N(2,4,4026);pa=Np(u.W,"EXT-X-DEFINE");Ca=iq(a,pa);Dq(a,u);return v(eb,Eq(a,d,c,u,Ca),3);case 3:return Ga=eb.h,Fq.includes(Ga)&&(c=""),Cb=new Map,Ta=new Map,A(eb,4),v(eb,jq(a,b,u,d,Ga,Cb,Ca,Ta),6);case 6:za=eb.h;wa(eb,5);break;
663
+ case 4:ce=E(eb);if(4035==ce.code)return Xa("Skipping unsupported HLS stream",Ga,b),eb["return"](null);throw ce;case 5:of=za[0].startTime;Xm=za[za.length-1].endTime;Ym=new U(za);Zm=d==wc?"subtitle":void 0;Hh=[];if(l)for(Ih=t(l.split(",")),pf=Ih.next();!pf.done;pf=Ih.next())$m=pf.value,Hh.push($m);bn=(an=Pp(u.W,"EXT-X-SERVER-CONTROL"))?null!=an.getAttribute("CAN-SKIP-UNTIL"):!1;cn={id:a.Oa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ym,mimeType:Ga,codecs:c,kind:Zm,
664
+ encrypted:B,drmInfos:F,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Hh,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return eb["return"]({stream:cn,Pc:b,Ee:p,ke:of,xf:Xm,xd:Cb,Qe:Ta,Je:bn})}})}
665
+ function Dq(a,b){var c=Pp(b.W,"EXT-X-PLAYLIST-TYPE"),d=Pp(b.W,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)kq(a,dq);else{c?kq(a,Gq):kq(a,Hq);d=Pp(b.W,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Pp(b.W,"EXT-X-PART-INF");a.i&&c?(a.Za=Number(Kp(c,"PART-TARGET")),a.F=Math.min(a.Za,a.F),c=Pp(b.W,"EXT-X-SERVER-CONTROL"),a.Z=c?Number(Kp(c,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.ra=Math.max(d,a.ra)}}
666
+ function Iq(a,b,c,d){c=Pp(c,"EXT-X-MAP");if(!c)return null;var e=Kp(c,"URI");d=Aq(rc([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.qa.has(b)||(c=Jq(d,c),a.qa.set(b,c));return a.qa.get(b)}function Jq(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new ki(function(){return[a]},c,d)}
667
+ function Kq(a,b,c,d,e,f,g,h,k){var l=d.W,m=Aq(d.g,g),n=Pp(l,"EXTINF"),p=g=0,r=null,u=[];if(a.i&&d.h.length){a={};d=t(lb(d.h));for(var y=d.next();!y.done;a={Yc:a.Yc},y=d.next()){y=y.value;var w=y.ga;y=y.item;var x=0==w?c:u[u.length-1];w=0==w?e:x.endTime;var C=Number(Z(y,"DURATION"));C=w+C;var D=0,B=null;"EXT-X-PRELOAD-HINT"==y.name?D=(x=Z(y,"BYTERANGE-START"))?Number(x):0:(D=Z(y,"BYTERANGE"),x=t(Lq(x,D)),D=x.next().value,B=x.next().value);y=Z(y,"URI");a.Yc=rc([h],[y])[0];u.push(new mi(w,C,function(F){return function(){return[F.Yc]}}(a),
668
+ D,B,b,f,0,Infinity))}}else if(!n)throw new N(2,4,4024,"EXTINF");n?g=e+Number(n.value.split(",")[0]):g=u[u.length-1].endTime;(h=Pp(l,"EXT-X-BYTERANGE"))?(r=t(Lq(c,h.value)),p=r.next().value,r=r.next().value):u.length&&(p=u[0].ka,r=u[u.length-1].fa);c="";"image"==k&&(c="1x1",(k=Pp(l,"EXT-X-TILES"))&&(c=Kp(k,"LAYOUT")));return new mi(e,g,function(){return m.length?[m]:[]},p,r,b,f,0,Infinity,u,c)}
669
+ function Lq(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.fa+1,d=c+d-1);return[c,d]}function sq(a){if(a.h){for(var b=t(a.T),c=b.next();!c.done;c=b.next())a.h.Db(c.value);a.T=[]}}
670
+ function jq(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,u,y,w,x,C,D,B,F,G,H,L,I,J,P,Q,ba,aa,S,ya;return K(function(pa){switch(pa.g){case 1:k=c.segments;m=Qp(c.W,"EXT-X-MEDIA-SEQUENCE",0);p=(n=Pp(c.W,"EXT-X-SKIP"))?Number(Z(n,"SKIPPED-SEGMENTS")):0;r=m+p;if(a.j!=dq&&f.has(r)){u=f.get(r);pa.v(2);break}if(null!=a.O){pa.v(3);break}l=Iq(a,c.g,k[0].W,g);y=a;return v(pa,Mq(a,b,l,e,r,!1,k[0],g,d),4);case 4:y.O=pa.h;case 3:u=a.O;case 2:w=k[0].g;ab(w.split("/").pop());x=Qp(c.W,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.i&&
671
+ (h.has(x)||h.set(x,r),p))for(;h.has(x+1)&&h.get(x+1)<r;)x++;C=a.H.get(x)||0;D=[];B=function(Ca){return lb(Ca)};F=t(B(k));G=F.next();case 5:if(G.done){pa.v(7);break}L=H=G.value;I=L.ga;J=L.item;P=D[D.length-1];Q=0==I?u:P.endTime;r=m+p+I;f.set(r,Q);l=Iq(a,c.g,J.W,g);ba=Pp(J.W,"EXT-X-DISCONTINUITY");if(!ba){pa.v(8);break}x++;h.set(x,r);return v(pa,Nq(a,x,b,l,e,r,J,g,Q,d),9);case 9:C=pa.h;case 8:!a.i&&(aa=a.C.isAutoLowLatencyMode())&&(a.C.enableLowLatencyMode(),a.i=a.C.isLowLatencyMode());S=Pp(J.W,"EXTINF");
672
+ a.i||S?(ya=Kq(a,l,P,J,Q,C,g,c.g,d),D.push(ya)):a.i||Xa("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");G=F.next();pa.v(5);break;case 7:return pa["return"](D)}})}
673
+ function Nq(a,b,c,d,e,f,g,h,k,l){var m,n;return K(function(p){if(1==p.g)return m=0,a.H.has(b)?(m=a.H.get(b),p.v(2)):v(p,Mq(a,c,d,e,f,!0,g,h,l),3);2!=p.g&&(n=p.h,m=k-n,a.H.set(b,m));return p["return"](m)})}
674
+ function Oq(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:c=$e;d=Xi(b.na(),b.ka,b.fa,a.o.retryParameters);if(a.o.hls.useFullSegmentsForStartTime)return k["return"](eq(a,d,c));e=Xi(b.na(),b.ka,b.ka+2048-1,a.o.retryParameters);A(k,2);return v(k,eq(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=E(k);if(7001==g.code)throw g;Xa("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",
675
+ e.uris[0]);return v(k,eq(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
676
+ function Mq(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,y,w;return K(function(x){switch(x.g){case 1:l=Kq(a,c,null,g,0,0,h,"",k);if(a.B&&!f&&(m=a.g.get(b),n=m.xd.get(e),void 0!=n))return x["return"](n);d=d.toLowerCase();if(Fq.includes(d))throw Xa("Raw formats are not yet supported. Skipping "+d),new N(1,4,4035);if("video/webm"==d)throw Xa("WebM in HLS is not yet supported. Skipping."),new N(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){x.v(2);break}p=[Oq(a,l)];c&&p.push(Oq(a,c));return v(x,Promise.all(p),
677
+ 3);case 3:return r=x.h,u=r[0],y=r[1]||r[0],x["return"](Pq(b,u.uri,u.data,y.data));case 2:if("video/mp2t"!=d){x.v(4);break}return v(x,Oq(a,l),5);case 5:return w=x.h,x["return"](Qq(b,w.uri,w.data));case 4:throw new N(2,4,4030,b);}})}
678
+ function Pq(a,b,c,d){var e=0;(new jg).box("moov",ng).box("trak",ng).box("mdia",ng).U("mdhd",function(h){e=Eh(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new N(2,4,4030,a,b);var f=0,g=!1;(new jg).box("moof",ng).box("traf",ng).U("tfdt",function(h){f=Dh(h.reader,h.version).jd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new N(2,4,4030,a,b);return f}
679
+ function Qq(a,b,c){function d(){f.seek(g+188);h=f.aa();71!=h&&(f.seek(g+192),h=f.aa());71!=h&&(f.seek(g+204),h=f.aa());71!=h&&e();f.pe(1)}function e(){throw new N(2,4,4030,a,b);}var f=new gg(c,0),g=0,h=0;for(c=Math.min(f.R.byteLength-188,940);;){g=f.$();h=f.aa();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Gb();if(8191==(k&8191))d();else if(k&16384)if(k=(f.aa()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.aa(),f.skip(k)),1!=f.N()>>8)d();else{f.skip(3);c=f.aa()>>6;0!=c&&1!=c||e();0==f.aa()&&e();c=f.aa();k=
680
+ f.Gb();var l=f.Gb();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Aq(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new N(2,4,4039,f);}}return c}
681
+ function Eq(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,y;return K(function(w){if(1==w.g){f=xc;g=$e;h=Aq(d.segments[0].g,e);k=new ec(h);l=k.za.split(".").pop();m=Rq[b];if(n=m[l])return w["return"](n);if(b==f.ba)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");if(b==f.Ob&&(!c||"jpeg"==c))return w["return"]("image/jpeg");p=Ue([h],a.o.retryParameters);p.method="HEAD";return v(w,eq(a,p,g),2)}r=w.h;u=r.headers["content-type"];return u?w["return"](u.split(";")[0]):(y=m.mp4,w["return"](y))})}
682
+ q.bc=function(){var a=this,b,c;return K(function(d){if(1==d.g){if(!a.C)return d["return"]();A(d,2);return v(d,a.update(),4)}if(2!=d.g)return b=a.sa,a.u.V(b),wa(d,0);c=E(d);if(!a.C)return d["return"]();c.severity=1;a.C.onError(c);a.u.V(.1);z(d)})};function kq(a,b){a.j=b;a.h&&a.h.ic(a.j==dq);a.j!=dq||a.u.stop()}function eq(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.C.networkingEngine.request(c,b);Pe(a.D,b);return b.promise}M("shaka.hls.HlsParser",cq);
683
+ var Fq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Rq={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
684
+ vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Cq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Kp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Kp(a,"URI");b=bq(b);b=Ob(b.data);b=sc("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=
685
+ Kp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Kp(a,"URI");a=bq(a);a=Ob(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=yn(a,b);return sc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},dq="VOD",Hq="EVENT",Gq="LIVE",hq={De:dq,eg:Hq,Ce:Gq};eg.m3u8=function(){return new cq};cg["application/x-mpegurl"]=function(){return new cq};cg["application/vnd.apple.mpegurl"]=function(){return new cq};function Sq(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,me:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Ec(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Tq(){}function Uq(a,b,c,d){var e=new Vq;lf(b.headers).forEach(function(k,l){e.append(l,k)});var f=new Wq,g={Vd:!1,ye:!1};a=Xq(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new De(a,function(){g.Vd=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new O(function(){g.ye=!0;f.abort()});h.V(b/1E3);a["finally"](function(){h.stop()})}return a}
686
+ function Xq(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,y,w,x,C,D;return K(function(B){switch(B.g){case 1:return g=Yq,h=Zq,n=m=0,p=Date.now(),A(B,2),v(B,g(a,c),4);case 4:return k=B.h,r=k.clone().body.getReader(),y=(u=k.headers.get("Content-Length"))?parseInt(u,10):0,w=function(F){function G(){var H,L;return K(function(I){switch(I.g){case 1:return A(I,2),v(I,r.read(),4);case 4:H=I.h;wa(I,3);break;case 2:return E(I),I["return"]();case 3:if(H.done){I.v(5);break}m+=H.value.byteLength;if(!f){I.v(5);break}return v(I,
687
+ f(H.value),5);case 5:L=Date.now();if(100<L-p||H.done)e(L-p,m-n,y-m),n=m,p=L;H.done?F.close():(F.enqueue(H.value),G());z(I)}})}G()},new h({start:w}),v(B,k.arrayBuffer(),5);case 5:l=B.h;wa(B,3);break;case 2:x=E(B);if(d.Vd)throw new N(1,1,7001,a,b);if(d.ye)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,x,b);case 3:return C={},D=k.headers,D.forEach(function(F,G){C[G.trim()]=F}),B["return"](Sq(C,l,k.status,a,k.url,b))}})}
688
+ function $q(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",Tq);Tq.isSupported=$q;Tq.parse=Uq;var Yq=window.fetch,Wq=window.AbortController,Zq=window.ReadableStream,Vq=window.Headers;$q()&&(Re("http",Uq,2,!0),Re("https",Uq,2,!0));function ar(){}
689
+ function br(a,b,c,d){var e=new cr,f=Date.now(),g=0,h=new Promise(function(k,l){e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onabort=function(){l(new N(1,1,7001,a,c))};e.onload=function(n){n=n.target;var p=n.getAllResponseHeaders().trim().split("\r\n"),r={};p=t(p);for(var u=p.next();!u.done;u=p.next())u=u.value.split(": "),r[u[0].toLowerCase()]=u.slice(1).join(": ");try{var y=Sq(r,n.response,n.status,a,n.responseURL,
690
+ c);k(y)}catch(w){l(w)}};e.onerror=function(n){l(new N(1,1,1002,a,n,c))};e.ontimeout=function(){l(new N(1,1,1003,a,c))};e.onprogress=function(n){var p=Date.now();if(100<p-f||n.lengthComputable&&n.loaded==n.total)d(p-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=p};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new De(h,function(){e.abort();return Promise.resolve()})}M("shaka.net.HttpXHRPlugin",ar);ar.parse=br;var cr=window.XMLHttpRequest;
691
+ Re("http",br,1,!0);Re("https",br,1,!0);function dr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function er(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}dr.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g["delete"](a);this.j+=c;this.h+=b}};function fr(a){var b=this;this.P=a;this.g=new Map;this.J=new af(function(){return gr(b)["catch"](function(){})});this.h=[];this.je=function(){};this.ie=function(){};this.Qb=new dr}fr.prototype.destroy=function(){return this.J.destroy()};function hr(a,b,c){a.je=b;a.ie=c}function gr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
692
+ function ir(a,b,c,d,e,f){bf(a.J);var g=er(a.Qb,d);d=(a.g.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return K(function(u){if(1==u.g)return v(u,jr(a,c),2);h=u.h;if(a.J.g)throw new N(2,9,7001);if(e)for(m in k=Ob(h),l=new xn(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.ie(p,r);a.Qb.close(g,h.byteLength);var y=a.Qb;a.je(0==y.i?0:y.j/y.i,a.Qb.h);return u["return"](f(h))})});a.g.set(b,d);return d}
693
+ function kr(a,b,c){bf(a.J);var d=(a.g.get(b)||Promise.resolve()).then(function(){return K(function(e){return v(e,c(),0)})});a.g.set(b,d)}function lr(a){return K(function(b){return 1==b.g?v(b,Promise.all(a.g.values()),2):b["return"](a.Qb.h)})}function jr(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=$e,d=a.P.request(c,b),e=function(){return d.abort()},a.h.push(e),v(g,d.promise,2);f=g.h;nb(a.h,e);return g["return"](f.data)})};function mr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new yc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}mr.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}A(b,2);return v(b,a.g,4)}if(2!=b.g)return wa(b,0);E(b);z(b)})};
694
+ function nr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return K(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return v(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}mr.prototype.store=function(){return this.h};mr.prototype.promise=function(){return this.g};function or(a){this.h=a;this.g=[]}or.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function pr(a,b){return qr(a,b,"readwrite")}function qr(a,b,c){c=a.h.transaction([b],c);var d=new mr(c,b);a.g.push(d);d.promise().then(function(){nb(a.g,d)},function(){nb(a.g,d)});return d};function rr(a,b,c){this.g=new or(a);this.i=b;this.h=c}q=rr.prototype;q.destroy=function(){return this.g.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return sr(this.i)};q.removeSegments=function(a,b){return tr(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return v(d,ur(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Wd(e)}))})};q.addManifests=function(){return sr(this.h)};
695
+ q.updateManifestExpiration=function(a,b){var c=pr(this.g,this.h),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return tr(this,this.h,a,b)};q.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return v(d,ur(b,b.h,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Tb(e)})))})};
696
+ q.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=qr(a.g,a.h,"readonly"),c=new Map,v(d,nr(b,function(e,f){var g;return K(function(h){if(1==h.g)return v(h,a.Tb(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?v(d,b.promise(),3):d["return"](c)})};q.Wd=function(a){return a};q.Tb=function(a){return Promise.resolve(a)};function sr(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}
697
+ q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=pr(c.g,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={oc:g.oc},k=h.next())l=k.value,g.oc=e.add(l),g.oc.onsuccess=function(n){return function(){f.push(n.oc.result)}}(g);return v(m,d.promise(),2)}return m["return"](f)})};
698
+ function tr(a,b,c,d){a=pr(a.g,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={nc:e.nc},f=c.next())e.nc=f.value,b["delete"](e.nc).onsuccess=function(g){return function(){return d(g.nc)}}(e);return a.promise()}
699
+ function ur(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=qr(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Nb:h.Nb,Lb:h.Lb},l=k.next())h.Lb=l.value,h.Nb=e.get(h.Lb),h.Nb.onsuccess=function(n){return function(){void 0==n.Nb.result&&g.push(n.Lb);f[n.Lb]=n.Nb.result}}(h);return v(m,d.promise(),2)}if(g.length)throw new N(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function vr(a){this.g=new or(a)}vr.prototype.destroy=function(){return this.g.destroy()};vr.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=qr(a.g,"session-ids","readonly"),c=[],v(d,nr(b,function(e,f){c.push(f)}),2)):3!=d.g?v(d,b.promise(),3):d["return"](c)})};vr.prototype.add=function(a){var b=pr(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
700
+ vr.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=pr(b.g,"session-ids"),v(d,nr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):v(d,c.promise(),0)})};function wr(){this.g=new Map}wr.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};wr.prototype.init=function(){var a=this;xr.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
701
+ function yr(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ka:d,ma:f},ma:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function zr(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ka:d,ma:f},e)})})}
702
+ function Ar(a,b,c){a=a.g.get(b);if(!a)throw new N(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new N(2,9,9013,"Could not find cell with name "+c);return b}function Br(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Cr(a){var b=Array.from(a.g.keys());if(!b.length)throw new N(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
703
+ function Dr(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=xr,d.forEach(function(f){(f=f())&&b.push(f)})),v(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.v(0):v(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Er(a,b){xr.set(a,b)}M("shaka.offline.StorageMuxer",wr);wr.unregister=function(a){xr["delete"](a)};wr.register=Er;wr.prototype.destroy=wr.prototype.destroy;var xr=new Map;function Fr(){rr.apply(this,arguments)}ra(Fr,rr);Fr.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=pr(c.g,c.h);e=d.store();f=new yc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new N(2,9,9012,"Could not find values for "+a))};return v(g,Promise.all([d.promise(),f]),0)})};
704
+ Fr.prototype.Tb=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Gr(a.periods[c],e),b.push(f);return v(h,Wo(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})})};
705
+ function Gr(a,b){Hr(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Ir(e,a.startTime,b)})}
706
+ function Ir(a,b,c){var d=a.initSegmentUri?Jr(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=Jr(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
707
+ 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}}Fr.prototype.Wd=function(a){return{data:a.data}};function Jr(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new N(2,9,9004,"Could not parse uri "+a);}
708
+ function Hr(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++,
709
+ 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 Kr(){rr.apply(this,arguments)}ra(Kr,rr);
710
+ Kr.prototype.Tb=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Lr(n,k.startTime,k.startTime+e));f=l;b.push(f)}return v(h,Wo(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
703
711
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
704
- function Ar(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,
705
- dataKey:d.dataKey}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Br(){gr.apply(this,arguments)}pa(Br,gr);Br.prototype.hasFixedKeySpace=function(){return!1};Br.prototype.addSegments=function(a){return this.add(this.i,a)};Br.prototype.addManifests=function(a){return this.add(this.h,a)};Br.prototype.Pb=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Cr(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Cr.prototype;
706
- q.init=function(){var a=this,b=new Ge,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new ur(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new zr(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new zr(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
707
- e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Br(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new kr(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=t(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new M(2,9,9001,c.error));d.preventDefault()};return b};
708
- q.destroy=function(){var a=this;return F(function(b){switch(b.g){case 1:if(!a.g){b.v(2);break}return v(b,a.g.destroy(),2);case 2:if(!a.h){b.v(4);break}return v(b,a.h.destroy(),4);case 4:if(!a.i){b.v(6);break}return v(b,a.i.destroy(),6);case 6:if(!a.j){b.v(8);break}return v(b,a.j.destroy(),8);case 8:if(!a.m){b.v(10);break}return v(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
712
+ function Lr(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,
713
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Mr(){rr.apply(this,arguments)}ra(Mr,rr);Mr.prototype.hasFixedKeySpace=function(){return!1};Mr.prototype.addSegments=function(a){return this.add(this.i,a)};Mr.prototype.addManifests=function(a){return this.add(this.h,a)};Mr.prototype.Tb=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Nr(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Nr.prototype;
714
+ q.init=function(){var a=this,b=new yc,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Fr(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Kr(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Kr(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
715
+ e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Mr(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new vr(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=t(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new N(2,9,9001,c.error));d.preventDefault()};return b};
716
+ q.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.v(2);break}return v(b,a.g.destroy(),2);case 2:if(!a.h){b.v(4);break}return v(b,a.h.destroy(),4);case 4:if(!a.i){b.v(6);break}return v(b,a.i.destroy(),6);case 6:if(!a.j){b.v(8);break}return v(b,a.j.destroy(),8);case 8:if(!a.m){b.v(10);break}return v(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
709
717
  q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
710
- q.erase=function(){var a=this;return F(function(b){switch(b.g){case 1:if(!a.g){b.v(2);break}return v(b,a.g.destroy(),2);case 2:if(!a.h){b.v(4);break}return v(b,a.h.destroy(),4);case 4:if(!a.i){b.v(6);break}return v(b,a.i.destroy(),6);case 6:if(!a.j){b.v(8);break}return v(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),v(b,Dr(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,v(b,a.init(),0)}})};
711
- function Dr(){var a=new Ge,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new M(2,9,9001,b.error));c.preventDefault()};return a}tr("idb",function(){return fc()||!window.indexedDB?null:new Cr});function Er(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Er.prototype.Ia=function(){return this.i};Er.prototype.la=function(){return this.h};Er.prototype.key=function(){return this.l};Er.prototype.toString=function(){return this.j};
712
- function Fr(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 Er(b,c,d,Number(a[4])):null};function Gr(a,b){this.h=a;this.g=b}
713
- function Hr(a,b){var c=new S(null,0);c.Ja(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Ir(a,d,e,c);e=b.streams.filter(function(l){return l.type==Ee}).map(function(l){return Jr(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Jr(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=
718
+ q.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.v(2);break}return v(b,a.g.destroy(),2);case 2:if(!a.h){b.v(4);break}return v(b,a.h.destroy(),4);case 4:if(!a.i){b.v(6);break}return v(b,a.i.destroy(),6);case 6:if(!a.j){b.v(8);break}return v(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),v(b,Or(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,v(b,a.init(),0)}})};
719
+ function Or(){var a=new yc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}Er("idb",function(){return vd()||!window.indexedDB?null:new Nr});function Pr(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Pr.prototype.Ka=function(){return this.i};Pr.prototype.ma=function(){return this.h};Pr.prototype.key=function(){return this.l};Pr.prototype.toString=function(){return this.j};
720
+ function Qr(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 Pr(b,c,d,Number(a[4])):null};function Rr(a,b){this.h=a;this.g=b}
721
+ function Sr(a,b){var c=new T(null,0);c.La(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Tr(a,d,e,c);e=b.streams.filter(function(l){return l.type==wc}).map(function(l){return Ur(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Ur(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=
714
722
  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}}
715
- function Ir(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=b.next())for(e=
716
- e.value,g=Jr(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=Jr(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}
717
- function Jr(a,b,c){var d=b.segments.map(function(e){return Kr(a,e)});c.Bb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U(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,
718
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Kr(a,b){var c=new Er("segment",a.h,a.g,b.dataKey);return new pi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Lr(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd)}
719
- function Lr(a,b){var c=new Er("segment",a.h,a.g,b);return new ni(function(){return[c.toString()]},0,null)};function Mr(){this.g=null}q=Mr.prototype;q.configure=function(){};
720
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return F(function(m){switch(m.g){case 1:d=Fr(a);c.g=d;if(null==d||"manifest"!=d.g)throw new M(2,1,9004,a);e=new lr;ta(m);return v(m,e.init(),4);case 4:return v(m,pr(e,d.Ia(),d.la()),5);case 5:return f=m.h,v(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Gr(d.Ia(),d.la()),l=Hr(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),v(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
721
- q.update=function(){};
722
- q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return F(function(m){switch(m.g){case 1:return d=c.g,e=new lr,B(m,2,3),v(m,e.init(),5);case 5:return v(m,pr(e,d.Ia(),d.la()),6);case 6:return f=m.h,v(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.v(3);break}return v(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),v(m,e.destroy(),10);case 10:xa(m,0);break;case 2:va(m),m.v(3)}})};
723
- ji["application/x-offline-manifest"]=function(){return new Mr};function Nr(){}function Or(a){var b=Fr(a);b&&"manifest"==b.g?(a={uri:a,ie:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Tg(a)):a=b&&"segment"==b.g?Pr(b.key(),b):Rg(new M(2,1,9004,a));return a}
724
- function Pr(a,b){var c=new lr;return Tg(void 0).ba(function(){return c.init()}).ba(function(){return pr(c,b.Ia(),b.la())}).ba(function(d){return d.getSegments([b.key()])}).ba(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}J("shaka.offline.OfflineScheme",Nr);Nr.plugin=Or;ch("offline",Or);function Qr(a,b,c){var d,e,f,g,h,k;return F(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,u=t(m),x=u.next();!x.done;x=u.next())if(x=x.value,Rr(x.info,p)){x.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.v(4);break}g=f.value;h=Sr(a,b,g);return v(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.v(2);break;case 4:return l["return"](d)}})}
725
- function Sr(a,b,c){var d,e;return F(function(f){switch(f.g){case 1:return d=new sh({Ab:b,onError:function(){},Gc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),B(f,2),d.configure(a),v(f,Ah(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ua(f,3);break;case 2:return va(f),v(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return B(f,6),v(f,Kh(d),8);case 8:ua(f,7);break;case 6:return va(f),v(f,d.destroy(),
726
- 9);case 9:return f["return"]([]);case 7:return e=[],v(f,Promise.all(c.sessionIds.map(function(g){return F(function(h){if(1==h.g)return B(h,2),v(h,Lh(d,g),4);if(2!=h.g)return e.push(g),ua(h,0);va(h);z(h)})})),10);case 10:return v(f,d.destroy(),11);case 11:return f["return"](e)}})}
727
- function Rr(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&xc(a.audioCapabilities,b.audioCapabilities,c)&&xc(a.videoCapabilities,b.videoCapabilities,c)};function Tr(a,b,c){var d=b.presentationTimeline.getDuration();b=Ur(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function Vr(a,b){var c=Hr(new Gr(a.Ia(),a.la()),b),d=b.appMetadata||{};c=Ur(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
728
- function Ur(a){var b=[],c=tg(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(lg(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(mg(c.value));return b};function Wr(){this.g={}}function Xr(a,b,c){c=c.endTime-c.startTime;return Yr(a,b)*c}function Yr(a,b){var c=a.g[b];null==c&&(c=0);return c};function Zr(a){var b=this;if(a&&a.constructor!=V)throw new M(2,9,9008);this.O=this.o=null;a?(this.o=a.o,this.O=a.Sb()):(this.o=Zj(),this.O=new bh);this.Lc=[];this.Zb=[];this.Bd=[];var c=!a;this.J=new cf(function(){var d,e,f,g,h;return F(function(k){switch(k.g){case 1:return v(k,Promise.all(b.Bd.map(function(l){return Xq(l)})),2);case 2:d=function(){};e=[];f=t(b.Zb);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return v(k,Promise.all(e),3);case 3:if(!c){k.v(4);break}return v(k,b.O.destroy(),
729
- 4);case 4:b.o=null,b.O=null,z(k)}})})}function $r(){if($b())a:{var a=t(mr.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=Zr.prototype;q.destroy=function(){return this.J.destroy()};
730
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Xj(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Hb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return bk(this.o,a)};q.getConfiguration=function(){var a=Zj();bk(a,this.o,Zj());return a};q.Sb=function(){return this.O};
731
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Vq(this.O);this.Bd.push(f);b=as(this,a,b||{},function(){var h;return F(function(k){if(1==k.g)return v(k,ii(a,d.O,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Ob(h))})},e,f);var g=new Qg(b,function(){return Xq(f)});g["finally"](function(){wc(d.Bd,f)});g.then=function(h){Hb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
732
- return g.promise.then(h)};return bs(this,g)};q.df=function(){Hb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
733
- function as(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,x,w;return F(function(y){switch(y.g){case 1:return cs(),h=g=null,k=new lr,m=l=null,B(y,2,3),v(y,d(),5);case 5:return g=y.h,v(y,ds(a,b,g,e),6);case 6:n=y.h;es(a);p=!n.presentationTimeline.Y()&&!n.presentationTimeline.kb();if(!p)throw new M(2,9,9005,b);return v(y,fs(a,n,function(C){m=m||C},e),7);case 7:h=y.h;es(a);if(m)throw m;return v(y,a.wc(n,h,e),8);case 8:return v(y,k.init(),9);case 9:return es(a),v(y,nr(k),10);case 10:return l=y.h,es(a),v(y,gs(a,l.la,
734
- h,n,b,c,e,f),11);case 11:r=y.h;es(a);if(m)throw m;return v(y,l.la.addManifests([r]),12);case 12:return u=y.h,es(a),x=new Er("manifest",l.path.Ia,l.path.la,u[0]),y["return"](Vr(x,r));case 3:return wa(y),a.Lc=[],v(y,k.destroy(),13);case 13:if(!g){y.v(14);break}return v(y,g.stop(),14);case 14:if(!h){y.v(16);break}return v(y,h.destroy(),16);case 16:xa(y,0);break;case 2:w=va(y);if(!l){y.v(18);break}return v(y,l.la.removeSegments(a.Lc,function(){}),18);case 18:throw m||w;}})}
735
- q.wc=function(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,x,w,y,C,D,A,E,G,H,L,I,K,Q,R;return F(function(O){switch(O.g){case 1:d={width:Infinity,height:Infinity};Yf(a,c.restrictions,d);c.useMediaCapabilities?cg(a,c.offline.usePersistentLicense):(bg(a),ag(a,b));e=[];f=c.preferredAudioChannelCount;Sf(a,f);g=t(a.variants);for(h=g.next();!h.done;h=g.next())k=h.value,e.push(lg(k));l=t(a.textStreams);for(m=l.next();!m.done;m=l.next())n=m.value,e.push(mg(n));p=t(a.imageStreams);for(r=p.next();!r.done;r=p.next())u=
736
- r.value,e.push(ng(u));return v(O,c.offline.trackSelectionCallback(e),2);case 2:x=O.h;w=a.presentationTimeline.getDuration();y=0;C=t(x);for(D=C.next();!D.done;D=C.next())A=D.value,E=A.bandwidth*w/8,y+=E;B(O,3);return v(O,c.offline.downloadSizeCallback(y),5);case 5:G=O.h;if(!G)throw new M(2,9,9014);ua(O,4);break;case 3:H=va(O);if(H instanceof M)throw H;throw new M(2,9,9015);case 4:L=new Set;I=new Set;K=new Set;Q=t(x);for(D=Q.next();!D.done;D=Q.next())R=D.value,"variant"==R.type&&L.add(R.id),"text"==
737
- R.type&&I.add(R.id),"image"==R.type&&K.add(R.id);a.variants=a.variants.filter(function(T){return L.has(T.id)});a.textStreams=a.textStreams.filter(function(T){return I.has(T.id)});a.imageStreams=a.imageStreams.filter(function(T){return K.has(T.id)});hs(a);z(O)}})};
738
- function gs(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,u,x,w,y,C,D;return F(function(A){switch(A.g){case 1:return k=Tr(e,d,f),l=g.offline.progressCallback,m=function(E,G){k.size=G;l(k,E)},n=function(E,G){u&&g.offline.usePersistentLicense&&x==G&&Jh(c,"cenc",E)},Wq(h,m,n),p=d.variants.some(function(E){var G=E.audio&&E.audio.encrypted;return E.video&&E.video.encrypted||G}),r=d.variants.some(function(E){return(E.video?E.video.drmInfos:[]).concat(E.audio?E.audio.drmInfos:[]).some(function(G){return G.initData&&
739
- G.initData.length})}),u=p&&!r,x=null,u&&(w=c.i,x=is.get(w.keySystem)),ta(A),C=y=js(a,h,b,c,d,e,f,g),v(A,ar(h),4);case 4:C.size=A.h;y.expiration=c.Rb();D=Th(c);y.sessionIds=g.offline.usePersistentLicense?D:[];if(p&&g.offline.usePersistentLicense&&!D.length)throw new M(2,9,9007);return A["return"](y);case 2:return wa(A),v(A,h.destroy(),5);case 5:xa(A,0)}})}q.remove=function(a){return ks(this,ls(this,a))};
740
- function ls(a,b){var c,d,e,f,g,h;return F(function(k){switch(k.g){case 1:cs();c=Fr(b);if(null==c||"manifest"!=c.g)throw new M(2,9,9004,b);d=c;e=new lr;ta(k);return v(k,e.init(),4);case 4:return v(k,pr(e,d.Ia(),d.la()),5);case 5:return f=k.h,v(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],v(k,Promise.all([ms(a,h,e),ns(f,d,h)]),2);case 2:return wa(k),v(k,e.destroy(),8);case 8:xa(k,0)}})}
741
- function os(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:Pe(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Pe(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function ms(a,b,c){return F(function(d){return v(d,ps(a.O,a.o.drm,c,b),0)})}
742
- function ns(a,b,c){function d(){}var e=qs(c);Vr(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Af=function(){return ks(this,rs(this))};
743
- function rs(a){var b,c,d,e,f,g,h,k,l,m;return F(function(n){switch(n.g){case 1:return cs(),b=a.O,c=a.o.drm,d=new lr,e=!1,ta(n),v(n,d.init(),4);case 4:f=[],qr(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.v(2);break}k=h.value;return v(n,k.getAll(),8);case 8:return l=n.h,v(n,Qr(c,b,l),9);case 9:return m=n.h,v(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.v(5);break;case 2:return wa(n),v(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
744
- q.list=function(){return ks(this,ss())};function ss(){var a,b,c;return F(function(d){switch(d.g){case 1:return cs(),a=[],b=new lr,ta(d),v(d,b.init(),4);case 4:return c=Promise.resolve(),or(b,function(e,f){c=c.then(function(){var g;return F(function(h){if(1==h.g)return v(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Vr(new Er("manifest",e.Ia,e.la,l),k);a.push(m)});z(h)})})}),v(d,c,2);case 2:return wa(d),v(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
745
- function ds(a,b,c,d){var e,f,g,h,k;return F(function(l){if(1==l.g)return e=null,f=a.O,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),es(a),v(l,c.start(b,g),2);if(3!=l.g)return h=l.h,es(a),k=ts(h),v(l,Promise.all(hb(k,
746
- function(m){return m.createSegmentIndex()})),3);es(a);if(e)throw e;return l["return"](h)})}function fs(a,b,c,d){var e;return F(function(f){switch(f.g){case 1:return e=new sh({Ab:a.O,onError:c,Gc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),v(f,xh(e,b.variants,d.offline.usePersistentLicense,d.useMediaCapabilities),2);case 2:return v(f,Kh(e),3);case 3:return v(f,Ih(e),4);case 4:return f["return"](e)}})}
747
- function js(a,b,c,d,e,f,g,h){for(var k=new Wr,l=t(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var p=m.audio,r=m.video;p&&!r&&(n.g[p.id]=p.bandwidth||m.bandwidth);!p&&r&&(n.g[r.id]=r.bandwidth||m.bandwidth);if(p&&r){var u=p.bandwidth||393216,x=r.bandwidth||m.bandwidth-u;0>=x&&(x=m.bandwidth);n.g[p.id]=u;n.g[r.id]=x}}l=t(e.textStreams);for(n=l.next();!n.done;n=l.next())k.g[n.value.id]=52;l=t(e.imageStreams);for(n=l.next();!n.done;n=l.next())n=n.value,k.g[n.id]=n.bandwidth||2048;n=new Map;
748
- n.set(null,Promise.resolve(null));m=new Map;p=ts(e);l=new Map;p=t(p);for(r=p.next();!r.done;r=p.next())r=r.value,u=us(a,b,c,k,e,r,h,n,m),l.set(r.id,u);a=t(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.i)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,
749
- expiration:d.Rb(),streams:a,sessionIds:h?Th(d):[],drmInfo:b,appMetadata:g}}
750
- function us(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,closedCaptions:f.closedCaptions,
751
- tilesLayout:f.tilesLayout},m=f.id;vs(f,e.presentationTimeline.Za(),function(n){var p=ws(a,b,m,f.id,c,d,n.h,g,h),r=xs(a,b,m,f.id,c,d,n,g,k);$q(b,m,function(){var u,x;return F(function(w){if(1==w.g)return v(w,p,2);if(3!=w.g)return u=w.h,v(w,r,3);x=w.h;l.segments.push({initSegmentKey:u,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,dataKey:x});z(w)})})});return l}
752
- function ws(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=$i(g.ma(),g.ja,g.ea,h.streaming.retryParameters);b=Yq(b,c,h,.5*Yr(f,d),!0,function(l){var m;return F(function(n){if(1==n.g)return v(n,e.addSegments([{data:l}]),2);m=n.h;a.Lc.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
753
- function xs(a,b,c,d,e,f,g,h,k){var l=[g.ma()[0],g.ja,g.ea].join("-");if(k.has(l))return k.get(l);h=$i(g.ma(),g.ja,g.ea,h.streaming.retryParameters);b=Yq(b,c,h,Xr(f,d,g),!1,function(m){var n;return F(function(p){if(1==p.g)return v(p,e.addSegments([{data:m}]),2);n=p.h;a.Lc.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function vs(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function es(a){if(a.J.g)throw new M(2,9,7001);}
754
- function cs(){if(!$r())throw new M(2,9,9E3);}function ks(a,b){return F(function(c){if(1==c.g)return a.Zb.push(b),ta(c),v(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);wc(a.Zb,b);return xa(c,0)})}function bs(a,b){var c=b.promise;a.Zb.push(c);return b["finally"](function(){wc(a.Zb,c)})}
755
- function qs(a){var b=[];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.push(d.initSegmentKey),b.push(d.dataKey)}return b}
756
- function ps(a,b,c,d){var e,f,g;return F(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=rr(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:os(d,!1),videoCapabilities:os(d,!0)}});return v(h,Qr(b,a,f),2)}return 3!=h.g?(g=h.h,v(h,e.remove(g),3)):v(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
757
- function ts(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}
758
- function hs(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}J("shaka.offline.Storage",Zr);Zr.deleteAll=function(){var a;return F(function(b){return 1==b.g?(a=new lr,ta(b),v(b,sr(a),2)):5!=b.g?(wa(b),v(b,a.destroy(),5)):xa(b,0)})};Zr.prototype.list=Zr.prototype.list;
759
- Zr.prototype.removeEmeSessions=Zr.prototype.Af;Zr.prototype.remove=Zr.prototype.remove;Zr.prototype.getStoreInProgress=Zr.prototype.df;Zr.prototype.store=Zr.prototype.store;Zr.prototype.getNetworkingEngine=Zr.prototype.Sb;Zr.prototype.getConfiguration=Zr.prototype.getConfiguration;Zr.prototype.configure=Zr.prototype.configure;Zr.prototype.destroy=Zr.prototype.destroy;Zr.support=$r;
760
- var is=(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");
761
- Vl.offline=$r;function ys(){}function zs(a,b){for(var c={priority:b||0,Ce:a},d=t(mb(As)),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.ha;if(e.item.priority<c.priority){As.splice(f,0,c);return}}As.push(c)}J("shaka.polyfill",ys);ys.register=zs;ys.installAll=function(){for(var a=t(As),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Ce()}catch(c){Va("Error installing polyfill!",c)}}};var As=[];function Bs(){}function Cs(){Ds()}ys.EncryptionScheme=Bs;Bs.install=Cs;zs(Cs,-2);function Es(){}
762
- function Fs(){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}}),
763
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Gs);document.addEventListener("webkitfullscreenerror",Gs);document.addEventListener("mozfullscreenchange",Gs);document.addEventListener("mozfullscreenerror",Gs);document.addEventListener("MSFullscreenChange",Gs);document.addEventListener("MSFullscreenError",Gs)}}
764
- function Gs(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)}ys.Fullscreen=Es;Es.install=Fs;zs(Fs);function Hs(){}function Is(){}ys.MathRound=Hs;Hs.install=Is;zs(Is);function Js(){}function Ks(){if(fc()||gc()||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),navigator.mediaCapabilities.decodingInfo=Ls;window.shakaMediaCapabilities=navigator.mediaCapabilities}
765
- function Ls(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,x,w;return F(function(y){switch(y.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return y["return"](b);if("media-source"==a.type){if(!$b()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return y["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=ac(g),!h)||a.audio&&(k=a.audio.contentType,
766
- l=ac(k),!l))return y["return"](b)}else return y["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,y["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(r={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(r));m.video&&(u={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(u));x={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
767
- n.length&&(x.audioCapabilities=n);p.length&&(x.videoCapabilities=p);B(y,3);return v(y,navigator.requestMediaKeySystemAccess(m.keySystem,[x]),5);case 5:w=y.h;ua(y,4);break;case 3:va(y);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return y["return"](b)}})}ys.MediaCapabilities=Js;Js.install=Ks;zs(Ks,-1);function Ms(){}function Ns(){var a=hc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Os():a?(Ps(),12>=a?(Qs(),Rs()):Qs()):(dc("Tizen 2")||dc("Tizen 3")||dc("Tizen 4"))&&Ss());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Ts()}
768
- function Qs(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];c=a.apply(this,c);c.abort=function(){};return c}}function Rs(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Ps(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
769
- function Ss(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Te(b)&&a(b)}}function Os(){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)}}
770
- function Ts(){var a=MediaSource.isTypeSupported;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)}}ys.MediaSource=Ms;Ms.install=Ns;zs(Ns);function Us(){}function Vs(){screen.orientation||void 0!=window.orientation&&Ws()}function Ws(){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 Xs;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new P("change",{});b.dispatchEvent(c)})}
771
- ys.Orientation=Us;Us.install=Vs;function Xs(){Xg.call(this);this.type="";this.angle=0}pa(Xs,Xg);
772
- Xs.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)};
773
- Xs.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};zs(Vs);function Ys(){}function Zs(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=$s,window.MediaKeys=at,window.MediaKeySystemAccess=bt,navigator.requestMediaKeySystemAccess=ct)}function ct(a,b){try{var c=new bt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
774
- function $s(a){var b=this.mediaKeys;b&&b!=a&&dt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?dt(a,this):Promise.resolve()}function et(a){a=qb(a.initData);if(tb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=xb(a.subarray(4),!0);a=Ab(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=rb(a);this.dispatchEvent(b)}ys.PatchedMediaKeysApple=Ys;Ys.install=Zs;
775
- function bt(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
723
+ function Tr(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=b.next())for(e=
724
+ e.value,g=Ur(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=Ur(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}
725
+ function Ur(a,b,c){var d=b.segments.map(function(e){return Vr(a,e)});c.Db(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U(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,
726
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Vr(a,b){var c=new Pr("segment",a.h,a.g,b.dataKey);return new mi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Wr(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
727
+ function Wr(a,b){var c=new Pr("segment",a.h,a.g,b);return new ki(function(){return[c.toString()]},0,null)};function Xr(){this.g=null}q=Xr.prototype;q.configure=function(){};
728
+ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=Qr(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new wr;va(m);return v(m,e.init(),4);case 4:return v(m,Ar(e,d.Ka(),d.ma()),5);case 5:return f=m.h,v(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Rr(d.Ka(),d.ma()),l=Sr(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return xa(m),v(m,e.destroy(),7);case 7:Aa(m,0)}})};q.stop=function(){return Promise.resolve()};
729
+ q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new wr,A(m,2,3),v(m,e.init(),5);case 5:return v(m,Ar(e,d.Ka(),d.ma()),6);case 6:return f=m.h,v(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.v(3);break}return v(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),v(m,e.destroy(),10);case 10:Aa(m,0);break;case 2:E(m),m.v(3)}})};
730
+ cg["application/x-offline-manifest"]=function(){return new Xr};function Yr(){}function Zr(a){var b=Qr(a);b&&"manifest"==b.g?(a={uri:a,me:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ge(a)):a=b&&"segment"==b.g?$r(b.key(),b):Ee(new N(2,1,9004,a));return a}
731
+ function $r(a,b){var c=new wr;return Ge(void 0).ca(function(){return c.init()}).ca(function(){return Ar(c,b.Ka(),b.ma())}).ca(function(d){return d.getSegments([b.key()])}).ca(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",Yr);Yr.plugin=Zr;Re("offline",Zr);function as(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,u=t(m),y=u.next();!y.done;y=u.next())if(y=y.value,bs(y.info,p)){y.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.v(4);break}g=f.value;h=cs(a,b,g);return v(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.v(2);break;case 4:return l["return"](d)}})}
732
+ function cs(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new qf({nb:b,onError:function(){},Ic:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),A(f,2),d.configure(a),v(f,yf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:wa(f,3);break;case 2:return E(f),v(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return A(f,6),v(f,Hf(d),8);case 8:wa(f,7);break;case 6:return E(f),v(f,d.destroy(),
733
+ 9);case 9:return f["return"]([]);case 7:return e=[],v(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==h.g)return A(h,2),v(h,If(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);E(h);z(h)})})),10);case 10:return v(f,d.destroy(),11);case 11:return f["return"](e)}})}
734
+ function bs(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&ob(a.audioCapabilities,b.audioCapabilities,c)&&ob(a.videoCapabilities,b.videoCapabilities,c)};function ds(a,b,c){var d=b.presentationTimeline.getDuration();b=es(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function fs(a,b){var c=Sr(new Rr(a.Ka(),a.ma()),b),d=b.appMetadata||{};c=es(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
735
+ function es(a){var b=[],c=ge(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Xd(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Yd(c.value));return b};function gs(){this.g={}}function hs(a,b,c){c=c.endTime-c.startTime;return is(a,b)*c}function is(a,b){var c=a.g[b];null==c&&(c=0);return c};function js(a){var b=this;if(a&&a.constructor!=V)throw new N(2,9,9008);this.P=this.o=null;a?(this.o=a.o,this.P=a.Wb()):(this.o=Xj(),this.P=new Qe);this.Nc=[];this.cc=[];this.Fd=[];var c=!a;this.J=new af(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return v(k,Promise.all(b.Fd.map(function(l){return gr(l)})),2);case 2:d=function(){};e=[];f=t(b.cc);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return v(k,Promise.all(e),3);case 3:if(!c){k.v(4);break}return v(k,b.P.destroy(),
736
+ 4);case 4:b.o=null,b.P=null,z(k)}})})}function ks(){if(qd())a:{var a=t(xr.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=js.prototype;q.destroy=function(){return this.J.destroy()};
737
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Vj(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Tb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return Zj(this.o,a)};q.getConfiguration=function(){var a=Xj();Zj(a,this.o,Xj());return a};q.Wb=function(){return this.P};
738
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new fr(this.P);this.Fd.push(f);b=ls(this,a,b||{},function(){var h;return K(function(k){if(1==k.g)return v(k,bg(a,d.P,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"]($b(h))})},e,f);var g=new De(b,function(){return gr(f)});g["finally"](function(){nb(d.Fd,f)});g.then=function(h){Tb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
739
+ return g.promise.then(h)};return ms(this,g)};q.lf=function(){Tb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
740
+ function ls(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,y,w;return K(function(x){switch(x.g){case 1:return ns(),h=g=null,k=new wr,m=l=null,A(x,2,3),v(x,d(),5);case 5:return g=x.h,v(x,os(a,b,g,e),6);case 6:n=x.h;ps(a);p=!n.presentationTimeline.Y()&&!n.presentationTimeline.mb();if(!p)throw new N(2,9,9005,b);return v(x,qs(a,n,function(C){m=m||C},e),7);case 7:h=x.h;ps(a);if(m)throw m;return v(x,rs(n,e),8);case 8:return v(x,k.init(),9);case 9:return ps(a),v(x,yr(k),10);case 10:return l=x.h,ps(a),v(x,ss(a,l.ma,
741
+ h,n,b,c,e,f),11);case 11:r=x.h;ps(a);if(m)throw m;return v(x,l.ma.addManifests([r]),12);case 12:return u=x.h,ps(a),y=new Pr("manifest",l.path.Ka,l.path.ma,u[0]),x["return"](fs(y,r));case 3:return xa(x),a.Nc=[],v(x,k.destroy(),13);case 13:if(!g){x.v(14);break}return v(x,g.stop(),14);case 14:if(!h){x.v(16);break}return v(x,h.destroy(),16);case 16:Aa(x,0);break;case 2:w=E(x);if(!l){x.v(18);break}return v(x,l.ma.removeSegments(a.Nc,function(){}),18);case 18:throw m||w;}})}
742
+ function rs(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,y,w,x,C,D,B,F,G,H,L,I,J,P,Q,ba,aa;return K(function(S){switch(S.g){case 1:c={width:Infinity,height:Infinity};Md(a,b.restrictions,c);Pd(a,b.offline.usePersistentLicense);d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Ad(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(Xd(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,d.push(Yd(r));u=
743
+ t(a.imageStreams);for(y=u.next();!y.done;y=u.next())w=y.value,d.push(Zd(w));return v(S,b.offline.trackSelectionCallback(d),2);case 2:x=S.h;C=a.presentationTimeline.getDuration();D=0;B=t(x);for(F=B.next();!F.done;F=B.next())G=F.value,H=G.bandwidth*C/8,D+=H;A(S,3);return v(S,b.offline.downloadSizeCallback(D),5);case 5:L=S.h;if(!L)throw new N(2,9,9014);wa(S,4);break;case 3:I=E(S);if(I instanceof N)throw I;throw new N(2,9,9015);case 4:J=new Set;P=new Set;Q=new Set;ba=t(x);for(F=ba.next();!F.done;F=ba.next())aa=
744
+ F.value,"variant"==aa.type&&J.add(aa.id),"text"==aa.type&&P.add(aa.id),"image"==aa.type&&Q.add(aa.id);a.variants=a.variants.filter(function(ya){return J.has(ya.id)});a.textStreams=a.textStreams.filter(function(ya){return P.has(ya.id)});a.imageStreams=a.imageStreams.filter(function(ya){return Q.has(ya.id)});ts(a);z(S)}})}
745
+ function ss(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,u,y,w,x,C,D;return K(function(B){switch(B.g){case 1:return k=ds(e,d,f),l=g.offline.progressCallback,m=function(F,G){k.size=G;l(k,F)},n=function(F,G){u&&g.offline.usePersistentLicense&&y==G&&Gf(c,"cenc",F)},hr(h,m,n),p=d.variants.some(function(F){var G=F.audio&&F.audio.encrypted;return F.video&&F.video.encrypted||G}),r=d.variants.some(function(F){return(F.video?F.video.drmInfos:[]).concat(F.audio?F.audio.drmInfos:[]).some(function(G){return G.initData&&
746
+ G.initData.length})}),u=p&&!r,y=null,u&&(w=c.i,y=us.get(w.keySystem)),va(B),C=x=vs(a,h,b,c,d,e,f,g),v(B,lr(h),4);case 4:C.size=B.h;x.expiration=c.Vb();D=Mf(c);x.sessionIds=g.offline.usePersistentLicense?D:[];if(p&&g.offline.usePersistentLicense&&!D.length)throw new N(2,9,9007);return B["return"](x);case 2:return xa(B),v(B,h.destroy(),5);case 5:Aa(B,0)}})}q.remove=function(a){return ws(this,xs(this,a))};
747
+ function xs(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:ns();c=Qr(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new wr;va(k);return v(k,e.init(),4);case 4:return v(k,Ar(e,d.Ka(),d.ma()),5);case 5:return f=k.h,v(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],v(k,Promise.all([ys(a,h,e),zs(f,d,h)]),2);case 2:return xa(k),v(k,e.destroy(),8);case 8:Aa(k,0)}})}
748
+ function As(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:Tc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Tc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function ys(a,b,c){return K(function(d){return v(d,Bs(a.P,a.o.drm,c,b),0)})}
749
+ function zs(a,b,c){function d(){}var e=Cs(c);fs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Jf=function(){return ws(this,Ds(this))};
750
+ function Ds(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return ns(),b=a.P,c=a.o.drm,d=new wr,e=!1,va(n),v(n,d.init(),4);case 4:f=[],Br(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.v(2);break}k=h.value;return v(n,k.getAll(),8);case 8:return l=n.h,v(n,as(c,b,l),9);case 9:return m=n.h,v(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.v(5);break;case 2:return xa(n),v(n,d.destroy(),11);case 11:Aa(n,3);break;case 3:return n["return"](!e)}})}
751
+ q.list=function(){return ws(this,Es())};function Es(){var a,b,c;return K(function(d){switch(d.g){case 1:return ns(),a=[],b=new wr,va(d),v(d,b.init(),4);case 4:return c=Promise.resolve(),zr(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return v(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=fs(new Pr("manifest",e.Ka,e.ma,l),k);a.push(m)});z(h)})})}),v(d,c,2);case 2:return xa(d),v(d,b.destroy(),6);case 6:Aa(d,3);break;case 3:return d["return"](a)}})}
752
+ function os(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=null,f=a.P,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),ps(a),v(l,c.start(b,g),2);if(3!=l.g)return h=l.h,ps(a),k=Fs(h),v(l,Promise.all(gb(k,
753
+ function(m){return m.createSegmentIndex()})),3);ps(a);if(e)throw e;return l["return"](h)})}function qs(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new qf({nb:a.P,onError:c,Ic:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),v(f,vf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return v(f,Hf(e),3);case 3:return v(f,Ff(e),4);case 4:return f["return"](e)}})}
754
+ function vs(a,b,c,d,e,f,g,h){for(var k=new gs,l=t(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var p=m.audio,r=m.video;p&&!r&&(n.g[p.id]=p.bandwidth||m.bandwidth);!p&&r&&(n.g[r.id]=r.bandwidth||m.bandwidth);if(p&&r){var u=p.bandwidth||393216,y=r.bandwidth||m.bandwidth-u;0>=y&&(y=m.bandwidth);n.g[p.id]=u;n.g[r.id]=y}}l=t(e.textStreams);for(n=l.next();!n.done;n=l.next())k.g[n.value.id]=52;l=t(e.imageStreams);for(n=l.next();!n.done;n=l.next())n=n.value,k.g[n.id]=n.bandwidth||2048;n=new Map;
755
+ n.set(null,Promise.resolve(null));m=new Map;p=Fs(e);l=new Map;p=t(p);for(r=p.next();!r.done;r=p.next())r=r.value,u=Gs(a,b,c,k,e,r,h,n,m),l.set(r.id,u);a=t(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.i)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,
756
+ expiration:d.Vb(),streams:a,sessionIds:h?Mf(d):[],drmInfo:b,appMetadata:g}}
757
+ function Gs(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,closedCaptions:f.closedCaptions,
758
+ tilesLayout:f.tilesLayout},m=f.id;Hs(f,e.presentationTimeline.ab(),function(n){var p=Is(a,b,m,f.id,c,d,n.h,g,h),r=Js(a,b,m,f.id,c,d,n,g,k);kr(b,m,function(){var u,y;return K(function(w){if(1==w.g)return v(w,p,2);if(3!=w.g)return u=w.h,v(w,r,3);y=w.h;l.segments.push({initSegmentKey:u,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,dataKey:y});z(w)})})});return l}
759
+ function Is(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=Xi(g.na(),g.ka,g.fa,h.streaming.retryParameters);b=ir(b,c,h,.5*is(f,d),!0,function(l){var m;return K(function(n){if(1==n.g)return v(n,e.addSegments([{data:l}]),2);m=n.h;a.Nc.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
760
+ function Js(a,b,c,d,e,f,g,h,k){var l=[g.na()[0],g.ka,g.fa].join("-");if(k.has(l))return k.get(l);h=Xi(g.na(),g.ka,g.fa,h.streaming.retryParameters);b=ir(b,c,h,hs(f,d,g),!1,function(m){var n;return K(function(p){if(1==p.g)return v(p,e.addSegments([{data:m}]),2);n=p.h;a.Nc.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function Hs(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function ps(a){if(a.J.g)throw new N(2,9,7001);}
761
+ function ns(){if(!ks())throw new N(2,9,9E3);}function ws(a,b){return K(function(c){if(1==c.g)return a.cc.push(b),va(c),v(c,b,4);if(2!=c.g)return c["return"](c.h);xa(c);nb(a.cc,b);return Aa(c,0)})}function ms(a,b){var c=b.promise;a.cc.push(c);return b["finally"](function(){nb(a.cc,c)})}
762
+ function Cs(a){var b=[];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.push(d.initSegmentKey),b.push(d.dataKey)}return b}
763
+ function Bs(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Cr(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:As(d,!1),videoCapabilities:As(d,!0)}});return v(h,as(b,a,f),2)}return 3!=h.g?(g=h.h,v(h,e.remove(g),3)):v(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
764
+ function Fs(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}
765
+ function ts(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",js);js.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new wr,va(b),v(b,Dr(a),2)):5!=b.g?(xa(b),v(b,a.destroy(),5)):Aa(b,0)})};js.prototype.list=js.prototype.list;
766
+ js.prototype.removeEmeSessions=js.prototype.Jf;js.prototype.remove=js.prototype.remove;js.prototype.getStoreInProgress=js.prototype.lf;js.prototype.store=js.prototype.store;js.prototype.getNetworkingEngine=js.prototype.Wb;js.prototype.getConfiguration=js.prototype.getConfiguration;js.prototype.configure=js.prototype.configure;js.prototype.destroy=js.prototype.destroy;js.support=ks;
767
+ var us=(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");
768
+ Zl.offline=ks;function Ks(){}function Ls(a,b){for(var c={priority:b||0,He:a},d=t(lb(Ms)),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.ga;if(e.item.priority<c.priority){Ms.splice(f,0,c);return}}Ms.push(c)}M("shaka.polyfill",Ks);Ks.register=Ls;Ks.installAll=function(){for(var a=t(Ms),b=a.next();!b.done;b=a.next()){b=b.value;try{b.He()}catch(c){Xa("Error installing polyfill!",c)}}};var Ms=[];function Ns(){}function Os(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Ps(b.value)}function Ps(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)}})}Ks.Aria=Ns;Ns.install=Os;Ls(Os);function Qs(){}function Rs(){Ss()}Ks.EncryptionScheme=Qs;Qs.install=Rs;Ls(Rs,-2);function Ts(){}
769
+ function Us(){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}}),
770
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Vs);document.addEventListener("webkitfullscreenerror",Vs);document.addEventListener("mozfullscreenchange",Vs);document.addEventListener("mozfullscreenerror",Vs);document.addEventListener("MSFullscreenChange",Vs);document.addEventListener("MSFullscreenError",Vs)}}
771
+ function Vs(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)}Ks.Fullscreen=Ts;Ts.install=Us;Ls(Us);function Ws(){}function Xs(){}Ks.MathRound=Ws;Ws.install=Xs;Ls(Xs);function Ys(){}function Zs(){if(vd()||wd()||ud("PlayStation 5")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),navigator.mediaCapabilities.decodingInfo=$s;window.shakaMediaCapabilities=navigator.mediaCapabilities}
772
+ function $s(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,y,w;return K(function(x){switch(x.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return x["return"](b);if("media-source"==a.type){if(!qd()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return x["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=rd(g),!h)||a.audio&&(k=a.audio.contentType,
773
+ l=rd(k),!l))return x["return"](b)}else return x["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,x["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(r={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(r));m.video&&(u={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(u));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
774
+ n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);A(x,3);return v(x,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:w=x.h;wa(x,4);break;case 3:E(x);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return x["return"](b)}})}Ks.MediaCapabilities=Ys;Ys.install=Zs;Ls(Zs,-1);function at(){}function bt(){var a=xd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?ct():a?(dt(),12>=a?(et(),ft()):et()):(ud("Tizen 2")||ud("Tizen 3")||ud("Tizen 4"))&&gt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&ht()}
775
+ function et(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];c=a.apply(this,c);c.abort=function(){};return c}}function ft(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function dt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
776
+ function gt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Vc(b)&&a(b)}}function ct(){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)}}
777
+ function ht(){var a=MediaSource.isTypeSupported;ud("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)})}Ks.MediaSource=at;at.install=bt;Ls(bt);function it(){}function jt(){screen.orientation||void 0!=window.orientation&&kt()}function kt(){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 lt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new R("change");b.dispatchEvent(c)})}Ks.Orientation=it;
778
+ it.install=jt;function lt(){Le.call(this);this.type="";this.angle=0}ra(lt,Le);
779
+ lt.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)};
780
+ lt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Ls(jt);function mt(){}function nt(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ot,window.MediaKeys=pt,window.MediaKeySystemAccess=qt,navigator.requestMediaKeySystemAccess=rt)}function rt(a,b){try{var c=new qt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
781
+ function ot(a){var b=this.mediaKeys;b&&b!=a&&st(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?st(a,this):Promise.resolve()}function tt(a){a=Ob(a.initData);if(Rb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Cc(a.subarray(4),!0);a=Fc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Pb(a);this.dispatchEvent(b)}Ks.PatchedMediaKeysApple=mt;mt.install=nt;
782
+ function qt(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
776
783
  k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=t(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.g=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
777
- bt.prototype.createMediaKeys=function(){var a=new at(this.keySystem);return Promise.resolve(a)};bt.prototype.getConfiguration=function(){return this.g};function at(a){this.g=new WebKitMediaKeys(a);this.h=new gf}at.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new ft(this.g,a)};at.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
778
- function dt(a,b){a.h.mb();if(!b)return Promise.resolve();a.h.B(b,"webkitneedkey",et);try{return wi(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.webkitSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function ft(a){Xg.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new gf;this.sessionId="";this.expiration=NaN;this.closed=new Ge;this.keyStatuses=new gt}pa(ft,Xg);q=ft.prototype;
779
- q.generateRequest=function(a,b){var c=this;this.g=new Ge;try{var d=this.l.createSession("video/mp4",qb(b));this.j=d;this.sessionId=d.sessionId||"";this.h.B(this.j,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=new P("message",{messageType:void 0==c.keyStatuses.g?"license-request":"license-renewal",message:rb(e.message)});c.dispatchEvent(e)});this.h.B(d,"webkitkeyadded",function(){c.i&&(ht(c,"usable"),c.i.resolve(),c.i=null)});this.h.B(d,"webkitkeyerror",function(){var e=Error("EME PatchedMediaKeysApple key error");
780
- e.errorCode=c.j.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.i)c.i.reject(e),c.i=null;else switch(c.j.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:ht(c,"output-not-allowed");break;default:ht(c,"internal-error")}});ht(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};q.update=function(a){this.i=new Ge;try{this.j.update(qb(a))}catch(b){this.i.reject(b)}return this.i};
781
- q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.mb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function ht(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new P("keystatuseschange");a.dispatchEvent(c)}function gt(){this.size=0;this.g=void 0}q=gt.prototype;q.forEach=function(a){this.g&&a(this.g,gi.value())};
782
- q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=gi.value();return this.g&&ob(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};zs(Zs);function it(){}function jt(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=kt,window.MediaKeySystemAccess=lt,navigator.requestMediaKeySystemAccess=mt,HTMLMediaElement.prototype.setMediaKeys=nt)}function mt(a,b){try{var c=new lt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
783
- function ot(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=rb(tn(a.initData));this.dispatchEvent(b)}}ys.PatchedMediaKeysMs=it;it.install=jt;
784
- function lt(a,b){this.keySystem=a;for(var c=!1,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
784
+ qt.prototype.createMediaKeys=function(){var a=new pt(this.keySystem);return Promise.resolve(a)};qt.prototype.getConfiguration=function(){return this.g};function pt(a){this.g=new WebKitMediaKeys(a);this.h=new cf}pt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new ut(this.g,a)};pt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
785
+ function st(a,b){a.h.pb();if(!b)return Promise.resolve();a.h.A(b,"webkitneedkey",tt);try{return ti(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.webkitSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function ut(a){Le.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new cf;this.sessionId="";this.expiration=NaN;this.closed=new yc;this.keyStatuses=new vt}ra(ut,Le);q=ut.prototype;
786
+ q.generateRequest=function(a,b){var c=this;this.g=new yc;try{var d=this.l.createSession("video/mp4",Ob(b));this.j=d;this.sessionId=d.sessionId||"";this.h.A(this.j,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Pb(e.message));e=new R("message",e);c.dispatchEvent(e)});this.h.A(d,"webkitkeyadded",function(){c.i&&(wt(c,"usable"),c.i.resolve(),c.i=null)});this.h.A(d,"webkitkeyerror",function(){var e=
787
+ Error("EME PatchedMediaKeysApple key error");e.errorCode=c.j.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.i)c.i.reject(e),c.i=null;else switch(c.j.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:wt(c,"output-not-allowed");break;default:wt(c,"internal-error")}});wt(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
788
+ q.update=function(a){this.i=new yc;try{this.j.update(Ob(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.pb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function wt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}
789
+ function vt(){this.size=0;this.g=void 0}q=vt.prototype;q.forEach=function(a){this.g&&a(this.g,$f.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=$f.value();return this.g&&Mb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Ls(nt);function xt(){}function yt(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=zt,window.MediaKeySystemAccess=At,navigator.requestMediaKeySystemAccess=Bt,HTMLMediaElement.prototype.setMediaKeys=Ct)}function Bt(a,b){try{var c=new At(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
790
+ function Dt(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Pb(zn(a.initData));this.dispatchEvent(b)}}Ks.PatchedMediaKeysMs=xt;xt.install=yt;
791
+ function At(a,b){this.keySystem=a;for(var c=!1,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
785
792
  !0));if(e.videoCapabilities)for(h=t(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.g=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
786
- lt.prototype.createMediaKeys=function(){var a=new kt(this.keySystem);return Promise.resolve(a)};lt.prototype.getConfiguration=function(){return this.g};function nt(a){var b=this.mediaKeys;b&&b!=a&&pt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?pt(a,this):Promise.resolve()}function kt(a){this.g=new MSMediaKeys(a);this.h=new gf}
787
- kt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new qt(this.g,a)};kt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function pt(a,b){a.h.mb();if(!b)return Promise.resolve();a.h.B(b,"msneedkey",ot);try{return wi(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.msSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
788
- function qt(a){Xg.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new gf;this.sessionId="";this.expiration=NaN;this.closed=new Ge;this.keyStatuses=new rt}pa(qt,Xg);q=qt.prototype;
789
- q.generateRequest=function(a,b){var c=this;this.g=new Ge;try{this.j=this.l.createSession("video/mp4",qb(b),null),this.h.B(this.j,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=new P("message",{messageType:void 0==c.keyStatuses.g?"license-request":"license-renewal",message:rb(d.message)});c.dispatchEvent(d)}),this.h.B(this.j,"mskeyadded",function(){c.g?(st(c,"usable"),c.g.resolve(),c.g=null):c.i&&(st(c,"usable"),c.i.resolve(),c.i=null)}),this.h.B(this.j,"mskeyerror",function(){var d=Error("EME PatchedMediaKeysMs key error");
790
- d.errorCode=c.j.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.i)c.i.reject(d),c.i=null;else switch(c.j.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:st(c,"output-not-allowed");break;default:st(c,"internal-error")}}),st(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};q.update=function(a){this.i=new Ge;try{this.j.update(qb(a))}catch(b){this.i.reject(b)}return this.i};
791
- q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.mb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function st(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new P("keystatuseschange");a.dispatchEvent(c)}function rt(){this.size=0;this.g=void 0}q=rt.prototype;q.forEach=function(a){this.g&&a(this.g,gi.value())};
792
- q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=gi.value();return this.g&&ob(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};zs(jt);function tt(){}function ut(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=vt,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=wt,window.MediaKeys=xt,window.MediaKeySystemAccess=yt)}function vt(){return Promise.reject(Error("The key system specified is not supported."))}
793
- function wt(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}ys.PatchedMediaKeysNop=tt;tt.install=ut;function xt(){throw new TypeError("Illegal constructor.");}xt.prototype.createSession=function(){};xt.prototype.setServerCertificate=function(){};function yt(){this.keySystem="";throw new TypeError("Illegal constructor.");}yt.prototype.getConfiguration=function(){};yt.prototype.createMediaKeys=function(){};zs(ut,-10);function zt(){}function At(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Bt="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Ct;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Dt;window.MediaKeys=Et;window.MediaKeySystemAccess=Ft}}
794
- function Gt(a){var b=Bt;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Ct(a,b){try{var c=new Ft(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Dt(a){var b=this.mediaKeys;b&&b!=a&&Ht(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Ht(a,this);return Promise.resolve()}ys.PatchedMediaKeysWebkit=zt;zt.install=At;
795
- function Ft(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
793
+ At.prototype.createMediaKeys=function(){var a=new zt(this.keySystem);return Promise.resolve(a)};At.prototype.getConfiguration=function(){return this.g};function Ct(a){var b=this.mediaKeys;b&&b!=a&&Et(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Et(a,this):Promise.resolve()}function zt(a){this.g=new MSMediaKeys(a);this.h=new cf}
794
+ zt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Ft(this.g,a)};zt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Et(a,b){a.h.pb();if(!b)return Promise.resolve();a.h.A(b,"msneedkey",Dt);try{return ti(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.msSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
795
+ function Ft(a){Le.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new cf;this.sessionId="";this.expiration=NaN;this.closed=new yc;this.keyStatuses=new Gt}ra(Ft,Le);q=Ft.prototype;
796
+ q.generateRequest=function(a,b){var c=this;this.g=new yc;try{this.j=this.l.createSession("video/mp4",Ob(b),null),this.h.A(this.j,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Pb(d.message));d=new R("message",d);c.dispatchEvent(d)}),this.h.A(this.j,"mskeyadded",function(){c.g?(Ht(c,"usable"),c.g.resolve(),c.g=null):c.i&&(Ht(c,"usable"),c.i.resolve(),c.i=null)}),this.h.A(this.j,"mskeyerror",
797
+ function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.j.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.i)c.i.reject(d),c.i=null;else switch(c.j.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Ht(c,"output-not-allowed");break;default:Ht(c,"internal-error")}}),Ht(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
798
+ q.update=function(a){this.i=new yc;try{this.j.update(Ob(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.pb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Ht(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}
799
+ function Gt(){this.size=0;this.g=void 0}q=Gt.prototype;q.forEach=function(a){this.g&&a(this.g,$f.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=$f.value();return this.g&&Mb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Ls(yt);function It(){}function Jt(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Kt,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Lt,window.MediaKeys=Mt,window.MediaKeySystemAccess=Nt)}function Kt(){return Promise.reject(Error("The key system specified is not supported."))}
800
+ function Lt(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Ks.PatchedMediaKeysNop=It;It.install=Jt;function Mt(){throw new TypeError("Illegal constructor.");}Mt.prototype.createSession=function(){};Mt.prototype.setServerCertificate=function(){};function Nt(){this.keySystem="";throw new TypeError("Illegal constructor.");}Nt.prototype.getConfiguration=function(){};Nt.prototype.createMediaKeys=function(){};Ls(Jt,-10);function Ot(){}function Pt(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Qt="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Rt;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=St;window.MediaKeys=Tt;window.MediaKeySystemAccess=Ut}}
801
+ function Vt(a){var b=Qt;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Rt(a,b){try{var c=new Ut(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function St(a){var b=this.mediaKeys;b&&b!=a&&Wt(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Wt(a,this);return Promise.resolve()}Ks.PatchedMediaKeysWebkit=Ot;Ot.install=Pt;
802
+ function Ut(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
796
803
  m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=t(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
797
- d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}Ft.prototype.createMediaKeys=function(){var a=new Et(this.g);return Promise.resolve(a)};Ft.prototype.getConfiguration=function(){return this.h};function Et(a){this.l=a;this.g=null;this.h=new gf;this.i=[];this.j=new Map}
798
- function Ht(a,b){a.g=b;a.h.mb();var c=Bt;b&&(a.h.B(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=rb(d.initData);a.g.dispatchEvent(e)}),a.h.B(b,c+"keymessage",function(d){var e=It(a,d.sessionId);e&&(d=new P("message",{messageType:void 0==e.keyStatuses.g?"licenserequest":"licenserenewal",message:d.message}),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.h.B(b,c+"keyadded",function(d){if(d=It(a,d.sessionId))Jt(d,"usable"),d.g&&d.g.resolve(),d.g=
799
- null}),a.h.B(b,c+"keyerror",function(d){var e=It(a,d.sessionId);e&&e.handleError(d)}))}Et.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.g||document.createElement("video");b.src||(b.src="about:blank");a=new Kt(b,this.l,a);this.i.push(a);return a};Et.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
800
- function It(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 Kt(a,b,c){Xg.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 Ge;this.keyStatuses=new Lt}pa(Kt,Xg);q=Kt.prototype;
801
- q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Jt(this,"output-restricted"):1==b?Jt(this,"expired"):Jt(this,"internal-error"))};
802
- function Mt(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=qb(Ab("LOAD_SESSION|"+c));else{var e=Ab("PERSISTENT|");d=qc(e,b)}else d=qb(b)}catch(g){return Promise.reject(g)}a.h=new Ge;var f=Gt("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new N(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).U(.01)}return a.h}
803
- function Nt(a,b,c){if(a.g)a.g.then(function(){return Nt(a,b,c)})["catch"](function(){return Nt(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=wb(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=nc(e.keys[0].k);e=nc(e.keys[0].kid)}else d=qb(c),e=null;var f=Gt("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
804
- function Jt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new P("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return Mt(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Mt(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Ge;Nt(this,b,a);return b};
805
- q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Gt("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function Lt(){this.size=0;this.g=void 0}q=Lt.prototype;q.forEach=function(a){this.g&&a(this.g,gi.value())};q.get=function(a){if(this.has(a))return this.g};
806
- q.has=function(a){var b=gi.value();return this.g&&ob(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Bt="";zs(At);function Ot(){}function Pt(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Qt,Object.defineProperty(a,"disablePictureInPicture",{get:Rt,set:St,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Tt,document.addEventListener("webkitpresentationmodechanged",Ut,!0))}}
807
- function Ut(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)}
808
- function Qt(){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 Tt(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
809
- function Rt(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function St(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}ys.PiPWebkit=Ot;Ot.install=Pt;zs(Pt);function Vt(){}function Wt(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Xt)}function Xt(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}ys.StorageEstimate=Vt;Vt.install=Wt;zs(Wt);function Yt(){}function Zt(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}ys.VideoPlayPromise=Yt;Yt.install=Zt;zs(Zt);function $t(){}function au(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=bu)}}function bu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}ys.VideoPlaybackQuality=$t;$t.install=au;zs(au);function cu(){}function du(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=eu;else if(6==b)a=fu;else{try{var c=!!eu(1,2,"")}catch(d){c=!1}c&&(a=eu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function eu(a,b,c){return new window.TextTrackCue(a,b,c)}function fu(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}ys.VTTCue=cu;cu.install=du;zs(du);function gu(){}gu.prototype.parseInit=function(){};gu.prototype.parseMedia=function(a,b){var c=null,d=[],e=wb(a).split(/\r?\n/);e=t(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=hu.exec(f))){var g=iu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new zc(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};J("shaka.text.LrcTextParser",gu);gu.prototype.parseMedia=gu.prototype.parseMedia;
810
- gu.prototype.parseInit=gu.prototype.parseInit;var hu=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,iu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Xe["application/x-subtitle-lrc"]=function(){return new gu};function ju(){}ju.prototype.parseInit=function(){};
811
- ju.prototype.parseMedia=function(a,b){var c=wb(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(D){throw new M(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new M(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new M(2,2,2005,"TTML does not contain <tt> tag.");e=g.getElementsByTagName("body")[0];if(!e)return[];c=zn(g,"http://www.w3.org/ns/ttml#parameter","frameRate");var h=zn(g,"http://www.w3.org/ns/ttml#parameter",
812
- "subFrameRate"),k=zn(g,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier"),l=zn(g,"http://www.w3.org/ns/ttml#parameter","tickRate"),m=zn(g,"http://www.w3.org/ns/ttml#parameter","cellResolution");f=g.getAttribute("xml:space")||"default";var n=zn(g,"http://www.w3.org/ns/ttml#styling","extent");if("default"!=f&&"preserve"!=f)throw new M(2,2,2005,"Invalid xml:space value: "+f);f="default"==f;c=new ku(c,h,k,l);m=m?(m=/^(\d+) (\d+)$/.exec(m))?{columns:parseInt(m[1],10),rows:parseInt(m[2],10)}:
813
- null:null;h=(h=g.getElementsByTagName("metadata")[0])?yn(h):[];k=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));l=[];for(var p=t(g),r=p.next();!r.done;r=p.next()){var u=r.value;r=new Bc;var x=u.getAttribute("xml:id");if(x){r.id=x;var w=null;n&&(w=lu.exec(n)||mu.exec(n));x=w?Number(w[1]):null;w=w?Number(w[2]):null;var y,C;if(y=nu(u,k,"extent"))y=(C=lu.exec(y))||mu.exec(y),null!=y&&(r.width=Number(y[1]),r.height=Number(y[2]),C||(null!=x&&(r.width=100*r.width/
814
- x),null!=w&&(r.height=100*r.height/w)),r.widthUnits=C||null!=x?Rc:0,r.heightUnits=C||null!=w?Rc:0);if(u=nu(u,k,"origin"))y=(C=lu.exec(u))||mu.exec(u),null!=y&&(r.viewportAnchorX=Number(y[1]),r.viewportAnchorY=Number(y[2]),C||(null!=w&&(r.viewportAnchorY=100*r.viewportAnchorY/w),null!=x&&(r.viewportAnchorX=100*r.viewportAnchorX/x)),r.viewportAnchorUnits=C||null!=x?Rc:0)}else r=null;r&&l.push(r)}if(vn(e,"p").length)throw new M(2,2,2001,"<p> can only be inside <div> in TTML");e=t(vn(e,"div"));for(n=
815
- e.next();!n.done;n=e.next()){n=n.value;if(vn(n,"span").length)throw new M(2,2,2001,"<span> can only be inside <p> in TTML");if((p=vn(n,"p"))&&p.length)for(n=t(p),p=n.next();!p.done;p=n.next())(p=ou(p.value,b.periodStart,c,h,k,g,l,f,!1,m))&&d.push(p);else(n=ou(n,b.periodStart,c,h,k,g,l,f,!1,m))&&d.push(n)}}return d};
816
- function ou(a,b,c,d,e,f,g,h,k,l){var m=a.parentNode;if(a.nodeType==Node.TEXT_NODE){var n=document.createElement("span");n.textContent=a.textContent;a=n}n="default"==(a.getAttribute("xml:space")||(h?"default":"preserve"));var p=Array.from(a.childNodes).every(function(y){return y.nodeType==Node.TEXT_NODE});h=[];if(!p)for(var r=t(a.childNodes),u=r.next();!u.done;u=r.next())(u=ou(u.value,b,c,d,e,f,g,n,!0,l))&&h.push(u);r=/\S/.test(a.textContent);var x=a.hasAttribute("begin")||a.hasAttribute("end")||a.hasAttribute("dur");
817
- if(!(x||r||"br"==a.tagName||0!=h.length||k&&!n))return null;u=pu(a,c);r=u.start;for(u=u.end;m&&m.nodeType==Node.ELEMENT_NODE&&"tt"!=m.tagName;)u=qu(m,c,r,u),r=u.start,u=u.end,m=m.parentNode;null==r&&(r=0);r+=b;u=null==u?Infinity:u+b;if(!x&&0<h.length)for(r=Infinity,u=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,r=Math.min(r,c.startTime),u=Math.max(u,c.endTime);if("br"==a.tagName)return d=new zc(r,u,""),d.lineBreak=!0,d;b="";p&&(b=a.textContent,n&&(b=b.trim(),b=b.replace(/\s+/g," ")));n=new zc(r,
818
- u,b);n.nestedCues=h;l&&(n.cellResolution=l);if((f=ru(a,"region",f,"")[0])&&f.getAttribute("xml:id")){var w=f.getAttribute("xml:id");n.region=g.filter(function(y){return y.id==w})[0]}g=null;l=t(su);for(p=l.next();!p.done&&!(g=ru(a,"backgroundImage",d,"#",p.value)[0]);p=l.next());tu(n,a,f,g,e,k,0==h.length);return n}
819
- function tu(a,b,c,d,e,f,g){f=f||g;"rtl"==uu(b,c,e,"direction",f)&&(a.direction="rtl");g=uu(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=Ac);(g=uu(b,c,e,"textAlign",f))?(a.positionAlign=vu[g],a.lineAlign=wu[g],a.textAlign=Lc[g.toUpperCase()]):a.textAlign="start";if(g=uu(b,c,e,"displayAlign",f))a.displayAlign=Mc[g.toUpperCase()];if(g=uu(b,c,e,"color",f))a.color=g;if(g=uu(b,c,e,"backgroundColor",
820
- f))a.backgroundColor=g;if(g=uu(b,c,e,"border",f))a.border=g;if(g=uu(b,c,e,"fontFamily",f))a.fontFamily=g;(g=uu(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=uu(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=uu(b,c,e,"lineHeight",f))&&g.match(xu)&&(a.lineHeight=g);(g=uu(b,c,e,"fontSize",f))&&(g.match(xu)||g.match(yu))&&(a.fontSize=g);if(g=uu(b,c,e,"fontStyle",f))a.fontStyle=Qc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
821
- d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=uu(b,c,e,"letterSpacing",f))&&d.match(xu)&&(a.letterSpacing=d);(d=uu(b,c,e,"linePadding",f))&&d.match(xu)&&(a.linePadding=d);if(f=uu(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=nu(c,e,"textDecoration"))&&zu(a,c);(b=Au(b,e,"textDecoration"))&&zu(a,b)}
822
- function zu(a,b){for(var c=t(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&wc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&wc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
823
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&wc(a.textDecoration,"overline")}}function uu(a,b,c,d,e){e=void 0===e?!0:e;return(a=Au(a,c,d))?a:e?nu(b,c,d):null}function nu(a,b,c){if(!a)return null;var d=zn(a,"http://www.w3.org/ns/ttml#styling",c);return d?d:Bu(a,b,c)}function Au(a,b,c){var d=zn(a,"http://www.w3.org/ns/ttml#styling",c);return d?d:Bu(a,b,c)}
824
- function Bu(a,b,c){a=ru(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=zn(a[e],"urn:ebu:tt:style",c);f||(f=zn(a[e],"http://www.w3.org/ns/ttml#styling",c));f||(f=Au(a[e],b,c));f&&(d=f)}return d}
825
- function ru(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?zn(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 qu(a,b,c,d){a=pu(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}}
826
- function pu(a,b){var c=Cu(a.getAttribute("begin"),b),d=Cu(a.getAttribute("end"),b),e=Cu(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
827
- function Cu(a,b){var c=null;if(Du.test(a)){c=Du.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(Eu.test(a))c=Fu(Eu,a);else if(Gu.test(a))c=Fu(Gu,a);else if(Hu.test(a))c=Hu.exec(a),c=Number(c[1])/b.frameRate;else if(Iu.test(a))c=Iu.exec(a),c=Number(c[1])/b.g;else if(Ju.test(a))c=Fu(Ju,a);else if(a)throw new M(2,2,2001,"Could not parse cue time range in TTML");return c}
828
- function Fu(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}J("shaka.text.TtmlTextParser",ju);ju.prototype.parseMedia=ju.prototype.parseMedia;ju.prototype.parseInit=ju.prototype.parseInit;function ku(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]))}
829
- var lu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,yu=/^(\d{1,2}(?:\.\d+)?|100)%$/,xu=/^(\d+px|\d+em|\d*\.?\d+c)$/,mu=/^(\d+)px (\d+)px$/,Du=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Eu=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Gu=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Hu=/^(\d*(?:\.\d*)?)f$/,Iu=/^(\d*(?:\.\d*)?)t$/,Ju=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,wu={left:Gc,center:"center",right:"end",start:Gc,end:"end"},vu=
830
- {left:"line-left",center:"center",right:"line-right"},su=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Xe["application/ttml+xml"]=function(){return new ju};function Ku(){this.s=new ju}Ku.prototype.parseInit=function(a){var b=!1;(new Pb).box("moov",Ub).box("trak",Ub).box("mdia",Ub).box("minf",Ub).box("stbl",Ub).T("stsd",Wb).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new M(2,2,2007);};Ku.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Pb).box("mdat",Xb(function(f){d=!0;e=e.concat(c.s.parseMedia(f,b))})).parse(a,!1);if(!d)throw new M(2,2,2007);return e};J("shaka.text.Mp4TtmlParser",Ku);Ku.prototype.parseMedia=Ku.prototype.parseMedia;
831
- Ku.prototype.parseInit=Ku.prototype.parseInit;Xe['application/mp4; codecs="stpp"']=function(){return new Ku};Xe['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Ku};Xe['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Ku};function Lu(){}Lu.prototype.parseInit=function(){};
832
- Lu.prototype.parseMedia=function(a,b){var c=wb(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new M(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=Mu(new Lp(e[1]));if(null==c)throw new M(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
833
- [];e=t(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new Lp(g);var h=new Bc;Op(g);Mp(g);for(var k=Op(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
834
- (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Mp(g);k=Op(g)}f.push(h)}e=new Map;Nu(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new zc(0,0,"");for(var n=!1,p=0;p<k.length;p++){var r=
835
- /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(r){var u=r[2].trim().replace(";","");switch(r[1].trim()){case "background-color":n=!0;m.backgroundColor=u;break;case "color":n=!0;m.color=u;break;case "font-family":n=!0;m.fontFamily=u;break;case "font-size":n=!0;m.fontSize=u;break;case "font-weight":700<=parseInt(u,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(u){case "normal":n=!0;m.fontStyle=Jc;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
836
- !0;m.opacity=parseFloat(u);break;case "white-space":n=!0,m.wrapLine="noWrap"!=u}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new Lp(h[0]);m=Mu(k);r=Np(k,/[ \t]+--\x3e[ \t]+/g);n=Mu(k);if(null==m||null==r||null==n)throw new M(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=
837
- ""):h=new zc(m,n,"");Ou(p,h,e);Mp(k);for(m=Op(k);m;)Pu(h,m,f),Mp(k),m=Op(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function Nu(a){for(var b=t(Object.entries(Oc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new zc(0,0,"");e.color=d;a.set(c,e)}b=t(Object.entries(Pc));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new zc(0,0,""),e.backgroundColor=d,a.set(c,e)}
838
- function Ou(a,b,c){0===c.size&&Nu(c);a=Qu(a);var d=Ln("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=t(d);for(d=a.next();!d.done;d=a.next())Ru(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
839
- function Qu(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function Su(a,b){return a&&0<a.length?a:b}
840
- function Ru(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=Su(h.backgroundColor,e.backgroundColor),e.color=Su(h.color,e.color),e.fontFamily=Su(h.fontFamily,e.fontFamily),e.fontSize=Su(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
841
- "italic";break;case "u":e.textDecoration.push("underline")}}if(Bn(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())Ru(a.value,e,c,d)}
842
- function Pu(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Dc:a.textAlign=Lc[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
843
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Tu(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=Nc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Fc,a.line=Number(c[1]),c[2]&&(a.lineAlign=Nc[c[2].toUpperCase()])}function Tu(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
844
- function Mu(a){a=Np(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}J("shaka.text.VttTextParser",Lu);Lu.prototype.parseMedia=Lu.prototype.parseMedia;Lu.prototype.parseInit=Lu.prototype.parseInit;Xe["text/vtt"]=function(){return new Lu};Xe['text/vtt; codecs="vtt"']=function(){return new Lu};Xe['text/vtt; codecs="wvtt"']=function(){return new Lu};function Uu(){this.g=null}Uu.prototype.parseInit=function(a){var b=this,c=!1;(new Pb).box("moov",Ub).box("trak",Ub).box("mdia",Ub).T("mdhd",function(d){d=ae(d.reader,d.version);b.g=d.timescale}).box("minf",Ub).box("stbl",Ub).T("stsd",Wb).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new M(2,2,2008);if(!c)throw new M(2,2,2008);};
845
- Uu.prototype.parseMedia=function(a,b){if(!this.g)throw new M(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Pb).box("moof",Ub).box("traf",Ub).T("tfdt",function(A){g=!0;c=$d(A.reader,A.version).ed}).T("tfhd",function(A){l=Zd(A.reader,A.flags).Wd}).T("trun",function(A){h=!0;d=be(A.reader,A.version,A.flags).me}).box("mdat",Xb(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new M(2,2,2008);for(var m=c,n=new Cb(e,0),p=t(d),r=p.next();!r.done;r=p.next()){r=r.value;var u=r.Fd||l,x=r.Kc?
846
- c+r.Kc:m;m=x+(u||0);var w=0;do{var y=n.M();w+=y;var C=n.M(),D=null;"vttc"==Yb(C)?8<y&&(D=n.$a(y-8)):n.skip(y-8);u&&D&&(y=Vu(D,b.periodStart+x/this.g,b.periodStart+m/this.g),f.push(y))}while(r.sampleSize&&w<r.sampleSize)}return f.filter(Nb)};function Vu(a,b,c){var d,e,f;(new Pb).box("payl",Xb(function(g){d=wb(g)})).box("iden",Xb(function(g){e=wb(g)})).box("sttg",Xb(function(g){f=wb(g)})).parse(a);return d?Wu(d,e,f,b,c):null}
847
- function Wu(a,b,c,d,e){d=new zc(d,e,"");Ou(a,d,new Map);b&&(d.id=b);if(c)for(a=new Lp(c),b=Op(a);b;)Pu(d,b,[]),Mp(a),b=Op(a);return d}J("shaka.text.Mp4VttParser",Uu);Uu.prototype.parseMedia=Uu.prototype.parseMedia;Uu.prototype.parseInit=Uu.prototype.parseInit;Xe['application/mp4; codecs="wvtt"']=function(){return new Uu};function Xu(){}Xu.prototype.parseInit=function(){};Xu.prototype.parseMedia=function(a){var b=wb(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 Lp(c[0]),e=Yu(d),f=Np(d,/,/g);d=Yu(d);if(null==e||null==f||null==d)throw new M(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new zc(e,d,c.slice(1).join("\n").trim()))}return a};
848
- function Yu(a){a=Np(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}J("shaka.text.SbvTextParser",Xu);Xu.prototype.parseMedia=Xu.prototype.parseMedia;Xu.prototype.parseInit=Xu.prototype.parseInit;Xe["text/x-subviewer"]=function(){return new Xu};function Zu(){this.s=new Lu}Zu.prototype.parseInit=function(){};Zu.prototype.parseMedia=function(a,b){var c=wb(a);c=$u(c);c=qb(Ab(c));return this.s.parseMedia(c,b)};function $u(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}J("shaka.text.SrtTextParser",Zu);Zu.srt2webvtt=$u;Zu.prototype.parseMedia=Zu.prototype.parseMedia;
849
- Zu.prototype.parseInit=Zu.prototype.parseInit;Xe["text/srt"]=function(){return new Zu};function av(){}av.prototype.parseInit=function(){};
850
- av.prototype.parseMedia=function(a){var b="",c="";a=wb(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=bv.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=cv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(dv);else if("Style"==e){e=f.split(dv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
851
- [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={$c:e.$c},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=cv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(dv);else if("Dialogue"==f){g=g.split(dv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=ev(f.Start);var k=ev(f.End);g=new zc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.$c=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.$c}}(e)))&&fv(g,f);d.push(g)}return d};
852
- function fv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=gv(c))a.color=c;if(c=b.BackColour)if(c=gv(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=Hc;a.textAlign="start";break;case 2:a.displayAlign=Hc;a.textAlign=Dc;break;case 3:a.displayAlign=Hc;a.textAlign="end";
853
- break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Dc;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=Dc;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
854
- function gv(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 ev(a){a=hv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}J("shaka.text.SsaTextParser",av);av.prototype.parseMedia=av.prototype.parseMedia;av.prototype.parseInit=av.prototype.parseInit;var bv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,cv=/^\s*([^:]+):\s*(.*)/,dv=/\s*,\s*/,hv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
855
- Xe["text/x-ssa"]=function(){return new av};/*
804
+ d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}Ut.prototype.createMediaKeys=function(){var a=new Tt(this.g);return Promise.resolve(a)};Ut.prototype.getConfiguration=function(){return this.h};function Tt(a){this.l=a;this.g=null;this.h=new cf;this.i=[];this.j=new Map}
805
+ function Wt(a,b){a.g=b;a.h.pb();var c=Qt;b&&(a.h.A(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Pb(d.initData);a.g.dispatchEvent(e)}),a.h.A(b,c+"keymessage",function(d){var e=Xt(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new R("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.h.A(b,c+"keyadded",function(d){if(d=Xt(a,d.sessionId))Yt(d,"usable"),
806
+ d.g&&d.g.resolve(),d.g=null}),a.h.A(b,c+"keyerror",function(d){var e=Xt(a,d.sessionId);e&&e.handleError(d)}))}Tt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.g||document.createElement("video");b.src||(b.src="about:blank");a=new Zt(b,this.l,a);this.i.push(a);return a};Tt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
807
+ function Xt(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 Zt(a,b,c){Le.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 yc;this.keyStatuses=new $t}ra(Zt,Le);q=Zt.prototype;
808
+ q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Yt(this,"output-restricted"):1==b?Yt(this,"expired"):Yt(this,"internal-error"))};
809
+ function au(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=Ob(Fc("LOAD_SESSION|"+c));else{var e=Fc("PERSISTENT|");d=Nc(e,b)}else d=Ob(b)}catch(g){return Promise.reject(g)}a.h=new yc;var f=Vt("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new O(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).V(.01)}return a.h}
810
+ function bu(a,b,c){if(a.g)a.g.then(function(){return bu(a,b,c)})["catch"](function(){return bu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Bc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Kc(e.keys[0].k);e=Kc(e.keys[0].kid)}else d=Ob(c),e=null;var f=Vt("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
811
+ function Yt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return au(this,b,null)};q.load=function(a){return"persistent-license"==this.l?au(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new yc;bu(this,b,a);return b};
812
+ q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Vt("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function $t(){this.size=0;this.g=void 0}q=$t.prototype;q.forEach=function(a){this.g&&a(this.g,$f.value())};q.get=function(a){if(this.has(a))return this.g};
813
+ q.has=function(a){var b=$f.value();return this.g&&Mb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Qt="";Ls(Pt);function cu(){}function du(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=eu,Object.defineProperty(a,"disablePictureInPicture",{get:fu,set:gu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=hu,document.addEventListener("webkitpresentationmodechanged",iu,!0))}}
814
+ function iu(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)}
815
+ function eu(){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 hu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
816
+ function fu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function gu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Ks.PiPWebkit=cu;cu.install=du;Ls(du);function ju(){}function ku(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=lu)}function lu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Ks.StorageEstimate=ju;ju.install=ku;Ls(ku);function mu(){}function nu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Ks.VideoPlayPromise=mu;mu.install=nu;Ls(nu);function ou(){}function pu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=qu)}}function qu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Ks.VideoPlaybackQuality=ou;ou.install=pu;Ls(pu);function ru(){}function su(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=tu;else if(6==b)a=uu;else{try{var c=!!tu(1,2,"")}catch(d){c=!1}c&&(a=tu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function tu(a,b,c){return new window.TextTrackCue(a,b,c)}function uu(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Ks.VTTCue=ru;ru.install=su;Ls(su);function vu(){}vu.prototype.parseInit=function(){};vu.prototype.parseMedia=function(a,b){var c=null,d=[],e=Bc(a).split(/\r?\n/);e=t(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=wu.exec(f))){var g=xu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new qb(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};M("shaka.text.LrcTextParser",vu);vu.prototype.parseMedia=vu.prototype.parseMedia;
817
+ vu.prototype.parseInit=vu.prototype.parseInit;var wu=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,xu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Zc["application/x-subtitle-lrc"]=function(){return new vu};function yu(){}yu.prototype.parseInit=function(){};
818
+ yu.prototype.parseMedia=function(a,b){var c=Bc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(D){throw new N(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new N(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new N(2,2,2005,"TTML does not contain <tt> tag.");e=g.getElementsByTagName("body")[0];if(!e)return[];c=Fn(g,"http://www.w3.org/ns/ttml#parameter","frameRate");var h=Fn(g,"http://www.w3.org/ns/ttml#parameter",
819
+ "subFrameRate"),k=Fn(g,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier"),l=Fn(g,"http://www.w3.org/ns/ttml#parameter","tickRate"),m=Fn(g,"http://www.w3.org/ns/ttml#parameter","cellResolution");f=g.getAttribute("xml:space")||"default";var n=Fn(g,"http://www.w3.org/ns/ttml#styling","extent");if("default"!=f&&"preserve"!=f)throw new N(2,2,2005,"Invalid xml:space value: "+f);f="default"==f;c=new zu(c,h,k,l);m=m?(m=/^(\d+) (\d+)$/.exec(m))?{columns:parseInt(m[1],10),rows:parseInt(m[2],10)}:
820
+ null:null;h=(h=g.getElementsByTagName("metadata")[0])?En(h):[];k=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));l=[];for(var p=t(g),r=p.next();!r.done;r=p.next()){var u=r.value;r=new sb;var y=u.getAttribute("xml:id");if(y){r.id=y;var w=null;n&&(w=Au.exec(n)||Bu.exec(n));y=w?Number(w[1]):null;w=w?Number(w[2]):null;var x,C;if(x=Cu(u,k,"extent"))x=(C=Au.exec(x))||Bu.exec(x),null!=x&&(r.width=Number(x[1]),r.height=Number(x[2]),C||(null!=y&&(r.width=100*r.width/
821
+ y),null!=w&&(r.height=100*r.height/w)),r.widthUnits=C||null!=y?Jb:0,r.heightUnits=C||null!=w?Jb:0);if(u=Cu(u,k,"origin"))x=(C=Au.exec(u))||Bu.exec(u),null!=x&&(r.viewportAnchorX=Number(x[1]),r.viewportAnchorY=Number(x[2]),C||(null!=w&&(r.viewportAnchorY=100*r.viewportAnchorY/w),null!=y&&(r.viewportAnchorX=100*r.viewportAnchorX/y)),r.viewportAnchorUnits=C||null!=y?Jb:0)}else r=null;r&&l.push(r)}if(Bn(e,"p").length)throw new N(2,2,2001,"<p> can only be inside <div> in TTML");e=t(Bn(e,"div"));for(n=
822
+ e.next();!n.done;n=e.next()){n=n.value;if(Bn(n,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");if((p=Bn(n,"p"))&&p.length)for(n=t(p),p=n.next();!p.done;p=n.next())(p=Du(p.value,b.periodStart,c,h,k,g,l,f,!1,m))&&d.push(p);else(n=Du(n,b.periodStart,c,h,k,g,l,f,!1,m))&&d.push(n)}}return d};
823
+ function Du(a,b,c,d,e,f,g,h,k,l){var m=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){var n=document.createElement("span");n.textContent=a.textContent;a=n}n="default"==(a.getAttribute("xml:space")||(h?"default":"preserve"));var p=Array.from(a.childNodes).every(function(x){return x.nodeType==Node.TEXT_NODE});h=[];if(!p)for(var r=t(a.childNodes),u=r.next();!u.done;u=r.next())(u=Du(u.value,b,c,d,e,f,g,n,!0,l))&&h.push(u);r=/\S/.test(a.textContent);var y=a.hasAttribute("begin")||
824
+ a.hasAttribute("end")||a.hasAttribute("dur");if(!(y||r||"br"==a.tagName||0!=h.length||k&&!n))return null;u=Eu(a,c);r=u.start;for(u=u.end;m&&m.nodeType==Node.ELEMENT_NODE&&"tt"!=m.tagName;)u=Fu(m,c,r,u),r=u.start,u=u.end,m=m.parentNode;null==r&&(r=0);r+=b;u=null==u?Infinity:u+b;if(!y&&0<h.length)for(r=Infinity,u=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,r=Math.min(r,c.startTime),u=Math.max(u,c.endTime);if("br"==a.tagName)return d=new qb(r,u,""),d.lineBreak=!0,d;b="";p&&(b=a.textContent,n&&(b=
825
+ b.trim(),b=b.replace(/\s+/g," ")));n=new qb(r,u,b);n.nestedCues=h;l&&(n.cellResolution=l);if((f=Gu(a,"region",f,"")[0])&&f.getAttribute("xml:id")){var w=f.getAttribute("xml:id");n.region=g.filter(function(x){return x.id==w})[0]}g=null;l=t(Hu);for(p=l.next();!p.done&&!(g=Gu(a,"backgroundImage",d,"#",p.value)[0]);p=l.next());Iu(n,a,f,g,e,k,0==h.length);return n}
826
+ function Iu(a,b,c,d,e,f,g){f=f||g;"rtl"==Ju(b,c,e,"direction",f)&&(a.direction="rtl");g=Ju(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=rb);(g=Ju(b,c,e,"textAlign",f))?(a.positionAlign=Ku[g],a.lineAlign=Lu[g],a.textAlign=Db[g.toUpperCase()]):a.textAlign="start";if(g=Ju(b,c,e,"displayAlign",f))a.displayAlign=Eb[g.toUpperCase()];if(g=Ju(b,c,e,"color",f))a.color=g;if(g=Ju(b,c,e,"backgroundColor",
827
+ f))a.backgroundColor=g;if(g=Ju(b,c,e,"border",f))a.border=g;if(g=Ju(b,c,e,"fontFamily",f))a.fontFamily=g;(g=Ju(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=Ju(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Ju(b,c,e,"lineHeight",f))&&g.match(Mu)&&(a.lineHeight=g);(g=Ju(b,c,e,"fontSize",f))&&(g.match(Mu)||g.match(Nu))&&(a.fontSize=g);if(g=Ju(b,c,e,"fontStyle",f))a.fontStyle=Ib[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
828
+ d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=Ju(b,c,e,"letterSpacing",f))&&d.match(Mu)&&(a.letterSpacing=d);(d=Ju(b,c,e,"linePadding",f))&&d.match(Mu)&&(a.linePadding=d);if(f=Ju(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Cu(c,e,"textDecoration"))&&Ou(a,c);(b=Pu(b,e,"textDecoration"))&&Ou(a,b)}
829
+ function Ou(a,b){for(var c=t(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&nb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&nb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
830
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&nb(a.textDecoration,"overline")}}function Ju(a,b,c,d,e){e=void 0===e?!0:e;return(a=Pu(a,c,d))?a:e?Cu(b,c,d):null}function Cu(a,b,c){if(!a)return null;var d=Fn(a,"http://www.w3.org/ns/ttml#styling",c);return d?d:Qu(a,b,c)}function Pu(a,b,c){var d=Fn(a,"http://www.w3.org/ns/ttml#styling",c);return d?d:Qu(a,b,c)}
831
+ function Qu(a,b,c){a=Gu(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Fn(a[e],"urn:ebu:tt:style",c);f||(f=Fn(a[e],"http://www.w3.org/ns/ttml#styling",c));f||(f=Pu(a[e],b,c));f&&(d=f)}return d}
832
+ function Gu(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Fn(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 Fu(a,b,c,d){a=Eu(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}}
833
+ function Eu(a,b){var c=Ru(a.getAttribute("begin"),b),d=Ru(a.getAttribute("end"),b),e=Ru(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
834
+ function Ru(a,b){var c=null;if(Su.test(a)){c=Su.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(Tu.test(a))c=Uu(Tu,a);else if(Vu.test(a))c=Uu(Vu,a);else if(Wu.test(a))c=Wu.exec(a),c=Number(c[1])/b.frameRate;else if(Xu.test(a))c=Xu.exec(a),c=Number(c[1])/b.g;else if(Yu.test(a))c=Uu(Yu,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
835
+ function Uu(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}M("shaka.text.TtmlTextParser",yu);yu.prototype.parseMedia=yu.prototype.parseMedia;yu.prototype.parseInit=yu.prototype.parseInit;function zu(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]))}
836
+ var Au=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Nu=/^(\d{1,2}(?:\.\d+)?|100)%$/,Mu=/^(\d+px|\d+em|\d*\.?\d+c)$/,Bu=/^(\d+)px (\d+)px$/,Su=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Tu=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Vu=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Wu=/^(\d*(?:\.\d*)?)f$/,Xu=/^(\d*(?:\.\d*)?)t$/,Yu=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Lu={left:xb,center:"center",right:"end",start:xb,end:"end"},Ku=
837
+ {left:"line-left",center:"center",right:"line-right"},Hu=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Zc["application/ttml+xml"]=function(){return new yu};function Zu(){this.s=new yu}Zu.prototype.parseInit=function(a){var b=!1;(new jg).box("moov",ng).box("trak",ng).box("mdia",ng).box("minf",ng).box("stbl",ng).U("stsd",pg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};Zu.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new jg).box("mdat",qg(function(f){d=!0;e=e.concat(c.s.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};M("shaka.text.Mp4TtmlParser",Zu);Zu.prototype.parseMedia=Zu.prototype.parseMedia;
838
+ Zu.prototype.parseInit=Zu.prototype.parseInit;Zc['application/mp4; codecs="stpp"']=function(){return new Zu};Zc['application/mp4; codecs="stpp.ttml"']=function(){return new Zu};Zc['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Zu};Zc['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Zu};function $u(){}$u.prototype.parseInit=function(){};
839
+ $u.prototype.parseMedia=function(a,b){var c=Bc(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new N(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=av(new Rp(e[1]));if(null==c)throw new N(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
840
+ [];e=t(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new Rp(g);var h=new sb;Up(g);Sp(g);for(var k=Up(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
841
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Sp(g);k=Up(g)}f.push(h)}e=new Map;bv(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new qb(0,0,"");for(var n=!1,p=0;p<k.length;p++){var r=
842
+ /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(r){var u=r[2].trim().replace(";","");switch(r[1].trim()){case "background-color":n=!0;m.backgroundColor=u;break;case "color":n=!0;m.color=u;break;case "font-family":n=!0;m.fontFamily=u;break;case "font-size":n=!0;m.fontSize=u;break;case "font-weight":700<=parseInt(u,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(u){case "normal":n=!0;m.fontStyle=Ab;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
843
+ !0;m.opacity=parseFloat(u);break;case "white-space":n=!0,m.wrapLine="noWrap"!=u}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new Rp(h[0]);m=av(k);r=Tp(k,/[ \t]+--\x3e[ \t]+/g);n=av(k);if(null==m||null==r||null==n)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=
844
+ ""):h=new qb(m,n,"");cv(p,h,e);Sp(k);for(m=Up(k);m;)dv(h,m,f),Sp(k),m=Up(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function bv(a){for(var b=t(Object.entries(Gb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new qb(0,0,"");e.color=d;a.set(c,e)}b=t(Object.entries(Hb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new qb(0,0,""),e.backgroundColor=d,a.set(c,e)}
845
+ function cv(a,b,c){0===c.size&&bv(c);a=ev(a);var d=Rn("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=t(d);for(d=a.next();!d.done;d=a.next())fv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
846
+ function ev(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function gv(a,b){return a&&0<a.length?a:b}
847
+ function fv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=gv(h.backgroundColor,e.backgroundColor),e.color=gv(h.color,e.color),e.fontFamily=gv(h.fontFamily,e.fontFamily),e.fontSize=gv(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
848
+ "italic";break;case "u":e.textDecoration.push("underline")}}if(Hn(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())fv(a.value,e,c,d)}
849
+ function dv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=ub:a.textAlign=Db[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
850
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=hv(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=Fb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=wb,a.line=Number(c[1]),c[2]&&(a.lineAlign=Fb[c[2].toUpperCase()])}function hv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
851
+ function av(a){a=Tp(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.VttTextParser",$u);$u.prototype.parseMedia=$u.prototype.parseMedia;$u.prototype.parseInit=$u.prototype.parseInit;Zc["text/vtt"]=function(){return new $u};Zc['text/vtt; codecs="vtt"']=function(){return new $u};Zc['text/vtt; codecs="wvtt"']=function(){return new $u};function iv(){this.g=null}iv.prototype.parseInit=function(a){var b=this,c=!1;(new jg).box("moov",ng).box("trak",ng).box("mdia",ng).U("mdhd",function(d){d=Eh(d.reader,d.version);b.g=d.timescale}).box("minf",ng).box("stbl",ng).U("stsd",pg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};
852
+ iv.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new jg).box("moof",ng).box("traf",ng).U("tfdt",function(B){g=!0;c=Dh(B.reader,B.version).jd}).U("tfhd",function(B){l=Ch(B.reader,B.flags).Zd}).U("trun",function(B){h=!0;d=Fh(B.reader,B.version,B.flags).qe}).box("mdat",qg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new gg(e,0),p=t(d),r=p.next();!r.done;r=p.next()){r=r.value;var u=r.Jd||l,y=r.Mc?
853
+ c+r.Mc:m;m=y+(u||0);var w=0;do{var x=n.N();w+=x;var C=n.N(),D=null;"vttc"==rg(C)?8<x&&(D=n.bb(x-8)):n.skip(x-8);u&&D&&(x=jv(D,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(x))}while(r.sampleSize&&w<r.sampleSize)}return f.filter(Zb)};function jv(a,b,c){var d,e,f;(new jg).box("payl",qg(function(g){d=Bc(g)})).box("iden",qg(function(g){e=Bc(g)})).box("sttg",qg(function(g){f=Bc(g)})).parse(a);return d?kv(d,e,f,b,c):null}
854
+ function kv(a,b,c,d,e){d=new qb(d,e,"");cv(a,d,new Map);b&&(d.id=b);if(c)for(a=new Rp(c),b=Up(a);b;)dv(d,b,[]),Sp(a),b=Up(a);return d}M("shaka.text.Mp4VttParser",iv);iv.prototype.parseMedia=iv.prototype.parseMedia;iv.prototype.parseInit=iv.prototype.parseInit;Zc['application/mp4; codecs="wvtt"']=function(){return new iv};function lv(){}lv.prototype.parseInit=function(){};lv.prototype.parseMedia=function(a){var b=Bc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Rp(c[0]),e=mv(d),f=Tp(d,/,/g);d=mv(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new qb(e,d,c.slice(1).join("\n").trim()))}return a};
855
+ function mv(a){a=Tp(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",lv);lv.prototype.parseMedia=lv.prototype.parseMedia;lv.prototype.parseInit=lv.prototype.parseInit;Zc["text/x-subviewer"]=function(){return new lv};function nv(){this.s=new $u}nv.prototype.parseInit=function(){};nv.prototype.parseMedia=function(a,b){var c=Bc(a);c=ov(c);c=Ob(Fc(c));return this.s.parseMedia(c,b)};function ov(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}M("shaka.text.SrtTextParser",nv);nv.srt2webvtt=ov;nv.prototype.parseMedia=nv.prototype.parseMedia;
856
+ nv.prototype.parseInit=nv.prototype.parseInit;Zc["text/srt"]=function(){return new nv};function pv(){}pv.prototype.parseInit=function(){};
857
+ pv.prototype.parseMedia=function(a){var b="",c="";a=Bc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=qv.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=rv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(sv);else if("Style"==e){e=f.split(sv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
858
+ [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={dd:e.dd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=rv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(sv);else if("Dialogue"==f){g=g.split(sv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=tv(f.Start);var k=tv(f.End);g=new qb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.dd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.dd}}(e)))&&uv(g,f);d.push(g)}return d};
859
+ function uv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=vv(c))a.color=c;if(c=b.BackColour)if(c=vv(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=yb;a.textAlign="start";break;case 2:a.displayAlign=yb;a.textAlign=ub;break;case 3:a.displayAlign=yb;a.textAlign="end";
860
+ break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=ub;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=ub;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
861
+ function vv(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function tv(a){a=wv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",pv);pv.prototype.parseMedia=pv.prototype.parseMedia;pv.prototype.parseInit=pv.prototype.parseInit;var qv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,rv=/^\s*([^:]+):\s*(.*)/,sv=/\s*,\s*/,wv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
862
+ Zc["text/x-ssa"]=function(){return new pv};/*
856
863
  @license
857
864
  EME Encryption Scheme Polyfill
858
865
  Copyright 2019 Google LLC
859
866
  SPDX-License-Identifier: Apache-2.0
860
867
  */
861
- function iv(){}var jv;function kv(){jv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(jv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=lv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
862
- function lv(a,b){var c=this,d;return F(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),v(e,jv.call(c,a,b),2);d=e.h;if(mv(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=jv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=nv;return e["return"](nv.call(c,
868
+ function xv(){}var yv;function zv(){yv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(yv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Av):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
869
+ function Av(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),v(e,yv.call(c,a,b),2);d=e.h;if(Bv(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=yv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Cv;return e["return"](Cv.call(c,
863
870
  a,b))})}
864
- function nv(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return F(function(r){if(1==r.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=ov(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=pv(h.videoCapabilities,d),l=pv(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."),
865
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return v(r,jv.call(c,a,e),2)}p=r.h;return r["return"](new qv(p,d))})}function pv(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}J("EmeEncryptionSchemePolyfill",iv);iv.install=kv;function rv(){}var sv;
866
- function tv(){sv?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(sv=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=uv):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
867
- function uv(a){var b=this,c,d;return F(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),v(e,sv.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&mv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=sv,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
868
- navigator.mediaCapabilities.decodingInfo=vv;return e["return"](vv.call(b,a))})}
869
- function vv(a){var b=this,c,d,e,f,g,h,k,l,m;return F(function(n){switch(n.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=ov(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):v(n,sv.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
870
- new qv(k.keySystemAccess,c);n.v(3);break}if(!a.keySystemConfiguration){n.v(3);break}var p=a.keySystemConfiguration,r=[],u=[];p.audio&&r.push({robustness:p.audio.robustness||"",contentType:a.audio.contentType});p.video&&u.push({robustness:p.video.robustness||"",contentType:a.video.contentType});p={initDataTypes:p.initDataType?[p.initDataType]:[],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};r.length&&(p.audioCapabilities=r);u.length&&(p.videoCapabilities=
871
- u);l=p;m=k;return v(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}J("McEncryptionSchemePolyfill",rv);rv.install=tv;function qv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
872
- qv.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};qv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
873
- function ov(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function mv(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function wv(){}
874
- function Ds(){kv();tv()}J("EncryptionSchemePolyfills",wv);wv.install=Ds;"undefined"!==typeof module&&module.exports&&(module.exports=wv);}).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})();
871
+ function Cv(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return K(function(r){if(1==r.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Dv(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Ev(h.videoCapabilities,d),l=Ev(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."),
872
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return v(r,yv.call(c,a,e),2)}p=r.h;return r["return"](new Fv(p,d))})}function Ev(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",xv);xv.install=zv;function Gv(){}var Hv;
873
+ function Iv(){Hv?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Hv=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Jv):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
874
+ function Jv(a){var b=this,c,d;return K(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),v(e,Hv.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Bv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Hv,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
875
+ navigator.mediaCapabilities.decodingInfo=Kv;return e["return"](Kv.call(b,a))})}
876
+ function Kv(a){var b=this,c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Dv(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):v(n,Hv.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
877
+ new Fv(k.keySystemAccess,c);n.v(3);break}if(!a.keySystemConfiguration){n.v(3);break}var p=a.keySystemConfiguration,r=[],u=[];p.audio&&r.push({robustness:p.audio.robustness||"",contentType:a.audio.contentType});p.video&&u.push({robustness:p.video.robustness||"",contentType:a.video.contentType});p={initDataTypes:p.initDataType?[p.initDataType]:[],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};r.length&&(p.audioCapabilities=r);u.length&&(p.videoCapabilities=
878
+ u);l=p;m=k;return v(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}M("McEncryptionSchemePolyfill",Gv);Gv.install=Iv;function Fv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
879
+ Fv.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};Fv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
880
+ function Dv(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Bv(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function Lv(){}
881
+ function Ss(){zv();Iv()}M("EncryptionSchemePolyfills",Lv);Lv.install=Ss;"undefined"!==typeof module&&module.exports&&(module.exports=Lv);}).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})();
875
882
 
876
883
  //# sourceMappingURL=shaka-player.compiled.map