shaka-player 2.5.1 → 2.5.5

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 (166) hide show
  1. package/.csslintrc +13 -0
  2. package/AUTHORS +3 -0
  3. package/CHANGELOG.md +156 -0
  4. package/CONTRIBUTORS +3 -0
  5. package/README.md +3 -0
  6. package/build/README.md +5 -5
  7. package/build/apps.py +3 -1
  8. package/build/build.py +5 -2
  9. package/build/check.py +17 -0
  10. package/build/compiler.py +49 -0
  11. package/build/conformance.textproto +1 -0
  12. package/build/docs.py +0 -6
  13. package/build/generateExterns.js +72 -20
  14. package/build/install-linux-prereqs.sh +4 -4
  15. package/build/shakaBuildHelpers.py +7 -8
  16. package/build/test.py +21 -9
  17. package/build/types/core +1 -0
  18. package/build/types/ui +6 -1
  19. package/demo/asset_card.js +129 -41
  20. package/demo/cast_receiver/receiver_app.css +27 -13
  21. package/demo/close_button.js +10 -15
  22. package/demo/common/asset.js +6 -6
  23. package/demo/common/assets.js +72 -14
  24. package/demo/config.js +28 -25
  25. package/demo/custom.js +20 -16
  26. package/demo/demo.less +107 -16
  27. package/demo/demo_uncompiled.js +33 -0
  28. package/demo/demo_utils.js +4 -3
  29. package/demo/front.js +12 -8
  30. package/demo/index.html +14 -17
  31. package/demo/input.js +30 -23
  32. package/demo/input_container.js +15 -11
  33. package/demo/load.js +5 -7
  34. package/demo/main.js +138 -49
  35. package/demo/search.js +40 -36
  36. package/demo/service_worker.js +1 -1
  37. package/demo/tooltip.js +16 -24
  38. package/dist/.csslintstamp +0 -0
  39. package/dist/controls.css +1 -1
  40. package/dist/controls.css.map +1 -1
  41. package/dist/demo.compiled.debug.js +165 -152
  42. package/dist/demo.compiled.debug.map +4 -4
  43. package/dist/demo.compiled.js +165 -152
  44. package/dist/demo.compiled.map +4 -4
  45. package/dist/demo.css +1 -1
  46. package/dist/demo.css.map +1 -1
  47. package/dist/deps.js +28 -11
  48. package/dist/receiver.compiled.debug.js +11 -11
  49. package/dist/receiver.compiled.debug.map +3 -3
  50. package/dist/receiver.compiled.js +11 -11
  51. package/dist/receiver.compiled.map +3 -3
  52. package/dist/shaka-player.compiled.debug.externs.js +232 -102
  53. package/dist/shaka-player.compiled.debug.js +189 -165
  54. package/dist/shaka-player.compiled.debug.map +4 -4
  55. package/dist/shaka-player.compiled.externs.js +232 -102
  56. package/dist/shaka-player.compiled.js +567 -553
  57. package/dist/shaka-player.compiled.map +4 -4
  58. package/dist/shaka-player.ui.debug.externs.js +338 -113
  59. package/dist/shaka-player.ui.debug.js +296 -276
  60. package/dist/shaka-player.ui.debug.map +4 -4
  61. package/dist/shaka-player.ui.externs.js +338 -113
  62. package/dist/shaka-player.ui.js +685 -671
  63. package/dist/shaka-player.ui.map +4 -4
  64. package/docs/tutorials/drm-config.md +1 -0
  65. package/docs/tutorials/fairplay.md +77 -0
  66. package/docs/tutorials/index.json +1 -0
  67. package/docs/tutorials/manifest-parser.md +1 -1
  68. package/docs/tutorials/ui-customization.md +5 -2
  69. package/docs/tutorials/ui.md +10 -4
  70. package/docs/tutorials/welcome.md +2 -2
  71. package/externs/mediasession.js +16 -1
  72. package/externs/shaka/net.js +14 -4
  73. package/externs/shaka/player.js +136 -90
  74. package/externs/tippy.js +30 -0
  75. package/externs/webkitmediakeys.js +4 -0
  76. package/karma.conf.js +30 -24
  77. package/lib/cast/cast_proxy.js +94 -23
  78. package/lib/cast/cast_receiver.js +8 -1
  79. package/lib/dash/content_protection.js +33 -1
  80. package/lib/dash/dash_parser.js +13 -5
  81. package/lib/hls/hls_parser.js +20 -4
  82. package/lib/media/drm_engine.js +29 -2
  83. package/lib/media/media_source_engine.js +9 -6
  84. package/lib/media/play_rate_controller.js +14 -3
  85. package/lib/media/playhead.js +8 -3
  86. package/lib/media/streaming_engine.js +68 -20
  87. package/lib/media/transmuxer.js +2 -2
  88. package/lib/media/video_wrapper.js +8 -3
  89. package/lib/net/data_uri_plugin.js +5 -2
  90. package/lib/net/http_fetch_plugin.js +3 -3
  91. package/lib/net/http_plugin_utils.js +2 -4
  92. package/lib/net/http_xhr_plugin.js +2 -2
  93. package/lib/net/networking_engine.js +1 -0
  94. package/lib/offline/offline_scheme.js +7 -2
  95. package/lib/player.js +18 -8
  96. package/lib/polyfill/input_event.js +7 -11
  97. package/lib/polyfill/mediasource.js +1 -1
  98. package/lib/polyfill/patchedmediakeys_apple.js +2 -72
  99. package/lib/text/cue.js +1 -1
  100. package/lib/text/ttml_text_parser.js +1 -1
  101. package/lib/util/config_utils.js +1 -0
  102. package/lib/util/error.js +45 -11
  103. package/lib/util/event_manager.js +211 -100
  104. package/lib/util/fairplay_utils.js +122 -0
  105. package/lib/util/i_releasable.js +1 -0
  106. package/lib/util/player_configuration.js +7 -0
  107. package/lib/util/pssh.js +41 -0
  108. package/lib/util/string_utils.js +42 -6
  109. package/lib/util/timer.js +1 -1
  110. package/package.json +33 -33
  111. package/roadmap.md +96 -0
  112. package/shaka-player.uncompiled.js +5 -1
  113. package/test/dash/dash_parser_content_protection_unit.js +35 -1
  114. package/test/dash/dash_parser_manifest_unit.js +60 -0
  115. package/test/hls/hls_live_unit.js +7 -1
  116. package/test/hls/hls_parser_unit.js +50 -0
  117. package/test/media/drm_engine_unit.js +10 -4
  118. package/test/media/media_source_engine_integration.js +12 -0
  119. package/test/media/media_source_engine_unit.js +3 -1
  120. package/test/media/playhead_unit.js +7 -5
  121. package/test/media/streaming_engine_unit.js +46 -1
  122. package/test/media/transmuxer_integration.js +13 -0
  123. package/test/net/data_uri_plugin_unit.js +13 -2
  124. package/test/net/http_plugin_unit.js +17 -12
  125. package/test/net/networking_engine_unit.js +17 -8
  126. package/test/offline/offline_scheme_unit.js +18 -8
  127. package/test/player_external.js +3 -2
  128. package/test/player_integration.js +94 -3
  129. package/test/player_src_equals_integration.js +2 -2
  130. package/test/player_unit.js +21 -8
  131. package/test/test/boot.js +20 -5
  132. package/test/test/externs/jasmine.js +48 -0
  133. package/test/test/util/expect_async_polyfill.js +145 -0
  134. package/test/test/util/fake_networking_engine.js +1 -0
  135. package/test/test/util/manifest_generator.js +2 -1
  136. package/test/test/util/test_scheme.js +34 -2
  137. package/test/test/util/ui_utils.js +41 -0
  138. package/test/test/util/util.js +16 -8
  139. package/test/ui/ui_unit.js +130 -4
  140. package/ui/audio_language_selection.js +17 -96
  141. package/ui/big_play_button.js +61 -0
  142. package/ui/controls.js +226 -335
  143. package/ui/controls.less +3 -5
  144. package/ui/element.js +24 -6
  145. package/ui/externs/ui.js +62 -9
  146. package/ui/fullscreen_button.js +2 -52
  147. package/ui/less/buttons.less +10 -16
  148. package/ui/less/containers.less +75 -20
  149. package/ui/less/general.less +18 -2
  150. package/ui/less/other_elements.less +2 -1
  151. package/ui/less/overflow_menu.less +11 -10
  152. package/ui/less/range_elements.less +12 -10
  153. package/ui/less/spinner.less +2 -0
  154. package/ui/overflow_menu.js +1 -1
  155. package/ui/pip_button.js +1 -1
  156. package/ui/{play_pause_button.js → play_button.js} +17 -47
  157. package/ui/presentation_time.js +17 -12
  158. package/ui/range_element.js +176 -0
  159. package/ui/resolution_selection.js +43 -106
  160. package/ui/seek_bar.js +204 -0
  161. package/ui/settings_menu.js +113 -0
  162. package/ui/small_play_button.js +73 -0
  163. package/ui/text_displayer.js +17 -14
  164. package/ui/text_selection.js +42 -107
  165. package/ui/ui.js +17 -40
  166. package/ui/volume_bar.js +40 -68
@@ -1,33 +1,34 @@
1
- (function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global){var p,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)},ca="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function da(){da=function(){};ca.Symbol||(ca.Symbol=ea)}var ea=function(){var b=0;return function(c){return"jscomp_symbol_"+(c||"")+b++}}();
2
- function fa(){da();var b=ca.Symbol.iterator;b||(b=ca.Symbol.iterator=ca.Symbol("iterator"));"function"!=typeof Array.prototype[b]&&aa(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return ha(this)}});fa=function(){}}function ha(b){var c=0;return ia(function(){return c<b.length?{done:!1,value:b[c++]}:{done:!0}})}function ia(b){fa();b={next:b};b[ca.Symbol.iterator]=function(){return this};return b}function r(b){fa();var c=b[Symbol.iterator];return c?c.call(b):ha(b)}
3
- function ka(b,c){if(c){for(var d=ca,e=b.split("."),f=0;f<e.length-1;f++){var g=e[f];g in d||(d[g]={});d=d[g]}e=e[e.length-1];f=d[e];g=c(f);g!=f&&null!=g&&aa(d,e,{configurable:!0,writable:!0,value:g})}}
4
- ka("Promise",function(b){function c(b){this.b=0;this.g=void 0;this.a=[];var c=this.c();try{b(c.resolve,c.reject)}catch(l){c.reject(l)}}function d(){this.a=null}function e(b){return b instanceof c?b:new c(function(c){c(b)})}if(b)return b;d.prototype.b=function(b){null==this.a&&(this.a=[],this.f());this.a.push(b)};d.prototype.f=function(){var b=this;this.c(function(){b.h()})};var f=ca.setTimeout;d.prototype.c=function(b){f(b,0)};d.prototype.h=function(){for(;this.a&&this.a.length;){var b=this.a;this.a=
5
- [];for(var c=0;c<b.length;++c){var d=b[c];b[c]=null;try{d()}catch(m){this.g(m)}}}this.a=null};d.prototype.g=function(b){this.c(function(){throw b;})};c.prototype.c=function(){function b(b){return function(e){d||(d=!0,b.call(c,e))}}var c=this,d=!1;return{resolve:b(this.o),reject:b(this.f)}};c.prototype.o=function(b){if(b===this)this.f(new TypeError("A Promise cannot resolve to itself"));else if(b instanceof c)this.v(b);else{a:switch(typeof b){case "object":var d=null!=b;break a;case "function":d=!0;
6
- break a;default:d=!1}d?this.m(b):this.h(b)}};c.prototype.m=function(b){var c=void 0;try{c=b.then}catch(l){this.f(l);return}"function"==typeof c?this.w(c,b):this.h(b)};c.prototype.f=function(b){this.i(2,b)};c.prototype.h=function(b){this.i(1,b)};c.prototype.i=function(b,c){if(0!=this.b)throw Error("Cannot settle("+b+", "+c+"): Promise already settled in state"+this.b);this.b=b;this.g=c;this.j()};c.prototype.j=function(){if(null!=this.a){for(var b=0;b<this.a.length;++b)g.b(this.a[b]);this.a=null}};
7
- var g=new d;c.prototype.v=function(b){var c=this.c();b.Vb(c.resolve,c.reject)};c.prototype.w=function(b,c){var d=this.c();try{b.call(c,d.resolve,d.reject)}catch(m){d.reject(m)}};c.prototype.then=function(b,d){function e(b,c){return"function"==typeof b?function(c){try{f(b(c))}catch(C){g(C)}}:c}var f,g,h=new c(function(b,c){f=b;g=c});this.Vb(e(b,f),e(d,g));return h};c.prototype["catch"]=function(b){return this.then(void 0,b)};c.prototype.Vb=function(b,c){function d(){switch(e.b){case 1:b(e.g);break;
8
- case 2:c(e.g);break;default:throw Error("Unexpected state: "+e.b);}}var e=this;null==this.a?g.b(d):this.a.push(d)};c.resolve=e;c.reject=function(b){return new c(function(c,d){d(b)})};c.race=function(b){return new c(function(c,d){for(var f=r(b),g=f.next();!g.done;g=f.next())e(g.value).Vb(c,d)})};c.all=function(b){var d=r(b),f=d.next();return f.done?e([]):new c(function(b,c){function g(c){return function(d){h[c]=d;k--;0==k&&b(h)}}var h=[],k=0;do h.push(void 0),k++,e(f.value).Vb(g(h.length-1),c),f=d.next();
1
+ (function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global){var p,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function ca(){ca=function(){};ba.Symbol||(ba.Symbol=ea)}var ea=function(){var b=0;return function(c){return"jscomp_symbol_"+(c||"")+b++}}();
2
+ function fa(){ca();var b=ba.Symbol.iterator;b||(b=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[b]&&aa(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return ha(this)}});fa=function(){}}function ha(b){var c=0;return ia(function(){return c<b.length?{done:!1,value:b[c++]}:{done:!0}})}function ia(b){fa();b={next:b};b[ba.Symbol.iterator]=function(){return this};return b}function r(b){fa();var c=b[Symbol.iterator];return c?c.call(b):ha(b)}
3
+ function ka(b,c){if(c){for(var d=ba,e=b.split("."),f=0;f<e.length-1;f++){var g=e[f];g in d||(d[g]={});d=d[g]}e=e[e.length-1];f=d[e];g=c(f);g!=f&&null!=g&&aa(d,e,{configurable:!0,writable:!0,value:g})}}
4
+ ka("Promise",function(b){function c(b){this.b=0;this.g=void 0;this.a=[];var c=this.c();try{b(c.resolve,c.reject)}catch(l){c.reject(l)}}function d(){this.a=null}function e(b){return b instanceof c?b:new c(function(c){c(b)})}if(b)return b;d.prototype.b=function(b){null==this.a&&(this.a=[],this.f());this.a.push(b)};d.prototype.f=function(){var b=this;this.c(function(){b.h()})};var f=ba.setTimeout;d.prototype.c=function(b){f(b,0)};d.prototype.h=function(){for(;this.a&&this.a.length;){var b=this.a;this.a=
5
+ [];for(var c=0;c<b.length;++c){var d=b[c];b[c]=null;try{d()}catch(m){this.g(m)}}}this.a=null};d.prototype.g=function(b){this.c(function(){throw b;})};c.prototype.c=function(){function b(b){return function(e){d||(d=!0,b.call(c,e))}}var c=this,d=!1;return{resolve:b(this.s),reject:b(this.f)}};c.prototype.s=function(b){if(b===this)this.f(new TypeError("A Promise cannot resolve to itself"));else if(b instanceof c)this.v(b);else{a:switch(typeof b){case "object":var d=null!=b;break a;case "function":d=!0;
6
+ break a;default:d=!1}d?this.m(b):this.h(b)}};c.prototype.m=function(b){var c=void 0;try{c=b.then}catch(l){this.f(l);return}"function"==typeof c?this.C(c,b):this.h(b)};c.prototype.f=function(b){this.i(2,b)};c.prototype.h=function(b){this.i(1,b)};c.prototype.i=function(b,c){if(0!=this.b)throw Error("Cannot settle("+b+", "+c+"): Promise already settled in state"+this.b);this.b=b;this.g=c;this.l()};c.prototype.l=function(){if(null!=this.a){for(var b=0;b<this.a.length;++b)g.b(this.a[b]);this.a=null}};
7
+ var g=new d;c.prototype.v=function(b){var c=this.c();b.Yb(c.resolve,c.reject)};c.prototype.C=function(b,c){var d=this.c();try{b.call(c,d.resolve,d.reject)}catch(m){d.reject(m)}};c.prototype.then=function(b,d){function e(b,c){return"function"==typeof b?function(c){try{f(b(c))}catch(C){g(C)}}:c}var f,g,h=new c(function(b,c){f=b;g=c});this.Yb(e(b,f),e(d,g));return h};c.prototype["catch"]=function(b){return this.then(void 0,b)};c.prototype.Yb=function(b,c){function d(){switch(e.b){case 1:b(e.g);break;
8
+ case 2:c(e.g);break;default:throw Error("Unexpected state: "+e.b);}}var e=this;null==this.a?g.b(d):this.a.push(d)};c.resolve=e;c.reject=function(b){return new c(function(c,d){d(b)})};c.race=function(b){return new c(function(c,d){for(var f=r(b),g=f.next();!g.done;g=f.next())e(g.value).Yb(c,d)})};c.all=function(b){var d=r(b),f=d.next();return f.done?e([]):new c(function(b,c){function g(c){return function(d){h[c]=d;k--;0==k&&b(h)}}var h=[],k=0;do h.push(void 0),k++,e(f.value).Yb(g(h.length-1),c),f=d.next();
9
9
  while(!f.done)})};return c});ka("Promise.prototype.finally",function(b){return b?b: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;})})}});function la(b){function c(c){return b.next(c)}function d(c){return b["throw"](c)}return new Promise(function(e,f){function g(b){b.done?e(b.value):Promise.resolve(b.value).then(c,d).then(g,f)}g(b.next())})}function t(b){return la(b())}
10
- var ma="function"==typeof Object.create?Object.create:function(b){function c(){}c.prototype=b;return new c},oa;if("function"==typeof Object.setPrototypeOf)oa=Object.setPrototypeOf;else{var pa;a:{var qa={ke:!0},ra={};try{ra.__proto__=qa;pa=ra.ke;break a}catch(b){}pa=!1}oa=pa?function(b,c){b.__proto__=c;if(b.__proto__!==c)throw new TypeError(b+" is not extensible");return b}:null}var sa=oa;function ta(){this.g=!1;this.c=null;this.s=void 0;this.l=1;this.b=this.f=0;this.i=this.a=null}
11
- function ua(b){if(b.g)throw new TypeError("Generator is already running");b.g=!0}ta.prototype.h=function(b){this.s=b};function va(b,c){b.a={td:c,Dd:!0};b.l=b.f||b.b}ta.prototype["return"]=function(b){this.a={"return":b};this.l=this.b};function u(b,c,d){b.l=d;return{value:c}}ta.prototype.A=function(b){this.l=b};function v(b){b.l=0}function ya(b,c,d){b.f=c;void 0!=d&&(b.b=d)}function za(b,c){b.f=0;b.b=c||0}function Aa(b,c){b.l=c;b.f=0}function Da(b){b.f=0;var c=b.a.td;b.a=null;return c}
12
- function Ea(b){b.i=[b.a];b.f=0;b.b=0}function Fa(b,c){var d=b.i.splice(0)[0];(d=b.a=b.a||d)?d.Dd?b.l=b.f||b.b:void 0!=d.A&&b.b<d.A?(b.l=d.A,b.a=null):b.l=b.b:b.l=c}function Ga(b){this.a=new ta;this.b=b}function Ha(b,c){ua(b.a);var d=b.a.c;if(d)return La(b,"return"in d?d["return"]:function(b){return{value:b,done:!0}},c,b.a["return"]);b.a["return"](c);return Ma(b)}
13
- function La(b,c,d,e){try{var f=c.call(b.a.c,d);if(!(f instanceof Object))throw new TypeError("Iterator result "+f+" is not an object");if(!f.done)return b.a.g=!1,f;var g=f.value}catch(h){return b.a.c=null,va(b.a,h),Ma(b)}b.a.c=null;e.call(b.a,g);return Ma(b)}
14
- function Ma(b){for(;b.a.l;)try{var c=b.b(b.a);if(c)return b.a.g=!1,{value:c.value,done:!1}}catch(d){b.a.s=void 0,va(b.a,d)}b.a.g=!1;if(b.a.a){c=b.a.a;b.a.a=null;if(c.Dd)throw c.td;return{value:c["return"],done:!0}}return{value:void 0,done:!0}}
15
- function Na(b){this.next=function(c){ua(b.a);b.a.c?c=La(b,b.a.c.next,c,b.a.h):(b.a.h(c),c=Ma(b));return c};this["throw"]=function(c){ua(b.a);b.a.c?c=La(b,b.a.c["throw"],c,b.a.h):(va(b.a,c),c=Ma(b));return c};this["return"]=function(c){return Ha(b,c)};fa();this[Symbol.iterator]=function(){return this}}function y(b,c){Na.prototype=b.prototype;return new Na(new Ga(c))}function Oa(b,c){return Object.prototype.hasOwnProperty.call(b,c)}
16
- ka("WeakMap",function(b){function c(b){this.a=(g+=Math.random()+1).toString();if(b){da();fa();b=r(b);for(var c;!(c=b.next()).done;)c=c.value,this.set(c[0],c[1])}}function d(b){Oa(b,f)||aa(b,f,{value:{}})}function e(b){var c=Object[b];c&&(Object[b]=function(b){d(b);return c(b)})}if(function(){if(!b||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new b([[c,2],[d,3]]);if(2!=e.get(c)||3!=e.get(d))return!1;e["delete"](c);e.set(d,4);return!e.has(c)&&4==e.get(d)}catch(m){return!1}}())return b;
10
+ var oa="function"==typeof Object.create?Object.create:function(b){function c(){}c.prototype=b;return new c},pa;if("function"==typeof Object.setPrototypeOf)pa=Object.setPrototypeOf;else{var qa;a:{var ra={ne:!0},sa={};try{sa.__proto__=ra;qa=sa.ne;break a}catch(b){}qa=!1}pa=qa?function(b,c){b.__proto__=c;if(b.__proto__!==c)throw new TypeError(b+" is not extensible");return b}:null}var ta=pa;function ua(){this.g=!1;this.c=null;this.o=void 0;this.j=1;this.b=this.f=0;this.i=this.a=null}
11
+ function va(b){if(b.g)throw new TypeError("Generator is already running");b.g=!0}ua.prototype.h=function(b){this.o=b};function xa(b,c){b.a={yd:c,Gd:!0};b.j=b.f||b.b}ua.prototype["return"]=function(b){this.a={"return":b};this.j=this.b};function u(b,c,d){b.j=d;return{value:c}}ua.prototype.A=function(b){this.j=b};function v(b){b.j=0}function y(b,c,d){b.f=c;void 0!=d&&(b.b=d)}function ya(b,c){b.f=0;b.b=c||0}function za(b,c){b.j=c;b.f=0}function Ca(b){b.f=0;var c=b.a.yd;b.a=null;return c}
12
+ function Da(b){b.i=[b.a];b.f=0;b.b=0}function Ea(b,c){var d=b.i.splice(0)[0];(d=b.a=b.a||d)?d.Gd?b.j=b.f||b.b:void 0!=d.A&&b.b<d.A?(b.j=d.A,b.a=null):b.j=b.b:b.j=c}function Fa(b){this.a=new ua;this.b=b}function Ja(b,c){va(b.a);var d=b.a.c;if(d)return Ka(b,"return"in d?d["return"]:function(b){return{value:b,done:!0}},c,b.a["return"]);b.a["return"](c);return La(b)}
13
+ function Ka(b,c,d,e){try{var f=c.call(b.a.c,d);if(!(f instanceof Object))throw new TypeError("Iterator result "+f+" is not an object");if(!f.done)return b.a.g=!1,f;var g=f.value}catch(h){return b.a.c=null,xa(b.a,h),La(b)}b.a.c=null;e.call(b.a,g);return La(b)}
14
+ function La(b){for(;b.a.j;)try{var c=b.b(b.a);if(c)return b.a.g=!1,{value:c.value,done:!1}}catch(d){b.a.o=void 0,xa(b.a,d)}b.a.g=!1;if(b.a.a){c=b.a.a;b.a.a=null;if(c.Gd)throw c.yd;return{value:c["return"],done:!0}}return{value:void 0,done:!0}}
15
+ function Ma(b){this.next=function(c){va(b.a);b.a.c?c=Ka(b,b.a.c.next,c,b.a.h):(b.a.h(c),c=La(b));return c};this["throw"]=function(c){va(b.a);b.a.c?c=Ka(b,b.a.c["throw"],c,b.a.h):(xa(b.a,c),c=La(b));return c};this["return"]=function(c){return Ja(b,c)};fa();this[Symbol.iterator]=function(){return this}}function z(b,c){Ma.prototype=b.prototype;return new Ma(new Fa(c))}function Na(b){if(!(b instanceof Array)){b=r(b);for(var c,d=[];!(c=b.next()).done;)d.push(c.value);b=d}return b}
16
+ function Oa(b,c){return Object.prototype.hasOwnProperty.call(b,c)}
17
+ ka("WeakMap",function(b){function c(b){this.a=(g+=Math.random()+1).toString();if(b){ca();fa();b=r(b);for(var c;!(c=b.next()).done;)c=c.value,this.set(c[0],c[1])}}function d(b){Oa(b,f)||aa(b,f,{value:{}})}function e(b){var c=Object[b];c&&(Object[b]=function(b){d(b);return c(b)})}if(function(){if(!b||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new b([[c,2],[d,3]]);if(2!=e.get(c)||3!=e.get(d))return!1;e["delete"](c);e.set(d,4);return!e.has(c)&&4==e.get(d)}catch(m){return!1}}())return b;
17
18
  var f="$jscomp_hidden_"+Math.random();e("freeze");e("preventExtensions");e("seal");var g=0;c.prototype.set=function(b,c){d(b);if(!Oa(b,f))throw Error("WeakMap key fail: "+b);b[f][this.a]=c;return this};c.prototype.get=function(b){return Oa(b,f)?b[f][this.a]:void 0};c.prototype.has=function(b){return Oa(b,f)&&Oa(b[f],this.a)};c.prototype["delete"]=function(b){return Oa(b,f)&&Oa(b[f],this.a)?delete b[f][this.a]:!1};return c});
18
- ka("Map",function(b){function c(){var b={};return b.Aa=b.next=b.head=b}function d(b,c){var d=b.a;return ia(function(){if(d){for(;d.head!=b.a;)d=d.Aa;for(;d.next!=d.head;)return d=d.next,{done:!1,value:c(d)};d=null}return{done:!0,value:void 0}})}function e(b,c){var d=c&&typeof c;"object"==d||"function"==d?g.has(c)?d=g.get(c):(d=""+ ++h,g.set(c,d)):d="p_"+c;var e=b.b[d];if(e&&Oa(b.b,d))for(var f=0;f<e.length;f++){var k=e[f];if(c!==c&&k.key!==k.key||c===k.key)return{id:d,list:e,index:f,X:k}}return{id:d,
19
+ ka("Map",function(b){function c(){var b={};return b.Ca=b.next=b.head=b}function d(b,c){var d=b.a;return ia(function(){if(d){for(;d.head!=b.a;)d=d.Ca;for(;d.next!=d.head;)return d=d.next,{done:!1,value:c(d)};d=null}return{done:!0,value:void 0}})}function e(b,c){var d=c&&typeof c;"object"==d||"function"==d?g.has(c)?d=g.get(c):(d=""+ ++h,g.set(c,d)):d="p_"+c;var e=b.b[d];if(e&&Oa(b.b,d))for(var f=0;f<e.length;f++){var k=e[f];if(c!==c&&k.key!==k.key||c===k.key)return{id:d,list:e,index:f,X:k}}return{id:d,
19
20
  list:e,index:-1,X:void 0}}function f(b){this.b={};this.a=c();this.size=0;if(b){b=r(b);for(var d;!(d=b.next()).done;)d=d.value,this.set(d[0],d[1])}}if(function(){if(!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new b(r([[c,"s"]]));if("s"!=d.get(c)||1!=d.size||d.get({x:4})||d.set({x:4},"t")!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||"s"!=f.value[1])return!1;f=e.next();return f.done||4!=f.value[0].x||
20
- "t"!=f.value[1]||!e.next().done?!1:!0}catch(q){return!1}}())return b;da();fa();var g=new WeakMap;f.prototype.set=function(b,c){var d=e(this,b);d.list||(d.list=this.b[d.id]=[]);d.X?d.X.value=c:(d.X={next:this.a,Aa:this.a.Aa,head:this.a,key:b,value:c},d.list.push(d.X),this.a.Aa.next=d.X,this.a.Aa=d.X,this.size++);return this};f.prototype["delete"]=function(b){b=e(this,b);return b.X&&b.list?(b.list.splice(b.index,1),b.list.length||delete this.b[b.id],b.X.Aa.next=b.X.next,b.X.next.Aa=b.X.Aa,b.X.head=
21
- null,this.size--,!0):!1};f.prototype.clear=function(){this.b={};this.a=this.a.Aa=c();this.size=0};f.prototype.has=function(b){return!!e(this,b).X};f.prototype.get=function(b){return(b=e(this,b).X)&&b.value};f.prototype.entries=function(){return d(this,function(b){return[b.key,b.value]})};f.prototype.keys=function(){return d(this,function(b){return b.key})};f.prototype.values=function(){return d(this,function(b){return b.value})};f.prototype.forEach=function(b,c){for(var d=this.entries(),e;!(e=d.next()).done;)e=
21
+ "t"!=f.value[1]||!e.next().done?!1:!0}catch(q){return!1}}())return b;ca();fa();var g=new WeakMap;f.prototype.set=function(b,c){var d=e(this,b);d.list||(d.list=this.b[d.id]=[]);d.X?d.X.value=c:(d.X={next:this.a,Ca:this.a.Ca,head:this.a,key:b,value:c},d.list.push(d.X),this.a.Ca.next=d.X,this.a.Ca=d.X,this.size++);return this};f.prototype["delete"]=function(b){b=e(this,b);return b.X&&b.list?(b.list.splice(b.index,1),b.list.length||delete this.b[b.id],b.X.Ca.next=b.X.next,b.X.next.Ca=b.X.Ca,b.X.head=
22
+ null,this.size--,!0):!1};f.prototype.clear=function(){this.b={};this.a=this.a.Ca=c();this.size=0};f.prototype.has=function(b){return!!e(this,b).X};f.prototype.get=function(b){return(b=e(this,b).X)&&b.value};f.prototype.entries=function(){return d(this,function(b){return[b.key,b.value]})};f.prototype.keys=function(){return d(this,function(b){return b.key})};f.prototype.values=function(){return d(this,function(b){return b.value})};f.prototype.forEach=function(b,c){for(var d=this.entries(),e;!(e=d.next()).done;)e=
22
23
  e.value,b.call(c,e[1],e[0],this)};f.prototype[Symbol.iterator]=f.prototype.entries;var h=0;return f});
23
24
  ka("Set",function(b){function c(b){this.a=new Map;if(b){b=r(b);for(var c;!(c=b.next()).done;)this.add(c.value)}this.size=this.a.size}if(function(){if(!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),e=new b(r([c]));if(!e.has(c)||1!=e.size||e.add(c)!=e||1!=e.size||e.add({x:4})!=e||2!=e.size)return!1;var f=e.entries(),g=f.next();if(g.done||g.value[0]!=c||g.value[1]!=c)return!1;g=f.next();return g.done||g.value[0]==c||4!=g.value[0].x||
24
- g.value[1]!=g.value[0]?!1:f.next().done}catch(h){return!1}}())return b;da();fa();c.prototype.add=function(b){this.a.set(b,b);this.size=this.a.size;return this};c.prototype["delete"]=function(b){b=this.a["delete"](b);this.size=this.a.size;return b};c.prototype.clear=function(){this.a.clear();this.size=0};c.prototype.has=function(b){return this.a.has(b)};c.prototype.entries=function(){return this.a.entries()};c.prototype.values=function(){return this.a.values()};c.prototype.keys=c.prototype.values;
25
- c.prototype[Symbol.iterator]=c.prototype.values;c.prototype.forEach=function(b,c){var d=this;this.a.forEach(function(e){return b.call(c,e,e,d)})};return c});function Pa(b,c,d){b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var g=b[f];if(c.call(d,g,f,b))return{zd:f,fe:g}}return{zd:-1,fe:void 0}}ka("Array.prototype.findIndex",function(b){return b?b:function(b,d){return Pa(this,b,d).zd}});
25
+ g.value[1]!=g.value[0]?!1:f.next().done}catch(h){return!1}}())return b;ca();fa();c.prototype.add=function(b){this.a.set(b,b);this.size=this.a.size;return this};c.prototype["delete"]=function(b){b=this.a["delete"](b);this.size=this.a.size;return b};c.prototype.clear=function(){this.a.clear();this.size=0};c.prototype.has=function(b){return this.a.has(b)};c.prototype.entries=function(){return this.a.entries()};c.prototype.values=function(){return this.a.values()};c.prototype.keys=c.prototype.values;
26
+ c.prototype[Symbol.iterator]=c.prototype.values;c.prototype.forEach=function(b,c){var d=this;this.a.forEach(function(e){return b.call(c,e,e,d)})};return c});function Pa(b,c,d){b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var g=b[f];if(c.call(d,g,f,b))return{Cd:f,ie:g}}return{Cd:-1,ie:void 0}}ka("Array.prototype.findIndex",function(b){return b?b:function(b,d){return Pa(this,b,d).Cd}});
26
27
  function Qa(b,c){fa();b instanceof String&&(b+="");var d=0,e={next:function(){if(d<b.length){var f=d++;return{value:c(f,b[f]),done:!1}}e.next=function(){return{done:!0,value:void 0}};return e.next()}};e[Symbol.iterator]=function(){return e};return e}ka("Array.prototype.keys",function(b){return b?b:function(){return Qa(this,function(b){return b})}});ka("Object.is",function(b){return b?b:function(b,d){return b===d?0!==b||1/b===1/d:b!==b&&d!==d}});
27
28
  ka("Array.prototype.includes",function(b){return b?b:function(b,d){var c=this;c instanceof String&&(c=String(c));var f=c.length,g=d||0;for(0>g&&(g=Math.max(g+f,0));g<f;g++){var h=c[g];if(h===b||Object.is(h,b))return!0}return!1}});function Ra(b,c,d){if(null==b)throw new TypeError("The 'this' value for String.prototype."+d+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+d+" must not be a regular expression");return b+""}
28
29
  ka("String.prototype.includes",function(b){return b?b:function(b,d){return-1!==Ra(this,b,"includes").indexOf(b,d||0)}});ka("Array.from",function(b){return b?b:function(b,d,e){fa();d=null!=d?d:function(b){return b};var c=[],g=b[Symbol.iterator];if("function"==typeof g)for(b=g.call(b);!(g=b.next()).done;)c.push(d.call(e,g.value));else{g=b.length;for(var h=0;h<g;h++)c.push(d.call(e,b[h]))}return c}});
29
- ka("String.prototype.startsWith",function(b){return b?b:function(b,d){for(var c=Ra(this,b,"startsWith"),f=c.length,g=b.length,h=Math.max(0,Math.min(d|0,c.length)),k=0;k<g&&h<f;)if(c[h++]!=b[k++])return!1;return k>=g}});ka("Array.prototype.find",function(b){return b?b:function(b,d){return Pa(this,b,d).fe}});var Sa=this;Sa.a=!0;
30
- function z(b,c){var d=b.split("."),e=Sa;d[0]in e||!e.execScript||e.execScript("var "+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c}function Ta(b,c){function d(){}d.prototype=c.prototype;b.ag=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.og=function(b,d,g){return c.prototype[d].apply(b,Array.prototype.slice.call(arguments,2))}};/*
30
+ ka("String.prototype.startsWith",function(b){return b?b:function(b,d){for(var c=Ra(this,b,"startsWith"),f=c.length,g=b.length,h=Math.max(0,Math.min(d|0,c.length)),k=0;k<g&&h<f;)if(c[h++]!=b[k++])return!1;return k>=g}});ka("Array.prototype.find",function(b){return b?b:function(b,d){return Pa(this,b,d).ie}});var Sa=this;Sa.a=!0;
31
+ function A(b,c){var d=b.split("."),e=Sa;d[0]in e||!e.execScript||e.execScript("var "+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c}function Ua(b,c){function d(){}d.prototype=c.prototype;b.ag=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.og=function(b,d,g){return c.prototype[d].apply(b,Array.prototype.slice.call(arguments,2))}};/*
31
32
 
32
33
  Copyright 2016 Google Inc.
33
34
 
@@ -43,558 +44,571 @@ function z(b,c){var d=b.split("."),e=Sa;d[0]in e||!e.execScript||e.execScript("v
43
44
  See the License for the specific language governing permissions and
44
45
  limitations under the License.
45
46
  */
46
- function Ua(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function Wa(b,c,d){var e=Math.pow(b.c,c);d=d*(1-e)+e*b.a;isNaN(d)||(b.a=d,b.b+=c)}function Xa(b){return b.a/(1-Math.pow(b.c,b.b))};function Ya(){this.b=new Ua(2);this.c=new Ua(5);this.a=0}Ya.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(Xa(this.b),Xa(this.c))};function Za(){}function $a(){}function ab(){}window.console&&window.console.log.bind&&($a=console.warn.bind(console),Za=console.error.bind(console));var bb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function cb(b){var c;b instanceof cb?(db(this,b.sa),this.Xa=b.Xa,this.oa=b.oa,hb(this,b.tb),this.fa=b.fa,ib(this,b.a.clone()),this.Oa=b.Oa):b&&(c=String(b).match(bb))?(db(this,c[1]||"",!0),this.Xa=jb(c[2]||""),this.oa=jb(c[3]||"",!0),hb(this,c[4]),this.fa=jb(c[5]||"",!0),ib(this,c[6]||"",!0),this.Oa=jb(c[7]||"")):this.a=new kb(null)}p=cb.prototype;p.sa="";p.Xa="";p.oa="";p.tb=null;p.fa="";p.Oa="";
47
- p.toString=function(){var b=[],c=this.sa;c&&b.push(lb(c,mb,!0),":");if(c=this.oa){b.push("//");var d=this.Xa;d&&b.push(lb(d,mb,!0),"@");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));c=this.tb;null!=c&&b.push(":",String(c))}if(c=this.fa)this.oa&&"/"!=c.charAt(0)&&b.push("/"),b.push(lb(c,"/"==c.charAt(0)?nb:ob,!0));(c=this.a.toString())&&b.push("?",c);(c=this.Oa)&&b.push("#",lb(c,pb));return b.join("")};
48
- p.resolve=function(b){var c=this.clone();"data"===c.sa&&(c=new cb);var d=!!b.sa;d?db(c,b.sa):d=!!b.Xa;d?c.Xa=b.Xa:d=!!b.oa;d?c.oa=b.oa:d=null!=b.tb;var e=b.fa;if(d)hb(c,b.tb);else if(d=!!b.fa){if("/"!=e.charAt(0))if(this.oa&&!this.fa)e="/"+e;else{var f=c.fa.lastIndexOf("/");-1!=f&&(e=c.fa.substr(0,f+1)+e)}if(".."==e||"."==e)e="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){f=0==e.lastIndexOf("/",0);e=e.split("/");for(var g=[],h=0;h<e.length;){var k=e[h++];"."==k?f&&h==e.length&&g.push(""):".."==
49
- k?((1<g.length||1==g.length&&""!=g[0])&&g.pop(),f&&h==e.length&&g.push("")):(g.push(k),f=!0)}e=g.join("/")}}d?c.fa=e:d=""!==b.a.toString();d?ib(c,b.a.clone()):d=!!b.Oa;d&&(c.Oa=b.Oa);return c};p.clone=function(){return new cb(this)};function db(b,c,d){b.sa=d?jb(c,!0):c;b.sa&&(b.sa=b.sa.replace(/:$/,""))}function hb(b,c){if(c){c=Number(c);if(isNaN(c)||0>c)throw Error("Bad port number "+c);b.tb=c}else b.tb=null}function ib(b,c,d){c instanceof kb?b.a=c:(d||(c=lb(c,qb)),b.a=new kb(c))}
50
- function jb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):""}function lb(b,c,d){return"string"==typeof b?(b=encodeURI(b).replace(c,rb),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),b):null}function rb(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)}var mb=/[#\/\?@]/g,ob=/[#\?:]/g,nb=/[#\?]/g,qb=/[#\?@]/g,pb=/#/g;function kb(b){this.a=b||null}p=kb.prototype;p.ea=null;p.Xb=null;
51
- p.add=function(b,c){if(!this.ea&&(this.ea={},this.Xb=0,this.a))for(var d=this.a.split("&"),e=0;e<d.length;e++){var f=d[e].indexOf("="),g=null;if(0<=f){var h=d[e].substring(0,f);g=d[e].substring(f+1)}else h=d[e];h=decodeURIComponent(h.replace(/\+/g," "));g=g||"";this.add(h,decodeURIComponent(g.replace(/\+/g," ")))}this.a=null;(d=this.ea.hasOwnProperty(b)&&this.ea[b])||(this.ea[b]=d=[]);d.push(c);this.Xb++;return this};
52
- p.toString=function(){if(this.a)return this.a;if(!this.ea)return"";var b=[],c;for(c in this.ea)for(var d=encodeURIComponent(c),e=this.ea[c],f=0;f<e.length;f++){var g=d;""!==e[f]&&(g+="="+encodeURIComponent(e[f]));b.push(g)}return this.a=b.join("&")};p.clone=function(){var b=new kb;b.a=this.a;if(this.ea){var c={},d;for(d in this.ea)c[d]=this.ea[d].concat();b.ea=c;b.Xb=this.Xb}return b};function sb(b){this.b=b;this.a=null}sb.prototype.O=function(b){var c=this;this.stop();var d=!0,e=null;this.a=function(){window.clearTimeout(e);d=!1};e=window.setTimeout(function(){d&&c.b()},1E3*b);return this};sb.prototype.stop=function(){this.a&&(this.a(),this.a=null)};function B(b){this.b=b;this.a=null}z("shaka.util.Timer",B);B.prototype.oc=function(){this.stop();this.b();return this};B.prototype.tickNow=B.prototype.oc;B.prototype.O=function(b){var c=this;this.stop();this.a=(new sb(function(){c.b()})).O(b);return this};B.prototype.tickAfter=B.prototype.O;B.prototype.Ia=function(b){var c=this;this.stop();this.a=(new sb(function(){c.a.O(b);c.b()})).O(b);return this};B.prototype.tickEvery=B.prototype.Ia;B.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)};
53
- B.prototype.stop=B.prototype.stop;function tb(b,c){var d=ub();this.i=null==b.maxAttempts?d.maxAttempts:b.maxAttempts;this.f=null==b.baseDelay?d.baseDelay:b.baseDelay;this.h=null==b.fuzzFactor?d.fuzzFactor:b.fuzzFactor;this.g=null==b.backoffFactor?d.backoffFactor:b.backoffFactor;this.a=0;this.b=this.f;if(this.c=void 0===c?!1:c)this.a=1}
54
- function zb(b){return t(function d(){var e,f;return y(d,function(d){switch(d.l){case 1:if(b.a>=b.i)if(b.c)b.a=1,b.b=b.f;else return d["return"](Promise.reject());e=b.a;b.a++;if(0==e)return d["return"]();f=b.b*(1+(2*Math.random()-1)*b.h);return u(d,new Promise(function(b){(new B(b)).O(f/1E3)}),2);case 2:b.b*=b.g,v(d)}})})}function ub(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function D(b,c,d,e){for(var f=[],g=3;g<arguments.length;++g)f[g-3]=arguments[g];this.severity=b;this.category=c;this.code=d;this.data=f;this.handled=!1}z("shaka.util.Error",D);D.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};D.Severity={RECOVERABLE:1,CRITICAL:2};D.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9};
55
- D.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,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,
47
+ function Va(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function Wa(b,c,d){var e=Math.pow(b.c,c);d=d*(1-e)+e*b.a;isNaN(d)||(b.a=d,b.b+=c)}function Xa(b){return b.a/(1-Math.pow(b.c,b.b))};function Ya(){this.b=new Va(2);this.c=new Va(5);this.a=0}Ya.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(Xa(this.b),Xa(this.c))};function Za(){}function $a(){}function ab(){}window.console&&window.console.log.bind&&($a=console.warn.bind(console),Za=console.error.bind(console));var bb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function cb(b){var c;b instanceof cb?(gb(this,b.va),this.$a=b.$a,this.ra=b.ra,hb(this,b.xb),this.ia=b.ia,ib(this,b.a.clone()),this.Qa=b.Qa):b&&(c=String(b).match(bb))?(gb(this,c[1]||"",!0),this.$a=jb(c[2]||""),this.ra=jb(c[3]||"",!0),hb(this,c[4]),this.ia=jb(c[5]||"",!0),ib(this,c[6]||"",!0),this.Qa=jb(c[7]||"")):this.a=new kb(null)}p=cb.prototype;p.va="";p.$a="";p.ra="";p.xb=null;p.ia="";p.Qa="";
48
+ p.toString=function(){var b=[],c=this.va;c&&b.push(lb(c,mb,!0),":");if(c=this.ra){b.push("//");var d=this.$a;d&&b.push(lb(d,mb,!0),"@");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));c=this.xb;null!=c&&b.push(":",String(c))}if(c=this.ia)this.ra&&"/"!=c.charAt(0)&&b.push("/"),b.push(lb(c,"/"==c.charAt(0)?nb:ob,!0));(c=this.a.toString())&&b.push("?",c);(c=this.Qa)&&b.push("#",lb(c,pb));return b.join("")};
49
+ p.resolve=function(b){var c=this.clone();"data"===c.va&&(c=new cb);var d=!!b.va;d?gb(c,b.va):d=!!b.$a;d?c.$a=b.$a:d=!!b.ra;d?c.ra=b.ra:d=null!=b.xb;var e=b.ia;if(d)hb(c,b.xb);else if(d=!!b.ia){if("/"!=e.charAt(0))if(this.ra&&!this.ia)e="/"+e;else{var f=c.ia.lastIndexOf("/");-1!=f&&(e=c.ia.substr(0,f+1)+e)}if(".."==e||"."==e)e="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){f=0==e.lastIndexOf("/",0);e=e.split("/");for(var g=[],h=0;h<e.length;){var k=e[h++];"."==k?f&&h==e.length&&g.push(""):".."==
50
+ k?((1<g.length||1==g.length&&""!=g[0])&&g.pop(),f&&h==e.length&&g.push("")):(g.push(k),f=!0)}e=g.join("/")}}d?c.ia=e:d=""!==b.a.toString();d?ib(c,b.a.clone()):d=!!b.Qa;d&&(c.Qa=b.Qa);return c};p.clone=function(){return new cb(this)};function gb(b,c,d){b.va=d?jb(c,!0):c;b.va&&(b.va=b.va.replace(/:$/,""))}function hb(b,c){if(c){c=Number(c);if(isNaN(c)||0>c)throw Error("Bad port number "+c);b.xb=c}else b.xb=null}function ib(b,c,d){c instanceof kb?b.a=c:(d||(c=lb(c,qb)),b.a=new kb(c))}
51
+ function jb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):""}function lb(b,c,d){return"string"==typeof b?(b=encodeURI(b).replace(c,rb),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),b):null}function rb(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)}var mb=/[#\/\?@]/g,ob=/[#\?:]/g,nb=/[#\?]/g,qb=/[#\?@]/g,pb=/#/g;function kb(b){this.a=b||null}p=kb.prototype;p.ha=null;p.$b=null;
52
+ p.add=function(b,c){if(!this.ha&&(this.ha={},this.$b=0,this.a))for(var d=this.a.split("&"),e=0;e<d.length;e++){var f=d[e].indexOf("="),g=null;if(0<=f){var h=d[e].substring(0,f);g=d[e].substring(f+1)}else h=d[e];h=decodeURIComponent(h.replace(/\+/g," "));g=g||"";this.add(h,decodeURIComponent(g.replace(/\+/g," ")))}this.a=null;(d=this.ha.hasOwnProperty(b)&&this.ha[b])||(this.ha[b]=d=[]);d.push(c);this.$b++;return this};
53
+ p.toString=function(){if(this.a)return this.a;if(!this.ha)return"";var b=[],c;for(c in this.ha)for(var d=encodeURIComponent(c),e=this.ha[c],f=0;f<e.length;f++){var g=d;""!==e[f]&&(g+="="+encodeURIComponent(e[f]));b.push(g)}return this.a=b.join("&")};p.clone=function(){var b=new kb;b.a=this.a;if(this.ha){var c={},d;for(d in this.ha)c[d]=this.ha[d].concat();b.ha=c;b.$b=this.$b}return b};function sb(b){this.b=b;this.a=null}sb.prototype.O=function(b){var c=this;this.stop();var d=!0,e=null;this.a=function(){window.clearTimeout(e);d=!1};e=window.setTimeout(function(){d&&c.b()},1E3*b);return this};sb.prototype.stop=function(){this.a&&(this.a(),this.a=null)};function D(b){this.b=b;this.a=null}A("shaka.util.Timer",D);D.prototype.sc=function(){this.stop();this.b();return this};D.prototype.tickNow=D.prototype.sc;D.prototype.O=function(b){var c=this;this.stop();this.a=(new sb(function(){c.b()})).O(b);return this};D.prototype.tickAfter=D.prototype.O;D.prototype.La=function(b){var c=this;this.stop();this.a=(new sb(function(){c.a.O(b);c.b()})).O(b);return this};D.prototype.tickEvery=D.prototype.La;D.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)};
54
+ D.prototype.stop=D.prototype.stop;function xb(b,c){var d=yb();this.i=null==b.maxAttempts?d.maxAttempts:b.maxAttempts;this.f=null==b.baseDelay?d.baseDelay:b.baseDelay;this.h=null==b.fuzzFactor?d.fuzzFactor:b.fuzzFactor;this.g=null==b.backoffFactor?d.backoffFactor:b.backoffFactor;this.a=0;this.b=this.f;if(this.c=void 0===c?!1:c)this.a=1}
55
+ function zb(b){return t(function d(){var e,f;return z(d,function(d){switch(d.j){case 1:if(b.a>=b.i)if(b.c)b.a=1,b.b=b.f;else return d["return"](Promise.reject());e=b.a;b.a++;if(0==e)return d["return"]();f=b.b*(1+(2*Math.random()-1)*b.h);return u(d,new Promise(function(b){(new D(b)).O(f/1E3)}),2);case 2:b.b*=b.g,v(d)}})})}function yb(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function G(b,c,d,e){for(var f=[],g=3;g<arguments.length;++g)f[g-3]=arguments[g];this.severity=b;this.category=c;this.code=d;this.data=f;this.handled=!1}A("shaka.util.Error",G);G.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};G.Severity={RECOVERABLE:1,CRITICAL:2};G.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9};
56
+ G.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,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,
56
57
  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,
57
58
  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,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,
58
59
  HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,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,INVALID_STREAMS_CHOSEN:5005,
59
- NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,
60
- ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013};function G(){var b,c,d=new Promise(function(d,f){b=d;c=f});d.resolve=b;d.reject=c;return d}G.prototype.resolve=function(){};G.prototype.reject=function(){};function H(b,c){this.promise=b;this.Gd=c;this.a=!1}z("shaka.util.AbortableOperation",H);function Ab(b){return new H(Promise.reject(b),function(){return Promise.resolve()})}H.failed=Ab;function Bb(){var b=Promise.reject(new D(2,7,7001));b["catch"](function(){});return new H(b,function(){return Promise.resolve()})}H.aborted=Bb;function Cb(b){return new H(Promise.resolve(b),function(){return Promise.resolve()})}H.completed=Cb;
61
- function Db(b){return new H(b,function(){return b["catch"](function(){})})}H.notAbortable=Db;H.prototype.abort=function(){this.a=!0;return this.Gd()};H.prototype.abort=H.prototype.abort;function Eb(b){return new H(Promise.all(b.map(function(b){return b.promise})),function(){return Promise.all(b.map(function(b){return b.abort()}))})}H.all=Eb;H.prototype["finally"]=function(b){this.promise.then(function(){return b(!0)},function(){return b(!1)});return this};H.prototype["finally"]=H.prototype["finally"];
62
- H.prototype.T=function(b,c){function d(){f.reject(new D(2,7,7001));return e.abort()}var e=this,f=new G;this.promise.then(function(c){e.a?f.reject(new D(2,7,7001)):b?d=Fb(b,c,f):f.resolve(c)},function(b){c?d=Fb(c,b,f):f.reject(b)});return new H(f,function(){return d()})};H.prototype.chain=H.prototype.T;
63
- function Fb(b,c,d){try{var e=b(c);if(e&&e.promise&&e.abort)return d.resolve(e.promise),function(){return e.abort()};d.resolve(e);return function(){return Promise.resolve(e).then(function(){})["catch"](function(){})}}catch(f){return d.reject(f),function(){return Promise.resolve()}}};function I(b,c){c=void 0===c?{}:c;for(var d in c)this[d]=c[d];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=b;this.isTrusted=!1;this.target=this.currentTarget=null;this.a=!1}I.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};I.prototype.stopImmediatePropagation=function(){this.a=!0};I.prototype.stopPropagation=function(){};function Gb(){this.a={}}p=Gb.prototype;p.push=function(b,c){this.a.hasOwnProperty(b)?this.a[b].push(c):this.a[b]=[c]};p.get=function(b){return(b=this.a[b])?b.slice():null};p.getAll=function(){var b=[],c;for(c in this.a)b.push.apply(b,this.a[c]);return b};p.remove=function(b,c){var d=this.a[b];if(d)for(var e=0;e<d.length;++e)d[e]==c&&(d.splice(e,1),--e)};p.forEach=function(b){for(var c in this.a)b(c,this.a[c])};function J(){this.xc=new Gb;this.Sb=this}J.prototype.addEventListener=function(b,c){this.xc.push(b,c)};J.prototype.removeEventListener=function(b,c){this.xc.remove(b,c)};J.prototype.dispatchEvent=function(b){for(var c=this.xc.get(b.type)||[],d=0;d<c.length;++d){b.target=this.Sb;b.currentTarget=this.Sb;var e=c[d];try{e.handleEvent?e.handleEvent(b):e.call(this,b)}catch(f){}if(b.a)break}return b.defaultPrevented};function Ib(b){function c(b){switch(typeof b){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return b;default:if(!b||b.buffer&&b.buffer.constructor==ArrayBuffer)return b;if(d.has(b))return null;var e=b.constructor==Array;if(b.constructor!=Object&&!e)return null;d.add(b);var g=e?[]:{},h;for(h in b)g[h]=c(b[h]);e&&(g.length=b.length);return g}}var d=new Set;return c(b)};function Jb(b,c){return"number"===typeof b&&"number"===typeof c&&isNaN(b)&&isNaN(c)?!0:b===c}function Kb(b,c){var d=b.indexOf(c);-1<d&&b.splice(d,1)}function Lb(b,c){var d=0;b.forEach(function(b){d+=c(b)?1:0});return d}
64
- function Mb(b,c,d){d||(d=Jb);if(b.length!=c.length)return!1;c=c.slice();var e={};b=r(b);for(var f=b.next();!f.done;e={item:e.item},f=b.next()){e.item=f.value;f=c.findIndex(function(b){return function(c){return d(b.item,c)}}(e));if(-1==f)return!1;c[f]=c[c.length-1];c.pop()}return 0==c.length};function Nb(){this.a=[]}function Ob(b,c){b.a.push(c["finally"](function(){Kb(b.a,c)}))}Nb.prototype.destroy=function(){var b=[];this.a.forEach(function(c){c.promise["catch"](function(){});b.push(c.abort())});this.a=[];return Promise.all(b)};function K(b){J.call(this);this.f=!1;this.g=new Nb;this.a=new Set;this.b=new Set;this.c=b||null}Ta(K,J);z("shaka.net.NetworkingEngine",K);var Pb={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4};K.RequestType=Pb;K.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var Qb={};function Rb(b,c,d){d=d||3;var e=Qb[b];if(!e||d>=e.priority)Qb[b]={priority:d,vf:c}}K.registerScheme=Rb;K.unregisterScheme=function(b){delete Qb[b]};K.prototype.xf=function(b){this.a.add(b)};K.prototype.registerRequestFilter=K.prototype.xf;
65
- K.prototype.cg=function(b){this.a["delete"](b)};K.prototype.unregisterRequestFilter=K.prototype.cg;K.prototype.se=function(){this.a.clear()};K.prototype.clearAllRequestFilters=K.prototype.se;K.prototype.yf=function(b){this.b.add(b)};K.prototype.registerResponseFilter=K.prototype.yf;K.prototype.dg=function(b){this.b["delete"](b)};K.prototype.unregisterResponseFilter=K.prototype.dg;K.prototype.te=function(){this.b.clear()};K.prototype.clearAllResponseFilters=K.prototype.te;
66
- function Sb(b,c){return{uris:b,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null}}K.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};K.prototype.destroy=K.prototype.destroy;
67
- K.prototype.request=function(b,c){var d=this,e=new Tb;if(this.f){var f=Promise.reject(new D(2,7,7001));f["catch"](function(){});return new Ub(f,function(){return Promise.resolve()},e)}c.method=c.method||"GET";c.headers=c.headers||{};c.retryParameters=c.retryParameters?Ib(c.retryParameters):ub();c.uris=Ib(c.uris);f=Vb(this,b,c);var g=f.T(function(){return Wb(d,b,c,new tb(c.retryParameters,!1),0,null,e)}),h=g.T(function(c){return Xb(d,b,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},
68
- function(){});var m=0;g.promise.then(function(){m=Date.now()},function(){});f=h.T(function(c){var e=Date.now()-m,f=c.response;f.timeMs+=l;f.timeMs+=e;c.Ve||!d.c||f.fromCache||1!=b||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=2);throw b;});f=new Ub(f.promise,f.Gd,e);Ob(this.g,f);return f};K.prototype.request=K.prototype.request;
69
- function Vb(b,c,d){var e=Cb(void 0),f={};b=r(b.a);for(var g=b.next();!g.done;f={ad:f.ad},g=b.next())f.ad=g.value,e=e.T(function(b){return function(){return b.ad(c,d)}}(f));return e.T(void 0,function(b){if(b&&7001==b.code)throw b;throw new D(2,1,1006,b);})}
70
- function Wb(b,c,d,e,f,g,h){var k=new cb(d.uris[f]),l=k.sa,m=!1;l||(l=location.protocol,l=l.slice(0,-1),db(k,l),d.uris[f]=k.toString());var n=(l=Qb[l])?l.vf:null;if(!n)return Ab(new D(2,1,1E3,k));var q;return Db(zb(e)).T(function(){if(b.f)return Bb();q=Date.now();return n(d.uris[f],d,c,function(d,e,f){b.c&&1==c&&(b.c(d,e),m=!0,h.a=f)})}).T(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-q);return{response:b,Ve:m}},function(k){if(k&&7001==k.code)throw k;if(b.f)return Bb();if(k&&1==k.severity)return b.dispatchEvent(new I("retry",
71
- {error:k instanceof D?k:null})),f=(f+1)%d.uris.length,Wb(b,c,d,e,f,k,h);throw k||g;})}function Xb(b,c,d){var e=Cb(void 0);b=r(b.b);for(var f=b.next();!f.done;f=b.next())e=e.T(f.value.bind(null,c,d.response));return e.T(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof D&&(c=b.severity);throw new D(c,1,1007,b);})}function Tb(){this.a=0}K.NumBytesRemainingClass=Tb;function Ub(b,c,d){H.call(this,b,c);this.b=d}var Yb=Ub;Yb.prototype=ma(H.prototype);
72
- Yb.prototype.constructor=Yb;if(sa)sa(Yb,H);else for(var Zb in H)if("prototype"!=Zb)if(Object.defineProperties){var $b=Object.getOwnPropertyDescriptor(H,Zb);$b&&Object.defineProperty(Yb,Zb,$b)}else Yb[Zb]=H[Zb];Yb.ag=H.prototype;K.PendingRequest=Ub;Ub.all=Eb;Ub.notAbortable=Db;Ub.completed=Cb;Ub.aborted=Bb;Ub.failed=Ab;function ac(){this.b=new Gb}ac.prototype.a=function(){bc(this);this.b=null};function L(b,c,d,e){b.b&&(c=new cc(c,d,e),b.b.push(d,c))}function dc(b,c,d,e){function f(g){b.ma(c,d,f);e(g)}L(b,c,d,f)}ac.prototype.ma=function(b,c,d){if(this.b)for(var e=this.b.get(c)||[],f=0;f<e.length;++f){var g=e[f];g.target!=b||d!=g.listener&&d||(g.ma(),this.b.remove(c,g))}};function bc(b){if(b.b){for(var c=b.b.getAll(),d=0;d<c.length;++d)c[d].ma();b.b.a={}}}
73
- function cc(b,c,d){this.target=b;this.type=c;this.listener=d;this.target.addEventListener(c,d,!1)}cc.prototype.ma=function(){this.target.removeEventListener(this.type,this.listener,!1);this.listener=this.target=null};function ec(b,c){for(var d=[],e=r(b),f=e.next();!f.done;f=e.next())d.push(c(f.value));return d}function fc(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())if(!c(e.value))return!1;return!0};function gc(b){var c=new Map;Object.keys(b).forEach(function(d){c.set(d,b[d])});return c}function hc(b){var c={};b.forEach(function(b,e){c[e]=b});return c};function ic(b,c){var d=b;c&&(d+='; codecs="'+c+'"');return d}function jc(b){var c=[b.mimeType];kc.forEach(function(d,e){var f=b[e];f&&c.push(d+'="'+f+'"')});return c.join(";")}function lc(b){b=b.split(".");var c=b[0];b.pop();return[c,b.join(".")]}var kc=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function mc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function nc(b){return""!=oc().canPlayType(b)}function pc(b){return(navigator.userAgent||"").includes(b)}function oc(){if(qc)return qc;rc||(rc=new B(function(){qc=null}));(qc=document.querySelector("video")||document.querySelector("audio"))||(qc=document.createElement("video"));rc.O(1);return qc}var rc=null,qc=null;function sc(b){if(!b)return"";b=new Uint8Array(b);239==b[0]&&187==b[1]&&191==b[2]&&(b=b.subarray(3));b=escape(tc(b));try{return decodeURIComponent(b)}catch(c){throw new D(2,2,2004);}}z("shaka.util.StringUtils.fromUTF8",sc);
74
- function uc(b,c,d){if(!b)return"";if(!d&&0!=b.byteLength%2)throw new D(2,2,2004);if(b instanceof ArrayBuffer)var e=b;else d=new Uint8Array(b.byteLength),d.set(new Uint8Array(b)),e=d.buffer;b=Math.floor(b.byteLength/2);d=new Uint16Array(b);e=new DataView(e);for(var f=0;f<b;f++)d[f]=e.getUint16(2*f,c);return tc(d)}z("shaka.util.StringUtils.fromUTF16",uc);
75
- function xc(b){var c=new Uint8Array(b);if(239==c[0]&&187==c[1]&&191==c[2])return sc(c);if(254==c[0]&&255==c[1])return uc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return uc(c.subarray(2),!0);var d=function(b,c){return b.byteLength<=c||32<=b[c]&&126>=b[c]}.bind(null,c);if(0==c[0]&&0==c[2])return uc(b,!1);if(0==c[1]&&0==c[3])return uc(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return sc(b);throw new D(2,2,2003);}z("shaka.util.StringUtils.fromBytesAutoDetect",xc);
76
- function yc(b){b=encodeURIComponent(b);b=unescape(b);for(var c=new Uint8Array(b.length),d=0;d<b.length;++d)c[d]=b.charCodeAt(d);return c.buffer}z("shaka.util.StringUtils.toUTF8",yc);function zc(b,c){for(var d=new Uint8Array(2*b.length),e=new DataView(d.buffer),f=0;f<b.length;++f)e.setUint16(2*f,b.charCodeAt(f),c);return d.buffer}z("shaka.util.StringUtils.toUTF16",zc);function tc(b){for(var c="",d=0;d<b.length;d+=16E3)c+=String.fromCharCode.apply(null,b.subarray(d,d+16E3));return c};function Ac(b,c){var d=tc(b);c=void 0==c?!0:c;d=window.btoa(d).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")}z("shaka.util.Uint8ArrayUtils.toBase64",Ac);function Bc(b){b=window.atob(b.replace(/-/g,"+").replace(/_/g,"/"));for(var c=new Uint8Array(b.length),d=0;d<b.length;++d)c[d]=b.charCodeAt(d);return c}z("shaka.util.Uint8ArrayUtils.fromBase64",Bc);function Cc(b){for(var c=new Uint8Array(b.length/2),d=0;d<b.length;d+=2)c[d/2]=window.parseInt(b.substr(d,2),16);return c}
77
- z("shaka.util.Uint8ArrayUtils.fromHex",Cc);function Dc(b){for(var c="",d=0;d<b.length;++d){var e=b[d].toString(16);1==e.length&&(e="0"+e);c+=e}return c}z("shaka.util.Uint8ArrayUtils.toHex",Dc);function Ec(b,c){if(!b&&!c)return!0;if(!b||!c||b.length!=c.length)return!1;for(var d=0;d<b.length;++d)if(b[d]!=c[d])return!1;return!0}z("shaka.util.Uint8ArrayUtils.equal",Ec);
78
- function Fc(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];for(var e=d=0;e<c.length;++e)d+=c[e].length;d=new Uint8Array(d);for(var f=e=0;f<c.length;++f)d.set(c[f],e),e+=c[f].length;return d}z("shaka.util.Uint8ArrayUtils.concat",Fc);function Gc(b){var c=this;this.w=b;this.v=new Set;this.m=this.h=null;this.N=!1;this.a=null;this.i=new ac;this.b=new Map;this.o=[];this.j=new G;this.f=null;this.g=function(d){c.j.reject(d);b.onError(d)};this.ka=new Map;this.S=new Map;this.K=new B(function(){return Hc(c)});this.c=!1;this.W=new G;this.C=!1;this.F=[];this.ja=!1;this.V=(new B(function(){Ic(c)})).Ia(1);this.j["catch"](function(){})}p=Gc.prototype;
79
- p.destroy=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.l){case 1:if(b.c)return u(d,b.W,0);b.c=!0;return u(d,Jc(b),4);case 4:b.W.resolve(),d.A(0)}})})};
80
- function Jc(b){return t(function d(){var e;return y(d,function(d){switch(d.l){case 1:return b.i.a(),b.i=null,b.j.reject(),b.V.stop(),b.V=null,b.K.stop(),b.K=null,e=Array.from(b.b.keys()),b.b.clear(),u(d,Promise.all(e.map(function(b){return Promise.resolve().then(function(){return t(function k(){return y(k,function(d){switch(d.l){case 1:return ya(d,2),u(d,Kc(b),4);case 4:Aa(d,0);break;case 2:Da(d),v(d)}})})})})),2);case 2:if(!b.m){d.A(3);break}ya(d,4);return u(d,b.m.setMediaKeys(null),6);case 6:Aa(d,
81
- 5);break;case 4:Da(d);case 5:b.m=null;case 3:b.a=null,b.v.clear(),b.h=null,b.o=[],b.f=null,b.g=null,b.w=null,v(d)}})})}p.configure=function(b){this.f=b};function Lc(b,c,d){b.o=[];b.C=d;return Mc(b,c)}function Nc(b,c,d){b.o=d;b.C=0<d.length;return Mc(b,c)}
82
- function Oc(b,c,d,e,f,g){var h=new Map;h.set(c,{audioCapabilities:f,videoCapabilities:g,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:c,drmInfos:[{keySystem:c,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:e,initData:null,keyIds:null}]});return Pc(b,h)}
83
- function Mc(b,c){var d=c.some(function(b){return 0<b.drmInfos.length});if(!d){var e=gc(b.f.servers);Qc(c,e)}var f=Rc(b);if(f){var g=r(c);for(e=g.next();!e.done;e=g.next())e.value.drmInfos=[f]}f=r(c);for(e=f.next();!e.done;e=f.next())for(e=r(e.value.drmInfos),g=e.next();!g.done;g=e.next())Sc(g.value,gc(b.f.servers),gc(b.f.advanced||{}));e=Tc(b,c);if(!e.size)return b.N=!0,Promise.resolve();e=Pc(b,e);return d?e:e["catch"](function(){})}
84
- p.zb=function(b){var c=this;if(!this.h)return dc(this.i,b,"encrypted",function(){c.g(new D(2,6,6010))}),Promise.resolve();this.m=b;dc(this.i,this.m,"play",function(){for(var b=0;b<c.F.length;b++)Uc(c,c.F[b]);c.ja=!0;c.F=[]});b=this.m.setMediaKeys(this.h);b=b["catch"](function(b){return Promise.reject(new D(2,6,6003,b.message))});var d=Vc(this);return Promise.all([b,d]).then(function(){if(c.c)return Promise.reject();Wc(c);c.a.initData.length||c.o.length||L(c.i,c.m,"encrypted",function(b){return Xc(c,
85
- b.initDataType,new Uint8Array(b.initData))})})["catch"](function(b){if(!c.c)return Promise.reject(b)})};function Vc(b){return t(function d(){var e;return y(d,function(d){switch(d.l){case 1:if(!(b.h&&b.a&&b.a.serverCertificate&&b.a.serverCertificate.length)){d.A(0);break}ya(d,3);return u(d,b.h.setServerCertificate(b.a.serverCertificate),5);case 5:Aa(d,0);break;case 3:return e=Da(d),d["return"](Promise.reject(new D(2,6,6004,e.message)))}})})}
86
- function Yc(b,c){return t(function e(){var f,g,h;return y(e,function(e){switch(e.l){case 1:return u(e,Zc(b,c),2);case 2:f=e.s;if(!f)return e["return"]();g=[];if(h=b.b.get(f))h.ua=new G,g.push(h.ua);g.push(f.remove());return u(e,Promise.all(g),0)}})})}function Wc(b){var c=b.a?b.a.initData:[];c.forEach(function(c){return $c(b,c.initDataType,c.initData)});b.o.forEach(function(c){return Zc(b,c)});c.length||b.o.length||b.j.resolve();return b.j}
87
- function Xc(b,c,d){var e=b.b.values();e=r(e);for(var f=e.next();!f.done;f=e.next())if(Ec(d,f.value.initData))return;$c(b,c,d)}p.keySystem=function(){return this.a?this.a.keySystem:""};function ad(b,c){return pc("Edge/")?!0:b.v.has(c)}function bd(b){b=b.b.keys();b=ec(b,function(b){return b.sessionId});return Array.from(b)}p.bc=function(){var b=Infinity,c=this.b.keys();c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,isNaN(d.expiration)||(b=Math.min(b,d.expiration));return b};
88
- function Tc(b,c){for(var d=new Set,e=r(c),f=e.next();!f.done;f=e.next()){var g=r(f.value.drmInfos);for(f=g.next();!f.done;f=g.next())d.add(f.value)}e=r(d);for(f=e.next();!f.done;f=e.next())Sc(f.value,gc(b.f.servers),gc(b.f.advanced||{}));g=b.C?"required":"optional";var h=b.C?["persistent-license"]:["temporary"];e=new Map;d=r(d);for(f=d.next();!f.done;f=d.next())f=f.value,e.set(f.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:g,sessionTypes:h,
89
- label:f.keySystem,drmInfos:[]});d=r(c);for(f=d.next();!f.done;f=d.next()){f=f.value;g=f.audio;h=f.video;var k=g?ic(g.mimeType,g.codecs):"",l=h?ic(h.mimeType,h.codecs):"",m=r(f.drmInfos);for(f=m.next();!f.done;f=m.next()){f=f.value;var n=e.get(f.keySystem);n.drmInfos.push(f);f.distinctiveIdentifierRequired&&(n.distinctiveIdentifier="required");f.persistentStateRequired&&(n.persistentState="required");g&&n.audioCapabilities.push({robustness:f.audioRobustness||"",contentType:k});h&&n.videoCapabilities.push({robustness:f.videoRobustness||
60
+ NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,
61
+ NO_VIDEO_ELEMENT:7002,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,CAST_RECEIVER_APP_ID_MISSING:8007,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,
62
+ NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013};function H(){var b,c,d=new Promise(function(d,f){b=d;c=f});d.resolve=b;d.reject=c;return d}H.prototype.resolve=function(){};H.prototype.reject=function(){};function I(b,c){this.promise=b;this.Jd=c;this.a=!1}A("shaka.util.AbortableOperation",I);function Ab(b){return new I(Promise.reject(b),function(){return Promise.resolve()})}I.failed=Ab;function Bb(){var b=Promise.reject(new G(2,7,7001));b["catch"](function(){});return new I(b,function(){return Promise.resolve()})}I.aborted=Bb;function Cb(b){return new I(Promise.resolve(b),function(){return Promise.resolve()})}I.completed=Cb;
63
+ function Db(b){return new I(b,function(){return b["catch"](function(){})})}I.notAbortable=Db;I.prototype.abort=function(){this.a=!0;return this.Jd()};I.prototype.abort=I.prototype.abort;function Fb(b){return new I(Promise.all(b.map(function(b){return b.promise})),function(){return Promise.all(b.map(function(b){return b.abort()}))})}I.all=Fb;I.prototype["finally"]=function(b){this.promise.then(function(){return b(!0)},function(){return b(!1)});return this};I.prototype["finally"]=I.prototype["finally"];
64
+ I.prototype.U=function(b,c){function d(){f.reject(new G(2,7,7001));return e.abort()}var e=this,f=new H;this.promise.then(function(c){e.a?f.reject(new G(2,7,7001)):b?d=Gb(b,c,f):f.resolve(c)},function(b){c?d=Gb(c,b,f):f.reject(b)});return new I(f,function(){return d()})};I.prototype.chain=I.prototype.U;
65
+ function Gb(b,c,d){try{var e=b(c);if(e&&e.promise&&e.abort)return d.resolve(e.promise),function(){return e.abort()};d.resolve(e);return function(){return Promise.resolve(e).then(function(){})["catch"](function(){})}}catch(f){return d.reject(f),function(){return Promise.resolve()}}};function J(b,c){c=void 0===c?{}:c;for(var d in c)this[d]=c[d];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=b;this.isTrusted=!1;this.target=this.currentTarget=null;this.a=!1}J.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};J.prototype.stopImmediatePropagation=function(){this.a=!0};J.prototype.stopPropagation=function(){};function Hb(){this.a={}}p=Hb.prototype;p.push=function(b,c){this.a.hasOwnProperty(b)?this.a[b].push(c):this.a[b]=[c]};p.get=function(b){return(b=this.a[b])?b.slice():null};p.getAll=function(){var b=[],c;for(c in this.a)b.push.apply(b,this.a[c]);return b};p.remove=function(b,c){var d=this.a[b];if(d)for(var e=0;e<d.length;++e)d[e]==c&&(d.splice(e,1),--e)};p.forEach=function(b){for(var c in this.a)b(c,this.a[c])};function Ib(){this.Bc=new Hb;this.Vb=this}Ib.prototype.addEventListener=function(b,c){this.Bc.push(b,c)};Ib.prototype.removeEventListener=function(b,c){this.Bc.remove(b,c)};Ib.prototype.dispatchEvent=function(b){for(var c=this.Bc.get(b.type)||[],d=0;d<c.length;++d){b.target=this.Vb;b.currentTarget=this.Vb;var e=c[d];try{e.handleEvent?e.handleEvent(b):e.call(this,b)}catch(f){}if(b.a)break}return b.defaultPrevented};function Jb(b){function c(b){switch(typeof b){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return b;default:if(!b||b.buffer&&b.buffer.constructor==ArrayBuffer)return b;if(d.has(b))return null;var e=b.constructor==Array;if(b.constructor!=Object&&!e)return null;d.add(b);var g=e?[]:{},h;for(h in b)g[h]=c(b[h]);e&&(g.length=b.length);return g}}var d=new Set;return c(b)};function Kb(b,c){return"number"===typeof b&&"number"===typeof c&&isNaN(b)&&isNaN(c)?!0:b===c}function Lb(b,c){var d=b.indexOf(c);-1<d&&b.splice(d,1)}function Mb(b,c){var d=0;b.forEach(function(b){d+=c(b)?1:0});return d}
66
+ function Nb(b,c,d){d||(d=Kb);if(b.length!=c.length)return!1;c=c.slice();var e={};b=r(b);for(var f=b.next();!f.done;e={item:e.item},f=b.next()){e.item=f.value;f=c.findIndex(function(b){return function(c){return d(b.item,c)}}(e));if(-1==f)return!1;c[f]=c[c.length-1];c.pop()}return 0==c.length};function Ob(){this.a=[]}function Pb(b,c){b.a.push(c["finally"](function(){Lb(b.a,c)}))}Ob.prototype.destroy=function(){var b=[];this.a.forEach(function(c){c.promise["catch"](function(){});b.push(c.abort())});this.a=[];return Promise.all(b)};function K(b){Ib.call(this);this.f=!1;this.g=new Ob;this.a=new Set;this.b=new Set;this.c=b||null}Ua(K,Ib);A("shaka.net.NetworkingEngine",K);var Qb={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4};K.RequestType=Qb;K.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var Rb={};function Sb(b,c,d){d=d||3;var e=Rb[b];if(!e||d>=e.priority)Rb[b]={priority:d,zf:c}}K.registerScheme=Sb;K.unregisterScheme=function(b){delete Rb[b]};K.prototype.Bf=function(b){this.a.add(b)};
67
+ K.prototype.registerRequestFilter=K.prototype.Bf;K.prototype.cg=function(b){this.a["delete"](b)};K.prototype.unregisterRequestFilter=K.prototype.cg;K.prototype.we=function(){this.a.clear()};K.prototype.clearAllRequestFilters=K.prototype.we;K.prototype.Cf=function(b){this.b.add(b)};K.prototype.registerResponseFilter=K.prototype.Cf;K.prototype.dg=function(b){this.b["delete"](b)};K.prototype.unregisterResponseFilter=K.prototype.dg;K.prototype.xe=function(){this.b.clear()};
68
+ K.prototype.clearAllResponseFilters=K.prototype.xe;function Tb(b,c){return{uris:b,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null,sessionId:null}}K.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};K.prototype.destroy=K.prototype.destroy;
69
+ K.prototype.request=function(b,c){var d=this,e=new Ub;if(this.f){var f=Promise.reject(new G(2,7,7001));f["catch"](function(){});return new Vb(f,function(){return Promise.resolve()},e)}c.method=c.method||"GET";c.headers=c.headers||{};c.retryParameters=c.retryParameters?Jb(c.retryParameters):yb();c.uris=Jb(c.uris);f=Wb(this,b,c);var g=f.U(function(){return Xb(d,b,c,new xb(c.retryParameters,!1),0,null,e)}),h=g.U(function(c){return Yb(d,b,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},
70
+ function(){});var m=0;g.promise.then(function(){m=Date.now()},function(){});f=h.U(function(c){var e=Date.now()-m,f=c.response;f.timeMs+=l;f.timeMs+=e;c.Ze||!d.c||f.fromCache||1!=b||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=2);throw b;});f=new Vb(f.promise,f.Jd,e);Pb(this.g,f);return f};K.prototype.request=K.prototype.request;
71
+ function Wb(b,c,d){var e=Cb(void 0),f={};b=r(b.a);for(var g=b.next();!g.done;f={fd:f.fd},g=b.next())f.fd=g.value,e=e.U(function(b){return function(){return b.fd(c,d)}}(f));return e.U(void 0,function(b){if(b&&7001==b.code)throw b;throw new G(2,1,1006,b);})}
72
+ function Xb(b,c,d,e,f,g,h){var k=new cb(d.uris[f]),l=k.va,m=!1;l||(l=location.protocol,l=l.slice(0,-1),gb(k,l),d.uris[f]=k.toString());var n=(l=Rb[l])?l.zf:null;if(!n)return Ab(new G(2,1,1E3,k));var q;return Db(zb(e)).U(function(){if(b.f)return Bb();q=Date.now();return n(d.uris[f],d,c,function(d,e,f){b.c&&1==c&&(b.c(d,e),m=!0,h.a=f)})}).U(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-q);return{response:b,Ze:m}},function(k){if(k&&7001==k.code)throw k;if(b.f)return Bb();if(k&&1==k.severity)return b.dispatchEvent(new J("retry",
73
+ {error:k instanceof G?k:null})),f=(f+1)%d.uris.length,Xb(b,c,d,e,f,k,h);throw k||g;})}function Yb(b,c,d){var e=Cb(void 0);b=r(b.b);for(var f=b.next();!f.done;f=b.next())e=e.U(f.value.bind(null,c,d.response));return e.U(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof G&&(c=b.severity);throw new G(c,1,1007,b);})}function Ub(){this.a=0}K.NumBytesRemainingClass=Ub;function Vb(b,c,d){I.call(this,b,c);this.b=d}var Zb=Vb;Zb.prototype=oa(I.prototype);
74
+ Zb.prototype.constructor=Zb;if(ta)ta(Zb,I);else for(var $b in I)if("prototype"!=$b)if(Object.defineProperties){var ac=Object.getOwnPropertyDescriptor(I,$b);ac&&Object.defineProperty(Zb,$b,ac)}else Zb[$b]=I[$b];Zb.ag=I.prototype;K.PendingRequest=Vb;Vb.all=Fb;Vb.notAbortable=Db;Vb.completed=Cb;Vb.aborted=Bb;Vb.failed=Ab;function bc(){}A("shaka.util.IReleasable",bc);bc.prototype.release=function(){};function L(){this.a=new Hb}A("shaka.util.EventManager",L);L.prototype.release=function(){this.Ya();this.a=null};L.prototype.release=L.prototype.release;L.prototype.w=function(b,c,d,e){this.a&&(b=new cc(b,c,d,e),this.a.push(c,b))};L.prototype.listen=L.prototype.w;L.prototype.da=function(b,c,d,e){function f(e){g.ea(b,c,f);d(e)}var g=this;this.w(b,c,f,e)};L.prototype.listenOnce=L.prototype.da;
75
+ L.prototype.ea=function(b,c,d){if(this.a){var e=this.a.get(c)||[];e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.target!=b||d!=f.listener&&d||(f.ea(),this.a.remove(c,f))}};L.prototype.unlisten=L.prototype.ea;L.prototype.Ya=function(){if(this.a){var b=this.a.getAll();b=r(b);for(var c=b.next();!c.done;c=b.next())c.value.ea();this.a.a={}}};L.prototype.removeAll=L.prototype.Ya;
76
+ function cc(b,c,d,e){this.target=b;this.type=c;this.listener=d;this.a=dc(b,e);this.target.addEventListener(c,d,this.a)}cc.prototype.ea=function(){this.target.removeEventListener(this.type,this.listener,this.a);this.listener=this.target=null;this.a=!1};cc.prototype.unlisten=cc.prototype.ea;function dc(b,c){if(void 0==c)return!1;if("boolean"==typeof c)return c;var d=new Set(["passive","capture"]);Object.keys(c).filter(function(b){return!d.has(b)});return ec(b)?c:c.capture||!1}
77
+ function ec(b){var c=fc;if(void 0==c){c=!1;try{var d={},e={get:function(){c=!0;return!1}};Object.defineProperty(d,"passive",e);Object.defineProperty(d,"capture",e);e=function(){};b.addEventListener("test",e,d);b.removeEventListener("test",e,d)}catch(f){c=!1}fc=c}return c||!1}var fc=void 0;function gc(b){b=new Uint8Array(b);if((new DataView(b.buffer,b.byteOffset,b.byteLength)).getUint32(0,!0)+4!=b.byteLength)throw new RangeError("Malformed FairPlay init data");b=hc(b.subarray(4),!0);return(new cb(b)).ra}A("shaka.util.FairPlayUtils.defaultGetContentId",gc);
78
+ function ic(b,c,d){function e(b){(new DataView(g.buffer)).setUint32(h,b.byteLength,!0);h+=4;f(b)}function f(b){g.set(b,h);h+=b.byteLength}if(!d||!d.byteLength)throw new G(2,6,6015);c="string"==typeof c?new Uint8Array(jc(c,!0)):new Uint8Array(c);var g=new Uint8Array(8+b.byteLength+c.byteLength+d.byteLength),h=0;f(new Uint8Array(b));e(c);e(new Uint8Array(d));return g}A("shaka.util.FairPlayUtils.initDataTransform",ic);function kc(b,c){for(var d=[],e=r(b),f=e.next();!f.done;f=e.next())d.push(c(f.value));return d}function lc(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())if(!c(e.value))return!1;return!0};function mc(b){var c=new Map;Object.keys(b).forEach(function(d){c.set(d,b[d])});return c}function nc(b){var c={};b.forEach(function(b,e){c[e]=b});return c};function oc(b,c){var d=b;c&&(d+='; codecs="'+c+'"');return d}function pc(b){var c=[b.mimeType];qc.forEach(function(d,e){var f=b[e];f&&c.push(d+'="'+f+'"')});return c.join(";")}function rc(b){b=b.split(".");var c=b[0];b.pop();return[c,b.join(".")]}var qc=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function sc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function tc(b){return""!=wc().canPlayType(b)}function xc(b){return(navigator.userAgent||"").includes(b)}function wc(){if(yc)return yc;zc||(zc=new D(function(){yc=null}));(yc=document.querySelector("video")||document.querySelector("audio"))||(yc=document.createElement("video"));zc.O(1);return yc}var zc=null,yc=null;function Ac(b){if(!b)return"";b=new Uint8Array(b);239==b[0]&&187==b[1]&&191==b[2]&&(b=b.subarray(3));b=Bc(b);b=escape(b);try{return decodeURIComponent(b)}catch(c){throw new G(2,2,2004);}}A("shaka.util.StringUtils.fromUTF8",Ac);
79
+ function hc(b,c,d){if(!b)return"";if(!d&&0!=b.byteLength%2)throw new G(2,2,2004);if(b instanceof ArrayBuffer)var e=b;else d=new Uint8Array(b.byteLength),d.set(new Uint8Array(b)),e=d.buffer;b=Math.floor(b.byteLength/2);d=new Uint16Array(b);e=new DataView(e);for(var f=0;f<b;f++)d[f]=e.getUint16(2*f,c);return Bc(d)}A("shaka.util.StringUtils.fromUTF16",hc);
80
+ function Cc(b){var c=new Uint8Array(b);if(239==c[0]&&187==c[1]&&191==c[2])return Ac(c);if(254==c[0]&&255==c[1])return hc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return hc(c.subarray(2),!0);var d=function(b,c){return b.byteLength<=c||32<=b[c]&&126>=b[c]}.bind(null,c);if(0==c[0]&&0==c[2])return hc(b,!1);if(0==c[1]&&0==c[3])return hc(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return Ac(b);throw new G(2,2,2003);}A("shaka.util.StringUtils.fromBytesAutoDetect",Cc);
81
+ function Dc(b){b=encodeURIComponent(b);b=unescape(b);for(var c=new Uint8Array(b.length),d=0;d<b.length;++d)c[d]=b.charCodeAt(d);return c.buffer}A("shaka.util.StringUtils.toUTF8",Dc);function jc(b,c){for(var d=new Uint8Array(2*b.length),e=new DataView(d.buffer),f=0;f<b.length;++f)e.setUint16(2*f,b.charCodeAt(f),c);return d.buffer}A("shaka.util.StringUtils.toUTF16",jc);
82
+ function Bc(b){if(!Ec)for(var c=function(b){try{var c=new Uint8Array(b);Na(c);return!0}catch(g){return!1}},d={size:65536};0<d.size;d={size:d.size},d.size/=2)if(c(d.size)){Ec=function(b){return function(c){for(var d="",e=0;e<c.length;e+=b.size)d+=String.fromCharCode.apply(String,Na(c.subarray(e,e+b.size)));return d}}(d);break}return Ec(b)}var Ec=null;function Fc(b,c){var d=Bc(b);c=void 0==c?!0:c;d=window.btoa(d).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")}A("shaka.util.Uint8ArrayUtils.toBase64",Fc);function Gc(b){b=window.atob(b.replace(/-/g,"+").replace(/_/g,"/"));for(var c=new Uint8Array(b.length),d=0;d<b.length;++d)c[d]=b.charCodeAt(d);return c}A("shaka.util.Uint8ArrayUtils.fromBase64",Gc);function Hc(b){for(var c=new Uint8Array(b.length/2),d=0;d<b.length;d+=2)c[d/2]=window.parseInt(b.substr(d,2),16);return c}
83
+ A("shaka.util.Uint8ArrayUtils.fromHex",Hc);function Ic(b){for(var c="",d=0;d<b.length;++d){var e=b[d].toString(16);1==e.length&&(e="0"+e);c+=e}return c}A("shaka.util.Uint8ArrayUtils.toHex",Ic);function Jc(b,c){if(!b&&!c)return!0;if(!b||!c||b.length!=c.length)return!1;for(var d=0;d<b.length;++d)if(b[d]!=c[d])return!1;return!0}A("shaka.util.Uint8ArrayUtils.equal",Jc);
84
+ function Kc(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];for(var e=d=0;e<c.length;++e)d+=c[e].length;d=new Uint8Array(d);for(var f=e=0;f<c.length;++f)d.set(c[f],e),e+=c[f].length;return d}A("shaka.util.Uint8ArrayUtils.concat",Kc);function Lc(b){var c=this;this.C=b;this.v=new Set;this.m=this.h=null;this.P=!1;this.a=null;this.i=new L;this.b=new Map;this.s=[];this.l=new H;this.c=null;this.g=function(d){c.l.reject(d);b.onError(d)};this.na=new Map;this.T=new Map;this.M=new D(function(){return Mc(c)});this.f=!1;this.$=new H;this.D=!1;this.G=[];this.ma=!1;this.W=(new D(function(){Nc(c)})).La(1);this.l["catch"](function(){})}p=Lc.prototype;
85
+ p.destroy=function(){var b=this;return t(function d(){return z(d,function(d){switch(d.j){case 1:if(b.f)return u(d,b.$,0);b.f=!0;return u(d,Oc(b),4);case 4:b.$.resolve(),d.A(0)}})})};
86
+ function Oc(b){return t(function d(){var e;return z(d,function(d){switch(d.j){case 1:return b.i.release(),b.i=null,b.l.reject(),b.W.stop(),b.W=null,b.M.stop(),b.M=null,e=Array.from(b.b.keys()),b.b.clear(),u(d,Promise.all(e.map(function(b){return Promise.resolve().then(function(){return t(function k(){return z(k,function(d){switch(d.j){case 1:return y(d,2),u(d,Pc(b),4);case 4:za(d,0);break;case 2:Ca(d),v(d)}})})})})),2);case 2:if(!b.m){d.A(3);break}y(d,4);return u(d,b.m.setMediaKeys(null),6);case 6:za(d,
87
+ 5);break;case 4:Ca(d);case 5:b.m=null;case 3:b.a=null,b.v.clear(),b.h=null,b.s=[],b.c=null,b.g=null,b.C=null,v(d)}})})}p.configure=function(b){this.c=b};function Qc(b,c,d){b.s=[];b.D=d;return Rc(b,c)}function Sc(b,c,d){b.s=d;b.D=0<d.length;return Rc(b,c)}
88
+ function Tc(b,c,d,e,f,g){var h=new Map;h.set(c,{audioCapabilities:f,videoCapabilities:g,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:c,drmInfos:[{keySystem:c,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:e,initData:null,keyIds:null}]});return Uc(b,h)}
89
+ function Rc(b,c){var d=c.some(function(b){return 0<b.drmInfos.length});if(!d){var e=mc(b.c.servers);Vc(c,e)}var f=Wc(b);if(f){var g=r(c);for(e=g.next();!e.done;e=g.next())e.value.drmInfos=[f]}f=r(c);for(e=f.next();!e.done;e=f.next())for(e=r(e.value.drmInfos),g=e.next();!g.done;g=e.next())Xc(g.value,mc(b.c.servers),mc(b.c.advanced||{}));e=Yc(b,c);if(!e.size)return b.P=!0,Promise.resolve();e=Uc(b,e);return d?e:e["catch"](function(){})}
90
+ p.Cb=function(b){var c=this;if(!this.h)return this.i.da(b,"encrypted",function(){c.g(new G(2,6,6010))}),Promise.resolve();this.m=b;this.i.da(this.m,"play",function(){for(var b=0;b<c.G.length;b++)Zc(c,c.G[b]);c.ma=!0;c.G=[]});b=this.m.setMediaKeys(this.h);b=b["catch"](function(b){return Promise.reject(new G(2,6,6003,b.message))});var d=$c(this);return Promise.all([b,d]).then(function(){if(c.f)return Promise.reject();ad(c);c.a.initData.length||c.s.length||c.i.w(c.m,"encrypted",function(b){return bd(c,
91
+ b.initDataType,new Uint8Array(b.initData))})})["catch"](function(b){if(!c.f)return Promise.reject(b)})};function $c(b){return t(function d(){var e;return z(d,function(d){switch(d.j){case 1:if(!(b.h&&b.a&&b.a.serverCertificate&&b.a.serverCertificate.length)){d.A(0);break}y(d,3);return u(d,b.h.setServerCertificate(b.a.serverCertificate),5);case 5:za(d,0);break;case 3:return e=Ca(d),d["return"](Promise.reject(new G(2,6,6004,e.message)))}})})}
92
+ function cd(b,c){return t(function e(){var f,g,h;return z(e,function(e){switch(e.j){case 1:return u(e,dd(b,c),2);case 2:f=e.o;if(!f)return e["return"]();g=[];if(h=b.b.get(f))h.xa=new H,g.push(h.xa);g.push(f.remove());return u(e,Promise.all(g),0)}})})}function ad(b){var c=b.a?b.a.initData:[];c.forEach(function(c){return ed(b,c.initDataType,c.initData)});b.s.forEach(function(c){return dd(b,c)});c.length||b.s.length||b.l.resolve();return b.l}
93
+ function bd(b,c,d){var e=b.b.values();e=r(e);for(var f=e.next();!f.done;f=e.next())if(Jc(d,f.value.initData))return;ed(b,c,d)}p.keySystem=function(){return this.a?this.a.keySystem:""};function fd(b,c){return xc("Edge/")?!0:b.v.has(c)}function gd(b){b=b.b.keys();b=kc(b,function(b){return b.sessionId});return Array.from(b)}p.dc=function(){var b=Infinity,c=this.b.keys();c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,isNaN(d.expiration)||(b=Math.min(b,d.expiration));return b};
94
+ function Yc(b,c){for(var d=new Set,e=r(c),f=e.next();!f.done;f=e.next()){var g=r(f.value.drmInfos);for(f=g.next();!f.done;f=g.next())d.add(f.value)}e=r(d);for(f=e.next();!f.done;f=e.next())Xc(f.value,mc(b.c.servers),mc(b.c.advanced||{}));g=b.D?"required":"optional";var h=b.D?["persistent-license"]:["temporary"];e=new Map;d=r(d);for(f=d.next();!f.done;f=d.next())f=f.value,e.set(f.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:g,sessionTypes:h,
95
+ label:f.keySystem,drmInfos:[]});d=r(c);for(f=d.next();!f.done;f=d.next()){f=f.value;g=f.audio;h=f.video;var k=g?oc(g.mimeType,g.codecs):"",l=h?oc(h.mimeType,h.codecs):"",m=r(f.drmInfos);for(f=m.next();!f.done;f=m.next()){f=f.value;var n=e.get(f.keySystem);n.drmInfos.push(f);f.distinctiveIdentifierRequired&&(n.distinctiveIdentifier="required");f.persistentStateRequired&&(n.persistentState="required");g&&n.audioCapabilities.push({robustness:f.audioRobustness||"",contentType:k});h&&n.videoCapabilities.push({robustness:f.videoRobustness||
90
96
  "",contentType:l})}}return e}
91
- function Pc(b,c){if(1==c.size&&c.has(""))return Promise.reject(new D(2,6,6E3));for(var d=r(c.values()),e=d.next();!e.done;e=d.next())e=e.value,0==e.audioCapabilities.length&&delete e.audioCapabilities,0==e.videoCapabilities.length&&delete e.videoCapabilities;var f=d=new G;[!0,!1].forEach(function(b){var d=this;c.forEach(function(c,e){c.drmInfos.some(function(b){return!!b.licenseServerUri})==b&&(f=f["catch"](function(){if(!this.c)return navigator.requestMediaKeySystemAccess(e,[c])}.bind(d)))})}.bind(b));
92
- f=f["catch"](function(){return Promise.reject(new D(2,6,6001))});f=f.then(function(b){if(this.c)return Promise.reject();this.v.clear();var d=b.getConfiguration(),e=d.videoCapabilities||[],f=r(d.audioCapabilities||[]);for(d=f.next();!d.done;d=f.next())this.v.add(d.value.contentType);e=r(e);for(d=e.next();!d.done;d=e.next())this.v.add(d.value.contentType);e=b.keySystem;d=c.get(b.keySystem);f=[];var g=[],n=[],q=[];cd(d.drmInfos,f,g,n,q);this.a={keySystem:e,licenseServerUri:f[0],distinctiveIdentifierRequired:"required"==
93
- d.distinctiveIdentifier,persistentStateRequired:"required"==d.persistentState,audioRobustness:d.audioCapabilities?d.audioCapabilities[0].robustness:"",videoRobustness:d.videoCapabilities?d.videoCapabilities[0].robustness:"",serverCertificate:g[0],initData:n,keyIds:q};return this.a.licenseServerUri?b.createMediaKeys():Promise.reject(new D(2,6,6012,this.a.keySystem))}.bind(b)).then(function(b){if(this.c)return Promise.reject();this.h=b;this.N=!0}.bind(b))["catch"](function(b){if(!this.c)return this.a=
94
- null,this.v.clear(),b instanceof D?Promise.reject(b):Promise.reject(new D(2,6,6002,b.message))}.bind(b));d.reject();return f}
95
- function Rc(b){b=gc(b.f.clearKeys);if(0==b.size)return null;var c=[],d=[];b.forEach(function(b,e){var f=Cc(e),g=Cc(b);f={kty:"oct",kid:Ac(f,!1),k:Ac(g,!1)};c.push(f);d.push(f.kid)});b=JSON.stringify({keys:c});var e=JSON.stringify({kids:d});e=[{initData:new Uint8Array(yc(e)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(b),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
97
+ function Uc(b,c){if(1==c.size&&c.has(""))return Promise.reject(new G(2,6,6E3));for(var d=r(c.values()),e=d.next();!e.done;e=d.next())e=e.value,0==e.audioCapabilities.length&&delete e.audioCapabilities,0==e.videoCapabilities.length&&delete e.videoCapabilities;var f=d=new H;[!0,!1].forEach(function(b){var d=this;c.forEach(function(c,e){c.drmInfos.some(function(b){return!!b.licenseServerUri})==b&&(f=f["catch"](function(){if(!this.f)return navigator.requestMediaKeySystemAccess(e,[c])}.bind(d)))})}.bind(b));
98
+ f=f["catch"](function(){return Promise.reject(new G(2,6,6001))});f=f.then(function(b){if(this.f)return Promise.reject();this.v.clear();var d=b.getConfiguration(),e=d.videoCapabilities||[],f=r(d.audioCapabilities||[]);for(d=f.next();!d.done;d=f.next())this.v.add(d.value.contentType);e=r(e);for(d=e.next();!d.done;d=e.next())this.v.add(d.value.contentType);e=b.keySystem;d=c.get(b.keySystem);f=[];var g=[],n=[],q=[];hd(d.drmInfos,f,g,n,q);this.a={keySystem:e,licenseServerUri:f[0],distinctiveIdentifierRequired:"required"==
99
+ d.distinctiveIdentifier,persistentStateRequired:"required"==d.persistentState,audioRobustness:d.audioCapabilities?d.audioCapabilities[0].robustness:"",videoRobustness:d.videoCapabilities?d.videoCapabilities[0].robustness:"",serverCertificate:g[0],initData:n,keyIds:q};return this.a.licenseServerUri?b.createMediaKeys():Promise.reject(new G(2,6,6012,this.a.keySystem))}.bind(b)).then(function(b){if(this.f)return Promise.reject();this.h=b;this.P=!0}.bind(b))["catch"](function(b){if(!this.f)return this.a=
100
+ null,this.v.clear(),b instanceof G?Promise.reject(b):Promise.reject(new G(2,6,6002,b.message))}.bind(b));d.reject();return f}
101
+ function Wc(b){b=mc(b.c.clearKeys);if(0==b.size)return null;var c=[],d=[];b.forEach(function(b,e){var f=Hc(e),g=Hc(b);f={kty:"oct",kid:Fc(f,!1),k:Fc(g,!1)};c.push(f);d.push(f.kid)});b=JSON.stringify({keys:c});var e=JSON.stringify({kids:d});e=[{initData:new Uint8Array(Dc(e)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(b),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
96
102
  initData:e,keyIds:[]}}
97
- function Zc(b,c){try{var d=b.h.createSession("persistent-license")}catch(g){var e=new D(2,6,6005,g.message);b.g(e);return Promise.reject(e)}L(b.i,d,"message",b.Od.bind(b));L(b.i,d,"keystatuseschange",b.Md.bind(b));var f={initData:null,loaded:!1,Uc:Infinity,ua:null};b.b.set(d,f);return d.load(c).then(function(b){if(this.c)return Promise.reject();if(b)return f.loaded=!0,dd(this)&&this.j.resolve(),d;this.b["delete"](d);this.g(new D(2,6,6013))}.bind(b),function(b){this.c||(this.b["delete"](d),this.g(new D(2,
103
+ function dd(b,c){try{var d=b.h.createSession("persistent-license")}catch(g){var e=new G(2,6,6005,g.message);b.g(e);return Promise.reject(e)}b.i.w(d,"message",b.Rd.bind(b));b.i.w(d,"keystatuseschange",b.Pd.bind(b));var f={initData:null,loaded:!1,Yc:Infinity,xa:null};b.b.set(d,f);return d.load(c).then(function(b){if(this.f)return Promise.reject();if(b)return f.loaded=!0,id(this)&&this.l.resolve(),d;this.b["delete"](d);this.g(new G(2,6,6013))}.bind(b),function(b){this.f||(this.b["delete"](d),this.g(new G(2,
98
104
  6,6005,b.message)))}.bind(b))}
99
- function $c(b,c,d){try{var e=b.C?b.h.createSession("persistent-license"):b.h.createSession()}catch(f){b.g(new D(2,6,6005,f.message));return}L(b.i,e,"message",b.Od.bind(b));L(b.i,e,"keystatuseschange",b.Md.bind(b));b.b.set(e,{initData:d,loaded:!1,Uc:Infinity,ua:null});e.generateRequest(c,d.buffer)["catch"](function(c){if(!b.c){b.b["delete"](e);if(c.errorCode&&c.errorCode.systemCode){var d=c.errorCode.systemCode;0>d&&(d+=Math.pow(2,32));d="0x"+d.toString(16)}b.g(new D(2,6,6006,c.message,c,d))}})}
100
- p.Od=function(b){this.f.delayLicenseRequestUntilPlayed&&this.m.paused&&!this.ja?this.F.push(b):Uc(this,b)};
101
- function Uc(b,c){var d=c.target,e=b.b.get(d),f=b.a.licenseServerUri,g=b.f.advanced[b.a.keySystem];"individualization-request"==c.messageType&&g&&g.individualizationServer&&(f=g.individualizationServer);f=Sb([f],b.f.retryParameters);f.body=c.message;f.method="POST";f.licenseRequestType=c.messageType;"com.microsoft.playready"!=b.a.keySystem&&"com.chromecast.playready"!=b.a.keySystem||ed(f);b.a.keySystem.startsWith("com.apple.fps")&&fd(f);b.w.nb.request(2,f).promise.then(function(b){if(this.c)return Promise.reject();
102
- this.a.keySystem.startsWith("com.apple.fps")&&gd(b);return d.update(b.data).then(function(){var b=this;this.w.onEvent(new I("drmsessionupdate"));e&&(e.ua&&e.ua.resolve(),(new B(function(){e.loaded=!0;dd(b)&&b.j.resolve()})).O(hd))}.bind(this))}.bind(b),function(b){this.c||(b=new D(2,6,6007,b),this.g(b),e&&e.ua&&e.ua.reject(b))}.bind(b))["catch"](function(b){this.c||(b=new D(2,6,6008,b.message),this.g(b),e&&e.ua&&e.ua.reject(b))}.bind(b))}
103
- function ed(b){var c=uc(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){c=(new DOMParser).parseFromString(c,"application/xml");for(var d=c.getElementsByTagName("HttpHeader"),e=0;e<d.length;++e)b.headers[d[e].querySelector("name").textContent]=d[e].querySelector("value").textContent;b.body=Bc(c.querySelector("Challenge").textContent).buffer}else b.headers["Content-Type"]="text/xml; charset=utf-8"}
104
- function fd(b){var c=new Uint8Array(b.body);c="spc="+Ac(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=yc(c)}function gd(b){try{var c=sc(b.data)}catch(d){return}c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6));try{c=JSON.parse(c).ckc}catch(d){}b.data=Bc(c).buffer}
105
- p.Md=function(b){b=b.target;var c=this.b.get(b),d=!1;b.keyStatuses.forEach(function(b,e){if("string"==typeof e){var f=e;e=b;b=f}if("com.microsoft.playready"==this.a.keySystem&&16==e.byteLength&&!pc("Tizen")){f=new DataView(e);var g=f.getUint32(0,!0),l=f.getUint16(4,!0),m=f.getUint16(6,!0);f.setUint32(0,g,!1);f.setUint16(4,l,!1);f.setUint16(6,m,!1)}"com.microsoft.playready"==this.a.keySystem&&"status-pending"==b&&(b="usable");"status-pending"!=b&&(c.loaded=!0);"expired"==b&&(d=!0);f=Dc(new Uint8Array(e));
106
- this.ka.set(f,b)}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.ua&&(this.b["delete"](b),b.close()["catch"](function(){}));dd(this)&&(this.j.resolve(),this.K.O(id))};function Hc(b){var c=b.ka,d=b.S;d.clear();c.forEach(function(b,c){return d.set(c,b)});c=Array.from(d.values());c.length&&c.every(function(b){return"expired"==b})&&b.g(new D(2,6,6014));b.w.gc(hc(d))}
107
- function jd(){function b(b){return t(function h(){var c,f,m;return y(h,function(h){switch(h.l){case 1:return ya(h,2),u(h,navigator.requestMediaKeySystemAccess(b,d),4);case 4:return c=h.s,m=(f=c.getConfiguration().sessionTypes)?f.includes("persistent-license"):!1,pc("Tizen 3")&&(m=!1),e.set(b,{persistentState:m}),u(h,c.createMediaKeys(),5);case 5:Aa(h,0);break;case 2:Da(h),e.set(b,null),v(h)}})})}var c=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],d=[{videoCapabilities:c,
108
- persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:c}],e=new Map;c="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(" ").map(function(c){return b(c)});return Promise.all(c).then(function(){return hc(e)})}
109
- function kd(b,c){var d=c.audio,e=c.video;if(d&&d.encrypted&&!ad(b,ic(d.mimeType,d.codecs))||e&&e.encrypted&&!ad(b,ic(e.mimeType,e.codecs)))return!1;var f=b.keySystem();return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==f})}
110
- function ld(b,c){if(!b.length)return c;if(!c.length)return b;for(var d=[],e=0;e<b.length;e++)for(var f=0;f<c.length;f++)if(b[e].keySystem==c[f].keySystem){var g=b[e];f=c[f];var h=[];h=h.concat(g.initData||[]);h=h.concat(f.initData||[]);var k=[];k=k.concat(g.keyIds);k=k.concat(f.keyIds);d.push({keySystem:g.keySystem,licenseServerUri:g.licenseServerUri||f.licenseServerUri,distinctiveIdentifierRequired:g.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:g.persistentStateRequired||
111
- f.persistentStateRequired,videoRobustness:g.videoRobustness||f.videoRobustness,audioRobustness:g.audioRobustness||f.audioRobustness,serverCertificate:g.serverCertificate||f.serverCertificate,initData:h,keyIds:k});break}return d}function Ic(b){b.b.forEach(function(c,d){var e=c.Uc,f=d.expiration;isNaN(f)&&(f=Infinity);f!=e&&(b.w.onExpirationUpdated(d.sessionId,f),c.Uc=f)})}function dd(b){b=b.b.values();return fc(b,function(b){return b.loaded})}
112
- function Qc(b,c){var d=[];c.forEach(function(b,c){d.push({keySystem:c,licenseServerUri:b,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(var e=r(b),f=e.next();!f.done;f=e.next())f.value.drmInfos=d}
113
- function cd(b,c,d,e,f){b.forEach(function(b){c.includes(b.licenseServerUri)||c.push(b.licenseServerUri);b.serverCertificate&&(d.some(function(c){return Ec(c,b.serverCertificate)})||d.push(b.serverCertificate));b.initData&&b.initData.forEach(function(b){e.some(function(c){return c.keyId&&c.keyId==b.keyId?!0:c.initDataType==b.initDataType&&Ec(c.initData,b.initData)})||e.push(b)});if(b.keyIds)for(var g=0;g<b.keyIds.length;++g)f.includes(b.keyIds[g])||f.push(b.keyIds[g])})}
114
- function Sc(b,c,d){if(b.keySystem&&("org.w3.clearkey"!=b.keySystem||!b.licenseServerUri)){c.size&&(c=c.get(b.keySystem)||"",b.licenseServerUri=c);b.keyIds||(b.keyIds=[]);if(d=d.get(b.keySystem))b.distinctiveIdentifierRequired||(b.distinctiveIdentifierRequired=d.distinctiveIdentifierRequired),b.persistentStateRequired||(b.persistentStateRequired=d.persistentStateRequired),b.videoRobustness||(b.videoRobustness=d.videoRobustness),b.audioRobustness||(b.audioRobustness=d.audioRobustness),b.serverCertificate||
115
- (b.serverCertificate=d.serverCertificate);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==b.keySystem&&(b.keySystem="com.chromecast.playready")}}function Kc(b){return t(function d(){var e;return y(d,function(d){switch(d.l){case 1:return e=new Promise(function(b){(new B(b)).O(md)}),u(d,Promise.race([b.close().then(function(){return!0}),e.then(function(){return!1})]),2);case 2:v(d)}})})}var md=1,hd=5,id=.5;function nd(){this.a=new muxjs.mp4.CaptionParser;this.g=[];this.f={}}nd.prototype.init=function(b){var c=muxjs.mp4.probe;b=new Uint8Array(b);this.g=c.videoTrackIds(b);this.f=c.timescale(b);this.a.init()};nd.prototype.b=function(b,c){var d=new Uint8Array(b);(d=this.a.parse(d,this.g,this.f))&&d.captions&&c(d.captions);this.a.clearParsedCaptions()};nd.prototype.c=function(){this.a.resetCaptionStream()};function od(){}od.prototype.init=function(){};od.prototype.b=function(){};od.prototype.c=function(){};function pd(b){return!b||1==b.length&&1E-6>b.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function qd(b,c,d){d=void 0===d?0:d;return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)||c>b.end(b.length-1)?!1:c+d>=b.start(0)}function rd(b,c){if(!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0))return 0;for(var d=0,e=b.length-1;0<=e&&b.end(e)>c;--e)d+=b.end(e)-Math.max(b.start(e),c);return d}
116
- function sd(b){if(!b)return[];for(var c=[],d=0;d<b.length;d++)c.push({start:b.start(d),end:b.end(d)});return c};var td={ue:function(b,c){return b.reduce(function(b,c,f){return c["catch"](b.bind(null,f))}.bind(null,c),Promise.reject())},uc:function(b,c){return b.concat(c)},Gb:function(){},Da:function(b){return null!=b}};function ud(b,c){if(0==c.length)return b;var d=c.map(function(b){return new cb(b)});return b.map(function(b){return new cb(b)}).map(function(b){return d.map(b.resolve.bind(b))}).reduce(td.uc,[]).map(function(b){return b.toString()})}function vd(b,c){return{keySystem:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:c||[],keyIds:[]}}var wd={La:"video",wb:"audio",na:"text",kg:"application"},xd=1/15;function yd(){this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0});this.b=null;this.g=[];this.c=[];this.f=!1;this.a.on("data",this.i.bind(this));this.a.on("done",this.h.bind(this))}yd.prototype.destroy=function(){this.a.dispose();this.a=null;return Promise.resolve()};function zd(b,c){return window.muxjs&&"mp2t"==b.split(";")[0].split("/")[1]?c?MediaSource.isTypeSupported(Bd(c,b)):MediaSource.isTypeSupported(Bd("audio",b))||MediaSource.isTypeSupported(Bd("video",b)):!1}
117
- function Bd(b,c){var d=c.replace("mp2t","mp4");"audio"==b&&(d=d.replace("video","audio"));var e=/avc1\.(66|77|100)\.(\d+)/.exec(d);if(e){var f="avc1.",g=e[1],h=Number(e[2]);f=("66"==g?f+"4200":"77"==g?f+"4d00":f+"6400")+(h>>4).toString(16);f+=(h&15).toString(16);d=d.replace(e[0],f)}return d}function Cd(b,c){b.f=!0;b.b=new G;b.g=[];b.c=[];var d=new Uint8Array(c);b.a.push(d);b.a.flush();b.f&&b.b.reject(new D(2,3,3018));return b.b}
118
- yd.prototype.i=function(b){this.c=b.captions;var c=new Uint8Array(b.data.byteLength+b.initSegment.byteLength);c.set(b.initSegment,0);c.set(b.data,b.initSegment.byteLength);this.g.push(c)};yd.prototype.h=function(){var b={data:Fc.apply(null,this.g),captions:this.c};this.b.resolve(b);this.f=!1};function Dd(b,c,d){this.startTime=b;this.direction=Ed;this.endTime=c;this.payload=d;this.region=new Fd;this.position=null;this.positionAlign=Gd;this.size=100;this.textAlign=Hd;this.writingMode=Id;this.lineInterpretation=Jd;this.line=null;this.lineHeight="";this.lineAlign=Kd;this.displayAlign=Ld;this.backgroundColor=this.color="";this.backgroundImage=null;this.fontSize="";this.fontWeight=Md;this.fontStyle=Nd;this.fontFamily="";this.textDecoration=[];this.wrapLine=!0;this.id=""}z("shaka.text.Cue",Dd);
119
- var Gd="auto";Dd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Gd};var Hd="center",Od={LEFT:"left",RIGHT:"right",CENTER:Hd,START:"start",END:"end"};Dd.textAlign=Od;var Ld="after",Pd={BEFORE:"before",CENTER:"center",AFTER:Ld};Dd.displayAlign=Pd;var Ed="ltr";Dd.direction={HORIZONTAL_LEFT_TO_RIGHT:Ed,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Id="horizontal-tb";Dd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Id,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
120
- var Jd=0;Dd.lineInterpretation={LINE_NUMBER:Jd,PERCENTAGE:1};var Kd="start",Qd={CENTER:"center",START:Kd,END:"end"};Dd.lineAlign=Qd;var Md=400;Dd.fontWeight={NORMAL:Md,BOLD:700};var Nd="normal",Rd={NORMAL:Nd,ITALIC:"italic",OBLIQUE:"oblique"};Dd.fontStyle=Rd;Dd.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};
121
- function Fd(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Sd;this.scroll=Td}z("shaka.text.CueRegion",Fd);var Sd=1;Fd.units={PX:0,PERCENTAGE:Sd,LINES:2};var Td="";Fd.scrollMode={NONE:Td,UP:"up"};function Ud(b){this.g=null;this.c=b;this.f=this.m=0;this.h=Infinity;this.b=this.a=null;this.j="";this.i=new Map}var Vd={};z("shaka.text.TextEngine.registerParser",function(b,c){Vd[b]=c});z("shaka.text.TextEngine.unregisterParser",function(b){delete Vd[b]});function Wd(b){return Vd[b]||window.muxjs&&"application/cea-608"==b?!0:!1}Ud.prototype.destroy=function(){this.c=this.g=null;this.i.clear();return Promise.resolve()};function Xd(b,c){"application/cea-608"!=c&&(b.g=new Vd[c])}
122
- Ud.prototype.Hc=function(b){var c={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(b),c)[0].startTime}catch(d){throw new D(2,2,2009,d);}};
123
- function Yd(b,c,d,e){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==d||null==e)this.g.parseInit(new Uint8Array(c));else{var b={periodStart:this.m,segmentStart:d,segmentEnd:e};b=this.g.parseMedia(new Uint8Array(c),b).filter(function(b){return b.startTime>=this.f&&b.startTime<this.h}.bind(this));this.c.append(b);null==this.a&&(this.a=Math.max(d,this.f));this.b=Math.min(e,this.h)}}.bind(b))}
124
- Ud.prototype.remove=function(b,c){return Promise.resolve().then(function(){!this.c||!this.c.remove(b,c)||null==this.a||c<=this.a||b>=this.b||(b<=this.a&&c>=this.b?this.a=this.b=null:b<=this.a&&c<this.b?this.a=c:b>this.a&&c>=this.b&&(this.b=b))}.bind(this))};Ud.prototype.ne=function(b){this.c.append(b)};Ud.prototype.appendCues=Ud.prototype.ne;
125
- Ud.prototype.nc=function(b,c){this.j=b;var d=this.i.get(b);if(d)for(var e=r(d.keys()),f=e.next();!f.done;f=e.next())if(f=d.get(f.value))f=f.filter(function(b){return b.endTime<=c}),this.c.append(f)};Ud.prototype.setSelectedClosedCaptionId=Ud.prototype.nc;
126
- function Zd(b,c,d,e,f){var g=d+" "+e,h=new Map;c=r(c);for(var k=c.next();!k.done;k=c.next()){var l=k.value;k=l.stream;h.has(k)||h.set(k,new Map);h.get(k).has(g)||h.get(k).set(g,[]);l.startTime+=f;l.endTime+=f;l.startTime>=b.f&&l.startTime<b.h&&(l=new Dd(l.startTime,l.endTime,l.text),h.get(k).get(g).push(l),k==b.j&&b.c.append([l]))}f=r(h.keys());for(g=f.next();!g.done;g=f.next())for(g=g.value,b.i.has(g)||b.i.set(g,new Map),c=r(h.get(g).keys()),k=c.next();!k.done;k=c.next())k=k.value,l=h.get(g).get(k),
127
- b.i.get(g).set(k,l);b.a=null==b.a?Math.max(d,b.f):Math.min(b.a,Math.max(d,b.f));b.b=Math.max(b.b,Math.min(e,b.h))};function $d(b,c,d){this.f=b;this.h=d;this.b={};this.a=null;this.c={};this.i=new ac;this.v=!1;this.j={};this.m=c;b=this.o=new G;c=new MediaSource;dc(this.i,c,"sourceopen",b.resolve);this.f.src=ae(c);this.g=c}var ae=window.URL.createObjectURL;function be(b){var c=ic(b.mimeType,b.codecs),d=jc(b);return Wd(c)||MediaSource.isTypeSupported(d)||zd(c,b.type)}p=$d.prototype;
128
- p.destroy=function(){var b=this;this.v=!0;var c=[],d;for(d in this.c){var e=this.c[d],f=e[0];this.c[d]=e.slice(0,1);f&&c.push(f.p["catch"](td.Gb));for(f=1;f<e.length;++f)e[f].p["catch"](td.Gb),e[f].p.reject()}this.a&&c.push(this.a.destroy());this.h&&c.push(this.h.destroy());for(var g in this.j)c.push(this.j[g].destroy());return Promise.all(c).then(function(){b.i&&(b.i.a(),b.i=null);b.f&&(b.f.removeAttribute("src"),b.f.load(),b.f=null);b.g=null;b.a=null;b.h=null;b.b={};b.j={};b.m=null;b.c={}})};
129
- p.init=function(b,c){var d=this;return t(function f(){var g;return y(f,function(f){switch(f.l){case 1:return g=wd,u(f,d.o,2);case 2:b.forEach(function(b,f){var h=ic(b.mimeType,b.codecs);f==g.na?ce(d,h):(!c&&MediaSource.isTypeSupported(h)||!zd(h,f)||(d.j[f]=new yd,h=Bd(f,h)),h=d.g.addSourceBuffer(h),L(d.i,h,"error",d.Tf.bind(d,f)),L(d.i,h,"updateend",d.qb.bind(d,f)),d.b[f]=h,d.c[f]=[])}),v(f)}})})};function ce(b,c){b.a||(b.a=new Ud(b.h));Xd(b.a,c)}
130
- function de(b,c){if("text"==c)var d=b.a.a;else d=ee(b,c),d=!d||1==d.length&&1E-6>d.end(0)-d.start(0)?null:1==d.length&&0>d.start(0)?0:d.length?d.start(0):null;return d}function fe(b,c){return"text"==c?b.a.b:pd(ee(b,c))}function ge(b,c,d){if("text"==c)return b=b.a,null==b.b||b.b<d?0:b.b-Math.max(d,b.a);b=ee(b,c);return rd(b,d)}
131
- p.Ec=function(b){b.total=sd(this.f.buffered);b.audio=sd(ee(this,"audio"));b.video=sd(ee(this,"video"));b.text=[];if(this.a){var c=this.a.a,d=this.a.b;null!=c&&null!=d&&b.text.push({start:c,end:d})}};function ee(b,c){try{return b.b[c].buffered}catch(d){return null}}
132
- function he(b,c,d,e,f,g){if("text"==c)return Yd(b.a,d,e,f);if(b.j[c])return Cd(b.j[c],d).then(function(b){this.a||ce(this,"text/vtt");b.captions&&Zd(this.a,b.captions,e,f,this.b.video.timestampOffset);return ie(this,c,this.be.bind(this,c,b.data.buffer))}.bind(b));g&&window.muxjs&&(b.a||ce(b,"text/vtt"),null==e&&null==f?b.m.init(d):b.m.b(d,function(c){c.length&&Zd(b.a,c,e,f,b.b.video.timestampOffset)}));return ie(b,c,b.be.bind(b,c,d))}p.nc=function(b){var c=fe(this,"video")||0;this.a.nc(b,c)};
133
- p.remove=function(b,c,d){return"text"==b?this.a.remove(c,d):ie(this,b,this.ce.bind(this,b,c,d))};function je(b,c){if("text"==c){if(!b.a)return Promise.resolve();b.m.c();return b.a.remove(0,Infinity)}return ie(b,c,b.ce.bind(b,c,0,b.g.duration))}p.flush=function(b){return"text"==b?Promise.resolve():ie(this,b,this.ye.bind(this,b))};
134
- function ke(b,c,d,e,f){return"text"==c?(b.a.m=d,b=b.a,b.f=e,b.h=f,Promise.resolve()):Promise.all([ie(b,c,b.le.bind(b,c)),ie(b,c,b.Of.bind(b,c,d)),ie(b,c,b.Lf.bind(b,c,e,f))])}p.endOfStream=function(b){return le(this,function(){b?this.g.endOfStream(b):this.g.endOfStream()}.bind(this))};p.ta=function(b){return le(this,function(){this.g.duration=b}.bind(this))};p.Y=function(){return this.g.duration};p.be=function(b,c){this.b[b].appendBuffer(c)};
135
- p.ce=function(b,c,d){d<=c?this.qb(b):this.b[b].remove(c,d)};p.le=function(b){var c=this.b[b].appendWindowStart,d=this.b[b].appendWindowEnd;this.b[b].abort();this.b[b].appendWindowStart=c;this.b[b].appendWindowEnd=d;this.qb(b)};p.ye=function(b){this.f.currentTime-=.001;this.qb(b)};p.Of=function(b,c){0>c&&(c+=.001);this.b[b].timestampOffset=c;this.qb(b)};p.Lf=function(b,c,d){this.b[b].appendWindowStart=0;this.b[b].appendWindowEnd=d;this.b[b].appendWindowStart=c;this.qb(b)};
136
- p.Tf=function(b){this.c[b][0].p.reject(new D(2,3,3014,this.f.error?this.f.error.code:0))};p.qb=function(b){var c=this.c[b][0];c&&(c.p.resolve(),me(this,b))};function ie(b,c,d){if(b.v)return Promise.reject();d={start:d,p:new G};b.c[c].push(d);if(1==b.c[c].length)try{d.start()}catch(e){"QuotaExceededError"==e.name?d.p.reject(new D(2,3,3017,c)):d.p.reject(new D(2,3,3015,e)),me(b,c)}return d.p}
137
- function le(b,c){if(b.v)return Promise.reject();var d=[],e;for(e in b.b){var f=new G,g={start:function(b){b.resolve()}.bind(null,f),p:f};b.c[e].push(g);d.push(f);1==b.c[e].length&&g.start()}return Promise.all(d).then(function(){try{c()}catch(l){var b=Promise.reject(new D(2,3,3015,l))}for(var d in this.b)me(this,d);return b}.bind(b),function(){return Promise.reject()}.bind(b))}function me(b,c){b.c[c].shift();var d=b.c[c][0];if(d)try{d.start()}catch(e){d.p.reject(new D(2,3,3015,e)),me(b,c)}};function ne(b,c){b=M(b);c=M(c);return b.split("-")[0]==c.split("-")[0]}function oe(b,c){b=M(b);c=M(c);var d=b.split("-"),e=c.split("-");return d[0]==e[0]&&1==d.length&&2==e.length}function M(b){var c=b.split("-");b=c[0]||"";c=c[1]||"";b=b.toLowerCase();b=pe.get(b)||b;return(c=c.toUpperCase())?b+"-"+c:b}function qe(b){return b.language?M(b.language):b.audio&&b.audio.language?M(b.audio.language):b.video&&b.video.language?M(b.video.language):"und"}
138
- function re(b,c){for(var d=M(b),e=new Set,f=r(c),g=f.next();!g.done;g=f.next())e.add(M(g.value));f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,oe(g,d))return g;f=r(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=M(h);k=M(k);h=h.split("-");k=k.split("-");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=r(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,oe(d,f))return f;return null}
139
- var pe=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",
105
+ function ed(b,c,d){try{var e=b.D?b.h.createSession("persistent-license"):b.h.createSession()}catch(h){b.g(new G(2,6,6005,h.message));return}b.i.w(e,"message",b.Rd.bind(b));b.i.w(e,"keystatuseschange",b.Pd.bind(b));b.b.set(e,{initData:d,loaded:!1,Yc:Infinity,xa:null});try{if(b.c.initDataTransform)d=b.c.initDataTransform(d);else if(b.keySystem().startsWith("com.apple.fps")){var f=b.a.serverCertificate,g=gc(d);d=ic(d,g,f)}}catch(h){c=h;h instanceof G||(c=new G(2,6,6016,h));b.g(c);return}e.generateRequest(c,
106
+ d.buffer)["catch"](function(c){if(!b.f){b.b["delete"](e);if(c.errorCode&&c.errorCode.systemCode){var d=c.errorCode.systemCode;0>d&&(d+=Math.pow(2,32));d="0x"+d.toString(16)}b.g(new G(2,6,6006,c.message,c,d))}})}p.Rd=function(b){this.c.delayLicenseRequestUntilPlayed&&this.m.paused&&!this.ma?this.G.push(b):Zc(this,b)};
107
+ function Zc(b,c){var d=c.target,e=b.b.get(d),f=b.a.licenseServerUri,g=b.c.advanced[b.a.keySystem];"individualization-request"==c.messageType&&g&&g.individualizationServer&&(f=g.individualizationServer);f=Tb([f],b.c.retryParameters);f.body=c.message;f.method="POST";f.licenseRequestType=c.messageType;f.sessionId=d.sessionId;"com.microsoft.playready"!=b.a.keySystem&&"com.chromecast.playready"!=b.a.keySystem||jd(f);b.a.keySystem.startsWith("com.apple.fps")&&b.c.fairPlayTransform&&kd(f);b.C.rb.request(2,
108
+ f).promise.then(function(b){if(this.f)return Promise.reject();this.a.keySystem.startsWith("com.apple.fps")&&this.c.fairPlayTransform&&ld(b);return d.update(b.data).then(function(){var b=this;this.C.onEvent(new J("drmsessionupdate"));e&&(e.xa&&e.xa.resolve(),(new D(function(){e.loaded=!0;id(b)&&b.l.resolve()})).O(md))}.bind(this))}.bind(b),function(b){this.f||(b=new G(2,6,6007,b),this.g(b),e&&e.xa&&e.xa.reject(b))}.bind(b))["catch"](function(b){this.f||(b=new G(2,6,6008,b.message),this.g(b),e&&e.xa&&
109
+ e.xa.reject(b))}.bind(b))}function jd(b){var c=hc(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){c=(new DOMParser).parseFromString(c,"application/xml");for(var d=c.getElementsByTagName("HttpHeader"),e=0;e<d.length;++e)b.headers[d[e].querySelector("name").textContent]=d[e].querySelector("value").textContent;b.body=Gc(c.querySelector("Challenge").textContent).buffer}else b.headers["Content-Type"]="text/xml; charset=utf-8"}
110
+ function kd(b){var c=new Uint8Array(b.body);c="spc="+Fc(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=Dc(c)}function ld(b){try{var c=Ac(b.data)}catch(d){return}c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6));try{c=JSON.parse(c).ckc}catch(d){}b.data=Gc(c).buffer}
111
+ p.Pd=function(b){b=b.target;var c=this.b.get(b),d=!1;b.keyStatuses.forEach(function(b,e){if("string"==typeof e){var f=e;e=b;b=f}if("com.microsoft.playready"==this.a.keySystem&&16==e.byteLength&&!xc("Tizen")){f=new DataView(e);var g=f.getUint32(0,!0),l=f.getUint16(4,!0),m=f.getUint16(6,!0);f.setUint32(0,g,!1);f.setUint16(4,l,!1);f.setUint16(6,m,!1)}"com.microsoft.playready"==this.a.keySystem&&"status-pending"==b&&(b="usable");"status-pending"!=b&&(c.loaded=!0);"expired"==b&&(d=!0);f=Ic(new Uint8Array(e));
112
+ this.na.set(f,b)}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.xa&&(this.b["delete"](b),b.close()["catch"](function(){}));id(this)&&(this.l.resolve(),this.M.O(nd))};function Mc(b){var c=b.na,d=b.T;d.clear();c.forEach(function(b,c){return d.set(c,b)});c=Array.from(d.values());c.length&&c.every(function(b){return"expired"==b})&&b.g(new G(2,6,6014));b.C.kc(nc(d))}
113
+ function od(){function b(b){return t(function h(){var c,f,m;return z(h,function(h){switch(h.j){case 1:return y(h,2),u(h,navigator.requestMediaKeySystemAccess(b,d),4);case 4:return c=h.o,m=(f=c.getConfiguration().sessionTypes)?f.includes("persistent-license"):!1,xc("Tizen 3")&&(m=!1),e.set(b,{persistentState:m}),u(h,c.createMediaKeys(),5);case 5:za(h,0);break;case 2:Ca(h),e.set(b,null),v(h)}})})}var c=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],d=[{videoCapabilities:c,
114
+ persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:c}],e=new Map;c="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(" ").map(function(c){return b(c)});return Promise.all(c).then(function(){return nc(e)})}
115
+ function pd(b,c){var d=c.audio,e=c.video;if(d&&d.encrypted&&!fd(b,oc(d.mimeType,d.codecs))||e&&e.encrypted&&!fd(b,oc(e.mimeType,e.codecs)))return!1;var f=b.keySystem();return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==f})}
116
+ function qd(b,c){if(!b.length)return c;if(!c.length)return b;for(var d=[],e=0;e<b.length;e++)for(var f=0;f<c.length;f++)if(b[e].keySystem==c[f].keySystem){var g=b[e];f=c[f];var h=[];h=h.concat(g.initData||[]);h=h.concat(f.initData||[]);var k=[];k=k.concat(g.keyIds);k=k.concat(f.keyIds);d.push({keySystem:g.keySystem,licenseServerUri:g.licenseServerUri||f.licenseServerUri,distinctiveIdentifierRequired:g.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:g.persistentStateRequired||
117
+ f.persistentStateRequired,videoRobustness:g.videoRobustness||f.videoRobustness,audioRobustness:g.audioRobustness||f.audioRobustness,serverCertificate:g.serverCertificate||f.serverCertificate,initData:h,keyIds:k});break}return d}function Nc(b){b.b.forEach(function(c,d){var e=c.Yc,f=d.expiration;isNaN(f)&&(f=Infinity);f!=e&&(b.C.onExpirationUpdated(d.sessionId,f),c.Yc=f)})}function id(b){b=b.b.values();return lc(b,function(b){return b.loaded})}
118
+ function Vc(b,c){var d=[];c.forEach(function(b,c){d.push({keySystem:c,licenseServerUri:b,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(var e=r(b),f=e.next();!f.done;f=e.next())f.value.drmInfos=d}
119
+ function hd(b,c,d,e,f){b.forEach(function(b){c.includes(b.licenseServerUri)||c.push(b.licenseServerUri);b.serverCertificate&&(d.some(function(c){return Jc(c,b.serverCertificate)})||d.push(b.serverCertificate));b.initData&&b.initData.forEach(function(b){e.some(function(c){return c.keyId&&c.keyId==b.keyId?!0:c.initDataType==b.initDataType&&Jc(c.initData,b.initData)})||e.push(b)});if(b.keyIds)for(var g=0;g<b.keyIds.length;++g)f.includes(b.keyIds[g])||f.push(b.keyIds[g])})}
120
+ function Xc(b,c,d){if(b.keySystem&&("org.w3.clearkey"!=b.keySystem||!b.licenseServerUri)){c.size&&(c=c.get(b.keySystem)||"",b.licenseServerUri=c);b.keyIds||(b.keyIds=[]);if(d=d.get(b.keySystem))b.distinctiveIdentifierRequired||(b.distinctiveIdentifierRequired=d.distinctiveIdentifierRequired),b.persistentStateRequired||(b.persistentStateRequired=d.persistentStateRequired),b.videoRobustness||(b.videoRobustness=d.videoRobustness),b.audioRobustness||(b.audioRobustness=d.audioRobustness),b.serverCertificate||
121
+ (b.serverCertificate=d.serverCertificate);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==b.keySystem&&(b.keySystem="com.chromecast.playready")}}function Pc(b){return t(function d(){var e;return z(d,function(d){switch(d.j){case 1:return e=new Promise(function(b){(new D(b)).O(rd)}),u(d,Promise.race([b.close().then(function(){return!0}),e.then(function(){return!1})]),2);case 2:v(d)}})})}var rd=1,md=5,nd=.5;function sd(){this.a=new muxjs.mp4.CaptionParser;this.g=[];this.f={}}sd.prototype.init=function(b){var c=muxjs.mp4.probe;b=new Uint8Array(b);this.g=c.videoTrackIds(b);this.f=c.timescale(b);this.a.init()};sd.prototype.b=function(b,c){var d=new Uint8Array(b);(d=this.a.parse(d,this.g,this.f))&&d.captions&&c(d.captions);this.a.clearParsedCaptions()};sd.prototype.c=function(){this.a.resetCaptionStream()};function td(){}td.prototype.init=function(){};td.prototype.b=function(){};td.prototype.c=function(){};function ud(b){return!b||1==b.length&&1E-6>b.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function vd(b,c,d){d=void 0===d?0:d;return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)||c>b.end(b.length-1)?!1:c+d>=b.start(0)}function xd(b,c){if(!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0))return 0;for(var d=0,e=b.length-1;0<=e&&b.end(e)>c;--e)d+=b.end(e)-Math.max(b.start(e),c);return d}
122
+ function yd(b){if(!b)return[];for(var c=[],d=0;d<b.length;d++)c.push({start:b.start(d),end:b.end(d)});return c};var zd={ye:function(b,c){return b.reduce(function(b,c,f){return c["catch"](b.bind(null,f))}.bind(null,c),Promise.reject())},yc:function(b,c){return b.concat(c)},ic:function(){},Ga:function(b){return null!=b}};function Ad(b,c){if(0==c.length)return b;var d=c.map(function(b){return new cb(b)});return b.map(function(b){return new cb(b)}).map(function(b){return d.map(b.resolve.bind(b))}).reduce(zd.yc,[]).map(function(b){return b.toString()})}function Bd(b,c){return{keySystem:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:c||[],keyIds:[]}}var Cd={Na:"video",Ab:"audio",qa:"text",kg:"application"},Dd=1/15;function Ed(){this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0});this.b=null;this.g=[];this.c=[];this.f=!1;this.a.on("data",this.i.bind(this));this.a.on("done",this.h.bind(this))}Ed.prototype.destroy=function(){this.a.dispose();this.a=null;return Promise.resolve()};function Fd(b,c){return window.muxjs&&"mp2t"==b.toLowerCase().split(";")[0].split("/")[1]?c?MediaSource.isTypeSupported(Gd(c,b)):MediaSource.isTypeSupported(Gd("audio",b))||MediaSource.isTypeSupported(Gd("video",b)):!1}
123
+ function Gd(b,c){var d=c.replace(/mp2t/i,"mp4");"audio"==b&&(d=d.replace("video","audio"));var e=/avc1\.(66|77|100)\.(\d+)/.exec(d);if(e){var f="avc1.",g=e[1],h=Number(e[2]);f=("66"==g?f+"4200":"77"==g?f+"4d00":f+"6400")+(h>>4).toString(16);f+=(h&15).toString(16);d=d.replace(e[0],f)}return d}function Hd(b,c){b.f=!0;b.b=new H;b.g=[];b.c=[];var d=new Uint8Array(c);b.a.push(d);b.a.flush();b.f&&b.b.reject(new G(2,3,3018));return b.b}
124
+ Ed.prototype.i=function(b){this.c=b.captions;var c=new Uint8Array(b.data.byteLength+b.initSegment.byteLength);c.set(b.initSegment,0);c.set(b.data,b.initSegment.byteLength);this.g.push(c)};Ed.prototype.h=function(){var b={data:Kc.apply(null,this.g),captions:this.c};this.b.resolve(b);this.f=!1};function Id(b,c,d){this.startTime=b;this.direction=Jd;this.endTime=c;this.payload=d;this.region=new Kd;this.position=null;this.positionAlign=Ld;this.size=100;this.textAlign=Md;this.writingMode=Nd;this.lineInterpretation=Od;this.line=null;this.lineHeight="";this.lineAlign=Pd;this.displayAlign=Qd;this.fontSize=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Rd;this.fontStyle=Sd;this.fontFamily="";this.textDecoration=[];this.wrapLine=!0;this.id=""}A("shaka.text.Cue",Id);
125
+ var Ld="auto";Id.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Ld};var Md="center",Td={LEFT:"left",RIGHT:"right",CENTER:Md,START:"start",END:"end"};Id.textAlign=Td;var Qd="after",Ud={BEFORE:"before",CENTER:"center",AFTER:Qd};Id.displayAlign=Ud;var Jd="ltr";Id.direction={HORIZONTAL_LEFT_TO_RIGHT:Jd,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Nd="horizontal-tb";Id.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Nd,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
126
+ var Od=0;Id.lineInterpretation={LINE_NUMBER:Od,PERCENTAGE:1};var Pd="start",Vd={CENTER:"center",START:Pd,END:"end"};Id.lineAlign=Vd;var Rd=400;Id.fontWeight={NORMAL:Rd,BOLD:700};var Sd="normal",Wd={NORMAL:Sd,ITALIC:"italic",OBLIQUE:"oblique"};Id.fontStyle=Wd;Id.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};
127
+ function Kd(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Xd;this.scroll=Yd}A("shaka.text.CueRegion",Kd);var Xd=1;Kd.units={PX:0,PERCENTAGE:Xd,LINES:2};var Yd="";Kd.scrollMode={NONE:Yd,UP:"up"};function Zd(b){this.g=null;this.c=b;this.f=this.m=0;this.h=Infinity;this.b=this.a=null;this.l="";this.i=new Map}var $d={};A("shaka.text.TextEngine.registerParser",function(b,c){$d[b]=c});A("shaka.text.TextEngine.unregisterParser",function(b){delete $d[b]});function ae(b){return $d[b]||window.muxjs&&"application/cea-608"==b?!0:!1}Zd.prototype.destroy=function(){this.c=this.g=null;this.i.clear();return Promise.resolve()};function be(b,c){"application/cea-608"!=c&&(b.g=new $d[c])}
128
+ Zd.prototype.Mc=function(b){var c={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(b),c)[0].startTime}catch(d){throw new G(2,2,2009,d);}};
129
+ function ce(b,c,d,e){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==d||null==e)this.g.parseInit(new Uint8Array(c));else{var b={periodStart:this.m,segmentStart:d,segmentEnd:e};b=this.g.parseMedia(new Uint8Array(c),b).filter(function(b){return b.startTime>=this.f&&b.startTime<this.h}.bind(this));this.c.append(b);null==this.a&&(this.a=Math.max(d,this.f));this.b=Math.min(e,this.h)}}.bind(b))}
130
+ Zd.prototype.remove=function(b,c){return Promise.resolve().then(function(){!this.c||!this.c.remove(b,c)||null==this.a||c<=this.a||b>=this.b||(b<=this.a&&c>=this.b?this.a=this.b=null:b<=this.a&&c<this.b?this.a=c:b>this.a&&c>=this.b&&(this.b=b))}.bind(this))};Zd.prototype.qe=function(b){this.c.append(b)};Zd.prototype.appendCues=Zd.prototype.qe;
131
+ Zd.prototype.rc=function(b,c){this.l=b;var d=this.i.get(b);if(d)for(var e=r(d.keys()),f=e.next();!f.done;f=e.next())if(f=d.get(f.value))f=f.filter(function(b){return b.endTime<=c}),this.c.append(f)};Zd.prototype.setSelectedClosedCaptionId=Zd.prototype.rc;
132
+ function de(b,c,d,e,f){var g=d+" "+e,h=new Map;c=r(c);for(var k=c.next();!k.done;k=c.next()){var l=k.value;k=l.stream;h.has(k)||h.set(k,new Map);h.get(k).has(g)||h.get(k).set(g,[]);l.startTime+=f;l.endTime+=f;l.startTime>=b.f&&l.startTime<b.h&&(l=new Id(l.startTime,l.endTime,l.text),h.get(k).get(g).push(l),k==b.l&&b.c.append([l]))}f=r(h.keys());for(g=f.next();!g.done;g=f.next())for(g=g.value,b.i.has(g)||b.i.set(g,new Map),c=r(h.get(g).keys()),k=c.next();!k.done;k=c.next())k=k.value,l=h.get(g).get(k),
133
+ b.i.get(g).set(k,l);b.a=null==b.a?Math.max(d,b.f):Math.min(b.a,Math.max(d,b.f));b.b=Math.max(b.b,Math.min(e,b.h))};function ee(b,c,d){this.f=b;this.g=d;this.b={};this.a=null;this.c={};this.i=new L;this.v=!1;this.l={};this.m=c;b=this.s=new H;c=new MediaSource;this.i.da(c,"sourceopen",b.resolve);this.f.src=fe(c);this.h=c}var fe=window.URL.createObjectURL;function ge(b){var c=oc(b.mimeType,b.codecs),d=pc(b);return ae(c)||MediaSource.isTypeSupported(d)||Fd(c,b.type)}p=ee.prototype;
134
+ p.destroy=function(){var b=this;this.v=!0;var c=[],d;for(d in this.c){var e=this.c[d],f=e[0];this.c[d]=e.slice(0,1);f&&c.push(f.p["catch"](zd.ic));for(f=1;f<e.length;++f)e[f].p.reject()}this.a&&c.push(this.a.destroy());this.g&&c.push(this.g.destroy());for(var g in this.l)c.push(this.l[g].destroy());return Promise.all(c).then(function(){b.i&&(b.i.release(),b.i=null);b.f&&(b.f.removeAttribute("src"),b.f.load(),b.f=null);b.h=null;b.a=null;b.g=null;b.b={};b.l={};b.m=null;b.c={}})};
135
+ p.init=function(b,c){var d=this;return t(function f(){var g;return z(f,function(f){switch(f.j){case 1:return g=Cd,u(f,d.s,2);case 2:b.forEach(function(b,f){var h=oc(b.mimeType,b.codecs);f==g.qa?he(d,h):(!c&&MediaSource.isTypeSupported(h)||!Fd(h,f)||(d.l[f]=new Ed,h=Gd(f,h)),h=d.h.addSourceBuffer(h),d.i.w(h,"error",d.Tf.bind(d,f)),d.i.w(h,"updateend",d.ub.bind(d,f)),d.b[f]=h,d.c[f]=[])}),v(f)}})})};function he(b,c){b.a||(b.a=new Zd(b.g));be(b.a,c)}
136
+ function ie(b){return b.h?"ended"==b.h.readyState:!0}function je(b,c){if("text"==c)var d=b.a.a;else d=ke(b,c),d=!d||1==d.length&&1E-6>d.end(0)-d.start(0)?null:1==d.length&&0>d.start(0)?0:d.length?d.start(0):null;return d}function le(b,c){return"text"==c?b.a.b:ud(ke(b,c))}function me(b,c,d){if("text"==c)return b=b.a,null==b.b||b.b<d?0:b.b-Math.max(d,b.a);b=ke(b,c);return xd(b,d)}
137
+ p.Jc=function(b){b.total=yd(this.f.buffered);b.audio=yd(ke(this,"audio"));b.video=yd(ke(this,"video"));b.text=[];if(this.a){var c=this.a.a,d=this.a.b;null!=c&&null!=d&&b.text.push({start:c,end:d})}};function ke(b,c){try{return b.b[c].buffered}catch(d){return null}}
138
+ function ne(b,c,d,e,f,g){if("text"==c)return ce(b.a,d,e,f);if(b.l[c])return Hd(b.l[c],d).then(function(b){this.a||he(this,"text/vtt");b.captions&&de(this.a,b.captions,e,f,this.b.video.timestampOffset);return oe(this,c,this.ee.bind(this,c,b.data.buffer))}.bind(b));g&&window.muxjs&&(b.a||he(b,"text/vtt"),null==e&&null==f?b.m.init(d):b.m.b(d,function(c){c.length&&de(b.a,c,e,f,b.b.video.timestampOffset)}));return oe(b,c,b.ee.bind(b,c,d))}p.rc=function(b){var c=le(this,"video")||0;this.a.rc(b,c)};
139
+ p.remove=function(b,c,d){return"text"==b?this.a.remove(c,d):oe(this,b,this.fe.bind(this,b,c,d))};function pe(b,c){if("text"==c){if(!b.a)return Promise.resolve();b.m.c();return b.a.remove(0,Infinity)}return oe(b,c,b.fe.bind(b,c,0,b.h.duration))}p.flush=function(b){return"text"==b?Promise.resolve():oe(this,b,this.Ce.bind(this,b))};
140
+ function qe(b,c,d,e,f){return"text"==c?(b.a.m=d,b=b.a,b.f=e,b.h=f,Promise.resolve()):Promise.all([oe(b,c,b.oe.bind(b,c)),oe(b,c,b.Sf.bind(b,c,d)),oe(b,c,b.Pf.bind(b,c,e,f))])}p.endOfStream=function(b){return re(this,function(){ie(this)||(b?this.h.endOfStream(b):this.h.endOfStream())}.bind(this))};p.wa=function(b){return re(this,function(){this.h.duration=b}.bind(this))};p.Y=function(){return this.h.duration};p.ee=function(b,c){this.b[b].appendBuffer(c)};
141
+ p.fe=function(b,c,d){d<=c?this.ub(b):this.b[b].remove(c,d)};p.oe=function(b){var c=this.b[b].appendWindowStart,d=this.b[b].appendWindowEnd;this.b[b].abort();this.b[b].appendWindowStart=c;this.b[b].appendWindowEnd=d;this.ub(b)};p.Ce=function(b){this.f.currentTime-=.001;this.ub(b)};p.Sf=function(b,c){0>c&&(c+=.001);this.b[b].timestampOffset=c;this.ub(b)};p.Pf=function(b,c,d){this.b[b].appendWindowStart=0;this.b[b].appendWindowEnd=d;this.b[b].appendWindowStart=c;this.ub(b)};
142
+ p.Tf=function(b){this.c[b][0].p.reject(new G(2,3,3014,this.f.error?this.f.error.code:0))};p.ub=function(b){var c=this.c[b][0];c&&(c.p.resolve(),se(this,b))};function oe(b,c,d){if(b.v)return Promise.reject();d={start:d,p:new H};b.c[c].push(d);if(1==b.c[c].length)try{d.start()}catch(e){"QuotaExceededError"==e.name?d.p.reject(new G(2,3,3017,c)):d.p.reject(new G(2,3,3015,e)),se(b,c)}return d.p}
143
+ function re(b,c){if(b.v)return Promise.reject();var d=[],e;for(e in b.b){var f=new H,g={start:function(b){b.resolve()}.bind(null,f),p:f};b.c[e].push(g);d.push(f);1==b.c[e].length&&g.start()}return Promise.all(d).then(function(){try{c()}catch(l){var b=Promise.reject(new G(2,3,3015,l))}for(var d in this.b)se(this,d);return b}.bind(b),function(b){throw b;}.bind(b))}function se(b,c){b.c[c].shift();var d=b.c[c][0];if(d)try{d.start()}catch(e){d.p.reject(new G(2,3,3015,e)),se(b,c)}};function te(b,c){b=M(b);c=M(c);return b.split("-")[0]==c.split("-")[0]}function ue(b,c){b=M(b);c=M(c);var d=b.split("-"),e=c.split("-");return d[0]==e[0]&&1==d.length&&2==e.length}function M(b){var c=b.split("-");b=c[0]||"";c=c[1]||"";b=b.toLowerCase();b=ve.get(b)||b;return(c=c.toUpperCase())?b+"-"+c:b}function we(b){return b.language?M(b.language):b.audio&&b.audio.language?M(b.audio.language):b.video&&b.video.language?M(b.video.language):"und"}
144
+ function xe(b,c){for(var d=M(b),e=new Set,f=r(c),g=f.next();!g.done;g=f.next())e.add(M(g.value));f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,ue(g,d))return g;f=r(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=M(h);k=M(k);h=h.split("-");k=k.split("-");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=r(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,ue(d,f))return f;return null}
145
+ var ve=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",
140
146
  "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",
141
147
  "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",
142
148
  "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",
143
149
  "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",
144
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function se(b,c,d){function e(b,c,d){return b>=c&&b<=d}var f=b.video;return f&&f.width&&f.height&&!(e(f.width,c.minWidth,Math.min(c.maxWidth,d.width))&&e(f.height,c.minHeight,Math.min(c.maxHeight,d.height))&&e(f.width*f.height,c.minPixels,c.maxPixels))||!e(b.bandwidth,c.minBandwidth,c.maxBandwidth)?!1:!0}function te(b,c,d){var e=!1;b.forEach(function(b){var f=b.allowedByApplication;b.allowedByApplication=se(b,c,d);f!=b.allowedByApplication&&(e=!0)});return e}
145
- function ue(b,c,d,e){e.variants=e.variants.filter(function(e){if(b&&b.N&&!kd(b,e))return!1;var f=e.audio;e=e.video;return f&&!be(f)||e&&!be(e)||f&&c&&!ve(f,c)||e&&d&&!ve(e,d)?!1:!0});e.textStreams=e.textStreams.filter(function(b){return Wd(ic(b.mimeType,b.codecs))})}function ve(b,c){return b.mimeType!=c.mimeType||b.codecs.split(".")[0]!=c.codecs.split(".")[0]?!1:!0}
146
- function we(b){var c=b.audio,d=b.video,e=c?c.codecs:null,f=d?d.codecs:null,g=[];f&&g.push(f);e&&g.push(e);var h=[];d&&h.push(d.mimeType);c&&h.push(c.mimeType);h=h[0]||null;var k=[];c&&k.push(c.kind);d&&k.push(d.kind);k=k[0]||null;var l=new Set;c&&c.roles.forEach(function(b){return l.add(b)});d&&d.roles.forEach(function(b){return l.add(b)});b={id:b.id,active:!1,type:"variant",bandwidth:b.bandwidth,language:b.language,label:null,kind:k,width:null,height:null,frameRate:null,mimeType:h,codecs:g.join(", "),
150
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function ye(b,c,d){function e(b,c,d){return b>=c&&b<=d}var f=b.video;return f&&f.width&&f.height&&!(e(f.width,c.minWidth,Math.min(c.maxWidth,d.width))&&e(f.height,c.minHeight,Math.min(c.maxHeight,d.height))&&e(f.width*f.height,c.minPixels,c.maxPixels))||!e(b.bandwidth,c.minBandwidth,c.maxBandwidth)?!1:!0}function ze(b,c,d){var e=!1;b.forEach(function(b){var f=b.allowedByApplication;b.allowedByApplication=ye(b,c,d);f!=b.allowedByApplication&&(e=!0)});return e}
151
+ function Ae(b,c,d,e){e.variants=e.variants.filter(function(e){if(b&&b.P&&!pd(b,e))return!1;var f=e.audio;e=e.video;return f&&!ge(f)||e&&!ge(e)||f&&c&&!Be(f,c)||e&&d&&!Be(e,d)?!1:!0});e.textStreams=e.textStreams.filter(function(b){return ae(oc(b.mimeType,b.codecs))})}function Be(b,c){return b.mimeType!=c.mimeType||b.codecs.split(".")[0]!=c.codecs.split(".")[0]?!1:!0}
152
+ function Ce(b){var c=b.audio,d=b.video,e=c?c.codecs:null,f=d?d.codecs:null,g=[];f&&g.push(f);e&&g.push(e);var h=[];d&&h.push(d.mimeType);c&&h.push(c.mimeType);h=h[0]||null;var k=[];c&&k.push(c.kind);d&&k.push(d.kind);k=k[0]||null;var l=new Set;c&&c.roles.forEach(function(b){return l.add(b)});d&&d.roles.forEach(function(b){return l.add(b)});b={id:b.id,active:!1,type:"variant",bandwidth:b.bandwidth,language:b.language,label:null,kind:k,width:null,height:null,frameRate:null,mimeType:h,codecs:g.join(", "),
147
153
  audioCodec:e,videoCodec:f,primary:b.primary,roles:Array.from(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null};d&&(b.videoId=d.id,b.originalVideoId=d.originalId,b.width=d.width||null,b.height=d.height||null,b.frameRate=d.frameRate||null,b.videoBandwidth=d.bandwidth||null);c&&(b.audioId=c.id,b.originalAudioId=c.originalId,b.channelsCount=c.channelsCount,b.audioBandwidth=c.bandwidth||
148
- null,b.label=c.label,b.audioRoles=c.roles);return b}function xe(b){return{id:b.id,active:!1,type:"text",bandwidth:0,language:b.language,label:b.label,kind:b.kind||null,width:null,height:null,frameRate:null,mimeType:b.mimeType,codecs:b.codecs||null,audioCodec:null,videoCodec:null,primary:b.primary,roles:b.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:b.originalId}}
149
- function ye(b){b.__shaka_id||(b.__shaka_id=ze++);return b.__shaka_id}var ze=0;function Ae(b){return{id:ye(b),active:!1,type:"",bandwidth:0,language:M(b.language),label:b.label,kind:b.kind,width:null,height:null,frameRate:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}
150
- function Be(b){return b.allowedByApplication&&b.allowedByKeySystem}function Ce(b){return b.filter(function(b){return Be(b)})}
151
- function De(b,c){var d=b.filter(function(b){return b.audio&&b.audio.channelsCount}),e=new Map;d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f.audio.channelsCount;e.has(g)||e.set(g,[]);e.get(g).push(f)}d=Array.from(e.keys());if(0==d.length)return b;f=d.filter(function(b){return b<=c});return f.length?e.get(Math.max.apply(null,f)):e.get(Math.min.apply(null,d))}
152
- function Ee(b,c,d){var e=b,f=b.filter(function(b){return b.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(b){return b.language==g});if(c){var h=re(M(c),b.map(function(b){return b.language}));h&&(e=b.filter(function(b){return M(b.language)==h}))}if(d){if(b=Fe(e,d),b.length)return b}else if(b=e.filter(function(b){return 0==b.roles.length}),b.length)return b;b=e.map(function(b){return b.roles}).reduce(td.uc,[]);return b.length?Fe(e,b[0]):e}
153
- function Fe(b,c){return b.filter(function(b){return b.roles.includes(c)})}function Ge(b,c,d){for(var e=0;e<d.length;e++)if(d[e].audio==b&&d[e].video==c)return d[e];return null}function He(b){var c=[];b.audio&&c.push(b.audio);b.video&&c.push(b.video);return c};function N(){this.h=null;this.f=!1;this.b=new Ya;this.c=[];this.i=!1;this.a=this.g=null}z("shaka.abr.SimpleAbrManager",N);N.prototype.stop=function(){this.h=null;this.f=!1;this.c=[];this.g=null};N.prototype.stop=N.prototype.stop;N.prototype.init=function(b){this.h=b};N.prototype.init=N.prototype.init;
154
- N.prototype.chooseVariant=function(){var b=Ie(this.a.restrictions,this.c),c=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!b.length&&(b=Ie(null,this.c),b=[b[0]]);for(var d=b[0]||null,e=0;e<b.length;++e){var f=b[e],g=(b[e+1]||{bandwidth:Infinity}).bandwidth/this.a.bandwidthUpgradeTarget;c>=f.bandwidth/this.a.bandwidthDowngradeTarget&&c<=g&&(d=f)}this.g=Date.now();return d};N.prototype.chooseVariant=N.prototype.chooseVariant;N.prototype.enable=function(){this.f=!0};
154
+ null,b.label=c.label,b.audioRoles=c.roles);return b}function De(b){return{id:b.id,active:!1,type:"text",bandwidth:0,language:b.language,label:b.label,kind:b.kind||null,width:null,height:null,frameRate:null,mimeType:b.mimeType,codecs:b.codecs||null,audioCodec:null,videoCodec:null,primary:b.primary,roles:b.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:b.originalId}}
155
+ function Ee(b){b.__shaka_id||(b.__shaka_id=Fe++);return b.__shaka_id}var Fe=0;function Ge(b){return{id:Ee(b),active:!1,type:"",bandwidth:0,language:M(b.language),label:b.label,kind:b.kind,width:null,height:null,frameRate:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}
156
+ function He(b){return b.allowedByApplication&&b.allowedByKeySystem}function Ie(b){return b.filter(function(b){return He(b)})}
157
+ function Je(b,c){var d=b.filter(function(b){return b.audio&&b.audio.channelsCount}),e=new Map;d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f.audio.channelsCount;e.has(g)||e.set(g,[]);e.get(g).push(f)}d=Array.from(e.keys());if(0==d.length)return b;f=d.filter(function(b){return b<=c});return f.length?e.get(Math.max.apply(null,f)):e.get(Math.min.apply(null,d))}
158
+ function Ke(b,c,d){var e=b,f=b.filter(function(b){return b.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(b){return b.language==g});if(c){var h=xe(M(c),b.map(function(b){return b.language}));h&&(e=b.filter(function(b){return M(b.language)==h}))}if(d){if(b=Le(e,d),b.length)return b}else if(b=e.filter(function(b){return 0==b.roles.length}),b.length)return b;b=e.map(function(b){return b.roles}).reduce(zd.yc,[]);return b.length?Le(e,b[0]):e}
159
+ function Le(b,c){return b.filter(function(b){return b.roles.includes(c)})}function Me(b,c,d){for(var e=0;e<d.length;e++)if(d[e].audio==b&&d[e].video==c)return d[e];return null}function Ne(b){var c=[];b.audio&&c.push(b.audio);b.video&&c.push(b.video);return c};function N(){this.h=null;this.f=!1;this.b=new Ya;this.c=[];this.i=!1;this.a=this.g=null}A("shaka.abr.SimpleAbrManager",N);N.prototype.stop=function(){this.h=null;this.f=!1;this.c=[];this.g=null};N.prototype.stop=N.prototype.stop;N.prototype.init=function(b){this.h=b};N.prototype.init=N.prototype.init;
160
+ N.prototype.chooseVariant=function(){var b=Oe(this.a.restrictions,this.c),c=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!b.length&&(b=Oe(null,this.c),b=[b[0]]);for(var d=b[0]||null,e=0;e<b.length;++e){var f=b[e],g=(b[e+1]||{bandwidth:Infinity}).bandwidth/this.a.bandwidthUpgradeTarget;c>=f.bandwidth/this.a.bandwidthDowngradeTarget&&c<=g&&(d=f)}this.g=Date.now();return d};N.prototype.chooseVariant=N.prototype.chooseVariant;N.prototype.enable=function(){this.f=!0};
155
161
  N.prototype.enable=N.prototype.enable;N.prototype.disable=function(){this.f=!1};N.prototype.disable=N.prototype.disable;N.prototype.segmentDownloaded=function(b,c){var d=this.b;if(!(16E3>c)){var e=8E3*c/b,f=b/1E3;d.a+=c;Wa(d.b,f,e);Wa(d.c,f,e)}if(null!=this.g&&this.f)a:{if(!this.i){if(!(128E3<=this.b.a))break a;this.i=!0}else if(Date.now()-this.g<1E3*this.a.switchInterval)break a;d=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.h(d)}};
156
162
  N.prototype.segmentDownloaded=N.prototype.segmentDownloaded;N.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};N.prototype.getBandwidthEstimate=N.prototype.getBandwidthEstimate;N.prototype.setVariants=function(b){this.c=b};N.prototype.setVariants=N.prototype.setVariants;N.prototype.configure=function(b){this.a=b};N.prototype.configure=N.prototype.configure;
157
- function Ie(b,c){b&&(c=c.filter(function(c){return se(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};function Je(b,c){this.a=b;this.b=c}Je.prototype.toString=function(){return"v"+this.a+"."+this.b};function Ke(b,c){var d=new Je(2,6),e=Le,f=e.a,g=d.b-f.b;(0<(d.a-f.a||g)?e.c:e.b)(e.a,d,b,c)}function Me(b,c,d,e){$a([d,"has been deprecated and will be removed in",c,". We are currently at version",b,". Additional information:",e].join(" "))}function Ne(b,c,d,e){Za([d,"has been deprecated and has been removed in",c,". We are now at version",b,". Additional information:",e].join(""))}var Le=null;var Oe="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Pe="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Qe=["loop","playbackRate"],Re=["pause","play"],Se="abrstatuschanged adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged".split(" "),Te={getAssetUri:2,
158
- getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},Ue={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Ve=[["getConfiguration","configure"]],We=[["isTextTrackVisible","setTextTrackVisibility"]],
159
- Xe="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),Ye=["attach","detach","load","unload"];
160
- function Ze(b){return JSON.stringify(b,function(b,d){if("function"!=typeof d){if(d instanceof Event||d instanceof I){var c={},f;for(f in d){var g=d[f];g&&"object"==typeof g?"detail"==f&&(c[f]=g):f in Event||(c[f]=g)}return c}if(d instanceof TimeRanges)for(c={__type__:"TimeRanges",length:d.length,start:[],end:[]},f=0;f<d.length;++f)c.start.push(d.start(f)),c.end.push(d.end(f));else c=d instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(d)}:"number"==typeof d?isNaN(d)?"NaN":isFinite(d)?
161
- d:0>d?"-Infinity":"Infinity":d;return c}})}function $e(b){return JSON.parse(b,function(b,d){return"NaN"==d?NaN:"-Infinity"==d?-Infinity:"Infinity"==d?Infinity:d&&"object"==typeof d&&"TimeRanges"==d.__type__?af(d):d&&"object"==typeof d&&"Uint8Array"==d.__type__?new Uint8Array(d.entries):d})}function af(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}};function bf(b,c,d,e,f,g){this.N=b;this.f=new B(c);this.S=d;this.j=!1;this.F=e;this.K=f;this.w=g;this.b=this.h=!1;this.C="";this.i=null;this.m=this.Kd.bind(this);this.o=this.ff.bind(this);this.a={video:{},player:{}};this.v=0;this.c={};this.g=null}var cf=!1,df=null;p=bf.prototype;p.destroy=function(){ef(this);df&&ff(this);this.f&&(this.f.stop(),this.f=null);this.K=this.F=null;this.b=this.h=!1;this.o=this.m=this.g=this.c=this.a=this.i=null;return Promise.resolve()};p.da=function(){return this.b};
162
- p.Yc=function(){return this.C};p.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.h=!0;this.f.oc();var b=new chrome.cast.SessionRequest(this.N);b=new chrome.cast.ApiConfig(b,this.Ld.bind(this),this.kf.bind(this),"origin_scoped");chrome.cast.initialize(b,function(){},function(){});cf&&this.f.O(.02);(b=df)&&b.status!=chrome.cast.SessionStatus.STOPPED?this.Ld(b):df=null}else window.__onGCastApiAvailable=function(b){b&&this.init()}.bind(this)};
163
- p.dd=function(b){this.i=b;this.b&&gf({type:"appData",appData:this.i})};p.cast=function(b){if(!this.h)return Promise.reject(new D(1,8,8E3));if(!cf)return Promise.reject(new D(1,8,8001));if(this.b)return Promise.reject(new D(1,8,8002));this.g=new G;chrome.cast.requestSession(this.Wc.bind(this,b),this.Jd.bind(this));return this.g};p.Zb=function(){this.b&&(ef(this),df&&(ff(this),df.stop(function(){},function(){}),df=null))};
164
- p.get=function(b,c){if("video"==b){if(Re.includes(c))return this.Vd.bind(this,b,c)}else if("player"==b){if(Ue[c]&&!this.get("player","isLive")())return function(){};if(Xe.includes(c))return this.Vd.bind(this,b,c);if(Ye.includes(c))return this.Af.bind(this,b,c);if(Te[c])return this.Sd.bind(this,b,c)}return this.Sd(b,c)};p.set=function(b,c,d){this.a[b][c]=d;gf({type:"set",targetName:b,property:c,value:d})};
165
- p.Wc=function(b,c){df=c;c.addUpdateListener(this.m);c.addMessageListener("urn:x-cast:com.google.shaka.v2",this.o);this.Kd();gf({type:"init",initState:b,appData:this.i});this.g.resolve()};p.Jd=function(b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}this.g.reject(new D(2,8,c,b))};p.Sd=function(b,c){return this.a[b][c]};
166
- p.Vd=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];gf({type:"call",targetName:b,methodName:c,args:e})};p.Af=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];f=new G;var g=this.v.toString();this.v++;this.c[g]=f;gf({type:"asyncCall",targetName:b,methodName:c,args:e,id:g});return f};p.Ld=function(b){var c=this.w();this.g=new G;this.j=!0;this.Wc(c,b)};p.kf=function(b){cf="available"==b;this.f.oc()};
167
- function ff(b){var c=df;c.removeUpdateListener(b.m);c.removeMessageListener("urn:x-cast:com.google.shaka.v2",b.o)}p.Kd=function(){var b=df?"connected"==df.status:!1;if(this.b&&!b){this.K();for(var c in this.a)this.a[c]={};ef(this)}this.C=(this.b=b)?df.receiver.friendlyName:"";this.f.oc()};function ef(b){for(var c in b.c){var d=b.c[c];delete b.c[c];d.reject(new D(1,7,7E3))}}
168
- p.ff=function(b,c){var d=$e(c);switch(d.type){case "event":var e=d.event;this.F(d.targetName,new I(e.type,e));break;case "update":e=d.update;for(var f in e){d=this.a[f]||{};for(var g in e[f])d[g]=e[f][g]}this.j&&(this.S(),this.j=!1);break;case "asyncComplete":if(f=d.id,d=d.error,g=this.c[f],delete this.c[f],g)if(d){f=new D(d.severity,d.category,d.code);for(e in d)f[e]=d[e];g.reject(f)}else g.resolve()}};function gf(b){b=Ze(b);df.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},ab)};function O(b,c,d){J.call(this);this.c=b;this.b=c;this.i=this.g=this.f=this.j=this.h=null;this.a=new bf(d,this.Pf.bind(this),this.Qf.bind(this),this.Rf.bind(this),this.Sf.bind(this),this.xd.bind(this));hf(this)}Ta(O,J);z("shaka.cast.CastProxy",O);O.prototype.destroy=function(b){b&&this.a&&this.a.Zb();this.i&&(this.i.a(),this.i=null);b=[];this.b&&(b.push(this.b.destroy()),this.b=null);this.a&&(b.push(this.a.destroy()),this.a=null);this.j=this.h=this.c=null;return Promise.all(b)};
169
- O.prototype.destroy=O.prototype.destroy;O.prototype.Ue=function(){return this.h};O.prototype.getVideo=O.prototype.Ue;O.prototype.Ne=function(){return this.j};O.prototype.getPlayer=O.prototype.Ne;O.prototype.pe=function(){return this.a?this.a.h&&cf:!1};O.prototype.canCast=O.prototype.pe;O.prototype.da=function(){return this.a?this.a.da():!1};O.prototype.isCasting=O.prototype.da;O.prototype.Yc=function(){return this.a?this.a.Yc():""};O.prototype.receiverName=O.prototype.Yc;
170
- O.prototype.cast=function(){var b=this.xd();return this.a.cast(b).then(function(){if(this.b)return this.b.md()}.bind(this))};O.prototype.cast=O.prototype.cast;O.prototype.dd=function(b){this.a.dd(b)};O.prototype.setAppData=O.prototype.dd;O.prototype.$f=function(){var b=this.a;if(b.b){var c=b.w();chrome.cast.requestSession(b.Wc.bind(b,c),b.Jd.bind(b))}};O.prototype.suggestDisconnect=O.prototype.$f;O.prototype.Zb=function(){this.a.Zb()};O.prototype.forceDisconnect=O.prototype.Zb;
171
- function hf(b){b.a.init();b.i=new ac;Oe.forEach(function(b){L(this.i,this.c,b,this.ig.bind(this))}.bind(b));Se.forEach(function(b){L(this.i,this.b,b,this.uf.bind(this))}.bind(b));b.h={};for(var c in b.c)Object.defineProperty(b.h,c,{configurable:!1,enumerable:!0,get:b.hg.bind(b,c),set:b.jg.bind(b,c)});b.j={};for(var d in b.b)Object.defineProperty(b.j,d,{configurable:!1,enumerable:!0,get:b.Rd.bind(b,d)});b.f=new J;b.f.Sb=b.h;b.g=new J;b.g.Sb=b.j}p=O.prototype;
172
- p.xd=function(){var b={video:{},player:{},playerAfterLoad:{},manifest:this.b.$b(),startTime:null};this.c.pause();Qe.forEach(function(c){b.video[c]=this.c[c]}.bind(this));this.c.ended||(b.startTime=this.c.currentTime);Ve.forEach(function(c){var d=c[1];c=this.b[c[0]]();b.player[d]=c}.bind(this));We.forEach(function(c){var d=c[1];c=this.b[c[0]]();b.playerAfterLoad[d]=c}.bind(this));return b};p.Pf=function(){this.dispatchEvent(new I("caststatuschanged"))};
173
- p.Qf=function(){this.f.dispatchEvent(new I(this.h.paused?"pause":"play"))};
174
- p.Sf=function(){var b=this;Ve.forEach(function(b){var c=b[1];b=this.a.get("player",b[0])();this.b[c](b)}.bind(this));var c=this.a.get("player","getAssetUri")(),d=this.a.get("video","ended"),e=Promise.resolve(),f=this.c.autoplay,g=null;d||(g=this.a.get("video","currentTime"));c&&(this.c.autoplay=!1,e=this.b.load(c,g));var h={};Qe.forEach(function(b){h[b]=this.a.get("video",b)}.bind(this));e.then(function(){b.c&&(Qe.forEach(function(b){this.c[b]=h[b]}.bind(b)),We.forEach(function(b){var c=b[1];b=this.a.get("player",
175
- b[0])();this.b[c](b)}.bind(b)),b.c.autoplay=f,c&&b.c.play())},function(c){b.b.dispatchEvent(new I("error",{detail:c}))})};p.hg=function(b){if("addEventListener"==b)return this.f.addEventListener.bind(this.f);if("removeEventListener"==b)return this.f.removeEventListener.bind(this.f);if(this.a.da()&&0==Object.keys(this.a.a.video).length){var c=this.c[b];if("function"!=typeof c)return c}return this.a.da()?this.a.get("video",b):(b=this.c[b],"function"==typeof b&&(b=b.bind(this.c)),b)};
176
- p.jg=function(b,c){this.a.da()?this.a.set("video",b,c):this.c[b]=c};p.ig=function(b){this.a.da()||this.f.dispatchEvent(new I(b.type,b))};
177
- p.Rd=function(b){if("addEventListener"==b)return this.g.addEventListener.bind(this.g);if("removeEventListener"==b)return this.g.removeEventListener.bind(this.g);if("getMediaElement"==b)return function(){return this.h}.bind(this);if("getSharedConfiguration"==b)return this.a.get("player","getConfiguration");if("getNetworkingEngine"==b)return this.b.Bb.bind(this.b);if(this.a.da()){if("getManifest"==b||"drmInfo"==b)return function(){$a(b+"() does not work while casting!");return null};if("getManifestUri"==
178
- b)return Ke("getManifestUri",'Please use "getAssetUri" instead.'),this.Rd("getAssetUri");if("attach"==b||"detach"==b)return function(){$a(b+"() does not work while casting!");return Promise.resolve()}}return this.a.da()&&0==Object.keys(this.a.a.video).length&&Te[b]||!this.a.da()?this.b[b].bind(this.b):this.a.get("player",b)};p.uf=function(b){this.a.da()||this.g.dispatchEvent(b)};p.Rf=function(b,c){this.a.da()&&("video"==b?this.f.dispatchEvent(c):"player"==b&&this.g.dispatchEvent(c))};function jf(b,c,d,e){var f=this;J.call(this);this.a=b;this.b=c;this.c=new ac;this.w={video:b,player:c};this.C=d||function(){};this.F=e||function(b){return b};this.o=!1;this.h=!0;this.g=0;this.m=!1;this.j=!0;this.i=this.f=null;this.v=new B(function(){kf(f)});lf(this)}Ta(jf,J);z("shaka.cast.CastReceiver",jf);jf.prototype.isConnected=function(){return this.o};jf.prototype.isConnected=jf.prototype.isConnected;jf.prototype.Ye=function(){return this.h};jf.prototype.isIdle=jf.prototype.Ye;
179
- jf.prototype.destroy=function(){var b=this;return t(function d(){var e,f;return y(d,function(d){switch(d.l){case 1:return b.c&&(b.c.a(),b.c=null),e=[],b.b&&(e.push(b.b.destroy()),b.b=null),b.v&&(b.v.stop(),b.v=null),b.a=null,b.w=null,b.C=null,b.o=!1,b.h=!0,b.f=null,b.i=null,u(d,Promise.all(e),2);case 2:f=cast.receiver.CastReceiverManager.getInstance(),f.stop(),v(d)}})})};jf.prototype.destroy=jf.prototype.destroy;
180
- function lf(b){var c=cast.receiver.CastReceiverManager.getInstance();c.onSenderConnected=b.Nd.bind(b);c.onSenderDisconnected=b.Nd.bind(b);c.onSystemVolumeChanged=b.xe.bind(b);b.i=c.getCastMessageBus("urn:x-cast:com.google.cast.media");b.i.onMessage=b.af.bind(b);b.f=c.getCastMessageBus("urn:x-cast:com.google.shaka.v2");b.f.onMessage=b.mf.bind(b);c.start();Oe.forEach(function(b){L(this.c,this.a,b,this.Td.bind(this,"video"))}.bind(b));Se.forEach(function(b){L(this.c,this.b,b,this.Td.bind(this,"player"))}.bind(b));
181
- cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?b.b.ed(3840,2160):b.b.ed(1920,1080);L(b.c,b.a,"loadeddata",function(){this.m=!0}.bind(b));L(b.c,b.b,"loading",function(){this.h=!1;mf(this)}.bind(b));L(b.c,b.a,"playing",function(){this.h=!1;mf(this)}.bind(b));L(b.c,b.a,"pause",function(){mf(this)}.bind(b));L(b.c,b.b,"unloading",function(){this.h=!0;mf(this)}.bind(b));L(b.c,b.a,"ended",function(){var b=this;(new B(function(){b.a&&b.a.ended&&
182
- (b.h=!0,mf(b))})).O(5)}.bind(b))}p=jf.prototype;p.Nd=function(){this.g=0;this.j=!0;this.o=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;mf(this)};function mf(b){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new I("caststatuschanged")),nf(this)||of(this,0))}.bind(b))}
183
- function pf(b,c,d){for(var e in c.player)b.b[e](c.player[e]);b.C(d);d=Promise.resolve();var f=b.a.autoplay;c.manifest&&(b.a.autoplay=!1,d=b.b.load(c.manifest,c.startTime));d.then(function(){if(b.b){for(var d in c.video)b.a[d]=c.video[d];for(var e in c.playerAfterLoad)b.b[e](c.playerAfterLoad[e]);b.a.autoplay=f;c.manifest&&(b.a.play(),of(b,0))}},function(c){b.b.dispatchEvent(new I("error",{detail:c}))})}p.Td=function(b,c){this.b&&(kf(this),qf(this,{type:"event",targetName:b,event:c},this.f))};
184
- function kf(b){b.v.O(.5);var c={video:{},player:{}};Pe.forEach(function(b){c.video[b]=this.a[b]}.bind(b));if(b.b.U())for(var d in Ue)0==b.g%Ue[d]&&(c.player[d]=b.b[d]());for(var e in Te)0==b.g%Te[e]&&(c.player[e]=b.b[e]());if(d=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())c.video.volume=d.level,c.video.muted=d.muted;b.m&&(b.g+=1);qf(b,{type:"update",update:c},b.f);nf(b)}function nf(b){return b.j&&(b.a.duration||b.b.U())?(rf(b),b.j=!1,!0):!1}
185
- function rf(b){var c={contentId:b.b.$b(),streamType:b.b.U()?"LIVE":"BUFFERED",duration:b.a.duration,contentType:""};of(b,0,c)}p.xe=function(){var b=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();b&&qf(this,{type:"update",update:{video:{volume:b.level,muted:b.muted}}},this.f);qf(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.f)};
186
- p.mf=function(b){var c=$e(b.data);switch(c.type){case "init":this.g=0;this.m=!1;this.j=!0;pf(this,c.initState,c.appData);kf(this);break;case "appData":this.C(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}}this.w[d][e]=c;break;case "call":d=this.w[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=
187
- c.targetName;e=c.methodName;"player"==d&&"load"==e&&(this.g=0,this.m=!1);f=c.id;b=b.senderId;var g=this.w[d];c=g[e].apply(g,c.args);"player"==d&&"load"==e&&(c=c.then(function(){this.j=!0}.bind(this)));c.then(this.Zd.bind(this,b,f,null),this.Zd.bind(this,b,f))}};
188
- p.af=function(b){var c=$e(b.data);switch(c.type){case "PLAY":this.a.play();of(this,0);break;case "PAUSE":this.a.pause();of(this,0);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(this.a.currentTime=Number(b));d&&"PLAYBACK_START"==d?(this.a.play(),of(this,0)):d&&"PLAYBACK_PAUSE"==d&&(this.a.pause(),of(this,0));break;case "STOP":this.b.md().then(function(){this.b&&of(this,0)}.bind(this));break;case "GET_STATUS":of(this,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=
189
- d.muted;var e=this.a.volume,f=this.a.muted;null!=b&&(this.a.volume=Number(b));null!=d&&(this.a.muted=d);e==this.a.volume&&f==this.a.muted||of(this,0);break;case "LOAD":this.g=0;this.j=this.m=!1;b=c.currentTime;d=this.F(c.media.contentId);this.a.autoplay=!0;this.b.load(d,b).then(function(){this.b&&rf(this)}.bind(this))["catch"](function(b){var d="LOAD_FAILED";7==b.category&&7E3==b.code&&(d="LOAD_CANCELLED");qf(this,{requestId:Number(c.requestId),type:d},this.i)}.bind(this));break;default:qf(this,{requestId:Number(c.requestId),
190
- type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.i)}};p.Zd=function(b,c,d){this.b&&qf(this,{type:"asyncComplete",id:c,error:d},this.f,b)};function qf(b,c,d,e){b.o&&(b=Ze(c),e?d.getCastChannel(e).send(b):d.broadcast(b))}
191
- function of(b,c,d){var e=b.a.playbackRate;var f=sf;f=b.h?f.IDLE:b.b.Jc()?f.ge:b.a.paused?f.ie:f.je;e={mediaSessionId:0,playbackRate:e,playerState:f,currentTime:b.a.currentTime,supportedMediaCommands:15,volume:{level:b.a.volume,muted:b.a.muted}};d&&(e.media=d);qf(b,{requestId:c,type:"MEDIA_STATUS",status:[e]},b.i)}var sf={IDLE:"IDLE",je:"PLAYING",ge:"BUFFERING",ie:"PAUSED"};var P={Yb:function(b,c){var d=P.P(b,c);return 1!=d.length?null:d[0]},ud:function(b,c,d){b=P.vd(b,c,d);return 1!=b.length?null:b[0]},P:function(b,c){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.tagName==c})},vd:function(b,c,d){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.localName==d&&b.namespaceURI==c})},getAttributeNS:function(b,c,d){return b.hasAttributeNS(c,d)?b.getAttributeNS(c,d):null},ac:function(b){return Array.prototype.every.call(b.childNodes,
192
- function(b){return b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE})?b.textContent.trim():null},H:function(b,c,d,e){e=void 0===e?null:e;var f=null;b=b.getAttribute(c);null!=b&&(f=d(b));return null==f?e:f},rf:function(b){if(!b)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(b)&&(b+="Z");b=Date.parse(b);return isNaN(b)?null:Math.floor(b/1E3)},za:function(b){if(!b)return null;b=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(b);
193
- if(!b)return null;b=31536E3*Number(b[1]||null)+2592E3*Number(b[2]||null)+86400*Number(b[3]||null)+3600*Number(b[4]||null)+60*Number(b[5]||null)+Number(b[6]||null);return isFinite(b)?b:null},kc:function(b){var c=/([0-9]+)-([0-9]+)/.exec(b);if(!c)return null;b=Number(c[1]);if(!isFinite(b))return null;c=Number(c[2]);return isFinite(c)?{start:b,end:c}:null},parseInt:function(b){b=Number(b);return 0===b%1?b:null},jc:function(b){b=Number(b);return 0===b%1&&0<b?b:null},rb:function(b){b=Number(b);return 0===
194
- b%1&&0<=b?b:null},parseFloat:function(b){b=Number(b);return isNaN(b)?null:b},we:function(b){var c;b=(c=b.match(/^(\d+)\/(\d+)$/))?Number(c[1])/Number(c[2]):Number(b);return isNaN(b)?null:b},Qd:function(b,c){var d=new DOMParser;try{var e=d.parseFromString(b,"text/xml")}catch(g){}if(e&&e.documentElement.tagName==c)var f=e.documentElement;return f&&0<f.getElementsByTagName("parsererror").length?null:f},Pd:function(b,c){try{var d=sc(b);return P.Qd(d,c)}catch(e){}}};var tf=(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:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime");
195
- function uf(b,c,d){var e=vf(b),f=null;b=[];var g=[],h=new Set(e.map(function(b){return b.keyId}));h["delete"](null);if(1<h.size)throw new D(2,4,4010);d||(g=e.filter(function(b){return"urn:mpeg:dash:mp4protection:2011"==b.Yd?(f=b.init||f,!1):!0}),g.length&&(b=wf(f,c,g),0==b.length&&(b=[vd("",f)])));if(e.length&&(d||!g.length))for(b=[],c=r(tf.values()),d=c.next();!d.done;d=c.next())d=d.value,"org.w3.clearkey"!=d&&b.push(vd(d,f));if(h=Array.from(h)[0]||null)for(c=r(b),d=c.next();!d.done;d=c.next())for(d=
196
- r(d.value.initData),e=d.next();!e.done;e=d.next())e.value.keyId=h;return{rd:h,pg:f,drmInfos:b,wd:!0}}function xf(b,c,d,e){var f=uf(b,c,e);if(d.wd){b=1==d.drmInfos.length&&!d.drmInfos[0].keySystem;c=0==f.drmInfos.length;if(0==d.drmInfos.length||b&&!c)d.drmInfos=f.drmInfos;d.wd=!1}else if(0<f.drmInfos.length&&(d.drmInfos=d.drmInfos.filter(function(b){return f.drmInfos.some(function(c){return c.keySystem==b.keySystem})}),0==d.drmInfos.length))throw new D(2,4,4008);return f.rd||d.rd}
197
- function yf(b){var c=0,d=(new DataView(b)).getUint32(c,!0);if(d!==b.byteLength)return[];c+=6;d=[];for(var e=new DataView(b);c<b.byteLength-1;){var f=e.getUint16(c,!0);c+=2;var g=e.getUint16(c,!0);c+=2;var h=new Uint8Array(b,c,g);d.push({type:f,value:h});c+=g}return d}function zf(b){return(b=b.querySelector("DATA > LA_URL"))?b.textContent:""}
198
- function wf(b,c,d){var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=tf.get(f.Yd);if(g){var h=vd(g,f.init||b);if(g=Af.get(g))h.licenseServerUri=g(f);e.push(h)}else for(f=c(f.node)||[],f=r(f),h=f.next();!h.done;h=f.next())e.push(h.value)}return e}
199
- var Af=(new Map).set("com.widevine.alpha",function(b){return(b=P.ud(b.node,"urn:microsoft","laurl"))?b.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",function(b){b=P.ud(b.node,"urn:microsoft:playready","pro");if(!b)return"";b=Bc(b.textContent);b=yf(b.buffer).filter(function(b){return 1===b.type})[0];if(!b)return"";b=uc(b.value,!0);return(b=P.Qd(b,"WRMHEADER"))?zf(b):""});function vf(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())(d=Bf(d.value))&&c.push(d);return c}
200
- function Bf(b){var c=b.getAttribute("schemeIdUri"),d=P.getAttributeNS(b,"urn:mpeg:cenc:2013","default_KID"),e=P.vd(b,"urn:mpeg:cenc:2013","pssh").map(P.ac);if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),d.includes(" ")))throw new D(2,4,4009);var f=[];try{f=e.map(function(b){return{initDataType:"cenc",initData:Bc(b),keyId:null}})}catch(g){throw new D(2,4,4007);}return{node:b,Yd:c,keyId:d,init:0<f.length?f:null}};function Cf(b,c,d,e,f){var g={RepresentationID:c,Number:d,Bandwidth:e,Time:f};return b.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(b,c,d,e){if("$$"==b)return"$";var f=g[c];if(null==f)return b;"RepresentationID"==c&&d&&(d=void 0);"Time"==c&&(f=Math.round(f));switch(e){case void 0:case "d":case "i":case "u":b=f.toString();break;case "o":b=f.toString(8);break;case "x":b=f.toString(16);break;case "X":b=f.toString(16).toUpperCase();break;default:b=f.toString()}d=
163
+ function Oe(b,c){b&&(c=c.filter(function(c){return ye(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};function Pe(b,c){this.a=b;this.b=c}Pe.prototype.toString=function(){return"v"+this.a+"."+this.b};function Qe(b,c){var d=new Pe(2,6),e=Re,f=e.a,g=d.b-f.b;(0<(d.a-f.a||g)?e.c:e.b)(e.a,d,b,c)}function Se(b,c,d,e){$a([d,"has been deprecated and will be removed in",c,". We are currently at version",b,". Additional information:",e].join(" "))}function Te(b,c,d,e){Za([d,"has been deprecated and has been removed in",c,". We are now at version",b,". Additional information:",e].join(""))}var Re=null;var Ue="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Ve="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),We=["loop","playbackRate"],Xe=["pause","play"],Ye="abrstatuschanged adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged".split(" "),Ze={getAssetUri:2,
164
+ getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},$e={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},af=[["getConfiguration","configure"]],bf=[["isTextTrackVisible","setTextTrackVisibility"]],
165
+ cf="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),df=["attach","detach","load","unload"];
166
+ function ef(b){return JSON.stringify(b,function(b,d){if("function"!=typeof d){if(d instanceof Event||d instanceof J){var c={},f;for(f in d){var g=d[f];g&&"object"==typeof g?"detail"==f&&(c[f]=g):f in Event||(c[f]=g)}return c}if(d instanceof TimeRanges)for(c={__type__:"TimeRanges",length:d.length,start:[],end:[]},f=0;f<d.length;++f)c.start.push(d.start(f)),c.end.push(d.end(f));else c=d instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(d)}:"number"==typeof d?isNaN(d)?"NaN":isFinite(d)?
167
+ d:0>d?"-Infinity":"Infinity":d;return c}})}function ff(b){return JSON.parse(b,function(b,d){return"NaN"==d?NaN:"-Infinity"==d?-Infinity:"Infinity"==d?Infinity:d&&"object"==typeof d&&"TimeRanges"==d.__type__?gf(d):d&&"object"==typeof d&&"Uint8Array"==d.__type__?new Uint8Array(d.entries):d})}function gf(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}};function hf(b,c,d,e,f,g){this.T=b;this.f=new D(c);this.P=d;this.l=!1;this.G=e;this.M=f;this.C=g;this.b=this.h=!1;this.D="";this.i=null;this.m=this.Nd.bind(this);this.s=this.kf.bind(this);this.a={video:{},player:{}};this.v=0;this.c={};this.g=null}var jf=!1,kf=null;p=hf.prototype;p.destroy=function(){lf(this);kf&&mf(this);this.f&&(this.f.stop(),this.f=null);this.M=this.G=null;this.b=this.h=!1;this.s=this.m=this.g=this.c=this.a=this.i=null;return Promise.resolve()};p.ga=function(){return this.b};
168
+ p.cd=function(){return this.D};p.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.h=!0;this.f.sc();var b=new chrome.cast.SessionRequest(this.T);b=new chrome.cast.ApiConfig(b,this.Od.bind(this),this.pf.bind(this),"origin_scoped");chrome.cast.initialize(b,function(){},function(){});jf&&this.f.O(.02);(b=kf)&&b.status!=chrome.cast.SessionStatus.STOPPED?this.Od(b):kf=null}else window.__onGCastApiAvailable=function(b){b&&this.init()}.bind(this)};
169
+ p.jd=function(b){this.i=b;this.b&&nf({type:"appData",appData:this.i})};p.cast=function(b){if(!this.h)return Promise.reject(new G(1,8,8E3));if(!jf)return Promise.reject(new G(1,8,8001));if(this.b)return Promise.reject(new G(1,8,8002));this.g=new H;chrome.cast.requestSession(this.$c.bind(this,b),this.Md.bind(this));return this.g};p.Eb=function(){this.b&&(lf(this),kf&&(mf(this),kf.stop(function(){},function(){}),kf=null))};
170
+ p.get=function(b,c){if("video"==b){if(Xe.includes(c))return this.Yd.bind(this,b,c)}else if("player"==b){if($e[c]&&!this.get("player","isLive")())return function(){};if(cf.includes(c))return this.Yd.bind(this,b,c);if(df.includes(c))return this.Ef.bind(this,b,c);if(Ze[c])return this.Vd.bind(this,b,c)}return this.Vd(b,c)};p.set=function(b,c,d){this.a[b][c]=d;nf({type:"set",targetName:b,property:c,value:d})};
171
+ p.$c=function(b,c){kf=c;c.addUpdateListener(this.m);c.addMessageListener("urn:x-cast:com.google.shaka.v2",this.s);this.Nd();nf({type:"init",initState:b,appData:this.i});this.g.resolve()};p.Md=function(b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}this.g.reject(new G(2,8,c,b))};p.Vd=function(b,c){return this.a[b][c]};
172
+ p.Yd=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];nf({type:"call",targetName:b,methodName:c,args:e})};p.Ef=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];f=new H;var g=this.v.toString();this.v++;this.c[g]=f;nf({type:"asyncCall",targetName:b,methodName:c,args:e,id:g});return f};p.Od=function(b){var c=this.C();this.g=new H;this.l=!0;this.$c(c,b)};p.pf=function(b){jf="available"==b;this.f.sc()};
173
+ function mf(b){var c=kf;c.removeUpdateListener(b.m);c.removeMessageListener("urn:x-cast:com.google.shaka.v2",b.s)}p.Nd=function(){var b=kf?"connected"==kf.status:!1;if(this.b&&!b){this.M();for(var c in this.a)this.a[c]={};lf(this)}this.D=(this.b=b)?kf.receiver.friendlyName:"";this.f.sc()};function lf(b){for(var c in b.c){var d=b.c[c];delete b.c[c];d.reject(new G(1,7,7E3))}}
174
+ p.kf=function(b,c){var d=ff(c);switch(d.type){case "event":var e=d.event;this.G(d.targetName,new J(e.type,e));break;case "update":e=d.update;for(var f in e){d=this.a[f]||{};for(var g in e[f])d[g]=e[f][g]}this.l&&(this.P(),this.l=!1);break;case "asyncComplete":if(f=d.id,d=d.error,g=this.c[f],delete this.c[f],g)if(d){f=new G(d.severity,d.category,d.code);for(e in d)f[e]=d[e];g.reject(f)}else g.resolve()}};function nf(b){b=ef(b);kf.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},ab)};function O(b,c,d){var e=this;Ib.call(this);this.c=b;this.b=c;this.i=this.g=this.f=this.l=this.h=null;if(this.m=d)this.a=new hf(d,function(){return of(e)},function(){return pf(e)},function(b,c){return qf(e,b,c)},function(){return rf(e)},function(){return sf(e)});tf(this)}Ua(O,Ib);A("shaka.cast.CastProxy",O);
175
+ O.prototype.destroy=function(b){b&&this.a&&this.a.Eb();this.i&&(this.i.release(),this.i=null);b=[];this.b&&(b.push(this.b.destroy()),this.b=null);this.a&&(b.push(this.a.destroy()),this.a=null);this.l=this.h=this.c=null;return Promise.all(b)};O.prototype.destroy=O.prototype.destroy;O.prototype.Ye=function(){return this.h};O.prototype.getVideo=O.prototype.Ye;O.prototype.Re=function(){return this.l};O.prototype.getPlayer=O.prototype.Re;O.prototype.se=function(){return this.a?this.a.h&&jf:!1};
176
+ O.prototype.canCast=O.prototype.se;O.prototype.ga=function(){return this.a?this.a.ga():!1};O.prototype.isCasting=O.prototype.ga;O.prototype.cd=function(){return this.a?this.a.cd():""};O.prototype.receiverName=O.prototype.cd;O.prototype.cast=function(){if(!this.a)throw new G(1,8,8007);var b=sf(this);return this.a.cast(b).then(function(){if(this.b)return this.b.rd()}.bind(this))};O.prototype.cast=O.prototype.cast;O.prototype.jd=function(b){this.a&&this.a.jd(b)};O.prototype.setAppData=O.prototype.jd;
177
+ O.prototype.$f=function(){if(this.a){var b=this.a;if(b.b){var c=b.C();chrome.cast.requestSession(b.$c.bind(b,c),b.Md.bind(b))}}};O.prototype.suggestDisconnect=O.prototype.$f;
178
+ O.prototype.ve=function(b){var c=this;return t(function e(){return z(e,function(e){switch(e.j){case 1:if(b==c.m)return e["return"]();c.m=b;if(!c.a){e.A(2);break}c.a.Eb();return u(e,c.a.destroy(),3);case 3:c.a=null;case 2:c.a=new hf(b,function(){return of(c)},function(){return pf(c)},function(b,e){return qf(c,b,e)},function(){return rf(c)},function(){return sf(c)}),c.a.init(),v(e)}})})};O.prototype.changeReceiverId=O.prototype.ve;O.prototype.Eb=function(){this.a&&this.a.Eb()};
179
+ O.prototype.forceDisconnect=O.prototype.Eb;function tf(b){b.a&&b.a.init();b.i=new L;Ue.forEach(function(b){this.i.w(this.c,b,this.ig.bind(this))}.bind(b));Ye.forEach(function(b){this.i.w(this.b,b,this.yf.bind(this))}.bind(b));b.h={};for(var c in b.c)Object.defineProperty(b.h,c,{configurable:!1,enumerable:!0,get:b.hg.bind(b,c),set:b.jg.bind(b,c)});b.l={};for(var d in b.b)Object.defineProperty(b.l,d,{configurable:!1,enumerable:!0,get:b.Ud.bind(b,d)});b.f=new Ib;b.f.Vb=b.h;b.g=new Ib;b.g.Vb=b.l}
180
+ function sf(b){var c={video:{},player:{},playerAfterLoad:{},manifest:b.b.bc(),startTime:null};b.c.pause();We.forEach(function(b){c.video[b]=this.c[b]}.bind(b));b.c.ended||(c.startTime=b.c.currentTime);af.forEach(function(b){var d=b[1];b=this.b[b[0]]();c.player[d]=b}.bind(b));bf.forEach(function(b){var d=b[1];b=this.b[b[0]]();c.playerAfterLoad[d]=b}.bind(b));return c}function of(b){b.dispatchEvent(new J("caststatuschanged"))}function pf(b){b.f.dispatchEvent(new J(b.h.paused?"pause":"play"))}
181
+ function rf(b){af.forEach(function(b){var c=b[1];b=this.a.get("player",b[0])();this.b[c](b)}.bind(b));var c=b.a.get("player","getAssetUri")(),d=b.a.get("video","ended"),e=Promise.resolve(),f=b.c.autoplay,g=null;d||(g=b.a.get("video","currentTime"));c&&(b.c.autoplay=!1,e=b.b.load(c,g));var h={};We.forEach(function(b){h[b]=this.a.get("video",b)}.bind(b));e.then(function(){b.c&&(We.forEach(function(b){this.c[b]=h[b]}.bind(b)),bf.forEach(function(b){var c=b[1];b=this.a.get("player",b[0])();this.b[c](b)}.bind(b)),
182
+ b.c.autoplay=f,c&&b.c.play())},function(c){b.b.dispatchEvent(new J("error",{detail:c}))})}p=O.prototype;p.hg=function(b){if("addEventListener"==b)return this.f.addEventListener.bind(this.f);if("removeEventListener"==b)return this.f.removeEventListener.bind(this.f);if(this.a&&this.a.ga()&&0==Object.keys(this.a.a.video).length){var c=this.c[b];if("function"!=typeof c)return c}return this.a&&this.a.ga()?this.a.get("video",b):(b=this.c[b],"function"==typeof b&&(b=b.bind(this.c)),b)};
183
+ p.jg=function(b,c){this.a&&this.a.ga()?this.a.set("video",b,c):this.c[b]=c};p.ig=function(b){this.a&&this.a.ga()||this.f.dispatchEvent(new J(b.type,b))};
184
+ p.Ud=function(b){if("addEventListener"==b)return this.g.addEventListener.bind(this.g);if("removeEventListener"==b)return this.g.removeEventListener.bind(this.g);if("getMediaElement"==b)return function(){return this.h}.bind(this);if("getSharedConfiguration"==b)return this.a?this.a.get("player","getConfiguration"):this.b.getConfiguration();if("getNetworkingEngine"==b)return this.b.Fb.bind(this.b);if(this.a&&this.a.ga()){if("getManifest"==b||"drmInfo"==b)return function(){$a(b+"() does not work while casting!");
185
+ return null};if("getManifestUri"==b)return Qe("getManifestUri",'Please use "getAssetUri" instead.'),this.Ud("getAssetUri");if("attach"==b||"detach"==b)return function(){$a(b+"() does not work while casting!");return Promise.resolve()}}return this.a&&this.a.ga()&&0==Object.keys(this.a.a.video).length&&Ze[b]||!this.a||!this.a.ga()?this.b[b].bind(this.b):this.a.get("player",b)};p.yf=function(b){this.a&&this.a.ga()||this.g.dispatchEvent(b)};
186
+ function qf(b,c,d){b.a.ga()&&("video"==c?b.f.dispatchEvent(d):"player"==c&&b.g.dispatchEvent(d))};function uf(b,c,d,e){var f=this;Ib.call(this);this.a=b;this.b=c;this.c=new L;this.D={video:b,player:c};this.s=d||function(){};this.G=e||function(b){return b};this.v=!1;this.h=!0;this.g=0;this.m=!1;this.l=!0;this.i=this.f=null;this.C=new D(function(){vf(f)});wf(this)}Ua(uf,Ib);A("shaka.cast.CastReceiver",uf);uf.prototype.isConnected=function(){return this.v};uf.prototype.isConnected=uf.prototype.isConnected;uf.prototype.bf=function(){return this.h};uf.prototype.isIdle=uf.prototype.bf;
187
+ uf.prototype.destroy=function(){var b=this;return t(function d(){var e,f;return z(d,function(d){switch(d.j){case 1:return b.c&&(b.c.release(),b.c=null),e=[],b.b&&(e.push(b.b.destroy()),b.b=null),b.C&&(b.C.stop(),b.C=null),b.a=null,b.D=null,b.s=null,b.v=!1,b.h=!0,b.f=null,b.i=null,u(d,Promise.all(e),2);case 2:f=cast.receiver.CastReceiverManager.getInstance(),f.stop(),v(d)}})})};uf.prototype.destroy=uf.prototype.destroy;
188
+ function wf(b){var c=cast.receiver.CastReceiverManager.getInstance();c.onSenderConnected=b.Qd.bind(b);c.onSenderDisconnected=b.Qd.bind(b);c.onSystemVolumeChanged=b.Be.bind(b);b.i=c.getCastMessageBus("urn:x-cast:com.google.cast.media");b.i.onMessage=b.ef.bind(b);b.f=c.getCastMessageBus("urn:x-cast:com.google.shaka.v2");b.f.onMessage=b.rf.bind(b);c.start();Ue.forEach(function(b){this.c.w(this.a,b,this.Wd.bind(this,"video"))}.bind(b));Ye.forEach(function(b){this.c.w(this.b,b,this.Wd.bind(this,"player"))}.bind(b));
189
+ cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?b.b.kd(3840,2160):b.b.kd(1920,1080);b.c.w(b.a,"loadeddata",function(){this.m=!0}.bind(b));b.c.w(b.b,"loading",function(){this.h=!1;xf(this)}.bind(b));b.c.w(b.a,"playing",function(){this.h=!1;xf(this)}.bind(b));b.c.w(b.a,"pause",function(){xf(this)}.bind(b));b.c.w(b.b,"unloading",function(){this.h=!0;xf(this)}.bind(b));b.c.w(b.a,"ended",function(){var b=this;(new D(function(){b.a&&b.a.ended&&
190
+ (b.h=!0,xf(b))})).O(5)}.bind(b))}p=uf.prototype;p.Qd=function(){this.g=0;this.l=!0;this.v=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;xf(this)};function xf(b){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new J("caststatuschanged")),yf(this)||zf(this,0))}.bind(b))}
191
+ function Af(b,c,d){for(var e in c.player)b.b[e](c.player[e]);b.s(d);d=Promise.resolve();var f=b.a.autoplay;c.manifest&&(b.a.autoplay=!1,d=b.b.load(c.manifest,c.startTime));d.then(function(){if(b.b){for(var d in c.video)b.a[d]=c.video[d];for(var e in c.playerAfterLoad)b.b[e](c.playerAfterLoad[e]);b.a.autoplay=f;c.manifest&&(b.a.play(),zf(b,0))}},function(c){b.b.dispatchEvent(new J("error",{detail:c}))})}p.Wd=function(b,c){this.b&&(vf(this),Bf(this,{type:"event",targetName:b,event:c},this.f))};
192
+ function vf(b){b.C.O(.5);var c={video:{},player:{}};Ve.forEach(function(b){c.video[b]=this.a[b]}.bind(b));if(b.b.V())for(var d in $e)0==b.g%$e[d]&&(c.player[d]=b.b[d]());for(var e in Ze)0==b.g%Ze[e]&&(c.player[e]=b.b[e]());if(d=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())c.video.volume=d.level,c.video.muted=d.muted;b.m&&(b.g+=1);Bf(b,{type:"update",update:c},b.f);yf(b)}function yf(b){return b.l&&(b.a.duration||b.b.V())?(Cf(b),b.l=!1,!0):!1}
193
+ function Cf(b){var c={contentId:b.b.bc(),streamType:b.b.V()?"LIVE":"BUFFERED",duration:b.a.duration,contentType:""};zf(b,0,c)}p.Be=function(){var b=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();b&&Bf(this,{type:"update",update:{video:{volume:b.level,muted:b.muted}}},this.f);Bf(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.f)};
194
+ p.rf=function(b){var c=ff(b.data);switch(c.type){case "init":this.g=0;this.m=!1;this.l=!0;Af(this,c.initState,c.appData);vf(this);break;case "appData":this.s(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}}this.D[d][e]=c;break;case "call":d=this.D[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=
195
+ c.targetName;e=c.methodName;"player"==d&&"load"==e&&(this.g=0,this.m=!1);f=c.id;b=b.senderId;var g=this.D[d];c=g[e].apply(g,c.args);"player"==d&&"load"==e&&(c=c.then(function(){this.l=!0}.bind(this)));c.then(this.be.bind(this,b,f,null),this.be.bind(this,b,f))}};
196
+ p.ef=function(b){var c=ff(b.data);switch(c.type){case "PLAY":this.a.play();zf(this,0);break;case "PAUSE":this.a.pause();zf(this,0);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(this.a.currentTime=Number(b));d&&"PLAYBACK_START"==d?(this.a.play(),zf(this,0)):d&&"PLAYBACK_PAUSE"==d&&(this.a.pause(),zf(this,0));break;case "STOP":this.b.rd().then(function(){this.b&&zf(this,0)}.bind(this));break;case "GET_STATUS":zf(this,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=
197
+ d.muted;var e=this.a.volume,f=this.a.muted;null!=b&&(this.a.volume=Number(b));null!=d&&(this.a.muted=d);e==this.a.volume&&f==this.a.muted||zf(this,0);break;case "LOAD":this.g=0;this.l=this.m=!1;b=c.media;d=c.currentTime;e=this.G(b.contentId);f=c.autoplay||!0;this.s(b.customData);f&&(this.a.autoplay=!0);this.b.load(e,d).then(function(){this.b&&Cf(this)}.bind(this))["catch"](function(b){var d="LOAD_FAILED";7==b.category&&7E3==b.code&&(d="LOAD_CANCELLED");Bf(this,{requestId:Number(c.requestId),type:d},
198
+ this.i)}.bind(this));break;default:Bf(this,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.i)}};p.be=function(b,c,d){this.b&&Bf(this,{type:"asyncComplete",id:c,error:d},this.f,b)};function Bf(b,c,d,e){b.v&&(b=ef(c),e?d.getCastChannel(e).send(b):d.broadcast(b))}
199
+ function zf(b,c,d){var e=b.a.playbackRate;var f=Df;f=b.h?f.IDLE:b.b.Oc()?f.je:b.a.paused?f.le:f.me;e={mediaSessionId:0,playbackRate:e,playerState:f,currentTime:b.a.currentTime,supportedMediaCommands:15,volume:{level:b.a.volume,muted:b.a.muted}};d&&(e.media=d);Bf(b,{requestId:c,type:"MEDIA_STATUS",status:[e]},b.i)}var Df={IDLE:"IDLE",me:"PLAYING",je:"BUFFERING",le:"PAUSED"};function P(b,c){this.K=b;this.b=c==Ef;this.a=0}A("shaka.util.DataViewReader",P);var Ef=1;P.Endianness={lg:0,mg:Ef};P.prototype.sa=function(){return this.a<this.K.byteLength};P.prototype.hasMoreData=P.prototype.sa;P.prototype.ba=function(){return this.a};P.prototype.getPosition=P.prototype.ba;P.prototype.Ie=function(){return this.K.byteLength};P.prototype.getLength=P.prototype.Ie;P.prototype.ka=function(){try{var b=this.K.getUint8(this.a);this.a+=1;return b}catch(c){Ff()}};P.prototype.readUint8=P.prototype.ka;
200
+ P.prototype.Mb=function(){try{var b=this.K.getUint16(this.a,this.b);this.a+=2;return b}catch(c){Ff()}};P.prototype.readUint16=P.prototype.Mb;P.prototype.F=function(){try{var b=this.K.getUint32(this.a,this.b);this.a+=4;return b}catch(c){Ff()}};P.prototype.readUint32=P.prototype.F;P.prototype.Xd=function(){try{var b=this.K.getInt32(this.a,this.b);this.a+=4;return b}catch(c){Ff()}};P.prototype.readInt32=P.prototype.Xd;
201
+ P.prototype.yb=function(){try{if(this.b){var b=this.K.getUint32(this.a,!0);var c=this.K.getUint32(this.a+4,!0)}else c=this.K.getUint32(this.a,!1),b=this.K.getUint32(this.a+4,!1)}catch(d){Ff()}if(2097151<c)throw new G(2,3,3001);this.a+=8;return c*Math.pow(2,32)+b};P.prototype.readUint64=P.prototype.yb;P.prototype.Xa=function(b){this.a+b>this.K.byteLength&&Ff();var c=new Uint8Array(this.K.buffer,this.K.byteOffset+this.a,b);this.a+=b;return new Uint8Array(c)};P.prototype.readBytes=P.prototype.Xa;
202
+ P.prototype.L=function(b){this.a+b>this.K.byteLength&&Ff();this.a+=b};P.prototype.skip=P.prototype.L;P.prototype.$d=function(b){this.a<b&&Ff();this.a-=b};P.prototype.rewind=P.prototype.$d;P.prototype.seek=function(b){(0>b||b>this.K.byteLength)&&Ff();this.a=b};P.prototype.seek=P.prototype.seek;P.prototype.bd=function(){for(var b=this.a;this.sa()&&0!=this.K.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.K.buffer,this.K.byteOffset+b,this.a-b);this.a+=1;return Ac(b)};
203
+ P.prototype.readTerminatedString=P.prototype.bd;function Ff(){throw new G(2,3,3E3);};function Q(){this.c=[];this.b=[];this.a=!1}A("shaka.util.Mp4Parser",Q);Q.prototype.H=function(b,c){var d=Gf(b);this.c[d]=0;this.b[d]=c;return this};Q.prototype.box=Q.prototype.H;Q.prototype.fa=function(b,c){var d=Gf(b);this.c[d]=1;this.b[d]=c;return this};Q.prototype.fullBox=Q.prototype.fa;Q.prototype.stop=function(){this.a=!0};Q.prototype.stop=Q.prototype.stop;
204
+ Q.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new P(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.sa()&&!this.a;)this.mc(0,d,c)};Q.prototype.parse=Q.prototype.parse;
205
+ Q.prototype.mc=function(b,c,d){var e=c.ba(),f=c.F(),g=c.F();switch(f){case 0:f=c.K.byteLength-e;break;case 1:f=c.yb()}var h=this.b[g];if(h){var k=null,l=null;1==this.c[g]&&(l=c.F(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.K.byteLength&&(g=c.K.byteLength);g-=c.ba();c=0<g?c.Xa(g):new Uint8Array(0);c=new P(new DataView(c.buffer,c.byteOffset,c.byteLength),0);h({parser:this,partialOkay:d||!1,version:k,flags:l,reader:c,size:f,start:e+b})}else c.L(Math.min(e+f-c.ba(),c.K.byteLength-c.ba()))};
206
+ Q.prototype.parseNext=Q.prototype.mc;function Hf(b){for(;b.reader.sa()&&!b.parser.a;)b.parser.mc(b.start,b.reader,b.partialOkay)}Q.children=Hf;function If(b){for(var c=b.reader.F();0<c&&!b.parser.a;--c)b.parser.mc(b.start,b.reader,b.partialOkay)}Q.sampleDescription=If;function Jf(b){return function(c){b(c.reader.Xa(c.reader.K.byteLength-c.reader.ba()))}}Q.allData=Jf;function Gf(b){for(var c=0,d=0;d<b.length;d++)c=c<<8|b.charCodeAt(d);return c}
207
+ function Kf(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}Q.typeToString=Kf;function Lf(b){this.f=[];this.b=[];this.a=[];(new Q).fa("pssh",this.c.bind(this)).parse(b.buffer)}Lf.prototype.c=function(b){if(!(1<b.version)){var c=Ic(b.reader.Xa(16)),d=[];if(0<b.version)for(var e=b.reader.F(),f=0;f<e;++f){var g=Ic(b.reader.Xa(16));d.push(g)}e=b.reader.F();b.reader.L(e);this.b.push.apply(this.b,d);this.f.push(c);this.a.push({start:b.start,end:b.start+b.size-1})}};var R={ac:function(b,c){var d=R.R(b,c);return 1!=d.length?null:d[0]},Gc:function(b,c,d){b=R.zd(b,c,d);return 1!=b.length?null:b[0]},R:function(b,c){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.tagName==c})},zd:function(b,c,d){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.localName==d&&b.namespaceURI==c})},getAttributeNS:function(b,c,d){return b.hasAttributeNS(c,d)?b.getAttributeNS(c,d):null},cc:function(b){return Array.prototype.every.call(b.childNodes,
208
+ function(b){return b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE})?b.textContent.trim():null},J:function(b,c,d,e){e=void 0===e?null:e;var f=null;b=b.getAttribute(c);null!=b&&(f=d(b));return null==f?e:f},vf:function(b){if(!b)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(b)&&(b+="Z");b=Date.parse(b);return isNaN(b)?null:Math.floor(b/1E3)},Ba:function(b){if(!b)return null;b=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(b);
209
+ if(!b)return null;b=31536E3*Number(b[1]||null)+2592E3*Number(b[2]||null)+86400*Number(b[3]||null)+3600*Number(b[4]||null)+60*Number(b[5]||null)+Number(b[6]||null);return isFinite(b)?b:null},oc:function(b){var c=/([0-9]+)-([0-9]+)/.exec(b);if(!c)return null;b=Number(c[1]);if(!isFinite(b))return null;c=Number(c[2]);return isFinite(c)?{start:b,end:c}:null},parseInt:function(b){b=Number(b);return 0===b%1?b:null},nc:function(b){b=Number(b);return 0===b%1&&0<b?b:null},vb:function(b){b=Number(b);return 0===
210
+ b%1&&0<=b?b:null},parseFloat:function(b){b=Number(b);return isNaN(b)?null:b},Ae:function(b){var c;b=(c=b.match(/^(\d+)\/(\d+)$/))?Number(c[1])/Number(c[2]):Number(b);return isNaN(b)?null:b},Td:function(b,c){var d=new DOMParser;try{var e=d.parseFromString(b,"text/xml")}catch(g){}if(e&&e.documentElement.tagName==c)var f=e.documentElement;return f&&0<f.getElementsByTagName("parsererror").length?null:f},Sd:function(b,c){try{var d=Ac(b);return R.Td(d,c)}catch(e){}}};var Mf=(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:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime");
211
+ function Nf(b,c,d){var e=Of(b),f=null;b=[];var g=[],h=new Set(e.map(function(b){return b.keyId}));h["delete"](null);if(1<h.size)throw new G(2,4,4010);d||(g=e.filter(function(b){return"urn:mpeg:dash:mp4protection:2011"==b.ae?(f=b.init||f,!1):!0}),g.length&&(b=Pf(f,c,g),0==b.length&&(b=[Bd("",f)])));if(e.length&&(d||!g.length))for(b=[],c=r(Mf.values()),d=c.next();!d.done;d=c.next())d=d.value,"org.w3.clearkey"!=d&&b.push(Bd(d,f));if(h=Array.from(h)[0]||null)for(c=r(b),d=c.next();!d.done;d=c.next())for(d=
212
+ r(d.value.initData),e=d.next();!e.done;e=d.next())e.value.keyId=h;return{wd:h,pg:f,drmInfos:b,Ad:!0}}function Qf(b,c,d,e){var f=Nf(b,c,e);if(d.Ad){b=1==d.drmInfos.length&&!d.drmInfos[0].keySystem;c=0==f.drmInfos.length;if(0==d.drmInfos.length||b&&!c)d.drmInfos=f.drmInfos;d.Ad=!1}else if(0<f.drmInfos.length&&(d.drmInfos=d.drmInfos.filter(function(b){return f.drmInfos.some(function(c){return c.keySystem==b.keySystem})}),0==d.drmInfos.length))throw new G(2,4,4008);return f.wd||d.wd}
213
+ function Rf(b){var c=0,d=(new DataView(b)).getUint32(c,!0);if(d!==b.byteLength)return[];c+=6;d=[];for(var e=new DataView(b);c<b.byteLength-1;){var f=e.getUint16(c,!0);c+=2;var g=e.getUint16(c,!0);c+=2;var h=new Uint8Array(b,c,g);d.push({type:f,value:h});c+=g}return d}function Sf(b){return(b=b.querySelector("DATA > LA_URL"))?b.textContent:""}
214
+ function Pf(b,c,d){var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Mf.get(f.ae);if(g){var h;if(h=R.Gc(f.node,"urn:microsoft:playready","pro")){h=Gc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),l=h.length,m=k.length+16+l,n=new ArrayBuffer(m),q=new Uint8Array(n);n=new DataView(n);var w=0;n.setUint32(w,m);w+=4;n.setUint32(w,1886614376);w+=4;n.setUint32(w,0);w+=4;q.set(k,w);w+=k.length;n.setUint32(w,l);w+=4;q.set(h,w);h=[{initData:q,
215
+ initDataType:"cenc",keyId:f.keyId}]}else h=null;h=Bd(g,f.init||b||h);if(g=Tf.get(g))h.licenseServerUri=g(f);e.push(h)}else for(f=c(f.node)||[],f=r(f),g=f.next();!g.done;g=f.next())e.push(g.value)}return e}
216
+ var Tf=(new Map).set("com.widevine.alpha",function(b){return(b=R.Gc(b.node,"urn:microsoft","laurl"))?b.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",function(b){b=R.Gc(b.node,"urn:microsoft:playready","pro");if(!b)return"";b=Gc(b.textContent);b=Rf(b.buffer).filter(function(b){return 1===b.type})[0];if(!b)return"";b=hc(b.value,!0);return(b=R.Td(b,"WRMHEADER"))?Sf(b):""});function Of(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())(d=Uf(d.value))&&c.push(d);return c}
217
+ function Uf(b){var c=b.getAttribute("schemeIdUri"),d=R.getAttributeNS(b,"urn:mpeg:cenc:2013","default_KID"),e=R.zd(b,"urn:mpeg:cenc:2013","pssh").map(R.cc);if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),d.includes(" ")))throw new G(2,4,4009);var f=[];try{f=e.map(function(b){return{initDataType:"cenc",initData:Gc(b),keyId:null}})}catch(g){throw new G(2,4,4007);}return{node:b,ae:c,keyId:d,init:0<f.length?f:null}};function Vf(b,c,d,e,f){var g={RepresentationID:c,Number:d,Bandwidth:e,Time:f};return b.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(b,c,d,e){if("$$"==b)return"$";var f=g[c];if(null==f)return b;"RepresentationID"==c&&d&&(d=void 0);"Time"==c&&(f=Math.round(f));switch(e){case void 0:case "d":case "i":case "u":b=f.toString();break;case "o":b=f.toString(8);break;case "x":b=f.toString(16);break;case "X":b=f.toString(16).toUpperCase();break;default:b=f.toString()}d=
201
218
  window.parseInt(d,10)||1;return Array(Math.max(0,d-b.length)+1).join("0")+b})}
202
- function Df(b,c){var d=Ef(b,c,"timescale"),e=1;d&&(e=P.jc(d)||1);d=Ef(b,c,"duration");(d=P.jc(d||""))&&(d/=e);var f=Ef(b,c,"startNumber"),g=Number(Ef(b,c,"presentationTimeOffset"))||0,h=P.rb(f||"");if(null==f||null==h)h=1;var k=Ff(b,c,"SegmentTimeline");f=null;if(k){f=e;var l=b.R.duration||Infinity;k=P.P(k,"S");for(var m=[],n=0,q=0;q<k.length;++q){var x=k[q],w=P.H(x,"t",P.rb),A=P.H(x,"d",P.rb);x=P.H(x,"r",P.parseInt);null!=w&&(w-=g);if(!A)break;w=null!=w?w:n;x=x||0;if(0>x)if(q+1<k.length){x=P.H(k[q+
203
- 1],"t",P.rb);if(null==x)break;else if(w>=x)break;x=Math.ceil((x-w)/A)-1}else{if(Infinity==l)break;else if(w/f>=l)break;x=Math.ceil((l*f-w)/A)-1}0<m.length&&w!=n&&(m[m.length-1].end=w/f);for(var C=0;C<=x;++C)n=w+A,m.push({start:w/f,end:n/f,eg:w}),w=n}f=m}return{timescale:e,Z:d,Wa:h,ia:g/e||0,nd:g,M:f}}function Ef(b,c,d){return[c(b.B),c(b.ba),c(b.ga)].filter(td.Da).map(function(b){return b.getAttribute(d)}).reduce(function(b,c){return b||c})}
204
- function Ff(b,c,d){return[c(b.B),c(b.ba),c(b.ga)].filter(td.Da).map(function(b){return P.Yb(b,d)}).reduce(function(b,c){return b||c})}
205
- function Gf(b,c,d,e,f,g){for(var h=P.getAttributeNS(b,"http://www.w3.org/1999/xlink","href"),k=P.getAttributeNS(b,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=0;l<b.attributes.length;l++){var m=b.attributes[l];"http://www.w3.org/1999/xlink"==m.namespaceURI&&(b.removeAttributeNS(m.namespaceURI,m.localName),--l)}if(5<=g)return Ab(new D(2,4,4028));if("onLoad"!=k)return Ab(new D(2,4,4027));var n=ud([e],[h]);return f.request(0,Sb(n,c)).T(function(e){e=P.Pd(e.data,b.tagName);if(!e)return Ab(new D(2,
206
- 4,4001,h));for(;b.childNodes.length;)b.removeChild(b.childNodes[0]);for(;e.childNodes.length;){var k=e.childNodes[0];e.removeChild(k);b.appendChild(k)}for(k=0;k<e.attributes.length;k++){var l=e.attributes[k].nodeName,m=e.getAttribute(l);b.setAttribute(l,m)}return Hf(b,c,d,n[0],f,g+1)})}
207
- function Hf(b,c,d,e,f,g){g=void 0===g?0:g;if(P.getAttributeNS(b,"http://www.w3.org/1999/xlink","href")){var h=Gf(b,c,d,e,f,g);d&&(h=h.T(void 0,function(){return Hf(b,c,d,e,f,g)}));return h}h=[];for(var k=0;k<b.childNodes.length;k++){var l=b.childNodes[k];l instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==P.getAttributeNS(l,"http://www.w3.org/1999/xlink","href")?(b.removeChild(l),--k):"SegmentTimeline"!=l.tagName&&h.push(Hf(l,c,d,e,f,g)))}return Eb(h).T(function(){return b})};function If(b,c,d){this.c=b;this.b=c;this.a=d}z("shaka.media.InitSegmentReference",If);If.prototype.wc=function(){return this.c()};If.prototype.createUris=If.prototype.wc;If.prototype.Gc=function(){return this.b};If.prototype.getStartByte=If.prototype.Gc;If.prototype.Fc=function(){return this.a};If.prototype.getEndByte=If.prototype.Fc;function Q(b,c,d,e,f,g){this.position=b;this.startTime=c;this.endTime=d;this.c=e;this.b=f;this.a=g}z("shaka.media.SegmentReference",Q);Q.prototype.aa=function(){return this.position};
208
- Q.prototype.getPosition=Q.prototype.aa;Q.prototype.Hc=function(){return this.startTime};Q.prototype.getStartTime=Q.prototype.Hc;Q.prototype.Ce=function(){return this.endTime};Q.prototype.getEndTime=Q.prototype.Ce;Q.prototype.wc=function(){return this.c()};Q.prototype.createUris=Q.prototype.wc;Q.prototype.Gc=function(){return this.b};Q.prototype.getStartByte=Q.prototype.Gc;Q.prototype.Fc=function(){return this.a};Q.prototype.getEndByte=Q.prototype.Fc;function R(b,c){this.I=b;this.b=c==Jf;this.a=0}z("shaka.util.DataViewReader",R);var Jf=1;R.Endianness={lg:0,mg:Jf};R.prototype.pa=function(){return this.a<this.I.byteLength};R.prototype.hasMoreData=R.prototype.pa;R.prototype.aa=function(){return this.a};R.prototype.getPosition=R.prototype.aa;R.prototype.Ee=function(){return this.I.byteLength};R.prototype.getLength=R.prototype.Ee;R.prototype.ha=function(){try{var b=this.I.getUint8(this.a);this.a+=1;return b}catch(c){Kf()}};R.prototype.readUint8=R.prototype.ha;
209
- R.prototype.Jb=function(){try{var b=this.I.getUint16(this.a,this.b);this.a+=2;return b}catch(c){Kf()}};R.prototype.readUint16=R.prototype.Jb;R.prototype.D=function(){try{var b=this.I.getUint32(this.a,this.b);this.a+=4;return b}catch(c){Kf()}};R.prototype.readUint32=R.prototype.D;R.prototype.Ud=function(){try{var b=this.I.getInt32(this.a,this.b);this.a+=4;return b}catch(c){Kf()}};R.prototype.readInt32=R.prototype.Ud;
210
- R.prototype.ub=function(){try{if(this.b){var b=this.I.getUint32(this.a,!0);var c=this.I.getUint32(this.a+4,!0)}else c=this.I.getUint32(this.a,!1),b=this.I.getUint32(this.a+4,!1)}catch(d){Kf()}if(2097151<c)throw new D(2,3,3001);this.a+=8;return c*Math.pow(2,32)+b};R.prototype.readUint64=R.prototype.ub;R.prototype.Va=function(b){this.a+b>this.I.byteLength&&Kf();var c=new Uint8Array(this.I.buffer,this.I.byteOffset+this.a,b);this.a+=b;return new Uint8Array(c)};R.prototype.readBytes=R.prototype.Va;
211
- R.prototype.J=function(b){this.a+b>this.I.byteLength&&Kf();this.a+=b};R.prototype.skip=R.prototype.J;R.prototype.Xd=function(b){this.a<b&&Kf();this.a-=b};R.prototype.rewind=R.prototype.Xd;R.prototype.seek=function(b){(0>b||b>this.I.byteLength)&&Kf();this.a=b};R.prototype.seek=R.prototype.seek;R.prototype.Xc=function(){for(var b=this.a;this.pa()&&0!=this.I.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.I.buffer,this.I.byteOffset+b,this.a-b);this.a+=1;return sc(b)};
212
- R.prototype.readTerminatedString=R.prototype.Xc;function Kf(){throw new D(2,3,3E3);};function S(){this.c=[];this.b=[];this.a=!1}z("shaka.util.Mp4Parser",S);S.prototype.G=function(b,c){var d=Lf(b);this.c[d]=0;this.b[d]=c;return this};S.prototype.box=S.prototype.G;S.prototype.ca=function(b,c){var d=Lf(b);this.c[d]=1;this.b[d]=c;return this};S.prototype.fullBox=S.prototype.ca;S.prototype.stop=function(){this.a=!0};S.prototype.stop=S.prototype.stop;
213
- S.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new R(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.pa()&&!this.a;)this.ic(0,d,c)};S.prototype.parse=S.prototype.parse;
214
- S.prototype.ic=function(b,c,d){var e=c.aa(),f=c.D(),g=c.D();switch(f){case 0:f=c.I.byteLength-e;break;case 1:f=c.ub()}var h=this.b[g];if(h){var k=null,l=null;1==this.c[g]&&(l=c.D(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.I.byteLength&&(g=c.I.byteLength);g-=c.aa();c=0<g?c.Va(g):new Uint8Array(0);c=new R(new DataView(c.buffer,c.byteOffset,c.byteLength),0);h({parser:this,partialOkay:d||!1,version:k,flags:l,reader:c,size:f,start:e+b})}else c.J(Math.min(e+f-c.aa(),c.I.byteLength-c.aa()))};
215
- S.prototype.parseNext=S.prototype.ic;function Mf(b){for(;b.reader.pa()&&!b.parser.a;)b.parser.ic(b.start,b.reader,b.partialOkay)}S.children=Mf;function Nf(b){for(var c=b.reader.D();0<c&&!b.parser.a;--c)b.parser.ic(b.start,b.reader,b.partialOkay)}S.sampleDescription=Nf;function Of(b){return function(c){b(c.reader.Va(c.reader.I.byteLength-c.reader.aa()))}}S.allData=Of;function Lf(b){for(var c=0,d=0;d<b.length;d++)c=c<<8|b.charCodeAt(d);return c}
216
- function Pf(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}S.typeToString=Pf;function Qf(b,c,d,e){var f,g=(new S).ca("sidx",function(b){f=Rf(c,e,d,b)});b&&g.parse(b);if(f)return f;throw new D(2,3,3004);}
217
- function Rf(b,c,d,e){var f=[];e.reader.J(4);var g=e.reader.D();if(0==g)throw new D(2,3,3005);if(0==e.version){var h=e.reader.D();var k=e.reader.D()}else h=e.reader.ub(),k=e.reader.ub();e.reader.J(2);var l=e.reader.Jb();b=b+e.size+k;for(k=0;k<l;k++){var m=e.reader.D(),n=(m&2147483648)>>>31;m&=2147483647;var q=e.reader.D();e.reader.J(4);if(1==n)throw new D(2,3,3006);f.push(new Q(f.length,h/g-c,(h+q)/g-c,function(){return d},b,b+m-1));h+=q;b+=m}e.parser.stop();return f};function T(b){this.a=b}z("shaka.media.SegmentIndex",T);T.prototype.destroy=function(){this.a=null;return Promise.resolve()};T.prototype.destroy=T.prototype.destroy;T.prototype.find=function(b){for(var c=this.a.length-1;0<=c;--c){var d=this.a[c];if(b>=d.startTime&&b<d.endTime)return d.position}return this.a.length&&b<this.a[0].startTime?this.a[0].position:null};T.prototype.find=T.prototype.find;
219
+ function Wf(b,c){var d=Xf(b,c,"timescale"),e=1;d&&(e=R.nc(d)||1);d=Xf(b,c,"duration");(d=R.nc(d||""))&&(d/=e);var f=Xf(b,c,"startNumber"),g=Number(Xf(b,c,"presentationTimeOffset"))||0,h=R.vb(f||"");if(null==f||null==h)h=1;var k=Yf(b,c,"SegmentTimeline");f=null;if(k){f=e;var l=b.S.duration||Infinity;k=R.R(k,"S");for(var m=[],n=0,q=0;q<k.length;++q){var w=k[q],x=R.J(w,"t",R.vb),B=R.J(w,"d",R.vb);w=R.J(w,"r",R.parseInt);null!=x&&(x-=g);if(!B)break;x=null!=x?x:n;w=w||0;if(0>w)if(q+1<k.length){w=R.J(k[q+
220
+ 1],"t",R.vb);if(null==w)break;else if(x>=w)break;w=Math.ceil((w-x)/B)-1}else{if(Infinity==l)break;else if(x/f>=l)break;w=Math.ceil((l*f-x)/B)-1}0<m.length&&x!=n&&(m[m.length-1].end=x/f);for(var C=0;C<=w;++C)n=x+B,m.push({start:x/f,end:n/f,eg:x}),x=n}f=m}return{timescale:e,Z:d,Za:h,la:g/e||0,sd:g,N:f}}function Xf(b,c,d){return[c(b.B),c(b.ca),c(b.ja)].filter(zd.Ga).map(function(b){return b.getAttribute(d)}).reduce(function(b,c){return b||c})}
221
+ function Yf(b,c,d){return[c(b.B),c(b.ca),c(b.ja)].filter(zd.Ga).map(function(b){return R.ac(b,d)}).reduce(function(b,c){return b||c})}
222
+ function Zf(b,c,d,e,f,g){for(var h=R.getAttributeNS(b,"http://www.w3.org/1999/xlink","href"),k=R.getAttributeNS(b,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=0;l<b.attributes.length;l++){var m=b.attributes[l];"http://www.w3.org/1999/xlink"==m.namespaceURI&&(b.removeAttributeNS(m.namespaceURI,m.localName),--l)}if(5<=g)return Ab(new G(2,4,4028));if("onLoad"!=k)return Ab(new G(2,4,4027));var n=Ad([e],[h]);return f.request(0,Tb(n,c)).U(function(e){e=R.Sd(e.data,b.tagName);if(!e)return Ab(new G(2,
223
+ 4,4001,h));for(;b.childNodes.length;)b.removeChild(b.childNodes[0]);for(;e.childNodes.length;){var k=e.childNodes[0];e.removeChild(k);b.appendChild(k)}for(k=0;k<e.attributes.length;k++){var l=e.attributes[k].nodeName,m=e.getAttribute(l);b.setAttribute(l,m)}return $f(b,c,d,n[0],f,g+1)})}
224
+ function $f(b,c,d,e,f,g){g=void 0===g?0:g;if(R.getAttributeNS(b,"http://www.w3.org/1999/xlink","href")){var h=Zf(b,c,d,e,f,g);d&&(h=h.U(void 0,function(){return $f(b,c,d,e,f,g)}));return h}h=[];for(var k=0;k<b.childNodes.length;k++){var l=b.childNodes[k];l instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==R.getAttributeNS(l,"http://www.w3.org/1999/xlink","href")?(b.removeChild(l),--k):"SegmentTimeline"!=l.tagName&&h.push($f(l,c,d,e,f,g)))}return Fb(h).U(function(){return b})};function ag(b,c,d){this.c=b;this.b=c;this.a=d}A("shaka.media.InitSegmentReference",ag);ag.prototype.Ac=function(){return this.c()};ag.prototype.createUris=ag.prototype.Ac;ag.prototype.Lc=function(){return this.b};ag.prototype.getStartByte=ag.prototype.Lc;ag.prototype.Kc=function(){return this.a};ag.prototype.getEndByte=ag.prototype.Kc;function S(b,c,d,e,f,g){this.position=b;this.startTime=c;this.endTime=d;this.c=e;this.b=f;this.a=g}A("shaka.media.SegmentReference",S);S.prototype.ba=function(){return this.position};
225
+ S.prototype.getPosition=S.prototype.ba;S.prototype.Mc=function(){return this.startTime};S.prototype.getStartTime=S.prototype.Mc;S.prototype.Ge=function(){return this.endTime};S.prototype.getEndTime=S.prototype.Ge;S.prototype.Ac=function(){return this.c()};S.prototype.createUris=S.prototype.Ac;S.prototype.Lc=function(){return this.b};S.prototype.getStartByte=S.prototype.Lc;S.prototype.Kc=function(){return this.a};S.prototype.getEndByte=S.prototype.Kc;function bg(b,c,d,e){var f,g=(new Q).fa("sidx",function(b){f=cg(c,e,d,b)});b&&g.parse(b);if(f)return f;throw new G(2,3,3004);}
226
+ function cg(b,c,d,e){var f=[];e.reader.L(4);var g=e.reader.F();if(0==g)throw new G(2,3,3005);if(0==e.version){var h=e.reader.F();var k=e.reader.F()}else h=e.reader.yb(),k=e.reader.yb();e.reader.L(2);var l=e.reader.Mb();b=b+e.size+k;for(k=0;k<l;k++){var m=e.reader.F(),n=(m&2147483648)>>>31;m&=2147483647;var q=e.reader.F();e.reader.L(4);if(1==n)throw new G(2,3,3006);f.push(new S(f.length,h/g-c,(h+q)/g-c,function(){return d},b,b+m-1));h+=q;b+=m}e.parser.stop();return f};function T(b){this.a=b}A("shaka.media.SegmentIndex",T);T.prototype.destroy=function(){this.a=null;return Promise.resolve()};T.prototype.destroy=T.prototype.destroy;T.prototype.find=function(b){for(var c=this.a.length-1;0<=c;--c){var d=this.a[c];if(b>=d.startTime&&b<d.endTime)return d.position}return this.a.length&&b<this.a[0].startTime?this.a[0].position:null};T.prototype.find=T.prototype.find;
218
227
  T.prototype.get=function(b){if(0==this.a.length)return null;b-=this.a[0].position;return 0>b||b>=this.a.length?null:this.a[b]};T.prototype.get=T.prototype.get;T.prototype.offset=function(b){for(var c=0;c<this.a.length;++c)this.a[c].startTime+=b,this.a[c].endTime+=b};T.prototype.offset=T.prototype.offset;
219
- T.prototype.Pc=function(b){for(var c=[],d=0,e=0;d<this.a.length&&e<b.length;){var f=this.a[d],g=b[e];f.startTime<g.startTime?(c.push(f),d++):(f.startTime>g.startTime?0==d&&c.push(g):(.1<Math.abs(f.endTime-g.endTime)?c.push(new Q(f.position,g.startTime,g.endTime,g.c,g.b,g.a)):c.push(f),d++),e++)}for(;d<this.a.length;)c.push(this.a[d++]);if(c.length)for(d=c[c.length-1].position+1;e<b.length;)f=b[e++],f=new Q(d++,f.startTime,f.endTime,f.c,f.b,f.a),c.push(f);else c=b;this.a=c};T.prototype.merge=T.prototype.Pc;
220
- T.prototype.zc=function(b){for(var c=0;c<this.a.length;++c)if(this.a[c].endTime>b){this.a.splice(0,c);return}this.a=[]};T.prototype.evict=T.prototype.zc;function Sf(b,c){for(;b.a.length;)if(b.a[b.a.length-1].startTime>=c)b.a.pop();else break;for(;b.a.length;)if(0>=b.a[0].endTime)b.a.shift();else break;if(0!=b.a.length){var d=b.a[b.a.length-1];b.a[b.a.length-1]=new Q(d.position,d.startTime,c,d.c,d.b,d.a)}};function Tf(b){this.b=b;this.a=new R(b,0);Uf||(Uf=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var Uf;Tf.prototype.pa=function(){return this.a.pa()};
221
- function Vf(b){var c=Wf(b);if(7<c.length)throw new D(2,3,3002);for(var d=0,e=0;e<c.length;e++)d=256*d+c[e];c=d;d=Wf(b);a:{for(e=0;e<Uf.length;e++)if(Ec(d,Uf[e])){e=!0;break a}e=!1}if(e)d=b.b.byteLength-b.a.aa();else{if(8==d.length&&d[1]&224)throw new D(2,3,3001);e=d[0]&(1<<8-d.length)-1;for(var f=1;f<d.length;f++)e=256*e+d[f];d=e}d=b.a.aa()+d<=b.b.byteLength?d:b.b.byteLength-b.a.aa();e=new DataView(b.b.buffer,b.b.byteOffset+b.a.aa(),d);b.a.J(d);return new Xf(c,e)}
222
- function Wf(b){var c=b.a.ha(),d;for(d=1;8>=d&&!(c&1<<8-d);d++);if(8<d)throw new D(2,3,3002);var e=new Uint8Array(d);e[0]=c;for(c=1;c<d;c++)e[c]=b.a.ha();return e}function Xf(b,c){this.id=b;this.a=c}function Yf(b){if(8<b.a.byteLength)throw new D(2,3,3002);if(8==b.a.byteLength&&b.a.getUint8(0)&224)throw new D(2,3,3001);for(var c=0,d=0;d<b.a.byteLength;d++){var e=b.a.getUint8(d);c=256*c+e}return c};function Zf(){}
223
- Zf.prototype.parse=function(b,c,d,e){var f;c=new Tf(new DataView(c));if(440786851!=Vf(c).id)throw new D(2,3,3008);var g=Vf(c);if(408125543!=g.id)throw new D(2,3,3009);c=g.a.byteOffset;g=new Tf(g.a);for(f=null;g.pa();){var h=Vf(g);if(357149030==h.id){f=h;break}}if(!f)throw new D(2,3,3010);g=new Tf(f.a);f=1E6;for(h=null;g.pa();){var k=Vf(g);if(2807729==k.id)f=Yf(k);else if(17545==k.id)if(h=k,4==h.a.byteLength)h=h.a.getFloat32(0);else if(8==h.a.byteLength)h=h.a.getFloat64(0);else throw new D(2,3,3003);
224
- }if(null==h)throw new D(2,3,3011);g=f/1E9;f=h*g;b=Vf(new Tf(new DataView(b)));if(475249515!=b.id)throw new D(2,3,3007);return $f(b,c,g,f,d,e)};function $f(b,c,d,e,f,g){function h(){return f}var k=[];b=new Tf(b.a);for(var l=null,m=null;b.pa();){var n=Vf(b);if(187==n.id){var q=ag(n);q&&(n=d*q.fg,q=c+q.zf,null!=l&&k.push(new Q(k.length,l-g,n-g,h,m,q-1)),l=n,m=q)}}null!=l&&k.push(new Q(k.length,l-g,e-g,h,m,null));return k}
225
- function ag(b){var c=new Tf(b.a);b=Vf(c);if(179!=b.id)throw new D(2,3,3013);b=Yf(b);c=Vf(c);if(183!=c.id)throw new D(2,3,3012);c=new Tf(c.a);for(var d=0;c.pa();){var e=Vf(c);if(241==e.id){d=Yf(e);break}}return{fg:b,zf:d}};function bg(b,c){var d=Ff(b,c,"Initialization");if(!d)return null;var e=b.B.la,f=d.getAttribute("sourceURL");f&&(e=ud(b.B.la,[f]));f=0;var g=null;if(d=P.H(d,"range",P.kc))f=d.start,g=d.end;return new If(function(){return e},f,g)}
226
- function cg(b,c){var d=Number(Ef(b,dg,"presentationTimeOffset"))||0,e=Ef(b,dg,"timescale"),f=1;e&&(f=P.jc(e)||1);d=d/f||0;e=bg(b,dg);var g=b.B.contentType;f=b.B.mimeType.split("/")[1];if("text"!=g&&"mp4"!=f&&"webm"!=f)throw new D(2,4,4006);if("webm"==f&&!e)throw new D(2,4,4005);g=Ff(b,dg,"RepresentationIndex");var h=Ef(b,dg,"indexRange"),k=b.B.la;h=P.kc(h||"");if(g){var l=g.getAttribute("sourceURL");l&&(k=ud(b.B.la,[l]));h=P.H(g,"range",P.kc,h)}if(!h)throw new D(2,4,4002);f=eg(b,c,e,k,h.start,h.end,
227
- f,d);return{createSegmentIndex:f.createSegmentIndex,findSegmentPosition:f.findSegmentPosition,getSegmentReference:f.getSegmentReference,initSegmentReference:e,ia:d}}
228
- function eg(b,c,d,e,f,g,h,k){var l=b.presentationTimeline,m=!b.gb||!b.R.Lc,n=b.R.start,q=b.R.duration,x=c,w=null;return{createSegmentIndex:function(){var b=[x(e,f,g),"webm"==h?x(d.c(),d.b,d.a):null];x=null;return Promise.all(b).then(function(b){var c=b[0];b=b[1]||null;c="mp4"==h?Qf(c,f,e,k):(new Zf).parse(c,b,e,k);l.ob(c,n);w=new T(c);m&&Sf(w,q)})},findSegmentPosition:function(b){return w.find(b)},getSegmentReference:function(b){return w.get(b)}}}function dg(b){return b.Lb};function fg(b,c){var d=bg(b,gg);var e=hg(b);var f=Df(b,gg),g=f.Wa;0==g&&(g=1);var h=0;f.Z?h=f.Z*(g-1):f.M&&0<f.M.length&&(h=f.M[0].start);e={Z:f.Z,startTime:h,Wa:g,ia:f.ia,M:f.M,mb:e};if(!e.Z&&!e.M&&1<e.mb.length)throw new D(2,4,4002);if(!e.Z&&!b.R.duration&&!e.M&&1==e.mb.length)throw new D(2,4,4002);if(e.M&&0==e.M.length)throw new D(2,4,4002);g=f=null;b.ga.id&&b.B.id&&(g=b.ga.id+","+b.B.id,f=c[g]);h=ig(b.R.duration,e.Wa,b.B.la,e);f?(f.Pc(h),g=b.presentationTimeline.Db(),f.zc(g-b.R.start)):(b.presentationTimeline.ob(h,
229
- b.R.start),f=new T(h),g&&b.gb&&(c[g]=f));b.gb&&b.R.Lc||Sf(f,b.R.duration);return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:f.find.bind(f),getSegmentReference:f.get.bind(f),initSegmentReference:d,ia:e.ia}}function gg(b){return b.Ga}
230
- function ig(b,c,d,e){var f=e.mb.length;e.M&&e.M.length!=e.mb.length&&(f=Math.min(e.M.length,e.mb.length));for(var g=[],h=e.startTime,k=0;k<f;k++){var l=e.mb[k],m=ud(d,[l.Ze]),n=void 0;n=null!=e.Z?h+e.Z:e.M?e.M[k].end:h+b;g.push(new Q(k+c,h,n,function(b){return b}.bind(null,m),l.start,l.end));h=n}return g}
231
- function hg(b){return[b.B.Ga,b.ba.Ga,b.ga.Ga].filter(td.Da).map(function(b){return P.P(b,"SegmentURL")}).reduce(function(b,d){return 0<b.length?b:d}).map(function(c){c.getAttribute("indexRange")&&!b.Cd&&(b.Cd=!0);var d=c.getAttribute("media");c=P.H(c,"mediaRange",P.kc,{start:0,end:null});return{Ze:d,start:c.start,end:c.end}})};function jg(b,c,d,e){var f=kg(b);var g=Df(b,lg);var h=Ef(b,lg,"media"),k=Ef(b,lg,"index");g={Z:g.Z,timescale:g.timescale,Wa:g.Wa,ia:g.ia,nd:g.nd,M:g.M,Oc:h,Fb:k};h=g.Fb?1:0;h+=g.M?1:0;h+=g.Z?1:0;if(0==h)throw new D(2,4,4002);1!=h&&(g.Fb&&(g.M=null),g.Z=null);if(!g.Fb&&!g.Oc)throw new D(2,4,4002);if(g.Fb){d=b.B.mimeType.split("/")[1];if("mp4"!=d&&"webm"!=d)throw new D(2,4,4006);if("webm"==d&&!f)throw new D(2,4,4005);e=Cf(g.Fb,b.B.id,null,b.bandwidth||null,null);e=ud(b.B.la,[e]);b=eg(b,c,f,e,0,null,
232
- d,g.ia)}else g.Z?(e||(b.presentationTimeline.Rc(g.Z),b.presentationTimeline.Sc(b.R.start)),b=mg(b,g)):(h=c=null,b.ga.id&&b.B.id&&(h=b.ga.id+","+b.B.id,c=d[h]),k=ng(b,g),e=!b.gb||!b.R.Lc,c?(e&&Sf(new T(k),b.R.duration),c.Pc(k),d=b.presentationTimeline.Db(),c.zc(d-b.R.start)):(b.presentationTimeline.ob(k,b.R.start),c=new T(k),h&&b.gb&&(d[h]=c)),e&&Sf(c,b.R.duration),b={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:c.find.bind(c),getSegmentReference:c.get.bind(c)});return{createSegmentIndex:b.createSegmentIndex,
233
- findSegmentPosition:b.findSegmentPosition,getSegmentReference:b.getSegmentReference,initSegmentReference:f,ia:g.ia}}function lg(b){return b.Nb}
234
- function mg(b,c){var d=b.R.duration,e=c.Z,f=c.Wa,g=c.timescale,h=c.Oc,k=b.bandwidth||null,l=b.B.id,m=b.B.la;return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0>b||d&&b>=d?null:Math.floor(b/e)},getSegmentReference:function(b){var c=b*e,n=c+e;d&&(n=Math.min(n,d));return 0>n||d&&c>=d?null:new Q(b,c,n,function(){var d=Cf(h,l,b+f,k,c*g);return ud(m,[d])},0,null)}}}
235
- function ng(b,c){for(var d=[],e=0;e<c.M.length;e++){var f=e+c.Wa;d.push(new Q(f,c.M[e].start,c.M[e].end,function(b,c,d,e,f,n){b=Cf(b,c,f,d,n);return ud(e,[b]).map(function(b){return b.toString()})}.bind(null,c.Oc,b.B.id,b.bandwidth||null,b.B.la,f,c.M[e].eg+c.nd),0,null))}return d}function kg(b){var c=Ef(b,lg,"initialization");if(!c)return null;var d=b.B.id,e=b.bandwidth||null,f=b.B.la;return new If(function(){var b=Cf(c,d,null,e,null);return ud(f,[b])},0,null)};var U={sb:{},Ib:{},$c:function(b,c){U.Ib[b]=c}};z("shaka.media.ManifestParser.registerParserByExtension",U.$c);U.Kb=function(b,c){U.sb[b]=c};z("shaka.media.ManifestParser.registerParserByMime",U.Kb);
236
- U.wf=function(){var b={};if(mc()){for(var c in U.sb)b[c]=!0;for(var d in U.Ib)b[d]=!0}c={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};d=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var e=d.next();!e.done;e=d.next())e=e.value,b[e]=mc()?!!U.sb[e]:nc(e);for(var f in c)b[f]=mc()?!!U.Ib[f]:nc(c[f]);return b};
237
- U.create=function(b,c,d,e){return t(function g(){var h,k;return y(g,function(g){switch(g.l){case 1:return ya(g,2),u(g,U.De(b,c,d,e),4);case 4:return h=g.s,g["return"](new h);case 2:throw k=Da(g),k.severity=2,k;}})})};
238
- U.De=function(b,c,d,e){return t(function g(){var h,k,l,m,n;return y(g,function(g){switch(g.l){case 1:h=U;if(e&&(k=h.sb[e.toLowerCase()]))return g["return"](k);if(l=h.getExtension(b))if(m=h.Ib[l])return g["return"](m);if(e){g.A(2);break}return u(g,h.Ke(b,c,d),3);case 3:if(e=g.s)if(n=U.sb[e])return g["return"](n);case 2:throw new D(2,4,4E3,b);}})})};
239
- U.Ke=function(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.l){case 1:return g=Sb([b],d),g.method="HEAD",u(f,c.request(0,g).promise,2);case 2:return h=f.s,k=h.headers["content-type"],f["return"](k?k.toLowerCase():"")}})})};U.getExtension=function(b){b=(new cb(b)).fa.split("/").pop().split(".");return 1==b.length?"":b.pop().toLowerCase()};U.isSupported=function(b,c){return mc()?c in U.sb||U.getExtension(b)in U.Ib?!0:!1:!1};function W(b,c,d){this.f=b;this.lc=c;this.h=this.g=Infinity;this.a=1;this.b=this.c=null;this.j=0;this.m=!0;this.i=0;this.o=void 0===d?!0:d}z("shaka.media.PresentationTimeline",W);W.prototype.Y=function(){return this.g};W.prototype.getDuration=W.prototype.Y;W.prototype.ta=function(b){this.g=b};W.prototype.setDuration=W.prototype.ta;W.prototype.Pe=function(){return this.f};W.prototype.getPresentationStartTime=W.prototype.Pe;W.prototype.$d=function(b){this.j=b};W.prototype.setClockOffset=W.prototype.$d;
240
- W.prototype.Ob=function(b){this.m=b};W.prototype.setStatic=W.prototype.Ob;W.prototype.gd=function(b){this.h=b};W.prototype.setSegmentAvailabilityDuration=W.prototype.gd;W.prototype.Mf=function(b){this.lc=b};W.prototype.setDelay=W.prototype.Mf;W.prototype.Be=function(){return this.lc};W.prototype.getDelay=W.prototype.Be;
241
- W.prototype.ob=function(b,c){if(0!=b.length){var d=b[b.length-1].endTime+c;this.Sc(b[0].startTime+c);this.a=b.reduce(function(b,c){return Math.max(b,c.endTime-c.startTime)},this.a);this.b=Math.max(this.b,d);null!=this.f&&this.o&&(this.f=(Date.now()+this.j)/1E3-this.b-this.a)}};W.prototype.notifySegments=W.prototype.ob;W.prototype.Sc=function(b){this.c=null==this.c?b:Math.min(this.c,b)};W.prototype.notifyMinSegmentStartTime=W.prototype.Sc;W.prototype.Rc=function(b){this.a=Math.max(this.a,b)};
242
- W.prototype.notifyMaxSegmentDuration=W.prototype.Rc;W.prototype.offset=function(b){null!=this.c&&(this.c+=b);null!=this.b&&(this.b+=b)};W.prototype.offset=W.prototype.offset;W.prototype.U=function(){return Infinity==this.g&&!this.m};W.prototype.isLive=W.prototype.U;W.prototype.Ta=function(){return Infinity!=this.g&&!this.m};W.prototype.isInProgress=W.prototype.Ta;W.prototype.Db=function(){if(Infinity==this.h)return this.i;var b=this.jb()-this.h;return Math.max(this.i,b)};
243
- W.prototype.getSegmentAvailabilityStart=W.prototype.Db;W.prototype.ae=function(b){this.i=b};W.prototype.setUserSeekStart=W.prototype.ae;W.prototype.jb=function(){return this.U()||this.Ta()?Math.min(Math.max(0,(Date.now()+this.j)/1E3-this.a-this.f),this.g):this.g};W.prototype.getSegmentAvailabilityEnd=W.prototype.jb;W.prototype.Cb=function(b){var c=Math.max(this.c,this.i);if(Infinity==this.h)return c;var d=this.jb()-this.h;b=Math.min(d+b,this.wa());return Math.max(c,b)};
244
- W.prototype.getSafeSeekRangeStart=W.prototype.Cb;W.prototype.ib=function(){return this.Cb(0)};W.prototype.getSeekRangeStart=W.prototype.ib;W.prototype.wa=function(){var b=this.U()||this.Ta()?this.lc:0;return Math.max(0,this.jb()-b)};W.prototype.getSeekRangeEnd=W.prototype.wa;W.prototype.ee=function(){return null==this.f||null!=this.b?!1:!0};W.prototype.usingPresentationStartTime=W.prototype.ee;function og(b,c,d,e){b=Sb(b,e);if(0!=c||null!=d)b.headers.Range=d?"bytes="+c+"-"+d:"bytes="+c+"-";return b};function pg(){var b=this;this.a=this.b=null;this.f=[];this.c=null;this.j=[];this.h=1;this.m={};this.o=0;this.v=new Ua(5);this.i=new B(function(){qg(b)});this.g=new Nb}z("shaka.dash.DashParser",pg);p=pg.prototype;p.configure=function(b){this.b=b};p.start=function(b,c){var d=this;return t(function f(){var g;return y(f,function(f){switch(f.l){case 1:return d.f=[b],d.a=c,u(f,rg(d),2);case 2:g=f.s;d.a&&sg(d,g);if(!d.a)throw new D(2,7,7001);return f["return"](d.c)}})})};
245
- p.stop=function(){this.b=this.a=null;this.f=[];this.c=null;this.j=[];this.m={};null!=this.i&&(this.i.stop(),this.i=null);return this.g.destroy()};p.update=function(){rg(this)["catch"](function(b){if(this.a)this.a.onError(b)}.bind(this))};p.onExpirationUpdated=function(){};
246
- function rg(b){var c=Date.now(),d=b.a.networkingEngine.request(0,Sb(b.f,b.b.retryParameters));Ob(b.g,d);return d.promise.then(function(c){if(b.a)return c.uri&&!b.f.includes(c.uri)&&b.f.unshift(c.uri),tg(b,c.data,c.uri)}).then(function(){var d=(Date.now()-c)/1E3;Wa(b.v,1,d);return d})}function tg(b,c,d){c=P.Pd(c,"MPD");if(!c)throw new D(2,4,4001,d);c=Hf(c,b.b.retryParameters,b.b.dash.xlinkFailGracefully,d,b.a.networkingEngine);Ob(b.g,c);return c.promise.then(function(c){return ug(b,c,d)})}
247
- function ug(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w,A,C,E,F,V,Y,wa,Ba,ba,na,xa,ja,Va,Ca,vb,Ia,eb;return y(f,function(f){switch(f.l){case 1:l=td;m=P;n=[d];q=m.P(c,"Location").map(m.ac).filter(l.Da);0<q.length&&(x=ud(n,q),n=b.f=x);w=m.P(c,"BaseURL").map(m.ac);A=ud(n,w);(C=b.b.dash.ignoreMinBufferTime)||(E=m.H(c,"minBufferTime",m.za));b.o=m.H(c,"minimumUpdatePeriod",m.za,-1);F=m.H(c,"availabilityStartTime",m.rf);V=m.H(c,"timeShiftBufferDepth",m.za);Y=m.H(c,"suggestedPresentationDelay",m.za);
248
- wa=m.H(c,"maxSegmentDuration",m.za);Ba=c.getAttribute("type")||"static";b.c?ba=b.c.presentationTimeline:(na=Math.max(b.b.dash.defaultPresentationDelay,1.5*E),xa=null!=Y?Y:na,ba=new W(F,xa,b.b.dash.autoCorrectDrift));ja={gb:"static"!=Ba,presentationTimeline:ba,ga:null,R:null,ba:null,B:null,bandwidth:0,Cd:!1};for(var vc=ja,wb=A,Hb=P.H(c,"mediaPresentationDuration",P.za),xb=[],Ja=0,wc=P.P(c,"Period"),gb=0;gb<wc.length;gb++){var Ka=wc[gb];Ja=P.H(Ka,"start",P.za,Ja);var Ad=P.H(Ka,"duration",P.za),yb=null;
249
- if(gb!=wc.length-1){var fb=P.H(wc[gb+1],"start",P.za);null!=fb&&(yb=fb-Ja)}else null!=Hb&&(yb=Hb-Ja);null==yb&&(yb=Ad);Ka=vg(b,vc,wb,{start:Ja,duration:yb,node:Ka,Lc:null==yb||gb==wc.length-1});xb.push(Ka);Ad=vc.ga.id;b.j.includes(Ad)||(b.j.push(Ad),b.c&&(b.a.filterNewPeriod(Ka),b.c.periods.push(Ka)));if(null==yb){Ja=null;break}Ja+=yb}null==b.c&&b.a.filterAllPeriods(xb);null!=Hb?(g=xb,h=Hb,k=!1):(g=xb,h=Ja,k=!0);Va=h;Ca=g;ba.Ob("static"==Ba);"static"!=Ba&&k||ba.ta(Va||Infinity);(vb=ba.U())&&!isNaN(b.b.availabilityWindowOverride)&&
250
- (V=b.b.availabilityWindowOverride);null==V&&(V=Infinity);ba.gd(V);ba.Rc(wa||1);if(b.c){f.A(0);break}b.c={presentationTimeline:ba,periods:Ca,offlineSessionIds:[],minBufferTime:E||0};if(!ba.ee()){f.A(0);break}Ia=m.P(c,"UTCTiming");return u(f,wg(b,A,Ia),4);case 4:eb=f.s;if(!b.a)return f["return"]();ba.$d(eb);v(f)}})})}
251
- function vg(b,c,d,e){c.ga=xg(e.node,null,d);c.R=e;c.ga.id||(c.ga.id="__shaka_period_"+e.start);P.P(e.node,"EventStream").forEach(b.sf.bind(b,e.start,e.duration));d=P.P(e.node,"AdaptationSet").map(b.qf.bind(b,c)).filter(td.Da);if(c.gb){c=[];for(var f=r(d),g=f.next();!g.done;g=f.next()){g=r(g.value.Cf);for(var h=g.next();!h.done;h=g.next())c.push(h.value)}if(c.length!=(new Set(c)).size)throw new D(2,4,4018);}var k=d.filter(function(b){return!b.ld});d.filter(function(b){return b.ld}).forEach(function(b){var c=
252
- b.streams[0],d=b.ld;k.forEach(function(b){b.id==d&&b.streams.forEach(function(b){b.trickModeVideo=c})})});c=yg(k,"video");f=yg(k,"audio");if(!c.length&&!f.length)throw new D(2,4,4004);f.length||(f=[null]);c.length||(c=[null]);d=[];for(g=0;g<f.length;g++)for(h=0;h<c.length;h++)zg(b,f[g],c[h],d);b=yg(k,"text");c=[];for(f=0;f<b.length;f++)c.push.apply(c,b[f].streams);return{startTime:e.start,textStreams:c,variants:d}}function yg(b,c){return b.filter(function(b){return b.contentType==c})}
253
- function zg(b,c,d,e){if(c||d)if(c&&d){var f=c.drmInfos;var g=d.drmInfos;if(f.length&&g.length?0<ld(f,g).length:1){g=ld(c.drmInfos,d.drmInfos);for(var h=0;h<c.streams.length;h++)for(var k=0;k<d.streams.length;k++)f=(d.streams[k].bandwidth||0)+(c.streams[h].bandwidth||0),f={id:b.h++,language:c.language,primary:c.Nc||d.Nc,audio:c.streams[h],video:d.streams[k],bandwidth:f,drmInfos:g,allowedByApplication:!0,allowedByKeySystem:!0},e.push(f)}}else for(g=c||d,h=0;h<g.streams.length;h++)f=g.streams[h].bandwidth||
254
- 0,f={id:b.h++,language:g.language||"und",primary:g.Nc,audio:c?g.streams[h]:null,video:d?g.streams[h]:null,bandwidth:f,drmInfos:g.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},e.push(f)}
255
- p.qf=function(b,c){b.ba=xg(c,b.ga,null);var d=!1,e=P.P(c,"Role"),f=e.map(function(b){return b.getAttribute("value")}).filter(td.Da),g=void 0,h="text"==b.ba.contentType;h&&(g="subtitle");for(var k=0;k<e.length;k++){var l=e[k].getAttribute("schemeIdUri");if(null==l||"urn:mpeg:dash:role:2011"==l)switch(l=e[k].getAttribute("value"),l){case "main":d=!0;break;case "caption":case "subtitle":g=l}}var m=null,n=!1;P.P(c,"EssentialProperty").forEach(function(b){"http://dashif.org/guidelines/trickmode"==b.getAttribute("schemeIdUri")?
256
- m=b.getAttribute("value"):n=!0});k=P.P(c,"Accessibility");var q=new Map;e={};k=r(k);for(l=k.next();!l.done;e={Ab:e.Ab},l=k.next()){l=l.value;var x=l.getAttribute("schemeIdUri");if("urn:scte:dash:cc:cea-608:2015"==x||"urn:scte:dash:cc:cea-708:2015"==x)e.Ab=1,l=l.getAttribute("value"),null!=l?l.split(";").forEach(function(b){return function(c){if(c.includes("=")){c=c.split("=");var d=c[0].startsWith("CC")?c[0]:"CC"+c[0];c=c[1].split(",")[0].split(":").pop()}else d="CC"+b.Ab,b.Ab+=2;q.set(d,M(c))}}(e)):
257
- q.set("CC1","und")}if(n)return null;e=P.P(c,"ContentProtection");var w=uf(e,this.b.dash.customScheme,this.b.dash.ignoreDrmInfo);e=M(c.getAttribute("lang")||"und");l=c.getAttribute("label");k=P.P(c,"Representation");f=k.map(this.tf.bind(this,b,w,g,e,l,d,f,q)).filter(function(b){return!!b});if(0==f.length){if(h)return null;throw new D(2,4,4003);}b.ba.contentType&&"application"!=b.ba.contentType||(b.ba.contentType=Ag(f[0].mimeType,f[0].codecs),f.forEach(function(c){c.type=b.ba.contentType}));f.forEach(function(b){w.drmInfos.forEach(function(c){b.keyId&&
258
- c.keyIds.push(b.keyId)})});h=k.map(function(b){return b.getAttribute("id")}).filter(td.Da);return{id:b.ba.id||"__fake__"+this.h++,contentType:b.ba.contentType,language:e,Nc:d,streams:f,drmInfos:w.drmInfos,ld:m,Cf:h}};
259
- p.tf=function(b,c,d,e,f,g,h,k,l){b.B=xg(l,b.ba,null);if(!Bg(b.B))return null;b.bandwidth=P.H(l,"bandwidth",P.jc)||0;var m=b.B.contentType;m="text"==m||"application"==m;try{var n=this.Df.bind(this);if(b.B.Lb)var q=cg(b,n);else if(b.B.Ga)q=fg(b,this.m);else if(b.B.Nb)q=jg(b,n,this.m,!!this.c);else{var x=b.B.la,w=b.R.duration||0;q={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0<=b&&b<w?1:null},getSegmentReference:function(b){return 1!=b?null:new Q(1,0,w,function(){return x},
260
- 0,null)},initSegmentReference:null,ia:0}}}catch(A){if(m&&4002==A.code)return null;throw A;}l=P.P(l,"ContentProtection");l=xf(l,this.b.dash.customScheme,c,this.b.dash.ignoreDrmInfo);return{id:this.h++,originalId:b.B.id,createSegmentIndex:q.createSegmentIndex,findSegmentPosition:q.findSegmentPosition,getSegmentReference:q.getSegmentReference,initSegmentReference:q.initSegmentReference,presentationTimeOffset:q.ia,mimeType:b.B.mimeType,codecs:b.B.codecs,frameRate:b.B.frameRate,bandwidth:b.bandwidth,width:b.B.width,
261
- height:b.B.height,kind:d,encrypted:0<c.drmInfos.length,keyId:l,language:e,label:f,type:b.ba.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.B.emsgSchemeIdUris,roles:h,channelsCount:b.B.Tc,closedCaptions:k}};function qg(b){t(function d(){var e,f;return y(d,function(d){switch(d.l){case 1:return e=0,ya(d,2),u(d,rg(b),4);case 4:e=d.s;Aa(d,3);break;case 2:f=Da(d),b.a&&(f.severity=1,b.a.onError(f));case 3:if(!b.a)return d["return"]();sg(b,e);v(d)}})})}
262
- function sg(b,c){0>b.o||b.i.O(Math.max(3,b.o-c,Xa(b.v)))}
263
- function xg(b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,Tc:null};d=d||c.la;var e=P.rb,f=P.we,g=P.P(b,"BaseURL").map(P.ac),h=b.getAttribute("contentType")||c.contentType,k=b.getAttribute("mimeType")||c.mimeType,l=b.getAttribute("codecs")||c.codecs;f=P.H(b,"frameRate",f)||c.frameRate;var m=P.P(b,"InbandEventStream"),n=c.emsgSchemeIdUris.slice();m=r(m);for(var q=m.next();!q.done;q=m.next())q=q.value.getAttribute("schemeIdUri"),n.includes(q)||n.push(q);m=P.P(b,
264
- "AudioChannelConfiguration");m=Cg(m)||c.Tc;h||(h=Ag(k,l));return{la:ud(d,g),Lb:P.Yb(b,"SegmentBase")||c.Lb,Ga:P.Yb(b,"SegmentList")||c.Ga,Nb:P.Yb(b,"SegmentTemplate")||c.Nb,width:P.H(b,"width",e)||c.width,height:P.H(b,"height",e)||c.height,contentType:h,mimeType:k,codecs:l,frameRate:f,emsgSchemeIdUris:n,id:b.getAttribute("id"),Tc:m}}
265
- function Cg(b){for(var c=0;c<b.length;++c){var d=b[c],e=d.getAttribute("schemeIdUri");if(e&&(d=d.getAttribute("value")))switch(e){case "urn:mpeg:dash:outputChannelPositionList:2012":return d.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":e=parseInt(d,10);if(!e)continue;return e;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":if(e=parseInt(d,
266
- 16)){for(b=0;e;)e&1&&++b,e>>=1;return b}}}return null}function Bg(b){var c=b.Lb?1:0;c+=b.Ga?1:0;c+=b.Nb?1:0;if(0==c)return"text"==b.contentType||"application"==b.contentType?!0:!1;1!=c&&(b.Lb&&(b.Ga=null),b.Nb=null);return!0}
267
- function Dg(b,c,d,e){c=ud(c,[d]);c=Sb(c,b.b.retryParameters);c.method=e;c=b.a.networkingEngine.request(4,c);Ob(b.g,c);return c.promise.then(function(b){if("HEAD"==e){if(!b.headers||!b.headers.date)return 0;b=b.headers.date}else b=sc(b.data);b=Date.parse(b);return isNaN(b)?0:b-Date.now()})}
268
- function wg(b,c,d){d=d.map(function(b){return{scheme:b.getAttribute("schemeIdUri"),value:b.getAttribute("value")}});var e=b.b.dash.clockSyncUri;!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e});return td.ue(d,function(b){var d=b.scheme;b=b.value;switch(d){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return Dg(this,c,b,"HEAD");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 Dg(this,
228
+ T.prototype.Tc=function(b){for(var c=[],d=0,e=0;d<this.a.length&&e<b.length;){var f=this.a[d],g=b[e];f.startTime<g.startTime?(c.push(f),d++):(f.startTime>g.startTime?0==d&&c.push(g):(.1<Math.abs(f.endTime-g.endTime)?c.push(new S(f.position,g.startTime,g.endTime,g.c,g.b,g.a)):c.push(f),d++),e++)}for(;d<this.a.length;)c.push(this.a[d++]);if(c.length)for(d=c[c.length-1].position+1;e<b.length;)f=b[e++],f=new S(d++,f.startTime,f.endTime,f.c,f.b,f.a),c.push(f);else c=b;this.a=c};T.prototype.merge=T.prototype.Tc;
229
+ T.prototype.Dc=function(b){for(var c=0;c<this.a.length;++c)if(this.a[c].endTime>b){this.a.splice(0,c);return}this.a=[]};T.prototype.evict=T.prototype.Dc;function dg(b,c){for(;b.a.length;)if(b.a[b.a.length-1].startTime>=c)b.a.pop();else break;for(;b.a.length;)if(0>=b.a[0].endTime)b.a.shift();else break;if(0!=b.a.length){var d=b.a[b.a.length-1];b.a[b.a.length-1]=new S(d.position,d.startTime,c,d.c,d.b,d.a)}};function eg(b){this.b=b;this.a=new P(b,0);fg||(fg=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var fg;eg.prototype.sa=function(){return this.a.sa()};
230
+ function gg(b){var c=hg(b);if(7<c.length)throw new G(2,3,3002);for(var d=0,e=0;e<c.length;e++)d=256*d+c[e];c=d;d=hg(b);a:{for(e=0;e<fg.length;e++)if(Jc(d,fg[e])){e=!0;break a}e=!1}if(e)d=b.b.byteLength-b.a.ba();else{if(8==d.length&&d[1]&224)throw new G(2,3,3001);e=d[0]&(1<<8-d.length)-1;for(var f=1;f<d.length;f++)e=256*e+d[f];d=e}d=b.a.ba()+d<=b.b.byteLength?d:b.b.byteLength-b.a.ba();e=new DataView(b.b.buffer,b.b.byteOffset+b.a.ba(),d);b.a.L(d);return new ig(c,e)}
231
+ function hg(b){var c=b.a.ka(),d;for(d=1;8>=d&&!(c&1<<8-d);d++);if(8<d)throw new G(2,3,3002);var e=new Uint8Array(d);e[0]=c;for(c=1;c<d;c++)e[c]=b.a.ka();return e}function ig(b,c){this.id=b;this.a=c}function jg(b){if(8<b.a.byteLength)throw new G(2,3,3002);if(8==b.a.byteLength&&b.a.getUint8(0)&224)throw new G(2,3,3001);for(var c=0,d=0;d<b.a.byteLength;d++){var e=b.a.getUint8(d);c=256*c+e}return c};function kg(){}
232
+ kg.prototype.parse=function(b,c,d,e){var f;c=new eg(new DataView(c));if(440786851!=gg(c).id)throw new G(2,3,3008);var g=gg(c);if(408125543!=g.id)throw new G(2,3,3009);c=g.a.byteOffset;g=new eg(g.a);for(f=null;g.sa();){var h=gg(g);if(357149030==h.id){f=h;break}}if(!f)throw new G(2,3,3010);g=new eg(f.a);f=1E6;for(h=null;g.sa();){var k=gg(g);if(2807729==k.id)f=jg(k);else if(17545==k.id)if(h=k,4==h.a.byteLength)h=h.a.getFloat32(0);else if(8==h.a.byteLength)h=h.a.getFloat64(0);else throw new G(2,3,3003);
233
+ }if(null==h)throw new G(2,3,3011);g=f/1E9;f=h*g;b=gg(new eg(new DataView(b)));if(475249515!=b.id)throw new G(2,3,3007);return lg(b,c,g,f,d,e)};function lg(b,c,d,e,f,g){function h(){return f}var k=[];b=new eg(b.a);for(var l=null,m=null;b.sa();){var n=gg(b);if(187==n.id){var q=mg(n);q&&(n=d*q.fg,q=c+q.Df,null!=l&&k.push(new S(k.length,l-g,n-g,h,m,q-1)),l=n,m=q)}}null!=l&&k.push(new S(k.length,l-g,e-g,h,m,null));return k}
234
+ function mg(b){var c=new eg(b.a);b=gg(c);if(179!=b.id)throw new G(2,3,3013);b=jg(b);c=gg(c);if(183!=c.id)throw new G(2,3,3012);c=new eg(c.a);for(var d=0;c.sa();){var e=gg(c);if(241==e.id){d=jg(e);break}}return{fg:b,Df:d}};function ng(b,c){var d=Yf(b,c,"Initialization");if(!d)return null;var e=b.B.oa,f=d.getAttribute("sourceURL");f&&(e=Ad(b.B.oa,[f]));f=0;var g=null;if(d=R.J(d,"range",R.oc))f=d.start,g=d.end;return new ag(function(){return e},f,g)}
235
+ function og(b,c){var d=Number(Xf(b,pg,"presentationTimeOffset"))||0,e=Xf(b,pg,"timescale"),f=1;e&&(f=R.nc(e)||1);d=d/f||0;e=ng(b,pg);var g=b.B.contentType;f=b.B.mimeType.split("/")[1];if("text"!=g&&"mp4"!=f&&"webm"!=f)throw new G(2,4,4006);if("webm"==f&&!e)throw new G(2,4,4005);g=Yf(b,pg,"RepresentationIndex");var h=Xf(b,pg,"indexRange"),k=b.B.oa;h=R.oc(h||"");if(g){var l=g.getAttribute("sourceURL");l&&(k=Ad(b.B.oa,[l]));h=R.J(g,"range",R.oc,h)}if(!h)throw new G(2,4,4002);f=qg(b,c,e,k,h.start,h.end,
236
+ f,d);return{createSegmentIndex:f.createSegmentIndex,findSegmentPosition:f.findSegmentPosition,getSegmentReference:f.getSegmentReference,initSegmentReference:e,la:d}}
237
+ function qg(b,c,d,e,f,g,h,k){var l=b.presentationTimeline,m=!b.kb||!b.S.Qc,n=b.S.start,q=b.S.duration,w=c,x=null;return{createSegmentIndex:function(){var b=[w(e,f,g),"webm"==h?w(d.c(),d.b,d.a):null];w=null;return Promise.all(b).then(function(b){var c=b[0];b=b[1]||null;c="mp4"==h?bg(c,f,e,k):(new kg).parse(c,b,e,k);l.sb(c,n);x=new T(c);m&&dg(x,q)})},findSegmentPosition:function(b){return x.find(b)},getSegmentReference:function(b){return x.get(b)}}}function pg(b){return b.Ob};function rg(b,c){var d=ng(b,sg);var e=tg(b);var f=Wf(b,sg),g=f.Za;0==g&&(g=1);var h=0;f.Z?h=f.Z*(g-1):f.N&&0<f.N.length&&(h=f.N[0].start);e={Z:f.Z,startTime:h,Za:g,la:f.la,N:f.N,qb:e};if(!e.Z&&!e.N&&1<e.qb.length)throw new G(2,4,4002);if(!e.Z&&!b.S.duration&&!e.N&&1==e.qb.length)throw new G(2,4,4002);if(e.N&&0==e.N.length)throw new G(2,4,4002);g=f=null;b.ja.id&&b.B.id&&(g=b.ja.id+","+b.B.id,f=c[g]);h=ug(b.S.duration,e.Za,b.B.oa,e);f?(f.Tc(h),g=b.presentationTimeline.Hb(),f.Dc(g-b.S.start)):(b.presentationTimeline.sb(h,
238
+ b.S.start),f=new T(h),g&&b.kb&&(c[g]=f));b.kb&&b.S.Qc||dg(f,b.S.duration);return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:f.find.bind(f),getSegmentReference:f.get.bind(f),initSegmentReference:d,la:e.la}}function sg(b){return b.Ja}
239
+ function ug(b,c,d,e){var f=e.qb.length;e.N&&e.N.length!=e.qb.length&&(f=Math.min(e.N.length,e.qb.length));for(var g=[],h=e.startTime,k=0;k<f;k++){var l=e.qb[k],m=Ad(d,[l.cf]),n=void 0;n=null!=e.Z?h+e.Z:e.N?e.N[k].end:h+b;g.push(new S(k+c,h,n,function(b){return b}.bind(null,m),l.start,l.end));h=n}return g}
240
+ function tg(b){return[b.B.Ja,b.ca.Ja,b.ja.Ja].filter(zd.Ga).map(function(b){return R.R(b,"SegmentURL")}).reduce(function(b,d){return 0<b.length?b:d}).map(function(c){c.getAttribute("indexRange")&&!b.Fd&&(b.Fd=!0);var d=c.getAttribute("media");c=R.J(c,"mediaRange",R.oc,{start:0,end:null});return{cf:d,start:c.start,end:c.end}})};function vg(b,c,d,e){var f=wg(b);var g=Wf(b,xg);var h=Xf(b,xg,"media"),k=Xf(b,xg,"index");g={Z:g.Z,timescale:g.timescale,Za:g.Za,la:g.la,sd:g.sd,N:g.N,Sc:h,Jb:k};h=g.Jb?1:0;h+=g.N?1:0;h+=g.Z?1:0;if(0==h)throw new G(2,4,4002);1!=h&&(g.Jb&&(g.N=null),g.Z=null);if(!g.Jb&&!g.Sc)throw new G(2,4,4002);if(g.Jb){d=b.B.mimeType.split("/")[1];if("mp4"!=d&&"webm"!=d)throw new G(2,4,4006);if("webm"==d&&!f)throw new G(2,4,4005);e=Vf(g.Jb,b.B.id,null,b.bandwidth||null,null);e=Ad(b.B.oa,[e]);b=qg(b,c,f,e,0,null,
241
+ d,g.la)}else g.Z?(e||(b.presentationTimeline.Vc(g.Z),b.presentationTimeline.Wc(b.S.start)),b=yg(b,g)):(h=c=null,b.ja.id&&b.B.id&&(h=b.ja.id+","+b.B.id,c=d[h]),k=zg(b,g),e=!b.kb||!b.S.Qc,c?(e&&dg(new T(k),b.S.duration),c.Tc(k),d=b.presentationTimeline.Hb(),c.Dc(d-b.S.start)):(b.presentationTimeline.sb(k,b.S.start),c=new T(k),h&&b.kb&&(d[h]=c)),e&&dg(c,b.S.duration),b={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:c.find.bind(c),getSegmentReference:c.get.bind(c)});return{createSegmentIndex:b.createSegmentIndex,
242
+ findSegmentPosition:b.findSegmentPosition,getSegmentReference:b.getSegmentReference,initSegmentReference:f,la:g.la}}function xg(b){return b.Qb}
243
+ function yg(b,c){var d=b.S.duration,e=c.Z,f=c.Za,g=c.timescale,h=c.Sc,k=b.bandwidth||null,l=b.B.id,m=b.B.oa;return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0>b||d&&b>=d?null:Math.floor(b/e)},getSegmentReference:function(b){var c=b*e,n=c+e;d&&(n=Math.min(n,d));return 0>n||d&&c>=d?null:new S(b,c,n,function(){var d=Vf(h,l,b+f,k,c*g);return Ad(m,[d])},0,null)}}}
244
+ function zg(b,c){for(var d=[],e=0;e<c.N.length;e++){var f=e+c.Za;d.push(new S(f,c.N[e].start,c.N[e].end,function(b,c,d,e,f,n){b=Vf(b,c,f,d,n);return Ad(e,[b]).map(function(b){return b.toString()})}.bind(null,c.Sc,b.B.id,b.bandwidth||null,b.B.oa,f,c.N[e].eg+c.sd),0,null))}return d}function wg(b){var c=Xf(b,xg,"initialization");if(!c)return null;var d=b.B.id,e=b.bandwidth||null,f=b.B.oa;return new ag(function(){var b=Vf(c,d,null,e,null);return Ad(f,[b])},0,null)};var U={wb:{},Lb:{},ed:function(b,c){U.Lb[b]=c}};A("shaka.media.ManifestParser.registerParserByExtension",U.ed);U.Nb=function(b,c){U.wb[b]=c};A("shaka.media.ManifestParser.registerParserByMime",U.Nb);
245
+ U.Af=function(){var b={};if(sc()){for(var c in U.wb)b[c]=!0;for(var d in U.Lb)b[d]=!0}c={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};d=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var e=d.next();!e.done;e=d.next())e=e.value,b[e]=sc()?!!U.wb[e]:tc(e);for(var f in c)b[f]=sc()?!!U.Lb[f]:tc(c[f]);return b};
246
+ U.create=function(b,c,d,e){return t(function g(){var h,k;return z(g,function(g){switch(g.j){case 1:return y(g,2),u(g,U.He(b,c,d,e),4);case 4:return h=g.o,g["return"](new h);case 2:throw k=Ca(g),k.severity=2,k;}})})};
247
+ U.He=function(b,c,d,e){return t(function g(){var h,k,l,m,n;return z(g,function(g){switch(g.j){case 1:h=U;if(e&&(k=h.wb[e.toLowerCase()]))return g["return"](k);if(l=h.getExtension(b))if(m=h.Lb[l])return g["return"](m);if(e){g.A(2);break}return u(g,h.Oe(b,c,d),3);case 3:if(e=g.o)if(n=U.wb[e])return g["return"](n);case 2:throw new G(2,4,4E3,b);}})})};
248
+ U.Oe=function(b,c,d){return t(function f(){var g,h,k;return z(f,function(f){switch(f.j){case 1:return g=Tb([b],d),g.method="HEAD",u(f,c.request(0,g).promise,2);case 2:return h=f.o,k=h.headers["content-type"],f["return"](k?k.toLowerCase():"")}})})};U.getExtension=function(b){b=(new cb(b)).ia.split("/").pop().split(".");return 1==b.length?"":b.pop().toLowerCase()};U.isSupported=function(b,c){return sc()?c in U.wb||U.getExtension(b)in U.Lb?!0:!1:!1};function W(b,c,d){this.f=b;this.pc=c;this.h=this.g=Infinity;this.a=1;this.b=this.c=null;this.l=0;this.m=!0;this.i=0;this.s=void 0===d?!0:d}A("shaka.media.PresentationTimeline",W);W.prototype.Y=function(){return this.g};W.prototype.getDuration=W.prototype.Y;W.prototype.wa=function(b){this.g=b};W.prototype.setDuration=W.prototype.wa;W.prototype.Te=function(){return this.f};W.prototype.getPresentationStartTime=W.prototype.Te;W.prototype.ce=function(b){this.l=b};W.prototype.setClockOffset=W.prototype.ce;
249
+ W.prototype.Rb=function(b){this.m=b};W.prototype.setStatic=W.prototype.Rb;W.prototype.md=function(b){this.h=b};W.prototype.setSegmentAvailabilityDuration=W.prototype.md;W.prototype.Qf=function(b){this.pc=b};W.prototype.setDelay=W.prototype.Qf;W.prototype.Fe=function(){return this.pc};W.prototype.getDelay=W.prototype.Fe;
250
+ W.prototype.sb=function(b,c){if(0!=b.length){var d=b[b.length-1].endTime+c;this.Wc(b[0].startTime+c);this.a=b.reduce(function(b,c){return Math.max(b,c.endTime-c.startTime)},this.a);this.b=Math.max(this.b,d);null!=this.f&&this.s&&(this.f=(Date.now()+this.l)/1E3-this.b-this.a)}};W.prototype.notifySegments=W.prototype.sb;W.prototype.Wc=function(b){this.c=null==this.c?b:Math.min(this.c,b)};W.prototype.notifyMinSegmentStartTime=W.prototype.Wc;W.prototype.Vc=function(b){this.a=Math.max(this.a,b)};
251
+ W.prototype.notifyMaxSegmentDuration=W.prototype.Vc;W.prototype.offset=function(b){null!=this.c&&(this.c+=b);null!=this.b&&(this.b+=b)};W.prototype.offset=W.prototype.offset;W.prototype.V=function(){return Infinity==this.g&&!this.m};W.prototype.isLive=W.prototype.V;W.prototype.Va=function(){return Infinity!=this.g&&!this.m};W.prototype.isInProgress=W.prototype.Va;W.prototype.Hb=function(){if(Infinity==this.h)return this.i;var b=this.nb()-this.h;return Math.max(this.i,b)};
252
+ W.prototype.getSegmentAvailabilityStart=W.prototype.Hb;W.prototype.de=function(b){this.i=b};W.prototype.setUserSeekStart=W.prototype.de;W.prototype.nb=function(){return this.V()||this.Va()?Math.min(Math.max(0,(Date.now()+this.l)/1E3-this.a-this.f),this.g):this.g};W.prototype.getSegmentAvailabilityEnd=W.prototype.nb;W.prototype.Gb=function(b){var c=Math.max(this.c,this.i);if(Infinity==this.h)return c;var d=this.nb()-this.h;b=Math.min(d+b,this.za());return Math.max(c,b)};
253
+ W.prototype.getSafeSeekRangeStart=W.prototype.Gb;W.prototype.mb=function(){return this.Gb(0)};W.prototype.getSeekRangeStart=W.prototype.mb;W.prototype.za=function(){var b=this.V()||this.Va()?this.pc:0;return Math.max(0,this.nb()-b)};W.prototype.getSeekRangeEnd=W.prototype.za;W.prototype.he=function(){return null==this.f||null!=this.b?!1:!0};W.prototype.usingPresentationStartTime=W.prototype.he;function Ag(b,c,d,e){b=Tb(b,e);if(0!=c||null!=d)b.headers.Range=d?"bytes="+c+"-"+d:"bytes="+c+"-";return b};function Bg(){var b=this;this.a=this.b=null;this.f=[];this.c=null;this.l=[];this.h=1;this.m={};this.s=0;this.v=new Va(5);this.i=new D(function(){Cg(b)});this.g=new Ob}A("shaka.dash.DashParser",Bg);p=Bg.prototype;p.configure=function(b){this.b=b};p.start=function(b,c){var d=this;return t(function f(){var g;return z(f,function(f){switch(f.j){case 1:return d.f=[b],d.a=c,u(f,Dg(d),2);case 2:g=f.o;d.a&&Eg(d,g);if(!d.a)throw new G(2,7,7001);return f["return"](d.c)}})})};
254
+ p.stop=function(){this.b=this.a=null;this.f=[];this.c=null;this.l=[];this.m={};null!=this.i&&(this.i.stop(),this.i=null);return this.g.destroy()};p.update=function(){Dg(this)["catch"](function(b){if(this.a)this.a.onError(b)}.bind(this))};p.onExpirationUpdated=function(){};
255
+ function Dg(b){var c=Date.now(),d=b.a.networkingEngine.request(0,Tb(b.f,b.b.retryParameters));Pb(b.g,d);return d.promise.then(function(c){if(b.a)return c.uri&&!b.f.includes(c.uri)&&b.f.unshift(c.uri),Fg(b,c.data,c.uri)}).then(function(){var d=(Date.now()-c)/1E3;Wa(b.v,1,d);return d})}function Fg(b,c,d){c=R.Sd(c,"MPD");if(!c)throw new G(2,4,4001,d);c=$f(c,b.b.retryParameters,b.b.dash.xlinkFailGracefully,d,b.a.networkingEngine);Pb(b.g,c);return c.promise.then(function(c){return Gg(b,c,d)})}
256
+ function Gg(b,c,d){return t(function f(){var g,h,k,l,m,n,q,w,x,B,C,E,F,V,Y,ma,Aa,da,na,wa,ja,Ta,Ba,tb,Ga,db;return z(f,function(f){switch(f.j){case 1:l=zd;m=R;n=[d];q=m.R(c,"Location").map(m.cc).filter(l.Ga);0<q.length&&(w=Ad(n,q),n=b.f=w);x=m.R(c,"BaseURL").map(m.cc);B=Ad(n,x);C=b.b.dash.ignoreMinBufferTime;E=0;C||(E=m.J(c,"minBufferTime",m.Ba));b.s=m.J(c,"minimumUpdatePeriod",m.Ba,-1);F=m.J(c,"availabilityStartTime",m.vf);V=m.J(c,"timeShiftBufferDepth",m.Ba);Y=m.J(c,"suggestedPresentationDelay",
257
+ m.Ba);ma=m.J(c,"maxSegmentDuration",m.Ba);Aa=c.getAttribute("type")||"static";b.c?da=b.c.presentationTimeline:(na=Math.max(b.b.dash.defaultPresentationDelay,1.5*E),wa=null!=Y?Y:na,da=new W(F,wa,b.b.dash.autoCorrectDrift));ja={kb:"static"!=Aa,presentationTimeline:da,ja:null,S:null,ca:null,B:null,bandwidth:0,Fd:!1};for(var uc=ja,ub=B,Eb=R.J(c,"mediaPresentationDuration",R.Ba),vb=[],Ha=0,vc=R.R(c,"Period"),fb=0;fb<vc.length;fb++){var Ia=vc[fb];Ha=R.J(Ia,"start",R.Ba,Ha);var wd=R.J(Ia,"duration",R.Ba),
258
+ wb=null;if(fb!=vc.length-1){var eb=R.J(vc[fb+1],"start",R.Ba);null!=eb&&(wb=eb-Ha)}else null!=Eb&&(wb=Eb-Ha);null==wb&&(wb=wd);Ia=Hg(b,uc,ub,{start:Ha,duration:wb,node:Ia,Qc:null==wb||fb==vc.length-1});vb.push(Ia);wd=uc.ja.id;b.l.includes(wd)||(b.l.push(wd),b.c&&(b.a.filterNewPeriod(Ia),b.c.periods.push(Ia)));if(null==wb){Ha=null;break}Ha+=wb}null==b.c&&b.a.filterAllPeriods(vb);null!=Eb?(g=vb,h=Eb,k=!1):(g=vb,h=Ha,k=!0);Ta=h;Ba=g;da.Rb("static"==Aa);"static"!=Aa&&k||da.wa(Ta||Infinity);(tb=da.V())&&
259
+ !isNaN(b.b.availabilityWindowOverride)&&(V=b.b.availabilityWindowOverride);null==V&&(V=Infinity);da.md(V);da.Vc(ma||1);if(b.c){f.A(0);break}b.c={presentationTimeline:da,periods:Ba,offlineSessionIds:[],minBufferTime:E||0};if(!da.he()){f.A(0);break}Ga=m.R(c,"UTCTiming");return u(f,Ig(b,B,Ga),4);case 4:db=f.o;if(!b.a)return f["return"]();da.ce(db);v(f)}})})}
260
+ function Hg(b,c,d,e){c.ja=Jg(e.node,null,d);c.S=e;c.ja.id||(c.ja.id="__shaka_period_"+e.start);R.R(e.node,"EventStream").forEach(b.wf.bind(b,e.start,e.duration));d=R.R(e.node,"AdaptationSet").map(b.uf.bind(b,c)).filter(zd.Ga);if(c.kb){c=[];for(var f=r(d),g=f.next();!g.done;g=f.next()){g=r(g.value.Gf);for(var h=g.next();!h.done;h=g.next())c.push(h.value)}if(c.length!=(new Set(c)).size)throw new G(2,4,4018);}var k=d.filter(function(b){return!b.qd});d.filter(function(b){return b.qd}).forEach(function(b){var c=
261
+ b.streams[0],d=b.qd;k.forEach(function(b){b.id==d&&b.streams.forEach(function(b){b.trickModeVideo=c})})});c=Kg(k,"video");f=Kg(k,"audio");if(!c.length&&!f.length)throw new G(2,4,4004);f.length||(f=[null]);c.length||(c=[null]);d=[];for(g=0;g<f.length;g++)for(h=0;h<c.length;h++)Lg(b,f[g],c[h],d);b=Kg(k,"text");c=[];for(f=0;f<b.length;f++)c.push.apply(c,b[f].streams);return{startTime:e.start,textStreams:c,variants:d}}function Kg(b,c){return b.filter(function(b){return b.contentType==c})}
262
+ function Lg(b,c,d,e){if(c||d)if(c&&d){var f=c.drmInfos;var g=d.drmInfos;if(f.length&&g.length?0<qd(f,g).length:1){g=qd(c.drmInfos,d.drmInfos);for(var h=0;h<c.streams.length;h++)for(var k=0;k<d.streams.length;k++)f=(d.streams[k].bandwidth||0)+(c.streams[h].bandwidth||0),f={id:b.h++,language:c.language,primary:c.Rc||d.Rc,audio:c.streams[h],video:d.streams[k],bandwidth:f,drmInfos:g,allowedByApplication:!0,allowedByKeySystem:!0},e.push(f)}}else for(g=c||d,h=0;h<g.streams.length;h++)f=g.streams[h].bandwidth||
263
+ 0,f={id:b.h++,language:g.language||"und",primary:g.Rc,audio:c?g.streams[h]:null,video:d?g.streams[h]:null,bandwidth:f,drmInfos:g.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},e.push(f)}
264
+ p.uf=function(b,c){b.ca=Jg(c,b.ja,null);var d=!1,e=R.R(c,"Role"),f=e.map(function(b){return b.getAttribute("value")}).filter(zd.Ga),g=void 0,h="text"==b.ca.contentType;h&&(g="subtitle");for(var k=0;k<e.length;k++){var l=e[k].getAttribute("schemeIdUri");if(null==l||"urn:mpeg:dash:role:2011"==l)switch(l=e[k].getAttribute("value"),l){case "main":d=!0;break;case "caption":case "subtitle":g=l}}var m=null,n=!1;R.R(c,"EssentialProperty").forEach(function(b){"http://dashif.org/guidelines/trickmode"==b.getAttribute("schemeIdUri")?
265
+ m=b.getAttribute("value"):n=!0});k=R.R(c,"Accessibility");var q=new Map;e={};k=r(k);for(l=k.next();!l.done;e={Db:e.Db},l=k.next()){var w=l.value;l=w.getAttribute("schemeIdUri");w=w.getAttribute("value");"urn:scte:dash:cc:cea-608:2015"==l||"urn:scte:dash:cc:cea-708:2015"==l?(e.Db=1,null!=w?w.split(";").forEach(function(b){return function(c){if(c.includes("=")){c=c.split("=");var d=c[0].startsWith("CC")?c[0]:"CC"+c[0];c=c[1].split(",")[0].split(":").pop()}else d="CC"+b.Db,b.Db+=2;q.set(d,M(c))}}(e)):
266
+ q.set("CC1","und")):"urn:mpeg:dash:role:2011"==l&&null!=w&&(f.push(w),"captions"==w&&(g="caption"))}if(n)return null;e=R.R(c,"ContentProtection");var x=Nf(e,this.b.dash.customScheme,this.b.dash.ignoreDrmInfo);e=M(c.getAttribute("lang")||"und");l=c.getAttribute("label");k=R.R(c,"Representation");f=k.map(this.xf.bind(this,b,x,g,e,l,d,f,q)).filter(function(b){return!!b});if(0==f.length){if(h)return null;throw new G(2,4,4003);}b.ca.contentType&&"application"!=b.ca.contentType||(b.ca.contentType=Mg(f[0].mimeType,
267
+ f[0].codecs),f.forEach(function(c){c.type=b.ca.contentType}));f.forEach(function(b){x.drmInfos.forEach(function(c){b.keyId&&c.keyIds.push(b.keyId)})});h=k.map(function(b){return b.getAttribute("id")}).filter(zd.Ga);return{id:b.ca.id||"__fake__"+this.h++,contentType:b.ca.contentType,language:e,Rc:d,streams:f,drmInfos:x.drmInfos,qd:m,Gf:h}};
268
+ p.xf=function(b,c,d,e,f,g,h,k,l){b.B=Jg(l,b.ca,null);if(!Ng(b.B))return null;b.bandwidth=R.J(l,"bandwidth",R.nc)||0;var m=b.B.contentType;m="text"==m||"application"==m;try{var n=this.Hf.bind(this);if(b.B.Ob)var q=og(b,n);else if(b.B.Ja)q=rg(b,this.m);else if(b.B.Qb)q=vg(b,n,this.m,!!this.c);else{var w=b.B.oa,x=b.S.duration||0;q={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0<=b&&b<x?1:null},getSegmentReference:function(b){return 1!=b?null:new S(1,0,x,function(){return w},
269
+ 0,null)},initSegmentReference:null,la:0}}}catch(B){if(m&&4002==B.code)return null;throw B;}l=R.R(l,"ContentProtection");l=Qf(l,this.b.dash.customScheme,c,this.b.dash.ignoreDrmInfo);return{id:this.h++,originalId:b.B.id,createSegmentIndex:q.createSegmentIndex,findSegmentPosition:q.findSegmentPosition,getSegmentReference:q.getSegmentReference,initSegmentReference:q.initSegmentReference,presentationTimeOffset:q.la,mimeType:b.B.mimeType,codecs:b.B.codecs,frameRate:b.B.frameRate,bandwidth:b.bandwidth,width:b.B.width,
270
+ height:b.B.height,kind:d,encrypted:0<c.drmInfos.length,keyId:l,language:e,label:f,type:b.ca.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.B.emsgSchemeIdUris,roles:h,channelsCount:b.B.Xc,closedCaptions:k}};function Cg(b){t(function d(){var e,f;return z(d,function(d){switch(d.j){case 1:return e=0,y(d,2),u(d,Dg(b),4);case 4:e=d.o;za(d,3);break;case 2:f=Ca(d),b.a&&(f.severity=1,b.a.onError(f));case 3:if(!b.a)return d["return"]();Eg(b,e);v(d)}})})}
271
+ function Eg(b,c){0>b.s||b.i.O(Math.max(3,b.s-c,Xa(b.v)))}
272
+ function Jg(b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,Xc:null};d=d||c.oa;var e=R.vb,f=R.Ae,g=R.R(b,"BaseURL").map(R.cc),h=b.getAttribute("contentType")||c.contentType,k=b.getAttribute("mimeType")||c.mimeType,l=b.getAttribute("codecs")||c.codecs;f=R.J(b,"frameRate",f)||c.frameRate;var m=R.R(b,"InbandEventStream"),n=c.emsgSchemeIdUris.slice();m=r(m);for(var q=m.next();!q.done;q=m.next())q=q.value.getAttribute("schemeIdUri"),n.includes(q)||n.push(q);m=R.R(b,
273
+ "AudioChannelConfiguration");m=Og(m)||c.Xc;h||(h=Mg(k,l));return{oa:Ad(d,g),Ob:R.ac(b,"SegmentBase")||c.Ob,Ja:R.ac(b,"SegmentList")||c.Ja,Qb:R.ac(b,"SegmentTemplate")||c.Qb,width:R.J(b,"width",e)||c.width,height:R.J(b,"height",e)||c.height,contentType:h,mimeType:k,codecs:l,frameRate:f,emsgSchemeIdUris:n,id:b.getAttribute("id"),Xc:m}}
274
+ function Og(b){for(var c=0;c<b.length;++c){var d=b[c],e=d.getAttribute("schemeIdUri");if(e&&(d=d.getAttribute("value")))switch(e){case "urn:mpeg:dash:outputChannelPositionList:2012":return d.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":e=parseInt(d,10);if(!e)continue;return e;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":if(e=parseInt(d,
275
+ 16)){for(b=0;e;)e&1&&++b,e>>=1;return b}}}return null}function Ng(b){var c=b.Ob?1:0;c+=b.Ja?1:0;c+=b.Qb?1:0;if(0==c)return"text"==b.contentType||"application"==b.contentType?!0:!1;1!=c&&(b.Ob&&(b.Ja=null),b.Qb=null);return!0}
276
+ function Pg(b,c,d,e){c=Ad(c,[d]);c=Tb(c,b.b.retryParameters);c.method=e;c=b.a.networkingEngine.request(4,c);Pb(b.g,c);return c.promise.then(function(b){if("HEAD"==e){if(!b.headers||!b.headers.date)return 0;b=b.headers.date}else b=Ac(b.data);b=Date.parse(b);return isNaN(b)?0:b-Date.now()})}
277
+ function Ig(b,c,d){d=d.map(function(b){return{scheme:b.getAttribute("schemeIdUri"),value:b.getAttribute("value")}});var e=b.b.dash.clockSyncUri;!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e});return zd.ye(d,function(b){var d=b.scheme;b=b.value;switch(d){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return Pg(this,c,b,"HEAD");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 Pg(this,
269
278
  c,b,"GET");case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return d=Date.parse(b),isNaN(d)?0:d-Date.now();case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":return $a("NTP UTCTiming scheme is not supported"),Promise.reject();default:return $a("Unrecognized scheme in UTCTiming element",d),Promise.reject()}}.bind(b))["catch"](function(){$a("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!");
270
- return 0})}p.sf=function(b,c,d){var e=P.rb,f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=P.H(d,"timescale",e)||1;P.P(d,"Event").forEach(function(d){var k=P.H(d,"presentationTime",e)||0,m=P.H(d,"duration",e)||0;k=k/h+b;m=k+m/h;null!=c&&(k=Math.min(k,b+c),m=Math.min(m,b+c));d={schemeIdUri:f,value:g,startTime:k,endTime:m,id:d.getAttribute("id")||"",eventElement:d};this.a.onTimelineRegionAdded(d)}.bind(this))};
271
- p.Df=function(b,c,d){b=og(b,c,d,this.b.retryParameters);b=this.a.networkingEngine.request(1,b);Ob(this.g,b);return b.promise.then(function(b){return b.data})};function Ag(b,c){return Wd(ic(b,c))?"text":b.split("/")[0]}U.$c("mpd",pg);U.Kb("application/dash+xml",pg);function Eg(b,c,d,e){this.b=b;this.type=c;this.a=d;this.segments=e||null}function Fg(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=void 0===e?null:e}Fg.prototype.toString=function(){function b(b){return b.name+"="+(isNaN(Number(b.value))?'"'+b.value+'"':b.value)}var c="#"+this.name,d=this.a?this.a.map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};function Gg(b,c){this.name=b;this.value=c}
272
- Fg.prototype.getAttribute=function(b){var c=this.a.filter(function(c){return c.name==b});return c.length?c[0]:null};function Hg(b,c,d){return(b=b.getAttribute(c))?b.value:d||null}function Ig(b,c){this.b=c;this.a=b};var Jg={hb:function(b,c){return b.filter(function(b){return b.name==c})},Pa:function(b,c){var d=Jg.hb(b,c);return d.length?d[0]:null},Cc:function(b,c,d){return b.filter(function(b){var e=b.getAttribute("TYPE");b=b.getAttribute("GROUP-ID");return e.value==c&&b.value==d})},vc:function(b,c){return ud([b],[c])[0]},Kc:function(b){return/^#(?!EXT)/m.test(b)}};function Kg(b){this.b=b;this.a=0}function Lg(b){Mg(b,/[ \t]+/gm)}function Mg(b,c){c.lastIndex=b.a;var d=c.exec(b.b);d=null==d?null:{position:d.index,length:d[0].length,Ff:d};if(b.a==b.b.length||null==d||d.position!=b.a)return null;b.a+=d.length;return d.Ff}function Ng(b){return b.a==b.b.length?null:(b=Mg(b,/[^ \t\n]*/gm))?b[0]:null};function Og(){this.a=0}
273
- function Pg(b,c,d){c=sc(c);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var e=c.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(e[0]))throw new D(2,4,4015);c=0;for(var f=1;f<e.length;f++)if(!Jg.Kc(e[f])){var g=Qg(b,e[f]);--b.a;if(Rg.includes(g.name)){c=1;break}else"EXT-X-STREAM-INF"==g.name&&(f+=1)}f=[];for(g=1;g<e.length;)if(Jg.Kc(e[g]))g+=1;else{var h=Qg(b,e[g]);if(Sg.includes(h.name)){if(1!=c)throw new D(2,4,4017);e=e.splice(g,e.length-g);b=Tg(b,d,e,f);return new Eg(d,c,f,b)}f.push(h);g+=1;"EXT-X-STREAM-INF"==
274
- h.name&&(h.a.push(new Gg("URI",e[g])),g+=1)}return new Eg(d,c,f)}function Tg(b,c,d,e){var f=[],g=[];d.forEach(function(d){if(/^(#EXT)/.test(d))d=Qg(b,d),Rg.includes(d.name)?e.push(d):g.push(d);else{if(Jg.Kc(d))return[];d=Jg.vc(c,d.trim());f.push(new Ig(d,g));g=[]}});return f}
275
- function Qg(b,c){var d=b.a++,e=c.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!e)throw new D(2,4,4016,c);var f=e[1],g=e[2];e=[];var h;if(g){g=new Kg(g);var k;(k=Mg(g,/^([^,=]+)(?:,|$)/g))&&(h=k[1]);for(var l=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;k=Mg(g,l);)e.push(new Gg(k[1],k[2]||k[3]))}return new Fg(d,f,e,h)}var Rg="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),Sg="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function Ug(b){try{var c=Ug.parse(b);return Cb({uri:b,data:c.data,headers:{"content-type":c.contentType}})}catch(d){return Ab(d)}}z("shaka.net.DataUriPlugin",Ug);
276
- Ug.parse=function(b){var c=b.split(":");if(2>c.length||"data"!=c[0])throw new D(2,1,1004,b);c=c.slice(1).join(":").split(",");if(2>c.length)throw new D(2,1,1004,b);var d=c[0];c=window.decodeURIComponent(c.slice(1).join(","));d=d.split(";");var e=null;1<d.length&&(e=d[1]);if("base64"==e)b=Bc(c).buffer;else{if(e)throw new D(2,1,1005,b);b=yc(c)}return{data:b,contentType:d[0]}};Rb("data",Ug);function Vg(){var b=this;this.c=this.g=null;this.W=1;this.C=new Map;this.S=new Set;this.a=new Map;this.b=null;this.v="";this.o=new Og;this.N=0;this.h=new B(function(){Wg(b)});this.f=Xg;this.m=null;this.w=0;this.F=Infinity;this.i=new Nb;this.K=[];this.j=new Map;this.V=!1}z("shaka.hls.HlsParser",Vg);p=Vg.prototype;p.configure=function(b){this.c=b};
277
- p.start=function(b,c){var d=this;return t(function f(){var g,h;return y(f,function(f){switch(f.l){case 1:return d.g=c,u(f,Yg(d,b),2);case 2:return g=f.s,d.v=g.uri,u(f,Zg(d,g.data),3);case 3:return h=d.N,0<h&&d.h.O(h),f["return"](d.m)}})})};p.stop=function(){this.h&&(this.h.stop(),this.h=null);var b=[];this.i&&(b.push(this.i.destroy()),this.i=null);this.c=this.g=null;this.C.clear();this.S.clear();this.a.clear();this.m=null;return Promise.all(b)};
278
- p.update=function(){if(this.f!=$g.Ma){for(var b=[],c=r(this.a.values()),d=c.next();!d.done;d=c.next())b.push(ah(this,d.value));return Promise.all(b)}};
279
- function ah(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w,A;return y(e,function(e){switch(e.l){case 1:return f=Jg,g=$g,h=c.me,u(e,Yg(b,h),2);case 2:k=e.s;l=Pg(b.o,k.data,k.uri);if(1!=l.type)throw new D(2,4,4017);n=(m=f.Pa(l.a,"EXT-X-MEDIA-SEQUENCE"))?Number(m.value):0;q=c.stream;return u(e,bh(b,c.pc,l,n,q.mimeType,q.codecs),3);case 3:x=e.s;c.Mb.a=x;w=x[x.length-1];if(A=f.Pa(l.a,"EXT-X-ENDLIST"))ch(b,g.Ma),b.b.ta(w.endTime);v(e)}})})}p.onExpirationUpdated=function(){};
280
- function Zg(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w,A;return y(e,function(e){switch(e.l){case 1:f=Pg(b.o,c,b.v);if(0!=f.type)throw new D(2,4,4022);return u(e,dh(b,f),2);case 2:g=e.s;if(!b.g)throw new D(2,7,7001);if(b.V&&0==g.variants.length)throw new D(2,4,4034);b.g.filterAllPeriods([g]);h=Infinity;k=0;l=Infinity;for(var E=r(b.a.values()),F=E.next();!F.done;F=E.next())m=F.value,h=Math.min(h,m.Qc),k=Math.max(k,m.Qc),"text"!=m.stream.type&&(l=Math.min(l,m.duration));b.f!=$g.Ma?(b.b=new W(0,
281
- 3*b.w),b.b.Ob(!1)):(b.b=new W(null,0),b.b.Ob(!0));eh(b);if(b.f!=$g.Ma){b.N=b.F;n=$g;b.f==n.od&&(q=b.b.lc,isNaN(b.c.availabilityWindowOverride)||(q=b.c.availabilityWindowOverride),b.b.gd(q));for(x=0;95443.7176888889<=k;)x+=95443.7176888889,k-=95443.7176888889;if(x)for(E=r(b.a.values()),F=E.next();!F.done;F=E.next())w=F.value,95443.7176888889>w.Qc&&(w.stream.presentationTimeOffset=-x,w.Mb.offset(x))}else for(b.b.ta(l),b.b.offset(-h),E=r(b.a.values()),F=E.next();!F.done;F=E.next())A=F.value,A.stream.presentationTimeOffset=
282
- h,A.Mb.offset(-h),Sf(A.Mb,l);b.m={presentationTimeline:b.b,periods:[g],offlineSessionIds:[],minBufferTime:0};v(e)}})})}
283
- function dh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w,A,C;return y(e,function(e){switch(e.l){case 1:return f=Jg,g=td,h=c.a,k=f.hb(c.a,"EXT-X-MEDIA"),l=k.filter(function(b){return"SUBTITLES"==fh(b,"TYPE")}.bind(b)),m=l.map(function(b){return gh(this,b)}.bind(b)),n=k.filter(function(b){return"CLOSED-CAPTIONS"==fh(b,"TYPE")}),hh(b,n),u(e,Promise.all(m),2);case 2:return q=e.s,x=f.hb(h,"EXT-X-STREAM-INF"),w=x.map(function(b){return ih(this,b,c)}.bind(b)),u(e,Promise.all(w),3);case 3:return A=
284
- e.s,C=A.reduce(g.uc,[]),C=C.filter(function(b){return null!=b}),e["return"]({startTime:0,variants:C,textStreams:q})}})})}
285
- function ih(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w,A,C,E,F,V,Y,wa,Ba,ba,na,xa,ja,Va,Ca,vb,Ia,eb,fb;return y(f,function(f){switch(f.l){case 1:g=wd;h=Jg;k=Hg(c,"CODECS","avc1.42E01E,mp4a.40.2");l=jh(k.split(/\s*,\s*/));m=c.getAttribute("RESOLUTION");q=n=null;x=Hg(c,"FRAME-RATE");w=Number(fh(c,"BANDWIDTH"));m&&(A=m.value.split("x"),n=A[0],q=A[1]);C=h.hb(d.a,"EXT-X-MEDIA");C=C.filter(function(b){return"CLOSED-CAPTIONS"!=fh(b,"TYPE")});C=C.filter(function(b){var c=Hg(b,"URI")||"";return"SUBTITLES"==
286
- (Hg(b,"TYPE")||"")||""!=c});E=Hg(c,"AUDIO");F=Hg(c,"VIDEO");E?C=h.Cc(C,"AUDIO",E):F&&(C=h.Cc(C,"VIDEO",F));if(V=kh(g.na,l)){if(Y=Hg(c,"SUBTITLES"))wa=h.Cc(C,"SUBTITLES",Y),wa.length&&(Ba=b.C.get(wa[0].id),Ba.stream.codecs=V);Kb(l,V)}ba=C.map(function(b){return lh(this,b,l)}.bind(b));na=[];xa=[];return u(f,Promise.all(ba),2);case 2:Va=f.s;Va=Va.filter(function(b){return null!=b});E?na=Va:F&&(xa=Va);vb=!1;na.length||xa.length?na.length?(eb=fh(c,"URI"),fb=na[0].pc,eb==fb?(Ca=g.wb,vb=!0):Ca=g.La):Ca=
287
- g.wb:1==l.length?(Ia=kh(g.La,l),Ca=m||x||Ia?g.La:g.wb):(Ca=g.La,l=[l.join(",")]);if(vb){f.A(3);break}return u(f,mh(b,c,l,Ca),4);case 4:ja=f.s;case 3:if(ja)ja.stream.type==g.wb?na=[ja]:xa=[ja];else if(null===ja)return f["return"]([]);xa&&nh(xa);na&&nh(na);return f["return"](oh(b,na,xa,w,n,q,x))}})})}function nh(b){b.forEach(function(b){var c=b.stream.codecs.split(",");c=c.filter(function(b){return"mp4a.40.34"!=b});b.stream.codecs=c.join(",")})}
288
- function oh(b,c,d,e,f,g,h){d.forEach(function(b){if(b=b.stream)b.width=Number(f)||void 0,b.height=Number(g)||void 0,b.frameRate=Number(h)||void 0}.bind(b));c.length||(c=[null]);d.length||(d=[null]);var k=[];c=r(c);for(var l=c.next();!l.done;l=c.next()){l=l.value;for(var m=r(d),n=m.next();!n.done;n=m.next()){var q=n.value;n=l?l.stream:null;var x=q?q.stream:null,w=l?l.drmInfos:null,A=q?q.drmInfos:null;q=(q?q.pc:"")+" - "+(l?l.pc:"");var C=void 0;if(n&&x)if(w.length&&A.length?0<ld(w,A).length:1)C=ld(w,
289
- A);else continue;else n?C=w:x&&(C=A);b.S.has(q)||(n=ph(b,n,x,e,C),k.push(n),b.S.add(q))}}return k}function ph(b,c,d,e,f){return{id:b.W++,language:c?c.language:"und",primary:!!c&&c.primary||!!d&&d.primary,audio:c,video:d,bandwidth:e,drmInfos:f,allowedByApplication:!0,allowedByKeySystem:!0}}function gh(b,c){return t(function e(){var f;return y(e,function(e){switch(e.l){case 1:return fh(c,"TYPE"),u(e,lh(b,c,[]),2);case 2:return f=e.s,e["return"](f.stream)}})})}
290
- function hh(b,c){for(var d=r(c),e=d.next();!e.done;e=d.next()){e=e.value;fh(e,"TYPE");var f=Hg(e,"LANGUAGE")||"und";f=M(f);var g=fh(e,"GROUP-ID");e=fh(e,"INSTREAM-ID");b.j.get(g)||b.j.set(g,new Map);b.j.get(g).set(e,f)}}
291
- function lh(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w,A,C;return y(f,function(f){switch(f.l){case 1:g=fh(c,"URI");if(b.a.has(g))return f["return"](b.a.get(g));h=fh(c,"TYPE").toLowerCase();k=wd;"subtitles"==h&&(h=k.na);l=M(Hg(c,"LANGUAGE","und"));m=Hg(c,"NAME");n=c.getAttribute("DEFAULT");q=c.getAttribute("AUTOSELECT");x=Hg(c,"CHANNELS");if("audio"==h)if(x){var E=x.split("/")[0];E=parseInt(E,10)}else E=null;else E=null;w=E;A=!!n||!!q;return u(f,qh(b,g,d,h,l,A,m,w,null),2);case 2:C=f.s;if(null==
292
- C)return f["return"](null);if(b.a.has(g))return f["return"](b.a.get(g));b.C.set(c.id,C);b.a.set(g,C);return f["return"](C)}})})}
293
- function mh(b,c,d,e){return t(function g(){var h,k,l,m,n;return y(g,function(g){switch(g.l){case 1:h=wd;k=fh(c,"URI");if(b.a.has(k))return g["return"](b.a.get(k));l=Hg(c,"CLOSED-CAPTIONS");m=null;e==h.La&&l&&"NONE"!=l&&(m=b.j.get(l));return u(g,qh(b,k,d,e,"und",!1,null,null,m),2);case 2:n=g.s;if(null==n)return g["return"](null);if(b.a.has(k))return g["return"](b.a.get(k));b.a.set(k,n);return g["return"](n)}})})}
294
- function qh(b,c,d,e,f,g,h,k,l){return t(function n(){var q,x,w,A,C,E,F,V,Y,wa,Ba,ba,na,xa,ja,Va,Ca,vb,Ia,eb,fb,vc,wb,Hb,xb,Ja;return y(n,function(n){switch(n.l){case 1:return q=Jg,x=q.vc(b.v,c),A="",u(n,Yg(b,x),2);case 2:E=n.s;x=E.uri;w=Pg(b.o,E.data,x);if(1!=w.type)throw new D(2,4,4017);F=[];w.segments.forEach(function(b){b=q.hb(b.b,"EXT-X-KEY");F.push.apply(F,b)});V=!1;Y=[];wa=null;for(var gb=r(F),Ka=gb.next();!Ka.done;Ka=gb.next())if(Ba=Ka.value,ba=fh(Ba,"METHOD"),"NONE"!=ba){V=!0;if("AES-128"==
295
- ba)return b.V=!0,n["return"](null);na=fh(Ba,"KEYFORMAT");if(ja=(xa=rh[na])?xa(Ba):null)ja.keyIds.length&&(wa=ja.keyIds[0]),Y.push(ja)}if(V&&!Y.length)throw new D(2,4,4026);sh(b,w);A=th(e,d);return u(n,uh(b,e,A,w),3);case 3:return C=Va=n.s,vb=(Ca=q.Pa(w.a,"EXT-X-MEDIA-SEQUENCE"))?Number(Ca.value):0,u(n,bh(b,c,w,vb,C,A),4);case 4:return Ia=n.s,eb=Ia[0].startTime,fb=Ia[Ia.length-1].endTime,vc=fb-eb,wb=new T(Ia),Hb=vh(w),xb=void 0,"text"==e&&(xb="subtitle"),Ja={id:b.W++,originalId:h,createSegmentIndex:Promise.resolve.bind(Promise),
296
- findSegmentPosition:wb.find.bind(wb),getSegmentReference:wb.get.bind(wb),initSegmentReference:Hb,presentationTimeOffset:0,mimeType:C,codecs:A,kind:xb,encrypted:V,keyId:wa,language:f,label:h,type:e,primary:g,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:k,closedCaptions:l},n["return"]({stream:Ja,Mb:wb,drmInfos:Y,pc:c,me:x,Qc:eb,qg:fb,duration:vc})}})})}
297
- function sh(b,c){var d=$g,e=Jg.Pa(c.a,"EXT-X-PLAYLIST-TYPE"),f=Jg.Pa(c.a,"EXT-X-ENDLIST");f=e&&"VOD"==e.value||f;e=e&&"EVENT"==e.value&&!f;e=!f&&!e;f?ch(b,d.Ma):(e?ch(b,d.od):ch(b,d.he),d=wh(c.a,"EXT-X-TARGETDURATION"),d=Number(d.value),b.w=Math.max(d,b.w),b.F=Math.min(d,b.F))}
298
- function vh(b){var c=Jg.hb(b.a,"EXT-X-MAP");if(!c.length)return null;if(1<c.length)throw new D(2,4,4020);c=c[0];var d=fh(c,"URI"),e=Jg.vc(b.b,d);b=0;d=null;if(c=Hg(c,"BYTERANGE"))b=c.split("@"),c=Number(b[0]),b=Number(b[1]),d=b+c-1;return new If(function(){return[e]},b,d)}
299
- function xh(b,c,d,e){var f=c.b,g=c.a;c=wh(f,"EXTINF").value.split(",");c=e+Number(c[0]);var h=0,k=null;if(f=Jg.Pa(f,"EXT-X-BYTERANGE"))h=f.value.split("@"),f=Number(h[0]),h=h[1]?Number(h[1]):b.a+1,k=h+f-1;return new Q(d,e,c,function(){return[g]},h,k)}function eh(b){b.b&&(b.K.forEach(function(c){b.b.ob(c,0)}),b.K=[])}
300
- function bh(b,c,d,e,f,g){return t(function k(){var l,m,n,q,x,w,A,C,E,F,V;return y(k,function(k){switch(k.l){case 1:return l=d.segments,m=[],n=l[0].a,q=xh(null,l[0],e,0),x=vh(d),u(k,yh(b,c,x,q,f,g),2);case 2:w=k.s;n.split("/").pop();for(var Y=0;Y<l.length;++Y)A=l[Y],C=m[m.length-1],E=0==Y?w:C.endTime,F=e+Y,V=xh(C,A,F,E),m.push(V);b.K.push(m);eh(b);return k["return"](m)}})})}
301
- function zh(b,c){return t(function e(){var f,g,h,k,l,m;return y(e,function(e){switch(e.l){case 1:return f=Pb,g=og(c.c(),c.b,c.b+2048-1,b.c.retryParameters),h=og(c.c(),c.b,c.a,b.c.retryParameters),ya(e,2),u(e,Ah(b,g,f.pd),4);case 4:return k=e.s,e["return"](k);case 2:l=Da(e);if(7001==l.code)throw l;$a("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.",g.uris[0]);return u(e,Ah(b,h,f.pd),
302
- 5);case 5:return m=e.s,e["return"](m)}})})}
303
- function yh(b,c,d,e,f,g){return t(function k(){var l,m,n,q,x,w,A,C,E;return y(k,function(k){switch(k.l){case 1:if(b.m&&(l=b.a.get(c),m=l.Mb,n=m.get(e.position)))return k["return"](n.startTime);if("audio/mpeg"==f)return k["return"](0);if("video/mp4"!=f&&"audio/mp4"!=f){k.A(2);break}q=[zh(b,e)];d&&q.push(zh(b,d));return u(k,Promise.all(q),3);case 3:return x=k.s,w=x[0],A=x[1]||x[0],k["return"](Bh(w.data,A.data));case 2:if("video/mp2t"!=f){k.A(4);break}return u(k,zh(b,e),5);case 5:return C=k.s,k["return"](Ch(C.data));
304
- case 4:if("application/mp4"!=f&&!f.startsWith("text/")){k.A(6);break}return u(k,zh(b,e),7);case 7:return E=k.s,k["return"](Dh(f,g,E.data));case 6:throw new D(2,4,4030);}})})}
305
- function Bh(b,c){var d=0;(new S).G("moov",Mf).G("trak",Mf).G("mdia",Mf).ca("mdhd",function(b){b.reader.J(0==b.version?8:16);d=b.reader.D();b.parser.stop()}).parse(c,!0);if(!d)throw new D(2,4,4030);var e=0,f=!1;(new S).G("moof",Mf).G("traf",Mf).ca("tfdt",function(b){e=(0==b.version?b.reader.D():b.reader.ub())/d;f=!0;b.parser.stop()}).parse(b,!0);if(!f)throw new D(2,4,4030);return e}
306
- function Ch(b){function c(){throw new D(2,4,4030);}b=new R(new DataView(b),0);for(var d=0,e=0;;)if(d=b.aa(),e=b.ha(),71!=e&&c(),b.Jb()&16384||c(),e=(b.ha()&48)>>4,0!=e&&2!=e||c(),3==e&&(e=b.ha(),b.J(e)),1!=b.D()>>8)b.seek(d+188),e=b.ha(),71!=e&&(b.seek(d+192),e=b.ha()),71!=e&&(b.seek(d+204),e=b.ha()),71!=e&&c(),b.Xd(1);else return b.J(3),d=b.ha()>>6,0!=d&&1!=d||c(),0==b.ha()&&c(),d=b.ha(),e=b.Jb(),b=b.Jb(),(1073741824*((d&14)>>1)+((e&65534)<<14|(b&65534)>>1))/9E4}
307
- function Dh(b,c,d){b=ic(b,c);if(!Wd(b))return 0;c=new Ud(null);Xd(c,b);return c.Hc(d)}function jh(b){var c=new Set,d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=lc(e)[0];c.has(f)||(d.push(e),c.add(f))}return d}function kh(b,c){for(var d=Eh[b],e=0;e<d.length;e++)for(var f=0;f<c.length;f++)if(d[e].test(c[f].trim()))return c[f].trim();return"text"==b?"":null}function th(b,c){if(1==c.length)return c[0];var d=kh(b,c);if(null!=d)return d;throw new D(2,4,4025,c);}
308
- function uh(b,c,d,e){return t(function g(){var h,k,l,m,n,q,x,w,A,C;return y(g,function(g){switch(g.l){case 1:h=wd;k=Pb;l=e.segments[0].a;m=new cb(l);n=m.fa.split(".").pop();q=Fh[c];if(x=q[n])return g["return"](x);if(c==h.na)return d&&"vtt"!=d?g["return"]("application/mp4"):g["return"]("text/vtt");w=Sb([l],b.c.retryParameters);w.method="HEAD";return u(g,Ah(b,w,k.pd),2);case 2:A=g.s;C=A.headers["content-type"];if(!C)throw new D(2,4,4021,n);return g["return"](C.split(";")[0])}})})}
309
- function fh(b,c){var d=b.getAttribute(c);if(!d)throw new D(2,4,4023,c);return d.value}function wh(b,c){var d=Jg.Pa(b,c);if(!d)throw new D(2,4,4024,c);return d}function Yg(b,c){return Ah(b,Sb([c],b.c.retryParameters),Pb.ng)}
310
- var Eh={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},Fh={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};
311
- function Wg(b){t(function d(){var e,f;return y(d,function(d){switch(d.l){case 1:if(!b.g)return d["return"]();ya(d,2);return u(d,b.update(),4);case 4:e=b.N;b.h.O(e);Aa(d,0);break;case 2:f=Da(d),f.severity=1,b.g.onError(f),b.h.O(.1),v(d)}})})}function ch(b,c){b.f=c;b.b&&b.b.Ob(b.f==$g.Ma);b.f!=$g.Ma||b.h.stop()}function Ah(b,c,d){if(!b.i)throw new D(2,7,7001);c=b.g.networkingEngine.request(d,c);Ob(b.i,c);return c.promise}
312
- var rh={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(b){var c=fh(b,"METHOD");Ke("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227");if(!["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].includes(c))return null;c=fh(b,"URI");c=Ug.parse(c);c=new Uint8Array(c.data);c=vd("com.widevine.alpha",[{initDataType:"cenc",initData:c}]);if(b=Hg(b,"KEYID"))c.keyIds=[b.substr(2).toLowerCase()];return c}},Xg="VOD",$g={Ma:Xg,he:"EVENT",od:"LIVE"};U.$c("m3u8",Vg);
313
- U.Kb("application/x-mpegurl",Vg);U.Kb("application/vnd.apple.mpegurl",Vg);function Gh(){this.a=new Map}function Hh(b,c,d){Ih(b,c).text=d}function Ih(b,c){b.a.has(c)||b.a.set(c,new Jh);return b.a.get(c)}function Jh(){this.text=this.variant=null};function Kh(b,c){this.a=b;this.b=new Set([b]);c=c||[];for(var d=r(c),e=d.next();!e.done;e=d.next())this.add(e.value)}Kh.prototype.add=function(b){return Lh(this.a,b)?(this.b.add(b),!0):!1};function Lh(b,c){var d;if(!(d=!!b.audio!=!!c.audio||!!b.video!=!!c.video||b.language!=c.language)&&(d=b.audio&&c.audio)){d=b.audio;var e=c.audio;d=!(d.channelsCount==e.channelsCount&&Mh(d,e)&&Nh(d.roles,e.roles))}!d&&(d=b.video&&c.video)&&(d=b.video,e=c.video,d=!(Mh(d,e)&&Nh(d.roles,e.roles)));return d?!1:!0}
314
- Kh.prototype.values=function(){return this.b.values()};function Mh(b,c){if(b.mimeType!=c.mimeType)return!1;var d=b.codecs.split(",").map(function(b){return lc(b)[0]}),e=c.codecs.split(",").map(function(b){return lc(b)[0]});if(d.length!=e.length)return!1;d.sort();e.sort();for(var f=0;f<d.length;f++)if(d[f]!=e[f])return!1;return!0}
315
- function Nh(b,c){var d=new Set(b),e=new Set(c);d["delete"]("main");e["delete"]("main");if(d.size!=e.size)return!1;d=r(d);for(var f=d.next();!f.done;f=d.next())if(!e.has(f.value))return!1;return!0};function Oh(b){this.a=b;this.b=new Ph(b.language,"",b.audio&&b.audio.channelsCount?b.audio.channelsCount:0)}Oh.prototype.create=function(b){var c=this,d=b.filter(function(b){return Lh(c.a,b)});return d.length?new Kh(d[0],d):this.b.create(b)};function Ph(b,c,d){this.c=b;this.b=c;this.a=d}
316
- Ph.prototype.create=function(b){var c=[];c=Qh(b,this.c);var d=b.filter(function(b){return b.primary});c=c.length?c:d.length?d:b;this.b&&(b=Rh(c,this.b),b.length&&(c=b));this.a&&(b=De(c,this.a),b.length&&(c=b));b=new Kh(c[0]);c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,Lh(b.a,d)&&b.add(d);return b};function Qh(b,c){var d=M(c),e=re(d,b.map(function(b){return qe(b)}));return e?b.filter(function(b){return e==qe(b)}):[]}
317
- function Rh(b,c){return b.filter(function(b){var d=b.audio;b=b.video;return d&&0<=d.roles.indexOf(c)||b&&0<=b.roles.indexOf(c)})};function Sh(b,c){this.a=Th;this.b=(new Map).set(Th,c).set(Uh,b)}var Uh=0,Th=1;function Vh(b,c){this.g=b;this.h=Wh(b);this.c=b.a.currentTime;this.f=Date.now()/1E3;this.i=c;this.b=function(){}}Vh.prototype.a=function(){this.g=null;this.b=function(){}};function Xh(b,c){b.b=c}function Yh(b){this.a=b}function Wh(b){if(b.a.paused||0==b.a.playbackRate||null==b.a.buffered)var c=!1;else a:{c=b.a.buffered;b=b.a.currentTime;for(var d=0;d<c.length;d++){var e=c.start(d),f=c.end(d);if(!(b<e||b>f-.5)){c=!0;break a}}c=!1}return c};function Zh(b,c,d,e,f){var g=this;this.b=b;this.w=c;this.v=d;this.m=f;this.g=new ac;this.j=!1;this.o=b.readyState;this.f=!1;this.c=e;this.i=!1;L(this.g,b,"waiting",function(){return $h(g)});this.h=(new B(function(){$h(g)})).Ia(.25)}Zh.prototype.a=function(){this.g&&(this.g.a(),this.g=null);null!=this.h&&(this.h.stop(),this.h=null);this.c&&(this.c.a(),this.c=null);this.b=this.w=this.m=null};Zh.prototype.Vc=function(){this.i=!0;$h(this)};
318
- function $h(b){if(0!=b.b.readyState){if(b.b.seeking){if(!b.j)return}else b.j=!1;if(!b.b.paused){b.b.readyState!=b.o&&(b.f=!1,b.o=b.b.readyState);var c=b.v.smallGapLimit,d=b.b.currentTime,e=b.b.buffered;a:{if(e&&e.length&&!(1==e.length&&1E-6>e.end(0)-e.start(0))){var f=pc("Edge/")||pc("Trident/")||pc("Tizen")||pc("CrKey")?.5:.1;for(var g=0;g<e.length;g++)if(e.start(g)>d&&(0==g||e.end(g-1)-d<=f)){f=g;break a}}f=null}if(null==f){if(b.c){b=b.c;d=b.g;e=Wh(d);d=d.a.currentTime;f=Date.now()/1E3;if(b.c!=
319
- d||b.h!=e)b.f=f,b.c=d,b.h=e;d=f-b.f;d>=b.i&&e&&b.b(b.c,d)}}else if(0!=f||b.i){g=e.start(f);var h=b.w.wa();if(!(g>=h)){h=g-d;c=h<=c;var k=!1;.001>h||(c||b.f||(b.f=!0,d=new I("largegap",{currentTime:d,gapSize:h}),d.cancelable=!0,b.m(d),b.v.jumpLargeGaps&&!d.defaultPrevented&&(k=!0)),!c&&!k)||(0!=f&&e.end(f-1),b.b.currentTime=g)}}}}};function ai(b){var c=this;this.f=b;this.b=new Set;this.c=(new B(function(){bi(c,!1)})).Ia(.25)}ai.prototype.a=function(){this.c.stop();for(var b=r(this.b),c=b.next();!c.done;c=b.next())c.value.a();this.b.clear()};function bi(b,c){for(var d=r(b.b),e=d.next();!e.done;e=d.next())e.value.h(b.f.currentTime,c)};function ci(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next()){d=r(d.value.variants);for(var e=d.next();!e.done;e=d.next())c.push(e.value)}return c}function di(b,c){for(var d=null,e=r(b),f=e.next();!f.done;f=e.next())f=f.value,c>=f.startTime&&(d=f);return d};function ei(b){this.f=b;this.b=null;this.c=function(){}}ei.prototype.a=function(){this.b=this.f=null;this.c=function(){}};ei.prototype.h=function(b){var c=this.b,d=this.f.periods;b=di(d,b)||d[0];c!=b&&this.c(b);this.b=b};function fi(b,c){b.c=c};function gi(b){var c=this;this.b=b;this.g=!1;this.f=this.b.cc();this.c=new B(function(){c.b.Fd(.25*c.f)})}gi.prototype.a=function(){this.c&&(this.c.stop(),this.c=null);this.b=null};gi.prototype.set=function(b){this.f=b;hi(this)};function hi(b){b.c.stop();var c=b.g?0:b.f;0<=c?b.b.cc()!=c&&b.b.fd(c):(b.c.Ia(.25),0!=b.b.cc()&&b.b.fd(0))};function ii(b,c,d){this.b=b;this.g=c;this.h=d;this.c=new ac;this.f=new ji(b);0<b.readyState?ki(this,d):li(this,d)}ii.prototype.a=function(){this.c&&(this.c.a(),this.c=null);null!=this.f&&(this.f.a(),this.f=null);this.g=function(){};this.b=null};function mi(b){return 0<b.b.readyState?b.b.currentTime:b.h}function li(b,c){b.h=c;b.c.ma(b.b,"loadedmetadata");dc(b.c,b.b,"loadedmetadata",function(){ki(b,c)})}
320
- function ki(b,c){.001>Math.abs(b.b.currentTime-c)?ni(b):(dc(b.c,b.b,"seeking",function(){ni(b)}),oi(b.f,0==b.b.currentTime?c:b.b.currentTime))}function ni(b){L(b.c,b.b,"seeking",function(){return b.g()})}function ji(b){var c=this;this.c=b;this.i=10;this.h=this.g=this.f=0;this.b=new B(function(){0>=c.f?c.b.stop():c.c.currentTime!=c.g?c.b.stop():(c.c.currentTime=c.h,c.f--)})}ji.prototype.a=function(){this.b&&(this.b.stop(),this.b=null);this.c=null};
321
- function oi(b,c){b.g=b.c.currentTime;b.h=c;b.f=b.i;b.c.currentTime=c;b.b.Ia(.1)};function pi(b){function c(){d.g=!0;null!=d.c&&(d.b.currentTime=d.c)}var d=this;this.b=b;this.g=!1;this.c=null;this.f=new ac;0==this.b.readyState?dc(this.f,this.b,"loadedmetadata",c):c()}pi.prototype.a=function(){this.f&&(this.f.a(),this.f=null);this.b=null};pi.prototype.o=function(b){this.c=this.g?this.c:b};pi.prototype.i=function(){return(this.g?this.b.currentTime:this.c)||0};pi.prototype.v=function(){};
322
- function qi(b,c,d,e,f,g){var h=this;this.c=b;this.b=c.presentationTimeline;this.C=c.minBufferTime||0;this.h=d;this.w=f;this.m=null;this.g=new Zh(b,c.presentationTimeline,d,ri(b,d),g);this.f=new ii(b,function(){a:{var b=h.g;b.j=!0;b.i=!1;b.f=!1;var c=mi(h.f);b=si(h,c);if(.001<Math.abs(b-c)&&(c=(new Date).getTime()/1E3,!h.m||h.m<c-1)){h.m=c;c=h.f;0<c.b.readyState?oi(c.f,b):li(c,b);b=void 0;break a}h.w();b=void 0}return b},ti(this,e));this.j=(new B(function(){if(0!=h.c.readyState&&!h.c.paused){var b=
323
- h.c.currentTime,c=h.b.ib(),d=h.b.wa();3>d-c&&(c=d-3);b<c&&(b=si(h,b),h.c.currentTime=b)}})).Ia(.25)}qi.prototype.a=function(){this.f&&(this.f.a(),this.f=null);this.g&&(this.g.a(),this.g=null);this.j&&(this.j.stop(),this.j=null);this.c=this.f=this.b=this.h=null;this.w=function(){}};qi.prototype.o=function(b){var c=this.f;0<c.b.readyState?oi(c.f,b):li(c,b)};qi.prototype.i=function(){var b=mi(this.f);return 0<this.c.readyState&&!this.c.paused?ui(this,b):b};
324
- function ti(b,c){null==c?c=Infinity>b.b.Y()?b.b.ib():b.b.wa():0>c&&(c=b.b.wa()+c);return vi(b,ui(b,c))}qi.prototype.v=function(){this.g.Vc()};function vi(b,c){var d=b.b.Y();return c>=d?d-b.h.durationBackoff:c}function si(b,c){var d=qd.bind(null,b.c.buffered),e=Math.max(b.C,b.h.rebufferingGoal),f=b.h.safeSeekOffset,g=b.b.ib(),h=b.b.wa(),k=b.b.Y();3>h-g&&(g=h-3);var l=b.b.Cb(e),m=b.b.Cb(f);e=b.b.Cb(e+f);return c>=k?vi(b,c):c>h?h:c<g?d(m)?m:e:c>=l||d(c)?c:e}
325
- function ui(b,c){var d=b.b.ib();if(c<d)return d;d=b.b.wa();return c>d?d:c}function ri(b,c){if(!c.stallEnabled)return null;var d=c.stallSkip,e=new Vh(new Yh(b),c.stallThreshold);Xh(e,function(){b.currentTime+=d});return e};function wi(){this.c=function(){};this.b=new Set}wi.prototype.a=function(){this.c=function(){};this.b.clear()};function xi(b,c){b.c=c};function yi(b){var c=this;this.i=b;this.g=new Map;this.b=function(){};this.c=function(){};this.f=function(){};this.j=[{Za:null,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:Ai,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:Bi,Ya:zi,Sa:function(b,e){return c.b(b,e)}},{Za:zi,Ya:Ai,Sa:function(b,e){return c.c(b,e)}},{Za:zi,Ya:Bi,Sa:function(b,e){return c.c(b,e)}},{Za:Ai,Ya:Bi,Sa:function(b,e){return c.f(b,e)}},{Za:Bi,Ya:Ai,Sa:function(b,e){return c.f(b,e)}}]}
326
- yi.prototype.a=function(){this.i=null;this.g.clear();this.b=function(){};this.c=function(){};this.f=function(){}};yi.prototype.h=function(b,c){for(var d=r(this.i.b),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.g.get(e),g=b<e.startTime?Ai:b>e.endTime?Bi:zi;this.g.set(e,g);for(var h=r(this.j),k=h.next();!k.done;k=h.next())k=k.value,k.Za==f&&k.Ya==g&&k.Sa(e,c)}};function Ci(b,c,d,e){b.b=c;b.c=d;b.f=e}var Ai=1,zi=2,Bi=3;function Di(b,c){this.a=c;this.c=b;this.g=null;this.j=1;this.v=Promise.resolve();this.h=[];this.i=new Map;this.b=new Map;this.o=!1;this.F=null;this.C=this.f=this.m=!1;this.w=0}Di.prototype.destroy=function(){for(var b=r(this.b.values()),c=b.next();!c.done;c=b.next())Ei(c.value);this.b.clear();this.i.clear();this.g=this.h=this.v=this.c=this.a=null;this.f=!0;return Promise.resolve()};
327
- Di.prototype.configure=function(b){this.g=b;this.F=new tb({maxAttempts:Math.max(b.retryParameters.maxAttempts,2),baseDelay:b.retryParameters.baseDelay,backoffFactor:b.retryParameters.backoffFactor,fuzzFactor:b.retryParameters.fuzzFactor,timeout:0},!0)};
328
- Di.prototype.start=function(){var b=this;return t(function d(){var e,f,g;return y(d,function(d){switch(d.l){case 1:return e=b.a.Qa(),f=Fi(b,e),g=b.a.Id(b.c.periods[f]),g.variant||g.text?u(d,Gi(b,g.variant?g.variant.audio:null,g.variant?g.variant.video:null,g.text,e),2):d["return"](new D(2,5,5005));case 2:if(b.f)return d["return"]();b.a&&b.a.cf&&b.a.cf();v(d)}})})};function Hi(b){return Ii(b,"audio")}function Ji(b){return Ii(b,"video")}
329
- function Ii(b,c){var d=b.b.get(c);return d?d.Fa||d.stream:null}function Ki(b,c){return t(function e(){var f,g,h,k,l,m,n,q;return y(e,function(e){switch(e.l){case 1:return f=wd,u(e,je(b.a.L,f.na),2);case 2:return b.w++,b.C=!1,g=b.w,h=b.a.L,k=new Map,l=new Set,k.set(f.na,c),l.add(c),u(e,h.init(k,!1),3);case 3:return b.f?e["return"]():u(e,Li(b,l),4);case 4:if(b.f)return e["return"]();b.w!=g||b.b.has(f.na)||b.C||(m=b.a.Qa(),n=Fi(b,m),q=Mi(c,n,0),b.b.set(f.na,q),Ni(b,q,0));v(e)}})})}
330
- function Oi(b,c){var d=b.b.get("video");if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.Fa&&(Pi(b,f,!1,0,!1),d.Fa=e)}else if(e=d.Fa)d.Fa=null,Pi(b,e,!0,0,!1)}}function Qi(b,c,d,e){c.video&&Pi(b,c.video,d,e,!1);c.audio&&Pi(b,c.audio,d,e,!1)}
331
- function Pi(b,c,d,e,f){var g=b.b.get(c.type);if(!g&&"text"==c.type&&b.g.ignoreTextStreamFailures)Ki(b,c);else if(g){var h=Ri(b,c);if(d&&h!=g.ya)b.b.forEach(function(c){Si(b,c)});else{g.Fa&&(c.trickModeVideo?(g.Fa=c,c=c.trickModeVideo):g.Fa=null);var k=b.h[h];k&&k.vb&&(k=b.i.get(c.id))&&k.vb&&(g.stream!=c||f)&&("text"==c.type&&ce(b.a.L,ic(c.mimeType,c.codecs)),g.stream=c,g.ec=!0,Ti(b,g,h)&&g.Hb.abort(),d&&(g.Na?g.qc=!0:g.Ea?(g.Ja=!0,g.Wb=e,g.qc=!0):(Ei(g),Ui(b,g,!0,e))))}}}
332
- function Ti(b,c,d){if(!c.Hb)return!1;var e=b.a.Qa(),f=fe(b.a.L,c.type);d=(d=Vi(b,c,e,f,d))?d.a?d.a-d.b:null:null;if(null==d)return!1;var g=c.stream.initSegmentReference;g&&(d+=(g.a?g.a-g.b:null)||0);g=b.a.getBandwidthEstimate();return 8*d/g<f-e-Math.max(b.c.minBufferTime||0,b.g.rebufferingGoal)||c.Hb.b.a>d?!0:!1}
333
- function Wi(b){function c(c){var f=b.a.L;"text"==c?(c=f.a,c=null==c.a||null==c.b?!1:d>=c.a&&d<c.b):(c=ee(f,c),c=qd(c,d,e));return c}var d=b.a.Qa(),e=b.g.smallGapLimit,f=Fi(b,d);if(fc(b.b.values(),function(b){return b.ya==f}))for(var g=r(b.b.keys()),h=g.next();!h.done;h=g.next())h=h.value,c(h)||Si(b,b.b.get(h));else fc(b.b.keys(),c)||b.b.forEach(function(c){Si(b,c)})}function Si(b,c){c.Na||c.Ja||(c.Ea?(c.Ja=!0,c.Wb=0):null==de(b.a.L,c.type)?null==c.Ba&&Ni(b,c,0):(Ei(c),Ui(b,c,!1,0)))}
334
- function Gi(b,c,d,e,f){return t(function h(){var k,l,m,n,q,x,w;return y(h,function(h){switch(h.l){case 1:return k=b.a.Qa(),l=Fi(b,k),m=wd,n=new Map,q=new Set,c&&(n.set(m.wb,c),q.add(c)),d&&(n.set(m.La,d),q.add(d)),e&&(n.set(m.na,e),q.add(e)),x=b.a.L,w=b.g.forceTransmuxTS,u(h,x.init(n,w),2);case 2:if(b.f)return h["return"]();Xi(b);return u(h,Li(b,q),3);case 3:if(b.f)return h["return"]();n.forEach(function(c,d){if(!b.b.has(d)){var e=Mi(c,l,f);b.b.set(d,e);Ni(b,e,0)}});v(h)}})})}
335
- function Mi(b,c,d){return{stream:b,type:b.type,lb:null,xa:null,Fa:null,ec:!0,ya:c,endOfStream:!1,Ea:!1,Ba:null,Ja:!1,Wb:0,qc:!1,Na:!1,Zc:!1,Eb:!1,Wd:d||0,Hb:null}}
336
- function Yi(b,c){var d=b.h[c];if(d)return d.promise;d={promise:new G,vb:!1};b.h[c]=d;for(var e=new Set,f=r(b.c.periods[c].variants),g=f.next();!g.done;g=f.next())g=g.value,g.video&&e.add(g.video),g.video&&g.video.trickModeVideo&&e.add(g.video.trickModeVideo),g.audio&&e.add(g.audio);f=r(b.c.periods[c].textStreams);for(g=f.next();!g.done;g=f.next())e.add(g.value);b.v=b.v.then(function(){if(!this.f)return Li(this,e)}.bind(b)).then(function(){this.f||(this.h[c].promise.resolve(),this.h[c].vb=!0)}.bind(b))["catch"](function(b){this.f||
279
+ return 0})}p.wf=function(b,c,d){var e=R.vb,f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=R.J(d,"timescale",e)||1;R.R(d,"Event").forEach(function(d){var k=R.J(d,"presentationTime",e)||0,m=R.J(d,"duration",e)||0;k=k/h+b;m=k+m/h;null!=c&&(k=Math.min(k,b+c),m=Math.min(m,b+c));d={schemeIdUri:f,value:g,startTime:k,endTime:m,id:d.getAttribute("id")||"",eventElement:d};this.a.onTimelineRegionAdded(d)}.bind(this))};
280
+ p.Hf=function(b,c,d){b=Ag(b,c,d,this.b.retryParameters);b=this.a.networkingEngine.request(1,b);Pb(this.g,b);return b.promise.then(function(b){return b.data})};function Mg(b,c){return ae(oc(b,c))?"text":b.split("/")[0]}U.ed("mpd",Bg);U.Nb("application/dash+xml",Bg);function Qg(b,c,d,e){this.b=b;this.type=c;this.a=d;this.segments=e||null}function Rg(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=void 0===e?null:e}Rg.prototype.toString=function(){function b(b){return b.name+"="+(isNaN(Number(b.value))?'"'+b.value+'"':b.value)}var c="#"+this.name,d=this.a?this.a.map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};function Sg(b,c){this.name=b;this.value=c}
281
+ Rg.prototype.getAttribute=function(b){var c=this.a.filter(function(c){return c.name==b});return c.length?c[0]:null};function Tg(b,c,d){return(b=b.getAttribute(c))?b.value:d||null}function Ug(b,c){this.b=c;this.a=b};var Vg={lb:function(b,c){return b.filter(function(b){return b.name==c})},Ra:function(b,c){var d=Vg.lb(b,c);return d.length?d[0]:null},Hc:function(b,c,d){return b.filter(function(b){var e=b.getAttribute("TYPE");b=b.getAttribute("GROUP-ID");return e.value==c&&b.value==d})},zc:function(b,c){return Ad([b],[c])[0]},Pc:function(b){return/^#(?!EXT)/m.test(b)}};function Wg(b){this.b=b;this.a=0}function Xg(b){Yg(b,/[ \t]+/gm)}function Yg(b,c){c.lastIndex=b.a;var d=c.exec(b.b);d=null==d?null:{position:d.index,length:d[0].length,Jf:d};if(b.a==b.b.length||null==d||d.position!=b.a)return null;b.a+=d.length;return d.Jf}function Zg(b){return b.a==b.b.length?null:(b=Yg(b,/[^ \t\n]*/gm))?b[0]:null};function $g(){this.a=0}
282
+ function ah(b,c,d){c=Ac(c);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var e=c.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(e[0]))throw new G(2,4,4015);c=0;for(var f=1;f<e.length;f++)if(!Vg.Pc(e[f])){var g=bh(b,e[f]);--b.a;if(ch.includes(g.name)){c=1;break}else"EXT-X-STREAM-INF"==g.name&&(f+=1)}f=[];for(g=1;g<e.length;)if(Vg.Pc(e[g]))g+=1;else{var h=bh(b,e[g]);if(dh.includes(h.name)){if(1!=c)throw new G(2,4,4017);e=e.splice(g,e.length-g);b=eh(b,d,e,f);return new Qg(d,c,f,b)}f.push(h);g+=1;"EXT-X-STREAM-INF"==
283
+ h.name&&(h.a.push(new Sg("URI",e[g])),g+=1)}return new Qg(d,c,f)}function eh(b,c,d,e){var f=[],g=[];d.forEach(function(d){if(/^(#EXT)/.test(d))d=bh(b,d),ch.includes(d.name)?e.push(d):g.push(d);else{if(Vg.Pc(d))return[];d=Vg.zc(c,d.trim());f.push(new Ug(d,g));g=[]}});return f}
284
+ function bh(b,c){var d=b.a++,e=c.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!e)throw new G(2,4,4016,c);var f=e[1],g=e[2];e=[];var h;if(g){g=new Wg(g);var k;(k=Yg(g,/^([^,=]+)(?:,|$)/g))&&(h=k[1]);for(var l=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;k=Yg(g,l);)e.push(new Sg(k[1],k[2]||k[3]))}return new Rg(d,f,e,h)}var ch="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),dh="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function fh(b){try{var c=fh.parse(b);return Cb({uri:b,ad:b,data:c.data,headers:{"content-type":c.contentType}})}catch(d){return Ab(d)}}A("shaka.net.DataUriPlugin",fh);
285
+ fh.parse=function(b){var c=b.split(":");if(2>c.length||"data"!=c[0])throw new G(2,1,1004,b);c=c.slice(1).join(":").split(",");if(2>c.length)throw new G(2,1,1004,b);var d=c[0];c=window.decodeURIComponent(c.slice(1).join(","));d=d.split(";");var e=null;1<d.length&&(e=d[1]);if("base64"==e)b=Gc(c).buffer;else{if(e)throw new G(2,1,1005,b);b=Dc(c)}return{data:b,contentType:d[0]}};Sb("data",fh);function gh(){var b=this;this.c=this.g=null;this.$=1;this.D=new Map;this.T=new Set;this.a=new Map;this.b=null;this.v="";this.s=new $g;this.P=0;this.h=new D(function(){hh(b)});this.f=ih;this.m=null;this.C=0;this.G=Infinity;this.i=new Ob;this.M=[];this.l=new Map;this.W=!1}A("shaka.hls.HlsParser",gh);p=gh.prototype;p.configure=function(b){this.c=b};
286
+ p.start=function(b,c){var d=this;return t(function f(){var g,h;return z(f,function(f){switch(f.j){case 1:return d.g=c,u(f,jh(d,b),2);case 2:return g=f.o,d.v=g.uri,u(f,kh(d,g.data),3);case 3:return h=d.P,0<h&&d.h.O(h),f["return"](d.m)}})})};p.stop=function(){this.h&&(this.h.stop(),this.h=null);var b=[];this.i&&(b.push(this.i.destroy()),this.i=null);this.c=this.g=null;this.D.clear();this.T.clear();this.a.clear();this.m=null;return Promise.all(b)};
287
+ p.update=function(){if(this.f!=lh.Oa){for(var b=[],c=r(this.a.values()),d=c.next();!d.done;d=c.next())b.push(mh(this,d.value));return Promise.all(b)}};
288
+ function mh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,w,x,B;return z(e,function(e){switch(e.j){case 1:return f=Vg,g=lh,h=c.pe,u(e,jh(b,h),2);case 2:k=e.o;l=ah(b.s,k.data,k.uri);if(1!=l.type)throw new G(2,4,4017);n=(m=f.Ra(l.a,"EXT-X-MEDIA-SEQUENCE"))?Number(m.value):0;q=c.stream;return u(e,nh(b,c.tc,l,n,q.mimeType,q.codecs),3);case 3:w=e.o;c.Pb.a=w;x=w[w.length-1];if(B=f.Ra(l.a,"EXT-X-ENDLIST"))oh(b,g.Oa),b.b.wa(x.endTime);v(e)}})})}p.onExpirationUpdated=function(){};
289
+ function kh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,w,x,B;return z(e,function(e){switch(e.j){case 1:f=ah(b.s,c,b.v);if(0!=f.type)throw new G(2,4,4022);return u(e,ph(b,f),2);case 2:g=e.o;if(!b.g)throw new G(2,7,7001);if(b.W&&0==g.variants.length)throw new G(2,4,4034);b.g.filterAllPeriods([g]);h=Infinity;k=0;l=Infinity;for(var E=r(b.a.values()),F=E.next();!F.done;F=E.next())m=F.value,h=Math.min(h,m.Uc),k=Math.max(k,m.Uc),"text"!=m.stream.type&&(l=Math.min(l,m.duration));b.f!=lh.Oa?(b.b=new W(0,
290
+ 3*b.C),b.b.Rb(!1)):(b.b=new W(null,0),b.b.Rb(!0));qh(b);if(b.f!=lh.Oa){b.P=b.G;n=lh;b.f==n.td&&(q=b.b.pc,isNaN(b.c.availabilityWindowOverride)||(q=b.c.availabilityWindowOverride),b.b.md(q));for(w=0;95443.7176888889<=k;)w+=95443.7176888889,k-=95443.7176888889;if(w)for(E=r(b.a.values()),F=E.next();!F.done;F=E.next())x=F.value,95443.7176888889>x.Uc&&(x.stream.presentationTimeOffset=-w,x.Pb.offset(w))}else for(b.b.wa(l),b.b.offset(-h),E=r(b.a.values()),F=E.next();!F.done;F=E.next())B=F.value,B.stream.presentationTimeOffset=
291
+ h,B.Pb.offset(-h),dg(B.Pb,l);b.m={presentationTimeline:b.b,periods:[g],offlineSessionIds:[],minBufferTime:0};v(e)}})})}
292
+ function ph(b,c){return t(function e(){var f,g,h,k,l,m,n,q,w,x,B,C;return z(e,function(e){switch(e.j){case 1:return f=Vg,g=zd,h=c.a,k=f.lb(c.a,"EXT-X-MEDIA"),l=k.filter(function(b){return"SUBTITLES"==rh(b,"TYPE")}.bind(b)),m=l.map(function(b){var c=this;return t(function ma(){var e;return z(ma,function(f){switch(f.j){case 1:return y(f,2),u(f,sh(c,b),4);case 4:return f["return"](f.o);case 2:e=Ca(f);if(c.c.hls.ignoreTextStreamFailures)return f["return"](null);throw e;}})})}.bind(b)),n=k.filter(function(b){return"CLOSED-CAPTIONS"==
293
+ rh(b,"TYPE")}),th(b,n),u(e,Promise.all(m),2);case 2:return q=e.o,w=f.lb(h,"EXT-X-STREAM-INF"),x=w.map(function(b){return uh(this,b,c)}.bind(b)),u(e,Promise.all(x),3);case 3:return B=e.o,C=B.reduce(g.yc,[]),C=C.filter(function(b){return null!=b}),e["return"]({startTime:0,variants:C,textStreams:q.filter(function(b){return null!=b})})}})})}
294
+ function uh(b,c,d){return t(function f(){var g,h,k,l,m,n,q,w,x,B,C,E,F,V,Y,ma,Aa,da,na,wa,ja,Ta,Ba,tb,Ga,db,eb;return z(f,function(f){switch(f.j){case 1:g=Cd;h=Vg;k=Tg(c,"CODECS","avc1.42E01E,mp4a.40.2");l=vh(k.split(/\s*,\s*/));m=c.getAttribute("RESOLUTION");q=n=null;w=Tg(c,"FRAME-RATE");x=Number(rh(c,"BANDWIDTH"));m&&(B=m.value.split("x"),n=B[0],q=B[1]);C=h.lb(d.a,"EXT-X-MEDIA");C=C.filter(function(b){return"CLOSED-CAPTIONS"!=rh(b,"TYPE")});C=C.filter(function(b){var c=Tg(b,"URI")||"";return"SUBTITLES"==
295
+ (Tg(b,"TYPE")||"")||""!=c});E=Tg(c,"AUDIO");F=Tg(c,"VIDEO");E?C=h.Hc(C,"AUDIO",E):F&&(C=h.Hc(C,"VIDEO",F));if(V=wh(g.qa,l)){if(Y=Tg(c,"SUBTITLES"))if(ma=h.Hc(C,"SUBTITLES",Y),ma.length&&(Aa=b.D.get(ma[0].id)))Aa.stream.codecs=V;Lb(l,V)}da=C.map(function(b){return xh(this,b,l)}.bind(b));na=[];wa=[];return u(f,Promise.all(da),2);case 2:Ta=f.o;Ta=Ta.filter(function(b){return null!=b});E?na=Ta:F&&(wa=Ta);tb=!1;na.length||wa.length?na.length?(db=rh(c,"URI"),eb=na[0].tc,db==eb?(Ba=g.Ab,tb=!0):Ba=g.Na):
296
+ Ba=g.Ab:1==l.length?(Ga=wh(g.Na,l),Ba=m||w||Ga?g.Na:g.Ab):(Ba=g.Na,l=[l.join(",")]);if(tb){f.A(3);break}return u(f,yh(b,c,l,Ba),4);case 4:ja=f.o;case 3:if(ja)ja.stream.type==g.Ab?na=[ja]:wa=[ja];else if(null===ja)return f["return"]([]);wa&&zh(wa);na&&zh(na);return f["return"](Ah(b,na,wa,x,n,q,w))}})})}function zh(b){b.forEach(function(b){var c=b.stream.codecs.split(",");c=c.filter(function(b){return"mp4a.40.34"!=b});b.stream.codecs=c.join(",")})}
297
+ function Ah(b,c,d,e,f,g,h){d.forEach(function(b){if(b=b.stream)b.width=Number(f)||void 0,b.height=Number(g)||void 0,b.frameRate=Number(h)||void 0}.bind(b));c.length||(c=[null]);d.length||(d=[null]);var k=[];c=r(c);for(var l=c.next();!l.done;l=c.next()){l=l.value;for(var m=r(d),n=m.next();!n.done;n=m.next()){var q=n.value;n=l?l.stream:null;var w=q?q.stream:null,x=l?l.drmInfos:null,B=q?q.drmInfos:null;q=(q?q.tc:"")+" - "+(l?l.tc:"");var C=void 0;if(n&&w)if(x.length&&B.length?0<qd(x,B).length:1)C=qd(x,
298
+ B);else continue;else n?C=x:w&&(C=B);b.T.has(q)||(n=Bh(b,n,w,e,C),k.push(n),b.T.add(q))}}return k}function Bh(b,c,d,e,f){return{id:b.$++,language:c?c.language:"und",primary:!!c&&c.primary||!!d&&d.primary,audio:c,video:d,bandwidth:e,drmInfos:f,allowedByApplication:!0,allowedByKeySystem:!0}}function sh(b,c){return t(function e(){var f;return z(e,function(e){switch(e.j){case 1:return rh(c,"TYPE"),u(e,xh(b,c,[]),2);case 2:return f=e.o,e["return"](f.stream)}})})}
299
+ function th(b,c){for(var d=r(c),e=d.next();!e.done;e=d.next()){e=e.value;rh(e,"TYPE");var f=Tg(e,"LANGUAGE")||"und";f=M(f);var g=rh(e,"GROUP-ID");e=rh(e,"INSTREAM-ID");b.l.get(g)||b.l.set(g,new Map);b.l.get(g).set(e,f)}}
300
+ function xh(b,c,d){return t(function f(){var g,h,k,l,m,n,q,w,x,B,C;return z(f,function(f){switch(f.j){case 1:g=rh(c,"URI");if(b.a.has(g))return f["return"](b.a.get(g));h=rh(c,"TYPE").toLowerCase();k=Cd;"subtitles"==h&&(h=k.qa);l=M(Tg(c,"LANGUAGE","und"));m=Tg(c,"NAME");n=c.getAttribute("DEFAULT");q=c.getAttribute("AUTOSELECT");w=Tg(c,"CHANNELS");if("audio"==h)if(w){var E=w.split("/")[0];E=parseInt(E,10)}else E=null;else E=null;x=E;B=!!n||!!q;return u(f,Ch(b,g,d,h,l,B,m,x,null),2);case 2:C=f.o;if(null==
301
+ C)return f["return"](null);if(b.a.has(g))return f["return"](b.a.get(g));b.D.set(c.id,C);b.a.set(g,C);return f["return"](C)}})})}
302
+ function yh(b,c,d,e){return t(function g(){var h,k,l,m,n;return z(g,function(g){switch(g.j){case 1:h=Cd;k=rh(c,"URI");if(b.a.has(k))return g["return"](b.a.get(k));l=Tg(c,"CLOSED-CAPTIONS");m=null;e==h.Na&&l&&"NONE"!=l&&(m=b.l.get(l));return u(g,Ch(b,k,d,e,"und",!1,null,null,m),2);case 2:n=g.o;if(null==n)return g["return"](null);if(b.a.has(k))return g["return"](b.a.get(k));b.a.set(k,n);return g["return"](n)}})})}
303
+ function Ch(b,c,d,e,f,g,h,k,l){return t(function n(){var q,w,x,B,C,E,F,V,Y,ma,Aa,da,na,wa,ja,Ta,Ba,tb,Ga,db,eb,uc,ub,Eb,vb,Ha;return z(n,function(n){switch(n.j){case 1:return q=Vg,w=q.zc(b.v,c),B="",u(n,jh(b,w),2);case 2:E=n.o;w=E.uri;x=ah(b.s,E.data,w);if(1!=x.type)throw new G(2,4,4017);F=[];x.segments.forEach(function(b){b=q.lb(b.b,"EXT-X-KEY");F.push.apply(F,b)});V=!1;Y=[];ma=null;for(var fb=r(F),Ia=fb.next();!Ia.done;Ia=fb.next())if(Aa=Ia.value,da=rh(Aa,"METHOD"),"NONE"!=da){V=!0;if("AES-128"==
304
+ da)return b.W=!0,n["return"](null);na=rh(Aa,"KEYFORMAT");if(ja=(wa=Dh[na])?wa(Aa):null)ja.keyIds.length&&(ma=ja.keyIds[0]),Y.push(ja)}if(V&&!Y.length)throw new G(2,4,4026);Eh(b,x);B=Fh(e,d);return u(n,Gh(b,e,B,x),3);case 3:return C=Ta=n.o,tb=(Ba=q.Ra(x.a,"EXT-X-MEDIA-SEQUENCE"))?Number(Ba.value):0,u(n,nh(b,c,x,tb,C,B),4);case 4:return Ga=n.o,db=Ga[0].startTime,eb=Ga[Ga.length-1].endTime,uc=eb-db,ub=new T(Ga),Eb=Hh(x),vb=void 0,"text"==e&&(vb="subtitle"),Ha={id:b.$++,originalId:h,createSegmentIndex:Promise.resolve.bind(Promise),
305
+ findSegmentPosition:ub.find.bind(ub),getSegmentReference:ub.get.bind(ub),initSegmentReference:Eb,presentationTimeOffset:0,mimeType:C,codecs:B,kind:vb,encrypted:V,keyId:ma,language:f,label:h,type:e,primary:g,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:k,closedCaptions:l},n["return"]({stream:Ha,Pb:ub,drmInfos:Y,tc:c,pe:w,Uc:db,qg:eb,duration:uc})}})})}
306
+ function Eh(b,c){var d=lh,e=Vg.Ra(c.a,"EXT-X-PLAYLIST-TYPE"),f=Vg.Ra(c.a,"EXT-X-ENDLIST");f=e&&"VOD"==e.value||f;e=e&&"EVENT"==e.value&&!f;e=!f&&!e;f?oh(b,d.Oa):(e?oh(b,d.td):oh(b,d.ke),d=Ih(c.a,"EXT-X-TARGETDURATION"),d=Number(d.value),b.C=Math.max(d,b.C),b.G=Math.min(d,b.G))}
307
+ function Hh(b){var c=Vg.lb(b.a,"EXT-X-MAP");if(!c.length)return null;if(1<c.length)throw new G(2,4,4020);c=c[0];var d=rh(c,"URI"),e=Vg.zc(b.b,d);b=0;d=null;if(c=Tg(c,"BYTERANGE"))b=c.split("@"),c=Number(b[0]),b=Number(b[1]),d=b+c-1;return new ag(function(){return[e]},b,d)}
308
+ function Jh(b,c,d,e){var f=c.b,g=c.a;c=Ih(f,"EXTINF").value.split(",");c=e+Number(c[0]);var h=0,k=null;if(f=Vg.Ra(f,"EXT-X-BYTERANGE"))h=f.value.split("@"),f=Number(h[0]),h=h[1]?Number(h[1]):b.a+1,k=h+f-1;return new S(d,e,c,function(){return[g]},h,k)}function qh(b){b.b&&(b.M.forEach(function(c){b.b.sb(c,0)}),b.M=[])}
309
+ function nh(b,c,d,e,f,g){return t(function k(){var l,m,n,q,w,x,B,C,E,F,V;return z(k,function(k){switch(k.j){case 1:return l=d.segments,m=[],n=l[0].a,q=Jh(null,l[0],e,0),w=Hh(d),u(k,Kh(b,c,w,q,f,g),2);case 2:x=k.o;n.split("/").pop();for(var Y=0;Y<l.length;++Y)B=l[Y],C=m[m.length-1],E=0==Y?x:C.endTime,F=e+Y,V=Jh(C,B,F,E),m.push(V);b.M.push(m);qh(b);return k["return"](m)}})})}
310
+ function Lh(b,c){return t(function e(){var f,g,h,k,l,m;return z(e,function(e){switch(e.j){case 1:return f=Qb,g=Ag(c.c(),c.b,c.b+2048-1,b.c.retryParameters),h=Ag(c.c(),c.b,c.a,b.c.retryParameters),y(e,2),u(e,Mh(b,g,f.ud),4);case 4:return k=e.o,e["return"](k);case 2:l=Ca(e);if(7001==l.code)throw l;$a("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.",g.uris[0]);return u(e,Mh(b,h,f.ud),5);
311
+ case 5:return m=e.o,e["return"](m)}})})}
312
+ function Kh(b,c,d,e,f,g){return t(function k(){var l,m,n,q,w,x,B,C,E;return z(k,function(k){switch(k.j){case 1:if(b.m&&(l=b.a.get(c),m=l.Pb,n=m.get(e.position)))return k["return"](n.startTime);if("audio/mpeg"==f)return k["return"](0);if("video/mp4"!=f&&"audio/mp4"!=f){k.A(2);break}q=[Lh(b,e)];d&&q.push(Lh(b,d));return u(k,Promise.all(q),3);case 3:return w=k.o,x=w[0],B=w[1]||w[0],k["return"](Nh(x.data,B.data));case 2:if("video/mp2t"!=f){k.A(4);break}return u(k,Lh(b,e),5);case 5:return C=k.o,k["return"](Oh(C.data));
313
+ case 4:if("application/mp4"!=f&&!f.startsWith("text/")){k.A(6);break}return u(k,Lh(b,e),7);case 7:return E=k.o,k["return"](Ph(f,g,E.data));case 6:if("video/webm"==f)return k["return"](null);throw new G(2,4,4030);}})})}
314
+ function Nh(b,c){var d=0;(new Q).H("moov",Hf).H("trak",Hf).H("mdia",Hf).fa("mdhd",function(b){b.reader.L(0==b.version?8:16);d=b.reader.F();b.parser.stop()}).parse(c,!0);if(!d)throw new G(2,4,4030);var e=0,f=!1;(new Q).H("moof",Hf).H("traf",Hf).fa("tfdt",function(b){e=(0==b.version?b.reader.F():b.reader.yb())/d;f=!0;b.parser.stop()}).parse(b,!0);if(!f)throw new G(2,4,4030);return e}
315
+ function Oh(b){function c(){throw new G(2,4,4030);}b=new P(new DataView(b),0);for(var d=0,e=0;;)if(d=b.ba(),e=b.ka(),71!=e&&c(),b.Mb()&16384||c(),e=(b.ka()&48)>>4,0!=e&&2!=e||c(),3==e&&(e=b.ka(),b.L(e)),1!=b.F()>>8)b.seek(d+188),e=b.ka(),71!=e&&(b.seek(d+192),e=b.ka()),71!=e&&(b.seek(d+204),e=b.ka()),71!=e&&c(),b.$d(1);else return b.L(3),d=b.ka()>>6,0!=d&&1!=d||c(),0==b.ka()&&c(),d=b.ka(),e=b.Mb(),b=b.Mb(),(1073741824*((d&14)>>1)+((e&65534)<<14|(b&65534)>>1))/9E4}
316
+ function Ph(b,c,d){b=oc(b,c);if(!ae(b))return 0;c=new Zd(null);be(c,b);return c.Mc(d)}function vh(b){var c=new Set,d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=rc(e)[0];c.has(f)||(d.push(e),c.add(f))}return d}function wh(b,c){for(var d=Qh[b],e=0;e<d.length;e++)for(var f=0;f<c.length;f++)if(d[e].test(c[f].trim()))return c[f].trim();return"text"==b?"":null}function Fh(b,c){if(1==c.length)return c[0];var d=wh(b,c);if(null!=d)return d;throw new G(2,4,4025,c);}
317
+ function Gh(b,c,d,e){return t(function g(){var h,k,l,m,n,q,w,x,B,C;return z(g,function(g){switch(g.j){case 1:h=Cd;k=Qb;l=e.segments[0].a;m=new cb(l);n=m.ia.split(".").pop();q=Rh[c];if(w=q[n])return g["return"](w);if(c==h.qa)return d&&"vtt"!=d?g["return"]("application/mp4"):g["return"]("text/vtt");x=Tb([l],b.c.retryParameters);x.method="HEAD";return u(g,Mh(b,x,k.ud),2);case 2:B=g.o;C=B.headers["content-type"];if(!C)throw new G(2,4,4021,n);return g["return"](C.split(";")[0])}})})}
318
+ function rh(b,c){var d=b.getAttribute(c);if(!d)throw new G(2,4,4023,c);return d.value}function Ih(b,c){var d=Vg.Ra(b,c);if(!d)throw new G(2,4,4024,c);return d}function jh(b,c){return Mh(b,Tb([c],b.c.retryParameters),Qb.ng)}
319
+ var Qh={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},Rh={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};
320
+ function hh(b){t(function d(){var e,f;return z(d,function(d){switch(d.j){case 1:if(!b.g)return d["return"]();y(d,2);return u(d,b.update(),4);case 4:e=b.P;b.h.O(e);za(d,0);break;case 2:f=Ca(d),f.severity=1,b.g.onError(f),b.h.O(.1),v(d)}})})}function oh(b,c){b.f=c;b.b&&b.b.Rb(b.f==lh.Oa);b.f!=lh.Oa||b.h.stop()}function Mh(b,c,d){if(!b.i)throw new G(2,7,7001);c=b.g.networkingEngine.request(d,c);Pb(b.i,c);return c.promise}
321
+ var Dh={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(b){var c=rh(b,"METHOD");Qe("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227");if(!["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].includes(c))return null;c=rh(b,"URI");c=fh.parse(c);c=new Uint8Array(c.data);c=Bd("com.widevine.alpha",[{initDataType:"cenc",initData:c}]);if(b=Tg(b,"KEYID"))c.keyIds=[b.substr(2).toLowerCase()];return c}},ih="VOD",lh={Oa:ih,ke:"EVENT",td:"LIVE"};U.ed("m3u8",gh);
322
+ U.Nb("application/x-mpegurl",gh);U.Nb("application/vnd.apple.mpegurl",gh);function Sh(){this.a=new Map}function Th(b,c,d){Uh(b,c).text=d}function Uh(b,c){b.a.has(c)||b.a.set(c,new Vh);return b.a.get(c)}function Vh(){this.text=this.variant=null};function Wh(b,c){this.a=b;this.b=new Set([b]);c=c||[];for(var d=r(c),e=d.next();!e.done;e=d.next())this.add(e.value)}Wh.prototype.add=function(b){return Xh(this.a,b)?(this.b.add(b),!0):!1};function Xh(b,c){var d;if(!(d=!!b.audio!=!!c.audio||!!b.video!=!!c.video||b.language!=c.language)&&(d=b.audio&&c.audio)){d=b.audio;var e=c.audio;d=!(d.channelsCount==e.channelsCount&&Yh(d,e)&&Zh(d.roles,e.roles))}!d&&(d=b.video&&c.video)&&(d=b.video,e=c.video,d=!(Yh(d,e)&&Zh(d.roles,e.roles)));return d?!1:!0}
323
+ Wh.prototype.values=function(){return this.b.values()};function Yh(b,c){if(b.mimeType!=c.mimeType)return!1;var d=b.codecs.split(",").map(function(b){return rc(b)[0]}),e=c.codecs.split(",").map(function(b){return rc(b)[0]});if(d.length!=e.length)return!1;d.sort();e.sort();for(var f=0;f<d.length;f++)if(d[f]!=e[f])return!1;return!0}
324
+ function Zh(b,c){var d=new Set(b),e=new Set(c);d["delete"]("main");e["delete"]("main");if(d.size!=e.size)return!1;d=r(d);for(var f=d.next();!f.done;f=d.next())if(!e.has(f.value))return!1;return!0};function $h(b){this.a=b;this.b=new ai(b.language,"",b.audio&&b.audio.channelsCount?b.audio.channelsCount:0)}$h.prototype.create=function(b){var c=this,d=b.filter(function(b){return Xh(c.a,b)});return d.length?new Wh(d[0],d):this.b.create(b)};function ai(b,c,d){this.c=b;this.b=c;this.a=d}
325
+ ai.prototype.create=function(b){var c=[];c=bi(b,this.c);var d=b.filter(function(b){return b.primary});c=c.length?c:d.length?d:b;this.b&&(b=ci(c,this.b),b.length&&(c=b));this.a&&(b=Je(c,this.a),b.length&&(c=b));b=new Wh(c[0]);c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,Xh(b.a,d)&&b.add(d);return b};function bi(b,c){var d=M(c),e=xe(d,b.map(function(b){return we(b)}));return e?b.filter(function(b){return e==we(b)}):[]}
326
+ function ci(b,c){return b.filter(function(b){var d=b.audio;b=b.video;return d&&0<=d.roles.indexOf(c)||b&&0<=b.roles.indexOf(c)})};function di(b,c){this.a=ei;this.b=(new Map).set(ei,c).set(fi,b)}var fi=0,ei=1;function gi(b,c){this.f=b;this.g=hi(b);this.b=b.a.currentTime;this.c=Date.now()/1E3;this.h=c;this.a=function(){}}gi.prototype.release=function(){this.f=null;this.a=function(){}};function ii(b,c){b.a=c}function ji(b){this.a=b}function hi(b){if(b.a.paused||0==b.a.playbackRate||null==b.a.buffered)var c=!1;else a:{c=b.a.buffered;b=b.a.currentTime;for(var d=0;d<c.length;d++){var e=c.start(d),f=c.end(d);if(!(b<e||b>f-.5)){c=!0;break a}}c=!1}return c};function ki(b,c,d,e,f){var g=this;this.a=b;this.v=c;this.s=d;this.l=f;this.f=new L;this.i=!1;this.m=b.readyState;this.c=!1;this.b=e;this.h=!1;this.f.w(b,"waiting",function(){return li(g)});this.g=(new D(function(){li(g)})).La(.25)}ki.prototype.release=function(){this.f&&(this.f.release(),this.f=null);null!=this.g&&(this.g.stop(),this.g=null);this.b&&(this.b.release(),this.b=null);this.a=this.v=this.l=null};ki.prototype.Zc=function(){this.h=!0;li(this)};
327
+ function li(b){if(0!=b.a.readyState){if(b.a.seeking){if(!b.i)return}else b.i=!1;if(!b.a.paused){b.a.readyState!=b.m&&(b.c=!1,b.m=b.a.readyState);var c=b.s.smallGapLimit,d=b.a.currentTime,e=b.a.buffered;a:{if(e&&e.length&&!(1==e.length&&1E-6>e.end(0)-e.start(0))){var f=xc("Edge/")||xc("Trident/")||xc("Tizen")||xc("CrKey")?.5:.1;for(var g=0;g<e.length;g++)if(e.start(g)>d&&(0==g||e.end(g-1)-d<=f)){f=g;break a}}f=null}if(null==f){if(b.b){b=b.b;d=b.f;e=hi(d);d=d.a.currentTime;f=Date.now()/1E3;if(b.b!=
328
+ d||b.g!=e)b.c=f,b.b=d,b.g=e;d=f-b.c;d>=b.h&&e&&b.a(b.b,d)}}else if(0!=f||b.h){g=e.start(f);var h=b.v.za();if(!(g>=h)){h=g-d;c=h<=c;var k=!1;.001>h||(c||b.c||(b.c=!0,d=new J("largegap",{currentTime:d,gapSize:h}),d.cancelable=!0,b.l(d),b.s.jumpLargeGaps&&!d.defaultPrevented&&(k=!0)),!c&&!k)||(0!=f&&e.end(f-1),b.a.currentTime=g)}}}}};function mi(b){var c=this;this.c=b;this.a=new Set;this.b=(new D(function(){ni(c,!1)})).La(.25)}mi.prototype.release=function(){this.b.stop();for(var b=r(this.a),c=b.next();!c.done;c=b.next())c.value.release();this.a.clear()};function ni(b,c){for(var d=r(b.a),e=d.next();!e.done;e=d.next())e.value.g(b.c.currentTime,c)};function oi(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next()){d=r(d.value.variants);for(var e=d.next();!e.done;e=d.next())c.push(e.value)}return c}function pi(b,c){for(var d=null,e=r(b),f=e.next();!f.done;f=e.next())f=f.value,c>=f.startTime&&(d=f);return d};function qi(b){this.c=b;this.a=null;this.b=function(){}}qi.prototype.release=function(){this.a=this.c=null;this.b=function(){}};qi.prototype.g=function(b){var c=this.a,d=this.c.periods;b=pi(d,b)||d[0];c!=b&&this.b(b);this.a=b};function ri(b,c){b.b=c};function si(b){var c=this;this.a=b;this.f=!1;this.c=this.a.ec();this.b=new D(function(){c.a.Id(.25*c.c)})}si.prototype.release=function(){this.b&&(this.b.stop(),this.b=null);this.a=null};si.prototype.set=function(b){this.c=b;ti(this)};function ti(b){b.b.stop();var c=b.f?0:b.c;if(0<=c)try{b.a.ec()!=c&&b.a.ld(c);return}catch(d){}b.b.La(.25);0!=b.a.ec()&&b.a.ld(0)};function ui(b,c,d){this.a=b;this.f=c;this.g=d;this.h=!1;this.b=new L;this.c=new vi(b);0<b.readyState?wi(this,d):xi(this,d)}ui.prototype.release=function(){this.b&&(this.b.release(),this.b=null);null!=this.c&&(this.c.release(),this.c=null);this.f=function(){};this.a=null};function yi(b){return b.h?b.a.currentTime:b.g}function xi(b,c){b.g=c;b.b.ea(b.a,"loadedmetadata");b.b.da(b.a,"loadedmetadata",function(){wi(b,c)})}
329
+ function wi(b,c){.001>Math.abs(b.a.currentTime-c)?zi(b):(b.b.da(b.a,"seeking",function(){zi(b)}),Ai(b.c,0==b.a.currentTime?c:b.a.currentTime))}function zi(b){b.h=!0;b.b.w(b.a,"seeking",function(){return b.f()})}function vi(b){var c=this;this.b=b;this.h=10;this.g=this.f=this.c=0;this.a=new D(function(){0>=c.c?c.a.stop():c.b.currentTime!=c.f?c.a.stop():(c.b.currentTime=c.g,c.c--)})}vi.prototype.release=function(){this.a&&(this.a.stop(),this.a=null);this.b=null};
330
+ function Ai(b,c){b.f=b.b.currentTime;b.g=c;b.c=b.h;b.b.currentTime=c;b.a.La(.1)};function Bi(b){function c(){null==d.c?d.f=!0:(d.b.da(d.a,"seeking",function(){d.f=!0}),d.a.currentTime=d.c)}var d=this;this.a=b;this.f=!1;this.c=null;this.b=new L;0==this.a.readyState?this.b.da(this.a,"loadedmetadata",c):c()}Bi.prototype.release=function(){this.b&&(this.b.release(),this.b=null);this.a=null};Bi.prototype.m=function(b){this.c=this.f?this.c:b};Bi.prototype.h=function(){return(this.f?this.a.currentTime:this.c)||0};Bi.prototype.s=function(){};
331
+ function Ci(b,c,d,e,f,g){var h=this;this.b=b;this.a=c.presentationTimeline;this.C=c.minBufferTime||0;this.g=d;this.v=f;this.l=null;this.f=new ki(b,c.presentationTimeline,d,Di(b,d),g);this.c=new ui(b,function(){a:{var b=h.f;b.i=!0;b.h=!1;b.c=!1;var c=yi(h.c);b=Ei(h,c);if(.001<Math.abs(b-c)&&(c=(new Date).getTime()/1E3,!h.l||h.l<c-1)){h.l=c;c=h.c;0<c.a.readyState?Ai(c.c,b):xi(c,b);b=void 0;break a}h.v();b=void 0}return b},Fi(this,e));this.i=(new D(function(){if(0!=h.b.readyState&&!h.b.paused){var b=
332
+ h.b.currentTime,c=h.a.mb(),d=h.a.za();3>d-c&&(c=d-3);b<c&&(b=Ei(h,b),h.b.currentTime=b)}})).La(.25)}Ci.prototype.release=function(){this.c&&(this.c.release(),this.c=null);this.f&&(this.f.release(),this.f=null);this.i&&(this.i.stop(),this.i=null);this.b=this.c=this.a=this.g=null;this.v=function(){}};Ci.prototype.m=function(b){var c=this.c;0<c.a.readyState?Ai(c.c,b):xi(c,b)};Ci.prototype.h=function(){var b=yi(this.c);return 0<this.b.readyState&&!this.b.paused?Gi(this,b):b};
333
+ function Fi(b,c){null==c?c=Infinity>b.a.Y()?b.a.mb():b.a.za():0>c&&(c=b.a.za()+c);return Hi(b,Gi(b,c))}Ci.prototype.s=function(){this.f.Zc()};function Hi(b,c){var d=b.a.Y();return c>=d?d-b.g.durationBackoff:c}function Ei(b,c){var d=vd.bind(null,b.b.buffered),e=Math.max(b.C,b.g.rebufferingGoal),f=b.g.safeSeekOffset,g=b.a.mb(),h=b.a.za(),k=b.a.Y();3>h-g&&(g=h-3);var l=b.a.Gb(e),m=b.a.Gb(f);e=b.a.Gb(e+f);return c>=k?Hi(b,c):c>h?h:c<g?d(m)?m:e:c>=l||d(c)?c:e}
334
+ function Gi(b,c){var d=b.a.mb();if(c<d)return d;d=b.a.za();return c>d?d:c}function Di(b,c){if(!c.stallEnabled)return null;var d=c.stallSkip,e=new gi(new ji(b),c.stallThreshold);ii(e,function(){b.currentTime+=d});return e};function Ii(){this.b=function(){};this.a=new Set}Ii.prototype.release=function(){this.b=function(){};this.a.clear()};function Ji(b,c){b.b=c};function Ki(b){var c=this;this.h=b;this.f=new Map;this.a=function(){};this.b=function(){};this.c=function(){};this.i=[{bb:null,ab:Li,Ua:function(b,e){return c.a(b,e)}},{bb:Mi,ab:Li,Ua:function(b,e){return c.a(b,e)}},{bb:Ni,ab:Li,Ua:function(b,e){return c.a(b,e)}},{bb:Li,ab:Mi,Ua:function(b,e){return c.b(b,e)}},{bb:Li,ab:Ni,Ua:function(b,e){return c.b(b,e)}},{bb:Mi,ab:Ni,Ua:function(b,e){return c.c(b,e)}},{bb:Ni,ab:Mi,Ua:function(b,e){return c.c(b,e)}}]}
335
+ Ki.prototype.release=function(){this.h=null;this.f.clear();this.a=function(){};this.b=function(){};this.c=function(){}};Ki.prototype.g=function(b,c){for(var d=r(this.h.a),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.f.get(e),g=b<e.startTime?Mi:b>e.endTime?Ni:Li;this.f.set(e,g);for(var h=r(this.i),k=h.next();!k.done;k=h.next())k=k.value,k.bb==f&&k.ab==g&&k.Ua(e,c)}};function Oi(b,c,d,e){b.a=c;b.b=d;b.c=e}var Mi=1,Li=2,Ni=3;function Pi(b,c){this.a=c;this.c=b;this.g=null;this.l=1;this.v=Promise.resolve();this.h=[];this.i=new Map;this.b=new Map;this.s=!1;this.G=null;this.D=this.f=this.m=!1;this.C=0}Pi.prototype.destroy=function(){for(var b=r(this.b.values()),c=b.next();!c.done;c=b.next())Qi(c.value);this.b.clear();this.i.clear();this.g=this.h=this.v=this.c=this.a=null;this.f=!0;return Promise.resolve()};
336
+ Pi.prototype.configure=function(b){this.g=b;this.G=new xb({maxAttempts:Math.max(b.retryParameters.maxAttempts,2),baseDelay:b.retryParameters.baseDelay,backoffFactor:b.retryParameters.backoffFactor,fuzzFactor:b.retryParameters.fuzzFactor,timeout:0},!0)};
337
+ Pi.prototype.start=function(){var b=this;return t(function d(){var e,f,g;return z(d,function(d){switch(d.j){case 1:return e=b.a.Sa(),f=Ri(b,e),g=b.a.Ld(b.c.periods[f]),g.variant||g.text?u(d,Si(b,g.variant?g.variant.audio:null,g.variant?g.variant.video:null,g.text,e),2):d["return"](new G(2,5,5005));case 2:if(b.f)return d["return"]();b.a&&b.a.gf&&b.a.gf();v(d)}})})};function Ti(b){return Ui(b,"audio")}function Vi(b){return Ui(b,"video")}
338
+ function Ui(b,c){var d=b.b.get(c);return d?d.Ia||d.stream:null}
339
+ function Wi(b,c){return t(function e(){var f,g,h,k,l,m,n,q,w,x;return z(e,function(e){switch(e.j){case 1:return f=Cd,u(e,pe(b.a.I,f.qa),2);case 2:return b.C++,b.D=!1,g=b.C,h=b.a.I,k=new Map,l=new Set,k.set(f.qa,c),l.add(c),u(e,h.init(k,!1),3);case 3:return b.f?e["return"]():u(e,Xi(b,l),4);case 4:if(b.f)return e["return"]();n=(m=b.a.I.g.isTextVisible())||b.g.alwaysStreamText;b.C!=g||b.b.has(f.qa)||b.D||!n||(q=b.a.Sa(),w=Ri(b,q),x=Yi(c,w,0),b.b.set(f.qa,x),Zi(b,x,0));v(e)}})})}
340
+ function $i(b,c){var d=b.b.get("video");if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.Ia&&(aj(b,f,!1,0,!1),d.Ia=e)}else if(e=d.Ia)d.Ia=null,aj(b,e,!0,0,!1)}}function bj(b,c,d,e){c.video&&aj(b,c.video,d,e,!1);c.audio&&aj(b,c.audio,d,e,!1)}
341
+ function aj(b,c,d,e,f){var g=b.b.get(c.type);if(!g&&"text"==c.type&&b.g.ignoreTextStreamFailures)Wi(b,c);else if(g){var h=cj(b,c),k=Array.from(b.b.values()).every(function(b){return b.pa==g.pa});d&&h!=g.pa&&k?b.b.forEach(function(c){dj(b,c)}):(g.Ia&&(c.trickModeVideo?(g.Ia=c,c=c.trickModeVideo):g.Ia=null),(k=b.h[h])&&k.zb&&(k=b.i.get(c.id))&&k.zb&&(g.stream!=c||f)&&("text"==c.type&&he(b.a.I,oc(c.mimeType,c.codecs)),g.stream=c,g.hc=!0,ej(b,g,h)&&g.Kb.abort(),d&&(g.Pa?g.uc=!0:g.Ha?(g.Ma=!0,g.Zb=e,g.uc=
342
+ !0):(Qi(g),fj(b,g,!0,e)["catch"](function(c){if(b.a)b.a.onError(c)})))))}}function ej(b,c,d){if(!c.Kb)return!1;var e=b.a.Sa(),f=le(b.a.I,c.type);d=(d=gj(b,c,e,f,d))?d.a?d.a-d.b:null:null;if(null==d)return!1;var g=c.stream.initSegmentReference;g&&(d+=(g.a?g.a-g.b:null)||0);g=b.a.getBandwidthEstimate();return 8*d/g<f-e-Math.max(b.c.minBufferTime||0,b.g.rebufferingGoal)||c.Kb.b.a>d?!0:!1}
343
+ function hj(b){function c(c){var f=b.a.I;"text"==c?(c=f.a,c=null==c.a||null==c.b?!1:d>=c.a&&d<c.b):(c=ke(f,c),c=vd(c,d,e));return c}var d=b.a.Sa(),e=b.g.smallGapLimit,f=Ri(b,d);if(lc(b.b.values(),function(b){return b.pa==f}))for(var g=r(b.b.keys()),h=g.next();!h.done;h=g.next())h=h.value,c(h)||dj(b,b.b.get(h));else lc(b.b.keys(),c)||b.b.forEach(function(c){dj(b,c)})}
344
+ function dj(b,c){c.Pa||c.Ma||(c.Ha?(c.Ma=!0,c.Zb=0):null==je(b.a.I,c.type)?null==c.Da&&Zi(b,c,0):(Qi(c),fj(b,c,!1,0)["catch"](function(c){if(b.a)b.a.onError(c)})))}
345
+ function Si(b,c,d,e,f){return t(function h(){var k,l,m,n,q,w,x;return z(h,function(h){switch(h.j){case 1:return k=b.a.Sa(),l=Ri(b,k),m=Cd,n=new Map,q=new Set,c&&(n.set(m.Ab,c),q.add(c)),d&&(n.set(m.Na,d),q.add(d)),e&&(n.set(m.qa,e),q.add(e)),w=b.a.I,x=b.g.forceTransmuxTS,u(h,w.init(n,x),2);case 2:if(b.f)return h["return"]();ij(b);return u(h,Xi(b,q),3);case 3:if(b.f)return h["return"]();n.forEach(function(c,d){if(!b.b.has(d)){var e=Yi(c,l,f);b.b.set(d,e);Zi(b,e,0)}});v(h)}})})}
346
+ function Yi(b,c,d){return{stream:b,type:b.type,pb:null,Aa:null,Ia:null,hc:!0,pa:c,endOfStream:!1,Ha:!1,Da:null,Ma:!1,Zb:0,uc:!1,Pa:!1,dd:!1,Ib:!1,Zd:d||0,Kb:null}}
347
+ function jj(b,c){var d=b.h[c];if(d)return d.promise;d={promise:new H,zb:!1};b.h[c]=d;for(var e=new Set,f=r(b.c.periods[c].variants),g=f.next();!g.done;g=f.next())g=g.value,g.video&&e.add(g.video),g.video&&g.video.trickModeVideo&&e.add(g.video.trickModeVideo),g.audio&&e.add(g.audio);f=r(b.c.periods[c].textStreams);for(g=f.next();!g.done;g=f.next())e.add(g.value);b.v=b.v.then(function(){if(!this.f)return Xi(this,e)}.bind(b)).then(function(){this.f||(this.h[c].promise.resolve(),this.h[c].zb=!0)}.bind(b))["catch"](function(b){this.f||
337
348
  (this.h[c].promise["catch"](function(){}),this.h[c].promise.reject(),delete this.h[c],this.a.onError(b))}.bind(b));return d.promise}
338
- function Li(b,c){return t(function e(){var f,g,h,k,l,m,n;return y(e,function(e){switch(e.l){case 1:f=[];for(var q=r(c),w=q.next();!w.done;w=q.next())g=w.value,(h=b.i.get(g.id))?f.push(h.promise):(b.i.set(g.id,{promise:new G,vb:!1}),f.push(g.createSegmentIndex()));ya(e,2);return u(e,Promise.all(f),4);case 4:if(b.f)return e["return"]();Aa(e,3);break;case 2:k=Da(e);if(b.f)return e["return"]();e=r(c);for(w=e.next();!w.done;w=e.next())l=w.value,b.i.get(l.id).promise["catch"](function(){}),b.i.get(l.id).promise.reject(),
339
- b.i["delete"](l.id);throw k;case 3:q=r(c);for(w=q.next();!w.done;w=q.next())m=w.value,n=b.i.get(m.id),n.vb||(n.promise.resolve(),n.vb=!0);v(e)}})})}function Xi(b){var c=b.c.presentationTimeline.Y();Infinity>c?b.a.L.ta(c):b.a.L.ta(Math.pow(2,32))}
340
- function Zi(b,c){if(!b.f&&!c.Ea&&null!=c.Ba&&!c.Na)if(c.Ba=null,c.Ja)Ui(b,c,c.qc,c.Wb);else{try{var d=$i(b,c);null!=d&&(Ni(b,c,d),c.Eb=!1)}catch(e){aj(b,e);return}d=Array.from(b.b.values());bj(b,c);b.o&&d.every(function(b){return b.endOfStream})&&b.a.L.endOfStream().then(function(){if(!this.f){var b=this.a.L.Y();b<this.c.presentationTimeline.Y()&&this.c.presentationTimeline.ta(b)}}.bind(b))}}
341
- function $i(b,c){function d(b){return"text"==b.type&&"application/cea-608"==b.stream.mimeType}if(d(c))return b.a.L.nc(c.stream.originalId||""),null;var e=b.a.Qa(),f=cj(b,c,e),g=Ri(b,c.stream),h=Fi(b,f),k=ge(b.a.L,c.type,e),l=Math.max(b.c.minBufferTime||0,b.g.rebufferingGoal,b.g.bufferingGoal)*b.j;if(f>=b.c.presentationTimeline.Y())return c.endOfStream=!0,"video"==c.type&&(f=b.b.get("text"))&&"application/cea-608"==f.stream.mimeType&&(f.endOfStream=!0),null;c.endOfStream=!1;c.ya=h;if(h!=g)return null;
342
- if(k>=l)return.5;h=fe(b.a.L,c.type);h=Vi(b,c,e,h,g);if(!h)return 1;var m=Infinity;Array.from(b.b.values()).forEach(function(c){d(c)||(c=cj(b,c,e),m=Math.min(m,c))});if(f>=m+b.c.presentationTimeline.a)return 1;c.Wd=0;dj(b,c,e,g,h);return null}function cj(b,c,d){if(!c.lb||!c.xa)return Math.max(d,c.Wd);d=Ri(b,c.lb);return b.c.periods[d].startTime+c.xa.endTime}
343
- function Vi(b,c,d,e,f){if(c.xa&&c.stream==c.lb)return ej(b,c,f,c.xa.position+1);c.xa?(d=Ri(b,c.lb),d=c.stream.findSegmentPosition(Math.max(0,b.c.periods[d].startTime+c.xa.endTime-b.c.periods[f].startTime))):d=c.stream.findSegmentPosition(Math.max(0,(e||d)-b.c.periods[f].startTime));if(null==d)return null;var g=null;null==e&&(g=ej(b,c,f,Math.max(0,d-1)));return g||ej(b,c,f,d)}
344
- function ej(b,c,d,e){d=b.c.periods[d];c=c.stream.getSegmentReference(e);if(!c)return null;e=b.c.presentationTimeline;b=e.Db();e=e.jb();return d.startTime+c.endTime<b||d.startTime+c.startTime>e?null:c}
345
- function dj(b,c,d,e,f){var g=b.c.periods[e],h=c.stream,k=b.c.presentationTimeline.Y(),l=b.c.periods[e+1];e=fj(b,c,e,Math.max(0,g.startTime-.1),l?l.startTime+.01:k);c.Ea=!0;c.ec=!1;k=gj(b,c,f);Promise.all([e,k]).then(function(b){if(!this.f&&!this.m)return hj(this,c,d,g,h,f,b[1])}.bind(b)).then(function(){this.f||this.m||(c.Ea=!1,c.Zc=!1,c.Ja||this.a.Vc(),Ni(this,c,0),ij(this,h))}.bind(b))["catch"](function(b){this.f||this.m||(c.Ea=!1,"text"==c.type&&this.g.ignoreTextStreamFailures?this.b["delete"]("text"):
346
- 7001==b.code?(c.Ea=!1,c.Ba=null,Ni(this,c,0)):3017==b.code?jj(this,c,b):(c.Eb=!0,b.severity=2,aj(this,b)))}.bind(b))}function jj(b,c,d){if(!Array.from(b.b.values()).some(function(b){return b!=c&&b.Zc})){var e=Math.round(100*b.j);if(20<e)b.j-=.2;else if(4<e)b.j-=.04;else{c.Eb=!0;b.m=!0;b.a.onError(d);return}c.Zc=!0}Ni(b,c,4)}
347
- function fj(b,c,d,e,f){if(!c.ec)return Promise.resolve();d=ke(b.a.L,c.type,b.c.periods[d].startTime-c.stream.presentationTimeOffset,e,f);if(!c.stream.initSegmentReference)return d;b=gj(b,c,c.stream.initSegmentReference).then(function(b){if(!this.f)return he(this.a.L,c.type,b,null,null,c.stream.closedCaptions&&0<c.stream.closedCaptions.size)}.bind(b))["catch"](function(b){c.ec=!0;return Promise.reject(b)});return Promise.all([d,b])}
348
- function hj(b,c,d,e,f,g,h){var k=f.closedCaptions&&0<f.closedCaptions.size;null!=f.emsgSchemeIdUris&&0<f.emsgSchemeIdUris.length&&(new S).ca("emsg",b.K.bind(b,e,g,f.emsgSchemeIdUris)).parse(h);return kj(b,c,d).then(function(){if(!this.f)return he(this.a.L,c.type,h,g.startTime+e.startTime,g.endTime+e.startTime,k)}.bind(b)).then(function(){if(!this.f)return c.lb=f,c.xa=g,Promise.resolve()}.bind(b))}
349
- Di.prototype.K=function(b,c,d,e){var f=e.reader.Xc(),g=e.reader.Xc(),h=e.reader.D(),k=e.reader.D(),l=e.reader.D(),m=e.reader.D();e=e.reader.Va(e.reader.I.byteLength-e.reader.aa());b=b.startTime+c.startTime+k/h;if(d.includes(f))if("urn:mpeg:dash:event:2012"==f)this.a.df();else this.a.onEvent(new I("emsg",{detail:{startTime:b,endTime:b+l/h,schemeIdUri:f,value:g,timescale:h,presentationTimeDelta:k,eventDuration:l,id:m,messageData:e}}))};
350
- function kj(b,c,d){var e=Math.max(b.g.bufferBehind,b.c.presentationTimeline.a),f=de(b.a.L,c.type);if(null==f)return Promise.resolve();d=d-f-e;return 0>=d?Promise.resolve():b.a.L.remove(c.type,f,f+d).then(function(){}.bind(b))}
351
- function ij(b,c){if(!b.o){var d=Array.from(b.b.values());if(1!=d.length||"text"!=d[0].type)b.o=d.every(function(b){return"text"==b.type?!0:!b.Ja&&!b.Na&&b.xa});if(b.o){d=Ri(b,c);b.h[d]||Yi(b,d).then(function(){this.f||this.a.Hd()}.bind(b))["catch"](td.Gb);for(d=0;d<b.c.periods.length;++d)Yi(b,d)["catch"](td.Gb);b.a.nf&&b.a.nf()}}}
352
- function bj(b,c){var d=Ri(b,c.stream);if(c.ya!=d){var e=c.ya,f=Array.from(b.b.values());f.every(function(b){return b.ya==e})&&f.every(lj)&&Yi(b,e).then(function(){if(!this.f&&f.every(function(b){var c=lj(b),d=Ri(this,b.stream);return c&&b.ya==e&&d!=e}.bind(this))){var b=this.c.periods[e],c=this.a.Id(b),d=new Map;c.variant&&c.variant.video&&d.set("video",c.variant.video);c.variant&&c.variant.audio&&d.set("audio",c.variant.audio);c.text&&d.set("text",c.text);var l=r(this.b.keys());for(c=l.next();!c.done;c=
353
- l.next())if(c=c.value,!d.has(c)&&"text"!=c){this.a.onError(new D(2,5,5005));return}l=r(Array.from(d.keys()));for(c=l.next();!c.done;c=l.next())if(c=c.value,!this.b.has(c))if("text"==c)Gi(this,null,null,d.get("text"),b.startTime),d["delete"](c);else{this.a.onError(new D(2,5,5005));return}b=r(Array.from(this.b.keys()));for(c=b.next();!c.done;c=b.next())c=c.value,(l=d.get(c))?(Pi(this,l,!1,0,!1),Ni(this,this.b.get(c),0)):this.b["delete"](c);this.a.Hd()}}.bind(b))["catch"](td.Gb)}}
354
- function lj(b){return!b.Ea&&null==b.Ba&&!b.Ja&&!b.Na}function Fi(b,c){var d=di(b.c.periods,c+xd);return d?b.c.periods.indexOf(d):0}function Ri(b,c){for(var d=b.c.periods,e=0;e<d.length;e++){for(var f=d[e],g=new Set,h=r(f.variants),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&g.add(k.audio),k.video&&g.add(k.video),k.video&&k.video.trickModeVideo&&g.add(k.video.trickModeVideo);f=r(f.textStreams);for(h=f.next();!h.done;h=f.next())g.add(h.value);if(g.has(c))return e}return-1}
355
- function gj(b,c,d){d=og(d.c(),d.b,d.a,b.g.retryParameters);b=b.a.nb.request(1,d);c.Hb=b;return b.promise.then(function(b){c.Hb=null;return b.data})}
356
- function Ui(b,c,d,e){t(function g(){var h,k,l;return y(g,function(g){switch(g.l){case 1:return c.Ja=!1,c.qc=!1,c.Wb=0,c.Na=!0,e?(k=b.a.Qa(),l=b.a.L.Y(),h=b.a.L.remove(c.type,k+e,l)):h=je(b.a.L,c.type).then(function(){if(!this.f&&d)return this.a.L.flush(c.type)}.bind(b)),u(g,h,2);case 2:if(b.f)return g["return"]();c.lb=null;c.xa=null;c.Na=!1;c.endOfStream=!1;Ni(b,c,0);v(g)}})})}function Ni(b,c,d){c.Ba=(new sb(function(){Zi(b,c)})).O(d)}function Ei(b){null!=b.Ba&&(b.Ba.stop(),b.Ba=null)}
357
- function aj(b,c){zb(b.F).then(function(){this.f||(this.a.onError(c),c.handled||this.g.failureCallback(c))}.bind(b))};function mj(b,c,d,e,f,g){if(200<=d&&299>=d&&202!=d)return f&&(e=f),{uri:e,data:c,headers:b,fromCache:!!b["x-shaka-from-cache"]};f=null;try{f=xc(c)}catch(h){}throw new D(401==d||403==d?2:1,1,1001,e,d,f,b,g);};function nj(b,c,d,e){var f=new nj.b;gc(c.headers).forEach(function(b,c){f.append(c,b)});var g=new nj.a,h={qd:!1,de:!1};b=nj.h(b,d,{body:c.body||void 0,headers:f,method:c.method,signal:g.signal,credentials:c.allowCrossSiteCredentials?"include":void 0},h,e);b=new H(b,function(){h.qd=!0;g.abort();return Promise.resolve()});if(c=c.retryParameters.timeout){var k=new B(function(){h.de=!0;g.abort()});k.O(c/1E3);b["finally"](function(){k.stop()})}return b}z("shaka.net.HttpFetchPlugin",nj);
358
- nj.h=function(b,c,d,e,f){return t(function h(){var k,l,m,n,q,x,w,A,C,E,F,V,Y,wa;return y(h,function(h){switch(h.l){case 1:return k=nj.g,l=nj.c,x=q=0,w=Date.now(),ya(h,2),u(h,k(b,d),4);case 4:return m=h.s,A=m.clone().body.getReader(),E=(C=m.headers.get("Content-Length"))?parseInt(C,10):0,F=function(b){function c(){return t(function ja(){var d,e;return y(ja,function(h){switch(h.l){case 1:return ya(h,2),u(h,A.read(),4);case 4:d=h.s;Aa(h,3);break;case 2:return Da(h),h["return"]();case 3:d.done||(q+=d.value.byteLength);
359
- e=Date.now();if(100<e-w||d.done)f(e-w,q-x,E-q),x=q,w=e;d.done?b.close():(b.enqueue(d.value),c());v(h)}})})}c()},new l({start:F}),u(h,m.arrayBuffer(),5);case 5:n=h.s;Aa(h,3);break;case 2:V=Da(h);if(e.qd)throw new D(1,1,7001,b,c);if(e.de)throw new D(1,1,1003,b,c);throw new D(1,1,1002,b,V,c);case 3:return Y={},wa=m.headers,wa.forEach(function(b,c){Y[c.trim()]=b}),h["return"](mj(Y,n,m.status,b,m.url,c))}})})};
360
- nj.isSupported=function(){if(window.ReadableStream)try{new ReadableStream({})}catch(b){return!1}else return!1;return!(!window.fetch||!window.AbortController)};nj.isSupported=nj.isSupported;nj.g=window.fetch;nj.a=window.AbortController;nj.c=window.ReadableStream;nj.b=window.Headers;nj.isSupported()&&(Rb("http",nj,2),Rb("https",nj,2));function oj(b,c,d,e){var f=new oj.f,g=Date.now(),h=0,k=new Promise(function(k,m){f.open(c.method,b,!0);f.responseType="arraybuffer";f.timeout=c.retryParameters.timeout;f.withCredentials=c.allowCrossSiteCredentials;f.onabort=function(){m(new D(1,1,7001,b,d))};f.onload=function(c){c=c.target;var e=c.getAllResponseHeaders().trim().split("\r\n"),f={};e=r(e);for(var g=e.next();!g.done;g=e.next())g=g.value.split(": "),f[g[0].toLowerCase()]=g.slice(1).join(": ");try{var h=mj(f,c.response,c.status,b,c.responseURL,
361
- d);k(h)}catch(E){m(E)}};f.onerror=function(c){m(new D(1,1,1002,b,c,d))};f.ontimeout=function(){m(new D(1,1,1003,b,d))};f.onprogress=function(b){var c=Date.now();if(100<c-g||b.lengthComputable&&b.loaded==b.total)e(c-g,b.loaded-h,b.total-b.loaded),h=b.loaded,g=c};for(var l in c.headers)f.setRequestHeader(l.toLowerCase(),c.headers[l]);f.send(c.body)});return new H(k,function(){f.abort();return Promise.resolve()})}z("shaka.net.HttpXHRPlugin",oj);oj.f=window.XMLHttpRequest;Rb("http",oj,1);
362
- Rb("https",oj,1);function pj(){this.a=this.f=this.b=0;this.c=new Map;this.g=0}function qj(b,c){b.b+=c;var d=b.g;b.g++;b.c.set(d,c);return d}pj.prototype.close=function(b,c){if(this.c.has(b)){var d=this.c.get(b);this.c["delete"](b);this.f+=d;this.a+=c}};function rj(b,c){this.g=b;this.b=new Map;this.c=!1;this.f=c;this.a=new pj}rj.prototype.destroy=function(){this.c=!0;return Promise.all(this.b.values()).then(function(){},function(){})};
363
- function sj(b,c,d,e,f){var g=qj(b.a,e);e=b.b.get(c)||Promise.resolve();b.b.set(c,e.then(function(){return t(function k(){var c;return y(k,function(e){switch(e.l){case 1:return u(e,tj(b,d),2);case 2:c=e.s;if(b.c)throw new D(2,9,7001);b.a.close(g,c.byteLength);var k=b.a;b.f(0==k.b?0:k.f/k.b,b.a.a);return e["return"](f(c))}})})}))}function uj(b){return t(function d(){return y(d,function(d){switch(d.l){case 1:return u(d,Promise.all(b.b.values()),2);case 2:return d["return"](b.a.a)}})})}
364
- function tj(b,c){return t(function e(){var f,g;return y(e,function(e){switch(e.l){case 1:return f=b.g.request(1,c),u(e,f.promise,2);case 2:return g=e.s,e["return"](g.data)}})})};function vj(b,c){var d=this;this.c=b;this.b=b.objectStore(c);this.a=new G;b.onabort=function(b){b.preventDefault();d.a.reject()};b.onerror=function(b){b.preventDefault();d.a.reject()};b.oncomplete=function(){d.a.resolve()}}vj.prototype.abort=function(){try{this.c.abort()}catch(b){}return this.a["catch"](function(){})};
365
- function wj(b,c){return new Promise(function(d,e){var f=b.b.openCursor();f.onerror=e;f.onsuccess=function(b){b=b.target.result;if(!b)return d();c(b.key,b.value,b);b["continue"]()}})}vj.prototype.store=function(){return this.b};vj.prototype.promise=function(){return this.a};function xj(b){this.b=b;this.a=[]}xj.prototype.destroy=function(){return Promise.all(this.a.map(function(b){return b.abort()}))};function yj(b,c){return zj(b,c,"readonly")}function Aj(b,c){return zj(b,c,"readwrite")}function zj(b,c,d){d=b.b.transaction([c],d);var e=new vj(d,c);b.a.push(e);e.promise().then(function(){Kb(b.a,e)},function(){Kb(b.a,e)});return e};function Bj(b){this.a=new xj(b)}Bj.prototype.destroy=function(){return this.a.destroy()};Bj.prototype.getAll=function(){var b=this;return t(function d(){var e,f;return y(d,function(d){switch(d.l){case 1:return e=yj(b.a,"session-ids"),f=[],u(d,wj(e,function(b,d){f.push(d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};Bj.prototype.add=function(b){var c=Aj(this.a,"session-ids"),d=c.store();b=r(b);for(var e=b.next();!e.done;e=b.next())d.add(e.value);return c.promise()};
366
- Bj.prototype.remove=function(b){var c=this;return t(function e(){var f;return y(e,function(e){switch(e.l){case 1:return f=Aj(c.a,"session-ids"),u(e,wj(f,function(c,e,f){0<=b.indexOf(e.sessionId)&&f["delete"]()}),2);case 2:return u(e,f.promise(),0)}})})};function Cj(){this.a=new Map}Cj.prototype.destroy=function(){for(var b=[],c=r(this.a.values()),d=c.next();!d.done;d=c.next())b.push(d.value.destroy());this.a.clear();return Promise.all(b)};Cj.prototype.init=function(){var b=this;Dj.forEach(function(c,d){var e=c();e&&b.a.set(d,e)});for(var c=[],d=r(this.a.values()),e=d.next();!e.done;e=d.next())c.push(e.value.init());return Promise.all(c)};
367
- function Ej(b){var c=null;b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){b.hasFixedKeySpace()||c||(c={path:{ra:e,$:d},$:b})})});if(c)return c;throw new D(2,9,9013,"Could not find a cell that supports add-operations");}function Fj(b,c){b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){c({ra:e,$:d},b)})})}
368
- function Gj(b,c,d){b=b.a.get(c);if(!b)throw new D(2,9,9013,"Could not find mechanism with name "+c);c=b.getCells().get(d);if(!c)throw new D(2,9,9013,"Could not find cell with name "+d);return c}function Hj(b,c){b.a.forEach(function(b){c(b.getEmeSessionCell())})}function Ij(b){var c=Array.from(b.a.keys());if(!c.length)throw new D(2,9,9E3,"No supported storage mechanisms found");return b.a.get(c[0]).getEmeSessionCell()}
369
- Cj.prototype.erase=function(){var b=this;return t(function d(){var e,f,g;return y(d,function(d){switch(d.l){case 1:return e=Array.from(b.a.values()),f=0<e.length,f||(g=Dj,g.forEach(function(b){(b=b())&&e.push(b)})),u(d,Promise.all(e.map(function(b){return b.erase()})),2);case 2:if(f)d.A(0);else return u(d,Promise.all(e.map(function(b){return b.destroy()})),0)}})})};function Jj(b,c){Dj.set(b,c)}z("shaka.offline.StorageMuxer.register",Jj);z("shaka.offline.StorageMuxer.unregister",function(b){Dj["delete"](b)});
370
- var Dj=new Map;function Kj(b){this.a=new xj(b)}p=Kj.prototype;p.destroy=function(){return this.a.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return Lj("segment")};p.removeSegments=function(b,c){return Mj(this,"segment",b,c)};p.getSegments=function(b){return Nj(this,"segment",b).then(function(b){return b.map(Oj)})};p.addManifests=function(){return Lj("manifest")};
371
- p.updateManifestExpiration=function(b,c){var d=Aj(this.a,"manifest"),e=d.store(),f=new G;e.get(b).onsuccess=function(d){(d=d.target.result)?(d.expiration=c,e.put(d),f.resolve()):f.reject(new D(2,9,9012,"Could not find values for "+b))};return d.promise().then(function(){return f})};p.removeManifests=function(b,c){return Mj(this,"manifest",b,c)};p.getManifests=function(b){return Nj(this,"manifest",b).then(function(b){return b.map(Pj)})};
372
- p.getAllManifests=function(){var b=this;return t(function d(){var e,f;return y(d,function(d){switch(d.l){case 1:return e=yj(b.a,"manifest"),f=new Map,u(d,wj(e,function(b,d){f.set(b,Pj(d))}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};function Lj(b){return Promise.reject(new D(2,9,9011,"Cannot add new value to "+b))}function Mj(b,c,d,e){b=Aj(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
373
- function Nj(b,c,d){b=yj(b.a,c);var e=b.store(),f={},g=[];d.forEach(function(b){e.get(b).onsuccess=function(c){c=c.target.result;void 0==c&&g.push(b);f[b]=c}});return b.promise().then(function(){return g.length?Promise.reject(new D(2,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})}
374
- function Pj(b){return{originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:null==b.expiration?Infinity:b.expiration,periods:b.periods.map(Qj),sessionIds:b.sessionIds,drmInfo:b.drmInfo,appMetadata:b.appMetadata}}function Qj(b){Rj(b);b.streams.forEach(function(){});return{startTime:b.startTime,streams:b.streams.map(Sj)}}
375
- function Sj(b){var c=b.We?Tj(b.We):null;return{id:b.id,originalId:null,primary:b.primary,presentationTimeOffset:b.presentationTimeOffset,contentType:b.contentType,mimeType:b.mimeType,codecs:b.codecs,frameRate:b.frameRate,kind:b.kind,language:b.language,label:b.label,width:b.width,height:b.height,initSegmentKey:c,encrypted:b.encrypted,keyId:b.keyId,segments:b.segments.map(Uj),variantIds:b.variantIds}}function Uj(b){var c=Tj(b.uri);return{startTime:b.startTime,endTime:b.endTime,dataKey:c}}
376
- function Oj(b){return{data:b.data}}function Tj(b){var c;if((c=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(b))||(c=/^offline:segment\/([0-9]+)$/.exec(b)))return Number(c[1]);throw new D(2,9,9004,"Could not parse uri "+b);}
377
- function Rj(b){var c=b.streams.filter(function(b){return"audio"==b.contentType}),d=b.streams.filter(function(b){return"video"==b.contentType});if(!c.every(function(b){return b.variantIds})||!d.every(function(b){return b.variantIds})){c.forEach(function(b){b.variantIds=[]});d.forEach(function(b){b.variantIds=[]});var e=0;if(d.length&&!c.length){var f=e++;d.forEach(function(b){b.variantIds.push(f)})}if(!d.length&&c.length){var g=e++;c.forEach(function(b){b.variantIds.push(g)})}d.length&&c.length&&c.forEach(function(b){d.forEach(function(c){var d=
378
- e++;b.variantIds.push(d);c.variantIds.push(d)})})}};function Vj(b,c,d,e){this.a=new xj(b);this.c=c;this.b=d;this.f=e}p=Vj.prototype;p.destroy=function(){return this.a.destroy()};p.hasFixedKeySpace=function(){return this.f};p.addSegments=function(b){return Wj(this,this.c,b)};p.removeSegments=function(b,c){return Xj(this,this.c,b,c)};p.getSegments=function(b){return Yj(this,this.c,b)};p.addManifests=function(b){return Wj(this,this.b,b)};
379
- p.updateManifestExpiration=function(b,c){var d=Aj(this.a,this.b),e=d.store();e.get(b).onsuccess=function(d){if(d=d.target.result)d.expiration=c,e.put(d,b)};return d.promise()};p.removeManifests=function(b,c){return Xj(this,this.b,b,c)};p.getManifests=function(b){return Yj(this,this.b,b)};
380
- p.getAllManifests=function(){var b=this;return t(function d(){var e,f;return y(d,function(d){switch(d.l){case 1:return e=yj(b.a,b.b),f=new Map,u(d,wj(e,function(b,d){f.set(b,d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};
381
- function Wj(b,c,d){if(b.f)return Promise.reject(new D(1,9,9011,"Cannot add new value to "+c));b=Aj(b.a,c);var e=b.store(),f=[];d.forEach(function(b){e.add(b).onsuccess=function(b){f.push(b.target.result)}});return b.promise().then(function(){return f})}function Xj(b,c,d,e){b=Aj(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
382
- function Yj(b,c,d){b=yj(b.a,c);var e=b.store(),f={},g=[];d.forEach(function(b){var c=e.get(b);c.onsuccess=function(){void 0==c.result&&g.push(b);f[b]=c.result}});return b.promise().then(function(){return g.length?Promise.reject(new D(1,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})};function Zj(){this.g=this.c=this.b=this.a=this.f=null}p=Zj.prototype;
383
- p.init=function(){var b=this,c=new G,d=window.indexedDB.open("shaka_offline_db",4);d.onsuccess=function(d){d=d.target.result;b.f=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Kj(d):null;b.a=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Vj(d,"segment-v2","manifest-v2",!0):null;b.b=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Vj(d,"segment-v3","manifest-v3",!1):null;b.c=e;d=d.objectStoreNames.contains("session-ids")?
384
- new Bj(d):null;b.g=d;c.resolve()};d.onupgradeneeded=function(b){b=b.target.result;for(var c=r(["segment-v3","manifest-v3","session-ids"]),d=c.next();!d.done;d=c.next())d=d.value,b.objectStoreNames.contains(d)||b.createObjectStore(d,{autoIncrement:!0})};d.onerror=function(b){c.reject(new D(2,9,9001,d.error));b.preventDefault()};return c};
385
- p.destroy=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.l){case 1:if(!b.a){d.A(2);break}return u(d,b.a.destroy(),2);case 2:if(!b.b){d.A(4);break}return u(d,b.b.destroy(),4);case 4:if(!b.c){d.A(6);break}return u(d,b.c.destroy(),6);case 6:if(!b.g){d.A(8);break}return u(d,b.g.destroy(),8);case 8:b.f&&b.f.close(),v(d)}})})};p.getCells=function(){var b=new Map;this.a&&b.set("v1",this.a);this.b&&b.set("v2",this.b);this.c&&b.set("v3",this.c);return b};p.getEmeSessionCell=function(){return this.g};
386
- p.erase=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.l){case 1:if(!b.a){d.A(2);break}return u(d,b.a.destroy(),2);case 2:if(!b.b){d.A(4);break}return u(d,b.b.destroy(),4);case 4:if(!b.c){d.A(6);break}return u(d,b.c.destroy(),6);case 6:return b.f&&b.f.close(),u(d,ak(),8);case 8:return b.f=null,b.a=null,b.b=null,b.c=null,u(d,b.init(),0)}})})};
387
- function ak(){var b=new G,c=window.indexedDB.deleteDatabase("shaka_offline_db");c.onblocked=function(){};c.onsuccess=function(){b.resolve()};c.onerror=function(d){b.reject(new D(2,9,9001,c.error));d.preventDefault()};return b}Jj("idb",function(){return window.indexedDB?new Zj:null});function bk(b,c,d,e){this.a=b;this.g=c;this.f=d;this.c=e;this.b=["offline:",b,"/",c,"/",d,"/",e].join("")}bk.prototype.ra=function(){return this.g};bk.prototype.$=function(){return this.f};bk.prototype.key=function(){return this.c};bk.prototype.toString=function(){return this.b};
388
- function ck(b){b=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(b);if(null==b)return null;var c=b[1];if("manifest"!=c&&"segment"!=c)return null;var d=b[2];if(!d)return null;var e=b[3];return e&&null!=c?new bk(c,d,e,Number(b[4])):null};function dk(b,c){this.b=b;this.a=c}function ek(b,c){var d=new W(null,0);d.ta(c.duration);var e=c.periods.map(function(c){return fk(b,c,d)}),f=c.drmInfo?[c.drmInfo]:[];c.drmInfo&&e.forEach(function(b){b.variants.forEach(function(b){b.drmInfos=f})});return{presentationTimeline:d,minBufferTime:2,offlineSessionIds:c.sessionIds,periods:e}}
389
- function fk(b,c,d){var e=c.streams.filter(function(b){return"audio"==b.contentType}),f=c.streams.filter(function(b){return"video"==b.contentType});e=gk(b,e,f);f=c.streams.filter(function(b){return"text"==b.contentType}).map(function(c){return hk(b,c)});c.streams.forEach(function(e){e=e.segments.map(function(c,d){return ik(b,d,c)});d.ob(e,c.startTime)});return{startTime:c.startTime,variants:Array.from(e.values()),textStreams:f}}
390
- function gk(b,c,d){for(var e=new Set,f=r(c),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(d);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,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});c=r(c);for(e=c.next();!e.done;e=c.next())for(e=
391
- e.value,g=hk(b,e),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;d=r(d);for(c=d.next();!c.done;c=d.next())for(e=c.value,c=hk(b,e),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||c.primary,e.video=c;return f}
392
- function hk(b,c){var d=c.segments.map(function(c,d){return ik(b,d,c)}),e=new T(d);d={id:c.id,originalId:c.originalId,createSegmentIndex:function(){return Promise.resolve()},findSegmentPosition:function(b){return e.find(b)},getSegmentReference:function(b){return e.get(b)},initSegmentReference:null,presentationTimeOffset:c.presentationTimeOffset,mimeType:c.mimeType,codecs:c.codecs,width:c.width||void 0,height:c.height||void 0,frameRate:c.frameRate||void 0,kind:c.kind,encrypted:c.encrypted,keyId:c.keyId,
393
- language:c.language,label:c.label||null,type:c.contentType,primary:c.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};null!=c.initSegmentKey&&(d.initSegmentReference=jk(b,c.initSegmentKey));return d}function ik(b,c,d){var e=new bk("segment",b.b,b.a,d.dataKey);return new Q(c,d.startTime,d.endTime,function(){return[e.toString()]},0,null)}function jk(b,c){var d=new bk("segment",b.b,b.a,c);return new If(function(){return[d.toString()]},0,null)};function kk(){this.a=null}p=kk.prototype;p.configure=function(){};
394
- p.start=function(b){var c=this;return t(function e(){var f,g,h,k,l,m;return y(e,function(e){switch(e.l){case 1:f=ck(b);c.a=f;if(null==f||"manifest"!=f.a)return e["return"](Promise.reject(new D(2,1,9004,f)));g=new Cj;za(e,2);return u(e,g.init(),4);case 4:return u(e,Gj(g,f.ra(),f.$()),5);case 5:return h=e.s,u(e,h.getManifests([f.key()]),6);case 6:return k=e.s,l=k[0],m=new dk(f.ra(),f.$()),e["return"](ek(m,l));case 2:return Ea(e),u(e,g.destroy(),7);case 7:Fa(e,0)}})})};p.stop=function(){return Promise.resolve()};
349
+ function Xi(b,c){return t(function e(){var f,g,h,k,l,m,n;return z(e,function(e){switch(e.j){case 1:f=[];for(var q=r(c),x=q.next();!x.done;x=q.next())g=x.value,(h=b.i.get(g.id))?f.push(h.promise):(b.i.set(g.id,{promise:new H,zb:!1}),f.push(g.createSegmentIndex()));y(e,2);return u(e,Promise.all(f),4);case 4:if(b.f)return e["return"]();za(e,3);break;case 2:k=Ca(e);if(b.f)return e["return"]();e=r(c);for(x=e.next();!x.done;x=e.next())l=x.value,b.i.get(l.id).promise["catch"](function(){}),b.i.get(l.id).promise.reject(),
350
+ b.i["delete"](l.id);throw k;case 3:q=r(c);for(x=q.next();!x.done;x=q.next())m=x.value,n=b.i.get(m.id),n.zb||(n.promise.resolve(),n.zb=!0);v(e)}})})}function ij(b){var c=b.c.presentationTimeline.Y();Infinity>c?b.a.I.wa(c):b.a.I.wa(Math.pow(2,32))}
351
+ function kj(b,c){if(!b.f&&!c.Ha&&null!=c.Da&&!c.Pa)if(c.Da=null,c.Ma)fj(b,c,c.uc,c.Zb);else{try{var d=lj(b,c);null!=d&&(Zi(b,c,d),c.Ib=!1)}catch(e){mj(b,e);return}d=Array.from(b.b.values());nj(b,c);b.s&&d.every(function(b){return b.endOfStream})&&b.a.I.endOfStream().then(function(){if(!this.f){var b=this.a.I.Y();0!=b&&b<this.c.presentationTimeline.Y()&&this.c.presentationTimeline.wa(b)}}.bind(b))}}
352
+ function lj(b,c){if(oj(c))return b.a.I.rc(c.stream.originalId||""),null;var d=b.a.Sa(),e=pj(b,c,d),f=cj(b,c.stream),g=Ri(b,e),h=me(b.a.I,c.type,d),k=Math.max(b.c.minBufferTime||0,b.g.rebufferingGoal,b.g.bufferingGoal)*b.l;if(e>=b.c.presentationTimeline.Y())return c.endOfStream=!0,"video"==c.type&&(e=b.b.get("text"))&&"application/cea-608"==e.stream.mimeType&&(e.endOfStream=!0),null;c.endOfStream=!1;c.pa=g;if(g!=f)return null;if(h>=k)return.5;g=le(b.a.I,c.type);g=gj(b,c,d,g,f);if(!g)return 1;var l=
353
+ Infinity;Array.from(b.b.values()).forEach(function(c){oj(c)||(c=pj(b,c,d),l=Math.min(l,c))});if(e>=l+b.c.presentationTimeline.a)return 1;c.Zd=0;qj(b,c,d,f,g);return null}function pj(b,c,d){if(!c.pb||!c.Aa)return Math.max(d,c.Zd);d=cj(b,c.pb);return b.c.periods[d].startTime+c.Aa.endTime}
354
+ function gj(b,c,d,e,f){if(c.Aa&&c.stream==c.pb)return rj(b,c,f,c.Aa.position+1);c.Aa?(d=cj(b,c.pb),d=c.stream.findSegmentPosition(Math.max(0,b.c.periods[d].startTime+c.Aa.endTime-b.c.periods[f].startTime))):d=c.stream.findSegmentPosition(Math.max(0,(e||d)-b.c.periods[f].startTime));if(null==d)return null;var g=null;null==e&&(g=rj(b,c,f,Math.max(0,d-1)));return g||rj(b,c,f,d)}
355
+ function rj(b,c,d,e){d=b.c.periods[d];c=c.stream.getSegmentReference(e);if(!c)return null;e=b.c.presentationTimeline;b=e.Hb();e=e.nb();return d.startTime+c.endTime<b||d.startTime+c.startTime>e?null:c}
356
+ function qj(b,c,d,e,f){var g=b.c.periods[e],h=c.stream,k=b.c.presentationTimeline.Y(),l=b.c.periods[e+1];e=sj(b,c,e,Math.max(0,g.startTime-.1),l?l.startTime+.01:k);c.Ha=!0;c.hc=!1;k=tj(b,c,f);Promise.all([e,k]).then(function(b){if(!this.f&&!this.m)return uj(this,c,d,g,h,f,b[1])}.bind(b)).then(function(){this.f||this.m||(c.Ha=!1,c.dd=!1,c.Ma||this.a.Zc(),Zi(this,c,0),vj(this,h))}.bind(b))["catch"](function(b){this.f||this.m||(c.Ha=!1,"text"==c.type&&this.g.ignoreTextStreamFailures?this.b["delete"]("text"):
357
+ 7001==b.code?(c.Ha=!1,c.Da=null,Zi(this,c,0)):3017==b.code?wj(this,c,b):(c.Ib=!0,b.severity=2,mj(this,b)))}.bind(b))}function wj(b,c,d){if(!Array.from(b.b.values()).some(function(b){return b!=c&&b.dd})){var e=Math.round(100*b.l);if(20<e)b.l-=.2;else if(4<e)b.l-=.04;else{c.Ib=!0;b.m=!0;b.a.onError(d);return}c.dd=!0}Zi(b,c,4)}
358
+ function sj(b,c,d,e,f){if(!c.hc)return Promise.resolve();d=qe(b.a.I,c.type,b.c.periods[d].startTime-c.stream.presentationTimeOffset,e,f);if(!c.stream.initSegmentReference)return d;b=tj(b,c,c.stream.initSegmentReference).then(function(b){if(!this.f)return ne(this.a.I,c.type,b,null,null,c.stream.closedCaptions&&0<c.stream.closedCaptions.size)}.bind(b))["catch"](function(b){c.hc=!0;return Promise.reject(b)});return Promise.all([d,b])}
359
+ function uj(b,c,d,e,f,g,h){var k=f.closedCaptions&&0<f.closedCaptions.size;null!=f.emsgSchemeIdUris&&0<f.emsgSchemeIdUris.length&&(new Q).fa("emsg",b.M.bind(b,e,g,f.emsgSchemeIdUris)).parse(h);return xj(b,c,d).then(function(){if(!this.f)return ne(this.a.I,c.type,h,g.startTime+e.startTime,g.endTime+e.startTime,k)}.bind(b)).then(function(){if(!this.f)return c.pb=f,c.Aa=g,Promise.resolve()}.bind(b))}
360
+ Pi.prototype.M=function(b,c,d,e){var f=e.reader.bd(),g=e.reader.bd(),h=e.reader.F(),k=e.reader.F(),l=e.reader.F(),m=e.reader.F();e=e.reader.Xa(e.reader.K.byteLength-e.reader.ba());b=b.startTime+c.startTime+k/h;if(d.includes(f))if("urn:mpeg:dash:event:2012"==f)this.a.hf();else this.a.onEvent(new J("emsg",{detail:{startTime:b,endTime:b+l/h,schemeIdUri:f,value:g,timescale:h,presentationTimeDelta:k,eventDuration:l,id:m,messageData:e}}))};
361
+ function xj(b,c,d){var e=Math.max(b.g.bufferBehind,b.c.presentationTimeline.a),f=je(b.a.I,c.type);if(null==f)return Promise.resolve();d=d-f-e;return 0>=d?Promise.resolve():b.a.I.remove(c.type,f,f+d).then(function(){}.bind(b))}
362
+ function vj(b,c){if(!b.s){var d=Array.from(b.b.values());if(1!=d.length||"text"!=d[0].type)b.s=d.every(function(b){return"text"==b.type?!0:!b.Ma&&!b.Pa&&b.Aa});if(b.s){d=cj(b,c);b.h[d]||jj(b,d).then(function(){this.f||this.a.Kd()}.bind(b))["catch"](zd.ic);for(d=0;d<b.c.periods.length;++d)jj(b,d)["catch"](zd.ic);b.a.sf&&b.a.sf()}}}
363
+ function nj(b,c){var d=cj(b,c.stream);if(c.pa!=d){var e=c.pa,f=Array.from(b.b.values());f.every(function(b){return b.pa==e||oj(b)})&&f.every(yj)&&jj(b,e).then(function(){if(!this.f&&f.every(function(b){var c=yj(b),d=cj(this,b.stream);return oj(b)?!0:c&&b.pa==e&&d!=e}.bind(this))){var b=this.c.periods[e],c=this.a.Ld(b),d=new Map;c.variant&&c.variant.video&&d.set("video",c.variant.video);c.variant&&c.variant.audio&&d.set("audio",c.variant.audio);c.text&&d.set("text",c.text);var l=r(this.b.keys());for(c=
364
+ l.next();!c.done;c=l.next())if(c=c.value,!d.has(c)&&"text"!=c){this.a.onError(new G(2,5,5005));return}l=r(Array.from(d.keys()));for(c=l.next();!c.done;c=l.next())if(c=c.value,!this.b.has(c))if("text"==c)Si(this,null,null,d.get("text"),b.startTime),d["delete"](c);else{this.a.onError(new G(2,5,5005));return}b=r(Array.from(this.b.keys()));for(c=b.next();!c.done;c=b.next())c=c.value,(l=d.get(c))?(aj(this,l,!1,0,!1),Zi(this,this.b.get(c),0)):this.b["delete"](c);this.a.Kd()}}.bind(b))["catch"](zd.ic)}}
365
+ function oj(b){return"text"==b.type&&"application/cea-608"==b.stream.mimeType}function yj(b){return!b.Ha&&null==b.Da&&!b.Ma&&!b.Pa}function Ri(b,c){var d=pi(b.c.periods,c+Dd);return d?b.c.periods.indexOf(d):0}
366
+ function cj(b,c){for(var d=b.c.periods,e=0;e<d.length;e++){for(var f=d[e],g=new Set,h=r(f.variants),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&g.add(k.audio),k.video&&g.add(k.video),k.video&&k.video.trickModeVideo&&g.add(k.video.trickModeVideo);f=r(f.textStreams);for(h=f.next();!h.done;h=f.next())g.add(h.value);if(g.has(c))return e}return-1}function tj(b,c,d){d=Ag(d.c(),d.b,d.a,b.g.retryParameters);b=b.a.rb.request(1,d);c.Kb=b;return b.promise.then(function(b){c.Kb=null;return b.data})}
367
+ function fj(b,c,d,e){return t(function g(){var h,k,l;return z(g,function(g){switch(g.j){case 1:return c.Ma=!1,c.uc=!1,c.Zb=0,c.Pa=!0,e?(k=b.a.Sa(),l=b.a.I.Y(),h=b.a.I.remove(c.type,k+e,l)):h=pe(b.a.I,c.type).then(function(){if(!this.f&&d)return this.a.I.flush(c.type)}.bind(b)),u(g,h,2);case 2:if(b.f)return g["return"]();c.pb=null;c.Aa=null;c.Pa=!1;c.endOfStream=!1;Zi(b,c,0);v(g)}})})}
368
+ function Zi(b,c,d){c.Da=(new sb(function(){return t(function f(){var d;return z(f,function(f){switch(f.j){case 1:return y(f,2),u(f,kj(b,c),4);case 4:za(f,0);break;case 2:d=Ca(f);if(b.a)b.a.onError(d);v(f)}})})})).O(d)}function Qi(b){null!=b.Da&&(b.Da.stop(),b.Da=null)}function mj(b,c){zb(b.G).then(function(){this.f||(this.a.onError(c),c.handled||this.g.failureCallback(c))}.bind(b))};function zj(b,c,d,e,f,g){if(200<=d&&299>=d&&202!=d)return{uri:f||e,ad:e,data:c,headers:b,fromCache:!!b["x-shaka-from-cache"]};f=null;try{f=Cc(c)}catch(h){}throw new G(401==d||403==d?2:1,1,1001,e,d,f,b,g);};function Aj(b,c,d,e){var f=new Aj.b;mc(c.headers).forEach(function(b,c){f.append(c,b)});var g=new Aj.a,h={vd:!1,ge:!1};b=Aj.l(b,d,{body:c.body||void 0,headers:f,method:c.method,signal:g.signal,credentials:c.allowCrossSiteCredentials?"include":void 0},h,e);b=new I(b,function(){h.vd=!0;g.abort();return Promise.resolve()});if(c=c.retryParameters.timeout){var k=new D(function(){h.ge=!0;g.abort()});k.O(c/1E3);b["finally"](function(){k.stop()})}return b}A("shaka.net.HttpFetchPlugin",Aj);
369
+ Aj.l=function(b,c,d,e,f){return t(function h(){var k,l,m,n,q,w,x,B,C,E,F,V,Y,ma;return z(h,function(h){switch(h.j){case 1:return k=Aj.g,l=Aj.c,w=q=0,x=Date.now(),y(h,2),u(h,k(b,d),4);case 4:return m=h.o,B=m.clone().body.getReader(),E=(C=m.headers.get("Content-Length"))?parseInt(C,10):0,F=function(b){function c(){return t(function ja(){var d,e;return z(ja,function(h){switch(h.j){case 1:return y(h,2),u(h,B.read(),4);case 4:d=h.o;za(h,3);break;case 2:return Ca(h),h["return"]();case 3:d.done||(q+=d.value.byteLength);
370
+ e=Date.now();if(100<e-x||d.done)f(e-x,q-w,E-q),w=q,x=e;d.done?b.close():(b.enqueue(d.value),c());v(h)}})})}c()},new l({start:F}),u(h,m.arrayBuffer(),5);case 5:n=h.o;za(h,3);break;case 2:V=Ca(h);if(e.vd)throw new G(1,1,7001,b,c);if(e.ge)throw new G(1,1,1003,b,c);throw new G(1,1,1002,b,V,c);case 3:return Y={},ma=m.headers,ma.forEach(function(b,c){Y[c.trim()]=b}),h["return"](zj(Y,n,m.status,b,m.url,c))}})})};
371
+ Aj.isSupported=function(){if(window.ReadableStream)try{new ReadableStream({})}catch(b){return!1}else return!1;return!(!window.fetch||!window.AbortController)};Aj.isSupported=Aj.isSupported;Aj.g=window.fetch;Aj.a=window.AbortController;Aj.c=window.ReadableStream;Aj.b=window.Headers;Aj.isSupported()&&(Sb("http",Aj,2),Sb("https",Aj,2));function Bj(b,c,d,e){var f=new Bj.f,g=Date.now(),h=0,k=new Promise(function(k,m){f.open(c.method,b,!0);f.responseType="arraybuffer";f.timeout=c.retryParameters.timeout;f.withCredentials=c.allowCrossSiteCredentials;f.onabort=function(){m(new G(1,1,7001,b,d))};f.onload=function(c){c=c.target;var e=c.getAllResponseHeaders().trim().split("\r\n"),f={};e=r(e);for(var g=e.next();!g.done;g=e.next())g=g.value.split(": "),f[g[0].toLowerCase()]=g.slice(1).join(": ");try{var h=zj(f,c.response,c.status,b,c.responseURL,
372
+ d);k(h)}catch(E){m(E)}};f.onerror=function(c){m(new G(1,1,1002,b,c,d))};f.ontimeout=function(){m(new G(1,1,1003,b,d))};f.onprogress=function(b){var c=Date.now();if(100<c-g||b.lengthComputable&&b.loaded==b.total)e(c-g,b.loaded-h,b.total-b.loaded),h=b.loaded,g=c};for(var l in c.headers)f.setRequestHeader(l.toLowerCase(),c.headers[l]);f.send(c.body)});return new I(k,function(){f.abort();return Promise.resolve()})}A("shaka.net.HttpXHRPlugin",Bj);Bj.f=window.XMLHttpRequest;Sb("http",Bj,1);
373
+ Sb("https",Bj,1);function Cj(){this.a=this.f=this.b=0;this.c=new Map;this.g=0}function Dj(b,c){b.b+=c;var d=b.g;b.g++;b.c.set(d,c);return d}Cj.prototype.close=function(b,c){if(this.c.has(b)){var d=this.c.get(b);this.c["delete"](b);this.f+=d;this.a+=c}};function Ej(b,c){this.g=b;this.b=new Map;this.c=!1;this.f=c;this.a=new Cj}Ej.prototype.destroy=function(){this.c=!0;return Promise.all(this.b.values()).then(function(){},function(){})};
374
+ function Fj(b,c,d,e,f){var g=Dj(b.a,e);e=b.b.get(c)||Promise.resolve();b.b.set(c,e.then(function(){return t(function k(){var c;return z(k,function(e){switch(e.j){case 1:return u(e,Gj(b,d),2);case 2:c=e.o;if(b.c)throw new G(2,9,7001);b.a.close(g,c.byteLength);var k=b.a;b.f(0==k.b?0:k.f/k.b,b.a.a);return e["return"](f(c))}})})}))}function Hj(b){return t(function d(){return z(d,function(d){switch(d.j){case 1:return u(d,Promise.all(b.b.values()),2);case 2:return d["return"](b.a.a)}})})}
375
+ function Gj(b,c){return t(function e(){var f,g;return z(e,function(e){switch(e.j){case 1:return f=b.g.request(1,c),u(e,f.promise,2);case 2:return g=e.o,e["return"](g.data)}})})};function Ij(b,c){var d=this;this.c=b;this.b=b.objectStore(c);this.a=new H;b.onabort=function(b){b.preventDefault();d.a.reject()};b.onerror=function(b){b.preventDefault();d.a.reject()};b.oncomplete=function(){d.a.resolve()}}Ij.prototype.abort=function(){try{this.c.abort()}catch(b){}return this.a["catch"](function(){})};
376
+ function Jj(b,c){return new Promise(function(d,e){var f=b.b.openCursor();f.onerror=e;f.onsuccess=function(b){b=b.target.result;if(!b)return d();c(b.key,b.value,b);b["continue"]()}})}Ij.prototype.store=function(){return this.b};Ij.prototype.promise=function(){return this.a};function Kj(b){this.b=b;this.a=[]}Kj.prototype.destroy=function(){return Promise.all(this.a.map(function(b){return b.abort()}))};function Lj(b,c){return Mj(b,c,"readonly")}function Nj(b,c){return Mj(b,c,"readwrite")}function Mj(b,c,d){d=b.b.transaction([c],d);var e=new Ij(d,c);b.a.push(e);e.promise().then(function(){Lb(b.a,e)},function(){Lb(b.a,e)});return e};function Oj(b){this.a=new Kj(b)}Oj.prototype.destroy=function(){return this.a.destroy()};Oj.prototype.getAll=function(){var b=this;return t(function d(){var e,f;return z(d,function(d){switch(d.j){case 1:return e=Lj(b.a,"session-ids"),f=[],u(d,Jj(e,function(b,d){f.push(d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};Oj.prototype.add=function(b){var c=Nj(this.a,"session-ids"),d=c.store();b=r(b);for(var e=b.next();!e.done;e=b.next())d.add(e.value);return c.promise()};
377
+ Oj.prototype.remove=function(b){var c=this;return t(function e(){var f;return z(e,function(e){switch(e.j){case 1:return f=Nj(c.a,"session-ids"),u(e,Jj(f,function(c,e,f){0<=b.indexOf(e.sessionId)&&f["delete"]()}),2);case 2:return u(e,f.promise(),0)}})})};function Pj(){this.a=new Map}Pj.prototype.destroy=function(){for(var b=[],c=r(this.a.values()),d=c.next();!d.done;d=c.next())b.push(d.value.destroy());this.a.clear();return Promise.all(b)};Pj.prototype.init=function(){var b=this;Qj.forEach(function(c,d){var e=c();e&&b.a.set(d,e)});for(var c=[],d=r(this.a.values()),e=d.next();!e.done;e=d.next())c.push(e.value.init());return Promise.all(c)};
378
+ function Rj(b){var c=null;b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){b.hasFixedKeySpace()||c||(c={path:{ua:e,aa:d},aa:b})})});if(c)return c;throw new G(2,9,9013,"Could not find a cell that supports add-operations");}function Sj(b,c){b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){c({ua:e,aa:d},b)})})}
379
+ function Tj(b,c,d){b=b.a.get(c);if(!b)throw new G(2,9,9013,"Could not find mechanism with name "+c);c=b.getCells().get(d);if(!c)throw new G(2,9,9013,"Could not find cell with name "+d);return c}function Uj(b,c){b.a.forEach(function(b){c(b.getEmeSessionCell())})}function Vj(b){var c=Array.from(b.a.keys());if(!c.length)throw new G(2,9,9E3,"No supported storage mechanisms found");return b.a.get(c[0]).getEmeSessionCell()}
380
+ Pj.prototype.erase=function(){var b=this;return t(function d(){var e,f,g;return z(d,function(d){switch(d.j){case 1:return e=Array.from(b.a.values()),f=0<e.length,f||(g=Qj,g.forEach(function(b){(b=b())&&e.push(b)})),u(d,Promise.all(e.map(function(b){return b.erase()})),2);case 2:if(f)d.A(0);else return u(d,Promise.all(e.map(function(b){return b.destroy()})),0)}})})};function Wj(b,c){Qj.set(b,c)}A("shaka.offline.StorageMuxer.register",Wj);A("shaka.offline.StorageMuxer.unregister",function(b){Qj["delete"](b)});
381
+ var Qj=new Map;function Xj(b){this.a=new Kj(b)}p=Xj.prototype;p.destroy=function(){return this.a.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return Yj("segment")};p.removeSegments=function(b,c){return Zj(this,"segment",b,c)};p.getSegments=function(b){return ak(this,"segment",b).then(function(b){return b.map(bk)})};p.addManifests=function(){return Yj("manifest")};
382
+ p.updateManifestExpiration=function(b,c){var d=Nj(this.a,"manifest"),e=d.store(),f=new H;e.get(b).onsuccess=function(d){(d=d.target.result)?(d.expiration=c,e.put(d),f.resolve()):f.reject(new G(2,9,9012,"Could not find values for "+b))};return d.promise().then(function(){return f})};p.removeManifests=function(b,c){return Zj(this,"manifest",b,c)};p.getManifests=function(b){return ak(this,"manifest",b).then(function(b){return b.map(ck)})};
383
+ p.getAllManifests=function(){var b=this;return t(function d(){var e,f;return z(d,function(d){switch(d.j){case 1:return e=Lj(b.a,"manifest"),f=new Map,u(d,Jj(e,function(b,d){f.set(b,ck(d))}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};function Yj(b){return Promise.reject(new G(2,9,9011,"Cannot add new value to "+b))}function Zj(b,c,d,e){b=Nj(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
384
+ function ak(b,c,d){b=Lj(b.a,c);var e=b.store(),f={},g=[];d.forEach(function(b){e.get(b).onsuccess=function(c){c=c.target.result;void 0==c&&g.push(b);f[b]=c}});return b.promise().then(function(){return g.length?Promise.reject(new G(2,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})}
385
+ function ck(b){return{originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:null==b.expiration?Infinity:b.expiration,periods:b.periods.map(dk),sessionIds:b.sessionIds,drmInfo:b.drmInfo,appMetadata:b.appMetadata}}function dk(b){ek(b);b.streams.forEach(function(){});return{startTime:b.startTime,streams:b.streams.map(fk)}}
386
+ function fk(b){var c=b.$e?gk(b.$e):null;return{id:b.id,originalId:null,primary:b.primary,presentationTimeOffset:b.presentationTimeOffset,contentType:b.contentType,mimeType:b.mimeType,codecs:b.codecs,frameRate:b.frameRate,kind:b.kind,language:b.language,label:b.label,width:b.width,height:b.height,initSegmentKey:c,encrypted:b.encrypted,keyId:b.keyId,segments:b.segments.map(hk),variantIds:b.variantIds}}function hk(b){var c=gk(b.uri);return{startTime:b.startTime,endTime:b.endTime,dataKey:c}}
387
+ function bk(b){return{data:b.data}}function gk(b){var c;if((c=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(b))||(c=/^offline:segment\/([0-9]+)$/.exec(b)))return Number(c[1]);throw new G(2,9,9004,"Could not parse uri "+b);}
388
+ function ek(b){var c=b.streams.filter(function(b){return"audio"==b.contentType}),d=b.streams.filter(function(b){return"video"==b.contentType});if(!c.every(function(b){return b.variantIds})||!d.every(function(b){return b.variantIds})){c.forEach(function(b){b.variantIds=[]});d.forEach(function(b){b.variantIds=[]});var e=0;if(d.length&&!c.length){var f=e++;d.forEach(function(b){b.variantIds.push(f)})}if(!d.length&&c.length){var g=e++;c.forEach(function(b){b.variantIds.push(g)})}d.length&&c.length&&c.forEach(function(b){d.forEach(function(c){var d=
389
+ e++;b.variantIds.push(d);c.variantIds.push(d)})})}};function ik(b,c,d,e){this.a=new Kj(b);this.c=c;this.b=d;this.f=e}p=ik.prototype;p.destroy=function(){return this.a.destroy()};p.hasFixedKeySpace=function(){return this.f};p.addSegments=function(b){return jk(this,this.c,b)};p.removeSegments=function(b,c){return kk(this,this.c,b,c)};p.getSegments=function(b){return lk(this,this.c,b)};p.addManifests=function(b){return jk(this,this.b,b)};
390
+ p.updateManifestExpiration=function(b,c){var d=Nj(this.a,this.b),e=d.store();e.get(b).onsuccess=function(d){if(d=d.target.result)d.expiration=c,e.put(d,b)};return d.promise()};p.removeManifests=function(b,c){return kk(this,this.b,b,c)};p.getManifests=function(b){return lk(this,this.b,b)};
391
+ p.getAllManifests=function(){var b=this;return t(function d(){var e,f;return z(d,function(d){switch(d.j){case 1:return e=Lj(b.a,b.b),f=new Map,u(d,Jj(e,function(b,d){f.set(b,d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};
392
+ function jk(b,c,d){if(b.f)return Promise.reject(new G(1,9,9011,"Cannot add new value to "+c));b=Nj(b.a,c);var e=b.store(),f=[];d.forEach(function(b){e.add(b).onsuccess=function(b){f.push(b.target.result)}});return b.promise().then(function(){return f})}function kk(b,c,d,e){b=Nj(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
393
+ function lk(b,c,d){b=Lj(b.a,c);var e=b.store(),f={},g=[];d.forEach(function(b){var c=e.get(b);c.onsuccess=function(){void 0==c.result&&g.push(b);f[b]=c.result}});return b.promise().then(function(){return g.length?Promise.reject(new G(1,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})};function mk(){this.g=this.c=this.b=this.a=this.f=null}p=mk.prototype;
394
+ p.init=function(){var b=this,c=new H,d=window.indexedDB.open("shaka_offline_db",4);d.onsuccess=function(d){d=d.target.result;b.f=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Xj(d):null;b.a=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new ik(d,"segment-v2","manifest-v2",!0):null;b.b=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new ik(d,"segment-v3","manifest-v3",!1):null;b.c=e;d=d.objectStoreNames.contains("session-ids")?
395
+ new Oj(d):null;b.g=d;c.resolve()};d.onupgradeneeded=function(b){b=b.target.result;for(var c=r(["segment-v3","manifest-v3","session-ids"]),d=c.next();!d.done;d=c.next())d=d.value,b.objectStoreNames.contains(d)||b.createObjectStore(d,{autoIncrement:!0})};d.onerror=function(b){c.reject(new G(2,9,9001,d.error));b.preventDefault()};return c};
396
+ p.destroy=function(){var b=this;return t(function d(){return z(d,function(d){switch(d.j){case 1:if(!b.a){d.A(2);break}return u(d,b.a.destroy(),2);case 2:if(!b.b){d.A(4);break}return u(d,b.b.destroy(),4);case 4:if(!b.c){d.A(6);break}return u(d,b.c.destroy(),6);case 6:if(!b.g){d.A(8);break}return u(d,b.g.destroy(),8);case 8:b.f&&b.f.close(),v(d)}})})};p.getCells=function(){var b=new Map;this.a&&b.set("v1",this.a);this.b&&b.set("v2",this.b);this.c&&b.set("v3",this.c);return b};p.getEmeSessionCell=function(){return this.g};
397
+ p.erase=function(){var b=this;return t(function d(){return z(d,function(d){switch(d.j){case 1:if(!b.a){d.A(2);break}return u(d,b.a.destroy(),2);case 2:if(!b.b){d.A(4);break}return u(d,b.b.destroy(),4);case 4:if(!b.c){d.A(6);break}return u(d,b.c.destroy(),6);case 6:return b.f&&b.f.close(),u(d,nk(),8);case 8:return b.f=null,b.a=null,b.b=null,b.c=null,u(d,b.init(),0)}})})};
398
+ function nk(){var b=new H,c=window.indexedDB.deleteDatabase("shaka_offline_db");c.onblocked=function(){};c.onsuccess=function(){b.resolve()};c.onerror=function(d){b.reject(new G(2,9,9001,c.error));d.preventDefault()};return b}Wj("idb",function(){return window.indexedDB?new mk:null});function ok(b,c,d,e){this.a=b;this.g=c;this.f=d;this.c=e;this.b=["offline:",b,"/",c,"/",d,"/",e].join("")}ok.prototype.ua=function(){return this.g};ok.prototype.aa=function(){return this.f};ok.prototype.key=function(){return this.c};ok.prototype.toString=function(){return this.b};
399
+ function pk(b){b=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(b);if(null==b)return null;var c=b[1];if("manifest"!=c&&"segment"!=c)return null;var d=b[2];if(!d)return null;var e=b[3];return e&&null!=c?new ok(c,d,e,Number(b[4])):null};function qk(b,c){this.b=b;this.a=c}function rk(b,c){var d=new W(null,0);d.wa(c.duration);var e=c.periods.map(function(c){return sk(b,c,d)}),f=c.drmInfo?[c.drmInfo]:[];c.drmInfo&&e.forEach(function(b){b.variants.forEach(function(b){b.drmInfos=f})});return{presentationTimeline:d,minBufferTime:2,offlineSessionIds:c.sessionIds,periods:e}}
400
+ function sk(b,c,d){var e=c.streams.filter(function(b){return"audio"==b.contentType}),f=c.streams.filter(function(b){return"video"==b.contentType});e=tk(b,e,f);f=c.streams.filter(function(b){return"text"==b.contentType}).map(function(c){return uk(b,c)});c.streams.forEach(function(e){e=e.segments.map(function(c,d){return vk(b,d,c)});d.sb(e,c.startTime)});return{startTime:c.startTime,variants:Array.from(e.values()),textStreams:f}}
401
+ function tk(b,c,d){for(var e=new Set,f=r(c),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(d);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,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});c=r(c);for(e=c.next();!e.done;e=c.next())for(e=
402
+ e.value,g=uk(b,e),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;d=r(d);for(c=d.next();!c.done;c=d.next())for(e=c.value,c=uk(b,e),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||c.primary,e.video=c;return f}
403
+ function uk(b,c){var d=c.segments.map(function(c,d){return vk(b,d,c)}),e=new T(d);d={id:c.id,originalId:c.originalId,createSegmentIndex:function(){return Promise.resolve()},findSegmentPosition:function(b){return e.find(b)},getSegmentReference:function(b){return e.get(b)},initSegmentReference:null,presentationTimeOffset:c.presentationTimeOffset,mimeType:c.mimeType,codecs:c.codecs,width:c.width||void 0,height:c.height||void 0,frameRate:c.frameRate||void 0,kind:c.kind,encrypted:c.encrypted,keyId:c.keyId,
404
+ language:c.language,label:c.label||null,type:c.contentType,primary:c.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};null!=c.initSegmentKey&&(d.initSegmentReference=wk(b,c.initSegmentKey));return d}function vk(b,c,d){var e=new ok("segment",b.b,b.a,d.dataKey);return new S(c,d.startTime,d.endTime,function(){return[e.toString()]},0,null)}function wk(b,c){var d=new ok("segment",b.b,b.a,c);return new ag(function(){return[d.toString()]},0,null)};function xk(){this.a=null}p=xk.prototype;p.configure=function(){};
405
+ p.start=function(b){var c=this;return t(function e(){var f,g,h,k,l,m;return z(e,function(e){switch(e.j){case 1:f=pk(b);c.a=f;if(null==f||"manifest"!=f.a)return e["return"](Promise.reject(new G(2,1,9004,f)));g=new Pj;ya(e,2);return u(e,g.init(),4);case 4:return u(e,Tj(g,f.ua(),f.aa()),5);case 5:return h=e.o,u(e,h.getManifests([f.key()]),6);case 6:return k=e.o,l=k[0],m=new qk(f.ua(),f.aa()),e["return"](rk(m,l));case 2:return Da(e),u(e,g.destroy(),7);case 7:Ea(e,0)}})})};p.stop=function(){return Promise.resolve()};
395
406
  p.update=function(){};
396
- p.onExpirationUpdated=function(b,c){var d=this;return t(function f(){var g,h,k,l,m,n,q;return y(f,function(f){switch(f.l){case 1:return g=d.a,h=new Cj,ya(f,2,3),u(f,h.init(),5);case 5:return u(f,Gj(h,g.ra(),g.$()),6);case 6:return k=f.s,u(f,k.getManifests([g.key()]),7);case 7:l=f.s;m=l[0];n=m.sessionIds.includes(b);q=void 0==m.expiration||m.expiration>c;if(!n||!q){f.A(3);break}return u(f,k.updateManifestExpiration(g.key(),c),3);case 3:return Ea(f),u(f,h.destroy(),10);case 10:Fa(f,0);break;case 2:Da(f),
397
- f.A(3)}})})};U.Kb("application/x-offline-manifest",kk);function lk(b){var c=ck(b);return c&&"manifest"==c.a?lk.a(b):c&&"segment"==c.a?lk.b(c.key(),c):Ab(new D(2,1,9004,b))}z("shaka.offline.OfflineScheme",lk);lk.a=function(b){b={uri:b,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}};return Cb(b)};lk.b=function(b,c){var d=new Cj;return Cb(void 0).T(function(){return d.init()}).T(function(){return Gj(d,c.ra(),c.$())}).T(function(b){return b.getSegments([c.key()])}).T(function(b){return{uri:c,data:b[0].data,headers:{}}})["finally"](function(){return d.destroy()})};
398
- Rb("offline",lk);function mk(b,c,d){return t(function f(){var g,h,k,l,m,n;return y(f,function(f){switch(f.l){case 1:g=[];for(var q=[],w=r(d),A=w.next();!A.done;A=w.next()){A=A.value;for(var C=!1,E=r(q),F=E.next();!F.done;F=E.next())if(F=F.value,nk(F.info,A)){F.sessionIds.push(A.sessionId);C=!0;break}C||q.push({info:A,sessionIds:[A.sessionId]})}h=r(q);k=h.next();case 2:if(k.done){f.A(4);break}l=k.value;m=ok(b,c,l);return u(f,m,5);case 5:n=f.s;g=g.concat(n);k=h.next();f.A(2);break;case 4:return f["return"](g)}})})}
399
- function ok(b,c,d){return t(function f(){var g,h;return y(f,function(f){switch(f.l){case 1:return g=new Gc({nb:c,onError:function(){},gc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ya(f,2),g.configure(b),u(f,Oc(g,d.info.keySystem,d.info.licenseUri,d.info.serverCertificate,d.info.audioCapabilities,d.info.videoCapabilities),4);case 4:Aa(f,3);break;case 2:return Da(f),u(f,g.destroy(),5);case 5:return f["return"]([]);case 3:return ya(f,6),u(f,Vc(g),8);case 8:Aa(f,7);break;case 6:return Da(f),
400
- u(f,g.destroy(),9);case 9:return f["return"]([]);case 7:return h=[],u(f,Promise.all(d.sessionIds.map(function(b){return t(function n(){return y(n,function(c){switch(c.l){case 1:return ya(c,2),u(c,Yc(g,b),4);case 4:h.push(b);Aa(c,0);break;case 2:Da(c),v(c)}})})})),10);case 10:return u(f,g.destroy(),11);case 11:return f["return"](h)}})})}
401
- function nk(b,c){function d(b,c){return b.robustness==c.robustness&&b.contentType==c.contentType}return b.keySystem==c.keySystem&&b.licenseUri==c.licenseUri&&Mb(b.audioCapabilities,c.audioCapabilities,d)&&Mb(b.videoCapabilities,c.videoCapabilities,d)};function pk(b,c){var d=qk(),e=this;this.g=c;this.c=b;this.i=d;this.h=null;this.f=[];this.b=this.a=null;this.j=!0;this.m=Promise.resolve().then(function(){return rk(e)})}pk.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.l){case 1:return b.j=!1,b.b&&b.b.abort(),sk(b),u(d,b.m,2);case 2:b.a&&b.a.qa.Ua();for(var f=r(b.f),h=f.next();!h.done;h=f.next())e=h.value,e.qa.Ua();b.a=null;b.f=[];b.g=null;v(d)}})})};
402
- function tk(b,c){var d={pb:function(){},fc:function(){},Ua:function(){},onError:function(){},hc:function(){},sg:function(){}};b.f.push({create:c,qa:d});b.b&&b.b.abort();sk(b);return d}
403
- function rk(b){return t(function d(){return y(d,function(d){switch(d.l){case 1:if(b.j){if(0==b.f.length||b.a&&!b.a.Ra)var e=!1;else{b.a&&(b.a.qa.Ua(),b.a=null);e=b.f.shift();var g=e.create(b.i);g?(e.qa.pb(),b.a={node:g.node,payload:g.payload,Ra:g.Ra,qa:e.qa}):e.qa.hc();e=!0}e?e=Promise.resolve():b.a?e=uk(b):(b.g.bf(b.c),b.h=new G,e=b.h);return u(d,e,1)}d.A(0)}})})}
404
- function uk(b){return t(function d(){var e,f;return y(d,function(d){switch(d.l){case 1:return b.c=b.g.Le(b.c,b.i,b.a.node,b.a.payload),ya(d,2),b.b=b.g.ve(b.c,b.i,b.a.payload),u(d,b.b.promise,4);case 4:b.b=null;b.c==b.a.node&&(b.a.qa.fc(),b.a=null);Aa(d,0);break;case 2:e=Da(d);if(7001==e.code)b.a.qa.Ua();else b.a.qa.onError(e);b.a=null;b.b=null;f=b;return u(d,b.g.handleError(b.i,e),5);case 5:f.c=d.s,v(d)}})})}function sk(b){b.h&&(b.h.resolve(),b.h=null)};function vk(b){this.a=null;for(var c=0;c<b.textTracks.length;++c){var d=b.textTracks[c];d.mode="disabled";"Shaka Player TextTrack"==d.label&&(this.a=d)}this.a||(this.a=b.addTextTrack("subtitles","Shaka Player TextTrack"));this.a.mode="hidden"}z("shaka.text.SimpleTextDisplayer",vk);vk.prototype.remove=function(b,c){if(!this.a)return!1;wk(this.a,function(d){return d.startTime<c&&d.endTime>b});return!0};vk.prototype.remove=vk.prototype.remove;
405
- vk.prototype.append=function(b){for(var c=xk,d=[],e=0;e<b.length;e++){var f=c(b[e]);f&&d.push(f)}d.slice().sort(function(b,c){return b.startTime!=c.startTime?b.startTime-c.startTime:b.endTime!=c.endTime?b.endTime-c.startTime:d.indexOf(c)-d.indexOf(b)}).forEach(function(b){this.a.addCue(b)}.bind(this))};vk.prototype.append=vk.prototype.append;vk.prototype.destroy=function(){this.a&&wk(this.a,function(){return!0});this.a=null;return Promise.resolve()};vk.prototype.destroy=vk.prototype.destroy;
406
- vk.prototype.isTextVisible=function(){return"showing"==this.a.mode};vk.prototype.isTextVisible=vk.prototype.isTextVisible;vk.prototype.setTextVisibility=function(b){this.a.mode=b?"showing":"hidden"};vk.prototype.setTextVisibility=vk.prototype.setTextVisibility;
407
- function xk(b){if(b.startTime>=b.endTime)return null;var c=new VTTCue(b.startTime,b.endTime,b.payload);c.lineAlign=b.lineAlign;c.positionAlign=b.positionAlign;c.size=b.size;try{c.align=b.textAlign}catch(d){}"center"==b.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==b.writingMode?c.vertical="lr":"vertical-rl"==b.writingMode&&(c.vertical="rl");1==b.lineInterpretation&&(c.snapToLines=!1);null!=b.line&&(c.line=b.line);null!=b.position&&(c.position=b.position);return c}
408
- function wk(b,c){var d=b.mode;b.mode="showing"==d?"showing":"hidden";for(var e=b.cues,f=e.length-1;0<=f;f--){var g=e[f];g&&c(g)&&b.removeCue(g)}b.mode=d};function yk(b,c,d,e,f){var g=f in e,h=!0,k;for(k in c){var l=f+"."+k,m=g?e[f]:d[k];g||k in d?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=Ib(m):m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=Ib(m)),l=yk(b[k],c[k],m,e,l),h=h&&l):typeof c[k]!=typeof m||null==c[k]||c[k].constructor!=m.constructor?h=!1:b[k]=c[k]:h=!1}return h}z("shaka.util.ConfigUtils.mergeConfigObjects",yk);
409
- function zk(b,c){for(var d={},e=d,f=0,g=0;;){f=b.indexOf(".",f);if(0>f)break;if(0==f||"\\"!=b[f-1])g=b.substring(g,f).replace(/\\\./g,"."),e[g]={},e=e[g],g=f+1;f+=1}e[b.substring(g).replace(/\\\./g,".")]=c;return d};function Ak(){var b=5E5,c=Infinity;navigator.connection&&(b=1E6*navigator.connection.downlink,navigator.connection.saveData&&(c=360));var d={retryParameters:ub(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},e={retryParameters:ub(),availabilityWindowOverride:NaN,dash:{customScheme:function(b){if(b)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0}},f={retryParameters:ub(),failureCallback:function(){},
410
- 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,stallSkip:.1};pc("Web0S")&&(f.stallEnabled=!1);var g={trackSelectionCallback:function(b){return b},progressCallback:function(){},usePersistentLicense:!0},h={drm:d,manifest:e,streaming:f,offline:g,abrFactory:N,abr:{enabled:!0,defaultBandwidthEstimate:b,switchInterval:8,
411
- bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:c,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}};
412
- g.trackSelectionCallback=function(b){return Bk(b,h.preferredAudioLanguage)};return h}function Ck(b,c,d){var e={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return yk(b,c,d||Ak(),e,"")}
413
- function Bk(b,c){var d=b.filter(function(b){return"variant"==b.type}),e=[],f=re(c,d.map(function(b){return b.language}));f&&(e=d.filter(function(b){return M(b.language)==f}));0==e.length&&(e=d.filter(function(b){return b.primary}));0==e.length&&(d.map(function(b){return b.language}),e=d);var g=e.filter(function(b){return b.height&&480>=b.height});g.length&&(g.sort(function(b,c){return c.height-b.height}),e=g.filter(function(b){return b.height==g[0].height}));d=[];if(e.length){var h=Math.floor(e.length/
414
- 2);e.sort(function(b,c){return b.bandwidth-c.bandwidth});d.push(e[h])}e=r(b);for(h=e.next();!h.done;h=e.next())h=h.value,"text"==h.type&&d.push(h);return d};function Dk(){this.a=null;this.b=[]}function Ek(b,c){if(null==b.a)b.a={timestamp:Date.now()/1E3,state:c,duration:0};else{var d=Date.now()/1E3;b.a.duration=d-b.a.timestamp;b.a.state!=c&&(b.b.push(b.a),b.a={timestamp:d,state:c,duration:0})}}function Fk(b,c){var d=0;b.a&&b.a.state==c&&(d+=b.a.duration);for(var e=r(b.b),f=e.next();!f.done;f=e.next())f=f.value,d+=f.state==c?f.duration:0;return d}
415
- function Gk(b){function c(b){return{timestamp:b.timestamp,state:b.state,duration:b.duration}}for(var d=[],e=r(b.b),f=e.next();!f.done;f=e.next())d.push(c(f.value));b.a&&d.push(c(b.a));return d};function Hk(){this.b=this.c=null;this.a=[]}function Ik(b,c,d){b.b!=c&&(b.b=c,b.a.push({timestamp:Date.now()/1E3,id:c.id,type:"text",fromAdaptation:d,bandwidth:null}))};function Jk(){this.f=this.j=this.c=this.h=this.i=this.g=this.m=NaN;this.a=new Dk;this.b=new Hk};function X(b,c){var d=this;J.call(this);this.g=Kk;this.a=null;this.$a=!1;this.i=new ac;this.rc=this.j=this.xb=this.c=this.m=this.f=this.Pb=this.V=this.Qb=this.K=this.bb=this.o=this.C=this.h=this.N=null;this.Ed=1E9;this.Tb=new Set;this.eb=!0;this.ka=null;this.Ad=!1;this.yd=0;this.ja=null;this.F=new Gh;this.b=Lk(this);this.Ub={width:Infinity,height:Infinity};this.v=null;this.Rb=new Ph(this.b.preferredAudioLanguage,this.b.preferredVariantRole,this.b.preferredAudioChannelCount);this.Ka=this.b.preferredTextLanguage;
416
- this.yb=this.b.preferredTextRole;c&&c(this);this.N=Mk(this);L(this.i,window,"online",function(){d.bd()});this.w={name:"detach"};this.S={name:"attach"};this.Ca={name:"unload"};this.Ac={name:"manifest-parser"};this.yc={name:"manifest"};this.ab={name:"media-source"};this.sc={name:"drm-engine"};this.W={name:"load"};this.Dc={name:"src-equals-drm-engine"};this.cb={name:"src-equals"};var e=new Map;e.set(this.S,function(b,c){return Db(Nk(d,b,c))});e.set(this.w,function(b){b.u&&(d.i.ma(b.u,"error"),b.u=null);
417
- d.a=null;b=Promise.resolve();return Db(b)});e.set(this.Ca,function(b){return Db(Ok(d,b))});e.set(this.ab,function(b){b=Pk(d,b);return Db(b)});e.set(this.Ac,function(b,c){var e=Qk(d,b,c);return Db(e)});e.set(this.yc,function(b){return Rk(d,b)});e.set(this.sc,function(){var b=Sk(d);return Db(b)});e.set(this.W,function(b,c){return Db(Tk(d,b,c))});e.set(this.Dc,function(b){b=Uk(d,b);return Db(b)});e.set(this.cb,function(b,c){return Vk(d,b,c)});this.fb=new pk(this.w,{Le:function(b,c,e,k){var f=null;b==
418
- d.w&&(f=e==d.w?d.w:d.S);b==d.S&&(f=e==d.w||c.u!=k.u?d.w:e==d.S?d.S:e==d.ab||e==d.W?d.ab:e==d.cb?d.Dc:null);b==d.ab&&(f=e==d.W&&c.u==k.u?d.Ac:d.Ca);b==d.Ac&&(f=Wk(d.W,d.yc,d.Ca,e,c,k));b==d.yc&&(f=Wk(d.W,d.sc,d.Ca,e,c,k));b==d.sc&&(f=Wk(d.W,d.W,d.Ca,e,c,k));b==d.Dc&&(f=e==d.cb&&c.u==k.u?d.cb:d.Ca);if(b==d.W||b==d.cb)f=d.Ca;b==d.Ca&&(f=k.u&&c.u==k.u?d.S:d.w);return f},ve:function(b,c,h){d.dispatchEvent(new I("onstatechange",{state:b.name}));return e.get(b)(c,h)},handleError:function(b){return t(function h(){return y(h,
419
- function(c){switch(c.l){case 1:return u(c,Ok(d,b),2);case 2:return c["return"](b.u?d.S:d.w)}})})},bf:function(b){d.dispatchEvent(new I("onstateidle",{state:b.name}))}});b&&this.zb(b,!0)}Ta(X,J);z("shaka.Player",X);
420
- X.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.l){case 1:if(b.g==Xk)return d["return"]();b.g=Xk;e=tk(b.fb,function(){return{node:b.w,payload:qk(),Ra:!1}});return u(d,new Promise(function(b){e.pb=function(){};e.fc=function(){b()};e.Ua=function(){b()};e.onError=function(){b()};e.hc=function(){b()}}),2);case 2:return u(d,b.fb.destroy(),3);case 3:b.i&&(b.i.a(),b.i=null);b.rc=null;b.j=null;b.b=null;if(!b.N){d.A(0);break}return u(d,b.N.destroy(),5);
421
- case 5:b.N=null,v(d)}})})};X.prototype.destroy=X.prototype.destroy;X.version="v2.5.1";var Yk=["2","5"];Le=new function(b){this.a=b;this.c=Me;this.b=Ne}(new Je(Number(Yk[0]),Number(Yk[1])));var Zk=["output-restricted","internal-error"],$k={};X.registerSupportPlugin=function(b,c){$k[b]=c};
422
- X.isBrowserSupported=function(){return window.Promise&&window.Uint8Array&&Array.prototype.forEach&&window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration?mc()?!0:nc("application/x-mpegurl"):!1};
423
- X.probeSupport=function(){return jd().then(function(b){for(var c=U.wf(),d={},e=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",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(",")),f=
424
- e.next();!f.done;f=e.next()){f=f.value;d[f]=mc()?Wd(f)?!0:MediaSource.isTypeSupported(f)||zd(f):nc(f);var g=f.split(";")[0];d[g]=d[g]||d[f]}b={manifest:c,media:d,drm:b};for(var h in $k)b[h]=$k[h]();return b})};X.prototype.zb=function(b,c){c=void 0===c?!0:c;if(this.g==Xk)return Promise.reject(al());var d=qk();d.u=b;mc()||(c=!1);var e=c?this.ab:this.S,f=tk(this.fb,function(){return{node:e,payload:d,Ra:!1}});f.pb=function(){};return bl(f)};X.prototype.attach=X.prototype.zb;
425
- X.prototype.detach=function(){var b=this;if(this.g==Xk)return Promise.reject(al());var c=tk(this.fb,function(){return{node:b.w,payload:qk(),Ra:!1}});c.pb=function(){};return bl(c)};X.prototype.detach=X.prototype.detach;X.prototype.md=function(b){var c=this;b=void 0===b?!0:b;if(this.g==Xk)return Promise.reject(al());mc()||(b=!1);var d=qk(),e=tk(this.fb,function(e){var f=e.u&&b?c.ab:e.u?c.S:c.w;d.u=e.u;return{node:f,payload:d,Ra:!1}});e.pb=function(){};return bl(e)};X.prototype.unload=X.prototype.md;
426
- X.prototype.load=function(b,c,d){if(this.g==Xk)return Promise.reject(al());this.dispatchEvent(new I("loading"));var e=qk();e.uri=b;e.jd=Date.now()/1E3;d&&"string"!=typeof d&&(Ke("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),e.va=function(){return new d});d&&"string"==typeof d&&(e.mimeType=d);void 0!==c&&(e.startTime=c);var f=cl(e)?this.cb:this.W,g=tk(this.fb,function(b){if(null==b.u)return null;e.u=b.u;return{node:f,payload:e,Ra:!0}});g.pb=function(){};
427
- return new Promise(function(b,c){g.hc=function(){return c(new D(2,7,7002))};g.fc=function(){return b()};g.Ua=function(){return c(al())};g.onError=function(b){return c(b)}})};X.prototype.load=X.prototype.load;
428
- function cl(b){if(b.va)return!1;if(!mc())return!0;var c=b.mimeType;b=b.uri||"";c||(c={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",ts:"video/mp2t",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac"}[U.getExtension(b)]);return c?nc(c)?U.isSupported(b,c)?!!navigator.vendor&&navigator.vendor.includes("Apple"):!0:!1:!1}function Nk(b,c,d){null==c.u&&(c.u=d.u,L(b.i,c.u,"error",function(){var c=dl(b);c&&b.Ha(c)}));b.a=c.u;return Promise.resolve()}
429
- function Ok(b,c){return t(function e(){return y(e,function(e){switch(e.l){case 1:b.g!=Xk&&(b.g=Kk);b.dispatchEvent(new I("unloading"));c.currentTime=null;c.va=null;c.mimeType=null;c.startTime=null;c.uri=null;c.u&&(b.i.ma(c.u,"loadeddata"),b.i.ma(c.u,"playing"),b.i.ma(c.u,"pause"),b.i.ma(c.u,"ended"),b.i.ma(c.u,"ratechange"));b.bb&&(b.bb.a(),b.bb=null);b.Qb&&(b.Qb.stop(),b.Qb=null);if(!b.m){e.A(2);break}return u(e,b.m.stop(),3);case 3:b.m=null;case 2:if(!b.j){e.A(4);break}return u(e,b.j.stop(),4);
430
- case 4:if(!b.f){e.A(6);break}return u(e,b.f.destroy(),7);case 7:b.f=null;case 6:b.o&&(b.o.a(),b.o=null);if(!b.C){e.A(8);break}return u(e,b.C.destroy(),9);case 9:b.C=null;case 8:c.u&&c.u.src&&(c.u.removeAttribute("src"),c.u.load());if(!b.h){e.A(10);break}return u(e,b.h.destroy(),11);case 11:b.h=null;case 10:b.F.a.clear(),b.xb=null,b.V=null,b.Tb.clear(),b.c=null,b.v=null,b.tc=null,b.eb=!0,el(b),v(e)}})})}
431
- function Pk(b,c){return t(function e(){var f,g,h,k;return y(e,function(e){switch(e.l){case 1:return f=window.muxjs?new nd:new od,g=b.b.textDisplayFactory,h=new g,b.tc=g,k=new $d(c.u,f,h),u(e,k.o,2);case 2:b.C=k,v(e)}})})}
432
- function Qk(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.l){case 1:c.va=d.va;c.mimeType=d.mimeType;c.uri=d.uri;g=c.uri;h=b.N;b.xb=g;if(c.va){b.m=c.va();f.A(2);break}k=b;return u(f,U.create(g,h,b.b.manifest.retryParameters,c.mimeType),3);case 3:k.m=f.s;case 2:b.m.configure(b.b.manifest),v(f)}})})}
433
- function Rk(b,c){var d=c.uri,e=b.N;b.Pb=new wi;xi(b.Pb,function(c){fl(b,"timelineregionadded",c)});var f={networkingEngine:e,filterNewPeriod:function(c){return b.Bc(c)},filterAllPeriods:function(c){return gl(b,c)},onTimelineRegionAdded:function(c){var d=b.Pb;a:{var e=r(d.b);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.schemeIdUri==c.schemeIdUri&&f.startTime==c.startTime&&f.endTime==c.endTime){e=f;break a}e=null}null==e&&(d.b.add(c),d.c(c))},onEvent:function(c){return b.dispatchEvent(c)},onError:function(c){return b.Ha(c)}};
434
- return new H(Promise.resolve().then(function(){return t(function h(){var c;return y(h,function(e){switch(e.l){case 1:return c=b,u(e,b.m.start(d,f),2);case 2:c.c=e.s;b.dispatchEvent(new I("manifestparsed"));if(0==b.c.periods.length)throw new D(2,4,4014);hl(b.c.periods);v(e)}})})}),function(){return b.m.stop()})}
435
- function Sk(b){return t(function d(){return y(d,function(d){switch(d.l){case 1:return b.h=new Gc({nb:b.N,onError:function(d){b.Ha(d)},gc:function(d){il(b,d)},onExpirationUpdated:function(d,e){jl(b,d,e)},onEvent:function(d){b.dispatchEvent(d)}}),b.h.configure(b.b.drm),u(d,Nc(b.h,ci(b.c.periods),b.c.offlineSessionIds),2);case 2:gl(b,b.c.periods),v(d)}})})}
436
- function Tk(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w;return y(f,function(f){switch(f.l){case 1:return c.startTime=d.startTime,g=c.u,h=c.uri,b.xb=h,b.v=new Jk,k=function(){return kl(b)},l=function(){var c=b.a.playbackRate;0!=c&&b.K.set(c)},L(b.i,g,"playing",k),L(b.i,g,"pause",k),L(b.i,g,"ended",k),L(b.i,g,"ratechange",l),m=b.b.abrFactory,b.j&&b.rc==m||(b.rc=m,b.j=new m,b.j.configure(b.b.abr)),ll(b,b.c.periods),b.Rb=new Ph(b.b.preferredAudioLanguage,b.b.preferredVariantRole,b.b.preferredAudioChannelCount),
437
- b.Ka=b.b.preferredTextLanguage,ml(b.c.presentationTimeline,b.b.playRangeStart,b.b.playRangeEnd),u(f,b.h.zb(g),2);case 2:return b.j.init(function(c,d,f){d=void 0===d?!1:d;f=void 0===f?0:f;a:{var g=r(b.c.periods);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.variants.includes(c)){g=h;break a}g=null}nl(b,g,c,!0);b.f&&(Qi(b.f,c,d,f),ol(b))}),b.o=pl(b,c.startTime),b.bb=ql(b),b.K=new gi({cc:function(){return c.u.playbackRate},fd:function(b){c.u.playbackRate=b},Fd:function(b){c.u.currentTime+=b}}),
438
- n=Math.max(b.c.minBufferTime,b.b.streaming.rebufferingGoal),rl(b,n),b.f=sl(b),b.f.configure(b.b.streaming),tl(b),b.g=ul,b.dispatchEvent(new I("streaming")),u(f,b.f.start(),3);case 3:b.b.streaming.startAtSegmentBoundary&&(q=b.o.i(),x=vl(b,q),b.o.o(x)),b.c.periods.forEach(b.Bc.bind(b)),wl(b),ol(b),w=xl(b),w.variants.some(function(b){return b.primary}),yl(b,w.variants),dc(b.i,g,"loadeddata",function(){b.v.c=Date.now()/1E3-d.jd}),v(f)}})})}
439
- function Uk(b,c){return t(function e(){var f,g;return y(e,function(e){switch(e.l){case 1:return f=wd,b.h=new Gc({nb:b.N,onError:function(c){b.Ha(c)},gc:function(c){il(b,c)},onExpirationUpdated:function(c,e){jl(b,c,e)},onEvent:function(c){b.dispatchEvent(c)}}),b.h.configure(b.b.drm),g={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,
440
- presentationTimeOffset:0,mimeType:"video/mp4",codecs:"",encrypted:!0,keyId:null,language:"und",label:null,type:f.La,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},u(e,Nc(b.h,[g],[]),2);case 2:return u(e,b.h.zb(c.u),0)}})})}
441
- function Vk(b,c,d){function e(){return kl(b)}c.uri=d.uri;c.startTime=d.startTime;b.xb=c.uri;b.v=new Jk;b.o=new pi(c.u);null!=c.startTime&&b.o.o(c.startTime);b.K=new gi({cc:function(){return c.u.playbackRate},fd:function(b){c.u.playbackRate=b},Fd:function(b){c.u.currentTime+=b}});rl(b,b.b.streaming.rebufferingGoal);L(b.i,c.u,"playing",e);L(b.i,c.u,"pause",e);L(b.i,c.u,"ended",e);dc(b.i,c.u,"loadeddata",function(){b.v.c=Date.now()/1E3-d.jd});b.a.audioTracks&&(L(b.i,b.a.audioTracks,"addtrack",function(){return wl(b)}),
442
- L(b.i,b.a.audioTracks,"removetrack",function(){return wl(b)}));if(b.a.textTracks){var f=b.a.textTracks;L(b.i,f,"addtrack",function(){return wl(b)});L(b.i,f,"removetrack",function(){return wl(b)})}c.u.src=c.uri;b.g=zl;b.dispatchEvent(new I("streaming"));var g=new G;b.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?g.resolve():b.a.error?g.reject(dl(b)):(dc(b.i,b.a,"loadeddata",function(){g.resolve()}),dc(b.i,b.a,"error",function(){g.reject(dl(b))}));return new H(g,function(){g.reject(new D(2,7,7001));
443
- return Promise.resolve()})}function hl(b){function c(b){return b.video&&b.audio||b.video&&b.video.codecs.includes(",")}b.some(function(b){return b.variants.some(c)})&&b.forEach(function(b){b.variants=b.variants.filter(c)})}
444
- function tl(b){function c(b){var c="";b.video&&(c=lc(b.video.codecs)[0]);var d="";b.audio&&(d=lc(b.audio.codecs)[0]);return c+"-"+d}var d=b.c.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=De(d,b.b.preferredAudioChannelCount);var e=new Gb;d.forEach(function(b){var d=c(b);e.push(d,b)});var f=null,g=Infinity;e.forEach(function(b,c){var d=0,e=0;c.forEach(function(b){d+=b.bandwidth||0;++e});var h=d/e;h<g&&(f=b,g=h)});b.c.periods.forEach(function(b){b.variants=b.variants.filter(function(b){return c(b)==
445
- f?!0:!1})})}function Mk(b){return new K(function(c,d){b.j&&b.j.segmentDownloaded(c,d)})}function pl(b,c){return new qi(b.a,b.c,b.b.streaming,c,function(){b.bb&&bi(b.bb,!0);b.f&&Wi(b.f)},function(c){return b.dispatchEvent(c)})}
446
- function ql(b){var c=new ei(b.c);fi(c,function(){wl(b)});var d=new yi(b.Pb);Ci(d,function(c){fl(b,"timelineregionenter",c)},function(c){fl(b,"timelineregionexit",c)},function(c,d){d||(fl(b,"timelineregionenter",c),fl(b,"timelineregionexit",c))});var e=new ai(b.a);e.b.add(c);e.b.add(d);return e}
447
- function rl(b,c){b.V=new Sh(c,Math.min(.5,c/2));b.V.a=Uh;el(b);b.Qb=(new B(function(){switch(b.g){case zl:var c=b.a.ended?!0:pd(b.a.buffered)>=b.a.duration-.1;break;case ul:a:{var e;(e=b.a.ended)||(e=b.C,e=e.g?"ended"==e.g.readyState:!0);if(e)c=!0;else{if(b.c.presentationTimeline.U()&&(e=b.c.presentationTimeline.jb(),pd(b.a.buffered)>=e)){c=!0;break a}c=!1}}break;default:c=!1}var f=rd(b.a.buffered,b.a.currentTime);e=b.V;var g=c,h=e.b.get(e.a);c=e.a;f=g||f>=h?Th:Uh;e.a=f;c!=f&&el(b)})).Ia(.25)}
448
- function sl(b){return new Di(b.c,{Qa:function(){return b.o.i()},getBandwidthEstimate:function(){return b.j.getBandwidthEstimate()},L:b.C,nb:b.N,Id:b.$e.bind(b),Hd:b.qe.bind(b),onError:b.Ha.bind(b),onEvent:function(c){return b.dispatchEvent(c)},df:b.ef.bind(b),Vc:b.lf.bind(b)})}X.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=zk(b,c));var d=Ck(this.b,b,Lk(this));Al(this);return d};X.prototype.configure=X.prototype.configure;
449
- function Al(b){b.m&&b.m.configure(b.b.manifest);b.h&&b.h.configure(b.b.drm);if(b.f){b.f.configure(b.b.streaming);try{b.c.periods.forEach(b.Bc.bind(b))}catch(g){b.Ha(g)}var c=Hi(b.f),d=Ji(b.f),e=xl(b);c=Ge(c,d,e.variants);b.j&&c&&c.allowedByApplication&&c.allowedByKeySystem?yl(b,e.variants):Bl(b,e)}if(b.C&&(e=b.b.textDisplayFactory,b.tc!=e)){c=new e;d=b.C;var f=d.h;d.h=c;f&&(c.setTextVisibility(f.isTextVisible()),f.destroy());d.a&&(d.a.c=c);b.tc=e;b.f&&(e=b.f,(c=e.b.get("text"))&&Pi(e,c.stream,!0,
450
- 0,!0))}b.j&&(b.j.configure(b.b.abr),b.b.abr.enabled&&!b.eb?b.j.enable():b.j.disable(),Cl(b))}X.prototype.getConfiguration=function(){var b=Lk(this);Ck(b,this.b,Lk(this));return b};X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.Ef=function(){for(var b in this.b)delete this.b[b];Ck(this.b,Lk(this),Lk(this));Al(this)};X.prototype.resetConfiguration=X.prototype.Ef;X.prototype.Fe=function(){return this.g};X.prototype.getLoadMode=X.prototype.Fe;X.prototype.Je=function(){return this.a};
451
- X.prototype.getMediaElement=X.prototype.Je;X.prototype.Bb=function(){return this.N};X.prototype.getNetworkingEngine=X.prototype.Bb;X.prototype.$b=function(){return this.xb};X.prototype.getAssetUri=X.prototype.$b;X.prototype.Ie=function(){Ke("getManifestUri",'Please use "getAssetUri" instead.');return this.$b()};X.prototype.getManifestUri=X.prototype.Ie;X.prototype.U=function(){return this.c?this.c.presentationTimeline.U():this.a&&this.a.src?Infinity==this.a.duration:!1};X.prototype.isLive=X.prototype.U;
452
- X.prototype.Ta=function(){return this.c?this.c.presentationTimeline.Ta():!1};X.prototype.isInProgress=X.prototype.Ta;X.prototype.Xe=function(){if(this.c){if(!this.c.periods.length)return!1;var b=this.c.periods[0].variants;return b.length?!b[0].video:!1}return this.a&&this.a.src?this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight:!1};X.prototype.isAudioOnly=X.prototype.Xe;
453
- X.prototype.Gf=function(){if(this.c){var b=this.c.presentationTimeline;return{start:b.ib(),end:b.wa()}}return this.a&&this.a.src&&(b=this.a.seekable,b.length)?{start:b.start(0),end:b.end(b.length-1)}:{start:0,end:0}};X.prototype.seekRange=X.prototype.Gf;X.prototype.keySystem=function(){return this.h?this.h.keySystem():""};X.prototype.keySystem=X.prototype.keySystem;X.prototype.drmInfo=function(){return this.h?this.h.a:null};X.prototype.drmInfo=X.prototype.drmInfo;
454
- X.prototype.bc=function(){return this.h?this.h.bc():Infinity};X.prototype.getExpiration=X.prototype.bc;X.prototype.Jc=function(){return this.V?this.V.a==Uh:!1};X.prototype.isBuffering=X.prototype.Jc;X.prototype.Me=function(){if(this.K){var b=this.K;b=b.g?0:b.f}else b=0;return b};X.prototype.getPlaybackRate=X.prototype.Me;X.prototype.bg=function(b){0==b?$a("A trick play rate of 0 is unsupported!"):(this.g==zl&&this.K.set(b),this.g==ul&&(this.K.set(b),Oi(this.f,1<Math.abs(b))))};
455
- X.prototype.trickPlay=X.prototype.bg;X.prototype.re=function(){this.g==zl&&this.K.set(1);this.g==ul&&(this.K.set(1),Oi(this.f,!1))};X.prototype.cancelTrickPlay=X.prototype.re;
456
- X.prototype.Ic=function(){if(this.c&&this.o){for(var b=Dl(this),c=[],d=r(El(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=we(e);f.active=e==b;c.push(f)}return c}return this.a&&this.a.audioTracks?Array.from(this.a.audioTracks).map(function(b){var c=Ae(b);c.active=b.enabled;c.type="variant";c.originalAudioId=b.id;"main"==b.kind?(c.primary=!0,c.roles=["main"],c.audioRoles=["main"]):c.audioRoles=[];return c}):[]};X.prototype.getVariantTracks=X.prototype.Ic;
457
- X.prototype.kb=function(){if(this.c&&this.o){for(var b=Fl(this),c=[],d=r(Gl(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=xe(e);f.active=e==b;c.push(f)}return c}return this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).map(function(b){var c=Ae(b);c.active="disabled"!=b.mode;c.type="text";c.originalTextId=b.id;"captions"==b.kind&&(c.mimeType="application/cea-608");return c}):[]};X.prototype.getTextTracks=X.prototype.kb;
458
- X.prototype.cd=function(b){if(this.c&&this.f){var c=xl(this),d=c.textStreams.find(function(c){return c.id==b.id});d&&(Hh(this.F,c,d),Ik(this.v.b,d,!1),Hl(this,d),this.Ka=d.language)}else if(this.a&&this.a.src&&this.a.textTracks){c=Array.from(this.a.textTracks);c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,ye(d)==b.id?d.mode=this.$a?"showing":"hidden":d.mode="disabled";Il(this)}};X.prototype.selectTextTrack=X.prototype.cd;
459
- X.prototype.If=function(){Ke("selectEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. Please use SelectTextTrack.");var b=this.kb().filter(function(b){return"application/cea-608"==b.mimeType});0<b.length&&this.cd(b[0])};X.prototype.selectEmbeddedTextTrack=X.prototype.If;
460
- X.prototype.gg=function(){Ke("usingEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. There should be no reason to know if the player is playing embedded text.");var b=this.kb().filter(function(b){return b.active})[0];return b?"application/cea-608"==b.mimeType:!1};X.prototype.usingEmbeddedTextTrack=X.prototype.gg;
461
- X.prototype.Kf=function(b,c,d){d=void 0===d?0:d;if(this.c&&this.f){var e=xl(this);this.b.abr.enabled&&$a("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var f=e.variants.find(function(c){return c.id==b.id});f&&Be(f)&&(nl(this,e,f,!1),Jl(this,f,c,d),this.Rb=new Oh(f),yl(this,e.variants))}else if(this.a&&this.a.audioTracks){c=Array.from(this.a.audioTracks);c=r(c);for(d=c.next();!d.done;d=
462
- c.next())d=d.value,ye(d)==b.id&&(d.enabled=!0);Kl(this)}};X.prototype.selectVariantTrack=X.prototype.Kf;X.prototype.Ae=function(){return Ll(this.Ic())};X.prototype.getAudioLanguagesAndRoles=X.prototype.Ae;X.prototype.Te=function(){return Ll(this.kb())};X.prototype.getTextLanguagesAndRoles=X.prototype.Te;X.prototype.ze=function(){return Array.from(Ml(this.Ic()))};X.prototype.getAudioLanguages=X.prototype.ze;X.prototype.Se=function(){return Array.from(Ml(this.kb()))};X.prototype.getTextLanguages=X.prototype.Se;
463
- X.prototype.Hf=function(b,c){if(this.c&&this.o){var d=xl(this);this.Rb=new Ph(b,c||"",0);Bl(this,d)}else if(this.a&&this.a.audioTracks){d=Array.from(this.a.audioTracks);d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.language==b&&(e.enabled=!0);Kl(this)}};X.prototype.selectAudioLanguage=X.prototype.Hf;X.prototype.Jf=function(b,c){if(this.c&&this.o){var d=xl(this);this.Ka=b;this.yb=c||"";Bl(this,d)}else(d=this.kb().filter(function(c){return c.language==b})[0])&&this.cd(d)};
464
- X.prototype.selectTextLanguage=X.prototype.Jf;X.prototype.Mc=function(){var b=this.$a;return this.c?this.C.h.isTextVisible():this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).some(function(b){return"showing"==b.mode}):b};X.prototype.isTextTrackVisible=X.prototype.Mc;
465
- X.prototype.Nf=function(b){var c=this;return t(function e(){var f,g,h,k,l,m;return y(e,function(e){switch(e.l){case 1:f=c.$a;g=b;if(f==g)return e["return"]();c.$a=g;if(c.g!=ul){if(c.a&&c.a.src&&c.a.textTracks){h=Array.from(c.a.textTracks);for(var n=r(h),x=n.next();!x.done;x=n.next())k=x.value,"disabled"!=k.mode&&(k.mode=b?"showing":"hidden")}e.A(2);break}c.C.h.setTextVisibility(b);if(c.b.streaming.alwaysStreamText){e.A(2);break}if(!b){n=c.f;n.C=!0;if(x=n.b.get("text"))Ei(x),n.b["delete"]("text");
466
- e.A(2);break}l=xl(c);m=Ee(l.textStreams,c.Ka,c.yb);if(!(0<m.length)){e.A(2);break}return u(e,Ki(c.f,m[0]),2);case 2:Nl(c),v(e)}})})};X.prototype.setTextTrackVisibility=X.prototype.Nf;X.prototype.Oe=function(){if(!this.U())return null;if(this.c)return new Date(1E3*(this.c.presentationTimeline.f+this.a.currentTime));if(this.a&&this.a.getStartDate){var b=this.a.getStartDate();return isNaN(b.getTime())?null:new Date(b.getTime()+1E3*this.a.currentTime)}return null};X.prototype.getPlayheadTimeAsDate=X.prototype.Oe;
467
- X.prototype.Qe=function(){if(!this.U())return null;if(this.c)return new Date(1E3*this.c.presentationTimeline.f);if(this.a&&this.a.getStartDate){var b=this.a.getStartDate();return isNaN(b.getTime())?null:b}return null};X.prototype.getPresentationStartTimeAsDate=X.prototype.Qe;X.prototype.Ec=function(){var b={total:[],audio:[],video:[],text:[]};this.g==zl&&(b.total=sd(this.a.buffered));this.g==ul&&this.C.Ec(b);return b};X.prototype.getBufferedInfo=X.prototype.Ec;
468
- X.prototype.getStats=function(){if(this.g!=ul&&this.g!=zl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]};kl(this);var b=this.a;if(b.getVideoPlaybackQuality){b=b.getVideoPlaybackQuality();var c=this.v,d=Number(b.totalVideoFrames);c.i=Number(b.droppedVideoFrames);c.h=d}if(this.g==ul){if(b=Dl(this))this.v.j=b.bandwidth;b&&b.video&&(c=this.v,d=b.video.height||
469
- NaN,c.m=b.video.width||NaN,c.g=d);b=this.j.getBandwidthEstimate();this.v.f=b}var e=this.v;b=e.m;c=e.g;d=e.j;var f=e.h,g=e.i,h=e.f,k=e.c,l=Fk(e.a,"playing"),m=Fk(e.a,"paused"),n=Fk(e.a,"buffering"),q=Gk(e.a),x=[];e=r(e.b.a);for(var w=e.next();!w.done;w=e.next())w=w.value,x.push({timestamp:w.timestamp,id:w.id,type:w.type,fromAdaptation:w.fromAdaptation,bandwidth:w.bandwidth});return{width:b,height:c,streamBandwidth:d,decodedFrames:f,droppedFrames:g,estimatedBandwidth:h,loadLatency:k,playTime:l,pauseTime:m,
470
- bufferingTime:n,stateHistory:q,switchHistory:x}};X.prototype.getStats=X.prototype.getStats;
471
- X.prototype.addTextTrack=function(b,c,d,e,f,g){var h=this;return t(function l(){var m,n,q,x,w,A,C,E,F;return y(l,function(l){switch(l.l){case 1:if(h.g==zl)throw Error("State error!");if(h.g!=ul)throw Error("State error!");m=xl(h);n=wd;q=h.c.periods.indexOf(m);x=q+1;w=x>=h.c.periods.length?h.c.presentationTimeline.Y():h.c.periods[x].startTime;A=w-m.startTime;if(Infinity==A)throw new D(1,4,4033);C=new Q(1,0,A,function(){return[b]},0,null);E={id:h.Ed++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),
472
- findSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1==b?C:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:e,codecs:f||"",kind:d,encrypted:!1,keyId:null,language:c,label:g||null,type:n.na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};h.Tb.add(E);m.textStreams.push(E);return u(l,Ki(h.f,E),2);case 2:return(F=Ii(h.f,"text"))&&Hh(h.F,m,F),h.Tb["delete"](E),Bl(h,m),wl(h),l["return"](xe(E))}})})};
473
- X.prototype.addTextTrack=X.prototype.addTextTrack;X.prototype.ed=function(b,c){this.Ub.width=b;this.Ub.height=c};X.prototype.setMaxHardwareResolution=X.prototype.ed;X.prototype.bd=function(){if(this.g==ul){var b=this.f;if(b.f)b=!1;else if(b.m)b=!1;else{for(var c=r(b.b.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Eb&&(d.Eb=!1,Ni(b,d,.1));b=!0}}else b=!1;return b};X.prototype.retryStreaming=X.prototype.bd;X.prototype.Ge=function(){return this.c};X.prototype.getManifest=X.prototype.Ge;
474
- X.prototype.He=function(){return this.m?this.m.constructor:null};X.prototype.getManifestParserFactory=X.prototype.He;function nl(b,c,d,e){Ih(b.F,c).variant=d;b=b.v.b;b.c!=d&&(b.c=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"variant",fromAdaptation:e,bandwidth:d.bandwidth}))}function Lk(b){var c=Ak();c.streaming.failureCallback=function(c){var d=[1001,1002,1003];b.U()&&d.includes(c.code)&&(c.severity=1,b.bd())};c.textDisplayFactory=function(){return new vk(b.a)};return c}
475
- function ll(b,c){for(var d=0;d<c.length;d++){for(var e=c[d],f=new Map,g=r(e.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.video&&h.video.closedCaptions){h=h.video;for(var k=r(h.closedCaptions.keys()),l=k.next();!l.done;l=k.next())if(l=l.value,!f.has(l)){var m={id:b.Ed++,originalId:l,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"application/cea-608",
407
+ p.onExpirationUpdated=function(b,c){var d=this;return t(function f(){var g,h,k,l,m,n,q;return z(f,function(f){switch(f.j){case 1:return g=d.a,h=new Pj,y(f,2,3),u(f,h.init(),5);case 5:return u(f,Tj(h,g.ua(),g.aa()),6);case 6:return k=f.o,u(f,k.getManifests([g.key()]),7);case 7:l=f.o;m=l[0];n=m.sessionIds.includes(b);q=void 0==m.expiration||m.expiration>c;if(!n||!q){f.A(3);break}return u(f,k.updateManifestExpiration(g.key(),c),3);case 3:return Da(f),u(f,h.destroy(),10);case 10:Ea(f,0);break;case 2:Ca(f),
408
+ f.A(3)}})})};U.Nb("application/x-offline-manifest",xk);function yk(b){var c=pk(b);return c&&"manifest"==c.a?yk.h(b):c&&"segment"==c.a?yk.i(c.key(),c):Ab(new G(2,1,9004,b))}A("shaka.offline.OfflineScheme",yk);yk.h=function(b){b={uri:b,ad:b,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}};return Cb(b)};yk.i=function(b,c){var d=new Pj;return Cb(void 0).U(function(){return d.init()}).U(function(){return Tj(d,c.ua(),c.aa())}).U(function(b){return b.getSegments([c.key()])}).U(function(b){return{uri:c,ad:c,data:b[0].data,headers:{}}})["finally"](function(){return d.destroy()})};
409
+ Sb("offline",yk);function zk(b,c,d){return t(function f(){var g,h,k,l,m,n;return z(f,function(f){switch(f.j){case 1:g=[];for(var q=[],x=r(d),B=x.next();!B.done;B=x.next()){B=B.value;for(var C=!1,E=r(q),F=E.next();!F.done;F=E.next())if(F=F.value,Ak(F.info,B)){F.sessionIds.push(B.sessionId);C=!0;break}C||q.push({info:B,sessionIds:[B.sessionId]})}h=r(q);k=h.next();case 2:if(k.done){f.A(4);break}l=k.value;m=Bk(b,c,l);return u(f,m,5);case 5:n=f.o;g=g.concat(n);k=h.next();f.A(2);break;case 4:return f["return"](g)}})})}
410
+ function Bk(b,c,d){return t(function f(){var g,h;return z(f,function(f){switch(f.j){case 1:return g=new Lc({rb:c,onError:function(){},kc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),y(f,2),g.configure(b),u(f,Tc(g,d.info.keySystem,d.info.licenseUri,d.info.serverCertificate,d.info.audioCapabilities,d.info.videoCapabilities),4);case 4:za(f,3);break;case 2:return Ca(f),u(f,g.destroy(),5);case 5:return f["return"]([]);case 3:return y(f,6),u(f,$c(g),8);case 8:za(f,7);break;case 6:return Ca(f),
411
+ u(f,g.destroy(),9);case 9:return f["return"]([]);case 7:return h=[],u(f,Promise.all(d.sessionIds.map(function(b){return t(function n(){return z(n,function(c){switch(c.j){case 1:return y(c,2),u(c,cd(g,b),4);case 4:h.push(b);za(c,0);break;case 2:Ca(c),v(c)}})})})),10);case 10:return u(f,g.destroy(),11);case 11:return f["return"](h)}})})}
412
+ function Ak(b,c){function d(b,c){return b.robustness==c.robustness&&b.contentType==c.contentType}return b.keySystem==c.keySystem&&b.licenseUri==c.licenseUri&&Nb(b.audioCapabilities,c.audioCapabilities,d)&&Nb(b.videoCapabilities,c.videoCapabilities,d)};function Ck(b,c){var d=Dk(),e=this;this.g=c;this.c=b;this.i=d;this.h=null;this.f=[];this.b=this.a=null;this.l=!0;this.m=Promise.resolve().then(function(){return Ek(e)})}Ck.prototype.destroy=function(){var b=this;return t(function d(){var e;return z(d,function(d){switch(d.j){case 1:return b.l=!1,b.b&&b.b.abort(),Fk(b),u(d,b.m,2);case 2:b.a&&b.a.ta.Wa();for(var f=r(b.f),h=f.next();!h.done;h=f.next())e=h.value,e.ta.Wa();b.a=null;b.f=[];b.g=null;v(d)}})})};
413
+ function Gk(b,c){var d={tb:function(){},jc:function(){},Wa:function(){},onError:function(){},lc:function(){},sg:function(){}};b.f.push({create:c,ta:d});b.b&&b.b.abort();Fk(b);return d}
414
+ function Ek(b){return t(function d(){return z(d,function(d){switch(d.j){case 1:if(b.l){if(0==b.f.length||b.a&&!b.a.Ta)var e=!1;else{b.a&&(b.a.ta.Wa(),b.a=null);e=b.f.shift();var g=e.create(b.i);g?(e.ta.tb(),b.a={node:g.node,payload:g.payload,Ta:g.Ta,ta:e.ta}):e.ta.lc();e=!0}e?e=Promise.resolve():b.a?e=Hk(b):(b.g.ff(b.c),b.h=new H,e=b.h);return u(d,e,1)}d.A(0)}})})}
415
+ function Hk(b){return t(function d(){var e,f;return z(d,function(d){switch(d.j){case 1:return b.c=b.g.Pe(b.c,b.i,b.a.node,b.a.payload),y(d,2),b.b=b.g.ze(b.c,b.i,b.a.payload),u(d,b.b.promise,4);case 4:b.b=null;b.c==b.a.node&&(b.a.ta.jc(),b.a=null);za(d,0);break;case 2:e=Ca(d);if(7001==e.code)b.a.ta.Wa();else b.a.ta.onError(e);b.a=null;b.b=null;f=b;return u(d,b.g.handleError(b.i,e),5);case 5:f.c=d.o,v(d)}})})}function Fk(b){b.h&&(b.h.resolve(),b.h=null)};function Ik(b){this.a=null;for(var c=0;c<b.textTracks.length;++c){var d=b.textTracks[c];d.mode="disabled";"Shaka Player TextTrack"==d.label&&(this.a=d)}this.a||(this.a=b.addTextTrack("subtitles","Shaka Player TextTrack"));this.a.mode="hidden"}A("shaka.text.SimpleTextDisplayer",Ik);Ik.prototype.remove=function(b,c){if(!this.a)return!1;Jk(this.a,function(d){return d.startTime<c&&d.endTime>b});return!0};Ik.prototype.remove=Ik.prototype.remove;
416
+ Ik.prototype.append=function(b){for(var c=Kk,d=[],e=0;e<b.length;e++){var f=c(b[e]);f&&d.push(f)}d.slice().sort(function(b,c){return b.startTime!=c.startTime?b.startTime-c.startTime:b.endTime!=c.endTime?b.endTime-c.startTime:d.indexOf(c)-d.indexOf(b)}).forEach(function(b){this.a.addCue(b)}.bind(this))};Ik.prototype.append=Ik.prototype.append;Ik.prototype.destroy=function(){this.a&&Jk(this.a,function(){return!0});this.a=null;return Promise.resolve()};Ik.prototype.destroy=Ik.prototype.destroy;
417
+ Ik.prototype.isTextVisible=function(){return"showing"==this.a.mode};Ik.prototype.isTextVisible=Ik.prototype.isTextVisible;Ik.prototype.setTextVisibility=function(b){this.a.mode=b?"showing":"hidden"};Ik.prototype.setTextVisibility=Ik.prototype.setTextVisibility;
418
+ function Kk(b){if(b.startTime>=b.endTime)return null;var c=new VTTCue(b.startTime,b.endTime,b.payload);c.lineAlign=b.lineAlign;c.positionAlign=b.positionAlign;c.size=b.size;try{c.align=b.textAlign}catch(d){}"center"==b.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==b.writingMode?c.vertical="lr":"vertical-rl"==b.writingMode&&(c.vertical="rl");1==b.lineInterpretation&&(c.snapToLines=!1);null!=b.line&&(c.line=b.line);null!=b.position&&(c.position=b.position);return c}
419
+ function Jk(b,c){var d=b.mode;b.mode="showing"==d?"showing":"hidden";for(var e=b.cues,f=e.length-1;0<=f;f--){var g=e[f];g&&c(g)&&b.removeCue(g)}b.mode=d};function Lk(b,c,d,e,f){var g=f in e,h=!0,k;for(k in c){var l=f+"."+k,m=g?e[f]:d[k];g||k in d?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=Jb(m):m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=Jb(m)),l=Lk(b[k],c[k],m,e,l),h=h&&l):typeof c[k]!=typeof m||null==c[k]||c[k].constructor!=m.constructor?h=!1:b[k]=c[k]:h=!1}return h}A("shaka.util.ConfigUtils.mergeConfigObjects",Lk);
420
+ function Mk(b,c){for(var d={},e=d,f=0,g=0;;){f=b.indexOf(".",f);if(0>f)break;if(0==f||"\\"!=b[f-1])g=b.substring(g,f).replace(/\\\./g,"."),e[g]={},e=e[g],g=f+1;f+=1}e[b.substring(g).replace(/\\\./g,".")]=c;return d}A("shaka.util.ConfigUtils.convertToConfigObject",Mk);function Nk(){}A("shaka.util.PlayerConfiguration",Nk);
421
+ function Ok(){var b=5E5,c=Infinity;navigator.connection&&(b=1E6*navigator.connection.downlink,navigator.connection.saveData&&(c=360));var d={retryParameters:yb(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(b){return b},fairPlayTransform:!0},e={retryParameters:yb(),availabilityWindowOverride:NaN,dash:{customScheme:function(b){if(b)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,
422
+ autoCorrectDrift:!0},hls:{ignoreTextStreamFailures:!1}},f={retryParameters:yb(),failureCallback:function(){},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,stallSkip:.1};xc("Web0S")&&(f.stallEnabled=!1);var g={trackSelectionCallback:function(b){return b},progressCallback:function(){},usePersistentLicense:!0},
423
+ h={drm:d,manifest:e,streaming:f,offline:g,abrFactory:N,abr:{enabled:!0,defaultBandwidthEstimate:b,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:c,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,
424
+ minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}};g.trackSelectionCallback=function(b){return Pk(b,h.preferredAudioLanguage)};return h}
425
+ function Qk(b,c,d){var e={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return Lk(b,c,d||Ok(),e,"")}Nk.mergeConfigObjects=Qk;
426
+ function Pk(b,c){var d=b.filter(function(b){return"variant"==b.type}),e=[],f=xe(c,d.map(function(b){return b.language}));f&&(e=d.filter(function(b){return M(b.language)==f}));0==e.length&&(e=d.filter(function(b){return b.primary}));0==e.length&&(d.map(function(b){return b.language}),e=d);var g=e.filter(function(b){return b.height&&480>=b.height});g.length&&(g.sort(function(b,c){return c.height-b.height}),e=g.filter(function(b){return b.height==g[0].height}));d=[];if(e.length){var h=Math.floor(e.length/
427
+ 2);e.sort(function(b,c){return b.bandwidth-c.bandwidth});d.push(e[h])}e=r(b);for(h=e.next();!h.done;h=e.next())h=h.value,"text"==h.type&&d.push(h);return d};function Rk(){this.a=null;this.b=[]}function Sk(b,c){if(null==b.a)b.a={timestamp:Date.now()/1E3,state:c,duration:0};else{var d=Date.now()/1E3;b.a.duration=d-b.a.timestamp;b.a.state!=c&&(b.b.push(b.a),b.a={timestamp:d,state:c,duration:0})}}function Tk(b,c){var d=0;b.a&&b.a.state==c&&(d+=b.a.duration);for(var e=r(b.b),f=e.next();!f.done;f=e.next())f=f.value,d+=f.state==c?f.duration:0;return d}
428
+ function Uk(b){function c(b){return{timestamp:b.timestamp,state:b.state,duration:b.duration}}for(var d=[],e=r(b.b),f=e.next();!f.done;f=e.next())d.push(c(f.value));b.a&&d.push(c(b.a));return d};function Vk(){this.b=this.c=null;this.a=[]};function Wk(){this.f=this.l=this.b=this.h=this.i=this.g=this.m=NaN;this.a=new Rk;this.c=new Vk};function X(b,c){var d=this;Ib.call(this);this.h=Xk;this.a=null;this.eb=!1;this.i=new L;this.vc=this.l=this.Bb=this.c=this.m=this.f=this.Sb=this.P=this.Tb=this.W=this.gb=this.s=this.D=this.g=this.G=null;this.Hd=1E9;this.Wb=new Set;this.ib=!0;this.Ea=null;this.Dd=!1;this.Bd=0;this.na=null;this.$=new Sh;this.b=Yk(this);this.Xb={width:Infinity,height:Infinity};this.v=null;this.Ub=new ai(this.b.preferredAudioLanguage,this.b.preferredVariantRole,this.b.preferredAudioChannelCount);this.ma=this.b.preferredTextLanguage;
429
+ this.cb=this.b.preferredTextRole;c&&c(this);this.G=Zk(this);this.i.w(window,"online",function(){d.gd()});this.C={name:"detach"};this.M={name:"attach"};this.Fa={name:"unload"};this.Ec={name:"manifest-parser"};this.Cc={name:"manifest"};this.fb={name:"media-source"};this.wc={name:"drm-engine"};this.T={name:"load"};this.Ic={name:"src-equals-drm-engine"};this.hb={name:"src-equals"};var e=new Map;e.set(this.M,function(b,c){return Db($k(d,b,c))});e.set(this.C,function(b){b.u&&(d.i.ea(b.u,"error"),b.u=null);
430
+ d.a=null;b=Promise.resolve();return Db(b)});e.set(this.Fa,function(b){return Db(al(d,b))});e.set(this.fb,function(b){b=bl(d,b);return Db(b)});e.set(this.Ec,function(b,c){var e=cl(d,b,c);return Db(e)});e.set(this.Cc,function(b){return dl(d,b)});e.set(this.wc,function(){var b=el(d);return Db(b)});e.set(this.T,function(b,c){return Db(fl(d,b,c))});e.set(this.Ic,function(b){b=gl(d,b);return Db(b)});e.set(this.hb,function(b,c){return hl(d,b,c)});this.jb=new Ck(this.C,{Pe:function(b,c,e,k){var f=null;b==
431
+ d.C&&(f=e==d.C?d.C:d.M);b==d.M&&(f=e==d.C||c.u!=k.u?d.C:e==d.M?d.M:e==d.fb||e==d.T?d.fb:e==d.hb?d.Ic:null);b==d.fb&&(f=e==d.T&&c.u==k.u?d.Ec:d.Fa);b==d.Ec&&(f=il(d.T,d.Cc,d.Fa,e,c,k));b==d.Cc&&(f=il(d.T,d.wc,d.Fa,e,c,k));b==d.wc&&(f=il(d.T,d.T,d.Fa,e,c,k));b==d.Ic&&(f=e==d.hb&&c.u==k.u?d.hb:d.Fa);if(b==d.T||b==d.hb)f=d.Fa;b==d.Fa&&(f=k.u&&c.u==k.u?d.M:d.C);return f},ze:function(b,c,h){d.dispatchEvent(new J("onstatechange",{state:b.name}));return e.get(b)(c,h)},handleError:function(b){return t(function h(){return z(h,
432
+ function(c){switch(c.j){case 1:return u(c,al(d,b),2);case 2:return c["return"](b.u?d.M:d.C)}})})},ff:function(b){d.dispatchEvent(new J("onstateidle",{state:b.name}))}});b&&this.Cb(b,!0)}Ua(X,Ib);A("shaka.Player",X);
433
+ X.prototype.destroy=function(){var b=this;return t(function d(){var e;return z(d,function(d){switch(d.j){case 1:if(b.h==jl)return d["return"]();b.h=jl;e=Gk(b.jb,function(){return{node:b.C,payload:Dk(),Ta:!1}});return u(d,new Promise(function(b){e.tb=function(){};e.jc=function(){b()};e.Wa=function(){b()};e.onError=function(){b()};e.lc=function(){b()}}),2);case 2:return u(d,b.jb.destroy(),3);case 3:b.i&&(b.i.release(),b.i=null);b.vc=null;b.l=null;b.b=null;if(!b.G){d.A(0);break}return u(d,b.G.destroy(),
434
+ 5);case 5:b.G=null,v(d)}})})};X.prototype.destroy=X.prototype.destroy;X.version="v2.5.5";var kl=["2","5"];Re=new function(b){this.a=b;this.c=Se;this.b=Te}(new Pe(Number(kl[0]),Number(kl[1])));var ll=["output-restricted","internal-error"],ml={};X.registerSupportPlugin=function(b,c){ml[b]=c};
435
+ X.isBrowserSupported=function(){return window.Promise&&window.Uint8Array&&Array.prototype.forEach&&window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration?sc()?!0:tc("application/x-mpegurl"):!1};
436
+ X.probeSupport=function(){return od().then(function(b){for(var c=U.Af(),d={},e=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",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(",")),f=
437
+ e.next();!f.done;f=e.next()){f=f.value;d[f]=sc()?ae(f)?!0:MediaSource.isTypeSupported(f)||Fd(f):tc(f);var g=f.split(";")[0];d[g]=d[g]||d[f]}b={manifest:c,media:d,drm:b};for(var h in ml)b[h]=ml[h]();return b})};X.prototype.Cb=function(b,c){c=void 0===c?!0:c;if(this.h==jl)return Promise.reject(nl());var d=Dk();d.u=b;sc()||(c=!1);var e=c?this.fb:this.M,f=Gk(this.jb,function(){return{node:e,payload:d,Ta:!1}});f.tb=function(){};return ol(f)};X.prototype.attach=X.prototype.Cb;
438
+ X.prototype.detach=function(){var b=this;if(this.h==jl)return Promise.reject(nl());var c=Gk(this.jb,function(){return{node:b.C,payload:Dk(),Ta:!1}});c.tb=function(){};return ol(c)};X.prototype.detach=X.prototype.detach;X.prototype.rd=function(b){var c=this;b=void 0===b?!0:b;if(this.h==jl)return Promise.reject(nl());sc()||(b=!1);var d=Dk(),e=Gk(this.jb,function(e){var f=e.u&&b?c.fb:e.u?c.M:c.C;d.u=e.u;return{node:f,payload:d,Ta:!1}});e.tb=function(){};return ol(e)};X.prototype.unload=X.prototype.rd;
439
+ X.prototype.load=function(b,c,d){if(this.h==jl)return Promise.reject(nl());this.dispatchEvent(new J("loading"));var e=Dk();e.uri=b;e.od=Date.now()/1E3;d&&"string"!=typeof d&&(Qe("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),e.ya=function(){return new d});d&&"string"==typeof d&&(e.mimeType=d);void 0!==c&&(e.startTime=c);var f=pl(e)?this.hb:this.T,g=Gk(this.jb,function(b){if(null==b.u)return null;e.u=b.u;return{node:f,payload:e,Ta:!0}});g.tb=function(){};
440
+ return new Promise(function(b,c){g.lc=function(){return c(new G(2,7,7002))};g.jc=function(){return b()};g.Wa=function(){return c(nl())};g.onError=function(b){return c(b)}})};X.prototype.load=X.prototype.load;
441
+ function pl(b){if(b.ya)return!1;if(!sc())return!0;var c=b.mimeType;b=b.uri||"";c||(c={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",ts:"video/mp2t",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac"}[U.getExtension(b)]);return c?tc(c)?U.isSupported(b,c)?!!navigator.vendor&&navigator.vendor.includes("Apple"):!0:!1:!1}function $k(b,c,d){null==c.u&&(c.u=d.u,b.i.w(c.u,"error",function(){var c=ql(b);c&&b.Ka(c)}));b.a=c.u;return Promise.resolve()}
442
+ function al(b,c){return t(function e(){return z(e,function(e){switch(e.j){case 1:b.h!=jl&&(b.h=Xk);b.dispatchEvent(new J("unloading"));c.ya=null;c.mimeType=null;c.startTime=null;c.uri=null;c.u&&(b.i.ea(c.u,"loadeddata"),b.i.ea(c.u,"playing"),b.i.ea(c.u,"pause"),b.i.ea(c.u,"ended"),b.i.ea(c.u,"ratechange"));b.gb&&(b.gb.release(),b.gb=null);b.Tb&&(b.Tb.stop(),b.Tb=null);if(!b.m){e.A(2);break}return u(e,b.m.stop(),3);case 3:b.m=null;case 2:if(!b.l){e.A(4);break}return u(e,b.l.stop(),4);case 4:if(!b.f){e.A(6);
443
+ break}return u(e,b.f.destroy(),7);case 7:b.f=null;case 6:b.s&&(b.s.release(),b.s=null);if(!b.D){e.A(8);break}return u(e,b.D.destroy(),9);case 9:b.D=null;case 8:c.u&&c.u.src&&(c.u.removeAttribute("src"),c.u.load());if(!b.g){e.A(10);break}return u(e,b.g.destroy(),11);case 11:b.g=null;case 10:b.$.a.clear(),b.Bb=null,b.P=null,b.Wb.clear(),b.c=null,b.v=null,b.xc=null,b.ib=!0,rl(b),v(e)}})})}
444
+ function bl(b,c){return t(function e(){var f,g,h,k;return z(e,function(e){switch(e.j){case 1:return f=window.muxjs?new sd:new td,g=b.b.textDisplayFactory,h=new g,b.xc=g,k=new ee(c.u,f,h),u(e,k.s,2);case 2:b.D=k,v(e)}})})}
445
+ function cl(b,c,d){return t(function f(){var g,h,k;return z(f,function(f){switch(f.j){case 1:c.ya=d.ya;c.mimeType=d.mimeType;c.uri=d.uri;g=c.uri;h=b.G;b.Bb=g;if(c.ya){b.m=c.ya();f.A(2);break}k=b;return u(f,U.create(g,h,b.b.manifest.retryParameters,c.mimeType),3);case 3:k.m=f.o;case 2:b.m.configure(b.b.manifest),v(f)}})})}
446
+ function dl(b,c){var d=c.uri,e=b.G;b.Sb=new Ii;Ji(b.Sb,function(c){sl(b,"timelineregionadded",c)});var f={networkingEngine:e,filterNewPeriod:function(c){return b.Fc(c)},filterAllPeriods:function(c){return tl(b,c)},onTimelineRegionAdded:function(c){var d=b.Sb;a:{var e=r(d.a);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.schemeIdUri==c.schemeIdUri&&f.startTime==c.startTime&&f.endTime==c.endTime){e=f;break a}e=null}null==e&&(d.a.add(c),d.b(c))},onEvent:function(c){return b.dispatchEvent(c)},onError:function(c){return b.Ka(c)}};
447
+ return new I(Promise.resolve().then(function(){return t(function h(){var c;return z(h,function(e){switch(e.j){case 1:return c=b,u(e,b.m.start(d,f),2);case 2:c.c=e.o;b.dispatchEvent(new J("manifestparsed"));if(0==b.c.periods.length)throw new G(2,4,4014);ul(b.c.periods);v(e)}})})}),function(){return b.m.stop()})}
448
+ function el(b){return t(function d(){return z(d,function(d){switch(d.j){case 1:return b.g=new Lc({rb:b.G,onError:function(d){b.Ka(d)},kc:function(d){vl(b,d)},onExpirationUpdated:function(d,e){wl(b,d,e)},onEvent:function(d){b.dispatchEvent(d)}}),b.g.configure(b.b.drm),u(d,Sc(b.g,oi(b.c.periods),b.c.offlineSessionIds),2);case 2:tl(b,b.c.periods),v(d)}})})}
449
+ function fl(b,c,d){return t(function f(){var g,h,k,l,m,n,q,w,x;return z(f,function(f){switch(f.j){case 1:return c.startTime=d.startTime,g=c.u,h=c.uri,b.Bb=h,b.v=new Wk,k=function(){return xl(b)},l=function(){var c=b.a.playbackRate;0!=c&&b.W.set(c)},b.i.w(g,"playing",k),b.i.w(g,"pause",k),b.i.w(g,"ended",k),b.i.w(g,"ratechange",l),m=b.b.abrFactory,b.l&&b.vc==m||(b.vc=m,b.l=new m,b.l.configure(b.b.abr)),yl(b,b.c.periods),b.Ub=new ai(b.b.preferredAudioLanguage,b.b.preferredVariantRole,b.b.preferredAudioChannelCount),
450
+ b.ma=b.b.preferredTextLanguage,zl(b.c.presentationTimeline,b.b.playRangeStart,b.b.playRangeEnd),u(f,b.g.Cb(g),2);case 2:return b.l.init(function(c,d,f){d=void 0===d?!1:d;f=void 0===f?0:f;a:{var g=r(b.c.periods);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.variants.includes(c)){g=h;break a}g=null}Al(b,g,c,!0);b.f&&(bj(b.f,c,d,f),Bl(b))}),b.s=Cl(b,c.startTime),b.gb=Dl(b),b.W=new si({ec:function(){return c.u.playbackRate},ld:function(b){c.u.playbackRate=b},Id:function(b){c.u.currentTime+=b}}),
451
+ n=Math.max(b.c.minBufferTime,b.b.streaming.rebufferingGoal),El(b,n),b.f=Fl(b),b.f.configure(b.b.streaming),Gl(b),b.h=Hl,b.dispatchEvent(new J("streaming")),u(f,b.f.start(),3);case 3:b.b.streaming.startAtSegmentBoundary&&(q=b.s.h(),w=Il(b,q),b.s.m(w)),b.c.periods.forEach(b.Fc.bind(b)),Jl(b),Bl(b),x=Kl(b)||b.c.periods[0],x.variants.some(function(b){return b.primary}),Ll(b,x.variants),b.i.da(g,"loadeddata",function(){b.v.b=Date.now()/1E3-d.od}),v(f)}})})}
452
+ function gl(b,c){return t(function e(){var f,g;return z(e,function(e){switch(e.j){case 1:return f=Cd,b.g=new Lc({rb:b.G,onError:function(c){b.Ka(c)},kc:function(c){vl(b,c)},onExpirationUpdated:function(c,e){wl(b,c,e)},onEvent:function(c){b.dispatchEvent(c)}}),b.g.configure(b.b.drm),g={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,
453
+ presentationTimeOffset:0,mimeType:"video/mp4",codecs:"",encrypted:!0,keyId:null,language:"und",label:null,type:f.Na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},u(e,Sc(b.g,[g],[]),2);case 2:return u(e,b.g.Cb(c.u),0)}})})}
454
+ function hl(b,c,d){function e(){return xl(b)}c.uri=d.uri;c.startTime=d.startTime;b.Bb=c.uri;b.v=new Wk;b.s=new Bi(c.u);null!=c.startTime&&b.s.m(c.startTime);b.W=new si({ec:function(){return c.u.playbackRate},ld:function(b){c.u.playbackRate=b},Id:function(b){c.u.currentTime+=b}});El(b,b.b.streaming.rebufferingGoal);b.i.w(c.u,"playing",e);b.i.w(c.u,"pause",e);b.i.w(c.u,"ended",e);b.i.da(c.u,"loadeddata",function(){b.v.b=Date.now()/1E3-d.od});b.a.audioTracks&&(b.i.w(b.a.audioTracks,"addtrack",function(){return Jl(b)}),
455
+ b.i.w(b.a.audioTracks,"removetrack",function(){return Jl(b)}));if(b.a.textTracks){var f=b.a.textTracks;b.i.w(f,"addtrack",function(){return Jl(b)});b.i.w(f,"removetrack",function(){return Jl(b)})}c.u.src=c.uri;b.h=Ml;b.dispatchEvent(new J("streaming"));var g=new H;b.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?g.resolve():b.a.error?g.reject(ql(b)):(b.i.da(b.a,"loadeddata",function(){g.resolve()}),b.i.da(b.a,"error",function(){g.reject(ql(b))}));return new I(g,function(){g.reject(new G(2,7,7001));
456
+ return Promise.resolve()})}function ul(b){function c(b){return b.video&&b.audio||b.video&&b.video.codecs.includes(",")}b.some(function(b){return b.variants.some(c)})&&b.forEach(function(b){b.variants=b.variants.filter(c)})}
457
+ function Gl(b){function c(b){var c="";b.video&&(c=rc(b.video.codecs)[0]);var d="";b.audio&&(d=rc(b.audio.codecs)[0]);return c+"-"+d}var d=b.c.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=Je(d,b.b.preferredAudioChannelCount);var e=new Hb;d.forEach(function(b){var d=c(b);e.push(d,b)});var f=null,g=Infinity;e.forEach(function(b,c){var d=0,e=0;c.forEach(function(b){d+=b.bandwidth||0;++e});var h=d/e;h<g&&(f=b,g=h)});b.c.periods.forEach(function(b){b.variants=b.variants.filter(function(b){return c(b)==
458
+ f?!0:!1})})}function Zk(b){return new K(function(c,d){b.l&&b.l.segmentDownloaded(c,d)})}function Cl(b,c){return new Ci(b.a,b.c,b.b.streaming,c,function(){b.gb&&ni(b.gb,!0);b.f&&hj(b.f)},function(c){return b.dispatchEvent(c)})}
459
+ function Dl(b){var c=new qi(b.c);ri(c,function(){Jl(b)});var d=new Ki(b.Sb);Oi(d,function(c){sl(b,"timelineregionenter",c)},function(c){sl(b,"timelineregionexit",c)},function(c,d){d||(sl(b,"timelineregionenter",c),sl(b,"timelineregionexit",c))});var e=new mi(b.a);e.a.add(c);e.a.add(d);return e}
460
+ function El(b,c){b.P=new di(c,Math.min(.5,c/2));b.P.a=fi;rl(b);b.Tb=(new D(function(){switch(b.h){case Ml:var c=b.a.ended?!0:ud(b.a.buffered)>=b.a.duration-.1;break;case Hl:a:if(b.a.ended||ie(b.D))c=!0;else{if(b.c.presentationTimeline.V()){var e=b.c.presentationTimeline.nb();if(ud(b.a.buffered)>=e){c=!0;break a}}c=!1}break;default:c=!1}var f=xd(b.a.buffered,b.a.currentTime);e=b.P;var g=c,h=e.b.get(e.a);c=e.a;f=g||f>=h?ei:fi;e.a=f;c!=f&&rl(b)})).La(.25)}
461
+ function Fl(b){return new Pi(b.c,{Sa:function(){return b.s.h()},getBandwidthEstimate:function(){return b.l.getBandwidthEstimate()},I:b.D,rb:b.G,Ld:b.df.bind(b),Kd:b.te.bind(b),onError:b.Ka.bind(b),onEvent:function(c){return b.dispatchEvent(c)},hf:b.jf.bind(b),Zc:b.qf.bind(b)})}X.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=Mk(b,c));var d=Qk(this.b,b,Yk(this));Nl(this);return d};X.prototype.configure=X.prototype.configure;
462
+ function Nl(b){b.m&&b.m.configure(b.b.manifest);b.g&&b.g.configure(b.b.drm);if(b.f){b.f.configure(b.b.streaming);try{b.c.periods.forEach(b.Fc.bind(b))}catch(g){b.Ka(g)}var c=Ti(b.f),d=Vi(b.f),e=Kl(b);c=Me(c,d,e.variants);b.l&&c&&c.allowedByApplication&&c.allowedByKeySystem?Ll(b,e.variants):Ol(b,e)}if(b.D&&(e=b.b.textDisplayFactory,b.xc!=e)){c=new e;d=b.D;var f=d.g;d.g=c;f&&(c.setTextVisibility(f.isTextVisible()),f.destroy());d.a&&(d.a.c=c);b.xc=e;b.f&&(e=b.f,(c=e.b.get("text"))&&aj(e,c.stream,!0,
463
+ 0,!0))}b.l&&(b.l.configure(b.b.abr),b.b.abr.enabled&&!b.ib?b.l.enable():b.l.disable(),Pl(b))}X.prototype.getConfiguration=function(){var b=Yk(this);Qk(b,this.b,Yk(this));return b};X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.If=function(){for(var b in this.b)delete this.b[b];Qk(this.b,Yk(this),Yk(this));Nl(this)};X.prototype.resetConfiguration=X.prototype.If;X.prototype.Je=function(){return this.h};X.prototype.getLoadMode=X.prototype.Je;X.prototype.Ne=function(){return this.a};
464
+ X.prototype.getMediaElement=X.prototype.Ne;X.prototype.Fb=function(){return this.G};X.prototype.getNetworkingEngine=X.prototype.Fb;X.prototype.bc=function(){return this.Bb};X.prototype.getAssetUri=X.prototype.bc;X.prototype.Me=function(){Qe("getManifestUri",'Please use "getAssetUri" instead.');return this.bc()};X.prototype.getManifestUri=X.prototype.Me;X.prototype.V=function(){return this.c?this.c.presentationTimeline.V():this.a&&this.a.src?Infinity==this.a.duration:!1};X.prototype.isLive=X.prototype.V;
465
+ X.prototype.Va=function(){return this.c?this.c.presentationTimeline.Va():!1};X.prototype.isInProgress=X.prototype.Va;X.prototype.af=function(){if(this.c){if(!this.c.periods.length)return!1;var b=this.c.periods[0].variants;return b.length?!b[0].video:!1}return this.a&&this.a.src?this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight:!1};X.prototype.isAudioOnly=X.prototype.af;
466
+ X.prototype.Kf=function(){if(this.c){var b=this.c.presentationTimeline;return{start:b.mb(),end:b.za()}}return this.a&&this.a.src&&(b=this.a.seekable,b.length)?{start:b.start(0),end:b.end(b.length-1)}:{start:0,end:0}};X.prototype.seekRange=X.prototype.Kf;X.prototype.keySystem=function(){return this.g?this.g.keySystem():""};X.prototype.keySystem=X.prototype.keySystem;X.prototype.drmInfo=function(){return this.g?this.g.a:null};X.prototype.drmInfo=X.prototype.drmInfo;
467
+ X.prototype.dc=function(){return this.g?this.g.dc():Infinity};X.prototype.getExpiration=X.prototype.dc;X.prototype.Oc=function(){return this.P?this.P.a==fi:!1};X.prototype.isBuffering=X.prototype.Oc;X.prototype.Qe=function(){if(this.W){var b=this.W;b=b.f?0:b.c}else b=0;return b};X.prototype.getPlaybackRate=X.prototype.Qe;X.prototype.bg=function(b){0==b?$a("A trick play rate of 0 is unsupported!"):(this.a.paused&&this.a.play(),this.W.set(b),this.h==Hl&&$i(this.f,1<Math.abs(b)))};
468
+ X.prototype.trickPlay=X.prototype.bg;X.prototype.ue=function(){this.h==Ml&&this.W.set(1);this.h==Hl&&(this.W.set(1),$i(this.f,!1))};X.prototype.cancelTrickPlay=X.prototype.ue;
469
+ X.prototype.Nc=function(){if(this.c&&this.s){for(var b=Ql(this),c=[],d=r(Rl(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=Ce(e);f.active=e==b;c.push(f)}return c}return this.a&&this.a.audioTracks?Array.from(this.a.audioTracks).map(function(b){var c=Ge(b);c.active=b.enabled;c.type="variant";c.originalAudioId=b.id;"main"==b.kind?(c.primary=!0,c.roles=["main"],c.audioRoles=["main"]):c.audioRoles=[];return c}):[]};X.prototype.getVariantTracks=X.prototype.Nc;
470
+ X.prototype.ob=function(){if(this.c&&this.s){for(var b=Sl(this),c=[],d=r(Tl(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=De(e);f.active=e==b;c.push(f)}return c}return this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).map(function(b){var c=Ge(b);c.active="disabled"!=b.mode;c.type="text";c.originalTextId=b.id;"captions"==b.kind&&(c.mimeType="application/cea-608");return c}):[]};X.prototype.getTextTracks=X.prototype.ob;
471
+ X.prototype.hd=function(b){if(this.c&&this.f){var c=Kl(this),d=c.textStreams.find(function(c){return c.id==b.id});d&&(Ul(this,c,d,!1),Vl(this,d),this.ma=d.language)}else if(this.a&&this.a.src&&this.a.textTracks){c=Array.from(this.a.textTracks);c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,Ee(d)==b.id?d.mode=this.eb?"showing":"hidden":d.mode="disabled";Wl(this)}};X.prototype.selectTextTrack=X.prototype.hd;
472
+ X.prototype.Mf=function(){Qe("selectEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. Please use SelectTextTrack.");var b=this.ob().filter(function(b){return"application/cea-608"==b.mimeType});0<b.length&&this.hd(b[0])};X.prototype.selectEmbeddedTextTrack=X.prototype.Mf;
473
+ X.prototype.gg=function(){Qe("usingEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. There should be no reason to know if the player is playing embedded text.");var b=this.ob().filter(function(b){return b.active})[0];return b?"application/cea-608"==b.mimeType:!1};X.prototype.usingEmbeddedTextTrack=X.prototype.gg;
474
+ X.prototype.Of=function(b,c,d){d=void 0===d?0:d;if(this.c&&this.f){var e=Kl(this);this.b.abr.enabled&&$a("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var f=e.variants.find(function(c){return c.id==b.id});f&&He(f)&&(Al(this,e,f,!1),Xl(this,f,c,d),this.Ub=new $h(f),Ll(this,e.variants))}else if(this.a&&this.a.audioTracks){c=Array.from(this.a.audioTracks);c=r(c);for(d=c.next();!d.done;d=
475
+ c.next())d=d.value,Ee(d)==b.id&&(d.enabled=!0);Yl(this)}};X.prototype.selectVariantTrack=X.prototype.Of;X.prototype.Ee=function(){return Zl(this.Nc())};X.prototype.getAudioLanguagesAndRoles=X.prototype.Ee;X.prototype.Xe=function(){return Zl(this.ob())};X.prototype.getTextLanguagesAndRoles=X.prototype.Xe;X.prototype.De=function(){return Array.from($l(this.Nc()))};X.prototype.getAudioLanguages=X.prototype.De;X.prototype.We=function(){return Array.from($l(this.ob()))};X.prototype.getTextLanguages=X.prototype.We;
476
+ X.prototype.Lf=function(b,c){if(this.c&&this.s){var d=Kl(this);this.Ub=new ai(b,c||"",0);Ol(this,d)}else if(this.a&&this.a.audioTracks){d=Array.from(this.a.audioTracks);d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.language==b&&(e.enabled=!0);Yl(this)}};X.prototype.selectAudioLanguage=X.prototype.Lf;
477
+ X.prototype.Nf=function(b,c){if(this.c&&this.s){var d=Kl(this);this.ma=b;this.cb=c||"";var e=Ke(d.textStreams,this.ma,this.cb)[0]||null;e&&(Ul(this,d,e,!1),(this.b.streaming.alwaysStreamText||this.gc())&&Vl(this,e))}else(d=this.ob().filter(function(c){return c.language==b})[0])&&this.hd(d)};X.prototype.selectTextLanguage=X.prototype.Nf;
478
+ X.prototype.gc=function(){var b=this.eb;return this.c?this.D.g.isTextVisible():this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).some(function(b){return"showing"==b.mode}):b};X.prototype.isTextTrackVisible=X.prototype.gc;
479
+ X.prototype.Rf=function(b){var c=this;return t(function e(){var f,g,h,k,l,m;return z(e,function(e){switch(e.j){case 1:f=c.eb;g=b;if(f==g)return e["return"]();c.eb=g;if(c.h!=Hl){if(c.a&&c.a.src&&c.a.textTracks){h=Array.from(c.a.textTracks);for(var n=r(h),w=n.next();!w.done;w=n.next())k=w.value,"disabled"!=k.mode&&(k.mode=b?"showing":"hidden")}e.A(2);break}c.D.g.setTextVisibility(b);if(c.b.streaming.alwaysStreamText){e.A(2);break}if(!b){n=c.f;n.D=!0;if(w=n.b.get("text"))Qi(w),n.b["delete"]("text");
480
+ e.A(2);break}l=Kl(c);m=Ke(l.textStreams,c.ma,c.cb);if(!(0<m.length)){e.A(2);break}return u(e,Wi(c.f,m[0]),2);case 2:am(c),v(e)}})})};X.prototype.setTextTrackVisibility=X.prototype.Rf;X.prototype.Se=function(){if(!this.V())return null;if(this.c)return new Date(1E3*(this.c.presentationTimeline.f+this.a.currentTime));if(this.a&&this.a.getStartDate){var b=this.a.getStartDate();return isNaN(b.getTime())?null:new Date(b.getTime()+1E3*this.a.currentTime)}return null};X.prototype.getPlayheadTimeAsDate=X.prototype.Se;
481
+ X.prototype.Ue=function(){if(!this.V())return null;if(this.c)return new Date(1E3*this.c.presentationTimeline.f);if(this.a&&this.a.getStartDate){var b=this.a.getStartDate();return isNaN(b.getTime())?null:b}return null};X.prototype.getPresentationStartTimeAsDate=X.prototype.Ue;X.prototype.Jc=function(){var b={total:[],audio:[],video:[],text:[]};this.h==Ml&&(b.total=yd(this.a.buffered));this.h==Hl&&this.D.Jc(b);return b};X.prototype.getBufferedInfo=X.prototype.Jc;
482
+ X.prototype.getStats=function(){if(this.h!=Hl&&this.h!=Ml)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]};xl(this);var b=this.a;if(b.getVideoPlaybackQuality){b=b.getVideoPlaybackQuality();var c=this.v,d=Number(b.totalVideoFrames);c.i=Number(b.droppedVideoFrames);c.h=d}if(this.h==Hl){if(b=Ql(this))this.v.l=b.bandwidth;b&&b.video&&(c=this.v,d=b.video.height||
483
+ NaN,c.m=b.video.width||NaN,c.g=d);b=this.l.getBandwidthEstimate();this.v.f=b}var e=this.v;b=e.m;c=e.g;d=e.l;var f=e.h,g=e.i,h=e.f,k=e.b,l=Tk(e.a,"playing"),m=Tk(e.a,"paused"),n=Tk(e.a,"buffering"),q=Uk(e.a),w=[];e=r(e.c.a);for(var x=e.next();!x.done;x=e.next())x=x.value,w.push({timestamp:x.timestamp,id:x.id,type:x.type,fromAdaptation:x.fromAdaptation,bandwidth:x.bandwidth});return{width:b,height:c,streamBandwidth:d,decodedFrames:f,droppedFrames:g,estimatedBandwidth:h,loadLatency:k,playTime:l,pauseTime:m,
484
+ bufferingTime:n,stateHistory:q,switchHistory:w}};X.prototype.getStats=X.prototype.getStats;
485
+ X.prototype.addTextTrack=function(b,c,d,e,f,g){var h=this;return t(function l(){var m,n,q,w,x,B,C,E,F;return z(l,function(l){switch(l.j){case 1:if(h.h==Ml)throw Error("State error!");if(h.h!=Hl)throw Error("State error!");m=Kl(h);n=Cd;q=h.c.periods.indexOf(m);w=q+1;x=w>=h.c.periods.length?h.c.presentationTimeline.Y():h.c.periods[w].startTime;B=x-m.startTime;if(Infinity==B)throw new G(1,4,4033);C=new S(1,0,B,function(){return[b]},0,null);E={id:h.Hd++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),
486
+ findSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1==b?C:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:e,codecs:f||"",kind:d,encrypted:!1,keyId:null,language:c,label:g||null,type:n.qa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};h.Wb.add(E);m.textStreams.push(E);return u(l,Wi(h.f,E),2);case 2:return(F=Ui(h.f,"text"))&&Th(h.$,m,F),h.Wb["delete"](E),Ol(h,m),Jl(h),l["return"](De(E))}})})};
487
+ X.prototype.addTextTrack=X.prototype.addTextTrack;X.prototype.kd=function(b,c){this.Xb.width=b;this.Xb.height=c};X.prototype.setMaxHardwareResolution=X.prototype.kd;X.prototype.gd=function(){if(this.h==Hl){var b=this.f;if(b.f)b=!1;else if(b.m)b=!1;else{for(var c=r(b.b.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Ib&&(d.Ib=!1,Zi(b,d,.1));b=!0}}else b=!1;return b};X.prototype.retryStreaming=X.prototype.gd;X.prototype.Ke=function(){return this.c};X.prototype.getManifest=X.prototype.Ke;
488
+ X.prototype.Le=function(){return this.m?this.m.constructor:null};X.prototype.getManifestParserFactory=X.prototype.Le;function Al(b,c,d,e){Uh(b.$,c).variant=d;b=b.v.c;b.c!=d&&(b.c=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"variant",fromAdaptation:e,bandwidth:d.bandwidth}))}function Ul(b,c,d,e){Th(b.$,c,d);b=b.v.c;b.b!=d&&(b.b=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"text",fromAdaptation:e,bandwidth:null}))}
489
+ function Yk(b){var c=Ok();c.streaming.failureCallback=function(c){var d=[1001,1002,1003];b.V()&&d.includes(c.code)&&(c.severity=1,b.gd())};c.textDisplayFactory=function(){return new Ik(b.a)};return c}
490
+ function yl(b,c){for(var d=0;d<c.length;d++){for(var e=c[d],f=new Map,g=r(e.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.video&&h.video.closedCaptions){h=h.video;for(var k=r(h.closedCaptions.keys()),l=k.next();!l.done;l=k.next())if(l=l.value,!f.has(l)){var m={id:b.Hd++,originalId:l,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"application/cea-608",
476
491
  codecs:"",kind:"caption",encrypted:!1,keyId:null,language:h.closedCaptions.get(l),label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:h.roles,channelsCount:null,closedCaptions:null};f.set(l,m)}}f=r(f.values());for(g=f.next();!g.done;g=f.next())e.textStreams.push(g.value)}}
477
- function gl(b,c){var d=b.f?Hi(b.f):null,e=b.f?Ji(b.f):null;c.forEach(ue.bind(null,b.h,d,e));d=Lb(c,function(b){return b.variants.some(Be)});if(0==d)throw new D(2,4,4032);if(d<c.length)throw new D(2,4,4011);c.forEach(function(b){te(b.variants,this.b.restrictions,this.Ub)&&this.f&&xl(this)==b&&wl(this);Ol(this,b.variants)}.bind(b))}p=X.prototype;
478
- p.Bc=function(b){var c=this.f?Hi(this.f):null,d=this.f?Ji(this.f):null;ue(this.h,c,d,b);c=b.variants;if(!c.some(Be))throw new D(2,4,4011);Ol(this,b.variants);te(c,this.b.restrictions,this.Ub)&&this.f&&xl(this)==b&&wl(this);if(b=this.h?this.h.a:null)for(c=r(c),d=c.next();!d.done;d=c.next()){d=r(d.value.drmInfos);for(var e=d.next();!e.done;e=d.next())if(e=e.value,e.keySystem==b.keySystem){e=r(e.initData||[]);for(var f=e.next();!f.done;f=e.next())f=f.value,Xc(this.h,f.initDataType,f.initData)}}};
479
- function Jl(b,c,d,e){d=void 0===d?!1:d;e=void 0===e?0:e;b.eb?(b.ka=c,b.Ad=d,b.yd=e):(Qi(b.f,c,d,e),Kl(b))}function Hl(b,c){b.eb?b.ja=c:(Pi(b.f,c,!0,0,!1),Il(b))}function vl(b,c){function d(b,c){if(!b)return null;var d=b.findSegmentPosition(c-g.startTime);return null==d?null:(d=b.getSegmentReference(d))?d.startTime+g.startTime:null}var e=Hi(b.f),f=Ji(b.f),g=xl(b);e=d(e,c);f=d(f,c);return null!=f&&null!=e?Math.max(f,e):null!=f?f:null!=e?e:c}
480
- function el(b){var c=b.Jc();if(b.v&&b.V&&b.o){var d=b.K;d.g=c;hi(d);kl(b)}b.dispatchEvent(new I("buffering",{buffering:c}))}function kl(b){if(b.v&&b.V){var c=b.v.a;b.V.a==Uh?Ek(c,"buffering"):b.a.paused?Ek(c,"paused"):b.a.ended?Ek(c,"ended"):Ek(c,"playing")}}function yl(b,c){try{Ol(b,c)}catch(e){return b.Ha(e),null}var d=c.filter(function(b){return Be(b)});d=b.Rb.create(d);b.j.setVariants(Array.from(d.values()));return b.j.chooseVariant()}
481
- function Bl(b,c){var d=yl(b,c.variants);d&&(nl(b,c,d,!0),Jl(b,d,!0));(d=Ee(c.textStreams,b.Ka,b.yb)[0]||null)&&(b.b.streaming.alwaysStreamText||b.Mc())&&(Hh(b.F,c,d),Ik(b.v.b,d,!0),Hl(b,d));ol(b)}
482
- p.$e=function(b){try{this.eb=!0;this.j.disable();Cl(this);var c=yl(this,b.variants),d=Ee(b.textStreams,this.Ka,this.yb)[0]||null;this.ka&&(b.variants.includes(this.ka)&&(c=this.ka),this.ka=null);this.ja&&(b.textStreams.includes(this.ja)&&(d=this.ja),this.ja=null);c&&nl(this,b,c,!0);if(d){var e=d;Hh(this.F,b,e);Ik(this.v.b,e,!0)}var f=this.f,g=f.b.get("video");if(g)var h=f.c.periods[g.ya];else{var k=f.b.get("audio");h=k?f.c.periods[k.ya]:null}var l=c?c.audio:null;if(!h&&d){var m;if(m=l){b=d;var n=
483
- M(this.b.preferredTextLanguage),q=M(l.language),x=M(b.language);m=ne(x,n)&&!ne(q,x)}m&&(this.$a=!0);this.$a&&this.C.h.setTextVisibility(!0);Nl(this)}return this.b.streaming.alwaysStreamText||this.Mc()?{variant:c,text:d}:{variant:c,text:null}}catch(w){return this.Ha(w),{variant:null,text:null}}};p.qe=function(){this.eb=!1;this.b.abr.enabled&&(this.j.enable(),Cl(this));this.ka&&(Qi(this.f,this.ka,this.Ad,this.yd),Kl(this),this.ka=null);this.ja&&(Pi(this.f,this.ja,!0,0,!1),Il(this),this.ja=null)};
484
- p.ef=function(){this.m&&this.m.update&&this.m.update()};p.lf=function(){this.o&&this.o.v()};function ol(b){Pl(b,new I("adaptation"))}function wl(b){Pl(b,new I("trackschanged"))}function Kl(b){Pl(b,new I("variantchanged"))}function Il(b){Pl(b,new I("textchanged"))}function Nl(b){Pl(b,new I("texttrackvisibility"))}function Cl(b){Pl(b,new I("abrstatuschanged",{rg:b.b.abr.enabled}))}p.Ha=function(b){if(this.g!=Xk){var c=new I("error",{detail:b});this.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}};
485
- function fl(b,c,d){b.dispatchEvent(new I(c,{detail:{schemeIdUri:d.schemeIdUri,value:d.value,startTime:d.startTime,endTime:d.endTime,id:d.id,eventElement:d.eventElement}}))}function dl(b){if(!b.a.error)return null;var c=b.a.error.code;if(1==c)return null;var d=b.a.error.msExtendedCode;d&&(0>d&&(d+=Math.pow(2,32)),d=d.toString(16));return new D(2,3,3016,c,d,b.a.error.message)}
486
- function il(b,c){if(b.f){var d=xl(b),e=!1,f=Object.keys(c),g=1==f.length&&"00"==f[0];f.length&&d.variants.forEach(function(b){He(b).forEach(function(d){var f=b.allowedByKeySystem;d.keyId&&(d=c[g?"00":d.keyId],b.allowedByKeySystem=!!d&&!Zk.includes(d));f!=b.allowedByKeySystem&&(e=!0)})});f=Hi(b.f);var h=Ji(b.f);(f=Ge(f,h,d.variants))&&!f.allowedByKeySystem&&Bl(b,d);e&&(wl(b),yl(b,d.variants))}}
487
- function jl(b,c,d){if(b.m&&b.m.onExpirationUpdated)b.m.onExpirationUpdated(c,d);b.dispatchEvent(new I("expirationupdated"))}function ml(b,c,d){0<c&&(b.U()||b.ae(c));d<b.Y()&&(b.U()||b.ta(d))}
488
- function Ol(b,c){var d=b.h?hc(b.h.S):{},e=Object.keys(d);e=e.length&&"00"==e[0];for(var f=!1,g=!1,h=[],k=[],l=r(c),m=l.next();!m.done;m=l.next()){m=m.value;var n=[];m.audio&&n.push(m.audio);m.video&&n.push(m.video);n=r(n);for(var q=n.next();!q.done;q=n.next())if(q=q.value,q.keyId){var x=d[e?"00":q.keyId];x?Zk.includes(x)&&(k.includes(x)||k.push(x)):h.includes(q.keyId)||h.push(q.keyId)}m.allowedByApplication?m.allowedByKeySystem&&(f=!0):g=!0}if(!f)throw new D(2,4,4012,{hasAppRestrictions:g,missingKeys:h,
489
- restrictedKeyStatuses:k});}function Pl(b,c){t(function e(){return y(e,function(e){switch(e.l){case 1:return u(e,Promise.resolve(),2);case 2:b.g!=Xk&&b.dispatchEvent(c),v(e)}})})}function Ml(b){var c=new Set;b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.language?c.add(M(d.language)):c.add("und");return c}
490
- function Ll(b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d="und";var f=[];e.language&&(d=M(e.language));"variant"==e.type?f=e.audioRoles:f=e.roles;f&&f.length||(f=[""]);c.has(d)||c.set(d,new Set);e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,c.get(d).add(f)}var g=[];c.forEach(function(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())g.push({language:c,role:e.value})});return g}
491
- function El(b){b=xl(b);return null==b?[]:b.variants.filter(function(b){return Be(b)})}function Gl(b){var c=xl(b);return null==c?[]:c.textStreams.filter(function(c){return!b.Tb.has(c)})}function xl(b){var c=b.o.i(),d=null;b=r(b.c.periods);for(var e=b.next();!e.done;e=b.next())e=e.value,e.startTime<=c&&(d=e);return d}function Dl(b){var c=xl(b);return Ih(b.F,c).variant}
492
- function Fl(b){var c=xl(b);if(null==c)return null;if(!Ih(b.F,c).text){var d=Ee(c.textStreams,b.Ka,b.yb);d.length&&Hh(b.F,c,d[0])}return Ih(b.F,c).text}function al(){return new D(2,7,7E3)}function Wk(b,c,d,e,f,g){return e==b&&f.u==g.u&&f.uri==g.uri&&f.mimeType==g.mimeType&&f.va==g.va?c:d}function qk(){return{va:null,u:null,mimeType:null,startTime:null,jd:null,uri:null}}
493
- function bl(b){return new Promise(function(c,d){b.Ua=function(){return d(al())};b.fc=function(){return c()};b.onError=function(b){return d(b)};b.hc=function(){return d(al())}})}var Xk=0,Kk=1,ul=2,zl=3;X.LoadMode={DESTROYED:Xk,NOT_LOADED:Kk,MEDIA_SOURCE:ul,SRC_EQUALS:zl};function Ql(b,c,d){var e=void 0==c.expiration?Infinity:c.expiration,f=c.presentationTimeline.Y();c=Rl(c.periods[0]);return{offlineUri:null,originalManifestUri:b,duration:f,size:0,expiration:e,tracks:c,appMetadata:d}}function Sl(b,c){var d=fk(new dk(b.ra(),b.$()),c.periods[0],new W(null,0)),e=c.appMetadata||{};d=Rl(d);return{offlineUri:b.toString(),originalManifestUri:c.originalManifestUri,duration:c.duration,size:c.size,expiration:c.expiration,tracks:d,appMetadata:e}}
494
- function Rl(b){var c=[],d=Ce(b.variants);d=r(d);for(var e=d.next();!e.done;e=d.next())c.push(we(e.value));b=r(b.textStreams);for(d=b.next();!d.done;d=b.next())c.push(xe(d.value));return c};function Tl(){this.a={}}function Ul(b,c,d){d=d.endTime-d.startTime;return Vl(b,c)*d}function Vl(b,c){var d=b.a[c];null==d&&(d=0);return d};function Wl(b){this.a=!1;this.b=new G;this.c=b}Wl.prototype.destroy=function(){var b=this;if(this.a)return this.b;this.a=!0;return this.c().then(function(){b.b.resolve()},function(){b.b.resolve()})};function Xl(b,c){for(var d={width:Infinity,height:Infinity},e=r(b.periods),f=e.next();!f.done;f=e.next())f=f.value,f.variants=f.variants.filter(function(b){return se(b,c,d)})}function Yl(b){b=r(b.periods);for(var c=b.next();!c.done;c=b.next())c=c.value,c.variants=c.variants.filter(function(b){var c=!0;b.audio&&(c=c&&be(b.audio));b.video&&(c=c&&be(b.video));return c})}
495
- function Zl(b,c){for(var d=r(b.periods),e=d.next();!e.done;e=d.next())e=e.value,e.variants=e.variants.filter(function(b){return kd(c,b)})}function $l(b){var c=new am;b.periods.forEach(function(b,d){var e=bm(b.variants);if(0==d){e=r(e.a);for(var f=e.next();!f.done;f=e.next())c.add(f.value)}else cm(c,e)});b=r(b.periods);for(var d=b.next();!d.done;d=b.next())d=d.value,d.variants=d.variants.filter(function(b){return dm(c,new em(b))})}
496
- function fm(b,c){var d=new am;b.periods.forEach(function(b,f){0<f&&(b.variants=b.variants.filter(function(b){return dm(d,new em(b))}));c(b);d=bm(b.variants)})}function em(b){var c=b.audio;b=b.video;this.b=c?c.mimeType:null;this.a=c?c.codecs.split(".")[0]:null;this.f=b?b.mimeType:null;this.c=b?b.codecs.split(".")[0]:null}function am(){this.a=[]}am.prototype.add=function(b){dm(this,b)||this.a.push(b)};function cm(b,c){b.a=b.a.filter(function(b){return dm(c,b)})}
497
- function dm(b,c){return b.a.some(function(b){return c.b==b.b&&c.a==b.a&&c.f==b.f&&c.c==b.c})}function bm(b){var c=new am;b=r(b);for(var d=b.next();!d.done;d=b.next())c.add(new em(d.value));return c};function Z(b){var c=this;if(b&&b.constructor!=X)throw new D(2,9,9008);this.b=this.a=null;b?(this.a=b.b,this.b=b.Bb()):(this.a=Ak(),this.b=new K);this.f=!1;this.c=[];this.g=[];var d=!b;this.h=new Wl(function(){return t(function f(){var b;return y(f,function(f){switch(f.l){case 1:return b=function(){},u(f,Promise.all(c.g.map(function(c){return c.then(b,b)})),2);case 2:if(!d){f.A(3);break}return u(f,c.b.destroy(),3);case 3:c.a=null,c.b=null,v(f)}})})})}z("shaka.offline.Storage",Z);
498
- function gm(){if(mc())a:{var b=r(Dj.values());for(var c=b.next();!c.done;c=b.next())if(c=c.value,c=c()){c.destroy();b=!0;break a}b=!1}else b=!1;return b}Z.support=gm;Z.prototype.destroy=function(){return this.h.destroy()};Z.prototype.destroy=Z.prototype.destroy;
499
- Z.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=zk(b,c));var d=b,e=!1;null!=d.trackSelectionCallback&&(e=!0,d.offline=d.offline||{},d.offline.trackSelectionCallback=d.trackSelectionCallback,delete d.trackSelectionCallback);null!=d.progressCallback&&(e=!0,d.offline=d.offline||{},d.offline.progressCallback=d.progressCallback,delete d.progressCallback);null!=d.usePersistentLicense&&(e=!0,d.offline=d.offline||{},d.offline.usePersistentLicense=d.usePersistentLicense,delete d.usePersistentLicense);
500
- e&&Ke("Storage.configure with OfflineConfig","Please configure storage with a player configuration.");return Ck(this.a,b)};Z.prototype.configure=Z.prototype.configure;Z.prototype.getConfiguration=function(){var b=Ak();Ck(b,this.a,Ak());return b};Z.prototype.getConfiguration=Z.prototype.getConfiguration;Z.prototype.Bb=function(){return this.b};Z.prototype.getNetworkingEngine=Z.prototype.Bb;
501
- Z.prototype.store=function(b,c,d){var e=this;return hm(this,im(this,b,c||{},function(){return t(function g(){var c,k;return y(g,function(g){switch(g.l){case 1:return d&&"string"!=typeof d?(Ke("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),c=d,g["return"](new c)):u(g,U.create(b,e.b,e.a.manifest.retryParameters,d),2);case 2:return k=g.s,g["return"](k)}})})}))};Z.prototype.store=Z.prototype.store;Z.prototype.Re=function(){return this.f};
502
- Z.prototype.getStoreInProgress=Z.prototype.Re;
503
- function im(b,c,d,e){return t(function g(){var h,k,l,m,n,q,x,w,A,C;return y(g,function(g){switch(g.l){case 1:jm();if(b.f)return g["return"](Promise.reject(new D(2,9,9006)));b.f=!0;return u(g,km(b,c,e),2);case 2:h=g.s;lm(b);k=!h.presentationTimeline.U()&&!h.presentationTimeline.Ta();if(!k)throw new D(2,9,9005,c);l=null;m=new Cj;q=n=null;ya(g,3,4);return u(g,mm(b,h,function(b){q=q||b}),6);case 6:l=g.s;lm(b);if(q)throw q;nm(b,h,l);return u(g,m.init(),7);case 7:return lm(b),u(g,Ej(m),8);case 8:return n=
504
- g.s,lm(b),u(g,om(b,n.$,l,h,c,d),9);case 9:x=g.s;lm(b);if(q)throw q;return u(g,n.$.addManifests([x]),10);case 10:return w=g.s,lm(b),A=new bk("manifest",n.path.ra,n.path.$,w[0]),g["return"](Sl(A,x));case 4:return Ea(g),b.f=!1,b.c=[],u(g,m.destroy(),11);case 11:if(!l){g.A(12);break}return u(g,l.destroy(),12);case 12:Fa(g,0);break;case 3:C=Da(g);if(!n){g.A(14);break}return u(g,n.$.removeSegments(b.c,function(){}),14);case 14:throw q||C;}})})}
505
- function nm(b,c,d){Xl(c,b.a.restrictions);Yl(c);Zl(c,d);$l(c);fm(c,function(c){for(var d=[],e=r(c.variants),h=e.next();!h.done;h=e.next())d.push(we(h.value));e=r(c.textStreams);for(h=e.next();!h.done;h=e.next())d.push(xe(h.value));d=b.a.offline.trackSelectionCallback(d);var k=new Set,l=new Set;d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,"variant"==e.type&&k.add(e.id),"text"==e.type&&l.add(e.id);c.variants=c.variants.filter(function(b){return k.has(b.id)});c.textStreams=c.textStreams.filter(function(b){return l.has(b.id)})});
506
- pm(c)}function om(b,c,d,e,f,g){return t(function k(){var l,m,n,q;return y(k,function(k){switch(k.l){case 1:return l=Ql(f,e,g),m=new rj(b.b,function(c,d){l.size=d;b.a.offline.progressCallback(l,c)}),za(k,2),q=n=qm(b,m,c,d,e,f,g),u(k,uj(m),4);case 4:return q.size=k.s,k["return"](n);case 2:return Ea(k),u(k,m.destroy(),5);case 5:Fa(k,0)}})})}Z.prototype.remove=function(b){return hm(this,rm(this,b))};Z.prototype.remove=Z.prototype.remove;
507
- function rm(b,c){return t(function e(){var f,g,h,k,l,m;return y(e,function(e){switch(e.l){case 1:jm();f=ck(c);if(null==f||"manifest"!=f.a)return e["return"](Promise.reject(new D(2,9,9004,c)));g=f;h=new Cj;za(e,2);return u(e,h.init(),4);case 4:return u(e,Gj(h,g.ra(),g.$()),5);case 5:return k=e.s,u(e,k.getManifests([g.key()]),6);case 6:return l=e.s,m=l[0],u(e,Promise.all([sm(b,m,h),tm(b,k,g,m)]),2);case 2:return Ea(e),u(e,h.destroy(),8);case 8:Fa(e,0)}})})}
508
- function um(b,c){for(var d=[],e=r(b.periods),f=e.next();!f.done;f=e.next()){f=r(f.value.streams);for(var g=f.next();!g.done;g=f.next())g=g.value,c&&"video"==g.contentType?d.push({contentType:ic(g.mimeType,g.codecs),robustness:b.drmInfo.videoRobustness}):c||"audio"!=g.contentType||d.push({contentType:ic(g.mimeType,g.codecs),robustness:b.drmInfo.audioRobustness})}return d}function sm(b,c,d){return t(function f(){return y(f,function(f){switch(f.l){case 1:return u(f,vm(b.b,b.a.drm,d,c),0)}})})}
509
- function tm(b,c,d,e){function f(){k+=1;b.a.offline.progressCallback(l,k/h)}var g=wm(e),h=g.length+1,k=0,l=Sl(d,e);return Promise.all([c.removeSegments(g,f),c.removeManifests([d.key()],f)])}Z.prototype.Bf=function(){return hm(this,xm(this))};Z.prototype.removeEmeSessions=Z.prototype.Bf;
510
- function xm(b){return t(function d(){var e,f,g,h,k,l,m,n,q;return y(d,function(d){switch(d.l){case 1:return jm(),e=b.b,f=b.a.drm,g=new Cj,h=!1,za(d,2),u(d,g.init(),4);case 4:k=[];Hj(g,function(b){return k.push(b)});l=Promise.resolve();m={};n=r(k);for(q=n.next();!q.done;m={mc:m.mc},q=n.next())m.mc=q.value,l=l.then(function(b){return function(){return t(function C(){var d,g;return y(C,function(k){switch(k.l){case 1:return u(k,b.mc.getAll(),2);case 2:return d=k.s,u(k,mk(f,e,d),3);case 3:return g=k.s,
511
- u(k,b.mc.remove(g),4);case 4:g.length!=d.length&&(h=!0),v(k)}})})}}(m));return u(d,l,2);case 2:return Ea(d),u(d,g.destroy(),6);case 6:Fa(d,3);break;case 3:return d["return"](!h)}})})}Z.prototype.list=function(){return hm(this,ym())};Z.prototype.list=Z.prototype.list;
512
- function ym(){return t(function c(){var d,e,f;return y(c,function(c){switch(c.l){case 1:return jm(),d=[],e=new Cj,za(c,2),u(c,e.init(),4);case 4:return f=Promise.resolve(),Fj(e,function(c,e){f=f.then(function(){return t(function m(){var f;return y(m,function(g){switch(g.l){case 1:return u(g,e.getAllManifests(),2);case 2:f=g.s,f.forEach(function(e,f){var g=Sl(new bk("manifest",c.ra,c.$,f),e);d.push(g)}),v(g)}})})})}),u(c,f,2);case 2:return Ea(c),u(c,e.destroy(),6);case 6:Fa(c,3);break;case 3:return c["return"](d)}})})}
513
- function km(b,c,d){return t(function f(){var g,h,k,l,m,n;return y(f,function(f){switch(f.l){case 1:return g=null,h=b.b,k={networkingEngine:h,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(b){g=b}},u(f,d(),2);case 2:return l=f.s,l.configure(b.a.manifest),lm(b),za(f,3),u(f,l.start(c,k),5);case 5:return m=f.s,lm(b),n=zm(m),u(f,Promise.all(Array.from(n).map(function(b){return b.createSegmentIndex()})),6);case 6:lm(b);
514
- if(g)throw g;return f["return"](m);case 3:return Ea(f),u(f,l.stop(),7);case 7:Fa(f,0)}})})}function mm(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.l){case 1:return g=new Gc({nb:b.b,onError:d,gc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),h=ci(c.periods),k=b.a,g.configure(k.drm),u(f,Lc(g,h,k.offline.usePersistentLicense),2);case 2:return u(f,Vc(g),3);case 3:return u(f,Wc(g),4);case 4:return f["return"](g)}})})}
515
- function qm(b,c,d,e,f,g,h){var k=new Tl,l=f.periods.map(function(e){return Am(b,c,d,k,f,e)}),m=e.a,n=bd(e);if(m&&b.a.offline.usePersistentLicense){if(!n.length)throw new D(2,9,9007,g);m.initData=[]}return{originalManifestUri:g,duration:f.presentationTimeline.Y(),size:0,expiration:e.bc(),periods:l,sessionIds:b.a.offline.usePersistentLicense?n:[],drmInfo:m,appMetadata:h}}
516
- function Am(b,c,d,e,f,g){f.periods.forEach(function(b){b.variants.forEach(function(b){var c=b.audio,d=b.video;c&&!d&&(e.a[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(e.a[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var f=c.bandwidth||393216,g=d.bandwidth||b.bandwidth-f;0>=g&&(g=b.bandwidth);e.a[c.id]=f;e.a[d.id]=g}});b.textStreams.forEach(function(b){e.a[b.id]=52})});var h=zm(f),k=new Map;h=r(h);for(var l=h.next();!l.done;l=h.next()){l=l.value;var m=Bm(b,c,d,e,f,l);k.set(l.id,m)}g.variants.forEach(function(b){b.audio&&
492
+ function tl(b,c){var d=b.f?Ti(b.f):null,e=b.f?Vi(b.f):null;c.forEach(Ae.bind(null,b.g,d,e));d=Mb(c,function(b){return b.variants.some(He)});if(0==d)throw new G(2,4,4032);if(d<c.length)throw new G(2,4,4011);c.forEach(function(b){ze(b.variants,this.b.restrictions,this.Xb)&&this.f&&Kl(this)==b&&Jl(this);bm(this,b.variants)}.bind(b))}p=X.prototype;
493
+ p.Fc=function(b){var c=this.f?Ti(this.f):null,d=this.f?Vi(this.f):null;Ae(this.g,c,d,b);c=b.variants;if(!c.some(He))throw new G(2,4,4011);bm(this,b.variants);ze(c,this.b.restrictions,this.Xb)&&this.f&&Kl(this)==b&&Jl(this);if(b=this.g?this.g.a:null)for(c=r(c),d=c.next();!d.done;d=c.next()){d=r(d.value.drmInfos);for(var e=d.next();!e.done;e=d.next())if(e=e.value,e.keySystem==b.keySystem){e=r(e.initData||[]);for(var f=e.next();!f.done;f=e.next())f=f.value,bd(this.g,f.initDataType,f.initData)}}};
494
+ function Xl(b,c,d,e){d=void 0===d?!1:d;e=void 0===e?0:e;b.ib?(b.Ea=c,b.Dd=d,b.Bd=e):(bj(b.f,c,d,e),Yl(b))}function Vl(b,c){b.ib?b.na=c:(aj(b.f,c,!0,0,!1),Wl(b))}function Il(b,c){function d(b,c){if(!b)return null;var d=b.findSegmentPosition(c-g.startTime);return null==d?null:(d=b.getSegmentReference(d))?d.startTime+g.startTime:null}var e=Ti(b.f),f=Vi(b.f),g=Kl(b);e=d(e,c);f=d(f,c);return null!=f&&null!=e?Math.max(f,e):null!=f?f:null!=e?e:c}
495
+ function rl(b){var c=b.Oc();if(b.v&&b.P&&b.s){var d=b.W;d.f=c;ti(d);xl(b)}b.dispatchEvent(new J("buffering",{buffering:c}))}function xl(b){if(b.v&&b.P){var c=b.v.a;b.P.a==fi?Sk(c,"buffering"):b.a.paused?Sk(c,"paused"):b.a.ended?Sk(c,"ended"):Sk(c,"playing")}}function Ll(b,c){try{bm(b,c)}catch(e){return b.Ka(e),null}var d=c.filter(function(b){return He(b)});d=b.Ub.create(d);b.l.setVariants(Array.from(d.values()));return b.l.chooseVariant()}
496
+ function Ol(b,c){var d=Ll(b,c.variants);d&&(Al(b,c,d,!0),Xl(b,d,!0));(d=Ke(c.textStreams,b.ma,b.cb)[0]||null)&&(b.b.streaming.alwaysStreamText||b.gc())&&(Ul(b,c,d,!0),Vl(b,d));Bl(b)}
497
+ p.df=function(b){try{this.ib=!0;this.l.disable();Pl(this);var c=Ll(this,b.variants),d=Ke(b.textStreams,this.ma,this.cb)[0]||null;this.Ea&&(b.variants.includes(this.Ea)&&(c=this.Ea),this.Ea=null);this.na&&(b.textStreams.includes(this.na)&&(d=this.na),this.na=null);c&&Al(this,b,c,!0);d&&Ul(this,b,d,!0);var e=this.f,f=e.b.get("video");if(f)var g=e.c.periods[f.pa];else{var h=e.b.get("audio");g=h?e.c.periods[h.pa]:null}var k=c?c.audio:null;if(!g&&d){var l;if(l=k){b=d;var m=M(this.b.preferredTextLanguage),
498
+ n=M(k.language),q=M(b.language);l=te(q,m)&&!te(n,q)}l&&(this.eb=!0);this.eb&&this.D.g.setTextVisibility(!0);am(this)}return this.b.streaming.alwaysStreamText||this.gc()?{variant:c,text:d}:{variant:c,text:null}}catch(w){return this.Ka(w),{variant:null,text:null}}};p.te=function(){this.ib=!1;this.b.abr.enabled&&(this.l.enable(),Pl(this));this.Ea&&(bj(this.f,this.Ea,this.Dd,this.Bd),Yl(this),this.Ea=null);this.na&&(aj(this.f,this.na,!0,0,!1),Wl(this),this.na=null)};
499
+ p.jf=function(){this.m&&this.m.update&&this.m.update()};p.qf=function(){this.s&&this.s.s()};function Bl(b){cm(b,new J("adaptation"))}function Jl(b){cm(b,new J("trackschanged"))}function Yl(b){cm(b,new J("variantchanged"))}function Wl(b){cm(b,new J("textchanged"))}function am(b){cm(b,new J("texttrackvisibility"))}function Pl(b){cm(b,new J("abrstatuschanged",{rg:b.b.abr.enabled}))}p.Ka=function(b){if(this.h!=jl){var c=new J("error",{detail:b});this.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}};
500
+ function sl(b,c,d){b.dispatchEvent(new J(c,{detail:{schemeIdUri:d.schemeIdUri,value:d.value,startTime:d.startTime,endTime:d.endTime,id:d.id,eventElement:d.eventElement}}))}function ql(b){if(!b.a.error)return null;var c=b.a.error.code;if(1==c)return null;var d=b.a.error.msExtendedCode;d&&(0>d&&(d+=Math.pow(2,32)),d=d.toString(16));return new G(2,3,3016,c,d,b.a.error.message)}
501
+ function vl(b,c){if(b.f){var d=Kl(b),e=!1,f=Object.keys(c),g=1==f.length&&"00"==f[0];f.length&&d.variants.forEach(function(b){Ne(b).forEach(function(d){var f=b.allowedByKeySystem;d.keyId&&(d=c[g?"00":d.keyId],b.allowedByKeySystem=!!d&&!ll.includes(d));f!=b.allowedByKeySystem&&(e=!0)})});f=Ti(b.f);var h=Vi(b.f);(f=Me(f,h,d.variants))&&!f.allowedByKeySystem&&Ol(b,d);e&&(Jl(b),Ll(b,d.variants))}}
502
+ function wl(b,c,d){if(b.m&&b.m.onExpirationUpdated)b.m.onExpirationUpdated(c,d);b.dispatchEvent(new J("expirationupdated"))}function zl(b,c,d){0<c&&(b.V()||b.de(c));d<b.Y()&&(b.V()||b.wa(d))}
503
+ function bm(b,c){var d=b.g?nc(b.g.T):{},e=Object.keys(d);e=e.length&&"00"==e[0];for(var f=!1,g=!1,h=[],k=[],l=r(c),m=l.next();!m.done;m=l.next()){m=m.value;var n=[];m.audio&&n.push(m.audio);m.video&&n.push(m.video);n=r(n);for(var q=n.next();!q.done;q=n.next())if(q=q.value,q.keyId){var w=d[e?"00":q.keyId];w?ll.includes(w)&&(k.includes(w)||k.push(w)):h.includes(q.keyId)||h.push(q.keyId)}m.allowedByApplication?m.allowedByKeySystem&&(f=!0):g=!0}if(!f)throw new G(2,4,4012,{hasAppRestrictions:g,missingKeys:h,
504
+ restrictedKeyStatuses:k});}function cm(b,c){t(function e(){return z(e,function(e){switch(e.j){case 1:return u(e,Promise.resolve(),2);case 2:b.h!=jl&&b.dispatchEvent(c),v(e)}})})}function $l(b){var c=new Set;b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.language?c.add(M(d.language)):c.add("und");return c}
505
+ function Zl(b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d="und";var f=[];e.language&&(d=M(e.language));"variant"==e.type?f=e.audioRoles:f=e.roles;f&&f.length||(f=[""]);c.has(d)||c.set(d,new Set);e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,c.get(d).add(f)}var g=[];c.forEach(function(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())g.push({language:c,role:e.value})});return g}
506
+ function Rl(b){b=Kl(b);return null==b?[]:b.variants.filter(function(b){return He(b)})}function Tl(b){var c=Kl(b);return null==c?[]:c.textStreams.filter(function(c){return!b.Wb.has(c)})}function Kl(b){var c=b.s.h(),d=null;b=r(b.c.periods);for(var e=b.next();!e.done;e=b.next())e=e.value,e.startTime<=c&&(d=e);return d}function Ql(b){var c=Kl(b);return Uh(b.$,c).variant}
507
+ function Sl(b){var c=Kl(b);if(null==c)return null;if(!Uh(b.$,c).text){var d=Ke(c.textStreams,b.ma,b.cb);d.length&&Th(b.$,c,d[0])}return Uh(b.$,c).text}function nl(){return new G(2,7,7E3)}function il(b,c,d,e,f,g){return e==b&&f.u==g.u&&f.uri==g.uri&&f.mimeType==g.mimeType&&f.ya==g.ya?c:d}function Dk(){return{ya:null,u:null,mimeType:null,startTime:null,od:null,uri:null}}
508
+ function ol(b){return new Promise(function(c,d){b.Wa=function(){return d(nl())};b.jc=function(){return c()};b.onError=function(b){return d(b)};b.lc=function(){return d(nl())}})}var jl=0,Xk=1,Hl=2,Ml=3;X.LoadMode={DESTROYED:jl,NOT_LOADED:Xk,MEDIA_SOURCE:Hl,SRC_EQUALS:Ml};function dm(b,c,d){var e=void 0==c.expiration?Infinity:c.expiration,f=c.presentationTimeline.Y();c=em(c.periods[0]);return{offlineUri:null,originalManifestUri:b,duration:f,size:0,expiration:e,tracks:c,appMetadata:d}}function fm(b,c){var d=sk(new qk(b.ua(),b.aa()),c.periods[0],new W(null,0)),e=c.appMetadata||{};d=em(d);return{offlineUri:b.toString(),originalManifestUri:c.originalManifestUri,duration:c.duration,size:c.size,expiration:c.expiration,tracks:d,appMetadata:e}}
509
+ function em(b){var c=[],d=Ie(b.variants);d=r(d);for(var e=d.next();!e.done;e=d.next())c.push(Ce(e.value));b=r(b.textStreams);for(d=b.next();!d.done;d=b.next())c.push(De(d.value));return c};function gm(){this.a={}}function hm(b,c,d){d=d.endTime-d.startTime;return im(b,c)*d}function im(b,c){var d=b.a[c];null==d&&(d=0);return d};function jm(b){this.a=!1;this.b=new H;this.c=b}jm.prototype.destroy=function(){var b=this;if(this.a)return this.b;this.a=!0;return this.c().then(function(){b.b.resolve()},function(){b.b.resolve()})};function km(b,c){for(var d={width:Infinity,height:Infinity},e=r(b.periods),f=e.next();!f.done;f=e.next())f=f.value,f.variants=f.variants.filter(function(b){return ye(b,c,d)})}function lm(b){b=r(b.periods);for(var c=b.next();!c.done;c=b.next())c=c.value,c.variants=c.variants.filter(function(b){var c=!0;b.audio&&(c=c&&ge(b.audio));b.video&&(c=c&&ge(b.video));return c})}
510
+ function mm(b,c){for(var d=r(b.periods),e=d.next();!e.done;e=d.next())e=e.value,e.variants=e.variants.filter(function(b){return pd(c,b)})}function nm(b){var c=new om;b.periods.forEach(function(b,d){var e=pm(b.variants);if(0==d){e=r(e.a);for(var f=e.next();!f.done;f=e.next())c.add(f.value)}else qm(c,e)});b=r(b.periods);for(var d=b.next();!d.done;d=b.next())d=d.value,d.variants=d.variants.filter(function(b){return rm(c,new sm(b))})}
511
+ function tm(b,c){var d=new om;b.periods.forEach(function(b,f){0<f&&(b.variants=b.variants.filter(function(b){return rm(d,new sm(b))}));c(b);d=pm(b.variants)})}function sm(b){var c=b.audio;b=b.video;this.b=c?c.mimeType:null;this.a=c?c.codecs.split(".")[0]:null;this.f=b?b.mimeType:null;this.c=b?b.codecs.split(".")[0]:null}function om(){this.a=[]}om.prototype.add=function(b){rm(this,b)||this.a.push(b)};function qm(b,c){b.a=b.a.filter(function(b){return rm(c,b)})}
512
+ function rm(b,c){return b.a.some(function(b){return c.b==b.b&&c.a==b.a&&c.f==b.f&&c.c==b.c})}function pm(b){var c=new om;b=r(b);for(var d=b.next();!d.done;d=b.next())c.add(new sm(d.value));return c};function Z(b){var c=this;if(b&&b.constructor!=X)throw new G(2,9,9008);this.b=this.a=null;b?(this.a=b.b,this.b=b.Fb()):(this.a=Ok(),this.b=new K);this.f=!1;this.c=[];this.g=[];var d=!b;this.h=new jm(function(){return t(function f(){var b;return z(f,function(f){switch(f.j){case 1:return b=function(){},u(f,Promise.all(c.g.map(function(c){return c.then(b,b)})),2);case 2:if(!d){f.A(3);break}return u(f,c.b.destroy(),3);case 3:c.a=null,c.b=null,v(f)}})})})}A("shaka.offline.Storage",Z);
513
+ function um(){if(sc())a:{var b=r(Qj.values());for(var c=b.next();!c.done;c=b.next())if(c=c.value,c=c()){c.destroy();b=!0;break a}b=!1}else b=!1;return b}Z.support=um;Z.prototype.destroy=function(){return this.h.destroy()};Z.prototype.destroy=Z.prototype.destroy;
514
+ Z.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=Mk(b,c));var d=b,e=!1;null!=d.trackSelectionCallback&&(e=!0,d.offline=d.offline||{},d.offline.trackSelectionCallback=d.trackSelectionCallback,delete d.trackSelectionCallback);null!=d.progressCallback&&(e=!0,d.offline=d.offline||{},d.offline.progressCallback=d.progressCallback,delete d.progressCallback);null!=d.usePersistentLicense&&(e=!0,d.offline=d.offline||{},d.offline.usePersistentLicense=d.usePersistentLicense,delete d.usePersistentLicense);
515
+ e&&Qe("Storage.configure with OfflineConfig","Please configure storage with a player configuration.");return Qk(this.a,b)};Z.prototype.configure=Z.prototype.configure;Z.prototype.getConfiguration=function(){var b=Ok();Qk(b,this.a,Ok());return b};Z.prototype.getConfiguration=Z.prototype.getConfiguration;Z.prototype.Fb=function(){return this.b};Z.prototype.getNetworkingEngine=Z.prototype.Fb;
516
+ Z.prototype.store=function(b,c,d){var e=this;return vm(this,wm(this,b,c||{},function(){return t(function g(){var c,k;return z(g,function(g){switch(g.j){case 1:return d&&"string"!=typeof d?(Qe("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),c=d,g["return"](new c)):u(g,U.create(b,e.b,e.a.manifest.retryParameters,d),2);case 2:return k=g.o,g["return"](k)}})})}))};Z.prototype.store=Z.prototype.store;Z.prototype.Ve=function(){return this.f};
517
+ Z.prototype.getStoreInProgress=Z.prototype.Ve;
518
+ function wm(b,c,d,e){return t(function g(){var h,k,l,m,n,q,w,x,B,C;return z(g,function(g){switch(g.j){case 1:xm();if(b.f)return g["return"](Promise.reject(new G(2,9,9006)));b.f=!0;return u(g,ym(b,c,e),2);case 2:h=g.o;zm(b);k=!h.presentationTimeline.V()&&!h.presentationTimeline.Va();if(!k)throw new G(2,9,9005,c);l=null;m=new Pj;q=n=null;y(g,3,4);return u(g,Am(b,h,function(b){q=q||b}),6);case 6:l=g.o;zm(b);if(q)throw q;Bm(b,h,l);return u(g,m.init(),7);case 7:return zm(b),u(g,Rj(m),8);case 8:return n=
519
+ g.o,zm(b),u(g,Cm(b,n.aa,l,h,c,d),9);case 9:w=g.o;zm(b);if(q)throw q;return u(g,n.aa.addManifests([w]),10);case 10:return x=g.o,zm(b),B=new ok("manifest",n.path.ua,n.path.aa,x[0]),g["return"](fm(B,w));case 4:return Da(g),b.f=!1,b.c=[],u(g,m.destroy(),11);case 11:if(!l){g.A(12);break}return u(g,l.destroy(),12);case 12:Ea(g,0);break;case 3:C=Ca(g);if(!n){g.A(14);break}return u(g,n.aa.removeSegments(b.c,function(){}),14);case 14:throw q||C;}})})}
520
+ function Bm(b,c,d){km(c,b.a.restrictions);lm(c);mm(c,d);nm(c);tm(c,function(c){for(var d=[],e=r(c.variants),h=e.next();!h.done;h=e.next())d.push(Ce(h.value));e=r(c.textStreams);for(h=e.next();!h.done;h=e.next())d.push(De(h.value));d=b.a.offline.trackSelectionCallback(d);var k=new Set,l=new Set;d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,"variant"==e.type&&k.add(e.id),"text"==e.type&&l.add(e.id);c.variants=c.variants.filter(function(b){return k.has(b.id)});c.textStreams=c.textStreams.filter(function(b){return l.has(b.id)})});
521
+ Dm(c)}function Cm(b,c,d,e,f,g){return t(function k(){var l,m,n,q;return z(k,function(k){switch(k.j){case 1:return l=dm(f,e,g),m=new Ej(b.b,function(c,d){l.size=d;b.a.offline.progressCallback(l,c)}),ya(k,2),q=n=Em(b,m,c,d,e,f,g),u(k,Hj(m),4);case 4:return q.size=k.o,k["return"](n);case 2:return Da(k),u(k,m.destroy(),5);case 5:Ea(k,0)}})})}Z.prototype.remove=function(b){return vm(this,Fm(this,b))};Z.prototype.remove=Z.prototype.remove;
522
+ function Fm(b,c){return t(function e(){var f,g,h,k,l,m;return z(e,function(e){switch(e.j){case 1:xm();f=pk(c);if(null==f||"manifest"!=f.a)return e["return"](Promise.reject(new G(2,9,9004,c)));g=f;h=new Pj;ya(e,2);return u(e,h.init(),4);case 4:return u(e,Tj(h,g.ua(),g.aa()),5);case 5:return k=e.o,u(e,k.getManifests([g.key()]),6);case 6:return l=e.o,m=l[0],u(e,Promise.all([Gm(b,m,h),Hm(b,k,g,m)]),2);case 2:return Da(e),u(e,h.destroy(),8);case 8:Ea(e,0)}})})}
523
+ function Im(b,c){for(var d=[],e=r(b.periods),f=e.next();!f.done;f=e.next()){f=r(f.value.streams);for(var g=f.next();!g.done;g=f.next())g=g.value,c&&"video"==g.contentType?d.push({contentType:oc(g.mimeType,g.codecs),robustness:b.drmInfo.videoRobustness}):c||"audio"!=g.contentType||d.push({contentType:oc(g.mimeType,g.codecs),robustness:b.drmInfo.audioRobustness})}return d}function Gm(b,c,d){return t(function f(){return z(f,function(f){switch(f.j){case 1:return u(f,Jm(b.b,b.a.drm,d,c),0)}})})}
524
+ function Hm(b,c,d,e){function f(){k+=1;b.a.offline.progressCallback(l,k/h)}var g=Km(e),h=g.length+1,k=0,l=fm(d,e);return Promise.all([c.removeSegments(g,f),c.removeManifests([d.key()],f)])}Z.prototype.Ff=function(){return vm(this,Lm(this))};Z.prototype.removeEmeSessions=Z.prototype.Ff;
525
+ function Lm(b){return t(function d(){var e,f,g,h,k,l,m,n,q;return z(d,function(d){switch(d.j){case 1:return xm(),e=b.b,f=b.a.drm,g=new Pj,h=!1,ya(d,2),u(d,g.init(),4);case 4:k=[];Uj(g,function(b){return k.push(b)});l=Promise.resolve();m={};n=r(k);for(q=n.next();!q.done;m={qc:m.qc},q=n.next())m.qc=q.value,l=l.then(function(b){return function(){return t(function C(){var d,g;return z(C,function(k){switch(k.j){case 1:return u(k,b.qc.getAll(),2);case 2:return d=k.o,u(k,zk(f,e,d),3);case 3:return g=k.o,
526
+ u(k,b.qc.remove(g),4);case 4:g.length!=d.length&&(h=!0),v(k)}})})}}(m));return u(d,l,2);case 2:return Da(d),u(d,g.destroy(),6);case 6:Ea(d,3);break;case 3:return d["return"](!h)}})})}Z.prototype.list=function(){return vm(this,Mm())};Z.prototype.list=Z.prototype.list;
527
+ function Mm(){return t(function c(){var d,e,f;return z(c,function(c){switch(c.j){case 1:return xm(),d=[],e=new Pj,ya(c,2),u(c,e.init(),4);case 4:return f=Promise.resolve(),Sj(e,function(c,e){f=f.then(function(){return t(function m(){var f;return z(m,function(g){switch(g.j){case 1:return u(g,e.getAllManifests(),2);case 2:f=g.o,f.forEach(function(e,f){var g=fm(new ok("manifest",c.ua,c.aa,f),e);d.push(g)}),v(g)}})})})}),u(c,f,2);case 2:return Da(c),u(c,e.destroy(),6);case 6:Ea(c,3);break;case 3:return c["return"](d)}})})}
528
+ function ym(b,c,d){return t(function f(){var g,h,k,l,m,n;return z(f,function(f){switch(f.j){case 1:return g=null,h=b.b,k={networkingEngine:h,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(b){g=b}},u(f,d(),2);case 2:return l=f.o,l.configure(b.a.manifest),zm(b),ya(f,3),u(f,l.start(c,k),5);case 5:return m=f.o,zm(b),n=Nm(m),u(f,Promise.all(Array.from(n).map(function(b){return b.createSegmentIndex()})),6);case 6:zm(b);
529
+ if(g)throw g;return f["return"](m);case 3:return Da(f),u(f,l.stop(),7);case 7:Ea(f,0)}})})}function Am(b,c,d){return t(function f(){var g,h,k;return z(f,function(f){switch(f.j){case 1:return g=new Lc({rb:b.b,onError:d,kc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),h=oi(c.periods),k=b.a,g.configure(k.drm),u(f,Qc(g,h,k.offline.usePersistentLicense),2);case 2:return u(f,$c(g),3);case 3:return u(f,ad(g),4);case 4:return f["return"](g)}})})}
530
+ function Em(b,c,d,e,f,g,h){var k=new gm,l=f.periods.map(function(e){return Om(b,c,d,k,f,e)}),m=e.a,n=gd(e);if(m&&b.a.offline.usePersistentLicense){if(!n.length)throw new G(2,9,9007,g);m.initData=[]}return{originalManifestUri:g,duration:f.presentationTimeline.Y(),size:0,expiration:e.dc(),periods:l,sessionIds:b.a.offline.usePersistentLicense?n:[],drmInfo:m,appMetadata:h}}
531
+ function Om(b,c,d,e,f,g){f.periods.forEach(function(b){b.variants.forEach(function(b){var c=b.audio,d=b.video;c&&!d&&(e.a[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(e.a[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var f=c.bandwidth||393216,g=d.bandwidth||b.bandwidth-f;0>=g&&(g=b.bandwidth);e.a[c.id]=f;e.a[d.id]=g}});b.textStreams.forEach(function(b){e.a[b.id]=52})});var h=Nm(f),k=new Map;h=r(h);for(var l=h.next();!l.done;l=h.next()){l=l.value;var m=Pm(b,c,d,e,f,l);k.set(l.id,m)}g.variants.forEach(function(b){b.audio&&
517
532
  k.get(b.audio.id).variantIds.push(b.id);b.video&&k.get(b.video.id).variantIds.push(b.id)});return{startTime:g.startTime,streams:Array.from(k.values())}}
518
- function Bm(b,c,d,e,f,g){var h={id:g.id,originalId:g.originalId,primary:g.primary,presentationTimeOffset:g.presentationTimeOffset||0,contentType:g.type,mimeType:g.mimeType,codecs:g.codecs,frameRate:g.frameRate,kind:g.kind,language:g.language,label:g.label,width:g.width||null,height:g.height||null,initSegmentKey:null,encrypted:g.encrypted,keyId:g.keyId,segments:[],variantIds:[]};f=f.presentationTimeline.Db();var k=g.id;Cm(g,f,function(f){var l=og(f.c(),f.b,f.a,b.a.streaming.retryParameters);sj(c,k,
519
- l,Ul(e,g.id,f),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.segments.push({startTime:f.startTime,endTime:f.endTime,dataKey:c[0]})})})});if(f=g.initSegmentReference)f=og(f.c(),f.b,f.a,b.a.streaming.retryParameters),sj(c,k,f,.5*Vl(e,g.id),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.initSegmentKey=c[0]})});return h}
520
- function Cm(b,c,d){c=b.findSegmentPosition(c);for(var e=null==c?null:b.getSegmentReference(c);e;)d(e),e=b.getSegmentReference(++c)}function lm(b){if(b.h.a)throw new D(2,9,7001);}function jm(){if(!gm())throw new D(2,9,9E3);}function hm(b,c){return t(function e(){return y(e,function(e){switch(e.l){case 1:return b.g.push(c),za(e,2),u(e,c,4);case 4:return e["return"](e.s);case 2:Ea(e),Kb(b.g,c),Fa(e,0)}})})}
521
- function wm(b){var c=[];b.periods.forEach(function(b){b.streams.forEach(function(b){null!=b.initSegmentKey&&c.push(b.initSegmentKey);b.segments.forEach(function(b){c.push(b.dataKey)})})});return c}Z.deleteAll=function(){return t(function c(){var d;return y(c,function(c){switch(c.l){case 1:return d=new Cj,za(c,2),u(c,d.erase(),2);case 2:return Ea(c),u(c,d.destroy(),5);case 5:Fa(c,0)}})})};
522
- function vm(b,c,d,e){return t(function g(){var h,k,l;return y(g,function(g){switch(g.l){case 1:if(!e.drmInfo)return g["return"]();h=Ij(d);k=e.sessionIds.map(function(b){return{sessionId:b,keySystem:e.drmInfo.keySystem,licenseUri:e.drmInfo.licenseServerUri,serverCertificate:e.drmInfo.serverCertificate,audioCapabilities:um(e,!1),videoCapabilities:um(e,!0)}});return u(g,mk(c,b,k),2);case 2:return l=g.s,u(g,h.remove(l),3);case 3:return u(g,h.add(k.filter(function(b){return-1==l.indexOf(b.sessionId)})),
523
- 0)}})})}function zm(b){var c=new Set;b=r(b.periods);for(var d=b.next();!d.done;d=b.next()){d=d.value;for(var e=r(d.textStreams),f=e.next();!f.done;f=e.next())c.add(f.value);d=r(d.variants);for(e=d.next();!e.done;e=d.next())e=e.value,e.audio&&c.add(e.audio),e.video&&c.add(e.video)}return c}function pm(b){if(0==b.periods.length)throw new D(2,4,4014);b=r(b.periods);for(var c=b.next();!c.done;c=b.next())Dm(c.value)}
524
- function Dm(b){b.variants.map(function(b){return b.video});var c=new Set(b.variants.map(function(b){return b.audio}));b=b.textStreams;for(var d=r(c),e=d.next();!e.done;e=d.next()){e=r(c);for(var f=e.next();!f.done;f=e.next());}c=r(b);for(d=c.next();!d.done;d=c.next())for(d=r(b),e=d.next();!e.done;e=d.next());}$k.offline=gm;z("shaka.polyfill.installAll",function(){for(var b=0;b<Em.length;++b)Em[b].oe()});var Em=[];function Fm(b,c){c=c||0;for(var d={priority:c,oe:b},e=0;e<Em.length;e++)if(Em[e].priority<c){Em.splice(e,0,d);return}Em.push(d)}z("shaka.polyfill.register",Fm);function Gm(b){var c=b.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"===typeof Event)var d=new Event(c,b);else d=document.createEvent("Event"),d.initEvent(c,b.bubbles,b.cancelable);b.target.dispatchEvent(d)}
525
- Fm(function(){if(window.Document){var b=Element.prototype;b.requestFullscreen=b.requestFullscreen||b.mozRequestFullScreen||b.msRequestFullscreen||b.webkitRequestFullscreen;b=Document.prototype;b.exitFullscreen=b.exitFullscreen||b.mozCancelFullScreen||b.msExitFullscreen||b.webkitExitFullscreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,
526
- "fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Gm);document.addEventListener("webkitfullscreenerror",Gm);document.addEventListener("mozfullscreenchange",Gm);document.addEventListener("mozfullscreenerror",Gm);document.addEventListener("MSFullscreenChange",Gm);document.addEventListener("MSFullscreenError",Gm)}});Fm(function(){pc("CrKey")&&delete window.indexedDB});var Hm;function Im(b,c,d){if("input"==b)switch(this.type){case "range":b="change"}Hm.call(this,b,c,d)}Fm(function(){pc("Trident/")&&HTMLInputElement.prototype.addEventListener!=Im&&(Hm=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Im)});Fm(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})});Fm(function(){});function Jm(){var b=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];d=b.apply(this,d);d.abort=function(){};return d}}function Km(){var b=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(c,d){return b.call(this,c,d-.001)}}
527
- function Lm(){var b=MediaSource.prototype.endOfStream;MediaSource.prototype.endOfStream=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];for(var h=e=0;h<this.sourceBuffers.length;++h){var k=this.sourceBuffers[h];k=k.buffered.end(k.buffered.length-1);e=Math.max(e,k)}if(!isNaN(this.duration)&&e<this.duration)for(this.Bd=!0,e=0;e<this.sourceBuffers.length;++e)this.sourceBuffers[e].sd=!1;return b.apply(this,d)};var c=!1,d=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=
528
- function(b){for(var e=[],g=0;g<arguments.length;++g)e[g]=arguments[g];e=d.apply(this,e);e.mediaSource_=this;e.addEventListener("updateend",Mm,!1);c||(this.addEventListener("sourceclose",Nm,!1),c=!0);return e}}function Mm(b){var c=b.target,d=c.mediaSource_;if(d.Bd){b.preventDefault();b.stopPropagation();b.stopImmediatePropagation();c.sd=!0;for(b=0;b<d.sourceBuffers.length;++b)if(0==d.sourceBuffers[b].sd)return;d.Bd=!1}}
529
- function Nm(b){b=b.target;for(var c=0;c<b.sourceBuffers.length;++c)b.sourceBuffers[c].removeEventListener("updateend",Mm,!1);b.removeEventListener("sourceclose",Nm,!1)}function Om(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"mp2t"==c.split(/ *; */)[0].split("/")[1]?!1:b(c)}}function Pm(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"opus"!=lc(c)[0]&&b(c)}}
530
- function Qm(){var b=MediaSource.isTypeSupported,c=/^dv(?:h[e1]|a[v1])\./;MediaSource.isTypeSupported=function(d){for(var e=d.split(/ *; */),f=e[0],g={},h=1;h<e.length;++h){var k=e[h].split("="),l=k[0];k=k[1].replace(/"(.*)"/,"$1");g[l]=k}e=g.codecs;if(!e)return b(d);var m=!1,n=!1;d=e.split(",").filter(function(b){c.test(b)&&(n=!0);/^(hev|hvc)1\.2/.test(b)&&(m=!0);return!0});n&&(m=!1);g.codecs=d.join(",");m&&(g.eotf="smpte2084");for(var q in g)f+="; "+q+'="'+g[q]+'"';return cast.__platform__.canDisplayType(f)}}
531
- Fm(function(){if(window.MediaSource)if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType)Qm();else if(navigator.vendor&&navigator.vendor.includes("Apple")){var b=navigator.appVersion;Om();if(b.includes("Version/8"))window.MediaSource=null;else if(b.includes("Version/9"))Jm();else if(b.includes("Version/10"))Jm(),Lm();else if(b.includes("Version/11")||b.includes("Version/12"))Jm(),Km()}else pc("Tizen")&&Pm()});function Rm(b,c){try{var d=new Sm(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}
532
- function Sm(b,c){this.keySystem=b;if(b.startsWith("com.apple.fps"))for(var d=r(c),e=d.next();!e.done;e=d.next()){var f=e.value;if("required"==f.persistentState)e=null;else{e={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label};var g=!1,h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),l=k.next();!l.done;l=k.next())if(l=l.value,l.contentType){g=!0;var m=l.contentType.split(";")[0];
533
+ function Pm(b,c,d,e,f,g){var h={id:g.id,originalId:g.originalId,primary:g.primary,presentationTimeOffset:g.presentationTimeOffset||0,contentType:g.type,mimeType:g.mimeType,codecs:g.codecs,frameRate:g.frameRate,kind:g.kind,language:g.language,label:g.label,width:g.width||null,height:g.height||null,initSegmentKey:null,encrypted:g.encrypted,keyId:g.keyId,segments:[],variantIds:[]};f=f.presentationTimeline.Hb();var k=g.id;Qm(g,f,function(f){var l=Ag(f.c(),f.b,f.a,b.a.streaming.retryParameters);Fj(c,k,
534
+ l,hm(e,g.id,f),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.segments.push({startTime:f.startTime,endTime:f.endTime,dataKey:c[0]})})})});if(f=g.initSegmentReference)f=Ag(f.c(),f.b,f.a,b.a.streaming.retryParameters),Fj(c,k,f,.5*im(e,g.id),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.initSegmentKey=c[0]})});return h}
535
+ function Qm(b,c,d){c=b.findSegmentPosition(c);for(var e=null==c?null:b.getSegmentReference(c);e;)d(e),e=b.getSegmentReference(++c)}function zm(b){if(b.h.a)throw new G(2,9,7001);}function xm(){if(!um())throw new G(2,9,9E3);}function vm(b,c){return t(function e(){return z(e,function(e){switch(e.j){case 1:return b.g.push(c),ya(e,2),u(e,c,4);case 4:return e["return"](e.o);case 2:Da(e),Lb(b.g,c),Ea(e,0)}})})}
536
+ function Km(b){var c=[];b.periods.forEach(function(b){b.streams.forEach(function(b){null!=b.initSegmentKey&&c.push(b.initSegmentKey);b.segments.forEach(function(b){c.push(b.dataKey)})})});return c}Z.deleteAll=function(){return t(function c(){var d;return z(c,function(c){switch(c.j){case 1:return d=new Pj,ya(c,2),u(c,d.erase(),2);case 2:return Da(c),u(c,d.destroy(),5);case 5:Ea(c,0)}})})};
537
+ function Jm(b,c,d,e){return t(function g(){var h,k,l;return z(g,function(g){switch(g.j){case 1:if(!e.drmInfo)return g["return"]();h=Vj(d);k=e.sessionIds.map(function(b){return{sessionId:b,keySystem:e.drmInfo.keySystem,licenseUri:e.drmInfo.licenseServerUri,serverCertificate:e.drmInfo.serverCertificate,audioCapabilities:Im(e,!1),videoCapabilities:Im(e,!0)}});return u(g,zk(c,b,k),2);case 2:return l=g.o,u(g,h.remove(l),3);case 3:return u(g,h.add(k.filter(function(b){return-1==l.indexOf(b.sessionId)})),
538
+ 0)}})})}function Nm(b){var c=new Set;b=r(b.periods);for(var d=b.next();!d.done;d=b.next()){d=d.value;for(var e=r(d.textStreams),f=e.next();!f.done;f=e.next())c.add(f.value);d=r(d.variants);for(e=d.next();!e.done;e=d.next())e=e.value,e.audio&&c.add(e.audio),e.video&&c.add(e.video)}return c}function Dm(b){if(0==b.periods.length)throw new G(2,4,4014);b=r(b.periods);for(var c=b.next();!c.done;c=b.next())Rm(c.value)}
539
+ function Rm(b){b.variants.map(function(b){return b.video});var c=new Set(b.variants.map(function(b){return b.audio}));b=b.textStreams;for(var d=r(c),e=d.next();!e.done;e=d.next()){e=r(c);for(var f=e.next();!f.done;f=e.next());}c=r(b);for(d=c.next();!d.done;d=c.next())for(d=r(b),e=d.next();!e.done;e=d.next());}ml.offline=um;A("shaka.polyfill.installAll",function(){for(var b=0;b<Sm.length;++b)Sm[b].re()});var Sm=[];function Tm(b,c){c=c||0;for(var d={priority:c,re:b},e=0;e<Sm.length;e++)if(Sm[e].priority<c){Sm.splice(e,0,d);return}Sm.push(d)}A("shaka.polyfill.register",Tm);function Um(b){var c=b.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"===typeof Event)var d=new Event(c,b);else d=document.createEvent("Event"),d.initEvent(c,b.bubbles,b.cancelable);b.target.dispatchEvent(d)}
540
+ Tm(function(){if(window.Document){var b=Element.prototype;b.requestFullscreen=b.requestFullscreen||b.mozRequestFullScreen||b.msRequestFullscreen||b.webkitRequestFullscreen;b=Document.prototype;b.exitFullscreen=b.exitFullscreen||b.mozCancelFullScreen||b.msExitFullscreen||b.webkitExitFullscreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,
541
+ "fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Um);document.addEventListener("webkitfullscreenerror",Um);document.addEventListener("mozfullscreenchange",Um);document.addEventListener("mozfullscreenerror",Um);document.addEventListener("MSFullscreenChange",Um);document.addEventListener("MSFullscreenError",Um)}});Tm(function(){xc("CrKey")&&delete window.indexedDB});function Vm(b,c,d){if("input"==b)switch(this.type){case "range":b="change"}HTMLInputElement.prototype.originalAddEventListener.call(this,b,c,d)}Tm(function(){xc("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Vm)});Tm(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})});Tm(function(){});function Wm(){var b=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];d=b.apply(this,d);d.abort=function(){};return d}}function Xm(){var b=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(c,d){return b.call(this,c,d-.001)}}
542
+ function Ym(){var b=MediaSource.prototype.endOfStream;MediaSource.prototype.endOfStream=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];for(var h=e=0;h<this.sourceBuffers.length;++h){var k=this.sourceBuffers[h];k=k.buffered.end(k.buffered.length-1);e=Math.max(e,k)}if(!isNaN(this.duration)&&e<this.duration)for(this.Ed=!0,e=0;e<this.sourceBuffers.length;++e)this.sourceBuffers[e].xd=!1;return b.apply(this,d)};var c=!1,d=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=
543
+ function(b){for(var e=[],g=0;g<arguments.length;++g)e[g]=arguments[g];e=d.apply(this,e);e.mediaSource_=this;e.addEventListener("updateend",Zm,!1);c||(this.addEventListener("sourceclose",$m,!1),c=!0);return e}}function Zm(b){var c=b.target,d=c.mediaSource_;if(d.Ed){b.preventDefault();b.stopPropagation();b.stopImmediatePropagation();c.xd=!0;for(b=0;b<d.sourceBuffers.length;++b)if(0==d.sourceBuffers[b].xd)return;d.Ed=!1}}
544
+ function $m(b){b=b.target;for(var c=0;c<b.sourceBuffers.length;++c)b.sourceBuffers[c].removeEventListener("updateend",Zm,!1);b.removeEventListener("sourceclose",$m,!1)}function an(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"mp2t"==c.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:b(c)}}function bn(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"opus"!=rc(c)[0]&&b(c)}}
545
+ function cn(){var b=MediaSource.isTypeSupported,c=/^dv(?:h[e1]|a[v1])\./;MediaSource.isTypeSupported=function(d){for(var e=d.split(/ *; */),f=e[0],g={},h=1;h<e.length;++h){var k=e[h].split("="),l=k[0];k=k[1].replace(/"(.*)"/,"$1");g[l]=k}e=g.codecs;if(!e)return b(d);var m=!1,n=!1;d=e.split(",").filter(function(b){c.test(b)&&(n=!0);/^(hev|hvc)1\.2/.test(b)&&(m=!0);return!0});n&&(m=!1);g.codecs=d.join(",");m&&(g.eotf="smpte2084");for(var q in g)f+="; "+q+'="'+g[q]+'"';return cast.__platform__.canDisplayType(f)}}
546
+ Tm(function(){if(window.MediaSource)if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType)cn();else if(navigator.vendor&&navigator.vendor.includes("Apple")){var b=navigator.appVersion;an();if(b.includes("Version/8"))window.MediaSource=null;else if(b.includes("Version/9"))Wm();else if(b.includes("Version/10"))Wm(),Ym();else if(b.includes("Version/11")||b.includes("Version/12"))Wm(),Xm()}else xc("Tizen")&&bn()});function dn(b,c){try{var d=new en(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}
547
+ function en(b,c){this.keySystem=b;if(b.startsWith("com.apple.fps"))for(var d=r(c),e=d.next();!e.done;e=d.next()){var f=e.value;if("required"==f.persistentState)e=null;else{e={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label};var g=!1,h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),l=k.next();!l.done;l=k.next())if(l=l.value,l.contentType){g=!0;var m=l.contentType.split(";")[0];
533
548
  WebKitMediaKeys.isTypeSupported(this.keySystem,m)&&(e.audioCapabilities.push(l),h=!0)}if(f.videoCapabilities)for(f=r(f.videoCapabilities),l=f.next();!l.done;l=f.next())k=l.value,k.contentType&&(g=!0,l=k.contentType.split(";")[0],WebKitMediaKeys.isTypeSupported(this.keySystem,l)&&(e.videoCapabilities.push(k),h=!0));g||(h=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));e=h?e:null}if(e){this.a=e;return}}d=Error("Unsupported keySystem");d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;
534
- throw d;}Sm.prototype.createMediaKeys=function(){var b=new Tm(this.keySystem);return Promise.resolve(b)};Sm.prototype.getConfiguration=function(){return this.a};function Um(b){var c=this.mediaKeys;c&&c!=b&&Vm(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?Vm(b,this):Promise.resolve()}function Tm(b){this.b=new WebKitMediaKeys(b);this.a=new ac;this.c=null}
535
- Tm.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new Wm(this.b,b)};Tm.prototype.setServerCertificate=function(b){this.c=b?new Uint8Array(b):null;return Promise.resolve(!0)};
536
- function Vm(b,c){bc(b.a);if(!c)return Promise.resolve();L(b.a,c,"webkitneedkey",Xm);try{return 1<=c.readyState?c.webkitSetMediaKeys(b.b):dc(b.a,c,"loadedmetadata",function(){c.webkitSetMediaKeys(b.b)}),Promise.resolve()}catch(d){return Promise.reject(d)}}function Wm(b){J.call(this);this.c=null;this.g=b;this.b=this.a=null;this.f=new ac;this.sessionId="";this.expiration=NaN;this.closed=new G;this.keyStatuses=new Ym}Ta(Wm,J);p=Wm.prototype;
537
- p.generateRequest=function(b,c){this.a=new G;try{this.c=this.g.createSession("video/mp4",new Uint8Array(c)),L(this.f,this.c,"webkitkeymessage",this.Wf.bind(this)),L(this.f,this.c,"webkitkeyadded",this.Uf.bind(this)),L(this.f,this.c,"webkitkeyerror",this.Vf.bind(this)),Zm(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(b){this.b=new G;try{this.c.update(new Uint8Array(b))}catch(c){this.b.reject(c)}return this.b};
538
- p.close=function(){try{this.c.close(),this.closed.resolve(),bc(this.f)}catch(b){this.closed.reject(b)}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"))};
539
- function $m(b,c){function d(b){(new DataView(g.buffer)).setUint32(h,b.byteLength,!0);h+=4;g.set(b,h);h+=b.byteLength}var e=new Uint8Array(b);if((new DataView(e.buffer)).getUint32(0,!0)+4!=e.byteLength)throw Error("Malformed init data!");var f=uc(e.slice(4),!0);f=(new cb(f)).oa;f=new Uint8Array(zc(f,!0));var g=new Uint8Array(e.byteLength+4+f.byteLength+4+c.byteLength),h=0;g.set(e,h);h+=e.byteLength;d(f);d(new Uint8Array(c));return g}
540
- function Xm(b){var c=this.mediaKeys.c,d=new Event("encrypted");d.initDataType="cenc";d.initData=$m(b.initData,c);this.dispatchEvent(d)}p.Wf=function(b){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new I("message",{messageType:void 0==this.keyStatuses.a?"license-request":"license-renewal",message:b.message.buffer}))};p.Uf=function(){this.b&&(Zm(this,"usable"),this.b.resolve(),this.b=null)};
541
- p.Vf=function(){var b=Error("EME PatchedMediaKeysApple key error");b.errorCode=this.c.error;if(null!=this.a)this.a.reject(b),this.a=null;else if(null!=this.b)this.b.reject(b),this.b=null;else switch(this.c.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Zm(this,"output-not-allowed");break;default:Zm(this,"internal-error")}};function Zm(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new I("keystatuseschange"))}
542
- function Ym(){this.size=0;this.a=void 0}var an;p=Ym.prototype;p.forEach=function(b){this.a&&b(this.a,an)};p.get=function(b){if(this.has(b))return this.a};p.has=function(b){var c=an;return this.a&&Ec(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
543
- Fm(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(an=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Um,window.MediaKeys=Tm,window.MediaKeySystemAccess=Sm,navigator.requestMediaKeySystemAccess=Rm)});function bn(b){this.f=[];this.b=[];this.a=[];(new S).ca("pssh",this.c.bind(this)).parse(b.buffer)}bn.prototype.c=function(b){if(!(1<b.version)){var c=Dc(b.reader.Va(16)),d=[];if(0<b.version)for(var e=b.reader.D(),f=0;f<e;++f){var g=Dc(b.reader.Va(16));d.push(g)}e=b.reader.D();b.reader.J(e);this.b.push.apply(this.b,d);this.f.push(c);this.a.push({start:b.start,end:b.start+b.size-1})}};function cn(b,c){try{var d=new dn(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}
544
- function dn(b,c){this.keySystem=b;for(var d=!1,e=0;e<c.length;++e){var f=c[e],g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=0;k<f.audioCapabilities.length;++k){var l=f.audioCapabilities[k];if(l.contentType){h=!0;var m=l.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.audioCapabilities.push(l),d=!0)}}if(f.videoCapabilities)for(k=
545
- 0;k<f.videoCapabilities.length;++k)l=f.videoCapabilities[k],l.contentType&&(h=!0,m=l.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.videoCapabilities.push(l),d=!0));h||(d=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==f.persistentState&&(d=!1);if(d){this.a=g;return}}d=Error("Unsupported keySystem");d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}dn.prototype.createMediaKeys=function(){var b=new en(this.keySystem);return Promise.resolve(b)};
546
- dn.prototype.getConfiguration=function(){return this.a};function fn(b){var c=this.mediaKeys;c&&c!=b&&gn(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?gn(b,this):Promise.resolve()}function en(b){this.a=new MSMediaKeys(b);this.b=new ac}en.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new hn(this.a,b)};en.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
547
- function gn(b,c){function d(){c.msSetMediaKeys(e.a);c.removeEventListener("loadedmetadata",d)}bc(b.b);if(!c)return Promise.resolve();L(b.b,c,"msneedkey",jn);var e=b;try{return 1<=c.readyState?c.msSetMediaKeys(b.a):c.addEventListener("loadedmetadata",d),Promise.resolve()}catch(f){return Promise.reject(f)}}function hn(b){J.call(this);this.c=null;this.g=b;this.b=this.a=null;this.f=new ac;this.sessionId="";this.expiration=NaN;this.closed=new G;this.keyStatuses=new kn}Ta(hn,J);p=hn.prototype;
548
- p.generateRequest=function(b,c){this.a=new G;try{this.c=this.g.createSession("video/mp4",new Uint8Array(c),null),L(this.f,this.c,"mskeymessage",this.jf.bind(this)),L(this.f,this.c,"mskeyadded",this.gf.bind(this)),L(this.f,this.c,"mskeyerror",this.hf.bind(this)),ln(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(b){this.b=new G;try{this.c.update(new Uint8Array(b))}catch(c){this.b.reject(c)}return this.b};
549
- p.close=function(){try{this.c.close(),this.closed.resolve(),bc(this.f)}catch(b){this.closed.reject(b)}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 jn(b){if(b.initData){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="cenc";c.initData=mn(b.initData);this.dispatchEvent(c)}}
550
- function mn(b){if(!b)return b;var c=new bn(b);if(1>=c.a.length)return b;for(var d=[],e=0;e<c.a.length;e++)d.push(b.subarray(c.a[e].start,c.a[e].end+1));b=[];c={};e=r(d);for(d=e.next();!d.done;c={dc:c.dc},d=e.next())c.dc=d.value,b.some(function(b){return function(c){return Ec(c,b.dc)}}(c))||b.push(c.dc);c=0;e=r(b);for(d=e.next();!d.done;d=e.next())c+=d.value.length;c=new Uint8Array(c);e=0;b=r(b);for(d=b.next();!d.done;d=b.next())d=d.value,c.set(d,e),e+=d.length;return c}
551
- p.jf=function(b){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new I("message",{messageType:void 0==this.keyStatuses.a?"license-request":"license-renewal",message:b.message.buffer}))};p.gf=function(){this.a?(ln(this,"usable"),this.a.resolve(),this.a=null):this.b&&(ln(this,"usable"),this.b.resolve(),this.b=null)};
552
- p.hf=function(){var b=Error("EME PatchedMediaKeysMs key error");b.errorCode=this.c.error;if(null!=this.a)this.a.reject(b),this.a=null;else if(null!=this.b)this.b.reject(b),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:ln(this,"output-not-allowed");break;default:ln(this,"internal-error")}};function ln(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new I("keystatuseschange"))}
553
- function kn(){this.size=0;this.a=void 0}var nn;p=kn.prototype;p.forEach=function(b){this.a&&b(this.a,nn)};p.get=function(b){if(this.has(b))return this.a};p.has=function(b){var c=nn;return this.a&&Ec(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
554
- Fm(function(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(nn=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=fn,window.MediaKeys=en,window.MediaKeySystemAccess=dn,navigator.requestMediaKeySystemAccess=cn)});function on(){return Promise.reject(Error("The key system specified is not supported."))}function pn(b){return null==b?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function qn(){throw new TypeError("Illegal constructor.");}qn.prototype.createSession=function(){};qn.prototype.setServerCertificate=function(){};function rn(){throw new TypeError("Illegal constructor.");}rn.prototype.getConfiguration=function(){};rn.prototype.createMediaKeys=function(){};
555
- Fm(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=on,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=pn,window.MediaKeys=qn,window.MediaKeySystemAccess=rn)},-10);var sn="";function tn(b){var c=sn;return c?c+b.charAt(0).toUpperCase()+b.slice(1):b}function un(b,c){try{var d=new vn(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}function wn(b){var c=this.mediaKeys;c&&c!=b&&xn(c,null);delete this.mediaKeys;(this.mediaKeys=b)&&xn(b,this);return Promise.resolve()}
556
- function vn(b,c){this.a=this.keySystem=b;var d=!1;"org.w3.clearkey"==b&&(this.a="webkit-org.w3.clearkey",d=!1);var e=!1;var f=document.getElementsByTagName("video");f=f.length?f[0]:document.createElement("video");for(var g=0;g<c.length;++g){var h=c[g],k={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:h.initDataTypes,sessionTypes:["temporary"],label:h.label},l=!1;if(h.audioCapabilities)for(var m=0;m<h.audioCapabilities.length;++m){var n=
549
+ throw d;}en.prototype.createMediaKeys=function(){var b=new fn(this.keySystem);return Promise.resolve(b)};en.prototype.getConfiguration=function(){return this.a};function gn(b){var c=this.mediaKeys;c&&c!=b&&hn(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?hn(b,this):Promise.resolve()}function fn(b){this.b=new WebKitMediaKeys(b);this.a=new L}
550
+ fn.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new jn(this.b,b)};fn.prototype.setServerCertificate=function(b){b&&new Uint8Array(b);return Promise.resolve(!0)};
551
+ function hn(b,c){b.a.Ya();if(!c)return Promise.resolve();b.a.w(c,"webkitneedkey",kn);try{return 1<=c.readyState?c.webkitSetMediaKeys(b.b):b.a.da(c,"loadedmetadata",function(){c.webkitSetMediaKeys(b.b)}),Promise.resolve()}catch(d){return Promise.reject(d)}}function jn(b){Ib.call(this);this.b=null;this.g=b;this.c=this.a=null;this.f=new L;this.sessionId="";this.expiration=NaN;this.closed=new H;this.keyStatuses=new ln}Ua(jn,Ib);p=jn.prototype;
552
+ p.generateRequest=function(b,c){this.a=new H;try{this.b=this.g.createSession("video/mp4",new Uint8Array(c)),this.sessionId=this.b.sessionId||"",this.f.w(this.b,"webkitkeymessage",this.Wf.bind(this)),this.f.w(this.b,"webkitkeyadded",this.Uf.bind(this)),this.f.w(this.b,"webkitkeyerror",this.Vf.bind(this)),mn(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(b){this.c=new H;try{this.b.update(new Uint8Array(b))}catch(c){this.c.reject(c)}return this.c};
553
+ p.close=function(){try{this.b.close(),this.closed.resolve(),this.f.Ya()}catch(b){this.closed.reject(b)}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 kn(b){var c=new Event("encrypted");c.initDataType="cenc";c.initData=b.initData;this.dispatchEvent(c)}
554
+ p.Wf=function(b){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new J("message",{messageType:void 0==this.keyStatuses.a?"license-request":"license-renewal",message:b.message.buffer}))};p.Uf=function(){this.c&&(mn(this,"usable"),this.c.resolve(),this.c=null)};
555
+ p.Vf=function(){var b=Error("EME PatchedMediaKeysApple key error");b.errorCode=this.b.error;if(null!=this.a)this.a.reject(b),this.a=null;else if(null!=this.c)this.c.reject(b),this.c=null;else switch(this.b.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:mn(this,"output-not-allowed");break;default:mn(this,"internal-error")}};function mn(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new J("keystatuseschange"))}
556
+ function ln(){this.size=0;this.a=void 0}var nn;p=ln.prototype;p.forEach=function(b){this.a&&b(this.a,nn)};p.get=function(b){if(this.has(b))return this.a};p.has=function(b){var c=nn;return this.a&&Jc(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
557
+ Tm(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(nn=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=gn,window.MediaKeys=fn,window.MediaKeySystemAccess=en,navigator.requestMediaKeySystemAccess=dn)});function on(b,c){try{var d=new pn(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}
558
+ function pn(b,c){this.keySystem=b;for(var d=!1,e=0;e<c.length;++e){var f=c[e],g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=0;k<f.audioCapabilities.length;++k){var l=f.audioCapabilities[k];if(l.contentType){h=!0;var m=l.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.audioCapabilities.push(l),d=!0)}}if(f.videoCapabilities)for(k=
559
+ 0;k<f.videoCapabilities.length;++k)l=f.videoCapabilities[k],l.contentType&&(h=!0,m=l.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.videoCapabilities.push(l),d=!0));h||(d=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==f.persistentState&&(d=!1);if(d){this.a=g;return}}d=Error("Unsupported keySystem");d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}pn.prototype.createMediaKeys=function(){var b=new qn(this.keySystem);return Promise.resolve(b)};
560
+ pn.prototype.getConfiguration=function(){return this.a};function rn(b){var c=this.mediaKeys;c&&c!=b&&sn(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?sn(b,this):Promise.resolve()}function qn(b){this.a=new MSMediaKeys(b);this.b=new L}qn.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new tn(this.a,b)};qn.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
561
+ function sn(b,c){function d(){c.msSetMediaKeys(e.a);c.removeEventListener("loadedmetadata",d)}b.b.Ya();if(!c)return Promise.resolve();b.b.w(c,"msneedkey",un);var e=b;try{return 1<=c.readyState?c.msSetMediaKeys(b.a):c.addEventListener("loadedmetadata",d),Promise.resolve()}catch(f){return Promise.reject(f)}}function tn(b){Ib.call(this);this.c=null;this.g=b;this.b=this.a=null;this.f=new L;this.sessionId="";this.expiration=NaN;this.closed=new H;this.keyStatuses=new vn}Ua(tn,Ib);p=tn.prototype;
562
+ p.generateRequest=function(b,c){this.a=new H;try{this.c=this.g.createSession("video/mp4",new Uint8Array(c),null),this.f.w(this.c,"mskeymessage",this.nf.bind(this)),this.f.w(this.c,"mskeyadded",this.lf.bind(this)),this.f.w(this.c,"mskeyerror",this.mf.bind(this)),wn(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(b){this.b=new H;try{this.c.update(new Uint8Array(b))}catch(c){this.b.reject(c)}return this.b};
563
+ p.close=function(){try{this.c.close(),this.closed.resolve(),this.f.Ya()}catch(b){this.closed.reject(b)}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 un(b){if(b.initData){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="cenc";c.initData=xn(b.initData);this.dispatchEvent(c)}}
564
+ function xn(b){if(!b)return b;var c=new Lf(b);if(1>=c.a.length)return b;for(var d=[],e=0;e<c.a.length;e++)d.push(b.subarray(c.a[e].start,c.a[e].end+1));b=[];c={};e=r(d);for(d=e.next();!d.done;c={fc:c.fc},d=e.next())c.fc=d.value,b.some(function(b){return function(c){return Jc(c,b.fc)}}(c))||b.push(c.fc);c=0;e=r(b);for(d=e.next();!d.done;d=e.next())c+=d.value.length;c=new Uint8Array(c);e=0;b=r(b);for(d=b.next();!d.done;d=b.next())d=d.value,c.set(d,e),e+=d.length;return c}
565
+ p.nf=function(b){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new J("message",{messageType:void 0==this.keyStatuses.a?"license-request":"license-renewal",message:b.message.buffer}))};p.lf=function(){this.a?(wn(this,"usable"),this.a.resolve(),this.a=null):this.b&&(wn(this,"usable"),this.b.resolve(),this.b=null)};
566
+ p.mf=function(){var b=Error("EME PatchedMediaKeysMs key error");b.errorCode=this.c.error;if(null!=this.a)this.a.reject(b),this.a=null;else if(null!=this.b)this.b.reject(b),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:wn(this,"output-not-allowed");break;default:wn(this,"internal-error")}};function wn(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new J("keystatuseschange"))}
567
+ function vn(){this.size=0;this.a=void 0}var yn;p=vn.prototype;p.forEach=function(b){this.a&&b(this.a,yn)};p.get=function(b){if(this.has(b))return this.a};p.has=function(b){var c=yn;return this.a&&Jc(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
568
+ Tm(function(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(yn=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=rn,window.MediaKeys=qn,window.MediaKeySystemAccess=pn,navigator.requestMediaKeySystemAccess=on)});function zn(){return Promise.reject(Error("The key system specified is not supported."))}function An(b){return null==b?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function Bn(){throw new TypeError("Illegal constructor.");}Bn.prototype.createSession=function(){};Bn.prototype.setServerCertificate=function(){};function Cn(){throw new TypeError("Illegal constructor.");}Cn.prototype.getConfiguration=function(){};Cn.prototype.createMediaKeys=function(){};
569
+ Tm(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=zn,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=An,window.MediaKeys=Bn,window.MediaKeySystemAccess=Cn)},-10);var Dn="";function En(b){var c=Dn;return c?c+b.charAt(0).toUpperCase()+b.slice(1):b}function Fn(b,c){try{var d=new Gn(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}function Hn(b){var c=this.mediaKeys;c&&c!=b&&In(c,null);delete this.mediaKeys;(this.mediaKeys=b)&&In(b,this);return Promise.resolve()}
570
+ function Gn(b,c){this.a=this.keySystem=b;var d=!1;"org.w3.clearkey"==b&&(this.a="webkit-org.w3.clearkey",d=!1);var e=!1;var f=document.getElementsByTagName("video");f=f.length?f[0]:document.createElement("video");for(var g=0;g<c.length;++g){var h=c[g],k={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:h.initDataTypes,sessionTypes:["temporary"],label:h.label},l=!1;if(h.audioCapabilities)for(var m=0;m<h.audioCapabilities.length;++m){var n=
557
571
  h.audioCapabilities[m];if(n.contentType){l=!0;var q=n.contentType.split(";")[0];f.canPlayType(q,this.a)&&(k.audioCapabilities.push(n),e=!0)}}if(h.videoCapabilities)for(m=0;m<h.videoCapabilities.length;++m)n=h.videoCapabilities[m],n.contentType&&(l=!0,f.canPlayType(n.contentType,this.a)&&(k.videoCapabilities.push(n),e=!0));l||(e=f.canPlayType("video/mp4",this.a)||f.canPlayType("video/webm",this.a));"required"==h.persistentState&&(d?(k.persistentState="required",k.sessionTypes=["persistent-license"]):
558
- e=!1);if(e){this.b=k;return}}d="Unsupported keySystem";if("org.w3.clearkey"==b||"com.widevine.alpha"==b)d="None of the requested configurations were supported.";d=Error(d);d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}vn.prototype.createMediaKeys=function(){var b=new yn(this.a);return Promise.resolve(b)};vn.prototype.getConfiguration=function(){return this.b};function yn(b){this.g=b;this.b=null;this.a=new ac;this.c=[];this.f={}}
559
- function xn(b,c){b.b=c;bc(b.a);var d=sn;c&&(L(b.a,c,d+"needkey",b.pf.bind(b)),L(b.a,c,d+"keymessage",b.Zf.bind(b)),L(b.a,c,d+"keyadded",b.Xf.bind(b)),L(b.a,c,d+"keyerror",b.Yf.bind(b)))}p=yn.prototype;p.createSession=function(b){b=b||"temporary";if("temporary"!=b&&"persistent-license"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");var c=this.b||document.createElement("video");c.src||(c.src="about:blank");b=new zn(c,this.g,b);this.c.push(b);return b};
560
- p.setServerCertificate=function(){return Promise.resolve(!1)};p.pf=function(b){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="webm";c.initData=b.initData;this.b.dispatchEvent(c)};p.Zf=function(b){var c=An(this,b.sessionId);c&&(b=new I("message",{messageType:void 0==c.keyStatuses.a?"licenserequest":"licenserenewal",message:b.message}),c.b&&(c.b.resolve(),c.b=null),c.dispatchEvent(b))};
561
- p.Xf=function(b){if(b=An(this,b.sessionId))Bn(b,"usable"),b.a&&b.a.resolve(),b.a=null};p.Yf=function(b){var c=An(this,b.sessionId);c&&c.handleError(b)};function An(b,c){var d=b.f[c];return d?d:(d=b.c.shift())?(d.sessionId=c,b.f[c]=d):null}function zn(b,c,d){J.call(this);this.f=b;this.h=!1;this.a=this.b=null;this.c=c;this.g=d;this.sessionId="";this.expiration=NaN;this.closed=new G;this.keyStatuses=new Cn}Ta(zn,J);p=zn.prototype;
562
- p.handleError=function(b){var c=Error("EME v0.1b key error");c.errorCode=b.errorCode;c.errorCode.systemCode=b.systemCode;!b.sessionId&&this.b?(c.method="generateRequest",45==b.systemCode&&(c.message="Unsupported session type."),this.b.reject(c),this.b=null):b.sessionId&&this.a?(c.method="update",this.a.reject(c),this.a=null):(c=b.systemCode,b.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Bn(this,"output-restricted"):1==c?Bn(this,"expired"):Bn(this,"internal-error"))};
563
- function Dn(b,c,d){if(b.h)return Promise.reject(Error("The session is already initialized."));b.h=!0;try{if("persistent-license"==b.g)if(d)var e=new Uint8Array(yc("LOAD_SESSION|"+d));else{var f=yc("PERSISTENT|"),g=new Uint8Array(f.byteLength+c.byteLength);g.set(new Uint8Array(f),0);g.set(new Uint8Array(c),f.byteLength);e=g}else e=new Uint8Array(c)}catch(k){return Promise.reject(k)}b.b=new G;var h=tn("generateKeyRequest");try{b.f[h](b.c,e)}catch(k){if("InvalidStateError"!=k.name)return b.b=null,Promise.reject(k);
564
- (new B(function(){try{b.f[h](b.c,e)}catch(l){b.b.reject(l),b.b=null}})).O(.01)}return b.b}
565
- p.hd=function(b,c){if(this.a)this.a.then(this.hd.bind(this,b,c))["catch"](this.hd.bind(this,b,c));else{this.a=b;if("webkit-org.w3.clearkey"==this.c){var d=sc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null);d=Bc(e.keys[0].k);e=Bc(e.keys[0].kid)}else d=new Uint8Array(c),e=null;var f=tn("addKey");try{this.f[f](this.c,d,e,this.sessionId)}catch(g){this.a.reject(g),this.a=null}}};
566
- function Bn(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new I("keystatuseschange"))}p.generateRequest=function(b,c){return Dn(this,c,null)};p.load=function(b){return"persistent-license"==this.g?Dn(this,null,b):Promise.reject(Error("Not a persistent session."))};p.update=function(b){var c=new G;this.hd(c,b);return c};
567
- p.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var b=tn("cancelKeyRequest");try{this.f[b](this.c,this.sessionId)}catch(c){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};function Cn(){this.size=0;this.a=void 0}var En;p=Cn.prototype;p.forEach=function(b){this.a&&b(this.a,En)};p.get=function(b){if(this.has(b))return this.a};
568
- p.has=function(b){var c=En;return this.a&&Ec(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
569
- Fm(function(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)sn="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;En=(new Uint8Array([0])).buffer;navigator.requestMediaKeySystemAccess=un;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=wn;window.MediaKeys=yn;window.MediaKeySystemAccess=
570
- vn}});function Fn(b){b=b.target;if("picture-in-picture"==b.webkitPresentationMode){document.pictureInPictureElement=b;var c=new Event("enterpictureinpicture");b.dispatchEvent(c)}else document.pictureInPictureElement==b&&(document.pictureInPictureElement=null),c=new Event("leavepictureinpicture"),b.dispatchEvent(c)}
571
- function Gn(){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 Hn(){var b=document.pictureInPictureElement;return b?(b.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
572
- Fm(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;b.requestPictureInPicture&&document.exitPictureInPicture||!b.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,b.requestPictureInPicture=Gn,document.exitPictureInPicture=Hn,document.addEventListener("webkitpresentationmodechanged",Fn,!0))}});Fm(function(){if(window.HTMLMediaElement){var b=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var c=b.apply(this);c&&c["catch"](function(){});return c}}});function In(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Fm(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;!b.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in b&&(b.getVideoPlaybackQuality=In)}});function Jn(b,c,d){return new window.TextTrackCue(b,c,d)}function Kn(b,c,d){return new window.TextTrackCue(b+"-"+c+"-"+d,b,c,d)}Fm(function(){if(!window.VTTCue&&window.TextTrackCue){var b=TextTrackCue.length;if(3==b)window.VTTCue=Jn;else if(6==b)window.VTTCue=Kn;else{try{var c=!!Jn(1,2,"")}catch(d){c=!1}c&&(window.VTTCue=Jn)}}});function Ln(){}Ln.prototype.parseInit=function(){};
573
- Ln.prototype.parseMedia=function(b,c){var d=sc(b),e=[],f=new DOMParser,g=null;try{g=f.parseFromString(d,"text/xml")}catch(Y){throw new D(2,2,2005);}if(g){if(g=g.getElementsByTagName("tt")[0]){var h=P.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","frameRate");var k=P.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","subFrameRate");var l=P.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier");var m=P.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","tickRate");
574
- d=g.getAttribute("xml:space")||"default";f=g.getAttribute("tts:extent")}else throw new D(2,2,2005);if("default"!=d&&"preserve"!=d)throw new D(2,2,2005);d="default"==d;h=new Mn(h,k,l,m);k=Nn(g.getElementsByTagName("metadata")[0]);l=Nn(g.getElementsByTagName("styling")[0]);m=Nn(g.getElementsByTagName("layout")[0]);for(var n=[],q=0;q<m.length;q++){var x=m[q],w=l,A=f;var C=new Fd;var E=x.getAttribute("xml:id");if(E){C.id=E;E=null;A&&(E=On.exec(A)||Pn.exec(A));A=E?Number(E[1]):null;E=E?Number(E[2]):null;
575
- var F,V;if(F=Qn(x,w,"extent"))F=(V=On.exec(F))||Pn.exec(F),null!=F&&(C.width=null!=A?100*Number(F[1])/A:Number(F[1]),C.height=null!=E?100*Number(F[2])/E:Number(F[2]),C.widthUnits=V||null!=A?Sd:0,C.heightUnits=V||null!=E?Sd:0);if(x=Qn(x,w,"origin"))F=(V=On.exec(x))||Pn.exec(x),null!=F&&(C.viewportAnchorX=null!=E?100*Number(F[1])/E:Number(F[1]),C.viewportAnchorY=null!=A?100*Number(F[2])/A:Number(F[2]),C.viewportAnchorUnits=V||null!=A?Sd:0)}else C=null;C&&n.push(C)}f=Nn(g.getElementsByTagName("body")[0]);
576
- for(g=0;g<f.length;g++)(q=Rn(f[g],c.periodStart,h,k,l,m,n,d))&&e.push(q)}return e};
577
- var On=/^(\d{1,2}|100)% (\d{1,2}|100)%$/,Sn=/^(\d+px|\d+em)$/,Pn=/^(\d+)px (\d+)px$/,Tn=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Un=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Vn=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Wn=/^(\d*(?:\.\d*)?)f$/,Xn=/^(\d*(?:\.\d*)?)t$/,Yn=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Zn={left:Kd,center:"center",right:"end",start:Kd,end:"end"},$n={left:"line-left",center:"center",right:"line-right"};
578
- function Nn(b){var c=[];if(!b)return c;for(var d=b.childNodes,e=0;e<d.length;e++){var f="span"==d[e].nodeName&&"p"==b.nodeName;d[e].nodeType!=Node.ELEMENT_NODE||"br"==d[e].nodeName||f||(f=Nn(d[e]),c=c.concat(f))}c.length||c.push(b);return c}function ao(b,c){for(var d=b.childNodes,e=0;e<d.length;e++)if("br"==d[e].nodeName&&0<e)d[e-1].textContent+="\n";else if(0<d[e].childNodes.length)ao(d[e],c);else if(c){var f=d[e].textContent.trim();f=f.replace(/\s+/g," ");d[e].textContent=f}}
579
- function Rn(b,c,d,e,f,g,h,k){if(!b.hasAttribute("begin")&&!b.hasAttribute("end")&&/^\s*$/.test(b.textContent))return null;ao(b,k);k=bo(b.getAttribute("begin"),d);var l=bo(b.getAttribute("end"),d);d=bo(b.getAttribute("dur"),d);var m=b.textContent;null==l&&null!=d&&(l=k+d);if(null==k||null==l)throw new D(2,2,2001);c=new Dd(k+c,l+c,m);if((g=co(b,"region",g,""))&&g.getAttribute("xml:id")){var n=g.getAttribute("xml:id");h=h.filter(function(b){return b.id==n});c.region=h[0]}e=co(b,"smpte:backgroundImage",
580
- e,"#");eo(c,b,g,e,f);return c}
581
- function eo(b,c,d,e,f){"rtl"==fo(c,d,f,"direction")&&(b.direction="rtl");var g=fo(c,d,f,"writingMode");"tb"==g||"tblr"==g?b.writingMode="vertical-lr":"tbrl"==g?b.writingMode="vertical-rl":"rltb"==g||"rl"==g?b.direction="rtl":g&&(b.direction=Ed);if(g=fo(c,d,f,"textAlign"))b.positionAlign=$n[g],b.lineAlign=Zn[g],b.textAlign=Od[g.toUpperCase()];if(g=fo(c,d,f,"displayAlign"))b.displayAlign=Pd[g.toUpperCase()];if(g=fo(c,d,f,"color"))b.color=g;if(g=fo(c,d,f,"backgroundColor"))b.backgroundColor=g;if(g=fo(c,
582
- d,f,"fontFamily"))b.fontFamily=g;(g=fo(c,d,f,"fontWeight"))&&"bold"==g&&(b.fontWeight=700);(g=fo(c,d,f,"wrapOption"))&&"noWrap"==g&&(b.wrapLine=!1);(g=fo(c,d,f,"lineHeight"))&&g.match(Sn)&&(b.lineHeight=g);(g=fo(c,d,f,"fontSize"))&&g.match(Sn)&&(b.fontSize=g);if(g=fo(c,d,f,"fontStyle"))b.fontStyle=Rd[g.toUpperCase()];if(e){g=e.getAttribute("imagetype");var h=e.getAttribute("encoding");e=e.textContent;"PNG"==g&&"Base64"==h&&e&&(b.backgroundImage="data:image/png;base64,"+e)}(d=Qn(d,f,"textDecoration"))&&
583
- go(b,d);(c=ho(c,f,"textDecoration"))&&go(b,c)}
584
- function go(b,c){for(var d=c.split(" "),e=0;e<d.length;e++)switch(d[e]){case "underline":b.textDecoration.includes("underline")||b.textDecoration.push("underline");break;case "noUnderline":b.textDecoration.includes("underline")&&Kb(b.textDecoration,"underline");break;case "lineThrough":b.textDecoration.includes("lineThrough")||b.textDecoration.push("lineThrough");break;case "noLineThrough":b.textDecoration.includes("lineThrough")&&Kb(b.textDecoration,"lineThrough");break;case "overline":b.textDecoration.includes("overline")||
585
- b.textDecoration.push("overline");break;case "noOverline":b.textDecoration.includes("overline")&&Kb(b.textDecoration,"overline")}}function fo(b,c,d,e){return(b=ho(b,d,e))?b:Qn(c,d,e)}function Qn(b,c,d){for(var e=Nn(b),f=0;f<e.length;f++){var g=P.getAttributeNS(e[f],"http://www.w3.org/ns/ttml#styling",d);if(g)return g}return(b=co(b,"style",c,""))?P.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}
586
- function ho(b,c,d){return(b=co(b,"style",c,""))?P.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}function co(b,c,d,e){if(!b||1>d.length)return null;var f=null,g=b;for(b=null;g&&!(b=g.getAttribute(c))&&(g=g.parentNode,g instanceof Element););if(c=b)for(b=0;b<d.length;b++)if(e+d[b].getAttribute("xml:id")==c){f=d[b];break}return f}
587
- function bo(b,c){var d=null;if(Tn.test(b)){d=Tn.exec(b);var e=Number(d[1]),f=Number(d[2]),g=Number(d[3]),h=Number(d[4]);h+=(Number(d[5])||0)/c.b;g+=h/c.frameRate;d=g+60*f+3600*e}else Un.test(b)?d=io(Un,b):Vn.test(b)?d=io(Vn,b):Wn.test(b)?(d=Wn.exec(b),d=Number(d[1])/c.frameRate):Xn.test(b)?(d=Xn.exec(b),d=Number(d[1])/c.a):Yn.test(b)&&(d=io(Yn,b));return d}
588
- function io(b,c){var d=b.exec(c);return null==d||""==d[0]?null:(Number(d[4])||0)/1E3+(Number(d[3])||0)+60*(Number(d[2])||0)+3600*(Number(d[1])||0)}function Mn(b,c,d,e){this.frameRate=Number(b)||30;this.b=Number(c)||1;this.a=Number(e);0==this.a&&(this.a=b?this.frameRate*this.b:1);d&&(b=/^(\d+) (\d+)$/g.exec(d))&&(this.frameRate*=Number(b[1])/Number(b[2]))}Vd["application/ttml+xml"]=Ln;function jo(){this.a=new Ln}jo.prototype.parseInit=function(b){var c=!1;(new S).G("moov",Mf).G("trak",Mf).G("mdia",Mf).G("minf",Mf).G("stbl",Mf).ca("stsd",Nf).G("stpp",function(b){c=!0;b.parser.stop()}).parse(b);if(!c)throw new D(2,2,2007);};jo.prototype.parseMedia=function(b,c){var d=!1,e=[];(new S).G("mdat",Of(function(b){d=!0;e=e.concat(this.a.parseMedia(b,c))}.bind(this))).parse(b);if(!d)throw new D(2,2,2007);return e};Vd['application/mp4; codecs="stpp"']=jo;
589
- Vd['application/mp4; codecs="stpp.TTML.im1t"']=jo;function ko(){}ko.prototype.parseInit=function(){};
590
- ko.prototype.parseMedia=function(b,c){var d=sc(b);d=d.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");d=d.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new D(2,2,2E3);var e=c.segmentStart;if(null==e&&(e=0,d[0].includes("X-TIMESTAMP-MAP"))){var f=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),g=d[0].match(/MPEGTS:(\d+)/m);if(f&&g){e=lo(new Kg(f[1]));if(null==e)throw new D(2,2,2E3);e=c.periodStart+(Number(g[1])/9E4-e)}}g=[];var h=d[0].split("\n");for(f=1;f<h.length;f++)if(/^Region:/.test(h[f])){var k=
591
- new Kg(h[f]),l=new Fd;Ng(k);Lg(k);for(var m=Ng(k);m;){var n=l,q=m;(m=/^id=(.*)$/.exec(q))?n.id=m[1]:(m=/^width=(\d{1,2}|100)%$/.exec(q))?n.width=Number(m[1]):(m=/^lines=(\d+)$/.exec(q))?(n.height=Number(m[1]),n.heightUnits=2):(m=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(q))?(n.regionAnchorX=Number(m[1]),n.regionAnchorY=Number(m[2])):(m=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(q))?(n.viewportAnchorX=Number(m[1]),n.viewportAnchorY=Number(m[2])):/^scroll=up$/.exec(q)&&(n.scroll=
592
- "up");Lg(k);m=Ng(k)}g.push(l)}f=[];for(k=1;k<d.length;k++){h=d[k].split("\n");m=h;q=e;h=g;if(1==m.length&&!m[0]||/^NOTE($|[ \t])/.test(m[0])||"STYLE"==m[0])h=null;else{l=null;m[0].includes("--\x3e")||(l=m[0],m.splice(0,1));n=new Kg(m[0]);var x=lo(n),w=Mg(n,/[ \t]+--\x3e[ \t]+/g),A=lo(n);if(null==x||null==w||null==A)throw new D(2,2,2001);m=new Dd(x+q,A+q,m.slice(1).join("\n").trim());Lg(n);for(q=Ng(n);q;)mo(m,q,h),Lg(n),q=Ng(n);null!=l&&(m.id=l);h=m}h&&f.push(h)}return f};
593
- function mo(b,c,d){var e;if(e=/^align:(start|middle|center|end|left|right)$/.exec(c))c=e[1],"middle"==c?b.textAlign=Hd:b.textAlign=Od[c.toUpperCase()];else if(e=/^vertical:(lr|rl)$/.exec(c))b.writingMode="lr"==e[1]?"vertical-lr":"vertical-rl";else if(e=/^size:([\d.]+)%$/.exec(c))b.size=Number(e[1]);else if(e=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(c))b.position=Number(e[1]),e[2]&&(c=e[2],b.positionAlign="line-left"==c||"start"==c?"line-left":"line-right"==c||"end"==
594
- c?"line-right":"center");else if(e=/^region:(.*)$/.exec(c)){if(c=no(d,e[1]))b.region=c}else if(d=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=1,b.line=Number(d[1]),d[2]&&(b.lineAlign=Qd[d[2].toUpperCase()]);else if(d=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=Jd,b.line=Number(d[1]),d[2]&&(b.lineAlign=Qd[d[2].toUpperCase()])}function no(b,c){var d=b.filter(function(b){return b.id==c});return d.length?d[0]:null}
595
- function lo(b){b=Mg(b,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g);if(null==b)return null;var c=Number(b[2]),d=Number(b[3]);return 59<c||59<d?null:Number(b[4])/1E3+d+60*c+3600*(Number(b[1])||0)}Vd["text/vtt"]=ko;Vd['text/vtt; codecs="vtt"']=ko;function oo(){this.a=null}oo.prototype.parseInit=function(b){var c=!1;(new S).G("moov",Mf).G("trak",Mf).G("mdia",Mf).ca("mdhd",function(b){0==b.version?(b.reader.J(4),b.reader.J(4),this.a=b.reader.D(),b.reader.J(4)):(b.reader.J(8),b.reader.J(8),this.a=b.reader.D(),b.reader.J(8));b.reader.J(4)}.bind(this)).G("minf",Mf).G("stbl",Mf).ca("stsd",Nf).G("wvtt",function(){c=!0}).parse(b);if(!this.a)throw new D(2,2,2008);if(!c)throw new D(2,2,2008);};
596
- oo.prototype.parseMedia=function(b,c){var d=this;if(!this.a)throw new D(2,2,2008);var e=0,f=[],g,h=[],k=!1,l=!1,m=!1,n=null;(new S).G("moof",Mf).G("traf",Mf).ca("tfdt",function(b){k=!0;e=0==b.version?b.reader.D():b.reader.ub()}).ca("tfhd",function(b){var c=b.flags;b=b.reader;b.J(4);c&1&&b.J(8);c&2&&b.J(4);n=c&8?b.D():null}).ca("trun",function(b){l=!0;var c=b.version,d=b.flags;b=b.reader;var e=b.D();d&1&&b.J(4);d&4&&b.J(4);for(var g=[],h=0;h<e;h++){var k={duration:null,sampleSize:null,kd:null};d&256&&
597
- (k.duration=b.D());d&512&&(k.sampleSize=b.D());d&1024&&b.J(4);d&2048&&(k.kd=0==c?b.D():b.Ud());g.push(k)}f=g}).G("mdat",Of(function(b){m=!0;g=b})).parse(b);if(!m&&!k&&!l)throw new D(2,2,2008);var q=e,x=new DataView(g.buffer,g.byteOffset,g.byteLength),w=new R(x,0);f.forEach(function(b){var f=b.duration||n,g=b.kd?e+b.kd:q;q=g+(f||0);var k=0;do{var l=w.D();k+=l;var m=w.D(),x=null;"vttc"==Pf(m)?8<l&&(x=w.Va(l-8)):w.J(l-8);f&&x&&h.push(po(x,c.periodStart+g/d.a,c.periodStart+q/d.a))}while(b.sampleSize&&
598
- k<b.sampleSize)});return h.filter(td.Da)};function po(b,c,d){var e,f,g;(new S).G("payl",Of(function(b){e=sc(b)})).G("iden",Of(function(b){f=sc(b)})).G("sttg",Of(function(b){g=sc(b)})).parse(b);return e?qo(e,f,g,c,d):null}function qo(b,c,d,e,f){b=new Dd(e,f,b);c&&(b.id=c);if(d)for(c=new Kg(d),d=Ng(c);d;)mo(b,d,[]),Lg(c),d=Ng(c);return b}Vd['application/mp4; codecs="wvtt"']=oo;z("shaka.util.Dom.createHTMLElement",function(b){return document.createElement(b)});z("shaka.util.Dom.createVideoElement",function(){var b=document.createElement("video");b.muted=!0;b.width=600;b.height=400;return b});z("shaka.util.Dom.asHTMLElement",function(b){return b});z("shaka.util.Dom.asHTMLMediaElement",function(b){return b});z("shaka.util.Dom.removeAllChildren",function(b){for(;b.firstChild;)b.removeChild(b.firstChild)});}).call(exportTo,innerGlobal,innerGlobal);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define!="undefined"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
572
+ e=!1);if(e){this.b=k;return}}d="Unsupported keySystem";if("org.w3.clearkey"==b||"com.widevine.alpha"==b)d="None of the requested configurations were supported.";d=Error(d);d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}Gn.prototype.createMediaKeys=function(){var b=new Jn(this.a);return Promise.resolve(b)};Gn.prototype.getConfiguration=function(){return this.b};function Jn(b){this.g=b;this.b=null;this.a=new L;this.c=[];this.f={}}
573
+ function In(b,c){b.b=c;b.a.Ya();var d=Dn;c&&(b.a.w(c,d+"needkey",b.tf.bind(b)),b.a.w(c,d+"keymessage",b.Zf.bind(b)),b.a.w(c,d+"keyadded",b.Xf.bind(b)),b.a.w(c,d+"keyerror",b.Yf.bind(b)))}p=Jn.prototype;p.createSession=function(b){b=b||"temporary";if("temporary"!=b&&"persistent-license"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");var c=this.b||document.createElement("video");c.src||(c.src="about:blank");b=new Kn(c,this.g,b);this.c.push(b);return b};
574
+ p.setServerCertificate=function(){return Promise.resolve(!1)};p.tf=function(b){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="webm";c.initData=b.initData;this.b.dispatchEvent(c)};p.Zf=function(b){var c=Ln(this,b.sessionId);c&&(b=new J("message",{messageType:void 0==c.keyStatuses.a?"licenserequest":"licenserenewal",message:b.message}),c.b&&(c.b.resolve(),c.b=null),c.dispatchEvent(b))};
575
+ p.Xf=function(b){if(b=Ln(this,b.sessionId))Mn(b,"usable"),b.a&&b.a.resolve(),b.a=null};p.Yf=function(b){var c=Ln(this,b.sessionId);c&&c.handleError(b)};function Ln(b,c){var d=b.f[c];return d?d:(d=b.c.shift())?(d.sessionId=c,b.f[c]=d):null}function Kn(b,c,d){Ib.call(this);this.f=b;this.h=!1;this.a=this.b=null;this.c=c;this.g=d;this.sessionId="";this.expiration=NaN;this.closed=new H;this.keyStatuses=new Nn}Ua(Kn,Ib);p=Kn.prototype;
576
+ p.handleError=function(b){var c=Error("EME v0.1b key error");c.errorCode=b.errorCode;c.errorCode.systemCode=b.systemCode;!b.sessionId&&this.b?(c.method="generateRequest",45==b.systemCode&&(c.message="Unsupported session type."),this.b.reject(c),this.b=null):b.sessionId&&this.a?(c.method="update",this.a.reject(c),this.a=null):(c=b.systemCode,b.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Mn(this,"output-restricted"):1==c?Mn(this,"expired"):Mn(this,"internal-error"))};
577
+ function On(b,c,d){if(b.h)return Promise.reject(Error("The session is already initialized."));b.h=!0;try{if("persistent-license"==b.g)if(d)var e=new Uint8Array(Dc("LOAD_SESSION|"+d));else{var f=Dc("PERSISTENT|"),g=new Uint8Array(f.byteLength+c.byteLength);g.set(new Uint8Array(f),0);g.set(new Uint8Array(c),f.byteLength);e=g}else e=new Uint8Array(c)}catch(k){return Promise.reject(k)}b.b=new H;var h=En("generateKeyRequest");try{b.f[h](b.c,e)}catch(k){if("InvalidStateError"!=k.name)return b.b=null,Promise.reject(k);
578
+ (new D(function(){try{b.f[h](b.c,e)}catch(l){b.b.reject(l),b.b=null}})).O(.01)}return b.b}
579
+ p.nd=function(b,c){if(this.a)this.a.then(this.nd.bind(this,b,c))["catch"](this.nd.bind(this,b,c));else{this.a=b;if("webkit-org.w3.clearkey"==this.c){var d=Ac(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null);d=Gc(e.keys[0].k);e=Gc(e.keys[0].kid)}else d=new Uint8Array(c),e=null;var f=En("addKey");try{this.f[f](this.c,d,e,this.sessionId)}catch(g){this.a.reject(g),this.a=null}}};
580
+ function Mn(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new J("keystatuseschange"))}p.generateRequest=function(b,c){return On(this,c,null)};p.load=function(b){return"persistent-license"==this.g?On(this,null,b):Promise.reject(Error("Not a persistent session."))};p.update=function(b){var c=new H;this.nd(c,b);return c};
581
+ p.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var b=En("cancelKeyRequest");try{this.f[b](this.c,this.sessionId)}catch(c){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};function Nn(){this.size=0;this.a=void 0}var Pn;p=Nn.prototype;p.forEach=function(b){this.a&&b(this.a,Pn)};p.get=function(b){if(this.has(b))return this.a};
582
+ p.has=function(b){var c=Pn;return this.a&&Jc(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
583
+ Tm(function(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Dn="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;Pn=(new Uint8Array([0])).buffer;navigator.requestMediaKeySystemAccess=Fn;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Hn;window.MediaKeys=Jn;window.MediaKeySystemAccess=
584
+ Gn}});function Qn(b){b=b.target;if("picture-in-picture"==b.webkitPresentationMode){document.pictureInPictureElement=b;var c=new Event("enterpictureinpicture");b.dispatchEvent(c)}else document.pictureInPictureElement==b&&(document.pictureInPictureElement=null),c=new Event("leavepictureinpicture"),b.dispatchEvent(c)}
585
+ function Rn(){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 Sn(){var b=document.pictureInPictureElement;return b?(b.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
586
+ Tm(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;b.requestPictureInPicture&&document.exitPictureInPicture||!b.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,b.requestPictureInPicture=Rn,document.exitPictureInPicture=Sn,document.addEventListener("webkitpresentationmodechanged",Qn,!0))}});Tm(function(){if(window.HTMLMediaElement){var b=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var c=b.apply(this);c&&c["catch"](function(){});return c}}});function Tn(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Tm(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;!b.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in b&&(b.getVideoPlaybackQuality=Tn)}});function Un(b,c,d){return new window.TextTrackCue(b,c,d)}function Vn(b,c,d){return new window.TextTrackCue(b+"-"+c+"-"+d,b,c,d)}Tm(function(){if(!window.VTTCue&&window.TextTrackCue){var b=TextTrackCue.length;if(3==b)window.VTTCue=Un;else if(6==b)window.VTTCue=Vn;else{try{var c=!!Un(1,2,"")}catch(d){c=!1}c&&(window.VTTCue=Un)}}});function Wn(){}Wn.prototype.parseInit=function(){};
587
+ Wn.prototype.parseMedia=function(b,c){var d=Ac(b),e=[],f=new DOMParser,g=null;try{g=f.parseFromString(d,"text/xml")}catch(Y){throw new G(2,2,2005);}if(g){if(g=g.getElementsByTagName("tt")[0]){var h=R.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","frameRate");var k=R.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","subFrameRate");var l=R.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier");var m=R.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","tickRate");
588
+ d=g.getAttribute("xml:space")||"default";f=g.getAttribute("tts:extent")}else throw new G(2,2,2005);if("default"!=d&&"preserve"!=d)throw new G(2,2,2005);d="default"==d;h=new Xn(h,k,l,m);k=Yn(g.getElementsByTagName("metadata")[0]);l=Yn(g.getElementsByTagName("styling")[0]);m=Yn(g.getElementsByTagName("layout")[0]);for(var n=[],q=0;q<m.length;q++){var w=m[q],x=l,B=f;var C=new Kd;var E=w.getAttribute("xml:id");if(E){C.id=E;E=null;B&&(E=Zn.exec(B)||$n.exec(B));B=E?Number(E[1]):null;E=E?Number(E[2]):null;
589
+ var F,V;if(F=ao(w,x,"extent"))F=(V=Zn.exec(F))||$n.exec(F),null!=F&&(C.width=null!=B?100*Number(F[1])/B:Number(F[1]),C.height=null!=E?100*Number(F[2])/E:Number(F[2]),C.widthUnits=V||null!=B?Xd:0,C.heightUnits=V||null!=E?Xd:0);if(w=ao(w,x,"origin"))F=(V=Zn.exec(w))||$n.exec(w),null!=F&&(C.viewportAnchorX=null!=E?100*Number(F[1])/E:Number(F[1]),C.viewportAnchorY=null!=B?100*Number(F[2])/B:Number(F[2]),C.viewportAnchorUnits=V||null!=B?Xd:0)}else C=null;C&&n.push(C)}f=Yn(g.getElementsByTagName("body")[0]);
590
+ for(g=0;g<f.length;g++)(q=bo(f[g],c.periodStart,h,k,l,m,n,d))&&e.push(q)}return e};
591
+ var Zn=/^(\d{1,2}|100)% (\d{1,2}|100)%$/,co=/^(\d+px|\d+em)$/,$n=/^(\d+)px (\d+)px$/,eo=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,fo=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,go=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,ho=/^(\d*(?:\.\d*)?)f$/,io=/^(\d*(?:\.\d*)?)t$/,jo=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,ko={left:Pd,center:"center",right:"end",start:Pd,end:"end"},lo={left:"line-left",center:"center",right:"line-right"};
592
+ function Yn(b){var c=[];if(!b)return c;for(var d=b.childNodes,e=0;e<d.length;e++){var f="span"==d[e].nodeName&&"p"==b.nodeName;d[e].nodeType!=Node.ELEMENT_NODE||"br"==d[e].nodeName||f||(f=Yn(d[e]),c=c.concat(f))}c.length||c.push(b);return c}function mo(b,c){for(var d=b.childNodes,e=0;e<d.length;e++)if("br"==d[e].nodeName&&0<e)d[e-1].textContent+="\n";else if(0<d[e].childNodes.length)mo(d[e],c);else if(c){var f=d[e].textContent.trim();f=f.replace(/\s+/g," ");d[e].textContent=f}}
593
+ function bo(b,c,d,e,f,g,h,k){if(!b.hasAttribute("begin")&&!b.hasAttribute("end")&&/^\s*$/.test(b.textContent))return null;mo(b,k);k=no(b.getAttribute("begin"),d);var l=no(b.getAttribute("end"),d);d=no(b.getAttribute("dur"),d);var m=b.textContent;null==l&&null!=d&&(l=k+d);if(null==k||null==l)throw new G(2,2,2001);c=new Id(k+c,l+c,m);if((g=oo(b,"region",g,""))&&g.getAttribute("xml:id")){var n=g.getAttribute("xml:id");h=h.filter(function(b){return b.id==n});c.region=h[0]}e=oo(b,"smpte:backgroundImage",
594
+ e,"#");po(c,b,g,e,f);return c}
595
+ function po(b,c,d,e,f){"rtl"==qo(c,d,f,"direction")&&(b.direction="rtl");var g=qo(c,d,f,"writingMode");"tb"==g||"tblr"==g?b.writingMode="vertical-lr":"tbrl"==g?b.writingMode="vertical-rl":"rltb"==g||"rl"==g?b.direction="rtl":g&&(b.direction=Jd);if(g=qo(c,d,f,"textAlign"))b.positionAlign=lo[g],b.lineAlign=ko[g],b.textAlign=Td[g.toUpperCase()];if(g=qo(c,d,f,"displayAlign"))b.displayAlign=Ud[g.toUpperCase()];if(g=qo(c,d,f,"color"))b.color=g;if(g=qo(c,d,f,"backgroundColor"))b.backgroundColor=g;if(g=qo(c,
596
+ d,f,"fontFamily"))b.fontFamily=g;(g=qo(c,d,f,"fontWeight"))&&"bold"==g&&(b.fontWeight=700);(g=qo(c,d,f,"wrapOption"))&&"noWrap"==g&&(b.wrapLine=!1);(g=qo(c,d,f,"lineHeight"))&&g.match(co)&&(b.lineHeight=g);(g=qo(c,d,f,"fontSize"))&&g.match(co)&&(b.fontSize=g);if(g=qo(c,d,f,"fontStyle"))b.fontStyle=Wd[g.toUpperCase()];if(e){g=e.getAttribute("imagetype");var h=e.getAttribute("encoding");e=e.textContent.trim();"PNG"==g&&"Base64"==h&&e&&(b.backgroundImage="data:image/png;base64,"+e)}(d=ao(d,f,"textDecoration"))&&
597
+ ro(b,d);(c=so(c,f,"textDecoration"))&&ro(b,c)}
598
+ function ro(b,c){for(var d=c.split(" "),e=0;e<d.length;e++)switch(d[e]){case "underline":b.textDecoration.includes("underline")||b.textDecoration.push("underline");break;case "noUnderline":b.textDecoration.includes("underline")&&Lb(b.textDecoration,"underline");break;case "lineThrough":b.textDecoration.includes("lineThrough")||b.textDecoration.push("lineThrough");break;case "noLineThrough":b.textDecoration.includes("lineThrough")&&Lb(b.textDecoration,"lineThrough");break;case "overline":b.textDecoration.includes("overline")||
599
+ b.textDecoration.push("overline");break;case "noOverline":b.textDecoration.includes("overline")&&Lb(b.textDecoration,"overline")}}function qo(b,c,d,e){return(b=so(b,d,e))?b:ao(c,d,e)}function ao(b,c,d){for(var e=Yn(b),f=0;f<e.length;f++){var g=R.getAttributeNS(e[f],"http://www.w3.org/ns/ttml#styling",d);if(g)return g}return(b=oo(b,"style",c,""))?R.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}
600
+ function so(b,c,d){return(b=oo(b,"style",c,""))?R.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}function oo(b,c,d,e){if(!b||1>d.length)return null;var f=null,g=b;for(b=null;g&&!(b=g.getAttribute(c))&&(g=g.parentNode,g instanceof Element););if(c=b)for(b=0;b<d.length;b++)if(e+d[b].getAttribute("xml:id")==c){f=d[b];break}return f}
601
+ function no(b,c){var d=null;if(eo.test(b)){d=eo.exec(b);var e=Number(d[1]),f=Number(d[2]),g=Number(d[3]),h=Number(d[4]);h+=(Number(d[5])||0)/c.b;g+=h/c.frameRate;d=g+60*f+3600*e}else fo.test(b)?d=to(fo,b):go.test(b)?d=to(go,b):ho.test(b)?(d=ho.exec(b),d=Number(d[1])/c.frameRate):io.test(b)?(d=io.exec(b),d=Number(d[1])/c.a):jo.test(b)&&(d=to(jo,b));return d}
602
+ function to(b,c){var d=b.exec(c);return null==d||""==d[0]?null:(Number(d[4])||0)/1E3+(Number(d[3])||0)+60*(Number(d[2])||0)+3600*(Number(d[1])||0)}function Xn(b,c,d,e){this.frameRate=Number(b)||30;this.b=Number(c)||1;this.a=Number(e);0==this.a&&(this.a=b?this.frameRate*this.b:1);d&&(b=/^(\d+) (\d+)$/g.exec(d))&&(this.frameRate*=Number(b[1])/Number(b[2]))}$d["application/ttml+xml"]=Wn;function uo(){this.a=new Wn}uo.prototype.parseInit=function(b){var c=!1;(new Q).H("moov",Hf).H("trak",Hf).H("mdia",Hf).H("minf",Hf).H("stbl",Hf).fa("stsd",If).H("stpp",function(b){c=!0;b.parser.stop()}).parse(b);if(!c)throw new G(2,2,2007);};uo.prototype.parseMedia=function(b,c){var d=!1,e=[];(new Q).H("mdat",Jf(function(b){d=!0;e=e.concat(this.a.parseMedia(b,c))}.bind(this))).parse(b);if(!d)throw new G(2,2,2007);return e};$d['application/mp4; codecs="stpp"']=uo;
603
+ $d['application/mp4; codecs="stpp.TTML.im1t"']=uo;function vo(){}vo.prototype.parseInit=function(){};
604
+ vo.prototype.parseMedia=function(b,c){var d=Ac(b);d=d.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");d=d.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new G(2,2,2E3);var e=c.segmentStart;if(null==e&&(e=0,d[0].includes("X-TIMESTAMP-MAP"))){var f=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),g=d[0].match(/MPEGTS:(\d+)/m);if(f&&g){e=wo(new Wg(f[1]));if(null==e)throw new G(2,2,2E3);e=c.periodStart+(Number(g[1])/9E4-e)}}g=[];var h=d[0].split("\n");for(f=1;f<h.length;f++)if(/^Region:/.test(h[f])){var k=
605
+ new Wg(h[f]),l=new Kd;Zg(k);Xg(k);for(var m=Zg(k);m;){var n=l,q=m;(m=/^id=(.*)$/.exec(q))?n.id=m[1]:(m=/^width=(\d{1,2}|100)%$/.exec(q))?n.width=Number(m[1]):(m=/^lines=(\d+)$/.exec(q))?(n.height=Number(m[1]),n.heightUnits=2):(m=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(q))?(n.regionAnchorX=Number(m[1]),n.regionAnchorY=Number(m[2])):(m=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(q))?(n.viewportAnchorX=Number(m[1]),n.viewportAnchorY=Number(m[2])):/^scroll=up$/.exec(q)&&(n.scroll=
606
+ "up");Xg(k);m=Zg(k)}g.push(l)}f=[];for(k=1;k<d.length;k++){h=d[k].split("\n");m=h;q=e;h=g;if(1==m.length&&!m[0]||/^NOTE($|[ \t])/.test(m[0])||"STYLE"==m[0])h=null;else{l=null;m[0].includes("--\x3e")||(l=m[0],m.splice(0,1));n=new Wg(m[0]);var w=wo(n),x=Yg(n,/[ \t]+--\x3e[ \t]+/g),B=wo(n);if(null==w||null==x||null==B)throw new G(2,2,2001);m=new Id(w+q,B+q,m.slice(1).join("\n").trim());Xg(n);for(q=Zg(n);q;)xo(m,q,h),Xg(n),q=Zg(n);null!=l&&(m.id=l);h=m}h&&f.push(h)}return f};
607
+ function xo(b,c,d){var e;if(e=/^align:(start|middle|center|end|left|right)$/.exec(c))c=e[1],"middle"==c?b.textAlign=Md:b.textAlign=Td[c.toUpperCase()];else if(e=/^vertical:(lr|rl)$/.exec(c))b.writingMode="lr"==e[1]?"vertical-lr":"vertical-rl";else if(e=/^size:([\d.]+)%$/.exec(c))b.size=Number(e[1]);else if(e=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(c))b.position=Number(e[1]),e[2]&&(c=e[2],b.positionAlign="line-left"==c||"start"==c?"line-left":"line-right"==c||"end"==
608
+ c?"line-right":"center");else if(e=/^region:(.*)$/.exec(c)){if(c=yo(d,e[1]))b.region=c}else if(d=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=1,b.line=Number(d[1]),d[2]&&(b.lineAlign=Vd[d[2].toUpperCase()]);else if(d=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=Od,b.line=Number(d[1]),d[2]&&(b.lineAlign=Vd[d[2].toUpperCase()])}function yo(b,c){var d=b.filter(function(b){return b.id==c});return d.length?d[0]:null}
609
+ function wo(b){b=Yg(b,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g);if(null==b)return null;var c=Number(b[2]),d=Number(b[3]);return 59<c||59<d?null:Number(b[4])/1E3+d+60*c+3600*(Number(b[1])||0)}$d["text/vtt"]=vo;$d['text/vtt; codecs="vtt"']=vo;function zo(){this.a=null}zo.prototype.parseInit=function(b){var c=!1;(new Q).H("moov",Hf).H("trak",Hf).H("mdia",Hf).fa("mdhd",function(b){0==b.version?(b.reader.L(4),b.reader.L(4),this.a=b.reader.F(),b.reader.L(4)):(b.reader.L(8),b.reader.L(8),this.a=b.reader.F(),b.reader.L(8));b.reader.L(4)}.bind(this)).H("minf",Hf).H("stbl",Hf).fa("stsd",If).H("wvtt",function(){c=!0}).parse(b);if(!this.a)throw new G(2,2,2008);if(!c)throw new G(2,2,2008);};
610
+ zo.prototype.parseMedia=function(b,c){var d=this;if(!this.a)throw new G(2,2,2008);var e=0,f=[],g,h=[],k=!1,l=!1,m=!1,n=null;(new Q).H("moof",Hf).H("traf",Hf).fa("tfdt",function(b){k=!0;e=0==b.version?b.reader.F():b.reader.yb()}).fa("tfhd",function(b){var c=b.flags;b=b.reader;b.L(4);c&1&&b.L(8);c&2&&b.L(4);n=c&8?b.F():null}).fa("trun",function(b){l=!0;var c=b.version,d=b.flags;b=b.reader;var e=b.F();d&1&&b.L(4);d&4&&b.L(4);for(var g=[],h=0;h<e;h++){var k={duration:null,sampleSize:null,pd:null};d&256&&
611
+ (k.duration=b.F());d&512&&(k.sampleSize=b.F());d&1024&&b.L(4);d&2048&&(k.pd=0==c?b.F():b.Xd());g.push(k)}f=g}).H("mdat",Jf(function(b){m=!0;g=b})).parse(b);if(!m&&!k&&!l)throw new G(2,2,2008);var q=e,w=new DataView(g.buffer,g.byteOffset,g.byteLength),x=new P(w,0);f.forEach(function(b){var f=b.duration||n,g=b.pd?e+b.pd:q;q=g+(f||0);var k=0;do{var l=x.F();k+=l;var m=x.F(),w=null;"vttc"==Kf(m)?8<l&&(w=x.Xa(l-8)):x.L(l-8);f&&w&&h.push(Ao(w,c.periodStart+g/d.a,c.periodStart+q/d.a))}while(b.sampleSize&&
612
+ k<b.sampleSize)});return h.filter(zd.Ga)};function Ao(b,c,d){var e,f,g;(new Q).H("payl",Jf(function(b){e=Ac(b)})).H("iden",Jf(function(b){f=Ac(b)})).H("sttg",Jf(function(b){g=Ac(b)})).parse(b);return e?Bo(e,f,g,c,d):null}function Bo(b,c,d,e,f){b=new Id(e,f,b);c&&(b.id=c);if(d)for(c=new Wg(d),d=Zg(c);d;)xo(b,d,[]),Xg(c),d=Zg(c);return b}$d['application/mp4; codecs="wvtt"']=zo;A("shaka.util.Dom.createHTMLElement",function(b){return document.createElement(b)});A("shaka.util.Dom.createVideoElement",function(){var b=document.createElement("video");b.muted=!0;b.width=600;b.height=400;return b});A("shaka.util.Dom.asHTMLElement",function(b){return b});A("shaka.util.Dom.asHTMLMediaElement",function(b){return b});A("shaka.util.Dom.removeAllChildren",function(b){for(;b.firstChild;)b.removeChild(b.firstChild)});}).call(exportTo,innerGlobal,innerGlobal);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define!="undefined"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
599
613
 
600
614
  //# sourceMappingURL=shaka-player.compiled.map