shaka-player 3.0.11 → 3.0.15

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 (142) hide show
  1. package/AUTHORS +5 -0
  2. package/CHANGELOG.md +132 -0
  3. package/CONTRIBUTORS +5 -0
  4. package/README.md +3 -0
  5. package/build/apps.py +2 -2
  6. package/build/check.py +2 -2
  7. package/build/conformance.textproto +0 -9
  8. package/build/generateExterns.js +1 -1
  9. package/build/shakaBuildHelpers.py +6 -5
  10. package/build/subprocessWindowsPatch.py +103 -0
  11. package/demo/common/assets.js +1 -1
  12. package/demo/common/message_ids.js +1 -0
  13. package/demo/config.js +2 -1
  14. package/demo/demo.less +4 -0
  15. package/demo/demo_utils.js +1 -0
  16. package/demo/input_container.js +2 -1
  17. package/demo/locales/en.json +1 -0
  18. package/demo/locales/source.json +4 -0
  19. package/dist/controls.css +2 -2
  20. package/dist/controls.css.map +1 -1
  21. package/dist/demo.compiled.debug.js +63 -60
  22. package/dist/demo.compiled.debug.map +3 -3
  23. package/dist/demo.compiled.js +63 -60
  24. package/dist/demo.compiled.map +3 -3
  25. package/dist/demo.css +1 -1
  26. package/dist/demo.css.map +1 -1
  27. package/dist/deps.js +9 -9
  28. package/dist/locales.js +35 -33
  29. package/dist/receiver.compiled.debug.js +59 -56
  30. package/dist/receiver.compiled.debug.map +3 -3
  31. package/dist/receiver.compiled.js +59 -56
  32. package/dist/receiver.compiled.map +3 -3
  33. package/dist/shaka-player.compiled.d.ts +131 -5
  34. package/dist/shaka-player.compiled.debug.d.ts +131 -5
  35. package/dist/shaka-player.compiled.debug.externs.js +142 -8
  36. package/dist/shaka-player.compiled.debug.js +330 -312
  37. package/dist/shaka-player.compiled.debug.map +4 -4
  38. package/dist/shaka-player.compiled.externs.js +142 -8
  39. package/dist/shaka-player.compiled.js +707 -702
  40. package/dist/shaka-player.compiled.map +4 -4
  41. package/dist/shaka-player.ui.d.ts +131 -5
  42. package/dist/shaka-player.ui.debug.d.ts +131 -5
  43. package/dist/shaka-player.ui.debug.externs.js +144 -10
  44. package/dist/shaka-player.ui.debug.js +354 -333
  45. package/dist/shaka-player.ui.debug.map +4 -4
  46. package/dist/shaka-player.ui.externs.js +144 -10
  47. package/dist/shaka-player.ui.js +860 -855
  48. package/dist/shaka-player.ui.map +4 -4
  49. package/docs/tutorials/fairplay.md +1 -1
  50. package/docs/tutorials/faq.md +25 -0
  51. package/externs/aria.js +18 -0
  52. package/externs/ima.js +4 -0
  53. package/externs/shaka/ads.js +2 -0
  54. package/karma.conf.js +1 -0
  55. package/lib/ads/ad_manager.js +29 -11
  56. package/lib/ads/client_side_ad_manager.js +76 -86
  57. package/lib/ads/server_side_ad_manager.js +26 -11
  58. package/lib/cast/cast_proxy.js +3 -2
  59. package/lib/cast/cast_receiver.js +6 -2
  60. package/lib/cast/cast_sender.js +2 -2
  61. package/lib/dash/dash_parser.js +63 -1
  62. package/lib/dash/segment_list.js +1 -1
  63. package/lib/dash/segment_template.js +41 -14
  64. package/lib/hls/hls_parser.js +41 -11
  65. package/lib/media/content_workarounds.js +18 -0
  66. package/lib/media/drm_engine.js +8 -0
  67. package/lib/media/gap_jumping_controller.js +8 -4
  68. package/lib/media/media_source_engine.js +7 -0
  69. package/lib/media/playhead.js +1 -1
  70. package/lib/media/presentation_timeline.js +3 -2
  71. package/lib/media/segment_index.js +41 -11
  72. package/lib/media/streaming_engine.js +34 -21
  73. package/lib/net/networking_engine.js +2 -1
  74. package/lib/offline/download_manager.js +1 -2
  75. package/lib/player.js +99 -44
  76. package/lib/polyfill/encryption_scheme.js +2 -0
  77. package/lib/polyfill/fullscreen.js +2 -0
  78. package/lib/polyfill/mathround.js +2 -0
  79. package/lib/polyfill/mediasource.js +2 -0
  80. package/lib/polyfill/patchedmediakeys_apple.js +6 -4
  81. package/lib/polyfill/patchedmediakeys_ms.js +6 -4
  82. package/lib/polyfill/patchedmediakeys_nop.js +2 -0
  83. package/lib/polyfill/patchedmediakeys_webkit.js +6 -4
  84. package/lib/polyfill/pip_webkit.js +2 -0
  85. package/lib/polyfill/video_play_promise.js +2 -0
  86. package/lib/polyfill/videoplaybackquality.js +2 -0
  87. package/lib/polyfill/vttcue.js +2 -0
  88. package/lib/text/mp4_ttml_parser.js +3 -0
  89. package/lib/text/ttml_text_parser.js +5 -0
  90. package/lib/text/ui_text_displayer.js +37 -3
  91. package/lib/util/error.js +1 -4
  92. package/lib/util/fake_event.js +53 -7
  93. package/lib/util/mime_utils.js +33 -0
  94. package/lib/util/periods.js +25 -3
  95. package/lib/util/stream_utils.js +11 -0
  96. package/package.json +3 -3
  97. package/test/cast/cast_proxy_unit.js +12 -6
  98. package/test/cast/cast_receiver_integration.js +1 -1
  99. package/test/cast/cast_utils_unit.js +1 -1
  100. package/test/dash/dash_parser_manifest_unit.js +73 -0
  101. package/test/demo/demo_unit.js +0 -1
  102. package/test/hls/hls_parser_unit.js +45 -1
  103. package/test/media/drm_engine_unit.js +56 -0
  104. package/test/media/playhead_unit.js +27 -1
  105. package/test/media/presentation_timeline_unit.js +19 -0
  106. package/test/media/segment_index_unit.js +79 -6
  107. package/test/media/streaming_engine_unit.js +3 -3
  108. package/test/player_integration.js +38 -0
  109. package/test/player_unit.js +19 -1
  110. package/test/test/assets/3675/chunk-stream0-00001.m4s +0 -0
  111. package/test/test/assets/3675/chunk-stream0-00002.m4s +0 -0
  112. package/test/test/assets/3675/chunk-stream0-00003.m4s +0 -0
  113. package/test/test/assets/3675/chunk-stream0-00004.m4s +0 -0
  114. package/test/test/assets/3675/chunk-stream0-00005.m4s +0 -0
  115. package/test/test/assets/3675/chunk-stream0-00006.m4s +0 -0
  116. package/test/test/assets/3675/chunk-stream0-00007.m4s +0 -0
  117. package/test/test/assets/3675/dash_0.mpd +30 -0
  118. package/test/test/assets/3675/dash_1.mpd +30 -0
  119. package/test/test/assets/3675/dash_2.mpd +30 -0
  120. package/test/test/assets/3675/dash_3.mpd +30 -0
  121. package/test/test/assets/3675/dash_4.mpd +30 -0
  122. package/test/test/assets/3675/dash_5.mpd +26 -0
  123. package/test/test/assets/3675/init-stream0.m4s +0 -0
  124. package/test/test/util/fake_ad_manager.js +4 -1
  125. package/test/test/util/fake_media_source_engine.js +4 -0
  126. package/test/test/util/simple_fakes.js +5 -3
  127. package/test/test/util/waiter.js +36 -2
  128. package/test/text/ttml_text_parser_unit.js +9 -0
  129. package/test/text/ui_text_displayer_unit.js +19 -3
  130. package/test/ui/localization_unit.js +15 -14
  131. package/test/ui/ui_unit.js +4 -0
  132. package/ui/big_play_button.js +10 -0
  133. package/ui/cast_button.js +2 -3
  134. package/ui/controls.js +9 -7
  135. package/ui/less/containers.less +3 -0
  136. package/ui/locales/en.json +1 -0
  137. package/ui/locales/ru.json +6 -6
  138. package/ui/locales/source.json +4 -0
  139. package/ui/localization.js +28 -51
  140. package/ui/pip_button.js +2 -3
  141. package/ui/play_button.js +10 -10
  142. package/ui/small_play_button.js +12 -0
@@ -9,52 +9,53 @@
9
9
  Copyright The Closure Library Authors.
10
10
  SPDX-License-Identifier: Apache-2.0
11
11
  */
12
- var p;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 da(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=da(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(e){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c("jscomp_symbol_"+(e||"")+"_"+d++,e)}function c(e,f){this.a=e;ba(this,"description",{configurable:!0,writable:!0,value:f})}if(a)return a;c.prototype.toString=function(){return this.a};var d=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 r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ia(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var 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={ee:!0},na={};try{na.__proto__=ma;la=na.ee;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.Uf=b.prototype}function qa(){this.j=!1;this.g=null;this.b=void 0;this.a=1;this.f=this.h=0;this.v=this.c=null}function ra(a){if(a.j)throw new TypeError("Generator is already running");a.j=!0}qa.prototype.m=function(a){this.b=a};
19
- function sa(a,b){a.c={Dd:b,Id:!0};a.a=a.h||a.f}qa.prototype["return"]=function(a){this.c={"return":a};this.a=this.f};function u(a,b,c){a.a=c;return{value:b}}qa.prototype.s=function(a){this.a=a};function w(a){a.a=0}function y(a,b,c){a.h=b;void 0!=c&&(a.f=c)}function ta(a){a.h=0;a.f=2}function ua(a,b){a.a=b;a.h=0}function C(a){a.h=0;var b=a.c.Dd;a.c=null;return b}function va(a){a.v=[a.c];a.h=0;a.f=0}
20
- function wa(a,b){var c=a.v.splice(0)[0];(c=a.c=a.c||c)?c.Id?a.a=a.h||a.f:void 0!=c.s&&a.f<c.s?(a.a=c.s,a.c=null):a.a=a.f:a.a=b}function xa(a){this.a=new qa;this.b=a}function za(a,b){ra(a.a);var c=a.a.g;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.a["return"]);a.a["return"](b);return Ca(a)}
21
- function Ba(a,b,c,d){try{var e=b.call(a.a.g,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.a.j=!1,e;var f=e.value}catch(g){return a.a.g=null,sa(a.a,g),Ca(a)}a.a.g=null;d.call(a.a,f);return Ca(a)}
22
- function Ca(a){for(;a.a.a;)try{var b=a.b(a.a);if(b)return a.a.j=!1,{value:b.value,done:!1}}catch(c){a.a.b=void 0,sa(a.a,c)}a.a.j=!1;if(a.a.c){b=a.a.c;a.a.c=null;if(b.Id)throw b.Dd;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
- function Ea(a){this.next=function(b){ra(a.a);a.a.g?b=Ba(a,a.a.g.next,b,a.a.m):(a.a.m(b),b=Ca(a));return b};this["throw"]=function(b){ra(a.a);a.a.g?b=Ba(a,a.a.g["throw"],b,a.a.m):(sa(a.a,b),b=Ca(a));return b};this["return"]=function(b){return za(a,b)};this[Symbol.iterator]=function(){return this}}function Fa(a,b){var c=new Ea(new xa(b));oa&&a.prototype&&oa(c,a.prototype);return c}
24
- function Ga(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 J(a){return Ga(new Ea(new xa(a)))}
25
- fa("Promise",function(a){function b(g){this.b=0;this.c=void 0;this.a=[];this.j=!1;var h=this.f();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.a=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.b=function(g){if(null==this.a){this.a=[];var h=this;this.c(function(){h.g()})}this.a.push(g)};var e=ea.setTimeout;c.prototype.c=function(g){e(g,0)};c.prototype.g=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
26
- g[h];g[h]=null;try{k()}catch(l){this.f(l)}}}this.a=null};c.prototype.f=function(g){this.c(function(){throw g;})};b.prototype.f=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.G),reject:g(this.g)}};b.prototype.G=function(g){if(g===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.K(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.D(g):this.h(g)}};
27
- b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.g(k);return}"function"==typeof h?this.M(h,g):this.h(g)};b.prototype.g=function(g){this.m(2,g)};b.prototype.h=function(g){this.m(1,g)};b.prototype.m=function(g,h){if(0!=this.b)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.b);this.b=g;this.c=h;2===this.b&&this.I();this.v()};b.prototype.I=function(){var g=this;e(function(){if(g.A()){var h=ea.console;"undefined"!==typeof h&&h.error(g.c)}},1)};b.prototype.A=
28
- function(){if(this.j)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.c;return k(g)};b.prototype.v=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.b(this.a[g]);this.a=null}};var f=new c;
29
- b.prototype.K=function(g){var h=this.f();g.fc(h.resolve,h.reject)};b.prototype.M=function(g,h){var k=this.f();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(q,t){return"function"==typeof q?function(v){try{l(q(v))}catch(z){m(z)}}:t}var l,m,n=new b(function(q,t){l=q;m=t});this.fc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.fc=function(g,h){function k(){switch(l.b){case 1:g(l.c);break;case 2:h(l.c);
30
- break;default:throw Error("Unexpected state: "+l.b);}}var l=this;null==this.a?f.b(k):this.a.push(k);this.j=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).fc(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(z){q[v]=z;t--;0==t&&l(q)}}var q=[],t=0;do q.push(void 0),t++,d(k.value).fc(n(q.length-1),m),k=h.next();
31
- while(!k.done)})};return b});function Ia(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
- fa("WeakMap",function(a){function b(k){this.a=(h+=Math.random()+1).toString();if(k){k=r(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ia(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
33
- m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ia(k,g))throw Error("WeakMap key fail: "+k);k[g][this.a]=l;return this};b.prototype.get=function(k){return d(k)&&Ia(k,g)?k[g][this.a]:void 0};b.prototype.has=function(k){return d(k)&&
34
- Ia(k,g)&&Ia(k[g],this.a)};b.prototype["delete"]=function(k){return d(k)&&Ia(k,g)&&Ia(k[g],this.a)?delete k[g][this.a]:!1};return b});
35
- fa("Map",function(a){function b(){var h={};return h.Ja=h.next=h.head=h}function c(h,k){var l=h.a;return ha(function(){if(l){for(;l.head!=h.a;)l=l.Ja;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.b[l];if(m&&Ia(h.b,l))for(var n=0;n<m.length;n++){var q=m[n];if(k!==k&&q.key!==q.key||k===q.key)return{id:l,list:m,index:n,Y:q}}return{id:l,
36
- list:m,index:-1,Y:void 0}}function e(h){this.b={};this.a=b();this.size=0;if(h){h=r(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(r([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
37
- "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.b[l.id]=[]);l.Y?l.Y.value=k:(l.Y={next:this.a,Ja:this.a.Ja,head:this.a,key:h,value:k},l.list.push(l.Y),this.a.Ja.next=l.Y,this.a.Ja=l.Y,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.Y&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.b[h.id],h.Y.Ja.next=h.Y.next,h.Y.next.Ja=h.Y.Ja,h.Y.head=
38
- null,this.size--,!0):!1};e.prototype.clear=function(){this.b={};this.a=this.a.Ja=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).Y};e.prototype.get=function(h){return(h=d(this,h).Y)&&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(),m;!(m=l.next()).done;)m=
39
- 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.a=new Map;if(c){c=r(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.a.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(r([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
41
- 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.a.set(c,c);this.size=this.a.size;return this};b.prototype["delete"]=function(c){c=this.a["delete"](c);this.size=this.a.size;return c};b.prototype.clear=function(){this.a.clear();this.size=0};b.prototype.has=function(c){return this.a.has(c)};b.prototype.entries=function(){return this.a.entries()};b.prototype.values=function(){return this.a.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.a.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ja(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}fa("Array.prototype.keys",function(a){return a?a:function(){return Ja(this,function(b){return b})}});
43
- function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{Z:e,be:f}}return{Z:-1,be:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).Z}});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;})})}});
44
- 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}});
45
- function La(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==La(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.values",function(a){return a?a:function(){return Ja(this,function(b,c){return c})}});
46
- 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}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ka(this,b,c).be}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
47
- var Ma="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ia(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||Ma});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ia(b,d)&&c.push(b[d]);return c}});
48
- fa("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=La(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});var Oa=this||self;function K(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};/*
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 da=ca(this);function ea(a,b){if(b)a:{for(var c=da,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];if(!(f in c))break a;c=c[f]}d=d[d.length-1];e=c[d];f=b(e);f!=e&&null!=f&&ba(c,d,{configurable:!0,writable:!0,value:f})}}
14
+ ea("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
15
+ ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(aa(this))}})}return a});function fa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
+ function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ha(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ia="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ja;
17
+ if("function"==typeof Object.setPrototypeOf)ja=Object.setPrototypeOf;else{var ka;a:{var la={a:!0},ma={};try{ma.__proto__=la;ka=ma.a;break a}catch(a){}ka=!1}ja=ka?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var na=ja;
18
+ function oa(a,b){a.prototype=ia(b.prototype);a.prototype.constructor=a;if(na)na(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.Wf=b.prototype}function pa(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function qa(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}pa.prototype.u=function(a){this.h=a};
19
+ function ra(a,b){a.i={Id:b,Pd:!0};a.g=a.m||a.j}pa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function t(a,b,c){a.g=c;return{value:b}}pa.prototype.B=function(a){this.g=a};function x(a){a.g=0}function y(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function sa(a){a.m=0;a.j=2}function ta(a,b){a.g=b;a.m=0}function C(a){a.m=0;var b=a.i.Id;a.i=null;return b}function ua(a){a.C=[a.i];a.m=0;a.j=0}
20
+ function va(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.Pd?a.g=a.m||a.j:void 0!=c.B&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function xa(a){this.g=new pa;this.h=a}function ya(a,b){qa(a.g);var c=a.g.l;if(c)return za(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Aa(a)}
21
+ function za(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,ra(a.g,g),Aa(a)}a.g.l=null;d.call(a.g,f);return Aa(a)}
22
+ function Aa(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,ra(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Pd)throw b.Id;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
+ function Ba(a){this.next=function(b){qa(a.g);a.g.l?b=za(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Aa(a));return b};this["throw"]=function(b){qa(a.g);a.g.l?b=za(a,a.g.l["throw"],b,a.g.u):(ra(a.g,b),b=Aa(a));return b};this["return"]=function(b){return ya(a,b)};this[Symbol.iterator]=function(){return this}}function Ca(a,b){var c=new Ba(new xa(b));na&&a.prototype&&na(c,a.prototype);return c}
24
+ function Da(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 Da(new Ba(new xa(a)))}
25
+ ea("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=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
26
+ g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.K),reject:g(this.l)}};b.prototype.K=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.P(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.I(g):this.m(g)}};
27
+ b.prototype.I=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.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.N();this.C()};b.prototype.N=function(){var g=this;e(function(){if(g.F()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
28
+ function(){if(this.s)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.C=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
29
+ b.prototype.P=function(g){var h=this.j();g.oc(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,u){return"function"==typeof p?function(v){try{l(p(v))}catch(z){m(z)}}:u}var l,m,n=new b(function(p,u){l=p;m=u});this.oc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.oc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
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=r(g),m=l.next();!m.done;m=l.next())d(m.value).oc(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(z){p[v]=z;u--;0==u&&l(p)}}var p=[],u=0;do p.push(void 0),u++,d(k.value).oc(n(p.length-1),m),k=h.next();
31
+ while(!k.done)})};return b});function Ea(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
+ ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ea(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(!Ea(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ea(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
34
+ Ea(k,g)&&Ea(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ea(k,g)&&Ea(k[g],this.g)?delete k[g][this.g]:!1};return b});
35
+ ea("Map",function(a){function b(){var h={};return h.Oa=h.next=h.head=h}function c(h,k){var l=h.g;return fa(function(){if(l){for(;l.head!=h.g;)l=l.Oa;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&&Ea(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,ea:p}}return{id:l,
36
+ list:m,index:-1,ea:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=r(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(r([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
37
+ "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ea?l.ea.value=k:(l.ea={next:this.g,Oa:this.g.Oa,head:this.g,key:h,value:k},l.list.push(l.ea),this.g.Oa.next=l.ea,this.g.Oa=l.ea,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.ea&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ea.Oa.next=h.ea.next,h.ea.next.Oa=h.ea.Oa,
38
+ h.ea.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Oa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ea};e.prototype.get=function(h){return(h=d(this,h).ea)&&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
+ 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
+ ea("Set",function(a){function b(c){this.g=new Map;if(c){c=r(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(r([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
41
+ f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
42
+ b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Fa(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ea("Array.prototype.keys",function(a){return a?a:function(){return Fa(this,function(b){return b})}});
43
+ function Ga(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{da:e,ge:f}}return{da:-1,ge:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ga(this,b,c).da}});ea("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});
44
+ ea("Array.prototype.find",function(a){return a?a:function(b,c){return Ga(this,b,c).ge}});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+""}
45
+ ea("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}});ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
46
+ ea("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ha(this,b,"includes").indexOf(b,c||0)}});ea("Array.prototype.values",function(a){return a?a:function(){return Fa(this,function(b,c){return c})}});
47
+ ea("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
48
+ var Ia="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)Ea(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||Ia});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ea(b,d)&&c.push(b[d]);return c}});var Ja=this||self;
49
+ function L(a,b){var c=a.split("."),d=Ja;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};/*
49
50
  @license
50
51
  Shaka Player
51
52
  Copyright 2016 Google LLC
52
53
  SPDX-License-Identifier: Apache-2.0
53
54
  */
54
- function Pa(a){this.c=Math.exp(Math.log(.5)/a);this.b=this.a=0}function Qa(a,b,c){var d=Math.pow(a.c,b);c=c*(1-d)+d*a.a;isNaN(c)||(a.a=c,a.b+=b)}function Ra(a){return a.a/(1-Math.pow(a.c,a.b))};function Ua(){this.b=new Pa(2);this.c=new Pa(5);this.a=0}Ua.prototype.getBandwidthEstimate=function(a){return 128E3>this.a?a:Math.min(Ra(this.b),Ra(this.c))};function Va(){}function Wa(){}function Xa(){}function Ya(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];$a.has(a)||($a.add(a),Xa.apply(Va,ia(c)))}function ab(){}function bb(){}function cb(){}var $a=new Set;if(window.console&&window.console.log.bind){var db={},eb=(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=eb[2];Wa=eb[1]};function gb(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function hb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}
55
- var jb=function ib(a){var c;return Fa(ib,function(d){1==d.a&&(c=0);if(3!=d.a)return c<a?u(d,c,3):d.s(0);c++;return d.s(2)})},lb=function kb(a){var c,d,e,f,g,h;return Fa(kb,function(k){1==k.a&&(c=-1,e=d=void 0,f=r(a),g=f.next());if(5!=k.a){if(g.done)return-1==c?k.s(0):u(k,{Z:c,Se:d,item:e,next:void 0},0);h=g.value;return 0<=c?u(k,{Z:c,item:e,Se:d,next:h},5):k.s(5)}c++;d=e;e=h;g=f.next();return k.s(2)})};function mb(){}function nb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(ob(a)==ob(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=L(a),d=L(b),e=r(jb(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}function ob(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}
56
- function L(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(ob(a),b,Math.min(b+Math.max(c,0),e)-b)}K("shaka.util.BufferUtils",mb);mb.toDataView=rb;mb.toUint8=L;mb.toArrayBuffer=pb;mb.equal=nb;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," ")};K("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};
57
- 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,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,
55
+ function Ka(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}function La(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 Ma(a){return a.g/(1-Math.pow(a.i,a.h))};function Na(){this.h=new Ka(2);this.i=new Ka(5);this.g=0}Na.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(Ma(this.h),Ma(this.i))};function Oa(){}function Pa(){}function Sa(){}function Ta(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];Ua.has(a)||(Ua.add(a),Sa.apply(Oa,ha(c)))}function Va(){}function Wa(){}function Xa(){}var Ua=new Set;if(window.console&&window.console.log.bind){var Ya={},Za=(Ya[1]=console.error.bind(console),Ya[2]=console.warn.bind(console),Ya[3]=console.info.bind(console),Ya[4]=console.log.bind(console),Ya[5]=console.debug.bind(console),Ya[6]=console.debug.bind(console),Ya);Sa=Za[2];Pa=Za[1]};function $a(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function ab(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}
56
+ var db=function cb(a){var c;return Ca(cb,function(d){1==d.g&&(c=0);if(3!=d.g)return c<a?t(d,c,3):d.B(0);c++;return d.B(2)})},fb=function eb(a){var c,d,e,f,g,h;return Ca(eb,function(k){1==k.g&&(c=-1,e=d=void 0,f=r(a),g=f.next());if(5!=k.g){if(g.done)return-1==c?k.B(0):t(k,{da:c,We:d,item:e,next:void 0},0);h=g.value;return 0<=c?t(k,{da:c,item:e,We:d,next:h},5):k.B(5)}c++;d=e;e=h;g=f.next();return k.B(2)})};function gb(){}function hb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(ib(a)==ib(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=N(a),d=N(b),e=r(db(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}function ib(a){return a instanceof ArrayBuffer?a:a.buffer}function jb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
57
+ function N(a,b,c){c=void 0===c?Infinity:c;return kb(a,void 0===b?0:b,c,Uint8Array)}function lb(a,b,c){c=void 0===c?Infinity:c;return kb(a,void 0===b?0:b,c,DataView)}function kb(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(ib(a),b,Math.min(b+Math.max(c,0),e)-b)}L("shaka.util.BufferUtils",gb);gb.toDataView=lb;gb.toUint8=N;gb.toArrayBuffer=jb;gb.equal=hb;function O(a,b,c,d){for(var e=[],f=3;f<arguments.length;++f)e[f-3]=arguments[f];this.severity=a;this.category=b;this.code=c;this.data=e;this.handled=!1}O.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};L("shaka.util.Error",O);O.Severity={RECOVERABLE:1,CRITICAL:2};O.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
58
+ O.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,
58
59
  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,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,
59
60
  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,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,
60
61
  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,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,
@@ -65,698 +66,702 @@ NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERAT
65
66
  Copyright 2008 The Closure Library Authors
66
67
  SPDX-License-Identifier: Apache-2.0
67
68
  */
68
- var sb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;/*
69
+ var mb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;/*
69
70
  @license
70
71
  Copyright 2006 The Closure Library Authors
71
72
  SPDX-License-Identifier: Apache-2.0
72
73
  */
73
- function tb(a){var b;a instanceof tb?(ub(this,a.wa),this.bb=a.bb,this.va=a.va,vb(this,a.tb),this.la=a.la,wb(this,a.a.clone()),this.Ta=a.Ta):a&&(b=String(a).match(sb))?(ub(this,b[1]||"",!0),this.bb=xb(b[2]||""),this.va=xb(b[3]||"",!0),vb(this,b[4]),this.la=xb(b[5]||"",!0),wb(this,b[6]||"",!0),this.Ta=xb(b[7]||"")):this.a=new yb(null)}p=tb.prototype;p.wa="";p.bb="";p.va="";p.tb=null;p.la="";p.Ta="";
74
- p.toString=function(){var a=[],b=this.wa;b&&a.push(zb(b,Ab,!0),":");if(b=this.va){a.push("//");var c=this.bb;c&&a.push(zb(c,Ab,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.tb;null!=b&&a.push(":",String(b))}if(b=this.la)this.va&&"/"!=b.charAt(0)&&a.push("/"),a.push(zb(b,"/"==b.charAt(0)?Bb:Cb,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Ta)&&a.push("#",zb(b,Db));return a.join("")};
75
- p.resolve=function(a){var b=this.clone();"data"===b.wa&&(b=new tb);var c=!!a.wa;c?ub(b,a.wa):c=!!a.bb;c?b.bb=a.bb:c=!!a.va;c?b.va=a.va:c=null!=a.tb;var d=a.la;if(c)vb(b,a.tb);else if(c=!!a.la){if("/"!=d.charAt(0))if(this.va&&!this.la)d="/"+d;else{var e=b.la.lastIndexOf("/");-1!=e&&(d=b.la.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(""):".."==
76
- 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.la=d:c=""!==a.a.toString();c?wb(b,a.a.clone()):c=!!a.Ta;c&&(b.Ta=a.Ta);return b};p.clone=function(){return new tb(this)};function ub(a,b,c){a.wa=c?xb(b,!0):b;a.wa&&(a.wa=a.wa.replace(/:$/,""))}function vb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.tb=b}else a.tb=null}function wb(a,b,c){b instanceof yb?a.a=b:(c||(b=zb(b,Eb)),a.a=new yb(b))}
77
- function xb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function zb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Fb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Fb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ab=/[#\/\?@]/g,Cb=/[#\?:]/g,Bb=/[#\?]/g,Eb=/[#\?@]/g,Db=/#/g;function yb(a){this.a=a||null}p=yb.prototype;p.ia=null;p.ic=null;
78
- p.add=function(a,b){if(!this.ia&&(this.ia={},this.ic=0,this.a))for(var c=this.a.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.a=null;(c=this.ia.hasOwnProperty(a)&&this.ia[a])||(this.ia[a]=c=[]);c.push(b);this.ic++;return this};
79
- p.toString=function(){if(this.a)return this.a;if(!this.ia)return"";var a=[],b;for(b in this.ia)for(var c=encodeURIComponent(b),d=this.ia[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.a=a.join("&")};p.clone=function(){var a=new yb;a.a=this.a;if(this.ia){var b={},c;for(c in this.ia)b[c]=this.ia[c].concat();a.ia=b;a.ic=this.ic}return a};function Gb(a,b){this.a=a;this.b=b}Gb.prototype.toString=function(){return"v"+this.a+"."+this.b};function Hb(a,b){var c=new Gb(4,0),d=Ib,e=d.a,f=c.b-e.b;(0<(c.a-e.a||f)?d.c:d.b)(d.a,c,a,b)}function Jb(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 Kb(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 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(a,b){if(0==b.length)return a;var c=b.map(function(d){return new tb(d)});return a.map(function(d){return new tb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Lb,[]).map(function(d){return d.toString()})}function Qb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:b||[],keyIds:new Set}}
80
- var Rb={Ea:"video",Qa:"audio",aa:"text",yf:"image",qf:"application"};function Sb(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Sb.prototype.resolve=function(){};Sb.prototype.reject=function(){};function Tb(a){this.b=a;this.a=void 0}Tb.prototype.value=function(){void 0==this.a&&(this.a=this.b());return this.a};function Ub(){}function Vb(a){if(!a)return"";a=L(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=Wb(a);a=escape(a);try{return decodeURIComponent(a)}catch(b){throw new M(2,2,2004);}}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=rb(a);d=r(jb(d));for(var e=d.next();!e.done;e=d.next())e=e.value,c[e]=a.getUint16(2*e,b);return Wb(c)}
81
- function Yb(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=L(a);if(239==c[0]&&187==c[1]&&191==c[2])return Vb(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 Vb(a);throw new M(2,2,2003);}
82
- function Zb(a){a=encodeURIComponent(a);var b=unescape(a);a=new Uint8Array(b.length);b=r(lb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.Z]=c.item.charCodeAt(0);return pb(a)}function $b(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=r(lb(a)),f=e.next();!f.done;f=e.next())f=f.value,d.setUint16(2*f.Z,f.item.charCodeAt(0),b);return c}function Wb(a){return ac.value()(a)}K("shaka.util.StringUtils",Ub);Ub.resetFromCharCode=function(){ac.a=void 0};Ub.toUTF16=$b;Ub.toUTF8=Zb;
83
- Ub.fromBytesAutoDetect=Yb;Ub.fromUTF16=Xb;Ub.fromUTF8=Vb;var ac=new Tb(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={Ma:65536};0<b.Ma;b={Ma:b.Ma},b.Ma/=2)if(a(b.Ma))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ma)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ma));return e}}(b);return null});function bc(){}function cc(a){a=Wb(L(a));return btoa(a)}function dc(a,b){b=void 0==b?!0:b;var c=cc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function ec(a){var b=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));a=new Uint8Array(b.length);b=r(lb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.Z]=c.item.charCodeAt(0);return a}
84
- function fc(a){var b=a.length/2,c=new Uint8Array(b);b=r(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 gc(a){var b=L(a);a="";b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}
85
- function hc(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];var d=0,e=r(b);for(c=e.next();!c.done;c=e.next())d+=c.value.byteLength;d=new Uint8Array(d);e=0;b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,d.set(L(c),e),e+=c.byteLength;return d}K("shaka.util.Uint8ArrayUtils",bc);bc.concat=hc;bc.toHex=gc;bc.fromHex=fc;bc.fromBase64=ec;bc.toBase64=dc;bc.toStandardBase64=cc;
86
- bc.equal=function(a,b){Hb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return nb(a,b)};function ic(){var a=this;this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0});this.b=null;this.h=[];this.c=[];this.g=[];this.f=!1;this.a.on("data",function(b){a.c=b.captions;a.g=b.metadata;a.h.push(hc(b.initSegment,b.data))});this.a.on("done",function(){var b={data:hc.apply(bc,ia(a.h)),captions:a.c,metadata:a.g};a.b.resolve(b);a.f=!1})}ic.prototype.destroy=function(){this.a.dispose();this.a=null;return Promise.resolve()};
87
- function jc(a,b){if(!window.muxjs||"mp2t"!=a.toLowerCase().split(";")[0].split("/")[1])return!1;if(b)return MediaSource.isTypeSupported(kc(b,a));var c=kc("audio",a),d=kc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}
88
- function kc(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 lc(a,b){a.f=!0;a.b=new Sb;a.h=[];a.c=[];a.g=[];var c=L(b);a.a.push(c);a.a.flush();a.f&&a.b.reject(new M(2,3,3018));return a.b};function mc(a){this.b=a;this.a=null}mc.prototype.R=function(a){var b=this;this.stop();var c=!0,d=null;this.a=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.b()},1E3*a);return this};mc.prototype.stop=function(){this.a&&(this.a(),this.a=null)};function N(a){this.b=a;this.a=null}N.prototype.Sb=function(){this.stop();this.b();return this};N.prototype.R=function(a){var b=this;this.stop();this.a=(new mc(function(){b.b()})).R(a);return this};N.prototype.sa=function(a){var b=this;this.stop();this.a=(new mc(function(){b.a.R(a);b.b()})).R(a);return this};N.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)};K("shaka.util.Timer",N);N.prototype.stop=N.prototype.stop;N.prototype.tickEvery=N.prototype.sa;N.prototype.tickAfter=N.prototype.R;
89
- N.prototype.tickNow=N.prototype.Sb;function nc(a,b){var c=oc();this.j=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.f=null==a.baseDelay?c.baseDelay:a.baseDelay;this.h=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.g=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.a=0;this.b=this.f;if(this.c=void 0===b?!1:b)this.a=1}
90
- function pc(a){var b,c;return J(function(d){if(1==d.a){if(a.a>=a.j)if(a.c)a.a=1,a.b=a.f;else throw new M(2,7,1010);b=a.a;a.a++;if(0==b)return d["return"]();c=a.b*(1+(2*Math.random()-1)*a.h);return u(d,new Promise(function(e){(new N(e)).R(c/1E3)}),2)}a.b*=a.g;w(d)})}function oc(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function qc(a,b){this.promise=a;this.c=b;this.a=!1}function rc(a){return new qc(Promise.reject(a),function(){return Promise.resolve()})}function sc(){var a=Promise.reject(new M(2,7,7001));a["catch"](function(){});return new qc(a,function(){return Promise.resolve()})}function tc(a){return new qc(Promise.resolve(a),function(){return Promise.resolve()})}function uc(a){return new qc(a,function(){return a["catch"](function(){})})}qc.prototype.abort=function(){this.a=!0;return this.c()};
91
- function vc(a){return new qc(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}qc.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
92
- qc.prototype.U=function(a,b){function c(h){return function(k){if(e.a&&h)f.reject(g);else{var l=h?a:b;l?d=wc(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Sb,g=new M(2,7,7001);this.promise.then(c(!0),c(!1));return new qc(f,function(){return d()})};
93
- function wc(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()}}}K("shaka.util.AbortableOperation",qc);qc.prototype.chain=qc.prototype.U;qc.prototype["finally"]=qc.prototype["finally"];qc.all=vc;qc.prototype.abort=qc.prototype.abort;qc.notAbortable=uc;qc.completed=tc;qc.aborted=sc;qc.failed=rc;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.a=!1}P.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};P.prototype.stopImmediatePropagation=function(){this.a=!0};
94
- P.prototype.stopPropagation=function(){};K("shaka.util.FakeEvent",P);function xc(){this.a={}}xc.prototype.push=function(a,b){this.a.hasOwnProperty(a)?this.a[a].push(b):this.a[a]=[b]};xc.prototype.get=function(a){return(a=this.a[a])?a.slice():null};xc.prototype.remove=function(a,b){a in this.a&&(this.a[a]=this.a[a].filter(function(c){return c!=b}),0==this.a[a].length&&delete this.a[a])};function yc(a,b){for(var c in a.a)b(c,a.a[c])}xc.prototype.size=function(){return Object.keys(this.a).length};function zc(){this.Pc=new xc;this.ac=this}zc.prototype.addEventListener=function(a,b){this.Pc.push(a,b)};zc.prototype.removeEventListener=function(a,b){this.Pc.remove(a,b)};zc.prototype.dispatchEvent=function(a){var b=this.Pc.get(a.type)||[];b=r(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.ac;a.currentTarget=this.ac;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.a)break}return a.defaultPrevented};function Ac(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 Bc(a){var b={},c;for(c in a)b[c]=a[c];return b};function Cc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Dc(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function Ec(a,b,c){c||(c=Cc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Dc:d.Dc},e=a.next()){d.Dc=e.value;e=b.findIndex(function(f){return function(g){return c(f.Dc,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
95
- function Fc(a,b,c){c||(c=Cc);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function Gc(){this.a=[]}function Hc(a,b){a.a.push(b["finally"](function(){Dc(a.a,b)}))}Gc.prototype.destroy=function(){for(var a=[],b=r(this.a),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.a=[];return Promise.all(a)};function Ic(a){zc.call(this);this.f=!1;this.g=new Gc;this.a=new Set;this.b=new Set;this.c=a||null}pa(Ic,zc);function Jc(a,b,c){c=c||Kc;var d=Lc[a];if(!d||c>=d.priority)Lc[a]={priority:c,Re:b}}p=Ic.prototype;p.Te=function(a){this.a.add(a)};p.lf=function(a){this.a["delete"](a)};p.ke=function(){this.a.clear()};p.Ue=function(a){this.b.add(a)};p.mf=function(a){this.b["delete"](a)};p.le=function(){this.b.clear()};
96
- function Mc(a,b){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null}}p.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};
97
- p.request=function(a,b){var c=this,d=new Nc;if(this.f){var e=Promise.reject(new M(2,7,7001));e["catch"](function(){});return new Oc(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ac(b.retryParameters):oc();b.uris=Ac(b.uris);e=Pc(this,a,b);var f=e.U(function(){return Qc(c,a,b,new nc(b.retryParameters,!1),0,null,d)}),g=f.U(function(n){return Rc(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
98
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.U(function(n){var q=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=q;n.Je||!c.c||t.fromCache||a!=Sc||c.c(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new Oc(m.promise,function(){return m.abort()},d);Hc(this.g,e);return e};
99
- function Pc(a,b,c){var d=tc(void 0),e={};a=r(a.a);for(var f=a.next();!f.done;e={Hc:e.Hc},f=a.next())e.Hc=f.value,d=d.U(function(g){return function(){c.body&&(c.body=pb(c.body));return g.Hc(b,c)}}(e));return d.U(void 0,function(g){if(g instanceof M&&7001==g.code)throw g;throw new M(2,1,1006,g);})}
100
- function Qc(a,b,c,d,e,f,g){var h=new tb(c.uris[e]),k=h.wa,l=!1;k||(k=location.protocol,k=k.slice(0,-1),ub(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Lc[k])?k.Re:null;if(!m)return rc(new M(2,1,1E3,h));var n;return uc(pc(d)).U(function(){if(a.f)return sc();n=Date.now();return m(c.uris[e],c,b,function(q,t,v){a.c&&b==Sc&&(a.c(q,t),l=!0,g.a=v)})}).U(function(q){void 0==q.timeMs&&(q.timeMs=Date.now()-n);return{response:q,Je:l}},function(q){if(a.f)return sc();if(q instanceof M){if(7001==q.code)throw q;
101
- if(1010==q.code)throw f;if(1==q.severity){var t=new P("retry",{error:q});a.dispatchEvent(t);e=(e+1)%c.uris.length;return Qc(a,b,c,d,e,q,g)}}throw q;})}
102
- function Rc(a,b,c){var d=tc(void 0),e={};a=r(a.b);for(var f=a.next();!f.done;e={Ic:e.Ic},f=a.next())e.Ic=f.value,d=d.U(function(g){return function(){var h=c.response;h.data&&(h.data=pb(h.data));return g.Ic(b,h)}}(e));return d.U(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);})}K("shaka.net.NetworkingEngine",Ic);Ic.prototype.request=Ic.prototype.request;Ic.prototype.destroy=Ic.prototype.destroy;Ic.makeRequest=Mc;
103
- Ic.defaultRetryParameters=function(){return oc()};Ic.prototype.clearAllResponseFilters=Ic.prototype.le;Ic.prototype.unregisterResponseFilter=Ic.prototype.mf;Ic.prototype.registerResponseFilter=Ic.prototype.Ue;Ic.prototype.clearAllRequestFilters=Ic.prototype.ke;Ic.prototype.unregisterRequestFilter=Ic.prototype.lf;Ic.prototype.registerRequestFilter=Ic.prototype.Te;Ic.unregisterScheme=function(a){delete Lc[a]};Ic.registerScheme=Jc;function Nc(){this.a=0}Ic.NumBytesRemainingClass=Nc;
104
- function Oc(a,b,c){qc.call(this,a,b);this.b=c}pa(Oc,qc);Ic.PendingRequest=Oc;var Sc=1;Ic.RequestType={MANIFEST:0,SEGMENT:Sc,LICENSE:2,APP:3,TIMING:4};var Kc=3;Ic.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Kc};var Lc={};function Tc(a){this.a=!1;this.b=new Sb;this.c=a}Tc.prototype.destroy=function(){var a=this;if(this.a)return this.b;this.a=!0;return this.c().then(function(){a.b.resolve()},function(){a.b.resolve()})};function Uc(a,b){if(a.a){if(b instanceof M&&7003==b.code)throw b;throw new M(2,7,7003,b);}};function Vc(){this.a=new xc}p=Vc.prototype;p.release=function(){this.$a();this.a=null};p.l=function(a,b,c,d){this.a&&(a=new Wc(a,b,c,d),this.a.push(b,a))};p.ja=function(a,b,c,d){function e(g){f.ta(a,b,e);c(g)}var f=this;this.l(a,b,e,d)};p.ta=function(a,b,c){if(this.a){var d=this.a.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.ta(),this.a.remove(b,e))}};
105
- p.$a=function(){if(this.a){var a=this.a,b=[],c;for(c in a.a)b.push.apply(b,ia(a.a[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.ta();this.a.a={}}};K("shaka.util.EventManager",Vc);Vc.prototype.removeAll=Vc.prototype.$a;Vc.prototype.unlisten=Vc.prototype.ta;Vc.prototype.listenOnce=Vc.prototype.ja;Vc.prototype.listen=Vc.prototype.l;Vc.prototype.release=Vc.prototype.release;function Wc(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.a=Xc(a,d);this.target.addEventListener(b,c,this.a)}
106
- Wc.prototype.ta=function(){this.target.removeEventListener(this.type,this.listener,this.a);this.listener=this.target=null;this.a=!1};function Xc(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 Yc(a)?b:b.capture||!1}
107
- function Yc(a){var b=Zc;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}Zc=b}return b||!1}var Zc=void 0;function $c(){}function ad(a){a=Yb(a);return(new tb(a)).va}function bd(a,b,c){function d(h){rb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(L(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new M(2,6,6015);var e;"string"==typeof b?e=$b(b,!0):e=b;a=Yb(a);a=$b(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}K("shaka.util.FairPlayUtils",$c);$c.initDataTransform=bd;$c.defaultGetContentId=ad;function cd(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function dd(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function ed(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=r(a),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function fd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function gd(a){var b=[a.mimeType];hd.forEach(function(c,d){var e=a[d];e&&b.push(c+'="'+e+'"')});return b.join(";")}function id(a){a=a.split(".");var b=a[0];a.pop();return b}var hd=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function jd(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function kd(a){return""!=ld().canPlayType(a)}function md(){return nd("Tizen")}function od(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!md()}function pd(){if(!od())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function nd(a){return(navigator.userAgent||"").includes(a)}
108
- function ld(){if(qd)return qd;rd||(rd=new N(function(){qd=null}));(qd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(qd=document.createElement("video"));rd.R(1);return qd}var rd=null,qd=null;function sd(a,b){var c=this;b=void 0===b?1:b;this.u=a;this.m=new Set;this.a=this.h=null;this.M=!1;this.G=0;this.c=null;this.b=new Vc;this.f=new Map;this.v=[];this.j=new Sb;this.i=null;this.g=function(d){c.j.reject(d);a.onError(d)};this.ea=new Map;this.T=new Map;this.K=new N(function(){return td(c)});this.A=!1;this.D=[];this.I=!1;this.X=(new N(function(){wd(c)})).sa(b);this.j["catch"](function(){});this.F=new Tc(function(){return xd(c)})}sd.prototype.destroy=function(){return this.F.destroy()};
109
- function xd(a){return J(function(b){switch(b.a){case 1:return a.b.release(),a.b=null,a.j.reject(),a.X.stop(),a.X=null,a.K.stop(),a.K=null,u(b,yd(a),2);case 2:if(!a.a){b.s(3);break}y(b,4);return u(b,a.a.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:C(b);case 5:a.a=null;case 3:a.c=null,a.m.clear(),a.h=null,a.v=[],a.i=null,a.g=function(){},a.u=null,w(b)}})}sd.prototype.configure=function(a){this.i=a};function zd(a,b,c){a.v=[];a.A=c;return Ad(a,b)}
110
- function Bd(a,b,c){a.v=c;a.A=0<c.length;return Ad(a,b)}function Cd(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 Dd(a,g)}
111
- function Ad(a,b){var c=Ed(a);if(c)for(var d=r(b),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=[c]),e.audio&&(e.audio.drmInfos=[c]);c=b.some(function(g){return g.video&&g.video.drmInfos.length||g.audio&&g.audio.drmInfos.length?!0:!1});c||(d=cd(a.i.servers),Fd(b,d));d=r(b);for(e=d.next();!e.done;e=d.next()){e=e.value;e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())Gd(f.value,cd(a.i.servers),cd(a.i.advanced||{}))}d=Hd(a,
112
- b);if(!d.size)return a.M=!0,Promise.resolve();d=Dd(a,d);return c?d:d["catch"](function(){})}
113
- sd.prototype.Ab=function(a){var b=this,c,d;return J(function(e){if(1==e.a){if(!b.h)return b.b.ja(a,"encrypted",function(){b.g(new M(2,6,6010))}),e["return"]();b.a=a;b.b.ja(b.a,"play",function(){for(var f=r(b.D),g=f.next();!g.done;g=f.next())Id(b,g.value);b.I=!0;b.D=[]});"webkitCurrentPlaybackTargetIsWireless"in b.a&&b.b.l(b.a,"webkitcurrentplaybacktargetiswirelesschanged",function(){return yd(b)});c=b.a.setMediaKeys(b.h);c=c["catch"](function(f){return Promise.reject(new M(2,6,6003,f.message))});
114
- return u(e,c,2)}Uc(b.F);Jd(b);b.c.initData.length||b.v.length||(d=function(f){return Kd(b,f.initDataType,L(f.initData))},b.b.l(b.a,"encrypted",d));w(e)})};function Ld(a){var b;return J(function(c){if(1==c.a){if(!(a.h&&a.c&&a.c.serverCertificate&&a.c.serverCertificate.length))return c.s(0);y(c,3);return u(c,a.h.setServerCertificate(a.c.serverCertificate),5)}if(3!=c.a)return ua(c,0);b=C(c);throw new M(2,6,6004,b.message);})}
115
- function Md(a,b){var c,d,e;return J(function(f){if(1==f.a)return u(f,Nd(a,b),2);c=f.b;if(!c)return f["return"]();d=[];if(e=a.f.get(c))e.Ba=new Sb,d.push(e.Ba);d.push(c.remove());return u(f,Promise.all(d),0)})}function Jd(a){for(var b=(a.c?a.c.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Kd(a,d.initDataType,d.initData);c=r(a.v);for(d=c.next();!d.done;d=c.next())Nd(a,d.value);b.length||a.v.length||a.j.resolve();return a.j}
116
- function Kd(a,b,c){var d=a.f.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(nb(c,e.value.initData)&&!nd("Tizen 2"))return;Od(a,b,c)}function Pd(a){return a?a.keySystem:""}function Qd(a,b){if(navigator.userAgent.match(/Edge\//))return!0;b=b.toLowerCase();if(md()&&b.includes('codecs="ac-3"')){var c=b.replace("ac-3","ec-3");return a.m.has(b)||a.m.has(c)}return a.m.has(b)}function Rd(a){a=a.f.keys();a=gb(a,function(b){return b.sessionId});return Array.from(a)}
117
- sd.prototype.Fb=function(){var a=Infinity,b=this.f.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};
118
- function Hd(a,b){for(var c=new Set,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(e=f.next();!e.done;e=f.next())c.add(e.value)}d=r(c);for(e=d.next();!e.done;e=d.next())Gd(e.value,cd(a.i.servers),cd(a.i.advanced||{}));f=a.A?"required":"optional";var g=a.A?["persistent-license"]:["temporary"];d=new Map;c=r(c);for(e=c.next();!e.done;e=c.next())e=e.value,d.set(e.keySystem,{initDataTypes:["cenc"],audioCapabilities:[],videoCapabilities:[],
119
- distinctiveIdentifier:"optional",persistentState:f,sessionTypes:g,label:e.keySystem,drmInfos:[]});c=r(b);for(e=c.next();!e.done;e=c.next())for(e=e.value,f=r([e.audio,e.video]),e=f.next();!e.done;e=f.next())if(g=e.value){var h=Sd(g),k=null;"ac-3"==g.codecs.toLowerCase()&&md()&&(k=Sd(g,"ec-3"));var l=r(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=ia(new Set(m.initData.map(function(q){return q.initDataType}))).concat());
120
- m.distinctiveIdentifierRequired&&(e.distinctiveIdentifier="required");m.persistentStateRequired&&(e.persistentState="required");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}function Sd(a,b){var c=fd(a.mimeType,b||a.codecs);return jc(c)?kc(a.type,c):c}
121
- function Dd(a,b){var c,d,e,f,g,h,k,l,m,n,q,t,v,z,x,A,D,B,E,H,G,F;return J(function(I){switch(I.a){case 1:if(1==b.size&&b.has(""))throw new M(2,6,6E3);c=r(b.values());for(d=c.next();!d.done;d=c.next())e=d.value,0==e.audioCapabilities.length&&delete e.audioCapabilities,0==e.videoCapabilities.length&&delete e.videoCapabilities;g=r([!0,!1]);h=g.next();case 2:if(h.done){I.s(4);break}k=h.value;l=r(b.keys());m=l.next();case 5:if(m.done){I.s(7);break}n=m.value;q=b.get(n);t=q.drmInfos.some(function(O){return!!O.licenseServerUri});
122
- if(t!=k){I.s(6);break}y(I,8);return u(I,navigator.requestMediaKeySystemAccess(n,[q]),10);case 10:f=I.b;I.s(7);break;case 8:C(I);case 9:Uc(a.F);case 6:m=l.next();I.s(5);break;case 7:if(f){I.s(4);break}h=g.next();I.s(2);break;case 4:if(!f)throw new M(2,6,6001);Uc(a.F);y(I,11);a.m.clear();v=f.getConfiguration();z=v.audioCapabilities||[];x=v.videoCapabilities||[];A=r(z);for(D=A.next();!D.done;D=A.next())B=D.value,a.m.add(B.contentType.toLowerCase());E=r(x);for(D=E.next();!D.done;D=E.next())H=D.value,
123
- a.m.add(H.contentType.toLowerCase());a.c=Td(f.keySystem,b.get(f.keySystem));if(!a.c.licenseServerUri)throw new M(2,6,6012,a.c.keySystem);return u(I,f.createMediaKeys(),13);case 13:return G=I.b,Uc(a.F),a.h=G,a.M=!0,u(I,Ld(a),14);case 14:Uc(a.F);ua(I,0);break;case 11:F=C(I);Uc(a.F,F);a.c=null;a.m.clear();if(F instanceof M)throw F;throw new M(2,6,6002,F.message);}})}
124
- function Ed(a){a=cd(a.i.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=fc(f),h=fc(e);g={kty:"oct",kid:dc(g,!1),k:dc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:L(Zb(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
74
+ function nb(a){var b;a instanceof nb?(ob(this,a.Aa),this.ib=a.ib,this.Ca=a.Ca,pb(this,a.zb),this.ra=a.ra,qb(this,a.g.clone()),this.Za=a.Za):a&&(b=String(a).match(mb))?(ob(this,b[1]||"",!0),this.ib=rb(b[2]||""),this.Ca=rb(b[3]||"",!0),pb(this,b[4]),this.ra=rb(b[5]||"",!0),qb(this,b[6]||"",!0),this.Za=rb(b[7]||"")):this.g=new sb(null)}q=nb.prototype;q.Aa="";q.ib="";q.Ca="";q.zb=null;q.ra="";q.Za="";
75
+ q.toString=function(){var a=[],b=this.Aa;b&&a.push(tb(b,ub,!0),":");if(b=this.Ca){a.push("//");var c=this.ib;c&&a.push(tb(c,ub,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.zb;null!=b&&a.push(":",String(b))}if(b=this.ra)this.Ca&&"/"!=b.charAt(0)&&a.push("/"),a.push(tb(b,"/"==b.charAt(0)?vb:wb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Za)&&a.push("#",tb(b,xb));return a.join("")};
76
+ q.resolve=function(a){var b=this.clone();"data"===b.Aa&&(b=new nb);var c=!!a.Aa;c?ob(b,a.Aa):c=!!a.ib;c?b.ib=a.ib:c=!!a.Ca;c?b.Ca=a.Ca:c=null!=a.zb;var d=a.ra;if(c)pb(b,a.zb);else if(c=!!a.ra){if("/"!=d.charAt(0))if(this.Ca&&!this.ra)d="/"+d;else{var e=b.ra.lastIndexOf("/");-1!=e&&(d=b.ra.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
77
+ h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.ra=d:c=""!==a.g.toString();c?qb(b,a.g.clone()):c=!!a.Za;c&&(b.Za=a.Za);return b};q.clone=function(){return new nb(this)};function ob(a,b,c){a.Aa=c?rb(b,!0):b;a.Aa&&(a.Aa=a.Aa.replace(/:$/,""))}function pb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.zb=b}else a.zb=null}function qb(a,b,c){b instanceof sb?a.g=b:(c||(b=tb(b,yb)),a.g=new sb(b))}
78
+ function rb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function tb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,zb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function zb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var ub=/[#\/\?@]/g,wb=/[#\?:]/g,vb=/[#\?]/g,yb=/[#\?@]/g,xb=/#/g;function sb(a){this.g=a||null}q=sb.prototype;q.oa=null;q.qc=null;
79
+ q.add=function(a,b){if(!this.oa&&(this.oa={},this.qc=0,this.g))for(var c=this.g.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.g=null;(c=this.oa.hasOwnProperty(a)&&this.oa[a])||(this.oa[a]=c=[]);c.push(b);this.qc++;return this};
80
+ q.toString=function(){if(this.g)return this.g;if(!this.oa)return"";var a=[],b;for(b in this.oa)for(var c=encodeURIComponent(b),d=this.oa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new sb;a.g=this.g;if(this.oa){var b={},c;for(c in this.oa)b[c]=this.oa[c].concat();a.oa=b;a.qc=this.qc}return a};function Cb(a,b){this.g=a;this.h=b}Cb.prototype.toString=function(){return"v"+this.g+"."+this.h};function Db(a,b){var c=new Cb(4,0),d=Eb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Fb(a,b,c,d){Sa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Gb(a,b,c,d){Pa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Eb=null;function Hb(a,b){return a.concat(b)}function Ib(){}function Jb(a){return null!=a}function Kb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(Db("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){Db("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Lb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new nb(d)});return a.map(function(d){return new nb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Hb,[]).map(function(d){return d.toString()})}function Mb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:b||[],keyIds:new Set}}
81
+ var Nb={Ka:"video",Wa:"audio",ha:"text",Cf:"image",uf:"application"};function Ob(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Ob.prototype.resolve=function(){};Ob.prototype.reject=function(){};function Pb(a){this.h=a;this.g=void 0}Pb.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Qb(){}function Rb(a){if(!a)return"";a=N(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=Sb(a);a=escape(a);try{return decodeURIComponent(a)}catch(b){throw new O(2,2,2004);}}function Tb(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new O(2,2,2004);var d=Math.floor(a.byteLength/2);c=new Uint16Array(d);a=lb(a);d=r(db(d));for(var e=d.next();!e.done;e=d.next())e=e.value,c[e]=a.getUint16(2*e,b);return Sb(c)}
82
+ function Ub(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=N(a);if(239==c[0]&&187==c[1]&&191==c[2])return Rb(c);if(254==c[0]&&255==c[1])return Tb(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Tb(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Tb(a,!1);if(0==c[1]&&0==c[3])return Tb(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Rb(a);throw new O(2,2,2003);}
83
+ function Vb(a){a=encodeURIComponent(a);var b=unescape(a);a=new Uint8Array(b.length);b=r(fb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.da]=c.item.charCodeAt(0);return jb(a)}function Wb(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=r(fb(a)),f=e.next();!f.done;f=e.next())f=f.value,d.setUint16(2*f.da,f.item.charCodeAt(0),b);return c}function Sb(a){return Xb.value()(a)}L("shaka.util.StringUtils",Qb);Qb.resetFromCharCode=function(){Xb.g=void 0};Qb.toUTF16=Wb;Qb.toUTF8=Vb;
84
+ Qb.fromBytesAutoDetect=Ub;Qb.fromUTF16=Tb;Qb.fromUTF8=Rb;var Xb=new Pb(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={Ra:65536};0<b.Ra;b={Ra:b.Ra},b.Ra/=2)if(a(b.Ra))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ra)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ra));return e}}(b);return null});function Yb(){}function Zb(a){a=Sb(N(a));return btoa(a)}function $b(a,b){b=void 0==b?!0:b;var c=Zb(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function ac(a){var b=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));a=new Uint8Array(b.length);b=r(fb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.da]=c.item.charCodeAt(0);return a}
85
+ function bc(a){var b=a.length/2,c=new Uint8Array(b);b=r(db(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 cc(a){var b=N(a);a="";b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}
86
+ function dc(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];var d=0,e=r(b);for(c=e.next();!c.done;c=e.next())d+=c.value.byteLength;d=new Uint8Array(d);e=0;b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,d.set(N(c),e),e+=c.byteLength;return d}L("shaka.util.Uint8ArrayUtils",Yb);Yb.concat=dc;Yb.toHex=cc;Yb.fromHex=bc;Yb.fromBase64=ac;Yb.toBase64=$b;Yb.toStandardBase64=Zb;
87
+ Yb.equal=function(a,b){Db("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return hb(a,b)};function ec(){var a=this;this.g=new muxjs.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(dc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:dc.apply(Yb,ha(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}ec.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
88
+ function fc(a,b){if(!window.muxjs||"mp2t"!=a.toLowerCase().split(";")[0].split("/")[1])return!1;if(b)return MediaSource.isTypeSupported(gc(b,a));var c=gc("audio",a),d=gc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}
89
+ function gc(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 hc(a,b){a.l=!0;a.h=new Ob;a.m=[];a.j=[];a.i=[];var c=N(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new O(2,3,3018));return a.h};function ic(a){this.h=a;this.g=null}ic.prototype.W=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};ic.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Q(a){this.h=a;this.g=null}Q.prototype.ac=function(){this.stop();this.h();return this};Q.prototype.W=function(a){var b=this;this.stop();this.g=(new ic(function(){b.h()})).W(a);return this};Q.prototype.xa=function(a){var b=this;this.stop();this.g=(new ic(function(){b.g.W(a);b.h()})).W(a);return this};Q.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};L("shaka.util.Timer",Q);Q.prototype.stop=Q.prototype.stop;Q.prototype.tickEvery=Q.prototype.xa;Q.prototype.tickAfter=Q.prototype.W;
90
+ Q.prototype.tickNow=Q.prototype.ac;function jc(a,b){var c=kc();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}
91
+ function lc(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 O(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 t(d,new Promise(function(e){(new Q(e)).W(c/1E3)}),2)}a.h*=a.m;x(d)})}function kc(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function mc(a,b){this.promise=a;this.i=b;this.g=!1}function nc(a){return new mc(Promise.reject(a),function(){return Promise.resolve()})}function oc(){var a=Promise.reject(new O(2,7,7001));a["catch"](function(){});return new mc(a,function(){return Promise.resolve()})}function pc(a){return new mc(Promise.resolve(a),function(){return Promise.resolve()})}function qc(a){return new mc(a,function(){return a["catch"](function(){})})}mc.prototype.abort=function(){this.g=!0;return this.i()};
92
+ function rc(a){return new mc(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}mc.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
93
+ mc.prototype.$=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=sc(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Ob,g=new O(2,7,7001);this.promise.then(c(!0),c(!1));return new mc(f,function(){return d()})};
94
+ function sc(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()}}}L("shaka.util.AbortableOperation",mc);mc.prototype.chain=mc.prototype.$;mc.prototype["finally"]=mc.prototype["finally"];mc.all=rc;mc.prototype.abort=mc.prototype.abort;mc.notAbortable=qc;mc.completed=pc;mc.aborted=oc;mc.failed=nc;function R(a,b){if(b)if(b instanceof Map)for(var c=r(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
95
+ function tc(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(){};L("shaka.util.FakeEvent",R);function uc(){this.g={}}uc.prototype.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};uc.prototype.get=function(a){return(a=this.g[a])?a.slice():null};uc.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 vc(a,b){for(var c in a.g)b(c,a.g[c])}uc.prototype.size=function(){return Object.keys(this.g).length};function wc(){this.Wc=new uc;this.kc=this}wc.prototype.addEventListener=function(a,b){this.Wc.push(a,b)};wc.prototype.removeEventListener=function(a,b){this.Wc.remove(a,b)};wc.prototype.dispatchEvent=function(a){var b=this.Wc.get(a.type)||[];b=r(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.kc;a.currentTarget=this.kc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};function xc(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 yc(a){var b={},c;for(c in a)b[c]=a[c];return b};function zc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Ac(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function Bc(a,b,c){c||(c=zc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Lc:d.Lc},e=a.next()){d.Lc=e.value;e=b.findIndex(function(f){return function(g){return c(f.Lc,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
96
+ function Cc(a,b,c){c||(c=zc);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 Dc(){this.g=[]}function Ec(a,b){a.g.push(b["finally"](function(){Ac(a.g,b)}))}Dc.prototype.destroy=function(){for(var a=[],b=r(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function Fc(a){wc.call(this);this.i=!1;this.l=new Dc;this.g=new Set;this.h=new Set;this.j=a||null}oa(Fc,wc);function Gc(a,b,c){c=c||Hc;var d=Ic[a];if(!d||c>=d.priority)Ic[a]={priority:c,Ve:b}}q=Fc.prototype;q.Xe=function(a){this.g.add(a)};q.qf=function(a){this.g["delete"](a)};q.oe=function(){this.g.clear()};q.Ye=function(a){this.h.add(a)};q.rf=function(a){this.h["delete"](a)};q.pe=function(){this.h.clear()};
97
+ function Jc(a,b){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();return this.l.destroy()};
98
+ q.request=function(a,b){var c=this,d=new Kc;if(this.i){var e=Promise.reject(new O(2,7,7001));e["catch"](function(){});return new Mc(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?xc(b.retryParameters):kc();b.uris=xc(b.uris);e=Nc(this,a,b);var f=e.$(function(){return Oc(c,a,b,new jc(b.retryParameters,!1),0,null,d)}),g=f.$(function(n){return Pc(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
99
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.$(function(n){var p=Date.now()-l,u=n.response;u.timeMs+=k;u.timeMs+=p;n.Ne||!c.j||u.fromCache||a!=Qc||c.j(u.timeMs,u.data.byteLength);return u},function(n){n&&(n.severity=2);throw n;});e=new Mc(m.promise,function(){return m.abort()},d);Ec(this.l,e);return e};
100
+ function Nc(a,b,c){var d=pc(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Pc:e.Pc},f=a.next())e.Pc=f.value,d=d.$(function(g){return function(){c.body&&(c.body=jb(c.body));return g.Pc(b,c)}}(e));return d.$(void 0,function(g){if(g instanceof O&&7001==g.code)throw g;throw new O(2,1,1006,g);})}
101
+ function Oc(a,b,c,d,e,f,g){var h=new nb(c.uris[e]),k=h.Aa,l=!1;k||(k=location.protocol,k=k.slice(0,-1),ob(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Ic[k])?k.Ve:null;if(!m)return nc(new O(2,1,1E3,h));var n;return qc(lc(d)).$(function(){if(a.i)return oc();n=Date.now();return m(c.uris[e],c,b,function(p,u,v){a.j&&b==Qc&&(a.j(p,u),l=!0,g.g=v)})}).$(function(p){void 0==p.timeMs&&(p.timeMs=Date.now()-n);return{response:p,Ne:l}},function(p){if(a.i)return oc();if(p instanceof O){if(7001==p.code)throw p;
102
+ if(1010==p.code)throw f;if(1==p.severity){var u=(new Map).set("error",p);u=new R("retry",u);a.dispatchEvent(u);e=(e+1)%c.uris.length;return Oc(a,b,c,d,e,p,g)}}throw p;})}
103
+ function Pc(a,b,c){var d=pc(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Qc:e.Qc},f=a.next())e.Qc=f.value,d=d.$(function(g){return function(){var h=c.response;h.data&&(h.data=jb(h.data));return g.Qc(b,h)}}(e));return d.$(function(){return c},function(g){var h=2;if(g instanceof O){if(7001==g.code)throw g;h=g.severity}throw new O(h,1,1007,g);})}L("shaka.net.NetworkingEngine",Fc);Fc.prototype.request=Fc.prototype.request;Fc.prototype.destroy=Fc.prototype.destroy;Fc.makeRequest=Jc;
104
+ Fc.defaultRetryParameters=function(){return kc()};Fc.prototype.clearAllResponseFilters=Fc.prototype.pe;Fc.prototype.unregisterResponseFilter=Fc.prototype.rf;Fc.prototype.registerResponseFilter=Fc.prototype.Ye;Fc.prototype.clearAllRequestFilters=Fc.prototype.oe;Fc.prototype.unregisterRequestFilter=Fc.prototype.qf;Fc.prototype.registerRequestFilter=Fc.prototype.Xe;Fc.unregisterScheme=function(a){delete Ic[a]};Fc.registerScheme=Gc;function Kc(){this.g=0}Fc.NumBytesRemainingClass=Kc;
105
+ function Mc(a,b,c){mc.call(this,a,b);this.h=c}oa(Mc,mc);Fc.PendingRequest=Mc;var Qc=1;Fc.RequestType={MANIFEST:0,SEGMENT:Qc,LICENSE:2,APP:3,TIMING:4};var Hc=3;Fc.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Hc};var Ic={};function Rc(a){this.g=!1;this.h=new Ob;this.i=a}Rc.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 Sc(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function Tc(){this.g=new uc}q=Tc.prototype;q.release=function(){this.gb();this.g=null};q.v=function(a,b,c,d){this.g&&(a=new Uc(a,b,c,d),this.g.push(b,a))};q.pa=function(a,b,c,d){function e(g){f.ya(a,b,e);c(g)}var f=this;this.v(a,b,e,d)};q.ya=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.ya(),this.g.remove(b,e))}};
106
+ q.gb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ha(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.ya();this.g.g={}}};L("shaka.util.EventManager",Tc);Tc.prototype.removeAll=Tc.prototype.gb;Tc.prototype.unlisten=Tc.prototype.ya;Tc.prototype.listenOnce=Tc.prototype.pa;Tc.prototype.listen=Tc.prototype.v;Tc.prototype.release=Tc.prototype.release;function Uc(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=Vc(a,d);this.target.addEventListener(b,c,this.g)}
107
+ Uc.prototype.ya=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function Vc(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 Wc(a)?b:b.capture||!1}
108
+ function Wc(a){var b=Xc;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}Xc=b}return b||!1}var Xc=void 0;function Yc(){}function Zc(a){a=Ub(a);return(new nb(a)).Ca}function $c(a,b,c){function d(h){lb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(N(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new O(2,6,6015);var e;"string"==typeof b?e=Wb(b,!0):e=b;a=Ub(a);a=Wb(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}L("shaka.util.FairPlayUtils",Yc);Yc.initDataTransform=$c;Yc.defaultGetContentId=Zc;function ad(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function bd(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function cd(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=r(a),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function dd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function ed(a){var b=[a.mimeType];fd.forEach(function(c,d){var e=a[d];e&&b.push(c+'="'+e+'"')});return b.join(";")}function gd(a){a=a.split(".");var b=a[0];a.pop();return b}function hd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}
109
+ var fd=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function id(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function jd(a){return""!=kd().canPlayType(a)}function ld(){return md("Tizen")}function nd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!ld()}function od(){if(!nd())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function md(a){return(navigator.userAgent||"").includes(a)}
110
+ function kd(){if(pd)return pd;qd||(qd=new Q(function(){pd=null}));(pd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(pd=document.createElement("video"));qd.W(1);return pd}var qd=null,pd=null;function rd(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.u=new Set;this.g=this.m=null;this.N=!1;this.I=0;this.i=null;this.h=new Tc;this.j=new Map;this.C=[];this.s=new Ob;this.o=null;this.l=function(d){c.s.reject(d);a.onError(d)};this.ka=new Map;this.Z=new Map;this.S=new Q(function(){return sd(c)});this.F=!1;this.K=[];this.P=!1;this.ca=(new Q(function(){td(c)})).xa(b);this.s["catch"](function(){});this.J=new Rc(function(){return ud(c)})}rd.prototype.destroy=function(){return this.J.destroy()};
111
+ function ud(a){return K(function(b){switch(b.g){case 1:return a.h.release(),a.h=null,a.s.reject(),a.ca.stop(),a.ca=null,a.S.stop(),a.S=null,t(b,vd(a),2);case 2:if(!a.g){b.B(3);break}y(b,4);return t(b,a.g.setMediaKeys(null),6);case 6:ta(b,5);break;case 4:C(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,x(b)}})}rd.prototype.configure=function(a){this.o=a};function wd(a,b,c){a.C=[];a.F=c;return xd(a,b)}
112
+ function yd(a,b,c){a.C=c;a.F=0<c.length;return xd(a,b)}function Ad(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 Bd(a,g)}
113
+ function xd(a,b){var c=Cd(a);if(c)for(var d=r(b),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=[c]),e.audio&&(e.audio.drmInfos=[c]);c=b.some(function(g){return g.video&&g.video.drmInfos.length||g.audio&&g.audio.drmInfos.length?!0:!1});c||(d=ad(a.o.servers),Dd(b,d));d=r(b);for(e=d.next();!e.done;e=d.next()){e=e.value;e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())Ed(f.value,ad(a.o.servers),ad(a.o.advanced||{}))}d=Fd(a,
114
+ b);if(!d.size)return a.N=!0,Promise.resolve();d=Bd(a,d);return c?d:d["catch"](function(){})}
115
+ rd.prototype.Ib=function(a){var b=this,c,d;return K(function(e){if(1==e.g){if(!b.m)return b.h.pa(a,"encrypted",function(){b.l(new O(2,6,6010))}),e["return"]();b.g=a;b.h.pa(b.g,"play",function(){for(var f=r(b.K),g=f.next();!g.done;g=f.next())Gd(b,g.value);b.P=!0;b.K=[]});"webkitCurrentPlaybackTargetIsWireless"in b.g&&b.h.v(b.g,"webkitcurrentplaybacktargetiswirelesschanged",function(){return vd(b)});c=b.g.setMediaKeys(b.m);c=c["catch"](function(f){return Promise.reject(new O(2,6,6003,f.message))});
116
+ return t(e,c,2)}Sc(b.J);Hd(b);b.i.initData.length||b.C.length||(d=function(f){return Id(b,f.initDataType,N(f.initData))},b.h.v(b.g,"encrypted",d));x(e)})};function Jd(a){var b;return K(function(c){if(1==c.g){if(!(a.m&&a.i&&a.i.serverCertificate&&a.i.serverCertificate.length))return c.B(0);y(c,3);return t(c,a.m.setServerCertificate(a.i.serverCertificate),5)}if(3!=c.g)return ta(c,0);b=C(c);throw new O(2,6,6004,b.message);})}
117
+ function Kd(a,b){var c,d,e;return K(function(f){if(1==f.g)return t(f,Ld(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.j.get(c))e.Ha=new Ob,d.push(e.Ha);d.push(c.remove());return t(f,Promise.all(d),3)}a.j["delete"](c);x(f)})}function Hd(a){for(var b=(a.i?a.i.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Id(a,d.initDataType,d.initData);c=r(a.C);for(d=c.next();!d.done;d=c.next())Ld(a,d.value);b.length||a.C.length||a.s.resolve();return a.s}
118
+ function Id(a,b,c){var d=a.j.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(hb(c,e.value.initData)&&!md("Tizen 2"))return;Md(a,b,c)}function Nd(a){return a?a.keySystem:""}function Od(a,b){if(navigator.userAgent.match(/Edge\//))return!0;b=b.toLowerCase();if(ld()&&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)}function Pd(a){a=a.j.keys();a=$a(a,function(b){return b.sessionId});return Array.from(a)}
119
+ rd.prototype.Mb=function(){var a=Infinity,b=this.j.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};
120
+ function Fd(a,b){for(var c=new Set,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(e=f.next();!e.done;e=f.next())c.add(e.value)}d=r(c);for(e=d.next();!e.done;e=d.next())Ed(e.value,ad(a.o.servers),ad(a.o.advanced||{}));f=a.F?"required":"optional";var g=a.F?["persistent-license"]:["temporary"];d=new Map;c=r(c);for(e=c.next();!e.done;e=c.next())e=e.value,d.set(e.keySystem,{initDataTypes:["cenc"],audioCapabilities:[],videoCapabilities:[],
121
+ distinctiveIdentifier:"optional",persistentState:f,sessionTypes:g,label:e.keySystem,drmInfos:[]});c=r(b);for(e=c.next();!e.done;e=c.next())for(e=e.value,f=r([e.audio,e.video]),e=f.next();!e.done;e=f.next())if(g=e.value){var h=Qd(g),k=null;"ac-3"==g.codecs.toLowerCase()&&ld()&&(k=Qd(g,"ec-3"));var l=r(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(ha(new Set(m.initData.map(function(p){return p.initDataType})))));
122
+ m.distinctiveIdentifierRequired&&(e.distinctiveIdentifier="required");m.persistentStateRequired&&(e.persistentState="required");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}function Qd(a,b){var c=dd(a.mimeType,b||a.codecs);return fc(c)?gc(a.type,c):c}
123
+ function Bd(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,v,z,w,A,D,B,E,F,H,G;return K(function(I){switch(I.g){case 1:if(1==b.size&&b.has(""))throw new O(2,6,6E3);c=r(b.values());for(d=c.next();!d.done;d=c.next())e=d.value,0==e.audioCapabilities.length&&delete e.audioCapabilities,0==e.videoCapabilities.length&&delete e.videoCapabilities;g=r([!0,!1]);h=g.next();case 2:if(h.done){I.B(4);break}k=h.value;l=r(b.keys());m=l.next();case 5:if(m.done){I.B(7);break}n=m.value;p=b.get(n);u=p.drmInfos.some(function(J){return!!J.licenseServerUri});
124
+ if(u!=k){I.B(6);break}y(I,8);return t(I,navigator.requestMediaKeySystemAccess(n,[p]),10);case 10:f=I.h;I.B(7);break;case 8:C(I);case 9:Sc(a.J);case 6:m=l.next();I.B(5);break;case 7:if(f){I.B(4);break}h=g.next();I.B(2);break;case 4:if(!f)throw new O(2,6,6001);Sc(a.J);y(I,11);a.u.clear();v=f.getConfiguration();z=v.audioCapabilities||[];w=v.videoCapabilities||[];A=r(z);for(D=A.next();!D.done;D=A.next())B=D.value,a.u.add(B.contentType.toLowerCase());E=r(w);for(D=E.next();!D.done;D=E.next())F=D.value,
125
+ a.u.add(F.contentType.toLowerCase());a.i=Rd(f.keySystem,b.get(f.keySystem));if(!a.i.licenseServerUri)throw new O(2,6,6012,a.i.keySystem);return t(I,f.createMediaKeys(),13);case 13:return H=I.h,Sc(a.J),a.m=H,a.N=!0,t(I,Jd(a),14);case 14:Sc(a.J);ta(I,0);break;case 11:G=C(I);Sc(a.J,G);a.i=null;a.u.clear();if(G instanceof O)throw G;throw new O(2,6,6002,G.message);}})}
126
+ function Cd(a){a=ad(a.o.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=bc(f),h=bc(e);g={kty:"oct",kid:$b(g,!1),k:$b(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:N(Vb(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
125
127
  initData:d,keyIds:new Set(c)}}
126
- function Nd(a,b){var c,d,e,f,g;return J(function(h){switch(h.a){case 1:try{c=a.h.createSession("persistent-license")}catch(k){return d=new M(2,6,6005,k.message),a.g(d),h["return"](Promise.reject(d))}a.b.l(c,"message",function(k){a.a&&a.i.delayLicenseRequestUntilPlayed&&a.a.paused&&!a.I?a.D.push(k):Id(a,k)});a.b.l(c,"keystatuseschange",function(k){return Ud(a,k)});e={initData:null,loaded:!1,ed:Infinity,Ba:null};a.f.set(c,e);y(h,2);return u(h,c.load(b),4);case 4:f=h.b;Uc(a.F);if(!f)return a.f["delete"](c),
127
- a.g(new M(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Vd(a)&&a.j.resolve();return h["return"](c);case 2:g=C(h),Uc(a.F,g),a.f["delete"](c),a.g(new M(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
128
- function Od(a,b,c){try{var d=a.A?a.h.createSession("persistent-license"):a.h.createSession()}catch(e){a.g(new M(2,6,6005,e.message));return}a.b.l(d,"message",function(e){a.a&&a.i.delayLicenseRequestUntilPlayed&&a.a.paused&&!a.I?a.D.push(e):Id(a,e)});a.b.l(d,"keystatuseschange",function(e){return Ud(a,e)});a.f.set(d,{initData:c,loaded:!1,ed:Infinity,Ba:null});try{c=a.i.initDataTransform(c,b,a.c)}catch(e){b=e;e instanceof M||(b=new M(2,6,6016,e));a.g(b);return}a.i.logLicenseExchange&&dc(c);d.generateRequest(b,
129
- c)["catch"](function(e){if(!a.F.a){a.f["delete"](d);var f=e.errorCode;if(f&&f.systemCode){var g=f.systemCode;0>g&&(g+=Math.pow(2,32));g="0x"+g.toString(16)}a.g(new M(2,6,6006,e.message,e,g))}})}function Wd(a,b,c){"skd"==b&&(b=c.serverCertificate,c=ad(a),a=bd(a,c,b));return a}
130
- function Id(a,b){var c,d,e,f,g,h,k,l,m,n,q,t,v,z;J(function(x){switch(x.a){case 1:return c=b.target,a.i.logLicenseExchange&&dc(b.message),d=a.f.get(c),e=a.c.licenseServerUri,f=a.i.advanced[a.c.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=Mc([e],a.i.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,"com.microsoft.playready"!=a.c.keySystem&&"com.chromecast.playready"!=a.c.keySystem||
131
- Xd(g),h=Date.now(),y(x,2),l=a.u.qb.request(2,g),u(x,l.promise,4);case 4:k=x.b;ua(x,3);break;case 2:return m=C(x),n=new M(2,6,6007,m),a.g(n),d&&d.Ba&&d.Ba.reject(n),x["return"]();case 3:if(a.F.a)return x["return"]();a.G+=(Date.now()-h)/1E3;a.i.logLicenseExchange&&dc(k.data);y(x,5);return u(x,c.update(k.data),7);case 7:ua(x,6);break;case 5:return q=C(x),t=new M(2,6,6008,q.message),a.g(t),d&&d.Ba&&d.Ba.reject(t),x["return"]();case 6:v=new P("drmsessionupdate"),a.u.onEvent(v),d&&(d.Ba&&d.Ba.resolve(),
132
- z=new N(function(){d.loaded=!0;Vd(a)&&a.j.resolve()}),z.R(Yd)),w(x)}})}
133
- function Xd(a){var b=Xb(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=ec(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
134
- function Ud(a,b){var c=b.target,d=a.f.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if("com.microsoft.playready"==a.c.keySystem&&16==h.byteLength&&(nd("Trident/")||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)}"com.microsoft.playready"==a.c.keySystem&&"status-pending"==g&&(g="usable");"status-pending"!=g&&(d.loaded=!0);"expired"==g&&
135
- (e=!0);k=gc(h);a.ea.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ba&&(a.f["delete"](c),c.close()["catch"](function(){}));Vd(a)&&(a.j.resolve(),a.K.R(Zd))}function td(a){var b=a.ea,c=a.T;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.g(new M(2,6,6014));a.u.rc(dd(c))}
136
- function $d(){var a,b,c,d,e,f,g,h;return J(function(k){return 1==k.a?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready 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,c],f=new Map,g=function(l){var m,n,q;
137
- return J(function(t){switch(t.a){case 1:return y(t,2),u(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.b,q=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,nd("Tizen 3")&&(q=!1),f.set(l,{persistentState:q}),u(t,m.createMediaKeys(),5);case 5:ua(t,0);break;case 2:C(t),f.set(l,null),w(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](dd(f))})}
138
- function ae(a){var b;return J(function(c){if(1==c.a)return b=new Promise(function(d,e){(new N(e)).R(be)}),y(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.a)return ua(c,0);C(c);w(c)})}function yd(a){var b;return J(function(c){b=Array.from(a.f.keys());a.f.clear();return u(c,Promise.all(b.map(function(d){return J(function(e){if(1==e.a)return y(e,2),u(e,ae(d),4);if(2!=e.a)return ua(e,0);C(e);w(e)})})),0)})}
139
- function ce(a,b){var c=b.audio,d=b.video;if(c&&c.encrypted){var e=Sd(c);if(!Qd(a,e))return!1}if(d&&d.encrypted&&(e=Sd(d),!Qd(a,e)))return!1;var f=Pd(a.c);c=(d?d.drmInfos:[]).concat(c?c.drmInfos:[]);return 0==c.length||c.some(function(g){return g.keySystem==f})}
140
- function de(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=r(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(ia(e.keyIds).concat(ia(g.keyIds))):e.keyIds||g.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||g.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||
141
- 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 wd(a){a.f.forEach(function(b,c){var d=b.ed,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.u.onExpirationUpdated(c.sessionId,e),b.ed=e)})}
142
- function Vd(a){a=a.f.values();return hb(a,function(b){return b.loaded})}function Fd(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=r(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
143
- function Td(a,b){var c=[],d=[],e=[],f=new Set;ee(b.drmInfos,c,d,e,f);return{keySystem:a,licenseServerUri:c[0],distinctiveIdentifierRequired:"required"==b.distinctiveIdentifier,persistentStateRequired:"required"==b.persistentState,audioRobustness:(b.audioCapabilities?b.audioCapabilities[0].robustness:"")||"",videoRobustness:(b.videoCapabilities?b.videoCapabilities[0].robustness:"")||"",serverCertificate:d[0],initData:e,keyIds:f}}
144
- function ee(a,b,c,d,e){var f={};a=r(a);for(var g=a.next();!g.done;f={na:f.na},g=a.next()){f.na=g.value;b.includes(f.na.licenseServerUri)||b.push(f.na.licenseServerUri);f.na.serverCertificate&&(c.some(function(l){return function(m){return nb(m,l.na.serverCertificate)}}(f))||c.push(f.na.serverCertificate));if(f.na.initData){g={};for(var h=r(f.na.initData),k=h.next();!k.done;g={Vb:g.Vb},k=h.next())g.Vb=k.value,d.some(function(l){return function(m){var n=l.Vb;return m.keyId&&m.keyId==n.keyId?!0:m.initDataType==
145
- n.initDataType&&nb(m.initData,n.initData)}}(g))||d.push(g.Vb)}if(f.na.keyIds)for(g=r(f.na.keyIds),h=g.next();!h.done;h=g.next())e.add(h.value)}}
146
- function Gd(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||
147
- (a.serverCertificate=c.serverCertificate);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var be=1,Yd=5,Zd=.5,fe=new Tb(function(){return pb(new Uint8Array([0]))});function Q(a,b){this.P=rb(a);this.a=b==ge;this.C=0}p=Q.prototype;p.xa=function(){return this.C<this.P.byteLength};p.Ce=function(){return this.C};p.se=function(){return this.P.byteLength};p.ra=function(){try{var a=this.P.getUint8(this.C);this.C+=1;return a}catch(b){throw he();}};p.Ob=function(){try{var a=this.P.getUint16(this.C,this.a);this.C+=2;return a}catch(b){throw he();}};p.J=function(){try{var a=this.P.getUint32(this.C,this.a);this.C+=4;return a}catch(b){throw he();}};
148
- p.Rd=function(){try{var a=this.P.getInt32(this.C,this.a);this.C+=4;return a}catch(b){throw he();}};p.Za=function(){try{if(this.a){var a=this.P.getUint32(this.C,!0);var b=this.P.getUint32(this.C+4,!0)}else b=this.P.getUint32(this.C,!1),a=this.P.getUint32(this.C+4,!1)}catch(c){throw he();}if(2097151<b)throw new M(2,3,3001);this.C+=8;return b*Math.pow(2,32)+a};p.Ya=function(a){if(this.C+a>this.P.byteLength)throw he();var b=L(this.P,this.C,a);this.C+=a;return b};
149
- p.skip=function(a){if(this.C+a>this.P.byteLength)throw he();this.C+=a};p.Td=function(a){if(this.C<a)throw he();this.C-=a};p.seek=function(a){if(0>a||a>this.P.byteLength)throw he();this.C=a};p.Nb=function(){for(var a=this.C;this.xa()&&0!=this.P.getUint8(this.C);)this.C+=1;a=L(this.P,a,this.C-a);this.C+=1;return Vb(a)};function he(){return new M(2,3,3E3)}K("shaka.util.DataViewReader",Q);Q.prototype.readTerminatedString=Q.prototype.Nb;Q.prototype.seek=Q.prototype.seek;Q.prototype.rewind=Q.prototype.Td;
150
- Q.prototype.skip=Q.prototype.skip;Q.prototype.readBytes=Q.prototype.Ya;Q.prototype.readUint64=Q.prototype.Za;Q.prototype.readInt32=Q.prototype.Rd;Q.prototype.readUint32=Q.prototype.J;Q.prototype.readUint16=Q.prototype.Ob;Q.prototype.readUint8=Q.prototype.ra;Q.prototype.getLength=Q.prototype.se;Q.prototype.getPosition=Q.prototype.Ce;Q.prototype.hasMoreData=Q.prototype.xa;var ge=1;Q.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:ge};function ie(){this.c=[];this.b=[];this.a=!1}p=ie.prototype;p.box=function(a,b){var c=je(a);this.c[c]=ke;this.b[c]=b;return this};p.V=function(a,b){var c=je(a);this.c[c]=le;this.b[c]=b;return this};p.stop=function(){this.a=!0};p.parse=function(a,b){var c=new Q(a,0);for(this.a=!1;c.xa()&&!this.a;)this.tc(0,c,b)};
151
- p.tc=function(a,b,c){var d=b.C,e=b.J(),f=b.J(),g=!1;switch(e){case 0:e=b.P.byteLength-d;break;case 1:e=b.Za(),g=!0}var h=this.b[f];if(h){var k=null,l=null;this.c[f]==le&&(l=b.J(),k=l>>>24,l&=16777215);f=d+e;c&&f>b.P.byteLength&&(f=b.P.byteLength);f-=b.C;b=0<f?b.Ya(f):new Uint8Array(0);b=new Q(b,0);h({parser:this,partialOkay:c||!1,version:k,flags:l,reader:b,size:e,start:d+a,has64BitSize:g})}else b.skip(Math.min(d+e-b.C,b.P.byteLength-b.C))};
152
- function me(a){for(var b=ne(a);a.reader.xa()&&!a.parser.a;)a.parser.tc(a.start+b,a.reader,a.partialOkay)}function oe(a){var b=ne(a),c=a.reader.J();c=r(jb(c));for(var d=c.next();!d.done&&(a.parser.tc(a.start+b,a.reader,a.partialOkay),!a.parser.a);d=c.next());}function pe(a){return function(b){a(b.reader.Ya(b.reader.P.byteLength-b.reader.C))}}function je(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}
153
- function qe(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function ne(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}K("shaka.util.Mp4Parser",ie);ie.headerSize=ne;ie.typeToString=qe;ie.allData=pe;ie.sampleDescription=oe;ie.children=me;ie.prototype.parseNext=ie.prototype.tc;ie.prototype.parse=ie.prototype.parse;ie.prototype.stop=ie.prototype.stop;ie.prototype.fullBox=ie.prototype.V;ie.prototype.box=ie.prototype.box;var ke=0,le=1;function re(a){function b(){d=!0}function c(l){f.push(l);me(l)}a=L(a);var d=!1,e,f=[],g=[];(new ie).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).V("stsd",function(l){e=l;f.push(l);oe(l)}).V("encv",b).V("enca",b).V("avc1",function(l){g.push({box:l,Nd:1701733238})}).V("mp4a",function(l){g.push({box:l,Nd:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw cb(gc(a)),new M(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=se(a,e,k.box,f,
154
- k.Nd);return a}
155
- function se(a,b,c,d,e){var f=te.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);ue(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=nd("Xbox One")?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,ue(e,d.start,d.size+k.byteLength);k=rb(e,b.start);b=ne(b);
156
- a=k.getUint32(b);k.setUint32(b,a+1);return e}function ue(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 te=new Tb(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 ve(){this.a=new muxjs.mp4.CaptionParser;this.g=[];this.f={}}ve.prototype.init=function(a){var b=muxjs.mp4.probe;a=L(a);this.g=b.videoTrackIds(a);this.f=b.timescale(a);this.a.init()};ve.prototype.b=function(a,b){var c=L(a);(c=this.a.parse(c,this.g,this.f))&&c.captions&&b(c.captions);this.a.clearParsedCaptions()};ve.prototype.c=function(){this.a.resetCaptionStream()};function we(){}we.prototype.init=function(){};we.prototype.b=function(){};we.prototype.c=function(){};function xe(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ye(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 ze(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=r(Ae(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}
157
- function Be(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;var c=navigator.userAgent.match(/Edge\//)||nd("Trident/")||md()||nd("CrKey")?.5:.1,d=Ae(a).findIndex(function(e,f,g){return e.start>b&&(0==f||g[f-1].end-b<=c)});return 0<=d?d:null}function Ae(a){if(!a)return[];for(var b=[],c=r(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 Ce(a,b,c){this.startTime=a;this.direction=De;this.endTime=b;this.payload=c;this.region=new Ee;this.position=null;this.positionAlign=Fe;this.size=0;this.textAlign=Ge;this.writingMode=He;this.lineInterpretation=Je;this.line=null;this.lineHeight="";this.lineAlign=Ke;this.displayAlign=Le;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Me;this.fontStyle=Ne;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
158
- [];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=!1;this.cellResolution={columns:32,rows:15}}Ce.prototype.clone=function(){var a=new Ce(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
159
- function Oe(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Fc(a.nestedCues,b.nestedCues,Oe))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Fc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}K("shaka.text.Cue",Ce);var Fe="auto";
160
- Ce.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Fe};var Ge="center",Pe={LEFT:"left",RIGHT:"right",CENTER:Ge,START:"start",END:"end"};Ce.textAlign=Pe;var Le="after",Qe={BEFORE:"before",CENTER:"center",AFTER:Le};Ce.displayAlign=Qe;var De="ltr";Ce.direction={HORIZONTAL_LEFT_TO_RIGHT:De,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var He="horizontal-tb";Ce.writingMode={HORIZONTAL_TOP_TO_BOTTOM:He,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Je=0;
161
- Ce.lineInterpretation={LINE_NUMBER:Je,PERCENTAGE:1};var Ke="start",Re={CENTER:"center",START:Ke,END:"end"};Ce.lineAlign=Re;var Me=400;Ce.fontWeight={NORMAL:Me,BOLD:700};var Ne="normal",Se={NORMAL:Ne,ITALIC:"italic",OBLIQUE:"oblique"};Ce.fontStyle=Se;Ce.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};
162
- function Ee(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Te;this.scroll=Ue}K("shaka.text.CueRegion",Ee);var Te=1;Ee.units={PX:0,PERCENTAGE:Te,LINES:2};var Ue="";Ee.scrollMode={NONE:Ue,UP:"up"};function Ve(a){this.m=null;this.c=a;this.f=this.v=0;this.g=Infinity;this.b=this.a=null;this.j="";this.h=new Map}function We(a){return Xe[a]||window.muxjs&&"application/cea-608"==a?!0:!1}Ve.prototype.destroy=function(){this.c=this.m=null;this.h.clear();return Promise.resolve()};
163
- function Ye(a,b,c,d){var e,f,g;return J(function(h){if(1==h.a)return u(h,Promise.resolve(),2);if(!a.m||!a.c)return h["return"]();if(null==c||null==d)return a.m.parseInit(L(b)),h["return"]();e={periodStart:a.v,segmentStart:c,segmentEnd:d};f=a.m.parseMedia(L(b),e);g=f.filter(function(k){return k.startTime>=a.f&&k.startTime<a.g});a.c.append(g);null==a.a&&(a.a=Math.max(c,a.f));a.b=Math.min(d,a.g);w(h)})}
164
- Ve.prototype.remove=function(a,b){var c=this;return J(function(d){if(1==d.a)return u(d,Promise.resolve(),2);!c.c||!c.c.remove(a,b)||null==c.a||b<=c.a||a>=c.b||(a<=c.a&&b>=c.b?c.a=c.b=null:a<=c.a&&b<c.b?c.a=b:a>c.a&&b>=c.b&&(c.b=a));w(d)})};function Ze(a,b,c){a.f=b;a.g=c}function $e(a,b,c){a.j=b;if(b=a.h.get(b))for(var d=r(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.c.append(e)}
165
- function af(a,b,c,d,e){var f=c+" "+d,g=new Map;b=r(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;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.f&&k.startTime<a.g&&(k=new Ce(k.startTime,k.endTime,k.text),g.get(h).get(f).push(k),h==a.j&&a.c.append([k]))}e=r(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.h.has(f)||a.h.set(f,new Map),b=r(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),
166
- a.h.get(f).set(h,k);a.a=null==a.a?Math.max(c,a.f):Math.min(a.a,Math.max(c,a.f));a.b=Math.max(a.b,Math.min(d,a.g))}K("shaka.text.TextEngine",Ve);Ve.prototype.destroy=Ve.prototype.destroy;Ve.unregisterParser=function(a){delete Xe[a]};Ve.registerParser=function(a,b){Xe[a]=b};var Xe={};function bf(a,b,c,d){var e=this;this.a=a;this.h=c;this.f={};this.G={};this.c=null;this.I=d||function(){};this.g={};this.b=new Vc;this.m={};this.v=b;this.A=new Sb;this.j=cf(this,this.A);this.F=new Tc(function(){return df(e)});this.D=""}function cf(a,b){var c=new MediaSource;a.b.ja(c,"sourceopen",function(){URL.revokeObjectURL(a.D);b.resolve()});a.D=ef(c);a.a.src=a.D;return c}function ff(a){var b=fd(a.mimeType,a.codecs),c=gd(a);return We(b)||MediaSource.isTypeSupported(c)||jc(b,a.type)}p=bf.prototype;
167
- p.destroy=function(){return this.F.destroy()};
168
- function df(a){var b,c,d,e,f,g,h,k;return J(function(l){if(1==l.a){b=[];for(c in a.g)for(d=a.g[c],e=d[0],a.g[c]=d.slice(0,1),e&&b.push(e.p["catch"](Mb)),f=r(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.c&&b.push(a.c.destroy());a.h&&b.push(a.h.destroy());for(k in a.m)b.push(a.m[k].destroy());return u(l,Promise.all(b),2)}a.b&&(a.b.release(),a.b=null);a.a&&(a.a.removeAttribute("src"),a.a.load(),a.a=null);a.j=null;a.c=null;a.h=null;a.f={};a.m={};a.v=null;a.g=
169
- {};w(l)})}
170
- p.init=function(a,b){var c=this,d,e,f,g,h,k,l;return J(function(m){if(1==m.a)return d=Rb,u(m,c.A,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={fa:e.fa},g=f.next())e.fa=g.value,h=a.get(e.fa),k=fd(h.mimeType,h.codecs),e.fa==d.aa?gf(c,k):(!b&&MediaSource.isTypeSupported(k)||!jc(k,e.fa)||(c.m[e.fa]=new ic,k=kc(e.fa,k)),l=c.j.addSourceBuffer(k),c.b.l(l,"error",function(n){return function(){c.g[n.fa][0].p.reject(new M(2,3,3014,c.a.error?c.a.error.code:0))}}(e)),c.b.l(l,"updateend",function(n){return function(){return hf(c,n.fa)}}(e)),
171
- c.f[e.fa]=l,c.G[e.fa]=k,c.g[e.fa]=[]);w(m)})};function gf(a,b){a.c||(a.c=new Ve(a.h));"application/cea-608"!=b&&(a.c.m=Ob(Xe[b]))}function jf(a){return a.j?"ended"==a.j.readyState:!0}function kf(a,b){if("text"==b)var c=a.c.a;else c=lf(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 mf(a,b){return"text"==b?a.c.b:xe(lf(a,b))}
172
- function nf(a,b,c){if("text"==b)return a=a.c,null==a.b||a.b<c?0:a.b-Math.max(c,a.a);a=lf(a,b);return ze(a,c)}p.jc=function(){var a={total:Ae(this.a.buffered),audio:Ae(lf(this,"audio")),video:Ae(lf(this,"video")),text:[]};if(this.c){var b=this.c.a,c=this.c.b;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function lf(a,b){try{return a.f[b].buffered}catch(c){return null}}
173
- function of(a,b,c,d,e,f){var g,h,k,l,m;return J(function(n){if(1==n.a){g=Rb;if(b==g.aa)return u(n,Ye(a.c,c,d,e),0);if(a.m[b])return u(n,lc(a.m[b],c),10);if(f&&window.muxjs)return a.c||gf(a,"text/vtt"),null==d&&null==e?a.v.init(c):a.v.b(c,function(q){q.length&&af(a.c,q,d,e,a.f[g.Ea].timestampOffset)}),c=pf(a,c,d,b),u(n,qf(a,b,function(){a.f[b].appendBuffer(c)}),0);c=pf(a,c,d,b);return u(n,qf(a,b,function(){a.f[b].appendBuffer(c)}),0)}h=n.b;a.c||gf(a,"text/vtt");h.metadata&&(k=a.f[b].timestampOffset,
174
- a.I(h.metadata,k,e));h.captions&&h.captions.length&&(l=a.f[g.Ea].timestampOffset,af(a.c,h.captions,d,e,l));m=h.data;m=pf(a,m,d,b);return u(n,qf(a,b,function(){a.f[b].appendBuffer(m)}),0)})}function rf(a,b){var c=mf(a,"video")||0;$e(a.c,b,c)}p.remove=function(a,b,c){var d=this,e;return J(function(f){e=Rb;return a==e.aa?u(f,d.c.remove(b,c),0):u(f,qf(d,a,function(){c<=b?hf(d,a):d.f[a].remove(b,c)}),0)})};
175
- function sf(a,b){var c;return J(function(d){c=Rb;return b==c.aa?a.c?u(d,a.c.remove(0,Infinity),0):d["return"]():u(d,qf(a,b,function(){var e=a.j.duration;0>=e?hf(a,b):a.f[b].remove(0,e)}),0)})}p.flush=function(a){var b=this,c;return J(function(d){c=Rb;return a==c.aa?d["return"]():u(d,qf(b,a,function(){b.a.currentTime-=.001;hf(b,a)}),0)})};
176
- function tf(a,b,c,d,e){var f;return J(function(g){f=Rb;return b==f.aa?(a.c.v=c,Ze(a.c,d,e),g["return"]()):u(g,Promise.all([qf(a,b,function(){var h=a.f[b].appendWindowStart,k=a.f[b].appendWindowEnd;a.f[b].abort();a.f[b].appendWindowStart=h;a.f[b].appendWindowEnd=k;hf(a,b)}),qf(a,b,function(){var h=c;0>h&&(h+=.001);a.f[b].timestampOffset=h;hf(a,b)}),qf(a,b,function(){a.f[b].appendWindowStart=0;a.f[b].appendWindowEnd=e;a.f[b].appendWindowStart=d;hf(a,b)})]),0)})}
177
- p.endOfStream=function(a){var b=this;return J(function(c){return u(c,uf(b,function(){jf(b)||(a?b.j.endOfStream(a):b.j.endOfStream())}),0)})};p.Aa=function(a){var b=this;return J(function(c){return u(c,uf(b,function(){b.j.duration=a}),0)})};p.getDuration=function(){return this.j.duration};function hf(a,b){var c=a.g[b][0];c&&(c.p.resolve(),vf(a,b))}function qf(a,b,c){Uc(a.F);c={start:c,p:new Sb};a.g[b].push(c);1==a.g[b].length&&wf(a,b);return c.p}
178
- function uf(a,b){var c,d,e,f,g,h;return J(function(k){switch(k.a){case 1:Uc(a.F);c=[];d={};for(e in a.f)d.xb=new Sb,f={start:function(l){return function(){return l.xb.resolve()}}(d),p:d.xb},a.g[e].push(f),c.push(d.xb),1==a.g[e].length&&f.start(),d={xb:d.xb};y(k,2);return u(k,Promise.all(c),4);case 4:ua(k,3);break;case 2:throw g=C(k),g;case 3:try{b()}catch(l){throw new M(2,3,3015,l);}finally{for(h in a.f)vf(a,h)}w(k)}})}function vf(a,b){a.g[b].shift();wf(a,b)}
179
- function wf(a,b){var c=a.g[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)),vf(a,b)}}function pf(a,b,c,d){var e=a.a.mediaKeys;null==c&&e&&(md()||nd("Xbox One"))&&"mp4"==a.G[d].split(";")[0].split("/")[1]&&(b=re(b));return b}var ef=window.URL.createObjectURL;function xf(a,b){a=R(a);b=R(b);return a.split("-")[0]==b.split("-")[0]}function yf(a,b){a=R(a);b=R(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function zf(a,b){a=R(a);b=R(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function R(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Af.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Bf(a,b){a=R(a);b=R(b);return b==a?4:yf(b,a)?3:zf(b,a)?2:yf(a,b)?1:0}
180
- function Cf(a){return a.language?R(a.language):a.audio&&a.audio.language?R(a.audio.language):a.video&&a.video.language?R(a.video.language):"und"}
181
- function Df(a,b){for(var c=R(a),d=new Set,e=r(b),f=e.next();!f.done;f=e.next())d.add(R(f.value));e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,yf(f,c))return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,zf(f,c))return f;d=r(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,yf(c,f))return f;return null}
128
+ function Ld(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 O(2,6,6005,k.message),a.l(d),h["return"](Promise.reject(d))}a.h.v(c,"message",function(k){a.g&&a.o.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.P?a.K.push(k):Gd(a,k)});a.h.v(c,"keystatuseschange",function(k){return Sd(a,k)});e={initData:null,loaded:!1,ld:Infinity,Ha:null};a.j.set(c,e);y(h,2);return t(h,c.load(b),4);case 4:f=h.h;Sc(a.J);if(!f)return a.j["delete"](c),
129
+ a.l(new O(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Td(a)&&a.s.resolve();return h["return"](c);case 2:g=C(h),Sc(a.J,g),a.j["delete"](c),a.l(new O(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
130
+ function Md(a,b,c){try{var d=a.F?a.m.createSession("persistent-license"):a.m.createSession()}catch(e){a.l(new O(2,6,6005,e.message));return}a.h.v(d,"message",function(e){a.g&&a.o.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.P?a.K.push(e):Gd(a,e)});a.h.v(d,"keystatuseschange",function(e){return Sd(a,e)});a.j.set(d,{initData:c,loaded:!1,ld:Infinity,Ha:null});try{c=a.o.initDataTransform(c,b,a.i)}catch(e){b=e;e instanceof O||(b=new O(2,6,6016,e));a.l(b);return}a.o.logLicenseExchange&&$b(c);d.generateRequest(b,
131
+ c)["catch"](function(e){if(!a.J.g){a.j["delete"](d);var f=e.errorCode;if(f&&f.systemCode){var g=f.systemCode;0>g&&(g+=Math.pow(2,32));g="0x"+g.toString(16)}a.l(new O(2,6,6006,e.message,e,g))}})}function Ud(a,b,c){"skd"==b&&(b=c.serverCertificate,c=Zc(a),a=$c(a,c,b));return a}
132
+ function Gd(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,v,z;K(function(w){switch(w.g){case 1:return c=b.target,a.o.logLicenseExchange&&$b(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=Jc([e],a.o.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,"com.microsoft.playready"!=a.i.keySystem&&"com.chromecast.playready"!=a.i.keySystem||
133
+ Vd(g),h=Date.now(),y(w,2),l=a.D.wb.request(2,g),t(w,l.promise,4);case 4:k=w.h;ta(w,3);break;case 2:return m=C(w),n=new O(2,6,6007,m),a.l(n),d&&d.Ha&&d.Ha.reject(n),w["return"]();case 3:if(a.J.g)return w["return"]();a.I+=(Date.now()-h)/1E3;a.o.logLicenseExchange&&$b(k.data);y(w,5);return t(w,c.update(k.data),7);case 7:ta(w,6);break;case 5:return p=C(w),u=new O(2,6,6008,p.message),a.l(u),d&&d.Ha&&d.Ha.reject(u),w["return"]();case 6:v=new R("drmsessionupdate"),a.D.onEvent(v),d&&(d.Ha&&d.Ha.resolve(),
134
+ z=new Q(function(){d.loaded=!0;Td(a)&&a.s.resolve()}),z.W(Wd)),x(w)}})}
135
+ function Vd(a){var b=Tb(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=ac(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
136
+ function Sd(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("com.microsoft.playready"==a.i.keySystem&&16==h.byteLength&&(md("Trident/")||navigator.userAgent.match(/Edge?\//))){k=lb(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)}"com.microsoft.playready"==a.i.keySystem&&"status-pending"==g&&(g="usable");"status-pending"!=g&&(d.loaded=!0);"expired"==g&&
137
+ (e=!0);k=cc(h);a.ka.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ha&&(a.j["delete"](c),c.close()["catch"](function(){}));Td(a)&&(a.s.resolve(),a.S.W(Xd))}function sd(a){var b=a.ka,c=a.Z;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.l(new O(2,6,6014));a.D.zc(bd(c))}
138
+ function Yd(){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.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,c],f=new Map,g=function(l){var m,n,p;
139
+ return K(function(u){switch(u.g){case 1:return y(u,2),t(u,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=u.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,md("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),t(u,m.createMediaKeys(),5);case 5:ta(u,0);break;case 2:C(u),f.set(l,null),x(u)}})},h=a.map(function(l){return g(l)}),t(k,Promise.all(h),2)):k["return"](bd(f))})}
140
+ function Zd(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Q(e)).W($d)}),y(c,2),t(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ta(c,0);C(c);x(c)})}function vd(a){var b;return K(function(c){b=Array.from(a.j.keys());a.j.clear();return t(c,Promise.all(b.map(function(d){return K(function(e){if(1==e.g)return y(e,2),t(e,Zd(d),4);if(2!=e.g)return ta(e,0);C(e);x(e)})})),0)})}
141
+ function ae(a,b){var c=b.audio,d=b.video;if(c&&c.encrypted){var e=Qd(c);if(!Od(a,e))return!1}if(d&&d.encrypted&&(e=Qd(d),!Od(a,e)))return!1;var f=Nd(a.i);c=(d?d.drmInfos:[]).concat(c?c.drmInfos:[]);return 0==c.length||c.some(function(g){return g.keySystem==f})}
142
+ function be(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={za:f.za},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.za=[];f.za=f.za.concat(e.initData||[]);f.za=f.za.concat(h.initData||[]);f.za=f.za.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.za.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ha(e.keyIds),ha(h.keyIds))):
143
+ 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,initData:f.za,keyIds:g});break}}return c}
144
+ function td(a){a.j.forEach(function(b,c){var d=b.ld,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.ld=e)})}function Td(a){a=a.j.values();return ab(a,function(b){return b.loaded})}
145
+ function Dd(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=r(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
146
+ function Rd(a,b){var c=[],d=[],e=[],f=new Set;ce(b.drmInfos,c,d,e,f);return{keySystem:a,licenseServerUri:c[0],distinctiveIdentifierRequired:"required"==b.distinctiveIdentifier,persistentStateRequired:"required"==b.persistentState,audioRobustness:(b.audioCapabilities?b.audioCapabilities[0].robustness:"")||"",videoRobustness:(b.videoCapabilities?b.videoCapabilities[0].robustness:"")||"",serverCertificate:d[0],initData:e,keyIds:f}}
147
+ function ce(a,b,c,d,e){var f={};a=r(a);for(var g=a.next();!g.done;f={sa:f.sa},g=a.next()){f.sa=g.value;b.includes(f.sa.licenseServerUri)||b.push(f.sa.licenseServerUri);f.sa.serverCertificate&&(c.some(function(l){return function(m){return hb(m,l.sa.serverCertificate)}}(f))||c.push(f.sa.serverCertificate));if(f.sa.initData){g={};for(var h=r(f.sa.initData),k=h.next();!k.done;g={dc:g.dc},k=h.next())g.dc=k.value,d.some(function(l){return function(m){var n=l.dc;return m.keyId&&m.keyId==n.keyId?!0:m.initDataType==
148
+ n.initDataType&&hb(m.initData,n.initData)}}(g))||d.push(g.dc)}if(f.sa.keyIds)for(g=r(f.sa.keyIds),h=g.next();!h.done;h=g.next())e.add(h.value)}}
149
+ function Ed(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||
150
+ (a.serverCertificate=c.serverCertificate);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var $d=1,Wd=5,Xd=.5,de=new Pb(function(){return jb(new Uint8Array([0]))});function S(a,b){this.T=lb(a);this.g=b==ee;this.H=0}q=S.prototype;q.Da=function(){return this.H<this.T.byteLength};q.Ge=function(){return this.H};q.we=function(){return this.T.byteLength};q.wa=function(){try{var a=this.T.getUint8(this.H);this.H+=1;return a}catch(b){throw fe();}};q.Xb=function(){try{var a=this.T.getUint16(this.H,this.g);this.H+=2;return a}catch(b){throw fe();}};q.O=function(){try{var a=this.T.getUint32(this.H,this.g);this.H+=4;return a}catch(b){throw fe();}};
151
+ q.Wd=function(){try{var a=this.T.getInt32(this.H,this.g);this.H+=4;return a}catch(b){throw fe();}};q.fb=function(){try{if(this.g){var a=this.T.getUint32(this.H,!0);var b=this.T.getUint32(this.H+4,!0)}else b=this.T.getUint32(this.H,!1),a=this.T.getUint32(this.H+4,!1)}catch(c){throw fe();}if(2097151<b)throw new O(2,3,3001);this.H+=8;return b*Math.pow(2,32)+a};q.eb=function(a){if(this.H+a>this.T.byteLength)throw fe();var b=N(this.T,this.H,a);this.H+=a;return b};
152
+ q.skip=function(a){if(this.H+a>this.T.byteLength)throw fe();this.H+=a};q.Yd=function(a){if(this.H<a)throw fe();this.H-=a};q.seek=function(a){if(0>a||a>this.T.byteLength)throw fe();this.H=a};q.Wb=function(){for(var a=this.H;this.Da()&&0!=this.T.getUint8(this.H);)this.H+=1;a=N(this.T,a,this.H-a);this.H+=1;return Rb(a)};function fe(){return new O(2,3,3E3)}L("shaka.util.DataViewReader",S);S.prototype.readTerminatedString=S.prototype.Wb;S.prototype.seek=S.prototype.seek;S.prototype.rewind=S.prototype.Yd;
153
+ S.prototype.skip=S.prototype.skip;S.prototype.readBytes=S.prototype.eb;S.prototype.readUint64=S.prototype.fb;S.prototype.readInt32=S.prototype.Wd;S.prototype.readUint32=S.prototype.O;S.prototype.readUint16=S.prototype.Xb;S.prototype.readUint8=S.prototype.wa;S.prototype.getLength=S.prototype.we;S.prototype.getPosition=S.prototype.Ge;S.prototype.hasMoreData=S.prototype.Da;var ee=1;S.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:ee};function ge(){this.i=[];this.h=[];this.g=!1}q=ge.prototype;q.box=function(a,b){var c=he(a);this.i[c]=ie;this.h[c]=b;return this};q.X=function(a,b){var c=he(a);this.i[c]=je;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b){var c=new S(a,0);for(this.g=!1;c.Da()&&!this.g;)this.Bc(0,c,b)};
154
+ q.Bc=function(a,b,c){var d=b.H,e=b.O(),f=b.O(),g=!1;switch(e){case 0:e=b.T.byteLength-d;break;case 1:e=b.fb(),g=!0}var h=this.h[f];if(h){var k=null,l=null;this.i[f]==je&&(l=b.O(),k=l>>>24,l&=16777215);f=d+e;c&&f>b.T.byteLength&&(f=b.T.byteLength);f-=b.H;b=0<f?b.eb(f):new Uint8Array(0);b=new S(b,0);h({parser:this,partialOkay:c||!1,version:k,flags:l,reader:b,size:e,start:d+a,has64BitSize:g})}else b.skip(Math.min(d+e-b.H,b.T.byteLength-b.H))};
155
+ function ke(a){for(var b=le(a);a.reader.Da()&&!a.parser.g;)a.parser.Bc(a.start+b,a.reader,a.partialOkay)}function me(a){var b=le(a),c=a.reader.O();c=r(db(c));for(var d=c.next();!d.done&&(a.parser.Bc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d=c.next());}function ne(a){return function(b){a(b.reader.eb(b.reader.T.byteLength-b.reader.H))}}function he(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}
156
+ function oe(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function le(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}L("shaka.util.Mp4Parser",ge);ge.headerSize=le;ge.typeToString=oe;ge.allData=ne;ge.sampleDescription=me;ge.children=ke;ge.prototype.parseNext=ge.prototype.Bc;ge.prototype.parse=ge.prototype.parse;ge.prototype.stop=ge.prototype.stop;ge.prototype.fullBox=ge.prototype.X;ge.prototype.box=ge.prototype.box;var ie=0,je=1;function pe(a){function b(){d=!0}function c(l){f.push(l);ke(l)}a=N(a);var d=!1,e,f=[],g=[];(new ge).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).X("stsd",function(l){e=l;f.push(l);me(l)}).X("encv",b).X("enca",b).X("avc1",function(l){g.push({box:l,Tb:1701733238})}).X("avc3",function(l){g.push({box:l,Tb:1701733238})}).X("ac-3",function(l){g.push({box:l,Tb:1701733217})}).X("ec-3",function(l){g.push({box:l,Tb:1701733217})}).X("mp4a",function(l){g.push({box:l,Tb:1701733217})}).parse(a);
157
+ if(d)return a;if(0==g.length||!e)throw Xa(cc(a)),new O(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=qe(a,e,k.box,f,k.Tb);return a}
158
+ function qe(a,b,c,d,e){var f=re.value(),g=a.subarray(c.start,c.start+c.size),h=lb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=lb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);se(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=md("Xbox One")?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,se(e,d.start,d.size+k.byteLength);k=lb(e,b.start);b=le(b);
159
+ a=k.getUint32(b);k.setUint32(b,a+1);return e}function se(a,b,c){a=lb(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 re=new Pb(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 te(){this.g=new muxjs.mp4.CaptionParser;this.l=[];this.j={}}te.prototype.init=function(a){var b=muxjs.mp4.probe;a=N(a);this.l=b.videoTrackIds(a);this.j=b.timescale(a);this.g.init()};te.prototype.i=function(a,b){var c=N(a);(c=this.g.parse(c,this.l,this.j))&&c.captions&&b(c.captions);this.g.clearParsedCaptions()};te.prototype.h=function(){this.g.resetCaptionStream()};function ue(){}ue.prototype.init=function(){};ue.prototype.i=function(){};ue.prototype.h=function(){};function ve(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function we(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 xe(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=r(ye(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}
160
+ function ze(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;var c=navigator.userAgent.match(/Edge\//)||md("Trident/")||ld()||md("CrKey")?.5:.1,d=ye(a).findIndex(function(e,f,g){return e.start>b&&(0==f||g[f-1].end-b<=c)});return 0<=d?d:null}function ye(a){if(!a)return[];for(var b=[],c=r(db(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 Ae(a,b,c){this.startTime=a;this.direction=Be;this.endTime=b;this.payload=c;this.region=new Ce;this.position=null;this.positionAlign=De;this.size=0;this.textAlign=Ee;this.writingMode=Fe;this.lineInterpretation=Ge;this.line=null;this.lineHeight="";this.lineAlign=He;this.displayAlign=Je;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Ke;this.fontStyle=Le;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
161
+ [];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=!1;this.cellResolution={columns:32,rows:15}}Ae.prototype.clone=function(){var a=new Ae(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
162
+ function Me(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(!Cc(a.nestedCues,b.nestedCues,Me))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(!Cc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}L("shaka.text.Cue",Ae);var De="auto";
163
+ Ae.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:De};var Ee="center",Ne={LEFT:"left",RIGHT:"right",CENTER:Ee,START:"start",END:"end"};Ae.textAlign=Ne;var Je="after",Oe={BEFORE:"before",CENTER:"center",AFTER:Je};Ae.displayAlign=Oe;var Be="ltr";Ae.direction={HORIZONTAL_LEFT_TO_RIGHT:Be,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Fe="horizontal-tb";Ae.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Fe,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Ge=0;
164
+ Ae.lineInterpretation={LINE_NUMBER:Ge,PERCENTAGE:1};var He="start",Pe={CENTER:"center",START:He,END:"end"};Ae.lineAlign=Pe;var Ke=400;Ae.fontWeight={NORMAL:Ke,BOLD:700};var Le="normal",Qe={NORMAL:Le,ITALIC:"italic",OBLIQUE:"oblique"};Ae.fontStyle=Qe;Ae.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};
165
+ function Ce(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Re;this.scroll=Se}L("shaka.text.CueRegion",Ce);var Re=1;Ce.units={PX:0,PERCENTAGE:Re,LINES:2};var Se="";Ce.scrollMode={NONE:Se,UP:"up"};function Te(a){this.u=null;this.i=a;this.j=this.C=0;this.l=Infinity;this.h=this.g=null;this.s="";this.m=new Map}function Ue(a){return Ve[a]||window.muxjs&&"application/cea-608"==a?!0:!1}Te.prototype.destroy=function(){this.i=this.u=null;this.m.clear();return Promise.resolve()};
166
+ function We(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g)return t(h,Promise.resolve(),2);if(!a.u||!a.i)return h["return"]();if(null==c||null==d)return a.u.parseInit(N(b)),h["return"]();e={periodStart:a.C,segmentStart:c,segmentEnd:d};f=a.u.parseMedia(N(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);x(h)})}
167
+ Te.prototype.remove=function(a,b){var c=this;return K(function(d){if(1==d.g)return t(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));x(d)})};function Xe(a,b,c){a.j=b;a.l=c}function Ye(a,b,c){a.s=b;if(b=a.m.get(b))for(var d=r(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
168
+ function Ze(a,b,c,d,e){var f=c+" "+d,g=new Map;b=r(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;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&&(k=new Ae(k.startTime,k.endTime,k.text),g.get(h).get(f).push(k),h==a.s&&a.i.append([k]))}e=r(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=r(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),
169
+ a.m.get(f).set(h,k);a.g=null==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))}L("shaka.text.TextEngine",Te);Te.prototype.destroy=Te.prototype.destroy;Te.unregisterParser=function(a){delete Ve[a]};Te.registerParser=function(a,b){Ve[a]=b};var Ve={};function $e(a,b,c,d){var e=this;this.g=a;this.m=c;this.j={};this.K={};this.i=null;this.N=d||function(){};this.l={};this.h=new Tc;this.u={};this.C=b;this.F=new Ob;this.s=af(this,this.F);this.J=new Rc(function(){return bf(e)});this.I=""}function af(a,b){var c=new MediaSource;a.h.pa(c,"sourceopen",function(){URL.revokeObjectURL(a.I);b.resolve()});a.I=cf(c);a.g.src=a.I;return c}function df(a){var b=dd(a.mimeType,a.codecs),c=ed(a);return Ue(b)||MediaSource.isTypeSupported(c)||fc(b,a.type)}q=$e.prototype;
170
+ q.destroy=function(){return this.J.destroy()};
171
+ function bf(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"](Ib)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new O(2,7,7003,void 0));a.i&&b.push(a.i.destroy());a.m&&b.push(a.m.destroy());for(k in a.u)b.push(a.u[k].destroy());return t(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=
172
+ {};x(l)})}
173
+ 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=Nb,t(m,c.F,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={la:e.la},g=f.next())e.la=g.value,h=a.get(e.la),k=dd(h.mimeType,h.codecs),e.la==d.ha?ef(c,k):(!b&&MediaSource.isTypeSupported(k)||!fc(k,e.la)||(c.u[e.la]=new ec,k=gc(e.la,k)),l=c.s.addSourceBuffer(k),c.h.v(l,"error",function(n){return function(){c.l[n.la][0].p.reject(new O(2,3,3014,c.g.error?c.g.error.code:0))}}(e)),c.h.v(l,"updateend",function(n){return function(){return ff(c,n.la)}}(e)),
174
+ c.j[e.la]=l,c.K[e.la]=k,c.l[e.la]=[]);x(m)})};function ef(a,b){a.i||(a.i=new Te(a.m));"application/cea-608"!=b&&(a.i.u=Kb(Ve[b]))}function gf(a){return a.s?"ended"==a.s.readyState:!0}function hf(a,b){if("text"==b)var c=a.i.g;else c=jf(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 kf(a,b){return"text"==b?a.i.h:ve(jf(a,b))}
175
+ function lf(a,b,c){if("text"==b)return a=a.i,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=jf(a,b);return xe(a,c)}q.rc=function(){var a={total:ye(this.g.buffered),audio:ye(jf(this,"audio")),video:ye(jf(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 jf(a,b){try{return a.j[b].buffered}catch(c){return null}}
176
+ function mf(a,b,c,d,e,f){var g,h,k,l,m;return K(function(n){if(1==n.g){g=Nb;if(b==g.ha)return t(n,We(a.i,c,d,e),0);if(a.u[b])return t(n,hc(a.u[b],c),10);if(f&&window.muxjs)return a.i||ef(a,"text/vtt"),null==d&&null==e?a.C.init(c):a.C.i(c,function(p){p.length&&Ze(a.i,p,d,e,a.j[g.Ka].timestampOffset)}),c=nf(a,c,d,b),t(n,of(a,b,function(){a.j[b].appendBuffer(c)}),0);c=nf(a,c,d,b);return t(n,of(a,b,function(){a.j[b].appendBuffer(c)}),0)}h=n.h;a.i||ef(a,"text/vtt");h.metadata&&(k=a.j[b].timestampOffset,
177
+ a.N(h.metadata,k,e));h.captions&&h.captions.length&&(l=a.j[g.Ka].timestampOffset,Ze(a.i,h.captions,d,e,l));m=h.data;m=nf(a,m,d,b);return t(n,of(a,b,function(){a.j[b].appendBuffer(m)}),0)})}function pf(a,b){var c=kf(a,"video")||0;Ye(a.i,b,c)}function qf(a){a.i&&Ye(a.i,"",0)}q.remove=function(a,b,c){var d=this,e;return K(function(f){e=Nb;return a==e.ha?t(f,d.i.remove(b,c),0):t(f,of(d,a,function(){c<=b?ff(d,a):d.j[a].remove(b,c)}),0)})};
178
+ function rf(a,b){var c;return K(function(d){c=Nb;return b==c.ha?a.i?t(d,a.i.remove(0,Infinity),0):d["return"]():t(d,of(a,b,function(){var e=a.s.duration;0>=e?ff(a,b):a.j[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return K(function(d){c=Nb;return a==c.ha?d["return"]():t(d,of(b,a,function(){b.g.currentTime-=.001;ff(b,a)}),0)})};
179
+ function sf(a,b,c,d,e){var f;return K(function(g){f=Nb;return b==f.ha?(a.i.C=c,Xe(a.i,d,e),g["return"]()):t(g,Promise.all([of(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;ff(a,b)}),of(a,b,function(){var h=c;0>h&&(h+=.001);a.j[b].timestampOffset=h;ff(a,b)}),of(a,b,function(){a.j[b].appendWindowStart=0;a.j[b].appendWindowEnd=e;a.j[b].appendWindowStart=d;ff(a,b)})]),0)})}
180
+ q.endOfStream=function(a){var b=this;return K(function(c){return t(c,tf(b,function(){gf(b)||(a?b.s.endOfStream(a):b.s.endOfStream())}),0)})};q.Ga=function(a){var b=this;return K(function(c){return t(c,tf(b,function(){b.s.duration=a}),0)})};q.getDuration=function(){return this.s.duration};function ff(a,b){var c=a.l[b][0];c&&(c.p.resolve(),uf(a,b))}function of(a,b,c){Sc(a.J);c={start:c,p:new Ob};a.l[b].push(c);1==a.l[b].length&&vf(a,b);return c.p}
181
+ function tf(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:Sc(a.J);c=[];d={};for(e in a.j)d.Db=new Ob,f={start:function(l){return function(){return l.Db.resolve()}}(d),p:d.Db},a.l[e].push(f),c.push(d.Db),1==a.l[e].length&&f.start(),d={Db:d.Db};y(k,2);return t(k,Promise.all(c),4);case 4:ta(k,3);break;case 2:throw g=C(k),g;case 3:try{b()}catch(l){throw new O(2,3,3015,l);}finally{for(h in a.j)uf(a,h)}x(k)}})}function uf(a,b){a.l[b].shift();vf(a,b)}
182
+ function vf(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new O(2,3,3017,b)):c.p.reject(new O(2,3,3015,d)),uf(a,b)}}function nf(a,b,c,d){var e=a.g.mediaKeys;null==c&&e&&(ld()||md("Xbox One"))&&"mp4"==a.K[d].split(";")[0].split("/")[1]&&(b=pe(b));return b}var cf=window.URL.createObjectURL;function wf(a,b){a=xf(a);b=xf(b);return a.split("-")[0]==b.split("-")[0]}function yf(a,b){a=xf(a);b=xf(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function zf(a,b){a=xf(a);b=xf(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function xf(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Af.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Bf(a,b){a=xf(a);b=xf(b);return b==a?4:yf(b,a)?3:zf(b,a)?2:yf(a,b)?1:0}
183
+ function Cf(a){return a.language?xf(a.language):a.audio&&a.audio.language?xf(a.audio.language):a.video&&a.video.language?xf(a.video.language):"und"}
184
+ function Df(a,b){for(var c=xf(a),d=new Set,e=r(b),f=e.next();!f.done;f=e.next())d.add(xf(f.value));e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,yf(f,c))return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,zf(f,c))return f;d=r(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,yf(c,f))return f;return null}
182
185
  var Af=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",
183
186
  "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",
184
187
  "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",
185
188
  "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",
186
189
  "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",
187
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Ef(a,b){var c=Ff(a.variants,b);c=Gf(c);c=Hf(c);var d=If(c);a.variants=a.variants.filter(function(e){return Jf(e)==d?!0:!1})}function Gf(a){var b=new xc;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Jf(c);b.push(d,c)}return b}
188
- function Hf(a){var b=0,c=new Map,d=a.size();yc(a,function(e,f){for(var g=r(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new xc);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}function If(a){var b="",c=Infinity;yc(a,function(d,e){for(var f=0,g=0,h=r(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}
189
- function Jf(a){var b="";a.video&&(b=id(a.video.codecs));var c="";a.audio&&(c=id(a.audio.codecs));return b+"-"+c}
190
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Ef(a,b){var c=Ff(a.variants,b);c=Gf(c);c=Hf(c);var d=If(c);a.variants=a.variants.filter(function(e){return Jf(e)==d?!0:!1})}function Gf(a){var b=new uc;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Jf(c);b.push(d,c)}return b}
191
+ function Hf(a){var b=0,c=new Map,d=a.size();vc(a,function(e,f){for(var g=r(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new uc);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}function If(a){var b="",c=Infinity;vc(a,function(d,e){for(var f=0,g=0,h=r(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}
192
+ function Jf(a){var b="";a.video&&(b=gd(a.video.codecs));var c="";a.audio&&(c=gd(a.audio.codecs));return b+"-"+c}
190
193
  function Kf(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}
191
- function Lf(a,b,c){c.variants=c.variants.filter(function(d){if(a&&a.M&&!ce(a,d))return!1;var e=d.audio;d=d.video;return e&&!ff(e)||d&&!ff(d)||e&&b&&b.audio&&!Mf(e,b.audio)||d&&b&&b.video&&!Mf(d,b.video)?!1:!0});c.textStreams=c.textStreams.filter(function(d){return We(fd(d.mimeType,d.codecs))})}function Mf(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
194
+ function Lf(a,b,c){c.variants=c.variants.filter(function(d){if(a&&a.N&&!ae(a,d))return!1;var e=d.audio;d=d.video;return e&&!df(e)||d&&!df(d)||md("Xbox One")&&d&&(d.width&&1920<d.width||d.height&&1080<d.height)&&d.codecs.includes("avc1.")||e&&b&&b.audio&&!Mf(e,b.audio)||d&&b&&b.video&&!Mf(d,b.video)?!1:!0});c.textStreams=c.textStreams.filter(function(d){return Ue(dd(d.mimeType,d.codecs))})}function Mf(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
192
195
  function Nf(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=r(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=r(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,
193
196
  frameRate:null,pixelAspectRatio:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=
194
197
  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}
195
198
  function Of(a){return{id:a.id,active:!1,type:"text",bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:a.originalId}}
196
199
  function Pf(a){a.__shaka_id||(a.__shaka_id=Qf++);return a.__shaka_id}function Rf(a){var b=Sf(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]);return b}
197
- function Sf(a){return{id:Pf(a),active:!1,type:"",bandwidth:0,language:R(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}
200
+ function Sf(a){return{id:Pf(a),active:!1,type:"",bandwidth:0,language:xf(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}
198
201
  function Tf(a){return a.allowedByApplication&&a.allowedByKeySystem}function Uf(a){return a.filter(function(b){return Tf(b)})}
199
- function Ff(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=r(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ia(e))):d.get(Math.min.apply(Math,ia(c)))}
200
- function Vf(a,b,c){var d=a,e=a.filter(function(h){return h.primary});e.length&&(d=e);var f=d.length?d[0].language:"";d=d.filter(function(h){return h.language==f});if(b){var g=Df(R(b),a.map(function(h){return h.language}));g&&(d=a.filter(function(h){return R(h.language)==g}))}if(c){if(a=Wf(d,c),a.length)return a}else if(a=d.filter(function(h){return 0==h.roles.length}),a.length)return a;a=d.map(function(h){return h.roles}).reduce(Lb,[]);return a.length?Wf(d,a[0]):d}
201
- function Wf(a,b){return a.filter(function(c){return c.roles.includes(b)})}var Qf=0;function Xf(){this.h=null;this.c=!1;this.a=new Ua;this.b=[];this.g=1;this.j=!1;this.i=this.f=null}p=Xf.prototype;p.stop=function(){this.h=null;this.c=!1;this.b=[];this.g=1;this.f=null};p.init=function(a){this.h=a};
202
- p.chooseVariant=function(){var a=Yf(this.i.restrictions,this.b),b=this.a.getBandwidthEstimate(this.i.defaultBandwidthEstimate);this.b.length&&!a.length&&(a=Yf(null,this.b),a=[a[0]]);var c=a[0]||null;a=r(lb(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.item;var f=isNaN(this.g)?1:Math.abs(this.g);e=f*(e.next||{bandwidth:Infinity}).bandwidth/this.i.bandwidthUpgradeTarget;b>=f*d.bandwidth/this.i.bandwidthDowngradeTarget&&b<=e&&(c=d)}this.f=Date.now();return c};
203
- p.enable=function(){this.c=!0};p.disable=function(){this.c=!1};p.segmentDownloaded=function(a,b){var c=this.a;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.a+=b;Qa(c.b,e,d);Qa(c.c,e,d)}if(null!=this.f&&this.c)a:{if(!this.j){if(!(128E3<=this.a.a))break a;this.j=!0}else if(Date.now()-this.f<1E3*this.i.switchInterval)break a;c=this.chooseVariant();this.a.getBandwidthEstimate(this.i.defaultBandwidthEstimate);c&&this.h(c)}};p.getBandwidthEstimate=function(){return this.a.getBandwidthEstimate(this.i.defaultBandwidthEstimate)};
204
- p.setVariants=function(a){this.b=a};p.playbackRateChanged=function(a){this.g=a};p.configure=function(a){this.i=a};function Yf(a,b){a&&(b=b.filter(function(c){return Kf(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}K("shaka.abr.SimpleAbrManager",Xf);Xf.prototype.configure=Xf.prototype.configure;Xf.prototype.playbackRateChanged=Xf.prototype.playbackRateChanged;Xf.prototype.setVariants=Xf.prototype.setVariants;
205
- Xf.prototype.getBandwidthEstimate=Xf.prototype.getBandwidthEstimate;Xf.prototype.segmentDownloaded=Xf.prototype.segmentDownloaded;Xf.prototype.disable=Xf.prototype.disable;Xf.prototype.enable=Xf.prototype.enable;Xf.prototype.chooseVariant=Xf.prototype.chooseVariant;Xf.prototype.init=Xf.prototype.init;Xf.prototype.stop=Xf.prototype.stop;function Zf(a,b){this.a=a;this.b=new Set([a]);b=b||[];for(var c=r(b),d=c.next();!d.done;d=c.next())this.add(d.value)}Zf.prototype.add=function(a){return $f(this.a,a)?(this.b.add(a),!0):!1};function $f(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&&ag(c,d)&&bg(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(ag(c,d)&&bg(c.roles,d.roles)));return c?!1:!0}
206
- Zf.prototype.values=function(){return this.b.values()};function ag(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(g){return id(g)}),d=b.codecs.split(",").map(function(g){return id(g)});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=r(jb(c.length)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}
207
- function bg(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=r(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function cg(a){this.a=a;this.b=new dg(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}cg.prototype.create=function(a){var b=this,c=a.filter(function(d){return $f(b.a,d)});return c.length?new Zf(c[0],c):this.b.create(a)};function dg(a,b,c,d){this.c=a;this.f=b;this.a=c;this.b=void 0===d?"":d}
208
- dg.prototype.create=function(a){var b=[];b=eg(a,this.c);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=fg(b,this.f);a.length&&(b=a);this.a&&(a=Ff(b,this.a),a.length&&(b=a));this.b&&(a=gg(b,this.b),a.length&&(b=a));a=new Zf(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,$f(a.a,c)&&a.add(c);return a};function eg(a,b){var c=R(b),d=Df(c,a.map(function(e){return Cf(e)}));return d?a.filter(function(e){return d==Cf(e)}):[]}
209
- function fg(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function gg(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function hg(){this.a=ig;this.b=(new Map).set(ig,2).set(jg,1)}function kg(a,b,c){a.b.set(ig,c).set(jg,b)}var jg=0,ig=1;function lg(){}function mg(a,b,c,d){var e,f,g,h;return J(function(k){if(1==k.a){if(d&&(e=ng[d.toLowerCase()]))return k["return"](e);if(f=og(a))if(g=pg[f])return k["return"](g);return d?k.s(2):u(k,qg(a,b,c),3)}if(2!=k.a&&(d=k.b)&&(h=ng[d]))return k["return"](h);throw new M(2,4,4E3,a);})}
210
- function qg(a,b,c){var d,e,f;return J(function(g){if(1==g.a)return d=Mc([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.b;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function og(a){a=(new tb(a)).la.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}K("shaka.media.ManifestParser",lg);lg.unregisterParserByMime=function(a){delete ng[a]};lg.registerParserByMime=function(a,b){ng[a]=b};
211
- lg.registerParserByExtension=function(a,b){pg[a]=b};var ng={},pg={};function rg(a,b,c){this.pa=a;this.b=b;this.a=c}rg.prototype.Ib=function(){return this.b};rg.prototype.Eb=function(){return this.a};function sg(a,b){return a&&b?a.Ib()==b.Ib()&&a.Eb()==b.Eb()&&Fc(a.pa(),b.pa()):a==b}K("shaka.media.InitSegmentReference",rg);rg.prototype.getEndByte=rg.prototype.Eb;rg.prototype.getStartByte=rg.prototype.Ib;
212
- function tg(a,b,c,d,e,f,g,h,k){this.startTime=a;this.endTime=b;this.f=c;this.b=d;this.a=e;this.c=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k}p=tg.prototype;p.pa=function(){return this.f()};p.Ee=function(){return this.startTime};p.re=function(){return this.endTime};p.Ib=function(){return this.b};p.Eb=function(){return this.a};K("shaka.media.SegmentReference",tg);tg.prototype.getEndByte=tg.prototype.Eb;tg.prototype.getStartByte=tg.prototype.Ib;tg.prototype.getEndTime=tg.prototype.re;
213
- tg.prototype.getStartTime=tg.prototype.Ee;tg.prototype.getUris=tg.prototype.pa;function T(a,b,c){this.f=a;this.uc=b;this.h=this.g=Infinity;this.a=1;this.b=this.c=null;this.j=0;this.m=!0;this.v=0;this.A=void 0===c?!0:c}p=T.prototype;p.getDuration=function(){return this.g};p.we=function(){return this.a};p.Aa=function(a){this.g=a};p.De=function(){return this.f};p.Xd=function(a){this.j=a};p.Rb=function(a){this.m=a};p.rd=function(a){this.h=a};p.ef=function(a){this.uc=a};p.qe=function(){return this.uc};
214
- p.rb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.cd(a[0].startTime);this.a=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.a);this.b=Math.max(this.b,b);null!=this.f&&this.A&&(this.f=(Date.now()+this.j)/1E3-this.b-this.a)}};p.cd=function(a){this.c=null==this.c?a:Math.min(this.c,a)};p.bd=function(a){this.a=Math.max(this.a,a)};p.offset=function(a){null!=this.c&&(this.c+=a);null!=this.b&&(this.b+=a)};p.S=function(){return Infinity==this.g&&!this.m};
215
- p.Wa=function(){return Infinity!=this.g&&!this.m};p.Ia=function(){return Math.max(this.v,this.Ha()-this.h)};p.Yd=function(a){this.v=a};p.Ha=function(){return this.S()||this.Wa()?Math.min(Math.max(0,(Date.now()+this.j)/1E3-this.a-this.f),this.g):this.g};p.Hb=function(a){var b=Math.max(this.c,this.v);return Infinity==this.h?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Ha()-this.h+a,this.Ga()))};p.nb=function(){return this.Hb(0)};
216
- p.Ga=function(){return Math.max(0,this.Ha()-(this.S()||this.Wa()?this.uc:0))};p.ae=function(){return null==this.f||null!=this.b&&this.A?!1:!0};K("shaka.media.PresentationTimeline",T);T.prototype.usingPresentationStartTime=T.prototype.ae;T.prototype.getSeekRangeEnd=T.prototype.Ga;T.prototype.getSeekRangeStart=T.prototype.nb;T.prototype.getSafeSeekRangeStart=T.prototype.Hb;T.prototype.getSegmentAvailabilityEnd=T.prototype.Ha;T.prototype.setUserSeekStart=T.prototype.Yd;
217
- T.prototype.getSegmentAvailabilityStart=T.prototype.Ia;T.prototype.isInProgress=T.prototype.Wa;T.prototype.isLive=T.prototype.S;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.bd;T.prototype.notifyMinSegmentStartTime=T.prototype.cd;T.prototype.notifySegments=T.prototype.rb;T.prototype.getDelay=T.prototype.qe;T.prototype.setDelay=T.prototype.ef;T.prototype.setSegmentAvailabilityDuration=T.prototype.rd;T.prototype.setStatic=T.prototype.Rb;
218
- T.prototype.setClockOffset=T.prototype.Xd;T.prototype.getPresentationStartTime=T.prototype.De;T.prototype.setDuration=T.prototype.Aa;T.prototype.getMaxSegmentDuration=T.prototype.we;T.prototype.getDuration=T.prototype.getDuration;function ug(a,b){this.g=a;this.h=vg(a);this.a=a.a.currentTime;this.f=Date.now()/1E3;this.b=!1;this.j=b;this.c=function(){}}ug.prototype.release=function(){this.g=null;this.c=function(){}};function wg(a,b){a.c=b}function xg(a){this.a=a}function vg(a){if(a.a.paused||0==a.a.playbackRate||0==a.a.buffered.length)var b=!1;else a:{b=a.a.currentTime;a=r(Ae(a.a.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 yg(a,b,c,d,e){var f=this;this.a=a;this.A=b;this.i=c;this.v=e;this.b=new Vc;this.j=!1;this.m=a.readyState;this.f=!1;this.c=d;this.h=!1;this.b.l(a,"waiting",function(){return zg(f)});this.g=(new N(function(){zg(f)})).sa(.25)}yg.prototype.release=function(){this.b&&(this.b.release(),this.b=null);null!=this.g&&(this.g.stop(),this.g=null);this.c&&(this.c.release(),this.c=null);this.a=this.A=this.v=null};yg.prototype.fd=function(){this.h=!0;zg(this)};
219
- function zg(a){if(0!=a.a.readyState){if(a.a.seeking){if(!a.j)return}else a.j=!1;if(!a.a.paused||0==a.a.currentTime){a.a.readyState!=a.m&&(a.f=!1,a.m=a.a.readyState);var b;if(!(b=!a.c)){b=a.c;var c=b.g,d=vg(c),e=c.a.currentTime,f=Date.now()/1E3;if(b.a!=e||b.h!=d)b.f=f,b.a=e,b.h=d,b.b=!1;e=f-b.f;if(d=e>=b.j&&d&&!b.b)b.c(b.a,e),b.b=!0,b.a=c.a.currentTime;b=!d}if(b){var g=a.i.smallGapLimit;e=a.a.currentTime;b=a.a.buffered;c=Be(b,e);if(!(null==c||0==c&&!a.h||(d=b.start(c),d>=a.A.Ga()))){f=d-e;g=f<=g;var h=
220
- !1;.001>f||(g||a.f||(a.f=!0,e=new P("largegap",{currentTime:e,gapSize:f}),e.cancelable=!0,a.v(e),a.i.jumpLargeGaps&&!e.defaultPrevented&&(h=!0)),!g&&!h)||(0!=c&&b.end(c-1),a.a.currentTime=d)}}}}};function Ag(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Bg.value().get(b),c.ja(a,b,d))}var Bg=new Tb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Cg(a,b,c){var d=this;this.a=a;this.g=b;this.f=c;this.h=!1;this.b=new Vc;this.c=new Dg(a);Ag(this.a,HTMLMediaElement.HAVE_METADATA,this.b,function(){Eg(d,d.f)})}Cg.prototype.release=function(){this.b&&(this.b.release(),this.b=null);null!=this.c&&(this.c.release(),this.c=null);this.g=function(){};this.a=null};function Fg(a){return a.h?a.a.currentTime:a.f}function Gg(a,b){0<a.a.readyState?Hg(a.c,b):Ag(a.a,HTMLMediaElement.HAVE_METADATA,a.b,function(){Eg(a,a.f)})}
221
- function Eg(a,b){.001>Math.abs(a.a.currentTime-b)?Kg(a):(a.b.ja(a.a,"seeking",function(){Kg(a)}),Hg(a.c,0==a.a.currentTime?b:a.a.currentTime))}function Kg(a){a.h=!0;a.b.l(a.a,"seeking",function(){return a.g()})}function Dg(a){var b=this;this.b=a;this.h=10;this.g=this.f=this.c=0;this.a=new N(function(){0>=b.c?b.a.stop():b.b.currentTime!=b.f?b.a.stop():(b.b.currentTime=b.g,b.c--)})}Dg.prototype.release=function(){this.a&&(this.a.stop(),this.a=null);this.b=null};
222
- function Hg(a,b){a.f=a.b.currentTime;a.g=b;a.c=a.h;a.b.currentTime=b;a.a.sa(.1)};function Lg(a){function b(){null==c.c?c.f=!0:(c.b.ja(c.a,"seeking",function(){c.f=!0}),c.a.currentTime=Math.max(0,c.a.currentTime+c.c))}var c=this;this.a=a;this.f=!1;this.c=null;this.b=new Vc;Ag(this.a,HTMLMediaElement.HAVE_CURRENT_DATA,this.b,function(){b()})}Lg.prototype.release=function(){this.b&&(this.b.release(),this.b=null);this.a=null};Lg.prototype.m=function(a){this.c=this.f?this.c:a};Lg.prototype.g=function(){return(this.f?this.a.currentTime:this.c)||0};Lg.prototype.v=function(){};
223
- function Mg(a,b,c,d,e,f){var g=this;this.c=a;this.a=b.presentationTimeline;this.D=b.minBufferTime||0;this.i=c;this.A=e;this.j=null;this.f=new yg(a,b.presentationTimeline,c,Ng(a,c),f);this.b=new Cg(a,function(){a:{var h=g.f;h.j=!0;h.h=!1;h.f=!1;var k=Fg(g.b);h=Og(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.j||g.j<k-1)){g.j=k;Gg(g.b,h);h=void 0;break a}g.A();h=void 0}return h},Pg(this,d));this.h=(new N(function(){if(0!=g.c.readyState&&!g.c.paused){var h=Fg(g.b),k=g.a.nb(),l=g.a.Ga();3>l-k&&(k=
224
- l-3);h<k&&(h=Og(g,h),g.c.currentTime=h)}})).sa(.25)}Mg.prototype.release=function(){this.b&&(this.b.release(),this.b=null);this.f&&(this.f.release(),this.f=null);this.h&&(this.h.stop(),this.h=null);this.c=this.b=this.a=this.i=null;this.A=function(){}};Mg.prototype.m=function(a){Gg(this.b,a)};Mg.prototype.g=function(){var a=Fg(this.b);return 0<this.c.readyState&&!this.c.paused?Qg(this,a):a};
225
- function Pg(a,b){null==b?b=Infinity>a.a.getDuration()?a.a.nb():a.a.Ga():0>b&&(b=a.a.Ga()+b);return Rg(a,Qg(a,b))}Mg.prototype.v=function(){this.f.fd()};function Rg(a,b){var c=a.a.getDuration();return b>=c?c-a.i.durationBackoff:b}function Og(a,b){var c=Math.max(a.D,a.i.rebufferingGoal),d=a.i.safeSeekOffset,e=a.a.nb(),f=a.a.Ga(),g=a.a.getDuration();3>f-e&&(e=f-3);var h=a.a.Hb(c),k=a.a.Hb(d);c=a.a.Hb(c+d);return b>=g?Rg(a,b):b>f?f:b<e?ye(a.c.buffered,k)?k:c:b>=h||ye(a.c.buffered,b)?b:c}
226
- function Qg(a,b){var c=a.a.nb();if(b<c)return c;c=a.a.Ga();return b>c?c:b}function Ng(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new ug(new xg(a),b.stallThreshold);wg(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function U(a){this.a=a;this.b=null;this.c=0;this.f=!1}p=U.prototype;p.destroy=function(){Hb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};p.release=function(){this.f||(this.a=[],this.b&&this.b.stop(),this.b=null)};p.Me=function(){this.f=!0};
227
- p.find=function(a){for(var b=this.a.length-1,c=b;0<=c;--c){var d=this.a[c],e=c<b?this.a[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.c}return this.a.length&&a<this.a[0].startTime?this.c:null};p.get=function(a){if(0==this.a.length)return null;a-=this.c;return 0>a||a>=this.a.length?null:this.a[a]};p.offset=function(a){if(!this.f)for(var b=r(this.a),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
228
- p.pc=function(a){!this.f&&a.length&&(this.a=this.a.filter(function(b){return b.startTime<a[0].startTime}),this.a.push.apply(this.a,ia(a)))};p.pb=function(a,b){a=a.filter(function(c){return c.endTime>b});this.pc(a);this.Sa(b)};p.Sa=function(a){if(!this.f){var b=this.a.length;this.a=this.a.filter(function(c){return c.endTime>a});this.c+=b-this.a.length}};
229
- p.Na=function(a,b,c){c=void 0===c?!1:c;if(!this.f){for(;this.a.length;)if(this.a[this.a.length-1].startTime>=b)this.a.pop();else break;for(;this.a.length;)if(this.a[0].endTime<=a)this.a.shift(),c||this.c++;else break;0!=this.a.length&&(a=this.a[this.a.length-1],this.a[this.a.length-1]=new tg(a.startTime,b,a.f,a.b,a.a,a.c,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd))}};
230
- p.wc=function(a,b){var c=this;this.f||(this.b&&this.b.stop(),this.b=new N(function(){var d=b();d?c.a.push.apply(c.a,ia(d)):(c.b.stop(),c.b=null)}),this.b.sa(a))};U.prototype[Symbol.iterator]=function(){return this.mb(0)};U.prototype.mb=function(a){return new Sg(this,this.find(a)||0)};function Tg(a,b,c){return new U([new tg(a,a+b,function(){return c},0,null,null,a,a,a+b)])}K("shaka.media.SegmentIndex",U);U.forSingleSegment=Tg;U.prototype.getIteratorForTime=U.prototype.mb;U.prototype.updateEvery=U.prototype.wc;
231
- U.prototype.fit=U.prototype.Na;U.prototype.evict=U.prototype.Sa;U.prototype.mergeAndEvict=U.prototype.pb;U.prototype.merge=U.prototype.pc;U.prototype.offset=U.prototype.offset;U.prototype.get=U.prototype.get;U.prototype.find=U.prototype.find;U.prototype.markImmutable=U.prototype.Me;U.prototype.release=U.prototype.release;U.prototype.destroy=U.prototype.destroy;function Sg(a,b){this.b=a;this.a=b}Sg.prototype.seek=function(a){this.a=this.b.mb(a).a;return this.next().value};
232
- Sg.prototype.current=function(){return this.b.get(this.a-1)};Sg.prototype.next=function(){var a=this.b.get(this.a++);return{value:a,done:!a}};K("shaka.media.SegmentIterator",Sg);Sg.prototype.next=Sg.prototype.next;Sg.prototype.current=Sg.prototype.current;Sg.prototype.seek=Sg.prototype.seek;function Ug(){U.call(this,[]);this.g=[]}pa(Ug,U);p=Ug.prototype;p.clone=function(){var a=new Ug;a.g=this.g.slice();return a};
233
- p.release=function(){for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g=[]};p.find=function(a){for(var b=0,c=r(this.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.c+d.a.length}return null};p.get=function(a){for(var b=0,c=r(this.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.c+d.a.length}return null};p.offset=function(){};p.pc=function(){};p.Sa=function(){};p.pb=function(){};p.Na=function(){};p.wc=function(){};
234
- K("shaka.media.MetaSegmentIndex",Ug);Ug.prototype.updateEvery=Ug.prototype.wc;Ug.prototype.fit=Ug.prototype.Na;Ug.prototype.mergeAndEvict=Ug.prototype.pb;Ug.prototype.evict=Ug.prototype.Sa;Ug.prototype.merge=Ug.prototype.pc;Ug.prototype.offset=Ug.prototype.offset;Ug.prototype.get=Ug.prototype.get;Ug.prototype.find=Ug.prototype.find;Ug.prototype.release=Ug.prototype.release;function Vg(a){var b=this;this.a=a;this.f=!1;this.b=this.a.mc();this.c=new N(function(){b.a.Md(.25*b.b)})}Vg.prototype.release=function(){this.c&&(this.c.stop(),this.c=null);this.a=null};Vg.prototype.set=function(a){this.b=a;Wg(this)};Vg.prototype.kc=function(){return this.a.kc()};function Wg(a){a.c.stop();var b=a.f?0:a.b;if(0<=b)try{a.a.mc()!=b&&a.a.qd(b);return}catch(c){}a.c.sa(.25);0!=a.a.mc()&&a.a.qd(0)};function Xg(a){var b=this;this.c=a;this.a=new Set;this.b=(new N(function(){Yg(b,!1)})).sa(.25)}Xg.prototype.release=function(){this.b.stop();for(var a=r(this.a),b=a.next();!b.done;b=a.next())b.value.release();this.a.clear()};
235
- function Yg(a,b){for(var c=r(a.a),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.c.currentTime,f=b,g=r(d.g.a),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.f.get(h),l=e<h.startTime?Zg:e>h.endTime?$g:ah;d.f.set(h,l);for(var m=r(d.h),n=m.next();!n.done;n=m.next())n=n.value,n.fb==k&&n.eb==l&&n.Va(h,f)}}};function bh(a){var b=this;this.b=function(){};this.a=new Set;this.f=a;this.c=(new N(function(){for(var c=b.f(),d=r(b.a),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&b.a["delete"](e)})).sa(2)}bh.prototype.release=function(){this.b=function(){};this.a.clear();this.c.stop()};function ch(a,b){a.b=b};function dh(a){var b=this;this.g=a;this.f=new Map;this.a=function(){};this.b=function(){};this.c=function(){};this.h=[{fb:null,eb:ah,Va:function(c,d){return b.a(c,d)}},{fb:Zg,eb:ah,Va:function(c,d){return b.a(c,d)}},{fb:$g,eb:ah,Va:function(c,d){return b.a(c,d)}},{fb:ah,eb:Zg,Va:function(c,d){return b.b(c,d)}},{fb:ah,eb:$g,Va:function(c,d){return b.b(c,d)}},{fb:Zg,eb:$g,Va:function(c,d){return b.c(c,d)}},{fb:$g,eb:Zg,Va:function(c,d){return b.c(c,d)}}]}
236
- dh.prototype.release=function(){this.g=null;this.f.clear();this.a=function(){};this.b=function(){};this.c=function(){}};function eh(a,b,c,d){a.a=b;a.b=c;a.c=d}var Zg=1,ah=2,$g=3;function fh(a,b,c,d){a=Mc(a,d);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function gh(a,b){var c=this;this.u=b;this.o=a;this.i=null;this.f=1;this.c=this.b=null;this.a=new Map;this.h=!1;this.j=null;this.g=!1;this.F=new Tc(function(){return hh(c)})}gh.prototype.destroy=function(){return this.F.destroy()};function hh(a){var b,c,d,e;return J(function(f){if(1==f.a){b=[];c=r(a.a.values());for(d=c.next();!d.done;d=c.next())e=d.value,ih(e),b.push(jh(e));return u(f,Promise.all(b),2)}a.a.clear();a.u=null;a.o=null;a.i=null;w(f)})}
237
- gh.prototype.configure=function(a){this.i=a;this.j=new nc({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0},!0)};gh.prototype.start=function(){var a=this;return J(function(b){if(1==b.a)return u(b,kh(a),2);Uc(a.F);a.h=!0;w(b)})};
238
- function lh(a,b){var c,d,e,f,g,h;J(function(k){switch(k.a){case 1:return c=Rb,y(k,2),u(k,sf(a.u.L,c.aa),4);case 4:ua(k,3);break;case 2:if(d=C(k),a.u)a.u.onError(d);case 3:e=fd(b.mimeType,b.codecs);gf(a.u.L,e);f=a.u.L.h;if(g=f.isTextVisible()||a.i.alwaysStreamText)h=mh(b),a.a.set(c.aa,h),nh(a,h,0);w(k)}})}function oh(a){var b=a.a.get("text");b&&(ih(b),jh(b)["catch"](function(){}),a.a["delete"]("text"));a.c=null}
239
- function ph(a,b){var c=a.a.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.ab&&(qh(a,e,!1,0,!1),c.ab=d)}else if(d=c.ab)c.ab=null,qh(a,d,!0,0,!1)}}function rh(a,b,c,d){c=void 0===c?!1:c;d=void 0===d?0:d;a.b=b;a.h&&(b.video&&qh(a,b.video,c,d,!1),b.audio&&qh(a,b.audio,c,d,!1))}function sh(a,b){a.c=b;a.h&&qh(a,b,!0,0,!1)}
240
- function qh(a,b,c,d,e){var f=a.a.get(b.type);f||"text"!=b.type?f&&(f.ab&&(b.trickModeVideo?(f.ab=b,b=b.trickModeVideo):f.ab=null),f.stream!=b||e)&&("text"==b.type&&gf(a.u.L,fd(b.mimeType,b.codecs)),f.stream=b,f.da=null,c&&(f.Bb?f.zc=!0:f.Oa?(f.cb=!0,f.hc=d,f.zc=!0):(ih(f),th(a,f,!0,d)["catch"](function(g){if(a.u)a.u.onError(g)}))),uh(a,f)["catch"](function(g){if(a.u)a.u.onError(g)})):lh(a,b)}
241
- function uh(a,b){var c,d;return J(function(e){if(1==e.a){if(!b.ka)return e["return"]();c=b.stream;d=b.ka;return c.segmentIndex?e.s(2):u(e,c.createSegmentIndex(),2)}if(b.ka!=d||b.stream!=c)return e["return"]();var f=a.u.lc();var g=mf(a.u.L,b.type),h=b.stream.segmentIndex.find(b.qa?b.qa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.a?k.a-k.b:null:null;k&&!h&&(h=(k.endTime-k.startTime)*(b.stream.bandwidth||0)/8);h?((k=k.c)&&(h+=(k.a?k.a-k.b:null)||0),k=a.u.getBandwidthEstimate(),f=8*h/
242
- k<(g||0)-f-Math.max(a.o.minBufferTime||0,a.i.rebufferingGoal)||b.ka.b.a>h?!0:!1):f=!1;f&&b.ka.abort();w(e)})}function vh(a,b){b.Bb||b.cb||(b.Oa?(b.cb=!0,b.hc=0):null==kf(a.u.L,b.type)?null==b.La&&nh(a,b,0):(ih(b),th(a,b,!1,0)["catch"](function(c){if(a.u)a.u.onError(c)})))}
243
- function kh(a){var b,c,d,e,f,g,h,k,l,m;return J(function(n){if(1==n.a){b=Rb;if(!a.b)throw new M(2,5,5006);c=new Map;d=new Set;a.b.audio&&(c.set(b.Qa,a.b.audio),d.add(a.b.audio));a.b.video&&(c.set(b.Ea,a.b.video),d.add(a.b.video));a.c&&(c.set(b.aa,a.c),d.add(a.c));e=a.u.L;f=a.i.forceTransmuxTS;return u(n,e.init(c,f),2)}Uc(a.F);var q=a.o.presentationTimeline.getDuration();Infinity>q?a.u.L.Aa(q):a.u.L.Aa(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.a.has(k)||
244
- (m=mh(l),a.a.set(k,m),nh(a,m,0));w(n)})}function mh(a){return{stream:a,type:a.type,da:null,qa:null,oc:null,Zc:null,Yc:null,Xc:null,ab:null,endOfStream:!1,Oa:!1,La:null,cb:!1,hc:0,zc:!1,Bb:!1,jd:!1,Jb:!1,ka:null}}
245
- gh.prototype.Lb=function(a){var b=this,c,d,e,f,g;return J(function(h){switch(h.a){case 1:Uc(b.F);if(a.Oa||null==a.La||a.Bb)return h["return"]();a.La=null;if(!a.cb){h.s(2);break}return u(h,th(b,a,a.zc,a.hc),3);case 3:return h["return"]();case 2:if(a.stream.segmentIndex){h.s(4);break}c=a.stream;return u(h,a.stream.createSegmentIndex(),5);case 5:if(c!=a.stream)return null==a.La&&nh(b,a,0),h["return"]();case 4:y(h,6);d=wh(b,a);null!=d&&(nh(b,a,d),a.Jb=!1);ua(h,7);break;case 6:return e=C(h),u(h,xh(b,e),
246
- 8);case 8:return h["return"]();case 7:f=Array.from(b.a.values());if(!b.h||!f.every(function(k){return k.endOfStream})){h.s(0);break}return u(h,b.u.L.endOfStream(),10);case 10:Uc(b.F),g=b.u.L.getDuration(),0!=g&&g<b.o.presentationTimeline.getDuration()&&b.o.presentationTimeline.Aa(g),w(h)}})};
247
- function wh(a,b){if(yh(b))return rf(a.u.L,b.stream.originalId||""),null;var c=a.u.lc(),d=b.qa?b.qa.endTime:c,e=nf(a.u.L,b.type,c),f=Math.max(a.o.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.f;if(d>=a.o.presentationTimeline.getDuration())return b.endOfStream=!0,"video"==b.type&&(c=a.a.get("text"))&&yh(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return.5;e=mf(a.u.L,b.type);e=zh(a,b,c,e);if(!e||!Ah(a,e))return 1;f=Infinity;var g=Array.from(a.a.values());g=r(g);for(var h=g.next();!h.done;h=
248
- g.next())h=h.value,yh(h)||h.da&&!h.da.current()||(f=Math.min(f,h.qa?h.qa.endTime:c));if(d>=f+a.o.presentationTimeline.a)return 1;Bh(a,b,c,e)["catch"](function(){});return null}function zh(a,b,c,d){if(b.da)return b.da.current();if(b.qa||d)return b.da=b.stream.segmentIndex.mb(b.qa?b.qa.endTime:d),b.da.next().value;b.da=b.stream.segmentIndex.mb(Math.max(c-a.i.inaccurateManifestTolerance,0));d=b.da.next().value;d&&Ah(a,d)||(b.da=b.stream.segmentIndex.mb(c),d=b.da.next().value);return d}
249
- function Ah(a,b){var c=a.o.presentationTimeline,d=c.Ha();return b.endTime<c.Ia()||b.startTime>d?!1:!0}
250
- function Bh(a,b,c,d){var e,f,g,h,k,l,m,n,q;return J(function(t){switch(t.a){case 1:return e=Rb,f=b.stream,g=b.da,b.Oa=!0,h=Ch(a,b,d),k=Dh(a,b,d),y(t,2),u(t,Promise.all([h,k]),4);case 4:return l=t.b,Uc(a.F),a.g?t["return"]():b.cb?(b.Oa=!1,nh(a,b,0),t["return"]()):u(t,Eh(a,b,c,f,d,l[1]),5);case 5:Uc(a.F);if(a.g)return t["return"]();b.qa=d;g.next();b.Oa=!1;b.jd=!1;m=a.u.L.jc();n=m[b.type];JSON.stringify(n);b.cb||a.u.fd();nh(a,b,0);ua(t,0);break;case 2:q=C(t);Uc(a.F,q);if(a.g)return t["return"]();b.Oa=
251
- !1;if(b.type==e.aa&&a.i.ignoreTextStreamFailures)a.a["delete"](e.aa),t.s(0);else if(7001==q.code)b.Oa=!1,b.La=null,nh(a,b,0),t.s(0);else if(3017==q.code)Fh(a,b,q),t.s(0);else return b.Jb=!0,q.severity=2,u(t,xh(a,q),0)}})}function Fh(a,b,c){if(!Array.from(a.a.values()).some(function(e){return e!=b&&e.jd})){var d=Math.round(100*a.f);if(20<d)a.f-=.2;else if(4<d)a.f-=.04;else{b.Jb=!0;a.g=!0;a.u.onError(c);return}b.jd=!0}nh(a,b,4)}
252
- function Ch(a,b,c){var d,e,f,g,h,k,l;return J(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Zc||e!=b.Yc||f!=b.Xc)h=function(){var n;return J(function(q){if(1==q.a)return y(q,2),b.Yc=e,b.Xc=f,b.Zc=g,u(q,tf(a.u.L,b.type,g,e,f),4);if(2!=q.a)return ua(q,0);n=C(q);b.Yc=null;b.Xc=null;b.Zc=null;throw n;})},d.push(h());!sg(c.c,b.oc)&&(b.oc=c.c)&&(k=Dh(a,b,c.c),l=function(){var n,q,t;return J(function(v){switch(v.a){case 1:return y(v,2),u(v,k,4);
253
- case 4:return n=v.b,Uc(a.F),q=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,of(a.u.L,b.type,n,null,null,q),5);case 5:ua(v,0);break;case 2:throw t=C(v),b.oc=null,t;}})},d.push(l()));return u(m,Promise.all(d),0)})}
254
- function Eh(a,b,c,d,e,f){var g;return J(function(h){if(1==h.a)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new ie).V("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Nb();var n=k.reader.Nb();var q=k.reader.J();var t=k.reader.J();var v=k.reader.J();var z=k.reader.J();var x=e.startTime+t/q}else q=k.reader.J(),x=k.reader.Za()/q+e.timestampOffset,t=x-e.startTime,v=k.reader.J(),z=k.reader.J(),m=k.reader.Nb(),n=k.reader.Nb();
255
- k=k.reader.Ya(k.reader.P.byteLength-k.reader.C);l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.u.Qe():(l=new P(Gh,{detail:{startTime:x,endTime:x+v/q,schemeIdUri:m,value:n,timescale:q,presentationTimeDelta:t,eventDuration:v,id:z,messageData:k}}),a.u.onEvent(l)))}).parse(f),u(h,Hh(a,b,c),2);if(3!=h.a)return Uc(a.F),u(h,of(a.u.L,b.type,f,e.startTime,e.endTime,g),3);Uc(a.F);w(h)})}
256
- function Hh(a,b,c){var d,e,f,g;return J(function(h){if(1==h.a){d=Math.max(a.i.bufferBehind,a.o.presentationTimeline.a);e=kf(a.u.L,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.u.L.remove(b.type,e,e+g),2)}Uc(a.F);w(h)})}function yh(a){return a&&"text"==a.type&&"application/cea-608"==a.stream.mimeType}
257
- function Dh(a,b,c){var d,e,f,g;return J(function(h){if(1==h.a)return d=Sc,e=fh(c.pa(),c.b,c.a,a.i.retryParameters),f=a.u.qb.request(d,e),b.ka=f,u(h,f.promise,2);g=h.b;b.ka=null;return h["return"](g.data)})}
258
- function th(a,b,c,d){var e,f;return J(function(g){if(1==g.a)return b.cb=!1,b.zc=!1,b.hc=0,b.Bb=!0,b.qa=null,b.oc=null,b.da=null,d?(e=a.u.lc(),f=a.u.L.getDuration(),u(g,a.u.L.remove(b.type,e+d,f),3)):u(g,sf(a.u.L,b.type),4);if(3!=g.a)return Uc(a.F),c?u(g,a.u.L.flush(b.type),3):g.s(3);Uc(a.F);b.Bb=!1;b.endOfStream=!1;nh(a,b,0);w(g)})}
259
- function nh(a,b,c){var d=b.type;if("text"!=d||a.a.has(d))b.La=(new mc(function(){var e;return J(function(f){if(1==f.a)return y(f,2),u(f,a.Lb(b),4);if(2!=f.a)return ua(f,0);e=C(f);if(a.u)a.u.onError(e);w(f)})})).R(c)}function ih(a){null!=a.La&&(a.La.stop(),a.La=null)}function jh(a){return J(function(b){return a.ka?u(b,a.ka.abort(),0):b.s(0)})}function xh(a,b){return J(function(c){if(1==c.a)return u(c,pc(a.j),2);Uc(a.F);a.u.onError(b);b.handled||a.i.failureCallback(b);w(c)})};function Ih(a,b){var c=Jh(),d=this;this.h=b;this.c=a;this.f=c;this.j=null;this.g=[];this.b=this.a=null;this.m=Promise.resolve().then(function(){return Kh(d)});this.F=new Tc(function(){return Lh(d)})}Ih.prototype.destroy=function(){return this.F.destroy()};function Lh(a){var b,c,d;return J(function(e){if(1==e.a)return a.b&&a.b.abort(),Mh(a),u(e,a.m,2);a.a&&a.a.ya.Xa();b=r(a.g);for(c=b.next();!c.done;c=b.next())d=c.value,d.ya.Xa();a.a=null;a.g=[];a.h=null;w(e)})}
260
- function Nh(a,b){var c={sb:function(){},qc:function(){},Xa:function(){},onError:function(){},sc:function(){},Tf:function(){}};a.g.push({create:b,ya:c});a.b&&a.b.abort();Mh(a);return c}
261
- function Kh(a){return J(function(b){if(a.F.a)b=b.s(0);else{if(0==a.g.length||a.a&&!a.a.Ua)var c=!1;else{a.a&&(a.a.ya.Xa(),a.a=null);c=a.g.shift();var d=c.create(a.f);d?(c.ya.sb(),a.a={node:d.node,payload:d.payload,Ua:d.Ua,ya:c.ya}):c.ya.sc();c=!0}c?c=Promise.resolve():a.a?c=Oh(a):(a.h.Pe(a.c),a.j=new Sb,c=a.j);b=u(b,c,1)}return b})}
262
- function Oh(a){var b,c;return J(function(d){switch(d.a){case 1:return a.c=a.h.ye(a.c,a.f,a.a.node,a.a.payload),y(d,2),a.b=a.h.ne(a.c,a.f,a.a.payload),u(d,a.b.promise,4);case 4:a.b=null;a.c==a.a.node&&(a.a.ya.qc(),a.a=null);ua(d,0);break;case 2:b=C(d);if(7001==b.code)a.a.ya.Xa();else a.a.ya.onError(b);a.a=null;a.b=null;c=a;return u(d,a.h.handleError(a.f,b),5);case 5:c.c=d.b,w(d)}})}function Mh(a){a.j&&(a.j.resolve(),a.j=null)};function Ph(a){this.a=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.a=c);this.a||(this.a=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.a.mode="hidden"}p=Ph.prototype;p.remove=function(a,b){if(!this.a)return!1;Qh(this.a,function(c){return c.startTime<b&&c.endTime>a});return!0};
263
- p.append=function(a){function b(g){return g.spacer?"\n":g.nestedCues.length?g.nestedCues.map(b).join(""):g.payload}var c=a.map(function(g){if(g.nestedCues.length){var h=g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.a.cues?Array.from(this.a.cues):[];var e={};c=r(c);for(var f=c.next();!f.done;e={gb:e.gb},f=c.next())e.gb=f.value,a.some(function(g){return function(h){return h.startTime==g.gb.startTime&&h.endTime==g.gb.endTime&&h.text==g.gb.payload?!0:!1}}(e))||(f=Rh(e.gb))&&
264
- d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=r(a);for(e=a.next();!e.done;e=a.next())this.a.addCue(e.value)};p.destroy=function(){this.a&&(Qh(this.a,function(){return!0}),this.a.mode="disabled");this.a=null;return Promise.resolve()};p.isTextVisible=function(){return"showing"==this.a.mode};
265
- p.setTextVisibility=function(a){this.a.mode=a?"showing":"hidden"};
266
- function Rh(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}
267
- function Qh(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}K("shaka.text.SimpleTextDisplayer",Ph);Ph.prototype.setTextVisibility=Ph.prototype.setTextVisibility;Ph.prototype.isTextVisible=Ph.prototype.isTextVisible;Ph.prototype.destroy=Ph.prototype.destroy;Ph.prototype.append=Ph.prototype.append;Ph.prototype.remove=Ph.prototype.remove;function Sh(){}function Th(a){for(;a.firstChild;)a.removeChild(a.firstChild)}K("shaka.util.Dom",Sh);Sh.removeAllChildren=Th;function Uh(a,b){var c=this;this.h=!1;this.f=[];this.a=a;this.g=b;this.b=document.createElement("div");this.b.classList.add("shaka-text-container");this.b.style.textAlign="center";this.b.style.display="flex";this.b.style.flexDirection="column";this.b.style.alignItems="center";this.b.style.justifyContent="flex-end";this.g.appendChild(this.b);this.j=(new N(function(){Vh(c)})).sa(.25);this.c=new Map}p=Uh.prototype;
268
- p.append=function(a){var b=ia(this.f).concat(),c={};a=r(a);for(var d=a.next();!d.done;c={Tb:c.Tb},d=a.next())c.Tb=d.value,b.some(function(e){return function(f){return Oe(f,e.Tb)}}(c))||this.f.push(c.Tb);Vh(this)};p.destroy=function(){this.g.removeChild(this.b);this.b=null;this.h=!1;this.f=[];this.j&&this.j.stop();this.c.clear()};p.remove=function(a,b){if(!this.b)return!1;this.f=this.f.filter(function(c){return c.startTime<a||c.endTime>=b});Vh(this);return!0};p.isTextVisible=function(){return this.h};
269
- p.setTextVisibility=function(a){this.h=a};
270
- function Vh(a){function b(g){return a.f.includes(g)&&a.h&&g.startTime<=c&&g.endTime>c}for(var c=a.a.currentTime,d=r(a.c.keys()),e=d.next();!e.done;e=d.next())if(e=e.value,!b(e)){var f=a.c.get(e);a.b.removeChild(f);a.c["delete"](e)}d=new Set(a.c.values());e=r(Array.from(a.b.childNodes));for(f=e.next();!f.done;f=e.next())f=f.value,d.has(f)||a.b.removeChild(f);d=a.f.filter(function(g){return b(g)&&!a.c.has(g)}).sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime-h.endTime});
271
- d=r(d);for(e=d.next();!e.done;e=d.next())Wh(a,a.b,e.value)}function Xh(a,b,c,d){var e=document.createElement("span");d&&e.classList.add("shaka-nested-cue");Yh(a,e,c,!0);b.appendChild(e);return e}function Wh(a,b,c){if(c.nestedCues.length){var d=document.createElement("p");d.style.width="100%";Yh(a,d,c,!1);for(var e=0;e<c.nestedCues.length;e++)Xh(a,d,c.nestedCues[e],!0);b.appendChild(d);a.c.set(c,d)}else a.c.set(c,Xh(a,b,c,!1))}
272
- function Yh(a,b,c,d){var e=b.style,f=0==c.nestedCues.length;c.spacer?(e.flexBasis="100%",e.height="0"):(e.whiteSpace="pre-line",b.textContent=c.payload,f&&(e.backgroundColor=c.backgroundColor),e.border=c.border,e.color=c.color,e.direction=c.direction,e.opacity=c.opacity,e.paddingLeft=Zh(c.linePadding,c,a.g),e.paddingRight=Zh(c.linePadding,c,a.g),c.backgroundImage&&(e.backgroundImage="url('"+c.backgroundImage+"')",e.backgroundRepeat="no-repeat",e.backgroundSize="contain",e.backgroundPosition="center",
273
- ""==c.backgroundColor&&(e.backgroundColor="transparent")),c.backgroundImage&&c.region&&(b=c.region.widthUnits==Te?"%":"px",e.height=c.region.height+(c.region.heightUnits==Te?"%":"px"),e.width=c.region.width+b),e.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end",f?e.display="inline-block":(e.display="flex",e.flexDirection="row",e.flexWrap="wrap",e.margin="0",e.alignItems=e.justifyContent,e.justifyContent="center"),d&&(e.maxWidth="100%"),e.fontFamily=
274
- c.fontFamily,e.fontWeight=c.fontWeight.toString(),e.fontStyle=c.fontStyle,e.letterSpacing=c.letterSpacing,e.fontSize=Zh(c.fontSize,c,a.g),c.line?1==c.lineInterpretation&&(e.position="absolute",c.writingMode==He?c.lineAlign==Ke?e.top=c.line+"%":"end"==c.lineAlign&&(e.bottom=c.line+"%"):"vertical-lr"==c.writingMode?c.lineAlign==Ke?e.left=c.line+"%":"end"==c.lineAlign&&(e.right=c.line+"%"):c.lineAlign==Ke?e.right=c.line+"%":"end"==c.lineAlign&&(e.left=c.line+"%")):c.region&&c.region.id&&!f&&(a=c.region.widthUnits==
275
- Te?"%":"px",d=c.region.viewportAnchorUnits==Te?"%":"px",e.height=c.region.height+(c.region.heightUnits==Te?"%":"px"),e.width=c.region.width+a,e.position="absolute",e.top=c.region.viewportAnchorY+d,e.left=c.region.viewportAnchorX+d),e.lineHeight=c.lineHeight,c.position&&(c.writingMode==He?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(" "),
276
- e.writingMode=c.writingMode,"writingMode"in document.documentElement.style&&e.writingMode==c.writingMode||(e.webkitWritingMode=c.writingMode),c.size&&(c.writingMode==He?e.width=c.size+"%":e.height=c.size+"%"))}
277
- function Zh(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),kf:d[2]}:null;if(!d)return a;var e=d.value;switch(d.kf){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}K("shaka.text.UITextDisplayer",Uh);Uh.prototype.setTextVisibility=Uh.prototype.setTextVisibility;Uh.prototype.isTextVisible=Uh.prototype.isTextVisible;Uh.prototype.remove=Uh.prototype.remove;
278
- Uh.prototype.destroy=Uh.prototype.destroy;Uh.prototype.append=Uh.prototype.append;function $h(){}
279
- function ai(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]=Ac(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ac(l)),k=ai(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 "+
280
- k),g=!1)}return g}function bi(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}K("shaka.util.ConfigUtils",$h);$h.convertToConfigObject=bi;$h.mergeConfigObjects=ai;function ci(){}
281
- function di(){var a=1E6,b=Infinity;navigator.connection&&(navigator.connection.downlink&&(a=1E6*navigator.connection.downlink),navigator.connection.saveData&&(b=360));var c={retryParameters:oc(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Wd,logLicenseExchange:!1,updateExpirationTime:1},d={retryParameters:oc(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,
282
- ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1},hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},e={retryParameters:oc(),failureCallback:function(h){return[h]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,
283
- stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2};if(nd("Web0S")||md()||nd("CrKey"))e.stallSkip=0;var f={trackSelectionCallback:function(h){return J(function(k){return k["return"](h)})},progressCallback:function(h,k){return[h,k]},usePersistentLicense:!0},g={drm:c,manifest:d,streaming:e,offline:f,abrFactory:function(){return new Xf},abr:{enabled:!0,defaultBandwidthEstimate:a,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,
202
+ function Ff(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=r(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ha(e))):d.get(Math.min.apply(Math,ha(c)))}
203
+ function Vf(a,b,c){var d=a,e=a.filter(function(h){return h.primary});e.length&&(d=e);var f=d.length?d[0].language:"";d=d.filter(function(h){return h.language==f});if(b){var g=Df(xf(b),a.map(function(h){return h.language}));g&&(d=a.filter(function(h){return xf(h.language)==g}))}if(c){if(a=Wf(d,c),a.length)return a}else if(a=d.filter(function(h){return 0==h.roles.length}),a.length)return a;a=d.map(function(h){return h.roles}).reduce(Hb,[]);return a.length?Wf(d,a[0]):d}
204
+ function Wf(a,b){return a.filter(function(c){return c.roles.includes(b)})}var Qf=0;function Xf(){this.m=null;this.i=!1;this.h=new Na;this.g=[];this.l=1;this.s=!1;this.o=this.j=null}q=Xf.prototype;q.stop=function(){this.m=null;this.i=!1;this.g=[];this.l=1;this.j=null};q.init=function(a){this.m=a};
205
+ q.chooseVariant=function(){var a=Yf(this.o.restrictions,this.g),b=this.h.getBandwidthEstimate(this.o.defaultBandwidthEstimate);this.g.length&&!a.length&&(a=Yf(null,this.g),a=[a[0]]);var c=a[0]||null;a=r(fb(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.item;var f=isNaN(this.l)?1:Math.abs(this.l);e=f*(e.next||{bandwidth:Infinity}).bandwidth/this.o.bandwidthUpgradeTarget;b>=f*d.bandwidth/this.o.bandwidthDowngradeTarget&&b<=e&&(c=d)}this.j=Date.now();return c};
206
+ q.enable=function(){this.i=!0};q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){var c=this.h;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.g+=b;La(c.h,e,d);La(c.i,e,d)}if(null!=this.j&&this.i)a:{if(!this.s){if(!(128E3<=this.h.g))break a;this.s=!0}else if(Date.now()-this.j<1E3*this.o.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(this.o.defaultBandwidthEstimate);c&&this.m(c)}};q.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(this.o.defaultBandwidthEstimate)};
207
+ q.setVariants=function(a){this.g=a};q.playbackRateChanged=function(a){this.l=a};q.configure=function(a){this.o=a};function Yf(a,b){a&&(b=b.filter(function(c){return Kf(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}L("shaka.abr.SimpleAbrManager",Xf);Xf.prototype.configure=Xf.prototype.configure;Xf.prototype.playbackRateChanged=Xf.prototype.playbackRateChanged;Xf.prototype.setVariants=Xf.prototype.setVariants;
208
+ Xf.prototype.getBandwidthEstimate=Xf.prototype.getBandwidthEstimate;Xf.prototype.segmentDownloaded=Xf.prototype.segmentDownloaded;Xf.prototype.disable=Xf.prototype.disable;Xf.prototype.enable=Xf.prototype.enable;Xf.prototype.chooseVariant=Xf.prototype.chooseVariant;Xf.prototype.init=Xf.prototype.init;Xf.prototype.stop=Xf.prototype.stop;function Zf(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=r(b),d=c.next();!d.done;d=c.next())this.add(d.value)}Zf.prototype.add=function(a){return $f(this.h,a)?(this.g.add(a),!0):!1};function $f(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&&ag(c,d)&&bg(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(ag(c,d)&&bg(c.roles,d.roles)));return c?!1:!0}
209
+ Zf.prototype.values=function(){return this.g.values()};function ag(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(g){return gd(g)}),d=b.codecs.split(",").map(function(g){return gd(g)});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=r(db(c.length)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}
210
+ function bg(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=r(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function cg(a){this.g=a;this.h=new dg(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}cg.prototype.create=function(a){var b=this,c=a.filter(function(d){return $f(b.g,d)});return c.length?new Zf(c[0],c):this.h.create(a)};function dg(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
211
+ dg.prototype.create=function(a){var b=[];b=eg(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=fg(b,this.j);a.length&&(b=a);this.g&&(a=Ff(b,this.g),a.length&&(b=a));this.h&&(a=gg(b,this.h),a.length&&(b=a));a=new Zf(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,$f(a.h,c)&&a.add(c);return a};function eg(a,b){var c=xf(b),d=Df(c,a.map(function(e){return Cf(e)}));return d?a.filter(function(e){return d==Cf(e)}):[]}
212
+ function fg(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function gg(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function hg(){this.g=ig;this.h=(new Map).set(ig,2).set(jg,1)}function kg(a,b,c){a.h.set(ig,c).set(jg,b)}var jg=0,ig=1;function lg(){}function mg(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){if(d&&(e=ng[d.toLowerCase()]))return k["return"](e);if(f=og(a))if(g=pg[f])return k["return"](g);return d?k.B(2):t(k,qg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=ng[d]))return k["return"](h);throw new O(2,4,4E3,a);})}
213
+ function qg(a,b,c){var d,e,f;return K(function(g){if(1==g.g)return d=Jc([a],c),d.method="HEAD",t(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function og(a){a=(new nb(a)).ra.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}L("shaka.media.ManifestParser",lg);lg.unregisterParserByMime=function(a){delete ng[a]};lg.registerParserByMime=function(a,b){ng[a]=b};
214
+ lg.registerParserByExtension=function(a,b){pg[a]=b};var ng={},pg={};function rg(a,b,c){this.ua=a;this.h=b;this.g=c}rg.prototype.Pb=function(){return this.h};rg.prototype.Lb=function(){return this.g};function sg(a,b){return a&&b?a.Pb()==b.Pb()&&a.Lb()==b.Lb()&&Cc(a.ua(),b.ua()):a==b}L("shaka.media.InitSegmentReference",rg);rg.prototype.getEndByte=rg.prototype.Lb;rg.prototype.getStartByte=rg.prototype.Pb;
215
+ function tg(a,b,c,d,e,f,g,h,k){this.startTime=a;this.endTime=b;this.j=c;this.h=d;this.g=e;this.i=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k}q=tg.prototype;q.ua=function(){return this.j()};q.Ie=function(){return this.startTime};q.ve=function(){return this.endTime};q.Pb=function(){return this.h};q.Lb=function(){return this.g};L("shaka.media.SegmentReference",tg);tg.prototype.getEndByte=tg.prototype.Lb;tg.prototype.getStartByte=tg.prototype.Pb;tg.prototype.getEndTime=tg.prototype.ve;
216
+ tg.prototype.getStartTime=tg.prototype.Ie;tg.prototype.getUris=tg.prototype.ua;function T(a,b,c){this.j=a;this.Cc=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}q=T.prototype;q.getDuration=function(){return this.l};q.Ae=function(){return this.g};q.Ga=function(a){this.l=a};q.He=function(){return this.j};q.be=function(a){this.s=a};q.$b=function(a){this.u=a};q.xd=function(a){this.m=a};q.jf=function(a){this.Cc=a};q.ue=function(){return this.Cc};
217
+ q.xb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.jd(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.jd=function(a){this.i=null==this.i?a:Math.min(this.i,a)};q.hd=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};
218
+ q.bb=function(){return Infinity!=this.l&&!this.u};q.Na=function(){return Math.max(this.C,this.Ta()-this.m)};q.ce=function(a){this.C=a};q.Ta=function(){return this.Y()||this.bb()?Math.min(Math.max(0,(Date.now()+this.s)/1E3-this.g-this.j),this.l):this.h||this.l};q.Ob=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.Ta()-this.m+a,this.Ma()))};q.tb=function(){return this.Ob(0)};
219
+ q.Ma=function(){return Math.max(0,this.Ta()-(this.Y()||this.bb()?this.Cc:0))};q.fe=function(){return null==this.j||null!=this.h&&this.F?!1:!0};L("shaka.media.PresentationTimeline",T);T.prototype.usingPresentationStartTime=T.prototype.fe;T.prototype.getSeekRangeEnd=T.prototype.Ma;T.prototype.getSeekRangeStart=T.prototype.tb;T.prototype.getSafeSeekRangeStart=T.prototype.Ob;T.prototype.getSegmentAvailabilityEnd=T.prototype.Ta;T.prototype.setUserSeekStart=T.prototype.ce;
220
+ T.prototype.getSegmentAvailabilityStart=T.prototype.Na;T.prototype.isInProgress=T.prototype.bb;T.prototype.isLive=T.prototype.Y;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.hd;T.prototype.notifyMinSegmentStartTime=T.prototype.jd;T.prototype.notifySegments=T.prototype.xb;T.prototype.getDelay=T.prototype.ue;T.prototype.setDelay=T.prototype.jf;T.prototype.setSegmentAvailabilityDuration=T.prototype.xd;T.prototype.setStatic=T.prototype.$b;
221
+ T.prototype.setClockOffset=T.prototype.be;T.prototype.getPresentationStartTime=T.prototype.He;T.prototype.setDuration=T.prototype.Ga;T.prototype.getMaxSegmentDuration=T.prototype.Ae;T.prototype.getDuration=T.prototype.getDuration;function ug(a,b){this.j=a;this.m=vg(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.s=b;this.i=function(){}}ug.prototype.release=function(){this.j=null;this.i=function(){}};function wg(a,b){a.i=b}function xg(a){this.g=a}function vg(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(ye(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 yg(a,b,c,d,e){var f=this;this.g=a;this.C=b;this.o=c;this.u=e;this.h=new Tc;this.s=!1;this.F=a.readyState;this.j=!1;this.i=d;this.m=!1;this.h.v(a,"waiting",function(){return zg(f)});this.l=(new Q(function(){zg(f)})).xa(.25)}yg.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};yg.prototype.md=function(){this.m=!0;zg(this)};
222
+ function zg(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=vg(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=ze(b,g);if(!(null==c||0==c&&!a.m||(d=b.start(c),
223
+ d>=a.C.Ma()))){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 Ag(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Bg.value().get(b),c.pa(a,b,d))}var Bg=new Pb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Cg(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new Tc;this.i=new Dg(a);Ag(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Eg(d,d.j)})}Cg.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 Fg(a){return a.m?a.g.currentTime:a.j}function Gg(a,b){0<a.g.readyState?Kg(a.i,b):Ag(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Eg(a,a.j)})}
224
+ function Eg(a,b){.001>Math.abs(a.g.currentTime-b)?Lg(a):(a.h.pa(a.g,"seeking",function(){Lg(a)}),Kg(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Lg(a){a.m=!0;a.h.v(a.g,"seeking",function(){return a.l()})}function Dg(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Q(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Dg.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
225
+ function Kg(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.xa(.1)};function Mg(a){function b(){null==c.i||0==c.i?c.j=!0:(c.h.pa(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.i))}var c=this;this.g=a;this.j=!1;this.i=null;this.h=new Tc;Ag(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,function(){b()})}Mg.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.g=null};Mg.prototype.u=function(a){this.i=this.j?this.i:a};Mg.prototype.l=function(){return(this.j?this.g.currentTime:this.i)||0};Mg.prototype.F=function(){};
226
+ function Ng(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.I=b.minBufferTime||0;this.o=c;this.C=e;this.s=null;this.j=new yg(a,b.presentationTimeline,c,Og(a,c),f);this.h=new Cg(a,function(){a:{var h=g.j;h.s=!0;h.m=!1;h.j=!1;var k=Fg(g.h);h=Pg(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;Gg(g.h,h);h=void 0;break a}g.C();h=void 0}return h},Qg(this,d));this.m=(new Q(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Fg(g.h),k=g.g.tb(),l=g.g.Ma();3>l-k&&(k=
227
+ l-3);h<k&&(h=Pg(g,h),g.i.currentTime=h)}})).xa(.25)}Ng.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.o=null;this.C=function(){}};Ng.prototype.u=function(a){Gg(this.h,a)};Ng.prototype.l=function(){var a=Fg(this.h);return 0<this.i.readyState&&!this.i.paused?Rg(this,a):a};
228
+ function Qg(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.tb():a.g.Ma():0>b&&(b=a.g.Ma()+b);return Sg(a,Rg(a,b))}Ng.prototype.F=function(){this.j.md()};function Sg(a,b){var c=a.g.getDuration();return b>=c?c-a.o.durationBackoff:b}function Pg(a,b){var c=Math.max(a.I,a.o.rebufferingGoal),d=a.o.safeSeekOffset,e=a.g.tb(),f=a.g.Ma(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Ob(c),k=a.g.Ob(d);c=a.g.Ob(c+d);return b>=g?Sg(a,b):b>f?f:b<e?we(a.i.buffered,k)?k:c:b>=h||we(a.i.buffered,b)?b:c}
229
+ function Rg(a,b){var c=a.g.tb();if(b<c)return c;c=a.g.Ma();return b>c?c:b}function Og(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new ug(new xg(a),b.stallThreshold);wg(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(){Db("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.Qe=function(){this.i=!0};
230
+ 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=r(this.M),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
231
+ q.xc=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,ha(a)))};q.vb=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.xc(a);this.Ya(b)};q.Ya=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}};
232
+ q.Sa=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 tg(a.startTime,b,a.j,a.h,a.g,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd))}};
233
+ q.Ec=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new Q(function(){var d=b();d?c.M.push.apply(c.M,ha(d)):(c.g.stop(),c.g=null)}),this.g.xa(a))};U.prototype[Symbol.iterator]=function(){return this.sb(0)};U.prototype.sb=function(a){a=this.find(a);return null==a?null:new Tg(this,a)};function Ug(a,b,c){return new U([new tg(a,a+b,function(){return c},0,null,null,a,a,a+b)])}L("shaka.media.SegmentIndex",U);U.forSingleSegment=Ug;U.prototype.getIteratorForTime=U.prototype.sb;
234
+ U.prototype.updateEvery=U.prototype.Ec;U.prototype.fit=U.prototype.Sa;U.prototype.evict=U.prototype.Ya;U.prototype.mergeAndEvict=U.prototype.vb;U.prototype.merge=U.prototype.xc;U.prototype.offset=U.prototype.offset;U.prototype.get=U.prototype.get;U.prototype.find=U.prototype.find;U.prototype.markImmutable=U.prototype.Qe;U.prototype.release=U.prototype.release;U.prototype.destroy=U.prototype.destroy;function Tg(a,b){this.h=a;this.g=b}
235
+ Tg.prototype.seek=function(a){this.g=(a=this.h.sb(a))?a.g:Number.MAX_VALUE;return this.next().value};Tg.prototype.current=function(){return this.h.get(this.g-1)};Tg.prototype.next=function(){var a=this.h.get(this.g++);return{value:a,done:!a}};L("shaka.media.SegmentIterator",Tg);Tg.prototype.next=Tg.prototype.next;Tg.prototype.current=Tg.prototype.current;Tg.prototype.seek=Tg.prototype.seek;function Vg(){U.call(this,[]);this.j=[]}oa(Vg,U);q=Vg.prototype;
236
+ q.clone=function(){var a=new Vg;a.j=this.j.slice();return a};q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.M.length}return null};q.get=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.M.length}return null};q.offset=function(){};q.xc=function(){};
237
+ q.Ya=function(){};q.vb=function(){};q.Sa=function(){};q.Ec=function(){};L("shaka.media.MetaSegmentIndex",Vg);Vg.prototype.updateEvery=Vg.prototype.Ec;Vg.prototype.fit=Vg.prototype.Sa;Vg.prototype.mergeAndEvict=Vg.prototype.vb;Vg.prototype.evict=Vg.prototype.Ya;Vg.prototype.merge=Vg.prototype.xc;Vg.prototype.offset=Vg.prototype.offset;Vg.prototype.get=Vg.prototype.get;Vg.prototype.find=Vg.prototype.find;Vg.prototype.release=Vg.prototype.release;function Wg(a){var b=this;this.g=a;this.j=!1;this.i=this.g.uc();this.h=new Q(function(){b.g.Ud(.25*b.i)})}Wg.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Wg.prototype.set=function(a){this.i=a;Xg(this)};Wg.prototype.sc=function(){return this.g.sc()};function Xg(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.uc()!=b&&a.g.wd(b);return}catch(c){}a.h.xa(.25);0!=a.g.uc()&&a.g.wd(0)};function Yg(a){var b=this;this.h=a;this.g=new Set;this.i=(new Q(function(){Zg(b,!1)})).xa(.25)}Yg.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};
238
+ function Zg(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.h.currentTime,f=b,g=r(d.l.g),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.j.get(h),l=e<h.startTime?$g:e>h.endTime?ah:bh;d.j.set(h,l);for(var m=r(d.m),n=m.next();!n.done;n=m.next())n=n.value,n.lb==k&&n.kb==l&&n.ab(h,f)}}};function ch(a){var b=this;this.h=function(){};this.g=new Set;this.j=a;this.i=(new Q(function(){for(var c=b.j(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&b.g["delete"](e)})).xa(2)}ch.prototype.release=function(){this.h=function(){};this.g.clear();this.i.stop()};function dh(a,b){a.h=b};function eh(a){var b=this;this.l=a;this.j=new Map;this.g=function(){};this.h=function(){};this.i=function(){};this.m=[{lb:null,kb:bh,ab:function(c,d){return b.g(c,d)}},{lb:$g,kb:bh,ab:function(c,d){return b.g(c,d)}},{lb:ah,kb:bh,ab:function(c,d){return b.g(c,d)}},{lb:bh,kb:$g,ab:function(c,d){return b.h(c,d)}},{lb:bh,kb:ah,ab:function(c,d){return b.h(c,d)}},{lb:$g,kb:ah,ab:function(c,d){return b.i(c,d)}},{lb:ah,kb:$g,ab:function(c,d){return b.i(c,d)}}]}
239
+ eh.prototype.release=function(){this.l=null;this.j.clear();this.g=function(){};this.h=function(){};this.i=function(){}};function fh(a,b,c,d){a.g=b;a.h=c;a.i=d}var $g=1,bh=2,ah=3;function gh(a,b,c,d){a=Jc(a,d);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function hh(a,b){var c=this;this.D=b;this.A=a;this.o=null;this.j=1;this.i=this.h=null;this.g=new Map;this.m=!1;this.s=null;this.l=!1;this.J=new Rc(function(){return ih(c)})}hh.prototype.destroy=function(){return this.J.destroy()};function ih(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=r(a.g.values());for(d=c.next();!d.done;d=c.next())e=d.value,jh(e),b.push(kh(e));return t(f,Promise.all(b),2)}a.g.clear();a.D=null;a.A=null;a.o=null;x(f)})}
240
+ hh.prototype.configure=function(a){this.o=a;this.s=new jc({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0},!0)};hh.prototype.start=function(){var a=this;return K(function(b){if(1==b.g)return t(b,lh(a),2);Sc(a.J);a.m=!0;x(b)})};
241
+ function mh(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=Nb,y(k,2),t(k,rf(a.D.R,c.ha),4);case 4:ta(k,3);break;case 2:if(d=C(k),a.D)a.D.onError(d);case 3:e=dd(b.mimeType,b.codecs);ef(a.D.R,e);f=a.D.R.m;if(g=f.isTextVisible()||a.o.alwaysStreamText)h=nh(b),a.g.set(c.ha,h),oh(a,h,0);x(k)}})}function ph(a){var b=a.g.get("text");b&&(jh(b),kh(b)["catch"](function(){}),a.g["delete"]("text"));a.i=null}
242
+ function qh(a,b){var c=a.g.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.hb&&(rh(a,e,!1,0,!1),c.hb=d)}else if(d=c.hb)c.hb=null,rh(a,d,!0,0,!1)}}function sh(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&&rh(a,b.video,c,d,e),b.audio&&rh(a,b.audio,c,d,e))}function th(a,b){a.i=b;a.m&&rh(a,b,!0,0,!1)}
243
+ function rh(a,b,c,d,e){var f=a.g.get(b.type);f||"text"!=b.type?f&&(f.hb&&(b.trickModeVideo?(f.hb=b,b=b.trickModeVideo):f.hb=null),f.stream!=b||e)&&("text"==b.type&&ef(a.D.R,dd(b.mimeType,b.codecs)),f.stream=b,f.aa=null,c&&(f.Jb?f.Hc=!0:f.Ua?(f.jb=!0,f.pc=d,f.Hc=!0):(jh(f),uh(a,f,!0,d)["catch"](function(g){if(a.D)a.D.onError(g)}))),vh(a,f)["catch"](function(g){if(a.D)a.D.onError(g)})):mh(a,b)}
244
+ function vh(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.qa)return e["return"]();c=b.stream;d=b.qa;return c.segmentIndex?e.B(2):t(e,c.createSegmentIndex(),2)}if(b.qa!=d||b.stream!=c)return e["return"]();var f=a.D.tc();var g=kf(a.D.R,b.type),h=b.stream.segmentIndex.find(b.va?b.va.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.g?k.g-k.h:null:null;k&&!h&&(h=(k.endTime-k.startTime)*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.g?k.g-k.h:null)||0),k=a.D.getBandwidthEstimate(),f=8*h/
245
+ k<(g||0)-f-Math.max(a.A.minBufferTime||0,a.o.rebufferingGoal)||b.qa.h.g>h?!0:!1):f=!1;f&&b.qa.abort();x(e)})}function wh(a,b){b.Jb||b.jb||(b.Ua?(b.jb=!0,b.pc=0):null==hf(a.D.R,b.type)?null==b.Qa&&oh(a,b,0):(jh(b),uh(a,b,!1,0)["catch"](function(c){if(a.D)a.D.onError(c)})))}
246
+ function lh(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){if(1==n.g){b=Nb;if(!a.h)throw new O(2,5,5006);c=new Map;d=new Set;a.h.audio&&(c.set(b.Wa,a.h.audio),d.add(a.h.audio));a.h.video&&(c.set(b.Ka,a.h.video),d.add(a.h.video));a.i&&(c.set(b.ha,a.i),d.add(a.i));e=a.D.R;f=a.o.forceTransmuxTS;return t(n,e.init(c,f),2)}Sc(a.J);var p=a.A.presentationTimeline.getDuration();Infinity>p?a.D.R.Ga(p):a.D.R.Ga(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.g.has(k)||
247
+ (m=nh(l),a.g.set(k,m),oh(a,m,0));x(n)})}function nh(a){return{stream:a,type:a.type,aa:null,va:null,wc:null,fd:null,ed:null,dd:null,hb:null,endOfStream:!1,Ua:!1,Qa:null,jb:!1,pc:0,Hc:!1,Jb:!1,pd:!1,Rb:!1,qa:null}}
248
+ hh.prototype.Ub=function(a){var b=this,c,d,e,f,g;return K(function(h){switch(h.g){case 1:Sc(b.J);if(a.Ua||null==a.Qa||a.Jb)return h["return"]();a.Qa=null;if(!a.jb){h.B(2);break}return t(h,uh(b,a,a.Hc,a.pc),3);case 3:return h["return"]();case 2:if(a.stream.segmentIndex){h.B(4);break}c=a.stream;return t(h,a.stream.createSegmentIndex(),5);case 5:if(c!=a.stream)return null==a.Qa&&oh(b,a,0),h["return"]();case 4:y(h,6);d=xh(b,a);null!=d&&(oh(b,a,d),a.Rb=!1);ta(h,7);break;case 6:return e=C(h),t(h,yh(b,e),
249
+ 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.B(0);break}return t(h,b.D.R.endOfStream(),10);case 10:Sc(b.J),g=b.D.R.getDuration(),0!=g&&g<b.A.presentationTimeline.getDuration()&&b.A.presentationTimeline.Ga(g),x(h)}})};
250
+ function xh(a,b){if(zh(b))return pf(a.D.R,b.stream.originalId||""),null;"text"==b.type&&qf(a.D.R);var c=a.D.tc(),d=b.va?b.va.endTime:c,e=lf(a.D.R,b.type,c),f=Math.max(a.A.minBufferTime||0,a.o.rebufferingGoal,a.o.bufferingGoal)*a.j;if(d>=a.A.presentationTimeline.getDuration())return b.endOfStream=!0,"video"==b.type&&(c=a.g.get("text"))&&zh(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return.5;e=kf(a.D.R,b.type);e=Ah(a,b,c,e);if(!e||!Bh(a,e))return 1;f=Infinity;var g=Array.from(a.g.values());
251
+ g=r(g);for(var h=g.next();!h.done;h=g.next())h=h.value,zh(h)||h.aa&&!h.aa.current()||(f=Math.min(f,h.va?h.va.endTime:c));if(d>=f+a.A.presentationTimeline.g)return 1;Ch(a,b,c,e)["catch"](function(){});return null}
252
+ function Ah(a,b,c,d){if(b.aa)return b.aa.current();if(b.va||d)return b.aa=b.stream.segmentIndex.sb(b.va?b.va.endTime:d),b.aa&&b.aa.next().value;b.aa=b.stream.segmentIndex.sb(Math.max(c-a.o.inaccurateManifestTolerance,0));d=b.aa&&b.aa.next().value;d&&Bh(a,d)||(b.aa=b.stream.segmentIndex.sb(c),d=b.aa&&b.aa.next().value);return d}function Bh(a,b){var c=a.A.presentationTimeline,d=c.Ta();return b.endTime<c.Na()||b.startTime>d?!1:!0}
253
+ function Ch(a,b,c,d){var e,f,g,h,k,l,m,n;return K(function(p){switch(p.g){case 1:return e=Nb,f=b.stream,g=b.aa,b.Ua=!0,y(p,2),t(p,Dh(a,b,d),4);case 4:Sc(a.J);if(a.l)return p["return"]();h=Eh(a,b,d);return t(p,h,5);case 5:return k=p.h,Sc(a.J),a.l?p["return"]():b.jb?(b.Ua=!1,oh(a,b,0),p["return"]()):t(p,Fh(a,b,c,f,d,k),6);case 6:Sc(a.J);if(a.l)return p["return"]();b.va=d;g.next();b.Ua=!1;b.pd=!1;l=a.D.R.rc();m=l[b.type];JSON.stringify(m);b.jb||a.D.md();oh(a,b,0);ta(p,0);break;case 2:n=C(p);Sc(a.J,n);
254
+ if(a.l)return p["return"]();b.Ua=!1;if(7001==n.code)b.Ua=!1,b.Qa=null,oh(a,b,0),p.B(0);else if(b.type==e.ha&&a.o.ignoreTextStreamFailures)a.g["delete"](e.ha),p.B(0);else if(3017==n.code)Gh(a,b,n),p.B(0);else return b.Rb=!0,n.severity=2,t(p,yh(a,n),0)}})}function Gh(a,b,c){if(!Array.from(a.g.values()).some(function(e){return e!=b&&e.pd})){var d=Math.round(100*a.j);if(20<d)a.j-=.2;else if(4<d)a.j-=.04;else{b.Rb=!0;a.l=!0;a.D.onError(c);return}b.pd=!0}oh(a,b,4)}
255
+ function Dh(a,b,c){var d,e,f,g,h,k,l;return K(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.fd||e!=b.ed||f!=b.dd)h=function(){var n;return K(function(p){if(1==p.g)return y(p,2),b.ed=e,b.dd=f,b.fd=g,t(p,sf(a.D.R,b.type,g,e,f),4);if(2!=p.g)return ta(p,0);n=C(p);b.ed=null;b.dd=null;b.fd=null;throw n;})},d.push(h());!sg(c.i,b.wc)&&(b.wc=c.i)&&(k=Eh(a,b,c.i),l=function(){var n,p,u;return K(function(v){switch(v.g){case 1:return y(v,2),t(v,k,4);
256
+ case 4:return n=v.h,Sc(a.J),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,t(v,mf(a.D.R,b.type,n,null,null,p),5);case 5:ta(v,0);break;case 2:throw u=C(v),b.wc=null,u;}})},d.push(l()));return t(m,Promise.all(d),0)})}
257
+ function Fh(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 ge).X("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Wb();var n=k.reader.Wb();var p=k.reader.O();var u=k.reader.O();var v=k.reader.O();var z=k.reader.O();var w=e.startTime+u/p}else p=k.reader.O(),w=k.reader.fb()/p+e.timestampOffset,u=w-e.startTime,v=k.reader.O(),z=k.reader.O(),m=k.reader.Wb(),n=k.reader.Wb();
258
+ k=k.reader.eb(k.reader.T.byteLength-k.reader.H);l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.D.Ue():(l=(new Map).set("detail",{startTime:w,endTime:w+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:u,eventDuration:v,id:z,messageData:k}),l=new R(Hh,l),a.D.onEvent(l)))}).parse(f),t(h,Ih(a,b,c),2);if(3!=h.g)return Sc(a.J),t(h,mf(a.D.R,b.type,f,e.startTime,e.endTime,g),3);Sc(a.J);x(h)})}
259
+ function Ih(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.o.bufferBehind,a.A.presentationTimeline.g);e=hf(a.D.R,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():t(h,a.D.R.remove(b.type,e,e+g),2)}Sc(a.J);x(h)})}function zh(a){return a&&"text"==a.type&&"application/cea-608"==a.stream.mimeType}
260
+ function Eh(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=Qc,e=gh(c.ua(),c.h,c.g,a.o.retryParameters),f=a.D.wb.request(d,e),b.qa=f,t(h,f.promise,2);g=h.h;b.qa=null;return h["return"](g.data)})}
261
+ function uh(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.jb=!1,b.Hc=!1,b.pc=0,b.Jb=!0,b.va=null,b.wc=null,b.aa=null,d?(e=a.D.tc(),f=a.D.R.getDuration(),t(g,a.D.R.remove(b.type,e+d,f),3)):t(g,rf(a.D.R,b.type),4);if(3!=g.g)return Sc(a.J),c?t(g,a.D.R.flush(b.type),3):g.B(3);Sc(a.J);b.Jb=!1;b.endOfStream=!1;oh(a,b,0);x(g)})}
262
+ function oh(a,b,c){var d=b.type;if("text"!=d||a.g.has(d))b.Qa=(new ic(function(){var e;return K(function(f){if(1==f.g)return y(f,2),t(f,a.Ub(b),4);if(2!=f.g)return ta(f,0);e=C(f);if(a.D)a.D.onError(e);x(f)})})).W(c)}function jh(a){null!=a.Qa&&(a.Qa.stop(),a.Qa=null)}function kh(a){return K(function(b){return a.qa?t(b,a.qa.abort(),0):b.B(0)})}function yh(a,b){return K(function(c){if(1==c.g)return t(c,lc(a.s),2);Sc(a.J);a.D.onError(b);b.handled||a.o.failureCallback(b);x(c)})};function Jh(a,b){var c=Kh(),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 Lh(d)});this.J=new Rc(function(){return Mh(d)})}Jh.prototype.destroy=function(){return this.J.destroy()};function Mh(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),Nh(a),t(e,a.u,2);a.g&&a.g.Ea.cb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ea.cb();a.g=null;a.m=[];a.j=null;x(e)})}
263
+ function Oh(a,b){var c={yb:function(){},yc:function(){},cb:function(){},onError:function(){},Ac:function(){},Vf:function(){}};a.m.push({create:b,Ea:c});a.h&&a.h.abort();Nh(a);return c}
264
+ function Lh(a){return K(function(b){if(a.J.g)b=b.B(0);else{if(0==a.m.length||a.g&&!a.g.$a)var c=!1;else{a.g&&(a.g.Ea.cb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ea.yb(),a.g={node:d.node,payload:d.payload,$a:d.$a,Ea:c.Ea}):c.Ea.Ac();c=!0}c?c=Promise.resolve():a.g?c=Ph(a):(a.j.Te(a.i),a.s=new Ob,c=a.s);b=t(b,c,1)}return b})}
265
+ function Ph(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.Ce(a.i,a.l,a.g.node,a.g.payload),y(d,2),a.h=a.j.re(a.i,a.l,a.g.payload),t(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ea.yc(),a.g=null);ta(d,0);break;case 2:b=C(d);if(7001==b.code)a.g.Ea.cb();else a.g.Ea.onError(b);a.g=null;a.h=null;c=a;return t(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,x(d)}})}function Nh(a){a.s&&(a.s.resolve(),a.s=null)};function Qh(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Qh.prototype;q.remove=function(a,b){if(!this.g)return!1;Rh(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
266
+ q.append=function(a){function b(g){return g.spacer?"\n":g.nestedCues.length?g.nestedCues.map(b).join(""):g.payload}var c=a.map(function(g){if(g.nestedCues.length){var h=g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):[];var e={};c=r(c);for(var f=c.next();!f.done;e={mb:e.mb},f=c.next())e.mb=f.value,a.some(function(g){return function(h){return h.startTime==g.mb.startTime&&h.endTime==g.mb.endTime&&h.text==g.mb.payload?!0:!1}}(e))||(f=Sh(e.mb))&&
267
+ d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=r(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};q.destroy=function(){this.g&&(Rh(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};
268
+ q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
269
+ function Sh(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}
270
+ function Rh(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}L("shaka.text.SimpleTextDisplayer",Qh);Qh.prototype.setTextVisibility=Qh.prototype.setTextVisibility;Qh.prototype.isTextVisible=Qh.prototype.isTextVisible;Qh.prototype.destroy=Qh.prototype.destroy;Qh.prototype.append=Qh.prototype.append;Qh.prototype.remove=Qh.prototype.remove;function Th(){}function Uh(a){for(;a.firstChild;)a.removeChild(a.firstChild)}L("shaka.util.Dom",Th);Th.removeAllChildren=Uh;function Vh(a,b){var c=this;this.u=!1;this.j=[];this.g=a;this.s=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.s.appendChild(this.i);this.C=(new Q(function(){Wh(c)})).xa(.25);this.l=new Map;this.h=new Tc;this.h.v(document,"fullscreenchange",function(){Wh(c,!0)});this.m=null;"ResizeObserver"in
271
+ window&&(this.m=new ResizeObserver(function(){Wh(c,!0)}),this.m.observe(this.i))}q=Vh.prototype;q.append=function(a){var b=[].concat(ha(this.j)),c={};a=r(a);for(var d=a.next();!d.done;c={bc:c.bc},d=a.next())c.bc=d.value,b.some(function(e){return function(f){return Me(f,e.bc)}}(c))||this.j.push(c.bc);Wh(this)};
272
+ q.destroy=function(){this.s.removeChild(this.i);this.i=null;this.u=!1;this.j=[];this.C&&this.C.stop();this.l.clear();this.h&&(this.h.release(),this.h=null);this.m&&(this.m.disconnect(),this.m=null)};q.remove=function(a,b){if(!this.i)return!1;var c=this.j.length;this.j=this.j.filter(function(d){return d.startTime<a||d.endTime>=b});Wh(this,c>this.j.length);return!0};q.isTextVisible=function(){return this.u};q.setTextVisibility=function(a){this.u=a};
273
+ function Wh(a,b){function c(h){return a.j.includes(h)&&a.u&&h.startTime<=d&&h.endTime>d}b=void 0===b?!1:b;for(var d=a.g.currentTime,e=r(a.l.keys()),f=e.next();!f.done;f=e.next())if(f=f.value,!c(f)||b){var g=a.l.get(f);a.i.removeChild(g);a.l["delete"](f)}e=new Set(a.l.values());f=r(Array.from(a.i.childNodes));for(g=f.next();!g.done;g=f.next())g=g.value,e.has(g)||a.i.removeChild(g);e=a.j.filter(function(h){return c(h)&&!a.l.has(h)}).sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:
274
+ h.endTime-k.endTime});e=r(e);for(f=e.next();!f.done;f=e.next())Xh(a,a.i,f.value)}function Yh(a,b,c,d){var e=document.createElement("span");d&&e.classList.add("shaka-nested-cue");Zh(a,e,c,!0);b.appendChild(e);return e}function Xh(a,b,c){if(c.nestedCues.length){var d=document.createElement("p");d.style.width="100%";Zh(a,d,c,!1);for(var e=0;e<c.nestedCues.length;e++)Yh(a,d,c.nestedCues[e],!0);b.appendChild(d);a.l.set(c,d)}else a.l.set(c,Yh(a,b,c,!1))}
275
+ function Zh(a,b,c,d){var e=b.style,f=0==c.nestedCues.length;c.spacer?(e.flexBasis="100%",e.height="0"):(e.whiteSpace="pre-line",b.textContent=c.payload,f&&(e.backgroundColor=c.backgroundColor),e.border=c.border,e.color=c.color,e.direction=c.direction,e.opacity=c.opacity,e.paddingLeft=$h(c.linePadding,c,a.s),e.paddingRight=$h(c.linePadding,c,a.s),c.backgroundImage&&(e.backgroundImage="url('"+c.backgroundImage+"')",e.backgroundRepeat="no-repeat",e.backgroundSize="contain",e.backgroundPosition="center",
276
+ ""==c.backgroundColor&&(e.backgroundColor="transparent")),c.backgroundImage&&c.region&&(b=c.region.widthUnits==Re?"%":"px",e.height=c.region.height+(c.region.heightUnits==Re?"%":"px"),e.width=c.region.width+b),e.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end",f?e.display="inline-block":(e.display="flex",e.flexDirection="row",e.flexWrap="wrap",e.margin="0",e.alignItems=e.justifyContent,e.justifyContent="center"),d&&(e.maxWidth="100%"),e.fontFamily=
277
+ c.fontFamily,e.fontWeight=c.fontWeight.toString(),e.fontStyle=c.fontStyle,e.letterSpacing=c.letterSpacing,e.fontSize=$h(c.fontSize,c,a.s),c.line?1==c.lineInterpretation&&(e.position="absolute",c.writingMode==Fe?c.lineAlign==He?e.top=c.line+"%":"end"==c.lineAlign&&(e.bottom=c.line+"%"):"vertical-lr"==c.writingMode?c.lineAlign==He?e.left=c.line+"%":"end"==c.lineAlign&&(e.right=c.line+"%"):c.lineAlign==He?e.right=c.line+"%":"end"==c.lineAlign&&(e.left=c.line+"%")):c.region&&c.region.id&&!f&&(a=c.region.widthUnits==
278
+ Re?"%":"px",d=c.region.viewportAnchorUnits==Re?"%":"px",e.height=c.region.height+(c.region.heightUnits==Re?"%":"px"),e.width=c.region.width+a,e.position="absolute",e.top=c.region.viewportAnchorY+d,e.left=c.region.viewportAnchorX+d),e.lineHeight=c.lineHeight,c.position&&(c.writingMode==Fe?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(" "),
279
+ e.writingMode=c.writingMode,"writingMode"in document.documentElement.style&&e.writingMode==c.writingMode||(e.webkitWritingMode=c.writingMode),c.size&&(c.writingMode==Fe?e.width=c.size+"%":e.height=c.size+"%"))}
280
+ function $h(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),pf:d[2]}:null;if(!d)return a;var e=d.value;switch(d.pf){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}L("shaka.text.UITextDisplayer",Vh);Vh.prototype.setTextVisibility=Vh.prototype.setTextVisibility;Vh.prototype.isTextVisible=Vh.prototype.isTextVisible;Vh.prototype.remove=Vh.prototype.remove;
281
+ Vh.prototype.destroy=Vh.prototype.destroy;Vh.prototype.append=Vh.prototype.append;function ai(){}
282
+ function bi(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]=xc(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=xc(l)),k=bi(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?(Pa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Sa("Unexpected number of arguments for "+k),a[h]=b[h]):(Pa("Invalid config, unrecognized key "+
283
+ k),g=!1)}return g}function ci(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}L("shaka.util.ConfigUtils",ai);ai.convertToConfigObject=ci;ai.mergeConfigObjects=bi;function di(){}
284
+ function ei(){var a=1E6,b=Infinity;navigator.connection&&(navigator.connection.downlink&&(a=1E6*navigator.connection.downlink),navigator.connection.saveData&&(b=360));var c={retryParameters:kc(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Ud,logLicenseExchange:!1,updateExpirationTime:1},d={retryParameters:kc(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,
285
+ ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1},hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},e={retryParameters:kc(),failureCallback:function(h){return[h]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,
286
+ stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2};if(md("Web0S")||ld()||md("CrKey"))e.stallSkip=0;var f={trackSelectionCallback:function(h){return K(function(k){return k["return"](h)})},progressCallback:function(h,k){return[h,k]},usePersistentLicense:!0},g={drm:c,manifest:d,streaming:e,offline:f,abrFactory:function(){return new Xf},abr:{enabled:!0,defaultBandwidthEstimate:a,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,
284
287
  minHeight:0,maxHeight:b,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,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}};
285
- f.trackSelectionCallback=function(h){return J(function(k){return k["return"](ei(h,g.preferredAudioLanguage))})};return g}function fi(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return ai(a,b,c||di(),d,"")}
286
- function ei(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Df(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return R(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/
287
- 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,"text"==g.type&&c.push(g);return c}K("shaka.util.PlayerConfiguration",ci);ci.mergeConfigObjects=fi;function gi(){this.a=null;this.b=[]}function hi(a,b){if(null==a.a)a.a={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.a.duration=c-a.a.timestamp;a.a.state!=b&&(a.b.push(a.a),a.a={timestamp:c,state:b,duration:0})}}function ii(a,b){var c=0;a.a&&a.a.state==b&&(c+=a.a.duration);for(var d=r(a.b),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
288
- function ji(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.b),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.a&&c.push(b(a.a));return c};function ki(){this.b=this.c=null;this.a=[]}function li(a,b,c){a.c!=b&&(a.c=b,a.a.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}))}function mi(a,b,c){a.b!=b&&(a.b=b,a.a.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function ni(){this.g=this.h=this.A=this.m=this.D=this.c=this.v=this.f=this.G=this.I=this.K=this.j=this.M=NaN;this.b=new gi;this.a=new ki};function V(a,b){zc.call(this);var c=this;this.h=oi;this.dc=this.a=null;this.T=!1;this.b=new Vc;this.Lc=this.j=this.zb=this.o=this.bc=this.m=this.c=this.cc=this.D=this.Zb=this.A=this.Da=this.v=this.G=this.g=this.N=null;this.xd=1E9;this.i=pi(this);this.Ac={width:Infinity,height:Infinity};this.f=null;this.ea=new dg(this.i.preferredAudioLanguage,this.i.preferredVariantRole,this.i.preferredAudioChannelCount);this.ua=this.i.preferredTextLanguage;this.$b=this.i.preferredTextRole;this.Mc=[];b&&b(this);this.N=
289
- qi(this);this.I=null;ri&&(this.I=Ob(ri));this.b.l(window,"online",function(){c.kd()});this.ga={name:"detach"};this.Fa={name:"attach"};this.M={name:"unload"};this.Rc={name:"manifest-parser"};this.Qc={name:"manifest"};this.Ca={name:"media-source"};this.Nc={name:"drm-engine"};this.K={name:"load"};this.Sc={name:"src-equals-drm-engine"};this.ib={name:"src-equals"};var d=new Map;d.set(this.Fa,function(e,f){return uc(si(c,e,f))});d.set(this.ga,function(e){e.B&&(c.b.ta(e.B,"error"),e.B=null);c.a=null;e=Promise.resolve();
290
- return uc(e)});d.set(this.M,function(e){return uc(ti(c,e))});d.set(this.Ca,function(e){e=ui(c,e);return uc(e)});d.set(this.Rc,function(e,f){var g=vi(c,e,f);return uc(g)});d.set(this.Qc,function(e){return wi(c,e)});d.set(this.Nc,function(e){e=xi(c,e);return uc(e)});d.set(this.K,function(e,f){return uc(yi(c,e,f))});d.set(this.Sc,function(e){e=zi(c,e);return uc(e)});d.set(this.ib,function(e,f){return Ai(c,e,f)});this.X=new Ih(this.ga,{ye:function(e,f,g,h){var k=null;e==c.ga&&(k=g==c.ga?c.ga:c.Fa);e==
291
- c.Fa&&(k=g==c.ga||f.B!=h.B?c.ga:g==c.Fa?c.Fa:g==c.Ca||g==c.K?c.Ca:g==c.ib?c.Sc:null);e==c.Ca&&(k=g==c.K&&f.B==h.B?c.Rc:c.M);e==c.Rc&&(k=Bi(c.K,c.Qc,c.M,g,f,h));e==c.Qc&&(k=Bi(c.K,c.Nc,c.M,g,f,h));e==c.Nc&&(k=Bi(c.K,c.K,c.M,g,f,h));e==c.Sc&&(k=g==c.ib&&f.B==h.B?c.ib:c.M);if(e==c.K||e==c.ib)k=c.M;e==c.M&&(k=h.B&&f.B==h.B?c.Fa:c.ga);return k},ne:function(e,f,g){c.dispatchEvent(Ci(Di,{state:e.name}));return d.get(e)(f,g)},handleError:function(e){return J(function(f){return 1==f.a?u(f,ti(c,e),2):f["return"](e.B?
292
- c.Fa:c.ga)})},Pe:function(e){c.dispatchEvent(Ci(Ei,{state:e.name}))}});a&&this.Ab(a,!0)}pa(V,zc);function Ci(a,b){return new P(a,b)}p=V.prototype;
293
- p.destroy=function(){var a=this,b;return J(function(c){switch(c.a){case 1:if(a.h==Fi)return c["return"]();a.h=Fi;b=Nh(a.X,function(){return{node:a.ga,payload:Jh(),Ua:!1}});return u(c,new Promise(function(d){b.sb=function(){};b.qc=function(){d()};b.Xa=function(){d()};b.onError=function(){d()};b.sc=function(){d()}}),2);case 2:return u(c,a.X.destroy(),3);case 3:a.b&&(a.b.release(),a.b=null);a.Lc=null;a.j=null;a.i=null;a.f=null;a.dc=null;if(!a.N){c.s(0);break}return u(c,a.N.destroy(),5);case 5:a.N=null,
294
- w(c)}})};p.Ab=function(a,b){b=void 0===b?!0:b;if(this.h==Fi)return Promise.reject(Gi());var c=Jh();c.B=a;jd()||(b=!1);var d=b?this.Ca:this.Fa,e=Nh(this.X,function(){return{node:d,payload:c,Ua:!1}});e.sb=function(){};return Hi(e)};p.detach=function(){var a=this;if(this.h==Fi)return Promise.reject(Gi());var b=Nh(this.X,function(){return{node:a.ga,payload:Jh(),Ua:!1}});b.sb=function(){};return Hi(b)};
295
- p.vd=function(a){var b=this;a=void 0===a?!0:a;if(this.h==Fi)return Promise.reject(Gi());jd()||(a=!1);var c=Jh(),d=Nh(this.X,function(e){var f=e.B&&a?b.Ca:e.B?b.Fa:b.ga;c.B=e.B;return{node:f,payload:c,Ua:!1}});d.sb=function(){};return Hi(d)};
296
- p.load=function(a,b,c){var d=this;if(this.h==Fi)return Promise.reject(Gi());this.dispatchEvent(Ci(Ii));var e=Jh();e.uri=a;e.sd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Ji(this,e)?this.ib:this.K,g=Nh(this.X,function(h){if(null==h.B)return null;e.B=h.B;return{node:f,payload:e,Ua:!0}});this.f=new ni;g.sb=function(){};return new Promise(function(h,k){g.sc=function(){return k(new M(2,7,7002))};g.qc=function(){h();d.dispatchEvent(Ci(Ki))};g.Xa=function(){return k(Gi())};g.onError=
288
+ f.trackSelectionCallback=function(h){return K(function(k){return k["return"](fi(h,g.preferredAudioLanguage))})};return g}function gi(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return bi(a,b,c||ei(),d,"")}
289
+ function fi(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Df(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return xf(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/
290
+ 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,"text"==g.type&&c.push(g);return c}L("shaka.util.PlayerConfiguration",di);di.mergeConfigObjects=gi;function hi(){this.g=null;this.h=[]}function ii(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 ji(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
291
+ function ki(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function li(){this.i=this.h=null;this.g=[]}function mi(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 ni(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 oi(){this.m=this.s=this.I=this.C=this.l=this.i=this.F=this.j=this.K=this.N=this.P=this.u=this.S=NaN;this.h=new hi;this.g=new li};function V(a,b){wc.call(this);var c=this;this.m=pi;this.ic=this.g=null;this.Z=!1;this.h=new Tc;this.Tc=this.s=this.Fb=this.A=this.lc=this.u=this.i=this.mc=this.I=this.jc=this.F=this.Ja=this.C=this.K=this.l=this.U=null;this.Md=1E9;this.o=qi(this);this.Yc={width:Infinity,height:Infinity};this.j=null;this.ka=new dg(this.o.preferredAudioLanguage,this.o.preferredVariantRole,this.o.preferredAudioChannelCount);this.Ba=this.o.preferredTextLanguage;this.Gb=this.o.preferredTextRole;this.Ic=[];b&&b(this);this.U=
292
+ ri(this);this.N=null;si&&(this.N=Kb(si));this.h.v(window,"online",function(){c.qd()});this.ma={name:"detach"};this.La={name:"attach"};this.S={name:"unload"};this.Zc={name:"manifest-parser"};this.Xc={name:"manifest"};this.Ia={name:"media-source"};this.Uc={name:"drm-engine"};this.P={name:"load"};this.$c={name:"src-equals-drm-engine"};this.ob={name:"src-equals"};var d=new Map;d.set(this.La,function(e,f){return qc(ti(c,e,f))});d.set(this.ma,function(e){e.G&&(c.h.ya(e.G,"error"),e.G=null);c.N&&c.N.release();
293
+ c.g=null;e=Promise.resolve();return qc(e)});d.set(this.S,function(e){return qc(ui(c,e))});d.set(this.Ia,function(e){e=vi(c,e);return qc(e)});d.set(this.Zc,function(e,f){var g=wi(c,e,f);return qc(g)});d.set(this.Xc,function(e){return xi(c,e)});d.set(this.Uc,function(e){e=yi(c,e);return qc(e)});d.set(this.P,function(e,f){return qc(zi(c,e,f))});d.set(this.$c,function(e,f){var g=Ai(c,e,f);return qc(g)});d.set(this.ob,function(e,f){return Bi(c,e,f)});this.ca=new Jh(this.ma,{Ce:function(e,f,g,h){var k=
294
+ null;e==c.ma&&(k=g==c.ma?c.ma:c.La);e==c.La&&(k=g==c.ma||f.G!=h.G?c.ma:g==c.La?c.La:g==c.Ia||g==c.P?c.Ia:g==c.ob?c.$c:null);e==c.Ia&&(k=g==c.P&&f.G==h.G?c.Zc:c.S);e==c.Zc&&(k=Ci(c.P,c.Xc,c.S,g,f,h));e==c.Xc&&(k=Ci(c.P,c.Uc,c.S,g,f,h));e==c.Uc&&(k=Ci(c.P,c.P,c.S,g,f,h));e==c.$c&&(k=g==c.ob&&f.G==h.G?c.ob:c.S);if(e==c.P||e==c.ob)k=c.S;e==c.S&&(k=h.G&&f.G==h.G?c.La:c.ma);return k},re:function(e,f,g){c.dispatchEvent(Di(Ei,(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==
295
+ f.g?t(f,ui(c,e),2):f["return"](e.G?c.La:c.ma)})},Te:function(e){c.dispatchEvent(Di(Fi,(new Map).set("state",e.name)))}});a&&this.Ib(a,!0)}oa(V,wc);function Di(a,b){return new R(a,b)}q=V.prototype;
296
+ q.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.m==Gi)return c["return"]();a.m=Gi;b=Oh(a.ca,function(){return{node:a.ma,payload:Kh(),$a:!1}});return t(c,new Promise(function(d){b.yb=function(){};b.yc=function(){d()};b.cb=function(){d()};b.onError=function(){d()};b.Ac=function(){d()}}),2);case 2:return t(c,a.ca.destroy(),3);case 3:a.h&&(a.h.release(),a.h=null);a.Tc=null;a.s=null;a.o=null;a.j=null;a.ic=null;if(!a.U){c.B(0);break}return t(c,a.U.destroy(),5);case 5:a.U=
297
+ null,x(c)}})};q.Ib=function(a,b){b=void 0===b?!0:b;if(this.m==Gi)return Promise.reject(Hi());var c=Kh();c.G=a;id()||(b=!1);var d=b?this.Ia:this.La,e=Oh(this.ca,function(){return{node:d,payload:c,$a:!1}});e.yb=function(){};return Ii(e)};q.detach=function(){var a=this;if(this.m==Gi)return Promise.reject(Hi());var b=Oh(this.ca,function(){return{node:a.ma,payload:Kh(),$a:!1}});b.yb=function(){};return Ii(b)};
298
+ q.Cd=function(a){var b=this;a=void 0===a?!0:a;if(this.m==Gi)return Promise.reject(Hi());id()||(a=!1);var c=Kh(),d=Oh(this.ca,function(e){var f=e.G&&a?b.Ia:e.G?b.La:b.ma;c.G=e.G;return{node:f,payload:c,$a:!1}});d.yb=function(){};return Ii(d)};
299
+ q.load=function(a,b,c){var d=this;if(this.m==Gi)return Promise.reject(Hi());this.dispatchEvent(Di(Ji));var e=Kh();e.uri=a;e.yd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Ki(this,e)?this.ob:this.P,g=Oh(this.ca,function(h){if(null==h.G)return null;e.G=h.G;return{node:f,payload:e,$a:!0}});this.j=new oi;g.yb=function(){};return new Promise(function(h,k){g.Ac=function(){return k(new O(2,7,7002))};g.yc=function(){h();d.dispatchEvent(Di(Li))};g.cb=function(){return k(Hi())};g.onError=
297
300
  function(l){return k(l)}})};
298
- function Ji(a,b){if(!jd())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"}[og(d)]);return c?""==(b.B||ld()).canPlayType(c)?!1:jd()&&(c in ng||og(d)in pg)?od()&&a.i.streaming.useNativeHlsOnSafari:!0:!1}
299
- function si(a,b,c){null==b.B&&(b.B=c.B,a.b.l(b.B,"error",function(){var d=Li(a);d&&Mi(a,d)}));a.a=b.B;return Promise.resolve()}
300
- function ti(a,b){var c,d,e,f,g,h,k,l,m;return J(function(n){switch(n.a){case 1:return a.h!=Fi&&(a.h=oi),c=a.Mc.map(function(q){return q()}),a.Mc=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Ci(Ni));b.mimeType=null;b.startTime=null;b.uri=null;b.B&&(a.b.ta(b.B,"loadedmetadata"),a.b.ta(b.B,"playing"),a.b.ta(b.B,"pause"),a.b.ta(b.B,"ended"),a.b.ta(b.B,"ratechange"));a.Da&&(a.Da.release(),a.Da=null);a.Zb&&(a.Zb.stop(),a.Zb=null);if(!a.m){n.s(3);break}return u(n,a.m.stop(),4);case 4:a.m=null,a.bc=null;
301
- case 3:if(!a.j){n.s(5);break}return u(n,a.j.stop(),5);case 5:if(!a.c){n.s(7);break}return u(n,a.c.destroy(),8);case 8:a.c=null;case 7:a.A&&(a.A.release(),a.A=null);a.v&&(a.v.release(),a.v=null);if(!a.G){n.s(9);break}return u(n,a.G.destroy(),10);case 10:a.G=null;case 9:if(a.I)a.I.onAssetUnload();if(!b.B||!b.B.src){n.s(11);break}return u(n,new Promise(function(q){return(new N(q)).R(.1)}),12);case 12:b.B.removeAttribute("src"),b.B.load();case 11:if(!a.g){n.s(13);break}return u(n,a.g.destroy(),14);case 14:a.g=
302
- null;case 13:a.zb=null;a.D=null;if(a.o){d=r(a.o.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.o.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.o=null;a.f=new ni;a.Oc=null;Oi(a);w(n)}})}
303
- function ui(a,b){var c,d,e,f;return J(function(g){if(1==g.a)return c=window.muxjs?new ve:new we,d=a.i.textDisplayFactory,e=Ob(d),a.Oc=d,f=Pi(b.B,c,e,function(h,k,l){h=r(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,q=l,t=r(m.frames),v=t.next();!v.done;v=t.next())Qi(a,n,q,"ID3",v.value);if(a.I)a.I.onHlsTimedMetadata(m,n)}}),u(g,f.A,2);a.G=f;w(g)})}
304
- function vi(a,b,c){var d,e,f,g;return J(function(h){if(1==h.a)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.N,a.zb=d,f=a,u(h,mg(d,e,a.i.manifest.retryParameters,b.mimeType),2);f.bc=h.b;a.m=Ob(a.bc);g=Ac(a.i.manifest);c.B&&"AUDIO"===c.B.nodeName&&(g.disableVideo=!0);a.m.configure(g);w(h)})}
305
- function wi(a,b){var c=b.uri,d=a.N;a.cc=new bh(function(){return a.ld()});ch(a.cc,function(g){Ri(a,Si,g);if(a.I)a.I.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return J(function(h){return h["return"](a.jb(g))})},makeTextStreamsForClosedCaptions:function(g){return Ti(a,g)},onTimelineRegionAdded:function(g){var h=a.cc;a:{var k=r(h.a);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=
306
- l;break a}k=null}null==k&&(h.a.add(g),h.b(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Mi(a,g)}},f=Date.now()/1E3;return new qc(function(){var g,h,k,l;return J(function(m){if(1==m.a)return g=a,u(m,a.m.start(c,e),2);g.o=m.b;h=Ci(Ui);a.dispatchEvent(h);if(0==a.o.variants.length)throw new M(2,4,4036);Vi(a.o);k=Date.now()/1E3;l=k-f;a.f.v=l;w(m)})}(),function(){return a.m.stop()})}
307
- function xi(a,b){var c,d;return J(function(e){if(1==e.a)return c=Date.now()/1E3,d=!0,a.g=Wi(a,{qb:a.N,onError:function(f){Mi(a,f)},rc:function(f){Xi(a,f)},onExpirationUpdated:function(f,g){Yi(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Zi&&d&&(d=!1,a.f.c=Date.now()/1E3-c)}}),a.g.configure(a.i.drm),u(e,Bd(a.g,a.o.variants,a.o.offlineSessionIds),2);if(3!=e.a)return u(e,a.g.Ab(b.B),3);a.jb(a.o);w(e)})}
308
- function yi(a,b,c){var d,e,f,g,h,k,l,m,n,q;return J(function(t){switch(t.a){case 1:b.startTime=c.startTime;d=b.B;e=b.uri;a.zb=e;a.A=new Vg({mc:function(){return b.B.playbackRate},kc:function(){return b.B.defaultPlaybackRate},qd:function(v){b.B.playbackRate=v},Md:function(v){b.B.currentTime+=v}});f=function(){return $i(a)};g=function(){return aj(a)};a.b.l(d,"playing",f);a.b.l(d,"pause",f);a.b.l(d,"ended",f);a.b.l(d,"ratechange",g);h=a.i.abrFactory;a.j&&a.Lc==h||(a.Lc=h,a.j=Ob(h),"function"!=typeof a.j.playbackRateChanged&&
309
- (Hb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.j.playbackRateChanged=function(){}),a.j.configure(a.i.abr));a.ea=new dg(a.i.preferredAudioLanguage,a.i.preferredVariantRole,a.i.preferredAudioChannelCount);a.ua=a.i.preferredTextLanguage;bj(a.o.presentationTimeline,a.i.playRangeStart,a.i.playRangeEnd);a.j.init(function(v,z,x){z=void 0===z?!1:z;x=void 0===x?0:x;a.c&&v!=a.c.b&&(li(a.f.a,v,!0),rh(a.c,v,z,x),cj(a))});a.v=dj(a,b.startTime);a.Da=ej(a);k=Math.max(a.o.minBufferTime,
310
- a.i.streaming.rebufferingGoal);fj(a,k);Ef(a.o,a.i.preferredAudioChannelCount);a.c=gj(a);a.c.configure(a.i.streaming);a.h=hj;a.dispatchEvent(Ci(ij));l=jj(a)?a.j.chooseVariant():null;li(a.f.a,l,!0);rh(a.c,l,!1,0);(m=Vf(a.o.textStreams,a.ua,a.$b)[0]||null)&&mi(a.f.a,m,!0);m?(l.audio&&kj(a,l.audio,m)&&(a.T=!0),a.T&&a.G.h.setTextVisibility(!0),lj(a)):a.T=!1;m&&(a.i.streaming.alwaysStreamText||a.Wc())&&sh(a.c,m);if(!a.i.streaming.startAtSegmentBoundary){t.s(2);break}n=a.v.g();return u(t,mj(l,n),3);case 3:q=
311
- t.b,a.v.m(q);case 2:return u(t,a.c.start(),4);case 4:a.i.abr.enabled&&(a.j.enable(),nj(a)),a.jb(a.o),oj(a),cj(a),jj(a),a.o.variants.some(function(v){return v.primary}),a.b.ja(d,"loadedmetadata",function(){a.f.f=Date.now()/1E3-c.sd}),w(t)}})}
312
- function zi(a,b){var c,d,e,f;return J(function(g){return 1==g.a?(c=Rb,d=Date.now()/1E3,e=!0,a.g=Wi(a,{qb:a.N,onError:function(h){Mi(a,h)},rc:function(h){Xi(a,h)},onExpirationUpdated:function(h,k){Yi(a,h,k)},onEvent:function(h){a.dispatchEvent(h);h.type==Zi&&e&&(e=!1,a.f.c=Date.now()/1E3-d)}}),a.g.configure(a.i.drm),f={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"video/mp4",codecs:"",encrypted:!0,
313
- drmInfos:[],keyIds:new Set,language:"und",label:null,type:c.Ea,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0},u(g,Bd(a.g,[f],[]),2)):u(g,a.g.Ab(b.B),0)})}
314
- function Ai(a,b,c){function d(){return $i(a)}b.uri=c.uri;b.startTime=c.startTime;a.zb=b.uri;a.v=new Lg(b.B);null!=b.startTime&&a.v.m(b.startTime);a.A=new Vg({mc:function(){return b.B.playbackRate},kc:function(){return b.B.defaultPlaybackRate},qd:function(g){b.B.playbackRate=g},Md:function(g){b.B.currentTime+=g}});fj(a,a.i.streaming.rebufferingGoal);a.b.l(b.B,"playing",d);a.b.l(b.B,"pause",d);a.b.l(b.B,"ended",d);a.b.l(b.B,"ratechange",function(){return aj(a)});"none"!=a.a.preload&&a.b.ja(a.a,"loadedmetadata",
315
- function(){a.f.f=Date.now()/1E3-c.sd});a.a.audioTracks&&(a.b.l(a.a.audioTracks,"addtrack",function(){return oj(a)}),a.b.l(a.a.audioTracks,"removetrack",function(){return oj(a)}),a.b.l(a.a.audioTracks,"change",function(){return oj(a)}));a.a.textTracks&&(a.b.l(a.a.textTracks,"addtrack",function(g){oj(a);pj(a,g)}),a.b.l(a.a.textTracks,"removetrack",function(){return oj(a)}),a.b.l(a.a.textTracks,"change",function(){return oj(a)}));b.B.src=b.uri;(md()||nd("Web0S"))&&b.B.load();a.h=qj;a.dispatchEvent(Ci(ij));
316
- var e=new Sb;Ag(a.a,HTMLMediaElement.HAVE_METADATA,a.b,function(){e.resolve()});var f=!1;a.Mc.push(function(){f=!0});Ag(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.b,function(){var g;return J(function(h){if(1==h.a){if(f)return h["return"]();rj(a);g=sj(a);return g.find(function(k){return"disabled"!=k.mode})?h.s(2):u(h,new Promise(function(k){a.b.ja(a.a.textTracks,"change",k);(new N(k)).R(1)}),2)}if(f)return h["return"]();tj(a);w(h)})});a.a.error?e.reject(Li(a)):"none"==a.a.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.'),
317
- e.resolve());a.b.ja(a.a,"error",function(){e.reject(Li(a))});return new qc(e,function(){e.reject(new M(2,7,7001));return Promise.resolve()})}function rj(a){var b=a.i.preferredAudioLanguage;if(""!=b){a.md(b);var c=a.i.preferredVariantRole;""!=c&&a.md(b,c)}}function tj(a){var b=a.i.preferredTextLanguage;if(""!=b){a.nd(b);var c=a.i.preferredTextRole;""!=c&&a.nd(b,c)}}
318
- function pj(a,b){var c=b.track;"metadata"==c.kind&&(c.mode="hidden",a.b.l(c,"cuechange",function(){if(c.activeCues)for(var d=r(c.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Qi(a,e.startTime,e.endTime,e.type,e.value),a.I)a.I.onCueMetadataChange(e.value)}),(new N(function(){var d=uj(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Sb().R(.5))}function Qi(a,b,c,d,e){a.dispatchEvent(Ci(vj,{startTime:b,endTime:c,Rf:d,payload:e}))}
319
- function Vi(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 Wi(a,b){return new sd(b,a.i.drm.updateExpirationTime)}function qi(a){return new Ic(function(b,c){a.j&&a.j.segmentDownloaded(b,c)})}
320
- function dj(a,b){return new Mg(a.a,a.o,a.i.streaming,b,function(){a.Da&&Yg(a.Da,!0);if(a.c)for(var c=a.c,d=c.u.lc(),e=c.i.smallGapLimit,f=r(c.a.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.a.get(g);h.da=null;var k=c.u.L;"text"==g?(k=k.c,k=null==k.a||null==k.b?!1:d>=k.a&&d<k.b):(k=lf(k,g),k=ye(k,d,e));k||(null!=mf(c.u.L,g)&&vh(c,h),h.ka&&(h.ka.abort(),h.ka=null),"text"===g&&c.u.L.v.c())}a.D&&wj(a)},function(c){return a.dispatchEvent(c)})}
321
- function ej(a){var b=new dh(a.cc);eh(b,function(d){Ri(a,xj,d)},function(d){Ri(a,yj,d)},function(d,e){e||(Ri(a,xj,d),Ri(a,yj,d))});var c=new Xg(a.a);c.a.add(b);return c}function fj(a,b){a.D=new hg;a.D.a=jg;kg(a.D,b,Math.min(.5,b/2));Oi(a);a.Zb=(new N(function(){wj(a)})).sa(.25)}
322
- function wj(a){switch(a.h){case qj:if(a.a.ended)var b=!0;else{var c=xe(a.a.buffered);b=null!=c&&c>=a.a.duration-1}break;case hj:a:if(a.a.ended||jf(a.G))b=!0;else{if(a.o.presentationTimeline.S()){c=a.o.presentationTimeline.Ha();var d=xe(a.a.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=ze(a.a.buffered,a.a.currentTime);c=a.D;var e=b,f=c.b.get(c.a);b=c.a;d=e||d>=f?ig:jg;c.a=d;b!=d&&Oi(a)}function Pi(a,b,c,d){return new bf(a,b,c,d)}
323
- function gj(a){return new gh(a.o,{lc:function(){return a.v.g()},getBandwidthEstimate:function(){return a.j.getBandwidthEstimate()},L:a.G,qb:a.N,onError:function(b){return Mi(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Qe:function(){a.m&&a.m.update&&a.m.update()},fd:function(){a.v&&a.v.v();wj(a)}})}
324
- p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=bi(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);var c=fi(this.i,a,pi(this));zj(this);return c};
325
- function zj(a){if(a.m){var b=Ac(a.i.manifest);a.a&&"AUDIO"===a.a.nodeName&&(b.disableVideo=!0);a.m.configure(b)}a.g&&a.g.configure(a.i.drm);if(a.c){a.c.configure(a.i.streaming);try{a.jb(a.o)}catch(f){Mi(a,f)}a.j&&jj(a);b=a.c.b;!b||b.allowedByApplication&&b.allowedByKeySystem||Aj(a)}if(a.G&&(b=a.i.textDisplayFactory,a.Oc!=b)){var c=Ob(b),d=a.G,e=d.h;d.h=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.c&&(d.c.c=c);a.Oc=b;a.c&&(b=a.c,(c=b.a.get("text"))&&qh(b,c.stream,!0,0,!0))}a.j&&(a.j.configure(a.i.abr),
326
- a.i.abr.enabled?a.j.enable():a.j.disable(),nj(a));a.D&&(b=a.i.streaming.rebufferingGoal,a.o&&(b=Math.max(b,a.o.minBufferTime)),kg(a.D,b,Math.min(.5,b/2)))}p.getConfiguration=function(){var a=pi(this);fi(a,this.i,pi(this));return a};p.Ze=function(){for(var a in this.i)delete this.i[a];fi(this.i,pi(this),pi(this));zj(this)};p.te=function(){return this.h};p.xe=function(){return this.a};p.Gb=function(){return this.N};p.Tc=function(){return this.zb};
327
- p.Fd=function(){Ya("getAdManager","Shaka Player's ad features are currently in BETA and are NOT yet covered by semantic versioning compatibility guarantees. The API may change at any time!");return this.I};p.S=function(){return this.o?this.o.presentationTimeline.S():this.a&&this.a.src?Infinity==this.a.duration:!1};p.Wa=function(){return this.o?this.o.presentationTimeline.Wa():!1};
328
- p.Ke=function(){if(this.o){var a=this.o.variants;return a.length?!a[0].video:!1}return this.a&&this.a.src?this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight:!1};p.ld=function(){if(this.o){var a=this.o.presentationTimeline;return{start:a.nb(),end:a.Ga()}}return this.a&&this.a.src&&(a=this.a.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};p.keySystem=function(){return Pd(this.drmInfo())};p.drmInfo=function(){return this.g?this.g.c:null};
329
- p.Fb=function(){return this.g?this.g.Fb():Infinity};p.Vc=function(){return this.D?this.D.a==jg:!1};p.ze=function(){return this.a?this.A?this.A.b:1:0};p.jf=function(a){0==a?Xa("A trick play rate of 0 is unsupported!"):(this.a.paused&&this.a.play(),this.A.set(a),this.h==hj&&(this.j.playbackRateChanged(a),ph(this.c,1<Math.abs(a))))};p.ie=function(){var a=this.A.kc();this.h==qj&&this.A.set(a);this.h==hj&&(this.A.set(a),this.j.playbackRateChanged(a),ph(this.c,!1))};
330
- p.Uc=function(){if(this.o){for(var a=this.c?this.c.b:null,b=[],c=r(this.o.variants),d=c.next();!d.done;d=c.next())if(d=d.value,Tf(d)){var e=Nf(d);e.active=d==a;b.push(e)}return b}return this.a&&this.a.audioTracks?Array.from(this.a.audioTracks).map(function(f){return Rf(f)}):[]};
331
- p.nc=function(){if(this.o){for(var a=this.c?this.c.c:null,b=[],c=r(this.o.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Of(d);e.active=d==a;b.push(e)}return b}return this.a&&this.a.src&&this.a.textTracks?sj(this).map(function(f){var g=Sf(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]);return g}):[]};
332
- p.Vd=function(a){if(this.o&&this.c){var b=this.o.textStreams.find(function(d){return d.id==a.id});b&&b!=this.c.c&&(mi(this.f.a,b,!1),sh(this.c,b),Bj(this),this.ua=b.language)}else if(this.a&&this.a.src&&this.a.textTracks){b=sj(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,Pf(c)==a.id?c.mode=this.T?"showing":"hidden":c.mode="disabled";Bj(this)}};
333
- p.Wd=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.o&&this.c){this.i.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.o.variants.find(function(e){return e.id==a.id});d&&Tf(d)&&d!=this.c.b&&(li(this.f.a,d,!1),rh(this.c,d,b,c),Cj(this),this.ea=new cg(d),jj(this))}else if(this.a&&this.a.audioTracks){b=Array.from(this.a.audioTracks);b=r(b);for(c=
334
- b.next();!c.done;c=b.next())c=c.value,Pf(c)==a.id&&(c.enabled=!0);Cj(this)}};p.pe=function(){return Dj(this.Uc())};p.He=function(){return Dj(this.nc())};p.oe=function(){return Array.from(Ej(this.Uc()))};p.Ge=function(){return Array.from(Ej(this.nc()))};
335
- p.md=function(a,b){if(this.o&&this.v){this.ea=new dg(a,b||"",0,"");if(!this.i.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.c.b,e=this.ea.create(this.o.variants),f=null;e=r(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;if(f){c=Nf(f);this.Wd(c,!0);return}}Aj(this)}else if(this.a&&this.a.audioTracks){e=Array.from(this.a.audioTracks);
336
- c=R(a);f=d=null;e=r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=Rf(g);R(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?(f.enabled=!0,Cj(this)):d&&(d.enabled=!0,Cj(this))}};
337
- p.nd=function(a,b){if(this.o&&this.v){this.ua=a;this.$b=b||"";var c=Vf(this.o.textStreams,this.ua,this.$b)[0]||null;c&&c!=this.c.c&&(mi(this.f.a,c,!1),this.i.streaming.alwaysStreamText||this.Wc())&&(sh(this.c,c),Bj(this))}else{var d=R(a);(c=this.nc().find(function(e){return R(e.language)==d&&(!b||e.roles.includes(b))}))&&this.Vd(c)}};
338
- p.$e=function(a){if(this.o&&this.v){for(var b=null,c=r(this.o.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.ea=new dg(b.language,"",0,a),Aj(this))}};p.Wc=function(){var a=this.T;return this.G?this.G.h.isTextVisible():this.a&&this.a.src&&this.a.textTracks?sj(this).some(function(b){return"showing"==b.mode}):a};
339
- function sj(a){return Array.from(a.a.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function uj(a){return Array.from(a.a.textTracks).filter(function(b){return"metadata"==b.kind})}
340
- p.ff=function(a){a=!!a;if(this.T!=a){this.T=a;if(this.h==hj)this.G.h.setTextVisibility(a),this.i.streaming.alwaysStreamText||(a?this.c.c||(a=Vf(this.o.textStreams,this.ua,this.$b),0<a.length&&(sh(this.c,a[0]),Bj(this))):oh(this.c));else if(this.a&&this.a.src&&this.a.textTracks){var b=sj(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}lj(this)}};
341
- p.Be=function(){if(!this.S())return null;var a=this.X.f,b=0;if(this.v)b=this.v.g();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.o?new Date(1E3*(this.o.presentationTimeline.f+b)):this.a&&this.a.getStartDate?(a=this.a.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
342
- p.Gd=function(){if(!this.S())return null;if(this.o)return new Date(1E3*this.o.presentationTimeline.f);if(this.a&&this.a.getStartDate){var a=this.a.getStartDate();return isNaN(a.getTime())?null:a}return null};p.jc=function(){if(this.h==hj)return this.G.jc();var a={total:[],audio:[],video:[],text:[]};this.h==qj&&(a.total=Ae(this.a.buffered));return a};
343
- p.getStats=function(){if(this.h!=hj&&this.h!=qj)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};$i(this);var a=this.a;if(a.getVideoPlaybackQuality){a=a.getVideoPlaybackQuality();var b=this.f,c=Number(a.totalVideoFrames);b.K=Number(a.droppedVideoFrames);
344
- b.I=c;this.f.G=Number(a.corruptedVideoFrames)}this.g?(a=this.g,a=a.G?a.G:NaN):a=NaN;this.f.D=a;if(this.h==hj){if(a=this.c.b)this.f.h=(this.A?this.A.b:1)*a.bandwidth;a&&a.video&&(b=this.f,c=a.video.height||NaN,b.M=a.video.width||NaN,b.j=c);this.S()&&(a=this.Gd().valueOf()+1E3*this.ld().end,this.f.m=(Date.now()-a)/1E3);this.o&&this.o.presentationTimeline&&(this.f.A=this.o.presentationTimeline.a);a=this.j.getBandwidthEstimate();this.f.g=a}var d=this.f;a=d.M;b=d.j;c=d.h;var e=d.I,f=d.K,g=d.G,h=d.g,k=
345
- d.f,l=d.v,m=d.c,n=ii(d.b,"playing"),q=ii(d.b,"paused"),t=ii(d.b,"buffering"),v=d.D,z=d.m,x=d.A,A=ji(d.b),D=[];d=r(d.a.a);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:b,streamBandwidth:c,decodedFrames:e,droppedFrames:f,corruptedFrames:g,estimatedBandwidth:h,loadLatency:k,manifestTimeSeconds:l,drmTimeSeconds:m,playTime:n,pauseTime:q,bufferingTime:t,licenseTime:v,liveLatency:z,
346
- maxSegmentDuration:x,stateHistory:A,switchHistory:D}};
347
- p.addTextTrack=function(a,b,c,d,e,f){if(this.h==qj)throw Error("State error!");if(this.h!=hj)throw Error("State error!");var g=this.o.presentationTimeline.getDuration();if(Infinity==g)throw new M(1,4,4033);a={id:this.xd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Tg(0,g,[a]),mimeType:d,codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,
348
- audioSamplingRate:null,closedCaptions:null};this.o.textStreams.push(a);oj(this);return Of(a)};p.pd=function(a,b){this.Ac.width=a;this.Ac.height=b};p.kd=function(){if(this.h==hj){var a=this.c;if(a.F.a)a=!1;else if(a.g)a=!1;else{for(var b=r(a.a.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Jb&&(c.Jb=!1,nh(a,c,.1));a=!0}}else a=!1;return a};
349
- p.ue=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.o};p.ve=function(){return this.bc};
350
- function pi(a){var b=di();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.S()&&d.includes(c.code)&&(c.severity=1,a.kd())};b.textDisplayFactory=function(){return a.dc?new Uh(a.a,a.dc):new Ph(a.a)};return b}p.Zd=function(a){this.dc=a};
351
- function Ti(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"==e.mimeType&&c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=new Ug;h={id:a.xd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:h,mimeType:"application/cea-608",codecs:"",kind:"caption",encrypted:!1,
301
+ function Ki(a,b){if(!id())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",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[og(d)]);return c?""==(b.G||kd()).canPlayType(c)?!1:id()&&(c in ng||og(d)in pg)?nd()&&a.o.streaming.useNativeHlsOnSafari:!0:
302
+ !1}function ti(a,b,c){null==b.G&&(b.G=c.G,a.h.v(b.G,"error",function(){var d=Mi(a);d&&Ni(a,d)}));a.g=b.G;return Promise.resolve()}
303
+ function ui(a,b){var c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return a.m!=Gi&&(a.m=pi),c=a.Ic.map(function(p){return p()}),a.Ic=[],t(n,Promise.all(c),2);case 2:a.dispatchEvent(Di(Oi));b.mimeType=null;b.startTime=null;b.uri=null;b.G&&(a.h.ya(b.G,"loadedmetadata"),a.h.ya(b.G,"playing"),a.h.ya(b.G,"pause"),a.h.ya(b.G,"ended"),a.h.ya(b.G,"ratechange"));a.Ja&&(a.Ja.release(),a.Ja=null);a.jc&&(a.jc.stop(),a.jc=null);if(!a.u){n.B(3);break}return t(n,a.u.stop(),4);case 4:a.u=null,a.lc=null;
304
+ case 3:if(!a.s){n.B(5);break}return t(n,a.s.stop(),5);case 5:if(!a.i){n.B(7);break}return t(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.K){n.B(9);break}return t(n,a.K.destroy(),10);case 10:a.K=null;case 9:if(a.N)a.N.onAssetUnload();if(!b.G||!b.G.src){n.B(11);break}return t(n,new Promise(function(p){return(new Q(p)).W(.1)}),12);case 12:b.G.removeAttribute("src"),b.G.load();case 11:if(!a.l){n.B(13);break}return t(n,a.l.destroy(),14);case 14:a.l=
305
+ null;case 13:a.Fb=null;a.I=null;if(a.A){d=r(a.A.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.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 oi;a.Vc=null;Pi(a);x(n)}})}
306
+ function vi(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=window.muxjs?new te:new ue,d=a.o.textDisplayFactory,e=Kb(d),a.Vc=d,f=Qi(b.G,c,e,function(h,k,l){h=r(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,u=r(m.frames),v=u.next();!v.done;v=u.next())Ri(a,n,p,"ID3",v.value);if(a.N)a.N.onHlsTimedMetadata(m,n)}}),t(g,f.F,2);a.K=f;x(g)})}
307
+ function wi(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.U,a.Fb=d,f=a,t(h,mg(d,e,a.o.manifest.retryParameters,b.mimeType),2);f.lc=h.h;a.u=Kb(a.lc);g=xc(a.o.manifest);c.G&&"AUDIO"===c.G.nodeName&&(g.disableVideo=!0);a.u.configure(g);x(h)})}
308
+ function xi(a,b){var c=b.uri,d=a.U;a.mc=new ch(function(){return a.rd()});dh(a.mc,function(g){Si(a,Ti,g);if(a.N)a.N.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return K(function(h){return h["return"](a.pb(g))})},makeTextStreamsForClosedCaptions:function(g){return Ui(a,g)},onTimelineRegionAdded:function(g){var h=a.mc;a:{var k=r(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=
309
+ 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 Ni(a,g)}},f=Date.now()/1E3;return new mc(function(){var g,h,k,l;return K(function(m){if(1==m.g)return g=a,t(m,a.u.start(c,e),2);g.A=m.h;h=Di(Vi);a.dispatchEvent(h);if(0==a.A.variants.length)throw new O(2,4,4036);Wi(a.A);k=Date.now()/1E3;l=k-f;a.j.F=l;x(m)})}(),function(){return a.u.stop()})}
310
+ function yi(a,b){var c,d;return K(function(e){if(1==e.g)return c=Date.now()/1E3,d=!0,a.l=Xi(a,{wb:a.U,onError:function(f){Ni(a,f)},zc:function(f){Yi(a,f)},onExpirationUpdated:function(f,g){Zi(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==$i&&d&&(d=!1,a.j.i=Date.now()/1E3-c)}}),a.l.configure(a.o.drm),t(e,yd(a.l,a.A.variants,a.A.offlineSessionIds),2);if(3!=e.g)return t(e,a.l.Ib(b.G),3);a.pb(a.A);x(e)})}
311
+ function zi(a,b,c){var d,e,f,g,h,k,l,m,n,p,u,v;return K(function(z){switch(z.g){case 1:b.startTime=c.startTime;d=b.G;e=b.uri;a.Fb=e;a.F=new Wg({uc:function(){return b.G.playbackRate},sc:function(){return b.G.defaultPlaybackRate},wd:function(w){b.G.playbackRate=w},Ud:function(w){b.G.currentTime+=w}});f=function(){return aj(a)};g=function(){return bj(a)};a.h.v(d,"playing",f);a.h.v(d,"pause",f);a.h.v(d,"ended",f);a.h.v(d,"ratechange",g);h=a.o.abrFactory;a.s&&a.Tc==h||(a.Tc=h,a.s=Kb(h),"function"!=typeof a.s.playbackRateChanged&&
312
+ (Db("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.s.playbackRateChanged=function(){}),a.s.configure(a.o.abr));a.ka=new dg(a.o.preferredAudioLanguage,a.o.preferredVariantRole,a.o.preferredAudioChannelCount);a.Ba=a.o.preferredTextLanguage;a.Gb=a.o.preferredTextRole;cj(a.A.presentationTimeline,a.o.playRangeStart,a.o.playRangeEnd);a.s.init(function(w,A,D){A=void 0===A?!1:A;D=void 0===D?0:D;a.i&&w!=a.i.h&&(mi(a.j.g,w,!0),sh(a.i,w,A,D),dj(a))});a.C=ej(a,b.startTime);a.Ja=
313
+ fj(a);k=Math.max(a.A.minBufferTime,a.o.streaming.rebufferingGoal);gj(a,k);Ef(a.A,a.o.preferredAudioChannelCount);a.i=hj(a);a.i.configure(a.o.streaming);a.m=ij;a.dispatchEvent(Di(jj));l=null;if(m=a.vc().find(function(w){return w.active})){z.B(2);break}l=kj(a)?a.s.chooseVariant():null;mi(a.j.g,l,!0);sh(a.i,l,!1,0);if(!a.o.streaming.startAtSegmentBoundary){z.B(3);break}n=a.C.l();return t(z,lj(l,n),4);case 4:p=z.h,a.C.u(p);case 3:dj(a);case 2:return u=a.Qb().find(function(w){return w.active}),u||((v=
314
+ Vf(a.A.textStreams,a.Ba,a.Gb)[0]||null)&&ni(a.j.g,v,!0),l&&(v?(l.audio&&mj(a,l.audio,v)&&(a.Z=!0),a.Z&&a.K.m.setTextVisibility(!0),nj(a)):a.Z=!1),v&&(a.o.streaming.alwaysStreamText||a.cd())&&th(a.i,v)),t(z,a.i.start(),5);case 5:a.o.abr.enabled&&(a.s.enable(),oj(a)),a.pb(a.A),pj(a),kj(a),a.A.variants.some(function(w){return w.primary}),a.h.pa(d,"loadedmetadata",function(){a.j.j=Date.now()/1E3-c.yd}),x(z)}})}
315
+ function Ai(a,b,c){var d,e,f,g;return K(function(h){return 1==h.g?(d=Nb,e=Date.now()/1E3,f=!0,a.l=Xi(a,{wb:a.U,onError:function(k){Ni(a,k)},zc:function(k){Yi(a,k)},onExpirationUpdated:function(k,l){Zi(a,k,l)},onEvent:function(k){a.dispatchEvent(k);k.type==$i&&f&&(f=!1,a.j.i=Date.now()/1E3-e)}}),a.l.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]:
316
+ "video/mp4",codecs:c.mimeType?hd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ka,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0},t(h,yd(a.l,[g],[]),2)):t(h,a.l.Ib(b.G),0)})}
317
+ function Bi(a,b,c){function d(){return aj(a)}b.uri=c.uri;b.startTime=c.startTime;a.Fb=b.uri;a.C=new Mg(b.G);null!=b.startTime&&a.C.u(b.startTime);a.F=new Wg({uc:function(){return b.G.playbackRate},sc:function(){return b.G.defaultPlaybackRate},wd:function(g){b.G.playbackRate=g},Ud:function(g){b.G.currentTime+=g}});gj(a,a.o.streaming.rebufferingGoal);a.h.v(b.G,"playing",d);a.h.v(b.G,"pause",d);a.h.v(b.G,"ended",d);a.h.v(b.G,"ratechange",function(){return bj(a)});"none"!=a.g.preload&&a.h.pa(a.g,"loadedmetadata",
318
+ function(){a.j.j=Date.now()/1E3-c.yd});a.g.audioTracks&&(a.h.v(a.g.audioTracks,"addtrack",function(){return pj(a)}),a.h.v(a.g.audioTracks,"removetrack",function(){return pj(a)}),a.h.v(a.g.audioTracks,"change",function(){return pj(a)}));a.g.textTracks&&(a.h.v(a.g.textTracks,"addtrack",function(g){pj(a);qj(a,g)}),a.h.v(a.g.textTracks,"removetrack",function(){return pj(a)}),a.h.v(a.g.textTracks,"change",function(){return pj(a)}));b.G.src=b.uri;(ld()||md("Web0S"))&&b.G.load();a.m=rj;a.dispatchEvent(Di(jj));
319
+ var e=new Ob;Ag(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){e.resolve()});var f=!1;a.Ic.push(function(){f=!0});Ag(a.g,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){var g;return K(function(h){if(1==h.g){if(f)return h["return"]();sj(a);g=tj(a);return g.find(function(k){return"disabled"!=k.mode})?h.B(2):t(h,new Promise(function(k){a.h.pa(a.g.textTracks,"change",k);(new Q(k)).W(1)}),2)}if(f)return h["return"]();uj(a);x(h)})});a.g.error?e.reject(Mi(a)):"none"==a.g.preload&&(Sa('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.'),
320
+ e.resolve());a.h.pa(a.g,"error",function(){e.reject(Mi(a))});return new mc(e,function(){e.reject(new O(2,7,7001));return Promise.resolve()})}function sj(a){var b=a.o.preferredAudioLanguage;if(""!=b){a.sd(b);var c=a.o.preferredVariantRole;""!=c&&a.sd(b,c)}}function uj(a){var b=a.o.preferredTextLanguage;if(""!=b){a.td(b);var c=a.o.preferredTextRole;""!=c&&a.td(b,c)}}
321
+ function qj(a,b){var c=b.track;"metadata"==c.kind&&(c.mode="hidden",a.h.v(c,"cuechange",function(){if(c.activeCues)for(var d=r(c.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Ri(a,e.startTime,e.endTime,e.type,e.value),a.N)a.N.onCueMetadataChange(e.value)}),(new Q(function(){var d=vj(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).ac().W(.5))}
322
+ function Ri(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Di(wj,b))}function Wi(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 Xi(a,b){return new rd(b,a.o.drm.updateExpirationTime)}function ri(a){return new Fc(function(b,c){a.s&&a.s.segmentDownloaded(b,c)})}
323
+ function ej(a,b){return new Ng(a.g,a.A,a.o.streaming,b,function(){a.Ja&&Zg(a.Ja,!0);if(a.i)for(var c=a.i,d=c.D.tc(),e=c.o.smallGapLimit,f=r(c.g.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.g.get(g);h.aa=null;var k=c.D.R;"text"==g?(k=k.i,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=jf(k,g),k=we(k,d,e));k||(null!=kf(c.D.R,g)&&wh(c,h),h.qa&&(h.qa.abort(),h.qa=null),"text"===g&&c.D.R.C.h())}a.I&&xj(a)},function(c){return a.dispatchEvent(c)})}
324
+ function fj(a){var b=new eh(a.mc);fh(b,function(d){Si(a,yj,d)},function(d){Si(a,zj,d)},function(d,e){e||(Si(a,yj,d),Si(a,zj,d))});var c=new Yg(a.g);c.g.add(b);return c}function gj(a,b){a.I=new hg;a.I.g=jg;kg(a.I,b,Math.min(.5,b/2));Pi(a);a.jc=(new Q(function(){xj(a)})).xa(.25)}
325
+ function xj(a){switch(a.m){case rj:if(a.g.ended)var b=!0;else{var c=ve(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case ij:a:if(a.g.ended||gf(a.K))b=!0;else{if(a.A.presentationTimeline.Y()){c=a.A.presentationTimeline.Ta();var d=ve(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=xe(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?ig:jg;c.g=d;b!=d&&Pi(a)}function Qi(a,b,c,d){return new $e(a,b,c,d)}
326
+ function hj(a){return new hh(a.A,{tc:function(){return a.C.l()},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},R:a.K,wb:a.U,onError:function(b){return Ni(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Ue:function(){a.u&&a.u.update&&a.u.update()},md:function(){a.C&&a.C.F();xj(a)}})}
327
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ci(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Db("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);var c=gi(this.o,a,qi(this));Aj(this);return c};
328
+ function Aj(a){if(a.u){var b=xc(a.o.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.u.configure(b)}a.l&&a.l.configure(a.o.drm);if(a.i){a.i.configure(a.o.streaming);try{a.pb(a.A)}catch(f){Ni(a,f)}a.s&&kj(a);b=a.i.h;!b||b.allowedByApplication&&b.allowedByKeySystem||Bj(a)}if(a.K&&(b=a.o.textDisplayFactory,a.Vc!=b)){var c=Kb(b),d=a.K,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.i&&(d.i.i=c);a.Vc=b;a.i&&(b=a.i,(c=b.g.get("text"))&&rh(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.o.abr),
329
+ a.o.abr.enabled?a.s.enable():a.s.disable(),oj(a));a.I&&(b=a.o.streaming.rebufferingGoal,a.A&&(b=Math.max(b,a.A.minBufferTime)),kg(a.I,b,Math.min(.5,b/2)))}q.getConfiguration=function(){var a=qi(this);gi(a,this.o,qi(this));return a};q.cf=function(){for(var a in this.o)delete this.o[a];gi(this.o,qi(this),qi(this));Aj(this)};q.xe=function(){return this.m};q.Be=function(){return this.g};q.Nb=function(){return this.U};q.ad=function(){return this.Fb};
330
+ q.Kd=function(){Ta("getAdManager","Shaka Player's ad features are currently in BETA and are NOT yet covered by semantic versioning compatibility guarantees. The API may change at any time!");return this.N};q.Y=function(){return this.A?this.A.presentationTimeline.Y():this.g&&this.g.src?Infinity==this.g.duration:!1};q.bb=function(){return this.A?this.A.presentationTimeline.bb():!1};
331
+ q.Oe=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};q.rd=function(){if(this.A){var a=this.A.presentationTimeline;return{start:a.tb(),end:a.Ma()}}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 Nd(this.drmInfo())};q.drmInfo=function(){return this.l?this.l.i:null};
332
+ q.Mb=function(){return this.l?this.l.Mb():Infinity};q.bd=function(){return this.I?this.I.g==jg:!1};q.De=function(){return this.g?this.F?this.F.i:1:0};q.nf=function(a){0==a?Sa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.F.set(a),this.m==ij&&(this.s.playbackRateChanged(a),qh(this.i,1<Math.abs(a))))};q.me=function(){var a=this.F.sc();this.m==rj&&this.F.set(a);this.m==ij&&(this.F.set(a),this.s.playbackRateChanged(a),qh(this.i,!1))};
333
+ q.vc=function(){if(this.A){for(var a=this.i?this.i.h:null,b=[],c=0,d=r(this.A.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Tf(e)){var f=Nf(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 Rf(g)}):[]};
334
+ q.Qb=function(){if(this.A){for(var a=this.i?this.i.i:null,b=[],c=r(this.A.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Of(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?tj(this).map(function(f){var g=Sf(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]);return g}):[]};
335
+ q.$d=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&&(ni(this.j.g,b,!1),th(this.i,b),Cj(this),this.Ba=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=tj(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,Pf(c)==a.id?c.mode=this.Z?"showing":"hidden":c.mode="disabled";Cj(this)}};
336
+ q.ae=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&&Sa("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&&Tf(d)&&(d==this.i.h?b&&sh(this.i,d,b,c,!0):(mi(this.j.g,d,!1),sh(this.i,d,b,c),Dj(this),this.ka=new cg(d),kj(this)))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);
337
+ b=c.find(function(e){return e.enabled});c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,Pf(d)==a.id&&(d.enabled=!0,d.id!==b.id&&(b.enabled=!1));Dj(this)}};q.te=function(){return Ej(this.vc())};q.Le=function(){return Ej(this.Qb())};q.se=function(){return Array.from(Fj(this.vc()))};q.Ke=function(){return Array.from(Fj(this.Qb()))};
338
+ q.sd=function(a,b){if(this.A&&this.C){this.ka=new dg(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.ka.create(this.A.variants),f=null;e=r(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;if(f){c=Nf(f);this.ae(c,!0);return}}Bj(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
339
+ c=xf(a);f=d=null;e=r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=Rf(g);xf(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?(f.enabled=!0,Dj(this)):d&&(d.enabled=!0,Dj(this))}};
340
+ q.td=function(a,b){if(this.A&&this.C){this.Ba=a;this.Gb=b||"";var c=Vf(this.A.textStreams,this.Ba,this.Gb)[0]||null;c&&c!=this.i.i&&(ni(this.j.g,c,!1),this.o.streaming.alwaysStreamText||this.cd())&&(th(this.i,c),Cj(this))}else{var d=xf(a);(c=this.Qb().find(function(e){return xf(e.language)==d&&(!b||e.roles.includes(b))}))&&this.$d(c)}};
341
+ q.df=function(a){if(this.A&&this.C){for(var b=null,c=r(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.ka=new dg(b.language,"",0,a),Bj(this))}};q.cd=function(){var a=this.Z;return this.K?this.K.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?tj(this).some(function(b){return"showing"==b.mode}):a};
342
+ function tj(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function vj(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}
343
+ q.kf=function(a){a=!!a;if(this.Z!=a){this.Z=a;if(this.m==ij)this.K.m.setTextVisibility(a),this.o.streaming.alwaysStreamText||(a?this.i.i||(a=Vf(this.A.textStreams,this.Ba,this.Gb),0<a.length&&(th(this.i,a[0]),Cj(this))):ph(this.i));else if(this.g&&this.g.src&&this.g.textTracks){var b=tj(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}nj(this)}};
344
+ q.Fe=function(){if(!this.Y())return null;var a=this.ca.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};
345
+ q.Ld=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.rc=function(){if(this.m==ij)return this.K.rc();var a={total:[],audio:[],video:[],text:[]};this.m==rj&&(a.total=ye(this.g.buffered));return a};
346
+ q.getStats=function(){if(this.m!=ij&&this.m!=rj)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};aj(this);var a=this.g;if(a.getVideoPlaybackQuality){a=a.getVideoPlaybackQuality();var b=this.j,c=Number(a.totalVideoFrames);b.P=Number(a.droppedVideoFrames);
347
+ b.N=c;this.j.K=Number(a.corruptedVideoFrames)}this.l?(a=this.l,a=a.I?a.I:NaN):a=NaN;this.j.l=a;if(this.m==ij){if(a=this.i.h)this.j.s=(this.F?this.F.i:1)*a.bandwidth;a&&a.video&&(b=this.j,c=a.video.height||NaN,b.S=a.video.width||NaN,b.u=c);this.Y()&&(a=this.Ld().valueOf()+1E3*this.rd().end,this.j.C=(Date.now()-a)/1E3);this.A&&this.A.presentationTimeline&&(this.j.I=this.A.presentationTimeline.g);a=this.s.getBandwidthEstimate();this.j.m=a}var d=this.j;a=d.S;b=d.u;c=d.s;var e=d.N,f=d.P,g=d.K,h=d.m,k=
348
+ d.j,l=d.F,m=d.i,n=ji(d.h,"playing"),p=ji(d.h,"paused"),u=ji(d.h,"buffering"),v=d.l,z=d.C,w=d.I,A=ki(d.h),D=[];d=r(d.g.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:b,streamBandwidth:c,decodedFrames:e,droppedFrames:f,corruptedFrames:g,estimatedBandwidth:h,loadLatency:k,manifestTimeSeconds:l,drmTimeSeconds:m,playTime:n,pauseTime:p,bufferingTime:u,licenseTime:v,liveLatency:z,
349
+ maxSegmentDuration:w,stateHistory:A,switchHistory:D}};
350
+ q.addTextTrack=function(a,b,c,d,e,f){if(this.m==rj)throw Error("State error!");if(this.m!=ij)throw Error("State error!");var g=this.A.presentationTimeline.getDuration();if(Infinity==g)throw new O(1,4,4033);a={id:this.Md++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ug(0,g,[a]),mimeType:d,codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,
351
+ audioSamplingRate:null,closedCaptions:null};this.A.textStreams.push(a);pj(this);return Of(a)};q.vd=function(a,b){this.Yc.width=a;this.Yc.height=b};q.qd=function(){if(this.m==ij){var a=this.i;if(a.J.g)a=!1;else if(a.l)a=!1;else{for(var b=r(a.g.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Rb&&(c.Rb=!1,oh(a,c,.1));a=!0}}else a=!1;return a};
352
+ q.ye=function(){Sa("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};q.ze=function(){return this.lc};
353
+ function qi(a){var b=ei();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.Y()&&d.includes(c.code)&&(c.severity=1,a.qd())};b.textDisplayFactory=function(){return a.ic?new Vh(a.g,a.ic):new Qh(a.g)};return b}q.de=function(a){this.ic=a};
354
+ function Ui(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"==e.mimeType&&c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=new Vg;h={id:a.Md++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:h,mimeType:"application/cea-608",codecs:"",kind:"caption",encrypted:!1,
352
355
  drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,channelsCount:null,audioSamplingRate:null,closedCaptions:null};b.textStreams.push(h);c.add(g)}}
353
- p.jb=function(a){Lf(this.g,this.c?this.c.b:null,a);if(!a.variants.some(Tf))throw new M(2,4,4032);for(var b=this.i.restrictions,c=this.Ac,d=!1,e=r(a.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.allowedByApplication;f.allowedByApplication=Kf(f,b,c);g!=f.allowedByApplication&&(d=!0)}d&&this.c&&oj(this);if((b=this.g?this.g.c:null)&&this.g.h)for(c=r(a.variants),d=c.next();!d.done;d=c.next())for(d=d.value,d=r((d.video?d.video.drmInfos:[]).concat(d.audio?d.audio.drmInfos:[])),e=d.next();!e.done;e=
354
- d.next())if(e=e.value,e.keySystem==b.keySystem)for(e=r(e.initData||[]),f=e.next();!f.done;f=e.next())f=f.value,Kd(this.g,f.initDataType,f.initData);Fj(this,a)};
355
- function mj(a,b){var c,d,e,f,g;return J(function(h){if(1==h.a)return c=a.audio,d=a.video,e=function(k,l){var m,n;return J(function(q){if(1==q.a)return k?u(q,k.createSegmentIndex(),2):q["return"](null);m=k.segmentIndex[Symbol.iterator]().seek(l);if(!m)return q["return"](null);n=m.startTime;return q["return"](n)})},u(h,e(c,b),2);if(3!=h.a)return f=h.b,u(h,e(d,b),3);g=h.b;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
356
- function Oi(a){var b=a.Vc();if(a.f&&a.D&&a.v){var c=a.A;c.f=b;Wg(c);$i(a)}a.dispatchEvent(Ci(Gj,{buffering:b}))}function aj(a){var b=a.a.playbackRate;0!=b&&(a.A&&a.A.set(b),b=Ci(Hj),a.dispatchEvent(b))}function $i(a){if(a.f&&a.D){var b=a.f.b;a.D.a==jg?hi(b,"buffering"):a.a.paused?hi(b,"paused"):a.a.ended?hi(b,"ended"):hi(b,"playing")}}
357
- function jj(a){try{Fj(a,a.o)}catch(c){return Mi(a,c),!1}var b=a.o.variants.filter(function(c){return Tf(c)});b=a.ea.create(b);a.j.setVariants(Array.from(b.values()));return!0}function Aj(a){var b;if(b=jj(a)?a.j.chooseVariant():null){if(b==a.c.b)return;li(a.f.a,b,!0);rh(a.c,b,!0,0);Cj(a)}cj(a)}function kj(a,b,c){a=R(a.i.preferredTextLanguage);b=R(b.language);c=R(c.language);return xf(c,a)&&!xf(b,c)}function cj(a){var b=Ci(Ij);Jj(a,b)}function oj(a){var b=Ci(Kj);Jj(a,b)}
358
- function Cj(a){var b=Ci(Lj);Jj(a,b)}function Bj(a){var b=Ci(Mj);Jj(a,b)}function lj(a){var b=Ci(Nj);Jj(a,b)}function nj(a){var b=Ci(Oj,{Sf:a.i.abr.enabled});Jj(a,b)}function Mi(a,b){if(a.h!=Fi){var c=Ci(Pj,{detail:b});a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Ri(a,b,c){a.dispatchEvent(Ci(b,{detail:{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement}}))}
359
- function Li(a){if(!a.a.error)return null;var b=a.a.error.code;if(1==b)return null;var c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new M(2,3,3016,b,c,a.a.error.message)}
360
- function Xi(a,b){if(a.c){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.o.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Qj.includes(l)}h!=f.allowedByKeySystem&&
361
- (e=!0)}}}e&&jj(a);(d=a.c.b)&&!d.allowedByKeySystem&&Aj(a);e&&oj(a)}}function Yi(a,b,c){if(a.m&&a.m.onExpirationUpdated)a.m.onExpirationUpdated(b,c);b=Ci(Rj);a.dispatchEvent(b)}function bj(a,b,c){0<b&&(a.S()||a.Yd(b));b=a.getDuration();c<b&&(a.S()||a.Aa(c))}
362
- function Fj(a,b){var c=a.g?dd(a.g.T):{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=r(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=r(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=r(n.keyIds);for(var q=n.next();!q.done;q=n.next()){q=q.value;var t=c[d?"00":q];t?Qj.includes(t)&&h.add(t):g.add(q)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
363
- missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new M(2,4,4012,c);}function Jj(a,b){J(function(c){if(1==c.a)return u(c,Promise.resolve(),2);a.h!=Fi&&a.dispatchEvent(b);w(c)})}function Ej(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(R(c.language)):b.add("und");return b}
364
- function Dj(a){var b=new Map;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=c.value;c="und";var e=[];d.language&&(c=R(d.language));"variant"==d.type?e=d.audioRoles:e=d.roles;e&&e.length||(e=[""]);b.has(c)||b.set(c,new Set);d=r(e);for(e=d.next();!e.done;e=d.next())e=e.value,b.get(c).add(e)}var f=[];b.forEach(function(g,h){for(var k=r(g),l=k.next();!l.done;l=k.next())f.push({language:h,role:l.value})});return f}function Gi(){return new M(2,7,7E3)}
365
- function Bi(a,b,c,d,e,f){return d==a&&e.B==f.B&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Jh(){return{B:null,mimeType:null,startTime:null,sd:NaN,uri:null}}function Hi(a){return new Promise(function(b,c){a.Xa=function(){return c(Gi())};a.qc=function(){return b()};a.onError=function(d){return c(d)};a.sc=function(){return c(Gi())}})}K("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.Zd;V.prototype.getManifestParserFactory=V.prototype.ve;V.prototype.getManifest=V.prototype.ue;
366
- V.prototype.retryStreaming=V.prototype.kd;V.prototype.setMaxHardwareResolution=V.prototype.pd;V.prototype.addTextTrack=V.prototype.addTextTrack;V.prototype.getStats=V.prototype.getStats;V.prototype.getBufferedInfo=V.prototype.jc;V.prototype.getPresentationStartTimeAsDate=V.prototype.Gd;V.prototype.getPlayheadTimeAsDate=V.prototype.Be;V.prototype.setTextTrackVisibility=V.prototype.ff;V.prototype.isTextTrackVisible=V.prototype.Wc;V.prototype.selectVariantsByLabel=V.prototype.$e;
367
- V.prototype.selectTextLanguage=V.prototype.nd;V.prototype.selectAudioLanguage=V.prototype.md;V.prototype.getTextLanguages=V.prototype.Ge;V.prototype.getAudioLanguages=V.prototype.oe;V.prototype.getTextLanguagesAndRoles=V.prototype.He;V.prototype.getAudioLanguagesAndRoles=V.prototype.pe;V.prototype.selectVariantTrack=V.prototype.Wd;V.prototype.selectTextTrack=V.prototype.Vd;V.prototype.getTextTracks=V.prototype.nc;V.prototype.getVariantTracks=V.prototype.Uc;V.prototype.cancelTrickPlay=V.prototype.ie;
368
- V.prototype.trickPlay=V.prototype.jf;V.prototype.getPlaybackRate=V.prototype.ze;V.prototype.isBuffering=V.prototype.Vc;V.prototype.getExpiration=V.prototype.Fb;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.seekRange=V.prototype.ld;V.prototype.isAudioOnly=V.prototype.Ke;V.prototype.isInProgress=V.prototype.Wa;V.prototype.isLive=V.prototype.S;V.prototype.getAdManager=V.prototype.Fd;V.prototype.getAssetUri=V.prototype.Tc;
369
- V.prototype.getNetworkingEngine=V.prototype.Gb;V.prototype.getMediaElement=V.prototype.xe;V.prototype.getLoadMode=V.prototype.te;V.prototype.resetConfiguration=V.prototype.Ze;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;V.prototype.load=V.prototype.load;V.prototype.unload=V.prototype.vd;V.prototype.detach=V.prototype.detach;V.prototype.attach=V.prototype.Ab;
370
- V.probeSupport=function(){var a,b,c,d,e,f;return J(function(g){if(1==g.a)return u(g,$d(),2);a=g.b;var h={};if(jd()){for(var k in ng)h[k]=!0;for(var l in pg)h[l]=!0}k={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};l=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,h[m]=jd()?!!ng[m]:kd(m);for(var n in k)h[n]=jd()?!!pg[n]:kd(k[n]);b=h;h={};n=r('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
371
- for(k=n.next();!k.done;k=n.next())k=k.value,h[k]=jd()?We(k)?!0:MediaSource.isTypeSupported(k)||jc(k):kd(k),l=k.split(";")[0],h[l]=h[l]||h[k];c=h;d={manifest:b,media:c,drm:a};e=Sj;for(f in e)d[f]=e[f]();return g["return"](d)})};
372
- V.isBrowserSupported=function(){if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach))return!1;var a=pd();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:jd()?!0:kd("application/x-mpegurl")};V.setAdManagerFactory=function(a){ri=a};V.registerSupportPlugin=function(a,b){Sj[a]=b};V.prototype.destroy=V.prototype.destroy;
373
- var Oj="abrstatuschanged",Ij="adaptation",Gj="buffering",Zi="drmsessionupdate",Gh="emsg",Pj="error",Rj="expirationupdated",Ki="loaded",Ii="loading",Ui="manifestparsed",vj="metadata",Di="onstatechange",Ei="onstateidle",Hj="ratechange",ij="streaming",Mj="textchanged",Nj="texttrackvisibility",Si="timelineregionadded",xj="timelineregionenter",yj="timelineregionexit",Kj="trackschanged",Ni="unloading",Lj="variantchanged",Tj={rf:Oj,sf:Ij,tf:Gj,uf:Zi,wf:Gh,Error:Pj,xf:Rj,zf:"largegap",Af:Ki,Bf:Ii,Cf:Ui,Metadata:vj,
374
- Df:Di,Ef:Ei,Ff:Hj,Gf:ij,Hf:Mj,If:Nj,Jf:Si,Kf:xj,Lf:yj,Mf:Kj,Nf:Ni,Of:Lj},Fi=0,oi=1,hj=2,qj=3;V.LoadMode={DESTROYED:Fi,NOT_LOADED:oi,MEDIA_SOURCE:hj,SRC_EQUALS:qj};V.version="v3.0.11";var Uj=["3","0"];Ib=new function(a){this.a=a;this.c=Jb;this.b=Kb}(new Gb(Number(Uj[0]),Number(Uj[1])));var Qj=["output-restricted","internal-error"],Sj={},ri=null;function Vj(){this.a=[];this.f=this.b=this.c=0};function W(a,b){var c=this;this.c=a;this.a=b;this.f=!1;this.g=this.a.getVolume();this.b=new Vc;this.b.l(this.a,google.ima.AdEvent.Type.PAUSED,function(){c.f=!0});this.b.l(this.a,google.ima.AdEvent.Type.RESUMED,function(){c.f=!1})}p=W.prototype;p.getDuration=function(){return this.c.getDuration()};p.getMinSuggestedDuration=function(){return this.c.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.a.getRemainingTime()};p.isPaused=function(){return this.f};
375
- p.isSkippable=function(){return 0<=this.c.getSkipTimeOffset()};p.getTimeUntilSkippable=function(){var a=this.c.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.a.getAdSkippableState()};p.skip=function(){return this.a.skip()};p.pause=function(){return this.a.pause()};p.play=function(){return this.a.resume()};p.getVolume=function(){return this.a.getVolume()};p.setVolume=function(a){return this.a.setVolume(a)};p.isMuted=function(){return 0==this.a.getVolume()};
376
- p.resize=function(a,b){this.a.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};p.setMuted=function(a){a?(this.g=this.getVolume(),this.setVolume(0)):this.setVolume(this.g)};p.getSequenceLength=function(){var a=this.c.getAdPodInfo();return null==a?1:a.getTotalAds()};p.getPositionInSequence=function(){var a=this.c.getAdPodInfo();return null==a?1:a.getAdPosition()};p.release=function(){this.a=this.c=null};K("shaka.ads.ClientSideAd",W);
356
+ q.pb=function(a){Lf(this.l,this.i?this.i.h:null,a);if(!a.variants.some(Tf))throw new O(2,4,4032);for(var b=this.o.restrictions,c=this.Yc,d=!1,e=r(a.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.allowedByApplication;f.allowedByApplication=Kf(f,b,c);g!=f.allowedByApplication&&(d=!0)}d&&this.i&&pj(this);if((b=this.l?this.l.i:null)&&this.l.m)for(c=r(a.variants),d=c.next();!d.done;d=c.next())for(d=d.value,d=r((d.video?d.video.drmInfos:[]).concat(d.audio?d.audio.drmInfos:[])),e=d.next();!e.done;e=
357
+ d.next())if(e=e.value,e.keySystem==b.keySystem)for(e=r(e.initData||[]),f=e.next();!f.done;f=e.next())f=f.value,Id(this.l,f.initDataType,f.initData);Gj(this,a)};
358
+ function lj(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?t(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)})},t(h,e(c,b),2);if(3!=h.g)return f=h.h,t(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)})}
359
+ function Pi(a){var b=a.bd();if(a.j&&a.I&&a.C){var c=a.F;c.j=b;Xg(c);aj(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Di(Hj,b))}function bj(a){var b=a.g.playbackRate;0!=b&&(a.F&&a.F.set(b),b=Di(Ij),a.dispatchEvent(b))}function aj(a){if(a.j&&a.I){var b=a.j.h;a.I.g==jg?ii(b,"buffering"):a.g.paused?ii(b,"paused"):a.g.ended?ii(b,"ended"):ii(b,"playing")}}
360
+ function kj(a){try{Gj(a,a.A)}catch(c){return Ni(a,c),!1}var b=a.A.variants.filter(function(c){return Tf(c)});b=a.ka.create(b);a.s.setVariants(Array.from(b.values()));return!0}function Bj(a){var b;if(b=kj(a)?a.s.chooseVariant():null){if(b==a.i.h)return;mi(a.j.g,b,!0);sh(a.i,b,!0,0);Dj(a)}dj(a)}function mj(a,b,c){a=xf(a.o.preferredTextLanguage);b=xf(b.language);c=xf(c.language);return wf(c,a)&&!wf(b,c)}function dj(a){var b=Di(Jj);Kj(a,b)}function pj(a){var b=Di(Lj);Kj(a,b)}
361
+ function Dj(a){var b=Di(Mj);Kj(a,b)}function Cj(a){var b=Di(Nj);Kj(a,b)}function nj(a){var b=Di(Oj);Kj(a,b)}function oj(a){var b=(new Map).set("newStatus",a.o.abr.enabled);Kj(a,Di(Pj,b))}function Ni(a,b){if(a.m!=Gi){var c=Di(Qj,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Si(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(Di(b,c))}
362
+ function Mi(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new O(2,3,3016,b,c,a.g.error.message)}
363
+ function Yi(a,b){if(a.i){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.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=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Rj.includes(l)}h!=f.allowedByKeySystem&&
364
+ (e=!0)}}}e&&kj(a);(d=a.i.h)&&!d.allowedByKeySystem&&Bj(a);e&&pj(a)}}function Zi(a,b,c){if(a.u&&a.u.onExpirationUpdated)a.u.onExpirationUpdated(b,c);b=Di(Sj);a.dispatchEvent(b)}function cj(a,b,c){0<b&&(a.Y()||a.ce(b));b=a.getDuration();c<b&&(a.Y()||a.Ga(c))}
365
+ function Gj(a,b){var c=a.l?bd(a.l.Z):{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=r(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=r(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=r(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var u=c[d?"00":p];u?Rj.includes(u)&&h.add(u):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
366
+ missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new O(2,4,4012,c);}function Kj(a,b){K(function(c){if(1==c.g)return t(c,Promise.resolve(),2);a.m!=Gi&&a.dispatchEvent(b);x(c)})}function Fj(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(xf(c.language)):b.add("und");return b}
367
+ function Ej(a){var b=new Map;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=c.value;c="und";var e=[];d.language&&(c=xf(d.language));"variant"==d.type?e=d.audioRoles:e=d.roles;e&&e.length||(e=[""]);b.has(c)||b.set(c,new Set);d=r(e);for(e=d.next();!e.done;e=d.next())e=e.value,b.get(c).add(e)}var f=[];b.forEach(function(g,h){for(var k=r(g),l=k.next();!l.done;l=k.next())f.push({language:h,role:l.value})});return f}function Hi(){return new O(2,7,7E3)}
368
+ function Ci(a,b,c,d,e,f){return d==a&&e.G==f.G&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Kh(){return{G:null,mimeType:null,startTime:null,yd:NaN,uri:null}}function Ii(a){return new Promise(function(b,c){a.cb=function(){return c(Hi())};a.yc=function(){return b()};a.onError=function(d){return c(d)};a.Ac=function(){return c(Hi())}})}L("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.de;V.prototype.getManifestParserFactory=V.prototype.ze;V.prototype.getManifest=V.prototype.ye;
369
+ V.prototype.retryStreaming=V.prototype.qd;V.prototype.setMaxHardwareResolution=V.prototype.vd;V.prototype.addTextTrack=V.prototype.addTextTrack;V.prototype.getStats=V.prototype.getStats;V.prototype.getBufferedInfo=V.prototype.rc;V.prototype.getPresentationStartTimeAsDate=V.prototype.Ld;V.prototype.getPlayheadTimeAsDate=V.prototype.Fe;V.prototype.setTextTrackVisibility=V.prototype.kf;V.prototype.isTextTrackVisible=V.prototype.cd;V.prototype.selectVariantsByLabel=V.prototype.df;
370
+ V.prototype.selectTextLanguage=V.prototype.td;V.prototype.selectAudioLanguage=V.prototype.sd;V.prototype.getTextLanguages=V.prototype.Ke;V.prototype.getAudioLanguages=V.prototype.se;V.prototype.getTextLanguagesAndRoles=V.prototype.Le;V.prototype.getAudioLanguagesAndRoles=V.prototype.te;V.prototype.selectVariantTrack=V.prototype.ae;V.prototype.selectTextTrack=V.prototype.$d;V.prototype.getTextTracks=V.prototype.Qb;V.prototype.getVariantTracks=V.prototype.vc;V.prototype.cancelTrickPlay=V.prototype.me;
371
+ V.prototype.trickPlay=V.prototype.nf;V.prototype.getPlaybackRate=V.prototype.De;V.prototype.isBuffering=V.prototype.bd;V.prototype.getExpiration=V.prototype.Mb;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.seekRange=V.prototype.rd;V.prototype.isAudioOnly=V.prototype.Oe;V.prototype.isInProgress=V.prototype.bb;V.prototype.isLive=V.prototype.Y;V.prototype.getAdManager=V.prototype.Kd;V.prototype.getAssetUri=V.prototype.ad;
372
+ V.prototype.getNetworkingEngine=V.prototype.Nb;V.prototype.getMediaElement=V.prototype.Be;V.prototype.getLoadMode=V.prototype.xe;V.prototype.resetConfiguration=V.prototype.cf;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;V.prototype.load=V.prototype.load;V.prototype.unload=V.prototype.Cd;V.prototype.detach=V.prototype.detach;V.prototype.attach=V.prototype.Ib;
373
+ V.probeSupport=function(){var a,b,c,d,e,f;return K(function(g){if(1==g.g)return t(g,Yd(),2);a=g.h;var h={};if(id()){for(var k in ng)h[k]=!0;for(var l in pg)h[l]=!0}k={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};l=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,h[m]=id()?!!ng[m]:jd(m);for(var n in k)h[n]=id()?!!pg[n]:jd(k[n]);b=h;h={};n=r('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
374
+ for(k=n.next();!k.done;k=n.next())k=k.value,h[k]=id()?Ue(k)?!0:MediaSource.isTypeSupported(k)||fc(k):jd(k),l=k.split(";")[0],h[l]=h[l]||h[k];c=h;d={manifest:b,media:c,drm:a};e=Tj;for(f in e)d[f]=e[f]();return g["return"](d)})};
375
+ V.isBrowserSupported=function(){if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach))return!1;var a=od();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:id()?!0:jd("application/x-mpegurl")};V.setAdManagerFactory=function(a){si=a};V.registerSupportPlugin=function(a,b){Tj[a]=b};V.prototype.destroy=V.prototype.destroy;
376
+ var Pj="abrstatuschanged",Jj="adaptation",Hj="buffering",$i="drmsessionupdate",Hh="emsg",Qj="error",Sj="expirationupdated",Li="loaded",Ji="loading",Vi="manifestparsed",wj="metadata",Ei="onstatechange",Fi="onstateidle",Ij="ratechange",jj="streaming",Nj="textchanged",Oj="texttrackvisibility",Ti="timelineregionadded",yj="timelineregionenter",zj="timelineregionexit",Lj="trackschanged",Oi="unloading",Mj="variantchanged",Uj={vf:Pj,wf:Jj,xf:Hj,yf:$i,Af:Hh,Error:Qj,Bf:Sj,Df:"largegap",Ef:Li,Ff:Ji,Gf:Vi,Metadata:wj,
377
+ Hf:Ei,If:Fi,Jf:Ij,Kf:jj,Lf:Nj,Mf:Oj,Nf:Ti,Of:yj,Pf:zj,Qf:Lj,Rf:Oi,Sf:Mj},Gi=0,pi=1,ij=2,rj=3;V.LoadMode={DESTROYED:Gi,NOT_LOADED:pi,MEDIA_SOURCE:ij,SRC_EQUALS:rj};V.version="v3.0.15";var Vj=["3","0"];Eb=new function(a){this.g=a;this.i=Fb;this.h=Gb}(new Cb(Number(Vj[0]),Number(Vj[1])));var Rj=["output-restricted","internal-error"],Tj={},si=null;function Wj(){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 Tc;this.h.v(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.j=!0});this.h.v(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};
378
+ 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()};
379
+ 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};L("shaka.ads.ClientSideAd",W);
377
380
  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;
378
- 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 Wj(a,b,c,d){var e=this;this.h=a;this.a=b;this.m=NaN;this.f=d;this.j=null;this.b=new Vc;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.h,this.a);a.initialize();this.g=new google.ima.AdsLoader(a);this.g.getSettings().setPlayerType("shaka-player");this.g.getSettings().setPlayerVersion("v3.0.11");this.c=null;this.b.ja(this.g,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Xj(e,f)});this.b.l(this.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(f){Yj(e,
379
- f)});this.a.onended=function(){e.g.contentComplete()}}Wj.prototype.stop=function(){this.c&&this.c.stop();this.h&&Th(this.h)};function Yj(a,b){b.getError();Zj(a,null);a.f(new P("ad-cue-points-changed",{cuepoints:[]}))}
380
- function Xj(a,b){a.f(new P("ads-loaded",{loadTime:Date.now()/1E3-a.m}));a.c=b.getAdsManager(a.a);a.f(new P("ima-ad-manager-loaded",{imaAdManager:a.c}));var c=a.c.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push(new ak(e.value));a.f(new P("ad-cue-points-changed",{cuepoints:d}))}bk(a);try{a.c.init(a.a.offsetWidth,a.a.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.b.l(a.a,"loadeddata",function(){a.c.resize(a.a.offsetWidth,
381
- a.a.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.c.start()}catch(f){Zj(a,null)}}
382
- function bk(a){a.b.l(a.c,google.ima.AdErrorEvent.Type.AD_ERROR,function(b){Yj(a,b)});a.b.l(a.c,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(b){ck(a,b)});a.b.l(a.c,google.ima.AdEvent.Type.STARTED,function(b){ck(a,b)});a.b.l(a.c,google.ima.AdEvent.Type.FIRST_QUARTILE,function(b){a.f(new P("ad-first-quartile",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.MIDPOINT,function(b){a.f(new P("ad-midpoint",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.THIRD_QUARTILE,function(b){a.f(new P("ad-third-quartile",
383
- {originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.COMPLETE,function(b){a.f(new P("ad-complete",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(b){Zj(a,b)});a.b.l(a.c,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(b){Zj(a,b)});a.b.l(a.c,google.ima.AdEvent.Type.SKIPPED,function(b){a.f(new P("ad-skipped",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.VOLUME_CHANGED,function(b){a.f(new P("ad-volume-changed",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.VOLUME_MUTED,
384
- function(b){a.f(new P("ad-muted",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.PAUSED,function(b){a.j.f=!0;a.f(new P("ad-paused",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.RESUMED,function(b){a.j.f=!1;a.f(new P("ad-resumed",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(b){a.f(new P("ad-skip-state-changed",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.CLICK,function(b){a.f(new P("ad-clicked",{originalEvent:b}))});a.b.l(a.c,
385
- google.ima.AdEvent.Type.AD_PROGRESS,function(b){a.f(new P("ad-progress",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.AD_BUFFERING,function(b){a.f(new P("ad-buffering",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.IMPRESSION,function(b){a.f(new P("ad-impression",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.DURATION_CHANGE,function(b){a.f(new P("ad-duration-changed",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.USER_CLOSE,function(b){a.f(new P("ad-closed",{originalEvent:b}))});
386
- a.b.l(a.c,google.ima.AdEvent.Type.LOADED,function(b){a.f(new P("ad-loaded",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(b){a.f(new P("all-ads-completed",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.LINEAR_CHANGED,function(b){a.f(new P("ad-linear-changed",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.AD_METADATA,function(b){a.f(new P("ad-metadata",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.LOG,function(b){a.f(new P("ad-recoverable-error",
387
- {originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.AD_BREAK_READY,function(b){a.f(new P("ad-break-ready",{originalEvent:b}))});a.b.l(a.c,google.ima.AdEvent.Type.INTERACTION,function(b){a.f(new P("ad-interaction",{originalEvent:b}))})}function ck(a,b){var c=b.getAd();a.j=new W(c,a.c);a.f(new P("ad-started",{ad:a.j,sdkAdObject:c,originalEvent:b}));a.h.setAttribute("ad-active","true");a.a.pause()}
388
- function Zj(a,b){a.f(new P("ad-stopped",{originalEvent:b}));a.h.removeAttribute("ad-active");a.a.play()};function X(a,b){this.c=a;this.b=null;this.a=b}p=X.prototype;p.getDuration=function(){return this.b?this.b.duration:-1};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return this.b?this.b.duration-this.b.currentTime:-1};p.isPaused=function(){return this.a.paused};p.isSkippable=function(){return this.c.isSkippable()};p.getTimeUntilSkippable=function(){var a=this.c.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
389
- p.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};p.skip=function(){this.a.currentTime+=this.getRemainingTime()};p.pause=function(){return this.a.pause()};p.play=function(){return this.a.play()};p.getVolume=function(){return this.a.volume};p.setVolume=function(a){this.a.volume=a};p.isMuted=function(){return this.a.muted};p.resize=function(){};p.setMuted=function(a){this.a.muted=a};p.getSequenceLength=function(){var a=this.c.getAdPodInfo();return null==a?1:a.getTotalAds()};
390
- p.getPositionInSequence=function(){var a=this.c.getAdPodInfo();return null==a?1:a.getAdPosition()};p.release=function(){this.a=this.b=this.c=null};K("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;
381
+ 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 Xj(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 Tc;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.0.15");this.i=null;this.h.pa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Yj(e,f)});this.h.v(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
382
+ function(f){Zj(e,f)});this.g.onended=function(){e.l.contentComplete()}}Xj.prototype.stop=function(){this.i&&this.i.stop();this.m&&Uh(this.m)};Xj.prototype.release=function(){this.stop();this.u&&this.u.disconnect();this.h&&this.h.release();this.i&&this.i.destroy();this.l.destroy()};function Zj(a,b){b.getError();ak(a,null);a.j(new R("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
383
+ function Yj(a,b){a.j(new R("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));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=r(c);for(var e=c.next();!e.done;e=c.next())d.push(new bk(e.value));a.j(new R("ad-cue-points-changed",(new Map).set("cuepoints",d)))}ck(a);try{a.i.init(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
384
+ a.h.v(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){ak(a,null)}}
385
+ function ck(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new R(d,e))}a.h.v(a.i,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Zj(a,c)});a.h.v(a.i,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){dk(a,c)});a.h.v(a.i,google.ima.AdEvent.Type.STARTED,function(c){dk(a,c)});a.h.v(a.i,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.v(a.i,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.v(a.i,google.ima.AdEvent.Type.THIRD_QUARTILE,
386
+ function(c){b(c,"ad-third-quartile")});a.h.v(a.i,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.v(a.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){ak(a,c)});a.h.v(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){ak(a,c)});a.h.v(a.i,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.v(a.i,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.v(a.i,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
387
+ a.h.v(a.i,google.ima.AdEvent.Type.PAUSED,function(c){a.s.j=!0;b(c,"ad-paused")});a.h.v(a.i,google.ima.AdEvent.Type.RESUMED,function(c){a.s.j=!1;b(c,"ad-resumed")});a.h.v(a.i,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.v(a.i,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.v(a.i,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.v(a.i,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.v(a.i,
388
+ google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.v(a.i,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.v(a.i,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.v(a.i,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.v(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.v(a.i,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.v(a.i,google.ima.AdEvent.Type.AD_METADATA,
389
+ function(c){b(c,"ad-metadata")});a.h.v(a.i,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.v(a.i,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.v(a.i,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function dk(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()}
390
+ function ak(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)};
391
+ 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()};
392
+ q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};L("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;
391
393
  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;
392
- X.prototype.getDuration=X.prototype.getDuration;function dk(a,b,c,d){var e=this;this.v=a;this.a=b;this.g=null;this.G=NaN;this.f=d;this.D=!1;this.A=this.h=this.j=null;this.m="";this.b=new Vc;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.c=new google.ima.dai.api.StreamManager(this.a,this.v,a);this.f(new P("ima-stream-manager-loaded",{imaStreamManager:this.c}));this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){ek(e,f)});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.m.length?e.g.resolve(e.m):
393
- e.g.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.g=null});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.h=new X(f,e.a);e.A&&(e.h.b=e.A);e.f(new P("ad-started",{ad:e.h}));e.v.setAttribute("ad-active","true")});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.v.removeAttribute("ad-active");var f=e.a.currentTime;
394
- e.j&&e.j>f&&(e.a.currentTime=e.j,e.j=null)});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.h&&(e.h.b=e.A)});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.f(new P("ad-first-quartile"))});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.f(new P("ad-midpoint"))});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.f(new P("ad-third-quartile"))});
395
- this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.f(new P("ad-complete"));e.f(new P("ad-stopped"));e.v.removeAttribute("ad-active");e.h=null});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.f(new P("ad-skipped"));e.f(new P("ad-stopped"))});this.b.l(this.c,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push(new ak(h.start,h.end));e.f(new P("ad-cue-points-changed",
396
- {cuepoints:f}))})}dk.prototype.stop=function(){this.c.reset();this.m="";this.j=null};dk.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.c.onTimedMetadata(b)}};
397
- function ek(a,b){a.f(new P("ads-loaded",{loadTime:Date.now()/1E3-a.G}));var c=b.getStreamData().url;a.g.resolve(c);a.g=null;a.D||a.b.l(a.a,"seeked",function(){var d=a.a.currentTime;if(0!=d){a.c.streamTimeForContentTime(d);var e=a.c.previousCuePointForStreamTime(d);e&&!e.played&&(a.j=d,a.a.currentTime=e.start)}})};function Y(){zc.call(this);this.a=this.b=null;this.f=new Vj;this.c=navigator.language}pa(Y,zc);p=Y.prototype;p.setLocale=function(a){this.c=a};p.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new M(2,10,1E4);this.b=new Wj(a,b,this.c,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.f.a.push(d.loadTime);break;case "ad-started":c.f.c++;break;case "ad-complete":c.f.b++;break;case "ad-skipped":c.f.f++}c.dispatchEvent(d)})};
398
- p.onAssetUnload=function(){this.b&&this.b.stop();this.dispatchEvent(new P("ad-stopped"));this.f=new Vj};p.requestClientSideAds=function(a){if(!this.b)throw new M(1,10,10001);var b=this.b;b.m=Date.now()/1E3;b.g.requestAds(a)};
399
- p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new M(2,10,10002);this.a=new dk(a,b,this.c,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.f.a.push(d.loadTime);break;case "ad-started":c.f.c++;break;case "ad-complete":c.f.b++;break;case "ad-skipped":c.f.f++}c.dispatchEvent(d)})};
400
- p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.a)throw new M(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.0.11";c=this.a;var d=b;c.g?c=Promise.reject(new M(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
401
- (c.D=!0),c.g=new Sb,c.c.requestStream(a),c.m=d||"",c.G=Date.now()/1E3,c=c.g);return c};p.replaceServerSideAdTagParameters=function(a){if(!this.a)throw new M(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.0.11";this.a.c.replaceAdTagParameters(a)};
402
- p.getStats=function(){var a=this.f;return{loadTimes:a.a,started:a.c,playedCompletely:a.b,skipped:a.f}};p.onDashTimedMetadata=function(a){if(this.a&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.a.c.processMetadata(b,c,a.startTime)}};p.onHlsTimedMetadata=function(a,b){this.a&&this.a.c.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.a)this.a.onCueMetadataChange(a)};K("shaka.ads.AdManager",Y);
394
+ X.prototype.getDuration=X.prototype.getDuration;function ek(a,b,c,d){var e=this;this.u=a;this.g=b;this.l=null;this.K=NaN;this.j=d;this.I=!1;this.C=this.m=this.s=null;this.F="";this.h=new Tc;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.v(this.i,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){fk(e,f)});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?e.l.resolve(e.F):
395
+ e.l.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.l=null});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.v(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 R("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active");
396
+ var f=e.g.currentTime;e.s&&e.s>f&&(e.g.currentTime=e.s,e.s=null)});this.h.v(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.v(this.i,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.j(new R("ad-first-quartile"))});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.j(new R("ad-midpoint"))});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.j(new R("ad-third-quartile"))});
397
+ this.h.v(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.v(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.j(new R("ad-skipped"));e.j(new R("ad-stopped"))});this.h.v(this.i,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push(new bk(h.start,h.end));e.j(new R("ad-cue-points-changed",
398
+ (new Map).set("cuepoints",f)))})}ek.prototype.stop=function(){this.F="";this.s=null};ek.prototype.release=function(){this.stop();this.h&&this.h.release()};ek.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.i.onTimedMetadata(b)}};
399
+ function fk(a,b){a.j(new R("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.K)));var c=b.getStreamData().url;a.l.resolve(c);a.l=null;a.I||a.h.v(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(){wc.call(this);this.g=this.h=null;this.j=new Wj;this.i=navigator.language}oa(Y,wc);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 O(2,10,1E4);this.h&&this.h.release();this.h=new Xj(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)})};
400
+ 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 Wj};q.requestClientSideAds=function(a){if(!this.h)throw new O(1,10,10001);var b=this.h;b.C=Date.now()/1E3;b.l.requestAds(a)};
401
+ q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new O(2,10,10002);this.g&&this.g.release();this.g=new ek(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)})};
402
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('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.0.15";c=this.g;var d=b;c.l?c=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
403
+ (c.I=!0),c.l=new Ob,c.i.requestStream(a),c.F=d||"",c.K=Date.now()/1E3,c=c.l);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Sa('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.0.15";this.g.i.replaceAdTagParameters(a)};
404
+ 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)};L("shaka.ads.AdManager",Y);
403
405
  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.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;
404
- Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.setLocale=Y.prototype.setLocale;function ak(a,b){this.start=a;this.end=void 0===b?null:b}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";Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";
405
- 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";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";
406
- 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";ri=function(){return new Y};function fk(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=r(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=r(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
407
- TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(Ae(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}})}
408
- function gk(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=hk(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})}
409
- function hk(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
410
- var ik="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),jk="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),kk=["loop","playbackRate"],lk=["pause","play"],mk={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,
411
- isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},nk={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},ok=[["getConfiguration","configure"]],pk=[["isTextTrackVisible","setTextTrackVisibility"]],qk="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),rk=["attach","detach","load",
412
- "unload"];function sk(a,b,c,d,e,f){var g=this;this.T=a;this.f=new N(b);this.X=c;this.m=!1;this.D=d;this.M=e;this.I=f;this.b=this.h=!1;this.K="";this.j=null;this.v=function(){return tk(g)};this.A=function(h,k){var l=gk(k);switch(l.type){case "event":var m=l.targetName;l=l.event;l=new P(l.type,l);g.D(m,l);break;case "update":m=l.update;for(var n in m){l=g.a[n]||{};for(var q in m[n])l[q]=m[n][q]}g.m&&(g.X(),g.m=!1);break;case "asyncComplete":if(n=l.id,l=l.error,q=g.c[n],delete g.c[n],q)if(l){n=new M(l.severity,
413
- l.category,l.code);for(m in l)n[m]=l[m];q.reject(n)}else q.resolve()}};this.a={video:{},player:{}};this.G=0;this.c={};this.g=null;uk.add(this)}p=sk.prototype;p.destroy=function(){uk["delete"](this);vk(this);wk&&xk(this);this.f&&(this.f.stop(),this.f=null);this.M=this.D=null;this.b=this.h=!1;this.A=this.v=this.g=this.c=this.a=this.j=null;return Promise.resolve()};p.ha=function(){return this.b};p.hd=function(){return this.K};
414
- p.init=function(){if(this.T.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.h=!0;this.f.Sb();var a=new chrome.cast.SessionRequest(this.T);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(uk),d=c.next();!d.done;d=c.next())yk(d.value,b)},function(b){for(var c=r(uk),d=c.next();!d.done;d=c.next())d=d.value,zk="available"==b,d.f.Sb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});zk&&this.f.R(Ak);(a=wk)&&a.status!=chrome.cast.SessionStatus.STOPPED?yk(this,
415
- a):wk=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Bk),window.__onGCastApiAvailable!=Bk&&Xa("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};p.od=function(a){this.j=a;this.b&&Ck(this,{type:"appData",appData:this.j})};
416
- p.cast=function(a){var b=this;return J(function(c){if(!b.h)throw new M(1,8,8E3);if(!zk)throw new M(1,8,8001);if(b.b)throw new M(1,8,8002);b.g=new Sb;chrome.cast.requestSession(function(d){return Dk(b,a,d)},function(d){return Ek(b,d)});return u(c,b.g,0)})};function Fk(a){if(a.b){var b=a.I();chrome.cast.requestSession(function(c){return Dk(a,b,c)},function(c){return Ek(a,c)})}}p.kb=function(){if(this.b){vk(this);if(wk){xk(this);try{wk.stop(function(){},function(){})}catch(a){}wk=null}tk(this)}};
417
- p.get=function(a,b){var c=this;if("video"==a){if(lk.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Sd.apply(c,[a,b].concat(ia(e)))}}else if("player"==a){if(nk[b]&&!this.get("player","isLive")())return function(){};if(qk.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Sd.apply(c,[a,b].concat(ia(e)))};if(rk.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.We.apply(c,
418
- [a,b].concat(ia(e)))};if(mk[b])return function(){return c.a[a][b]}}return this.a[a][b]};p.set=function(a,b,c){this.a[a][b]=c;Ck(this,{type:"set",targetName:a,property:b,value:c})};function Dk(a,b,c){wk=c;c.addUpdateListener(a.v);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.A);tk(a);Ck(a,{type:"init",initState:b,appData:a.j});a.g.resolve()}
419
- function Ek(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.g.reject(new M(2,8,c,b))}p.Sd=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];Ck(this,{type:"call",targetName:a,methodName:b,args:d})};p.We=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];e=new Sb;var f=this.G.toString();this.G++;this.c[f]=e;try{Ck(this,{type:"asyncCall",targetName:a,methodName:b,args:d,id:f})}catch(g){e.reject(g)}return e};
420
- function yk(a,b){var c=a.I();a.g=new Sb;a.m=!0;Dk(a,c,b)}function xk(a){var b=wk;b.removeUpdateListener(a.v);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.A)}function tk(a){var b=wk?"connected"==wk.status:!1;if(a.b&&!b){a.M();for(var c in a.a)a.a[c]={};vk(a)}a.b=b;a.K=b?wk.receiver.friendlyName:"";a.f.Sb()}function vk(a){for(var b in a.c){var c=a.c[b];delete a.c[b];c.reject(new M(1,7,7E3))}}
421
- function Ck(a,b){var c=fk(b),d=wk;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},ab)}catch(e){throw c=new M(2,8,8005,e),d=new P("error",{detail:c}),a.D("player",d),a.kb(),c;}}var Ak=.02,zk=!1,wk=null,uk=new Set;function Bk(a){if(a){a=r(uk);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Gk(a,b,c){zc.call(this);var d=this;this.f=a;this.c=b;this.b=this.j=this.g=this.m=this.h=null;this.A=c;this.v=new Map;this.a=new sk(c,function(){return Hk(d)},function(){return Ik(d)},function(e,f){return Jk(d,e,f)},function(){return Kk(d)},function(){return Lk(d)});Mk(this)}pa(Gk,zc);p=Gk.prototype;
422
- p.destroy=function(a){a&&this.a.kb();this.b&&(this.b.release(),this.b=null);a=[];this.c&&(a.push(this.c.destroy()),this.c=null);this.a&&(a.push(this.a.destroy()),this.a=null);this.m=this.h=this.f=null;return Promise.all(a)};p.Ie=function(){return this.h};p.Ae=function(){return this.m};p.he=function(){return this.a.h&&zk};p.ha=function(){return this.a.ha()};p.hd=function(){return this.a.hd()};
423
- p.cast=function(){var a=this,b;return J(function(c){return 1==c.a?(b=Lk(a),u(c,a.a.cast(b),2)):a.c?u(c,a.c.vd(),0):c["return"]()})};p.od=function(a){this.a.od(a)};p.gf=function(){Fk(this.a)};p.kb=function(){this.a.kb()};
424
- p.je=function(a){var b=this;return J(function(c){if(1==c.a){if(a==b.A)return c["return"]();b.A=a;b.a.kb();return u(c,b.a.destroy(),2)}b.a=null;b.a=new sk(a,function(){return Hk(b)},function(){return Ik(b)},function(d,e){return Jk(b,d,e)},function(){return Kk(b)},function(){return Lk(b)});b.a.init();w(c)})};
425
- function Mk(a){a.a.init();a.b=new Vc;for(var b=r(ik),c=b.next();!c.done;c=b.next())a.b.l(a.f,c.value,function(f){a.a.ha()||(f=new P(f.type,f),a.g.dispatchEvent(f))});for(var d in Tj)a.b.l(a.c,Tj[d],function(f){a.a.ha()||a.j.dispatchEvent(f)});a.h={};b={};for(var e in a.f)b.vb=e,Object.defineProperty(a.h,b.vb,{configurable:!1,enumerable:!0,get:function(f){return function(){return Nk(a,f.vb)}}(b),set:function(f){return function(g){var h=f.vb;a.a.ha()?a.a.set("video",h,g):a.f[h]=g}}(b)}),b={vb:b.vb};
426
- a.m={};Ok(a,function(f){Object.defineProperty(a.m,f,{configurable:!1,enumerable:!0,get:function(){return Pk(a,f)}})});Qk(a);a.g=new zc;a.g.ac=a.h;a.j=new zc;a.j.ac=a.m}function Qk(a){var b=new Map;Ok(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.v.set(c,e):a.v.set(e,c)}else b.set(d,c)})}
427
- function Ok(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.c,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=r(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
428
- function Lk(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.c.Tc(),startTime:null};a.f.pause();for(var c=r(kk),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.f[d];a.f.ended||(b.startTime=a.f.currentTime);c=r(ok);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.c[e[0]]();b.player[d]=e}c=r(pk);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.c[e[0]](),b.playerAfterLoad[d]=e;return b}function Hk(a){var b=new P("caststatuschanged");a.dispatchEvent(b)}
429
- function Ik(a){var b=new P(a.h.paused?"pause":"play");a.g.dispatchEvent(b)}
430
- function Kk(a){for(var b=r(ok),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.a.get("player",d[0])();a.c[c](d)}var e=a.a.get("player","getAssetUri")();c=a.a.get("video","ended");b=Promise.resolve();var f=a.f.autoplay;d=null;c||(d=a.a.get("video","currentTime"));e&&(a.f.autoplay=!1,b=a.c.load(e,d));var g={};c=r(kk);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.a.get("video",d);b.then(function(){if(a.f){for(var h=r(kk),k=h.next();!k.done;k=h.next())k=k.value,a.f[k]=g[k];h=r(pk);for(k=
431
- h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.a.get("player",l[0])();a.c[k](l)}a.f.autoplay=f;e&&a.f.play()}},function(h){h=new P(Pj,{detail:h});a.c.dispatchEvent(h)})}
432
- function Nk(a,b){if("addEventListener"==b)return function(d,e,f){return a.g.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.g.removeEventListener(d,e,f)};if(a.a.ha()&&0==Object.keys(a.a.a.video).length){var c=a.f[b];if("function"!=typeof c)return c}return a.a.ha()?a.a.get("video",b):(c=a.f[b],"function"==typeof c&&(c=c.bind(a.f)),c)}
433
- function Pk(a,b){a.v.has(b)&&(b=a.v.get(b));if("addEventListener"==b)return function(c,d,e){return a.j.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.j.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.h};if("getSharedConfiguration"==b)return a.a.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.c.Gb()};if("getAdManager"==b)return function(){return a.c.Fd()};if("setVideoContainer"==b)return function(c){return a.c.Zd(c)};
434
- if(a.a.ha()){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.a.ha()&&0==Object.keys(a.a.a.video).length&&mk[b]||!a.a.ha()?a.c[b].bind(a.c):a.a.get("player",b)}function Jk(a,b,c){a.a.ha()&&("video"==b?a.g.dispatchEvent(c):"player"==b&&a.j.dispatchEvent(c))}K("shaka.cast.CastProxy",Gk);Gk.prototype.changeReceiverId=Gk.prototype.je;
435
- Gk.prototype.forceDisconnect=Gk.prototype.kb;Gk.prototype.suggestDisconnect=Gk.prototype.gf;Gk.prototype.setAppData=Gk.prototype.od;Gk.prototype.cast=Gk.prototype.cast;Gk.prototype.receiverName=Gk.prototype.hd;Gk.prototype.isCasting=Gk.prototype.ha;Gk.prototype.canCast=Gk.prototype.he;Gk.prototype.getPlayer=Gk.prototype.Ae;Gk.prototype.getVideo=Gk.prototype.Ie;Gk.prototype.destroy=Gk.prototype.destroy;function Rk(a,b,c,d){zc.call(this);var e=this;this.a=a;this.c=b;this.b=new Vc;this.K={video:a,player:b};this.D=c||function(){};this.M=d||function(f){return f};this.f=null;this.G=!1;this.j=!0;this.h=0;this.A=!1;this.v=!0;this.m=this.g=null;this.I=new N(function(){Sk(e)});Tk(this)}pa(Rk,zc);p=Rk.prototype;p.isConnected=function(){return this.G};p.Le=function(){return this.j};p.cf=function(a){this.f=a};p.me=function(){this.f=null};
436
- p.df=function(a){this.f||(this.f={metadataType:cast.receiver.media.MetadataType.GENERIC});this.f.title=a};p.bf=function(a){this.f||(this.f={metadataType:cast.receiver.media.MetadataType.GENERIC});this.f.images=[{url:a}]};p.af=function(a){this.f||(this.f={});this.f.artist=a;this.f.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
437
- p.destroy=function(){var a=this,b,c;return J(function(d){if(1==d.a)return a.b&&(a.b.release(),a.b=null),b=[],a.c&&(b.push(a.c.destroy()),a.c=null),a.I&&(a.I.stop(),a.I=null),a.a=null,a.K=null,a.D=null,a.G=!1,a.j=!0,a.g=null,a.m=null,u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();w(d)})};
438
- function Tk(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Uk(a)};b.onSenderDisconnected=function(){return Uk(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Vk(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.g);Vk(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.g)};a.m=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.m.onMessage=function(e){return Wk(a,
439
- e)};a.g=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.g.onMessage=function(e){return Xk(a,e)};b.start();b=r(ik);for(var c=b.next();!c.done;c=b.next())a.b.l(a.a,c.value,function(e){return Yk(a,"video",e)});for(var d in Tj)a.b.l(a.c,Tj[d],function(e){return Yk(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.c.pd(3840,2160):a.c.pd(1920,1080);a.b.l(a.a,"loadeddata",function(){a.A=!0});a.b.l(a.c,"loading",function(){a.j=
440
- !1;Zk(a)});a.b.l(a.a,"playing",function(){a.j=!1;Zk(a)});a.b.l(a.a,"pause",function(){Zk(a)});a.b.l(a.c,"unloading",function(){a.j=!0;Zk(a)});a.b.l(a.a,"ended",function(){(new N(function(){a.a&&a.a.ended&&(a.j=!0,Zk(a))})).R($k)})}function Uk(a){a.h=0;a.v=!0;a.G=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Zk(a)}
441
- function Zk(a){var b;J(function(c){if(1==c.a)return u(c,Promise.resolve(),2);if(!a.c)return c["return"]();b=new P("caststatuschanged");a.dispatchEvent(b);al(a)||bl(a);w(c)})}
442
- function cl(a,b,c){var d,e,f,g,h,k,l,m,n,q;J(function(t){switch(t.a){case 1:for(d in b.player)e=b.player[d],a.c[d](e);a.D(c);f=a.a.autoplay;return b.manifest?(a.a.autoplay=!1,y(t,5),u(t,a.c.load(b.manifest,b.startTime),7)):u(t,Promise.resolve(),3);case 7:ua(t,3);break;case 5:return g=C(t),h=Pj,k=new P(h,{detail:g}),a.c.dispatchEvent(k),t["return"]();case 3:if(!a.c)return t["return"]();for(l in b.video)m=b.video[l],a.a[l]=m;for(n in b.playerAfterLoad)q=b.playerAfterLoad[n],a.c[n](q);a.a.autoplay=f;
443
- b.manifest&&(a.a.play(),bl(a));w(t)}})}function Yk(a,b,c){a.c&&(Sk(a),Vk(a,{type:"event",targetName:b,event:c},a.g))}
444
- function Sk(a){a.I.R(dl);for(var b={video:{},player:{}},c=r(jk),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.a[d];if(a.c.S())for(var e in nk)0==a.h%nk[e]&&(b.player[e]=a.c[e]());for(var f in mk)0==a.h%mk[f]&&(b.player[f]=a.c[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.A&&(a.h+=1);Vk(a,{type:"update",update:b},a.g);al(a)}function al(a){return a.v&&(a.a.duration||a.c.S())?(el(a),a.v=!1,!0):!1}
445
- function el(a,b){var c={contentId:a.c.Tc(),streamType:a.c.S()?"LIVE":"BUFFERED",contentType:""};a.c.S()||(c.duration=a.a.duration);a.f&&(c.metadata=a.f);bl(a,void 0===b?0:b,c)}
446
- function Xk(a,b){var c=gk(b.data);switch(c.type){case "init":a.h=0;a.A=!1;a.v=!0;cl(a,c.initState,c.appData);Sk(a);break;case "appData":a.D(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.K[d][e]=c;break;case "call":d=a.K[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
447
- c.methodName;"player"==d&&"load"==e&&(a.h=0,a.A=!1);var g=c.id,h=b.senderId;f=a.K[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.v=!0}));c.then(function(){return fl(a,h,g,null)},function(k){return fl(a,h,g,k)})}}
448
- function Wk(a,b){var c=gk(b.data);switch(c.type){case "PLAY":a.a.play();bl(a);break;case "PAUSE":a.a.pause();bl(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.a.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.a.play(),bl(a)):e&&"PLAYBACK_PAUSE"==e&&(a.a.pause(),bl(a));break;case "STOP":a.c.vd().then(function(){a.c&&bl(a)});break;case "GET_STATUS":el(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.a.volume,g=a.a.muted;null!=d&&(a.a.volume=Number(d));
449
- null!=e&&(a.a.muted=e);f==a.a.volume&&g==a.a.muted||bl(a);break;case "LOAD":a.h=0;a.A=!1;a.v=!1;d=c.media;e=c.currentTime;f=a.M(d.contentId);g=c.autoplay||!0;a.D(d.customData);g&&(a.a.autoplay=!0);a.c.load(f,e).then(function(){a.c&&el(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Vk(a,{requestId:Number(c.requestId),type:k},a.m)});break;default:Vk(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.m)}}
450
- function fl(a,b,c,d){a.c&&Vk(a,{type:"asyncComplete",id:c,error:d},a.g,b)}function Vk(a,b,c,d){a.G&&(a=fk(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function bl(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.a.playbackRate,playerState:a.j?gl:a.c.Vc()?hl:a.a.paused?il:jl,currentTime:a.a.currentTime,supportedMediaCommands:63,volume:{level:a.a.volume,muted:a.a.muted}};c&&(d.media=c);Vk(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.m)}
451
- K("shaka.cast.CastReceiver",Rk);Rk.prototype.destroy=Rk.prototype.destroy;Rk.prototype.setContentArtist=Rk.prototype.af;Rk.prototype.setContentImage=Rk.prototype.bf;Rk.prototype.setContentTitle=Rk.prototype.df;Rk.prototype.clearContentMetadata=Rk.prototype.me;Rk.prototype.setContentMetadata=Rk.prototype.cf;Rk.prototype.isIdle=Rk.prototype.Le;Rk.prototype.isConnected=Rk.prototype.isConnected;var dl=.5,$k=5,gl="IDLE",jl="PLAYING",hl="BUFFERING",il="PAUSED";function kl(a){var b=this;this.a=[];this.b=[];this.data=[];(new ie).box("moov",me).V("pssh",function(c){if(!(1<c.version)){var d=L(c.reader.P,-12,c.size);b.data.push(d);b.a.push(gc(c.reader.Ya(16)));if(0<c.version){d=c.reader.J();d=r(jb(d));for(var e=d.next();!e.done;e=d.next())e=gc(c.reader.Ya(16)),b.b.push(e)}}}).parse(a)}
452
- function ll(a){if(!a)return a;var b=new kl(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={Ub:c.Ub},d=b.next())c.Ub=d.value,a.some(function(e){return function(f){return nb(f,e.Ub)}}(c))||a.push(c.Ub);return hc.apply(bc,ia(a))};function ql(a,b){var c=rl(a,b);return 1!=c.length?null:c[0]}function sl(a,b,c){a=tl(a,b,c);return 1!=a.length?null:a[0]}function rl(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName==b})}function tl(a,b,c){return Array.from(a.childNodes).filter(function(d){return d instanceof Element&&d.localName==c&&d.namespaceURI==b})}function ul(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}
453
- function vl(a){return Array.from(a.childNodes).every(function(b){return b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE})?a.textContent.trim():null}function wl(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 xl(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)}
454
- function yl(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 zl(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}
455
- function Al(a){a=Number(a);return 0===a%1?a:null}function Bl(a){a=Number(a);return 0===a%1&&0<a?a:null}function Cl(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Dl(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(a)?null:a}function El(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}
456
- function Fl(a,b){try{var c=Vb(a);return El(c,b)}catch(d){return null}};function Gl(a,b){var c=Hl(a),d=null,e=[],f=[],g=new Set(c.map(function(k){return k.keyId}));g["delete"](null);if(1<g.size)throw new M(2,4,4010);b||(f=c.filter(function(k){return"urn:mpeg:dash:mp4protection:2011"==k.Ud?(d=k.init||d,!1):!0}),f.length&&(e=Il(d,f),0==e.length&&(e=[Qb("",d)])));if(c.length&&(b||!f.length))for(e=[],c=r(Jl.values()),f=c.next();!f.done;f=c.next())f=f.value,"org.w3.clearkey"!=f&&e.push(Qb(f,d));if(g=Array.from(g)[0]||null)for(c=r(e),f=c.next();!f.done;f=c.next()){f=r(f.value.initData);
457
- for(var h=f.next();!h.done;h=f.next())h.value.keyId=g}return{Bd:g,Pf:d,drmInfos:e,Ed:!0}}function Kl(a,b,c){var d=Gl(a,c);if(b.Ed){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==d.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=d.drmInfos;b.Ed=!1}else if(0<d.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(e){return d.drmInfos.some(function(f){return f.keySystem==e.keySystem})}),0==b.drmInfos.length))throw new M(2,4,4008);return d.Bd||b.Bd}
458
- function Ll(a){var b=0,c=rb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+4+2;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=L(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
459
- function Ml(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}
460
- function Il(a,b){for(var c=[],d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=Jl.get(e.Ud);if(f){var g;if(g=sl(e.node,"urn:microsoft:playready","pro")){g=ec(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),k=g.length,l=h.length+16+k,m=new Uint8Array(l),n=rb(m),q=0;n.setUint32(q,l);q+=4;n.setUint32(q,1886614376);q+=4;n.setUint32(q,0);q+=4;m.set(h,q);q+=h.length;n.setUint32(q,k);q+=4;m.set(g,q);g=[{initData:m,initDataType:"cenc",keyId:e.keyId}]}else g=
461
- null;g=Qb(f,e.init||a||g);if(f=Nl.get(f))g.licenseServerUri=f(e);c.push(g)}}return c}function Hl(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=Ol(c.value))&&b.push(c);return b}
462
- function Ol(a){var b=a.getAttribute("schemeIdUri"),c=ul(a,"urn:mpeg:cenc:2013","default_KID"),d=tl(a,"urn:mpeg:cenc:2013","pssh").map(vl);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:ec(f),keyId:null}})}catch(f){throw new M(2,4,4007);}return{node:a,Ud:b,keyId:c,init:0<e.length?e:null}}
463
- var Jl=(new Map).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime"),Nl=(new Map).set("com.widevine.alpha",function(a){return(a=sl(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||
464
- "":""}).set("com.microsoft.playready",function(a){a=sl(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=ec(a.textContent);a=Ll(a).filter(function(b){return 1===b.type})[0];if(!a)return"";a=Xb(a.value,!0);return(a=El(a,"WRMHEADER"))?Ml(a):""});function Pl(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=
406
+ Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.setLocale=Y.prototype.setLocale;function bk(a,b){this.start=a;this.end=void 0===b?null:b}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";
407
+ 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";
408
+ 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";si=function(){return new Y};function gk(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=r(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=r(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
409
+ TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(ye(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}})}
410
+ function hk(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=ik(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})}
411
+ function ik(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
412
+ var jk="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),kk="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),lk=["loop","playbackRate"],mk=["pause","play"],nk={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,
413
+ isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},ok={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},pk=[["getConfiguration","configure"]],qk=[["isTextTrackVisible","setTextTrackVisibility"]],rk="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),sk=["attach","detach","load",
414
+ "unload"];function tk(a,b,c,d,e,f){var g=this;this.N=a;this.j=new Q(b);this.ca=c;this.C=!1;this.u=d;this.K=e;this.S=f;this.h=this.m=!1;this.Z="";this.s=null;this.F=function(){return uk(g)};this.I=function(h,k){var l=hk(k);switch(l.type){case "event":var m=l.targetName;l=tc(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.C&&(g.ca(),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 O(l.severity,l.category,
415
+ l.code);for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.P=0;this.i={};this.l=null;vk.add(this)}q=tk.prototype;q.destroy=function(){vk["delete"](this);wk(this);xk&&yk(this);this.j&&(this.j.stop(),this.j=null);this.K=this.u=null;this.h=this.m=!1;this.I=this.F=this.l=this.i=this.g=this.s=null;return Promise.resolve()};q.na=function(){return this.h};q.od=function(){return this.Z};
416
+ q.init=function(){if(this.N.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.ac();var a=new chrome.cast.SessionRequest(this.N);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(vk),d=c.next();!d.done;d=c.next())zk(d.value,b)},function(b){for(var c=r(vk),d=c.next();!d.done;d=c.next())d=d.value,Ak="available"==b,d.j.ac()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Ak&&this.j.W(Bk);(a=xk)&&a.status!=chrome.cast.SessionStatus.STOPPED?zk(this,
417
+ a):xk=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Ck),window.__onGCastApiAvailable!=Ck&&Sa("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.ud=function(a){this.s=a;this.h&&Dk(this,{type:"appData",appData:this.s})};
418
+ q.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new O(1,8,8E3);if(!Ak)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new Ob;chrome.cast.requestSession(function(d){return Ek(b,a,d)},function(d){return Fk(b,d)});return t(c,b.l,0)})};function Gk(a){if(a.h){var b=a.S();chrome.cast.requestSession(function(c){return Ek(a,b,c)},function(c){return Fk(a,c)})}}q.qb=function(){if(this.h){wk(this);if(xk){yk(this);try{xk.stop(function(){},function(){})}catch(a){}xk=null}uk(this)}};
419
+ q.get=function(a,b){var c=this;if("video"==a){if(mk.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Xd.apply(c,[a,b].concat(ha(e)))}}else if("player"==a){if(ok[b]&&!this.get("player","isLive")())return function(){};if(rk.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Xd.apply(c,[a,b].concat(ha(e)))};if(sk.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.$e.apply(c,
420
+ [a,b].concat(ha(e)))};if(nk[b])return function(){return c.g[a][b]}}return this.g[a][b]};q.set=function(a,b,c){this.g[a][b]=c;Dk(this,{type:"set",targetName:a,property:b,value:c})};function Ek(a,b,c){xk=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.I);uk(a);Dk(a,{type:"init",initState:b,appData:a.s});a.l.resolve()}
421
+ function Fk(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new O(2,8,c,b))}q.Xd=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];Dk(this,{type:"call",targetName:a,methodName:b,args:d})};q.$e=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];e=new Ob;var f=this.P.toString();this.P++;this.i[f]=e;try{Dk(this,{type:"asyncCall",targetName:a,methodName:b,args:d,id:f})}catch(g){e.reject(g)}return e};
422
+ function zk(a,b){var c=a.S();a.l=new Ob;a.C=!0;Ek(a,c,b)}function yk(a){var b=xk;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.I)}function uk(a){var b=xk?"connected"==xk.status:!1;if(a.h&&!b){a.K();for(var c in a.g)a.g[c]={};wk(a)}a.h=b;a.Z=b?xk.receiver.friendlyName:"";a.j.ac()}function wk(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}
423
+ function Dk(a,b){var c=gk(b),d=xk;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Va)}catch(e){throw c=new O(2,8,8005,e),d=new R("error",(new Map).set("detail",c)),a.u("player",d),a.qb(),c;}}var Bk=.02,Ak=!1,xk=null,vk=new Set;function Ck(a){if(a){a=r(vk);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Hk(a,b,c){wc.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 tk(c,function(){return Ik(d)},function(){return Jk(d)},function(e,f){return Kk(d,e,f)},function(){return Lk(d)},function(){return Mk(d)});Nk(this)}oa(Hk,wc);q=Hk.prototype;
424
+ q.destroy=function(a){a&&this.g.qb();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.Me=function(){return this.m};q.Ee=function(){return this.u};q.le=function(){return this.g.m&&Ak};q.na=function(){return this.g.na()};q.od=function(){return this.g.od()};
425
+ q.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=Mk(a),t(c,a.g.cast(b),2)):a.i?t(c,a.i.Cd(),0):c["return"]()})};q.ud=function(a){this.g.ud(a)};q.lf=function(){Gk(this.g)};q.qb=function(){this.g.qb()};
426
+ q.ne=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.qb();return t(c,b.g.destroy(),2)}b.g=null;b.g=new tk(a,function(){return Ik(b)},function(){return Jk(b)},function(d,e){return Kk(b,d,e)},function(){return Lk(b)},function(){return Mk(b)});b.g.init();x(c)})};
427
+ function Nk(a){a.g.init();a.h=new Tc;for(var b=r(jk),c=b.next();!c.done;c=b.next())a.h.v(a.j,c.value,function(f){a.g.na()||(f=tc(f),a.l.dispatchEvent(f))});for(var d in Uj)a.h.v(a.i,Uj[d],function(f){a.g.na()||a.s.dispatchEvent(f)});a.m={};b={};for(var e in a.j)b.Bb=e,Object.defineProperty(a.m,b.Bb,{configurable:!1,enumerable:!0,get:function(f){return function(){return Ok(a,f.Bb)}}(b),set:function(f){return function(g){var h=f.Bb;a.g.na()?a.g.set("video",h,g):a.j[h]=g}}(b)}),b={Bb:b.Bb};a.u={};Pk(a,
428
+ function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return Qk(a,f)}})});Rk(a);a.l=new wc;a.l.kc=a.m;a.s=new wc;a.s.kc=a.u}function Rk(a){var b=new Map;Pk(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)})}
429
+ function Pk(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.i,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=r(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
430
+ function Mk(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.i.ad(),startTime:null};a.j.pause();for(var c=r(lk),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.j[d];a.j.ended||(b.startTime=a.j.currentTime);c=r(pk);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.i[e[0]]();b.player[d]=e}c=r(qk);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 Ik(a){var b=new R("caststatuschanged");a.dispatchEvent(b)}
431
+ function Jk(a){var b=new R(a.m.paused?"pause":"play");a.l.dispatchEvent(b)}
432
+ function Lk(a){for(var b=r(pk),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.i[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.j.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.j.autoplay=!1,b=a.i.load(e,d));var g={};c=r(lk);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.j){for(var h=r(lk),k=h.next();!k.done;k=h.next())k=k.value,a.j[k]=g[k];h=r(qk);for(k=
433
+ 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(Qj,h);a.i.dispatchEvent(h)})}
434
+ function Ok(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.na()&&0==Object.keys(a.g.g.video).length){var c=a.j[b];if("function"!=typeof c)return c}return a.g.na()?a.g.get("video",b):(c=a.j[b],"function"==typeof c&&(c=c.bind(a.j)),c)}
435
+ function Qk(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.Nb()};if("getAdManager"==b)return function(){return a.i.Kd()};if("setVideoContainer"==b)return function(c){return a.i.de(c)};
436
+ if(a.g.na()){if("getManifest"==b||"drmInfo"==b)return function(){Sa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Sa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.na()&&0==Object.keys(a.g.g.video).length&&nk[b]||!a.g.na()?a.i[b].bind(a.i):a.g.get("player",b)}function Kk(a,b,c){a.g.na()&&("video"==b?a.l.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}L("shaka.cast.CastProxy",Hk);Hk.prototype.changeReceiverId=Hk.prototype.ne;
437
+ Hk.prototype.forceDisconnect=Hk.prototype.qb;Hk.prototype.suggestDisconnect=Hk.prototype.lf;Hk.prototype.setAppData=Hk.prototype.ud;Hk.prototype.cast=Hk.prototype.cast;Hk.prototype.receiverName=Hk.prototype.od;Hk.prototype.isCasting=Hk.prototype.na;Hk.prototype.canCast=Hk.prototype.le;Hk.prototype.getPlayer=Hk.prototype.Ee;Hk.prototype.getVideo=Hk.prototype.Me;Hk.prototype.destroy=Hk.prototype.destroy;function Sk(a,b,c,d){wc.call(this);var e=this;this.g=a;this.i=b;this.h=new Tc;this.P={video:a,player:b};this.I=c||function(){};this.S=d||function(f){return f};this.j=null;this.K=!1;this.s=!0;this.m=0;this.F=!1;this.C=!0;this.u=this.l=null;this.N=new Q(function(){Tk(e)});Uk(this)}oa(Sk,wc);q=Sk.prototype;q.isConnected=function(){return this.K};q.Pe=function(){return this.s};q.gf=function(a){this.j=a};q.qe=function(){this.j=null};
438
+ 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};
439
+ 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.N&&(a.N.stop(),a.N=null),a.g=null,a.P=null,a.I=null,a.K=!1,a.s=!0,a.l=null,a.u=null,t(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();x(d)})};
440
+ function Uk(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Vk(a)};b.onSenderDisconnected=function(){return Vk(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Wk(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Wk(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 Xk(a,
441
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Yk(a,e)};b.start();b=r(jk);for(var c=b.next();!c.done;c=b.next())a.h.v(a.g,c.value,function(e){return Zk(a,"video",e)});for(var d in Uj)a.h.v(a.i,Uj[d],function(e){return Zk(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.i.vd(3840,2160):a.i.vd(1920,1080);a.h.v(a.g,"loadeddata",function(){a.F=!0});a.h.v(a.i,"loading",function(){a.s=
442
+ !1;$k(a)});a.h.v(a.g,"playing",function(){a.s=!1;$k(a)});a.h.v(a.g,"pause",function(){$k(a)});a.h.v(a.i,"unloading",function(){a.s=!0;$k(a)});a.h.v(a.g,"ended",function(){(new Q(function(){a.g&&a.g.ended&&(a.s=!0,$k(a))})).W(al)})}function Vk(a){a.m=0;a.C=!0;a.K=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;$k(a)}
443
+ function $k(a){var b;K(function(c){if(1==c.g)return t(c,Promise.resolve(),2);if(!a.i)return c["return"]();b=new R("caststatuschanged");a.dispatchEvent(b);bl(a)||cl(a);x(c)})}
444
+ function dl(a,b,c){var d,e,f,g,h,k,l,m,n,p,u;K(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.i[d](e);a.I(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,y(v,5),t(v,a.i.load(b.manifest,b.startTime),7)):t(v,Promise.resolve(),3);case 7:ta(v,3);break;case 5:return g=C(v),h=Qj,k=(new Map).set("detail",g),l=new R(h,k),a.i&&a.i.dispatchEvent(l),v["return"]();case 3:if(!a.i)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)u=b.playerAfterLoad[p],
445
+ a.i[p](u);a.g.autoplay=f;b.manifest&&(a.g.play(),cl(a));x(v)}})}function Zk(a,b,c){a.i&&(Tk(a),Wk(a,{type:"event",targetName:b,event:c},a.l))}
446
+ function Tk(a){a.N.W(el);for(var b={video:{},player:{}},c=r(kk),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 ok)0==a.m%ok[e]&&(b.player[e]=a.i[e]());for(var f in nk)0==a.m%nk[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);Wk(a,{type:"update",update:b},a.l);bl(a)}function bl(a){return a.C&&(a.g.duration||a.i.Y())?(fl(a),a.C=!1,!0):!1}
447
+ function fl(a,b){var c={contentId:a.i.ad(),streamType:a.i.Y()?"LIVE":"BUFFERED",contentType:""};a.i.Y()||(c.duration=a.g.duration);a.j&&(c.metadata=a.j);cl(a,void 0===b?0:b,c)}
448
+ function Yk(a,b){var c=hk(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;dl(a,c.initState,c.appData);Tk(a);break;case "appData":a.I(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.P[d][e]=c;break;case "call":d=a.P[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
449
+ c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.P[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return gl(a,h,g,null)},function(k){return gl(a,h,g,k)})}}
450
+ function Xk(a,b){var c=hk(b.data);switch(c.type){case "PLAY":a.g.play();cl(a);break;case "PAUSE":a.g.pause();cl(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(),cl(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),cl(a));break;case "STOP":a.i.Cd().then(function(){a.i&&cl(a)});break;case "GET_STATUS":fl(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));
451
+ null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||cl(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.I(d.customData);g&&(a.g.autoplay=!0);a.i.load(f,e).then(function(){a.i&&fl(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Wk(a,{requestId:Number(c.requestId),type:k},a.u)});break;default:Wk(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
452
+ function gl(a,b,c,d){a.i&&Wk(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Wk(a,b,c,d){a.K&&(a=gk(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function cl(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?hl:a.i.bd()?il:a.g.paused?jl:kl,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Wk(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
453
+ L("shaka.cast.CastReceiver",Sk);Sk.prototype.destroy=Sk.prototype.destroy;Sk.prototype.setContentArtist=Sk.prototype.ef;Sk.prototype.setContentImage=Sk.prototype.ff;Sk.prototype.setContentTitle=Sk.prototype.hf;Sk.prototype.clearContentMetadata=Sk.prototype.qe;Sk.prototype.setContentMetadata=Sk.prototype.gf;Sk.prototype.isIdle=Sk.prototype.Pe;Sk.prototype.isConnected=Sk.prototype.isConnected;var el=.5,al=5,hl="IDLE",kl="PLAYING",il="BUFFERING",jl="PAUSED";function ll(a){var b=this;this.g=[];this.h=[];this.data=[];(new ge).box("moov",ke).X("pssh",function(c){if(!(1<c.version)){var d=N(c.reader.T,-12,c.size);b.data.push(d);b.g.push(cc(c.reader.eb(16)));if(0<c.version){d=c.reader.O();d=r(db(d));for(var e=d.next();!e.done;e=d.next())e=cc(c.reader.eb(16)),b.h.push(e)}}}).parse(a)}
454
+ function ml(a){if(!a)return a;var b=new ll(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={cc:c.cc},d=b.next())c.cc=d.value,a.some(function(e){return function(f){return hb(f,e.cc)}}(c))||a.push(c.cc);return dc.apply(Yb,ha(a))};function nl(a,b){var c=ul(a,b);return 1!=c.length?null:c[0]}function vl(a,b,c){a=wl(a,b,c);return 1!=a.length?null:a[0]}function ul(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName==b})}function wl(a,b,c){return Array.from(a.childNodes).filter(function(d){return d instanceof Element&&d.localName==c&&d.namespaceURI==b})}function xl(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}
455
+ function yl(a){return Array.from(a.childNodes).every(function(b){return b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE})?a.textContent.trim():null}function zl(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 Al(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)}
456
+ function Bl(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 Cl(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}
457
+ function Dl(a){a=Number(a);return 0===a%1?a:null}function El(a){a=Number(a);return 0===a%1&&0<a?a:null}function Fl(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Gl(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(a)?null:a}function Hl(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}
458
+ function Il(a,b){try{var c=Rb(a);return Hl(c,b)}catch(d){return null}};function Jl(a,b){var c=Kl(a),d=null,e=[],f=[],g=new Set(c.map(function(k){return k.keyId}));g["delete"](null);if(1<g.size)throw new O(2,4,4010);b||(f=c.filter(function(k){return"urn:mpeg:dash:mp4protection:2011"==k.Zd?(d=k.init||d,!1):!0}),f.length&&(e=Ll(d,f),0==e.length&&(e=[Mb("",d)])));if(c.length&&(b||!f.length))for(e=[],c=r(Ml.values()),f=c.next();!f.done;f=c.next())f=f.value,"org.w3.clearkey"!=f&&e.push(Mb(f,d));if(g=Array.from(g)[0]||null)for(c=r(e),f=c.next();!f.done;f=c.next()){f=r(f.value.initData);
459
+ for(var h=f.next();!h.done;h=f.next())h.value.keyId=g}return{Gd:g,Tf:d,drmInfos:e,Jd:!0}}function Nl(a,b,c){var d=Jl(a,c);if(b.Jd){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==d.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=d.drmInfos;b.Jd=!1}else if(0<d.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(e){return d.drmInfos.some(function(f){return f.keySystem==e.keySystem})}),0==b.drmInfos.length))throw new O(2,4,4008);return d.Gd||b.Gd}
460
+ function Ol(a){var b=0,c=lb(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=N(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
461
+ function Pl(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}
462
+ function Ll(a,b){for(var c=[],d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=Ml.get(e.Zd);if(f){var g;if(g=vl(e.node,"urn:microsoft:playready","pro")){g=ac(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),k=g.length,l=h.length+16+k,m=new Uint8Array(l),n=lb(m),p=0;n.setUint32(p,l);p+=4;n.setUint32(p,1886614376);p+=4;n.setUint32(p,0);p+=4;m.set(h,p);p+=h.length;n.setUint32(p,k);p+=4;m.set(g,p);g=[{initData:m,initDataType:"cenc",keyId:e.keyId}]}else g=
463
+ null;g=Mb(f,e.init||a||g);if(f=Ql.get(f))g.licenseServerUri=f(e);c.push(g)}}return c}function Kl(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=Rl(c.value))&&b.push(c);return b}
464
+ function Rl(a){var b=a.getAttribute("schemeIdUri"),c=xl(a,"urn:mpeg:cenc:2013","default_KID"),d=wl(a,"urn:mpeg:cenc:2013","pssh").map(yl);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new O(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:ac(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,Zd:b,keyId:c,init:0<e.length?e:null}}
465
+ var Ml=(new Map).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime"),Ql=(new Map).set("com.widevine.alpha",function(a){return(a=vl(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||
466
+ "":""}).set("com.microsoft.playready",function(a){a=vl(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=ac(a.textContent);a=Ol(a).filter(function(b){return 1===b.type})[0];if(!a)return"";a=Tb(a.value,!0);return(a=Hl(a,"WRMHEADER"))?Pl(a):""});function Sl(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=
465
467
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
466
- function Ql(a,b){var c=Rl(a,b,"timescale"),d=1;c&&(d=Bl(c)||1);c=Rl(a,b,"duration");(c=Bl(c||""))&&(c/=d);var e=Rl(a,b,"startNumber"),f=Number(Rl(a,b,"presentationTimeOffset"))||0,g=Cl(e||"");if(null==e||null==g)g=1;var h=Sl(a,b,"SegmentTimeline");e=null;if(h){e=d;var k=a.O.duration||Infinity,l=rl(h,"S");h=[];var m=-f;l=r(lb(l));for(var n=l.next();!n.done;n=l.next()){n=n.value;var q=n.item,t=n.next,v=wl(q,"t",Cl);n=wl(q,"d",Cl);var z=wl(q,"r",Al);null!=v&&(v-=f);if(!n)break;q=null!=v?v:m;v=z||0;if(0>
467
- v)if(t){t=wl(t,"t",Cl);if(null==t)break;else if(q>=t)break;v=Math.ceil((t-q)/n)-1}else{if(Infinity==k)break;else if(q/e>=k)break;v=Math.ceil((k*e-q)/n)-1}0<h.length&&q!=m&&(h[h.length-1].end=q/e);t=r(jb(v+1));for(v=t.next();!v.done;v=t.next())m=q+n,h.push({start:q/e,end:m/e,nf:q}),q=m}e=h}return{timescale:d,$:c,ub:g,Ka:f/d||0,wd:f,timeline:e}}function Rl(a,b,c){return[b(a.H),b(a.ba),b(a.ma)].filter(Nb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
468
- function Sl(a,b,c){return[b(a.H),b(a.ba),b(a.ma)].filter(Nb).map(function(d){return ql(d,c)}).reduce(function(d,e){return d||e})}
469
- function Tl(a,b,c,d,e,f){for(var g=ul(a,"http://www.w3.org/1999/xlink","href"),h=ul(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return rc(new M(2,4,4028));if("onLoad"!=h)return rc(new M(2,4,4027));var m=Pb([d],[g]);return e.request(0,Mc(m,b)).U(function(n){n=Fl(n.data,a.tagName);if(!n)return rc(new M(2,4,4001,g));
470
- for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var q=n.childNodes[0];n.removeChild(q);a.appendChild(q)}n=r(Array.from(n.attributes));for(q=n.next();!q.done;q=n.next())a.setAttributeNode(q.value.cloneNode(!1));return Ul(a,b,c,m[0],e,f+1)})}
471
- function Ul(a,b,c,d,e,f){f=void 0===f?0:f;if(ul(a,"http://www.w3.org/1999/xlink","href")){var g=Tl(a,b,c,d,e,f);c&&(g=g.U(void 0,function(){return Ul(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==ul(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Ul(k,b,c,d,e,f)));return vc(g).U(function(){return a})};function Vl(a,b,c,d,e,f,g){var h,k=(new ie).V("sidx",function(l){h=Wl(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new M(2,3,3004);}
472
- function Wl(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.J();if(0==k)throw new M(2,3,3005);if(0==g.version){var l=g.reader.J();var m=g.reader.J()}else l=g.reader.Za(),m=g.reader.Za();g.reader.skip(2);var n=g.reader.Ob();a=a+g.size+m;n=r(jb(n));for(m=n.next();!m.done;m=n.next()){var q=g.reader.J();m=(q&2147483648)>>>31;q&=2147483647;var t=g.reader.J();g.reader.skip(4);if(1==m)throw new M(2,3,3006);h.push(new tg(l/k+c,(l+t)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=t;a+=q}g.parser.stop();
473
- return h};function Xl(a){this.b=rb(a);this.a=new Q(this.b,0)}Xl.prototype.xa=function(){return this.a.xa()};
474
- function Yl(a){var b=Zl(a);if(7<b.length)throw new M(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Zl(a);a:{d=r($l);for(var e=d.next();!e.done;e=d.next())if(nb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.b.byteLength-a.a.C;else{if(8==b.length&&b[1]&224)throw new M(2,3,3001);d=0;e=r(lb(b));for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=f.item;d=0==f.Z?g&(1<<8-b.length)-1:256*d+g}b=d}b=a.a.C+b<=a.b.byteLength?b:a.b.byteLength-a.a.C;d=rb(a.b,a.a.C,
475
- b);a.a.skip(b);return new am(c,d)}function Zl(a){var b=a.a.C,c=a.a.ra();if(0==c)throw new M(2,3,3002);c=8-Math.floor(Math.log2(c));a.a.skip(c-1);return L(a.b,b,c)}var $l=[[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 am(a,b){this.id=a;this.a=b}
476
- function bm(a){if(8<a.a.byteLength)throw new M(2,3,3002);if(8==a.a.byteLength&&a.a.getUint8(0)&224)throw new M(2,3,3001);for(var b=0,c=r(jb(a.a.byteLength)),d=c.next();!d.done;d=c.next())d=a.a.getUint8(d.value),b=256*b+d;return b};function cm(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Xl(a.a);for(var n=null,q=null;a.xa();){var t=Yl(a);if(187==t.id){var v=dm(t);v&&(t=c*v.pf,v=b+v.Ve,null!=n&&m.push(new tg(n+g,t+g,l,q,v-1,f,g,h,k)),n=t,q=v)}}null!=n&&m.push(new tg(n+g,d+g,l,q,null,f,g,h,k));return m}
477
- function dm(a){var b=new Xl(a.a);a=Yl(b);if(179!=a.id)throw new M(2,3,3013);a=bm(a);b=Yl(b);if(183!=b.id)throw new M(2,3,3012);b=new Xl(b.a);for(var c=0;b.xa();){var d=Yl(b);if(241==d.id){c=bm(d);break}}return{pf:a,Ve:c}};function em(a,b){var c=Sl(a,b,"Initialization");if(!c)return null;var d=a.H.oa,e=c.getAttribute("sourceURL");e&&(d=Pb(a.H.oa,[e]));e=0;var f=null;if(c=wl(c,"range",zl))e=c.start,f=c.end;return new rg(function(){return d},e,f)}
478
- function fm(a,b){var c=Number(Rl(a,gm,"presentationTimeOffset"))||0,d=Rl(a,gm,"timescale"),e=1;d&&(e=Bl(d)||1);var f=c/e||0,g=em(a,gm);hm(a,g);var h=Bc(a);return{lb:function(){var k=Sl(h,gm,"RepresentationIndex"),l=h.H.oa;k&&(k=k.getAttribute("sourceURL"))&&(l=Pb(h.H.oa,[k]));k=im(h);return jm(h,b,g,l,k.start,k.end,f)}}}
479
- function jm(a,b,c,d,e,f,g){var h,k,l,m,n,q,t,v,z,x,A,D,B,E,H;return J(function(G){var F;if(1==G.a)return h=a.presentationTimeline,k=!a.Ra||!a.O.Jd,l=a.O.start,m=a.O.duration,n=a.H.mimeType.split("/")[1],q=b,t=null,v=[q(d,e,f),"webm"==n?q(c.pa(),c.b,c.a):null],q=null,u(G,Promise.all(v),2);z=G.b;x=z[0];A=z[1]||null;D=null;B=l-g;E=l;H=m?l+m:Infinity;if("mp4"==n)var I=Vl(x,e,d,c,B,E,H);else{I=new Xl(A);if(440786851!=Yl(I).id)throw new M(2,3,3008);var O=Yl(I);if(408125543!=O.id)throw new M(2,3,3009);I=
480
- O.a.byteOffset;O=new Xl(O.a);for(F=null;O.xa();){var ca=Yl(O);if(357149030==ca.id){F=ca;break}}if(!F)throw new M(2,3,3010);F=new Xl(F.a);ca=1E6;for(O=null;F.xa();){var S=Yl(F);if(2807729==S.id)ca=bm(S);else if(17545==S.id)if(4==S.a.byteLength)O=S.a.getFloat32(0);else if(8==S.a.byteLength)O=S.a.getFloat64(0);else throw new M(2,3,3003);}if(null==O)throw new M(2,3,3011);F=ca/1E9;F={hf:F,duration:O*F};O=F.hf;F=F.duration;ca=Yl(new Xl(x));if(475249515!=ca.id)throw new M(2,3,3007);I=cm(ca,I,O,F,d,c,B,E,
481
- H)}D=I;h.rb(D);t=new U(D);k&&t.Na(E,H,!0);return G["return"](t)})}function gm(a){return a.Pb}function im(a){var b=Sl(a,gm,"RepresentationIndex");a=Rl(a,gm,"indexRange");a=zl(a||"");b&&(a=wl(b,"range",zl,a));return a}function hm(a,b){km(a,b);if(!im(a))throw new M(2,4,4002);}function km(a,b){var c=a.H.mimeType.split("/")[1];if("text"!=a.H.contentType&&"mp4"!=c&&"webm"!=c)throw new M(2,4,4006);if("webm"==c&&!b)throw new M(2,4,4005);};function lm(a,b){var c=em(a,mm),d=nm(a);if(!d.$&&!d.timeline&&1<d.ob.length)throw new M(2,4,4002);if(!d.$&&!a.O.duration&&!d.timeline&&1==d.ob.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.ma.id&&a.H.id&&(f=a.ma.id+","+a.H.id,e=b[f]);c=om(a.O.start,a.O.duration,a.H.oa,d,c);d=!e;e?e.pb(c,a.presentationTimeline.Ia()):(a.presentationTimeline.rb(c),e=new U(c),f&&a.Ra&&(b[f]=e));a.Ra&&a.O.Jd||e.Na(a.O.start,a.O.duration?a.O.start+a.O.duration:
482
- Infinity,d);return{lb:function(){return Promise.resolve(e)}}}function mm(a){return a.Pa}function nm(a){var b=pm(a);a=Ql(a,mm);var c=a.ub;0==c&&(c=1);var d=0;a.$?d=a.$*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{$:a.$,startTime:d,ub:c,Ka:a.Ka,timeline:a.timeline,ob:b}}
483
- function om(a,b,c,d,e){var f=d.ob.length;d.timeline&&d.timeline.length!=d.ob.length&&(f=Math.min(d.timeline.length,d.ob.length));var g=a-d.Ka,h=b?a+b:Infinity,k=[],l=d.startTime,m={};f=r(jb(f));for(var n=f.next();!n.done;m={Fc:m.Fc},n=f.next()){n=n.value;var q=d.ob[n];m.Fc=Pb(c,[q.Oe]);var t=void 0;t=null!=d.$?l+d.$:d.timeline?d.timeline[n].end:l+b;k.push(new tg(a+l,a+t,function(v){return function(){return v.Fc}}(m),q.start,q.end,e,g,a,h));l=t}return k}
484
- function pm(a){return[a.H.Pa,a.ba.Pa,a.ma.Pa].filter(Nb).map(function(b){return rl(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Hd&&(a.Hd=!0);var c=b.getAttribute("media");b=wl(b,"mediaRange",zl,{start:0,end:null});return{Oe:c,start:b.start,end:b.end}})};function qm(a,b,c,d,e){var f=rm(a),g=sm(a);tm(g);var h=Bc(a);if(g.Kb)return km(a,f),{lb:function(){var t=Pl(g.Kb,h.H.id,null,h.bandwidth||null,null);t=Pb(h.H.oa,[t]);return jm(h,b,f,t,0,null,g.Ka)}};if(g.$)return d||(a.presentationTimeline.bd(g.$),a.presentationTimeline.cd(a.O.start)),{lb:function(){return um(h,g,e,f)}};var k=null;d=null;a.ma.id&&a.H.id&&(d=a.ma.id+","+a.H.id,k=c[d]);var l=vm(h,g,f),m=a.O.start,n=a.O.duration?a.O.start+a.O.duration:Infinity,q=Infinity!=n;k?(q&&(new U(l)).Na(m,n,!0),
485
- k.pb(l,a.presentationTimeline.Ia())):(a.presentationTimeline.rb(l),k=new U(l),d&&a.Ra&&(c[d]=k));q&&k.Na(m,n);return{lb:function(){return Promise.resolve(k)}}}function wm(a){return a.Qb}function sm(a){var b=Ql(a,wm),c=Rl(a,wm,"media");a=Rl(a,wm,"index");return{$:b.$,timescale:b.timescale,ub:b.ub,Ka:b.Ka,wd:b.wd,timeline:b.timeline,$c:c,Kb:a}}
486
- function tm(a){var b=a.Kb?1:0;b+=a.timeline?1:0;b+=a.$?1:0;if(0==b)throw new M(2,4,4002);1!=b&&(a.Kb&&(a.timeline=null),a.$=null);if(!a.Kb&&!a.$c)throw new M(2,4,4002);}
487
- function um(a,b,c,d){function e(G){var F=(G-n)*m,I=F+b.Ka;F+=h;return new tg(F,Math.min(F+m,l),function(){var O=Pl(t,z,G,v,I*q);return Pb(x,[O])},0,null,d,A,h,l)}function f(){var G=[Math.max(g.Ia(),h),Math.min(g.Ha(),l)].map(function(F){return F-h});return[Math.ceil(G[0]/m),Math.ceil(G[1]/m)-1].map(function(F){return F+n})}var g=a.presentationTimeline,h=a.O.start,k=a.O.duration,l=k?h+k:Infinity,m=b.$,n=b.ub,q=b.timescale,t=b.$c,v=a.bandwidth||null,z=a.H.id,x=a.H.oa,A=h-b.Ka;k=f();a=a.Ra?Math.max(k[0],
488
- k[1]-c+1):k[0];c=k[1];k=[];for(var D=a;D<=c;++D){var B=e(D);k.push(B)}var E=new U(k);if(g.Ha()<l){var H=Math.max(a,c+1);E.wc(m,function(){E.Sa(g.Ia());var G=r(f());G.next();G=G.next().value;for(var F=[];H<=G;){var I=e(H);F.push(I);H++}return g.Ha()>=l&&!F.length?null:F})}return Promise.resolve(E)}
489
- function vm(a,b,c){var d=a.O.start,e=a.O.duration,f=d-b.Ka;e=e?d+e:Infinity;for(var g=[],h={},k=r(lb(b.timeline)),l=k.next();!l.done;h={Ec:h.Ec,Gc:h.Gc,Jc:h.Jc,Bc:h.Bc,Kc:h.Kc,Cc:h.Cc},l=k.next()){l=l.value;var m=l.item,n=m.start,q=m.nf;m=m.end;h.Jc=l.Z+b.ub;h.Kc=q+b.wd;h.Gc=a.H.id;h.Bc=a.bandwidth||null;h.Ec=b.$c;h.Cc=a.H.oa;g.push(new tg(d+n,d+m,function(t){return function(){var v=Pl(t.Ec,t.Gc,t.Jc,t.Bc||null,t.Kc);return Pb(t.Cc,[v]).map(function(z){return z.toString()})}}(h),0,null,c,f,d,e))}return g}
490
- function rm(a){var b=Rl(a,wm,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.oa;return new rg(function(){var f=Pl(b,c,null,d,null);return Pb(e,[f])},0,null)};function xm(){this.f=[];this.a=[];this.b=[];this.c=[];this.g=new Set}xm.prototype.release=function(){for(var a=r(this.a.concat(this.b,this.c)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.a=[];this.b=[];this.c=[];this.f=[]};
491
- function ym(a,b,c){var d,e,f,g,h,k,l,m,n,q,t,v,z,x,A,D,B,E,H,G,F,I,O,ca,S,Na,Z,Da,Sa,Ha;return J(function(Aa){switch(Aa.a){case 1:d=Rb;zm(b);Am(b);Bm(b);if(!c&&1==b.length){e=b[0];a.a=e.ec;a.b=e.yc;a.c=e.textStreams;Aa.s(2);break}f=-1;g=r(lb(b));for(h=g.next();!h.done;h=g.next())l=k=h.value,m=l.Z,n=l.item,a.g.has(n.id)||(a.g.add(n.id),-1==f&&(f=m));if(-1==f)return Aa["return"]();q=b.map(function(ya){return ya.ec});t=b.map(function(ya){return ya.yc});v=b.map(function(ya){return ya.textStreams});z=
492
- r(v);for(x=z.next();!x.done;x=z.next())A=x.value,A.push(Cm());return u(Aa,Dm(a.a,q,f,Em,Fm),3);case 3:return u(Aa,Dm(a.b,t,f,Em,Fm),4);case 4:return u(Aa,Dm(a.c,v,f,Em,Fm),2);case 2:D=0;B=[];if(a.b.length&&a.a.length)for(O=r(a.a),ca=O.next();!ca.done;ca=O.next())for(S=ca.value,Na=r(a.b),Z=Na.next();!Z.done;Z=Na.next())Da=Z.value,Sa=de(S.drmInfos,Da.drmInfos),S.drmInfos.length&&Da.drmInfos.length&&!Sa.length||(Ha=D++,B.push({id:Ha,language:S.language,primary:S.primary,audio:S,video:Da,bandwidth:(S.bandwidth||
493
- 0)+(Da.bandwidth||0),drmInfos:Sa,allowedByApplication:!0,allowedByKeySystem:!0}));else for(E=a.b.concat(a.a),H=r(E),G=H.next();!G.done;G=H.next())F=G.value,I=D++,B.push({id:I,language:F.language,primary:F.primary,audio:F.type==d.Qa?F:null,video:F.type==d.Ea?F:null,bandwidth:F.bandwidth||0,drmInfos:F.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0});a.f=B;w(Aa)}})}
494
- function zm(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.ec),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&Ec(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.ec=c}}
495
- function Bm(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&Ec(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
496
- function Am(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.yc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&Ec(e.roles,h.roles)&&ed(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.yc=c}}
497
- function Gm(a){var b,c,d,e,f,g,h,k,l,m,n,q,t,v,z,x,A,D,B,E,H,G;return J(function(F){switch(F.a){case 1:b=Rb;if(1==a.length)return F["return"](a[0]);c=a.map(function(I){return I.filter(function(O){return O.type==b.Qa})});d=a.map(function(I){return I.filter(function(O){return O.type==b.Ea})});e=a.map(function(I){return I.filter(function(O){return O.type==b.aa})});f=r(e);for(g=f.next();!g.done;g=f.next())h=g.value,h.push({id:0,originalId:"",primary:!1,type:"text",mimeType:"",codecs:"",language:"",label:null,
498
- width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null});return u(F,Dm([],c,0,Hm,Im),2);case 2:return k=F.b,u(F,Dm([],d,0,Hm,Im),3);case 3:return l=F.b,u(F,Dm([],e,0,Hm,Im),4);case 4:m=F.b;n=0;if(l.length&&k.length)for(x=r(k),A=x.next();!A.done;A=x.next())for(D=A.value,B=r(l),E=B.next();!E.done;E=B.next())H=E.value,G=n++,H.variantIds.push(G),D.variantIds.push(G);else for(q=l.concat(k),t=r(q),v=t.next();!v.done;v=
499
- t.next())z=v.value,z.variantIds=[n++];return F["return"](l.concat(k,m))}})}
500
- function Dm(a,b,c,d,e){var f,g,h,k,l,m,n,q,t,v,z,x,A,D,B,E,H,G,F,I,O,ca,S,Na;return J(function(Z){switch(Z.a){case 1:f=Rb;g=[];h=r(lb(b));for(k=h.next();!k.done;k=h.next())m=l=k.value,n=m.Z,q=m.item,n>=c?g.push(new Set(q)):g.push(new Set);t=r(a);v=t.next();case 2:if(v.done){Z.s(4);break}z=v.value;return u(Z,Jm(z,b,c,e,g),5);case 5:x=Z.b;if(!x)throw new M(2,4,4037);v=t.next();Z.s(2);break;case 4:A=r(g),D=A.next();case 6:if(D.done){Z.s(8);break}B=D.value;E=r(B);H=E.next();case 9:if(H.done){D=A.next();
501
- Z.s(6);break}G=H.value;return u(Z,Km(G,b,d,e,g),12);case 12:(F=Z.b)&&a.push(F);H=E.next();Z.s(9);break;case 8:I=r(g);for(D=I.next();!D.done;D=I.next())for(O=D.value,ca={},S=r(O),H=S.next();!H.done;ca={hb:ca.hb},H=S.next())if(ca.hb=H.value,ca.hb.type!=f.aa||ca.hb.language)if(Na=a.some(function(Da){return function(Sa){return Sa.mimeType==Da.hb.mimeType&&id(Sa.codecs)==id(Da.hb.codecs)}}(ca)))throw new M(2,4,4037);return Z["return"](a)}})}
502
- function Jm(a,b,c,d,e){var f;return J(function(g){if(1==g.a)return(f=Lm(b,a))?u(g,Promise.all(f.map(function(h){return h.createSegmentIndex()})),2):g["return"](!1);Mm(a,f,c,d,e);return g["return"](!0)})}function Km(a,b,c,d,e){var f,g;return J(function(h){if(1==h.a)return f=c(a),(g=Lm(b,f))?f.createSegmentIndex?u(h,Promise.all(g.map(function(k){return k.createSegmentIndex()})),2):h.s(2):h["return"](null);Mm(f,g,0,d,e);return h["return"](f)})}
503
- function Mm(a,b,c,d,e){b=r(lb(b));for(var f=b.next();!f.done;f=b.next()){var g=f.value;f=g.Z;g=g.item;if(f>=c){d(a,g);var h=!0;"audio"==a.type&&0==Bf(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}}function Em(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Ug;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}
504
- function Hm(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
505
- function Fm(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(ia(a.keyIds).concat(ia(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=de(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||
506
- (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.g.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Em(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),Fm(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Fm(a.trickModeVideo,b)}
507
- function Im(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set(ia(a.keyIds).concat(ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
508
- function Lm(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Nm,video:Nm,text:Om}[f.type],h={audio:Pm,video:Qm,text:Rm}[f.type],k=null;e=r(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return null;c.push(f)}return c}function Nm(a,b){var c;if(!(c=b.mimeType!=a.mimeType||id(b.codecs)!=id(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<de(c,d).length:1)}return c?!1:!0}
509
- function Om(a,b){return a.language?b.language?0==Bf(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}
510
- function Pm(a,b,c){if(a.id==c.id)return!0;var d=Bf(a.language,b.language),e=Bf(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;
511
- d=Sm(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Tm)return!0;if(d==Um)return!1;d=Sm(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Tm?!0:d==Um?!1:a.bandwidth&&Vm(a.bandwidth,b.bandwidth,c.bandwidth)==Tm?!0:!1}
512
- function Qm(a,b,c){if(a.id==c.id)return!0;var d=Sm(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Tm)return!0;if(d==Um)return!1;if(a.frameRate){d=Sm(a.frameRate,b.frameRate,c.frameRate);if(d==Tm)return!0;if(d==Um)return!1}return a.bandwidth&&Vm(a.bandwidth,b.bandwidth,c.bandwidth)==Tm?!0:!1}
513
- function Rm(a,b,c){if(a.id==c.id)return!0;var d=Bf(a.language,b.language),e=Bf(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!=
514
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Cm(){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null}}
515
- function Sm(a,b,c){if(b==a&&a!=c)return Um;if(c==a&&a!=b)return Tm;if(b>a){if(c<=a||c-a<b-a)return Tm;if(c-a>b-a)return Um}else{if(c>a)return Um;if(a-c<a-b)return Tm;if(a-c>a-b)return Um}return Wm}function Vm(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Tm:b<a?Um:Wm}var Tm=1,Wm=0,Um=-1;function Xm(){var a=this;this.u=this.i=null;this.b=[];this.o=null;this.m=1;this.c={};this.a=new xm;this.h=0;this.j=new Pa(5);this.g=new N(function(){a.Lb()});this.f=new Gc}p=Xm.prototype;p.configure=function(a){this.i=a};p.start=function(a,b){var c=this,d;return J(function(e){if(1==e.a)return c.b=[a],c.u=b,u(e,Ym(c),2);d=e.b;c.u&&Zm(c,d);if(!c.u)throw new M(2,7,7001);return e["return"](c.o)})};
516
- p.stop=function(){for(var a=r(Object.values(this.c)),b=a.next();!b.done;b=a.next())b.value.release();this.a&&this.a.release();this.i=this.u=null;this.b=[];this.o=null;this.c={};this.a=null;null!=this.g&&(this.g.stop(),this.g=null);return this.f.destroy()};p.update=function(){var a=this,b;return J(function(c){if(1==c.a)return y(c,2),u(c,Ym(a),4);if(2!=c.a)return ua(c,0);b=C(c);if(!a.u||!b)return c["return"]();a.u.onError(b);w(c)})};p.onExpirationUpdated=function(){};
517
- function Ym(a){var b,c,d,e,f,g,h;return J(function(k){if(1==k.a)return b=Mc(a.b,a.i.retryParameters),c=a.u.networkingEngine,d=Date.now(),e=c.request(0,b),Hc(a.f,e),u(k,e.promise,2);if(3!=k.a){f=k.b;if(!a.u)return k["return"](0);f.uri&&!a.b.includes(f.uri)&&a.b.unshift(f.uri);return u(k,$m(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;Qa(a.j,1,h);return k["return"](h)})}
518
- function $m(a,b,c){var d,e,f,g;return J(function(h){if(1==h.a){d=Fl(b,"MPD");if(!d)throw new M(2,4,4001,c);e=a.i.dash.xlinkFailGracefully;f=Ul(d,a.i.retryParameters,e,c,a.u.networkingEngine);Hc(a.f,f);return u(h,f.promise,2)}g=h.b;return h["return"](an(a,g,c))})}
519
- function an(a,b,c){var d,e,f,g,h,k,l,m,n,q,t,v,z,x,A,D,B,E,H,G,F,I,O,ca,S,Na;return J(function(Z){switch(Z.a){case 1:d=[c];e=rl(b,"Location").map(vl).filter(Nb);0<e.length&&(f=Pb(d,e),d=a.b=f);g=rl(b,"BaseURL").map(vl);h=Pb(d,g);k=a.i.dash.ignoreMinBufferTime;l=0;k||(l=wl(b,"minBufferTime",yl)||0);a.h=wl(b,"minimumUpdatePeriod",yl,-1);m=wl(b,"availabilityStartTime",xl);n=wl(b,"timeShiftBufferDepth",yl);q=a.i.dash.ignoreSuggestedPresentationDelay;t=null;q||(t=wl(b,"suggestedPresentationDelay",yl));
520
- v=wl(b,"maxSegmentDuration",yl);z=b.getAttribute("type")||"static";if(a.o)for(x=a.o.presentationTimeline,A=r(Object.values(a.c)),D=A.next();!D.done;D=A.next())B=D.value,B.Sa(x.Ia());else E=a.i.defaultPresentationDelay||1.5*l,H=null!=t?t:E,x=new T(m,H,a.i.dash.autoCorrectDrift);G={Ra:"static"!=z,presentationTimeline:x,ma:null,O:null,ba:null,H:null,bandwidth:0,Hd:!1};var Da=wl(b,"mediaPresentationDuration",yl),Sa=[],Ha=0,Aa=rl(b,"Period");Aa=r(lb(Aa));for(var ya=Aa.next();!ya.done;ya=Aa.next()){var Za=
521
- ya.value;ya=Za.item;Za=Za.next;Ha=wl(ya,"start",yl,Ha);var ud=wl(ya,"duration",yl),fb=null;if(Za){var vd=wl(Za,"start",yl);null!=vd&&(fb=vd-Ha)}else null!=Da&&(fb=Da-Ha);null==fb&&(fb=ud);ya=bn(a,G,h,{start:Ha,duration:fb,node:ya,Jd:null==fb||!Za});Sa.push(ya);if(null==fb){Ha=null;break}Ha+=fb}F=null!=Da?{periods:Sa,duration:Da,Cd:!1}:{periods:Sa,duration:Ha,Cd:!0};I=F.duration;O=F.periods;x.Rb("static"==z);"static"!=z&&F.Cd||x.Aa(I||Infinity);(ca=x.S())&&!isNaN(a.i.availabilityWindowOverride)&&(n=
522
- a.i.availabilityWindowOverride);null==n&&(n=Infinity);x.rd(n);x.bd(v||1);return u(Z,ym(a.a,O,G.Ra),2);case 2:if(a.o){a.o.variants=a.a.f;a.o.textStreams=a.a.c;Z.s(3);break}a.o={presentationTimeline:x,variants:a.a.f,textStreams:a.a.c,offlineSessionIds:[],minBufferTime:l||0};if(!x.ae()){Z.s(3);break}S=rl(b,"UTCTiming");return u(Z,cn(a,h,S),5);case 5:Na=Z.b;if(!a.u)return Z["return"]();x.Xd(Na);case 3:return a.u.makeTextStreamsForClosedCaptions(a.o),u(Z,a.u.filter(a.o),0)}})}
523
- function bn(a,b,c,d){b.ma=dn(d.node,null,c);b.O=d;b.ma.id||(b.ma.id="__shaka_period_"+d.start);c=rl(d.node,"EventStream");c=r(c);for(var e=c.next();!e.done;e=c.next())en(a,d.start,d.duration,e.value);c=rl(d.node,"AdaptationSet").map(function(m){return fn(a,b,m)}).filter(Nb);if(b.Ra){d=[];e=r(c);for(var f=e.next();!f.done;f=e.next()){f=r(f.value.Ye);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.ud});c=c.filter(function(m){return m.ud});
524
- c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ud.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={Yb:h.Yb},l=k.next())h.Yb=l.value,h.Yb.trickModeVideo=e.streams.find(function(m){return function(n){return id(m.Yb.codecs)==id(n.codecs)}}(h))}}}e=a.i.disableAudio?[]:gn(d,"audio");f=a.i.disableVideo?[]:gn(d,"video");c=a.i.disableText?[]:gn(d,"text");if(!f.length&&!e.length)throw new M(2,4,4004);d=[];
525
- e=r(e);for(g=e.next();!g.done;g=e.next())d.push.apply(d,ia(g.value.streams));e=[];f=r(f);for(g=f.next();!g.done;g=f.next())e.push.apply(e,ia(g.value.streams));f=[];c=r(c);for(g=c.next();!g.done;g=c.next())f.push.apply(f,ia(g.value.streams));return{id:b.ma.id,ec:d,yc:e,textStreams:f}}function gn(a,b){return a.filter(function(c){return c.contentType==b})}
526
- function fn(a,b,c){b.ba=dn(c,b.ma,null);if("image"==b.ba.contentType)return null;var d=!1,e=rl(c,"Role"),f=e.map(function(B){return B.getAttribute("value")}).filter(Nb),g=void 0,h="text"==b.ba.contentType;h&&(g="subtitle");e=r(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=rl(c,"EssentialProperty");e=null;k=!1;l=r(l);for(var m=
527
- l.next();!m.done;m=l.next())m=m.value,"http://dashif.org/guidelines/trickmode"==m.getAttribute("schemeIdUri")?e=m.getAttribute("value"):k=!0;l=rl(c,"Accessibility");var n=new Map;l=r(l);for(m=l.next();!m.done;m=l.next()){var q=m.value;m=q.getAttribute("schemeIdUri");q=q.getAttribute("value");if("urn:scte:dash:cc:cea-608:2015"==m||"urn:scte:dash:cc:cea-708:2015"==m)if(m=1,null!=q){q=r(q.split(";"));for(var t=q.next();!t.done;t=q.next()){var v=t.value,z=t=void 0;v.includes("=")?(v=v.split("="),t=v[0].startsWith("CC")?
528
- v[0]:"CC"+v[0],z=v[1].split(",")[0].split(":").pop()):(t="CC"+m,m+=2,z=v);n.set(t,R(z))}}else n.set("CC1","und");else"urn:mpeg:dash:role:2011"==m&&null!=q&&(f.push(q),"captions"==q&&(g="caption"))}if(k)return null;k=rl(c,"ContentProtection");var x=Gl(k,a.i.dash.ignoreDrmInfo),A=R(c.getAttribute("lang")||"und"),D=c.getAttribute("label");(k=rl(c,"Label"))&&k.length&&(k=k[0],k.textContent&&(D=k.textContent));k=rl(c,"Representation");c=k.map(function(B){return hn(a,b,x,g,A,D,d,f,n,B)}).filter(function(B){return!!B});
529
- if(0==c.length){if(a.i.dash.ignoreEmptyAdaptationSet||h)return null;throw new M(2,4,4003);}if(!b.ba.contentType||"application"==b.ba.contentType)for(b.ba.contentType=jn(c[0].mimeType,c[0].codecs),h=r(c),l=h.next();!l.done;l=h.next())l.value.type=b.ba.contentType;h=r(c);for(l=h.next();!l.done;l=h.next())for(l=l.value,m=r(x.drmInfos),q=m.next();!q.done;q=m.next())q=q.value,q.keyIds=q.keyIds&&l.keyIds?new Set(ia(q.keyIds).concat(ia(l.keyIds))):q.keyIds||l.keyIds;h=k.map(function(B){return B.getAttribute("id")}).filter(Nb);
530
- return{id:b.ba.id||"__fake__"+a.m++,contentType:b.ba.contentType,language:A,Qf:d,streams:c,drmInfos:x.drmInfos,ud:e,Ye:h}}
531
- function hn(a,b,c,d,e,f,g,h,k,l){b.H=dn(l,b.ba,null);if(!kn(b.H))return null;var m=b.O.start;b.bandwidth=wl(l,"bandwidth",Bl)||0;var n=b.H.contentType;n="text"==n||"application"==n;try{var q=function(A,D,B){return ln(a,A,D,B)};if(b.H.Pb)var t=fm(b,q);else if(b.H.Pa)t=lm(b,a.c);else if(b.H.Qb)t=qm(b,q,a.c,!!a.o,a.i.dash.initialSegmentLimit);else{var v=b.H.oa,z=b.O.duration||0;t={lb:function(){return Promise.resolve(Tg(m,z,v))}}}}catch(A){if(n&&4002==A.code)return null;throw A;}n=rl(l,"ContentProtection");
532
- n=Kl(n,c,a.i.dash.ignoreDrmInfo);n=new Set(n?[n]:[]);rl(l,"SupplementalProperty").some(function(A){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==A.getAttribute("schemeIdUri")&&"JOC"==A.getAttribute("value")})&&(b.H.mimeType="audio/eac3-joc");var x={id:a.m++,originalId:b.H.id,createSegmentIndex:function(){var A;return J(function(D){if(1==D.a){if(x.segmentIndex)return D.s(0);A=x;return u(D,t.lb(),3)}A.segmentIndex=D.b;w(D)})},segmentIndex:null,mimeType:b.H.mimeType,codecs:b.H.codecs,frameRate:b.H.frameRate,
533
- pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,label:f,type:b.ba.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.H.emsgSchemeIdUris,roles:h,channelsCount:b.H.dd,audioSamplingRate:b.H.audioSamplingRate,closedCaptions:k};return x}
534
- p.Lb=function(){var a=this,b,c;return J(function(d){switch(d.a){case 1:return b=0,y(d,2),u(d,Ym(a),4);case 4:b=d.b;ua(d,3);break;case 2:c=C(d),a.u&&(c.severity=1,a.u.onError(c));case 3:if(!a.u)return d["return"]();Zm(a,b);w(d)}})};function Zm(a,b){0>a.h||a.g.R(Math.max(3,a.h-b,Ra(a.j)))}
535
- function dn(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,dd:null,audioSamplingRate:null};c=c||b.oa;var d=rl(a,"BaseURL").map(vl),e=a.getAttribute("contentType")||b.contentType,f=a.getAttribute("mimeType")||b.mimeType,g=a.getAttribute("codecs")||b.codecs,h=wl(a,"frameRate",Dl)||b.frameRate,k=a.getAttribute("sar")||b.pixelAspectRatio,l=rl(a,"InbandEventStream"),m=b.emsgSchemeIdUris.slice();l=r(l);for(var n=l.next();!n.done;n=l.next())n=
536
- n.value.getAttribute("schemeIdUri"),m.includes(n)||m.push(n);l=rl(a,"AudioChannelConfiguration");l=mn(l)||b.dd;n=wl(a,"audioSamplingRate",Cl)||b.audioSamplingRate;e||(e=jn(f,g));return{oa:Pb(c,d),Pb:ql(a,"SegmentBase")||b.Pb,Pa:ql(a,"SegmentList")||b.Pa,Qb:ql(a,"SegmentTemplate")||b.Qb,width:wl(a,"width",Cl)||b.width,height:wl(a,"height",Cl)||b.height,contentType:e,mimeType:f,codecs:g,frameRate:h,pixelAspectRatio:k,emsgSchemeIdUris:m,id:a.getAttribute("id"),dd:l,audioSamplingRate:n}}
537
- function mn(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":if(b=
538
- parseInt(c,16)){for(a=0;b;)b&1&&++a,b>>=1;return a}}}return null}function kn(a){var b=a.Pb?1:0;b+=a.Pa?1:0;b+=a.Qb?1:0;if(0==b)return"text"==a.contentType||"application"==a.contentType?!0:!1;1!=b&&(a.Pb&&(a.Pa=null),a.Qb=null);return!0}
539
- function nn(a,b,c,d){var e,f,g,h,k,l;return J(function(m){if(1==m.a)return e=Pb(b,[c]),f=Mc(e,a.i.retryParameters),f.method=d,g=a.u.networkingEngine.request(4,f),Hc(a.f,g),u(m,g.promise,2);h=m.b;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=Vb(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
540
- function cn(a,b,c){var d,e,f,g,h,k,l,m;return J(function(n){switch(n.a){case 1:d=c.map(function(q){return{scheme:q.getAttribute("schemeIdUri"),value:q.getAttribute("value")}}),e=a.i.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){n.s(4);break}h=g.value;y(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.s(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.s(8);
541
- 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.s(9);break;case 7:return u(n,nn(a,b,l,"HEAD"),10);case 10:return n["return"](n.b);case 8:return u(n,nn(a,b,l,"GET"),11);case 11:return n["return"](n.b);
542
- case 9:ua(n,3);break;case 5:C(n);case 3:g=f.next();n.s(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)}})}
543
- function en(a,b,c,d){var e=d.getAttribute("schemeIdUri")||"",f=d.getAttribute("value")||"",g=wl(d,"timescale",Cl)||1;d=r(rl(d,"Event"));for(var h=d.next();!h.done;h=d.next()){h=h.value;var k=wl(h,"presentationTime",Cl)||0,l=wl(h,"duration",Cl)||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.u.onTimelineRegionAdded(h)}}
544
- function ln(a,b,c,d){var e,f,g,h,k;return J(function(l){if(1==l.a)return e=Sc,f=fh(b,c,d,a.i.retryParameters),g=a.u.networkingEngine,h=g.request(e,f),Hc(a.f,h),u(l,h.promise,2);k=l.b;return l["return"](k.data)})}function jn(a,b){return We(fd(a,b))?"text":a.split("/")[0]}K("shaka.dash.DashParser",Xm);pg.mpd=function(){return new Xm};ng["application/dash+xml"]=function(){return new Xm};ng["video/vnd.mpeg.dash.mpd"]=function(){return new Xm};function on(a,b,c,d){this.a=a;this.type=b;this.W=c;this.segments=d||null}function pn(a,b,c,d){this.id=a;this.name=b;this.a=c;this.value=void 0===d?null:d}pn.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.a?this.a.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
545
- pn.prototype.getAttribute=function(a){var b=this.a.filter(function(c){return c.name==a});return b.length?b[0]:null};function qn(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function rn(a,b){var c=a.getAttribute(b);if(!c)throw new M(2,4,4023,b);return c.value}function sn(a,b){this.W=b;this.a=a}function tn(a,b){this.name=a;this.value=b};function un(a,b){return a.filter(function(c){return c.name==b})}function vn(a,b){return a.filter(function(c){return rn(c,"TYPE")==b})}function wn(a,b){var c=un(a,b);return c.length?c[0]:null}function xn(a,b,c){c=void 0===c?0:c;return(a=wn(a,b))?Number(a.value):c};function yn(a){this.b=a;this.a=0}function zn(a){An(a,/[ \t]+/gm)}function An(a,b){b.lastIndex=a.a;var c=b.exec(a.b);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.a==a.b.length||null==c||c.position!=a.a)return null;a.a+=c.length;return c.results}function Bn(a){return a.a==a.b.length?null:(a=An(a,/[^ \t\n]*/gm))?a[0]:null};function Cn(){this.a=0}
546
- function Dn(a,b,c){b=Vb(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=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=En(a.a++,g),--a.a,Fn.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;g=r(lb(d));for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=k.Z;var l=k.item;k=k.next;if(/^#(?!EXT)/m.test(l)||e)e=!1;else{l=En(a.a++,
547
- l);if(Gn.includes(l.name)){if(1!=b)throw new M(2,4,4017);l=d.splice(h,d.length-h);d=c;e=[];g=[];h=null;l=r(l);for(k=l.next();!k.done;k=l.next())k=k.value,/^(#EXT)/.test(k)?(k=En(a.a++,k),Fn.includes(k.name)?f.push(k):"EXT-X-MAP"==k.name?h=k:g.push(k)):/^#(?!EXT)/m.test(k)||(k=Pb([d],[k.trim()])[0],h&&g.push(h),e.push(new sn(k,g)),g=[]);return new on(c,b,f,e)}f.push(l);"EXT-X-STREAM-INF"==l.name&&(l.a.push(new tn("URI",k)),e=!0)}}return new on(c,b,f)}
548
- function En(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 yn(e);var g;(g=An(e,/^([^,=]+)(?:,|$)/g))&&(f=g[1]);for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=An(e,h);)c.push(new tn(g[1],g[2]||g[3]))}return new pn(a,d,c,f)}var Fn="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),Gn="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Hn(){}function In(a){try{var b=Jn(a);return tc({uri:a,Qd:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return rc(c)}}function Jn(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=ec(a):e=Zb(a);return{data:e,contentType:c}}
549
- K("shaka.net.DataUriPlugin",Hn);Hn.parse=In;Jc("data",In);function Kn(){var a=this;this.i=this.u=null;this.Da=1;this.j=new Map;this.g=new Map;this.ua=new Set;this.b=new Map;this.a=null;this.K="";this.G=new Cn;this.ea=0;this.h=new N(function(){a.Lb()});this.c=Ln;this.o=null;this.M=0;this.T=Infinity;this.m=new Gc;this.X=[];this.A=new Map;this.Ca=!1;this.f=new Map;this.D=null;this.I=new Map;this.v=new Map}p=Kn.prototype;p.configure=function(a){this.i=a};
550
- p.start=function(a,b){var c=this,d,e;return J(function(f){if(1==f.a)return c.u=b,u(f,Mn(c,Mc([a],c.i.retryParameters),0),2);if(3!=f.a)return d=f.b,c.K=d.uri,u(f,Nn(c,d.data),3);e=c.ea;0<e&&c.h.R(e);return f["return"](c.o)})};p.stop=function(){this.h&&(this.h.stop(),this.h=null);var a=[];this.m&&(a.push(this.m.destroy()),this.m=null);this.i=this.u=null;this.ua.clear();this.o=null;this.b.clear();this.g.clear();this.f.clear();this.j.clear();return Promise.all(a)};
551
- p.update=function(){var a=this,b,c,d;return J(function(e){if(1==e.a){if(a.c==Ln)return e["return"]();b=[];a.D=null;c=Array.from(a.b.values());return c.length?u(e,On(a,c[0]),2):e.s(2)}for(d=1;d<c.length;d++)b.push(On(a,c[d]));return u(e,Promise.all(b),0)})};
552
- function On(a,b){var c,d,e,f,g,h,k,l,m,n;return J(function(q){if(1==q.a)return c=Pn,d=b.fe,u(q,Mn(a,Mc([d],a.i.retryParameters),0),2);if(3!=q.a){e=q.b;f=Dn(a.G,e.data,e.uri);if(1!=f.type)throw new M(2,4,4017);g=un(f.W,"EXT-X-DEFINE");h=Qn(a,g);k=b.stream;return u(q,Rn(a,b.xc,f,k.mimeType,b.Kd,h),3)}l=q.b;k.segmentIndex.pb(l,a.a.Ia());l.length&&k.segmentIndex.Sa(l[0].startTime);m=l[l.length-1];if(n=wn(f.W,"EXT-X-ENDLIST"))Sn(a,c.de),a.a.Aa(m.endTime);w(q)})}p.onExpirationUpdated=function(){};
553
- function Nn(a,b){var c,d,e,f,g,h,k,l,m,n,q,t,v,z,x;return J(function(A){switch(A.a){case 1:c=Dn(a.G,b,a.K);if(0!=c.type)throw new M(2,4,4022);d=un(c.W,"EXT-X-DEFINE");for(var D=r(d),B=D.next();!B.done;B=D.next()){var E=B.value;B=qn(E,"NAME");E=qn(E,"VALUE");B&&E&&(a.j.has(B)||a.j.set(B,E))}e=un(c.W,"EXT-X-MEDIA");f=un(c.W,"EXT-X-STREAM-INF");D=r(f);for(B=D.next();!B.done;B=D.next()){var H=B.value;E=qn(H,"AUDIO");B=qn(H,"VIDEO");var G=qn(H,"SUBTITLES");H=Tn(a,H);if(G){var F=Un("text",H);a.f.set(G,
554
- F);Dc(H,F)}E&&(G=Vn("audio",H),a.f.set(E,G));B&&(E=Vn("video",H),a.f.set(B,E))}return u(A,Wn(a,e),2);case 2:D=vn(e,"CLOSED-CAPTIONS");D=r(D);for(B=D.next();!B.done;B=D.next())G=B.value,B=Xn(G),E=rn(G,"GROUP-ID"),G=rn(G,"INSTREAM-ID"),a.A.get(E)||a.A.set(E,new Map),a.A.get(E).set(G,B);return u(A,Yn(a,f),3);case 3:return g=A.b,u(A,Zn(a,e),4);case 4:h=A.b;if(!a.u)throw new M(2,7,7001);if(a.Ca&&0==g.length)throw new M(2,4,4034);l=k=Infinity;m=r(a.b.values());for(n=m.next();!n.done;n=m.next())q=n.value,
555
- k=Math.min(k,q.Ld),"text"!=q.stream.type&&(l=Math.min(l,q.Ne-q.Ld));a.c!=Ln?(a.a=new T(0,a.i.defaultPresentationDelay||3*a.M),a.a.Rb(!1)):(a.a=new T(null,0),a.a.Rb(!0));$n(a);if(a.c!=Ln)a.ea=a.T,t=Pn,a.c==t.ce&&(v=a.a.uc,isNaN(a.i.availabilityWindowOverride)||(v=a.i.availabilityWindowOverride),a.a.rd(v));else for(a.a.Aa(l),a.a.offset(-k),z=r(a.b.values()),n=z.next();!n.done;n=z.next())x=n.value,x.stream.segmentIndex.offset(-k),x.stream.segmentIndex.Na(0,l);a.o={presentationTimeline:a.a,variants:g,
556
- textStreams:h,offlineSessionIds:[],minBufferTime:0};a.u.makeTextStreamsForClosedCaptions(a.o);return u(A,a.u.filter(a.o),0)}})}function Qn(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=qn(f,"NAME");var g=qn(f,"VALUE");f=qn(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.j.get(f))&&c.set(f,e)}return c}
557
- function Zn(a,b){var c,d,e,f,g,h,k,l,m,n,q,t;return J(function(v){if(1==v.a)return c=vn(b,"SUBTITLES"),d=c.map(function(z){var x,A,D;return J(function(B){if(1==B.a){if(x=a.i.disableText)return B["return"](null);y(B,2);return u(B,ao(a,z),4)}if(2!=B.a)return A=B.b,B["return"](A.stream);D=C(B);if(a.i.hls.ignoreTextStreamFailures)return B["return"](null);throw D;})}),u(v,Promise.all(d),2);e=v.b;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=rn(h,"GROUP-ID"),l=a.f.get(k))if(m=a.g.get(k))for(n=
558
- r(m),q=n.next();!q.done;q=n.next())t=q.value,t.stream.codecs=l;return v["return"](e.filter(function(z){return z}))})}function Wn(a,b){var c;return J(function(d){if(1==d.a)return b=b.filter(function(e){var f=qn(e,"URI")||"";return"SUBTITLES"!=qn(e,"TYPE")&&""!=f}),b.length?u(d,ao(a,b[0]),2):d.s(2);c=b.slice(1).map(function(e){return ao(a,e)});return u(d,Promise.all(c),0)})}
559
- function Yn(a,b){var c,d,e;return J(function(f){if(1==f.a)return c=b.map(function(g){var h,k,l,m,n,q,t;return J(function(v){return 1==v.a?(h=qn(g,"FRAME-RATE"),k=Number(rn(g,"BANDWIDTH")),l=qn(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,q=m.next().value,u(v,bo(a,g),2)):(t=v.b)?v["return"](co(a,t.audio,t.video,k,n,q,h)):v["return"]([])})}),u(f,Promise.all(c),2);d=f.b;e=d.reduce(Lb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
560
- function bo(a,b){var c,d,e,f,g,h,k,l,m,n,q,t,v,z;return J(function(x){if(1==x.a)return c=Rb,d=Tn(a,b),e=qn(b,"AUDIO"),f=qn(b,"VIDEO"),h=(g=e||f)&&a.g.has(g)?a.g.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=rn(b,"URI"),q=k.audio.find(function(A){return A&&A.xc==n}),t=Un(c.Ea,d),(v=Un(c.Qa,d))&&!t?l=c.Qa:!h.length&&v&&t?(l=c.Ea,d=[[t,v].join()]):k.audio.length&&q?(l=c.Qa,m=!0):l=k.video.length?c.Qa:c.Ea,m?x.s(2):u(x,eo(a,b,d,l),3);2!=x.a&&(z=x.b);if(z)k[z.stream.type]=[z];else if(null===z)return x["return"](null);
561
- fo(k);return x["return"](k)})}function Tn(a,b){var c=[];a.i.disableVideo||c.push("avc1.42E01E");a.i.disableAudio||c.push("mp4a.40.2");var d=qn(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=id(f);c.has(g)||(e.push(f),c.add(g))}return e}function Xn(a){a=qn(a,"LANGUAGE")||"und";return R(a)}
562
- function fo(a){a=r(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}
563
- function co(a,b,c,d,e,f,g){for(var h=r(c),k=h.next();!k.done;k=h.next()){k=k.value.stream;var l=f,m=g;k&&(k.width=Number(e)||void 0,k.height=Number(l)||void 0,k.frameRate=Number(m)||void 0)}e=a.i.disableAudio;if(!b.length||e)b=[null];e=a.i.disableVideo;if(!c.length||e)c=[null];e=[];b=r(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=r(c),h=g.next();!h.done;h=g.next()){var n=h.value;h=f?f.stream:null;k=n?n.stream:null;l=f?f.stream.drmInfos:null;m=n?n.stream.drmInfos:null;n=(n?n.xc:"")+" - "+(f?
564
- f.xc:"");h&&k&&!(l.length&&m.length?0<de(l,m).length:1)||a.ua.has(n)||(h={id:a.Da++,language:h?h.language:"und",primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0},e.push(h),a.ua.add(n))}return e}
565
- function ao(a,b){var c,d,e,f,g,h,k,l,m,n,q;return J(function(t){if(1==t.a){c=rn(b,"GROUP-ID");d="";var v=rn(b,"TYPE").toLowerCase();"subtitles"==v&&(v="text");e=v;"text"!=e&&c&&a.f.has(c)&&(d=a.f.get(c));f=go(rn(b,"URI"),a.j);if(a.b.has(f))return t["return"](a.b.get(f));g=Xn(b);h=qn(b,"NAME");k=b.getAttribute("DEFAULT");l="YES"==k;v="audio"==e?(v=qn(b,"CHANNELS"))?parseInt(v.split("/")[0],10):null:null;m=v;n=qn(b,"CHARACTERISTICS");return u(t,ho(a,f,d,e,g,l,h,m,null,n),2)}q=t.b;a.g.has(c)?a.g.get(c).push(q):
566
- a.g.set(c,[q]);if(null==q)return t["return"](null);if(a.b.has(f))return t["return"](a.b.get(f));a.b.set(f,q);return t["return"](q)})}
567
- function eo(a,b,c,d){var e,f,g,h;return J(function(k){if(1==k.a){e=go(rn(b,"URI"),a.j);if(a.b.has(e))return k["return"](a.b.get(e));var l=qn(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.A.get(l):null;g=Vn(d,c);return u(k,ho(a,e,g,d,"und",!1,null,null,f,null),2)}h=k.b;if(null==h)return k["return"](null);if(a.b.has(e))return k["return"](a.b.get(e));a.b.set(e,h);return k["return"](h)})}
568
- function ho(a,b,c,d,e,f,g,h,k,l){var m,n,q,t,v,z,x,A,D,B,E,H,G,F,I,O,ca,S,Na,Z,Da,Sa,Ha,Aa,ya,Za,ud,fb,vd,ml,nl,Ig,Jg,Ie,ol,pl;return J(function(Ta){switch(Ta.a){case 1:return m=Pb([a.K],[b])[0],u(Ta,Mn(a,Mc([m],a.i.retryParameters),0),2);case 2:n=Ta.b;m=n.uri;q=Dn(a.G,n.data,m);if(1!=q.type)throw new M(2,4,4017);t=[];if(q.segments)for(v=r(q.segments),z=v.next();!z.done;z=v.next())x=z.value,A=un(x.W,"EXT-X-KEY"),t.push.apply(t,ia(A));D=!1;B=[];E=new Set;H=r(t);for(G=H.next();!G.done;G=H.next())if(F=
569
- G.value,I=rn(F,"METHOD"),"NONE"!=I){D=!0;if("AES-128"==I)return a.Ca=!0,Ta["return"](null);O=rn(F,"KEYFORMAT");if(S=(ca=io[O])?ca(F):null){if(S.keyIds)for(Na=r(S.keyIds),Z=Na.next();!Z.done;Z=Na.next())Da=Z.value,E.add(Da);B.push(S)}}if(D&&!B.length)throw new M(2,4,4026);Sa=un(q.W,"EXT-X-DEFINE");Ha=Qn(a,Sa);jo(a,q);return u(Ta,ko(a,d,c,q,Ha),3);case 3:return Aa=Ta.b,lo.includes(Aa)&&(c=""),ya=new Map,y(Ta,4),u(Ta,Rn(a,b,q,Aa,ya,Ha),6);case 6:Za=Ta.b;ua(Ta,5);break;case 4:ud=C(Ta);if(4035==ud.code)return Xa("Skipping unsupported HLS stream",
570
- Aa,b),Ta["return"](null);throw ud;case 5:fb=Za[0].startTime;vd=Za[Za.length-1].endTime;ml=new U(Za);nl="text"==d?"subtitle":void 0;Ig=[];if(l)for(Jg=r(l.split(",")),Ie=Jg.next();!Ie.done;Ie=Jg.next())ol=Ie.value,Ig.push(ol);pl={id:a.Da++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ml,mimeType:Aa,codecs:c,kind:nl,encrypted:D,drmInfos:B,keyIds:E,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,
571
- width:void 0,height:void 0,bandwidth:void 0,roles:Ig,channelsCount:h,audioSamplingRate:null,closedCaptions:k};return Ta["return"]({stream:pl,xc:b,fe:m,Ld:fb,Ne:vd,Kd:ya})}})}function jo(a,b){var c=wn(b.W,"EXT-X-PLAYLIST-TYPE"),d=wn(b.W,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;d?Sn(a,Ln):(c?Sn(a,mo):Sn(a,no),d=oo(b.W,"EXT-X-TARGETDURATION"),d=Number(d.value),a.M=Math.max(d,a.M),a.T=Math.min(d,a.T))}
572
- function po(a,b,c,d){c=wn(c,"EXT-X-MAP");if(!c)return null;var e=rn(c,"URI");d=go(Pb([b],[e])[0],d);b=[d,qn(c,"BYTERANGE","")].join("-");a.I.has(b)||(c=qo(d,c),a.I.set(b,c));return a.I.get(b)}function qo(a,b){var c=0,d=null,e=qn(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new rg(function(){return[a]},c,d)}
573
- function ro(a,b,c,d,e,f){var g=c.W,h=go(c.a,f);c=oo(g,"EXTINF").value.split(",");c=d+Number(c[0]);f=0;var k=null;if(g=wn(g,"EXT-X-BYTERANGE"))f=g.value.split("@"),g=Number(f[0]),f=f[1]?Number(f[1]):b.a+1,k=f+g-1;return new tg(d,c,function(){return[h]},f,k,a,e,0,Infinity)}function $n(a){if(a.a){for(var b=r(a.X),c=b.next();!c.done;c=b.next())a.a.rb(c.value);a.X=[]}}
574
- function Rn(a,b,c,d,e,f){var g,h,k,l,m,n,q,t,v,z,x,A,D,B,E,H,G,F,I,O,ca;return J(function(S){switch(S.a){case 1:g=c.segments;k=xn(c.W,"EXT-X-MEDIA-SEQUENCE",0);if(a.c!=Ln&&e.has(k)){l=e.get(k);S.s(2);break}if(null!=a.D){S.s(3);break}h=po(a,c.a,g[0].W,f);m=a;return u(S,so(a,b,h,d,k,!1,g[0],f),4);case 4:m.D=S.b;case 3:l=a.D;case 2:n=g[0].a,bb(n.split("/").pop()),q=xn(c.W,"EXT-X-DISCONTINUITY-SEQUENCE"),t=a.v.get(q)||0,v=[],z=function(Na){return lb(Na)},x=r(z(g)),A=x.next();case 5:if(A.done){S.s(7);
575
- break}B=D=A.value;E=B.Z;H=B.item;G=v[v.length-1];F=0==E?l:G.endTime;I=k+E;e.set(I,F);h=po(a,c.a,H.W,f);O=wn(H.W,"EXT-X-DISCONTINUITY");if(!O){S.s(8);break}q++;return u(S,to(a,q,b,h,d,I,H,f,F),9);case 9:t=S.b;case 8:ca=ro(h,G,H,F,t,f);v.push(ca);A=x.next();S.s(5);break;case 7:return a.X.push(v),$n(a),S["return"](v)}})}
576
- function to(a,b,c,d,e,f,g,h,k){var l,m;return J(function(n){if(1==n.a)return l=0,a.v.has(b)?(l=a.v.get(b),n.s(2)):u(n,so(a,c,d,e,f,!0,g,h),3);2!=n.a&&(m=n.b,l=k-m,a.v.set(b,l));return n["return"](l)})}
577
- function uo(a,b){var c,d,e,f,g,h;return J(function(k){switch(k.a){case 1:c=Sc;d=fh(b.pa(),b.b,b.a,a.i.retryParameters);if(a.i.hls.useFullSegmentsForStartTime)return k["return"](Mn(a,d,c));e=fh(b.pa(),b.b,b.b+2048-1,a.i.retryParameters);y(k,2);return u(k,Mn(a,e,c),4);case 4:return f=k.b,k["return"](f);case 2:g=C(k);if(7001==g.code)throw g;Xa("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",
578
- e.uris[0]);return u(k,Mn(a,d,c),5);case 5:return h=k.b,k["return"](h)}})}
579
- function so(a,b,c,d,e,f,g,h){var k,l,m,n,q,t,v,z;return J(function(x){switch(x.a){case 1:k=ro(c,null,g,0,0,h);if(a.o&&!f&&(l=a.b.get(b),m=l.Kd.get(e),void 0!=m))return x["return"](m);d=d.toLowerCase();if(lo.includes(d))throw Xa("Raw formats are not yet supported. Skipping "+d),new M(1,4,4035);if("video/webm"==d)throw Xa("WebM in HLS is not yet supported. Skipping."),new M(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){x.s(2);break}n=[uo(a,k)];c&&n.push(uo(a,c));return u(x,Promise.all(n),3);case 3:return q=
580
- x.b,t=q[0],v=q[1]||q[0],x["return"](vo(b,t.uri,t.data,v.data));case 2:if("video/mp2t"!=d){x.s(4);break}return u(x,uo(a,k),5);case 5:return z=x.b,x["return"](wo(b,z.uri,z.data));case 4:throw new M(2,4,4030,b);}})}
581
- function vo(a,b,c,d){var e=0;(new ie).box("moov",me).box("trak",me).box("mdia",me).V("mdhd",function(h){h.reader.skip(0==h.version?8:16);e=h.reader.J();h.parser.stop()}).parse(d,!0);if(!e)throw new M(2,4,4030,a,b);var f=0,g=!1;(new ie).box("moof",me).box("traf",me).V("tfdt",function(h){f=(0==h.version?h.reader.J():h.reader.Za())/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new M(2,4,4030,a,b);return f}
582
- function wo(a,b,c){function d(){f.seek(g+188);h=f.ra();71!=h&&(f.seek(g+192),h=f.ra());71!=h&&(f.seek(g+204),h=f.ra());71!=h&&e();f.Td(1)}function e(){throw new M(2,4,4030,a,b);}for(var f=new Q(c,0),g=0,h=0;;)if(g=f.C,h=f.ra(),71!=h&&e(),c=f.Ob(),8191==(c&8191))d();else if(c&16384)if(c=(f.ra()&48)>>4,0!=c&&2!=c||e(),3==c&&(c=f.ra(),f.skip(c)),1!=f.J()>>8)d();else{f.skip(3);c=f.ra()>>6;0!=c&&1!=c||e();0==f.ra()&&e();c=f.ra();var k=f.Ob(),l=f.Ob();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>
583
- 1))/9E4}else d()}function Vn(a,b){if(1==b.length)return b[0];var c=Un(a,b);if(null!=c)return c;throw new M(2,4,4025,b);}function Un(a,b){for(var c=r(xo[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return"text"==a?"":null}
584
- function go(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new M(2,4,4039,f);}}return c}
585
- function ko(a,b,c,d,e){var f,g,h,k,l,m,n,q,t,v,z;return J(function(x){if(1==x.a){f=Rb;g=Sc;h=go(d.segments[0].a,e);k=new tb(h);l=k.la.split(".").pop();m=yo[b];if(n=m[l])return x["return"](n);if(b==f.aa)return c&&"vtt"!=c&&"wvtt"!=c?x["return"]("application/mp4"):x["return"]("text/vtt");q=Mc([h],a.i.retryParameters);q.method="HEAD";return u(x,Mn(a,q,g),2)}t=x.b;v=t.headers["content-type"];return v?x["return"](v.split(";")[0]):(z=m.mp4,x["return"](z))})}
586
- function oo(a,b){var c=wn(a,b);if(!c)throw new M(2,4,4024,b);return c}p.Lb=function(){var a=this,b,c;return J(function(d){if(1==d.a){if(!a.u)return d["return"]();y(d,2);return u(d,a.update(),4)}if(2!=d.a)return b=a.ea,a.h.R(b),ua(d,0);c=C(d);if(!a.u)return d["return"]();c.severity=1;a.u.onError(c);a.h.R(.1);w(d)})};function Sn(a,b){a.c=b;a.a&&a.a.Rb(a.c==Ln);a.c!=Ln||a.h.stop()}function Mn(a,b,c){if(!a.m)throw new M(2,7,7001);b=a.u.networkingEngine.request(c,b);Hc(a.m,b);return b.promise}
587
- K("shaka.hls.HlsParser",Kn);
588
- var xo={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},lo=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],yo={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",
589
- cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}},io={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=rn(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=rn(a,"URI");b=Jn(b);b=L(b.data);b=Qb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=qn(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);
590
- return b}},Ln="VOD",no="EVENT",mo="LIVE",Pn={de:Ln,vf:no,ce:mo};pg.m3u8=function(){return new Kn};ng["application/x-mpegurl"]=function(){return new Kn};ng["application/vnd.apple.mpegurl"]=function(){return new Kn};function zo(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Qd:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Yb(b)}catch(g){}throw new M(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Ao(){}function Bo(a,b,c,d){var e=new Co;cd(b.headers).forEach(function(k,l){e.append(l,k)});var f=new Do,g={yd:!1,$d:!1};a=Eo(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d);a=new qc(a,function(){g.yd=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new N(function(){g.$d=!0;f.abort()});h.R(b/1E3);a["finally"](function(){h.stop()})}return a}
591
- function Eo(a,b,c,d,e){var f,g,h,k,l,m,n,q,t,v,z,x,A,D;return J(function(B){switch(B.a){case 1:return f=Fo,g=Go,m=l=0,n=Date.now(),y(B,2),u(B,f(a,c),4);case 4:return h=B.b,q=h.clone().body.getReader(),v=(t=h.headers.get("Content-Length"))?parseInt(t,10):0,z=function(E){function H(){var G,F;return J(function(I){switch(I.a){case 1:return y(I,2),u(I,q.read(),4);case 4:G=I.b;ua(I,3);break;case 2:return C(I),I["return"]();case 3:G.done||(l+=G.value.byteLength);F=Date.now();if(100<F-n||G.done)e(F-n,l-m,
592
- v-l),m=l,n=F;G.done?E.close():(E.enqueue(G.value),H());w(I)}})}H()},new g({start:z}),u(B,h.arrayBuffer(),5);case 5:k=B.b;ua(B,3);break;case 2:x=C(B);if(d.yd)throw new M(1,1,7001,a,b);if(d.$d)throw new M(1,1,1003,a,b);throw new M(1,1,1002,a,x,b);case 3:return A={},D=h.headers,D.forEach(function(E,H){A[H.trim()]=E}),B["return"](zo(A,k,h.status,a,h.url,b))}})}
593
- function Ho(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}K("shaka.net.HttpFetchPlugin",Ao);Ao.isSupported=Ho;Ao.parse=Bo;var Fo=window.fetch,Do=window.AbortController,Go=window.ReadableStream,Co=window.Headers;Ho()&&(Jc("http",Bo,2),Jc("https",Bo,2));function Io(){}
594
- function Jo(a,b,c,d){var e=new Ko,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 q=n.getAllResponseHeaders().trim().split("\r\n"),t={};q=r(q);for(var v=q.next();!v.done;v=q.next())v=v.value.split(": "),t[v[0].toLowerCase()]=v.slice(1).join(": ");try{var z=zo(t,n.response,n.status,a,n.responseURL,
595
- c);k(z)}catch(x){l(x)}};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 q=Date.now();if(100<q-f||n.lengthComputable&&n.loaded==n.total)d(q-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=q};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new qc(h,function(){e.abort();return Promise.resolve()})}K("shaka.net.HttpXHRPlugin",Io);Io.parse=Jo;var Ko=window.XMLHttpRequest;
596
- Jc("http",Jo,1);Jc("https",Jo,1);function Lo(){this.a=this.f=this.b=0;this.c=new Map;this.g=0}function Mo(a,b){a.b+=b;var c=a.g;a.g++;a.c.set(c,b);return c}Lo.prototype.close=function(a,b){if(this.c.has(a)){var c=this.c.get(a);this.c["delete"](a);this.f+=c;this.a+=b}};function No(a){var b=this;this.N=a;this.a=new Map;this.F=new Tc(function(){var c=Array.from(b.a.values());return Promise.all(c.map(function(d){return d["catch"](function(){})}))});this.b=[];this.Pd=function(){};this.Od=function(){};this.Db=new Lo}No.prototype.destroy=function(){return this.F.destroy()};function Oo(a,b,c){a.Pd=b;a.Od=c}function Po(a){var b=a.b.map(function(c){return c()});a.b=[];return Promise.all(b)}
597
- function Qo(a,b,c,d,e,f){Uc(a.F);var g=Mo(a.Db,d);d=(a.a.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,q,t;return J(function(v){if(1==v.a)return u(v,Ro(a,c),2);h=v.b;if(a.F.a)throw new M(2,9,7001);if(e)for(m in k=L(h),l=new kl(k),l.data)n=Number(m),q=l.data[n],t=l.a[n],a.Od(q,t);a.Db.close(g,h.byteLength);var z=a.Db;a.Pd(0==z.b?0:z.f/z.b,a.Db.a);return v["return"](f(h))})});a.a.set(b,d);return d}
598
- function So(a,b,c){Uc(a.F);var d=(a.a.get(b)||Promise.resolve()).then(function(){return J(function(e){return u(e,c(),0)})});a.a.set(b,d)}function To(a){return J(function(b){return 1==b.a?u(b,Promise.all(a.a.values()),2):b["return"](a.Db.a)})}function Ro(a,b){var c,d,e,f;return J(function(g){if(1==g.a)return c=Sc,d=a.N.request(c,b),e=function(){return d.abort()},a.b.push(e),u(g,d.promise,2);f=g.b;Dc(a.b,e);return g["return"](f.data)})};function Uo(a,b){var c=this;this.c=a;this.b=a.objectStore(b);this.a=new Sb;a.onabort=function(d){d.preventDefault();c.a.reject()};a.onerror=function(d){d.preventDefault();c.a.reject()};a.oncomplete=function(){c.a.resolve()}}Uo.prototype.abort=function(){var a=this;return J(function(b){if(1==b.a){try{a.c.abort()}catch(c){}y(b,2);return u(b,a.a,4)}if(2!=b.a)return ua(b,0);C(b);w(b)})};
599
- function Vo(a,b){return new Promise(function(c,d){var e=a.b.openCursor();e.onerror=d;e.onsuccess=function(){var f;return J(function(g){if(1==g.a){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();w(g)})}})}Uo.prototype.store=function(){return this.b};Uo.prototype.promise=function(){return this.a};function Wo(a){this.b=a;this.a=[]}Wo.prototype.destroy=function(){return Promise.all(this.a.map(function(a){return a.abort()}))};function Xo(a,b){return Yo(a,b,"readwrite")}function Yo(a,b,c){c=a.b.transaction([b],c);var d=new Uo(c,b);a.a.push(d);d.promise().then(function(){Dc(a.a,d)},function(){Dc(a.a,d)});return d};function Zo(a,b,c){this.b=new Wo(a);this.c=b;this.a=c}p=Zo.prototype;p.destroy=function(){return this.b.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return $o(this.c)};p.removeSegments=function(a,b){return ap(this,this.c,a,b)};p.getSegments=function(a){var b=this,c;return J(function(d){if(1==d.a)return u(d,bp(b,b.c,a),2);c=d.b;return d["return"](c.map(function(e){return b.zd(e)}))})};p.addManifests=function(){return $o(this.a)};
600
- p.updateManifestExpiration=function(a,b){var c=Xo(this.b,this.a),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};p.removeManifests=function(a,b){return ap(this,this.a,a,b)};p.getManifests=function(a){var b=this,c;return J(function(d){if(1==d.a)return u(d,bp(b,b.a,a),2);c=d.b;return d["return"](Promise.all(c.map(function(e){return b.Cb(e)})))})};
601
- p.getAllManifests=function(){var a=this,b,c;return J(function(d){return 1==d.a?(b=Yo(a.b,a.a,"readonly"),c=new Map,u(d,Vo(b,function(e,f){var g;return J(function(h){if(1==h.a)return u(h,a.Cb(f),2);g=h.b;c.set(e,g);w(h)})}),2)):3!=d.a?u(d,b.promise(),3):d["return"](c)})};p.zd=function(a){return a};p.Cb=function(a){return Promise.resolve(a)};function $o(a){return Promise.reject(new M(2,9,9011,"Cannot add new value to "+a))}
602
- p.add=function(a,b){var c=this,d,e,f,g,h,k,l;return J(function(m){if(1==m.a){d=Xo(c.b,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Xb:g.Xb},k=h.next())l=k.value,g.Xb=e.add(l),g.Xb.onsuccess=function(n){return function(){f.push(n.Xb.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
603
- function ap(a,b,c,d){a=Xo(a.b,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Wb:e.Wb},f=c.next())e.Wb=f.value,b["delete"](e.Wb).onsuccess=function(g){return function(){return d(g.Wb)}}(e);return a.promise()}
604
- function bp(a,b,c){var d,e,f,g,h,k,l;return J(function(m){if(1==m.a){d=Yo(a.b,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={yb:h.yb,wb:h.wb},l=k.next())h.wb=l.value,h.yb=e.get(h.wb),h.yb.onsuccess=function(n){return function(){void 0==n.yb.result&&g.push(n.wb);f[n.wb]=n.yb.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new M(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function cp(a){this.a=new Wo(a)}cp.prototype.destroy=function(){return this.a.destroy()};cp.prototype.getAll=function(){var a=this,b,c;return J(function(d){return 1==d.a?(b=Yo(a.a,"session-ids","readonly"),c=[],u(d,Vo(b,function(e,f){c.push(f)}),2)):3!=d.a?u(d,b.promise(),3):d["return"](c)})};cp.prototype.add=function(a){var b=Xo(this.a,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
605
- cp.prototype.remove=function(a){var b=this,c;return J(function(d){return 1==d.a?(c=Xo(b.a,"session-ids"),u(d,Vo(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function dp(){this.a=new Map}dp.prototype.destroy=function(){for(var a=[],b=r(this.a.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.a.clear();return Promise.all(a)};dp.prototype.init=function(){var a=this;ep.forEach(function(e,f){var g=e();g&&a.a.set(f,g)});for(var b=[],c=r(this.a.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
606
- function fp(a){var b=null;a.a.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{za:d,ca:f},ca:e})})});if(b)return b;throw new M(2,9,9013,"Could not find a cell that supports add-operations");}function gp(a,b){a.a.forEach(function(c,d){c.getCells().forEach(function(e,f){b({za:d,ca:f},e)})})}
607
- function hp(a,b,c){a=a.a.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 ip(a,b){a.a.forEach(function(c){b(c.getEmeSessionCell())})}function jp(a){var b=Array.from(a.a.keys());if(!b.length)throw new M(2,9,9E3,"No supported storage mechanisms found");return a.a.get(b[0]).getEmeSessionCell()}
608
- function kp(a){var b,c,d;return J(function(e){return 1==e.a?(b=Array.from(a.a.values()),c=0<b.length,c||(d=ep,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.s(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function lp(a,b){ep.set(a,b)}K("shaka.offline.StorageMuxer",dp);dp.unregister=function(a){ep["delete"](a)};dp.register=lp;dp.prototype.destroy=dp.prototype.destroy;var ep=new Map;function mp(){Zo.apply(this,arguments)}pa(mp,Zo);mp.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return J(function(g){d=Xo(c.b,c.a);e=d.store();f=new Sb;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 u(g,Promise.all([d.promise(),f]),0)})};
609
- mp.prototype.Cb=function(a){var b,c,d,e,f,g;return J(function(h){if(1==h.a){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=np(a.periods[c],e),b.push(f);return u(h,Gm(b),2)}g=h.b;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})})};
610
- function np(a,b){op(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return pp(e,a.startTime,b)})}
611
- function pp(a,b,c){var d=a.initSegmentUri?qp(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,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=qp(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,
612
- initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e}}),variantIds:a.variantIds,roles:[],audioSamplingRate:null,channelsCount:null,closedCaptions:null}}mp.prototype.zd=function(a){return{data:a.data}};function qp(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);}
613
- function op(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
614
- f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function rp(){Zo.apply(this,arguments)}pa(rp,Zo);
615
- rp.prototype.Cb=function(a){var b,c,d,e,f,g;return J(function(h){if(1==h.a){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=r(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(sp(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,Gm(b),2)}g=h.b;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
468
+ function Tl(a,b){var c=Ul(a,b,"timescale"),d=1;c&&(d=El(c)||1);c=Ul(a,b,"duration");(c=El(c||""))&&(c/=d);var e=Ul(a,b,"startNumber"),f=Number(Ul(a,b,"presentationTimeOffset"))||0,g=Fl(e||"");if(null==e||null==g)g=1;var h=Vl(a,b,"SegmentTimeline");e=null;if(h){e=d;var k=a.V.duration||Infinity,l=ul(h,"S");h=[];var m=-f;l=r(fb(l));for(var n=l.next();!n.done;n=l.next()){n=n.value;var p=n.item,u=n.next,v=zl(p,"t",Fl);n=zl(p,"d",Fl);var z=zl(p,"r",Dl);null!=v&&(v-=f);if(!n)break;p=null!=v?v:m;v=z||0;if(0>
469
+ v)if(u){u=zl(u,"t",Fl);if(null==u)break;else if(p>=u)break;v=Math.ceil((u-p)/n)-1}else{if(Infinity==k)break;else if(p/e>=k)break;v=Math.ceil((k*e-p)/n)-1}0<h.length&&p!=m&&(h[h.length-1].end=p/e);u=r(db(v+1));for(v=u.next();!v.done;v=u.next())m=p+n,h.push({start:p/e,end:m/e,sf:p}),p=m}e=h}return{timescale:d,ga:c,Ab:g,Pa:f/d||0,Dd:f,timeline:e}}function Ul(a,b,c){return[b(a.L),b(a.ia),b(a.fa)].filter(Jb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
470
+ function Vl(a,b,c){return[b(a.L),b(a.ia),b(a.fa)].filter(Jb).map(function(d){return nl(d,c)}).reduce(function(d,e){return d||e})}
471
+ function Wl(a,b,c,d,e,f){for(var g=xl(a,"http://www.w3.org/1999/xlink","href"),h=xl(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return nc(new O(2,4,4028));if("onLoad"!=h)return nc(new O(2,4,4027));var m=Lb([d],[g]);return e.request(0,Jc(m,b)).$(function(n){n=Il(n.data,a.tagName);if(!n)return nc(new O(2,4,4001,g));
472
+ for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return Xl(a,b,c,m[0],e,f+1)})}
473
+ function Xl(a,b,c,d,e,f){f=void 0===f?0:f;if(xl(a,"http://www.w3.org/1999/xlink","href")){var g=Wl(a,b,c,d,e,f);c&&(g=g.$(void 0,function(){return Xl(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==xl(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Xl(k,b,c,d,e,f)));return rc(g).$(function(){return a})};function Yl(a,b,c,d,e,f,g){var h,k=(new ge).X("sidx",function(l){h=Zl(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
474
+ function Zl(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.fb(),m=g.reader.fb();g.reader.skip(2);var n=g.reader.Xb();a=a+g.size+m;n=r(db(n));for(m=n.next();!m.done;m=n.next()){var p=g.reader.O();m=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.O();g.reader.skip(4);if(1==m)throw new O(2,3,3006);h.push(new tg(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();
475
+ return h};function $l(a){this.h=lb(a);this.g=new S(this.h,0)}$l.prototype.Da=function(){return this.g.Da()};
476
+ function am(a){var b=bm(a);if(7<b.length)throw new O(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=bm(a);a:{d=r(cm);for(var e=d.next();!e.done;e=d.next())if(hb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.H;else{if(8==b.length&&b[1]&224)throw new O(2,3,3001);d=0;e=r(fb(b));for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=f.item;d=0==f.da?g&(1<<8-b.length)-1:256*d+g}b=d}b=a.g.H+b<=a.h.byteLength?b:a.h.byteLength-a.g.H;d=lb(a.h,a.g.H,
477
+ b);a.g.skip(b);return new dm(c,d)}function bm(a){var b=a.g.H,c=a.g.wa();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return N(a.h,b,c)}var cm=[[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 dm(a,b){this.id=a;this.g=b}
478
+ function em(a){if(8<a.g.byteLength)throw new O(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new O(2,3,3001);for(var b=0,c=r(db(a.g.byteLength)),d=c.next();!d.done;d=c.next())d=a.g.getUint8(d.value),b=256*b+d;return b};function fm(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new $l(a.g);for(var n=null,p=null;a.Da();){var u=am(a);if(187==u.id){var v=gm(u);v&&(u=c*v.tf,v=b+v.Ze,null!=n&&m.push(new tg(n+g,u+g,l,p,v-1,f,g,h,k)),n=u,p=v)}}null!=n&&m.push(new tg(n+g,d+g,l,p,null,f,g,h,k));return m}
479
+ function gm(a){var b=new $l(a.g);a=am(b);if(179!=a.id)throw new O(2,3,3013);a=em(a);b=am(b);if(183!=b.id)throw new O(2,3,3012);b=new $l(b.g);for(var c=0;b.Da();){var d=am(b);if(241==d.id){c=em(d);break}}return{tf:a,Ze:c}};function hm(a,b){var c=Vl(a,b,"Initialization");if(!c)return null;var d=a.L.ta,e=c.getAttribute("sourceURL");e&&(d=Lb(a.L.ta,[e]));e=0;var f=null;if(c=zl(c,"range",Cl))e=c.start,f=c.end;return new rg(function(){return d},e,f)}
480
+ function im(a,b){var c=Number(Ul(a,jm,"presentationTimeOffset"))||0,d=Ul(a,jm,"timescale"),e=1;d&&(e=El(d)||1);var f=c/e||0,g=hm(a,jm);km(a,g);var h=yc(a);return{rb:function(){var k=Vl(h,jm,"RepresentationIndex"),l=h.L.ta;k&&(k=k.getAttribute("sourceURL"))&&(l=Lb(h.L.ta,[k]));k=lm(h);return mm(h,b,g,l,k.start,k.end,f)}}}
481
+ function mm(a,b,c,d,e,f,g){var h,k,l,m,n,p,u,v,z,w,A,D,B,E,F;return K(function(H){var G;if(1==H.g)return h=a.presentationTimeline,k=!a.Xa||!a.V.Qd,l=a.V.start,m=a.V.duration,n=a.L.mimeType.split("/")[1],p=b,u=null,v=[p(d,e,f),"webm"==n?p(c.ua(),c.h,c.g):null],p=null,t(H,Promise.all(v),2);z=H.h;w=z[0];A=z[1]||null;D=null;B=l-g;E=l;F=m?l+m:Infinity;if("mp4"==n)var I=Yl(w,e,d,c,B,E,F);else{I=new $l(A);if(440786851!=am(I).id)throw new O(2,3,3008);var J=am(I);if(408125543!=J.id)throw new O(2,3,3009);I=
482
+ J.g.byteOffset;J=new $l(J.g);for(G=null;J.Da();){var M=am(J);if(357149030==M.id){G=M;break}}if(!G)throw new O(2,3,3010);G=new $l(G.g);M=1E6;for(J=null;G.Da();){var P=am(G);if(2807729==P.id)M=em(P);else if(17545==P.id)if(4==P.g.byteLength)J=P.g.getFloat32(0);else if(8==P.g.byteLength)J=P.g.getFloat64(0);else throw new O(2,3,3003);}if(null==J)throw new O(2,3,3011);G=M/1E9;G={mf:G,duration:J*G};J=G.mf;G=G.duration;M=am(new $l(w));if(475249515!=M.id)throw new O(2,3,3007);I=fm(M,I,J,G,d,c,B,E,F)}D=I;h.xb(D);
483
+ u=new U(D);k&&u.Sa(E,F,!0);return H["return"](u)})}function jm(a){return a.Yb}function lm(a){var b=Vl(a,jm,"RepresentationIndex");a=Ul(a,jm,"indexRange");a=Cl(a||"");b&&(a=zl(b,"range",Cl,a));return a}function km(a,b){nm(a,b);if(!lm(a))throw new O(2,4,4002);}function nm(a,b){var c=a.L.mimeType.split("/")[1];if("text"!=a.L.contentType&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);};function om(a,b){var c=hm(a,pm),d=qm(a);if(!d.ga&&!d.timeline&&1<d.ub.length)throw new O(2,4,4002);if(!d.ga&&!a.V.duration&&!d.timeline&&1==d.ub.length)throw new O(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new O(2,4,4002);var e=null,f=null;a.fa.id&&a.L.id&&(f=a.fa.id+","+a.L.id,e=b[f]);c=rm(a.V.start,a.V.duration,a.L.ta,d,c);d=!e;e?e.vb(c,a.presentationTimeline.Na()):(e=new U(c),f&&a.Xa&&(b[f]=e));a.presentationTimeline.xb(c);a.Xa&&a.V.Qd||e.Sa(a.V.start,a.V.duration?a.V.start+a.V.duration:
484
+ Infinity,d);return{rb:function(){return Promise.resolve(e)}}}function pm(a){return a.Va}function qm(a){var b=sm(a);a=Tl(a,pm);var c=a.Ab;0==c&&(c=1);var d=0;a.ga?d=a.ga*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ga:a.ga,startTime:d,Ab:c,Pa:a.Pa,timeline:a.timeline,ub:b}}
485
+ function rm(a,b,c,d,e){var f=d.ub.length;d.timeline&&d.timeline.length!=d.ub.length&&(f=Math.min(d.timeline.length,d.ub.length));var g=a-d.Pa,h=b?a+b:Infinity,k=[],l=d.startTime,m={};f=r(db(f));for(var n=f.next();!n.done;m={Nc:m.Nc},n=f.next()){n=n.value;var p=d.ub[n];m.Nc=Lb(c,[p.Se]);var u=void 0;u=null!=d.ga?l+d.ga:d.timeline?d.timeline[n].end:l+b;k.push(new tg(a+l,a+u,function(v){return function(){return v.Nc}}(m),p.start,p.end,e,g,a,h));l=u}return k}
486
+ function sm(a){return[a.L.Va,a.ia.Va,a.fa.Va].filter(Jb).map(function(b){return ul(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Od&&(a.Od=!0);var c=b.getAttribute("media");b=zl(b,"mediaRange",Cl,{start:0,end:null});return{Se:c,start:b.start,end:b.end}})};function tm(a,b,c,d,e,f){var g=um(a),h=vm(a);wm(h);var k=yc(a);if(h.Sb)return nm(a,g),{rb:function(){var v=Sl(h.Sb,k.L.id,null,k.bandwidth||null,null);v=Lb(k.L.ta,[v]);return mm(k,b,g,v,0,null,h.Pa)}};if(h.ga)return d||(a.presentationTimeline.hd(h.ga),a.presentationTimeline.jd(a.V.start)),{rb:function(){return xm(k,h,e,g,f)}};var l=null;d=null;a.fa.id&&a.L.id&&(d=a.fa.id+","+a.L.id,l=c[d]);var m=ym(k,h,g),n=a.V.start,p=a.V.duration?a.V.start+a.V.duration:Infinity,u=Infinity!=p;l?(u&&(new U(m)).Sa(n,
487
+ p,!0),l.vb(m,a.presentationTimeline.Na())):(l=new U(m),d&&a.Xa&&(c[d]=l));a.presentationTimeline.xb(m);u&&l.Sa(n,p);return{rb:function(){return Promise.resolve(l)}}}function zm(a){return a.Zb}function vm(a){var b=Tl(a,zm),c=Ul(a,zm,"media");a=Ul(a,zm,"index");return{ga:b.ga,timescale:b.timescale,Ab:b.Ab,Pa:b.Pa,Dd:b.Dd,timeline:b.timeline,gd:c,Sb:a}}
488
+ function wm(a){var b=a.Sb?1:0;b+=a.timeline?1:0;b+=a.ga?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.Sb&&(a.timeline=null),a.ga=null);if(!a.Sb&&!a.gd)throw new O(2,4,4002);}
489
+ function xm(a,b,c,d,e){function f(J){var M=(J-u)*p,P=M+b.Pa;M+=l;var wa=Math.min(M+p,h());return new tg(M,wa,function(){var Z=Sl(z,A,J,w,P*v);return Lb(D,[Z])},0,null,d,B,l,h())}function g(){var J=[Math.max(k.Na(),l),Math.min(k.Ta(),h())].map(function(M){return M-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(M){return M+u})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.V.start,m=a.fa.id,n=a.V.duration,p=b.ga,u=b.Ab,v=b.timescale,z=b.gd,
490
+ w=a.bandwidth||null,A=a.L.id,D=a.L.ta,B=l-b.Pa,E=g();a=a.Xa?Math.max(E[0],E[1]-c+1):E[0];E=E[1];c=[];for(var F=a;F<=E;++F){var H=f(F);c.push(H)}var G=new U(c);c=k.Ta()<h();F=k.Y();if(c||F){var I=Math.max(a,E+1);G.Ec(p,function(){var J=k.Na();G.Ya(J);var M=r(g());M.next();M=M.next().value;for(var P=[];I<=M;){var wa=f(I);P.push(wa);I++}return J>h()&&!P.length?null:P})}return Promise.resolve(G)}
491
+ function ym(a,b,c){var d=a.V.start,e=a.V.duration,f=d-b.Pa;e=e?d+e:Infinity;for(var g=[],h={},k=r(fb(b.timeline)),l=k.next();!l.done;h={Mc:h.Mc,Oc:h.Oc,Rc:h.Rc,Jc:h.Jc,Sc:h.Sc,Kc:h.Kc},l=k.next()){l=l.value;var m=l.item,n=m.start,p=m.sf;m=m.end;h.Rc=l.da+b.Ab;h.Sc=p+b.Dd;h.Oc=a.L.id;h.Jc=a.bandwidth||null;h.Mc=b.gd;h.Kc=a.L.ta;g.push(new tg(d+n,d+m,function(u){return function(){var v=Sl(u.Mc,u.Oc,u.Rc,u.Jc||null,u.Sc);return Lb(u.Kc,[v]).map(function(z){return z.toString()})}}(h),0,null,c,f,d,e))}return g}
492
+ function um(a){var b=Ul(a,zm,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.ta;return new rg(function(){var f=Sl(b,c,null,d,null);return Lb(e,[f])},0,null)};function Am(){this.j=[];this.g=[];this.h=[];this.i=[];this.l=new Set}Am.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.i=[];this.j=[]};
493
+ function Bm(a,b,c){var d,e,f,g,h,k,l,m,n,p,u,v,z,w,A,D,B,E,F,H,G,I,J,M,P,wa,Z,bb,Ab,Lc;return K(function(Qa){switch(Qa.g){case 1:d=Nb;Cm(b);Dm(b);Em(b);if(!c&&1==b.length){e=b[0];a.g=e.nc;a.h=e.Gc;a.i=e.textStreams;Qa.B(2);break}f=-1;g=r(fb(b));for(h=g.next();!h.done;h=g.next())l=k=h.value,m=l.da,n=l.item,a.l.has(n.id)||(a.l.add(n.id),-1==f&&(f=m));if(-1==f)return Qa["return"]();p=b.map(function(Bb){return Bb.nc});u=b.map(function(Bb){return Bb.Gc});v=b.map(function(Bb){return Bb.textStreams});z=
494
+ r(v);for(w=z.next();!w.done;w=z.next())A=w.value,A.push(Fm());return t(Qa,Gm(a.g,p,f,Hm,Im),3);case 3:return t(Qa,Gm(a.h,u,f,Hm,Im),4);case 4:return t(Qa,Gm(a.i,v,f,Hm,Im),2);case 2:D=0;B=[];if(a.h.length&&a.g.length)for(J=r(a.g),M=J.next();!M.done;M=J.next())for(P=M.value,wa=r(a.h),Z=wa.next();!Z.done;Z=wa.next())bb=Z.value,Ab=be(P.drmInfos,bb.drmInfos),P.drmInfos.length&&bb.drmInfos.length&&!Ab.length||(Lc=D++,B.push({id:Lc,language:P.language,primary:P.primary,audio:P,video:bb,bandwidth:(P.bandwidth||
495
+ 0)+(bb.bandwidth||0),drmInfos:Ab,allowedByApplication:!0,allowedByKeySystem:!0}));else for(E=a.h.concat(a.g),F=r(E),H=F.next();!H.done;H=F.next())G=H.value,I=D++,B.push({id:I,language:G.language,primary:G.primary,audio:G.type==d.Wa?G:null,video:G.type==d.Ka?G:null,bandwidth:G.bandwidth||0,drmInfos:G.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0});a.j=B;x(Qa)}})}
496
+ function Cm(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.nc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&Bc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.nc=c}}
497
+ function Em(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&Bc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
498
+ function Dm(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Gc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&Bc(e.roles,h.roles)&&cd(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Gc=c}}
499
+ function Jm(a){var b,c,d,e,f,g,h,k,l,m,n,p,u,v,z,w,A,D,B,E,F,H;return K(function(G){switch(G.g){case 1:b=Nb;if(1==a.length)return G["return"](a[0]);c=a.map(function(I){return I.filter(function(J){return J.type==b.Wa})});d=a.map(function(I){return I.filter(function(J){return J.type==b.Ka})});e=a.map(function(I){return I.filter(function(J){return J.type==b.ha})});f=r(e);for(g=f.next();!g.done;g=f.next())h=g.value,h.push({id:0,originalId:"",primary:!1,type:"text",mimeType:"",codecs:"",language:"",label:null,
500
+ width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null});return t(G,Gm([],c,0,Km,Lm),2);case 2:return k=G.h,t(G,Gm([],d,0,Km,Lm),3);case 3:return l=G.h,t(G,Gm([],e,0,Km,Lm),4);case 4:m=G.h;n=0;if(l.length&&k.length)for(w=r(k),A=w.next();!A.done;A=w.next())for(D=A.value,B=r(l),E=B.next();!E.done;E=B.next())F=E.value,H=n++,F.variantIds.push(H),D.variantIds.push(H);else for(p=l.concat(k),u=r(p),v=u.next();!v.done;v=
501
+ u.next())z=v.value,z.variantIds=[n++];return G["return"](l.concat(k).concat(m))}})}
502
+ function Gm(a,b,c,d,e){var f,g,h,k,l,m,n,p,u,v,z,w,A,D,B,E,F,H,G,I,J,M,P,wa;return K(function(Z){switch(Z.g){case 1:f=Nb;g=[];h=r(fb(b));for(k=h.next();!k.done;k=h.next())m=l=k.value,n=m.da,p=m.item,n>=c?g.push(new Set(p)):g.push(new Set);u=r(a);v=u.next();case 2:if(v.done){Z.B(4);break}z=v.value;return t(Z,Mm(z,b,c,e,g),5);case 5:w=Z.h;if(!w)throw new O(2,4,4037);v=u.next();Z.B(2);break;case 4:A=r(g),D=A.next();case 6:if(D.done){Z.B(8);break}B=D.value;E=r(B);F=E.next();case 9:if(F.done){D=A.next();
503
+ Z.B(6);break}H=F.value;return t(Z,Nm(H,b,d,e,g),12);case 12:(G=Z.h)&&a.push(G);F=E.next();Z.B(9);break;case 8:I=r(g);for(D=I.next();!D.done;D=I.next())for(J=D.value,M={},P=r(J),F=P.next();!F.done;M={nb:M.nb},F=P.next())if(M.nb=F.value,M.nb.type!=f.ha||M.nb.language)if(wa=a.some(function(bb){return function(Ab){return Ab.mimeType==bb.nb.mimeType&&gd(Ab.codecs)==gd(bb.nb.codecs)}}(M)))throw new O(2,4,4037);return Z["return"](a)}})}
504
+ function Mm(a,b,c,d,e){var f;return K(function(g){if(1==g.g)return(f=Om(b,a))?t(g,Pm(f),2):g["return"](!1);Qm(a,f,c,d,e);return g["return"](!0)})}function Pm(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push(c.createSegmentIndex()),c.trickModeVideo&&!c.trickModeVideo.segmentIndex&&b.push(c.trickModeVideo.createSegmentIndex());return Promise.all(b)}
505
+ function Nm(a,b,c,d,e){var f,g;return K(function(h){if(1==h.g)return f=c(a),(g=Om(b,f))?f.createSegmentIndex?t(h,Pm(g),2):h.B(2):h["return"](null);Qm(f,g,0,d,e);return h["return"](f)})}function Qm(a,b,c,d,e){b=r(fb(b));for(var f=b.next();!f.done;f=b.next()){var g=f.value;f=g.da;g=g.item;if(f>=c){d(a,g);var h=!0;"audio"==a.type&&0==Bf(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}}
506
+ function Hm(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Vg;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}function Km(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
507
+ function Im(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=be(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new O(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
508
+ (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.j.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Hm(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),Im(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Im(a.trickModeVideo,b)}
509
+ function Lm(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ha(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
510
+ function Om(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Rm,video:Rm,text:Sm}[f.type],h={audio:Tm,video:Um,text:Vm}[f.type],k=null;e=r(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return null;c.push(f)}return c}function Rm(a,b){var c;if(!(c=b.mimeType!=a.mimeType||gd(b.codecs)!=gd(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<be(c,d).length:1)}return c?!1:!0}
511
+ function Sm(a,b){return a.language?b.language?0==Bf(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}
512
+ function Tm(a,b,c){if(a.id==c.id)return!0;var d=Bf(a.language,b.language),e=Bf(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;
513
+ d=Wm(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Xm)return!0;if(d==Ym)return!1;d=Wm(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Xm?!0:d==Ym?!1:a.bandwidth&&Zm(a.bandwidth,b.bandwidth,c.bandwidth)==Xm?!0:!1}
514
+ function Um(a,b,c){if(a.id==c.id)return!0;var d=Wm(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Xm)return!0;if(d==Ym)return!1;if(a.frameRate){d=Wm(a.frameRate,b.frameRate,c.frameRate);if(d==Xm)return!0;if(d==Ym)return!1}return a.bandwidth&&Zm(a.bandwidth,b.bandwidth,c.bandwidth)==Xm?!0:!1}
515
+ function Vm(a,b,c){if(a.id==c.id)return!0;var d=Bf(a.language,b.language),e=Bf(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!=
516
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Fm(){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new U([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null}}
517
+ function Wm(a,b,c){if(b==a&&a!=c)return Ym;if(c==a&&a!=b)return Xm;if(b>a){if(c<=a||c-a<b-a)return Xm;if(c-a>b-a)return Ym}else{if(c>a)return Ym;if(a-c<a-b)return Xm;if(a-c>a-b)return Ym}return $m}function Zm(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Xm:b<a?Ym:$m}var Xm=1,$m=0,Ym=-1;function an(){var a=this;this.D=this.o=null;this.h=[];this.A=null;this.u=1;this.l={};this.I={};this.g=new Am;this.s=0;this.C=new Ka(5);this.m=new Q(function(){a.Ub()});this.i=new Dc;this.j=null;this.F=[]}q=an.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.h=[a],c.D=b,t(e,bn(c),2);d=e.h;c.D&&cn(c,d);if(!c.D)throw new O(2,7,7001);return e["return"](c.A)})};
518
+ q.stop=function(){for(var a=r(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.m&&(this.m.stop(),this.m=null);return this.i.destroy()};q.update=function(){var a=this,b;return K(function(c){if(1==c.g)return y(c,2),t(c,bn(a),4);if(2!=c.g)return ta(c,0);b=C(c);if(!a.D||!b)return c["return"]();a.D.onError(b);x(c)})};q.onExpirationUpdated=function(){};
519
+ function bn(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=Jc(a.h,a.o.retryParameters),c=a.D.networkingEngine,d=Date.now(),e=c.request(0,b),Ec(a.i,e),t(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 t(k,dn(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;La(a.C,1,h);return k["return"](h)})}
520
+ function dn(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Il(b,"MPD");if(!d)throw new O(2,4,4001,c);e=a.o.dash.xlinkFailGracefully;f=Xl(d,a.o.retryParameters,e,c,a.D.networkingEngine);Ec(a.i,f);return t(h,f.promise,2)}g=h.h;return h["return"](en(a,g,c))})}
521
+ function en(a,b,c){var d,e,f,g,h,k,l,m,n,p,u,v,z,w,A,D,B,E,F,H,G,I,J,M,P,wa;return K(function(Z){switch(Z.g){case 1:d=[c];e=ul(b,"Location").map(yl).filter(Jb);0<e.length&&(f=Lb(d,e),d=a.h=f);g=ul(b,"BaseURL").map(yl);h=Lb(d,g);k=a.o.dash.ignoreMinBufferTime;l=0;k||(l=zl(b,"minBufferTime",Bl)||0);a.s=zl(b,"minimumUpdatePeriod",Bl,-1);m=zl(b,"availabilityStartTime",Al);n=zl(b,"timeShiftBufferDepth",Bl);p=a.o.dash.ignoreSuggestedPresentationDelay;u=null;p||(u=zl(b,"suggestedPresentationDelay",Bl));
522
+ v=zl(b,"maxSegmentDuration",Bl);z=b.getAttribute("type")||"static";if(a.A)for(w=a.A.presentationTimeline,A=r(Object.values(a.l)),D=A.next();!D.done;D=A.next())B=D.value,B.Ya(w.Na());else E=a.o.defaultPresentationDelay||1.5*l,F=null!=u?u:E,w=new T(m,F,a.o.dash.autoCorrectDrift);H={Xa:"static"!=z,presentationTimeline:w,fa:null,V:null,ia:null,L:null,bandwidth:0,Od:!1};G=fn(a,H,h,b);I=G.duration;J=G.periods;w.$b("static"==z);"static"!=z&&G.Hd||w.Ga(I||Infinity);(M=w.Y())&&!isNaN(a.o.availabilityWindowOverride)&&
523
+ (n=a.o.availabilityWindowOverride);null==n&&(n=Infinity);w.xd(n);w.hd(v||1);return t(Z,Bm(a.g,J,H.Xa),2);case 2:if(a.A){a.A.variants=a.g.j;a.A.textStreams=a.g.i.slice();Z.B(3);break}a.A={presentationTimeline:w,variants:a.g.j,textStreams:a.g.i.slice(),offlineSessionIds:[],minBufferTime:l||0};if(!w.fe()){Z.B(3);break}P=ul(b,"UTCTiming");return t(Z,gn(a,h,P),5);case 5:wa=Z.h;if(!a.D)return Z["return"]();w.be(wa);case 3:return a.D.makeTextStreamsForClosedCaptions(a.A),t(Z,a.D.filter(a.A),0)}})}
524
+ function fn(a,b,c,d){var e=zl(d,"mediaPresentationDuration",Bl),f=[],g=0;d=ul(d,"Period");for(var h=r(fb(d)),k=h.next();!k.done;k=h.next()){var l=k.value;k=l.da;var m=l.item,n=l.next;l=zl(m,"start",Bl,g);var p=m.id,u=zl(m,"duration",Bl),v=null;if(n){var z=zl(n,"start",Bl);null!=z&&(v=z-l)}else null!=e&&(v=e-l);null==v&&(v=u);if(!(null!==a.j&&null!==p&&null!==l&&l<a.j)||a.F.includes(p)||k+1==d.length){null!==l&&(null===a.j||l>a.j)&&(a.j=l);g=hn(a,b,c,{start:l,duration:v,node:m,Qd:null==v||!n});f.push(g);
525
+ b.fa.id&&v&&(a.I[b.fa.id]=v);if(null==v){g=null;break}g=l+v}}a.F=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,Hd:!1}:{periods:f,duration:g,Hd:!0}}
526
+ function hn(a,b,c,d){b.fa=jn(d.node,null,c);b.V=d;b.fa.id||(b.fa.id="__shaka_period_"+d.start);c=ul(d.node,"EventStream");c=r(c);for(var e=c.next();!e.done;e=c.next())kn(a,d.start,d.duration,e.value);c=ul(d.node,"AdaptationSet").map(function(m){return ln(a,b,m)}).filter(Jb);if(b.Xa){d=[];e=r(c);for(var f=e.next();!f.done;f=e.next()){f=r(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 O(2,4,4018);}d=c.filter(function(m){return!m.Bd});c=c.filter(function(m){return m.Bd});
527
+ c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Bd.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={hc:h.hc},l=k.next())h.hc=l.value,h.hc.trickModeVideo=e.streams.find(function(m){return function(n){return gd(m.hc.codecs)==gd(n.codecs)}}(h))}}}e=a.o.disableAudio?[]:mn(d,"audio");f=a.o.disableVideo?[]:mn(d,"video");c=a.o.disableText?[]:mn(d,"text");if(!f.length&&!e.length)throw new O(2,4,4004);d=[];
528
+ e=r(e);for(g=e.next();!g.done;g=e.next())d.push.apply(d,ha(g.value.streams));e=[];f=r(f);for(g=f.next();!g.done;g=f.next())e.push.apply(e,ha(g.value.streams));f=[];c=r(c);for(g=c.next();!g.done;g=c.next())f.push.apply(f,ha(g.value.streams));return{id:b.fa.id,nc:d,Gc:e,textStreams:f}}function mn(a,b){return a.filter(function(c){return c.contentType==b})}
529
+ function ln(a,b,c){b.ia=jn(c,b.fa,null);if("image"==b.ia.contentType)return null;var d=!1,e=ul(c,"Role"),f=e.map(function(B){return B.getAttribute("value")}).filter(Jb),g=void 0,h="text"==b.ia.contentType;h&&(g="subtitle");e=r(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=ul(c,"EssentialProperty");e=null;k=!1;l=r(l);for(var m=
530
+ l.next();!m.done;m=l.next())m=m.value,"http://dashif.org/guidelines/trickmode"==m.getAttribute("schemeIdUri")?e=m.getAttribute("value"):k=!0;l=ul(c,"Accessibility");var n=new Map;l=r(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||"urn:scte:dash:cc:cea-708:2015"==m)if(m=1,null!=p){p=r(p.split(";"));for(var u=p.next();!u.done;u=p.next()){var v=u.value,z=u=void 0;v.includes("=")?(v=v.split("="),u=v[0].startsWith("CC")?
531
+ v[0]:"CC"+v[0],z=v[1].split(",")[0].split(":").pop()):(u="CC"+m,m+=2,z=v);n.set(u,xf(z))}}else n.set("CC1","und");else"urn:mpeg:dash:role:2011"==m&&null!=p&&(f.push(p),"captions"==p&&(g="caption"))}if(k)return null;k=ul(c,"ContentProtection");var w=Jl(k,a.o.dash.ignoreDrmInfo),A=xf(c.getAttribute("lang")||"und"),D=c.getAttribute("label");(k=ul(c,"Label"))&&k.length&&(k=k[0],k.textContent&&(D=k.textContent));k=ul(c,"Representation");c=k.map(function(B){return nn(a,b,w,g,A,D,d,f,n,B)}).filter(function(B){return!!B});
532
+ if(0==c.length){if(a.o.dash.ignoreEmptyAdaptationSet||h)return null;throw new O(2,4,4003);}if(!b.ia.contentType||"application"==b.ia.contentType)for(b.ia.contentType=on(c[0].mimeType,c[0].codecs),h=r(c),l=h.next();!l.done;l=h.next())l.value.type=b.ia.contentType;h=r(c);for(l=h.next();!l.done;l=h.next())for(l=l.value,m=r(w.drmInfos),p=m.next();!p.done;p=m.next())p=p.value,p.keyIds=p.keyIds&&l.keyIds?new Set([].concat(ha(p.keyIds),ha(l.keyIds))):p.keyIds||l.keyIds;h=k.map(function(B){return B.getAttribute("id")}).filter(Jb);
533
+ return{id:b.ia.id||"__fake__"+a.u++,contentType:b.ia.contentType,language:A,Uf:d,streams:c,drmInfos:w.drmInfos,Bd:e,bf:h}}
534
+ function nn(a,b,c,d,e,f,g,h,k,l){b.L=jn(l,b.ia,null);if(!pn(b.L))return null;var m=b.V.start;b.bandwidth=zl(l,"bandwidth",El)||0;var n=b.L.contentType;n="text"==n||"application"==n;try{var p=function(A,D,B){return qn(a,A,D,B)};if(b.L.Yb)var u=im(b,p);else if(b.L.Va)u=om(b,a.l);else if(b.L.Zb)u=tm(b,p,a.l,!!a.A,a.o.dash.initialSegmentLimit,a.I);else{var v=b.L.ta,z=b.V.duration||0;u={rb:function(){return Promise.resolve(Ug(m,z,v))}}}}catch(A){if(n&&4002==A.code)return null;throw A;}n=ul(l,"ContentProtection");
535
+ n=Nl(n,c,a.o.dash.ignoreDrmInfo);n=new Set(n?[n]:[]);ul(l,"SupplementalProperty").some(function(A){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==A.getAttribute("schemeIdUri")&&"JOC"==A.getAttribute("value")})&&(b.L.mimeType="audio/eac3-joc");var w={id:a.u++,originalId:b.L.id,createSegmentIndex:function(){var A;return K(function(D){if(1==D.g){if(w.segmentIndex)return D.B(0);A=w;return t(D,u.rb(),3)}A.segmentIndex=D.h;x(D)})},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,
536
+ pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,label:f,type:b.ia.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,channelsCount:b.L.kd,audioSamplingRate:b.L.audioSamplingRate,closedCaptions:k};return w}
537
+ q.Ub=function(){var a=this,b,c;return K(function(d){switch(d.g){case 1:return b=0,y(d,2),t(d,bn(a),4);case 4:b=d.h;ta(d,3);break;case 2:c=C(d),a.D&&(c.severity=1,a.D.onError(c));case 3:if(!a.D)return d["return"]();cn(a,b);x(d)}})};function cn(a,b){0>a.s||a.m.W(Math.max(3,a.s-b,Ma(a.C)))}
538
+ function jn(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,kd:null,audioSamplingRate:null};c=c||b.ta;var d=ul(a,"BaseURL").map(yl),e=a.getAttribute("contentType")||b.contentType,f=a.getAttribute("mimeType")||b.mimeType,g=a.getAttribute("codecs")||b.codecs,h=zl(a,"frameRate",Gl)||b.frameRate,k=a.getAttribute("sar")||b.pixelAspectRatio,l=ul(a,"InbandEventStream"),m=b.emsgSchemeIdUris.slice();l=r(l);for(var n=l.next();!n.done;n=l.next())n=
539
+ n.value.getAttribute("schemeIdUri"),m.includes(n)||m.push(n);l=ul(a,"AudioChannelConfiguration");l=rn(l)||b.kd;n=zl(a,"audioSamplingRate",Fl)||b.audioSamplingRate;e||(e=on(f,g));return{ta:Lb(c,d),Yb:nl(a,"SegmentBase")||b.Yb,Va:nl(a,"SegmentList")||b.Va,Zb:nl(a,"SegmentTemplate")||b.Zb,width:zl(a,"width",Fl)||b.width,height:zl(a,"height",Fl)||b.height,contentType:e,mimeType:f,codecs:g,frameRate:h,pixelAspectRatio:k,emsgSchemeIdUris:m,id:a.getAttribute("id"),kd:l,audioSamplingRate:n}}
540
+ function rn(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":if(b=
541
+ parseInt(c,16)){for(a=0;b;)b&1&&++a,b>>=1;return a}}}return null}function pn(a){var b=a.Yb?1:0;b+=a.Va?1:0;b+=a.Zb?1:0;if(0==b)return"text"==a.contentType||"application"==a.contentType?!0:!1;1!=b&&(a.Yb&&(a.Va=null),a.Zb=null);return!0}
542
+ function sn(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=Lb(b,[c]),f=Jc(e,a.o.retryParameters),f.method=d,g=a.D.networkingEngine.request(4,f),Ec(a.i,g),t(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=Rb(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
543
+ function gn(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=r(d),g=f.next();case 2:if(g.done){n.B(4);break}h=g.value;y(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.B(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.B(8);
544
+ 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":Sa("NTP UTCTiming scheme is not supported");break;default:Sa("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return t(n,sn(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return t(n,sn(a,b,l,"GET"),11);case 11:return n["return"](n.h);
545
+ case 9:ta(n,3);break;case 5:C(n);case 3:g=f.next();n.B(2);break;case 4:return Sa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
546
+ function kn(a,b,c,d){var e=d.getAttribute("schemeIdUri")||"",f=d.getAttribute("value")||"",g=zl(d,"timescale",Fl)||1;d=r(ul(d,"Event"));for(var h=d.next();!h.done;h=d.next()){h=h.value;var k=zl(h,"presentationTime",Fl)||0,l=zl(h,"duration",Fl)||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)}}
547
+ function qn(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=Qc,f=gh(b,c,d,a.o.retryParameters),g=a.D.networkingEngine,h=g.request(e,f),Ec(a.i,h),t(l,h.promise,2);k=l.h;return l["return"](k.data)})}function on(a,b){return Ue(dd(a,b))?"text":a.split("/")[0]}L("shaka.dash.DashParser",an);pg.mpd=function(){return new an};ng["application/dash+xml"]=function(){return new an};ng["video/vnd.mpeg.dash.mpd"]=function(){return new an};function tn(a,b,c,d){this.g=a;this.type=b;this.ba=c;this.segments=d||null}function un(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}un.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};
548
+ un.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function vn(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function wn(a,b){var c=a.getAttribute(b);if(!c)throw new O(2,4,4023,b);return c.value}function xn(a,b){this.ba=b;this.g=a}function yn(a,b){this.name=a;this.value=b};function zn(a,b){return a.filter(function(c){return c.name==b})}function An(a,b){return a.filter(function(c){return wn(c,"TYPE")==b})}function Bn(a,b){var c=zn(a,b);return c.length?c[0]:null}function Cn(a,b,c){c=void 0===c?0:c;return(a=Bn(a,b))?Number(a.value):c};function Dn(a){this.h=a;this.g=0}function En(a){Fn(a,/[ \t]+/gm)}function Fn(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 Gn(a){return a.g==a.h.length?null:(a=Fn(a,/[^ \t\n]*/gm))?a[0]:null};function Hn(){this.g=0}
549
+ function In(a,b,c){b=Rb(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new O(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Jn(a.g++,g),--a.g,Kn.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;g=r(fb(d));for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=k.da;var l=k.item;k=k.next;if(/^#(?!EXT)/m.test(l)||e)e=!1;else{l=Jn(a.g++,
550
+ l);if(Ln.includes(l.name)){if(1!=b)throw new O(2,4,4017);l=d.splice(h,d.length-h);d=c;e=[];g=[];h=null;l=r(l);for(k=l.next();!k.done;k=l.next())k=k.value,/^(#EXT)/.test(k)?(k=Jn(a.g++,k),Kn.includes(k.name)?f.push(k):"EXT-X-MAP"==k.name?h=k:g.push(k)):/^#(?!EXT)/m.test(k)||(k=Lb([d],[k.trim()])[0],h&&g.push(h),e.push(new xn(k,g)),g=[]);return new tn(c,b,f,e)}f.push(l);"EXT-X-STREAM-INF"==l.name&&(l.g.push(new yn("URI",k)),e=!0)}}return new tn(c,b,f)}
551
+ function Jn(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new O(2,4,4016,b);var d=c[1],e=c[2];c=[];var f;if(e){e=new Dn(e);var g;(g=Fn(e,/^([^,=]+)(?:,|$)/g))&&(f=g[1]);for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=Fn(e,h);)c.push(new yn(g[1],g[2]||g[3]))}return new un(a,d,c,f)}var Kn="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),Ln="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Mn(){}function Nn(a){try{var b=On(a);return pc({uri:a,Vd:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return nc(c)}}function On(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new O(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new O(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=ac(a):e=Vb(a);return{data:e,contentType:c}}
552
+ L("shaka.net.DataUriPlugin",Mn);Mn.parse=Nn;Gc("data",Nn);function Pn(){var a=this;this.o=this.D=null;this.Ia=1;this.s=new Map;this.l=new Map;this.Ba=new Set;this.h=new Map;this.g=null;this.S="";this.N=new Hn;this.ka=0;this.m=new Q(function(){a.Ub()});this.i=Qn;this.A=null;this.Z=0;this.ca=Infinity;this.u=new Dc;this.K=[];this.F=new Map;this.Ja=!1;this.j=new Map;this.I=null;this.P=new Map;this.C=new Map}q=Pn.prototype;q.configure=function(a){this.o=a};
553
+ q.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.D=b,t(f,Rn(c,Jc([a],c.o.retryParameters),0),2);if(3!=f.g)return d=f.h,c.S=d.uri,t(f,Sn(c,d.data),3);e=c.ka;0<e&&c.m.W(e);return f["return"](c.A)})};q.stop=function(){this.m&&(this.m.stop(),this.m=null);var a=[];this.u&&(a.push(this.u.destroy()),this.u=null);this.o=this.D=null;this.Ba.clear();this.A=null;this.h.clear();this.l.clear();this.j.clear();this.s.clear();return Promise.all(a)};
554
+ q.update=function(){var a=this,b,c,d;return K(function(e){if(1==e.g){if(a.i==Qn)return e["return"]();b=[];a.I=null;c=Array.from(a.h.values());return c.length?t(e,Tn(a,c[0]),2):e.B(2)}for(d=1;d<c.length;d++)b.push(Tn(a,c[d]));return t(e,Promise.all(b),0)})};
555
+ function Tn(a,b){var c,d,e,f,g,h,k,l,m,n;return K(function(p){if(1==p.g)return c=Un,d=b.je,t(p,Rn(a,Jc([d],a.o.retryParameters),0),2);if(3!=p.g){e=p.h;f=In(a.N,e.data,e.uri);if(1!=f.type)throw new O(2,4,4017);g=zn(f.ba,"EXT-X-DEFINE");h=Vn(a,g);k=b.stream;return t(p,Wn(a,b.Fc,f,k.mimeType,b.Sd,h),3)}l=p.h;k.segmentIndex.vb(l,a.g.Na());l.length&&k.segmentIndex.Ya(l[0].startTime);m=l[l.length-1];if(n=Bn(f.ba,"EXT-X-ENDLIST"))Xn(a,c.ie),a.g.Ga(m.endTime);x(p)})}q.onExpirationUpdated=function(){};
556
+ function Sn(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,v,z,w,A,D,B,E,F,H,G,I,J;return K(function(M){switch(M.g){case 1:c=In(a.N,b,a.S);if(0!=c.type)throw new O(2,4,4022);d=zn(c.ba,"EXT-X-DEFINE");Yn(a,d);e=zn(c.ba,"EXT-X-MEDIA");f=zn(c.ba,"EXT-X-STREAM-INF");Zn(a,f);return t(M,$n(a,e),2);case 2:return ao(a,e),t(M,bo(a,f),3);case 3:return g=M.h,t(M,co(a,e),4);case 4:h=M.h;if(!a.D)throw new O(2,7,7001);if(a.Ja&&0==g.length)throw new O(2,4,4034);l=k=Infinity;m=r(a.h.values());for(n=m.next();!n.done;n=m.next())p=
557
+ n.value,k=Math.min(k,p.Td),"text"!=p.stream.type&&(l=Math.min(l,p.Re-p.Td));a.i!=Qn?(a.g=new T(0,a.o.defaultPresentationDelay||3*a.Z),a.g.$b(!1)):(a.g=new T(null,0),a.g.$b(!0));eo(a);if(a.i!=Qn)a.ka=a.ca,u=Un,a.i==u.he&&(v=a.g.Cc,isNaN(a.o.availabilityWindowOverride)||(v=a.o.availabilityWindowOverride),a.g.xd(v));else for(a.g.Ga(l),a.g.offset(-k),z=r(a.h.values()),n=z.next();!n.done;n=z.next())w=n.value,w.stream.segmentIndex.offset(-k),w.stream.segmentIndex.Sa(0,l);a.K=[];A=[];D=r(g);for(B=D.next();!B.done;B=
558
+ D.next())for(E=B.value,F=r([E.video,E.audio]),H=F.next();!H.done;H=F.next())(G=H.value)&&A.push(G);return t(M,Promise.all(A.map(function(P){return K(function(wa){return t(wa,P.createSegmentIndex(),0)})})),5);case 5:I=r(A);for(H=I.next();!H.done;H=I.next())J=H.value,a.K.push(J.segmentIndex.M);eo(a);a.A={presentationTimeline:a.g,variants:g,textStreams:h,offlineSessionIds:[],minBufferTime:0};a.D.makeTextStreamsForClosedCaptions(a.A);return t(M,a.D.filter(a.A),0)}})}
559
+ function Yn(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=vn(e,"NAME");e=vn(e,"VALUE");d&&e&&(a.s.has(d)||a.s.set(d,e))}}function Vn(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=vn(f,"NAME");var g=vn(f,"VALUE");f=vn(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.s.get(f))&&c.set(f,e)}return c}
560
+ function Zn(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=vn(e,"AUDIO");d=vn(e,"VIDEO");var g=vn(e,"SUBTITLES");e=fo(a,e);if(g){var h=go("text",e);a.j.set(g,h);Ac(e,h)}f&&(g=ho("audio",e),a.j.set(f,g));d&&(f=ho("video",e),a.j.set(d,f))}}
561
+ function co(a,b){var c,d,e,f,g,h,k,l,m,n,p,u;return K(function(v){if(1==v.g)return c=An(b,"SUBTITLES"),d=c.map(function(z){var w,A,D;return K(function(B){if(1==B.g){if(w=a.o.disableText)return B["return"](null);y(B,2);return t(B,io(a,z),4)}if(2!=B.g)return A=B.h,B["return"](A.stream);D=C(B);if(a.o.hls.ignoreTextStreamFailures)return B["return"](null);throw D;})}),t(v,Promise.all(d),2);e=v.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=wn(h,"GROUP-ID"),l=a.j.get(k))if(m=a.l.get(k))for(n=
562
+ r(m),p=n.next();!p.done;p=n.next())u=p.value,u.stream.codecs=l;return v["return"](e.filter(function(z){return z}))})}function $n(a,b){var c;return K(function(d){if(1==d.g)return b=b.filter(function(e){var f=vn(e,"URI")||"";return"SUBTITLES"!=vn(e,"TYPE")&&""!=f}),b.length?t(d,io(a,b[0]),2):d.B(2);c=b.slice(1).map(function(e){return io(a,e)});return t(d,Promise.all(c),0)})}
563
+ function bo(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,u;return K(function(v){if(1==v.g)return h=vn(g,"FRAME-RATE"),k=Number(vn(g,"AVERAGE-BANDWIDTH"))||Number(wn(g,"BANDWIDTH")),l=vn(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t(v,jo(a,g),2);if(u=v.h){for(var z=v["return"],w=u.audio,A=u.video,D=r(A),B=D.next();!B.done;B=D.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||void 0,B.frameRate=
564
+ Number(h)||void 0;D=a.o.disableAudio;if(!w.length||D)w=[null];D=a.o.disableVideo;if(!A.length||D)A=[null];D=[];w=r(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var E=r(A),F=E.next();!F.done;F=E.next()){var H=F.value;F=B?B.stream:null;var G=H?H.stream:null,I=B?B.stream.drmInfos:null,J=H?H.stream.drmInfos:null;H=(H?H.Fc:"")+" - "+(B?B.Fc:"");F&&G&&I.length&&J.length&&!(0<be(I,J).length)||a.Ba.has(H)||(F={id:a.Ia++,language:F?F.language:"und",primary:!!F&&F.primary||!!G&&G.primary,audio:F,video:G,
565
+ bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0},D.push(F),a.Ba.add(H))}}v=z.call(v,D)}else v=v["return"]([]);return v})}),t(f,Promise.all(c),2);d=f.h;e=d.reduce(Hb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
566
+ function jo(a,b){var c,d,e,f,g,h,k,l,m,n,p,u,v,z;return K(function(w){if(1==w.g)return c=Nb,d=fo(a,b),e=vn(b,"AUDIO"),f=vn(b,"VIDEO"),h=(g=e||f)&&a.l.has(g)?a.l.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=wn(b,"URI"),p=k.audio.find(function(A){return A&&A.Fc==n}),u=go(c.Ka,d),(v=go(c.Wa,d))&&!u?l=c.Wa:!h.length&&v&&u?(l=c.Ka,d=[[u,v].join()]):k.audio.length&&p?(l=c.Wa,m=!0):l=k.video.length?c.Wa:c.Ka,m?w.B(2):t(w,ko(a,b,d,l),3);2!=w.g&&(z=w.h);if(z)k[z.stream.type]=[z];else if(null===z)return w["return"](null);
567
+ lo(k);return w["return"](k)})}function fo(a,b){var c=[];a.o.disableVideo||c.push("avc1.42E01E");a.o.disableAudio||c.push("mp4a.40.2");var d=vn(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=gd(f);c.has(g)||(e.push(f),c.add(g))}return e}function mo(a){a=vn(a,"LANGUAGE")||"und";return xf(a)}
568
+ function lo(a){a=r(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function ao(a,b){var c=An(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=mo(e);var f=wn(e,"GROUP-ID");e=wn(e,"INSTREAM-ID");a.F.get(f)||a.F.set(f,new Map);a.F.get(f).set(e,d)}}
569
+ function io(a,b){var c,d,e,f,g,h,k,l,m,n,p;return K(function(u){if(1==u.g){c=wn(b,"GROUP-ID");d="";var v=wn(b,"TYPE").toLowerCase();"subtitles"==v&&(v="text");e=v;"text"!=e&&c&&a.j.has(c)&&(d=a.j.get(c));f=no(wn(b,"URI"),a.s);if(a.h.has(f))return u["return"](a.h.get(f));g=mo(b);h=vn(b,"NAME");k=vn(b,"DEFAULT");l="YES"==k;"audio"==e?v=(v=vn(b,"CHANNELS"))?parseInt(v.split("/")[0],10):null:v=null;m=v;n=vn(b,"CHARACTERISTICS");return t(u,oo(a,f,d,e,g,l,h,m,null,n),2)}p=u.h;a.l.has(c)?a.l.get(c).push(p):
570
+ a.l.set(c,[p]);if(null==p)return u["return"](null);if(a.h.has(f))return u["return"](a.h.get(f));a.h.set(f,p);return u["return"](p)})}
571
+ function ko(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=no(wn(b,"URI"),a.s);if(a.h.has(e))return k["return"](a.h.get(e));var l=vn(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.F.get(l):null;g=ho(d,c);return t(k,oo(a,e,g,d,"und",!1,null,null,f,null),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)})}
572
+ function oo(a,b,c,d,e,f,g,h,k,l){var m,n,p,u,v,z,w,A,D,B,E,F,H,G,I,J,M,P,wa,Z,bb,Ab,Lc,Qa,Bb,zd,Hg,ol,pl,ql,rl,Ig,Jg,Ie,sl,tl;return K(function(Ra){switch(Ra.g){case 1:return m=Lb([a.S],[b])[0],t(Ra,Rn(a,Jc([m],a.o.retryParameters),0),2);case 2:n=Ra.h;m=n.uri;p=In(a.N,n.data,m);if(1!=p.type)throw new O(2,4,4017);u=[];if(p.segments)for(v=r(p.segments),z=v.next();!z.done;z=v.next())w=z.value,A=zn(w.ba,"EXT-X-KEY"),u.push.apply(u,ha(A));D=!1;B=[];E=new Set;F=r(u);for(H=F.next();!H.done;H=F.next())if(G=
573
+ H.value,I=wn(G,"METHOD"),"NONE"!=I){D=!0;if("AES-128"==I)return a.Ja=!0,Ra["return"](null);J=wn(G,"KEYFORMAT");if(P=(M=po[J])?M(G):null){if(P.keyIds)for(wa=r(P.keyIds),Z=wa.next();!Z.done;Z=wa.next())bb=Z.value,E.add(bb);B.push(P)}}if(D&&!B.length)throw new O(2,4,4026);Ab=zn(p.ba,"EXT-X-DEFINE");Lc=Vn(a,Ab);qo(a,p);return t(Ra,ro(a,d,c,p,Lc),3);case 3:return Qa=Ra.h,so.includes(Qa)&&(c=""),Bb=new Map,y(Ra,4),t(Ra,Wn(a,b,p,Qa,Bb,Lc),6);case 6:zd=Ra.h;ta(Ra,5);break;case 4:Hg=C(Ra);if(4035==Hg.code)return Sa("Skipping unsupported HLS stream",
574
+ Qa,b),Ra["return"](null);throw Hg;case 5:ol=zd[0].startTime;pl=zd[zd.length-1].endTime;ql=new U(zd);rl="text"==d?"subtitle":void 0;Ig=[];if(l)for(Jg=r(l.split(",")),Ie=Jg.next();!Ie.done;Ie=Jg.next())sl=Ie.value,Ig.push(sl);tl={id:a.Ia++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ql,mimeType:Qa,codecs:c,kind:rl,encrypted:D,drmInfos:B,keyIds:E,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,
575
+ width:void 0,height:void 0,bandwidth:void 0,roles:Ig,channelsCount:h,audioSamplingRate:null,closedCaptions:k};return Ra["return"]({stream:tl,Fc:b,je:m,Td:ol,Re:pl,Sd:Bb})}})}function qo(a,b){var c=Bn(b.ba,"EXT-X-PLAYLIST-TYPE"),d=Bn(b.ba,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;d?Xn(a,Qn):(c?Xn(a,to):Xn(a,uo),d=vo(b.ba,"EXT-X-TARGETDURATION"),d=Number(d.value),a.Z=Math.max(d,a.Z),a.ca=Math.min(d,a.ca))}
576
+ function wo(a,b,c,d){c=Bn(c,"EXT-X-MAP");if(!c)return null;var e=wn(c,"URI");d=no(Lb([b],[e])[0],d);b=[d,vn(c,"BYTERANGE","")].join("-");a.P.has(b)||(c=xo(d,c),a.P.set(b,c));return a.P.get(b)}function xo(a,b){var c=0,d=null,e=vn(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new rg(function(){return[a]},c,d)}
577
+ function yo(a,b,c,d,e,f){var g=c.ba,h=no(c.g,f);c=vo(g,"EXTINF").value.split(",");c=d+Number(c[0]);f=0;var k=null;if(g=Bn(g,"EXT-X-BYTERANGE"))f=g.value.split("@"),g=Number(f[0]),f=f[1]?Number(f[1]):b.g+1,k=f+g-1;return new tg(d,c,function(){return[h]},f,k,a,e,0,Infinity)}function eo(a){if(a.g){for(var b=r(a.K),c=b.next();!c.done;c=b.next())a.g.xb(c.value);a.K=[]}}
578
+ function Wn(a,b,c,d,e,f){var g,h,k,l,m,n,p,u,v,z,w,A,D,B,E,F,H,G,I,J,M;return K(function(P){switch(P.g){case 1:g=c.segments;k=Cn(c.ba,"EXT-X-MEDIA-SEQUENCE",0);if(a.i!=Qn&&e.has(k)){l=e.get(k);P.B(2);break}if(null!=a.I){P.B(3);break}h=wo(a,c.g,g[0].ba,f);m=a;return t(P,zo(a,b,h,d,k,!1,g[0],f),4);case 4:m.I=P.h;case 3:l=a.I;case 2:n=g[0].g,Wa(n.split("/").pop()),p=Cn(c.ba,"EXT-X-DISCONTINUITY-SEQUENCE"),u=a.C.get(p)||0,v=[],z=function(wa){return fb(wa)},w=r(z(g)),A=w.next();case 5:if(A.done){P.B(7);
579
+ break}B=D=A.value;E=B.da;F=B.item;H=v[v.length-1];G=0==E?l:H.endTime;I=k+E;e.set(I,G);h=wo(a,c.g,F.ba,f);J=Bn(F.ba,"EXT-X-DISCONTINUITY");if(!J){P.B(8);break}p++;return t(P,Ao(a,p,b,h,d,I,F,f,G),9);case 9:u=P.h;case 8:M=yo(h,H,F,G,u,f);v.push(M);A=w.next();P.B(5);break;case 7:return P["return"](v)}})}
580
+ function Ao(a,b,c,d,e,f,g,h,k){var l,m;return K(function(n){if(1==n.g)return l=0,a.C.has(b)?(l=a.C.get(b),n.B(2)):t(n,zo(a,c,d,e,f,!0,g,h),3);2!=n.g&&(m=n.h,l=k-m,a.C.set(b,l));return n["return"](l)})}
581
+ function Bo(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:c=Qc;d=gh(b.ua(),b.h,b.g,a.o.retryParameters);if(a.o.hls.useFullSegmentsForStartTime)return k["return"](Rn(a,d,c));e=gh(b.ua(),b.h,b.h+2048-1,a.o.retryParameters);y(k,2);return t(k,Rn(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=C(k);if(7001==g.code)throw g;Sa("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",
582
+ e.uris[0]);return t(k,Rn(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
583
+ function zo(a,b,c,d,e,f,g,h){var k,l,m,n,p,u,v,z;return K(function(w){switch(w.g){case 1:k=yo(c,null,g,0,0,h);if(a.A&&!f&&(l=a.h.get(b),m=l.Sd.get(e),void 0!=m))return w["return"](m);d=d.toLowerCase();if(so.includes(d))throw Sa("Raw formats are not yet supported. Skipping "+d),new O(1,4,4035);if("video/webm"==d)throw Sa("WebM in HLS is not yet supported. Skipping."),new O(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.B(2);break}n=[Bo(a,k)];c&&n.push(Bo(a,c));return t(w,Promise.all(n),3);case 3:return p=
584
+ w.h,u=p[0],v=p[1]||p[0],w["return"](Co(b,u.uri,u.data,v.data));case 2:if("video/mp2t"!=d){w.B(4);break}return t(w,Bo(a,k),5);case 5:return z=w.h,w["return"](Do(b,z.uri,z.data));case 4:throw new O(2,4,4030,b);}})}
585
+ function Co(a,b,c,d){var e=0;(new ge).box("moov",ke).box("trak",ke).box("mdia",ke).X("mdhd",function(h){h.reader.skip(0==h.version?8:16);e=h.reader.O();h.parser.stop()}).parse(d,!0);if(!e)throw new O(2,4,4030,a,b);var f=0,g=!1;(new ge).box("moof",ke).box("traf",ke).X("tfdt",function(h){f=(0==h.version?h.reader.O():h.reader.fb())/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new O(2,4,4030,a,b);return f}
586
+ function Do(a,b,c){function d(){f.seek(g+188);h=f.wa();71!=h&&(f.seek(g+192),h=f.wa());71!=h&&(f.seek(g+204),h=f.wa());71!=h&&e();f.Yd(1)}function e(){throw new O(2,4,4030,a,b);}var f=new S(c,0),g=0,h=0;for(c=Math.min(f.T.byteLength-188,940);;){g=f.H;h=f.wa();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.Xb();if(8191==(k&8191))d();else if(k&16384)if(k=(f.wa()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.wa(),f.skip(k)),1!=f.O()>>8)d();else{f.skip(3);c=f.wa()>>6;0!=c&&1!=c||e();0==f.wa()&&e();c=f.wa();k=f.Xb();
587
+ var l=f.Xb();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function ho(a,b){if(1==b.length)return b[0];var c=go(a,b);if(null!=c)return c;throw new O(2,4,4025,b);}function go(a,b){for(var c=r(Eo[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return"text"==a?"":null}
588
+ function no(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new O(2,4,4039,f);}}return c}
589
+ function ro(a,b,c,d,e){var f,g,h,k,l,m,n,p,u,v,z;return K(function(w){if(1==w.g){f=Nb;g=Qc;h=no(d.segments[0].g,e);k=new nb(h);l=k.ra.split(".").pop();m=Fo[b];if(n=m[l])return w["return"](n);if(b==f.ha)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");p=Jc([h],a.o.retryParameters);p.method="HEAD";return t(w,Rn(a,p,g),2)}u=w.h;v=u.headers["content-type"];return v?w["return"](v.split(";")[0]):(z=m.mp4,w["return"](z))})}
590
+ function vo(a,b){var c=Bn(a,b);if(!c)throw new O(2,4,4024,b);return c}q.Ub=function(){var a=this,b,c;return K(function(d){if(1==d.g){if(!a.D)return d["return"]();y(d,2);return t(d,a.update(),4)}if(2!=d.g)return b=a.ka,a.m.W(b),ta(d,0);c=C(d);if(!a.D)return d["return"]();c.severity=1;a.D.onError(c);a.m.W(.1);x(d)})};function Xn(a,b){a.i=b;a.g&&a.g.$b(a.i==Qn);a.i!=Qn||a.m.stop()}function Rn(a,b,c){if(!a.u)throw new O(2,7,7001);b=a.D.networkingEngine.request(c,b);Ec(a.u,b);return b.promise}
591
+ L("shaka.hls.HlsParser",Pn);
592
+ var Eo={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},so=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Fo={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",
593
+ cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}},po={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=wn(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=wn(a,"URI");b=On(b);b=N(b.data);b=Mb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=vn(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);
594
+ return b}},Qn="VOD",uo="EVENT",to="LIVE",Un={ie:Qn,zf:uo,he:to};pg.m3u8=function(){return new Pn};ng["application/x-mpegurl"]=function(){return new Pn};ng["application/vnd.apple.mpegurl"]=function(){return new Pn};function Go(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Vd:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Ub(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Ho(){}function Io(a,b,c,d){var e=new Jo;ad(b.headers).forEach(function(k,l){e.append(l,k)});var f=new Ko,g={Ed:!1,ee:!1};a=Lo(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d);a=new mc(a,function(){g.Ed=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new Q(function(){g.ee=!0;f.abort()});h.W(b/1E3);a["finally"](function(){h.stop()})}return a}
595
+ function Lo(a,b,c,d,e){var f,g,h,k,l,m,n,p,u,v,z,w,A,D;return K(function(B){switch(B.g){case 1:return f=Mo,g=No,m=l=0,n=Date.now(),y(B,2),t(B,f(a,c),4);case 4:return h=B.h,p=h.clone().body.getReader(),v=(u=h.headers.get("Content-Length"))?parseInt(u,10):0,z=function(E){function F(){var H,G;return K(function(I){switch(I.g){case 1:return y(I,2),t(I,p.read(),4);case 4:H=I.h;ta(I,3);break;case 2:return C(I),I["return"]();case 3:H.done||(l+=H.value.byteLength);G=Date.now();if(100<G-n||H.done)e(G-n,l-m,
596
+ v-l),m=l,n=G;H.done?E.close():(E.enqueue(H.value),F());x(I)}})}F()},new g({start:z}),t(B,h.arrayBuffer(),5);case 5:k=B.h;ta(B,3);break;case 2:w=C(B);if(d.Ed)throw new O(1,1,7001,a,b);if(d.ee)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,w,b);case 3:return A={},D=h.headers,D.forEach(function(E,F){A[F.trim()]=E}),B["return"](Go(A,k,h.status,a,h.url,b))}})}
597
+ function Oo(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}L("shaka.net.HttpFetchPlugin",Ho);Ho.isSupported=Oo;Ho.parse=Io;var Mo=window.fetch,Ko=window.AbortController,No=window.ReadableStream,Jo=window.Headers;Oo()&&(Gc("http",Io,2),Gc("https",Io,2));function Po(){}
598
+ function Qo(a,b,c,d){var e=new Ro,f=Date.now(),g=0,h=new Promise(function(k,l){e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onabort=function(){l(new O(1,1,7001,a,c))};e.onload=function(n){n=n.target;var p=n.getAllResponseHeaders().trim().split("\r\n"),u={};p=r(p);for(var v=p.next();!v.done;v=p.next())v=v.value.split(": "),u[v[0].toLowerCase()]=v.slice(1).join(": ");try{var z=Go(u,n.response,n.status,a,n.responseURL,
599
+ c);k(z)}catch(w){l(w)}};e.onerror=function(n){l(new O(1,1,1002,a,n,c))};e.ontimeout=function(){l(new O(1,1,1003,a,c))};e.onprogress=function(n){var p=Date.now();if(100<p-f||n.lengthComputable&&n.loaded==n.total)d(p-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=p};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new mc(h,function(){e.abort();return Promise.resolve()})}L("shaka.net.HttpXHRPlugin",Po);Po.parse=Qo;var Ro=window.XMLHttpRequest;
600
+ Gc("http",Qo,1);Gc("https",Qo,1);function So(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function To(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}So.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 Uo(a){var b=this;this.U=a;this.g=new Map;this.J=new Rc(function(){return Vo(b)["catch"](function(){})});this.h=[];this.Rd=function(){};this.Nd=function(){};this.Hb=new So}Uo.prototype.destroy=function(){return this.J.destroy()};function Wo(a,b,c){a.Rd=b;a.Nd=c}function Vo(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
601
+ function Xo(a,b,c,d,e,f){Sc(a.J);var g=To(a.Hb,d);d=(a.g.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,u;return K(function(v){if(1==v.g)return t(v,Yo(a,c),2);h=v.h;if(a.J.g)throw new O(2,9,7001);if(e)for(m in k=N(h),l=new ll(k),l.data)n=Number(m),p=l.data[n],u=l.g[n],a.Nd(p,u);a.Hb.close(g,h.byteLength);var z=a.Hb;a.Rd(0==z.i?0:z.j/z.i,a.Hb.h);return v["return"](f(h))})});a.g.set(b,d);return d}
602
+ function Zo(a,b,c){Sc(a.J);var d=(a.g.get(b)||Promise.resolve()).then(function(){return K(function(e){return t(e,c(),0)})});a.g.set(b,d)}function $o(a){return K(function(b){return 1==b.g?t(b,Promise.all(a.g.values()),2):b["return"](a.Hb.h)})}function Yo(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=Qc,d=a.U.request(c,b),e=function(){return d.abort()},a.h.push(e),t(g,d.promise,2);f=g.h;Ac(a.h,e);return g["return"](f.data)})};function ap(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Ob;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}ap.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}y(b,2);return t(b,a.g,4)}if(2!=b.g)return ta(b,0);C(b);x(b)})};
603
+ function bp(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 t(g,b(f.key,f.value,f),2)}f["continue"]();x(g)})}})}ap.prototype.store=function(){return this.h};ap.prototype.promise=function(){return this.g};function cp(a){this.h=a;this.g=[]}cp.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function dp(a,b){return ep(a,b,"readwrite")}function ep(a,b,c){c=a.h.transaction([b],c);var d=new ap(c,b);a.g.push(d);d.promise().then(function(){Ac(a.g,d)},function(){Ac(a.g,d)});return d};function fp(a,b,c){this.g=new cp(a);this.i=b;this.h=c}q=fp.prototype;q.destroy=function(){return this.g.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return gp(this.i)};q.removeSegments=function(a,b){return hp(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return t(d,ip(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Fd(e)}))})};q.addManifests=function(){return gp(this.h)};
604
+ q.updateManifestExpiration=function(a,b){var c=dp(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 hp(this,this.h,a,b)};q.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return t(d,ip(b,b.h,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.Kb(e)})))})};
605
+ q.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=ep(a.g,a.h,"readonly"),c=new Map,t(d,bp(b,function(e,f){var g;return K(function(h){if(1==h.g)return t(h,a.Kb(f),2);g=h.h;c.set(e,g);x(h)})}),2)):3!=d.g?t(d,b.promise(),3):d["return"](c)})};q.Fd=function(a){return a};q.Kb=function(a){return Promise.resolve(a)};function gp(a){return Promise.reject(new O(2,9,9011,"Cannot add new value to "+a))}
606
+ q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=dp(c.g,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={fc:g.fc},k=h.next())l=k.value,g.fc=e.add(l),g.fc.onsuccess=function(n){return function(){f.push(n.fc.result)}}(g);return t(m,d.promise(),2)}return m["return"](f)})};
607
+ function hp(a,b,c,d){a=dp(a.g,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={ec:e.ec},f=c.next())e.ec=f.value,b["delete"](e.ec).onsuccess=function(g){return function(){return d(g.ec)}}(e);return a.promise()}
608
+ function ip(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=ep(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Eb:h.Eb,Cb:h.Cb},l=k.next())h.Cb=l.value,h.Eb=e.get(h.Cb),h.Eb.onsuccess=function(n){return function(){void 0==n.Eb.result&&g.push(n.Cb);f[n.Cb]=n.Eb.result}}(h);return t(m,d.promise(),2)}if(g.length)throw new O(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function jp(a){this.g=new cp(a)}jp.prototype.destroy=function(){return this.g.destroy()};jp.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=ep(a.g,"session-ids","readonly"),c=[],t(d,bp(b,function(e,f){c.push(f)}),2)):3!=d.g?t(d,b.promise(),3):d["return"](c)})};jp.prototype.add=function(a){var b=dp(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
609
+ jp.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=dp(b.g,"session-ids"),t(d,bp(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):t(d,c.promise(),0)})};function kp(){this.g=new Map}kp.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};kp.prototype.init=function(){var a=this;lp.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
610
+ function mp(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Fa:d,ja:f},ja:e})})});if(b)return b;throw new O(2,9,9013,"Could not find a cell that supports add-operations");}function np(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Fa:d,ja:f},e)})})}
611
+ function op(a,b,c){a=a.g.get(b);if(!a)throw new O(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new O(2,9,9013,"Could not find cell with name "+c);return b}function pp(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function qp(a){var b=Array.from(a.g.keys());if(!b.length)throw new O(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
612
+ function rp(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=lp,d.forEach(function(f){(f=f())&&b.push(f)})),t(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):t(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function sp(a,b){lp.set(a,b)}L("shaka.offline.StorageMuxer",kp);kp.unregister=function(a){lp["delete"](a)};kp.register=sp;kp.prototype.destroy=kp.prototype.destroy;var lp=new Map;function tp(){fp.apply(this,arguments)}oa(tp,fp);tp.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=dp(c.g,c.h);e=d.store();f=new Ob;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new O(2,9,9012,"Could not find values for "+a))};return t(g,Promise.all([d.promise(),f]),0)})};
613
+ tp.prototype.Kb=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=up(a.periods[c],e),b.push(f);return t(h,Jm(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})})};
614
+ function up(a,b){vp(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return wp(e,a.startTime,b)})}
615
+ function wp(a,b,c){var d=a.initSegmentUri?xp(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,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=xp(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,
616
+ initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e}}),variantIds:a.variantIds,roles:[],audioSamplingRate:null,channelsCount:null,closedCaptions:null}}tp.prototype.Fd=function(a){return{data:a.data}};function xp(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new O(2,9,9004,"Could not parse uri "+a);}
617
+ function vp(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
618
+ f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function yp(){fp.apply(this,arguments)}oa(yp,fp);
619
+ yp.prototype.Kb=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=r(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(zp(n,k.startTime,k.startTime+e));f=l;b.push(f)}return t(h,Jm(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
616
620
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
617
- function sp(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,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,
618
- dataKey:d.dataKey}}),variantIds:a.variantIds,roles:[],audioSamplingRate:null,channelsCount:null,closedCaptions:null}};function tp(){Zo.apply(this,arguments)}pa(tp,Zo);tp.prototype.hasFixedKeySpace=function(){return!1};tp.prototype.addSegments=function(a){return this.add(this.c,a)};tp.prototype.addManifests=function(a){return this.add(this.a,a)};tp.prototype.Cb=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function up(){this.h=this.f=this.c=this.b=this.a=this.g=null}p=up.prototype;
619
- p.init=function(){var a=this,b=new Sb,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.g=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new mp(d,"segment","manifest"):null;a.a=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new rp(d,"segment-v2","manifest-v2"):null;a.b=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new rp(d,"segment-v3","manifest-v3"):null;a.c=e;e=d.objectStoreNames;
620
- e=e.contains("manifest-v5")&&e.contains("segment-v5")?new tp(d,"segment-v5","manifest-v5"):null;a.f=e;d=d.objectStoreNames.contains("session-ids")?new cp(d):null;a.h=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=r(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new M(2,9,9001,c.error));d.preventDefault()};return b};
621
- p.destroy=function(){var a=this;return J(function(b){switch(b.a){case 1:if(!a.a){b.s(2);break}return u(b,a.a.destroy(),2);case 2:if(!a.b){b.s(4);break}return u(b,a.b.destroy(),4);case 4:if(!a.c){b.s(6);break}return u(b,a.c.destroy(),6);case 6:if(!a.f){b.s(8);break}return u(b,a.f.destroy(),8);case 8:if(!a.h){b.s(10);break}return u(b,a.h.destroy(),10);case 10:a.g&&a.g.close(),w(b)}})};
622
- p.getCells=function(){var a=new Map;this.a&&a.set("v1",this.a);this.b&&a.set("v2",this.b);this.c&&a.set("v3",this.c);this.f&&a.set("v5",this.f);return a};p.getEmeSessionCell=function(){return this.h};
623
- p.erase=function(){var a=this;return J(function(b){switch(b.a){case 1:if(!a.a){b.s(2);break}return u(b,a.a.destroy(),2);case 2:if(!a.b){b.s(4);break}return u(b,a.b.destroy(),4);case 4:if(!a.c){b.s(6);break}return u(b,a.c.destroy(),6);case 6:if(!a.f){b.s(8);break}return u(b,a.f.destroy(),8);case 8:return a.g&&a.g.close(),u(b,vp(),10);case 10:return a.g=null,a.a=null,a.b=null,a.c=null,a.f=null,u(b,a.init(),0)}})};
624
- function vp(){var a=new Sb,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}lp("idb",function(){return nd("CrKey")||!window.indexedDB?null:new up});function wp(a,b,c,d){this.a=a;this.g=b;this.f=c;this.c=d;this.b=["offline:",a,"/",b,"/",c,"/",d].join("")}wp.prototype.za=function(){return this.g};wp.prototype.ca=function(){return this.f};wp.prototype.key=function(){return this.c};wp.prototype.toString=function(){return this.b};
625
- function xp(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 wp(b,c,d,Number(a[4])):null};function yp(a,b){this.b=a;this.a=b}
626
- function zp(a,b){var c=new T(null,0);c.Aa(b.duration);var d=b.streams.filter(function(k){return"audio"==k.type}),e=b.streams.filter(function(k){return"video"==k.type});d=Ap(a,d,e,c);e=b.streams.filter(function(k){return"text"==k.type}).map(function(k){return Bp(a,k,c)});var f=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var g=r(d.values()),h=g.next();!h.done;h=g.next())h=h.value,h.audio&&h.audio.encrypted&&(h.audio.drmInfos=f),h.video&&h.video.encrypted&&(h.video.drmInfos=f);return{presentationTimeline:c,
621
+ function zp(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,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,
622
+ dataKey:d.dataKey}}),variantIds:a.variantIds,roles:[],audioSamplingRate:null,channelsCount:null,closedCaptions:null}};function Ap(){fp.apply(this,arguments)}oa(Ap,fp);Ap.prototype.hasFixedKeySpace=function(){return!1};Ap.prototype.addSegments=function(a){return this.add(this.i,a)};Ap.prototype.addManifests=function(a){return this.add(this.h,a)};Ap.prototype.Kb=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Bp(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Bp.prototype;
623
+ q.init=function(){var a=this,b=new Ob,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 tp(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new yp(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new yp(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
624
+ e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Ap(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new jp(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=r(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new O(2,9,9001,c.error));d.preventDefault()};return b};
625
+ q.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return t(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return t(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return t(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return t(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return t(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),x(b)}})};
626
+ 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};
627
+ q.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return t(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return t(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return t(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return t(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),t(b,Cp(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,t(b,a.init(),0)}})};
628
+ function Cp(){var a=new Ob,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new O(2,9,9001,b.error));c.preventDefault()};return a}sp("idb",function(){return md("CrKey")||!window.indexedDB?null:new Bp});function Dp(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Dp.prototype.Fa=function(){return this.i};Dp.prototype.ja=function(){return this.h};Dp.prototype.key=function(){return this.l};Dp.prototype.toString=function(){return this.j};
629
+ function Ep(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 Dp(b,c,d,Number(a[4])):null};function Fp(a,b){this.h=a;this.g=b}
630
+ function Gp(a,b){var c=new T(null,0);c.Ga(b.duration);var d=b.streams.filter(function(k){return"audio"==k.type}),e=b.streams.filter(function(k){return"video"==k.type});d=Hp(a,d,e,c);e=b.streams.filter(function(k){return"text"==k.type}).map(function(k){return Ip(a,k,c)});var f=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var g=r(d.values()),h=g.next();!h.done;h=g.next())h=h.value,h.audio&&h.audio.encrypted&&(h.audio.drmInfos=f),h.video&&h.video.encrypted&&(h.video.drmInfos=f);return{presentationTimeline:c,
627
631
  minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e}}
628
- function Ap(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0});b=r(b);for(e=b.next();!e.done;e=b.next())for(e=e.value,
629
- g=Bp(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Bp(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
630
- function Bp(a,b,c){var d=b.segments.map(function(e){return Cp(a,e)});c.rb(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,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,
631
- roles:b.roles,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,closedCaptions:b.closedCaptions}}function Cp(a,b){var c=new wp("segment",a.b,a.a,b.dataKey);return new tg(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Dp(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd)}function Dp(a,b){var c=new wp("segment",a.b,a.a,b);return new rg(function(){return[c.toString()]},0,null)};function Ep(){this.a=null}p=Ep.prototype;p.configure=function(){};
632
- p.start=function(a,b){var c=this,d,e,f,g,h,k,l;return J(function(m){switch(m.a){case 1:d=xp(a);c.a=d;if(null==d||"manifest"!=d.a)throw new M(2,1,9004,a);e=new dp;ta(m);return u(m,e.init(),4);case 4:return u(m,hp(e,d.za(),d.ca()),5);case 5:return f=m.b,u(m,f.getManifests([d.key()]),6);case 6:return g=m.b,h=g[0],k=new yp(d.za(),d.ca()),l=zp(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return va(m),u(m,e.destroy(),7);case 7:wa(m,0)}})};p.stop=function(){return Promise.resolve()};
633
- p.update=function(){};p.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return J(function(m){switch(m.a){case 1:return d=c.a,e=new dp,y(m,2,3),u(m,e.init(),5);case 5:return u(m,hp(e,d.za(),d.ca()),6);case 6:return f=m.b,u(m,f.getManifests([d.key()]),7);case 7:g=m.b;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.s(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return va(m),u(m,e.destroy(),10);case 10:wa(m,0);break;case 2:C(m),m.s(3)}})};
634
- ng["application/x-offline-manifest"]=function(){return new Ep};function Fp(){}function Gp(a){var b=xp(a);b&&"manifest"==b.a?(a={uri:a,Qd:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=tc(a)):a=b&&"segment"==b.a?Hp(b.key(),b):rc(new M(2,1,9004,a));return a}
635
- function Hp(a,b){var c=new dp;return tc(void 0).U(function(){return c.init()}).U(function(){return hp(c,b.za(),b.ca())}).U(function(d){return d.getSegments([b.key()])}).U(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}K("shaka.offline.OfflineScheme",Fp);Fp.plugin=Gp;Jc("offline",Gp);function Ip(a,b,c){var d,e,f,g,h,k;return J(function(l){switch(l.a){case 1:d=[];for(var m=[],n=r(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var t=!1,v=r(m),z=v.next();!z.done;z=v.next())if(z=z.value,Jp(z.info,q)){z.sessionIds.push(q.sessionId);t=!0;break}t||m.push({info:q,sessionIds:[q.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.s(4);break}g=f.value;h=Kp(a,b,g);return u(l,h,5);case 5:k=l.b;d=d.concat(k);f=e.next();l.s(2);break;case 4:return l["return"](d)}})}
636
- function Kp(a,b,c){var d,e;return J(function(f){switch(f.a){case 1:return d=new sd({qb:b,onError:function(){},rc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),y(f,2),d.configure(a),u(f,Cd(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 C(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return y(f,6),u(f,Ld(d),8);case 8:ua(f,7);break;case 6:return C(f),u(f,d.destroy(),
637
- 9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return J(function(h){if(1==h.a)return y(h,2),u(h,Md(d,g),4);if(2!=h.a)return e.push(g),ua(h,0);C(h);w(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
638
- function Jp(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Ec(a.audioCapabilities,b.audioCapabilities,c)&&Ec(a.videoCapabilities,b.videoCapabilities,c)};function Lp(a,b,c){var d=b.presentationTimeline.getDuration();b=Mp(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function Np(a,b){var c=zp(new yp(a.za(),a.ca()),b),d=b.appMetadata||{};c=Mp(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
639
- function Mp(a){var b=[],c=Uf(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(Nf(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Of(c.value));return b};function Op(){this.a={}}function Pp(a,b,c){c=c.endTime-c.startTime;return Qp(a,b)*c}function Qp(a,b){var c=a.a[b];null==c&&(c=0);return c};function Rp(a,b,c){a.variants=a.variants.filter(function(d){return Kf(d,b,c)})}function Sp(a){a.variants=a.variants.filter(function(b){var c=!0;b.audio&&(c=c&&ff(b.audio));b.video&&(c=c&&ff(b.video));return c})}function Tp(a,b){a.variants=a.variants.filter(function(c){return ce(b,c)})};function Up(a){var b=this;if(a&&a.constructor!=V)throw new M(2,9,9008);this.N=this.i=null;a?(this.i=a.i,this.N=a.Gb()):(this.i=di(),this.N=new Ic);this.vc=[];this.Mb=[];this.gd=[];var c=!a;this.F=new Tc(function(){var d,e,f,g,h;return J(function(k){switch(k.a){case 1:return u(k,Promise.all(b.gd.map(function(l){return Po(l)})),2);case 2:d=function(){};e=[];f=r(b.Mb);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.s(4);break}return u(k,b.N.destroy(),
640
- 4);case 4:b.i=null,b.N=null,w(k)}})})}function Vp(){if(jd())a:{var a=r(ep.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}p=Up.prototype;p.destroy=function(){return this.F.destroy()};
641
- p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=bi(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 fi(this.i,a)};p.getConfiguration=function(){var a=di();fi(a,this.i,di());return a};p.Gb=function(){return this.N};
642
- p.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new No(this.N);this.gd.push(f);b=Wp(this,a,b||{},function(){var h;return J(function(k){if(1==k.a)return u(k,mg(a,d.N,e.manifest.retryParameters,c||null),2);h=k.b;return k["return"](Ob(h))})},e,f);var g=new qc(b,function(){return Po(f)});g["finally"](function(){Dc(d.gd,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.");
643
- return g.promise.then(h)};return Xp(this,g)};p.Fe=function(){Hb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
644
- function Wp(a,b,c,d,e,f){var g,h,k,l,m,n,q,t,v,z,x;return J(function(A){switch(A.a){case 1:return Yp(),h=g=null,k=new dp,m=l=null,y(A,2,3),u(A,d(),5);case 5:return g=A.b,u(A,Zp(a,b,g,e),6);case 6:n=A.b;$p(a);q=!n.presentationTimeline.S()&&!n.presentationTimeline.Wa();if(!q)throw new M(2,9,9005,b);return u(A,aq(a,n,function(D){m=m||D},e),7);case 7:h=A.b;$p(a);if(m)throw m;return u(A,a.jb(n,h,e),8);case 8:return u(A,k.init(),9);case 9:return $p(a),u(A,fp(k),10);case 10:return l=A.b,$p(a),u(A,bq(a,l.ca,
645
- h,n,b,c,e,f),11);case 11:t=A.b;$p(a);if(m)throw m;return u(A,l.ca.addManifests([t]),12);case 12:return v=A.b,$p(a),z=new wp("manifest",l.path.za,l.path.ca,v[0]),A["return"](Np(z,t));case 3:return va(A),a.vc=[],u(A,k.destroy(),13);case 13:if(!g){A.s(14);break}return u(A,g.stop(),14);case 14:if(!h){A.s(16);break}return u(A,h.destroy(),16);case 16:wa(A,0);break;case 2:x=C(A);if(!l){A.s(18);break}return u(A,l.ca.removeSegments(a.vc,function(){}),18);case 18:throw m||x;}})}
646
- p.jb=function(a,b,c){var d,e,f,g,h,k,l,m,n,q,t,v,z,x,A;return J(function(D){if(1==D.a){d={width:Infinity,height:Infinity};Rp(a,c.restrictions,d);Sp(a);Tp(a,b);e=[];f=c.preferredAudioChannelCount;Ef(a,f);g=r(a.variants);for(h=g.next();!h.done;h=g.next())k=h.value,e.push(Nf(k));l=r(a.textStreams);for(m=l.next();!m.done;m=l.next())n=m.value,e.push(Of(n));return u(D,c.offline.trackSelectionCallback(e),2)}q=D.b;t=new Set;v=new Set;z=r(q);for(x=z.next();!x.done;x=z.next())A=x.value,"variant"==A.type&&t.add(A.id),
647
- "text"==A.type&&v.add(A.id);a.variants=a.variants.filter(function(B){return t.has(B.id)});a.textStreams=a.textStreams.filter(function(B){return v.has(B.id)});cq(a);w(D)})};
648
- function bq(a,b,c,d,e,f,g,h){var k,l,m,n,q,t,v,z,x,A,D,B;return J(function(E){switch(E.a){case 1:return k=Lp(e,d,f),l=g.offline.progressCallback,m=function(H,G){k.size=G;l(k,H)},n=function(H,G){v&&g.offline.usePersistentLicense&&z==G&&Kd(c,"cenc",H)},Oo(h,m,n),q=d.variants.some(function(H){var G=H.audio&&H.audio.encrypted;return H.video&&H.video.encrypted||G}),t=d.variants.some(function(H){return(H.video?H.video.drmInfos:[]).concat(H.audio?H.audio.drmInfos:[]).some(function(G){return G.initData&&
649
- G.initData.length})}),v=q&&!t,z=null,v&&(x=c.c,z=dq.get(x.keySystem)),ta(E),D=A=eq(a,h,b,c,d,e,f,g),u(E,To(h),4);case 4:D.size=E.b;A.expiration=c.Fb();B=Rd(c);A.sessionIds=g.offline.usePersistentLicense?B:[];if(q&&g.offline.usePersistentLicense&&!B.length)throw new M(2,9,9007);return E["return"](A);case 2:return va(E),u(E,h.destroy(),5);case 5:wa(E,0)}})}p.remove=function(a){return fq(this,gq(this,a))};
650
- function gq(a,b){var c,d,e,f,g,h;return J(function(k){switch(k.a){case 1:Yp();c=xp(b);if(null==c||"manifest"!=c.a)throw new M(2,9,9004,b);d=c;e=new dp;ta(k);return u(k,e.init(),4);case 4:return u(k,hp(e,d.za(),d.ca()),5);case 5:return f=k.b,u(k,f.getManifests([d.key()]),6);case 6:return g=k.b,h=g[0],u(k,Promise.all([hq(a,h,e),iq(f,d,h)]),2);case 2:return va(k),u(k,e.destroy(),8);case 8:wa(k,0)}})}
651
- function jq(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:fd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:fd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function hq(a,b,c){return J(function(d){return u(d,kq(a.N,a.i.drm,c,b),0)})}
652
- function iq(a,b,c){function d(){}var e=lq(c);Np(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.Xe=function(){return fq(this,mq(this))};
653
- function mq(a){var b,c,d,e,f,g,h,k,l,m;return J(function(n){switch(n.a){case 1:return Yp(),b=a.N,c=a.i.drm,d=new dp,e=!1,ta(n),u(n,d.init(),4);case 4:f=[],ip(d,function(q){return f.push(q)}),g=r(f),h=g.next();case 5:if(h.done){n.s(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.b,u(n,Ip(c,b,l),9);case 9:return m=n.b,u(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.s(5);break;case 2:return va(n),u(n,d.destroy(),11);case 11:wa(n,3);break;case 3:return n["return"](!e)}})}
654
- p.list=function(){return fq(this,nq())};function nq(){var a,b,c;return J(function(d){switch(d.a){case 1:return Yp(),a=[],b=new dp,ta(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),gp(b,function(e,f){c=c.then(function(){var g;return J(function(h){if(1==h.a)return u(h,f.getAllManifests(),2);g=h.b;g.forEach(function(k,l){var m=Np(new wp("manifest",e.za,e.ca,l),k);a.push(m)});w(h)})})}),u(d,c,2);case 2:return va(d),u(d,b.destroy(),6);case 6:wa(d,3);break;case 3:return d["return"](a)}})}
655
- function Zp(a,b,c,d){var e,f,g,h,k;return J(function(l){if(1==l.a)return e=null,f=a.N,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m}},c.configure(d.manifest),$p(a),u(l,c.start(b,g),2);if(3!=l.a)return h=l.b,$p(a),k=oq(h),u(l,Promise.all(gb(k,function(m){return m.createSegmentIndex()})),3);$p(a);if(e)throw e;return l["return"](h)})}
656
- function aq(a,b,c,d){var e;return J(function(f){switch(f.a){case 1:return e=new sd({qb:a.N,onError:c,rc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,zd(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Ld(e),3);case 3:return u(f,Jd(e),4);case 4:return f["return"](e)}})}
657
- function eq(a,b,c,d,e,f,g,h){for(var k=new Op,l=r(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var q=m.audio,t=m.video;q&&!t&&(n.a[q.id]=q.bandwidth||m.bandwidth);!q&&t&&(n.a[t.id]=t.bandwidth||m.bandwidth);if(q&&t){var v=q.bandwidth||393216,z=t.bandwidth||m.bandwidth-v;0>=z&&(z=m.bandwidth);n.a[q.id]=v;n.a[t.id]=z}}l=r(e.textStreams);for(n=l.next();!n.done;n=l.next())k.a[n.value.id]=52;n=new Map;n.set(null,Promise.resolve(null));m=new Map;q=oq(e);l=new Map;q=r(q);for(t=q.next();!t.done;t=
658
- q.next())t=t.value,v=pq(a,b,c,k,e,t,h,n,m),l.set(t.id,v);a=r(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.c)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,expiration:d.Fb(),streams:a,sessionIds:h?Rd(d):[],drmInfo:b,appMetadata:g}}
659
- function pq(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,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,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,closedCaptions:f.closedCaptions},m=f.id;qq(f,e.presentationTimeline.Ia(),
660
- function(n){var q=rq(a,b,m,f.id,c,d,n.c,g,h),t=sq(a,b,m,f.id,c,d,n,g,k);So(b,m,function(){var v,z;return J(function(x){if(1==x.a)return u(x,q,2);if(3!=x.a)return v=x.b,u(x,t,3);z=x.b;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,dataKey:z});w(x)})})});return l}
661
- function rq(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=fh(g.pa(),g.b,g.a,h.streaming.retryParameters);b=Qo(b,c,h,.5*Qp(f,d),!0,function(l){var m;return J(function(n){if(1==n.a)return u(n,e.addSegments([{data:l}]),2);m=n.b;a.vc.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
662
- function sq(a,b,c,d,e,f,g,h,k){var l=[g.pa()[0],g.b,g.a].join("-");if(k.has(l))return k.get(l);h=fh(g.pa(),g.b,g.a,h.streaming.retryParameters);b=Qo(b,c,h,Pp(f,d,g),!1,function(m){var n;return J(function(q){if(1==q.a)return u(q,e.addSegments([{data:m}]),2);n=q.b;a.vc.push(n[0]);return q["return"](n[0])})});k.set(l,b);return b}function qq(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 $p(a){if(a.F.a)throw new M(2,9,7001);}
663
- function Yp(){if(!Vp())throw new M(2,9,9E3);}function fq(a,b){return J(function(c){if(1==c.a)return a.Mb.push(b),ta(c),u(c,b,4);if(2!=c.a)return c["return"](c.b);va(c);Dc(a.Mb,b);return wa(c,0)})}function Xp(a,b){var c=b.promise;a.Mb.push(c);return b["finally"](function(){Dc(a.Mb,c)})}
664
- function lq(a){var b=[];a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.push(d.initSegmentKey),b.push(d.dataKey)}return b}
665
- function kq(a,b,c,d){var e,f,g;return J(function(h){if(1==h.a){if(!d.drmInfo)return h["return"]();e=jp(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:jq(d,!1),videoCapabilities:jq(d,!0)}});return u(h,Ip(b,a,f),2)}return 3!=h.a?(g=h.b,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
666
- function oq(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
667
- function cq(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}K("shaka.offline.Storage",Up);Up.deleteAll=function(){var a;return J(function(b){return 1==b.a?(a=new dp,ta(b),u(b,kp(a),2)):5!=b.a?(va(b),u(b,a.destroy(),5)):wa(b,0)})};Up.prototype.list=Up.prototype.list;
668
- Up.prototype.removeEmeSessions=Up.prototype.Xe;Up.prototype.remove=Up.prototype.remove;Up.prototype.getStoreInProgress=Up.prototype.Fe;Up.prototype.store=Up.prototype.store;Up.prototype.getNetworkingEngine=Up.prototype.Gb;Up.prototype.getConfiguration=Up.prototype.getConfiguration;Up.prototype.configure=Up.prototype.configure;Up.prototype.destroy=Up.prototype.destroy;Up.support=Vp;
669
- var dq=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");Sj.offline=Vp;function tq(){}function uq(a,b){for(var c={priority:b||0,ge:a},d=r(lb(vq)),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.Z;if(e.item.priority<c.priority){vq.splice(f,0,c);return}}vq.push(c)}K("shaka.polyfill",tq);tq.register=uq;tq.installAll=function(){for(var a=r(vq),b=a.next();!b.done;b=a.next()){b=b.value;try{b.ge()}catch(c){Xa("Error installing polyfill!",c)}}};var vq=[];uq(function(){wq()},-1);function xq(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"===typeof Event)var c=new Event(b,a);else c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}
670
- uq(function(){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||
671
- document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",xq);document.addEventListener("webkitfullscreenerror",xq);document.addEventListener("mozfullscreenchange",xq);document.addEventListener("mozfullscreenerror",xq);document.addEventListener("MSFullscreenChange",xq);document.addEventListener("MSFullscreenError",
672
- xq)}});function yq(a,b,c){if("input"==a)switch(this.type){case "range":a="change"}HTMLInputElement.prototype.originalAddEventListener.call(this,a,b,c)}uq(function(){nd("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=yq)});uq(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})});uq(function(){});function zq(){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 Aq(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Bq(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
673
- function Cq(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=id(b)&&a(b)}}function Dq(){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)}}
674
- uq(function(){var a=pd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Dq():a?(Bq(),12>=a?(zq(),Aq()):zq()):(nd("Tizen 2")||nd("Tizen 3")||nd("Tizen 4"))&&Cq())});function Eq(a,b){try{var c=new Fq(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Gq(a){var b=this.mediaKeys;b&&b!=a&&Hq(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Hq(a,this):Promise.resolve()}function Iq(a){a=L(a.initData);if(rb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Xb(a.subarray(4),!0);a=Zb(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=pb(a);this.dispatchEvent(b)}
675
- function Fq(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
676
- k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=r(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.a=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
677
- Fq.prototype.createMediaKeys=function(){var a=new Jq(this.keySystem);return Promise.resolve(a)};Fq.prototype.getConfiguration=function(){return this.a};function Jq(a){this.a=new WebKitMediaKeys(a);this.b=new Vc}Jq.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Kq(this.a,a)};Jq.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
678
- function Hq(a,b){a.b.$a();if(!b)return Promise.resolve();a.b.l(b,"webkitneedkey",Iq);try{return Ag(b,HTMLMediaElement.HAVE_METADATA,a.b,function(){b.webkitSetMediaKeys(a.a)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Kq(a){zc.call(this);this.f=null;this.g=a;this.c=this.a=null;this.b=new Vc;this.sessionId="";this.expiration=NaN;this.closed=new Sb;this.keyStatuses=new Lq}pa(Kq,zc);p=Kq.prototype;
679
- p.generateRequest=function(a,b){var c=this;this.a=new Sb;try{var d=this.g.createSession("video/mp4",L(b));this.f=d;this.sessionId=d.sessionId||"";this.b.l(this.f,"webkitkeymessage",function(e){c.a&&(c.a.resolve(),c.a=null);e=new P("message",{messageType:void 0==c.keyStatuses.a?"license-request":"license-renewal",message:pb(e.message)});c.dispatchEvent(e)});this.b.l(d,"webkitkeyadded",function(){c.c&&(Mq(c,"usable"),c.c.resolve(),c.c=null)});this.b.l(d,"webkitkeyerror",function(){var e=Error("EME PatchedMediaKeysApple key error");
680
- e.errorCode=c.f.error;if(null!=c.a)c.a.reject(e),c.a=null;else if(null!=c.c)c.c.reject(e),c.c=null;else switch(c.f.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Mq(c,"output-not-allowed");break;default:Mq(c,"internal-error")}});Mq(this,"status-pending")}catch(e){this.a.reject(e)}return this.a};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};p.update=function(a){this.c=new Sb;try{this.f.update(L(a))}catch(b){this.c.reject(b)}return this.c};
681
- p.close=function(){try{this.f.close(),this.closed.resolve(),this.b.$a()}catch(a){this.closed.reject(a)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Mq(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.a=b;c=new P("keystatuseschange");a.dispatchEvent(c)}function Lq(){this.size=0;this.a=void 0}p=Lq.prototype;p.forEach=function(a){this.a&&a(this.a,fe.value())};
682
- p.get=function(a){if(this.has(a))return this.a};p.has=function(a){var b=fe.value();return this.a&&nb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};uq(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Gq,window.MediaKeys=Jq,window.MediaKeySystemAccess=Fq,navigator.requestMediaKeySystemAccess=Eq)});function Nq(a,b){try{var c=new Oq(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Pq(a){if(a.initData){var b=document.createEvent("CustomEvent");b.initCustomEvent("encrypted",!1,!1,null);b.initDataType="cenc";b.initData=pb(ll(a.initData));this.dispatchEvent(b)}}
683
- function Oq(a,b){this.keySystem=a;for(var c=!1,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
684
- !0));if(e.videoCapabilities)for(h=r(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.a=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
685
- Oq.prototype.createMediaKeys=function(){var a=new Qq(this.keySystem);return Promise.resolve(a)};Oq.prototype.getConfiguration=function(){return this.a};function Rq(a){var b=this.mediaKeys;b&&b!=a&&Sq(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Sq(a,this):Promise.resolve()}function Qq(a){this.a=new MSMediaKeys(a);this.b=new Vc}
686
- Qq.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Tq(this.a,a)};Qq.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Sq(a,b){a.b.$a();if(!b)return Promise.resolve();a.b.l(b,"msneedkey",Pq);try{return Ag(b,HTMLMediaElement.HAVE_METADATA,a.b,function(){b.msSetMediaKeys(a.a)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
687
- function Tq(a){zc.call(this);this.f=null;this.g=a;this.c=this.a=null;this.b=new Vc;this.sessionId="";this.expiration=NaN;this.closed=new Sb;this.keyStatuses=new Uq}pa(Tq,zc);p=Tq.prototype;
688
- p.generateRequest=function(a,b){var c=this;this.a=new Sb;try{this.f=this.g.createSession("video/mp4",L(b),null),this.b.l(this.f,"mskeymessage",function(d){c.a&&(c.a.resolve(),c.a=null);d=new P("message",{messageType:void 0==c.keyStatuses.a?"license-request":"license-renewal",message:pb(d.message)});c.dispatchEvent(d)}),this.b.l(this.f,"mskeyadded",function(){c.a?(Vq(c,"usable"),c.a.resolve(),c.a=null):c.c&&(Vq(c,"usable"),c.c.resolve(),c.c=null)}),this.b.l(this.f,"mskeyerror",function(){var d=Error("EME PatchedMediaKeysMs key error");
689
- d.errorCode=c.f.error;if(null!=c.a)c.a.reject(d),c.a=null;else if(null!=c.c)c.c.reject(d),c.c=null;else switch(c.f.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Vq(c,"output-not-allowed");break;default:Vq(c,"internal-error")}}),Vq(this,"status-pending")}catch(d){this.a.reject(d)}return this.a};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};p.update=function(a){this.c=new Sb;try{this.f.update(L(a))}catch(b){this.c.reject(b)}return this.c};
690
- p.close=function(){try{this.f.close(),this.closed.resolve(),this.b.$a()}catch(a){this.closed.reject(a)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Vq(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.a=b;c=new P("keystatuseschange");a.dispatchEvent(c)}function Uq(){this.size=0;this.a=void 0}p=Uq.prototype;p.forEach=function(a){this.a&&a(this.a,fe.value())};
691
- p.get=function(a){if(this.has(a))return this.a};p.has=function(a){var b=fe.value();return this.a&&nb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
692
- uq(function(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Qq,window.MediaKeySystemAccess=Oq,navigator.requestMediaKeySystemAccess=Nq,HTMLMediaElement.prototype.setMediaKeys=Rq)});function Wq(){return Promise.reject(Error("The key system specified is not supported."))}function Xq(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function Yq(){throw new TypeError("Illegal constructor.");}Yq.prototype.createSession=function(){};Yq.prototype.setServerCertificate=function(){};function Zq(){this.keySystem="";throw new TypeError("Illegal constructor.");}Zq.prototype.getConfiguration=function(){};Zq.prototype.createMediaKeys=function(){};
693
- uq(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Wq,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Xq,window.MediaKeys=Yq,window.MediaKeySystemAccess=Zq)},-10);function $q(a){var b=ar;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function br(a,b){try{var c=new cr(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function dr(a){var b=this.mediaKeys;b&&b!=a&&er(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&er(a,this);return Promise.resolve()}
694
- function cr(a,b){this.a=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.a="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=r(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=r(g.audioCapabilities),
695
- m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.a)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=r(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.a)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.a)||e.canPlayType("video/webm",this.a));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
696
- d=!1);if(d){this.b=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;}cr.prototype.createMediaKeys=function(){var a=new fr(this.a);return Promise.resolve(a)};cr.prototype.getConfiguration=function(){return this.b};function fr(a){this.g=a;this.a=null;this.b=new Vc;this.c=[];this.f=new Map}
697
- function er(a,b){a.a=b;a.b.$a();var c=ar;b&&(a.b.l(b,c+"needkey",function(d){var e=document.createEvent("CustomEvent");e.initCustomEvent("encrypted",!1,!1,null);e.initDataType="cenc";e.initData=pb(d.initData);a.a.dispatchEvent(e)}),a.b.l(b,c+"keymessage",function(d){var e=gr(a,d.sessionId);e&&(d=new P("message",{messageType:void 0==e.keyStatuses.a?"licenserequest":"licenserenewal",message:d.message}),e.b&&(e.b.resolve(),e.b=null),e.dispatchEvent(d))}),a.b.l(b,c+"keyadded",function(d){if(d=gr(a,d.sessionId))hr(d,
698
- "usable"),d.a&&d.a.resolve(),d.a=null}),a.b.l(b,c+"keyerror",function(d){var e=gr(a,d.sessionId);e&&e.handleError(d)}))}fr.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.a||document.createElement("video");b.src||(b.src="about:blank");a=new ir(b,this.g,a);this.c.push(a);return a};fr.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
699
- function gr(a,b){var c=a.f.get(b);return c?c:(c=a.c.shift())?(c.sessionId=b,a.f.set(b,c),c):null}function ir(a,b,c){zc.call(this);this.f=a;this.h=!1;this.a=this.b=null;this.c=b;this.g=c;this.sessionId="";this.expiration=NaN;this.closed=new Sb;this.keyStatuses=new jr}pa(ir,zc);p=ir.prototype;
700
- p.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.b?(45==a.systemCode&&(b.message="Unsupported session type."),this.b.reject(b),this.b=null):a.sessionId&&this.a?(this.a.reject(b),this.a=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?hr(this,"output-restricted"):1==b?hr(this,"expired"):hr(this,"internal-error"))};
701
- function kr(a,b,c){if(a.h)return Promise.reject(Error("The session is already initialized."));a.h=!0;try{if("persistent-license"==a.g)if(c)var d=L(Zb("LOAD_SESSION|"+c));else{var e=Zb("PERSISTENT|");d=hc(e,b)}else d=L(b)}catch(g){return Promise.reject(g)}a.b=new Sb;var f=$q("generateKeyRequest");try{a.f[f](a.c,d)}catch(g){if("InvalidStateError"!=g.name)return a.b=null,Promise.reject(g);(new N(function(){try{a.f[f](a.c,d)}catch(h){a.b.reject(h),a.b=null}})).R(.01)}return a.b}
702
- function lr(a,b,c){if(a.a)a.a.then(function(){return lr(a,b,c)})["catch"](function(){return lr(a,b,c)});else{a.a=b;if("webkit-org.w3.clearkey"==a.c){var d=Vb(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.a.reject(Error("Response is not a valid JSON Web Key Set.")),a.a=null);d=ec(e.keys[0].k);e=ec(e.keys[0].kid)}else d=L(c),e=null;var f=$q("addKey");try{a.f[f](a.c,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}}
703
- function hr(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.a=b;c=new P("keystatuseschange");a.dispatchEvent(c)}p.generateRequest=function(a,b){return kr(this,b,null)};p.load=function(a){return"persistent-license"==this.g?kr(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new Sb;lr(this,b,a);return b};
704
- p.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=$q("cancelKeyRequest");try{this.f[a](this.c,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};function jr(){this.size=0;this.a=void 0}p=jr.prototype;p.forEach=function(a){this.a&&a(this.a,fe.value())};p.get=function(a){if(this.has(a))return this.a};
705
- p.has=function(a){var b=fe.value();return this.a&&nb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var ar="";
706
- uq(function(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)ar="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=br;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=dr;window.MediaKeys=fr;window.MediaKeySystemAccess=cr}});function mr(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)}
707
- function nr(){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 or(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
708
- function pr(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function qr(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}
709
- uq(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=nr,Object.defineProperty(a,"disablePictureInPicture",{get:pr,set:qr,enumerable:!0,configurable:!0}),document.exitPictureInPicture=or,document.addEventListener("webkitpresentationmodechanged",mr,!0))}});uq(function(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}});function rr(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}uq(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=rr)}});function sr(a,b,c){return new window.TextTrackCue(a,b,c)}function tr(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}uq(function(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=sr;else if(6==b)a=tr;else{try{var c=!!sr(1,2,"")}catch(d){c=!1}c&&(a=sr)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}});function ur(){}ur.prototype.parseInit=function(){};
710
- ur.prototype.parseMedia=function(a,b){var c=Vb(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(B){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);if(e=f.getElementsByTagName("tt")[0]){var g=ul(e,"http://www.w3.org/ns/ttml#parameter","frameRate");var h=ul(e,"http://www.w3.org/ns/ttml#parameter","subFrameRate");var k=ul(e,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier");
711
- var l=ul(e,"http://www.w3.org/ns/ttml#parameter","tickRate");var m=ul(e,"http://www.w3.org/ns/ttml#parameter","cellResolution");f=e.getAttribute("xml:space")||"default";c=ul(e,"http://www.w3.org/ns/ttml#styling","extent")}else throw new M(2,2,2005,"TTML does not contain <tt> tag.");if("default"!=f&&"preserve"!=f)throw new M(2,2,2005,"Invalid xml:space value: "+f);f="default"==f;g=new vr(g,h,k,l);m=m?(m=/^(\d+) (\d+)$/.exec(m))?{columns:parseInt(m[1],10),rows:parseInt(m[2],10)}:null:null;h=wr(e.getElementsByTagName("metadata")[0]);
712
- k=wr(e.getElementsByTagName("styling")[0]);l=wr(e.getElementsByTagName("layout")[0]);for(var n=[],q=r(l),t=q.next();!t.done;t=q.next()){var v=t.value,z=c;t=new Ee;var x=v.getAttribute("xml:id");if(x){t.id=x;x=null;z&&(x=xr.exec(z)||yr.exec(z));z=x?Number(x[1]):null;x=x?Number(x[2]):null;var A,D;if(A=zr(v,k,"extent"))A=(D=xr.exec(A))||yr.exec(A),null!=A&&(t.width=null!=z?100*Number(A[1])/z:Number(A[1]),t.height=null!=x?100*Number(A[2])/x:Number(A[2]),t.widthUnits=D||null!=z?Te:0,t.heightUnits=D||null!=
713
- x?Te:0);if(v=zr(v,k,"origin"))A=(D=xr.exec(v))||yr.exec(v),null!=A&&(t.viewportAnchorX=null!=z?100*Number(A[1])/z:Number(A[1]),t.viewportAnchorY=null!=x?100*Number(A[2])/x:Number(A[2]),t.viewportAnchorUnits=D||null!=z?Te:0)}else t=null;t&&n.push(t)}c=Ar(e.getElementsByTagName("body")[0]);c=r(c);for(e=c.next();!e.done;e=c.next())(e=Br(e.value,b.periodStart,g,h,k,l,n,f,!1,m))&&d.push(e)}return d};
714
- function wr(a){var b=[];if(!a)return b;for(var c=r(a.childNodes),d=c.next();!d.done;d=c.next())d=d.value,d.nodeType==Node.ELEMENT_NODE&&"br"!==d.nodeName&&(d=wr(d),b=b.concat(d));b.length||b.push(a);return b}function Ar(a){if(!a)return[];var b=[];a=r(a.childNodes);for(var c=a.next();!c.done;c=a.next())c=c.value,c instanceof Element&&(c.hasAttribute("begin")?b.push(c):b=b.concat(Ar(c)));return b}
715
- function Cr(a,b){for(var c="",d=r(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,"br"==e.nodeName&&a.childNodes[0]!==e?c+="\n":e.childNodes&&0<e.childNodes.length?c+=Cr(e,b):b?(e=e.textContent.trim(),e=e.replace(/\s+/g," "),c+=e):c+=e.textContent;return c}
716
- function Br(a,b,c,d,e,f,g,h,k,l){if(k&&"br"==a.nodeName)return a=new Ce(0,0,""),a.spacer=!0,a;var m=/^[\s\n]*$/.test(a.textContent),n=a.nodeType==Node.ELEMENT_NODE&&!a.hasAttribute("begin")&&!a.hasAttribute("end");if(a.nodeType!=Node.ELEMENT_NODE||n&&m||n&&!k)return null;h="default"==(a.getAttribute("xml:space")||(h?"default":"preserve"));m=Dr(a.getAttribute("begin"),c);n=Dr(a.getAttribute("end"),c);var q=Dr(a.getAttribute("dur"),c);null==n&&null!=q&&(n=m+q);if(!k&&(null==m||null==n))throw new M(2,
717
- 2,2001);m=k&&null==m?0:m+b;n=k&&null==n?0:n+b;q="";k=[];if(Array.from(a.childNodes).some(function(x){return x.nodeType==Node.TEXT_NODE&&/\S+/.test(x.textContent)}))q=Cr(a,h);else for(var t=r(a.childNodes),v=t.next();!v.done;v=t.next())if(v=Br(v.value,b,c,d,e,f,g,h,!0,l))v.startTime=v.startTime||m,v.endTime=v.endTime||n,k.push(v);b=new Ce(m,n,q);b.nestedCues=k;l&&(b.cellResolution=l);if((f=Er(a,"region",f,"")[0])&&f.getAttribute("xml:id")){var z=f.getAttribute("xml:id");b.region=g.filter(function(x){return x.id==
718
- z})[0]}d=Er(a,"backgroundImage",d,"#","http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt")[0];Fr(b,a,f,d,e);return b}
719
- function Fr(a,b,c,d,e){"rtl"==Gr(b,c,e,"direction")&&(a.direction="rtl");var f=Gr(b,c,e,"writingMode");"tb"==f||"tblr"==f?a.writingMode="vertical-lr":"tbrl"==f?a.writingMode="vertical-rl":"rltb"==f||"rl"==f?a.direction="rtl":f&&(a.direction=De);(f=Gr(b,c,e,"textAlign"))?(a.positionAlign=Hr[f],a.lineAlign=Ir[f],a.textAlign=Pe[f.toUpperCase()]):a.textAlign="start";if(f=Gr(b,c,e,"displayAlign"))a.displayAlign=Qe[f.toUpperCase()];if(f=Gr(b,c,e,"color"))a.color=f;if(f=Gr(b,c,e,"backgroundColor"))a.backgroundColor=
720
- f;if(f=Gr(b,c,e,"border"))a.border=f;if(f=Gr(b,c,e,"fontFamily"))a.fontFamily=f;(f=Gr(b,c,e,"fontWeight"))&&"bold"==f&&(a.fontWeight=700);(f=Gr(b,c,e,"wrapOption"))&&"noWrap"==f&&(a.wrapLine=!1);(f=Gr(b,c,e,"lineHeight"))&&f.match(Jr)&&(a.lineHeight=f);(f=Gr(b,c,e,"fontSize"))&&(f.match(Jr)||f.match(Kr))&&(a.fontSize=f);if(f=Gr(b,c,e,"fontStyle"))a.fontStyle=Se[f.toUpperCase()];if(d){f=d.getAttribute("imageType")||d.getAttribute("imagetype");var g=d.getAttribute("encoding");d=d.textContent.trim();
721
- "PNG"==f&&"Base64"==g&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=Gr(b,c,e,"letterSpacing"))&&d.match(Jr)&&(a.letterSpacing=d);(d=Gr(b,c,e,"linePadding"))&&d.match(Jr)&&(a.linePadding=d);if(d=Gr(b,c,e,"opacity"))a.opacity=parseFloat(d);(c=zr(c,e,"textDecoration"))&&Lr(a,c);(b=Mr(b,e,"textDecoration"))&&Lr(a,b)}
722
- function Lr(a,b){for(var c=r(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&Dc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Dc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
723
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Dc(a.textDecoration,"overline")}}function Gr(a,b,c,d){return(a=Mr(a,c,d))?a:zr(b,c,d)}function zr(a,b,c){if(!a)return null;var d=wr(a);d=r(d);for(var e=d.next();!e.done;e=d.next())if(e=ul(e.value,"http://www.w3.org/ns/ttml#styling",c))return e;return Nr(a,b,c)}function Mr(a,b,c){var d=ul(a,"http://www.w3.org/ns/ttml#styling",c);return d?d:Nr(a,b,c)}
724
- function Nr(a,b,c){a=Er(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=ul(a[e],"urn:ebu:tt:style",c);f||(f=ul(a[e],"http://www.w3.org/ns/ttml#styling",c));f||(f=Mr(a[e],b,c));f&&(d=f)}return d}
725
- function Er(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?ul(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}
726
- function Dr(a,b){var c=null;if(Or.test(a)){c=Or.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.b;f+=g/b.frameRate;c=f+60*e+3600*d}else Pr.test(a)?c=Qr(Pr,a):Rr.test(a)?c=Qr(Rr,a):Sr.test(a)?(c=Sr.exec(a),c=Number(c[1])/b.frameRate):Tr.test(a)?(c=Tr.exec(a),c=Number(c[1])/b.a):Ur.test(a)&&(c=Qr(Ur,a));return c}
727
- function Qr(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)}K("shaka.text.TtmlTextParser",ur);ur.prototype.parseMedia=ur.prototype.parseMedia;ur.prototype.parseInit=ur.prototype.parseInit;function vr(a,b,c,d){this.frameRate=Number(a)||30;this.b=Number(b)||1;this.a=Number(d);0==this.a&&(this.a=a?this.frameRate*this.b:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
728
- var xr=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Kr=/^(\d{1,2}(?:\.\d+)?|100)%$/,Jr=/^(\d+px|\d+em|\d*\.?\d+c)$/,yr=/^(\d+)px (\d+)px$/,Or=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Pr=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Rr=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Sr=/^(\d*(?:\.\d*)?)f$/,Tr=/^(\d*(?:\.\d*)?)t$/,Ur=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Ir={left:Ke,center:"center",right:"end",start:Ke,end:"end"},Hr=
729
- {left:"line-left",center:"center",right:"line-right"};Xe["application/ttml+xml"]=function(){return new ur};function Vr(){this.m=new ur}Vr.prototype.parseInit=function(a){var b=!1;(new ie).box("moov",me).box("trak",me).box("mdia",me).box("minf",me).box("stbl",me).V("stsd",oe).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new M(2,2,2007);};Vr.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new ie).box("mdat",pe(function(f){d=!0;e=e.concat(c.m.parseMedia(f,b))})).parse(a,!1);if(!d)throw new M(2,2,2007);return e};K("shaka.text.Mp4TtmlParser",Vr);Vr.prototype.parseMedia=Vr.prototype.parseMedia;
730
- Vr.prototype.parseInit=Vr.prototype.parseInit;Xe['application/mp4; codecs="stpp"']=function(){return new Vr};Xe['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Vr};Xe['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Vr};function Wr(){}Wr.prototype.parseInit=function(){};
731
- Wr.prototype.parseMedia=function(a,b){var c=Vb(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=Xr(new yn(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=
732
- [];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new yn(g);var h=new Ee;Bn(g);zn(g);for(var k=Bn(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))?
733
- (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");zn(g);k=Bn(g)}f.push(h)}e=[];d=r(d.slice(1));for(g=d.next();!g.done;g=d.next()){l=g.value.split("\n");k=c;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0])g=null;else{g=null;l[0].includes("--\x3e")||(g=l[0],l.splice(0,1));h=new yn(l[0]);m=Xr(h);var n=An(h,/[ \t]+--\x3e[ \t]+/g),q=Xr(h);if(null==m||null==n||null==q)throw new M(2,2,2001);l=new Ce(m+k,q+k,l.slice(1).join("\n").trim());
734
- zn(h);for(k=Bn(h);k;)Yr(l,k,f),zn(h),k=Bn(h);null!=g&&(l.id=g);g=l}g&&e.push(g)}return e};
735
- function Yr(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Ge:a.textAlign=Pe[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"==
736
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Zr(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=Re[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Je,a.line=Number(c[1]),c[2]&&(a.lineAlign=Re[c[2].toUpperCase()])}function Zr(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
737
- function Xr(a){a=An(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)}K("shaka.text.VttTextParser",Wr);Wr.prototype.parseMedia=Wr.prototype.parseMedia;Wr.prototype.parseInit=Wr.prototype.parseInit;Xe["text/vtt"]=function(){return new Wr};Xe['text/vtt; codecs="vtt"']=function(){return new Wr};Xe['text/vtt; codecs="wvtt"']=function(){return new Wr};function $r(){this.a=null}$r.prototype.parseInit=function(a){var b=this,c=!1;(new ie).box("moov",me).box("trak",me).box("mdia",me).V("mdhd",function(d){0==d.version?(d.reader.skip(4),d.reader.skip(4),b.a=d.reader.J(),d.reader.skip(4)):(d.reader.skip(8),d.reader.skip(8),b.a=d.reader.J(),d.reader.skip(8));d.reader.skip(4)}).box("minf",me).box("stbl",me).V("stsd",oe).box("wvtt",function(){c=!0}).parse(a);if(!this.a)throw new M(2,2,2008);if(!c)throw new M(2,2,2008);};
738
- $r.prototype.parseMedia=function(a,b){if(!this.a)throw new M(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new ie).box("moof",me).box("traf",me).V("tfdt",function(E){g=!0;c=0==E.version?E.reader.J():E.reader.Za()}).V("tfhd",function(E){var H=E.flags;E=E.reader;E.skip(4);H&1&&E.skip(8);H&2&&E.skip(4);l=H&8?E.J():null}).V("trun",function(E){h=!0;var H=E.version,G=E.flags;E=E.reader;var F=E.J();G&1&&E.skip(4);G&4&&E.skip(4);var I=[];F=r(jb(F));for(var O=F.next();!O.done;O=F.next())O={duration:null,
739
- sampleSize:null,td:null},G&256&&(O.duration=E.J()),G&512&&(O.sampleSize=E.J()),G&1024&&E.skip(4),G&2048&&(O.td=0==H?E.J():E.Rd()),I.push(O);d=I}).box("mdat",pe(function(E){k=!0;e=E})).parse(a,!1);if(!k&&!g&&!h)throw new M(2,2,2008);for(var m=c,n=new Q(e,0),q=r(d),t=q.next();!t.done;t=q.next()){t=t.value;var v=t.duration||l,z=t.td?c+t.td:m;m=z+(v||0);var x=0;do{var A=n.J();x+=A;var D=n.J(),B=null;"vttc"==qe(D)?8<A&&(B=n.Ya(A-8)):n.skip(A-8);v&&B&&(A=as(B,b.periodStart+z/this.a,b.periodStart+m/this.a),
740
- f.push(A))}while(t.sampleSize&&x<t.sampleSize)}return f.filter(Nb)};function as(a,b,c){var d,e,f;(new ie).box("payl",pe(function(g){d=Vb(g)})).box("iden",pe(function(g){e=Vb(g)})).box("sttg",pe(function(g){f=Vb(g)})).parse(a);return d?bs(d,e,f,b,c):null}function bs(a,b,c,d,e){a=new Ce(d,e,a);b&&(a.id=b);if(c)for(b=new yn(c),c=Bn(b);c;)Yr(a,c,[]),zn(b),c=Bn(b);return a}K("shaka.text.Mp4VttParser",$r);$r.prototype.parseMedia=$r.prototype.parseMedia;$r.prototype.parseInit=$r.prototype.parseInit;
741
- Xe['application/mp4; codecs="wvtt"']=function(){return new $r};/*
632
+ function Hp(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0});b=r(b);for(e=b.next();!e.done;e=b.next())for(e=e.value,
633
+ g=Ip(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Ip(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
634
+ function Ip(a,b,c){var d=b.segments.map(function(e){return Jp(a,e)});c.xb(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,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,
635
+ roles:b.roles,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,closedCaptions:b.closedCaptions}}function Jp(a,b){var c=new Dp("segment",a.h,a.g,b.dataKey);return new tg(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Kp(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd)}function Kp(a,b){var c=new Dp("segment",a.h,a.g,b);return new rg(function(){return[c.toString()]},0,null)};function Lp(){this.g=null}q=Lp.prototype;q.configure=function(){};
636
+ 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=Ep(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new kp;sa(m);return t(m,e.init(),4);case 4:return t(m,op(e,d.Fa(),d.ja()),5);case 5:return f=m.h,t(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Fp(d.Fa(),d.ja()),l=Gp(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return ua(m),t(m,e.destroy(),7);case 7:va(m,0)}})};q.stop=function(){return Promise.resolve()};
637
+ 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 kp,y(m,2,3),t(m,e.init(),5);case 5:return t(m,op(e,d.Fa(),d.ja()),6);case 6:return f=m.h,t(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.B(3);break}return t(m,f.updateManifestExpiration(d.key(),b),3);case 3:return ua(m),t(m,e.destroy(),10);case 10:va(m,0);break;case 2:C(m),m.B(3)}})};
638
+ ng["application/x-offline-manifest"]=function(){return new Lp};function Mp(){}function Np(a){var b=Ep(a);b&&"manifest"==b.g?(a={uri:a,Vd:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=pc(a)):a=b&&"segment"==b.g?Op(b.key(),b):nc(new O(2,1,9004,a));return a}
639
+ function Op(a,b){var c=new kp;return pc(void 0).$(function(){return c.init()}).$(function(){return op(c,b.Fa(),b.ja())}).$(function(d){return d.getSegments([b.key()])}).$(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}L("shaka.offline.OfflineScheme",Mp);Mp.plugin=Np;Gc("offline",Np);function Pp(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var u=!1,v=r(m),z=v.next();!z.done;z=v.next())if(z=z.value,Qp(z.info,p)){z.sessionIds.push(p.sessionId);u=!0;break}u||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=Rp(a,b,g);return t(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l["return"](d)}})}
640
+ function Rp(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new rd({wb:b,onError:function(){},zc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),y(f,2),d.configure(a),t(f,Ad(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ta(f,3);break;case 2:return C(f),t(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return y(f,6),t(f,Jd(d),8);case 8:ta(f,7);break;case 6:return C(f),t(f,d.destroy(),
641
+ 9);case 9:return f["return"]([]);case 7:return e=[],t(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==h.g)return y(h,2),t(h,Kd(d,g),4);if(2!=h.g)return e.push(g),ta(h,0);C(h);x(h)})})),10);case 10:return t(f,d.destroy(),11);case 11:return f["return"](e)}})}
642
+ function Qp(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Bc(a.audioCapabilities,b.audioCapabilities,c)&&Bc(a.videoCapabilities,b.videoCapabilities,c)};function Sp(a,b,c){var d=b.presentationTimeline.getDuration();b=Tp(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function Up(a,b){var c=Gp(new Fp(a.Fa(),a.ja()),b),d=b.appMetadata||{};c=Tp(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
643
+ function Tp(a){var b=[],c=Uf(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(Nf(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Of(c.value));return b};function Vp(){this.g={}}function Wp(a,b,c){c=c.endTime-c.startTime;return Xp(a,b)*c}function Xp(a,b){var c=a.g[b];null==c&&(c=0);return c};function Yp(a,b,c){a.variants=a.variants.filter(function(d){return Kf(d,b,c)})}function Zp(a){a.variants=a.variants.filter(function(b){var c=!0;b.audio&&(c=c&&df(b.audio));b.video&&(c=c&&df(b.video));return c})}function $p(a,b){a.variants=a.variants.filter(function(c){return ae(b,c)})};function aq(a){var b=this;if(a&&a.constructor!=V)throw new O(2,9,9008);this.U=this.o=null;a?(this.o=a.o,this.U=a.Nb()):(this.o=ei(),this.U=new Fc);this.Dc=[];this.Vb=[];this.nd=[];var c=!a;this.J=new Rc(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return t(k,Promise.all(b.nd.map(function(l){return Vo(l)})),2);case 2:d=function(){};e=[];f=r(b.Vb);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return t(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return t(k,b.U.destroy(),
644
+ 4);case 4:b.o=null,b.U=null,x(k)}})})}function bq(){if(id())a:{var a=r(lp.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=aq.prototype;q.destroy=function(){return this.J.destroy()};
645
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ci(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Db("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return gi(this.o,a)};q.getConfiguration=function(){var a=ei();gi(a,this.o,ei());return a};q.Nb=function(){return this.U};
646
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Uo(this.U);this.nd.push(f);b=cq(this,a,b||{},function(){var h;return K(function(k){if(1==k.g)return t(k,mg(a,d.U,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Kb(h))})},e,f);var g=new mc(b,function(){return Vo(f)});g["finally"](function(){Ac(d.nd,f)});g.then=function(h){Db("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
647
+ return g.promise.then(h)};return dq(this,g)};q.Je=function(){Db("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
648
+ function cq(a,b,c,d,e,f){var g,h,k,l,m,n,p,u,v,z,w;return K(function(A){switch(A.g){case 1:return eq(),h=g=null,k=new kp,m=l=null,y(A,2,3),t(A,d(),5);case 5:return g=A.h,t(A,fq(a,b,g,e),6);case 6:n=A.h;gq(a);p=!n.presentationTimeline.Y()&&!n.presentationTimeline.bb();if(!p)throw new O(2,9,9005,b);return t(A,hq(a,n,function(D){m=m||D},e),7);case 7:h=A.h;gq(a);if(m)throw m;return t(A,a.pb(n,h,e),8);case 8:return t(A,k.init(),9);case 9:return gq(a),t(A,mp(k),10);case 10:return l=A.h,gq(a),t(A,iq(a,l.ja,
649
+ h,n,b,c,e,f),11);case 11:u=A.h;gq(a);if(m)throw m;return t(A,l.ja.addManifests([u]),12);case 12:return v=A.h,gq(a),z=new Dp("manifest",l.path.Fa,l.path.ja,v[0]),A["return"](Up(z,u));case 3:return ua(A),a.Dc=[],t(A,k.destroy(),13);case 13:if(!g){A.B(14);break}return t(A,g.stop(),14);case 14:if(!h){A.B(16);break}return t(A,h.destroy(),16);case 16:va(A,0);break;case 2:w=C(A);if(!l){A.B(18);break}return t(A,l.ja.removeSegments(a.Dc,function(){}),18);case 18:throw m||w;}})}
650
+ q.pb=function(a,b,c){var d,e,f,g,h,k,l,m,n,p,u,v,z,w,A;return K(function(D){if(1==D.g){d={width:Infinity,height:Infinity};Yp(a,c.restrictions,d);Zp(a);$p(a,b);e=[];f=c.preferredAudioChannelCount;Ef(a,f);g=r(a.variants);for(h=g.next();!h.done;h=g.next())k=h.value,e.push(Nf(k));l=r(a.textStreams);for(m=l.next();!m.done;m=l.next())n=m.value,e.push(Of(n));return t(D,c.offline.trackSelectionCallback(e),2)}p=D.h;u=new Set;v=new Set;z=r(p);for(w=z.next();!w.done;w=z.next())A=w.value,"variant"==A.type&&u.add(A.id),
651
+ "text"==A.type&&v.add(A.id);a.variants=a.variants.filter(function(B){return u.has(B.id)});a.textStreams=a.textStreams.filter(function(B){return v.has(B.id)});jq(a);x(D)})};
652
+ function iq(a,b,c,d,e,f,g,h){var k,l,m,n,p,u,v,z,w,A,D,B;return K(function(E){switch(E.g){case 1:return k=Sp(e,d,f),l=g.offline.progressCallback,m=function(F,H){k.size=H;l(k,F)},n=function(F,H){v&&g.offline.usePersistentLicense&&z==H&&Id(c,"cenc",F)},Wo(h,m,n),p=d.variants.some(function(F){var H=F.audio&&F.audio.encrypted;return F.video&&F.video.encrypted||H}),u=d.variants.some(function(F){return(F.video?F.video.drmInfos:[]).concat(F.audio?F.audio.drmInfos:[]).some(function(H){return H.initData&&
653
+ H.initData.length})}),v=p&&!u,z=null,v&&(w=c.i,z=kq.get(w.keySystem)),sa(E),D=A=lq(a,h,b,c,d,e,f,g),t(E,$o(h),4);case 4:D.size=E.h;A.expiration=c.Mb();B=Pd(c);A.sessionIds=g.offline.usePersistentLicense?B:[];if(p&&g.offline.usePersistentLicense&&!B.length)throw new O(2,9,9007);return E["return"](A);case 2:return ua(E),t(E,h.destroy(),5);case 5:va(E,0)}})}q.remove=function(a){return mq(this,nq(this,a))};
654
+ function nq(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:eq();c=Ep(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new kp;sa(k);return t(k,e.init(),4);case 4:return t(k,op(e,d.Fa(),d.ja()),5);case 5:return f=k.h,t(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],t(k,Promise.all([oq(a,h,e),pq(f,d,h)]),2);case 2:return ua(k),t(k,e.destroy(),8);case 8:va(k,0)}})}
655
+ function qq(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:dd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:dd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function oq(a,b,c){return K(function(d){return t(d,rq(a.U,a.o.drm,c,b),0)})}
656
+ function pq(a,b,c){function d(){}var e=sq(c);Up(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.af=function(){return mq(this,tq(this))};
657
+ function tq(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return eq(),b=a.U,c=a.o.drm,d=new kp,e=!1,sa(n),t(n,d.init(),4);case 4:f=[],pp(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return t(n,k.getAll(),8);case 8:return l=n.h,t(n,Pp(c,b,l),9);case 9:return m=n.h,t(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return ua(n),t(n,d.destroy(),11);case 11:va(n,3);break;case 3:return n["return"](!e)}})}
658
+ q.list=function(){return mq(this,uq())};function uq(){var a,b,c;return K(function(d){switch(d.g){case 1:return eq(),a=[],b=new kp,sa(d),t(d,b.init(),4);case 4:return c=Promise.resolve(),np(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return t(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Up(new Dp("manifest",e.Fa,e.ja,l),k);a.push(m)});x(h)})})}),t(d,c,2);case 2:return ua(d),t(d,b.destroy(),6);case 6:va(d,3);break;case 3:return d["return"](a)}})}
659
+ function fq(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=null,f=a.U,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m}},c.configure(d.manifest),gq(a),t(l,c.start(b,g),2);if(3!=l.g)return h=l.h,gq(a),k=vq(h),t(l,Promise.all($a(k,function(m){return m.createSegmentIndex()})),3);gq(a);if(e)throw e;return l["return"](h)})}
660
+ function hq(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new rd({wb:a.U,onError:c,zc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),t(f,wd(e,b.variants,d.offline.usePersistentLicense),2);case 2:return t(f,Jd(e),3);case 3:return t(f,Hd(e),4);case 4:return f["return"](e)}})}
661
+ function lq(a,b,c,d,e,f,g,h){for(var k=new Vp,l=r(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var p=m.audio,u=m.video;p&&!u&&(n.g[p.id]=p.bandwidth||m.bandwidth);!p&&u&&(n.g[u.id]=u.bandwidth||m.bandwidth);if(p&&u){var v=p.bandwidth||393216,z=u.bandwidth||m.bandwidth-v;0>=z&&(z=m.bandwidth);n.g[p.id]=v;n.g[u.id]=z}}l=r(e.textStreams);for(n=l.next();!n.done;n=l.next())k.g[n.value.id]=52;n=new Map;n.set(null,Promise.resolve(null));m=new Map;p=vq(e);l=new Map;p=r(p);for(u=p.next();!u.done;u=
662
+ p.next())u=u.value,v=wq(a,b,c,k,e,u,h,n,m),l.set(u.id,v);a=r(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.i)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,expiration:d.Mb(),streams:a,sessionIds:h?Pd(d):[],drmInfo:b,appMetadata:g}}
663
+ function wq(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,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,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,closedCaptions:f.closedCaptions},m=f.id;xq(f,e.presentationTimeline.Na(),
664
+ function(n){var p=yq(a,b,m,f.id,c,d,n.i,g,h),u=zq(a,b,m,f.id,c,d,n,g,k);Zo(b,m,function(){var v,z;return K(function(w){if(1==w.g)return t(w,p,2);if(3!=w.g)return v=w.h,t(w,u,3);z=w.h;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,dataKey:z});x(w)})})});return l}
665
+ function yq(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=gh(g.ua(),g.h,g.g,h.streaming.retryParameters);b=Xo(b,c,h,.5*Xp(f,d),!0,function(l){var m;return K(function(n){if(1==n.g)return t(n,e.addSegments([{data:l}]),2);m=n.h;a.Dc.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
666
+ function zq(a,b,c,d,e,f,g,h,k){var l=[g.ua()[0],g.h,g.g].join("-");if(k.has(l))return k.get(l);h=gh(g.ua(),g.h,g.g,h.streaming.retryParameters);b=Xo(b,c,h,Wp(f,d,g),!1,function(m){var n;return K(function(p){if(1==p.g)return t(p,e.addSegments([{data:m}]),2);n=p.h;a.Dc.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function xq(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 gq(a){if(a.J.g)throw new O(2,9,7001);}
667
+ function eq(){if(!bq())throw new O(2,9,9E3);}function mq(a,b){return K(function(c){if(1==c.g)return a.Vb.push(b),sa(c),t(c,b,4);if(2!=c.g)return c["return"](c.h);ua(c);Ac(a.Vb,b);return va(c,0)})}function dq(a,b){var c=b.promise;a.Vb.push(c);return b["finally"](function(){Ac(a.Vb,c)})}
668
+ function sq(a){var b=[];a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.push(d.initSegmentKey),b.push(d.dataKey)}return b}
669
+ function rq(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=qp(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:qq(d,!1),videoCapabilities:qq(d,!0)}});return t(h,Pp(b,a,f),2)}return 3!=h.g?(g=h.h,t(h,e.remove(g),3)):t(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
670
+ function vq(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
671
+ function jq(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}L("shaka.offline.Storage",aq);aq.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new kp,sa(b),t(b,rp(a),2)):5!=b.g?(ua(b),t(b,a.destroy(),5)):va(b,0)})};aq.prototype.list=aq.prototype.list;
672
+ aq.prototype.removeEmeSessions=aq.prototype.af;aq.prototype.remove=aq.prototype.remove;aq.prototype.getStoreInProgress=aq.prototype.Je;aq.prototype.store=aq.prototype.store;aq.prototype.getNetworkingEngine=aq.prototype.Nb;aq.prototype.getConfiguration=aq.prototype.getConfiguration;aq.prototype.configure=aq.prototype.configure;aq.prototype.destroy=aq.prototype.destroy;aq.support=bq;
673
+ var kq=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");Tj.offline=bq;function Aq(){}function Bq(a,b){for(var c={priority:b||0,ke:a},d=r(fb(Cq)),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.da;if(e.item.priority<c.priority){Cq.splice(f,0,c);return}}Cq.push(c)}L("shaka.polyfill",Aq);Aq.register=Bq;Aq.installAll=function(){for(var a=r(Cq),b=a.next();!b.done;b=a.next()){b=b.value;try{b.ke()}catch(c){Sa("Error installing polyfill!",c)}}};var Cq=[];function Dq(){}function Eq(){Fq()}Aq.EncryptionScheme=Dq;Dq.install=Eq;Bq(Eq,-1);function Gq(){}
674
+ function Hq(){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}}),
675
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Iq);document.addEventListener("webkitfullscreenerror",Iq);document.addEventListener("mozfullscreenchange",Iq);document.addEventListener("mozfullscreenerror",Iq);document.addEventListener("MSFullscreenChange",Iq);document.addEventListener("MSFullscreenError",Iq)}}
676
+ function Iq(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"===typeof Event)var c=new Event(b,a);else c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Aq.Fullscreen=Gq;Gq.install=Hq;Bq(Hq);function Jq(a,b,c){if("input"==a)switch(this.type){case "range":a="change"}HTMLInputElement.prototype.originalAddEventListener.call(this,a,b,c)}Bq(function(){md("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Jq)});Bq(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})});function Kq(){}function Lq(){}Aq.MathRound=Kq;Kq.install=Lq;Bq(Lq);function Mq(){}function Nq(){var a=od();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Oq():a?(Pq(),12>=a?(Qq(),Rq()):Qq()):(md("Tizen 2")||md("Tizen 3")||md("Tizen 4"))&&Sq())}function Qq(){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}}
677
+ function Rq(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Pq(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}function Sq(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=gd(b)&&a(b)}}
678
+ function Oq(){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)}}Aq.MediaSource=Mq;Mq.install=Nq;Bq(Nq);function Tq(){}function Uq(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Vq,window.MediaKeys=Wq,window.MediaKeySystemAccess=Xq,navigator.requestMediaKeySystemAccess=Yq)}function Yq(a,b){try{var c=new Xq(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
679
+ function Vq(a){var b=this.mediaKeys;b&&b!=a&&Zq(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Zq(a,this):Promise.resolve()}function $q(a){a=N(a.initData);if(lb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Tb(a.subarray(4),!0);a=Vb(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=jb(a);this.dispatchEvent(b)}Aq.PatchedMediaKeysApple=Tq;Tq.install=Uq;
680
+ function Xq(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
681
+ k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=r(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.g=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
682
+ Xq.prototype.createMediaKeys=function(){var a=new Wq(this.keySystem);return Promise.resolve(a)};Xq.prototype.getConfiguration=function(){return this.g};function Wq(a){this.g=new WebKitMediaKeys(a);this.h=new Tc}Wq.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new ar(this.g,a)};Wq.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
683
+ function Zq(a,b){a.h.gb();if(!b)return Promise.resolve();a.h.v(b,"webkitneedkey",$q);try{return Ag(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.webkitSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function ar(a){wc.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new Tc;this.sessionId="";this.expiration=NaN;this.closed=new Ob;this.keyStatuses=new br}oa(ar,wc);q=ar.prototype;
684
+ q.generateRequest=function(a,b){var c=this;this.g=new Ob;try{var d=this.l.createSession("video/mp4",N(b));this.j=d;this.sessionId=d.sessionId||"";this.h.v(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",jb(e.message));e=new R("message",e);c.dispatchEvent(e)});this.h.v(d,"webkitkeyadded",function(){c.i&&(cr(c,"usable"),c.i.resolve(),c.i=null)});this.h.v(d,"webkitkeyerror",function(){var e=
685
+ 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:cr(c,"output-not-allowed");break;default:cr(c,"internal-error")}});cr(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
686
+ q.update=function(a){this.i=new Ob;try{this.j.update(N(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.gb()}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 cr(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}
687
+ function br(){this.size=0;this.g=void 0}q=br.prototype;q.forEach=function(a){this.g&&a(this.g,de.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=de.value();return this.g&&hb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Bq(Uq);function dr(){}function er(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=fr,window.MediaKeySystemAccess=gr,navigator.requestMediaKeySystemAccess=hr,HTMLMediaElement.prototype.setMediaKeys=ir)}function hr(a,b){try{var c=new gr(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
688
+ function jr(a){if(a.initData){var b=document.createEvent("CustomEvent");b.initCustomEvent("encrypted",!1,!1,null);b.initDataType="cenc";b.initData=jb(ml(a.initData));this.dispatchEvent(b)}}Aq.PatchedMediaKeysMs=dr;dr.install=er;
689
+ function gr(a,b){this.keySystem=a;for(var c=!1,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
690
+ !0));if(e.videoCapabilities)for(h=r(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.g=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
691
+ gr.prototype.createMediaKeys=function(){var a=new fr(this.keySystem);return Promise.resolve(a)};gr.prototype.getConfiguration=function(){return this.g};function ir(a){var b=this.mediaKeys;b&&b!=a&&kr(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?kr(a,this):Promise.resolve()}function fr(a){this.g=new MSMediaKeys(a);this.h=new Tc}
692
+ fr.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new lr(this.g,a)};fr.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function kr(a,b){a.h.gb();if(!b)return Promise.resolve();a.h.v(b,"msneedkey",jr);try{return Ag(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.msSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
693
+ function lr(a){wc.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new Tc;this.sessionId="";this.expiration=NaN;this.closed=new Ob;this.keyStatuses=new mr}oa(lr,wc);q=lr.prototype;
694
+ q.generateRequest=function(a,b){var c=this;this.g=new Ob;try{this.j=this.l.createSession("video/mp4",N(b),null),this.h.v(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",jb(d.message));d=new R("message",d);c.dispatchEvent(d)}),this.h.v(this.j,"mskeyadded",function(){c.g?(nr(c,"usable"),c.g.resolve(),c.g=null):c.i&&(nr(c,"usable"),c.i.resolve(),c.i=null)}),this.h.v(this.j,"mskeyerror",
695
+ 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:nr(c,"output-not-allowed");break;default:nr(c,"internal-error")}}),nr(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
696
+ q.update=function(a){this.i=new Ob;try{this.j.update(N(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.gb()}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 nr(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}
697
+ function mr(){this.size=0;this.g=void 0}q=mr.prototype;q.forEach=function(a){this.g&&a(this.g,de.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=de.value();return this.g&&hb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Bq(er);function or(){}function pr(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=qr,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=rr,window.MediaKeys=sr,window.MediaKeySystemAccess=tr)}function qr(){return Promise.reject(Error("The key system specified is not supported."))}
698
+ function rr(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Aq.PatchedMediaKeysNop=or;or.install=pr;function sr(){throw new TypeError("Illegal constructor.");}sr.prototype.createSession=function(){};sr.prototype.setServerCertificate=function(){};function tr(){this.keySystem="";throw new TypeError("Illegal constructor.");}tr.prototype.getConfiguration=function(){};tr.prototype.createMediaKeys=function(){};Bq(pr,-10);function ur(){}function vr(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)wr="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=xr;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=yr;window.MediaKeys=zr;window.MediaKeySystemAccess=Ar}}
699
+ function Br(a){var b=wr;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function xr(a,b){try{var c=new Ar(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function yr(a){var b=this.mediaKeys;b&&b!=a&&Cr(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Cr(a,this);return Promise.resolve()}Aq.PatchedMediaKeysWebkit=ur;ur.install=vr;
700
+ function Ar(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=r(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=r(g.audioCapabilities),
701
+ m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=r(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
702
+ 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;}Ar.prototype.createMediaKeys=function(){var a=new zr(this.g);return Promise.resolve(a)};Ar.prototype.getConfiguration=function(){return this.h};function zr(a){this.l=a;this.g=null;this.h=new Tc;this.i=[];this.j=new Map}
703
+ function Cr(a,b){a.g=b;a.h.gb();var c=wr;b&&(a.h.v(b,c+"needkey",function(d){var e=document.createEvent("CustomEvent");e.initCustomEvent("encrypted",!1,!1,null);e.initDataType="cenc";e.initData=jb(d.initData);a.g.dispatchEvent(e)}),a.h.v(b,c+"keymessage",function(d){var e=Dr(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.v(b,c+"keyadded",
704
+ function(d){if(d=Dr(a,d.sessionId))Er(d,"usable"),d.g&&d.g.resolve(),d.g=null}),a.h.v(b,c+"keyerror",function(d){var e=Dr(a,d.sessionId);e&&e.handleError(d)}))}zr.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 Fr(b,this.l,a);this.i.push(a);return a};zr.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
705
+ function Dr(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 Fr(a,b,c){wc.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 Ob;this.keyStatuses=new Gr}oa(Fr,wc);q=Fr.prototype;
706
+ 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?Er(this,"output-restricted"):1==b?Er(this,"expired"):Er(this,"internal-error"))};
707
+ function Hr(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=N(Vb("LOAD_SESSION|"+c));else{var e=Vb("PERSISTENT|");d=dc(e,b)}else d=N(b)}catch(g){return Promise.reject(g)}a.h=new Ob;var f=Br("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Q(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).W(.01)}return a.h}
708
+ function Ir(a,b,c){if(a.g)a.g.then(function(){return Ir(a,b,c)})["catch"](function(){return Ir(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Rb(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=ac(e.keys[0].k);e=ac(e.keys[0].kid)}else d=N(c),e=null;var f=Br("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
709
+ function Er(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 Hr(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Hr(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Ob;Ir(this,b,a);return b};
710
+ 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=Br("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 Gr(){this.size=0;this.g=void 0}q=Gr.prototype;q.forEach=function(a){this.g&&a(this.g,de.value())};q.get=function(a){if(this.has(a))return this.g};
711
+ q.has=function(a){var b=de.value();return this.g&&hb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var wr="";Bq(vr);function Jr(){}function Kr(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Lr,Object.defineProperty(a,"disablePictureInPicture",{get:Mr,set:Nr,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Or,document.addEventListener("webkitpresentationmodechanged",Pr,!0))}}
712
+ function Pr(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)}
713
+ function Lr(){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 Or(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
714
+ function Mr(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Nr(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Aq.PiPWebkit=Jr;Jr.install=Kr;Bq(Kr);function Qr(){}function Rr(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Aq.VideoPlayPromise=Qr;Qr.install=Rr;Bq(Rr);function Sr(){}function Tr(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Ur)}}function Ur(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Aq.VideoPlaybackQuality=Sr;Sr.install=Tr;Bq(Tr);function Vr(){}function Wr(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Xr;else if(6==b)a=Yr;else{try{var c=!!Xr(1,2,"")}catch(d){c=!1}c&&(a=Xr)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Xr(a,b,c){return new window.TextTrackCue(a,b,c)}function Yr(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Aq.VTTCue=Vr;Vr.install=Wr;Bq(Wr);function Zr(){}Zr.prototype.parseInit=function(){};
715
+ Zr.prototype.parseMedia=function(a,b){var c=Rb(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(B){throw new O(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new O(2,2,2005,c.textContent);if(e=f.getElementsByTagName("tt")[0]){var g=xl(e,"http://www.w3.org/ns/ttml#parameter","frameRate");var h=xl(e,"http://www.w3.org/ns/ttml#parameter","subFrameRate");var k=xl(e,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier");
716
+ var l=xl(e,"http://www.w3.org/ns/ttml#parameter","tickRate");var m=xl(e,"http://www.w3.org/ns/ttml#parameter","cellResolution");f=e.getAttribute("xml:space")||"default";c=xl(e,"http://www.w3.org/ns/ttml#styling","extent")}else throw new O(2,2,2005,"TTML does not contain <tt> tag.");if("default"!=f&&"preserve"!=f)throw new O(2,2,2005,"Invalid xml:space value: "+f);f="default"==f;g=new $r(g,h,k,l);m=m?(m=/^(\d+) (\d+)$/.exec(m))?{columns:parseInt(m[1],10),rows:parseInt(m[2],10)}:null:null;h=as(e.getElementsByTagName("metadata")[0]);
717
+ k=as(e.getElementsByTagName("styling")[0]);l=as(e.getElementsByTagName("layout")[0]);for(var n=[],p=r(l),u=p.next();!u.done;u=p.next()){var v=u.value,z=c;u=new Ce;var w=v.getAttribute("xml:id");if(w){u.id=w;w=null;z&&(w=bs.exec(z)||cs.exec(z));z=w?Number(w[1]):null;w=w?Number(w[2]):null;var A,D;if(A=ds(v,k,"extent"))A=(D=bs.exec(A))||cs.exec(A),null!=A&&(u.width=null!=z?100*Number(A[1])/z:Number(A[1]),u.height=null!=w?100*Number(A[2])/w:Number(A[2]),u.widthUnits=D||null!=z?Re:0,u.heightUnits=D||null!=
718
+ w?Re:0);if(v=ds(v,k,"origin"))A=(D=bs.exec(v))||cs.exec(v),null!=A&&(u.viewportAnchorX=null!=z?100*Number(A[1])/z:Number(A[1]),u.viewportAnchorY=null!=w?100*Number(A[2])/w:Number(A[2]),u.viewportAnchorUnits=D||null!=z?Re:0)}else u=null;u&&n.push(u)}c=es(e.getElementsByTagName("body")[0]);c=r(c);for(e=c.next();!e.done;e=c.next())(e=fs(e.value,b.periodStart,g,h,k,l,n,f,!1,m))&&d.push(e)}return d};
719
+ function as(a){var b=[];if(!a)return b;for(var c=r(a.childNodes),d=c.next();!d.done;d=c.next())d=d.value,d.nodeType==Node.ELEMENT_NODE&&"br"!==d.nodeName&&(d=as(d),b=b.concat(d));b.length||b.push(a);return b}function es(a){if(!a)return[];var b=[];a=r(a.childNodes);for(var c=a.next();!c.done;c=a.next())c=c.value,c instanceof Element&&(c.hasAttribute("begin")?b.push(c):b=b.concat(es(c)));return b}
720
+ function gs(a,b){for(var c="",d=r(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,"br"==e.nodeName&&a.childNodes[0]!==e?c+="\n":e.childNodes&&0<e.childNodes.length?c+=gs(e,b):b?(e=e.textContent.trim(),e=e.replace(/\s+/g," "),c+=e):c+=e.textContent;return c}
721
+ function fs(a,b,c,d,e,f,g,h,k,l){if(k&&"br"==a.nodeName)return a=new Ae(0,0,""),a.spacer=!0,a;var m=/^[\s\n]*$/.test(a.textContent),n=a.nodeType==Node.ELEMENT_NODE&&!a.hasAttribute("begin")&&!a.hasAttribute("end");if(a.nodeType==Node.COMMENT_NODE||a.nodeType!=Node.ELEMENT_NODE||n&&m||n&&!k)return null;h="default"==(a.getAttribute("xml:space")||(h?"default":"preserve"));m=hs(a.getAttribute("begin"),c);n=hs(a.getAttribute("end"),c);var p=hs(a.getAttribute("dur"),c);null==n&&null!=p&&(n=m+p);if(!k&&
722
+ (null==m||null==n))throw new O(2,2,2001);m=k&&null==m?0:m+b;n=k&&null==n?0:n+b;p="";k=[];if(Array.from(a.childNodes).some(function(w){return w.nodeType==Node.TEXT_NODE&&/\S+/.test(w.textContent)}))p=gs(a,h);else for(var u=r(a.childNodes),v=u.next();!v.done;v=u.next())if(v=fs(v.value,b,c,d,e,f,g,h,!0,l))v.startTime=v.startTime||m,v.endTime=v.endTime||n,k.push(v);b=new Ae(m,n,p);b.nestedCues=k;l&&(b.cellResolution=l);if((f=is(a,"region",f,"")[0])&&f.getAttribute("xml:id")){var z=f.getAttribute("xml:id");
723
+ b.region=g.filter(function(w){return w.id==z})[0]}d=is(a,"backgroundImage",d,"#","http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt")[0];js(b,a,f,d,e);return b}
724
+ function js(a,b,c,d,e){"rtl"==ks(b,c,e,"direction")&&(a.direction="rtl");var f=ks(b,c,e,"writingMode");"tb"==f||"tblr"==f?a.writingMode="vertical-lr":"tbrl"==f?a.writingMode="vertical-rl":"rltb"==f||"rl"==f?a.direction="rtl":f&&(a.direction=Be);(f=ks(b,c,e,"textAlign"))?(a.positionAlign=ls[f],a.lineAlign=ms[f],a.textAlign=Ne[f.toUpperCase()]):a.textAlign="start";if(f=ks(b,c,e,"displayAlign"))a.displayAlign=Oe[f.toUpperCase()];if(f=ks(b,c,e,"color"))a.color=f;if(f=ks(b,c,e,"backgroundColor"))a.backgroundColor=
725
+ f;if(f=ks(b,c,e,"border"))a.border=f;if(f=ks(b,c,e,"fontFamily"))a.fontFamily=f;(f=ks(b,c,e,"fontWeight"))&&"bold"==f&&(a.fontWeight=700);(f=ks(b,c,e,"wrapOption"))&&"noWrap"==f&&(a.wrapLine=!1);(f=ks(b,c,e,"lineHeight"))&&f.match(ns)&&(a.lineHeight=f);(f=ks(b,c,e,"fontSize"))&&(f.match(ns)||f.match(os))&&(a.fontSize=f);if(f=ks(b,c,e,"fontStyle"))a.fontStyle=Qe[f.toUpperCase()];if(d){f=d.getAttribute("imageType")||d.getAttribute("imagetype");var g=d.getAttribute("encoding");d=d.textContent.trim();
726
+ "PNG"==f&&"Base64"==g&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=ks(b,c,e,"letterSpacing"))&&d.match(ns)&&(a.letterSpacing=d);(d=ks(b,c,e,"linePadding"))&&d.match(ns)&&(a.linePadding=d);if(d=ks(b,c,e,"opacity"))a.opacity=parseFloat(d);(c=ds(c,e,"textDecoration"))&&ps(a,c);(b=qs(b,e,"textDecoration"))&&ps(a,b)}
727
+ function ps(a,b){for(var c=r(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&Ac(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Ac(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
728
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Ac(a.textDecoration,"overline")}}function ks(a,b,c,d){return(a=qs(a,c,d))?a:ds(b,c,d)}function ds(a,b,c){if(!a)return null;var d=as(a);d=r(d);for(var e=d.next();!e.done;e=d.next())if(e=xl(e.value,"http://www.w3.org/ns/ttml#styling",c))return e;return rs(a,b,c)}function qs(a,b,c){var d=xl(a,"http://www.w3.org/ns/ttml#styling",c);return d?d:rs(a,b,c)}
729
+ function rs(a,b,c){a=is(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=xl(a[e],"urn:ebu:tt:style",c);f||(f=xl(a[e],"http://www.w3.org/ns/ttml#styling",c));f||(f=qs(a[e],b,c));f&&(d=f)}return d}
730
+ function is(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?xl(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}
731
+ function hs(a,b){var c=null;if(ss.test(a)){c=ss.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 ts.test(a)?c=us(ts,a):vs.test(a)?c=us(vs,a):ws.test(a)?(c=ws.exec(a),c=Number(c[1])/b.frameRate):xs.test(a)?(c=xs.exec(a),c=Number(c[1])/b.g):ys.test(a)&&(c=us(ys,a));return c}
732
+ function us(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)}L("shaka.text.TtmlTextParser",Zr);Zr.prototype.parseMedia=Zr.prototype.parseMedia;Zr.prototype.parseInit=Zr.prototype.parseInit;function $r(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]))}
733
+ var bs=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,os=/^(\d{1,2}(?:\.\d+)?|100)%$/,ns=/^(\d+px|\d+em|\d*\.?\d+c)$/,cs=/^(\d+)px (\d+)px$/,ss=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ts=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,vs=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,ws=/^(\d*(?:\.\d*)?)f$/,xs=/^(\d*(?:\.\d*)?)t$/,ys=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,ms={left:He,center:"center",right:"end",start:He,end:"end"},ls=
734
+ {left:"line-left",center:"center",right:"line-right"};Ve["application/ttml+xml"]=function(){return new Zr};function zs(){this.u=new Zr}zs.prototype.parseInit=function(a){var b=!1;(new ge).box("moov",ke).box("trak",ke).box("mdia",ke).box("minf",ke).box("stbl",ke).X("stsd",me).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};zs.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new ge).box("mdat",ne(function(f){d=!0;e=e.concat(c.u.parseMedia(f,b))})).parse(a,!1);if(!d)throw new O(2,2,2007);return e};L("shaka.text.Mp4TtmlParser",zs);zs.prototype.parseMedia=zs.prototype.parseMedia;
735
+ zs.prototype.parseInit=zs.prototype.parseInit;Ve['application/mp4; codecs="stpp"']=function(){return new zs};Ve['application/mp4; codecs="stpp.ttml"']=function(){return new zs};Ve['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new zs};Ve['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new zs};function As(){}As.prototype.parseInit=function(){};
736
+ As.prototype.parseMedia=function(a,b){var c=Rb(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new O(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=Bs(new Dn(e[1]));if(null==c)throw new O(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
737
+ [];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new Dn(g);var h=new Ce;Gn(g);En(g);for(var k=Gn(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))?
738
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");En(g);k=Gn(g)}f.push(h)}e=[];d=r(d.slice(1));for(g=d.next();!g.done;g=d.next()){l=g.value.split("\n");k=c;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0])g=null;else{g=null;l[0].includes("--\x3e")||(g=l[0],l.splice(0,1));h=new Dn(l[0]);m=Bs(h);var n=Fn(h,/[ \t]+--\x3e[ \t]+/g),p=Bs(h);if(null==m||null==n||null==p)throw new O(2,2,2001);l=new Ae(m+k,p+k,l.slice(1).join("\n").trim());
739
+ En(h);for(k=Gn(h);k;)Cs(l,k,f),En(h),k=Gn(h);null!=g&&(l.id=g);g=l}g&&e.push(g)}return e};
740
+ function Cs(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Ee:a.textAlign=Ne[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"==
741
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Ds(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=Pe[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Ge,a.line=Number(c[1]),c[2]&&(a.lineAlign=Pe[c[2].toUpperCase()])}function Ds(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
742
+ function Bs(a){a=Fn(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)}L("shaka.text.VttTextParser",As);As.prototype.parseMedia=As.prototype.parseMedia;As.prototype.parseInit=As.prototype.parseInit;Ve["text/vtt"]=function(){return new As};Ve['text/vtt; codecs="vtt"']=function(){return new As};Ve['text/vtt; codecs="wvtt"']=function(){return new As};function Es(){this.g=null}Es.prototype.parseInit=function(a){var b=this,c=!1;(new ge).box("moov",ke).box("trak",ke).box("mdia",ke).X("mdhd",function(d){0==d.version?(d.reader.skip(4),d.reader.skip(4),b.g=d.reader.O(),d.reader.skip(4)):(d.reader.skip(8),d.reader.skip(8),b.g=d.reader.O(),d.reader.skip(8));d.reader.skip(4)}).box("minf",ke).box("stbl",ke).X("stsd",me).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};
743
+ Es.prototype.parseMedia=function(a,b){if(!this.g)throw new O(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new ge).box("moof",ke).box("traf",ke).X("tfdt",function(E){g=!0;c=0==E.version?E.reader.O():E.reader.fb()}).X("tfhd",function(E){var F=E.flags;E=E.reader;E.skip(4);F&1&&E.skip(8);F&2&&E.skip(4);l=F&8?E.O():null}).X("trun",function(E){h=!0;var F=E.version,H=E.flags;E=E.reader;var G=E.O();H&1&&E.skip(4);H&4&&E.skip(4);var I=[];G=r(db(G));for(var J=G.next();!J.done;J=G.next())J={duration:null,
744
+ sampleSize:null,zd:null},H&256&&(J.duration=E.O()),H&512&&(J.sampleSize=E.O()),H&1024&&E.skip(4),H&2048&&(J.zd=0==F?E.O():E.Wd()),I.push(J);d=I}).box("mdat",ne(function(E){k=!0;e=E})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);for(var m=c,n=new S(e,0),p=r(d),u=p.next();!u.done;u=p.next()){u=u.value;var v=u.duration||l,z=u.zd?c+u.zd:m;m=z+(v||0);var w=0;do{var A=n.O();w+=A;var D=n.O(),B=null;"vttc"==oe(D)?8<A&&(B=n.eb(A-8)):n.skip(A-8);v&&B&&(A=Fs(B,b.periodStart+z/this.g,b.periodStart+m/this.g),
745
+ f.push(A))}while(u.sampleSize&&w<u.sampleSize)}return f.filter(Jb)};function Fs(a,b,c){var d,e,f;(new ge).box("payl",ne(function(g){d=Rb(g)})).box("iden",ne(function(g){e=Rb(g)})).box("sttg",ne(function(g){f=Rb(g)})).parse(a);return d?Gs(d,e,f,b,c):null}function Gs(a,b,c,d,e){a=new Ae(d,e,a);b&&(a.id=b);if(c)for(b=new Dn(c),c=Gn(b);c;)Cs(a,c,[]),En(b),c=Gn(b);return a}L("shaka.text.Mp4VttParser",Es);Es.prototype.parseMedia=Es.prototype.parseMedia;Es.prototype.parseInit=Es.prototype.parseInit;
746
+ Ve['application/mp4; codecs="wvtt"']=function(){return new Es};/*
742
747
  @license
743
748
  EME Encryption Scheme Polyfill
744
749
  Copyright 2019 Google LLC
745
750
  SPDX-License-Identifier: Apache-2.0
746
751
  */
747
- function cs(){}var ds;function es(){ds?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(ds=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=fs):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
748
- function fs(a,b){var c=this,d;return J(function(e){if(1==e.a)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,ds.call(c,a,b),2);d=e.b;if(gs(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=ds,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=hs;return e["return"](hs.call(c,
752
+ function Hs(){}var Is;function Js(){Is?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Is=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Ks):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
753
+ function Ks(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),t(e,Is.call(c,a,b),2);d=e.h;if(Ls(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Is,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Ms;return e["return"](Ms.call(c,
749
754
  a,b))})}
750
- function hs(a,b){var c=this,d,e,f,g,h,k,l,m,n,q;return J(function(t){if(1==t.a){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=is(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=js(h.videoCapabilities,d),l=js(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."),
751
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(t,ds.call(c,a,e),2)}q=t.b;return t["return"](new ks(q,d))})}function js(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}K("EmeEncryptionSchemePolyfill",cs);cs.install=es;function ls(){}var ms;
752
- function ns(){ms?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(ms=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=os):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
753
- function os(a){var b=this,c,d;return J(function(e){if(1==e.a)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(e,ms.call(b,a),2);c=e.b;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&gs(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=ms,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
754
- navigator.mediaCapabilities.decodingInfo=ps;return e["return"](ps.call(b,a))})}
755
- function ps(a){var b=this,c,d,e,f,g,h,k,l,m;return J(function(n){switch(n.a){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=is(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):u(n,ms.call(b,a),2);case 2:k=n.b;if(k.keySystemAccess){k.keySystemAccess=
756
- new ks(k.keySystemAccess,c);n.s(3);break}if(!a.keySystemConfiguration){n.s(3);break}var q=a.keySystemConfiguration,t=[],v=[];q.audio&&t.push({robustness:q.audio.robustness||"",contentType:a.audio.contentType});q.video&&v.push({robustness:q.video.robustness||"",contentType:a.video.contentType});q={initDataTypes:q.initDataType?[q.initDataType]:[],distinctiveIdentifier:q.distinctiveIdentifier,persistentState:q.persistentState,sessionTypes:q.sessionTypes};t.length&&(q.audioCapabilities=t);v.length&&(q.videoCapabilities=
757
- v);l=q;m=k;return u(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.b;case 3:return n["return"](k)}})}K("McEncryptionSchemePolyfill",ls);ls.install=ns;function ks(a,b){this.b=a;this.a=b;this.keySystem=a.keySystem}
758
- ks.prototype.getConfiguration=function(){var a=this.b.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.a;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.a;return a};ks.prototype.createMediaKeys=function(){return this.b.createMediaKeys()};
759
- function is(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 gs(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 qs(){}
760
- function wq(){es();ns()}K("EncryptionSchemePolyfills",qs);qs.install=wq;"undefined"!==typeof module&&module.exports&&(module.exports=qs);}).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})();
755
+ function Ms(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return K(function(u){if(1==u.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Ns(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Os(h.videoCapabilities,d),l=Os(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."),
756
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return t(u,Is.call(c,a,e),2)}p=u.h;return u["return"](new Ps(p,d))})}function Os(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}L("EmeEncryptionSchemePolyfill",Hs);Hs.install=Js;function Qs(){}var Rs;
757
+ function Ss(){Rs?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Rs=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Ts):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
758
+ function Ts(a){var b=this,c,d;return K(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),t(e,Rs.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Ls(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Rs,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
759
+ navigator.mediaCapabilities.decodingInfo=Us;return e["return"](Us.call(b,a))})}
760
+ function Us(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=Ns(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):t(n,Rs.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
761
+ new Ps(k.keySystemAccess,c);n.B(3);break}if(!a.keySystemConfiguration){n.B(3);break}var p=a.keySystemConfiguration,u=[],v=[];p.audio&&u.push({robustness:p.audio.robustness||"",contentType:a.audio.contentType});p.video&&v.push({robustness:p.video.robustness||"",contentType:a.video.contentType});p={initDataTypes:p.initDataType?[p.initDataType]:[],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};u.length&&(p.audioCapabilities=u);v.length&&(p.videoCapabilities=
762
+ v);l=p;m=k;return t(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}L("McEncryptionSchemePolyfill",Qs);Qs.install=Ss;function Ps(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
763
+ Ps.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Ps.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
764
+ function Ns(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 Ls(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 Vs(){}
765
+ function Fq(){Js();Ss()}L("EncryptionSchemePolyfills",Vs);Vs.install=Fq;"undefined"!==typeof module&&module.exports&&(module.exports=Vs);}).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})();
761
766
 
762
767
  //# sourceMappingURL=shaka-player.compiled.map