shaka-player 3.3.7 → 3.3.8

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 (119) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/CONTRIBUTORS +2 -0
  3. package/README.md +20 -6
  4. package/demo/index.html +0 -2
  5. package/dist/controls.css +1 -1
  6. package/dist/deps.js +2 -2
  7. package/dist/locales.js +30 -30
  8. package/dist/shaka-player.compiled.d.ts +11 -0
  9. package/dist/shaka-player.compiled.debug.d.ts +11 -0
  10. package/dist/shaka-player.compiled.debug.externs.js +48 -37
  11. package/dist/shaka-player.compiled.debug.js +31 -26
  12. package/dist/shaka-player.compiled.debug.map +4 -4
  13. package/dist/shaka-player.compiled.externs.js +48 -37
  14. package/dist/shaka-player.compiled.js +761 -760
  15. package/dist/shaka-player.compiled.map +4 -4
  16. package/dist/shaka-player.ui.d.ts +11 -0
  17. package/dist/shaka-player.ui.debug.d.ts +11 -0
  18. package/dist/shaka-player.ui.debug.externs.js +48 -37
  19. package/dist/shaka-player.ui.debug.js +33 -28
  20. package/dist/shaka-player.ui.debug.map +4 -4
  21. package/dist/shaka-player.ui.externs.js +48 -37
  22. package/dist/shaka-player.ui.js +876 -875
  23. package/dist/shaka-player.ui.map +4 -4
  24. package/docs/tutorials/welcome.md +6 -3
  25. package/lib/dash/dash_parser.js +5 -0
  26. package/lib/hls/hls_parser.js +6 -2
  27. package/lib/media/presentation_timeline.js +24 -1
  28. package/lib/player.js +1 -1
  29. package/lib/polyfill/media_capabilities.js +1 -0
  30. package/lib/polyfill/videoplaybackquality.js +3 -1
  31. package/lib/util/platform.js +41 -1
  32. package/lib/util/string_utils.js +56 -14
  33. package/maintained-branches.md +15 -0
  34. package/package.json +2 -4
  35. package/app-engine/README.md +0 -9
  36. package/app-engine/demo-version-index/README.md +0 -14
  37. package/app-engine/demo-version-index/app.yaml +0 -2
  38. package/app-engine/demo-version-index/main.py +0 -162
  39. package/app-engine/demo-version-index/requirements.txt +0 -6
  40. package/app-engine/demo-version-index/templates/index.html +0 -114
  41. package/app-engine/shaka-player-demo/README.md +0 -18
  42. package/app-engine/shaka-player-demo/app.yaml +0 -61
  43. package/app-engine/shaka-player-demo/main.py +0 -95
  44. package/app-engine/shaka-player-demo/posters/10yo.png +0 -0
  45. package/app-engine/shaka-player-demo/posters/10yo.xcf +0 -0
  46. package/app-engine/shaka-player-demo/posters/1yo.jpg +0 -0
  47. package/app-engine/shaka-player-demo/posters/2yo.png +0 -0
  48. package/app-engine/shaka-player-demo/posters/2yo.xcf +0 -0
  49. package/app-engine/shaka-player-demo/posters/3yo.png +0 -0
  50. package/app-engine/shaka-player-demo/posters/3yo.xcf +0 -0
  51. package/app-engine/shaka-player-demo/posters/4yo.png +0 -0
  52. package/app-engine/shaka-player-demo/posters/4yo.xcf +0 -0
  53. package/app-engine/shaka-player-demo/posters/5yo.png +0 -0
  54. package/app-engine/shaka-player-demo/posters/5yo.xcf +0 -0
  55. package/app-engine/shaka-player-demo/posters/6yo.png +0 -0
  56. package/app-engine/shaka-player-demo/posters/6yo.xcf +0 -0
  57. package/app-engine/shaka-player-demo/posters/7yo.png +0 -0
  58. package/app-engine/shaka-player-demo/posters/7yo.xcf +0 -0
  59. package/app-engine/shaka-player-demo/posters/8yo.png +0 -0
  60. package/app-engine/shaka-player-demo/posters/8yo.xcf +0 -0
  61. package/app-engine/shaka-player-demo/posters/9yo.png +0 -0
  62. package/app-engine/shaka-player-demo/posters/9yo.xcf +0 -0
  63. package/app-engine/shaka-player-demo/posters/audioOnly.gif +0 -0
  64. package/app-engine/shaka-player-demo/posters/audioRickRoll.gif +0 -0
  65. package/app-engine/shaka-player-demo/posters/colorbars.gif +0 -0
  66. package/app-engine/shaka-player-demo/posters/fireworks.jpg +0 -0
  67. package/app-engine/shaka-player-demo/posters/party-hat.png +0 -0
  68. package/app-engine/shaka-player-demo/posters/sources.txt +0 -46
  69. package/app-engine/shaka-player-demo/posters/standard.png +0 -0
  70. package/app-engine/shaka-player-demo/posters/trek.jpg +0 -0
  71. package/app-engine/shaka-player-demo/posters/valentines.png +0 -0
  72. package/app-engine/shaka-player-demo/posters/zombie.jpg +0 -0
  73. package/app-engine/shaka-player-demo/posters.py +0 -110
  74. package/app-engine/shaka-player-demo/requirements.txt +0 -5
  75. package/app-engine/shaka-player-demo/time.txt +0 -1
  76. package/build/README.md +0 -127
  77. package/build/__init__.py +0 -0
  78. package/build/all.py +0 -150
  79. package/build/apps.py +0 -186
  80. package/build/build.py +0 -392
  81. package/build/check.py +0 -354
  82. package/build/checkversion.py +0 -84
  83. package/build/compiler.py +0 -513
  84. package/build/conformance.textproto +0 -335
  85. package/build/docker/Dockerfile +0 -20
  86. package/build/docker/docker-compose.yml +0 -10
  87. package/build/docs.py +0 -54
  88. package/build/eslint-plugin-shaka-rules/arg-comment-spacing.js +0 -72
  89. package/build/eslint-plugin-shaka-rules/index.js +0 -24
  90. package/build/eslint-plugin-shaka-rules/package.json +0 -7
  91. package/build/eslint-plugin-shaka-rules/private.js +0 -109
  92. package/build/gendeps.py +0 -71
  93. package/build/generateExterns.js +0 -867
  94. package/build/generateLocalizations.py +0 -262
  95. package/build/generateTsDefs.py +0 -137
  96. package/build/install-linux-prereqs.sh +0 -136
  97. package/build/license-header +0 -5
  98. package/build/misspellings.txt +0 -38
  99. package/build/pixelsChanged.js +0 -35
  100. package/build/shaka-lab.yaml +0 -163
  101. package/build/shakaBuildHelpers.py +0 -356
  102. package/build/stats.py +0 -816
  103. package/build/subprocessWindowsPatch.py +0 -103
  104. package/build/test.py +0 -541
  105. package/build/types/ads +0 -8
  106. package/build/types/cast +0 -6
  107. package/build/types/cea +0 -13
  108. package/build/types/complete +0 -9
  109. package/build/types/core +0 -108
  110. package/build/types/dash +0 -8
  111. package/build/types/hls +0 -9
  112. package/build/types/manifests +0 -5
  113. package/build/types/networking +0 -6
  114. package/build/types/offline +0 -22
  115. package/build/types/polyfill +0 -21
  116. package/build/types/text +0 -11
  117. package/build/types/ui +0 -39
  118. package/build/updateScreenshots.py +0 -85
  119. package/build/wrapper.template.js +0 -52
@@ -15,11 +15,11 @@ fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
15
15
  fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
16
  function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ia(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var la="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ma;
17
17
  if("function"==typeof Object.setPrototypeOf)ma=Object.setPrototypeOf;else{var na;a:{var oa={a:!0},pa={};try{pa.__proto__=oa;na=pa.a;break a}catch(a){}na=!1}ma=na?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=ma;
18
- function u(a,b){a.prototype=la(b.prototype);a.prototype.constructor=a;if(qa)qa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Ji=b.prototype}function ra(){this.A=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function sa(a){if(a.A)throw new TypeError("Generator is already running");a.A=!0}ra.prototype.B=function(a){this.h=a};
19
- function ta(a,b){a.i={We:b,hf:!0};a.g=a.m||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function z(a,b,c){a.g=c;return{value:b}}ra.prototype.D=function(a){this.g=a};function C(a){a.g=0}function E(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b,c){a.g=b;a.m=c||0}function I(a,b){a.m=b||0;var c=a.i.We;a.i=null;return c}function wa(a){a.C=[a.i];a.m=0;a.j=0}
20
- function xa(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.hf?a.g=a.m||a.j:void 0!=c.D&&a.j<c.D?(a.g=c.D,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new ra;this.h=a}function za(a,b){sa(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ba(a)}
18
+ function u(a,b){a.prototype=la(b.prototype);a.prototype.constructor=a;if(qa)qa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Ki=b.prototype}function ra(){this.A=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function sa(a){if(a.A)throw new TypeError("Generator is already running");a.A=!0}ra.prototype.B=function(a){this.h=a};
19
+ function ta(a,b){a.i={Xe:b,jf:!0};a.g=a.m||a.j}ra.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function z(a,b,c){a.g=c;return{value:b}}ra.prototype.D=function(a){this.g=a};function C(a){a.g=0}function E(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b,c){a.g=b;a.m=c||0}function I(a,b){a.m=b||0;var c=a.i.Xe;a.i=null;return c}function wa(a){a.C=[a.i];a.m=0;a.j=0}
20
+ function xa(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.jf?a.g=a.m||a.j:void 0!=c.D&&a.j<c.D?(a.g=c.D,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new ra;this.h=a}function za(a,b){sa(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ba(a)}
21
21
  function Aa(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.A=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Ba(a)}a.g.l=null;d.call(a.g,f);return Ba(a)}
22
- function Ba(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.A=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.A=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.hf)throw b.We;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
22
+ function Ba(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.A=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.A=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.jf)throw b.Xe;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
23
  function Ca(a){this.next=function(b){sa(a.g);a.g.l?b=Aa(a,a.g.l.next,b,a.g.B):(a.g.B(b),b=Ba(a));return b};this["throw"]=function(b){sa(a.g);a.g.l?b=Aa(a,a.g.l["throw"],b,a.g.B):(ta(a.g,b),b=Ba(a));return b};this["return"]=function(b){return za(a,b)};this[Symbol.iterator]=function(){return this}}
24
24
  function Ea(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function M(a){return Ea(new Ca(new ya(a)))}function Fa(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
25
25
  fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.A=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
@@ -40,7 +40,7 @@ m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.ite
40
40
  fa("Set",function(a){function b(c){this.g=new Map;if(c){c=r(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(r([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
41
41
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
42
42
  b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});fa("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});
43
- function Ja(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{df:e,v:f}}return{df:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ja(this,b,c).df}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
43
+ function Ja(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{ef:e,v:f}}return{ef:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ja(this,b,c).ef}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
44
44
  fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});function Ka(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
45
45
  fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ka(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ja(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Ka(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});
46
46
  var La="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ga(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||La});fa("Array.prototype.values",function(a){return a?a:function(){return Ha(this,function(b,c){return c})}});
@@ -79,7 +79,7 @@ CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033
79
79
  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,SERVER_CERTIFICATE_REQUEST_FAILED:6017,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,
80
80
  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,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,
81
81
  CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function yb(a,b){this.g=a;this.h=b}yb.prototype.toString=function(){return"v"+this.g+"."+this.h};function zb(a,b){var c=new yb(4,0),d=Ab,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Bb(a,b,c,d){Sa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Cb(a,b,c,d){Ra([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Ab=null;function Db(a,b){return a.concat(b)}function Eb(){}function Fb(a){return null!=a}function Gb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(zb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){zb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Hb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new jb(d)});return a.map(function(d){return new jb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Db,[]).map(function(d){return d.toString()})}function Ib(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
82
- function Jb(a,b){if(1==b.length)return b[0];var c=Kb(a,b);if(null!=c)return c;throw new P(2,4,4025,b);}function Kb(a,b){for(var c=r(Lb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Mb?"":null}var Mb="text",Nb={gb:"video",Fb:"audio",oa:Mb,wc:"image",lh:"application"},Lb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ob(){}function Pb(a,b){a=Qb(a);b=Qb(b);return a.split("-")[0]==b.split("-")[0]}function Rb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Sb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Qb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Tb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Ub(a,b){var c=Vb(a),d=Vb(b);return a!=c&&b!=d&&c==d}
82
+ function Jb(a,b){if(1==b.length)return b[0];var c=Kb(a,b);if(null!=c)return c;throw new P(2,4,4025,b);}function Kb(a,b){for(var c=r(Lb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Mb?"":null}var Mb="text",Nb={gb:"video",Fb:"audio",oa:Mb,wc:"image",mh:"application"},Lb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ob(){}function Pb(a,b){a=Qb(a);b=Qb(b);return a.split("-")[0]==b.split("-")[0]}function Rb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Sb(a,b){a=Qb(a);b=Qb(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Qb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Tb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Ub(a,b){var c=Vb(a),d=Vb(b);return a!=c&&b!=d&&c==d}
83
83
  function Wb(a,b){a=Qb(a);b=Qb(b);return b==a?4:Rb(b,a)?3:Sb(b,a)?2:Rb(a,b)?1:0}function Vb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Tb.get(a)||a}function Xb(a){return a.language?Qb(a.language):a.audio&&a.audio.language?Qb(a.audio.language):a.video&&a.video.language?Qb(a.video.language):"und"}
84
84
  function Yb(a,b){for(var c=Qb(a),d=new Set,e=r(b),f=e.next();!f.done;f=e.next())d.add(Qb(f.value));e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Rb(f,c))return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Sb(f,c))return f;d=r(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Rb(c,f))return f;return null}N("shaka.util.LanguageUtils",Ob);Ob.findClosestLocale=Yb;Ob.getLocaleForVariant=Xb;
85
85
  Ob.getLocaleForText=function(a){return Qb(a.language||"und")};Ob.getBase=Vb;Ob.relatedness=Wb;Ob.areSiblings=Ub;Ob.normalize=Qb;Ob.isSiblingOf=Sb;Ob.isParentOf=Rb;Ob.areLanguageCompatible=Pb;Ob.areLocaleCompatible=function(a,b){a=Qb(a);b=Qb(b);return a==b};
@@ -89,827 +89,828 @@ var Tb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
89
89
  "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",
90
90
  "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",
91
91
  "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Zb(a){cb.call(this);this.j=Qb(a);this.i=new Map;this.g=new Set;this.h=new Map}u(Zb,cb);q=Zb.prototype;q.release=function(){cb.prototype.release.call(this)};
92
- q.Oe=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Qb(c.value));$b(this);a=hb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new O("unknown-locales",(new Map).set("locales",a)));a=hb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new O("locale-changed",a))};
93
- q.ea=function(a,b,c){a=Qb(a);void 0===c&&(c=bc);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=bc||d.set(f,e)});this.h.set(a,d);$b(this);this.dispatchEvent(new O("locale-updated"));return this};q.Vg=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new O("unknown-localization",a));return""};
92
+ q.Pe=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Qb(c.value));$b(this);a=hb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new O("unknown-locales",(new Map).set("locales",a)));a=hb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new O("locale-changed",a))};
93
+ q.ea=function(a,b,c){a=Qb(a);void 0===c&&(c=bc);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=bc||d.set(f,e)});this.h.set(a,d);$b(this);this.dispatchEvent(new O("locale-updated"));return this};q.Wg=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new O("unknown-localization",a));return""};
94
94
  function $b(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=r(d),h=g.next();!h.done;f={Xb:f.Xb},h=g.next()){f.Xb=h.value;e.add(f.Xb);e.add(Vb(f.Xb));h=hb(b.keys(),function(l){return function(m){return Ub(m,l.Xb)}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=hb(b.keys(),function(l){return function(m){return Vb(m)==l.Xb}}(f));h.sort();k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=r(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
95
95
  c.reverse();a.i.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=r(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,cc(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new O("missing-localizations",d)))}function cc(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}N("shaka.ui.Localization",Zb);Zb.prototype.resolve=Zb.prototype.resolve;
96
- Zb.prototype.resolveDictionary=Zb.prototype.Vg;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Oe;Zb.prototype.release=Zb.prototype.release;var bc=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:bc};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={AD_PROGRESS:"AD_PROGRESS",di:"RESOLUTION",kh:"AIRPLAY",Bh:"EXIT_FULL_SCREEN",Ef:"SUBTITLE_FORCED",Ke:"LIVE",Oh:"MORE_SETTINGS",Zh:"PAUSE",ii:"SEEK",ei:"REWIND",ci:"REPLAY",yh:"ENTER_PICTURE_IN_PICTURE",jh:"AD_TIME",zi:"UNDETERMINED_LANGUAGE",ih:"AD_DURATION",Gh:"FAST_FORWARD",Uh:"OFF",Vh:"ON",$h:"PICTURE_IN_PICTURE",Ph:"MULTIPLE_LANGUAGES",Qh:"MUTE",Ai:"UNMUTE",Dh:"EXIT_PICTURE_IN_PICTURE",mh:"AUTO_QUALITY",Bi:"UNRECOGNIZED_LANGUAGE",ai:"PLAY",Kh:"LOOP",Th:"NOT_APPLICABLE",BACK:"BACK",bi:"PLAYBACK_RATE",
97
- Ch:"EXIT_LOOP_MODE",ki:"SKIP_TO_LIVE",mi:"STATISTICS",xh:"ENTER_LOOP_MODE",Hh:"FULL_SCREEN",Di:"VOLUME",Jh:"LANGUAGE",qh:"CAPTIONS",rh:"CAST",ji:"SKIP_AD"};function ec(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}ec.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function fc(a){return a.h/(1-Math.pow(a.g,a.i))};function gc(){this.h=new ec(2);this.j=new ec(5);this.g=0;this.i=128E3;this.l=16E3}gc.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};gc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};gc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(fc(this.h),fc(this.j))};function hc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ic(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function jc(a,b,c){c||(c=hc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Ed:d.Ed},e=a.next()){d.Ed=e.value;e=b.findIndex(function(f){return function(g){return c(f.Ed,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
96
+ Zb.prototype.resolveDictionary=Zb.prototype.Wg;Zb.prototype.insert=Zb.prototype.ea;Zb.prototype.changeLocale=Zb.prototype.Pe;Zb.prototype.release=Zb.prototype.release;var bc=1;Zb.ConflictResolution={USE_OLD:0,USE_NEW:bc};Zb.UNKNOWN_LOCALES="unknown-locales";Zb.UNKNOWN_LOCALIZATION="unknown-localization";Zb.MISSING_LOCALIZATIONS="missing-localizations";Zb.LOCALE_CHANGED="locale-changed";Zb.LOCALE_UPDATED="locale-updated";var dc={Eh:"EXIT_PICTURE_IN_PICTURE",Rh:"MUTE",lh:"AIRPLAY",Ai:"UNDETERMINED_LANGUAGE",Ei:"VOLUME",nh:"AUTO_QUALITY",jh:"AD_DURATION",Ih:"FULL_SCREEN",di:"REPLAY",ni:"STATISTICS",AD_PROGRESS:"AD_PROGRESS",Ff:"SUBTITLE_FORCED",Hh:"FAST_FORWARD",ki:"SKIP_AD",BACK:"BACK",bi:"PLAY",$h:"PAUSE",ai:"PICTURE_IN_PICTURE",Qh:"MULTIPLE_LANGUAGES",Wh:"ON",ei:"RESOLUTION",Uh:"NOT_APPLICABLE",Kh:"LANGUAGE",yh:"ENTER_LOOP_MODE",gi:"REWIND",Bi:"UNMUTE",li:"SKIP_TO_LIVE",rh:"CAPTIONS",ji:"SEEK",Le:"LIVE",ci:"PLAYBACK_RATE",
97
+ sh:"CAST",Dh:"EXIT_LOOP_MODE",Ah:"ENTER_PICTURE_IN_PICTURE",Lh:"LOOP",kh:"AD_TIME",Ch:"EXIT_FULL_SCREEN",Vh:"OFF",Ci:"UNRECOGNIZED_LANGUAGE",Ph:"MORE_SETTINGS"};function ec(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}ec.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function fc(a){return a.h/(1-Math.pow(a.g,a.i))};function gc(){this.h=new ec(2);this.j=new ec(5);this.g=0;this.i=128E3;this.l=16E3}gc.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};gc.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};gc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(fc(this.h),fc(this.j))};function hc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ic(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function jc(a,b,c){c||(c=hc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Ed:d.Ed},e=a.next()){d.Ed=e.value;e=b.findIndex(function(f){return function(g){return c(f.Ed,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
98
98
  function kc(a,b,c){c||(c=hc);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function lc(a,b,c){this.startTime=a;this.direction=mc;this.endTime=b;this.payload=c;this.region=new nc;this.position=null;this.positionAlign=oc;this.size=0;this.textAlign=pc;this.writingMode=qc;this.lineInterpretation=rc;this.line=null;this.lineHeight="";this.lineAlign=sc;this.displayAlign=tc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=uc;this.fontStyle=vc;this.linePadding=this.letterSpacing=this.fontFamily=
99
99
  "";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}lc.prototype.clone=function(){var a=new lc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
100
100
  function wc(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!kc(a.nestedCues,b.nestedCues,wc))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!kc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}N("shaka.text.Cue",lc);var oc="auto";
101
101
  lc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:oc};var pc="center",xc={LEFT:"left",RIGHT:"right",CENTER:pc,START:"start",END:"end"};lc.textAlign=xc;var tc="after",yc={BEFORE:"before",CENTER:"center",AFTER:tc};lc.displayAlign=yc;var mc="ltr";lc.direction={HORIZONTAL_LEFT_TO_RIGHT:mc,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var qc="horizontal-tb";lc.writingMode={HORIZONTAL_TOP_TO_BOTTOM:qc,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var rc=0;
102
102
  lc.lineInterpretation={LINE_NUMBER:rc,PERCENTAGE:1};var sc="start",zc={CENTER:"center",START:sc,END:"end"};lc.lineAlign=zc;var Ac={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};lc.defaultTextColor=Ac;var Bc={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};lc.defaultTextBackgroundColor=Bc;var uc=400;lc.fontWeight={NORMAL:uc,BOLD:700};
103
103
  var vc="normal",Cc={NORMAL:vc,ITALIC:"italic",OBLIQUE:"oblique"};lc.fontStyle=Cc;lc.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function nc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Dc;this.scroll=Ec}N("shaka.text.CueRegion",nc);var Dc=1;nc.units={PX:0,PERCENTAGE:Dc,LINES:2};var Ec="";nc.scrollMode={NONE:Ec,UP:"up"};function Fc(){}function Gc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Hc(a)==Hc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Ic(a),d=Ic(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Hc(a){return a instanceof ArrayBuffer?a:a.buffer}function Jc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
104
- function Ic(a,b,c){c=void 0===c?Infinity:c;return Kc(a,void 0===b?0:b,c,Uint8Array)}function Lc(a,b,c){c=void 0===c?Infinity:c;return Kc(a,void 0===b?0:b,c,DataView)}function Kc(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Hc(a),b,Math.min(b+Math.max(c,0),e)-b)}N("shaka.util.BufferUtils",Fc);Fc.toDataView=Lc;Fc.toUint8=Ic;Fc.toArrayBuffer=Jc;Fc.equal=Gc;function Mc(){}N("shaka.dependencies",Mc);Mc.has=function(a){return Nc.has(a)};Mc.add=function(a,b){if(!Oc[a])throw Error(a+" is not supported");Nc.set(a,function(){return b})};var Oc={muxjs:"muxjs"};Mc.Allowed=Oc;var Nc=new Map([["muxjs",function(){return window.muxjs}]]);function Pc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Pc.prototype.resolve=function(){};Pc.prototype.reject=function(){};function Qc(a){this.h=a;this.g=void 0}Qc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Rc(){}function Tc(a){if(!a)return"";a=Ic(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=(new TextDecoder).decode(a);a.includes("\ufffd")&&Ra('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!');return a}function Uc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new P(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Lc(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Vc.value()(d)}
105
- function Wc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Ic(a);if(239==c[0]&&187==c[1]&&191==c[2])return Tc(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);if(0==c[0]&&0==c[2])return Uc(a,!1);if(0==c[1]&&0==c[3])return Uc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Tc(a);throw new P(2,2,2003);}function Xc(a){var b=new TextEncoder;return Jc(b.encode(a))}
106
- function Yc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}N("shaka.util.StringUtils",Rc);Rc.resetFromCharCode=function(){Vc.g=void 0};Rc.toUTF16=Yc;Rc.toUTF8=Xc;Rc.fromBytesAutoDetect=Wc;Rc.fromUTF16=Uc;Rc.fromUTF8=Tc;
107
- var Vc=new Qc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={ub:65536};0<b.ub;b={ub:b.ub},b.ub/=2)if(a(b.ub))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.ub)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.ub));return e}}(b);return null});function Zc(){}function $c(a){a=Ic(a);a=Vc.value()(a);return btoa(a)}function ad(a,b){b=void 0==b?!0:b;var c=$c(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function bd(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function cd(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
108
- function dd(a){var b=Ic(a);a="";b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function ed(){for(var a=Fa.apply(0,arguments),b=0,c=r(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Ic(d),c),c+=d.byteLength;return b}N("shaka.util.Uint8ArrayUtils",Zc);Zc.concat=ed;Zc.toHex=dd;Zc.fromHex=cd;Zc.fromBase64=bd;Zc.toBase64=ad;Zc.toStandardBase64=$c;
109
- Zc.equal=function(a,b){zb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Gc(a,b)};function fd(){var a=this;this.A=Nc.get("muxjs")();this.g=new this.A.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(ed(b.initSegment,b.data))});this.g.on("done",function(){var b={data:ed.apply(Zc,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}fd.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
110
- function gd(a,b){if(!Nc.get("muxjs")()||!hd(a))return!1;if(b)return MediaSource.isTypeSupported(id(b,a));var c=id("audio",a),d=id("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function hd(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
111
- function id(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function jd(a,b){a.l=!0;a.h=new Pc;a.m=[];a.j=[];a.i=[];var c=Ic(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new P(2,3,3018));return a.h};function kd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function ld(a,b,c){a=kd(a,b);if(hd(a)){if(Nc.get("muxjs")())return id(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
112
- function md(a){var b=nd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
113
- case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function od(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function nd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
114
- (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function pd(a){this.l=null;this.i=a;this.j=this.C=0;this.m=Infinity;this.h=this.g=null;this.B="";this.A=new Map}function qd(a){return rd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}pd.prototype.destroy=function(){this.i=this.l=null;this.A.clear();return Promise.resolve()};
115
- function sd(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g)return z(h,Promise.resolve(),2);if(!a.l||!a.i)return h["return"]();if(null==c||null==d)return a.l.parseInit(Ic(b)),h["return"]();e={periodStart:a.C,segmentStart:c,segmentEnd:d};f=a.l.parseMedia(Ic(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.m});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.m);C(h)})}
116
- pd.prototype.remove=function(a,b){var c=this;return M(function(d){if(1==d.g)return z(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));C(d)})};function td(a,b,c){a.j=b;a.m=c}function ud(a,b,c){a.B=b;if(b=a.A.get(b))for(var d=r(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
117
- function vd(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new lc(c.startTime,c.endTime,c.text)});return b}function wd(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())wd(a,d.value,c)}
118
- function xd(a,b,c,d,e){var f=c+" "+d,g=new Map;b=r(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);wd(a,k,e);k.startTime>=a.j&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.B&&a.i.append([k]))}e=r(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.A.has(f)||a.A.set(f,new Map),b=r(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.A.get(f).set(h,k);a.g=null==a.g?Math.max(c,
119
- a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.m))}N("shaka.text.TextEngine",pd);pd.prototype.destroy=pd.prototype.destroy;pd.findParser=function(a){return rd[a]};pd.unregisterParser=function(a){delete rd[a]};pd.registerParser=function(a,b){rd[a]=b};var rd={};function yd(a){this.h=a;this.g=null}yd.prototype.S=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};yd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Q(a){this.h=a;this.g=null}Q.prototype.za=function(){this.stop();this.h();return this};Q.prototype.S=function(a){var b=this;this.stop();this.g=(new yd(function(){b.h()})).S(a);return this};Q.prototype.ha=function(a){var b=this;this.stop();this.g=(new yd(function(){b.g.S(a);b.h()})).S(a);return this};Q.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};N("shaka.util.Timer",Q);Q.prototype.stop=Q.prototype.stop;Q.prototype.tickEvery=Q.prototype.ha;Q.prototype.tickAfter=Q.prototype.S;
120
- Q.prototype.tickNow=Q.prototype.za;function zd(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Ad(a){return""!=Bd().canPlayType(a)}function Cd(){return Ed("Xbox One")}function Fd(){return Ed("Tizen")}function Gd(){return Ed("CrKey")}function Hd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Fd()}function Id(){if(!Hd())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}
121
- function Ed(a){return(navigator.userAgent||"").includes(a)}function Bd(){if(Jd)return Jd;Kd||(Kd=new Q(function(){Jd=null}));(Jd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Jd=document.createElement("video"));Kd.S(1);return Jd}var Kd=null,Jd=null;function Ld(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Md(f,b,c);f=Nd(f,d);b=Od(f);b=Pd(b);var g=Qd(b,e);a.variants=a.variants.filter(function(h){return Rd(h)==g?!0:!1})}function Od(a){var b=new ab;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Rd(c);b.push(d,c)}return b}
122
- function Pd(a){var b=0,c=new Map,d=a.size();bb(a,function(e,f){for(var g=r(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new ab);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
123
- function Md(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={Pd:d.Pd},e=b.next())if(d.Pd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Pd)}}(d)),e.length){a=e;break}d={};c=r(c);for(b=c.next();!b.done;d={Bd:d.Bd},b=c.next())if(d.Bd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Bd)}}(d)),b.length){a=b;break}return a}
124
- function Qd(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Sd||d==Td){if(a=Ud(a,d),1==a.size())return a.keys()[0]}else if(d==Vd)break;return Wd(a)}function Ud(a,b){var c=0,d=new ab;bb(a,function(e,f){for(var g=0,h=0,k=r(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
125
- function Wd(a){var b="",c=Infinity;bb(a,function(d,e){for(var f=0,g=0,h=r(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Rd(a){var b="";a.video&&(b=md(a.video.codecs));var c="";a.audio&&(c=md(a.audio.codecs));return b+"-"+c}function Xd(a,b,c){a.variants=a.variants.filter(function(d){return Yd(d,b,c)})}
126
- function Yd(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
127
- function Zd(a,b){return M(function(c){if(1==c.g)return z(c,$d(b,0<b.offlineSessionIds.length),2);ae(a,b);be(b);ce(b);C(c)})}
128
- function $d(a,b){return M(function(c){if(1==c.g)return z(c,de(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=ee(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Jb("video",g);g=Jb("audio",g);g=ld(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=ld(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=fe(f.codecs),f=ld(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(Cd()&&e&&(e.width&&
129
- 1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Wa(ge(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Wa(ge(d));return e});C(c)})}
130
- function de(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;return M(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,w){var x;return M(function(D){if(1==D.g)return E(D,2),z(D,e.decodingInfo(w),4);if(2!=D.g)return x=D.h,y.decodingInfos.push(x),va(D,0);I(D);JSON.stringify(w);C(D)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=he(l,b,c),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,f.push(g(l,t));return z(v,Promise.all(f),
104
+ function Ic(a,b,c){c=void 0===c?Infinity:c;return Kc(a,void 0===b?0:b,c,Uint8Array)}function Lc(a,b,c){c=void 0===c?Infinity:c;return Kc(a,void 0===b?0:b,c,DataView)}function Kc(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Hc(a),b,Math.min(b+Math.max(c,0),e)-b)}N("shaka.util.BufferUtils",Fc);Fc.toDataView=Lc;Fc.toUint8=Ic;Fc.toArrayBuffer=Jc;Fc.equal=Gc;function Mc(){}N("shaka.dependencies",Mc);Mc.has=function(a){return Nc.has(a)};Mc.add=function(a,b){if(!Oc[a])throw Error(a+" is not supported");Nc.set(a,function(){return b})};var Oc={muxjs:"muxjs"};Mc.Allowed=Oc;var Nc=new Map([["muxjs",function(){return window.muxjs}]]);function Pc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Pc.prototype.resolve=function(){};Pc.prototype.reject=function(){};function Qc(a){this.h=a;this.g=void 0}Qc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Rc(a){this.h=a;this.g=null}Rc.prototype.S=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};Rc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Q(a){this.h=a;this.g=null}Q.prototype.za=function(){this.stop();this.h();return this};Q.prototype.S=function(a){var b=this;this.stop();this.g=(new Rc(function(){b.h()})).S(a);return this};Q.prototype.ha=function(a){var b=this;this.stop();this.g=(new Rc(function(){b.g.S(a);b.h()})).S(a);return this};Q.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};N("shaka.util.Timer",Q);Q.prototype.stop=Q.prototype.stop;Q.prototype.tickEvery=Q.prototype.ha;Q.prototype.tickAfter=Q.prototype.S;
105
+ Q.prototype.tickNow=Q.prototype.za;function Tc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Uc(a){return""!=Vc().canPlayType(a)}function Wc(){return Xc("Xbox One")}function Yc(){return Xc("Tizen")}function Zc(){return Xc("CrKey")}function $c(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Yc()&&!Xc("PC=EOS")&&!ad()}function ad(){return Xc("PlayStation 4")}
106
+ function bd(){if(!$c())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function Xc(a){return(navigator.userAgent||"").includes(a)}function Vc(){if(cd)return cd;dd||(dd=new Q(function(){cd=null}));(cd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(cd=document.createElement("video"));dd.S(1);return cd}var dd=null,cd=null;function ed(){}function fd(a){if(!a)return"";a=Ic(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!ad())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ra('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;a=gd(a);a=escape(a);try{return decodeURIComponent(a)}catch(b){throw new P(2,2,2004);}}
107
+ function hd(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new P(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Lc(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return gd(d)}
108
+ function id(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Ic(a);if(239==c[0]&&187==c[1]&&191==c[2])return fd(c);if(254==c[0]&&255==c[1])return hd(c.subarray(2),!1);if(255==c[0]&&254==c[1])return hd(c.subarray(2),!0);if(0==c[0]&&0==c[2])return hd(a,!1);if(0==c[1]&&0==c[3])return hd(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return fd(a);throw new P(2,2,2003);}
109
+ function jd(a){if(window.TextEncoder&&!ad()){var b=new TextEncoder;return Jc(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Jc(b)}function kd(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function gd(a){return ld.value()(a)}N("shaka.util.StringUtils",ed);ed.resetFromCharCode=function(){ld.g=void 0};ed.toUTF16=kd;ed.toUTF8=jd;
110
+ ed.fromBytesAutoDetect=id;ed.fromUTF16=hd;ed.fromUTF8=fd;var ld=new Qc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={ub:65536};0<b.ub;b={ub:b.ub},b.ub/=2)if(a(b.ub))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.ub)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.ub));return e}}(b);return null});function md(){}function nd(a){a=gd(Ic(a));return btoa(a)}function od(a,b){b=void 0==b?!0:b;var c=nd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function pd(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function qd(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
111
+ function rd(a){var b=Ic(a);a="";b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function sd(){for(var a=Fa.apply(0,arguments),b=0,c=r(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Ic(d),c),c+=d.byteLength;return b}N("shaka.util.Uint8ArrayUtils",md);md.concat=sd;md.toHex=rd;md.fromHex=qd;md.fromBase64=pd;md.toBase64=od;md.toStandardBase64=nd;
112
+ md.equal=function(a,b){zb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Gc(a,b)};function td(){var a=this;this.A=Nc.get("muxjs")();this.g=new this.A.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(sd(b.initSegment,b.data))});this.g.on("done",function(){var b={data:sd.apply(md,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}td.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
113
+ function ud(a,b){if(!Nc.get("muxjs")()||!vd(a))return!1;if(b)return MediaSource.isTypeSupported(wd(b,a));var c=wd("audio",a),d=wd("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function vd(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
114
+ function wd(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function xd(a,b){a.l=!0;a.h=new Pc;a.m=[];a.j=[];a.i=[];var c=Ic(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new P(2,3,3018));return a.h};function yd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function zd(a,b,c){a=yd(a,b);if(vd(a)){if(Nc.get("muxjs")())return wd(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
115
+ function Ad(a){var b=Bd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
116
+ case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function Cd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Bd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
117
+ (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Ed(a){this.l=null;this.i=a;this.j=this.C=0;this.m=Infinity;this.h=this.g=null;this.B="";this.A=new Map}function Fd(a){return Gd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Ed.prototype.destroy=function(){this.i=this.l=null;this.A.clear();return Promise.resolve()};
118
+ function Hd(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g)return z(h,Promise.resolve(),2);if(!a.l||!a.i)return h["return"]();if(null==c||null==d)return a.l.parseInit(Ic(b)),h["return"]();e={periodStart:a.C,segmentStart:c,segmentEnd:d};f=a.l.parseMedia(Ic(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.m});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.m);C(h)})}
119
+ Ed.prototype.remove=function(a,b){var c=this;return M(function(d){if(1==d.g)return z(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));C(d)})};function Id(a,b,c){a.j=b;a.m=c}function Jd(a,b,c){a.B=b;if(b=a.A.get(b))for(var d=r(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
120
+ function Kd(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new lc(c.startTime,c.endTime,c.text)});return b}function Ld(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Ld(a,d.value,c)}
121
+ function Md(a,b,c,d,e){var f=c+" "+d,g=new Map;b=r(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Ld(a,k,e);k.startTime>=a.j&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.B&&a.i.append([k]))}e=r(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.A.has(f)||a.A.set(f,new Map),b=r(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.A.get(f).set(h,k);a.g=null==a.g?Math.max(c,
122
+ a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.m))}N("shaka.text.TextEngine",Ed);Ed.prototype.destroy=Ed.prototype.destroy;Ed.findParser=function(a){return Gd[a]};Ed.unregisterParser=function(a){delete Gd[a]};Ed.registerParser=function(a,b){Gd[a]=b};var Gd={};function Nd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Od(f,b,c);f=Pd(f,d);b=Qd(f);b=Rd(b);var g=Sd(b,e);a.variants=a.variants.filter(function(h){return Td(h)==g?!0:!1})}function Qd(a){var b=new ab;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Td(c);b.push(d,c)}return b}
123
+ function Rd(a){var b=0,c=new Map,d=a.size();bb(a,function(e,f){for(var g=r(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new ab);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
124
+ function Od(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={Pd:d.Pd},e=b.next())if(d.Pd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Pd)}}(d)),e.length){a=e;break}d={};c=r(c);for(b=c.next();!b.done;d={Bd:d.Bd},b=c.next())if(d.Bd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Bd)}}(d)),b.length){a=b;break}return a}
125
+ function Sd(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Ud||d==Vd){if(a=Wd(a,d),1==a.size())return a.keys()[0]}else if(d==Xd)break;return Yd(a)}function Wd(a,b){var c=0,d=new ab;bb(a,function(e,f){for(var g=0,h=0,k=r(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
126
+ function Yd(a){var b="",c=Infinity;bb(a,function(d,e){for(var f=0,g=0,h=r(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Td(a){var b="";a.video&&(b=Ad(a.video.codecs));var c="";a.audio&&(c=Ad(a.audio.codecs));return b+"-"+c}function Zd(a,b,c){a.variants=a.variants.filter(function(d){return $d(d,b,c)})}
127
+ function $d(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
128
+ function ae(a,b){return M(function(c){if(1==c.g)return z(c,be(b,0<b.offlineSessionIds.length),2);ce(a,b);de(b);ee(b);C(c)})}
129
+ function be(a,b){return M(function(c){if(1==c.g)return z(c,fe(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=ge(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Jb("video",g);g=Jb("audio",g);g=zd(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=zd(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=he(f.codecs),f=zd(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(Wc()&&e&&(e.width&&
130
+ 1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Wa(ie(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Wa(ie(d));return e});C(c)})}
131
+ function fe(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;return M(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,w){var x;return M(function(D){if(1==D.g)return E(D,2),z(D,e.decodingInfo(w),4);if(2!=D.g)return x=D.h,y.decodingInfos.push(x),va(D,0);I(D);JSON.stringify(w);C(D)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=je(l,b,c),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,f.push(g(l,t));return z(v,Promise.all(f),
131
132
  0)})}
132
- function he(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Jb("video",g);f=ee(f);g=Jb("audio",g);g=ld(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=ee(f);f=ld(e.mimeType,f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
133
- break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=fe(d.codecs),f=ld(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
133
+ function je(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Jb("video",g);f=ge(f);g=Jb("audio",g);g=zd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=ge(f);f=zd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
134
+ break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=he(d.codecs),f=zd(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
134
135
  f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=r(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,t=r(h.initData),v=t.next();!v.done;v=t.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
135
- (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function fe(a){return Fd()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
136
- function ee(a){return"vp9"==a?"vp09.00.10.08":a}function ae(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!ie(d,a.audio)||c&&a&&a.video&&!ie(c,a.video)?!1:!0})}function be(a){a.textStreams=a.textStreams.filter(function(b){return qd(kd(b.mimeType,b.codecs))})}function ce(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(Ed("Web0S")||Fd()||Gd())&&c.push("image/webp");return c.includes(b.mimeType)})}
137
- function ie(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
138
- function je(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=r(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=r(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
136
+ (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function he(a){return Yc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
137
+ function ge(a){return"vp9"==a?"vp09.00.10.08":a}function ce(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!ke(d,a.audio)||c&&a&&a.video&&!ke(c,a.video)?!1:!0})}function de(a){a.textStreams=a.textStreams.filter(function(b){return Fd(yd(b.mimeType,b.codecs))})}function ee(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(Xc("Web0S")||Yc()||Zc())&&c.push("image/webp");return c.includes(b.mimeType)})}
138
+ function ke(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
139
+ function le(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=r(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=r(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
139
140
  frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||
140
141
  null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles);return a}
141
- function ke(a){return{id:a.id,active:!1,type:Mb,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
142
+ function me(a){return{id:a.id,active:!1,type:Mb,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
142
143
  originalTextId:a.originalId,originalImageId:null}}
143
- function le(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,
144
- audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function me(a){a.__shaka_id||(a.__shaka_id=ne++);return a.__shaka_id}
145
- function oe(a){var b=pe(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function qe(a){var b=pe(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
146
- function pe(a){return{id:me(a),active:!1,type:"",bandwidth:0,language:Qb(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null}}
147
- function re(a){return a.allowedByApplication&&a.allowedByKeySystem}function se(a){return a.filter(function(b){return re(b)})}
148
- function Nd(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=r(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ia(e))):d.get(Math.min.apply(Math,ia(c)))}
149
- function te(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=Yb(Qb(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Qb(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=ue(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(Db,[]);return a.length?
150
- ue(e,a[0]):e}function ue(a,b){return a.filter(function(c){return c.roles.includes(b)})}function ge(a){var b=[];a.audio&&b.push(ve(a.audio));a.video&&b.push(ve(a.video));return b.join(", ")}
151
- function ve(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}var ne=0,Sd="smooth",Td="powerEfficient",Vd="bandwidth";function we(){var a=this;this.l=null;this.i=!1;this.h=new gc;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.i){a.h=new gc;a.g&&a.h.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.j=[];this.A=1;this.B=!1;this.g=this.m=null}q=we.prototype;q.stop=function(){this.l=null;this.i=!1;this.j=[];this.A=1;this.m=null};q.init=function(a){this.l=a};
152
- q.chooseVariant=function(){var a=xe(this.g.restrictions,this.j),b=this.h.getBandwidthEstimate(ye(this));this.j.length&&!a.length&&(a=xe(null,this.j),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.A)?1:Math.abs(this.A),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.m=Date.now();return c};
153
- q.enable=function(){this.i=!0};q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.i)a:{if(!this.B){var c=this.h;if(!(c.g>=c.i))break a;this.B=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(ye(this));c&&this.l(c)}};q.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(ye(this))};q.setVariants=function(a){this.j=a};q.playbackRateChanged=function(a){this.A=a};
154
- q.configure=function(a){this.g=a;this.h&&this.g&&this.h.configure(this.g.advanced)};function ye(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function xe(a,b){a&&(b=b.filter(function(c){return Yd(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}N("shaka.abr.SimpleAbrManager",we);we.prototype.configure=we.prototype.configure;
155
- we.prototype.playbackRateChanged=we.prototype.playbackRateChanged;we.prototype.setVariants=we.prototype.setVariants;we.prototype.getBandwidthEstimate=we.prototype.getBandwidthEstimate;we.prototype.segmentDownloaded=we.prototype.segmentDownloaded;we.prototype.disable=we.prototype.disable;we.prototype.enable=we.prototype.enable;we.prototype.chooseVariant=we.prototype.chooseVariant;we.prototype.init=we.prototype.init;we.prototype.stop=we.prototype.stop;function ze(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=r(b),d=c.next();!d.done;d=c.next())this.add(d.value)}ze.prototype.add=function(a){return Ae(this.h,a)?(this.g.add(a),!0):!1};
156
- function Ae(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&Be(c,d)&&Ce(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(Be(c,d)&&Ce(c.roles,d.roles)));return c?!1:!0}ze.prototype.values=function(){return this.g.values()};
157
- function Be(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return nd(f)[0]}),d=b.codecs.split(",").map(function(f){return nd(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function Ce(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=r(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function De(a){this.g=a;this.h=new Ee(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}De.prototype.create=function(a){var b=this,c=a.filter(function(d){return Ae(b.g,d)});return c.length?new ze(c[0],c):this.h.create(a)};function Ee(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
158
- Ee.prototype.create=function(a){var b=[];b=Ge(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=He(b,this.j);a.length&&(b=a);this.g&&(a=Nd(b,this.g),a.length&&(b=a));this.h&&(a=Ie(b,this.h),a.length&&(b=a));a=new ze(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,Ae(a.h,c)&&a.add(c);return a};function Ge(a,b){var c=Qb(b),d=Yb(c,a.map(function(e){return Xb(e)}));return d?a.filter(function(e){return d==Xb(e)}):[]}
159
- function He(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Ie(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Je(){this.g=Ke;this.h=(new Map).set(Ke,2).set(Le,1)}function Me(a,b,c){a.h.set(Ke,c).set(Le,b)}var Le=0,Ke=1;function Ne(a,b){var c=Oe();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.A=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
160
- function Pe(a){var b,c;return M(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.A);return z(d,new Promise(function(e){(new Q(e)).S(c/1E3)}),2)}a.h*=a.m;C(d)})}function Oe(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Qe(a,b){this.promise=a;this.i=b;this.g=!1}function Re(a){return new Qe(Promise.reject(a),function(){return Promise.resolve()})}function Se(){var a=Promise.reject(new P(2,7,7001));a["catch"](function(){});return new Qe(a,function(){return Promise.resolve()})}function Te(a){return new Qe(Promise.resolve(a),function(){return Promise.resolve()})}function Ue(a){return new Qe(a,function(){return a["catch"](function(){})})}Qe.prototype.abort=function(){this.g=!0;return this.i()};
161
- function Ve(a){return new Qe(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Qe.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
162
- Qe.prototype.qa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=We(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Pc,g=new P(2,7,7001);this.promise.then(c(!0),c(!1));return new Qe(f,function(){return d()})};
163
- function We(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}N("shaka.util.AbortableOperation",Qe);Qe.prototype.chain=Qe.prototype.qa;Qe.prototype["finally"]=Qe.prototype["finally"];Qe.all=Ve;Qe.prototype.abort=Qe.prototype.abort;Qe.notAbortable=Ue;Qe.completed=Te;Qe.aborted=Se;Qe.failed=Re;function Xe(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Ye(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ze(){this.g=[]}function $e(a,b){a.g.push(b["finally"](function(){ic(a.g,b)}))}Ze.prototype.destroy=function(){for(var a=[],b=r(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function af(a,b,c){cb.call(this);this.i=!1;this.m=new Ze;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.A=!1}u(af,cb);q=af.prototype;q.qe=function(a){this.A=a};function bf(a,b,c,d){c=c||cf;var e=df[a];if(!e||c>=e.priority)df[a]={priority:c,Mg:b,Ng:void 0===d?!1:d}}q.Og=function(a){this.g.add(a)};q.dh=function(a){this.g["delete"](a)};q.Mf=function(){this.g.clear()};q.Pg=function(a){this.h.add(a)};q.eh=function(a){this.h["delete"](a)};q.Nf=function(){this.h.clear()};
164
- function ef(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();cb.prototype.release.call(this);return this.m.destroy()};
165
- q.request=function(a,b){var c=this,d=new ff;if(this.i){var e=Promise.reject(new P(2,7,7001));e["catch"](function(){});return new gf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Xe(b.retryParameters):Oe();b.uris=Xe(b.uris);e=hf(this,a,b);var f=e.qa(function(){return jf(c,a,b,new Ne(b.retryParameters,!1),0,null,d)}),g=f.qa(function(n){return kf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
166
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.qa(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.zg||!c.l||t.fromCache||a!=lf||c.l(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new gf(m.promise,function(){return m.abort()},d);$e(this.m,e);return e};
167
- function hf(a,b,c){var d=Te(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Kd:e.Kd},f=a.next())e.Kd=f.value,d=d.qa(function(g){return function(){c.body&&(c.body=Jc(c.body));return g.Kd(b,c)}}(e));return d.qa(void 0,function(g){if(g instanceof P&&7001==g.code)throw g;throw new P(2,1,1006,g);})}
168
- function jf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Va,l=!1;k||(k=location.protocol,k=k.slice(0,-1),kb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=df[k])?k.Mg:null;if(!m)return Re(new P(2,1,1E3,h));var n=k.Ng,p=null,t=null,v=!1,y=!1,w;return Ue(Pe(d)).qa(function(){if(a.i)return Se();w=Date.now();var x=m(c.uris[e],c,b,function(A,F,G){p&&p.stop();t&&t.S(B/1E3);a.l&&b==lf&&(a.l(A,F),l=!0,g.g=G)},function(A){a.j&&a.j(A,c,b);y=!0});
169
- if(!n)return x;var D=c.retryParameters.connectionTimeout;D&&(p=new Q(function(){v=!0;x.abort()}),p.S(D/1E3));var B=c.retryParameters.stallTimeout;B&&(t=new Q(function(){v=!0;x.abort()}));return x}).qa(function(x){p&&p.stop();t&&t.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-w);var D={response:x,zg:l};!y&&a.j&&a.j(x.headers,c,b);return D},function(x){p&&p.stop();t&&t.stop();if(a.B){var D=null,B=0;x instanceof P&&(D=x,1001==x.code&&(B=x.data[1]));a.B(c,D,B,v)}if(a.i)return Se();v&&(x=new P(1,1,1003,
170
- c.uris[e],b));if(x instanceof P){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return D=(new Map).set("error",x),D=new O("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,jf(a,b,c,d,e,x,g)}throw x;})}
171
- function kf(a,b,c){var d=Te(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Ld:e.Ld},f=a.next())e.Ld=f.value,d=d.qa(function(g){return function(){var h=c.response;h.data&&(h.data=Jc(h.data));return g.Ld(b,h)}}(e));return d.qa(function(){return c},function(g){var h=2;if(g instanceof P){if(7001==g.code)throw g;h=g.severity}throw new P(h,1,1007,g);})}N("shaka.net.NetworkingEngine",af);af.prototype.request=af.prototype.request;af.prototype.destroy=af.prototype.destroy;af.makeRequest=ef;
172
- af.defaultRetryParameters=function(){return Oe()};af.prototype.clearAllResponseFilters=af.prototype.Nf;af.prototype.unregisterResponseFilter=af.prototype.eh;af.prototype.registerResponseFilter=af.prototype.Pg;af.prototype.clearAllRequestFilters=af.prototype.Mf;af.prototype.unregisterRequestFilter=af.prototype.dh;af.prototype.registerRequestFilter=af.prototype.Og;af.unregisterScheme=function(a){delete df[a]};af.registerScheme=bf;af.prototype.setForceHTTPS=af.prototype.qe;function ff(){this.g=0}
173
- af.NumBytesRemainingClass=ff;function gf(a,b,c){Qe.call(this,a,b);this.h=c}u(gf,Qe);af.PendingRequest=gf;var lf=1;af.RequestType={MANIFEST:0,SEGMENT:lf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var cf=3;af.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:cf};var df={};function mf(a){this.g=!1;this.h=new Pc;this.i=a}mf.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function nf(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function of(){this.g=new ab}q=of.prototype;q.release=function(){this.rb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new pf(a,b,c,d),this.g.push(b,a))};q.Ga=function(a,b,c,d){function e(g){f.nc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.nc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.nc(),this.g.remove(b,e))}};
174
- q.rb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.nc();this.g.g={}}};N("shaka.util.EventManager",of);of.prototype.removeAll=of.prototype.rb;of.prototype.unlisten=of.prototype.nc;of.prototype.listenOnce=of.prototype.Ga;of.prototype.listen=of.prototype.o;of.prototype.release=of.prototype.release;function pf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=qf(a,d);this.target.addEventListener(b,c,this.g)}
175
- pf.prototype.nc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function qf(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return rf(a)?b:b.capture||!1}
176
- function rf(a){var b=sf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}sf=b}return b||!1}var sf=void 0;function tf(){}function uf(a){a=Wc(a);return(new jb(a)).Ya}function vf(a,b,c){function d(h){Lc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ic(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(2,6,6015);var e;"string"==typeof b?e=Yc(b,!0):e=b;a=Wc(a);a=Yc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}N("shaka.util.FairPlayUtils",tf);tf.initDataTransform=vf;tf.defaultGetContentId=uf;function wf(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function xf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function yf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=r(a),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function zf(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.H=new Set;this.l=this.B=null;this.aa=this.Z=!1;this.I=0;this.g=null;this.A=new of;this.i=new Map;this.F=[];this.C=new Pc;this.h=null;this.m=function(d){c.C.reject(d);a.onError(d)};this.ba=new Map;this.$=new Map;this.R=new Q(function(){return Af(c)});this.K=!1;this.J=[];this.N=!1;this.va=(new Q(function(){Bf(c)})).ha(b);this.C["catch"](function(){});this.j=new mf(function(){return Cf(c)});this.W=!1}q=zf.prototype;q.destroy=function(){return this.j.destroy()};
177
- function Cf(a){return M(function(b){switch(b.g){case 1:return a.A.release(),a.A=null,a.C.reject(),a.va.stop(),a.va=null,a.R.stop(),a.R=null,z(b,Df(a),2);case 2:if(!a.l){b.D(3);break}E(b,4);return z(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:I(b);case 5:a.l=null;case 3:a.g=null,a.H.clear(),a.B=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.W=!1,C(b)}})}q.configure=function(a){this.h=a};function Ef(a,b,c){a.aa=!0;a.F=[];a.K=c;return Ff(a,b)}
178
- function Gf(a,b,c){a.F=c;a.K=0<c.length;return Ff(a,b)}function Hf(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return If(a,g,[])}
179
- function Ff(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;return M(function(w){if(1==w.g){if(c=Jf(a))for(d=r(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(x){return x.video&&x.video.drmInfos.length||x.audio&&x.audio.drmInfos.length?!0:!1});g||(h=wf(a.h.servers),Kf(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Lf(l),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,Mf(t,wf(a.h.servers),wf(a.h.advanced||{}));return z(w,
180
- de(b,a.K,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.Z=!0,w["return"](Promise.resolve());y=If(a,void 0,b);return w["return"](g?y:y["catch"](function(){}))})}
181
- q.xc=function(a){var b=this,c,d;return M(function(e){if(1==e.g){if(!b.B)return b.A.Ga(a,"encrypted",function(){b.m(new P(2,6,6010))}),e["return"]();b.l=a;b.A.Ga(b.l,"play",function(){for(var f=r(b.J),g=f.next();!g.done;g=f.next())Nf(b,g.value);b.N=!0;b.J=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.A.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Df(b)});c=b.l.setMediaKeys(b.B);c=c["catch"](function(f){return Promise.reject(new P(2,6,6003,f.message))});return z(e,
182
- c,2)}nf(b.j);Of(b);b.g.initData.length||b.F.length||(d=function(f){return Pf(b,f.initDataType,Ic(f.initData))},b.A.o(b.l,"encrypted",d));C(e)})};
183
- function Qf(a){var b,c,d,e,f;return M(function(g){switch(g.g){case 1:if(!a.B||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=ef([a.g.serverCertificateUri],a.h.retryParameters);E(g,3);c=a.G.Pb.request(5,b);return z(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ic(d.data);va(g,4);break;case 3:throw e=I(g),new P(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
184
- E(g,6);return z(g,a.B.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=I(g),new P(2,6,6004,f.message);}})}function Rf(a,b){var c,d,e;return M(function(f){if(1==f.g)return z(f,Sf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.cb=new Pc,d.push(e.cb);d.push(c.remove());return z(f,Promise.all(d),3)}a.i["delete"](c);C(f)})}
185
- function Of(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Pf(a,d.initDataType,d.initData);c=r(a.F);for(d=c.next();!d.done;d=c.next())Sf(a,d.value);b.length||a.F.length||a.C.resolve();return a.C}function Pf(a,b,c){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Gc(c,e.value.initData)&&!Ed("Tizen 2"))return;Tf(a,b,c,a.g.sessionType)}function Uf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
186
- function Vf(a){a=a.i.keys();a=db(a,function(b){return b.sessionId});return Array.from(a)}q.Cc=function(){var a=Infinity,b=this.i.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.cd=function(){return xf(this.$)};
187
- function If(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y;return M(function(w){switch(w.g){case 1:d=new Map;if(c.length){e=Wf(a,c,d);w.D(2);break}return z(w,Xf(a,b),3);case 3:e=w.h;case 2:f=e;if(!f)throw new P(2,6,6001);nf(a.j);E(w,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());p=r(k);for(m=p.next();!m.done;m=p.next())t=m.value,a.H.add(t.contentType.toLowerCase());if(c.length){var x=
188
- f.keySystem;var D=d.get(f.keySystem);var B=[],A=[],F=[],G=[],H=new Set;Yf(D,B,F,A,G,H);var K=a.K?"persistent-license":"temporary";x={keySystem:x,licenseServerUri:B[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||K,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:A[0],initData:G,keyIds:H};D=r(D);for(B=D.next();!B.done;B=
189
- D.next())B=B.value,B.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=B.distinctiveIdentifierRequired),B.persistentStateRequired&&(x.persistentStateRequired=B.persistentStateRequired);D=x}else D=f.keySystem,x=b.get(f.keySystem),B=[],A=[],F=[],G=[],H=new Set,Yf(x.drmInfos,B,F,A,G,H),D={keySystem:D,licenseServerUri:B[0],distinctiveIdentifierRequired:"required"==x.distinctiveIdentifier,persistentStateRequired:"required"==x.persistentState,sessionType:x.sessionTypes[0]||"temporary",audioRobustness:(x.audioCapabilities?
190
- x.audioCapabilities[0].robustness:"")||"",videoRobustness:(x.videoCapabilities?x.videoCapabilities[0].robustness:"")||"",serverCertificate:F[0],serverCertificateUri:A[0],initData:G,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new P(2,6,6012,a.g.keySystem);return z(w,f.createMediaKeys(),6);case 6:return v=w.h,nf(a.j),a.B=v,a.Z=!0,z(w,Qf(a),7);case 7:nf(a.j);va(w,0);break;case 4:y=I(w);nf(a.j,y);a.g=null;a.H.clear();if(y instanceof P)throw y;throw new P(2,6,6002,y.message);}})}
191
- function Wf(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(Lf(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new P(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Id:d.Id},e=a.next())for(d.Id=e.value,f=r(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
144
+ function ne(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,
145
+ audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function oe(a){a.__shaka_id||(a.__shaka_id=pe++);return a.__shaka_id}
146
+ function qe(a){var b=re(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function se(a){var b=re(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
147
+ function re(a){return{id:oe(a),active:!1,type:"",bandwidth:0,language:Qb(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null}}
148
+ function te(a){return a.allowedByApplication&&a.allowedByKeySystem}function ue(a){return a.filter(function(b){return te(b)})}
149
+ function Pd(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=r(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ia(e))):d.get(Math.min.apply(Math,ia(c)))}
150
+ function ve(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=Yb(Qb(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Qb(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=we(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(Db,[]);return a.length?
151
+ we(e,a[0]):e}function we(a,b){return a.filter(function(c){return c.roles.includes(b)})}function ie(a){var b=[];a.audio&&b.push(xe(a.audio));a.video&&b.push(xe(a.video));return b.join(", ")}
152
+ function xe(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}var pe=0,Ud="smooth",Vd="powerEfficient",Xd="bandwidth";function ye(){var a=this;this.l=null;this.i=!1;this.h=new gc;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.i){a.h=new gc;a.g&&a.h.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.j=[];this.A=1;this.B=!1;this.g=this.m=null}q=ye.prototype;q.stop=function(){this.l=null;this.i=!1;this.j=[];this.A=1;this.m=null};q.init=function(a){this.l=a};
153
+ q.chooseVariant=function(){var a=ze(this.g.restrictions,this.j),b=this.h.getBandwidthEstimate(Ae(this));this.j.length&&!a.length&&(a=ze(null,this.j),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.A)?1:Math.abs(this.A),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.m=Date.now();return c};
154
+ q.enable=function(){this.i=!0};q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.i)a:{if(!this.B){var c=this.h;if(!(c.g>=c.i))break a;this.B=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(Ae(this));c&&this.l(c)}};q.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(Ae(this))};q.setVariants=function(a){this.j=a};q.playbackRateChanged=function(a){this.A=a};
155
+ q.configure=function(a){this.g=a;this.h&&this.g&&this.h.configure(this.g.advanced)};function Ae(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function ze(a,b){a&&(b=b.filter(function(c){return $d(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}N("shaka.abr.SimpleAbrManager",ye);ye.prototype.configure=ye.prototype.configure;
156
+ ye.prototype.playbackRateChanged=ye.prototype.playbackRateChanged;ye.prototype.setVariants=ye.prototype.setVariants;ye.prototype.getBandwidthEstimate=ye.prototype.getBandwidthEstimate;ye.prototype.segmentDownloaded=ye.prototype.segmentDownloaded;ye.prototype.disable=ye.prototype.disable;ye.prototype.enable=ye.prototype.enable;ye.prototype.chooseVariant=ye.prototype.chooseVariant;ye.prototype.init=ye.prototype.init;ye.prototype.stop=ye.prototype.stop;function Be(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=r(b),d=c.next();!d.done;d=c.next())this.add(d.value)}Be.prototype.add=function(a){return Ce(this.h,a)?(this.g.add(a),!0):!1};
157
+ function Ce(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&De(c,d)&&Ee(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(De(c,d)&&Ee(c.roles,d.roles)));return c?!1:!0}Be.prototype.values=function(){return this.g.values()};
158
+ function De(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return Bd(f)[0]}),d=b.codecs.split(",").map(function(f){return Bd(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function Ee(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=r(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function Ge(a){this.g=a;this.h=new He(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Ge.prototype.create=function(a){var b=this,c=a.filter(function(d){return Ce(b.g,d)});return c.length?new Be(c[0],c):this.h.create(a)};function He(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
159
+ He.prototype.create=function(a){var b=[];b=Ie(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Je(b,this.j);a.length&&(b=a);this.g&&(a=Pd(b,this.g),a.length&&(b=a));this.h&&(a=Ke(b,this.h),a.length&&(b=a));a=new Be(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,Ce(a.h,c)&&a.add(c);return a};function Ie(a,b){var c=Qb(b),d=Yb(c,a.map(function(e){return Xb(e)}));return d?a.filter(function(e){return d==Xb(e)}):[]}
160
+ function Je(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Ke(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Le(){this.g=Me;this.h=(new Map).set(Me,2).set(Ne,1)}function Oe(a,b,c){a.h.set(Me,c).set(Ne,b)}var Ne=0,Me=1;function Pe(a,b){var c=Qe();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.A=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
161
+ function Re(a){var b,c;return M(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.A);return z(d,new Promise(function(e){(new Q(e)).S(c/1E3)}),2)}a.h*=a.m;C(d)})}function Qe(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Se(a,b){this.promise=a;this.i=b;this.g=!1}function Te(a){return new Se(Promise.reject(a),function(){return Promise.resolve()})}function Ue(){var a=Promise.reject(new P(2,7,7001));a["catch"](function(){});return new Se(a,function(){return Promise.resolve()})}function Ve(a){return new Se(Promise.resolve(a),function(){return Promise.resolve()})}function We(a){return new Se(a,function(){return a["catch"](function(){})})}Se.prototype.abort=function(){this.g=!0;return this.i()};
162
+ function Xe(a){return new Se(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Se.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
163
+ Se.prototype.qa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Ye(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Pc,g=new P(2,7,7001);this.promise.then(c(!0),c(!1));return new Se(f,function(){return d()})};
164
+ function Ye(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}N("shaka.util.AbortableOperation",Se);Se.prototype.chain=Se.prototype.qa;Se.prototype["finally"]=Se.prototype["finally"];Se.all=Xe;Se.prototype.abort=Se.prototype.abort;Se.notAbortable=We;Se.completed=Ve;Se.aborted=Ue;Se.failed=Te;function Ze(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function $e(a){var b={},c;for(c in a)b[c]=a[c];return b};function af(){this.g=[]}function bf(a,b){a.g.push(b["finally"](function(){ic(a.g,b)}))}af.prototype.destroy=function(){for(var a=[],b=r(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function cf(a,b,c){cb.call(this);this.i=!1;this.m=new af;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.A=!1}u(cf,cb);q=cf.prototype;q.re=function(a){this.A=a};function df(a,b,c,d){c=c||ef;var e=ff[a];if(!e||c>=e.priority)ff[a]={priority:c,Ng:b,Og:void 0===d?!1:d}}q.Pg=function(a){this.g.add(a)};q.eh=function(a){this.g["delete"](a)};q.Nf=function(){this.g.clear()};q.Qg=function(a){this.h.add(a)};q.fh=function(a){this.h["delete"](a)};q.Of=function(){this.h.clear()};
165
+ function gf(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();cb.prototype.release.call(this);return this.m.destroy()};
166
+ q.request=function(a,b){var c=this,d=new hf;if(this.i){var e=Promise.reject(new P(2,7,7001));e["catch"](function(){});return new jf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ze(b.retryParameters):Qe();b.uris=Ze(b.uris);e=kf(this,a,b);var f=e.qa(function(){return lf(c,a,b,new Pe(b.retryParameters,!1),0,null,d)}),g=f.qa(function(n){return mf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
167
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.qa(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.Ag||!c.l||t.fromCache||a!=nf||c.l(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new jf(m.promise,function(){return m.abort()},d);bf(this.m,e);return e};
168
+ function kf(a,b,c){var d=Ve(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Kd:e.Kd},f=a.next())e.Kd=f.value,d=d.qa(function(g){return function(){c.body&&(c.body=Jc(c.body));return g.Kd(b,c)}}(e));return d.qa(void 0,function(g){if(g instanceof P&&7001==g.code)throw g;throw new P(2,1,1006,g);})}
169
+ function lf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Va,l=!1;k||(k=location.protocol,k=k.slice(0,-1),kb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=ff[k])?k.Ng:null;if(!m)return Te(new P(2,1,1E3,h));var n=k.Og,p=null,t=null,v=!1,y=!1,w;return We(Re(d)).qa(function(){if(a.i)return Ue();w=Date.now();var x=m(c.uris[e],c,b,function(A,F,G){p&&p.stop();t&&t.S(B/1E3);a.l&&b==nf&&(a.l(A,F),l=!0,g.g=G)},function(A){a.j&&a.j(A,c,b);y=!0});
170
+ if(!n)return x;var D=c.retryParameters.connectionTimeout;D&&(p=new Q(function(){v=!0;x.abort()}),p.S(D/1E3));var B=c.retryParameters.stallTimeout;B&&(t=new Q(function(){v=!0;x.abort()}));return x}).qa(function(x){p&&p.stop();t&&t.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-w);var D={response:x,Ag:l};!y&&a.j&&a.j(x.headers,c,b);return D},function(x){p&&p.stop();t&&t.stop();if(a.B){var D=null,B=0;x instanceof P&&(D=x,1001==x.code&&(B=x.data[1]));a.B(c,D,B,v)}if(a.i)return Ue();v&&(x=new P(1,1,1003,
171
+ c.uris[e],b));if(x instanceof P){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return D=(new Map).set("error",x),D=new O("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,lf(a,b,c,d,e,x,g)}throw x;})}
172
+ function mf(a,b,c){var d=Ve(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Ld:e.Ld},f=a.next())e.Ld=f.value,d=d.qa(function(g){return function(){var h=c.response;h.data&&(h.data=Jc(h.data));return g.Ld(b,h)}}(e));return d.qa(function(){return c},function(g){var h=2;if(g instanceof P){if(7001==g.code)throw g;h=g.severity}throw new P(h,1,1007,g);})}N("shaka.net.NetworkingEngine",cf);cf.prototype.request=cf.prototype.request;cf.prototype.destroy=cf.prototype.destroy;cf.makeRequest=gf;
173
+ cf.defaultRetryParameters=function(){return Qe()};cf.prototype.clearAllResponseFilters=cf.prototype.Of;cf.prototype.unregisterResponseFilter=cf.prototype.fh;cf.prototype.registerResponseFilter=cf.prototype.Qg;cf.prototype.clearAllRequestFilters=cf.prototype.Nf;cf.prototype.unregisterRequestFilter=cf.prototype.eh;cf.prototype.registerRequestFilter=cf.prototype.Pg;cf.unregisterScheme=function(a){delete ff[a]};cf.registerScheme=df;cf.prototype.setForceHTTPS=cf.prototype.re;function hf(){this.g=0}
174
+ cf.NumBytesRemainingClass=hf;function jf(a,b,c){Se.call(this,a,b);this.h=c}u(jf,Se);cf.PendingRequest=jf;var nf=1;cf.RequestType={MANIFEST:0,SEGMENT:nf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var ef=3;cf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ef};var ff={};function of(a){this.g=!1;this.h=new Pc;this.i=a}of.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function pf(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function qf(){this.g=new ab}q=qf.prototype;q.release=function(){this.rb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new rf(a,b,c,d),this.g.push(b,a))};q.Ga=function(a,b,c,d){function e(g){f.nc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.nc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.nc(),this.g.remove(b,e))}};
175
+ q.rb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.nc();this.g.g={}}};N("shaka.util.EventManager",qf);qf.prototype.removeAll=qf.prototype.rb;qf.prototype.unlisten=qf.prototype.nc;qf.prototype.listenOnce=qf.prototype.Ga;qf.prototype.listen=qf.prototype.o;qf.prototype.release=qf.prototype.release;function rf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=sf(a,d);this.target.addEventListener(b,c,this.g)}
176
+ rf.prototype.nc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function sf(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return tf(a)?b:b.capture||!1}
177
+ function tf(a){var b=uf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}uf=b}return b||!1}var uf=void 0;function vf(){}function wf(a){a=id(a);return(new jb(a)).Ya}function xf(a,b,c){function d(h){Lc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ic(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(2,6,6015);var e;"string"==typeof b?e=kd(b,!0):e=b;a=id(a);a=kd(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}N("shaka.util.FairPlayUtils",vf);vf.initDataTransform=xf;vf.defaultGetContentId=wf;function yf(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function zf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Af(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=r(a),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function Bf(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.H=new Set;this.l=this.B=null;this.aa=this.Z=!1;this.I=0;this.g=null;this.A=new qf;this.i=new Map;this.F=[];this.C=new Pc;this.h=null;this.m=function(d){c.C.reject(d);a.onError(d)};this.ba=new Map;this.$=new Map;this.R=new Q(function(){return Cf(c)});this.K=!1;this.J=[];this.N=!1;this.va=(new Q(function(){Df(c)})).ha(b);this.C["catch"](function(){});this.j=new of(function(){return Ef(c)});this.W=!1}q=Bf.prototype;q.destroy=function(){return this.j.destroy()};
178
+ function Ef(a){return M(function(b){switch(b.g){case 1:return a.A.release(),a.A=null,a.C.reject(),a.va.stop(),a.va=null,a.R.stop(),a.R=null,z(b,Ff(a),2);case 2:if(!a.l){b.D(3);break}E(b,4);return z(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:I(b);case 5:a.l=null;case 3:a.g=null,a.H.clear(),a.B=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.W=!1,C(b)}})}q.configure=function(a){this.h=a};function Gf(a,b,c){a.aa=!0;a.F=[];a.K=c;return Hf(a,b)}
179
+ function If(a,b,c){a.F=c;a.K=0<c.length;return Hf(a,b)}function Jf(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Kf(a,g,[])}
180
+ function Hf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;return M(function(w){if(1==w.g){if(c=Lf(a))for(d=r(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(x){return x.video&&x.video.drmInfos.length||x.audio&&x.audio.drmInfos.length?!0:!1});g||(h=yf(a.h.servers),Mf(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Nf(l),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,Of(t,yf(a.h.servers),yf(a.h.advanced||{}));return z(w,
181
+ fe(b,a.K,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.Z=!0,w["return"](Promise.resolve());y=Kf(a,void 0,b);return w["return"](g?y:y["catch"](function(){}))})}
182
+ q.xc=function(a){var b=this,c,d;return M(function(e){if(1==e.g){if(!b.B)return b.A.Ga(a,"encrypted",function(){b.m(new P(2,6,6010))}),e["return"]();b.l=a;b.A.Ga(b.l,"play",function(){for(var f=r(b.J),g=f.next();!g.done;g=f.next())Pf(b,g.value);b.N=!0;b.J=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.A.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ff(b)});c=b.l.setMediaKeys(b.B);c=c["catch"](function(f){return Promise.reject(new P(2,6,6003,f.message))});return z(e,
183
+ c,2)}pf(b.j);Qf(b);b.g.initData.length||b.F.length||(d=function(f){return Rf(b,f.initDataType,Ic(f.initData))},b.A.o(b.l,"encrypted",d));C(e)})};
184
+ function Sf(a){var b,c,d,e,f;return M(function(g){switch(g.g){case 1:if(!a.B||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=gf([a.g.serverCertificateUri],a.h.retryParameters);E(g,3);c=a.G.Pb.request(5,b);return z(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ic(d.data);va(g,4);break;case 3:throw e=I(g),new P(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
185
+ E(g,6);return z(g,a.B.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=I(g),new P(2,6,6004,f.message);}})}function Tf(a,b){var c,d,e;return M(function(f){if(1==f.g)return z(f,Uf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.cb=new Pc,d.push(e.cb);d.push(c.remove());return z(f,Promise.all(d),3)}a.i["delete"](c);C(f)})}
186
+ function Qf(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Rf(a,d.initDataType,d.initData);c=r(a.F);for(d=c.next();!d.done;d=c.next())Uf(a,d.value);b.length||a.F.length||a.C.resolve();return a.C}function Rf(a,b,c){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Gc(c,e.value.initData)&&!Xc("Tizen 2"))return;Vf(a,b,c,a.g.sessionType)}function Wf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
187
+ function Xf(a){a=a.i.keys();a=db(a,function(b){return b.sessionId});return Array.from(a)}q.Cc=function(){var a=Infinity,b=this.i.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.cd=function(){return zf(this.$)};
188
+ function Kf(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y;return M(function(w){switch(w.g){case 1:d=new Map;if(c.length){e=Yf(a,c,d);w.D(2);break}return z(w,Zf(a,b),3);case 3:e=w.h;case 2:f=e;if(!f)throw new P(2,6,6001);pf(a.j);E(w,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());p=r(k);for(m=p.next();!m.done;m=p.next())t=m.value,a.H.add(t.contentType.toLowerCase());if(c.length){var x=
189
+ f.keySystem;var D=d.get(f.keySystem);var B=[],A=[],F=[],G=[],H=new Set;$f(D,B,F,A,G,H);var K=a.K?"persistent-license":"temporary";x={keySystem:x,licenseServerUri:B[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||K,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:A[0],initData:G,keyIds:H};D=r(D);for(B=D.next();!B.done;B=
190
+ D.next())B=B.value,B.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=B.distinctiveIdentifierRequired),B.persistentStateRequired&&(x.persistentStateRequired=B.persistentStateRequired);D=x}else D=f.keySystem,x=b.get(f.keySystem),B=[],A=[],F=[],G=[],H=new Set,$f(x.drmInfos,B,F,A,G,H),D={keySystem:D,licenseServerUri:B[0],distinctiveIdentifierRequired:"required"==x.distinctiveIdentifier,persistentStateRequired:"required"==x.persistentState,sessionType:x.sessionTypes[0]||"temporary",audioRobustness:(x.audioCapabilities?
191
+ x.audioCapabilities[0].robustness:"")||"",videoRobustness:(x.videoCapabilities?x.videoCapabilities[0].robustness:"")||"",serverCertificate:F[0],serverCertificateUri:A[0],initData:G,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new P(2,6,6012,a.g.keySystem);return z(w,f.createMediaKeys(),6);case 6:return v=w.h,pf(a.j),a.B=v,a.Z=!0,z(w,Sf(a),7);case 7:pf(a.j);va(w,0);break;case 4:y=I(w);pf(a.j,y);a.g=null;a.H.clear();if(y instanceof P)throw y;throw new P(2,6,6002,y.message);}})}
192
+ function Yf(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(Nf(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new P(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Id:d.Id},e=a.next())for(d.Id=e.value,f=r(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
192
193
  l.Id}}(d)))return e.keySystemAccess;a=r([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=r(b),e=f.next();!e.done;e=f.next()){var g=r(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=r(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
193
- function Xf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,w;return M(function(x){switch(x.g){case 1:if(1==b.size&&b.has(""))throw new P(2,6,6E3);d=r(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=r(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){x.D(4);break}k=h.value;if(!b.has(k)){x.D(3);break}l=b.get(k);E(x,6);return z(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
194
- x.h,x["return"](c);case 6:I(x);case 7:nf(a.j);case 3:h=g.next();x.D(2);break;case 4:m=r([!0,!1]),n=m.next();case 9:if(n.done){x.D(11);break}p=n.value;t=r(b.keys());h=t.next();case 12:if(h.done){n=m.next();x.D(9);break}v=h.value;y=b.get(v);w=y.drmInfos.some(function(D){return!!D.licenseServerUri});if(w!=p){x.D(13);break}E(x,15);return z(x,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=x.h,x["return"](c);case 15:I(x);case 16:nf(a.j);case 13:h=t.next();x.D(12);break;case 11:return x["return"](c)}})}
195
- function Jf(a){a=wf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=cd(f),h=cd(e);g={kty:"oct",kid:ad(g,!1),k:ad(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Ic(Xc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
194
+ function Zf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,w;return M(function(x){switch(x.g){case 1:if(1==b.size&&b.has(""))throw new P(2,6,6E3);d=r(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=r(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){x.D(4);break}k=h.value;if(!b.has(k)){x.D(3);break}l=b.get(k);E(x,6);return z(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
195
+ x.h,x["return"](c);case 6:I(x);case 7:pf(a.j);case 3:h=g.next();x.D(2);break;case 4:m=r([!0,!1]),n=m.next();case 9:if(n.done){x.D(11);break}p=n.value;t=r(b.keys());h=t.next();case 12:if(h.done){n=m.next();x.D(9);break}v=h.value;y=b.get(v);w=y.drmInfos.some(function(D){return!!D.licenseServerUri});if(w!=p){x.D(13);break}E(x,15);return z(x,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=x.h,x["return"](c);case 15:I(x);case 16:pf(a.j);case 13:h=t.next();x.D(12);break;case 11:return x["return"](c)}})}
196
+ function Lf(a){a=yf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=qd(f),h=qd(e);g={kty:"oct",kid:od(g,!1),k:od(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Ic(jd(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
196
197
  serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
197
- function Sf(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:try{c=a.B.createSession("persistent-license")}catch(k){return d=new P(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.A.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(k):Nf(a,k)});a.A.o(c,"keystatuseschange",function(k){return Zf(a,k)});e={initData:null,loaded:!1,ae:Infinity,cb:null,type:"persistent-license"};a.i.set(c,e);E(h,2);return z(h,c.load(b),4);case 4:f=h.h;nf(a.j);
198
- if(!f)return a.i["delete"](c),a.m(new P(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;$f(a)&&a.C.resolve();return h["return"](c);case 2:g=I(h),nf(a.j,g),a.i["delete"](c),a.m(new P(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
199
- function Tf(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.m(new P(2,6,6005,f.message));return}a.A.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(f):Nf(a,f)});a.A.o(e,"keystatuseschange",function(f){return Zf(a,f)});a.i.set(e,{initData:c,loaded:!1,ae:Infinity,cb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof P||(b=new P(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&ad(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
200
- var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new P(2,6,6006,f.message,f,h))}})}function ag(a,b,c){"skd"==b&&(b=c.serverCertificate,c=uf(a),a=vf(a,c,b));return a}
201
- function Nf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;M(function(w){switch(w.g){case 1:return c=b.target,a.h.logLicenseExchange&&ad(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=ef([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Uf(a.g.keySystem)&&bg(g),h=Date.now(),E(w,2),l=a.G.Pb.request(2,g),z(w,
202
- l.promise,4);case 4:k=w.h;va(w,3);break;case 2:return m=I(w),n=new P(2,6,6007,m),a.m(n),d&&d.cb&&d.cb.reject(n),w["return"]();case 3:if(a.j.g)return w["return"]();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&ad(k.data);E(w,5);return z(w,c.update(k.data),7);case 7:va(w,6);break;case 5:return p=I(w),t=new P(2,6,6008,p.message),a.m(t),d&&d.cb&&d.cb.reject(t),w["return"]();case 6:if(a.j.g)return w["return"]();v=new O("drmsessionupdate");a.G.onEvent(v);d&&(d.cb&&d.cb.resolve(),y=new Q(function(){d.loaded=
203
- !0;$f(a)&&a.C.resolve()}),y.S(cg));C(w)}})}function bg(a){var b=Uc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=bd(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
204
- function Zf(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Uf(a.g.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Lc(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=dd(h);a.ba.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.cb&&(a.i["delete"](c),c.close()["catch"](function(){}));
205
- $f(a)&&(a.C.resolve(),a.R.S(dg))}function Af(a){var b=a.ba,c=a.$;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new P(2,6,6014));a.G.pd(xf(c))}
206
- function eg(){var a,b,c,d,e,f,g,h;return M(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
207
- c],f=new Map,g=function(l){var m,n,p;return M(function(t){switch(t.g){case 1:return E(t,2),z(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Ed("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),z(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:I(t),f.set(l,null),C(t)}})},h=a.map(function(l){return g(l)}),z(k,Promise.all(h),2)):k["return"](xf(f))})}
208
- function fg(a){var b;return M(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Q(e)).S(gg)}),E(c,2),z(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);I(c);C(c)})}
209
- function Df(a){var b;return M(function(c){b=Array.from(a.i.entries());a.i.clear();return z(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return M(function(g){if(1==g.g)return E(g,2),a.aa||a.F.includes(e.sessionId)||"persistent-license"!==f.type?z(g,fg(e),5):z(g,e.remove(),5);if(2!=g.g)return va(g,0);I(g);C(g)})})),0)})}
210
- function ig(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={Ta:f.Ta},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ta=[];f.Ta=f.Ta.concat(e.initData||[]);f.Ta=f.Ta.concat(h.initData||[]);f.Ta=f.Ta.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ta.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
198
+ function Uf(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:try{c=a.B.createSession("persistent-license")}catch(k){return d=new P(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.A.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(k):Pf(a,k)});a.A.o(c,"keystatuseschange",function(k){return ag(a,k)});e={initData:null,loaded:!1,be:Infinity,cb:null,type:"persistent-license"};a.i.set(c,e);E(h,2);return z(h,c.load(b),4);case 4:f=h.h;pf(a.j);
199
+ if(!f)return a.i["delete"](c),a.m(new P(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;bg(a)&&a.C.resolve();return h["return"](c);case 2:g=I(h),pf(a.j,g),a.i["delete"](c),a.m(new P(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
200
+ function Vf(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.m(new P(2,6,6005,f.message));return}a.A.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.N?a.J.push(f):Pf(a,f)});a.A.o(e,"keystatuseschange",function(f){return ag(a,f)});a.i.set(e,{initData:c,loaded:!1,be:Infinity,cb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof P||(b=new P(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&od(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
201
+ var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new P(2,6,6006,f.message,f,h))}})}function cg(a,b,c){"skd"==b&&(b=c.serverCertificate,c=wf(a),a=xf(a,c,b));return a}
202
+ function Pf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;M(function(w){switch(w.g){case 1:return c=b.target,a.h.logLicenseExchange&&od(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=gf([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Wf(a.g.keySystem)&&dg(g),h=Date.now(),E(w,2),l=a.G.Pb.request(2,g),z(w,
203
+ l.promise,4);case 4:k=w.h;va(w,3);break;case 2:return m=I(w),n=new P(2,6,6007,m),a.m(n),d&&d.cb&&d.cb.reject(n),w["return"]();case 3:if(a.j.g)return w["return"]();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&od(k.data);E(w,5);return z(w,c.update(k.data),7);case 7:va(w,6);break;case 5:return p=I(w),t=new P(2,6,6008,p.message),a.m(t),d&&d.cb&&d.cb.reject(t),w["return"]();case 6:if(a.j.g)return w["return"]();v=new O("drmsessionupdate");a.G.onEvent(v);d&&(d.cb&&d.cb.resolve(),y=new Q(function(){d.loaded=
204
+ !0;bg(a)&&a.C.resolve()}),y.S(eg));C(w)}})}function dg(a){var b=hd(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=pd(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
205
+ function ag(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Wf(a.g.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Lc(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=rd(h);a.ba.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.cb&&(a.i["delete"](c),c.close()["catch"](function(){}));
206
+ bg(a)&&(a.C.resolve(),a.R.S(fg))}function Cf(a){var b=a.ba,c=a.$;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new P(2,6,6014));a.G.pd(zf(c))}
207
+ function gg(){var a,b,c,d,e,f,g,h;return M(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
208
+ c],f=new Map,g=function(l){var m,n,p;return M(function(t){switch(t.g){case 1:return E(t,2),z(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Xc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),z(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:I(t),f.set(l,null),C(t)}})},h=a.map(function(l){return g(l)}),z(k,Promise.all(h),2)):k["return"](zf(f))})}
209
+ function hg(a){var b;return M(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Q(e)).S(jg)}),E(c,2),z(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);I(c);C(c)})}
210
+ function Ff(a){var b;return M(function(c){b=Array.from(a.i.entries());a.i.clear();return z(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return M(function(g){if(1==g.g)return E(g,2),a.aa||a.F.includes(e.sessionId)||"persistent-license"!==f.type?z(g,hg(e),5):z(g,e.remove(),5);if(2!=g.g)return va(g,0);I(g);C(g)})})),0)})}
211
+ function kg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={Ta:f.Ta},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ta=[];f.Ta=f.Ta.concat(e.initData||[]);f.Ta=f.Ta.concat(h.initData||[]);f.Ta=f.Ta.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ta.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
211
212
  e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
212
- initData:f.Ta,keyIds:g});break}}return c}function Lf(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Bf(a){a.i.forEach(function(b,c){var d=b.ae,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.ae=e)})}function $f(a){a=a.i.values();return eb(a,function(b){return b.loaded})}
213
- function Kf(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=r(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
214
- function Yf(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Ja:g.Ja},h=a.next()){g.Ja=h.value;b.includes(g.Ja.licenseServerUri)||b.push(g.Ja.licenseServerUri);d.includes(g.Ja.serverCertificateUri)||d.push(g.Ja.serverCertificateUri);g.Ja.serverCertificate&&(c.some(function(m){return function(n){return Gc(n,m.Ja.serverCertificate)}}(g))||c.push(g.Ja.serverCertificate));if(g.Ja.initData){h={};for(var k=r(g.Ja.initData),l=k.next();!l.done;h={Rc:h.Rc},l=k.next())h.Rc=l.value,e.some(function(m){return function(n){var p=
213
+ initData:f.Ta,keyIds:g});break}}return c}function Nf(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Df(a){a.i.forEach(function(b,c){var d=b.be,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.be=e)})}function bg(a){a=a.i.values();return eb(a,function(b){return b.loaded})}
214
+ function Mf(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=r(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
215
+ function $f(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Ja:g.Ja},h=a.next()){g.Ja=h.value;b.includes(g.Ja.licenseServerUri)||b.push(g.Ja.licenseServerUri);d.includes(g.Ja.serverCertificateUri)||d.push(g.Ja.serverCertificateUri);g.Ja.serverCertificate&&(c.some(function(m){return function(n){return Gc(n,m.Ja.serverCertificate)}}(g))||c.push(g.Ja.serverCertificate));if(g.Ja.initData){h={};for(var k=r(g.Ja.initData),l=k.next();!l.done;h={Rc:h.Rc},l=k.next())h.Rc=l.value,e.some(function(m){return function(n){var p=
215
216
  m.Rc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Gc(n.initData,p.initData)}}(h))||e.push(h.Rc)}if(g.Ja.keyIds)for(h=r(g.Ja.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
216
- function Mf(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
217
- (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var gg=1,cg=5,dg=.5,jg=new Qc(function(){return Jc(new Uint8Array([0]))});function kg(){}function lg(a,b,c,d){var e,f,g,h;return M(function(k){if(1==k.g){if(d&&(e=mg[d.toLowerCase()]))return k["return"](e);if(f=ng(a))if(g=og[f])return k["return"](g);return d?k.D(2):z(k,pg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=mg[d]))return k["return"](h);throw new P(2,4,4E3,a);})}
218
- function pg(a,b,c){var d,e,f;return M(function(g){if(1==g.g)return d=ef([a],c),d.method="HEAD",z(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function ng(a){a=(new jb(a)).Na.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}N("shaka.media.ManifestParser",kg);kg.unregisterParserByMime=function(a){delete mg[a]};kg.registerParserByMime=function(a,b){mg[a]=b};
219
- kg.registerParserByExtension=function(a,b){og[a]=b};var mg={},og={};function qg(a,b){this.U=Lc(a);this.h=b==rg;this.g=0}q=qg.prototype;q.Ea=function(){return this.g<this.U.byteLength};q.ia=function(){return this.g};q.eg=function(){return this.U.byteLength};q.ka=function(){try{var a=this.U.getUint8(this.g);this.g+=1;return a}catch(b){throw sg();}};q.kc=function(){try{var a=this.U.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw sg();}};q.P=function(){try{var a=this.U.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw sg();}};
220
- q.nf=function(){try{var a=this.U.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw sg();}};q.lc=function(){try{if(this.h){var a=this.U.getUint32(this.g,!0);var b=this.U.getUint32(this.g+4,!0)}else b=this.U.getUint32(this.g,!1),a=this.U.getUint32(this.g+4,!1)}catch(c){throw sg();}if(2097151<b)throw new P(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Cb=function(a){if(this.g+a>this.U.byteLength)throw sg();var b=Ic(this.U,this.g,a);this.g+=a;return b};
221
- q.skip=function(a){if(this.g+a>this.U.byteLength)throw sg();this.g+=a};q.qf=function(a){if(this.g<a)throw sg();this.g-=a};q.seek=function(a){if(0>a||a>this.U.byteLength)throw sg();this.g=a};q.Lc=function(){for(var a=this.g;this.Ea()&&0!=this.U.getUint8(this.g);)this.g+=1;a=Ic(this.U,a,this.g-a);this.g+=1;return Tc(a)};function sg(){return new P(2,3,3E3)}N("shaka.util.DataViewReader",qg);qg.prototype.readTerminatedString=qg.prototype.Lc;qg.prototype.seek=qg.prototype.seek;qg.prototype.rewind=qg.prototype.qf;
222
- qg.prototype.skip=qg.prototype.skip;qg.prototype.readBytes=qg.prototype.Cb;qg.prototype.readUint64=qg.prototype.lc;qg.prototype.readInt32=qg.prototype.nf;qg.prototype.readUint32=qg.prototype.P;qg.prototype.readUint16=qg.prototype.kc;qg.prototype.readUint8=qg.prototype.ka;qg.prototype.getLength=qg.prototype.eg;qg.prototype.getPosition=qg.prototype.ia;qg.prototype.hasMoreData=qg.prototype.Ea;var rg=1;qg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:rg};function tg(){this.i=[];this.h=[];this.g=!1}q=tg.prototype;q.box=function(a,b){var c=ug(a);this.i[c]=vg;this.h[c]=b;return this};q.X=function(a,b){var c=ug(a);this.i[c]=wg;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new qg(a,0);for(this.g=!1;a.Ea()&&!this.g;)this.rd(0,a,b,c)};
223
- q.rd=function(a,b,c,d){var e=b.ia();if(d&&e+8>b.U.byteLength)this.g=!0;else{var f=b.P(),g=b.P(),h=!1;switch(f){case 0:f=b.U.byteLength-e;break;case 1:if(d&&b.ia()+8>b.U.byteLength){this.g=!0;return}f=b.lc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==wg){if(d&&b.ia()+4>b.U.byteLength){this.g=!0;return}m=b.P();l=m>>>24;m&=16777215}g=e+f;c&&g>b.U.byteLength&&(g=b.U.byteLength);d&&g>b.U.byteLength?this.g=!0:(d=g-b.ia(),b=0<d?b.Cb(d):new Uint8Array(0),b=new qg(b,0),k({parser:this,partialOkay:c||
224
- !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.ia(),b.U.byteLength-b.ia()))}};function xg(a){for(var b=yg(a);a.reader.Ea()&&!a.parser.g;)a.parser.rd(a.start+b,a.reader,a.partialOkay)}function zg(a){for(var b=yg(a),c=a.reader.P(),d=0;d<c&&(a.parser.rd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Ag(a){return function(b){a(b.reader.Cb(b.reader.U.byteLength-b.reader.ia()))}}
225
- function ug(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Bg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function yg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}N("shaka.util.Mp4Parser",tg);tg.headerSize=yg;tg.typeToString=Bg;tg.allData=Ag;tg.sampleDescription=zg;tg.children=xg;tg.prototype.parseNext=tg.prototype.rd;tg.prototype.parse=tg.prototype.parse;tg.prototype.stop=tg.prototype.stop;
226
- tg.prototype.fullBox=tg.prototype.X;tg.prototype.box=tg.prototype.box;var vg=0,wg=1;function Cg(a){function b(){d=!0}function c(l){f.push(l);xg(l)}a=Ic(a);var d=!1,e,f=[],g=[];(new tg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).X("stsd",function(l){e=l;f.push(l);zg(l)}).X("encv",b).X("enca",b).X("avc1",function(l){g.push({box:l,Jc:1701733238})}).X("avc3",function(l){g.push({box:l,Jc:1701733238})}).X("ac-3",function(l){g.push({box:l,Jc:1701733217})}).X("ec-3",function(l){g.push({box:l,Jc:1701733217})}).X("mp4a",function(l){g.push({box:l,Jc:1701733217})}).parse(a);
227
- if(d)return a;if(0==g.length||!e)throw Ya(dd(a)),new P(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=Dg(a,e,k.box,f,k.Jc);return a}
228
- function Dg(a,b,c,d,e){var f=Eg.value(),g=a.subarray(c.start,c.start+c.size),h=Lc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Lc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Fg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Cd()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,Fg(e,d.start,d.size+k.byteLength);k=Lc(e,b.start);b=yg(b);a=k.getUint32(b);
229
- k.setUint32(b,a+1);return e}function Fg(a,b,c){a=Lc(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Eg=new Qc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Gg(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Hg(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],t=-1,v=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){t=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){v=y;break}if(-1===
230
- t||-1===v)p=Ig(d,e),a.nestedCues.push(p);else{for(;t<=v;t++)if(y=p[t]){var w=y.l,x=y.i,D=y.j,B=y.h;if(w!=h||x!=k||D!=l||B!=m)n.payload&&a.nestedCues.push(n),n=Hg(d,e,w,x,D,B),h=w,k=x,l=D,m=B;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Ig(d,e),a.nestedCues.push(n));n=Hg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
231
- function Hg(a,b,c,d,e,f){a=new lc(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Ig(a,b){var c=new lc(a,b,"");c.lineBreak=!0;return c}function Jg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Kg(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.B=b;this.j=this.m=!1;this.l="white";this.A="black";Lg(this)}function Mg(a,b,c){return Gg(new lc(b,c,""),"CC"+(a.C<<1|a.B+1),a.i,b,c)}function Lg(a){Ng(a,0,15);a.g=1}function Og(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Pg:d=Qg.has(c)?Qg.get(c):String.fromCharCode(c);break;case Rg:d=Sg.get(c);break;case Tg:a.i[a.g].pop();d=Ug.get(c);break;case Vg:a.i[a.g].pop(),d=Wg.get(c)}d&&a.i[a.g].push(new Jg(d,a.m,a.j,a.A,a.l))}}
232
- function Xg(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Ng(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
233
- var Pg=0,Rg=1,Tg=2,Vg=3,Qg=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Sg=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Ug=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
234
- [35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Wg=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
235
- [39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function Yg(a,b){this.h=Zg;this.A=new Kg(a,b);this.i=new Kg(a,b);this.l=new Kg(a,b);this.g=this.i;this.j=0;this.m=null}function $g(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==ah&&a.h!==bh&&(e=Mg(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Ng(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Ng(c,0,15),d.g=15);a.h=ah;d.h=b;return e}function ch(a){a.h=dh;a.g=a.l;a.g.h=0}function eh(a){Ta("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.A;a.h=bh}
236
- var Zg=0,dh=1,ah=3,bh=4,fh="black green blue cyan red yellow magenta black".split(" "),gh="white green blue cyan red yellow magenta white_italics".split(" ");function hh(){this.l=!1;this.F=this.H=0;this.G=ih;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.m="black";jh(this)}function jh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(kh())}function kh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function lh(a,b){mh(a)&&(a.i[a.h][a.g]=new Jg(b,a.C,a.A,a.m,a.B),a.g++)}function mh(a){var b=a.g<a.F&&0<=a.g;return a.h<a.H&&0<=a.h&&b}hh.prototype.isVisible=function(){return this.l};
237
- function nh(a,b,c){var d=new lc(a.j,b,"");d.textAlign=a.G===oh?"left":a.G===ph?"right":pc;if(c=Gg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var oh=0,ph=1,ih=2;function qh(){this.i=[];this.h=null;this.g=0}function rh(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new sh(a.h)),a.h=null,a.g=0))}function sh(a){this.g=0;this.h=a}sh.prototype.Ea=function(){return this.g<this.h.length};sh.prototype.ia=function(){return this.g};function th(a){if(!a.Ea())throw new P(2,2,3E3);return a.h[a.g++]}sh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new P(2,2,3E3);this.g+=a};function uh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
238
- function vh(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=th(b).value;b=null;c=r(wh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=nh(e,d,a.i)),jh(e);return b}if(137===c)for(b=th(b).value,b=r(wh(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=th(b).value;b=null;c=r(wh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=nh(e,d,a.i)),e.l=!1;return b}if(139===c){c=th(b).value;
239
- b=null;c=r(wh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=nh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=th(b).value,xh(a,b,d);if(143===c)return d=xh(a,255,d),yh(a),d;if(144===c)b.skip(1),d=th(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=th(b).value,c=th(b).value,b.skip(1),a.g&&(b=zh((c&48)>>4,(c&12)>>2,c&3),a.g.B=zh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=th(b).value,b=th(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
240
- b.skip(1),d=th(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new hh;f.j=d;a.h[c]=f}d=th(b).value;th(b);th(b);f=th(b).value;var g=th(b).value;b=th(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.H=(f&15)+1;b.F=(g&63)+1;a.g=a.h[c]}}}return null}function wh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
241
- function xh(a,b,c){var d=null;b=r(wh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=nh(f,c,a.i));a.h[e]=null}return d}function yh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function zh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Ah[a<<2|b<<1|c]}
242
- var Bh=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Ah="black blue green cyan red magenta yellow white".split(" ");function Ch(){this.h=[];this.g=[];this.i=new qh;this.l=0;this.B=new Map([["CC1",new Yg(0,0)],["CC2",new Yg(0,1)],["CC3",new Yg(1,0)],["CC4",new Yg(1,1)]]);this.A=this.m=0;this.j=new Map;Dh(this)}function Dh(a){a.m=0;a.A=0;a=r(a.B.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Lg(b.i),Lg(b.l),Lg(b.A)}
243
- function Eh(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=r(a.h),e=d.next();!e.done;e=d.next())(e=Fh(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())rh(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=Gh(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
244
- function Fh(a,b){var c=b.type;if(16===(b.Qa&112)){var d=b.Qa>>3&1;0===c?a.m=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.m)+1));if(255===b.Qa&&255===b.kb||!b.Qa&&!b.kb||!Hh(b.Qa)||!Hh(b.kb))return 45<=++a.l&&Dh(a),null;a.l=0;b.Qa&=127;b.kb&=127;if(!b.Qa&&!b.kb)return null;d=null;if(16===(b.Qa&112))a:{var e=b.Qa;d=b.kb;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=gh[f]:7===f&&(h=!0);
245
- d=1===(d&1);if(c.h!==bh){f=c.g;if(c.h===ah&&e!==f.g){var k=1+e-f.h;Xg(f,k,1+f.g-f.h,f.h);Ng(f,0,k-1);Ng(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.A="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Og(c.g,Pg,32),g=!1,e=gh[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=fh[(d&14)>>1]),c.g.A=g;else if(17===(e&247)&&48===(d&240))Og(c.g,Rg,d);else if(18===
246
- (e&246)&&32===(d&224))Og(c.g,e&1?Vg:Tg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.kb){case 32:ch(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=$g(c,2,d);break;case 38:e=$g(c,3,d);break;case 39:e=$g(c,4,d);break;case 40:Og(c.g,Pg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Lg(c.A);eh(c);break;case 43:eh(c);break;case 44:e=c.i;g=null;c.h!==bh&&(g=Mg(e,c.j,d));Ng(e,0,15);e=g;break;case 45:e=c.g;c.h!==ah?e=null:(g=Mg(e,c.j,d),h=e.g-e.h+1,Xg(e,h-1,h,e.h),Ng(e,
247
- 0,h-1),Ng(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Ng(c.l,0,15);break;case 47:e=null,c.h!==bh&&(e=Mg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,ch(c),c.j=d}d=e;break a}d=null}else e=b.kb,Og(c.g,Pg,b.Qa),Og(c.g,Pg,e);return d}
248
- function Gh(a,b){var c=[];try{for(;b.Ea();){var d=th(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=th(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new uh(e));for(var g=a.j.get(e),h=b.ia();b.ia()-h<f;){e=b;var k=th(e),l=k.value,m=k.pts;if(16===l){var n=th(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!mh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.F-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=nh(t,p,g.i));if(t.h+1>=t.H){p=t;for(var v=0,y=1;15>y;y++,
249
- v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=kh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=nh(t,p,g.i));t.i[t.h]=kh();t.g=0;break;case 12:t.isVisible()&&(e=nh(t,p,g.i)),jh(t),p=t,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=vh(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?lh(g.g,"\u266a"):lh(g.g,
250
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&lh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Bh.has(e)){var x=Bh.get(e);lh(g.g,x)}else lh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?lh(g.g,"_"):lh(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(D){if(D instanceof P&&3E3===D.code)Ta("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Hh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Ih(a,b){var c=null,d=null,e=a.P();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.P());b&16&&(d=a.P());return{trackId:e,Ue:c,Pf:d}}function Jh(a,b){return{Qd:1==b?a.lc():a.P()}}function Kh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.P()}}
251
- function Lh(a,b,c){var d=a.P(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={je:null,sampleSize:null,ud:null};c&256&&(g.je=a.P());c&512&&(g.sampleSize=a.P());c&1024&&a.skip(4);c&2048&&(g.ud=0==b?a.P():a.nf());e.push(g)}return{Ii:d,rf:e}};function Mh(){this.i=new Map;this.h=this.g=0}
252
- Mh.prototype.init=function(a){var b=this,c=[],d=[];(new tg).box("moov",xg).box("mvex",xg).X("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.P();f=f.P();b.g=e;b.h=f}).box("trak",xg).X("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.P();c.push(e)}).box("mdia",xg).X("mdhd",function(e){e=Kh(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new P(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
253
- Mh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new tg).box("moof",xg).box("traf",xg).X("trun",function(k){f=Lh(k.reader,k.version,k.flags).rf}).X("tfhd",function(k){k=Ih(k.reader,k.flags);d=k.Ue||b.g;e=k.Pf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).X("tfdt",function(k){g=Jh(k.reader,k.version).Qd}).box("mdat",function(k){if(null===g)throw new P(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,t=f,v=0,y=p;for(t.length&&(y=t[0].sampleSize||p);k.Ea();){var w=k.P();if(6==
254
- (k.ka()&31)){var x=0;t.length>v&&(x=t[v].ud||0);x=(l+x)/m;for(var D=[],B,A=k.Cb(w-1),F=B=0;F<A.length;)2==B&&3==A[F]?(B=0,A=[].concat(ia(A)),A.splice(F,1),A=new Uint8Array(A)):0==A[F]?B++:B=0,F++;B=A;for(F=0;F<B.length;){for(A=0;255==B[F];)A+=255,F++;A+=B[F++];for(var G=0;255==B[F];)G+=255,F++;G+=B[F++];4==A&&D.push(B.subarray(F,F+G));F+=G}D=r(D);for(B=D.next();!B.done;B=D.next())c.push({Lg:B.value,pts:x})}else try{k.skip(w-1)}catch(H){break}y-=w+4;0==y&&(l=t.length>v?l+(t[v].je||n):l+n,v++,y=t.length>
255
- v?t[v].sampleSize||p:p)}}).parse(a,!1);return c};function Nh(){this.h=new Mh;this.g=new Ch}Nh.prototype.init=function(a){this.h.init(a)};
256
- function Oh(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Ic(e.Lg);if(0<f.length&&(d=a.g,e=e.pts,f=new qg(f,0),181===f.ka()&&49===f.kc()&&1195456820===f.P()&&3===f.ka())){var g=f.ka();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.ka(),l=(k&4)>>2,m=f.ka(),n=f.ka();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Qa:m,kb:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return Eh(a.g)}
257
- ;function Ph(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Qh(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function Rh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=r(Sh(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
258
- function Th(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Sh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Sh(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Uh(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.J={};this.I={};this.g=null;this.K=d||function(){};this.i={};this.A=new of;this.B={};this.C=b;this.G=new Pc;this.m=Vh(this,this.G);this.F=new mf(function(){return Wh(e)});this.H=""}function Vh(a,b){var c=new MediaSource;a.A.Ga(c,"sourceopen",function(){URL.revokeObjectURL(a.H);b.resolve()});a.H=Xh(c);a.j.src=a.H;return c}q=Uh.prototype;q.destroy=function(){return this.F.destroy()};
259
- function Wh(a){var b,c,d,e,f,g,h,k;return M(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Eb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new P(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.B)b.push(a.B[k].destroy());return z(l,Promise.all(b),2)}a.A&&(a.A.release(),a.A=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.m=null;a.g=null;a.l=null;a.h={};a.B={};a.C=null;a.i=
217
+ function Of(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
218
+ (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var jg=1,eg=5,fg=.5,lg=new Qc(function(){return Jc(new Uint8Array([0]))});function mg(){}function ng(a,b,c,d){var e,f,g,h;return M(function(k){if(1==k.g){if(d&&(e=og[d.toLowerCase()]))return k["return"](e);if(f=pg(a))if(g=qg[f])return k["return"](g);return d?k.D(2):z(k,rg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=og[d]))return k["return"](h);throw new P(2,4,4E3,a);})}
219
+ function rg(a,b,c){var d,e,f;return M(function(g){if(1==g.g)return d=gf([a],c),d.method="HEAD",z(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function pg(a){a=(new jb(a)).Na.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}N("shaka.media.ManifestParser",mg);mg.unregisterParserByMime=function(a){delete og[a]};mg.registerParserByMime=function(a,b){og[a]=b};
220
+ mg.registerParserByExtension=function(a,b){qg[a]=b};var og={},qg={};function sg(a,b){this.U=Lc(a);this.h=b==tg;this.g=0}q=sg.prototype;q.Ea=function(){return this.g<this.U.byteLength};q.ia=function(){return this.g};q.fg=function(){return this.U.byteLength};q.ka=function(){try{var a=this.U.getUint8(this.g);this.g+=1;return a}catch(b){throw ug();}};q.kc=function(){try{var a=this.U.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw ug();}};q.P=function(){try{var a=this.U.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw ug();}};
221
+ q.pf=function(){try{var a=this.U.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw ug();}};q.lc=function(){try{if(this.h){var a=this.U.getUint32(this.g,!0);var b=this.U.getUint32(this.g+4,!0)}else b=this.U.getUint32(this.g,!1),a=this.U.getUint32(this.g+4,!1)}catch(c){throw ug();}if(2097151<b)throw new P(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Cb=function(a){if(this.g+a>this.U.byteLength)throw ug();var b=Ic(this.U,this.g,a);this.g+=a;return b};
222
+ q.skip=function(a){if(this.g+a>this.U.byteLength)throw ug();this.g+=a};q.rf=function(a){if(this.g<a)throw ug();this.g-=a};q.seek=function(a){if(0>a||a>this.U.byteLength)throw ug();this.g=a};q.Lc=function(){for(var a=this.g;this.Ea()&&0!=this.U.getUint8(this.g);)this.g+=1;a=Ic(this.U,a,this.g-a);this.g+=1;return fd(a)};function ug(){return new P(2,3,3E3)}N("shaka.util.DataViewReader",sg);sg.prototype.readTerminatedString=sg.prototype.Lc;sg.prototype.seek=sg.prototype.seek;sg.prototype.rewind=sg.prototype.rf;
223
+ sg.prototype.skip=sg.prototype.skip;sg.prototype.readBytes=sg.prototype.Cb;sg.prototype.readUint64=sg.prototype.lc;sg.prototype.readInt32=sg.prototype.pf;sg.prototype.readUint32=sg.prototype.P;sg.prototype.readUint16=sg.prototype.kc;sg.prototype.readUint8=sg.prototype.ka;sg.prototype.getLength=sg.prototype.fg;sg.prototype.getPosition=sg.prototype.ia;sg.prototype.hasMoreData=sg.prototype.Ea;var tg=1;sg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:tg};function vg(){this.i=[];this.h=[];this.g=!1}q=vg.prototype;q.box=function(a,b){var c=wg(a);this.i[c]=xg;this.h[c]=b;return this};q.X=function(a,b){var c=wg(a);this.i[c]=yg;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new sg(a,0);for(this.g=!1;a.Ea()&&!this.g;)this.rd(0,a,b,c)};
224
+ q.rd=function(a,b,c,d){var e=b.ia();if(d&&e+8>b.U.byteLength)this.g=!0;else{var f=b.P(),g=b.P(),h=!1;switch(f){case 0:f=b.U.byteLength-e;break;case 1:if(d&&b.ia()+8>b.U.byteLength){this.g=!0;return}f=b.lc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==yg){if(d&&b.ia()+4>b.U.byteLength){this.g=!0;return}m=b.P();l=m>>>24;m&=16777215}g=e+f;c&&g>b.U.byteLength&&(g=b.U.byteLength);d&&g>b.U.byteLength?this.g=!0:(d=g-b.ia(),b=0<d?b.Cb(d):new Uint8Array(0),b=new sg(b,0),k({parser:this,partialOkay:c||
225
+ !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.ia(),b.U.byteLength-b.ia()))}};function zg(a){for(var b=Ag(a);a.reader.Ea()&&!a.parser.g;)a.parser.rd(a.start+b,a.reader,a.partialOkay)}function Bg(a){for(var b=Ag(a),c=a.reader.P(),d=0;d<c&&(a.parser.rd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Cg(a){return function(b){a(b.reader.Cb(b.reader.U.byteLength-b.reader.ia()))}}
226
+ function wg(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Dg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Ag(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}N("shaka.util.Mp4Parser",vg);vg.headerSize=Ag;vg.typeToString=Dg;vg.allData=Cg;vg.sampleDescription=Bg;vg.children=zg;vg.prototype.parseNext=vg.prototype.rd;vg.prototype.parse=vg.prototype.parse;vg.prototype.stop=vg.prototype.stop;
227
+ vg.prototype.fullBox=vg.prototype.X;vg.prototype.box=vg.prototype.box;var xg=0,yg=1;function Eg(a){function b(){d=!0}function c(l){f.push(l);zg(l)}a=Ic(a);var d=!1,e,f=[],g=[];(new vg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).X("stsd",function(l){e=l;f.push(l);Bg(l)}).X("encv",b).X("enca",b).X("avc1",function(l){g.push({box:l,Jc:1701733238})}).X("avc3",function(l){g.push({box:l,Jc:1701733238})}).X("ac-3",function(l){g.push({box:l,Jc:1701733217})}).X("ec-3",function(l){g.push({box:l,Jc:1701733217})}).X("mp4a",function(l){g.push({box:l,Jc:1701733217})}).parse(a);
228
+ if(d)return a;if(0==g.length||!e)throw Ya(rd(a)),new P(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=Fg(a,e,k.box,f,k.Jc);return a}
229
+ function Fg(a,b,c,d,e){var f=Gg.value(),g=a.subarray(c.start,c.start+c.size),h=Lc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Lc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Hg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Wc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,Hg(e,d.start,d.size+k.byteLength);k=Lc(e,b.start);b=Ag(b);a=k.getUint32(b);
230
+ k.setUint32(b,a+1);return e}function Hg(a,b,c){a=Lc(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Gg=new Qc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Ig(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Jg(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],t=-1,v=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){t=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){v=y;break}if(-1===
231
+ t||-1===v)p=Kg(d,e),a.nestedCues.push(p);else{for(;t<=v;t++)if(y=p[t]){var w=y.l,x=y.i,D=y.j,B=y.h;if(w!=h||x!=k||D!=l||B!=m)n.payload&&a.nestedCues.push(n),n=Jg(d,e,w,x,D,B),h=w,k=x,l=D,m=B;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Kg(d,e),a.nestedCues.push(n));n=Jg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
232
+ function Jg(a,b,c,d,e,f){a=new lc(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Kg(a,b){var c=new lc(a,b,"");c.lineBreak=!0;return c}function Lg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Mg(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.B=b;this.j=this.m=!1;this.l="white";this.A="black";Ng(this)}function Og(a,b,c){return Ig(new lc(b,c,""),"CC"+(a.C<<1|a.B+1),a.i,b,c)}function Ng(a){Pg(a,0,15);a.g=1}function Qg(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Rg:d=Sg.has(c)?Sg.get(c):String.fromCharCode(c);break;case Tg:d=Ug.get(c);break;case Vg:a.i[a.g].pop();d=Wg.get(c);break;case Xg:a.i[a.g].pop(),d=Yg.get(c)}d&&a.i[a.g].push(new Lg(d,a.m,a.j,a.A,a.l))}}
233
+ function Zg(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Pg(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
234
+ var Rg=0,Tg=1,Vg=2,Xg=3,Sg=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Ug=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Wg=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
235
+ [35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Yg=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
236
+ [39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function $g(a,b){this.h=ah;this.A=new Mg(a,b);this.i=new Mg(a,b);this.l=new Mg(a,b);this.g=this.i;this.j=0;this.m=null}function bh(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==ch&&a.h!==dh&&(e=Og(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Pg(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Pg(c,0,15),d.g=15);a.h=ch;d.h=b;return e}function eh(a){a.h=fh;a.g=a.l;a.g.h=0}function gh(a){Ta("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.A;a.h=dh}
237
+ var ah=0,fh=1,ch=3,dh=4,hh="black green blue cyan red yellow magenta black".split(" "),ih="white green blue cyan red yellow magenta white_italics".split(" ");function jh(){this.l=!1;this.F=this.H=0;this.G=kh;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.m="black";lh(this)}function lh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(mh())}function mh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function nh(a,b){oh(a)&&(a.i[a.h][a.g]=new Lg(b,a.C,a.A,a.m,a.B),a.g++)}function oh(a){var b=a.g<a.F&&0<=a.g;return a.h<a.H&&0<=a.h&&b}jh.prototype.isVisible=function(){return this.l};
238
+ function ph(a,b,c){var d=new lc(a.j,b,"");d.textAlign=a.G===qh?"left":a.G===rh?"right":pc;if(c=Ig(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var qh=0,rh=1,kh=2;function sh(){this.i=[];this.h=null;this.g=0}function th(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new uh(a.h)),a.h=null,a.g=0))}function uh(a){this.g=0;this.h=a}uh.prototype.Ea=function(){return this.g<this.h.length};uh.prototype.ia=function(){return this.g};function vh(a){if(!a.Ea())throw new P(2,2,3E3);return a.h[a.g++]}uh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new P(2,2,3E3);this.g+=a};function wh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
239
+ function xh(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=vh(b).value;b=null;c=r(yh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=ph(e,d,a.i)),lh(e);return b}if(137===c)for(b=vh(b).value,b=r(yh(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=vh(b).value;b=null;c=r(yh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=ph(e,d,a.i)),e.l=!1;return b}if(139===c){c=vh(b).value;
240
+ b=null;c=r(yh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=ph(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=vh(b).value,zh(a,b,d);if(143===c)return d=zh(a,255,d),Ah(a),d;if(144===c)b.skip(1),d=vh(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=vh(b).value,c=vh(b).value,b.skip(1),a.g&&(b=Bh((c&48)>>4,(c&12)>>2,c&3),a.g.B=Bh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=vh(b).value,b=vh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
241
+ b.skip(1),d=vh(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new jh;f.j=d;a.h[c]=f}d=vh(b).value;vh(b);vh(b);f=vh(b).value;var g=vh(b).value;b=vh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.H=(f&15)+1;b.F=(g&63)+1;a.g=a.h[c]}}}return null}function yh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
242
+ function zh(a,b,c){var d=null;b=r(yh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=ph(f,c,a.i));a.h[e]=null}return d}function Ah(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Bh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Ch[a<<2|b<<1|c]}
243
+ var Dh=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Ch="black blue green cyan red magenta yellow white".split(" ");function Eh(){this.h=[];this.g=[];this.i=new sh;this.l=0;this.B=new Map([["CC1",new $g(0,0)],["CC2",new $g(0,1)],["CC3",new $g(1,0)],["CC4",new $g(1,1)]]);this.A=this.m=0;this.j=new Map;Fh(this)}function Fh(a){a.m=0;a.A=0;a=r(a.B.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Ng(b.i),Ng(b.l),Ng(b.A)}
244
+ function Gh(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=r(a.h),e=d.next();!e.done;e=d.next())(e=Hh(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())th(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=Ih(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
245
+ function Hh(a,b){var c=b.type;if(16===(b.Qa&112)){var d=b.Qa>>3&1;0===c?a.m=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.m)+1));if(255===b.Qa&&255===b.kb||!b.Qa&&!b.kb||!Jh(b.Qa)||!Jh(b.kb))return 45<=++a.l&&Fh(a),null;a.l=0;b.Qa&=127;b.kb&=127;if(!b.Qa&&!b.kb)return null;d=null;if(16===(b.Qa&112))a:{var e=b.Qa;d=b.kb;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=ih[f]:7===f&&(h=!0);
246
+ d=1===(d&1);if(c.h!==dh){f=c.g;if(c.h===ch&&e!==f.g){var k=1+e-f.h;Zg(f,k,1+f.g-f.h,f.h);Pg(f,0,k-1);Pg(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.A="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Qg(c.g,Rg,32),g=!1,e=ih[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=hh[(d&14)>>1]),c.g.A=g;else if(17===(e&247)&&48===(d&240))Qg(c.g,Tg,d);else if(18===
247
+ (e&246)&&32===(d&224))Qg(c.g,e&1?Xg:Vg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.kb){case 32:eh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=bh(c,2,d);break;case 38:e=bh(c,3,d);break;case 39:e=bh(c,4,d);break;case 40:Qg(c.g,Rg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Ng(c.A);gh(c);break;case 43:gh(c);break;case 44:e=c.i;g=null;c.h!==dh&&(g=Og(e,c.j,d));Pg(e,0,15);e=g;break;case 45:e=c.g;c.h!==ch?e=null:(g=Og(e,c.j,d),h=e.g-e.h+1,Zg(e,h-1,h,e.h),Pg(e,
248
+ 0,h-1),Pg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Pg(c.l,0,15);break;case 47:e=null,c.h!==dh&&(e=Og(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,eh(c),c.j=d}d=e;break a}d=null}else e=b.kb,Qg(c.g,Rg,b.Qa),Qg(c.g,Rg,e);return d}
249
+ function Ih(a,b){var c=[];try{for(;b.Ea();){var d=vh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=vh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new wh(e));for(var g=a.j.get(e),h=b.ia();b.ia()-h<f;){e=b;var k=vh(e),l=k.value,m=k.pts;if(16===l){var n=vh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!oh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.F-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=ph(t,p,g.i));if(t.h+1>=t.H){p=t;for(var v=0,y=1;15>y;y++,
250
+ v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=mh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=ph(t,p,g.i));t.i[t.h]=mh();t.g=0;break;case 12:t.isVisible()&&(e=ph(t,p,g.i)),lh(t),p=t,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=xh(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?nh(g.g,"\u266a"):nh(g.g,
251
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&nh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Dh.has(e)){var x=Dh.get(e);nh(g.g,x)}else nh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?nh(g.g,"_"):nh(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(D){if(D instanceof P&&3E3===D.code)Ta("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Jh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Kh(a,b){var c=null,d=null,e=a.P();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.P());b&16&&(d=a.P());return{trackId:e,Ve:c,Qf:d}}function Lh(a,b){return{Qd:1==b?a.lc():a.P()}}function Mh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.P()}}
252
+ function Nh(a,b,c){var d=a.P(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={ke:null,sampleSize:null,ud:null};c&256&&(g.ke=a.P());c&512&&(g.sampleSize=a.P());c&1024&&a.skip(4);c&2048&&(g.ud=0==b?a.P():a.pf());e.push(g)}return{Ji:d,tf:e}};function Oh(){this.i=new Map;this.h=this.g=0}
253
+ Oh.prototype.init=function(a){var b=this,c=[],d=[];(new vg).box("moov",zg).box("mvex",zg).X("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.P();f=f.P();b.g=e;b.h=f}).box("trak",zg).X("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.P();c.push(e)}).box("mdia",zg).X("mdhd",function(e){e=Mh(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new P(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
254
+ Oh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new vg).box("moof",zg).box("traf",zg).X("trun",function(k){f=Nh(k.reader,k.version,k.flags).tf}).X("tfhd",function(k){k=Kh(k.reader,k.flags);d=k.Ve||b.g;e=k.Qf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).X("tfdt",function(k){g=Lh(k.reader,k.version).Qd}).box("mdat",function(k){if(null===g)throw new P(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,t=f,v=0,y=p;for(t.length&&(y=t[0].sampleSize||p);k.Ea();){var w=k.P();if(6==
255
+ (k.ka()&31)){var x=0;t.length>v&&(x=t[v].ud||0);x=(l+x)/m;for(var D=[],B,A=k.Cb(w-1),F=B=0;F<A.length;)2==B&&3==A[F]?(B=0,A=[].concat(ia(A)),A.splice(F,1),A=new Uint8Array(A)):0==A[F]?B++:B=0,F++;B=A;for(F=0;F<B.length;){for(A=0;255==B[F];)A+=255,F++;A+=B[F++];for(var G=0;255==B[F];)G+=255,F++;G+=B[F++];4==A&&D.push(B.subarray(F,F+G));F+=G}D=r(D);for(B=D.next();!B.done;B=D.next())c.push({Mg:B.value,pts:x})}else try{k.skip(w-1)}catch(H){break}y-=w+4;0==y&&(l=t.length>v?l+(t[v].ke||n):l+n,v++,y=t.length>
256
+ v?t[v].sampleSize||p:p)}}).parse(a,!1);return c};function Ph(){this.h=new Oh;this.g=new Eh}Ph.prototype.init=function(a){this.h.init(a)};
257
+ function Qh(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Ic(e.Mg);if(0<f.length&&(d=a.g,e=e.pts,f=new sg(f,0),181===f.ka()&&49===f.kc()&&1195456820===f.P()&&3===f.ka())){var g=f.ka();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.ka(),l=(k&4)>>2,m=f.ka(),n=f.ka();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Qa:m,kb:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return Gh(a.g)}
258
+ ;function Rh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Sh(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function Th(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=r(Uh(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
259
+ function Vh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Uh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Uh(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Wh(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.J={};this.I={};this.g=null;this.K=d||function(){};this.i={};this.A=new qf;this.B={};this.C=b;this.G=new Pc;this.m=Xh(this,this.G);this.F=new of(function(){return Yh(e)});this.H=""}function Xh(a,b){var c=new MediaSource;a.A.Ga(c,"sourceopen",function(){URL.revokeObjectURL(a.H);b.resolve()});a.H=Zh(c);a.j.src=a.H;return c}q=Wh.prototype;q.destroy=function(){return this.F.destroy()};
260
+ function Yh(a){var b,c,d,e,f,g,h,k;return M(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Eb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new P(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.B)b.push(a.B[k].destroy());return z(l,Promise.all(b),2)}a.A&&(a.A.release(),a.A=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.m=null;a.g=null;a.l=null;a.h={};a.B={};a.C=null;a.i=
260
261
  {};C(l)})}
261
- q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){if(1==m.g)return d=Nb,z(m,c.G,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={Ia:e.Ia},g=f.next())e.Ia=g.value,h=a.get(e.Ia),k=kd(h.mimeType,h.codecs),e.Ia==d.oa?Yh(c,k):(!b&&MediaSource.isTypeSupported(k)||!gd(k,e.Ia)||(c.B[e.Ia]=new fd,k=id(e.Ia,k)),l=c.m.addSourceBuffer(k),c.A.o(l,"error",function(n){return function(){c.i[n.Ia][0].p.reject(new P(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.A.o(l,"updateend",function(n){return function(){return Zh(c,n.Ia)}}(e)),
262
- c.h[e.Ia]=l,c.J[e.Ia]=k,c.i[e.Ia]=[],c.I[e.Ia]=!!h.drmInfos.length);C(m)})};function Yh(a,b){a.g||(a.g=new pd(a.l));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.g.l=Gb(rd[b]))}function $h(a){return a.m?"ended"==a.m.readyState:!0}function ai(a,b){if(b==Mb)var c=a.g.g;else c=bi(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function ci(a,b){return b==Mb?a.g.h:Ph(bi(a,b))}
263
- function di(a,b,c){if(b==Mb)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=bi(a,b);return Rh(a,c)}q.zb=function(){var a={total:Sh(this.j.buffered),audio:Sh(bi(this,"audio")),video:Sh(bi(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function bi(a,b){try{return a.h[b].buffered}catch(c){return null}}
264
- function ei(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g){g=Nb;if(b==g.oa)return z(v,sd(a.g,c,d,e),0);if(a.B[b])return z(v,jd(a.B[b],c),10);if(f)return a.g||Yh(a,"text/vtt"),null==d&&null==e?a.C.init(c):(h=Oh(a.C,c),h.length&&(k=a.h[g.gb].timestampOffset,xd(a.g,h,d,e,k))),c=fi(a,c,d,b),z(v,gi(a,b,function(){a.h[b].appendBuffer(c)}),0);c=fi(a,c,d,b);return z(v,gi(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||Yh(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.K(l.metadata,
265
- m,e));l.captions&&l.captions.length&&(n=a.h[g.gb].timestampOffset,p=vd(l.captions),xd(a.g,p,d,e,n));t=l.data;t=fi(a,t,d,b);return z(v,gi(a,b,function(){a.h[b].appendBuffer(t)}),0)})}function hi(a,b){var c=ci(a,"video")||0;ud(a.g,b,c)}function ii(a){a.g&&ud(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return M(function(f){e=Nb;return a==e.oa?z(f,d.g.remove(b,c),0):z(f,gi(d,a,function(){c<=b?Zh(d,a):d.h[a].remove(b,c)}),0)})};
266
- function ji(a,b){var c;return M(function(d){c=Nb;return b==c.oa?a.g?z(d,a.g.remove(0,Infinity),0):d["return"]():z(d,gi(a,b,function(){var e=a.m.duration;0>=e?Zh(a,b):a.h[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return M(function(d){c=Nb;return a==c.oa?d["return"]():z(d,gi(b,a,function(){b.j.currentTime-=.001;Zh(b,a)}),0)})};
267
- function ki(a,b,c,d,e){var f;return M(function(g){f=Nb;return b==f.oa?(a.g.C=c,td(a.g,d,e),g["return"]()):z(g,Promise.all([gi(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;Zh(a,b)}),gi(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;Zh(a,b)}),gi(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Zh(a,b)})]),0)})}
268
- q.endOfStream=function(a){var b=this;return M(function(c){return z(c,li(b,function(){$h(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};q.bb=function(a){var b=this;return M(function(c){return z(c,li(b,function(){b.m.duration=a}),0)})};q.getDuration=function(){return this.m.duration};function Zh(a,b){var c=a.i[b][0];c&&(c.p.resolve(),mi(a,b))}function gi(a,b,c){nf(a.F);c={start:c,p:new Pc};a.i[b].push(c);1==a.i[b].length&&ni(a,b);return c.p}
269
- function li(a,b){var c,d,e,f,g,h;return M(function(k){switch(k.g){case 1:nf(a.F);c=[];d={};for(e in a.h)d.tc=new Pc,f={start:function(l){return function(){return l.tc.resolve()}}(d),p:d.tc},a.i[e].push(f),c.push(d.tc),1==a.i[e].length&&f.start(),d={tc:d.tc};E(k,2);return z(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=I(k),g;case 3:try{b()}catch(l){throw new P(2,3,3015,l);}finally{for(h in a.h)mi(a,h)}C(k)}})}function mi(a,b){a.i[b].shift();ni(a,b)}
270
- function ni(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new P(2,3,3017,b)):c.p.reject(new P(2,3,3015,d)),mi(a,b)}}function fi(a,b,c,d){var e=a.I[d];null==c&&e&&(Fd()||Cd())&&"mp4"==a.J[d].split(";")[0].split("/")[1]&&(b=Cg(b));return b}var Xh=window.URL.createObjectURL;function oi(a,b,c,d){this.Ka=a;this.Ha=b;this.wa=c;this.Wd=void 0===d?null:d}oi.prototype.Fc=function(){return this.Ha};oi.prototype.Bc=function(){return this.wa};function pi(a,b){return a&&b?a.Fc()==b.Fc()&&a.Bc()==b.Bc()&&kc(a.Ka(),b.Ka()):a==b}N("shaka.media.InitSegmentReference",oi);oi.prototype.getEndByte=oi.prototype.Bc;oi.prototype.getStartByte=oi.prototype.Fc;
271
- function qi(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.Ha=d;this.wa=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}q=qi.prototype;q.Ka=function(){return this.j()};q.getStartTime=function(){return this.startTime};q.cg=function(){return this.endTime};q.Fc=function(){return this.Ha};q.Bc=function(){return this.wa};q.wg=function(){return this.tilesLayout};
272
- q.vg=function(){return this.i};N("shaka.media.SegmentReference",qi);qi.prototype.getTileDuration=qi.prototype.vg;qi.prototype.getTilesLayout=qi.prototype.wg;qi.prototype.getEndByte=qi.prototype.Bc;qi.prototype.getStartByte=qi.prototype.Fc;qi.prototype.getEndTime=qi.prototype.cg;qi.prototype.getStartTime=qi.prototype.getStartTime;qi.prototype.getUris=qi.prototype.Ka;function R(a,b,c){this.l=a;this.sd=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.A=0;this.B=!0;this.C=0;this.F=void 0===c?!0:c;this.G=0}q=R.prototype;q.getDuration=function(){return this.i};q.kg=function(){return this.g};q.bb=function(a){this.i=a};q.og=function(){return this.l};q.vf=function(a){this.A=a};q.Oc=function(a){this.B=a};q.ve=function(a){this.m=a};q.ah=function(a){this.sd=a};q.ag=function(){return this.sd};
273
- q.hc=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.$d(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.F&&(this.l=(Date.now()+this.A)/1E3-this.h-this.g)}};q.$d=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.Zd=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};q.T=function(){return Infinity==this.i&&!this.B};
274
- q.Mb=function(){return Infinity!=this.i&&!this.B};q.ob=function(){return Math.max(this.C,this.Jb()-this.m)};q.yf=function(a){this.C=a};q.Jb=function(){return this.T()||this.Mb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.l)+this.G,this.i):this.h?Math.min(this.h,this.i):this.i};q.Ec=function(a){var b=Math.max(this.j,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Jb()-this.m+a,this.mb()))};q.bc=function(){return this.Ec(0)};
275
- q.mb=function(){return Math.max(0,this.Jb()-(this.T()||this.Mb()?this.sd:0))};q.Cf=function(){return null==this.l||null!=this.h&&this.F?!1:!0};q.uf=function(a){this.G=a};N("shaka.media.PresentationTimeline",R);R.prototype.setAvailabilityTimeOffset=R.prototype.uf;R.prototype.usingPresentationStartTime=R.prototype.Cf;R.prototype.getSeekRangeEnd=R.prototype.mb;R.prototype.getSeekRangeStart=R.prototype.bc;R.prototype.getSafeSeekRangeStart=R.prototype.Ec;R.prototype.getSegmentAvailabilityEnd=R.prototype.Jb;
276
- R.prototype.setUserSeekStart=R.prototype.yf;R.prototype.getSegmentAvailabilityStart=R.prototype.ob;R.prototype.isInProgress=R.prototype.Mb;R.prototype.isLive=R.prototype.T;R.prototype.offset=R.prototype.offset;R.prototype.notifyMaxSegmentDuration=R.prototype.Zd;R.prototype.notifyMinSegmentStartTime=R.prototype.$d;R.prototype.notifySegments=R.prototype.hc;R.prototype.getDelay=R.prototype.ag;R.prototype.setDelay=R.prototype.ah;R.prototype.setSegmentAvailabilityDuration=R.prototype.ve;
277
- R.prototype.setStatic=R.prototype.Oc;R.prototype.setClockOffset=R.prototype.vf;R.prototype.getPresentationStartTime=R.prototype.og;R.prototype.setDuration=R.prototype.bb;R.prototype.getMaxSegmentDuration=R.prototype.kg;R.prototype.getDuration=R.prototype.getDuration;function ri(a,b){this.j=a;this.m=si(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.A=b;this.i=function(){}}ri.prototype.release=function(){this.j=null;this.i=function(){}};function ti(a,b){a.i=b}function ui(a){this.g=a}function si(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(Sh(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function vi(a,b,c,d,e){var f=this;this.g=a;this.F=b;this.l=c;this.C=e;this.i=new of;this.B=!1;this.G=a.readyState;this.j=!1;this.h=d;this.A=!1;this.i.o(a,"waiting",function(){return wi(f)});this.m=(new Q(function(){wi(f)})).ha(.25)}vi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.F=this.C=null};vi.prototype.be=function(){this.A=!0;wi(this)};
278
- function wi(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.B)return}else a.B=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.G&&(a.j=!1,a.G=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=si(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=Th(b,g,a.l.gapDetectionThreshold);if(!(null==
279
- c||0==c&&!a.A||(d=b.start(c),d>=a.F.mb()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new O("largegap",g),g.cancelable=!0,a.C(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function xi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=yi.value().get(b),c.Ga(a,b,d))}var yi=new Qc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function zi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new of;this.i=new Ai(a);xi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Bi(d,d.j)})}zi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Ci(a){return a.m?a.g.currentTime:a.j}function Di(a,b){0<a.g.readyState?Ei(a.i,b):xi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Bi(a,a.j)})}
280
- function Bi(a,b){.001>Math.abs(a.g.currentTime-b)?Fi(a):(a.h.Ga(a.g,"seeking",function(){Fi(a)}),Ei(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Fi(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function Ai(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Q(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Ai.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
281
- function Ei(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ha(.1)};function Gi(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.Ga(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.h))}var c=this;this.g=a;this.j=!1;this.h=null;this.i=new of;xi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}Gi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};Gi.prototype.A=function(a){this.h=this.j?this.h:a};Gi.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0};Gi.prototype.G=function(){};
282
- function Hi(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.H=b.minBufferTime||0;this.l=c;this.F=e;this.C=null;this.j=new vi(a,b.presentationTimeline,c,Ii(a,c),f);this.h=new zi(a,function(){a:{var h=g.j;h.B=!0;h.A=!1;h.j=!1;var k=Ci(g.h);h=Ji(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.C||g.C<k-1)){g.C=k;Di(g.h,h);h=void 0;break a}g.F();h=void 0}return h},Ki(this,d));this.B=(new Q(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ci(g.h),k=g.g.bc(),l=g.g.mb();3>l-k&&(k=
283
- l-3);h<k&&(h=Ji(g,h),g.i.currentTime=h)}})).ha(.25)}Hi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.B&&(this.B.stop(),this.B=null);this.i=this.h=this.g=this.l=null;this.F=function(){}};Hi.prototype.A=function(a){Di(this.h,a)};Hi.prototype.m=function(){var a=Ci(this.h);return 0<this.i.readyState&&!this.i.paused?Li(this,a):a};
284
- function Ki(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.bc():a.g.mb():0>b&&(b=a.g.mb()+b);return Mi(a,Li(a,b))}Hi.prototype.G=function(){this.j.be()};function Mi(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Ji(a,b){var c=Math.max(a.H,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.bc(),f=a.g.mb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Ec(c),k=a.g.Ec(d);c=a.g.Ec(c+d);return b>=g?Mi(a,b):b>f?f:b<e?Qh(a.i.buffered,k)?k:c:b>=h||Qh(a.i.buffered,b)?b:c}
285
- function Li(a,b){var c=a.g.bc();if(b<c)return c;c=a.g.mb();return b>c?c:b}function Ii(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new ri(new ui(a),b.stallThreshold);ti(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function Ni(a){this.O=a;this.g=null;this.h=0;this.i=!1}q=Ni.prototype;q.destroy=function(){zb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.O=[],this.g&&this.g.stop(),this.g=null)};q.Fg=function(){this.i=!0};
262
+ q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){if(1==m.g)return d=Nb,z(m,c.G,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={Ia:e.Ia},g=f.next())e.Ia=g.value,h=a.get(e.Ia),k=yd(h.mimeType,h.codecs),e.Ia==d.oa?$h(c,k):(!b&&MediaSource.isTypeSupported(k)||!ud(k,e.Ia)||(c.B[e.Ia]=new td,k=wd(e.Ia,k)),l=c.m.addSourceBuffer(k),c.A.o(l,"error",function(n){return function(){c.i[n.Ia][0].p.reject(new P(2,3,3014,c.j.error?c.j.error.code:0))}}(e)),c.A.o(l,"updateend",function(n){return function(){return ai(c,n.Ia)}}(e)),
263
+ c.h[e.Ia]=l,c.J[e.Ia]=k,c.i[e.Ia]=[],c.I[e.Ia]=!!h.drmInfos.length);C(m)})};function $h(a,b){a.g||(a.g=new Ed(a.l));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.g.l=Gb(Gd[b]))}function bi(a){return a.m?"ended"==a.m.readyState:!0}function ci(a,b){if(b==Mb)var c=a.g.g;else c=di(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function ei(a,b){return b==Mb?a.g.h:Rh(di(a,b))}
264
+ function fi(a,b,c){if(b==Mb)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=di(a,b);return Th(a,c)}q.zb=function(){var a={total:Uh(this.j.buffered),audio:Uh(di(this,"audio")),video:Uh(di(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function di(a,b){try{return a.h[b].buffered}catch(c){return null}}
265
+ function gi(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g){g=Nb;if(b==g.oa)return z(v,Hd(a.g,c,d,e),0);if(a.B[b])return z(v,xd(a.B[b],c),10);if(f)return a.g||$h(a,"text/vtt"),null==d&&null==e?a.C.init(c):(h=Qh(a.C,c),h.length&&(k=a.h[g.gb].timestampOffset,Md(a.g,h,d,e,k))),c=hi(a,c,d,b),z(v,ii(a,b,function(){a.h[b].appendBuffer(c)}),0);c=hi(a,c,d,b);return z(v,ii(a,b,function(){a.h[b].appendBuffer(c)}),0)}l=v.h;a.g||$h(a,"text/vtt");l.metadata&&(m=a.h[b].timestampOffset,a.K(l.metadata,
266
+ m,e));l.captions&&l.captions.length&&(n=a.h[g.gb].timestampOffset,p=Kd(l.captions),Md(a.g,p,d,e,n));t=l.data;t=hi(a,t,d,b);return z(v,ii(a,b,function(){a.h[b].appendBuffer(t)}),0)})}function ji(a,b){var c=ei(a,"video")||0;Jd(a.g,b,c)}function ki(a){a.g&&Jd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return M(function(f){e=Nb;return a==e.oa?z(f,d.g.remove(b,c),0):z(f,ii(d,a,function(){c<=b?ai(d,a):d.h[a].remove(b,c)}),0)})};
267
+ function li(a,b){var c;return M(function(d){c=Nb;return b==c.oa?a.g?z(d,a.g.remove(0,Infinity),0):d["return"]():z(d,ii(a,b,function(){var e=a.m.duration;0>=e?ai(a,b):a.h[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return M(function(d){c=Nb;return a==c.oa?d["return"]():z(d,ii(b,a,function(){b.j.currentTime-=.001;ai(b,a)}),0)})};
268
+ function mi(a,b,c,d,e){var f;return M(function(g){f=Nb;return b==f.oa?(a.g.C=c,Id(a.g,d,e),g["return"]()):z(g,Promise.all([ii(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;ai(a,b)}),ii(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;ai(a,b)}),ii(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;ai(a,b)})]),0)})}
269
+ q.endOfStream=function(a){var b=this;return M(function(c){return z(c,ni(b,function(){bi(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};q.bb=function(a){var b=this;return M(function(c){return z(c,ni(b,function(){b.m.duration=a}),0)})};q.getDuration=function(){return this.m.duration};function ai(a,b){var c=a.i[b][0];c&&(c.p.resolve(),oi(a,b))}function ii(a,b,c){pf(a.F);c={start:c,p:new Pc};a.i[b].push(c);1==a.i[b].length&&pi(a,b);return c.p}
270
+ function ni(a,b){var c,d,e,f,g,h;return M(function(k){switch(k.g){case 1:pf(a.F);c=[];d={};for(e in a.h)d.tc=new Pc,f={start:function(l){return function(){return l.tc.resolve()}}(d),p:d.tc},a.i[e].push(f),c.push(d.tc),1==a.i[e].length&&f.start(),d={tc:d.tc};E(k,2);return z(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=I(k),g;case 3:try{b()}catch(l){throw new P(2,3,3015,l);}finally{for(h in a.h)oi(a,h)}C(k)}})}function oi(a,b){a.i[b].shift();pi(a,b)}
271
+ function pi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new P(2,3,3017,b)):c.p.reject(new P(2,3,3015,d)),oi(a,b)}}function hi(a,b,c,d){var e=a.I[d];null==c&&e&&(Yc()||Wc())&&"mp4"==a.J[d].split(";")[0].split("/")[1]&&(b=Eg(b));return b}var Zh=window.URL.createObjectURL;function qi(a,b,c,d){this.Ka=a;this.Ha=b;this.wa=c;this.Xd=void 0===d?null:d}qi.prototype.Fc=function(){return this.Ha};qi.prototype.Bc=function(){return this.wa};function ri(a,b){return a&&b?a.Fc()==b.Fc()&&a.Bc()==b.Bc()&&kc(a.Ka(),b.Ka()):a==b}N("shaka.media.InitSegmentReference",qi);qi.prototype.getEndByte=qi.prototype.Bc;qi.prototype.getStartByte=qi.prototype.Fc;
272
+ function si(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.Ha=d;this.wa=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}q=si.prototype;q.Ka=function(){return this.j()};q.getStartTime=function(){return this.startTime};q.dg=function(){return this.endTime};q.Fc=function(){return this.Ha};q.Bc=function(){return this.wa};q.xg=function(){return this.tilesLayout};
273
+ q.wg=function(){return this.i};N("shaka.media.SegmentReference",si);si.prototype.getTileDuration=si.prototype.wg;si.prototype.getTilesLayout=si.prototype.xg;si.prototype.getEndByte=si.prototype.Bc;si.prototype.getStartByte=si.prototype.Fc;si.prototype.getEndTime=si.prototype.dg;si.prototype.getStartTime=si.prototype.getStartTime;si.prototype.getUris=si.prototype.Ka;function R(a,b,c){this.l=a;this.sd=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.A=0;this.B=!0;this.C=0;this.F=void 0===c?!0:c;this.G=0;this.H=!1}q=R.prototype;q.getDuration=function(){return this.i};q.lg=function(){return this.g};q.bb=function(a){this.i=a};q.pg=function(){return this.l};q.wf=function(a){this.A=a};q.Oc=function(a){this.B=a};q.we=function(a){this.m=a};q.bh=function(a){this.sd=a};q.cg=function(){return this.sd};
274
+ q.hc=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.ae(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.F&&!this.H&&(this.l=(Date.now()+this.A)/1E3-this.h-this.g)}};q.Wd=function(){this.H=!0};q.ae=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.$d=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
275
+ q.T=function(){return Infinity==this.i&&!this.B};q.Mb=function(){return Infinity!=this.i&&!this.B};q.ob=function(){return Math.max(this.C,this.Jb()-this.m)};q.zf=function(a){this.C=a};q.Jb=function(){return this.T()||this.Mb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.l)+this.G,this.i):this.h?Math.min(this.h,this.i):this.i};q.Ec=function(a){var b=Math.max(this.j,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Jb()-this.m+a,this.mb()))};q.bc=function(){return this.Ec(0)};
276
+ q.mb=function(){return Math.max(0,this.Jb()-(this.T()||this.Mb()?this.sd:0))};q.Df=function(){return null==this.l||null!=this.h&&this.F?!1:!0};q.vf=function(a){this.G=a};N("shaka.media.PresentationTimeline",R);R.prototype.setAvailabilityTimeOffset=R.prototype.vf;R.prototype.usingPresentationStartTime=R.prototype.Df;R.prototype.getSeekRangeEnd=R.prototype.mb;R.prototype.getSeekRangeStart=R.prototype.bc;R.prototype.getSafeSeekRangeStart=R.prototype.Ec;R.prototype.getSegmentAvailabilityEnd=R.prototype.Jb;
277
+ R.prototype.setUserSeekStart=R.prototype.zf;R.prototype.getSegmentAvailabilityStart=R.prototype.ob;R.prototype.isInProgress=R.prototype.Mb;R.prototype.isLive=R.prototype.T;R.prototype.offset=R.prototype.offset;R.prototype.notifyMaxSegmentDuration=R.prototype.$d;R.prototype.notifyMinSegmentStartTime=R.prototype.ae;R.prototype.lockStartTime=R.prototype.Wd;R.prototype.notifySegments=R.prototype.hc;R.prototype.getDelay=R.prototype.cg;R.prototype.setDelay=R.prototype.bh;
278
+ R.prototype.setSegmentAvailabilityDuration=R.prototype.we;R.prototype.setStatic=R.prototype.Oc;R.prototype.setClockOffset=R.prototype.wf;R.prototype.getPresentationStartTime=R.prototype.pg;R.prototype.setDuration=R.prototype.bb;R.prototype.getMaxSegmentDuration=R.prototype.lg;R.prototype.getDuration=R.prototype.getDuration;function ti(a,b){this.j=a;this.m=ui(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.A=b;this.i=function(){}}ti.prototype.release=function(){this.j=null;this.i=function(){}};function vi(a,b){a.i=b}function wi(a){this.g=a}function ui(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(Uh(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function xi(a,b,c,d,e){var f=this;this.g=a;this.F=b;this.l=c;this.C=e;this.i=new qf;this.B=!1;this.G=a.readyState;this.j=!1;this.h=d;this.A=!1;this.i.o(a,"waiting",function(){return yi(f)});this.m=(new Q(function(){yi(f)})).ha(.25)}xi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.F=this.C=null};xi.prototype.ce=function(){this.A=!0;yi(this)};
279
+ function yi(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.B)return}else a.B=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.G&&(a.j=!1,a.G=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=ui(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=Vh(b,g,a.l.gapDetectionThreshold);if(!(null==
280
+ c||0==c&&!a.A||(d=b.start(c),d>=a.F.mb()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new O("largegap",g),g.cancelable=!0,a.C(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function zi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ai.value().get(b),c.Ga(a,b,d))}var Ai=new Qc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Bi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new qf;this.i=new Ci(a);zi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Di(d,d.j)})}Bi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Ei(a){return a.m?a.g.currentTime:a.j}function Fi(a,b){0<a.g.readyState?Gi(a.i,b):zi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Di(a,a.j)})}
281
+ function Di(a,b){.001>Math.abs(a.g.currentTime-b)?Hi(a):(a.h.Ga(a.g,"seeking",function(){Hi(a)}),Gi(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Hi(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function Ci(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Q(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Ci.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
282
+ function Gi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ha(.1)};function Ii(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.Ga(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.h))}var c=this;this.g=a;this.j=!1;this.h=null;this.i=new qf;zi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}Ii.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};Ii.prototype.A=function(a){this.h=this.j?this.h:a};Ii.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0};Ii.prototype.G=function(){};
283
+ function Ji(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.H=b.minBufferTime||0;this.l=c;this.F=e;this.C=null;this.j=new xi(a,b.presentationTimeline,c,Ki(a,c),f);this.h=new Bi(a,function(){a:{var h=g.j;h.B=!0;h.A=!1;h.j=!1;var k=Ei(g.h);h=Li(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.C||g.C<k-1)){g.C=k;Fi(g.h,h);h=void 0;break a}g.F();h=void 0}return h},Mi(this,d));this.B=(new Q(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ei(g.h),k=g.g.bc(),l=g.g.mb();3>l-k&&(k=
284
+ l-3);h<k&&(h=Li(g,h),g.i.currentTime=h)}})).ha(.25)}Ji.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.B&&(this.B.stop(),this.B=null);this.i=this.h=this.g=this.l=null;this.F=function(){}};Ji.prototype.A=function(a){Fi(this.h,a)};Ji.prototype.m=function(){var a=Ei(this.h);return 0<this.i.readyState&&!this.i.paused?Ni(this,a):a};
285
+ function Mi(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.bc():a.g.mb():0>b&&(b=a.g.mb()+b);return Oi(a,Ni(a,b))}Ji.prototype.G=function(){this.j.ce()};function Oi(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Li(a,b){var c=Math.max(a.H,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.bc(),f=a.g.mb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Ec(c),k=a.g.Ec(d);c=a.g.Ec(c+d);return b>=g?Oi(a,b):b>f?f:b<e?Sh(a.i.buffered,k)?k:c:b>=h||Sh(a.i.buffered,b)?b:c}
286
+ function Ni(a,b){var c=a.g.bc();if(b<c)return c;c=a.g.mb();return b>c?c:b}function Ki(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new ti(new wi(a),b.stallThreshold);vi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function Pi(a){this.O=a;this.g=null;this.h=0;this.i=!1}q=Pi.prototype;q.destroy=function(){zb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.O=[],this.g&&this.g.stop(),this.g=null)};q.Gg=function(){this.i=!0};
286
287
  q.find=function(a){for(var b=this.O.length-1,c=b;0<=c;--c){var d=this.O[c],e=c<b?this.O[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.O.length&&a<this.O[0].startTime?this.h:null};q.get=function(a){if(0==this.O.length)return null;a-=this.h;return 0>a||a>=this.O.length?null:this.O[a]};q.offset=function(a){if(!this.i)for(var b=r(this.O),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
287
288
  q.ec=function(a){!this.i&&a.length&&(this.O=this.O.filter(function(b){return b.startTime<a[0].startTime}),this.O.push.apply(this.O,ia(a)))};q.fc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.O.length||d.endTime>c.O[0].startTime)});this.ec(a);this.Gb(b)};q.Gb=function(a){if(!this.i){var b=this.O.length;this.O=this.O.filter(function(c){return c.endTime>a});this.h+=b-this.O.length}};
288
- q.yb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.O.length;)if(this.O[this.O.length-1].startTime>=b)this.O.pop();else break;for(;this.O.length;)if(this.O[0].endTime<=a)this.O.shift(),c||this.h++;else break;0!=this.O.length&&(a=this.O[this.O.length-1],this.O[this.O.length-1]=new qi(a.startTime,b,a.j,a.Ha,a.wa,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.i))}};
289
- q.wd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new Q(function(){var d=b();d?c.O.push.apply(c.O,ia(d)):(c.g.stop(),c.g=null)}),this.g.ha(a))};Ni.prototype[Symbol.iterator]=function(){return this.Ib(0)};Ni.prototype.Ib=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Oi(this,b,d)};
290
- function Pi(a,b,c){return new Ni([new qi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}N("shaka.media.SegmentIndex",Ni);Ni.forSingleSegment=Pi;Ni.prototype.getIteratorForTime=Ni.prototype.Ib;Ni.prototype.updateEvery=Ni.prototype.wd;Ni.prototype.fit=Ni.prototype.yb;Ni.prototype.evict=Ni.prototype.Gb;Ni.prototype.mergeAndEvict=Ni.prototype.fc;Ni.prototype.merge=Ni.prototype.ec;Ni.prototype.offset=Ni.prototype.offset;Ni.prototype.get=Ni.prototype.get;Ni.prototype.find=Ni.prototype.find;
291
- Ni.prototype.markImmutable=Ni.prototype.Fg;Ni.prototype.release=Ni.prototype.release;Ni.prototype.destroy=Ni.prototype.destroy;function Oi(a,b,c){this.i=a;this.h=b;this.g=c}Oi.prototype.seek=function(a){zb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.Ib(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
292
- Oi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.Ka().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};Oi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.Ka().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};N("shaka.media.SegmentIterator",Oi);Oi.prototype.next=Oi.prototype.next;Oi.prototype.current=Oi.prototype.current;
293
- Oi.prototype.seek=Oi.prototype.seek;function Qi(){Ni.call(this,[]);this.j=[]}u(Qi,Ni);q=Qi.prototype;q.clone=function(){var a=new Qi;a.j=this.j.slice();return a};q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.O.length}return null};
294
- q.get=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.O.length}return null};q.offset=function(){};q.ec=function(){};q.Gb=function(){};q.fc=function(){};q.yb=function(){};q.wd=function(){};N("shaka.media.MetaSegmentIndex",Qi);Qi.prototype.updateEvery=Qi.prototype.wd;Qi.prototype.fit=Qi.prototype.yb;Qi.prototype.mergeAndEvict=Qi.prototype.fc;Qi.prototype.evict=Qi.prototype.Gb;Qi.prototype.merge=Qi.prototype.ec;
295
- Qi.prototype.offset=Qi.prototype.offset;Qi.prototype.get=Qi.prototype.get;Qi.prototype.find=Qi.prototype.find;Qi.prototype.release=Qi.prototype.release;function Ri(a){var b=this;this.g=a;this.j=!1;this.i=this.g.ed();this.h=new Q(function(){b.g.lf(.25*b.i)})}Ri.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Ri.prototype.set=function(a){this.i=a;Si(this)};Ri.prototype.bd=function(){return this.g.bd()};function Si(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.ed()!=b&&a.g.se(b);return}catch(c){}a.h.ha(.25);0!=a.g.ed()&&a.g.se(0)};function Ti(a){var b=this;this.h=a;this.g=new Set;this.i=(new Q(function(){Ui(b,!1)})).ha(.25)}Ti.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Ui(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Vi(a){cb.call(this);this.g=new Map;this.h=a}u(Vi,cb);Vi.prototype.release=function(){this.g.clear();cb.prototype.release.call(this)};function Wi(a,b){var c=a.g.get(b);c||(c={Kc:[],Se:null,contentType:b},a.g.set(b,c));return c}function Zi(a,b,c){var d=Wi(a,b.contentType);$i(a,d);a={Wd:b,position:c};d=d.Kc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
296
- Vi.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Kc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Wd;break a}}d=null}if(e=d)e=c.Se,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
297
- if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Se=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function $i(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.Kc;b.Kc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.Kc=[]};function aj(a){cb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Q(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new O("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ha(2)}u(aj,cb);aj.prototype.release=function(){this.g.clear();this.h.stop();cb.prototype.release.call(this)};function bj(a){cb.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Vb:null,Ub:cj,Lb:function(c,d){return dj(b,"enter",c,d)}},{Vb:ej,Ub:cj,Lb:function(c,d){return dj(b,"enter",c,d)}},{Vb:fj,Ub:cj,Lb:function(c,d){return dj(b,"enter",c,d)}},{Vb:cj,Ub:ej,Lb:function(c,d){return dj(b,"exit",c,d)}},{Vb:cj,Ub:fj,Lb:function(c,d){return dj(b,"exit",c,d)}},{Vb:ej,Ub:fj,Lb:function(c,d){return dj(b,"skip",c,d)}},{Vb:fj,Ub:ej,Lb:function(c,d){return dj(b,"skip",c,d)}}];this.h=new of;this.h.o(this.i,"regionremove",
298
- function(c){b.g["delete"](c.region)})}u(bj,cb);bj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;cb.prototype.release.call(this)};bj.prototype.j=function(a,b){for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?ej:a>d.endTime?fj:cj;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Vb==e&&h.Ub==f&&h.Lb(d,b)}};
299
- function dj(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var ej=1,cj=2,fj=3;function gj(a,b,c,d,e){a=ef(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function hj(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.C=1;this.A=this.l=null;this.i=new Map;this.F=!1;this.G=null;this.B=!1;this.j=new mf(function(){return ij(c)})}hj.prototype.destroy=function(){return this.j.destroy()};function ij(a){var b,c,d,e;return M(function(f){if(1==f.g){b=[];c=r(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,jj(e),b.push(kj(e));return z(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.h=null;C(f)})}
300
- hj.prototype.configure=function(a){this.h=a;this.G=new Ne({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};hj.prototype.start=function(){var a=this;return M(function(b){if(1==b.g)return z(b,lj(a),2);nf(a.j);a.F=!0;C(b)})};
301
- function mj(a,b){var c,d,e,f,g,h;M(function(k){switch(k.g){case 1:return c=Nb,E(k,2),z(k,ji(a.g.V,c.oa),4);case 4:va(k,3);break;case 2:if(d=I(k),a.g)a.g.onError(d);case 3:e=kd(b.mimeType,b.codecs);Yh(a.g.V,e);f=a.g.V.l;if(g=f.isTextVisible()||a.h.alwaysStreamText)h=nj(b),a.i.set(c.oa,h),oj(a,h,0);C(k)}})}function pj(a){var b=a.i.get(Mb);b&&(jj(b),kj(b)["catch"](function(){}),a.i["delete"](Mb));a.A=null}
302
- function qj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Rb&&(rj(a,e,!1,0,!1),c.Rb=d)}else if(d=c.Rb)c.Rb=null,rj(a,d,!0,0,!1)}}function sj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.F&&(b.video&&rj(a,b.video,c,d,e),b.audio&&rj(a,b.audio,c,d,e))}function tj(a,b){a.A=b;a.F&&rj(a,b,!0,0,!1)}
303
- function rj(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=Mb?f&&(f.Rb&&(b.trickModeVideo?(f.Rb=b,b=b.trickModeVideo):f.Rb=null),f.stream!=b||e)&&(b.type==Mb&&Yh(a.g.V,kd(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ua=null,c&&(f.yc?f.zd=!0:f.ab?(f.Tb=!0,f.Yc=d,f.zd=!0):(jj(f),uj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),vj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):mj(a,b)}
304
- function vj(a,b){var c,d;return M(function(e){if(1==e.g){if(!b.Ma)return e["return"]();c=b.stream;d=b.Ma;return c.segmentIndex?e.D(2):z(e,c.createSegmentIndex(),2)}if(b.Ma!=d||b.stream!=c)return e["return"]();var f=a.g.dd();var g=ci(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Ra?b.Ra.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.wa?k.wa-k.Ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.wa?k.wa-k.Ha:null)||0),k=a.g.getBandwidthEstimate(),
305
- f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Ma.h.g>h?!0:!1):f=!1;f&&b.Ma.abort();C(e)})}function wj(a,b){b.yc||b.Tb||(b.ab?(b.Tb=!0,b.Yc=0):null==ai(a.g.V,b.type)?null==b.eb&&oj(a,b,0):(jj(b),uj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
306
- function lj(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){if(1==n.g){b=Nb;if(!a.l)throw new P(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Fb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.gb,a.l.video),d.add(a.l.video));a.A&&(c.set(b.oa,a.A),d.add(a.A));e=a.g.V;f=a.h.forceTransmuxTS;return z(n,e.init(c,f),2)}nf(a.j);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.V.bb(p):a.g.V.bb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.i.has(k)||
307
- (m=nj(l),a.i.set(k,m),oj(a,m,0));C(n)})}function nj(a){return{stream:a,type:a.type,ua:null,Ra:null,jd:null,Vd:null,Ud:null,Td:null,Rb:null,endOfStream:!1,ab:!1,eb:null,Tb:!1,Yc:0,zd:!1,yc:!1,fe:!1,Gc:!1,Ma:null}}
308
- function xj(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:nf(a.j);if(b.ab||null==b.eb||b.yc)return h["return"]();b.eb=null;if(!b.Tb){h.D(2);break}return z(h,uj(a,b,b.zd,b.Yc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return z(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.eb&&oj(a,b,0),h["return"]();case 4:E(h,6);d=yj(a,b);null!=d&&(oj(a,b,d),b.Gc=!1);va(h,7);break;case 6:return e=
309
- I(h),z(h,zj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.i.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return z(h,a.g.V.endOfStream(),10);case 10:nf(a.j),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.bb(g),C(h)}})}
310
- function yj(a,b){if(Aj(b))return hi(a.g.V,b.stream.originalId||""),null;b.type==Mb&&ii(a.g.V);var c=a.g.dd(),d=b.Ra?b.Ra.endTime:c,e=di(a.g.V,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.C;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.i.get(Mb))&&Aj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=ci(a.g.V,b.type);e=Bj(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=Infinity;
311
- var g=Array.from(a.i.values());g=r(g);for(var h=g.next();!h.done;h=g.next())h=h.value,Aj(h)||h.ua&&!h.ua.current()||(f=Math.min(f,h.Ra?h.Ra.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;Cj(a,b,c,e)["catch"](function(){});return null}
312
- function Bj(a,b,c,d){if(b.ua)return b.ua.current();if(b.Ra||d)return b.ua=b.stream.segmentIndex.Ib(b.Ra?b.Ra.endTime:d),b.ua&&b.ua.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ua=b.stream.segmentIndex.Ib(d),e=b.ua&&b.ua.next().value);e||(b.ua=b.stream.segmentIndex.Ib(c),e=b.ua&&b.ua.next().value);return e}
313
- function Cj(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,y;return M(function(w){switch(w.g){case 1:return e=Nb,f=b.stream,g=b.ua,b.ab=!0,E(w,2),z(w,Dj(a,b,d),4);case 4:nf(a.j);if(a.B)return w["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(x){var D,B,A;return M(function(F){nf(a.j);if(a.B)return F["return"]();n=Ej(n,x);D=!1;B=0;(new tg).box("mdat",function(G){B=G.size+G.start;D=!0}).parse(n,!1,!0);if(!D)return F.D(0);
314
- A=n.subarray(0,B);n=n.subarray(B);return z(F,Fj(a,b,c,f,d,A),0)})},z(w,Gj(a,b,d,p),6);l=Gj(a,b,d);return z(w,l,7);case 7:return m=w.h,nf(a.j),a.B?w["return"]():b.Tb?(b.ab=!1,oj(a,b,0),w["return"]()):z(w,Fj(a,b,c,f,d,m),6);case 6:nf(a.j);if(a.B)return w["return"]();b.Ra=d;g.next();b.ab=!1;b.fe=!1;t=a.g.V.zb();v=t[b.type];Xa(JSON.stringify(v));b.Tb||a.g.be();oj(a,b,0);va(w,0);break;case 2:y=I(w);nf(a.j,y);if(a.B)return w["return"]();b.ab=!1;if(7001==y.code)b.ab=!1,b.eb=null,oj(a,b,0),w.D(0);else if(b.type==
315
- e.oa&&a.h.ignoreTextStreamFailures)a.i["delete"](e.oa),w.D(0);else if(3017==y.code)Hj(a,b,y),w.D(0);else if(1001==y.code&&y.data&&404==y.data[1])b.ab=!1,b.eb=null,oj(a,b,1),w.D(0);else return b.Gc=!0,y.severity=2,z(w,zj(a,y),0)}})}function Ej(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
316
- function Hj(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.fe})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Gc=!0;a.B=!0;a.g.onError(c);return}b.fe=!0}oj(a,b,4)}
317
- function Dj(a,b,c){var d,e,f,g,h,k,l;return M(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Vd||e!=b.Ud||f!=b.Td)h=function(){var n;return M(function(p){if(1==p.g)return E(p,2),b.Ud=e,b.Td=f,b.Vd=g,z(p,ki(a.g.V,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=I(p);b.Ud=null;b.Td=null;b.Vd=null;throw n;})},d.push(h());!pi(c.g,b.jd)&&(b.jd=c.g)&&(k=Gj(a,b,c.g),l=function(){var n,p,t;return M(function(v){switch(v.g){case 1:return E(v,2),z(v,k,4);
318
- case 4:return n=v.h,nf(a.j),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,z(v,ei(a.g.V,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw t=I(v),b.jd=null,t;}})},a.g.Jg(c.startTime,c.g),d.push(l()));return z(m,Promise.all(d),0)})}
319
- function Fj(a,b,c,d,e,f){var g;return M(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes)&&(new tg).X("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Lc();var n=k.reader.Lc();var p=k.reader.P();var t=k.reader.P();var v=k.reader.P();var y=k.reader.P();var w=e.startTime+t/p}else p=k.reader.P(),w=k.reader.lc()/p+e.timestampOffset,t=w-e.startTime,v=k.reader.P(),y=k.reader.P(),
320
- m=k.reader.Lc(),n=k.reader.Lc();k=k.reader.Cb(k.reader.U.byteLength-k.reader.ia());if(l&&l.includes(m)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==m?a.g.Kg():(l=(new Map).set("detail",{startTime:w,endTime:w+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:t,eventDuration:v,id:y,messageData:k}),l=new O(Ij,l),a.g.onEvent(l))}).parse(f),z(h,Jj(a,b,c),2);if(3!=h.g)return nf(a.j),z(h,ei(a.g.V,b.type,f,e.startTime,e.endTime,g),3);nf(a.j);C(h)})}
321
- function Jj(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=ai(a.g.V,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():z(h,a.g.V.remove(b.type,e,e+g),2)}nf(a.j);C(h)})}function Aj(a){return a&&a.type==Mb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
322
- function Gj(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=lf,f=gj(c.Ka(),c.Ha,c.wa,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof oi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Pb.request(e,f),b.Ma=h,z(l,h.promise,2);k=l.h;b.Ma=null;return l["return"](k.data)})}
323
- function uj(a,b,c,d){var e,f;return M(function(g){if(1==g.g)return b.Tb=!1,b.zd=!1,b.Yc=0,b.yc=!0,b.Ra=null,b.jd=null,b.ua=null,d?(e=a.g.dd(),f=a.g.V.getDuration(),z(g,a.g.V.remove(b.type,e+d,f),3)):z(g,ji(a.g.V,b.type),4);if(3!=g.g)return nf(a.j),c?z(g,a.g.V.flush(b.type),3):g.D(3);nf(a.j);b.yc=!1;b.endOfStream=!1;oj(a,b,0);C(g)})}
324
- function oj(a,b,c){var d=b.type;if(d!=Mb||a.i.has(d))b.eb=(new yd(function(){var e;return M(function(f){if(1==f.g)return E(f,2),z(f,xj(a,b),4);if(2!=f.g)return va(f,0);e=I(f);if(a.g)a.g.onError(e);C(f)})})).S(c)}function jj(a){null!=a.eb&&(a.eb.stop(),a.eb=null)}function kj(a){return M(function(b){return a.Ma?z(b,a.Ma.abort(),0):b.D(0)})}function zj(a,b){return M(function(c){if(1==c.g)return z(c,Pe(a.G),2);nf(a.j);a.g.onError(b);b.handled||a.h.failureCallback(b);C(c)})};function Kj(a,b){var c=Lj(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return Mj(d)});this.B=new mf(function(){return Nj(d)})}Kj.prototype.destroy=function(){return this.B.destroy()};function Nj(a){var b,c,d;return M(function(e){if(1==e.g)return a.h&&a.h.abort(),Oj(a),z(e,a.C,2);a.g&&a.g.$a.Qb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.$a.Qb();a.g=null;a.m=[];a.j=null;C(e)})}
325
- function Pj(a,b){var c={ic:function(){},od:function(){},Qb:function(){},onError:function(){},qd:function(){},Hi:function(){}};a.m.push({create:b,$a:c});a.h&&a.h.abort();Oj(a);return c}
326
- function Mj(a){return M(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Kb)var c=!1;else{a.g&&(a.g.$a.Qb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.$a.ic(),a.g={node:d.node,payload:d.payload,Kb:d.Kb,$a:c.$a}):c.$a.qd();c=!0}c?c=Promise.resolve():a.g?c=Qj(a):(a.j.Ig(a.i),a.A=new Pc,c=a.A);b=z(b,c,1)}return b})}
327
- function Qj(a){var b,c;return M(function(d){switch(d.g){case 1:return a.i=a.j.mg(a.i,a.l,a.g.node,a.g.payload),E(d,2),a.h=a.j.Rf(a.i,a.l,a.g.payload),z(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.$a.od(),a.g=null);va(d,0);break;case 2:b=I(d);if(7001==b.code)a.g.$a.Qb();else a.g.$a.onError(b);a.g=null;a.h=null;c=a;return z(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,C(d)}})}function Oj(a){a.A&&(a.A.resolve(),a.A=null)};function Rj(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Rj.prototype;q.remove=function(a,b){if(!this.g)return!1;Sj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
289
+ q.yb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.O.length;)if(this.O[this.O.length-1].startTime>=b)this.O.pop();else break;for(;this.O.length;)if(this.O[0].endTime<=a)this.O.shift(),c||this.h++;else break;0!=this.O.length&&(a=this.O[this.O.length-1],this.O[this.O.length-1]=new si(a.startTime,b,a.j,a.Ha,a.wa,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.i))}};
290
+ q.wd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new Q(function(){var d=b();d?c.O.push.apply(c.O,ia(d)):(c.g.stop(),c.g=null)}),this.g.ha(a))};Pi.prototype[Symbol.iterator]=function(){return this.Ib(0)};Pi.prototype.Ib=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Qi(this,b,d)};
291
+ function Ri(a,b,c){return new Pi([new si(a,a+b,function(){return c},0,null,null,a,a,a+b)])}N("shaka.media.SegmentIndex",Pi);Pi.forSingleSegment=Ri;Pi.prototype.getIteratorForTime=Pi.prototype.Ib;Pi.prototype.updateEvery=Pi.prototype.wd;Pi.prototype.fit=Pi.prototype.yb;Pi.prototype.evict=Pi.prototype.Gb;Pi.prototype.mergeAndEvict=Pi.prototype.fc;Pi.prototype.merge=Pi.prototype.ec;Pi.prototype.offset=Pi.prototype.offset;Pi.prototype.get=Pi.prototype.get;Pi.prototype.find=Pi.prototype.find;
292
+ Pi.prototype.markImmutable=Pi.prototype.Gg;Pi.prototype.release=Pi.prototype.release;Pi.prototype.destroy=Pi.prototype.destroy;function Qi(a,b,c){this.i=a;this.h=b;this.g=c}Qi.prototype.seek=function(a){zb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.Ib(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
293
+ Qi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.Ka().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};Qi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.Ka().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};N("shaka.media.SegmentIterator",Qi);Qi.prototype.next=Qi.prototype.next;Qi.prototype.current=Qi.prototype.current;
294
+ Qi.prototype.seek=Qi.prototype.seek;function Si(){Pi.call(this,[]);this.j=[]}u(Si,Pi);q=Si.prototype;q.clone=function(){var a=new Si;a.j=this.j.slice();return a};q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.O.length}return null};
295
+ q.get=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.O.length}return null};q.offset=function(){};q.ec=function(){};q.Gb=function(){};q.fc=function(){};q.yb=function(){};q.wd=function(){};N("shaka.media.MetaSegmentIndex",Si);Si.prototype.updateEvery=Si.prototype.wd;Si.prototype.fit=Si.prototype.yb;Si.prototype.mergeAndEvict=Si.prototype.fc;Si.prototype.evict=Si.prototype.Gb;Si.prototype.merge=Si.prototype.ec;
296
+ Si.prototype.offset=Si.prototype.offset;Si.prototype.get=Si.prototype.get;Si.prototype.find=Si.prototype.find;Si.prototype.release=Si.prototype.release;function Ti(a){var b=this;this.g=a;this.j=!1;this.i=this.g.ed();this.h=new Q(function(){b.g.mf(.25*b.i)})}Ti.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Ti.prototype.set=function(a){this.i=a;Ui(this)};Ti.prototype.bd=function(){return this.g.bd()};function Ui(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.ed()!=b&&a.g.ue(b);return}catch(c){}a.h.ha(.25);0!=a.g.ed()&&a.g.ue(0)};function Vi(a){var b=this;this.h=a;this.g=new Set;this.i=(new Q(function(){Wi(b,!1)})).ha(.25)}Vi.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Wi(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Xi(a){cb.call(this);this.g=new Map;this.h=a}u(Xi,cb);Xi.prototype.release=function(){this.g.clear();cb.prototype.release.call(this)};function $i(a,b){var c=a.g.get(b);c||(c={Kc:[],Te:null,contentType:b},a.g.set(b,c));return c}function aj(a,b,c){var d=$i(a,b.contentType);bj(a,d);a={Xd:b,position:c};d=d.Kc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
297
+ Xi.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Kc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Xd;break a}}d=null}if(e=d)e=c.Te,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
298
+ if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Te=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function bj(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.Kc;b.Kc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.Kc=[]};function cj(a){cb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Q(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new O("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ha(2)}u(cj,cb);cj.prototype.release=function(){this.g.clear();this.h.stop();cb.prototype.release.call(this)};function dj(a){cb.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Vb:null,Ub:ej,Lb:function(c,d){return fj(b,"enter",c,d)}},{Vb:gj,Ub:ej,Lb:function(c,d){return fj(b,"enter",c,d)}},{Vb:hj,Ub:ej,Lb:function(c,d){return fj(b,"enter",c,d)}},{Vb:ej,Ub:gj,Lb:function(c,d){return fj(b,"exit",c,d)}},{Vb:ej,Ub:hj,Lb:function(c,d){return fj(b,"exit",c,d)}},{Vb:gj,Ub:hj,Lb:function(c,d){return fj(b,"skip",c,d)}},{Vb:hj,Ub:gj,Lb:function(c,d){return fj(b,"skip",c,d)}}];this.h=new qf;this.h.o(this.i,"regionremove",
299
+ function(c){b.g["delete"](c.region)})}u(dj,cb);dj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;cb.prototype.release.call(this)};dj.prototype.j=function(a,b){for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?gj:a>d.endTime?hj:ej;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Vb==e&&h.Ub==f&&h.Lb(d,b)}};
300
+ function fj(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var gj=1,ej=2,hj=3;function ij(a,b,c,d,e){a=gf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function jj(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.C=1;this.A=this.l=null;this.i=new Map;this.F=!1;this.G=null;this.B=!1;this.j=new of(function(){return kj(c)})}jj.prototype.destroy=function(){return this.j.destroy()};function kj(a){var b,c,d,e;return M(function(f){if(1==f.g){b=[];c=r(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,lj(e),b.push(mj(e));return z(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.h=null;C(f)})}
301
+ jj.prototype.configure=function(a){this.h=a;this.G=new Pe({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};jj.prototype.start=function(){var a=this;return M(function(b){if(1==b.g)return z(b,nj(a),2);pf(a.j);a.F=!0;C(b)})};
302
+ function oj(a,b){var c,d,e,f,g,h;M(function(k){switch(k.g){case 1:return c=Nb,E(k,2),z(k,li(a.g.V,c.oa),4);case 4:va(k,3);break;case 2:if(d=I(k),a.g)a.g.onError(d);case 3:e=yd(b.mimeType,b.codecs);$h(a.g.V,e);f=a.g.V.l;if(g=f.isTextVisible()||a.h.alwaysStreamText)h=pj(b),a.i.set(c.oa,h),qj(a,h,0);C(k)}})}function rj(a){var b=a.i.get(Mb);b&&(lj(b),mj(b)["catch"](function(){}),a.i["delete"](Mb));a.A=null}
303
+ function sj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Rb&&(tj(a,e,!1,0,!1),c.Rb=d)}else if(d=c.Rb)c.Rb=null,tj(a,d,!0,0,!1)}}function uj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.F&&(b.video&&tj(a,b.video,c,d,e),b.audio&&tj(a,b.audio,c,d,e))}function vj(a,b){a.A=b;a.F&&tj(a,b,!0,0,!1)}
304
+ function tj(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=Mb?f&&(f.Rb&&(b.trickModeVideo?(f.Rb=b,b=b.trickModeVideo):f.Rb=null),f.stream!=b||e)&&(b.type==Mb&&$h(a.g.V,yd(b.mimeType,b.codecs)),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ua=null,c&&(f.yc?f.zd=!0:f.ab?(f.Tb=!0,f.Yc=d,f.zd=!0):(lj(f),wj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),xj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):oj(a,b)}
305
+ function xj(a,b){var c,d;return M(function(e){if(1==e.g){if(!b.Ma)return e["return"]();c=b.stream;d=b.Ma;return c.segmentIndex?e.D(2):z(e,c.createSegmentIndex(),2)}if(b.Ma!=d||b.stream!=c)return e["return"]();var f=a.g.dd();var g=ei(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Ra?b.Ra.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.wa?k.wa-k.Ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.wa?k.wa-k.Ha:null)||0),k=a.g.getBandwidthEstimate(),
306
+ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Ma.h.g>h?!0:!1):f=!1;f&&b.Ma.abort();C(e)})}function yj(a,b){b.yc||b.Tb||(b.ab?(b.Tb=!0,b.Yc=0):null==ci(a.g.V,b.type)?null==b.eb&&qj(a,b,0):(lj(b),wj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
307
+ function nj(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){if(1==n.g){b=Nb;if(!a.l)throw new P(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Fb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.gb,a.l.video),d.add(a.l.video));a.A&&(c.set(b.oa,a.A),d.add(a.A));e=a.g.V;f=a.h.forceTransmuxTS;return z(n,e.init(c,f),2)}pf(a.j);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.V.bb(p):a.g.V.bb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.i.has(k)||
308
+ (m=pj(l),a.i.set(k,m),qj(a,m,0));C(n)})}function pj(a){return{stream:a,type:a.type,ua:null,Ra:null,jd:null,Vd:null,Ud:null,Td:null,Rb:null,endOfStream:!1,ab:!1,eb:null,Tb:!1,Yc:0,zd:!1,yc:!1,ge:!1,Gc:!1,Ma:null}}
309
+ function zj(a,b){var c,d,e,f,g;return M(function(h){switch(h.g){case 1:pf(a.j);if(b.ab||null==b.eb||b.yc)return h["return"]();b.eb=null;if(!b.Tb){h.D(2);break}return z(h,wj(a,b,b.zd,b.Yc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return z(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.eb&&qj(a,b,0),h["return"]();case 4:E(h,6);d=Aj(a,b);null!=d&&(qj(a,b,d),b.Gc=!1);va(h,7);break;case 6:return e=
310
+ I(h),z(h,Bj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.i.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return z(h,a.g.V.endOfStream(),10);case 10:pf(a.j),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.bb(g),C(h)}})}
311
+ function Aj(a,b){if(Cj(b))return ji(a.g.V,b.stream.originalId||""),null;b.type==Mb&&ki(a.g.V);var c=a.g.dd(),d=b.Ra?b.Ra.endTime:c,e=fi(a.g.V,b.type,c),f=Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.C;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.i.get(Mb))&&Cj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=ei(a.g.V,b.type);e=Dj(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=Infinity;
312
+ var g=Array.from(a.i.values());g=r(g);for(var h=g.next();!h.done;h=g.next())h=h.value,Cj(h)||h.ua&&!h.ua.current()||(f=Math.min(f,h.Ra?h.Ra.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;Ej(a,b,c,e)["catch"](function(){});return null}
313
+ function Dj(a,b,c,d){if(b.ua)return b.ua.current();if(b.Ra||d)return b.ua=b.stream.segmentIndex.Ib(b.Ra?b.Ra.endTime:d),b.ua&&b.ua.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ua=b.stream.segmentIndex.Ib(d),e=b.ua&&b.ua.next().value);e||(b.ua=b.stream.segmentIndex.Ib(c),e=b.ua&&b.ua.next().value);return e}
314
+ function Ej(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,y;return M(function(w){switch(w.g){case 1:return e=Nb,f=b.stream,g=b.ua,b.ab=!0,E(w,2),z(w,Fj(a,b,d),4);case 4:pf(a.j);if(a.B)return w["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(x){var D,B,A;return M(function(F){pf(a.j);if(a.B)return F["return"]();n=Gj(n,x);D=!1;B=0;(new vg).box("mdat",function(G){B=G.size+G.start;D=!0}).parse(n,!1,!0);if(!D)return F.D(0);
315
+ A=n.subarray(0,B);n=n.subarray(B);return z(F,Hj(a,b,c,f,d,A),0)})},z(w,Ij(a,b,d,p),6);l=Ij(a,b,d);return z(w,l,7);case 7:return m=w.h,pf(a.j),a.B?w["return"]():b.Tb?(b.ab=!1,qj(a,b,0),w["return"]()):z(w,Hj(a,b,c,f,d,m),6);case 6:pf(a.j);if(a.B)return w["return"]();b.Ra=d;g.next();b.ab=!1;b.ge=!1;t=a.g.V.zb();v=t[b.type];Xa(JSON.stringify(v));b.Tb||a.g.ce();qj(a,b,0);va(w,0);break;case 2:y=I(w);pf(a.j,y);if(a.B)return w["return"]();b.ab=!1;if(7001==y.code)b.ab=!1,b.eb=null,qj(a,b,0),w.D(0);else if(b.type==
316
+ e.oa&&a.h.ignoreTextStreamFailures)a.i["delete"](e.oa),w.D(0);else if(3017==y.code)Jj(a,b,y),w.D(0);else if(1001==y.code&&y.data&&404==y.data[1])b.ab=!1,b.eb=null,qj(a,b,1),w.D(0);else return b.Gc=!0,y.severity=2,z(w,Bj(a,y),0)}})}function Gj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
317
+ function Jj(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.ge})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Gc=!0;a.B=!0;a.g.onError(c);return}b.ge=!0}qj(a,b,4)}
318
+ function Fj(a,b,c){var d,e,f,g,h,k,l;return M(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Vd||e!=b.Ud||f!=b.Td)h=function(){var n;return M(function(p){if(1==p.g)return E(p,2),b.Ud=e,b.Td=f,b.Vd=g,z(p,mi(a.g.V,b.type,g,e,f),4);if(2!=p.g)return va(p,0);n=I(p);b.Ud=null;b.Td=null;b.Vd=null;throw n;})},d.push(h());!ri(c.g,b.jd)&&(b.jd=c.g)&&(k=Ij(a,b,c.g),l=function(){var n,p,t;return M(function(v){switch(v.g){case 1:return E(v,2),z(v,k,4);
319
+ case 4:return n=v.h,pf(a.j),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,z(v,gi(a.g.V,b.type,n,null,null,p),5);case 5:va(v,0);break;case 2:throw t=I(v),b.jd=null,t;}})},a.g.Kg(c.startTime,c.g),d.push(l()));return z(m,Promise.all(d),0)})}
320
+ function Hj(a,b,c,d,e,f){var g;return M(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes)&&(new vg).X("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Lc();var n=k.reader.Lc();var p=k.reader.P();var t=k.reader.P();var v=k.reader.P();var y=k.reader.P();var w=e.startTime+t/p}else p=k.reader.P(),w=k.reader.lc()/p+e.timestampOffset,t=w-e.startTime,v=k.reader.P(),y=k.reader.P(),
321
+ m=k.reader.Lc(),n=k.reader.Lc();k=k.reader.Cb(k.reader.U.byteLength-k.reader.ia());if(l&&l.includes(m)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==m?a.g.Lg():(l=(new Map).set("detail",{startTime:w,endTime:w+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:t,eventDuration:v,id:y,messageData:k}),l=new O(Kj,l),a.g.onEvent(l))}).parse(f),z(h,Lj(a,b,c),2);if(3!=h.g)return pf(a.j),z(h,gi(a.g.V,b.type,f,e.startTime,e.endTime,g),3);pf(a.j);C(h)})}
322
+ function Lj(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=ci(a.g.V,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():z(h,a.g.V.remove(b.type,e,e+g),2)}pf(a.j);C(h)})}function Cj(a){return a&&a.type==Mb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
323
+ function Ij(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=nf,f=ij(c.Ka(),c.Ha,c.wa,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof qi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Pb.request(e,f),b.Ma=h,z(l,h.promise,2);k=l.h;b.Ma=null;return l["return"](k.data)})}
324
+ function wj(a,b,c,d){var e,f;return M(function(g){if(1==g.g)return b.Tb=!1,b.zd=!1,b.Yc=0,b.yc=!0,b.Ra=null,b.jd=null,b.ua=null,d?(e=a.g.dd(),f=a.g.V.getDuration(),z(g,a.g.V.remove(b.type,e+d,f),3)):z(g,li(a.g.V,b.type),4);if(3!=g.g)return pf(a.j),c?z(g,a.g.V.flush(b.type),3):g.D(3);pf(a.j);b.yc=!1;b.endOfStream=!1;qj(a,b,0);C(g)})}
325
+ function qj(a,b,c){var d=b.type;if(d!=Mb||a.i.has(d))b.eb=(new Rc(function(){var e;return M(function(f){if(1==f.g)return E(f,2),z(f,zj(a,b),4);if(2!=f.g)return va(f,0);e=I(f);if(a.g)a.g.onError(e);C(f)})})).S(c)}function lj(a){null!=a.eb&&(a.eb.stop(),a.eb=null)}function mj(a){return M(function(b){return a.Ma?z(b,a.Ma.abort(),0):b.D(0)})}function Bj(a,b){return M(function(c){if(1==c.g)return z(c,Re(a.G),2);pf(a.j);a.g.onError(b);b.handled||a.h.failureCallback(b);C(c)})};function Mj(a,b){var c=Nj(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return Oj(d)});this.B=new of(function(){return Pj(d)})}Mj.prototype.destroy=function(){return this.B.destroy()};function Pj(a){var b,c,d;return M(function(e){if(1==e.g)return a.h&&a.h.abort(),Qj(a),z(e,a.C,2);a.g&&a.g.$a.Qb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.$a.Qb();a.g=null;a.m=[];a.j=null;C(e)})}
326
+ function Rj(a,b){var c={ic:function(){},od:function(){},Qb:function(){},onError:function(){},qd:function(){},Ii:function(){}};a.m.push({create:b,$a:c});a.h&&a.h.abort();Qj(a);return c}
327
+ function Oj(a){return M(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Kb)var c=!1;else{a.g&&(a.g.$a.Qb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.$a.ic(),a.g={node:d.node,payload:d.payload,Kb:d.Kb,$a:c.$a}):c.$a.qd();c=!0}c?c=Promise.resolve():a.g?c=Sj(a):(a.j.Jg(a.i),a.A=new Pc,c=a.A);b=z(b,c,1)}return b})}
328
+ function Sj(a){var b,c;return M(function(d){switch(d.g){case 1:return a.i=a.j.ng(a.i,a.l,a.g.node,a.g.payload),E(d,2),a.h=a.j.Sf(a.i,a.l,a.g.payload),z(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.$a.od(),a.g=null);va(d,0);break;case 2:b=I(d);if(7001==b.code)a.g.$a.Qb();else a.g.$a.onError(b);a.g=null;a.h=null;c=a;return z(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,C(d)}})}function Qj(a){a.A&&(a.A.resolve(),a.A=null)};function Tj(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Tj.prototype;q.remove=function(a,b){if(!this.g)return!1;Uj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
328
329
  q.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(n,p){return n+"<"+p+">"},"");h=h.reduceRight(function(n,p){return n+"</"+p+">"},"");return g.lineBreak||g.spacer?(g.spacer&&zb("shaka.extern.Cue","Please use lineBreak instead of spacer."),"\n"):g.nestedCues.length?g.nestedCues.map(b).join(""):k+g.payload+h}var c=a.map(function(g){if(g.nestedCues.length){var h=
329
- g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):[];var e={};c=r(c);for(var f=c.next();!f.done;e={Wb:e.Wb},f=c.next())e.Wb=f.value,a.some(function(g){return function(h){return h.startTime==g.Wb.startTime&&h.endTime==g.Wb.endTime&&h.text==g.Wb.payload?!0:!1}}(e))||(f=Tj(e.Wb))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-
330
- d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=r(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};q.destroy=function(){this.g&&(Sj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
331
- function Tj(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
332
- function Sj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}N("shaka.text.SimpleTextDisplayer",Rj);Rj.prototype.setTextVisibility=Rj.prototype.setTextVisibility;Rj.prototype.isTextVisible=Rj.prototype.isTextVisible;Rj.prototype.destroy=Rj.prototype.destroy;Rj.prototype.append=Rj.prototype.append;Rj.prototype.remove=Rj.prototype.remove;function Uj(){}function S(a){return document.createElement(a)}function Vj(){return document.createElement("button")}function Wj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}N("shaka.util.Dom",Uj);Uj.removeAllChildren=Wj;function Xj(a,b){var c=this;this.j=!1;this.i=[];this.C=a;this.m=b;this.g=S("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.B=(new Q(function(){Yj(c)})).ha(.25);this.h=new Map;this.A=new of;this.A.o(document,"fullscreenchange",function(){Yj(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){Yj(c,
333
- !0)}),this.l.observe(this.g))}q=Xj.prototype;q.append=function(a){var b=[].concat(ia(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={Pc:c.Pc},d=a.next())c.Pc=d.value,b.some(function(e){return function(f){return wc(f,e.Pc)}}(c))||this.i.push(c.Pc);Yj(this)};q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.B&&this.B.stop();this.h.clear();this.A&&(this.A.release(),this.A=null);this.l&&(this.l.disconnect(),this.l=null)};
334
- q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Yj(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};
335
- function Zj(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Df:null;l&&(g.push(l.Re),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(ak(a,k,e),l=a.h.get(k),n=l.Df,f=!0));0<k.nestedCues.length&&n&&Zj(a,k.nestedCues,n,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(p,t){return p.startTime!=t.startTime?p.startTime-t.startTime:p.endTime-t.endTime});
336
- h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),c.appendChild(d.Re)}}function Yj(a,b){if(a.g){var c=a.C.currentTime;(!a.j||(void 0===b?0:b))&&0<a.h.size&&(Wj(a.g),a.h.clear());if(a.j){for(var d=new Map,e=r(a.h.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));Zj(a,a.i,a.g,c,[])}}}
337
- function ak(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&zb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=S(e);"br"!=e&&bk(a,f,b,c,d);c=f;d&&(c=S("span"),c.classList.add("shaka-text-wrapper"),c.style.backgroundColor=b.backgroundColor,f.appendChild(c));a.h.set(b,{Re:f,Df:c})}
338
- function bk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=ck(c.linePadding,c,a.m);f.paddingRight=ck(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
339
- "contain",f.backgroundPosition="center";else{if(c.nestedCues.length)var l=b;else l=S("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=dk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");
340
- g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=ck(c.fontSize,c,a.m);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==qc?(f.width="100%",c.lineAlign==sc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==sc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==
330
+ g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):[];var e={};c=r(c);for(var f=c.next();!f.done;e={Wb:e.Wb},f=c.next())e.Wb=f.value,a.some(function(g){return function(h){return h.startTime==g.Wb.startTime&&h.endTime==g.Wb.endTime&&h.text==g.Wb.payload?!0:!1}}(e))||(f=Vj(e.Wb))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-
331
+ d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=r(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};q.destroy=function(){this.g&&(Uj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
332
+ function Vj(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
333
+ function Uj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}N("shaka.text.SimpleTextDisplayer",Tj);Tj.prototype.setTextVisibility=Tj.prototype.setTextVisibility;Tj.prototype.isTextVisible=Tj.prototype.isTextVisible;Tj.prototype.destroy=Tj.prototype.destroy;Tj.prototype.append=Tj.prototype.append;Tj.prototype.remove=Tj.prototype.remove;function Wj(){}function S(a){return document.createElement(a)}function Xj(){return document.createElement("button")}function Yj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}N("shaka.util.Dom",Wj);Wj.removeAllChildren=Yj;function Zj(a,b){var c=this;this.j=!1;this.i=[];this.C=a;this.m=b;this.g=S("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.B=(new Q(function(){ak(c)})).ha(.25);this.h=new Map;this.A=new qf;this.A.o(document,"fullscreenchange",function(){ak(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){ak(c,
334
+ !0)}),this.l.observe(this.g))}q=Zj.prototype;q.append=function(a){var b=[].concat(ia(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={Pc:c.Pc},d=a.next())c.Pc=d.value,b.some(function(e){return function(f){return wc(f,e.Pc)}}(c))||this.i.push(c.Pc);ak(this)};q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.B&&this.B.stop();this.h.clear();this.A&&(this.A.release(),this.A=null);this.l&&(this.l.disconnect(),this.l=null)};
335
+ q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});ak(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};
336
+ function bk(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Ef:null;l&&(g.push(l.Se),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(ck(a,k,e),l=a.h.get(k),n=l.Ef,f=!0));0<k.nestedCues.length&&n&&bk(a,k.nestedCues,n,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(p,t){return p.startTime!=t.startTime?p.startTime-t.startTime:p.endTime-t.endTime});
337
+ h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),c.appendChild(d.Se)}}function ak(a,b){if(a.g){var c=a.C.currentTime;(!a.j||(void 0===b?0:b))&&0<a.h.size&&(Yj(a.g),a.h.clear());if(a.j){for(var d=new Map,e=r(a.h.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));bk(a,a.i,a.g,c,[])}}}
338
+ function ck(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&zb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=S(e);"br"!=e&&dk(a,f,b,c,d);c=f;d&&(c=S("span"),c.classList.add("shaka-text-wrapper"),c.style.backgroundColor=b.backgroundColor,f.appendChild(c));a.h.set(b,{Se:f,Ef:c})}
339
+ function dk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=ek(c.linePadding,c,a.m);f.paddingRight=ek(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
340
+ "contain",f.backgroundPosition="center";else{if(c.nestedCues.length)var l=b;else l=S("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=fk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");
341
+ g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=ek(c.fontSize,c,a.m);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==qc?(f.width="100%",c.lineAlign==sc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==sc?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==
341
342
  sc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Dc?"%":"px",d=c.region.viewportAnchorUnits==Dc?"%":"px",f.height=c.region.height+(c.region.heightUnits==Dc?"%":"px"),f.width=c.region.width+a,f.position="absolute",f.top=c.region.viewportAnchorY+d,f.left=c.region.viewportAnchorX+d);f.lineHeight=c.lineHeight;c.position&&(c.writingMode==qc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==
342
343
  c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==qc?f.width=c.size+"%":f.height=c.size+"%")}
343
- function ck(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function dk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}N("shaka.text.UITextDisplayer",Xj);Xj.prototype.setTextVisibility=Xj.prototype.setTextVisibility;
344
- Xj.prototype.isTextVisible=Xj.prototype.isTextVisible;Xj.prototype.remove=Xj.prototype.remove;Xj.prototype.destroy=Xj.prototype.destroy;Xj.prototype.append=Xj.prototype.append;function ek(a,b){function c(h){for(var k=h,l=r(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,t){return p+"<"+t+">"},
344
+ function ek(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function fk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}N("shaka.text.UITextDisplayer",Zj);Zj.prototype.setTextVisibility=Zj.prototype.setTextVisibility;
345
+ Zj.prototype.isTextVisible=Zj.prototype.isTextVisible;Zj.prototype.remove=Zj.prototype.remove;Zj.prototype.destroy=Zj.prototype.destroy;Zj.prototype.append=Zj.prototype.append;function gk(a,b){function c(h){for(var k=h,l=r(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,t){return p+"<"+t+">"},
345
346
  "");k=k.reduceRight(function(p,t){return p+"</"+t+">"},"");return h.lineBreak||h.spacer?(h.spacer&&zb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=r(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");
346
- break;case "right":k.push("align:right");break;case pc:k.push("align:middle");break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}N("shaka.text.WebVttGenerator",function(){});function fk(a,b){this.h=a;this.g=b;this.j="";this.A=void 0;this.i=!1;this.m=!0;this.l=!1}function gk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?hk:ik};d.ot=jk(c);var e=d.ot===kk||d.ot===lk||d.ot===mk||d.ot===nk;e&&(d.bl=ok(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==nk&&(d.tb=pk(a,d.ot)/1E3);qk(a,b,d)}}catch(f){Ta("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
347
- function rk(a,b,c){try{if(!a.g.enabled)return b;var d=sk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=mk;break a;case "application/x-mpegurl":e=tk;break a}e=void 0}d.ot=e;d.su=!0;var f=uk(d);return vk(b,f)}catch(g){return Ta("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function wk(a,b){try{if(!a.g.enabled)return b;var c=sk(a);c.ot=xk;c.su=!0;var d=uk(c);return vk(b,d)}catch(e){return Ta("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),b}}
348
- function sk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.A,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}function qk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,sk(a));c.pr=a.h.Ab();var e=c.ot===kk||c.ot===mk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=yk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=uk(c);f&&(b.uris=b.uris.map(function(g){return vk(g,f)}))}}}
349
- function jk(a){var b=a.type;if(a.init)return zk;if("video"==b)return a.codecs.includes(",")?mk:kk;if("audio"==b)return lk;if("text"==b)return"application/mp4"===a.mimeType?nk:xk}function ok(a,b){var c=a.h.zb()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
350
- function pk(a,b){var c=a.h.Za();if(!c.length)return NaN;var d=c[0];c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case kk:return d.videoBandwidth||NaN;case lk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
351
- function uk(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
352
- l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function yk(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=uk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
353
- function vk(a,b){if(!b||a.includes("offline:"))return a;var c=new jb(a);c.g.set("CMCD",b);return c.toString()}var tk="m",lk="a",kk="v",mk="av",zk="i",xk="c",nk="tt",ik="v",hk="l";N("shaka.util.CmcdManager.StreamingFormat",{sh:"d",Ih:"h",li:"s",Wh:"o"});function Ak(){}
354
- function Bk(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Xe(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Xe(l)),k=Bk(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ra("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Sa("Unexpected number of arguments for "+k),a[h]=b[h]):(Ra("Invalid config, unrecognized key "+
355
- k),g=!1)}return g}function Ck(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Dk(a,b){return a&&b}N("shaka.util.ConfigUtils",Ak);Ak.convertToConfigObject=Ck;Ak.mergeConfigObjects=Bk;function Ek(){}
356
- function Fk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Oe(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:ag,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Oe(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
347
+ break;case "right":k.push("align:right");break;case pc:k.push("align:middle");break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}N("shaka.text.WebVttGenerator",function(){});function hk(a,b){this.h=a;this.g=b;this.j="";this.A=void 0;this.i=!1;this.m=!0;this.l=!1}function ik(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?jk:kk};d.ot=lk(c);var e=d.ot===mk||d.ot===nk||d.ot===ok||d.ot===pk;e&&(d.bl=qk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==pk&&(d.tb=rk(a,d.ot)/1E3);sk(a,b,d)}}catch(f){Ta("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
348
+ function tk(a,b,c){try{if(!a.g.enabled)return b;var d=uk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=ok;break a;case "application/x-mpegurl":e=vk;break a}e=void 0}d.ot=e;d.su=!0;var f=wk(d);return xk(b,f)}catch(g){return Ta("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function yk(a,b){try{if(!a.g.enabled)return b;var c=uk(a);c.ot=zk;c.su=!0;var d=wk(c);return xk(b,d)}catch(e){return Ta("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),b}}
349
+ function uk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.A,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}function sk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,uk(a));c.pr=a.h.Ab();var e=c.ot===mk||c.ot===ok;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Ak(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=wk(c);f&&(b.uris=b.uris.map(function(g){return xk(g,f)}))}}}
350
+ function lk(a){var b=a.type;if(a.init)return Bk;if("video"==b)return a.codecs.includes(",")?ok:mk;if("audio"==b)return nk;if("text"==b)return"application/mp4"===a.mimeType?pk:zk}function qk(a,b){var c=a.h.zb()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
351
+ function rk(a,b){var c=a.h.Za();if(!c.length)return NaN;var d=c[0];c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case mk:return d.videoBandwidth||NaN;case nk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
352
+ function wk(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
353
+ l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Ak(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=wk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
354
+ function xk(a,b){if(!b||a.includes("offline:"))return a;var c=new jb(a);c.g.set("CMCD",b);return c.toString()}var vk="m",nk="a",mk="v",ok="av",Bk="i",zk="c",pk="tt",kk="v",jk="l";N("shaka.util.CmcdManager.StreamingFormat",{uh:"d",Jh:"h",mi:"s",Xh:"o"});function Ck(){}
355
+ function Dk(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Ze(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ze(l)),k=Dk(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ra("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Sa("Unexpected number of arguments for "+k),a[h]=b[h]):(Ra("Invalid config, unrecognized key "+
356
+ k),g=!1)}return g}function Ek(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Fk(a,b){return a&&b}N("shaka.util.ConfigUtils",Ck);Ck.convertToConfigObject=Ek;Ck.mergeConfigObjects=Dk;function Gk(){}
357
+ function Hk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Qe(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:cg,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Qe(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,
357
358
  ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},
358
- manifestPreprocessor:function(g){return Dk([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,useFullSegmentsForStartTime:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E"}},d={retryParameters:Oe(),failureCallback:function(g){return Dk([g],void 0)},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,
359
- safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};if(navigator.userAgent.match(/Edge\//)||Fd()||Gd())d.gapDetectionThreshold=.5;if(Ed("Web0S")||Fd()||Gd())d.stallSkip=0;var e={trackSelectionCallback:function(g){return M(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;
360
- return M(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?z(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return Dk([g,h],void 0)},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new we},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,
359
+ manifestPreprocessor:function(g){return Fk([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,useFullSegmentsForStartTime:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E"}},d={retryParameters:Qe(),failureCallback:function(g){return Fk([g],void 0)},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,
360
+ safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};if(navigator.userAgent.match(/Edge\//)||Yc()||Zc())d.gapDetectionThreshold=.5;if(Xc("Web0S")||Yc()||Zc())d.stallSkip=0;var e={trackSelectionCallback:function(g){return M(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;
361
+ return M(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?z(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return Fk([g,h],void 0)},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new ye},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,
361
362
  maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,
362
- maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return M(function(h){return h["return"](Gk(g,f.preferredAudioLanguage))})};return f}
363
- function Hk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Bk(a,b,c||Fk(),d,"")}
364
- function Gk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Yb(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Qb(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
365
- 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Mb&&"image"!=g.type||c.push(g);return c}N("shaka.util.PlayerConfiguration",Ek);Ek.mergeConfigObjects=Hk;function Ik(){this.g=null;this.h=[]}function Jk(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function Kk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
366
- function Lk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Mk(){this.i=this.h=null;this.g=[]}function Nk(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Ok(){this.A=this.B=this.H=this.F=this.m=this.j=this.G=this.l=this.i=this.I=this.J=this.K=this.C=this.N=NaN;this.g=new Ik;this.h=new Mk};function T(a,b){cb.call(this);var c=this;this.l=Pk;this.fd=this.g=null;this.ba=!1;this.kd=new of;this.ib=new of;this.A=new of;this.ce=this.B=this.hb=this.i=this.ld=this.J=this.j=this.ma=this.W=this.nd=this.K=this.gd=this.I=this.Wa=this.G=this.N=this.m=this.H=null;this.He=1E9;this.h=Qk(this);this.Ge={width:Infinity,height:Infinity};this.C=null;this.Aa=new Ee(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ba=this.h.preferredTextLanguage;this.wb=this.h.preferredTextRole;
367
- this.jb=this.h.preferForcedSubs;this.fb=[];this.Ac=null;b&&b(this);this.H=Rk(this);this.H.qe(this.h.streaming.forceHTTPS);this.F=null;Sk&&(this.F=Gb(Sk));this.kd.o(window,"online",function(){c.ge()});this.R={name:"detach"};this.Z={name:"attach"};this.aa={name:"unload"};this.Ie={name:"manifest-parser"};this.De={name:"manifest"};this.Oa={name:"media-source"};this.ee={name:"drm-engine"};this.$={name:"load"};this.Je={name:"src-equals-drm-engine"};this.Xa={name:"src-equals"};var d=new Map;d.set(this.Z,
368
- function(e,f){return Ue(Tk(c,e,f))});d.set(this.R,function(e){e.M&&(c.ib.rb(),e.M=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return Ue(e)});d.set(this.aa,function(e){return Ue(Uk(c,e))});d.set(this.Oa,function(e){e=Vk(c,e);return Ue(e)});d.set(this.Ie,function(e,f){var g=Wk(c,e,f);return Ue(g)});d.set(this.De,function(e){return Xk(c,e)});d.set(this.ee,function(e){e=Yk(c,e);return Ue(e)});d.set(this.$,function(e,f){return Ue(Zk(c,e,f))});d.set(this.Je,function(e,f){var g=$k(c,e,f);return Ue(g)});
369
- d.set(this.Xa,function(e,f){return al(c,e,f)});this.na=new Kj(this.R,{mg:function(e,f,g,h){var k=null;e==c.R&&(k=g==c.R?c.R:c.Z);e==c.Z&&(k=g==c.R||f.M!=h.M?c.R:g==c.Z?c.Z:g==c.Oa||g==c.$?c.Oa:g==c.Xa?c.Je:null);e==c.Oa&&(k=g==c.$&&f.M==h.M?c.Ie:c.aa);e==c.Ie&&(k=bl(c.$,c.De,c.aa,g,f,h));e==c.De&&(k=bl(c.$,c.ee,c.aa,g,f,h));e==c.ee&&(k=bl(c.$,c.$,c.aa,g,f,h));e==c.Je&&(k=g==c.Xa&&f.M==h.M?c.Xa:c.aa);if(e==c.$||e==c.Xa)k=c.aa;e==c.aa&&(k=h.M&&f.M==h.M?c.Z:c.R);return k},Rf:function(e,f,g){c.dispatchEvent(cl(dl,
370
- (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return M(function(f){return 1==f.g?z(f,Uk(c,e),2):f["return"](e.M?c.Z:c.R)})},Ig:function(e){c.dispatchEvent(cl(el,(new Map).set("state",e.name)))}});a&&this.xc(a,!0)}u(T,cb);function cl(a,b){return new O(a,b)}q=T.prototype;
371
- q.destroy=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(a.l==fl)return c["return"]();a.l=fl;b=Pj(a.na,function(){return{node:a.R,payload:Lj(),Kb:!1}});return z(c,new Promise(function(d){b.ic=function(){};b.od=function(){d()};b.Qb=function(){d()};b.onError=function(){d()};b.qd=function(){d()}}),2);case 2:return z(c,a.na.destroy(),3);case 3:a.kd&&(a.kd.release(),a.kd=null);a.ib&&(a.ib.release(),a.ib=null);a.A&&(a.A.release(),a.A=null);a.ce=null;a.B=null;a.h=null;a.C=null;a.fd=null;
363
+ maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return M(function(h){return h["return"](Ik(g,f.preferredAudioLanguage))})};return f}
364
+ function Jk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Dk(a,b,c||Hk(),d,"")}
365
+ function Ik(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Yb(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Qb(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
366
+ 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Mb&&"image"!=g.type||c.push(g);return c}N("shaka.util.PlayerConfiguration",Gk);Gk.mergeConfigObjects=Jk;function Kk(){this.g=null;this.h=[]}function Lk(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function Mk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
367
+ function Nk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Ok(){this.i=this.h=null;this.g=[]}function Pk(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Qk(){this.A=this.B=this.H=this.F=this.m=this.j=this.G=this.l=this.i=this.I=this.J=this.K=this.C=this.N=NaN;this.g=new Kk;this.h=new Ok};function T(a,b){cb.call(this);var c=this;this.l=Rk;this.fd=this.g=null;this.ba=!1;this.kd=new qf;this.ib=new qf;this.A=new qf;this.ee=this.B=this.hb=this.i=this.ld=this.J=this.j=this.ma=this.W=this.nd=this.K=this.gd=this.I=this.Wa=this.G=this.N=this.m=this.H=null;this.Ie=1E9;this.h=Sk(this);this.He={width:Infinity,height:Infinity};this.C=null;this.Aa=new He(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ba=this.h.preferredTextLanguage;this.wb=this.h.preferredTextRole;
368
+ this.jb=this.h.preferForcedSubs;this.fb=[];this.Ac=null;b&&b(this);this.H=Tk(this);this.H.re(this.h.streaming.forceHTTPS);this.F=null;Uk&&(this.F=Gb(Uk));this.kd.o(window,"online",function(){c.ie()});this.R={name:"detach"};this.Z={name:"attach"};this.aa={name:"unload"};this.Je={name:"manifest-parser"};this.Ee={name:"manifest"};this.Oa={name:"media-source"};this.fe={name:"drm-engine"};this.$={name:"load"};this.Ke={name:"src-equals-drm-engine"};this.Xa={name:"src-equals"};var d=new Map;d.set(this.Z,
369
+ function(e,f){return We(Vk(c,e,f))});d.set(this.R,function(e){e.M&&(c.ib.rb(),e.M=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return We(e)});d.set(this.aa,function(e){return We(Wk(c,e))});d.set(this.Oa,function(e){e=Xk(c,e);return We(e)});d.set(this.Je,function(e,f){var g=Yk(c,e,f);return We(g)});d.set(this.Ee,function(e){return Zk(c,e)});d.set(this.fe,function(e){e=$k(c,e);return We(e)});d.set(this.$,function(e,f){return We(al(c,e,f))});d.set(this.Ke,function(e,f){var g=bl(c,e,f);return We(g)});
370
+ d.set(this.Xa,function(e,f){return cl(c,e,f)});this.na=new Mj(this.R,{ng:function(e,f,g,h){var k=null;e==c.R&&(k=g==c.R?c.R:c.Z);e==c.Z&&(k=g==c.R||f.M!=h.M?c.R:g==c.Z?c.Z:g==c.Oa||g==c.$?c.Oa:g==c.Xa?c.Ke:null);e==c.Oa&&(k=g==c.$&&f.M==h.M?c.Je:c.aa);e==c.Je&&(k=dl(c.$,c.Ee,c.aa,g,f,h));e==c.Ee&&(k=dl(c.$,c.fe,c.aa,g,f,h));e==c.fe&&(k=dl(c.$,c.$,c.aa,g,f,h));e==c.Ke&&(k=g==c.Xa&&f.M==h.M?c.Xa:c.aa);if(e==c.$||e==c.Xa)k=c.aa;e==c.aa&&(k=h.M&&f.M==h.M?c.Z:c.R);return k},Sf:function(e,f,g){c.dispatchEvent(el(fl,
371
+ (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return M(function(f){return 1==f.g?z(f,Wk(c,e),2):f["return"](e.M?c.Z:c.R)})},Jg:function(e){c.dispatchEvent(el(gl,(new Map).set("state",e.name)))}});a&&this.xc(a,!0)}u(T,cb);function el(a,b){return new O(a,b)}q=T.prototype;
372
+ q.destroy=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(a.l==hl)return c["return"]();a.l=hl;b=Rj(a.na,function(){return{node:a.R,payload:Nj(),Kb:!1}});return z(c,new Promise(function(d){b.ic=function(){};b.od=function(){d()};b.Qb=function(){d()};b.onError=function(){d()};b.qd=function(){d()}}),2);case 2:return z(c,a.na.destroy(),3);case 3:a.kd&&(a.kd.release(),a.kd=null);a.ib&&(a.ib.release(),a.ib=null);a.A&&(a.A.release(),a.A=null);a.ee=null;a.B=null;a.h=null;a.C=null;a.fd=null;
372
373
  a.W=null;if(!a.H){c.D(4);break}return z(c,a.H.destroy(),5);case 5:a.H=null;case 4:cb.prototype.release.call(a),C(c)}})};
373
- function gl(){window.Promise||Sa("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Sa("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||Ed("Trident/"))return!1;var a=Id();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
374
- !1:zd()?!0:Ad("application/x-mpegurl")}q.xc=function(a,b){b=void 0===b?!0:b;if(this.l==fl)return Promise.reject(hl());var c=Lj();c.M=a;zd()||(b=!1);var d=b?this.Oa:this.Z,e=Pj(this.na,function(){return{node:d,payload:c,Kb:!1}});e.ic=function(){};return il(e)};q.detach=function(){var a=this;if(this.l==fl)return Promise.reject(hl());var b=Pj(this.na,function(){return{node:a.R,payload:Lj(),Kb:!1}});b.ic=function(){};return il(b)};
375
- q.Ee=function(a){var b=this;a=void 0===a?!0:a;if(this.l==fl)return Promise.reject(hl());zd()||(a=!1);var c=Lj(),d=Pj(this.na,function(e){var f=e.M&&a?b.Oa:e.M?b.Z:b.R;c.M=e.M;return{node:f,payload:c,Kb:!1}});d.ic=function(){};return il(d)};q.hh=function(a){this.Ac=a};
376
- q.load=function(a,b,c){var d=this;this.Ac=null;if(this.l==fl)return Promise.reject(hl());this.dispatchEvent(cl(jl));var e=Lj();e.uri=a;e.ye=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=kl(this,e)?this.Xa:this.$,g=Pj(this.na,function(h){if(null==h.M)return null;e.M=h.M;return{node:f,payload:e,Kb:!0}});this.C=new Ok;this.W=ll(this);g.ic=function(){};return new Promise(function(h,k){g.qd=function(){return k(new P(2,7,7002))};g.od=function(){h();d.dispatchEvent(cl(ml))};g.Qb=function(){return k(hl())};
377
- g.onError=function(l){return k(l)}})};function kl(a,b){if(!zd())return!0;var c=b.mimeType,d=b.uri||"";c||(c=ng(d),c=nl[c]);if(c){if(""==(b.M||Bd()).canPlayType(c))return!1;if(!zd()||!(c in mg||ng(d)in og)||a.h.streaming.preferNativeHls)return!0;if(Hd())return a.h.streaming.useNativeHlsOnSafari}return!1}function Tk(a,b,c){null==b.M&&(b.M=c.M,a.ib.o(b.M,"error",function(){var d=ol(a);d&&pl(a,d)}));a.g=b.M;return Promise.resolve()}
378
- function Uk(a,b){var c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return a.l!=fl&&(a.l=Pk),c=a.fb.map(function(p){return p()}),a.fb=[],z(n,Promise.all(c),2);case 2:a.dispatchEvent(cl(ql));b.mimeType=null;b.startTime=null;b.uri=null;b.M&&a.A.rb();a.Wa&&(a.Wa.release(),a.Wa=null);a.gd&&(a.gd.stop(),a.gd=null);if(!a.J){n.D(3);break}return z(n,a.J.stop(),4);case 4:a.J=null,a.ld=null;case 3:if(!a.B){n.D(5);break}return z(n,a.B.stop(),5);case 5:if(!a.j){n.D(7);break}return z(n,a.j.destroy(),
374
+ function il(){window.Promise||Sa("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Sa("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||Xc("Trident/"))return!1;var a=bd();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
375
+ !1:Tc()?!0:Uc("application/x-mpegurl")}q.xc=function(a,b){b=void 0===b?!0:b;if(this.l==hl)return Promise.reject(jl());var c=Nj();c.M=a;Tc()||(b=!1);var d=b?this.Oa:this.Z,e=Rj(this.na,function(){return{node:d,payload:c,Kb:!1}});e.ic=function(){};return kl(e)};q.detach=function(){var a=this;if(this.l==hl)return Promise.reject(jl());var b=Rj(this.na,function(){return{node:a.R,payload:Nj(),Kb:!1}});b.ic=function(){};return kl(b)};
376
+ q.Fe=function(a){var b=this;a=void 0===a?!0:a;if(this.l==hl)return Promise.reject(jl());Tc()||(a=!1);var c=Nj(),d=Rj(this.na,function(e){var f=e.M&&a?b.Oa:e.M?b.Z:b.R;c.M=e.M;return{node:f,payload:c,Kb:!1}});d.ic=function(){};return kl(d)};q.ih=function(a){this.Ac=a};
377
+ q.load=function(a,b,c){var d=this;this.Ac=null;if(this.l==hl)return Promise.reject(jl());this.dispatchEvent(el(ll));var e=Nj();e.uri=a;e.ze=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=ml(this,e)?this.Xa:this.$,g=Rj(this.na,function(h){if(null==h.M)return null;e.M=h.M;return{node:f,payload:e,Kb:!0}});this.C=new Qk;this.W=nl(this);g.ic=function(){};return new Promise(function(h,k){g.qd=function(){return k(new P(2,7,7002))};g.od=function(){h();d.dispatchEvent(el(ol))};g.Qb=function(){return k(jl())};
378
+ g.onError=function(l){return k(l)}})};function ml(a,b){if(!Tc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=pg(d),c=pl[c]);if(c){if(""==(b.M||Vc()).canPlayType(c))return!1;if(!Tc()||!(c in og||pg(d)in qg)||a.h.streaming.preferNativeHls)return!0;if($c())return a.h.streaming.useNativeHlsOnSafari}return!1}function Vk(a,b,c){null==b.M&&(b.M=c.M,a.ib.o(b.M,"error",function(){var d=ql(a);d&&rl(a,d)}));a.g=b.M;return Promise.resolve()}
379
+ function Wk(a,b){var c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return a.l!=hl&&(a.l=Rk),c=a.fb.map(function(p){return p()}),a.fb=[],z(n,Promise.all(c),2);case 2:a.dispatchEvent(el(sl));b.mimeType=null;b.startTime=null;b.uri=null;b.M&&a.A.rb();a.Wa&&(a.Wa.release(),a.Wa=null);a.gd&&(a.gd.stop(),a.gd=null);if(!a.J){n.D(3);break}return z(n,a.J.stop(),4);case 4:a.J=null,a.ld=null;case 3:if(!a.B){n.D(5);break}return z(n,a.B.stop(),5);case 5:if(!a.j){n.D(7);break}return z(n,a.j.destroy(),
379
380
  8);case 8:a.j=null;case 7:a.I&&(a.I.release(),a.I=null);a.G&&(a.G.release(),a.G=null);if(!a.N){n.D(9);break}return z(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.F)a.F.onAssetUnload();if(!b.M||!b.M.src){n.D(11);break}return z(n,new Promise(function(p){return(new Q(p)).S(.1)}),12);case 12:for(b.M.removeAttribute("src"),b.M.load();b.M.lastChild;)b.M.removeChild(b.M.firstChild);case 11:if(!a.m){n.D(13);break}return z(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.hb=null;a.K=null;if(a.i){d=r(a.i.variants);
380
- for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.C=new Ok;a.ie=null;rl(a);C(n)}})}
381
- function Vk(a,b){var c,d,e,f;return M(function(g){if(1==g.g)return c=new Nh,d=a.h.textDisplayFactory,e=Gb(d),a.ie=d,f=sl(b.M,c,e,function(h,k,l){h=r(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,t=r(m.frames),v=t.next();!v.done;v=t.next())tl(a,n,p,"ID3",v.value);if(a.F)a.F.onHlsTimedMetadata(m,n)}}),z(g,f.G,2);a.N=f;C(g)})}
382
- function Wk(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.hb=d,f=a,z(h,lg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.ld=h.h;a.J=Gb(a.ld);g=Xe(a.h.manifest);c.M&&"AUDIO"===c.M.nodeName&&(g.disableVideo=!0);a.J.configure(g);C(h)})}
383
- function Xk(a,b){var c=b.uri,d=a.H;a.nd=new aj(function(){return a.La()});a.nd.addEventListener("regionadd",function(g){g=g.region;ul(a,vl,g);if(a.F)a.F.onDashTimedMetadata(g)});a.ma=null;a.h.streaming.observeQualityChanges&&(a.ma=new Vi(function(){return a.zb()}),a.ma.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
384
- mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(cl(wl,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.W;try{k.g.enabled&&(k.A=h.format,qk(k,g,{ot:tk,su:!k.i}))}catch(l){Ta("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){gk(a.W,g,h)},filter:function(g){return xl(a,g)},makeTextStreamsForClosedCaptions:function(g){return yl(a,g)},
385
- onTimelineRegionAdded:function(g){var h=a.nd;a:{var k=r(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new O("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return pl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
386
- enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Qe(function(){var g,h,k,l;return M(function(m){if(1==m.g)return g=a,z(m,a.J.start(c,e),2);g.i=m.h;h=cl(zl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new P(2,4,4036);Al(a.i);k=Date.now()/1E3;l=k-f;a.C.G=l;C(m)})}(),function(){return a.J.stop()})}
387
- function Yk(a,b){var c,d;return M(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Bl(a,{Pb:a.H,onError:function(f){pl(a,f)},pd:function(f){Cl(a,f)},onExpirationUpdated:function(f,g){Dl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==El&&d&&(d=!1,a.C.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),z(e,Gf(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?z(e,a.m.xc(b.M),3):z(e,xl(a,a.i),0)})}
388
- function Zk(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return M(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Ac&&(b.startTime=a.Ac,a.Ac=null);d=b.M;e=b.uri;a.hb=e;a.I=new Ri({ed:function(){return d.playbackRate},bd:function(){return d.defaultPlaybackRate},se:function(w){d.playbackRate=w},lf:function(w){d.currentTime+=w}});f=function(){return Fl(a)};g=function(){return Gl(a)};a.A.o(d,"playing",f);a.A.o(d,"pause",f);a.A.o(d,"ended",f);a.A.o(d,"ratechange",g);h=a.h.abrFactory;a.B&&a.ce==h||
389
- (a.ce=h,a.B=Gb(h),"function"!=typeof a.B.playbackRateChanged&&(zb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.B.playbackRateChanged=function(){}),a.B.configure(a.h.abr));a.Aa=new Ee(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ba=a.h.preferredTextLanguage;a.wb=a.h.preferredTextRole;a.jb=a.h.preferForcedSubs;Hl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(w,x,D){a.j&&w!=a.j.l&&Il(a,w,!0,void 0===
390
- x?!1:x,void 0===D?0:D)});a.G=Jl(a,b.startTime);a.Wa=Kl(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Ll(a,k);Ld(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Ml(a);a.j.configure(a.h.streaming);a.l=Nl;d.textTracks&&a.A.o(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "chapters":Ol(a,w)}});a.dispatchEvent(cl(Pl));l=null;if(m=a.Za().find(function(w){return w.active})){y.D(2);break}l=
391
- Ql(a)?a.B.chooseVariant():null;Il(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.D(3);break}n=a.G.m();return z(y,Rl(l,n),4);case 4:p=y.h,a.G.A(p);case 3:Sl(a,null,je(l));case 2:return t=a.pb().find(function(w){return w.active}),t||((v=te(a.i.textStreams,a.Ba,a.wb,a.jb)[0]||null)&&Nk(a.C.h,v,!0),l&&(v?(l.audio&&Tl(a,l.audio,v)&&(a.ba=!0),a.ba&&a.N.l.setTextVisibility(!0),Ul(a)):a.ba=!1),v&&(a.h.streaming.alwaysStreamText||a.Ob())&&tj(a.j,v)),z(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.B.enable(),
392
- Vl(a)),ae(a.j?a.j.l:null,a.i),Wl(a.i),Xl(a),Ql(a),a.i.variants.some(function(w){return w.primary}),a.A.Ga(d,"loadedmetadata",function(){a.C.l=Date.now()/1E3-c.ye}),C(y)}})}
393
- function $k(a,b,c){var d,e,f,g,h,k,l;return M(function(m){return 1==m.g?(d=Nb,e=Date.now()/1E3,f=!0,a.m=Bl(a,{Pb:a.H,onError:function(n){pl(a,n)},pd:function(n){Cl(a,n)},onExpirationUpdated:function(n,p){Dl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==El&&f&&(f=!1,a.C.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=ng(g),k=nl[h],"application/x-mpegurl"==k&&Hd()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
394
- createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?od(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.gb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.W=!0,z(m,Gf(a.m,[l],[]),2)):z(m,a.m.xc(b.M),
381
+ for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.C=new Qk;a.je=null;tl(a);C(n)}})}
382
+ function Xk(a,b){var c,d,e,f;return M(function(g){if(1==g.g)return c=new Ph,d=a.h.textDisplayFactory,e=Gb(d),a.je=d,f=ul(b.M,c,e,function(h,k,l){h=r(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,t=r(m.frames),v=t.next();!v.done;v=t.next())vl(a,n,p,"ID3",v.value);if(a.F)a.F.onHlsTimedMetadata(m,n)}}),z(g,f.G,2);a.N=f;C(g)})}
383
+ function Yk(a,b,c){var d,e,f,g;return M(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.hb=d,f=a,z(h,ng(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.ld=h.h;a.J=Gb(a.ld);g=Ze(a.h.manifest);c.M&&"AUDIO"===c.M.nodeName&&(g.disableVideo=!0);a.J.configure(g);C(h)})}
384
+ function Zk(a,b){var c=b.uri,d=a.H;a.nd=new cj(function(){return a.La()});a.nd.addEventListener("regionadd",function(g){g=g.region;wl(a,xl,g);if(a.F)a.F.onDashTimedMetadata(g)});a.ma=null;a.h.streaming.observeQualityChanges&&(a.ma=new Xi(function(){return a.zb()}),a.ma.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
385
+ mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(el(yl,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.W;try{k.g.enabled&&(k.A=h.format,sk(k,g,{ot:vk,su:!k.i}))}catch(l){Ta("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){ik(a.W,g,h)},filter:function(g){return zl(a,g)},makeTextStreamsForClosedCaptions:function(g){return Al(a,g)},
386
+ onTimelineRegionAdded:function(g){var h=a.nd;a:{var k=r(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new O("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return rl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
387
+ enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Se(function(){var g,h,k,l;return M(function(m){if(1==m.g)return g=a,z(m,a.J.start(c,e),2);g.i=m.h;h=el(Bl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new P(2,4,4036);Cl(a.i);k=Date.now()/1E3;l=k-f;a.C.G=l;C(m)})}(),function(){return a.J.stop()})}
388
+ function $k(a,b){var c,d;return M(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Dl(a,{Pb:a.H,onError:function(f){rl(a,f)},pd:function(f){El(a,f)},onExpirationUpdated:function(f,g){Fl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Gl&&d&&(d=!1,a.C.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),z(e,If(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?z(e,a.m.xc(b.M),3):z(e,zl(a,a.i),0)})}
389
+ function al(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return M(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Ac&&(b.startTime=a.Ac,a.Ac=null);d=b.M;e=b.uri;a.hb=e;a.I=new Ti({ed:function(){return d.playbackRate},bd:function(){return d.defaultPlaybackRate},ue:function(w){d.playbackRate=w},mf:function(w){d.currentTime+=w}});f=function(){return Hl(a)};g=function(){return Il(a)};a.A.o(d,"playing",f);a.A.o(d,"pause",f);a.A.o(d,"ended",f);a.A.o(d,"ratechange",g);h=a.h.abrFactory;a.B&&a.ee==h||
390
+ (a.ee=h,a.B=Gb(h),"function"!=typeof a.B.playbackRateChanged&&(zb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.B.playbackRateChanged=function(){}),a.B.configure(a.h.abr));a.Aa=new He(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ba=a.h.preferredTextLanguage;a.wb=a.h.preferredTextRole;a.jb=a.h.preferForcedSubs;Jl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(w,x,D){a.j&&w!=a.j.l&&Kl(a,w,!0,void 0===
391
+ x?!1:x,void 0===D?0:D)});a.G=Ll(a,b.startTime);a.Wa=Ml(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Nl(a,k);Nd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Ol(a);a.j.configure(a.h.streaming);a.l=Pl;d.textTracks&&a.A.o(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "chapters":Ql(a,w)}});a.dispatchEvent(el(Rl));l=null;if(m=a.Za().find(function(w){return w.active})){y.D(2);break}l=
392
+ Sl(a)?a.B.chooseVariant():null;Kl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.D(3);break}n=a.G.m();return z(y,Tl(l,n),4);case 4:p=y.h,a.G.A(p);case 3:Ul(a,null,le(l));case 2:return t=a.pb().find(function(w){return w.active}),t||((v=ve(a.i.textStreams,a.Ba,a.wb,a.jb)[0]||null)&&Pk(a.C.h,v,!0),l&&(v?(l.audio&&Vl(a,l.audio,v)&&(a.ba=!0),a.ba&&a.N.l.setTextVisibility(!0),Wl(a)):a.ba=!1),v&&(a.h.streaming.alwaysStreamText||a.Ob())&&vj(a.j,v)),z(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.B.enable(),
393
+ Xl(a)),ce(a.j?a.j.l:null,a.i),Yl(a.i),Zl(a),Sl(a),a.i.variants.some(function(w){return w.primary}),a.A.Ga(d,"loadedmetadata",function(){a.C.l=Date.now()/1E3-c.ze}),C(y)}})}
394
+ function bl(a,b,c){var d,e,f,g,h,k,l;return M(function(m){return 1==m.g?(d=Nb,e=Date.now()/1E3,f=!0,a.m=Dl(a,{Pb:a.H,onError:function(n){rl(a,n)},pd:function(n){El(a,n)},onExpirationUpdated:function(n,p){Fl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==Gl&&f&&(f=!1,a.C.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=pg(g),k=pl[h],"application/x-mpegurl"==k&&$c()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
395
+ createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Cd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.gb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.W=!0,z(m,If(a.m,[l],[]),2)):z(m,a.m.xc(b.M),
395
396
  0)})}
396
- function al(a,b,c){function d(){return Fl(a)}b.uri=c.uri;b.startTime=c.startTime;a.hb=b.uri;var e=b.M;a.G=new Gi(e);var f=!1;a.fb.push(function(){f=!0});null!=b.startTime&&a.G.A(b.startTime);a.I=new Ri({ed:function(){return e.playbackRate},bd:function(){return e.defaultPlaybackRate},se:function(k){e.playbackRate=k},lf:function(k){e.currentTime+=k}});Ll(a,a.h.streaming.rebufferingGoal);a.A.o(e,"playing",d);a.A.o(e,"pause",d);a.A.o(e,"ended",d);a.A.o(e,"ratechange",function(){return Gl(a)});"none"!=e.preload&&
397
- a.A.Ga(e,"loadedmetadata",function(){a.C.l=Date.now()/1E3-c.ye});e.audioTracks&&(a.A.o(e.audioTracks,"addtrack",function(){return Xl(a)}),a.A.o(e.audioTracks,"removetrack",function(){return Xl(a)}),a.A.o(e.audioTracks,"change",function(){return Xl(a)}));e.textTracks&&(a.A.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Yl(a,k);break;case "chapters":Ol(a,k);break;default:Xl(a)}}),a.A.o(e.textTracks,"removetrack",function(){return Xl(a)}),a.A.o(e.textTracks,
398
- "change",function(){return Xl(a)}));var g=ng(b.uri);e.src=rk(a.W,b.uri,nl[g]);(Fd()||Ed("Web0S"))&&e.load();a.l=Zl;a.dispatchEvent(cl(Pl));var h=new Pc;xi(e,HTMLMediaElement.HAVE_METADATA,a.A,function(){h.resolve()});xi(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.A,function(){var k;return M(function(l){if(1==l.g)return $l(a),k=am(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):z(l,new Promise(function(m){a.A.Ga(e.textTracks,"change",m);(new Q(m)).S(1)}),2);if(f)return l["return"]();bm(a);C(l)})});
399
- e.error?h.reject(ol(a)):"none"==e.preload&&(Sa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.A.Ga(e,"error",function(){h.reject(ol(a))});return new Qe(h,function(){h.reject(new P(2,7,7001));return Promise.resolve()})}
400
- function $l(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.vd(b);var c=a.h.preferredVariantRole;""!=c&&a.vd(b,c)}}function bm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.ke(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.ke(b,d,c)}}
401
- function Yl(a,b){if("metadata"==b.kind){b.mode="hidden";a.A.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,tl(a,e.startTime,e.endTime,e.type,e.value),a.F)a.F.onCueMetadataChange(e.value)});var c=(new Q(function(){var d=cm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).za().S(.5);a.fb.push(function(){c.stop()})}}
402
- function tl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(cl(dm,b))}function Ol(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Q(function(){b.mode="hidden"})).za().S(.5);a.fb.push(function(){c.stop()})}}function Al(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function Bl(a,b){return new zf(b,a.h.drm.updateExpirationTime)}
403
- function Rk(a){return new af(function(b,c){a.B&&a.B.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(cl(em,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(cl(fm,b))})}
404
- function Jl(a,b){return new Hi(a.g,a.i,a.h.streaming,b,function(){a.Wa&&Ui(a.Wa,!0);if(a.j)for(var c=a.j,d=c.g.dd(),e=c.h.smallGapLimit,f=r(c.i.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.i.get(g);h.ua=null;var k=c.g.V;g==Mb?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=bi(k,g),k=Qh(k,d,e));if(!k&&((null!=ci(c.g.V,g)||h.ab)&&wj(c,h),h.Ma&&(h.Ma.abort(),h.Ma=null),g===Mb))for(g=c.g.V.C.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Dh(g),g=r(g.j.values()),h=g.next();!h.done;h=g.next())yh(h.value)}a.K&&
405
- gm(a)},function(c){return a.dispatchEvent(c)})}function Kl(a){var b=new bj(a.nd);b.addEventListener("enter",function(d){ul(a,hm,d.region)});b.addEventListener("exit",function(d){ul(a,im,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(ul(a,hm,e),ul(a,im,e))});var c=new Ti(a.g);c.g.add(b);a.ma&&c.g.add(a.ma);return c}function Ll(a,b){a.K=new Je;a.K.g=Le;Me(a.K,b,Math.min(.5,b/2));rl(a);a.gd=(new Q(function(){gm(a)})).ha(.25)}
406
- function gm(a){switch(a.l){case Zl:if(a.g.ended)var b=!0;else{var c=Ph(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Nl:a:if(a.g.ended||$h(a.N))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Jb();var d=Ph(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Rh(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Ke:Le;c.g=d;b!=d&&rl(a)}function sl(a,b,c,d){return new Uh(a,b,c,d)}
407
- function ll(a){return new fk({getBandwidthEstimate:function(){return a.B?a.B.getBandwidthEstimate():NaN},zb:function(){return a.zb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Za:function(){return a.Za()},Ab:function(){return a.Ab()},T:function(){return a.T()}},a.h.cmcd)}
408
- function Ml(a){return new hj(a.i,{dd:function(){return a.G.m()},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},modifySegmentRequest:function(b,c){gk(a.W,b,c)},V:a.N,Pb:a.H,onError:function(b){return pl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Kg:function(){a.J&&a.J.update&&a.J.update()},be:function(){a.G&&a.G.G();gm(a)},Jg:function(b,c){var d=c.Wd;d&&a.ma&&Zi(a.ma,d,b)}})}
409
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ck(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(zb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
410
- 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Hk(this.h,a,Qk(this));jm(this);return c};
411
- function jm(a){if(a.J){var b=Xe(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{km(a,a.i)}catch(f){pl(a,f)}a.B&&Ql(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||lm(a)}a.H&&a.H.qe(a.h.streaming.forceHTTPS);if(a.N&&(b=a.h.textDisplayFactory,a.ie!=b)){var c=Gb(b),d=a.N,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.ie=b;a.j&&(b=a.j,(c=b.i.get(Mb))&&
412
- rj(b,c.stream,!0,0,!0))}a.B&&(a.B.configure(a.h.abr),a.h.abr.enabled?a.B.enable():a.B.disable(),Vl(a));a.K&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Me(a.K,b,Math.min(.5,b/2)));a.i&&Hl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Qk(this);Hk(a,this.h,Qk(this));return a};
413
- q.Uf=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.La().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.Ug=function(){for(var a in this.h)delete this.h[a];Hk(this.h,Qk(this),Qk(this));jm(this)};q.$e=function(){return this.l};q.lg=function(){return this.g};q.Dc=function(){return this.H};q.Rd=function(){return this.hb};
414
- q.$c=function(){return this.F?this.F:null};q.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Mb=function(){return this.i?this.i.presentationTimeline.Mb():!1};q.gf=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
415
- q.La=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.bc(),end:a.mb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.yg=function(){this.T()&&(this.g.currentTime=this.La().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Cc=function(){return this.m?this.m.Cc():Infinity};q.cd=function(){return this.m?this.m.cd():{}};
416
- q.Ic=function(){return this.K?this.K.g==Le:!1};q.Ab=function(){return this.g?this.I?this.I.i:1:0};q.Ce=function(a){0==a?Sa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==Nl&&(this.B.playbackRateChanged(a),qj(this.j,1<Math.abs(a))))};q.Me=function(){var a=this.I.bd();this.l==Zl&&this.I.set(a);this.l==Nl&&(this.I.set(a),this.B.playbackRateChanged(a),qj(this.j,!1))};
417
- q.Za=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,re(e)){var f=je(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return qe(g)}):[]};
418
- q.pb=function(){if(this.i){for(var a=this.j?this.j.A:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ke(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?am(this).map(function(f){return oe(f)}):[]};q.dg=function(){return this.i?this.i.imageStreams.map(function(a){return le(a)}):[]};
419
- q.ug=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A;return M(function(F){if(1==F.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.D(3):z(F,d.createSegmentIndex(),3):F["return"](null):F.D(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;t=l/n;
397
+ function cl(a,b,c){function d(){return Hl(a)}b.uri=c.uri;b.startTime=c.startTime;a.hb=b.uri;var e=b.M;a.G=new Ii(e);var f=!1;a.fb.push(function(){f=!0});null!=b.startTime&&a.G.A(b.startTime);a.I=new Ti({ed:function(){return e.playbackRate},bd:function(){return e.defaultPlaybackRate},ue:function(k){e.playbackRate=k},mf:function(k){e.currentTime+=k}});Nl(a,a.h.streaming.rebufferingGoal);a.A.o(e,"playing",d);a.A.o(e,"pause",d);a.A.o(e,"ended",d);a.A.o(e,"ratechange",function(){return Il(a)});"none"!=e.preload&&
398
+ a.A.Ga(e,"loadedmetadata",function(){a.C.l=Date.now()/1E3-c.ze});e.audioTracks&&(a.A.o(e.audioTracks,"addtrack",function(){return Zl(a)}),a.A.o(e.audioTracks,"removetrack",function(){return Zl(a)}),a.A.o(e.audioTracks,"change",function(){return Zl(a)}));e.textTracks&&(a.A.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":$l(a,k);break;case "chapters":Ql(a,k);break;default:Zl(a)}}),a.A.o(e.textTracks,"removetrack",function(){return Zl(a)}),a.A.o(e.textTracks,
399
+ "change",function(){return Zl(a)}));var g=pg(b.uri);e.src=tk(a.W,b.uri,pl[g]);(Yc()||Xc("Web0S"))&&e.load();a.l=am;a.dispatchEvent(el(Rl));var h=new Pc;zi(e,HTMLMediaElement.HAVE_METADATA,a.A,function(){h.resolve()});zi(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.A,function(){var k;return M(function(l){if(1==l.g)return bm(a),k=cm(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):z(l,new Promise(function(m){a.A.Ga(e.textTracks,"change",m);(new Q(m)).S(1)}),2);if(f)return l["return"]();dm(a);C(l)})});
400
+ e.error?h.reject(ql(a)):"none"==e.preload&&(Sa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.A.Ga(e,"error",function(){h.reject(ql(a))});return new Se(h,function(){h.reject(new P(2,7,7001));return Promise.resolve()})}
401
+ function bm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.vd(b);var c=a.h.preferredVariantRole;""!=c&&a.vd(b,c)}}function dm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.le(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.le(b,d,c)}}
402
+ function $l(a,b){if("metadata"==b.kind){b.mode="hidden";a.A.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,vl(a,e.startTime,e.endTime,e.type,e.value),a.F)a.F.onCueMetadataChange(e.value)});var c=(new Q(function(){var d=em(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).za().S(.5);a.fb.push(function(){c.stop()})}}
403
+ function vl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(el(fm,b))}function Ql(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Q(function(){b.mode="hidden"})).za().S(.5);a.fb.push(function(){c.stop()})}}function Cl(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function Dl(a,b){return new Bf(b,a.h.drm.updateExpirationTime)}
404
+ function Tk(a){return new cf(function(b,c){a.B&&a.B.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(el(gm,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(el(hm,b))})}
405
+ function Ll(a,b){return new Ji(a.g,a.i,a.h.streaming,b,function(){a.Wa&&Wi(a.Wa,!0);if(a.j)for(var c=a.j,d=c.g.dd(),e=c.h.smallGapLimit,f=r(c.i.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.i.get(g);h.ua=null;var k=c.g.V;g==Mb?(k=k.g,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=di(k,g),k=Sh(k,d,e));if(!k&&((null!=ei(c.g.V,g)||h.ab)&&yj(c,h),h.Ma&&(h.Ma.abort(),h.Ma=null),g===Mb))for(g=c.g.V.C.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,Fh(g),g=r(g.j.values()),h=g.next();!h.done;h=g.next())Ah(h.value)}a.K&&
406
+ im(a)},function(c){return a.dispatchEvent(c)})}function Ml(a){var b=new dj(a.nd);b.addEventListener("enter",function(d){wl(a,jm,d.region)});b.addEventListener("exit",function(d){wl(a,km,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(wl(a,jm,e),wl(a,km,e))});var c=new Vi(a.g);c.g.add(b);a.ma&&c.g.add(a.ma);return c}function Nl(a,b){a.K=new Le;a.K.g=Ne;Oe(a.K,b,Math.min(.5,b/2));tl(a);a.gd=(new Q(function(){im(a)})).ha(.25)}
407
+ function im(a){switch(a.l){case am:if(a.g.ended)var b=!0;else{var c=Rh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Pl:a:if(a.g.ended||bi(a.N))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Jb();var d=Rh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Th(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Me:Ne;c.g=d;b!=d&&tl(a)}function ul(a,b,c,d){return new Wh(a,b,c,d)}
408
+ function nl(a){return new hk({getBandwidthEstimate:function(){return a.B?a.B.getBandwidthEstimate():NaN},zb:function(){return a.zb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Za:function(){return a.Za()},Ab:function(){return a.Ab()},T:function(){return a.T()}},a.h.cmcd)}
409
+ function Ol(a){return new jj(a.i,{dd:function(){return a.G.m()},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},modifySegmentRequest:function(b,c){ik(a.W,b,c)},V:a.N,Pb:a.H,onError:function(b){return rl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Lg:function(){a.J&&a.J.update&&a.J.update()},ce:function(){a.G&&a.G.G();im(a)},Kg:function(b,c){var d=c.Xd;d&&a.ma&&aj(a.ma,d,b)}})}
410
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ek(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(zb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
411
+ 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Jk(this.h,a,Sk(this));lm(this);return c};
412
+ function lm(a){if(a.J){var b=Ze(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{mm(a,a.i)}catch(f){rl(a,f)}a.B&&Sl(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||nm(a)}a.H&&a.H.re(a.h.streaming.forceHTTPS);if(a.N&&(b=a.h.textDisplayFactory,a.je!=b)){var c=Gb(b),d=a.N,e=d.l;d.l=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=c);a.je=b;a.j&&(b=a.j,(c=b.i.get(Mb))&&
413
+ tj(b,c.stream,!0,0,!0))}a.B&&(a.B.configure(a.h.abr),a.h.abr.enabled?a.B.enable():a.B.disable(),Xl(a));a.K&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Oe(a.K,b,Math.min(.5,b/2)));a.i&&Jl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Sk(this);Jk(a,this.h,Sk(this));return a};
414
+ q.Vf=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.La().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.Vg=function(){for(var a in this.h)delete this.h[a];Jk(this.h,Sk(this),Sk(this));lm(this)};q.bf=function(){return this.l};q.mg=function(){return this.g};q.Dc=function(){return this.H};q.Rd=function(){return this.hb};
415
+ q.$c=function(){return this.F?this.F:null};q.T=function(){return this.i?this.i.presentationTimeline.T():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Mb=function(){return this.i?this.i.presentationTimeline.Mb():!1};q.hf=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
416
+ q.La=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.bc(),end:a.mb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.zg=function(){this.T()&&(this.g.currentTime=this.La().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Cc=function(){return this.m?this.m.Cc():Infinity};q.cd=function(){return this.m?this.m.cd():{}};
417
+ q.Ic=function(){return this.K?this.K.g==Ne:!1};q.Ab=function(){return this.g?this.I?this.I.i:1:0};q.De=function(a){0==a?Sa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==Pl&&(this.B.playbackRateChanged(a),sj(this.j,1<Math.abs(a))))};q.Ne=function(){var a=this.I.bd();this.l==am&&this.I.set(a);this.l==Pl&&(this.I.set(a),this.B.playbackRateChanged(a),sj(this.j,!1))};
418
+ q.Za=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,te(e)){var f=le(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return se(g)}):[]};
419
+ q.pb=function(){if(this.i){for(var a=this.j?this.j.A:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=me(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?cm(this).map(function(f){return qe(f)}):[]};q.eg=function(){return this.i?this.i.imageStreams.map(function(a){return ne(a)}):[]};
420
+ q.vg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A;return M(function(F){if(1==F.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?F.D(3):z(F,d.createSegmentIndex(),3):F["return"](null):F.D(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;t=l/n;
420
421
  v=m*n;y=f.l-f.startTime;w=f.i||y/v;x=f.startTime;B=D=0;1<v&&(A=Math.floor((b-f.startTime)/w),x=f.startTime+A*w,D=A%m*p,B=Math.floor(A/m)*t);return F["return"]({imageHeight:l,imageWidth:k,height:t,positionX:D,positionY:B,startTime:x,duration:w,uris:f.Ka(),width:p})}return F["return"](null)})};
421
- q.le=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.A&&(Nk(this.C.h,b,!1),tj(this.j,b),mm(this),this.Ba=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=am(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,me(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";mm(this)}};
422
- q.me=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Sa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&re(d)&&(Il(this,d,!1,b,c),this.Aa=new De(d),Ql(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
423
- me(c)==a.id){nm(this,c);break}};q.Tf=function(){return om(this.Za())};q.sg=function(){return om(this.pb())};q.Sf=function(){return Array.from(pm(this.Za()))};q.rg=function(){return Array.from(pm(this.pb()))};
424
- q.vd=function(a,b){if(this.i&&this.G){this.Aa=new Ee(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.Aa.create(this.i.variants),f=null;e=r(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=je(f),this.me(c,!0)):lm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Qb(a);f=d=null;e=
425
- r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=qe(g);Qb(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?nm(this,f):d&&nm(this,d)}};
426
- q.ke=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Ba=a,this.wb=b||"",this.jb=c,(a=te(this.i.textStreams,this.Ba,this.wb,this.jb)[0]||null)&&a!=this.j.A&&(Nk(this.C.h,a,!1),this.h.streaming.alwaysStreamText||this.Ob()))tj(this.j,a),mm(this)}else{var d=Qb(a);(a=this.pb().find(function(e){return Qb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.le(a)}};
427
- q.Wg=function(a){if(this.i&&this.G){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Aa=new Ee(b.language,"",0,a),lm(this))}};q.Ob=function(){var a=this.ba;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?am(this).some(function(b){return"showing"==b.mode}):a};q.Ye=function(){return this.g&&this.g.src&&this.g.textTracks?qm(this).map(function(a){return oe(a)}):[]};
428
- q.Wf=function(a){var b=Qb(a),c=qm(this).filter(function(f){return Qb(f.language)==b});if(!c||!c.length)return[];a=[];c=r(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=r(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function am(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
429
- function cm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function qm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
430
- q.we=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==Nl)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=te(this.i.textStreams,this.Ba,this.wb,this.jb),0<a.length&&(tj(this.j,a[0]),mm(this))):pj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=am(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Ul(this)}};
431
- q.ng=function(){if(!this.T())return null;var a=this.na.l,b=0;if(this.G)b=this.G.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
432
- q.bf=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.zb=function(){if(this.l==Nl)return this.N.zb();var a={total:[],audio:[],video:[],text:[]};this.l==Zl&&(a.total=Sh(this.g.buffered));return a};
433
- q.getStats=function(){if(this.l!=Nl&&this.l!=Zl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Fl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.C;b=Math.round(100*b);c.i=isNaN(c.i)?
434
- b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.C,b=Number(a.totalVideoFrames),c.K=Number(a.droppedVideoFrames),c.J=b,this.C.I=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.I?a.I:NaN):a=NaN;this.C.m=a;if(this.l==Nl){if(a=this.j.l)this.C.B=(this.I?this.I.i:1)*a.bandwidth;a&&a.video&&(c=this.C,b=a.video.height||NaN,c.N=a.video.width||NaN,c.C=b);this.T()&&(a=this.bf().valueOf()+1E3*this.La().end,this.C.F=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
435
- (this.C.H=this.i.presentationTimeline.g);a=this.B.getBandwidthEstimate();this.C.A=a}var d=this.C;a=d.N;c=d.C;b=d.B;var e=d.J,f=d.K,g=d.I,h=d.A,k=d.i,l=d.l,m=d.G,n=d.j,p=Kk(d.g,"playing"),t=Kk(d.g,"paused"),v=Kk(d.g,"buffering"),y=d.m,w=d.F,x=d.H,D=Lk(d.g),B=[];d=r(d.h.g);for(var A=d.next();!A.done;A=d.next())A=A.value,B.push({timestamp:A.timestamp,id:A.id,type:A.type,fromAdaptation:A.fromAdaptation,bandwidth:A.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
422
+ q.me=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.A&&(Pk(this.C.h,b,!1),vj(this.j,b),om(this),this.Ba=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=cm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,oe(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";om(this)}};
423
+ q.oe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Sa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&te(d)&&(Kl(this,d,!1,b,c),this.Aa=new Ge(d),Sl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
424
+ oe(c)==a.id){pm(this,c);break}};q.Uf=function(){return qm(this.Za())};q.ug=function(){return qm(this.pb())};q.Tf=function(){return Array.from(rm(this.Za()))};q.sg=function(){return Array.from(rm(this.pb()))};
425
+ q.vd=function(a,b){if(this.i&&this.G){this.Aa=new He(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.Aa.create(this.i.variants),f=null;e=r(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=le(f),this.oe(c,!0)):nm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Qb(a);f=d=null;e=
426
+ r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=se(g);Qb(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?pm(this,f):d&&pm(this,d)}};
427
+ q.le=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Ba=a,this.wb=b||"",this.jb=c,(a=ve(this.i.textStreams,this.Ba,this.wb,this.jb)[0]||null)&&a!=this.j.A&&(Pk(this.C.h,a,!1),this.h.streaming.alwaysStreamText||this.Ob()))vj(this.j,a),om(this)}else{var d=Qb(a);(a=this.pb().find(function(e){return Qb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.me(a)}};
428
+ q.Xg=function(a){if(this.i&&this.G){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Aa=new He(b.language,"",0,a),nm(this))}};q.Ob=function(){var a=this.ba;return this.N?this.N.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?cm(this).some(function(b){return"showing"==b.mode}):a};q.Ze=function(){return this.g&&this.g.src&&this.g.textTracks?sm(this).map(function(a){return qe(a)}):[]};
429
+ q.Xf=function(a){var b=Qb(a),c=sm(this).filter(function(f){return Qb(f.language)==b});if(!c||!c.length)return[];a=[];c=r(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=r(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function cm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
430
+ function em(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function sm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
431
+ q.xe=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==Pl)this.N.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=ve(this.i.textStreams,this.Ba,this.wb,this.jb),0<a.length&&(vj(this.j,a[0]),om(this))):rj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=cm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Wl(this)}};
432
+ q.og=function(){if(!this.T())return null;var a=this.na.l,b=0;if(this.G)b=this.G.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
433
+ q.cf=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.zb=function(){if(this.l==Pl)return this.N.zb();var a={total:[],audio:[],video:[],text:[]};this.l==am&&(a.total=Uh(this.g.buffered));return a};
434
+ q.getStats=function(){if(this.l!=Pl&&this.l!=am)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Hl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.C;b=Math.round(100*b);c.i=isNaN(c.i)?
435
+ b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.C,b=Number(a.totalVideoFrames),c.K=Number(a.droppedVideoFrames),c.J=b,this.C.I=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.I?a.I:NaN):a=NaN;this.C.m=a;if(this.l==Pl){if(a=this.j.l)this.C.B=(this.I?this.I.i:1)*a.bandwidth;a&&a.video&&(c=this.C,b=a.video.height||NaN,c.N=a.video.width||NaN,c.C=b);this.T()&&(a=this.cf().valueOf()+1E3*this.La().end,this.C.F=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
436
+ (this.C.H=this.i.presentationTimeline.g);a=this.B.getBandwidthEstimate();this.C.A=a}var d=this.C;a=d.N;c=d.C;b=d.B;var e=d.J,f=d.K,g=d.I,h=d.A,k=d.i,l=d.l,m=d.G,n=d.j,p=Mk(d.g,"playing"),t=Mk(d.g,"paused"),v=Mk(d.g,"buffering"),y=d.m,w=d.F,x=d.H,D=Nk(d.g),B=[];d=r(d.h.g);for(var A=d.next();!A.done;A=d.next())A=A.value,B.push({timestamp:A.timestamp,id:A.id,type:A.type,fromAdaptation:A.fromAdaptation,bandwidth:A.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
436
437
  estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:t,bufferingTime:v,licenseTime:y,liveLatency:w,maxSegmentDuration:x,stateHistory:D,switchHistory:B}};
437
- q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;zb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=Nl&&this.l!=Zl)throw new P(1,7,7004);if(!d){var h=ng(a);d=rm[h];if(!d)throw new P(1,2,2011,h);}if(this.l==Zl){if("text/vtt"!=d)throw new P(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=wk(this.W,a);d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.pb().find(function(k){return k.language==
438
- b&&k.label==(f||"")&&k.kind==c}))return Xl(this),a;throw new P(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new P(1,4,4033);a={id:this.He++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Pi(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:Mb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
439
- closedCaptions:null};if(!qd(kd(a.mimeType,a.codecs)))throw new P(2,2,2014,d);this.i.textStreams.push(a);Xl(this);return ke(a)};
440
- q.If=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,y,w,x,D;return M(function(B){switch(B.g){case 1:if(h.l!=Nl&&h.l!=Zl)throw new P(1,7,7004);if(d){B.D(2);break}return z(B,sm(h,a),3);case 3:d=B.h;case 2:k=[];if(h.F)try{k=h.F.getServerSideCuePoints()}catch(A){}if(h.l!=Zl){B.D(4);break}g&&(c="forced");return z(B,tm(h,a,b,c,d,f||"",k),5);case 5:l=h.pb();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return Xl(h),B["return"](m);throw new P(1,2,2012);case 4:n=
441
- Nb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new P(1,4,4033);if(!k.length){B.D(6);break}return z(B,um(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=B.h,v=vm(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=Xh(y),d="text/vtt";case 6:w={id:h.He++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Pi(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.oa,primary:!1,trickModeVideo:null,
442
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};x=kd(w.mimeType,w.codecs);D=qd(x);if(!D)throw new P(2,2,2014,d);h.i.textStreams.push(w);Xl(h);return B["return"](ke(w))}})};
443
- q.Hf=function(a,b,c){var d=this,e,f,g,h;return M(function(k){switch(k.g){case 1:if(d.l!=Nl&&d.l!=Zl)throw new P(1,7,7004);if(c){k.D(2);break}return z(k,sm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.F)try{e=d.F.getServerSideCuePoints()}catch(l){}return z(k,tm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Ye();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return z(k,new Promise(function(l,m){d.A.Ga(f,"load",l);d.A.Ga(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return k["return"](h);
444
- case 5:throw new P(1,2,2012);}})};function sm(a,b){var c,d;return M(function(e){switch(e.g){case 1:c=ng(b);if(d=rm[c])return e["return"](d);E(e,2);return z(e,pg(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:I(e);case 3:if(d)return e["return"](d);throw new P(1,2,2011,c);}})}
445
- function tm(a,b,c,d,e,f,g){var h,k,l,m;return M(function(n){if(1==n.g)return"text/vtt"!=e||g.length?z(n,um(a,b,a.H,a.h.streaming.retryParameters),3):n.D(2);2!=n.g&&(h=n.h,k=vm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Xh(l),e="text/vtt");m=document.createElement("track");m.src=wk(a.W,b);m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}
446
- function um(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g){e=lf;f=ef([b],d);f.method="GET";var k=a.W;try{k.g.enabled&&qk(k,f,{ot:xk,su:!0})}catch(l){Ta("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return z(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}function vm(a,b,c,d){var e=rd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Ic(b),b=c.parseMedia(b,a),ek(b,d);throw new P(2,2,2014,c);}
447
- q.re=function(a,b){this.Ge.width=a;this.Ge.height=b};q.ge=function(){if(this.l==Nl){var a=this.j;if(a.j.g)a=!1;else if(a.B)a=!1;else{for(var b=r(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Gc&&(c.Gc=!1,oj(a,c,.1));a=!0}}else a=!1;return a};q.ig=function(){Sa("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};
448
- q.jg=function(){return this.ld};function Qk(a){var b=Fk();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.T()&&d.includes(c.code)&&(c.severity=1,a.ge())};b.textDisplayFactory=function(){return a.fd?new Xj(a.g,a.fd):new Rj(a.g)};return b}q.xe=function(a){this.fd=a};
449
- function yl(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Qi;h={id:a.He++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
450
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Mb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function xl(a,b){return M(function(c){if(1==c.g)return z(c,wm(a,b),2);km(a,b);C(c)})}
451
- function wm(a,b){var c;return M(function(d){if(1==d.g)return c=a.j?a.j.l:null,z(d,Zd(c,b),2);Wl(b);C(d)})}
452
- function km(a,b){if(a.l!=fl){for(var c=a.h.restrictions,d=a.Ge,e=!1,f=r(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Yd(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Xl(a);if((c=a.m?a.m.g:null)&&a.m.B)for(d=r(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=r(f.initData||[]),g=f.next();!g.done;g=
453
- f.next())g=g.value,Pf(a.m,g.initDataType,g.initData);xm(a,b)}}
454
- function Rl(a,b){var c,d,e,f,g;return M(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return M(function(t){if(1==t.g)return k?z(t,k.createSegmentIndex(),2):t["return"](null);n=(m=k.segmentIndex.Ib(l))?m.next().value:null;if(!n)return t["return"](null);p=n.startTime;return t["return"](p)})},z(h,e(c,b),2);if(3!=h.g)return f=h.h,z(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
455
- function rl(a){var b=a.Ic();if(a.C&&a.K&&a.G){var c=a.I;c.j=b;Si(c);a.W&&(c=a.W,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Fl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(cl(ym,b))}function Gl(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=cl(zm),a.dispatchEvent(b))}function Fl(a){if(a.C&&a.K){var b=a.C.g;a.K.g==Le?Jk(b,"buffering"):a.g.paused?Jk(b,"paused"):a.g.ended?Jk(b,"ended"):Jk(b,"playing")}}
456
- function Ql(a){try{xm(a,a.i)}catch(c){return pl(a,c),!1}var b=a.i.variants.filter(function(c){return re(c)});b=a.Aa.create(b);a.B.setVariants(Array.from(b.values()));return!0}function lm(a){var b;(b=Ql(a)?a.B.chooseVariant():null)&&Il(a,b,!0,!0,0)}
457
- function Il(a,b,c,d,e){var f=a.j.l;if(b==f)d&&sj(a.j,b,d,e,!0);else{var g=a.C.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));sj(a.j,b,d,e);d=null;f&&(d=je(f));b=je(b);c?Sl(a,d,b):Am(a,d,b)}}function nm(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=qe(c);var d=qe(b);Am(a,c,d)}
458
- function Tl(a,b,c){a=Qb(a.h.preferredTextLanguage);b=Qb(b.language);c=Qb(c.language);return Pb(c,a)&&!Pb(b,c)}function Sl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=cl(Bm,b);Cm(a,b)}function Xl(a){var b=cl(Dm);Cm(a,b)}function Am(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=cl(Em,b);Cm(a,b)}function mm(a){var b=cl(Fm);Cm(a,b)}function Ul(a){var b=cl(Gm);Cm(a,b)}function Vl(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Cm(a,cl(Hm,b))}
459
- function pl(a,b){if(a.l!=fl){var c=cl(Im,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function ul(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(cl(b,c))}
460
- function ol(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new P(2,3,3016,b,c,a.g.error.message)}
461
- function Cl(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Jm.includes(l)}h!=f.allowedByKeySystem&&
462
- (e=!0)}}}if(!e||Ql(a))(d=a.j.l)&&!d.allowedByKeySystem&&lm(a),e&&Xl(a)}}function Dl(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=cl(Km);a.dispatchEvent(b)}function Hl(a,b,c){0<b&&(a.T()||a.yf(b));b=a.getDuration();c<b&&(a.T()||a.bb(c))}
463
- function xm(a,b){var c=a.m?a.m.cd():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=r(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=r(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=r(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var t=c[d?"00":p];t?Jm.includes(t)&&h.add(t):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
464
- missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new P(2,4,4012,c);}function Wl(a){if(!a.variants.some(re))throw new P(2,4,4032);}function Cm(a,b){M(function(c){if(1==c.g)return z(c,Promise.resolve(),2);a.l!=fl&&a.dispatchEvent(b);C(c)})}function pm(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Qb(c.language)):b.add("und");return b}
465
- function om(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Qb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=r(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
466
- h.push({language:l,role:n,label:p})}});return h}function hl(){return new P(2,7,7E3)}function bl(a,b,c,d,e,f){return d==a&&e.M==f.M&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Lj(){return{M:null,mimeType:null,startTime:null,ye:NaN,uri:null}}function il(a){return new Promise(function(b,c){a.Qb=function(){return c(hl())};a.od=function(){return b()};a.onError=function(d){return c(d)};a.qd=function(){return c(hl())}})}N("shaka.Player",T);T.prototype.setVideoContainer=T.prototype.xe;
467
- T.prototype.getManifestParserFactory=T.prototype.jg;T.prototype.getManifest=T.prototype.ig;T.prototype.retryStreaming=T.prototype.ge;T.prototype.setMaxHardwareResolution=T.prototype.re;T.prototype.addChaptersTrack=T.prototype.Hf;T.prototype.addTextTrackAsync=T.prototype.If;T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.getStats=T.prototype.getStats;T.prototype.getBufferedInfo=T.prototype.zb;T.prototype.getPresentationStartTimeAsDate=T.prototype.bf;
468
- T.prototype.getPlayheadTimeAsDate=T.prototype.ng;T.prototype.setTextTrackVisibility=T.prototype.we;T.prototype.getChapters=T.prototype.Wf;T.prototype.getChaptersTracks=T.prototype.Ye;T.prototype.isTextTrackVisible=T.prototype.Ob;T.prototype.selectVariantsByLabel=T.prototype.Wg;T.prototype.selectTextLanguage=T.prototype.ke;T.prototype.selectAudioLanguage=T.prototype.vd;T.prototype.getTextLanguages=T.prototype.rg;T.prototype.getAudioLanguages=T.prototype.Sf;T.prototype.getTextLanguagesAndRoles=T.prototype.sg;
469
- T.prototype.getAudioLanguagesAndRoles=T.prototype.Tf;T.prototype.selectVariantTrack=T.prototype.me;T.prototype.selectTextTrack=T.prototype.le;T.prototype.getThumbnails=T.prototype.ug;T.prototype.getImageTracks=T.prototype.dg;T.prototype.getTextTracks=T.prototype.pb;T.prototype.getVariantTracks=T.prototype.Za;T.prototype.cancelTrickPlay=T.prototype.Me;T.prototype.trickPlay=T.prototype.Ce;T.prototype.getPlaybackRate=T.prototype.Ab;T.prototype.isBuffering=T.prototype.Ic;T.prototype.getKeyStatuses=T.prototype.cd;
470
- T.prototype.getExpiration=T.prototype.Cc;T.prototype.drmInfo=T.prototype.drmInfo;T.prototype.keySystem=T.prototype.keySystem;T.prototype.goToLive=T.prototype.yg;T.prototype.seekRange=T.prototype.La;T.prototype.isAudioOnly=T.prototype.gf;T.prototype.isInProgress=T.prototype.Mb;T.prototype.isLive=T.prototype.T;T.prototype.getAdManager=T.prototype.$c;T.prototype.getAssetUri=T.prototype.Rd;T.prototype.getNetworkingEngine=T.prototype.Dc;T.prototype.getMediaElement=T.prototype.lg;
471
- T.prototype.getLoadMode=T.prototype.$e;T.prototype.resetConfiguration=T.prototype.Ug;T.prototype.getBufferFullness=T.prototype.Uf;T.prototype.getConfiguration=T.prototype.getConfiguration;T.prototype.configure=T.prototype.configure;T.prototype.load=T.prototype.load;T.prototype.updateStartTime=T.prototype.hh;T.prototype.unload=T.prototype.Ee;T.prototype.detach=T.prototype.detach;T.prototype.attach=T.prototype.xc;
472
- T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return M(function(h){if(1==h.g)return b={},a?z(h,eg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(zd()){for(var l in mg)k[l]=!0;for(var m in og)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=zd()?!!mg[n]:Ad(n);for(var p in l)k[p]=
473
- zd()?!!og[p]:Ad(l[p]);c=k;k={};p=r('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
474
- for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=zd()?qd(l)?!0:MediaSource.isTypeSupported(l)||gd(l):Ad(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Lm;for(g in f)e[g]=f[g]();return h["return"](e)})};T.isBrowserSupported=gl;T.setAdManagerFactory=function(a){Sk=a};T.registerSupportPlugin=function(a,b){Lm[a]=b};T.prototype.destroy=T.prototype.destroy;
475
- var Hm="abrstatuschanged",Bm="adaptation",ym="buffering",fm="downloadfailed",em="downloadheadersreceived",El="drmsessionupdate",Ij="emsg",Im="error",Km="expirationupdated",ml="loaded",jl="loading",zl="manifestparsed",wl="mediaqualitychanged",dm="metadata",dl="onstatechange",el="onstateidle",zm="ratechange",Pl="streaming",Fm="textchanged",Gm="texttrackvisibility",vl="timelineregionadded",hm="timelineregionenter",im="timelineregionexit",Dm="trackschanged",ql="unloading",Em="variantchanged",Mm={nh:Hm,
476
- oh:Bm,ph:ym,uh:fm,vh:em,wh:El,Eh:Ij,Error:Im,Fh:Km,Lh:"largegap",Mh:ml,Nh:jl,Rh:zl,Sh:wl,Metadata:dm,Xh:dl,Yh:el,gi:zm,ni:"sessiondata",oi:Pl,pi:Fm,ri:Gm,si:vl,ti:hm,wi:im,xi:Dm,Ci:ql,Ei:Em},fl=0,Pk=1,Nl=2,Zl=3;T.LoadMode={DESTROYED:fl,NOT_LOADED:Pk,MEDIA_SOURCE:Nl,SRC_EQUALS:Zl};T.version="v3.3.7";var Nm=["3","3"];Ab=new function(a){this.g=a;this.i=Bb;this.h=Cb}(new yb(Number(Nm[0]),Number(Nm[1])));
477
- var Jm=["output-restricted","internal-error"],Lm={},Sk=null,nl={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},rm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
478
- ssa:"text/x-ssa",ass:"text/x-ssa"};function Om(){this.h=[];this.j=this.i=this.g=0};function Pm(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new of;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}q=Pm.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
438
+ q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;zb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=Pl&&this.l!=am)throw new P(1,7,7004);if(!d){var h=pg(a);d=tm[h];if(!d)throw new P(1,2,2011,h);}if(this.l==am){if("text/vtt"!=d)throw new P(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=yk(this.W,a);d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.pb().find(function(k){return k.language==
439
+ b&&k.label==(f||"")&&k.kind==c}))return Zl(this),a;throw new P(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new P(1,4,4033);a={id:this.Ie++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ri(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:Mb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
440
+ closedCaptions:null};if(!Fd(yd(a.mimeType,a.codecs)))throw new P(2,2,2014,d);this.i.textStreams.push(a);Zl(this);return me(a)};
441
+ q.Jf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,y,w,x,D;return M(function(B){switch(B.g){case 1:if(h.l!=Pl&&h.l!=am)throw new P(1,7,7004);if(d){B.D(2);break}return z(B,um(h,a),3);case 3:d=B.h;case 2:k=[];if(h.F)try{k=h.F.getServerSideCuePoints()}catch(A){}if(h.l!=am){B.D(4);break}g&&(c="forced");return z(B,vm(h,a,b,c,d,f||"",k),5);case 5:l=h.pb();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return Zl(h),B["return"](m);throw new P(1,2,2012);case 4:n=
442
+ Nb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new P(1,4,4033);if(!k.length){B.D(6);break}return z(B,wm(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=B.h,v=xm(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=Zh(y),d="text/vtt";case 6:w={id:h.Ie++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ri(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.oa,primary:!1,trickModeVideo:null,
443
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};x=yd(w.mimeType,w.codecs);D=Fd(x);if(!D)throw new P(2,2,2014,d);h.i.textStreams.push(w);Zl(h);return B["return"](me(w))}})};
444
+ q.If=function(a,b,c){var d=this,e,f,g,h;return M(function(k){switch(k.g){case 1:if(d.l!=Pl&&d.l!=am)throw new P(1,7,7004);if(c){k.D(2);break}return z(k,um(d,a),3);case 3:c=k.h;case 2:e=[];if(d.F)try{e=d.F.getServerSideCuePoints()}catch(l){}return z(k,vm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Ze();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return z(k,new Promise(function(l,m){d.A.Ga(f,"load",l);d.A.Ga(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return k["return"](h);
445
+ case 5:throw new P(1,2,2012);}})};function um(a,b){var c,d;return M(function(e){switch(e.g){case 1:c=pg(b);if(d=tm[c])return e["return"](d);E(e,2);return z(e,rg(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:I(e);case 3:if(d)return e["return"](d);throw new P(1,2,2011,c);}})}
446
+ function vm(a,b,c,d,e,f,g){var h,k,l,m;return M(function(n){if(1==n.g)return"text/vtt"!=e||g.length?z(n,wm(a,b,a.H,a.h.streaming.retryParameters),3):n.D(2);2!=n.g&&(h=n.h,k=xm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Zh(l),e="text/vtt");m=document.createElement("track");m.src=yk(a.W,b);m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}
447
+ function wm(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g){e=nf;f=gf([b],d);f.method="GET";var k=a.W;try{k.g.enabled&&sk(k,f,{ot:zk,su:!0})}catch(l){Ta("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return z(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}function xm(a,b,c,d){var e=Gd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=Ic(b),b=c.parseMedia(b,a),gk(b,d);throw new P(2,2,2014,c);}
448
+ q.se=function(a,b){this.He.width=a;this.He.height=b};q.ie=function(){if(this.l==Pl){var a=this.j;if(a.j.g)a=!1;else if(a.B)a=!1;else{for(var b=r(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Gc&&(c.Gc=!1,qj(a,c,.1));a=!0}}else a=!1;return a};q.jg=function(){Sa("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};
449
+ q.kg=function(){return this.ld};function Sk(a){var b=Hk();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.T()&&d.includes(c.code)&&(c.severity=1,a.ie())};b.textDisplayFactory=function(){return a.fd?new Zj(a.g,a.fd):new Tj(a.g)};return b}q.ye=function(a){this.fd=a};
450
+ function Al(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Si;h={id:a.Ie++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
451
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Mb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function zl(a,b){return M(function(c){if(1==c.g)return z(c,ym(a,b),2);mm(a,b);C(c)})}
452
+ function ym(a,b){var c;return M(function(d){if(1==d.g)return c=a.j?a.j.l:null,z(d,ae(c,b),2);Yl(b);C(d)})}
453
+ function mm(a,b){if(a.l!=hl){for(var c=a.h.restrictions,d=a.He,e=!1,f=r(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=$d(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Zl(a);if((c=a.m?a.m.g:null)&&a.m.B)for(d=r(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=r(f.initData||[]),g=f.next();!g.done;g=
454
+ f.next())g=g.value,Rf(a.m,g.initDataType,g.initData);zm(a,b)}}
455
+ function Tl(a,b){var c,d,e,f,g;return M(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return M(function(t){if(1==t.g)return k?z(t,k.createSegmentIndex(),2):t["return"](null);n=(m=k.segmentIndex.Ib(l))?m.next().value:null;if(!n)return t["return"](null);p=n.startTime;return t["return"](p)})},z(h,e(c,b),2);if(3!=h.g)return f=h.h,z(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
456
+ function tl(a){var b=a.Ic();if(a.C&&a.K&&a.G){var c=a.I;c.j=b;Ui(c);a.W&&(c=a.W,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Hl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(el(Am,b))}function Il(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=el(Bm),a.dispatchEvent(b))}function Hl(a){if(a.C&&a.K){var b=a.C.g;a.K.g==Ne?Lk(b,"buffering"):a.g.paused?Lk(b,"paused"):a.g.ended?Lk(b,"ended"):Lk(b,"playing")}}
457
+ function Sl(a){try{zm(a,a.i)}catch(c){return rl(a,c),!1}var b=a.i.variants.filter(function(c){return te(c)});b=a.Aa.create(b);a.B.setVariants(Array.from(b.values()));return!0}function nm(a){var b;(b=Sl(a)?a.B.chooseVariant():null)&&Kl(a,b,!0,!0,0)}
458
+ function Kl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&uj(a.j,b,d,e,!0);else{var g=a.C.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));uj(a.j,b,d,e);d=null;f&&(d=le(f));b=le(b);c?Ul(a,d,b):Cm(a,d,b)}}function pm(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=se(c);var d=se(b);Cm(a,c,d)}
459
+ function Vl(a,b,c){a=Qb(a.h.preferredTextLanguage);b=Qb(b.language);c=Qb(c.language);return Pb(c,a)&&!Pb(b,c)}function Ul(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=el(Dm,b);Em(a,b)}function Zl(a){var b=el(Fm);Em(a,b)}function Cm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=el(Gm,b);Em(a,b)}function om(a){var b=el(Hm);Em(a,b)}function Wl(a){var b=el(Im);Em(a,b)}function Xl(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Em(a,el(Jm,b))}
460
+ function rl(a,b){if(a.l!=hl){var c=el(Km,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function wl(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(el(b,c))}
461
+ function ql(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new P(2,3,3016,b,c,a.g.error.message)}
462
+ function El(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Lm.includes(l)}h!=f.allowedByKeySystem&&
463
+ (e=!0)}}}if(!e||Sl(a))(d=a.j.l)&&!d.allowedByKeySystem&&nm(a),e&&Zl(a)}}function Fl(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=el(Mm);a.dispatchEvent(b)}function Jl(a,b,c){0<b&&(a.T()||a.zf(b));b=a.getDuration();c<b&&(a.T()||a.bb(c))}
464
+ function zm(a,b){var c=a.m?a.m.cd():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=r(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=r(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=r(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var t=c[d?"00":p];t?Lm.includes(t)&&h.add(t):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
465
+ missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new P(2,4,4012,c);}function Yl(a){if(!a.variants.some(te))throw new P(2,4,4032);}function Em(a,b){M(function(c){if(1==c.g)return z(c,Promise.resolve(),2);a.l!=hl&&a.dispatchEvent(b);C(c)})}function rm(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Qb(c.language)):b.add("und");return b}
466
+ function qm(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Qb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=r(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
467
+ h.push({language:l,role:n,label:p})}});return h}function jl(){return new P(2,7,7E3)}function dl(a,b,c,d,e,f){return d==a&&e.M==f.M&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Nj(){return{M:null,mimeType:null,startTime:null,ze:NaN,uri:null}}function kl(a){return new Promise(function(b,c){a.Qb=function(){return c(jl())};a.od=function(){return b()};a.onError=function(d){return c(d)};a.qd=function(){return c(jl())}})}N("shaka.Player",T);T.prototype.setVideoContainer=T.prototype.ye;
468
+ T.prototype.getManifestParserFactory=T.prototype.kg;T.prototype.getManifest=T.prototype.jg;T.prototype.retryStreaming=T.prototype.ie;T.prototype.setMaxHardwareResolution=T.prototype.se;T.prototype.addChaptersTrack=T.prototype.If;T.prototype.addTextTrackAsync=T.prototype.Jf;T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.getStats=T.prototype.getStats;T.prototype.getBufferedInfo=T.prototype.zb;T.prototype.getPresentationStartTimeAsDate=T.prototype.cf;
469
+ T.prototype.getPlayheadTimeAsDate=T.prototype.og;T.prototype.setTextTrackVisibility=T.prototype.xe;T.prototype.getChapters=T.prototype.Xf;T.prototype.getChaptersTracks=T.prototype.Ze;T.prototype.isTextTrackVisible=T.prototype.Ob;T.prototype.selectVariantsByLabel=T.prototype.Xg;T.prototype.selectTextLanguage=T.prototype.le;T.prototype.selectAudioLanguage=T.prototype.vd;T.prototype.getTextLanguages=T.prototype.sg;T.prototype.getAudioLanguages=T.prototype.Tf;T.prototype.getTextLanguagesAndRoles=T.prototype.ug;
470
+ T.prototype.getAudioLanguagesAndRoles=T.prototype.Uf;T.prototype.selectVariantTrack=T.prototype.oe;T.prototype.selectTextTrack=T.prototype.me;T.prototype.getThumbnails=T.prototype.vg;T.prototype.getImageTracks=T.prototype.eg;T.prototype.getTextTracks=T.prototype.pb;T.prototype.getVariantTracks=T.prototype.Za;T.prototype.cancelTrickPlay=T.prototype.Ne;T.prototype.trickPlay=T.prototype.De;T.prototype.getPlaybackRate=T.prototype.Ab;T.prototype.isBuffering=T.prototype.Ic;T.prototype.getKeyStatuses=T.prototype.cd;
471
+ T.prototype.getExpiration=T.prototype.Cc;T.prototype.drmInfo=T.prototype.drmInfo;T.prototype.keySystem=T.prototype.keySystem;T.prototype.goToLive=T.prototype.zg;T.prototype.seekRange=T.prototype.La;T.prototype.isAudioOnly=T.prototype.hf;T.prototype.isInProgress=T.prototype.Mb;T.prototype.isLive=T.prototype.T;T.prototype.getAdManager=T.prototype.$c;T.prototype.getAssetUri=T.prototype.Rd;T.prototype.getNetworkingEngine=T.prototype.Dc;T.prototype.getMediaElement=T.prototype.mg;
472
+ T.prototype.getLoadMode=T.prototype.bf;T.prototype.resetConfiguration=T.prototype.Vg;T.prototype.getBufferFullness=T.prototype.Vf;T.prototype.getConfiguration=T.prototype.getConfiguration;T.prototype.configure=T.prototype.configure;T.prototype.load=T.prototype.load;T.prototype.updateStartTime=T.prototype.ih;T.prototype.unload=T.prototype.Fe;T.prototype.detach=T.prototype.detach;T.prototype.attach=T.prototype.xc;
473
+ T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return M(function(h){if(1==h.g)return b={},a?z(h,gg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Tc()){for(var l in og)k[l]=!0;for(var m in qg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=Tc()?!!og[n]:Uc(n);for(var p in l)k[p]=
474
+ Tc()?!!qg[p]:Uc(l[p]);c=k;k={};p=r('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
475
+ for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Tc()?Fd(l)?!0:MediaSource.isTypeSupported(l)||ud(l):Uc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Nm;for(g in f)e[g]=f[g]();return h["return"](e)})};T.isBrowserSupported=il;T.setAdManagerFactory=function(a){Uk=a};T.registerSupportPlugin=function(a,b){Nm[a]=b};T.prototype.destroy=T.prototype.destroy;
476
+ var Jm="abrstatuschanged",Dm="adaptation",Am="buffering",hm="downloadfailed",gm="downloadheadersreceived",Gl="drmsessionupdate",Kj="emsg",Km="error",Mm="expirationupdated",ol="loaded",ll="loading",Bl="manifestparsed",yl="mediaqualitychanged",fm="metadata",fl="onstatechange",gl="onstateidle",Bm="ratechange",Rl="streaming",Hm="textchanged",Im="texttrackvisibility",xl="timelineregionadded",jm="timelineregionenter",km="timelineregionexit",Fm="trackschanged",sl="unloading",Gm="variantchanged",Om={oh:Jm,
477
+ ph:Dm,qh:Am,vh:hm,wh:gm,xh:Gl,Fh:Kj,Error:Km,Gh:Mm,Mh:"largegap",Nh:ol,Oh:ll,Sh:Bl,Th:yl,Metadata:fm,Yh:fl,Zh:gl,ii:Bm,oi:"sessiondata",pi:Rl,ri:Hm,si:Im,ti:xl,wi:jm,xi:km,zi:Fm,Di:sl,Fi:Gm},hl=0,Rk=1,Pl=2,am=3;T.LoadMode={DESTROYED:hl,NOT_LOADED:Rk,MEDIA_SOURCE:Pl,SRC_EQUALS:am};T.version="v3.3.8";var Pm=["3","3"];Ab=new function(a){this.g=a;this.i=Bb;this.h=Cb}(new yb(Number(Pm[0]),Number(Pm[1])));
478
+ var Lm=["output-restricted","internal-error"],Nm={},Uk=null,pl={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},tm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
479
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function Qm(){this.h=[];this.j=this.i=this.g=0};function Rm(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new qf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}q=Rm.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
479
480
  q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
480
481
  q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};
481
- N("shaka.ads.ClientSideAd",Pm);Pm.prototype.release=Pm.prototype.release;Pm.prototype.getPositionInSequence=Pm.prototype.getPositionInSequence;Pm.prototype.getSequenceLength=Pm.prototype.getSequenceLength;Pm.prototype.setMuted=Pm.prototype.setMuted;Pm.prototype.resize=Pm.prototype.resize;Pm.prototype.isLinear=Pm.prototype.isLinear;Pm.prototype.isMuted=Pm.prototype.isMuted;Pm.prototype.setVolume=Pm.prototype.setVolume;Pm.prototype.getVolume=Pm.prototype.getVolume;Pm.prototype.play=Pm.prototype.play;
482
- Pm.prototype.pause=Pm.prototype.pause;Pm.prototype.skip=Pm.prototype.skip;Pm.prototype.canSkipNow=Pm.prototype.canSkipNow;Pm.prototype.getTimeUntilSkippable=Pm.prototype.getTimeUntilSkippable;Pm.prototype.isSkippable=Pm.prototype.isSkippable;Pm.prototype.isPaused=Pm.prototype.isPaused;Pm.prototype.getRemainingTime=Pm.prototype.getRemainingTime;Pm.prototype.getMinSuggestedDuration=Pm.prototype.getMinSuggestedDuration;Pm.prototype.getDuration=Pm.prototype.getDuration;function Qm(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.j=d;this.m=null;this.h=new of;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.3.7");this.g=null;this.h.Ga(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Rm(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
483
- function(f){Sm(e,f)});this.i.onended=function(){e.l.contentComplete()}}Qm.prototype.stop=function(){this.g&&this.g.stop();this.A&&Wj(this.A)};Qm.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Sm(a,b){b.getError();Tm(a,null);a.j(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
484
- function Rm(a,b){a.j(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.j(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new O("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Um(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
485
- a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)),a.g.start()}catch(f){Tm(a,null)}}
486
- function Um(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new O(d,e))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Sm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Vm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Vm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
487
- function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Tm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Tm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
482
+ N("shaka.ads.ClientSideAd",Rm);Rm.prototype.release=Rm.prototype.release;Rm.prototype.getPositionInSequence=Rm.prototype.getPositionInSequence;Rm.prototype.getSequenceLength=Rm.prototype.getSequenceLength;Rm.prototype.setMuted=Rm.prototype.setMuted;Rm.prototype.resize=Rm.prototype.resize;Rm.prototype.isLinear=Rm.prototype.isLinear;Rm.prototype.isMuted=Rm.prototype.isMuted;Rm.prototype.setVolume=Rm.prototype.setVolume;Rm.prototype.getVolume=Rm.prototype.getVolume;Rm.prototype.play=Rm.prototype.play;
483
+ Rm.prototype.pause=Rm.prototype.pause;Rm.prototype.skip=Rm.prototype.skip;Rm.prototype.canSkipNow=Rm.prototype.canSkipNow;Rm.prototype.getTimeUntilSkippable=Rm.prototype.getTimeUntilSkippable;Rm.prototype.isSkippable=Rm.prototype.isSkippable;Rm.prototype.isPaused=Rm.prototype.isPaused;Rm.prototype.getRemainingTime=Rm.prototype.getRemainingTime;Rm.prototype.getMinSuggestedDuration=Rm.prototype.getMinSuggestedDuration;Rm.prototype.getDuration=Rm.prototype.getDuration;function Sm(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.j=d;this.m=null;this.h=new qf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.3.8");this.g=null;this.h.Ga(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Tm(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
484
+ function(f){Um(e,f)});this.i.onended=function(){e.l.contentComplete()}}Sm.prototype.stop=function(){this.g&&this.g.stop();this.A&&Yj(this.A)};Sm.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Um(a,b){b.getError();Vm(a,null);a.j(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
485
+ function Tm(a,b){a.j(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.j(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new O("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Wm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
486
+ a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)),a.g.start()}catch(f){Vm(a,null)}}
487
+ function Wm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new O(d,e))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Um(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Xm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Xm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
488
+ function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Vm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Vm(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
488
489
  a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.m.i=!0;b(c,"ad-paused")});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.m.i=!1;b(c,"ad-resumed")});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.o(a.g,
489
490
  google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g,google.ima.AdEvent.Type.AD_METADATA,
490
- function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Vm(a,b){var c=b.getAd();a.m=new Pm(c,a.g);c=(new Map).set("ad",a.m).set("sdkAdObject",c).set("originalEvent",b);a.j(new O("ad-started",c));a.m.isLinear()&&(a.A.setAttribute("ad-active","true"),a.i.pause())}
491
- function Tm(a,b){a.j(new O("ad-stopped",(new Map).set("originalEvent",b)));a.m.isLinear()&&(a.A.removeAttribute("ad-active"),a.i.play())};function Wm(a,b){this.i=a;this.h=null;this.g=b}q=Wm.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
491
+ function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Xm(a,b){var c=b.getAd();a.m=new Rm(c,a.g);c=(new Map).set("ad",a.m).set("sdkAdObject",c).set("originalEvent",b);a.j(new O("ad-started",c));a.m.isLinear()&&(a.A.setAttribute("ad-active","true"),a.i.pause())}
492
+ function Vm(a,b){a.j(new O("ad-stopped",(new Map).set("originalEvent",b)));a.m.isLinear()&&(a.A.removeAttribute("ad-active"),a.i.play())};function Ym(a,b){this.i=a;this.h=null;this.g=b}q=Ym.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
492
493
  q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
493
- q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};N("shaka.ads.ServerSideAd",Wm);Wm.prototype.release=Wm.prototype.release;Wm.prototype.getPositionInSequence=Wm.prototype.getPositionInSequence;Wm.prototype.getSequenceLength=Wm.prototype.getSequenceLength;Wm.prototype.setMuted=Wm.prototype.setMuted;
494
- Wm.prototype.resize=Wm.prototype.resize;Wm.prototype.isLinear=Wm.prototype.isLinear;Wm.prototype.isMuted=Wm.prototype.isMuted;Wm.prototype.setVolume=Wm.prototype.setVolume;Wm.prototype.getVolume=Wm.prototype.getVolume;Wm.prototype.play=Wm.prototype.play;Wm.prototype.pause=Wm.prototype.pause;Wm.prototype.skip=Wm.prototype.skip;Wm.prototype.canSkipNow=Wm.prototype.canSkipNow;Wm.prototype.getTimeUntilSkippable=Wm.prototype.getTimeUntilSkippable;Wm.prototype.isSkippable=Wm.prototype.isSkippable;
495
- Wm.prototype.isPaused=Wm.prototype.isPaused;Wm.prototype.getRemainingTime=Wm.prototype.getRemainingTime;Wm.prototype.getMinSuggestedDuration=Wm.prototype.getMinSuggestedDuration;Wm.prototype.getDuration=Wm.prototype.getDuration;function Xm(a,b,c,d){var e=this;this.B=a;this.l=b;this.j=null;this.I=NaN;this.i=d;this.H=!1;this.C=this.m=this.A=null;this.F="";this.G=[];this.h=new of;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.B,a);this.i(new O("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Ym(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
496
- e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Wm(f,e.l);e.C&&(e.m.h=e.C);e.i(new O("ad-started",(new Map).set("ad",e.m)));e.B.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
494
+ q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};N("shaka.ads.ServerSideAd",Ym);Ym.prototype.release=Ym.prototype.release;Ym.prototype.getPositionInSequence=Ym.prototype.getPositionInSequence;Ym.prototype.getSequenceLength=Ym.prototype.getSequenceLength;Ym.prototype.setMuted=Ym.prototype.setMuted;
495
+ Ym.prototype.resize=Ym.prototype.resize;Ym.prototype.isLinear=Ym.prototype.isLinear;Ym.prototype.isMuted=Ym.prototype.isMuted;Ym.prototype.setVolume=Ym.prototype.setVolume;Ym.prototype.getVolume=Ym.prototype.getVolume;Ym.prototype.play=Ym.prototype.play;Ym.prototype.pause=Ym.prototype.pause;Ym.prototype.skip=Ym.prototype.skip;Ym.prototype.canSkipNow=Ym.prototype.canSkipNow;Ym.prototype.getTimeUntilSkippable=Ym.prototype.getTimeUntilSkippable;Ym.prototype.isSkippable=Ym.prototype.isSkippable;
496
+ Ym.prototype.isPaused=Ym.prototype.isPaused;Ym.prototype.getRemainingTime=Ym.prototype.getRemainingTime;Ym.prototype.getMinSuggestedDuration=Ym.prototype.getMinSuggestedDuration;Ym.prototype.getDuration=Ym.prototype.getDuration;function Zm(a,b,c,d){var e=this;this.B=a;this.l=b;this.j=null;this.I=NaN;this.i=d;this.H=!1;this.C=this.m=this.A=null;this.F="";this.G=[];this.h=new qf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.B,a);this.i(new O("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){$m(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
497
+ e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Ym(f,e.l);e.C&&(e.m.h=e.C);e.i(new O("ad-started",(new Map).set("ad",e.m)));e.B.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
497
498
  var f=e.l.currentTime;e.A&&e.A>f&&(e.l.currentTime=e.A,e.A=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.h=e.C)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new O("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new O("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new O("ad-third-quartile"))});
498
499
  this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new O("ad-complete"));e.i(new O("ad-stopped"));e.B.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new O("ad-skipped"));e.i(new O("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.G=
499
- f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Xm.prototype.stop=function(){this.F="";this.A=null;this.G=[]};Xm.prototype.release=function(){this.stop();this.h&&this.h.release()};Xm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
500
- function Ym(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.l.currentTime=e.start)}})};function U(){cb.call(this);this.g=this.i=null;this.h=new Om;this.j=navigator.language}u(U,cb);q=U.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new P(2,10,1E4);this.i&&this.i.release();this.i=new Qm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
501
- q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);cb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.h=new Om};q.requestClientSideAds=function(a){if(!this.i)throw new P(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.l.requestAds(a)};
502
- q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new Xm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
503
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.3.7";c=this.g;var d=b;c.j?c=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
504
- (c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.3.7";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
500
+ f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Zm.prototype.stop=function(){this.F="";this.A=null;this.G=[]};Zm.prototype.release=function(){this.stop();this.h&&this.h.release()};Zm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
501
+ function $m(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.l.currentTime=e.start)}})};function U(){cb.call(this);this.g=this.i=null;this.h=new Qm;this.j=navigator.language}u(U,cb);q=U.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new P(2,10,1E4);this.i&&this.i.release();this.i=new Sm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
502
+ q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);cb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.h=new Qm};q.requestClientSideAds=function(a){if(!this.i)throw new P(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.l.requestAds(a)};
503
+ q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new Zm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
504
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.3.8";c=this.g;var d=b;c.j?c=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
505
+ (c.H=!0),c.j=new Pc,c.g.requestStream(a),c.F=d||"",c.I=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Sa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.3.8";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
505
506
  q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};N("shaka.ads.AdManager",U);
506
507
  U.prototype.onCueMetadataChange=U.prototype.onCueMetadataChange;U.prototype.onHlsTimedMetadata=U.prototype.onHlsTimedMetadata;U.prototype.onDashTimedMetadata=U.prototype.onDashTimedMetadata;U.prototype.getStats=U.prototype.getStats;U.prototype.getServerSideCuePoints=U.prototype.getServerSideCuePoints;U.prototype.replaceServerSideAdTagParameters=U.prototype.replaceServerSideAdTagParameters;U.prototype.requestServerSideStream=U.prototype.requestServerSideStream;U.prototype.initServerSide=U.prototype.initServerSide;
507
508
  U.prototype.requestClientSideAds=U.prototype.requestClientSideAds;U.prototype.onAssetUnload=U.prototype.onAssetUnload;U.prototype.release=U.prototype.release;U.prototype.initClientSide=U.prototype.initClientSide;U.prototype.setLocale=U.prototype.setLocale;U.ADS_LOADED="ads-loaded";U.AD_STARTED="ad-started";U.AD_FIRST_QUARTILE="ad-first-quartile";U.AD_MIDPOINT="ad-midpoint";U.AD_THIRD_QUARTILE="ad-third-quartile";U.AD_COMPLETE="ad-complete";U.AD_STOPPED="ad-stopped";U.AD_SKIPPED="ad-skipped";
508
509
  U.AD_VOLUME_CHANGED="ad-volume-changed";U.AD_MUTED="ad-muted";U.AD_PAUSED="ad-paused";U.AD_RESUMED="ad-resumed";U.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";U.CUEPOINTS_CHANGED="ad-cue-points-changed";U.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";U.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";U.AD_CLICKED="ad-clicked";U.AD_PROGRESS="ad-progress";U.AD_BUFFERING="ad-buffering";U.AD_IMPRESSION="ad-impression";U.AD_DURATION_CHANGED="ad-duration-changed";U.AD_CLOSED="ad-closed";
509
- U.AD_LOADED="ad-loaded";U.ALL_ADS_COMPLETED="all-ads-completed";U.AD_LINEAR_CHANGED="ad-linear-changed";U.AD_METADATA="ad-metadata";U.AD_RECOVERABLE_ERROR="ad-recoverable-error";U.AD_BREAK_READY="ad-break-ready";U.AD_INTERACTION="ad-interaction";Sk=function(){return new U};function Zm(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof O){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=r(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=r(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
510
- TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(Sh(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
511
- function $m(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=an(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
512
- function an(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
513
- var bn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),cn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),dn=["loop","playbackRate"],en=["pause","play"],fn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
514
- getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},gn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},hn=[["getConfiguration","configure"]],jn=[["isTextTrackVisible","setTextTrackVisibility"]],kn="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
515
- ln=["attach","detach","load","unload"];function mn(a,b,c,d,e,f){var g=this;this.I=a;this.j=new Q(b);this.R=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.N="";this.A=null;this.F=function(){return nn(g)};this.G=function(h,k){var l=$m(k);switch(l.type){case "event":var m=l.targetName;l=Oa(l.event);g.B(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.C&&(g.R(),g.C=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new P(l.severity,l.category,l.code);
516
- for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;on.add(this)}q=mn.prototype;q.destroy=function(){on["delete"](this);pn(this);qn&&rn(this);this.j&&(this.j.stop(),this.j=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.F=this.l=this.i=this.g=this.A=null;return Promise.resolve()};q.ra=function(){return this.h};q.td=function(){return this.N};
517
- q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.za();var a=new chrome.cast.SessionRequest(this.I);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(on),d=c.next();!d.done;d=c.next())sn(d.value,b)},function(b){for(var c=r(on),d=c.next();!d.done;d=c.next())d=d.value,tn="available"==b,d.j.za()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});tn&&this.j.S(un);(a=qn)&&a.status!=chrome.cast.SessionStatus.STOPPED?sn(this,
518
- a):qn=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=vn),window.__onGCastApiAvailable!=vn&&Sa("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.oe=function(a){this.A=a;this.h&&wn(this,{type:"appData",appData:this.A})};
519
- q.cast=function(a){var b=this;return M(function(c){if(!b.m)throw new P(1,8,8E3);if(!tn)throw new P(1,8,8001);if(b.h)throw new P(1,8,8002);b.l=new Pc;chrome.cast.requestSession(function(d){return xn(b,a,d)},function(d){return yn(b,d)});return z(c,b.l,0)})};function zn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return xn(a,b,c)},function(c){return yn(a,c)})}}q.Zb=function(){if(this.h){pn(this);if(qn){rn(this);try{qn.stop(function(){},function(){})}catch(a){}qn=null}nn(this)}};
520
- q.get=function(a,b){var c=this;if("video"==a){if(en.includes(b))return function(){return c.pf.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))}}else if("player"==a){if(gn[b]&&!this.get("player","isLive")())return function(){};if(kn.includes(b))return function(){return c.pf.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(ln.includes(b))return function(){return c.Rg.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(fn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
521
- q.set=function(a,b,c){this.g[a][b]=c;wn(this,{type:"set",targetName:a,property:b,value:c})};function xn(a,b,c){qn=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);nn(a);wn(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}function yn(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new P(2,8,c,b))}
522
- q.pf=function(a,b){wn(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};q.Rg=function(a,b){var c=Fa.apply(2,arguments),d=new Pc,e=this.J.toString();this.J++;this.i[e]=d;try{wn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function sn(a,b){var c=a.K();a.l=new Pc;a.C=!0;xn(a,c,b)}function rn(a){var b=qn;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
523
- function nn(a){var b=qn?"connected"==qn.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};pn(a)}a.h=b;a.N=b?qn.receiver.friendlyName:"";a.j.za()}function pn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function wn(a,b){var c=Zm(b),d=qn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Va)}catch(e){throw c=new P(2,8,8005,e),d=new O("error",(new Map).set("detail",c)),a.B("player",d),a.Zb(),c;}}var un=.02,tn=!1,qn=null,on=new Set;
524
- function vn(a){if(a){a=r(on);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function An(a,b,c){cb.call(this);var d=this;this.i=a;this.h=b;this.m=this.A=this.j=this.B=this.l=null;this.F=c;this.C=new Map;this.g=new mn(c,function(){return Bn(d)},function(){return Cn(d)},function(e,f){return Dn(d,e,f)},function(){return En(d)},function(){return Fn(d)});Gn(this)}u(An,cb);q=An.prototype;
525
- q.destroy=function(a){a&&this.g.Zb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.B=this.l=this.i=null;cb.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.ac=function(){return this.B};q.Le=function(){return this.g.m&&tn};q.ra=function(){return this.g.ra()};q.td=function(){return this.g.td()};
526
- q.cast=function(){var a=this,b;return M(function(c){return 1==c.g?(b=Fn(a),z(c,a.g.cast(b),2)):a.h?z(c,a.h.Ee(),0):c["return"]()})};q.oe=function(a){this.g.oe(a)};q.Af=function(){zn(this.g)};q.Zb=function(){this.g.Zb()};
527
- q.Pe=function(a){var b=this;return M(function(c){if(1==c.g){if(a==b.F)return c["return"]();b.F=a;b.g.Zb();return z(c,b.g.destroy(),2)}b.g=null;b.g=new mn(a,function(){return Bn(b)},function(){return Cn(b)},function(d,e){return Dn(b,d,e)},function(){return En(b)},function(){return Fn(b)});b.g.init();C(c)})};
528
- function Gn(a){a.g.init();a.m=new of;for(var b=r(bn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.ra()||(f=Oa(f),a.j.dispatchEvent(f))});for(var d in Mm)a.m.o(a.h,Mm[d],function(f){a.g.ra()||a.A.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.pc=e,Object.defineProperty(a.l,b.pc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Hn(a,f.pc)}}(b),set:function(f){return function(g){var h=f.pc;a.g.ra()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={pc:b.pc};a.B={};In(a,
529
- function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return Jn(a,f)}})});Kn(a);a.j=new cb;a.j.hd=a.l;a.A=new cb;a.A.hd=a.B}function Kn(a){var b=new Map;In(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.C.set(c,e):a.C.set(e,c)}else b.set(d,c)})}
530
- function In(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=r(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
531
- function Fn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Rd(),startTime:null};a.i.pause();for(var c=r(dn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=r(hn);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=r(jn);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function Bn(a){var b=new O("caststatuschanged");a.dispatchEvent(b)}
532
- function Cn(a){var b=new O(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
533
- function En(a){for(var b=r(hn),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=r(dn);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=r(dn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(jn);for(k=
534
- h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new O(Im,h);a.h.dispatchEvent(h)})}
535
- function Hn(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.ra()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ra()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
536
- function Jn(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Dc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.$c()};
537
- if("setVideoContainer"==b)return function(c){return a.h.xe(c)};if(a.g.ra()){if("getManifest"==b||"drmInfo"==b)return function(){Sa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Sa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ra()&&0==Object.keys(a.g.g.video).length&&fn[b]||!a.g.ra()?a.h[b].bind(a.h):a.g.get("player",b)}function Dn(a,b,c){a.g.ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}
538
- N("shaka.cast.CastProxy",An);An.prototype.changeReceiverId=An.prototype.Pe;An.prototype.forceDisconnect=An.prototype.Zb;An.prototype.suggestDisconnect=An.prototype.Af;An.prototype.setAppData=An.prototype.oe;An.prototype.cast=An.prototype.cast;An.prototype.receiverName=An.prototype.td;An.prototype.isCasting=An.prototype.ra;An.prototype.canCast=An.prototype.Le;An.prototype.getPlayer=An.prototype.ac;An.prototype.getVideo=An.prototype.Bb;An.prototype.destroy=An.prototype.destroy;function Ln(a,b,c,d){cb.call(this);var e=this;this.g=a;this.h=b;this.j=new of;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.A=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new Q(function(){Mn(e)});Nn(this)}u(Ln,cb);q=Ln.prototype;q.isConnected=function(){return this.H};q.Bg=function(){return this.A};q.Zg=function(a){this.i=a};q.Of=function(){this.i=null};
539
- q.$g=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Yg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Xg=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
510
+ U.AD_LOADED="ad-loaded";U.ALL_ADS_COMPLETED="all-ads-completed";U.AD_LINEAR_CHANGED="ad-linear-changed";U.AD_METADATA="ad-metadata";U.AD_RECOVERABLE_ERROR="ad-recoverable-error";U.AD_BREAK_READY="ad-break-ready";U.AD_INTERACTION="ad-interaction";Uk=function(){return new U};function an(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof O){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=r(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=r(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
511
+ TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(Uh(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
512
+ function bn(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=cn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
513
+ function cn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
514
+ var dn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),en="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),fn=["loop","playbackRate"],gn=["pause","play"],hn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
515
+ getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},jn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},kn=[["getConfiguration","configure"]],ln=[["isTextTrackVisible","setTextTrackVisibility"]],mn="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
516
+ nn=["attach","detach","load","unload"];function on(a,b,c,d,e,f){var g=this;this.I=a;this.j=new Q(b);this.R=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.N="";this.A=null;this.F=function(){return pn(g)};this.G=function(h,k){var l=bn(k);switch(l.type){case "event":var m=l.targetName;l=Oa(l.event);g.B(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.C&&(g.R(),g.C=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new P(l.severity,l.category,l.code);
517
+ for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;qn.add(this)}q=on.prototype;q.destroy=function(){qn["delete"](this);rn(this);sn&&tn(this);this.j&&(this.j.stop(),this.j=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.F=this.l=this.i=this.g=this.A=null;return Promise.resolve()};q.ra=function(){return this.h};q.td=function(){return this.N};
518
+ q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.za();var a=new chrome.cast.SessionRequest(this.I);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(qn),d=c.next();!d.done;d=c.next())un(d.value,b)},function(b){for(var c=r(qn),d=c.next();!d.done;d=c.next())d=d.value,vn="available"==b,d.j.za()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});vn&&this.j.S(wn);(a=sn)&&a.status!=chrome.cast.SessionStatus.STOPPED?un(this,
519
+ a):sn=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=xn),window.__onGCastApiAvailable!=xn&&Sa("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.pe=function(a){this.A=a;this.h&&yn(this,{type:"appData",appData:this.A})};
520
+ q.cast=function(a){var b=this;return M(function(c){if(!b.m)throw new P(1,8,8E3);if(!vn)throw new P(1,8,8001);if(b.h)throw new P(1,8,8002);b.l=new Pc;chrome.cast.requestSession(function(d){return zn(b,a,d)},function(d){return An(b,d)});return z(c,b.l,0)})};function Bn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return zn(a,b,c)},function(c){return An(a,c)})}}q.Zb=function(){if(this.h){rn(this);if(sn){tn(this);try{sn.stop(function(){},function(){})}catch(a){}sn=null}pn(this)}};
521
+ q.get=function(a,b){var c=this;if("video"==a){if(gn.includes(b))return function(){return c.qf.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))}}else if("player"==a){if(jn[b]&&!this.get("player","isLive")())return function(){};if(mn.includes(b))return function(){return c.qf.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(nn.includes(b))return function(){return c.Sg.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(hn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
522
+ q.set=function(a,b,c){this.g[a][b]=c;yn(this,{type:"set",targetName:a,property:b,value:c})};function zn(a,b,c){sn=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);pn(a);yn(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}function An(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new P(2,8,c,b))}
523
+ q.qf=function(a,b){yn(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};q.Sg=function(a,b){var c=Fa.apply(2,arguments),d=new Pc,e=this.J.toString();this.J++;this.i[e]=d;try{yn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function un(a,b){var c=a.K();a.l=new Pc;a.C=!0;zn(a,c,b)}function tn(a){var b=sn;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
524
+ function pn(a){var b=sn?"connected"==sn.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};rn(a)}a.h=b;a.N=b?sn.receiver.friendlyName:"";a.j.za()}function rn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function yn(a,b){var c=an(b),d=sn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Va)}catch(e){throw c=new P(2,8,8005,e),d=new O("error",(new Map).set("detail",c)),a.B("player",d),a.Zb(),c;}}var wn=.02,vn=!1,sn=null,qn=new Set;
525
+ function xn(a){if(a){a=r(qn);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Cn(a,b,c){cb.call(this);var d=this;this.i=a;this.h=b;this.m=this.A=this.j=this.B=this.l=null;this.F=c;this.C=new Map;this.g=new on(c,function(){return Dn(d)},function(){return En(d)},function(e,f){return Fn(d,e,f)},function(){return Gn(d)},function(){return Hn(d)});In(this)}u(Cn,cb);q=Cn.prototype;
526
+ q.destroy=function(a){a&&this.g.Zb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.B=this.l=this.i=null;cb.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.ac=function(){return this.B};q.Me=function(){return this.g.m&&vn};q.ra=function(){return this.g.ra()};q.td=function(){return this.g.td()};
527
+ q.cast=function(){var a=this,b;return M(function(c){return 1==c.g?(b=Hn(a),z(c,a.g.cast(b),2)):a.h?z(c,a.h.Fe(),0):c["return"]()})};q.pe=function(a){this.g.pe(a)};q.Bf=function(){Bn(this.g)};q.Zb=function(){this.g.Zb()};
528
+ q.Qe=function(a){var b=this;return M(function(c){if(1==c.g){if(a==b.F)return c["return"]();b.F=a;b.g.Zb();return z(c,b.g.destroy(),2)}b.g=null;b.g=new on(a,function(){return Dn(b)},function(){return En(b)},function(d,e){return Fn(b,d,e)},function(){return Gn(b)},function(){return Hn(b)});b.g.init();C(c)})};
529
+ function In(a){a.g.init();a.m=new qf;for(var b=r(dn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.ra()||(f=Oa(f),a.j.dispatchEvent(f))});for(var d in Om)a.m.o(a.h,Om[d],function(f){a.g.ra()||a.A.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.pc=e,Object.defineProperty(a.l,b.pc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Jn(a,f.pc)}}(b),set:function(f){return function(g){var h=f.pc;a.g.ra()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={pc:b.pc};a.B={};Kn(a,
530
+ function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return Ln(a,f)}})});Mn(a);a.j=new cb;a.j.hd=a.l;a.A=new cb;a.A.hd=a.B}function Mn(a){var b=new Map;Kn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.C.set(c,e):a.C.set(e,c)}else b.set(d,c)})}
531
+ function Kn(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=r(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
532
+ function Hn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Rd(),startTime:null};a.i.pause();for(var c=r(fn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=r(kn);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=r(ln);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function Dn(a){var b=new O("caststatuschanged");a.dispatchEvent(b)}
533
+ function En(a){var b=new O(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
534
+ function Gn(a){for(var b=r(kn),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=r(fn);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=r(fn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(ln);for(k=
535
+ h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new O(Km,h);a.h.dispatchEvent(h)})}
536
+ function Jn(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.ra()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ra()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
537
+ function Ln(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Dc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.$c()};
538
+ if("setVideoContainer"==b)return function(c){return a.h.ye(c)};if(a.g.ra()){if("getManifest"==b||"drmInfo"==b)return function(){Sa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Sa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ra()&&0==Object.keys(a.g.g.video).length&&hn[b]||!a.g.ra()?a.h[b].bind(a.h):a.g.get("player",b)}function Fn(a,b,c){a.g.ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}
539
+ N("shaka.cast.CastProxy",Cn);Cn.prototype.changeReceiverId=Cn.prototype.Qe;Cn.prototype.forceDisconnect=Cn.prototype.Zb;Cn.prototype.suggestDisconnect=Cn.prototype.Bf;Cn.prototype.setAppData=Cn.prototype.pe;Cn.prototype.cast=Cn.prototype.cast;Cn.prototype.receiverName=Cn.prototype.td;Cn.prototype.isCasting=Cn.prototype.ra;Cn.prototype.canCast=Cn.prototype.Me;Cn.prototype.getPlayer=Cn.prototype.ac;Cn.prototype.getVideo=Cn.prototype.Bb;Cn.prototype.destroy=Cn.prototype.destroy;function Nn(a,b,c,d){cb.call(this);var e=this;this.g=a;this.h=b;this.j=new qf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.A=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new Q(function(){On(e)});Pn(this)}u(Nn,cb);q=Nn.prototype;q.isConnected=function(){return this.H};q.Cg=function(){return this.A};q.$g=function(a){this.i=a};q.Pf=function(){this.i=null};
540
+ q.ah=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Zg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Yg=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
540
541
  q.destroy=function(){var a=this,b,c;return M(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.A=!0,a.l=null,a.B=null,cb.prototype.release.call(a),z(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();C(d)})};
541
- function Nn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return On(a)};b.onSenderDisconnected=function(){return On(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Pn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Pn(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return Qn(a,
542
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Rn(a,e)};b.start();b=r(bn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Sn(a,"video",e)});for(var d in Mm)a.j.o(a.h,Mm[d],function(e){return Sn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.re(3840,2160):a.h.re(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.A=
543
- !1;Tn(a)});a.j.o(a.g,"playing",function(){a.A=!1;Tn(a)});a.j.o(a.g,"pause",function(){Tn(a)});a.j.o(a.h,"unloading",function(){a.A=!0;Tn(a)});a.j.o(a.g,"ended",function(){(new Q(function(){a.g&&a.g.ended&&(a.A=!0,Tn(a))})).S(Un)})}function On(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Tn(a)}
544
- function Tn(a){var b;M(function(c){if(1==c.g)return z(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new O("caststatuschanged");a.dispatchEvent(b);Vn(a)||Wn(a);C(c)})}
545
- function Xn(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;M(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,E(v,5),z(v,a.h.load(b.manifest,b.startTime),7)):z(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=I(v),h=Im,k=(new Map).set("detail",g),l=new O(h,k),a.h&&a.h.dispatchEvent(l),v["return"]();case 3:if(!a.h)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)t=b.playerAfterLoad[p],
546
- a.h[p](t);a.g.autoplay=f;b.manifest&&(a.g.play(),Wn(a));C(v)}})}function Sn(a,b,c){a.h&&(Mn(a),Pn(a,{type:"event",targetName:b,event:c},a.l))}
547
- function Mn(a){a.I.S(Yn);for(var b={video:{},player:{}},c=r(cn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in gn)0==a.m%gn[e]&&(b.player[e]=a.h[e]());for(var f in fn)0==a.m%fn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.F&&(a.m+=1);Pn(a,{type:"update",update:b},a.l);Vn(a)}function Vn(a){return a.C&&(a.g.duration||a.h.T())?(Zn(a),a.C=!1,!0):!1}
548
- function Zn(a,b){var c={contentId:a.h.Rd(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Wn(a,void 0===b?0:b,c)}
549
- function Rn(a,b){var c=$m(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;Xn(a,c.initState,c.appData);Mn(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
550
- c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.J[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return $n(a,h,g,null)},function(k){return $n(a,h,g,k)})}}
551
- function Qn(a,b){var c=$m(b.data);switch(c.type){case "PLAY":a.g.play();Wn(a);break;case "PAUSE":a.g.pause();Wn(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),Wn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),Wn(a));break;case "STOP":a.h.Ee().then(function(){a.h&&Wn(a)});break;case "GET_STATUS":Zn(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
552
- null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||Wn(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;d=c.media;e=c.currentTime;f=a.K(d.contentId);g=c.autoplay||!0;a.G(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&Zn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Pn(a,{requestId:Number(c.requestId),type:k},a.B)});break;default:Pn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
553
- function $n(a,b,c,d){a.h&&Pn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Pn(a,b,c,d){a.H&&(a=Zm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Wn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?ao:a.h.Ic()?bo:a.g.paused?co:eo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Pn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
554
- N("shaka.cast.CastReceiver",Ln);Ln.prototype.destroy=Ln.prototype.destroy;Ln.prototype.setContentArtist=Ln.prototype.Xg;Ln.prototype.setContentImage=Ln.prototype.Yg;Ln.prototype.setContentTitle=Ln.prototype.$g;Ln.prototype.clearContentMetadata=Ln.prototype.Of;Ln.prototype.setContentMetadata=Ln.prototype.Zg;Ln.prototype.isIdle=Ln.prototype.Bg;Ln.prototype.isConnected=Ln.prototype.isConnected;var Yn=.5,Un=5,ao="IDLE",eo="PLAYING",bo="BUFFERING",co="PAUSED";function fo(a){var b=this;this.g=[];this.h=[];this.data=[];(new tg).box("moov",xg).X("pssh",function(c){if(!(1<c.version)){var d=Ic(c.reader.U,-12,c.size);b.data.push(d);b.g.push(dd(c.reader.Cb(16)));if(0<c.version){d=c.reader.P();for(var e=0;e<d;e++){var f=dd(c.reader.Cb(16));b.h.push(f)}}}}).parse(a)}
555
- function go(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Lc(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function ho(a){if(!a)return a;var b=new fo(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={Qc:c.Qc},d=b.next())c.Qc=d.value,a.some(function(e){return function(f){return Gc(f,e.Qc)}}(c))||a.push(c.Qc);return ed.apply(Zc,ia(a))};function io(a,b){var c=jo(a,b);return 1!=c.length?null:c[0]}function ko(a,b,c){a=lo(a,b,c);return 1!=a.length?null:a[0]}function jo(a,b){for(var c=[],d=r(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function mo(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
556
- function lo(a,b,c){var d=[];a=r(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function no(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function oo(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function po(a){return Array.from(a.childNodes).every(qo)?a.textContent.trim():null}
557
- function qo(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function ro(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function so(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}
558
- function to(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
559
- function uo(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function vo(a){a=Number(a);return 0===a%1?a:null}function wo(a){a=Number(a);return 0===a%1&&0<a?a:null}function xo(a){a=Number(a);return 0===a%1&&0<=a?a:null}function yo(a){a=Number(a);return isNaN(a)?null:a}function zo(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
560
- function Ao(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function Bo(a,b){try{var c=Tc(a);return Ao(c,b)}catch(d){return null}};function Co(a,b,c){var d=Do(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new P(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.tf?(e=h.init||e,!1):!0}),f.length&&(a=Eo(e,f,c),0==a.length&&(a=[Ib("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Ib(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
561
- r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Te:g,Fi:e,drmInfos:a,Xe:!0}}function Fo(a,b,c,d){var e=Co(a,c,d);if(b.Xe){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.Xe=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new P(2,4,4008);return e.Te||b.Te}
562
- function Go(a){var b=0,c=Lc(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Ic(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
563
- function Ho(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function Io(a){a=ko(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=bd(a.textContent);a=Go(a).filter(function(b){return b.type===Jo})[0];if(!a)return"";a=Uc(a.value,!0);return(a=Ao(a,"WRMHEADER"))?Ho(a):""}
564
- function Eo(a,b,c){var d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.tf];if(f){var g;if(g=ko(e.node,"urn:microsoft:playready","pro")){g=bd(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:go(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=Ib(f,e.init||a||g);if(f=Ko.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
565
- function Do(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=Lo(c.value))&&b.push(c);return b}
566
- function Lo(a){var b=a.getAttribute("schemeIdUri"),c=no(a,"urn:mpeg:cenc:2013","default_KID"),d=lo(a,"urn:mpeg:cenc:2013","pssh").map(po);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new P(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:bd(f),keyId:null}})}catch(f){throw new P(2,4,4007);}return{node:a,tf:b,keyId:c,init:0<e.length?e:null}}
567
- var Jo=1,Ko=(new Map).set("com.widevine.alpha",function(a){return(a=ko(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Io).set("com.microsoft.playready.recommendation",Io).set("com.microsoft.playready.software",Io).set("com.microsoft.playready.hardware",Io);function Mo(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
542
+ function Pn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Qn(a)};b.onSenderDisconnected=function(){return Qn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Rn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Rn(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return Sn(a,
543
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Tn(a,e)};b.start();b=r(dn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Un(a,"video",e)});for(var d in Om)a.j.o(a.h,Om[d],function(e){return Un(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.se(3840,2160):a.h.se(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.A=
544
+ !1;Vn(a)});a.j.o(a.g,"playing",function(){a.A=!1;Vn(a)});a.j.o(a.g,"pause",function(){Vn(a)});a.j.o(a.h,"unloading",function(){a.A=!0;Vn(a)});a.j.o(a.g,"ended",function(){(new Q(function(){a.g&&a.g.ended&&(a.A=!0,Vn(a))})).S(Wn)})}function Qn(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Vn(a)}
545
+ function Vn(a){var b;M(function(c){if(1==c.g)return z(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new O("caststatuschanged");a.dispatchEvent(b);Xn(a)||Yn(a);C(c)})}
546
+ function Zn(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;M(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,E(v,5),z(v,a.h.load(b.manifest,b.startTime),7)):z(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=I(v),h=Km,k=(new Map).set("detail",g),l=new O(h,k),a.h&&a.h.dispatchEvent(l),v["return"]();case 3:if(!a.h)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)t=b.playerAfterLoad[p],
547
+ a.h[p](t);a.g.autoplay=f;b.manifest&&(a.g.play(),Yn(a));C(v)}})}function Un(a,b,c){a.h&&(On(a),Rn(a,{type:"event",targetName:b,event:c},a.l))}
548
+ function On(a){a.I.S($n);for(var b={video:{},player:{}},c=r(en),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in jn)0==a.m%jn[e]&&(b.player[e]=a.h[e]());for(var f in hn)0==a.m%hn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.F&&(a.m+=1);Rn(a,{type:"update",update:b},a.l);Xn(a)}function Xn(a){return a.C&&(a.g.duration||a.h.T())?(ao(a),a.C=!1,!0):!1}
549
+ function ao(a,b){var c={contentId:a.h.Rd(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Yn(a,void 0===b?0:b,c)}
550
+ function Tn(a,b){var c=bn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;Zn(a,c.initState,c.appData);On(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
551
+ c.methodName;"player"==d&&"load"==e&&(a.m=0,a.F=!1);var g=c.id,h=b.senderId;f=a.J[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return bo(a,h,g,null)},function(k){return bo(a,h,g,k)})}}
552
+ function Sn(a,b){var c=bn(b.data);switch(c.type){case "PLAY":a.g.play();Yn(a);break;case "PAUSE":a.g.pause();Yn(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),Yn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),Yn(a));break;case "STOP":a.h.Fe().then(function(){a.h&&Yn(a)});break;case "GET_STATUS":ao(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
553
+ null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||Yn(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;d=c.media;e=c.currentTime;f=a.K(d.contentId);g=c.autoplay||!0;a.G(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&ao(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Rn(a,{requestId:Number(c.requestId),type:k},a.B)});break;default:Rn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
554
+ function bo(a,b,c,d){a.h&&Rn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Rn(a,b,c,d){a.H&&(a=an(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Yn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?co:a.h.Ic()?eo:a.g.paused?fo:go,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Rn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
555
+ N("shaka.cast.CastReceiver",Nn);Nn.prototype.destroy=Nn.prototype.destroy;Nn.prototype.setContentArtist=Nn.prototype.Yg;Nn.prototype.setContentImage=Nn.prototype.Zg;Nn.prototype.setContentTitle=Nn.prototype.ah;Nn.prototype.clearContentMetadata=Nn.prototype.Pf;Nn.prototype.setContentMetadata=Nn.prototype.$g;Nn.prototype.isIdle=Nn.prototype.Cg;Nn.prototype.isConnected=Nn.prototype.isConnected;var $n=.5,Wn=5,co="IDLE",go="PLAYING",eo="BUFFERING",fo="PAUSED";function ho(a){var b=this;this.g=[];this.h=[];this.data=[];(new vg).box("moov",zg).X("pssh",function(c){if(!(1<c.version)){var d=Ic(c.reader.U,-12,c.size);b.data.push(d);b.g.push(rd(c.reader.Cb(16)));if(0<c.version){d=c.reader.P();for(var e=0;e<d;e++){var f=rd(c.reader.Cb(16));b.h.push(f)}}}}).parse(a)}
556
+ function io(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=Lc(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function jo(a){if(!a)return a;var b=new ho(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={Qc:c.Qc},d=b.next())c.Qc=d.value,a.some(function(e){return function(f){return Gc(f,e.Qc)}}(c))||a.push(c.Qc);return sd.apply(md,ia(a))};function ko(a,b){var c=lo(a,b);return 1!=c.length?null:c[0]}function mo(a,b,c){a=no(a,b,c);return 1!=a.length?null:a[0]}function lo(a,b){for(var c=[],d=r(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function oo(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
557
+ function no(a,b,c){var d=[];a=r(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function po(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function qo(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function ro(a){return Array.from(a.childNodes).every(so)?a.textContent.trim():null}
558
+ function so(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function to(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function uo(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}
559
+ function vo(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
560
+ function wo(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function xo(a){a=Number(a);return 0===a%1?a:null}function yo(a){a=Number(a);return 0===a%1&&0<a?a:null}function zo(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Ao(a){a=Number(a);return isNaN(a)?null:a}function Bo(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
561
+ function Co(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function Do(a,b){try{var c=fd(a);return Co(c,b)}catch(d){return null}};function Eo(a,b,c){var d=Fo(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new P(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.uf?(e=h.init||e,!1):!0}),f.length&&(a=Go(e,f,c),0==a.length&&(a=[Ib("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Ib(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
562
+ r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Ue:g,Gi:e,drmInfos:a,Ye:!0}}function Ho(a,b,c,d){var e=Eo(a,c,d);if(b.Ye){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.Ye=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new P(2,4,4008);return e.Ue||b.Ue}
563
+ function Io(a){var b=0,c=Lc(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Ic(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
564
+ function Jo(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function Ko(a){a=mo(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=pd(a.textContent);a=Io(a).filter(function(b){return b.type===Lo})[0];if(!a)return"";a=hd(a.value,!0);return(a=Co(a,"WRMHEADER"))?Jo(a):""}
565
+ function Go(a,b,c){var d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.uf];if(f){var g;if(g=mo(e.node,"urn:microsoft:playready","pro")){g=pd(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:io(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=Ib(f,e.init||a||g);if(f=Mo.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
566
+ function Fo(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=No(c.value))&&b.push(c);return b}
567
+ function No(a){var b=a.getAttribute("schemeIdUri"),c=po(a,"urn:mpeg:cenc:2013","default_KID"),d=no(a,"urn:mpeg:cenc:2013","pssh").map(ro);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new P(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:pd(f),keyId:null}})}catch(f){throw new P(2,4,4007);}return{node:a,uf:b,keyId:c,init:0<e.length?e:null}}
568
+ var Lo=1,Mo=(new Map).set("com.widevine.alpha",function(a){return(a=mo(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Ko).set("com.microsoft.playready.recommendation",Ko).set("com.microsoft.playready.software",Ko).set("com.microsoft.playready.hardware",Ko);function Oo(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
568
569
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
569
- function No(a,b){var c=Oo(a,b,"timescale"),d=1;c&&(d=wo(c)||1);var e=Oo(a,b,"duration");c=wo(e||"");"image"==a.L.contentType&&(c=yo(e||""));c&&(c/=d);var f=Oo(a,b,"startNumber");e=Number(Oo(a,b,"presentationTimeOffset"))||0;var g=xo(f||"");if(null==f||null==g)g=1;var h=Po(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.Y.duration||Infinity;h=jo(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],t=h[n+1],v=ro(p,"t",xo),y=ro(p,"d",xo);p=ro(p,"r",vo);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
570
- p||0;if(0>p)if(t){t=ro(t,"t",xo);if(null==t)break;else if(v>=t)break;p=Math.ceil((t-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(t=0;t<=p;++t)m=v+y,l.push({start:v/f,end:m/f,fh:v}),v=m}f=l}return{timescale:d,ya:c,mc:g,sb:e/d||0,Fe:e,timeline:f}}function Oo(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Fb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
571
- function Po(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Fb).map(function(d){return io(d,c)}).reduce(function(d,e){return d||e})}
572
- function Qo(a,b,c,d,e,f){for(var g=no(a,"http://www.w3.org/1999/xlink","href"),h=no(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Re(new P(2,4,4028));if("onLoad"!=h)return Re(new P(2,4,4027));var m=Hb([d],[g]);return e.request(0,ef(m,b)).qa(function(n){n=Bo(n.data,a.tagName);if(!n)return Re(new P(2,4,4001,g));
573
- for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return Ro(a,b,c,m[0],e,f+1)})}
574
- function Ro(a,b,c,d,e,f){f=void 0===f?0:f;if(no(a,"http://www.w3.org/1999/xlink","href")){var g=Qo(a,b,c,d,e,f);c&&(g=g.qa(void 0,function(){return Ro(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==no(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Ro(k,b,c,d,e,f)));return Ve(g).qa(function(){return a})};function So(a,b,c,d,e,f,g){var h,k=(new tg).X("sidx",function(l){h=To(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new P(2,3,3004);}
575
- function To(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.P();if(0==k)throw new P(2,3,3005);if(0==g.version){var l=g.reader.P();var m=g.reader.P()}else l=g.reader.lc(),m=g.reader.lc();g.reader.skip(2);var n=g.reader.kc();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.P(),t=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.P();g.reader.skip(4);if(1==t)throw new P(2,3,3006);h.push(new qi(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function Uo(a){this.h=Lc(a);this.g=new qg(this.h,0)}Uo.prototype.Ea=function(){return this.g.Ea()};
576
- function Vo(a){var b=Wo(a);if(7<b.length)throw new P(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Wo(a);a:{d=r(Xo);for(var e=d.next();!e.done;e=d.next())if(Gc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ia();else{if(8==b.length&&b[1]&224)throw new P(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.ia()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ia();d=Lc(a.h,a.g.ia(),b);a.g.skip(b);return new Yo(c,
577
- d)}function Wo(a){var b=a.g.ia(),c=a.g.ka();if(0==c)throw new P(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ic(a.h,b,c)}var Xo=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function Yo(a,b){this.id=a;this.g=b}
578
- function Zo(a){if(8<a.g.byteLength)throw new P(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new P(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function $o(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Uo(a.g);for(var n=null,p=null;a.Ea();){var t=Vo(a);if(187==t.id){var v=ap(t);v&&(t=c*v.gh,v=b+v.Qg,null!=n&&m.push(new qi(n+g,t+g,l,p,v-1,f,g,h,k)),n=t,p=v)}}null!=n&&m.push(new qi(n+g,d+g,l,p,null,f,g,h,k));return m}
579
- function ap(a){var b=new Uo(a.g);a=Vo(b);if(179!=a.id)throw new P(2,3,3013);a=Zo(a);b=Vo(b);if(183!=b.id)throw new P(2,3,3012);b=new Uo(b.g);for(var c=0;b.Ea();){var d=Vo(b);if(241==d.id){c=Zo(d);break}}return{gh:a,Qg:c}};function bp(a,b){var c=Po(a,b,"Initialization");if(!c)return null;var d=a.L.Pa,e=c.getAttribute("sourceURL");e&&(d=Hb(a.L.Pa,[e]));e=0;var f=null;if(c=ro(c,"range",uo))e=c.start,f=c.end;return new oi(function(){return d},e,f,cp(a))}
580
- function dp(a,b){var c=Number(Oo(a,ep,"presentationTimeOffset"))||0,d=Oo(a,ep,"timescale"),e=1;d&&(e=wo(d)||1);var f=c/e||0,g=bp(a,ep);fp(a,g);var h=Ye(a);return{$b:function(){var k=Po(h,ep,"RepresentationIndex"),l=h.L.Pa;k&&(k=k.getAttribute("sourceURL"))&&(l=Hb(h.L.Pa,[k]));k=gp(h);return hp(h,b,g,l,k.start,k.end,f)}}}
581
- function hp(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,y,w,x,D,B,A,F;return M(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.xb||!a.Y.jf,l=a.Y.start,m=a.Y.duration,n=a.L.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.Ka(),c.Ha,c.wa):null],p=null,z(G,Promise.all(v),2);y=G.h;w=y[0];x=y[1]||null;D=null;B=l-g;A=l;F=m?l+m:Infinity;if("mp4"==n)var H=So(w,e,d,c,B,A,F);else{H=new Uo(x);if(440786851!=Vo(H).id)throw new P(2,3,3008);var K=Vo(H);if(408125543!=K.id)throw new P(2,3,3009);H=K.g.byteOffset;
582
- K=new Uo(K.g);for(var J=null;K.Ea();){var L=Vo(K);if(357149030==L.id){J=L;break}}if(!J)throw new P(2,3,3010);J=new Uo(J.g);L=1E6;for(K=null;J.Ea();){var W=Vo(J);if(2807729==W.id)L=Zo(W);else if(17545==W.id)if(4==W.g.byteLength)K=W.g.getFloat32(0);else if(8==W.g.byteLength)K=W.g.getFloat64(0);else throw new P(2,3,3003);}if(null==K)throw new P(2,3,3011);J=L/1E9;K*=J;L=Vo(new Uo(w));if(475249515!=L.id)throw new P(2,3,3007);H=$o(L,H,J,K,d,c,B,A,F)}D=H;h.hc(D);t=new Ni(D);k&&t.yb(A,F,!0);return G["return"](t)})}
583
- function ep(a){return a.Mc}function gp(a){var b=Po(a,ep,"RepresentationIndex");a=Oo(a,ep,"indexRange");a=uo(a||"");b&&(a=ro(b,"range",uo,a));return a}function fp(a,b){ip(a,b);if(!gp(a))throw new P(2,4,4002);}function ip(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Mb&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
584
- function cp(a){var b=a.L;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.md,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function jp(a,b){var c=bp(a,kp),d=lp(a);if(!d.ya&&!d.timeline&&1<d.dc.length)throw new P(2,4,4002);if(!d.ya&&!a.Y.duration&&!d.timeline&&1==d.dc.length)throw new P(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new P(2,4,4002);var e=null,f=null;a.sa.id&&a.L.id&&(f=b[a.sa.id+","+a.L.id])&&(e=f.segmentIndex);var g=mp(a.Y.start,a.Y.duration,a.L.Pa,d,c);c=!e;e?e.fc(g,a.presentationTimeline.ob()):e=new Ni(g);a.presentationTimeline.hc(g);a.xb&&a.Y.jf||e.yb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
585
- Infinity,c);f&&(f.segmentIndex=e);return{$b:function(){e&&0!=e.O.length||e.ec(g);return Promise.resolve(e)}}}function kp(a){return a.Db}function lp(a){var b=np(a);a=No(a,kp);var c=a.mc;0==c&&(c=1);var d=0;a.ya?d=a.ya*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ya:a.ya,startTime:d,mc:c,sb:a.sb,timeline:a.timeline,dc:b}}
586
- function mp(a,b,c,d,e){var f=d.dc.length;d.timeline&&d.timeline.length!=d.dc.length&&(f=Math.min(d.timeline.length,d.dc.length));for(var g=a-d.sb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Gd:m.Gd},n++){var p=d.dc[n];m.Gd=Hb(c,[p.Hg]);var t=void 0;t=null!=d.ya?l+d.ya:d.timeline?d.timeline[n].end:l+b;k.push(new qi(a+l,a+t,function(v){return function(){return v.Gd}}(m),p.start,p.end,e,g,a,h));l=t}return k}
587
- function np(a){return[a.L.Db,a.Ca.Db,a.sa.Db].filter(Fb).map(function(b){return jo(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.ef&&(a.ef=!0);var c=b.getAttribute("media");b=ro(b,"mediaRange",uo,{start:0,end:null});return{Hg:c,start:b.start,end:b.end}})};function wp(a,b,c,d,e,f){var g=xp(a),h=yp(a);zp(h);var k=Ye(a);if(h.Hc)return ip(a,g),{$b:function(){var t=Mo(h.Hc,k.L.id,null,k.bandwidth||null,null);t=Hb(k.L.Pa,[t]);return hp(k,b,g,t,0,null,h.sb)}};if(h.ya)return d||(a.presentationTimeline.Zd(h.ya),a.presentationTimeline.$d(a.Y.start)),{$b:function(){return Ap(k,h,e,g,f)}};var l=null;d=d=null;a.sa.id&&a.L.id&&(d=a.sa.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Bp(k,h,g);c=a.Y.start;var n=a.Y.duration?a.Y.start+a.Y.duration:Infinity,p=Infinity!=
588
- n;l?(p&&(new Ni(m)).yb(c,n,!0),l.fc(m,a.presentationTimeline.ob())):l=new Ni(m);a.presentationTimeline.hc(m);p&&l.yb(c,n);d&&a.xb&&(d.segmentIndex=l);return{$b:function(){l&&0!=l.O.length||l.ec(m);return Promise.resolve(l)}}}function Cp(a){return a.Nc}function yp(a){var b=No(a,Cp),c=Oo(a,Cp,"media");a=Oo(a,Cp,"index");return{ya:b.ya,timescale:b.timescale,mc:b.mc,sb:b.sb,Fe:b.Fe,timeline:b.timeline,Yd:c,Hc:a}}
589
- function zp(a){var b=a.Hc?1:0;b+=a.timeline?1:0;b+=a.ya?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.Hc&&(a.timeline=null),a.ya=null);if(!a.Hc&&!a.Yd)throw new P(2,4,4002);}
590
- function Ap(a,b,c,d,e){function f(J){var L=(J-t)*p,W=L+b.sb,Z=L+l;L=Z+p;var ka=Math.min(L,h());Z=new qi(Z,ka,function(){var ja=Mo(y,x,J,w,W*v);return Hb(D,[ja])},0,null,d,B,l,h());Z.l=L;return Z}function g(){var J=[Math.max(k.ob(),l),Math.min(k.Jb(),h())].map(function(L){return L-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(L){return L+t})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.sa.id,n=a.Y.duration,p=b.ya,t=b.mc,v=b.timescale,
591
- y=b.Yd,w=a.bandwidth||null,x=a.L.id,D=a.L.Pa,B=l-b.sb,A=g();a=a.xb?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var F=a;F<=A;++F){var G=f(F);c.push(G)}var H=new Ni(c);c=k.Jb()<h();F=k.T();if(c||F){var K=Math.max(a,A+1);H.wd(p,function(){var J=k.ob();H.Gb(J);var L=r(g());L.next();L=L.next().value;for(var W=[];K<=L;){var Z=f(K);W.push(Z);K++}return J>h()&&!W.length?null:W})}return Promise.resolve(H)}
592
- function Bp(a,b,c){var d=a.Y.start,e=a.Y.duration,f=d-b.sb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Fd:h.Fd,Jd:h.Jd,Md:h.Md,Cd:h.Cd,Od:h.Od,Dd:h.Dd},k++){var l=b.timeline[k],m=l.start,n=l.fh;l=l.end;h.Md=k+b.mc;h.Od=n+b.Fe;h.Jd=a.L.id;h.Cd=a.bandwidth||null;h.Fd=b.Yd;h.Dd=a.L.Pa;g.push(new qi(d+m,d+l,function(p){return function(){var t=Mo(p.Fd,p.Jd,p.Md,p.Cd||null,p.Od);return Hb(p.Dd,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
593
- function xp(a){var b=Oo(a,Cp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Pa;return new oi(function(){var f=Mo(b,c,null,d,null);return Hb(e,[f])},0,null,cp(a))};function Dp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Dp.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
594
- function Ep(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia;return M(function(Ma){switch(Ma.g){case 1:d=Nb;Fp(b);Gp(b);Hp(b);Ip(b);if(!c&&1==b.length){e=b[0];a.g=e.Wc;a.h=e.yd;a.j=e.textStreams;a.i=e.imageStreams;Ma.D(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Ma["return"]();k=b.map(function(Da){return Da.Wc});l=b.map(function(Da){return Da.yd});m=b.map(function(Da){return Da.textStreams});n=b.map(function(Da){return Da.imageStreams});
595
- p=r(m);for(t=p.next();!t.done;t=p.next())v=t.value,v.push(Jp(d.oa));y=r(n);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(Jp(d.wc));return z(Ma,Kp(a.g,k,f,Lp,Mp),3);case 3:return z(Ma,Kp(a.h,l,f,Lp,Mp),4);case 4:return z(Ma,Kp(a.j,m,f,Lp,Mp),5);case 5:return z(Ma,Kp(a.i,n,f,Lp,Mp),2);case 2:D=0;B=[];if(a.h.length&&a.g.length)for(J=r(a.g),L=J.next();!L.done;L=J.next())for(W=L.value,Z=r(a.h),ka=Z.next();!ka.done;ka=Z.next())ja=ka.value,ea=ig(W.drmInfos,ja.drmInfos),W.drmInfos.length&&ja.drmInfos.length&&
570
+ function Po(a,b){var c=Qo(a,b,"timescale"),d=1;c&&(d=yo(c)||1);var e=Qo(a,b,"duration");c=yo(e||"");"image"==a.L.contentType&&(c=Ao(e||""));c&&(c/=d);var f=Qo(a,b,"startNumber");e=Number(Qo(a,b,"presentationTimeOffset"))||0;var g=zo(f||"");if(null==f||null==g)g=1;var h=Ro(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.Y.duration||Infinity;h=lo(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],t=h[n+1],v=to(p,"t",zo),y=to(p,"d",zo);p=to(p,"r",xo);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
571
+ p||0;if(0>p)if(t){t=to(t,"t",zo);if(null==t)break;else if(v>=t)break;p=Math.ceil((t-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(t=0;t<=p;++t)m=v+y,l.push({start:v/f,end:m/f,gh:v}),v=m}f=l}return{timescale:d,ya:c,mc:g,sb:e/d||0,Ge:e,timeline:f}}function Qo(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Fb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
572
+ function Ro(a,b,c){return[b(a.L),b(a.Ca),b(a.sa)].filter(Fb).map(function(d){return ko(d,c)}).reduce(function(d,e){return d||e})}
573
+ function So(a,b,c,d,e,f){for(var g=po(a,"http://www.w3.org/1999/xlink","href"),h=po(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Te(new P(2,4,4028));if("onLoad"!=h)return Te(new P(2,4,4027));var m=Hb([d],[g]);return e.request(0,gf(m,b)).qa(function(n){n=Do(n.data,a.tagName);if(!n)return Te(new P(2,4,4001,g));
574
+ for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return To(a,b,c,m[0],e,f+1)})}
575
+ function To(a,b,c,d,e,f){f=void 0===f?0:f;if(po(a,"http://www.w3.org/1999/xlink","href")){var g=So(a,b,c,d,e,f);c&&(g=g.qa(void 0,function(){return To(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==po(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(To(k,b,c,d,e,f)));return Xe(g).qa(function(){return a})};function Uo(a,b,c,d,e,f,g){var h,k=(new vg).X("sidx",function(l){h=Vo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new P(2,3,3004);}
576
+ function Vo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.P();if(0==k)throw new P(2,3,3005);if(0==g.version){var l=g.reader.P();var m=g.reader.P()}else l=g.reader.lc(),m=g.reader.lc();g.reader.skip(2);var n=g.reader.kc();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.P(),t=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.P();g.reader.skip(4);if(1==t)throw new P(2,3,3006);h.push(new si(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function Wo(a){this.h=Lc(a);this.g=new sg(this.h,0)}Wo.prototype.Ea=function(){return this.g.Ea()};
577
+ function Xo(a){var b=Yo(a);if(7<b.length)throw new P(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Yo(a);a:{d=r(Zo);for(var e=d.next();!e.done;e=d.next())if(Gc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ia();else{if(8==b.length&&b[1]&224)throw new P(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.ia()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ia();d=Lc(a.h,a.g.ia(),b);a.g.skip(b);return new $o(c,
578
+ d)}function Yo(a){var b=a.g.ia(),c=a.g.ka();if(0==c)throw new P(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ic(a.h,b,c)}var Zo=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function $o(a,b){this.id=a;this.g=b}
579
+ function ap(a){if(8<a.g.byteLength)throw new P(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new P(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function bp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Wo(a.g);for(var n=null,p=null;a.Ea();){var t=Xo(a);if(187==t.id){var v=cp(t);v&&(t=c*v.hh,v=b+v.Rg,null!=n&&m.push(new si(n+g,t+g,l,p,v-1,f,g,h,k)),n=t,p=v)}}null!=n&&m.push(new si(n+g,d+g,l,p,null,f,g,h,k));return m}
580
+ function cp(a){var b=new Wo(a.g);a=Xo(b);if(179!=a.id)throw new P(2,3,3013);a=ap(a);b=Xo(b);if(183!=b.id)throw new P(2,3,3012);b=new Wo(b.g);for(var c=0;b.Ea();){var d=Xo(b);if(241==d.id){c=ap(d);break}}return{hh:a,Rg:c}};function dp(a,b){var c=Ro(a,b,"Initialization");if(!c)return null;var d=a.L.Pa,e=c.getAttribute("sourceURL");e&&(d=Hb(a.L.Pa,[e]));e=0;var f=null;if(c=to(c,"range",wo))e=c.start,f=c.end;return new qi(function(){return d},e,f,ep(a))}
581
+ function fp(a,b){var c=Number(Qo(a,gp,"presentationTimeOffset"))||0,d=Qo(a,gp,"timescale"),e=1;d&&(e=yo(d)||1);var f=c/e||0,g=dp(a,gp);hp(a,g);var h=$e(a);return{$b:function(){var k=Ro(h,gp,"RepresentationIndex"),l=h.L.Pa;k&&(k=k.getAttribute("sourceURL"))&&(l=Hb(h.L.Pa,[k]));k=ip(h);return jp(h,b,g,l,k.start,k.end,f)}}}
582
+ function jp(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,y,w,x,D,B,A,F;return M(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.xb||!a.Y.kf,l=a.Y.start,m=a.Y.duration,n=a.L.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.Ka(),c.Ha,c.wa):null],p=null,z(G,Promise.all(v),2);y=G.h;w=y[0];x=y[1]||null;D=null;B=l-g;A=l;F=m?l+m:Infinity;if("mp4"==n)var H=Uo(w,e,d,c,B,A,F);else{H=new Wo(x);if(440786851!=Xo(H).id)throw new P(2,3,3008);var K=Xo(H);if(408125543!=K.id)throw new P(2,3,3009);H=K.g.byteOffset;
583
+ K=new Wo(K.g);for(var J=null;K.Ea();){var L=Xo(K);if(357149030==L.id){J=L;break}}if(!J)throw new P(2,3,3010);J=new Wo(J.g);L=1E6;for(K=null;J.Ea();){var W=Xo(J);if(2807729==W.id)L=ap(W);else if(17545==W.id)if(4==W.g.byteLength)K=W.g.getFloat32(0);else if(8==W.g.byteLength)K=W.g.getFloat64(0);else throw new P(2,3,3003);}if(null==K)throw new P(2,3,3011);J=L/1E9;K*=J;L=Xo(new Wo(w));if(475249515!=L.id)throw new P(2,3,3007);H=bp(L,H,J,K,d,c,B,A,F)}D=H;h.hc(D);t=new Pi(D);k&&t.yb(A,F,!0);return G["return"](t)})}
584
+ function gp(a){return a.Mc}function ip(a){var b=Ro(a,gp,"RepresentationIndex");a=Qo(a,gp,"indexRange");a=wo(a||"");b&&(a=to(b,"range",wo,a));return a}function hp(a,b){kp(a,b);if(!ip(a))throw new P(2,4,4002);}function kp(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Mb&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
585
+ function ep(a){var b=a.L;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.md,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function lp(a,b){var c=dp(a,mp),d=np(a);if(!d.ya&&!d.timeline&&1<d.dc.length)throw new P(2,4,4002);if(!d.ya&&!a.Y.duration&&!d.timeline&&1==d.dc.length)throw new P(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new P(2,4,4002);var e=null,f=null;a.sa.id&&a.L.id&&(f=b[a.sa.id+","+a.L.id])&&(e=f.segmentIndex);var g=op(a.Y.start,a.Y.duration,a.L.Pa,d,c);c=!e;e?e.fc(g,a.presentationTimeline.ob()):e=new Pi(g);a.presentationTimeline.hc(g);a.xb&&a.Y.kf||e.yb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
586
+ Infinity,c);f&&(f.segmentIndex=e);return{$b:function(){e&&0!=e.O.length||e.ec(g);return Promise.resolve(e)}}}function mp(a){return a.Db}function np(a){var b=xp(a);a=Po(a,mp);var c=a.mc;0==c&&(c=1);var d=0;a.ya?d=a.ya*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ya:a.ya,startTime:d,mc:c,sb:a.sb,timeline:a.timeline,dc:b}}
587
+ function op(a,b,c,d,e){var f=d.dc.length;d.timeline&&d.timeline.length!=d.dc.length&&(f=Math.min(d.timeline.length,d.dc.length));for(var g=a-d.sb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Gd:m.Gd},n++){var p=d.dc[n];m.Gd=Hb(c,[p.Ig]);var t=void 0;t=null!=d.ya?l+d.ya:d.timeline?d.timeline[n].end:l+b;k.push(new si(a+l,a+t,function(v){return function(){return v.Gd}}(m),p.start,p.end,e,g,a,h));l=t}return k}
588
+ function xp(a){return[a.L.Db,a.Ca.Db,a.sa.Db].filter(Fb).map(function(b){return lo(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.gf&&(a.gf=!0);var c=b.getAttribute("media");b=to(b,"mediaRange",wo,{start:0,end:null});return{Ig:c,start:b.start,end:b.end}})};function yp(a,b,c,d,e,f){var g=zp(a),h=Ap(a);Bp(h);var k=$e(a);if(h.Hc)return kp(a,g),{$b:function(){var t=Oo(h.Hc,k.L.id,null,k.bandwidth||null,null);t=Hb(k.L.Pa,[t]);return jp(k,b,g,t,0,null,h.sb)}};if(h.ya)return d||(a.presentationTimeline.$d(h.ya),a.presentationTimeline.ae(a.Y.start)),{$b:function(){return Cp(k,h,e,g,f)}};var l=null;d=d=null;a.sa.id&&a.L.id&&(d=a.sa.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Dp(k,h,g);c=a.Y.start;var n=a.Y.duration?a.Y.start+a.Y.duration:Infinity,p=Infinity!=
589
+ n;l?(p&&(new Pi(m)).yb(c,n,!0),l.fc(m,a.presentationTimeline.ob())):l=new Pi(m);a.presentationTimeline.hc(m);p&&l.yb(c,n);d&&a.xb&&(d.segmentIndex=l);return{$b:function(){l&&0!=l.O.length||l.ec(m);return Promise.resolve(l)}}}function Ep(a){return a.Nc}function Ap(a){var b=Po(a,Ep),c=Qo(a,Ep,"media");a=Qo(a,Ep,"index");return{ya:b.ya,timescale:b.timescale,mc:b.mc,sb:b.sb,Ge:b.Ge,timeline:b.timeline,Zd:c,Hc:a}}
590
+ function Bp(a){var b=a.Hc?1:0;b+=a.timeline?1:0;b+=a.ya?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.Hc&&(a.timeline=null),a.ya=null);if(!a.Hc&&!a.Zd)throw new P(2,4,4002);}
591
+ function Cp(a,b,c,d,e){function f(J){var L=(J-t)*p,W=L+b.sb,Z=L+l;L=Z+p;var ka=Math.min(L,h());Z=new si(Z,ka,function(){var ja=Oo(y,x,J,w,W*v);return Hb(D,[ja])},0,null,d,B,l,h());Z.l=L;return Z}function g(){var J=[Math.max(k.ob(),l),Math.min(k.Jb(),h())].map(function(L){return L-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(L){return L+t})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.sa.id,n=a.Y.duration,p=b.ya,t=b.mc,v=b.timescale,
592
+ y=b.Zd,w=a.bandwidth||null,x=a.L.id,D=a.L.Pa,B=l-b.sb,A=g();a=a.xb?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var F=a;F<=A;++F){var G=f(F);c.push(G)}var H=new Pi(c);c=k.Jb()<h();F=k.T();if(c||F){var K=Math.max(a,A+1);H.wd(p,function(){var J=k.ob();H.Gb(J);var L=r(g());L.next();L=L.next().value;for(var W=[];K<=L;){var Z=f(K);W.push(Z);K++}return J>h()&&!W.length?null:W})}return Promise.resolve(H)}
593
+ function Dp(a,b,c){var d=a.Y.start,e=a.Y.duration,f=d-b.sb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Fd:h.Fd,Jd:h.Jd,Md:h.Md,Cd:h.Cd,Od:h.Od,Dd:h.Dd},k++){var l=b.timeline[k],m=l.start,n=l.gh;l=l.end;h.Md=k+b.mc;h.Od=n+b.Ge;h.Jd=a.L.id;h.Cd=a.bandwidth||null;h.Fd=b.Zd;h.Dd=a.L.Pa;g.push(new si(d+m,d+l,function(p){return function(){var t=Oo(p.Fd,p.Jd,p.Md,p.Cd||null,p.Od);return Hb(p.Dd,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
594
+ function zp(a){var b=Qo(a,Ep,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Pa;return new qi(function(){var f=Oo(b,c,null,d,null);return Hb(e,[f])},0,null,ep(a))};function Fp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Fp.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
595
+ function Gp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia;return M(function(Ma){switch(Ma.g){case 1:d=Nb;Hp(b);Ip(b);Jp(b);Kp(b);if(!c&&1==b.length){e=b[0];a.g=e.Wc;a.h=e.yd;a.j=e.textStreams;a.i=e.imageStreams;Ma.D(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Ma["return"]();k=b.map(function(Da){return Da.Wc});l=b.map(function(Da){return Da.yd});m=b.map(function(Da){return Da.textStreams});n=b.map(function(Da){return Da.imageStreams});
596
+ p=r(m);for(t=p.next();!t.done;t=p.next())v=t.value,v.push(Lp(d.oa));y=r(n);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(Lp(d.wc));return z(Ma,Mp(a.g,k,f,Np,Op),3);case 3:return z(Ma,Mp(a.h,l,f,Np,Op),4);case 4:return z(Ma,Mp(a.j,m,f,Np,Op),5);case 5:return z(Ma,Mp(a.i,n,f,Np,Op),2);case 2:D=0;B=[];if(a.h.length&&a.g.length)for(J=r(a.g),L=J.next();!L.done;L=J.next())for(W=L.value,Z=r(a.h),ka=Z.next();!ka.done;ka=Z.next())ja=ka.value,ea=kg(W.drmInfos,ja.drmInfos),W.drmInfos.length&&ja.drmInfos.length&&
596
597
  !ea.length||(Ia=D++,B.push({id:Ia,language:W.language,primary:W.primary,audio:W,video:ja,bandwidth:(W.bandwidth||0)+(ja.bandwidth||0),drmInfos:ea,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),F=r(A),G=F.next();!G.done;G=F.next())H=G.value,K=D++,B.push({id:K,language:H.language,primary:H.primary,audio:H.type==d.Fb?H:null,video:H.type==d.gb?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
597
- a.l=B;C(Ma)}})}function Fp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Wc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&jc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Wc=c}}
598
- function Hp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&jc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
599
- function Gp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.yd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&jc(e.roles,h.roles)&&yf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.yd=c}}
600
- function Ip(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
601
- function Np(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W;return M(function(Z){switch(Z.g){case 1:b=Nb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.Fb})});d=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.gb})});e=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.oa})});f=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.wc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
602
- h.value,k.push(Op(b.oa));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Op(b.wc));return z(Z,Kp([],c,0,Pp,Qp),2);case 2:return p=Z.h,z(Z,Kp([],d,0,Pp,Qp),3);case 3:return t=Z.h,z(Z,Kp([],e,0,Pp,Qp),4);case 4:return v=Z.h,z(Z,Kp([],f,0,Pp,Qp),5);case 5:y=Z.h;w=0;if(t.length&&p.length)for(F=r(p),G=F.next();!G.done;G=F.next())for(H=G.value,K=r(t),J=K.next();!J.done;J=K.next())L=J.value,W=w++,L.variantIds.push(W),H.variantIds.push(W);else for(x=t.concat(p),D=r(x),B=D.next();!B.done;B=D.next())A=
598
+ a.l=B;C(Ma)}})}function Hp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Wc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&jc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Wc=c}}
599
+ function Jp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&jc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
600
+ function Ip(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.yd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&jc(e.roles,h.roles)&&Af(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.yd=c}}
601
+ function Kp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
602
+ function Pp(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W;return M(function(Z){switch(Z.g){case 1:b=Nb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.Fb})});d=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.gb})});e=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.oa})});f=a.map(function(ka){return ka.filter(function(ja){return ja.type==b.wc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
603
+ h.value,k.push(Qp(b.oa));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Qp(b.wc));return z(Z,Mp([],c,0,Rp,Sp),2);case 2:return p=Z.h,z(Z,Mp([],d,0,Rp,Sp),3);case 3:return t=Z.h,z(Z,Mp([],e,0,Rp,Sp),4);case 4:return v=Z.h,z(Z,Mp([],f,0,Rp,Sp),5);case 5:y=Z.h;w=0;if(t.length&&p.length)for(F=r(p),G=F.next();!G.done;G=F.next())for(H=G.value,K=r(t),J=K.next();!J.done;J=K.next())L=J.value,W=w++,L.variantIds.push(W),H.variantIds.push(W);else for(x=t.concat(p),D=r(x),B=D.next();!B.done;B=D.next())A=
603
604
  B.value,A.variantIds=[w++];return Z["return"](t.concat(p).concat(v).concat(y))}})}
604
- function Kp(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J;return M(function(L){switch(L.g){case 1:f=Nb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){L.D(4);break}m=l.value;return z(L,Rp(m,b,c,e,g),5);case 5:n=L.h;if(!n)throw new P(2,4,4037);l=k.next();L.D(2);break;case 4:p=r(g);for(t=p.next();!t.done;t=p.next())for(v=t.value,y=r(v),w=y.next();!w.done;w=y.next())x=w.value,(D=Sp(x,b,d,e,g))&&a.push(D);B=r(g);for(t=B.next();!t.done;t=
605
- B.next())for(A=t.value,F={},G=r(A),w=G.next();!w.done;F={vb:F.vb},w=G.next())if(F.vb=w.value,H=F.vb.type==f.oa&&!F.vb.language,K=F.vb.type==f.wc&&!F.vb.tilesLayout,!H&&!K&&(J=a.some(function(W){return function(Z){return Z.mimeType==W.vb.mimeType&&md(Z.codecs)==md(W.vb.codecs)}}(F))))throw new P(2,4,4037);return L["return"](a)}})}
606
- function Rp(a,b,c,d,e){return M(function(f){if(1==f.g)return Tp(b,a),a.matchedStreams?a.segmentIndex?z(f,Up(a,c),2):f.D(2):f["return"](!1);Vp(a,c,d,e);return f["return"](!0)})}
607
- function Up(a,b){var c,d,e,f,g,h,k;return M(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return z(l,Promise.all(c),2)}if(a.segmentIndex instanceof Qi)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);C(l)})}
608
- function Sp(a,b,c,d,e){var f=c(a);Tp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return M(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new Qi;return z(g,Up(f,0),0)})});if(!f.matchedStreams)return null;Vp(f,0,d,e);return f}function Vp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==Wb(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
609
- function Lp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=r(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
610
- function Pp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
611
- function Mp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=ig(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new P(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
612
- (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Lp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Mp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Mp(a.trickModeVideo,b)}
613
- function Qp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
614
- function Tp(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Wp,video:Wp,text:Xp,image:Yp}[f.type],h={audio:Zp,video:$p,text:aq,image:bq}[f.type],k=null;e=r(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return;c.push(f)}b.matchedStreams=c}function Wp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||md(b.codecs)!=md(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<ig(c,d).length:1)}return c?!1:!0}
615
- function Xp(a,b){return a.language?b.language?0==Wb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Yp(a){return a.tilesLayout?!0:!1}
616
- function Zp(a,b,c){if(a.id==c.id)return!0;var d=Wb(a.language,b.language),e=Wb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;
617
- d=cq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==dq)return!0;if(d==eq)return!1;d=cq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==dq?!0:d==eq?!1:a.bandwidth&&fq(a.bandwidth,b.bandwidth,c.bandwidth)==dq?!0:!1}
618
- function $p(a,b,c){if(a.id==c.id)return!0;var d=cq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==dq)return!0;if(d==eq)return!1;if(a.frameRate){d=cq(a.frameRate,b.frameRate,c.frameRate);if(d==dq)return!0;if(d==eq)return!1}return a.bandwidth&&fq(a.bandwidth,b.bandwidth,c.bandwidth)==dq?!0:!1}
619
- function aq(a,b,c){if(a.id==c.id)return!0;var d=Wb(a.language,b.language),e=Wb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
620
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function bq(a,b,c){return a.id==c.id?!0:cq(a.width*a.height,b.width*b.height,c.width*c.height)==dq?!0:!1}function Op(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
621
- function Jp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ni([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
622
- function cq(a,b,c){if(b==a&&a!=c)return eq;if(c==a&&a!=b)return dq;if(b>a){if(c<=a||c-a<b-a)return dq;if(c-a>b-a)return eq}else{if(c>a)return eq;if(a-c<a-b)return dq;if(a-c>a-b)return eq}return gq}function fq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?dq:b<a?eq:gq}var dq=1,gq=0,eq=-1;function hq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.N={};this.j=new Dp;this.H=0;this.J=new ec(5);this.G=new Q(function(){iq(a)});this.A=new Ze;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=hq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return M(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,z(e,jq(c),2);d=e.h;c.h&&kq(c,d);if(!c.h)throw new P(2,7,7001);return e["return"](c.i)})};
623
- q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.G&&(this.G.stop(),this.G=null);return this.A.destroy()};q.update=function(){var a=this,b;return M(function(c){if(1==c.g)return E(c,2),z(c,jq(a),4);if(2!=c.g)return va(c,0);b=I(c);if(!a.h||!b)return c["return"]();a.h.onError(b);C(c)})};q.onExpirationUpdated=function(){};
624
- function jq(a){var b,c,d,e,f,g,h;return M(function(k){if(1==k.g)return b=ef(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),$e(a.A,e),z(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return z(k,lq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k["return"](h)})}
625
- function lq(a,b,c){var d,e,f,g,h;return M(function(k){if(1==k.g){d=Bo(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](mq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Ro(d,a.g.retryParameters,f,c,a.h.networkingEngine);$e(a.A,g);return z(k,g.promise,2)}h=k.h;return k["return"](mq(a,h,c))})}
626
- function mq(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia,Ma,Da;return M(function(Qa){switch(Qa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=jo(b,"Location").map(po).filter(Fb);0<f.length&&(g=Hb(e,f),e=a.m=g);h=jo(b,"BaseURL");k=h.map(po);l=Hb(e,k);m=0;h&&h.length&&(m=ro(h[0],"availabilityTimeOffset",yo)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=ro(b,"minBufferTime",to)||0);a.H=ro(b,"minimumUpdatePeriod",to,-1);t=ro(b,"availabilityStartTime",so);v=ro(b,
627
- "timeShiftBufferDepth",to);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=ro(b,"suggestedPresentationDelay",to));x=a.g.dash.ignoreMaxSegmentDuration;D=null;x||(D=ro(b,"maxSegmentDuration",to));B=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,F=r(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.Gb(A.ob());else K=a.g.defaultPresentationDelay||1.5*p,J=null!=w?w:K,A=new R(t,J,a.g.dash.autoCorrectDrift);A.Oc("static"==B);(L=A.T())&&
628
- !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.ve(v);W=b.getAttribute("profiles")||"";Z={xb:"static"!=B,presentationTimeline:A,sa:null,Y:null,Ca:null,L:null,bandwidth:0,ef:!1,Yb:m,profiles:W.split(",")};ka=nq(a,Z,l,b);ja=ka.duration;ea=ka.periods;"static"!=B&&ka.Ve||A.bb(ja||Infinity);a.C&&!a.F&&(Ia=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?A.uf(a.C):a.C&&Sa("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
629
- A.Zd(D||1);return z(Qa,Ep(a.j,ea,Z.xb),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Qa.D(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!A.Cf()){Qa.D(3);break}Ma=jo(b,"UTCTiming");return z(Qa,oq(a,l,Ma),5);case 5:Da=Qa.h;if(!a.h)return Qa["return"]();A.vf(Da);case 3:a.h.makeTextStreamsForClosedCaptions(a.i),C(Qa)}})}
630
- function nq(a,b,c,d){var e=ro(d,"mediaPresentationDuration",to),f=[],g=0;d=jo(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=ro(k,"start",to,g),n=k.id,p=ro(k,"duration",to),t=null;if(l){var v=ro(l,"start",to);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=p);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=pq(a,b,c,{start:m,duration:t,node:k,jf:null==t||!l});f.push(g);b.sa.id&&t&&(a.N[b.sa.id]=t);if(null==t){g=
631
- null;break}g=m+t}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,Ve:!1}:{periods:f,duration:g,Ve:!0}}
632
- function pq(a,b,c,d){b.sa=qq(d.node,null,c);b.Y=d;b.sa.Yb=b.Yb;b.sa.id||(b.sa.id="__shaka_period_"+d.start);var e=jo(d.node,"EventStream");c=b.presentationTimeline.ob();e=r(e);for(var f=e.next();!f.done;f=e.next())rq(a,d.start,d.duration,f.value,c);c=jo(d.node,"AdaptationSet").map(function(m){return sq(a,b,m)}).filter(Fb);if(b.xb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Tg);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
633
- }d=c.filter(function(m){return!m.Be});c=c.filter(function(m){return m.Be});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Be.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={Uc:h.Uc},l=k.next())h.Uc=l.value,h.Uc.trickModeVideo=e.streams.find(function(m){return function(n){return md(m.Uc.codecs)==md(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:tq(d,"audio");g=a.g.disableVideo?[]:tq(d,"video");f=a.g.disableText?
634
- []:tq(d,Mb);c=a.g.disableThumbnails?[]:tq(d,"image");if(!g.length&&!e.length)throw new P(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.sa.id,Wc:d,yd:e,textStreams:g,imageStreams:f}}
635
- function tq(a,b){return a.filter(function(c){return c.contentType==b})}
636
- function sq(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Ca=qq(c,b.sa,null);var e=!1,f=jo(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Fb),h=void 0,k=b.Ca.contentType==Mb;k&&(h="subtitle");f=r(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
637
- l}}var n;m=jo(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=jo(c,"SupplementalProperty");m=r(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
638
- 10)));m=jo(c,"Accessibility");var v=new Map;m=r(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var y=r(t),w=y.next();!w.done;w=y.next()){var x=w.value,D=w=void 0;x.includes("=")?(x=x.split("="),w=x[0].startsWith("CC")?x[0]:"CC"+x[0],D=x[1]||"und"):(w="CC"+p,2==t.length?p+=2:p++,D=x);v.set(w,Qb(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
639
- 1,null!=t)for(t=r(t.split(";")),w=t.next();!w.done;w=t.next())w=w.value,x=y=void 0,w.includes("=")?(w=w.split("="),y="svc"+w[0],x=w[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,x=w),v.set(y,Qb(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=jo(c,"ContentProtection");var B=Co(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=Qb(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=jo(c,"Label"))&&l.length&&
640
- (l=l[0],l.textContent&&(F=l.textContent));l=jo(c,"Representation");c=l.map(function(G){if(G=uq(a,b,B,h,A,F,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.Ca.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new P(2,4,4003);}if(!b.Ca.contentType||"application"==b.Ca.contentType)for(b.Ca.contentType=vq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.Ca.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
641
- m.value,p=r(B.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Fb);return{id:b.Ca.id||"__fake__"+a.I++,contentType:b.Ca.contentType,language:A,Gi:e,streams:c,drmInfos:B.drmInfos,Be:f,Tg:k}}
642
- function uq(a,b,c,d,e,f,g,h,k,l){b.L=qq(l,b.Ca,null);a.C=Math.min(a.C,b.L.Yb);if(!wq(b.L))return null;var m=b.Y.start;b.bandwidth=ro(l,"bandwidth",wo)||0;var n=b.L.contentType,p=n==Mb||"application"==n;n="image"==n;try{var t=function(H,K,J){return xq(a,H,K,J)};if(b.L.Mc)var v=dp(b,t);else if(b.L.Db)v=jp(b,a.l);else if(b.L.Nc)v=wp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.L.Pa,w=b.Y.duration||0;v={$b:function(){return Promise.resolve(Pi(m,w,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
643
- throw H;}t=jo(l,"ContentProtection");t=Fo(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var x=!1;jo(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(x=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var B;if(n&&((l=jo(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
605
+ function Mp(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J;return M(function(L){switch(L.g){case 1:f=Nb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){L.D(4);break}m=l.value;return z(L,Tp(m,b,c,e,g),5);case 5:n=L.h;if(!n)throw new P(2,4,4037);l=k.next();L.D(2);break;case 4:p=r(g);for(t=p.next();!t.done;t=p.next())for(v=t.value,y=r(v),w=y.next();!w.done;w=y.next())x=w.value,(D=Up(x,b,d,e,g))&&a.push(D);B=r(g);for(t=B.next();!t.done;t=
606
+ B.next())for(A=t.value,F={},G=r(A),w=G.next();!w.done;F={vb:F.vb},w=G.next())if(F.vb=w.value,H=F.vb.type==f.oa&&!F.vb.language,K=F.vb.type==f.wc&&!F.vb.tilesLayout,!H&&!K&&(J=a.some(function(W){return function(Z){return Z.mimeType==W.vb.mimeType&&Ad(Z.codecs)==Ad(W.vb.codecs)}}(F))))throw new P(2,4,4037);return L["return"](a)}})}
607
+ function Tp(a,b,c,d,e){return M(function(f){if(1==f.g)return Vp(b,a),a.matchedStreams?a.segmentIndex?z(f,Wp(a,c),2):f.D(2):f["return"](!1);Xp(a,c,d,e);return f["return"](!0)})}
608
+ function Wp(a,b){var c,d,e,f,g,h,k;return M(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return z(l,Promise.all(c),2)}if(a.segmentIndex instanceof Si)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);C(l)})}
609
+ function Up(a,b,c,d,e){var f=c(a);Vp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return M(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new Si;return z(g,Wp(f,0),0)})});if(!f.matchedStreams)return null;Xp(f,0,d,e);return f}function Xp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==Wb(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
610
+ function Np(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=r(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
611
+ function Rp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
612
+ function Op(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=kg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new P(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
613
+ (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Np(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Op(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Op(a.trickModeVideo,b)}
614
+ function Sp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
615
+ function Vp(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Yp,video:Yp,text:Zp,image:$p}[f.type],h={audio:aq,video:bq,text:cq,image:dq}[f.type],k=null;e=r(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return;c.push(f)}b.matchedStreams=c}function Yp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Ad(b.codecs)!=Ad(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<kg(c,d).length:1)}return c?!1:!0}
616
+ function Zp(a,b){return a.language?b.language?0==Wb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function $p(a){return a.tilesLayout?!0:!1}
617
+ function aq(a,b,c){if(a.id==c.id)return!0;var d=Wb(a.language,b.language),e=Wb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;
618
+ d=eq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==fq)return!0;if(d==gq)return!1;d=eq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==fq?!0:d==gq?!1:a.bandwidth&&hq(a.bandwidth,b.bandwidth,c.bandwidth)==fq?!0:!1}
619
+ function bq(a,b,c){if(a.id==c.id)return!0;var d=eq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==fq)return!0;if(d==gq)return!1;if(a.frameRate){d=eq(a.frameRate,b.frameRate,c.frameRate);if(d==fq)return!0;if(d==gq)return!1}return a.bandwidth&&hq(a.bandwidth,b.bandwidth,c.bandwidth)==fq?!0:!1}
620
+ function cq(a,b,c){if(a.id==c.id)return!0;var d=Wb(a.language,b.language),e=Wb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
621
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function dq(a,b,c){return a.id==c.id?!0:eq(a.width*a.height,b.width*b.height,c.width*c.height)==fq?!0:!1}function Qp(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
622
+ function Lp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Pi([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
623
+ function eq(a,b,c){if(b==a&&a!=c)return gq;if(c==a&&a!=b)return fq;if(b>a){if(c<=a||c-a<b-a)return fq;if(c-a>b-a)return gq}else{if(c>a)return gq;if(a-c<a-b)return fq;if(a-c>a-b)return gq}return iq}function hq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?fq:b<a?gq:iq}var fq=1,iq=0,gq=-1;function jq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.N={};this.j=new Fp;this.H=0;this.J=new ec(5);this.G=new Q(function(){kq(a)});this.A=new af;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=jq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return M(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,z(e,lq(c),2);d=e.h;c.h&&mq(c,d);if(!c.h)throw new P(2,7,7001);return e["return"](c.i)})};
624
+ q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.G&&(this.G.stop(),this.G=null);return this.A.destroy()};q.update=function(){var a=this,b;return M(function(c){if(1==c.g)return E(c,2),z(c,lq(a),4);if(2!=c.g)return va(c,0);b=I(c);if(!a.h||!b)return c["return"]();a.h.onError(b);C(c)})};q.onExpirationUpdated=function(){};
625
+ function lq(a){var b,c,d,e,f,g,h;return M(function(k){if(1==k.g)return b=gf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),bf(a.A,e),z(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return z(k,nq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k["return"](h)})}
626
+ function nq(a,b,c){var d,e,f,g,h;return M(function(k){if(1==k.g){d=Do(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](oq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=To(d,a.g.retryParameters,f,c,a.h.networkingEngine);bf(a.A,g);return z(k,g.promise,2)}h=k.h;return k["return"](oq(a,h,c))})}
627
+ function oq(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia,Ma,Da;return M(function(Qa){switch(Qa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=lo(b,"Location").map(ro).filter(Fb);0<f.length&&(g=Hb(e,f),e=a.m=g);h=lo(b,"BaseURL");k=h.map(ro);l=Hb(e,k);m=0;h&&h.length&&(m=to(h[0],"availabilityTimeOffset",Ao)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=to(b,"minBufferTime",vo)||0);a.H=to(b,"minimumUpdatePeriod",vo,-1);t=to(b,"availabilityStartTime",uo);v=to(b,
628
+ "timeShiftBufferDepth",vo);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=to(b,"suggestedPresentationDelay",vo));x=a.g.dash.ignoreMaxSegmentDuration;D=null;x||(D=to(b,"maxSegmentDuration",vo));B=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,F=r(Object.values(a.l)),G=F.next();!G.done;G=F.next())H=G.value,H.segmentIndex&&H.segmentIndex.Gb(A.ob());else K=a.g.defaultPresentationDelay||1.5*p,J=null!=w?w:K,A=new R(t,J,a.g.dash.autoCorrectDrift);A.Oc("static"==B);(L=A.T())&&
629
+ !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.we(v);W=b.getAttribute("profiles")||"";Z={xb:"static"!=B,presentationTimeline:A,sa:null,Y:null,Ca:null,L:null,bandwidth:0,gf:!1,Yb:m,profiles:W.split(",")};ka=pq(a,Z,l,b);ja=ka.duration;ea=ka.periods;"static"!=B&&ka.We||A.bb(ja||Infinity);a.C&&!a.F&&(Ia=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?A.vf(a.C):a.C&&Sa("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
630
+ A.$d(D||1);return z(Qa,Gp(a.j,ea,Z.xb),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Qa.D(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!A.Df()){Qa.D(4);break}Ma=lo(b,"UTCTiming");return z(Qa,qq(a,l,Ma),5);case 5:Da=Qa.h;if(!a.h)return Qa["return"]();A.wf(Da);case 4:A.Wd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),C(Qa)}})}
631
+ function pq(a,b,c,d){var e=to(d,"mediaPresentationDuration",vo),f=[],g=0;d=lo(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=to(k,"start",vo,g),n=k.id,p=to(k,"duration",vo),t=null;if(l){var v=to(l,"start",vo);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=p);if(!(null!==a.B&&null!==n&&null!==m&&m<a.B)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=rq(a,b,c,{start:m,duration:t,node:k,kf:null==t||!l});f.push(g);b.sa.id&&t&&(a.N[b.sa.id]=t);if(null==t){g=
632
+ null;break}g=m+t}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,We:!1}:{periods:f,duration:g,We:!0}}
633
+ function rq(a,b,c,d){b.sa=sq(d.node,null,c);b.Y=d;b.sa.Yb=b.Yb;b.sa.id||(b.sa.id="__shaka_period_"+d.start);var e=lo(d.node,"EventStream");c=b.presentationTimeline.ob();e=r(e);for(var f=e.next();!f.done;f=e.next())tq(a,d.start,d.duration,f.value,c);c=lo(d.node,"AdaptationSet").map(function(m){return uq(a,b,m)}).filter(Fb);if(b.xb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Ug);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
634
+ }d=c.filter(function(m){return!m.Ce});c=c.filter(function(m){return m.Ce});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ce.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={Uc:h.Uc},l=k.next())h.Uc=l.value,h.Uc.trickModeVideo=e.streams.find(function(m){return function(n){return Ad(m.Uc.codecs)==Ad(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:vq(d,"audio");g=a.g.disableVideo?[]:vq(d,"video");f=a.g.disableText?
635
+ []:vq(d,Mb);c=a.g.disableThumbnails?[]:vq(d,"image");if(!g.length&&!e.length)throw new P(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.sa.id,Wc:d,yd:e,textStreams:g,imageStreams:f}}
636
+ function vq(a,b){return a.filter(function(c){return c.contentType==b})}
637
+ function uq(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Ca=sq(c,b.sa,null);var e=!1,f=lo(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Fb),h=void 0,k=b.Ca.contentType==Mb;k&&(h="subtitle");f=r(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
638
+ l}}var n;m=lo(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=lo(c,"SupplementalProperty");m=r(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
639
+ 10)));m=lo(c,"Accessibility");var v=new Map;m=r(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var y=r(t),w=y.next();!w.done;w=y.next()){var x=w.value,D=w=void 0;x.includes("=")?(x=x.split("="),w=x[0].startsWith("CC")?x[0]:"CC"+x[0],D=x[1]||"und"):(w="CC"+p,2==t.length?p+=2:p++,D=x);v.set(w,Qb(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
640
+ 1,null!=t)for(t=r(t.split(";")),w=t.next();!w.done;w=t.next())w=w.value,x=y=void 0,w.includes("=")?(w=w.split("="),y="svc"+w[0],x=w[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,x=w),v.set(y,Qb(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=lo(c,"ContentProtection");var B=Eo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=Qb(c.getAttribute("lang")||"und"),F=c.getAttribute("label");(l=lo(c,"Label"))&&l.length&&
641
+ (l=l[0],l.textContent&&(F=l.textContent));l=lo(c,"Representation");c=l.map(function(G){if(G=wq(a,b,B,h,A,F,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.Ca.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new P(2,4,4003);}if(!b.Ca.contentType||"application"==b.Ca.contentType)for(b.Ca.contentType=xq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.Ca.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
642
+ m.value,p=r(B.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Fb);return{id:b.Ca.id||"__fake__"+a.I++,contentType:b.Ca.contentType,language:A,Hi:e,streams:c,drmInfos:B.drmInfos,Ce:f,Ug:k}}
643
+ function wq(a,b,c,d,e,f,g,h,k,l){b.L=sq(l,b.Ca,null);a.C=Math.min(a.C,b.L.Yb);if(!yq(b.L))return null;var m=b.Y.start;b.bandwidth=to(l,"bandwidth",yo)||0;var n=b.L.contentType,p=n==Mb||"application"==n;n="image"==n;try{var t=function(H,K,J){return zq(a,H,K,J)};if(b.L.Mc)var v=fp(b,t);else if(b.L.Db)v=lp(b,a.l);else if(b.L.Nc)v=yp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.L.Pa,w=b.Y.duration||0;v={$b:function(){return Promise.resolve(Ri(m,w,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
644
+ throw H;}t=lo(l,"ContentProtection");t=Ho(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var x=!1;lo(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(x=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var B;if(n&&((l=lo(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
644
645
  (B=l.getAttribute("value")),!B))return null;var A;l=b.L.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(A="PQ");var F=b.L.id?b.sa.id+","+b.L.id:"",G={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,K,J;return M(function(L){if(1==L.g){K=(H=F&&b.xb&&a.l[F])?a.l[F]:G;if(K.segmentIndex)return L.D(0);J=K;return z(L,v.$b(),3)}J.segmentIndex=L.h;C(L)})},closeSegmentIndex:function(){G.segmentIndex&&
645
646
  (G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.Ca.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.L.md,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:x,closedCaptions:k,
646
- hdr:A,tilesLayout:B,matchedStreams:[]};F&&b.xb&&!a.l[F]&&(a.l[F]=G);return G}function iq(a){var b,c;M(function(d){switch(d.g){case 1:return b=0,E(d,2),z(d,jq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=I(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();kq(a,b);C(d)}})}function kq(a,b){0>a.H||a.G.S(Math.max(3,a.H-b,fc(a.J)))}
647
- function qq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,md:null,audioSamplingRate:null,Yb:0};c=c||b.Pa;var d=jo(a,"BaseURL"),e=d.map(po),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=ro(a,"frameRate",zo)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=jo(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
648
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=jo(a,"AudioChannelConfiguration");m=yq(m)||b.md;p=ro(a,"audioSamplingRate",xo)||b.audioSamplingRate;f||(f=vq(g,h));var t=io(a,"SegmentBase"),v=io(a,"SegmentTemplate"),y=t?ro(t,"availabilityTimeOffset",yo)||0:0,w=v?ro(v,"availabilityTimeOffset",yo)||0:0;d=d&&d.length?ro(d[0],"availabilityTimeOffset",yo)||0:0;d=b.Yb+d+y+w;return{Pa:Hb(c,e),Mc:t||b.Mc,Db:io(a,"SegmentList")||b.Db,Nc:v||b.Nc,width:ro(a,"width",xo)||b.width,height:ro(a,
649
- "height",xo)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),md:m,audioSamplingRate:p,Yb:d}}
650
- function yq(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
651
- parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function wq(a){var b=a.Mc?1:0;b+=a.Db?1:0;b+=a.Nc?1:0;if(0==b)return a.contentType==Mb||"application"==a.contentType?!0:!1;1!=b&&(a.Mc&&(a.Db=null),a.Nc=null);return!0}
652
- function zq(a,b,c,d){var e,f,g,h,k,l;return M(function(m){if(1==m.g)return e=Hb(b,[c]),f=ef(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),$e(a.A,g),z(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=Tc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
653
- function oq(a,b,c){var d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){n.D(4);break}h=g.value;E(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.D(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.D(8);
654
- case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n["return"](isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Sa("NTP UTCTiming scheme is not supported");break;default:Sa("Unrecognized scheme in UTCTiming element",k)}n.D(9);break;case 7:return z(n,zq(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return z(n,zq(a,b,l,"GET"),11);case 11:return n["return"](n.h);
647
+ hdr:A,tilesLayout:B,matchedStreams:[]};F&&b.xb&&!a.l[F]&&(a.l[F]=G);return G}function kq(a){var b,c;M(function(d){switch(d.g){case 1:return b=0,E(d,2),z(d,lq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=I(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();mq(a,b);C(d)}})}function mq(a,b){0>a.H||a.G.S(Math.max(3,a.H-b,fc(a.J)))}
648
+ function sq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,md:null,audioSamplingRate:null,Yb:0};c=c||b.Pa;var d=lo(a,"BaseURL"),e=d.map(ro),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=to(a,"frameRate",Bo)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=lo(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
649
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=lo(a,"AudioChannelConfiguration");m=Aq(m)||b.md;p=to(a,"audioSamplingRate",zo)||b.audioSamplingRate;f||(f=xq(g,h));var t=ko(a,"SegmentBase"),v=ko(a,"SegmentTemplate"),y=t?to(t,"availabilityTimeOffset",Ao)||0:0,w=v?to(v,"availabilityTimeOffset",Ao)||0:0;d=d&&d.length?to(d[0],"availabilityTimeOffset",Ao)||0:0;d=b.Yb+d+y+w;return{Pa:Hb(c,e),Mc:t||b.Mc,Db:ko(a,"SegmentList")||b.Db,Nc:v||b.Nc,width:to(a,"width",zo)||b.width,height:to(a,
650
+ "height",zo)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),md:m,audioSamplingRate:p,Yb:d}}
651
+ function Aq(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
652
+ parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function yq(a){var b=a.Mc?1:0;b+=a.Db?1:0;b+=a.Nc?1:0;if(0==b)return a.contentType==Mb||"application"==a.contentType?!0:!1;1!=b&&(a.Mc&&(a.Db=null),a.Nc=null);return!0}
653
+ function Bq(a,b,c,d){var e,f,g,h,k,l;return M(function(m){if(1==m.g)return e=Hb(b,[c]),f=gf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),bf(a.A,g),z(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=fd(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
654
+ function qq(a,b,c){var d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){n.D(4);break}h=g.value;E(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.D(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.D(8);
655
+ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n["return"](isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Sa("NTP UTCTiming scheme is not supported");break;default:Sa("Unrecognized scheme in UTCTiming element",k)}n.D(9);break;case 7:return z(n,Bq(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return z(n,Bq(a,b,l,"GET"),11);case 11:return n["return"](n.h);
655
656
  case 9:va(n,3);break;case 5:I(n);case 3:g=f.next();n.D(2);break;case 4:return Sa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
656
- function rq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=ro(d,"timescale",xo)||1;d=r(jo(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=ro(k,"presentationTime",xo)||0,m=ro(k,"duration",xo)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
657
- function xq(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=lf,f=gj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),$e(a.A,h),z(l,h.promise,2);k=l.h;return l["return"](k.data)})}function vq(a,b){return qd(kd(a,b))?Mb:a.split("/")[0]}N("shaka.dash.DashParser",hq);og.mpd=function(){return new hq};mg["application/dash+xml"]=function(){return new hq};mg["video/vnd.mpeg.dash.mpd"]=function(){return new hq};function Aq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Bq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Bq.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
658
- Bq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Cq(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Dq(a,b){var c=a.getAttribute(b);if(!c)throw new P(2,4,4023,b);return c.value}function Eq(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.i=c}function Fq(a,b){this.name=a;this.value=b};function Gq(a,b){return a.filter(function(c){return c.name==b})}function Hq(a,b){return a.filter(function(c){return Dq(c,"TYPE")==b})}function Iq(a,b){var c=Gq(a,b);return c.length?c[0]:null}function Jq(a,b,c){c=void 0===c?0:c;return(a=Iq(a,b))?Number(a.value):c};function Kq(a){this.h=a;this.g=0}function Lq(a){Mq(a,/[ \t]+/gm)}function Mq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function Nq(a){return a.g==a.h.length?null:(a=Mq(a,/[^ \t\n]*/gm))?a[0]:null};function Oq(){this.g=0}
659
- function Pq(a,b,c){b=Tc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new P(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Qq(a,g),--a.g,Rq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=Qq(a,h);if(Sq.includes(h.name)){if(1!=b)throw new P(2,4,4017);
660
- var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Qq(a,m),Rq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Cq(m,"TYPE")?k.push(m):"MAP"==Cq(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Hb([d],[m.trim()])[0],h&&g.push(h),e.push(new Eq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Eq("",g,k)));return new Aq(c,b,f,
661
- e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Fq("URI",k)),e=!0)}}return new Aq(c,b,f)}function Qq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new P(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new Kq(f);var h;(h=Mq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Mq(f,k);)d.push(new Fq(h[1],h[2]||h[3])),Lq(f)}return new Bq(c,e,d,g)}
662
- var Rq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Sq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Tq(){}function Uq(a){try{var b=Vq(a);return Te({uri:a,mf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Re(c)}}function Vq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new P(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new P(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=bd(a):e=Xc(a);return{data:e,contentType:c}}
663
- N("shaka.net.DataUriPlugin",Tq);Tq.parse=Uq;bf("data",Uq);function Wq(){var a=this;this.g=this.i=null;this.Aa=1;this.A=new Map;this.C=new Map;this.na=new Set;this.h=new Map;this.j=null;this.N="";this.$=new Oq;this.ma=0;this.F=new Q(function(){Xq(a)});this.m=Yq;this.G=null;this.aa=0;this.I=Infinity;this.Z=this.ba=0;this.H=new Ze;this.W=[];this.K=new Map;this.Ba=!1;this.B=new Map;this.R=null;this.va=new Map;this.J=new Map;this.l=!1}q=Wq.prototype;q.configure=function(a){this.g=a};
664
- q.start=function(a,b){var c=this,d,e;return M(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),z(f,Zq(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,z(f,$q(c,d.data),3);e=c.ma;0<e&&c.F.S(e);return f["return"](c.G)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.H&&(a.push(this.H.destroy()),this.H=null);this.g=this.i=null;this.na.clear();this.G=null;this.h.clear();this.C.clear();this.B.clear();this.A.clear();return Promise.all(a)};
665
- q.update=function(){var a=this,b,c,d;return M(function(e){if(1==e.g){if(a.m==Yq)return e["return"]();b=[];a.R=null;c=Array.from(a.h.values());return c.length?z(e,ar(a,c[0]),2):e.D(2)}for(d=1;d<c.length;d++)b.push(ar(a,c[d]));return z(e,Promise.all(b),0)})};
666
- function ar(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return M(function(y){if(1==y.g)return c=br,d=b.Gf,e=new jb(d),a.l&&b.Lf&&nb(e,new pb("_HLS_skip=YES")),z(y,Zq(a,e.toString()),2);if(3!=y.g){f=y.h;g=Pq(a.$,f.data,f.uri);if(1!=g.type)throw new P(2,4,4017);h=Gq(g.g,"EXT-X-DEFINE");k=cr(a,h);l=b.stream;return z(y,dr(a,b.xd,g,l.type,l.mimeType,b.Xd,k,b.Qf,l.codecs,l.bandwidth),3)}m=y.h;l.segmentIndex.fc(m,a.j.ob());m.length&&(n=Jq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.Xd.get(n),l.segmentIndex.Gb(p));t=m[m.length-
667
- 1];if(v=Iq(g.g,"EXT-X-ENDLIST"))er(a,c.Ff),a.j.bb(t.endTime);C(y)})}q.onExpirationUpdated=function(){};
668
- function $q(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,ac,Dd;return M(function(gb){switch(gb.g){case 1:c=Pq(a.$,b,a.N);if(0!=c.type)throw new P(2,4,4022);d=Gq(c.g,"EXT-X-DEFINE");fr(a,d);e=Gq(c.g,"EXT-X-MEDIA");f=Gq(c.g,"EXT-X-STREAM-INF");g=Gq(c.g,"EXT-X-IMAGE-STREAM-INF");gr(a,f);h=Gq(c.g,"EXT-X-SESSION-DATA");k=r(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Cq(m,"DATA-ID"),p=Cq(m,"URI"),t=Cq(m,"LANGUAGE"),v=Cq(m,"VALUE"),y=(new Map).set("id",n),p&&
669
- y.set("uri",Hb([a.N],[p])[0]),t&&y.set("language",t),v&&y.set("value",v),w=new O("sessiondata",y),a.i)a.i.onEvent(w);return z(gb,hr(a,e),2);case 2:return ir(a,e),z(gb,jr(a,f),3);case 3:return x=gb.h,z(gb,kr(a,e),4);case 4:return D=gb.h,z(gb,lr(a,g),5);case 5:B=gb.h;if(!a.i)throw new P(2,7,7001);if(a.Ba&&0==x.length)throw new P(2,4,4034);F=A=Infinity;G=r(a.h.values());for(H=G.next();!H.done;H=G.next())K=H.value,A=Math.min(A,K.kf),"text"!=K.stream.type&&(F=Math.min(F,K.Gg-K.kf));a.m!=Yq?(a.j=new R(0,
670
- a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Z?a.Z:3*a.aa),a.j.Oc(!1)):(a.j=new R(null,0),a.j.Oc(!0));mr(a);if(a.m!=Yq)a.ma=a.I,J=br,a.m==J.Ke&&(L=a.j.sd,isNaN(a.g.availabilityWindowOverride)||(L=a.g.availabilityWindowOverride),a.j.ve(L));else for(a.j.bb(F),a.j.offset(-A),W=r(a.h.values()),H=W.next();!H.done;H=W.next())Z=H.value,Z.stream.segmentIndex.offset(-A),Z.stream.segmentIndex.yb(0,F);a.W=[];ka=[];ja=r(x);for(ea=ja.next();!ea.done;ea=ja.next())for(Ia=ea.value,Ma=r([Ia.video,Ia.audio]),
671
- Da=Ma.next();!Da.done;Da=Ma.next())(Qa=Da.value)&&ka.push(Qa);return z(gb,Promise.all(ka.map(function(Sc){return M(function(Fe){return z(Fe,Sc.createSegmentIndex(),0)})})),6);case 6:ac=r(ka);for(Da=ac.next();!Da.done;Da=ac.next())Dd=Da.value,a.W.push(Dd.segmentIndex.O);mr(a);a.G={presentationTimeline:a.j,variants:x,textStreams:D,imageStreams:B,offlineSessionIds:[],minBufferTime:0};a.i.makeTextStreamsForClosedCaptions(a.G);C(gb)}})}
672
- function fr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Cq(e,"NAME");e=Cq(e,"VALUE");d&&e&&(a.A.has(d)||a.A.set(d,e))}}function cr(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Cq(f,"NAME");var g=Cq(f,"VALUE");f=Cq(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.A.get(f))&&c.set(f,e)}return c}
673
- function gr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Cq(e,"AUDIO");d=Cq(e,"VIDEO");var g=Cq(e,"SUBTITLES");e=nr(a,e);if(g){var h=Kb(Mb,e);a.B.set(g,h);ic(e,h)}f&&(g=Jb("audio",e),a.B.set(f,g));d&&(f=Jb("video",e),a.B.set(d,f))}}
674
- function kr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g)return c=Hq(b,"SUBTITLES"),d=c.map(function(y){var w,x,D;return M(function(B){if(1==B.g){if(w=a.g.disableText)return B["return"](null);E(B,2);return z(B,or(a,y),4)}if(2!=B.g)return x=B.h,B["return"](x.stream);D=I(B);if(a.g.hls.ignoreTextStreamFailures)return B["return"](null);throw D;})}),z(v,Promise.all(d),2);e=v.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Dq(h,"GROUP-ID"),l=a.B.get(k))if(m=a.C.get(k))for(n=
657
+ function tq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=to(d,"timescale",zo)||1;d=r(lo(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=to(k,"presentationTime",zo)||0,m=to(k,"duration",zo)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
658
+ function zq(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=nf,f=ij(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),bf(a.A,h),z(l,h.promise,2);k=l.h;return l["return"](k.data)})}function xq(a,b){return Fd(yd(a,b))?Mb:a.split("/")[0]}N("shaka.dash.DashParser",jq);qg.mpd=function(){return new jq};og["application/dash+xml"]=function(){return new jq};og["video/vnd.mpeg.dash.mpd"]=function(){return new jq};function Cq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Dq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Dq.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
659
+ Dq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Eq(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Fq(a,b){var c=a.getAttribute(b);if(!c)throw new P(2,4,4023,b);return c.value}function Gq(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.i=c}function Hq(a,b){this.name=a;this.value=b};function Iq(a,b){return a.filter(function(c){return c.name==b})}function Jq(a,b){return a.filter(function(c){return Fq(c,"TYPE")==b})}function Kq(a,b){var c=Iq(a,b);return c.length?c[0]:null}function Lq(a,b,c){c=void 0===c?0:c;return(a=Kq(a,b))?Number(a.value):c};function Mq(a){this.h=a;this.g=0}function Nq(a){Oq(a,/[ \t]+/gm)}function Oq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function Pq(a){return a.g==a.h.length?null:(a=Oq(a,/[^ \t\n]*/gm))?a[0]:null};function Qq(){this.g=0}
660
+ function Rq(a,b,c){b=fd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new P(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Sq(a,g),--a.g,Tq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=Sq(a,h);if(Uq.includes(h.name)){if(1!=b)throw new P(2,4,4017);
661
+ var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Sq(a,m),Tq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Eq(m,"TYPE")?k.push(m):"MAP"==Eq(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Hb([d],[m.trim()])[0],h&&g.push(h),e.push(new Gq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Gq("",g,k)));return new Cq(c,b,f,
662
+ e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Hq("URI",k)),e=!0)}}return new Cq(c,b,f)}function Sq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new P(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new Mq(f);var h;(h=Oq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Oq(f,k);)d.push(new Hq(h[1],h[2]||h[3])),Nq(f)}return new Dq(c,e,d,g)}
663
+ var Tq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Uq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Vq(){}function Wq(a){try{var b=Xq(a);return Ve({uri:a,nf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Te(c)}}function Xq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new P(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new P(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=pd(a):e=jd(a);return{data:e,contentType:c}}
664
+ N("shaka.net.DataUriPlugin",Vq);Vq.parse=Wq;df("data",Wq);function Yq(){var a=this;this.g=this.i=null;this.Aa=1;this.A=new Map;this.C=new Map;this.na=new Set;this.h=new Map;this.j=null;this.N="";this.$=new Qq;this.ma=0;this.F=new Q(function(){Zq(a)});this.m=$q;this.G=null;this.aa=0;this.I=Infinity;this.Z=this.ba=0;this.H=new af;this.W=[];this.K=new Map;this.Ba=!1;this.B=new Map;this.R=null;this.va=new Map;this.J=new Map;this.l=!1}q=Yq.prototype;q.configure=function(a){this.g=a};
665
+ q.start=function(a,b){var c=this,d,e;return M(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),z(f,ar(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,z(f,br(c,d.data),3);e=c.ma;0<e&&c.F.S(e);return f["return"](c.G)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.H&&(a.push(this.H.destroy()),this.H=null);this.g=this.i=null;this.na.clear();this.G=null;this.h.clear();this.C.clear();this.B.clear();this.A.clear();return Promise.all(a)};
666
+ q.update=function(){var a=this,b,c,d;return M(function(e){if(1==e.g){if(a.m==$q)return e["return"]();b=[];a.R=null;c=Array.from(a.h.values());return c.length?z(e,cr(a,c[0]),2):e.D(2)}for(d=1;d<c.length;d++)b.push(cr(a,c[d]));return z(e,Promise.all(b),0)})};
667
+ function cr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return M(function(y){if(1==y.g)return c=dr,d=b.Hf,e=new jb(d),a.l&&b.Mf&&nb(e,new pb("_HLS_skip=YES")),z(y,ar(a,e.toString()),2);if(3!=y.g){f=y.h;g=Rq(a.$,f.data,f.uri);if(1!=g.type)throw new P(2,4,4017);h=Iq(g.g,"EXT-X-DEFINE");k=er(a,h);l=b.stream;return z(y,fr(a,b.xd,g,l.type,l.mimeType,b.Yd,k,b.Rf,l.codecs,l.bandwidth),3)}m=y.h;l.segmentIndex.fc(m,a.j.ob());m.length&&(n=Lq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.Yd.get(n),l.segmentIndex.Gb(p));t=m[m.length-
668
+ 1];if(v=Kq(g.g,"EXT-X-ENDLIST"))gr(a,c.Gf),a.j.bb(t.endTime);C(y)})}q.onExpirationUpdated=function(){};
669
+ function br(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,ac,Dd;return M(function(gb){switch(gb.g){case 1:c=Rq(a.$,b,a.N);if(0!=c.type)throw new P(2,4,4022);d=Iq(c.g,"EXT-X-DEFINE");hr(a,d);e=Iq(c.g,"EXT-X-MEDIA");f=Iq(c.g,"EXT-X-STREAM-INF");g=Iq(c.g,"EXT-X-IMAGE-STREAM-INF");ir(a,f);h=Iq(c.g,"EXT-X-SESSION-DATA");k=r(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Eq(m,"DATA-ID"),p=Eq(m,"URI"),t=Eq(m,"LANGUAGE"),v=Eq(m,"VALUE"),y=(new Map).set("id",n),p&&
670
+ y.set("uri",Hb([a.N],[p])[0]),t&&y.set("language",t),v&&y.set("value",v),w=new O("sessiondata",y),a.i)a.i.onEvent(w);return z(gb,jr(a,e),2);case 2:return kr(a,e),z(gb,lr(a,f),3);case 3:return x=gb.h,z(gb,mr(a,e),4);case 4:return D=gb.h,z(gb,nr(a,g),5);case 5:B=gb.h;if(!a.i)throw new P(2,7,7001);if(a.Ba&&0==x.length)throw new P(2,4,4034);F=A=Infinity;G=r(a.h.values());for(H=G.next();!H.done;H=G.next())K=H.value,A=Math.min(A,K.lf),"text"!=K.stream.type&&(F=Math.min(F,K.Hg-K.lf));a.m!=$q?(a.j=new R(0,
671
+ a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Z?a.Z:3*a.aa),a.j.Oc(!1)):(a.j=new R(null,0),a.j.Oc(!0));if(a.m!=$q)a.ma=a.I,J=dr,a.m==J.Le&&(L=a.j.sd,isNaN(a.g.availabilityWindowOverride)||(L=a.g.availabilityWindowOverride),a.j.we(L));else for(a.j.bb(F),a.j.offset(-A),W=r(a.h.values()),H=W.next();!H.done;H=W.next())Z=H.value,Z.stream.segmentIndex.offset(-A),Z.stream.segmentIndex.yb(0,F);a.W=[];ka=[];ja=r(x);for(ea=ja.next();!ea.done;ea=ja.next())for(Ia=ea.value,Ma=r([Ia.video,Ia.audio]),
672
+ Da=Ma.next();!Da.done;Da=Ma.next())(Qa=Da.value)&&ka.push(Qa);return z(gb,Promise.all(ka.map(function(Sc){return M(function(Fe){return z(Fe,Sc.createSegmentIndex(),0)})})),6);case 6:ac=r(ka);for(Da=ac.next();!Da.done;Da=ac.next())Dd=Da.value,a.W.push(Dd.segmentIndex.O);or(a);a.j.Wd();a.G={presentationTimeline:a.j,variants:x,textStreams:D,imageStreams:B,offlineSessionIds:[],minBufferTime:0};a.i.makeTextStreamsForClosedCaptions(a.G);C(gb)}})}
673
+ function hr(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Eq(e,"NAME");e=Eq(e,"VALUE");d&&e&&(a.A.has(d)||a.A.set(d,e))}}function er(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Eq(f,"NAME");var g=Eq(f,"VALUE");f=Eq(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.A.get(f))&&c.set(f,e)}return c}
674
+ function ir(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Eq(e,"AUDIO");d=Eq(e,"VIDEO");var g=Eq(e,"SUBTITLES");e=pr(a,e);if(g){var h=Kb(Mb,e);a.B.set(g,h);ic(e,h)}f&&(g=Jb("audio",e),a.B.set(f,g));d&&(f=Jb("video",e),a.B.set(d,f))}}
675
+ function mr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return M(function(v){if(1==v.g)return c=Jq(b,"SUBTITLES"),d=c.map(function(y){var w,x,D;return M(function(B){if(1==B.g){if(w=a.g.disableText)return B["return"](null);E(B,2);return z(B,qr(a,y),4)}if(2!=B.g)return x=B.h,B["return"](x.stream);D=I(B);if(a.g.hls.ignoreTextStreamFailures)return B["return"](null);throw D;})}),z(v,Promise.all(d),2);e=v.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Fq(h,"GROUP-ID"),l=a.B.get(k))if(m=a.C.get(k))for(n=
675
676
  r(m),p=n.next();!p.done;p=n.next())t=p.value,t.stream.codecs=l;return v["return"](e.filter(function(y){return y}))})}
676
- function lr(a,b){var c,d;return M(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return M(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);E(l,2);return z(l,pr(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=I(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),z(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
677
- function hr(a,b){var c;return M(function(d){if(1==d.g)return b=b.filter(function(e){var f=Cq(e,"URI")||"";return"SUBTITLES"!=Cq(e,"TYPE")&&""!=f}),b.length?z(d,or(a,b[0]),2):d.D(2);c=b.slice(1).map(function(e){return or(a,e)});return z(d,Promise.all(c),0)})}
678
- function jr(a,b){var c,d,e;return M(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,t,v;return M(function(y){if(1==y.g)return h=Cq(g,"FRAME-RATE"),k=Number(Cq(g,"AVERAGE-BANDWIDTH"))||Number(Dq(g,"BANDWIDTH")),l=Cq(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t=Cq(g,"VIDEO-RANGE"),z(y,qr(a,g,k),2);if(v=y.h){for(var w=y["return"],x=v.audio,D=v.video,B=r(D),A=B.next();!A.done;A=B.next())if(A=A.value.stream)A.width=Number(n)||void 0,A.height=Number(p)||
679
- void 0,A.frameRate=Number(h)||void 0,A.hdr=t||void 0;B=a.g.disableAudio;if(!x.length||B)x=[null];B=a.g.disableVideo;if(!D.length||B)D=[null];B=[];x=r(x);for(A=x.next();!A.done;A=x.next()){A=A.value;for(var F=r(D),G=F.next();!G.done;G=F.next()){var H=G.value;G=A?A.stream:null;var K=H?H.stream:null,J=A?A.stream.drmInfos:null,L=H?H.stream.drmInfos:null;H=(H?H.xd:"")+" - "+(A?A.xd:"");G&&K&&J.length&&L.length&&!(0<ig(J,L).length)||a.na.has(H)||(G={id:a.Aa++,language:G?G.language:"und",primary:!!G&&G.primary||
677
+ function nr(a,b){var c,d;return M(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return M(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);E(l,2);return z(l,rr(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=I(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),z(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
678
+ function jr(a,b){var c;return M(function(d){if(1==d.g)return b=b.filter(function(e){var f=Eq(e,"URI")||"";return"SUBTITLES"!=Eq(e,"TYPE")&&""!=f}),b.length?z(d,qr(a,b[0]),2):d.D(2);c=b.slice(1).map(function(e){return qr(a,e)});return z(d,Promise.all(c),0)})}
679
+ function lr(a,b){var c,d,e;return M(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,t,v;return M(function(y){if(1==y.g)return h=Eq(g,"FRAME-RATE"),k=Number(Eq(g,"AVERAGE-BANDWIDTH"))||Number(Fq(g,"BANDWIDTH")),l=Eq(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t=Eq(g,"VIDEO-RANGE"),z(y,sr(a,g,k),2);if(v=y.h){for(var w=y["return"],x=v.audio,D=v.video,B=r(D),A=B.next();!A.done;A=B.next())if(A=A.value.stream)A.width=Number(n)||void 0,A.height=Number(p)||
680
+ void 0,A.frameRate=Number(h)||void 0,A.hdr=t||void 0;B=a.g.disableAudio;if(!x.length||B)x=[null];B=a.g.disableVideo;if(!D.length||B)D=[null];B=[];x=r(x);for(A=x.next();!A.done;A=x.next()){A=A.value;for(var F=r(D),G=F.next();!G.done;G=F.next()){var H=G.value;G=A?A.stream:null;var K=H?H.stream:null,J=A?A.stream.drmInfos:null,L=H?H.stream.drmInfos:null;H=(H?H.xd:"")+" - "+(A?A.xd:"");G&&K&&J.length&&L.length&&!(0<kg(J,L).length)||a.na.has(H)||(G={id:a.Aa++,language:G?G.language:"und",primary:!!G&&G.primary||
680
681
  !!K&&K.primary,audio:G,video:K,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},B.push(G),a.na.add(H))}}y=w.call(y,B)}else y=y["return"]([]);return y})}),z(f,Promise.all(c),2);d=f.h;e=d.reduce(Db,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
681
- function qr(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w;return M(function(x){if(1==x.g)return d=Nb,e=nr(a,b),f=Cq(b,"AUDIO"),g=Cq(b,"VIDEO"),k=(h=f||g)&&a.C.has(h)?a.C.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=Dq(b,"URI"),t=l.audio.find(function(D){return D&&D.xd==p}),v=Kb(d.gb,e),(y=Kb(d.Fb,e))&&!v?m=d.Fb:!k.length&&y&&v?(m=d.gb,e=[[v,y].join()]):l.audio.length&&t?(m=d.Fb,n=!0):m=l.video.length?d.Fb:d.gb,n?x.D(2):z(x,rr(a,b,e,m,c),3);2!=x.g&&(w=x.h);if(w)l[w.stream.type]=[w];else if(null===w)return x["return"](null);
682
- sr(l);return x["return"](l)})}function nr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=Cq(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=nd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function tr(a){a=Cq(a,"LANGUAGE")||"und";return Qb(a)}
683
- function sr(a){a=r(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function ir(a,b){var c=Hq(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=tr(e);var f=Dq(e,"GROUP-ID");e=Dq(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
684
- function or(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;return M(function(w){if(1==w.g){c=Dq(b,"GROUP-ID");d="";var x=Dq(b,"TYPE").toLowerCase();"subtitles"==x&&(x=Mb);e=x;e!=Mb&&c&&a.B.has(c)&&(d=a.B.get(c));f=ur(Dq(b,"URI"),a.A);if(a.h.has(f))return w["return"](a.h.get(f));g=tr(b);h=Cq(b,"NAME");k=Cq(b,"DEFAULT");l="YES"==k;"audio"==e?x=(x=Cq(b,"CHANNELS"))?parseInt(x.split("/")[0],10):null:x=null;m=x;"audio"==e?x=(x=Cq(b,"CHANNELS"))?x.includes("/JOC"):!1:x=!1;n=x;p=Cq(b,"CHARACTERISTICS");t=Cq(b,"FORCED");
685
- v="YES"==t;return z(w,vr(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=w.h;a.C.has(c)?a.C.get(c).push(y):a.C.set(c,[y]);if(null==y)return w["return"](null);if(a.h.has(f))return w["return"](a.h.get(f));a.h.set(f,y);return w["return"](y)})}
686
- function pr(a,b){var c,d,e,f,g,h,k,l,m,n;return M(function(p){if(1==p.g){c=ur(Dq(b,"URI"),a.A);d=Cq(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=tr(b);f=Cq(b,"NAME");g=Cq(b,"CHARACTERISTICS");return z(p,vr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Cq(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
687
- Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Cq(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
688
- function rr(a,b,c,d,e){var f,g,h,k;return M(function(l){if(1==l.g){f=ur(Dq(b,"URI"),a.A);if(a.h.has(f))return l["return"](a.h.get(f));var m=Cq(b,"CLOSED-CAPTIONS");g="video"==d&&m&&"NONE"!=m?a.K.get(m):null;h=Jb(d,c);return z(l,vr(a,f,h,d,"und",!1,null,null,g,null,!1,!1,e),2)}k=l.h;if(null==k)return l["return"](null);if(a.h.has(f))return l["return"](a.h.get(f));a.h.set(f,k);return l["return"](k)})}
689
- function vr(a,b,c,d,e,f,g,h,k,l,m,n,p){var t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,ac,Dd,gb,Sc,Fe,op,pp,qp,rp,Xi,Yi,hg,sp,tp,up,vp;return M(function(lb){switch(lb.g){case 1:return t=Hb([a.N],[b])[0],z(lb,Zq(a,t),2);case 2:v=lb.h;t=v.uri;y=Pq(a.$,v.data,t);if(1!=y.type)throw new P(2,4,4017);w=[];if(y.segments)for(x=r(y.segments),D=x.next();!D.done;D=x.next())B=D.value,A=Gq(B.g,"EXT-X-KEY"),w.push.apply(w,ia(A));F=!1;G=[];H=new Set;K=r(w);for(J=K.next();!J.done;J=K.next())if(L=J.value,
690
- W=Dq(L,"METHOD"),"NONE"!=W){F=!0;if("AES-128"==W)return a.Ba=!0,lb["return"](null);Z=Dq(L,"KEYFORMAT");if(ja=(ka=wr[Z])?ka(L):null){if(ja.keyIds)for(ea=r(ja.keyIds),Ia=ea.next();!Ia.done;Ia=ea.next())Ma=Ia.value,H.add(Ma);G.push(ja)}}if(F&&!G.length)throw new P(2,4,4026);Da=Gq(y.g,"EXT-X-DEFINE");Qa=cr(a,Da);xr(a,y);return z(lb,yr(a,d,c,y,Qa),3);case 3:return ac=lb.h,zr.includes(ac)&&(c=""),Dd=new Map,gb=new Map,E(lb,4),z(lb,dr(a,b,y,d,ac,Dd,Qa,gb,c,p),6);case 6:Sc=lb.h;va(lb,5);break;case 4:Fe=I(lb);
691
- if(4035==Fe.code)return Sa("Skipping unsupported HLS stream",ac,b),lb["return"](null);throw Fe;case 5:op=Sc[0].startTime;pp=Sc[Sc.length-1].endTime;qp=new Ni(Sc);rp=d==Mb?"subtitle":void 0;Xi=[];if(l)for(Yi=r(l.split(",")),hg=Yi.next();!hg.done;hg=Yi.next())sp=hg.value,Xi.push(sp);up=(tp=Iq(y.g,"EXT-X-SERVER-CONTROL"))?null!=tp.getAttribute("CAN-SKIP-UNTIL"):!1;vp={id:a.Aa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:qp,mimeType:ac,codecs:c,kind:rp,encrypted:F,
692
- drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Xi,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return lb["return"]({stream:vp,xd:b,Gf:t,kf:op,Gg:pp,Xd:Dd,Qf:gb,Lf:up})}})}
693
- function xr(a,b){var c=Iq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Iq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)er(a,Yq);else{c?er(a,Ar):er(a,Br);d=Iq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Iq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ba=Number(Dq(c,"PART-TARGET")),a.I=Math.min(a.ba,a.I),c=Iq(b.g,"EXT-X-SERVER-CONTROL"),a.Z=c?Number(Dq(c,"PART-HOLD-BACK")):0):a.I=Math.min(d,a.I);a.aa=Math.max(d,a.aa)}}
694
- function Cr(a,b,c,d){c=Iq(c,"EXT-X-MAP");if(!c)return null;var e=Dq(c,"URI");d=ur(Hb([b],[e])[0],d);b=[d,Cq(c,"BYTERANGE","")].join("-");a.va.has(b)||(c=Dr(d,c),a.va.set(b,c));return a.va.get(b)}function Dr(a,b){var c=0,d=null,e=Cq(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new oi(function(){return[a]},c,d)}
695
- function Er(a,b,c,d,e,f,g,h,k){var l=d.g,m=ur(d.h,g),n=Iq(l,"EXTINF"),p=g=0,t=null;if(!n){if(0==d.i.length)throw new P(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},w=0;w<d.i.length;y={Hd:y.Hd},w++){var x=d.i[w],D=0==w?c:v[v.length-1],B=0==w?e:D.endTime,A=Number(Cq(x,"DURATION"))||a.ba;if(A){A=B+A;var F=0,G=null;"EXT-X-PRELOAD-HINT"==x.name?F=(D=Cq(x,"BYTERANGE-START"))?Number(D):0:(F=Cq(x,"BYTERANGE"),D=r(Fr(D,F)),F=D.next().value,G=D.next().value);if(x=Cq(x,"URI"))y.Hd=Hb([h],
696
- [x])[0],v.push(new qi(B,A,function(H){return function(){return[H.Hd]}}(y),F,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=Iq(l,"EXT-X-BYTERANGE"))?(t=r(Fr(c,a.value)),p=t.next().value,t=t.next().value):v.length&&(p=v[0].Ha,t=v[v.length-1].wa);c="";a=null;"image"==k&&(c="1x1",k=Iq(l,"EXT-X-TILES"))&&(c=Dq(k,"LAYOUT"),(k=Cq(k,"DURATION"))&&(a=Number(k)));return new qi(e,g,function(){return m.length?[m]:[]},p,t,b,f,0,Infinity,v,c,a)}
697
- function Fr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.wa+1,d=c+d-1);return[c,d]}function mr(a){if(a.j){for(var b=r(a.W),c=b.next();!c.done;c=b.next())a.j.hc(c.value);a.W=[]}}
698
- function dr(a,b,c,d,e,f,g,h,k,l){var m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja;return M(function(ea){switch(ea.g){case 1:m=c.segments;p=Jq(c.g,"EXT-X-MEDIA-SEQUENCE",0);v=(t=Iq(c.g,"EXT-X-SKIP"))?Number(Cq(t,"SKIPPED-SEGMENTS")):0;y=p+v;if(a.m!=Yq&&f.has(y)){w=f.get(y);ea.D(2);break}if(null!=a.R){ea.D(3);break}n=Cr(a,c.h,m[0].g,g);x=a;return z(ea,Gr(a,b,n,e,y,!1,m[0],g,d,k,l),4);case 4:x.R=ea.h;case 3:w=a.R;case 2:D=m[0].h;D.split("/").pop();B=Jq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(B)||
699
- h.set(B,y),v))for(A=h;A.has(B+1)&&A.get(B+1)<y;)B++;F=a.J.get(B)||0;G=[];H=0;case 5:if(!(H<m.length)){ea.D(7);break}K=m[H];J=G[G.length-1];L=0==H?w:J.endTime;y=p+v+H;f.set(y,L);n=Cr(a,c.h,K.g,g);W=Iq(K.g,"EXT-X-DISCONTINUITY");if(!W){ea.D(8);break}B++;h.set(B,y);return z(ea,Hr(a,B,b,n,e,y,K,g,L,d,k,l),9);case 9:F=ea.h;case 8:!a.l&&(Z=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());ka=Iq(K.g,"EXTINF");a.l||ka?(ja=Er(a,n,J,K,L,F,g,c.h,d))&&G.push(ja):a.l||Sa("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
700
- H++;ea.D(5);break;case 7:return ea["return"](G)}})}function Hr(a,b,c,d,e,f,g,h,k,l,m,n){var p,t;return M(function(v){if(1==v.g)return p=0,a.J.has(b)?(p=a.J.get(b),v.D(2)):z(v,Gr(a,c,d,e,f,!0,g,h,l,m,n),3);2!=v.g&&(t=v.h,p=k-t,a.J.set(b,p));return v["return"](p)})}
701
- function Ir(a,b,c,d,e,f){var g,h,k,l,m,n;return M(function(p){switch(p.g){case 1:g=lf;h=gj(b.Ka(),b.Ha,b.wa,a.g.retryParameters);a.i.modifySegmentRequest(h,{type:c,init:b instanceof oi,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});if(a.g.hls.useFullSegmentsForStartTime)return p["return"](Jr(a,h,g));k=gj(b.Ka(),b.Ha,b.Ha+2048-1,a.g.retryParameters);a.i.modifySegmentRequest(k,{type:c,init:b instanceof oi,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});E(p,2);return z(p,
702
- Jr(a,k,g),4);case 4:return l=p.h,p["return"](l);case 2:m=I(p);if(7001==m.code)throw m;Sa("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",k.uris[0]);return z(p,Jr(a,h,g),5);case 5:return n=p.h,p["return"](n)}})}
703
- function Gr(a,b,c,d,e,f,g,h,k,l,m){var n,p,t,v,y,w,x,D;return M(function(B){switch(B.g){case 1:n=Er(a,c,null,g,0,0,h,"",k);if(a.G&&!f&&(p=a.h.get(b),t=p.Xd.get(e),void 0!=t))return B["return"](t);d=d.toLowerCase();if(zr.includes(d))throw Sa("Raw formats are not yet supported. Skipping "+d),new P(1,4,4035);if("video/webm"==d)throw Sa("WebM in HLS is not yet supported. Skipping."),new P(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){B.D(2);break}v=[Ir(a,n,k,d,l,m)];c&&v.push(Ir(a,c,k,d,l,m));return z(B,
704
- Promise.all(v),3);case 3:return y=B.h,w=y[0],x=y[1]||y[0],B["return"](Kr(b,w.uri,w.data,x.data));case 2:if("video/mp2t"!=d){B.D(4);break}return z(B,Ir(a,n,k,d,l,m),5);case 5:return D=B.h,B["return"](Lr(b,D.uri,D.data));case 4:throw new P(2,4,4030,b);}})}
705
- function Kr(a,b,c,d){var e=0;(new tg).box("moov",xg).box("trak",xg).box("mdia",xg).X("mdhd",function(h){e=Kh(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new P(2,4,4030,a,b);var f=0,g=!1;(new tg).box("moof",xg).box("traf",xg).X("tfdt",function(h){f=Jh(h.reader,h.version).Qd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new P(2,4,4030,a,b);return f}
706
- function Lr(a,b,c){function d(){f.seek(g+188);h=f.ka();71!=h&&(f.seek(g+192),h=f.ka());71!=h&&(f.seek(g+204),h=f.ka());71!=h&&e();f.qf(1)}function e(){throw new P(2,4,4030,a,b);}var f=new qg(c,0),g=0,h=0;for(c=Math.min(f.U.byteLength-188,940);;){g=f.ia();h=f.ka();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.kc();if(8191==(k&8191))d();else if(k&16384)if(k=(f.ka()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.ka(),f.skip(k)),1!=f.P()>>8)d();else{f.skip(3);c=f.ka()>>6;0!=c&&1!=c||e();0==f.ka()&&e();c=f.ka();k=
707
- f.kc();var l=f.kc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function ur(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new P(2,4,4039,f);}}return c}
708
- function yr(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y;return M(function(w){if(1==w.g){f=Nb;g=lf;h=ur(d.segments[0].h,e);k=new jb(h);l=k.Na.split(".").pop();m=Mr[b];if(n=m[l])return w["return"](n);if(b==f.oa)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");if(b==f.wc&&(!c||"jpeg"==c))return w["return"]("image/jpeg");p=ef([h],a.g.retryParameters);p.method="HEAD";return z(w,Jr(a,p,g),2)}t=w.h;v=t.headers["content-type"];return v?w["return"](v.split(";")[0]):(y=m.mp4,w["return"](y))})}
709
- function Zq(a,b){var c=ef([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Jr(a,c,0)}function Xq(a){var b,c;M(function(d){if(1==d.g){if(!a.i)return d["return"]();E(d,2);return z(d,a.update(),4)}if(2!=d.g)return b=a.ma,a.F.S(b),va(d,0);c=I(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.F.S(.1);C(d)})}function er(a,b){a.m=b;a.j&&a.j.Oc(a.m==Yq);a.m!=Yq||a.F.stop()}
710
- function Jr(a,b,c){if(!a.H)throw new P(2,7,7001);b=a.i.networkingEngine.request(c,b);$e(a.H,b);return b.promise}N("shaka.hls.HlsParser",Wq);
711
- var zr=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Mr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
712
- vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},wr={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Dq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Dq(a,"URI");b=Vq(b);b=Ic(b.data);b=Ib("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Cq(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
713
- Dq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Dq(a,"URI");a=Vq(a);a=Ic(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=go(a,b);return Ib("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Yq="VOD",Br="EVENT",Ar="LIVE",br={Ff:Yq,Ah:Br,Ke:Ar};og.m3u8=function(){return new Wq};mg["application/x-mpegurl"]=function(){return new Wq};mg["application/vnd.apple.mpegurl"]=function(){return new Wq};function Nr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,mf:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Wc(b)}catch(g){}throw new P(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Or(){}function Pr(a,b,c,d,e){var f=new Qr;wf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Rr,h={Ne:!1,Bf:!1};a=Sr(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Qe(a,function(){h.Ne=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Q(function(){h.Bf=!0;g.abort()});k.S(b/1E3);a["finally"](function(){k.stop()})}return a}
714
- function Sr(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,y,w,x,D,B;return M(function(A){switch(A.g){case 1:return h=Tr,k=Ur,p=n=0,t=Date.now(),E(A,2),z(A,h(a,c),4);case 4:return l=A.h,f(Vr(l.headers)),v=l.clone().body.getReader(),w=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,x=function(F){function G(){var H,K;return M(function(J){switch(J.g){case 1:return E(J,2),z(J,v.read(),4);case 4:H=J.h;va(J,3);break;case 2:return I(J),J["return"]();case 3:if(H.done){J.D(5);break}n+=H.value.byteLength;if(!g){J.D(5);
715
- break}return z(J,g(H.value),5);case 5:K=Date.now();if(100<K-t||H.done)e(K-t,n-p,w-n),p=n,t=K;H.done?F.close():(F.enqueue(H.value),G());C(J)}})}G()},new k({start:x}),z(A,l.arrayBuffer(),5);case 5:m=A.h;va(A,3);break;case 2:D=I(A);if(d.Ne)throw new P(1,1,7001,a,b);if(d.Bf)throw new P(1,1,1003,a,b);throw new P(1,1,1002,a,D,b);case 3:return B=Vr(l.headers),A["return"](Nr(B,m,l.status,a,l.url,b))}})}function Vr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
716
- function Wr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}N("shaka.net.HttpFetchPlugin",Or);Or.isSupported=Wr;Or.parse=Pr;var Tr=window.fetch,Rr=window.AbortController,Ur=window.ReadableStream,Qr=window.Headers;Wr()&&(bf("http",Pr,2,!0),bf("https",Pr,2,!0),bf("blob",Pr,2,!0));function Xr(){}
717
- function Yr(a,b,c,d,e){var f=new Zr,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new P(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var t=$r(f);e(t);n=!0}};f.onload=function(){var t=$r(f),v=f.response;try{var y=Nr(t,v,f.status,a,f.responseURL,c);l(y)}catch(w){m(w)}};f.onerror=function(t){m(new P(1,1,1002,a,t,
718
- c))};f.ontimeout=function(){m(new P(1,1,1003,a,c))};f.onprogress=function(t){var v=Date.now();if(100<v-g||t.lengthComputable&&t.loaded==t.total)d(v-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=v};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Qe(k,function(){f.abort();return Promise.resolve()})}
719
- function $r(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}N("shaka.net.HttpXHRPlugin",Xr);Xr.parse=Yr;var Zr=window.XMLHttpRequest;bf("http",Yr,1,!0);bf("https",Yr,1,!0);bf("blob",Yr,1,!0);function as(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function bs(a){return a.Ka().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ha+":"+a.wa}function cs(a,b){return gj(a.g.Ka(),a.g.Ha,a.g.wa,b.streaming.retryParameters)};function ds(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function es(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}ds.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g["delete"](a);this.j+=c;this.h+=b}};function fs(a){var b=this;this.A=a;this.j=new Map;this.i=new mf(function(){return gs(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new ds}fs.prototype.destroy=function(){return this.i.destroy()};function hs(a,b,c){a.m=b;a.l=c}function gs(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
720
- function is(a,b,c,d,e,f){nf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return M(function(v){if(1==v.g)return z(v,js(a,c),2);h=v.h;if(a.i.g)throw new P(2,9,7001);if(e)for(m in k=Ic(h),l=new fo(k),l.data)n=Number(m),p=l.data[n],t=l.g[n],a.l(p,t);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v["return"](f(h))})});a.j.set(b,g)}function ks(a){return M(function(b){return 1==b.g?z(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
721
- function js(a,b){var c,d,e,f;return M(function(g){if(1==g.g)return c=lf,d=a.A.request(c,b),e=function(){return d.abort()},a.h.push(e),z(g,d.promise,2);f=g.h;ic(a.h,e);return g["return"](f.data)})};function ls(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Pc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}ls.prototype.abort=function(){var a=this;return M(function(b){if(1==b.g){try{a.i.abort()}catch(c){}E(b,2);return z(b,a.g,4)}if(2!=b.g)return va(b,0);I(b);C(b)})};
722
- function ms(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return M(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return z(g,b(f.key,f.value,f),2)}f["continue"]();C(g)})}})}ls.prototype.store=function(){return this.h};ls.prototype.promise=function(){return this.g};function ns(a){this.h=a;this.g=[]}ns.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function os(a,b){return ps(a,b,"readwrite")}function ps(a,b,c){c=a.h.transaction([b],c);var d=new ls(c,b);a.g.push(d);d.promise().then(function(){ic(a.g,d)},function(){ic(a.g,d)});return d};function qs(a,b,c){this.h=new ns(a);this.i=b;this.g=c}q=qs.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return rs(this.i)};q.removeSegments=function(a,b){return ss(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return M(function(d){if(1==d.g)return z(d,ts(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Qe(e)}))})};q.addManifests=function(){return rs(this.g)};
723
- q.updateManifest=function(){return Promise.reject(new P(2,9,9016,"Cannot modify values in "+this.g))};function us(a,b,c){a=os(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=os(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return ss(this,this.g,a,b)};
724
- q.getManifests=function(a){var b=this,c;return M(function(d){if(1==d.g)return z(d,ts(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.zc(e)})))})};q.getAllManifests=function(){var a=this,b,c;return M(function(d){return 1==d.g?(b=ps(a.h,a.g,"readonly"),c=new Map,z(d,ms(b,function(e,f){var g;return M(function(h){if(1==h.g)return z(h,a.zc(f),2);g=h.h;c.set(e,g);C(h)})}),2)):3!=d.g?z(d,b.promise(),3):d["return"](c)})};q.Qe=function(a){return a};q.zc=function(a){return Promise.resolve(a)};
725
- function rs(a){return Promise.reject(new P(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){if(1==m.g){d=os(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Tc:g.Tc},k=h.next())l=k.value,g.Tc=e.add(l),g.Tc.onsuccess=function(n){return function(){f.push(n.Tc.result)}}(g);return z(m,d.promise(),2)}return m["return"](f)})};
726
- function ss(a,b,c,d){a=os(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Sc:e.Sc},f=c.next())e.Sc=f.value,b["delete"](e.Sc).onsuccess=function(g){return function(){return d(g.Sc)}}(e);return a.promise()}
727
- function ts(a,b,c){var d,e,f,g,h,k,l;return M(function(m){if(1==m.g){d=ps(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={uc:h.uc,qc:h.qc},l=k.next())h.qc=l.value,h.uc=e.get(h.qc),h.uc.onsuccess=function(n){return function(){void 0==n.uc.result&&g.push(n.qc);f[n.qc]=n.uc.result}}(h);return z(m,d.promise(),2)}if(g.length)throw new P(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function vs(a){this.g=new ns(a)}vs.prototype.destroy=function(){return this.g.destroy()};vs.prototype.getAll=function(){var a=this,b,c;return M(function(d){return 1==d.g?(b=ps(a.g,"session-ids","readonly"),c=[],z(d,ms(b,function(e,f){c.push(f)}),2)):3!=d.g?z(d,b.promise(),3):d["return"](c)})};vs.prototype.add=function(a){var b=os(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
728
- vs.prototype.remove=function(a){var b=this,c;return M(function(d){return 1==d.g?(c=os(b.g,"session-ids"),z(d,ms(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):z(d,c.promise(),0)})};function ws(){this.g=new Map}ws.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};ws.prototype.init=function(){var a=this;xs.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
729
- function ys(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Sa:d,Da:f},Da:e})})});if(b)return b;throw new P(2,9,9013,"Could not find a cell that supports add-operations");}function zs(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Sa:d,Da:f},e)})})}
730
- function As(a,b,c){a=a.g.get(b);if(!a)throw new P(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new P(2,9,9013,"Could not find cell with name "+c);return b}function Bs(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Cs(a){var b=Array.from(a.g.keys());if(!b.length)throw new P(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
731
- function Ds(a){var b,c,d;return M(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=xs,d.forEach(function(f){(f=f())&&b.push(f)})),z(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):z(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Es(a,b){xs.set(a,b)}N("shaka.offline.StorageMuxer",ws);ws.unregister=function(a){xs["delete"](a)};ws.register=Es;ws.prototype.destroy=ws.prototype.destroy;var xs=new Map;function Fs(){qs.apply(this,arguments)}u(Fs,qs);Fs.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return M(function(g){d=os(c.h,c.g);e=d.store();f=new Pc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new P(2,9,9012,"Could not find values for "+a))};return z(g,Promise.all([d.promise(),f]),0)})};
732
- Fs.prototype.zc=function(a){var b,c,d,e,f,g;return M(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Gs(a.periods[c],e),b.push(f);return z(h,Np(b),2)}g=h.h;return h["return"]({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata})})};
733
- function Gs(a,b){Hs(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Is(e,a.startTime,b)})}
734
- function Is(a,b,c){var d=a.initSegmentUri?Js(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=Js(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
735
- dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}Fs.prototype.Qe=function(a){return{data:a.data}};function Js(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new P(2,9,9004,"Could not parse uri "+a);}
736
- function Hs(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
737
- f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Ks(){qs.apply(this,arguments)}u(Ks,qs);
738
- Ks.prototype.zc=function(a){var b,c,d,e,f,g;return M(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=r(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Ls(n,k.startTime,k.startTime+e));f=l;b.push(f)}return z(h,Np(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
682
+ function sr(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w;return M(function(x){if(1==x.g)return d=Nb,e=pr(a,b),f=Eq(b,"AUDIO"),g=Eq(b,"VIDEO"),k=(h=f||g)&&a.C.has(h)?a.C.get(h):[],l={audio:f?k:[],video:g?k:[]},n=!1,p=Fq(b,"URI"),t=l.audio.find(function(D){return D&&D.xd==p}),v=Kb(d.gb,e),(y=Kb(d.Fb,e))&&!v?m=d.Fb:!k.length&&y&&v?(m=d.gb,e=[[v,y].join()]):l.audio.length&&t?(m=d.Fb,n=!0):m=l.video.length?d.Fb:d.gb,n?x.D(2):z(x,tr(a,b,e,m,c),3);2!=x.g&&(w=x.h);if(w)l[w.stream.type]=[w];else if(null===w)return x["return"](null);
683
+ ur(l);return x["return"](l)})}function pr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=Eq(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Bd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function vr(a){a=Eq(a,"LANGUAGE")||"und";return Qb(a)}
684
+ function ur(a){a=r(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function kr(a,b){var c=Jq(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=vr(e);var f=Fq(e,"GROUP-ID");e=Fq(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
685
+ function qr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;return M(function(w){if(1==w.g){c=Fq(b,"GROUP-ID");d="";var x=Fq(b,"TYPE").toLowerCase();"subtitles"==x&&(x=Mb);e=x;e!=Mb&&c&&a.B.has(c)&&(d=a.B.get(c));f=wr(Fq(b,"URI"),a.A);if(a.h.has(f))return w["return"](a.h.get(f));g=vr(b);h=Eq(b,"NAME");k=Eq(b,"DEFAULT");l="YES"==k;"audio"==e?x=(x=Eq(b,"CHANNELS"))?parseInt(x.split("/")[0],10):null:x=null;m=x;"audio"==e?x=(x=Eq(b,"CHANNELS"))?x.includes("/JOC"):!1:x=!1;n=x;p=Eq(b,"CHARACTERISTICS");t=Eq(b,"FORCED");
686
+ v="YES"==t;return z(w,xr(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=w.h;a.C.has(c)?a.C.get(c).push(y):a.C.set(c,[y]);if(null==y)return w["return"](null);if(a.h.has(f))return w["return"](a.h.get(f));a.h.set(f,y);return w["return"](y)})}
687
+ function rr(a,b){var c,d,e,f,g,h,k,l,m,n;return M(function(p){if(1==p.g){c=wr(Fq(b,"URI"),a.A);d=Eq(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=vr(b);f=Eq(b,"NAME");g=Eq(b,"CHARACTERISTICS");return z(p,xr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Eq(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
688
+ Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Eq(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
689
+ function tr(a,b,c,d,e){var f,g,h,k;return M(function(l){if(1==l.g){f=wr(Fq(b,"URI"),a.A);if(a.h.has(f))return l["return"](a.h.get(f));var m=Eq(b,"CLOSED-CAPTIONS");g="video"==d&&m&&"NONE"!=m?a.K.get(m):null;h=Jb(d,c);return z(l,xr(a,f,h,d,"und",!1,null,null,g,null,!1,!1,e),2)}k=l.h;if(null==k)return l["return"](null);if(a.h.has(f))return l["return"](a.h.get(f));a.h.set(f,k);return l["return"](k)})}
690
+ function xr(a,b,c,d,e,f,g,h,k,l,m,n,p){var t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja,ea,Ia,Ma,Da,Qa,ac,Dd,gb,Sc,Fe,pp,qp,rp,sp,Yi,Zi,ig,tp,up,vp,wp;return M(function(lb){switch(lb.g){case 1:return t=Hb([a.N],[b])[0],z(lb,ar(a,t),2);case 2:v=lb.h;t=v.uri;y=Rq(a.$,v.data,t);if(1!=y.type)throw new P(2,4,4017);w=[];if(y.segments)for(x=r(y.segments),D=x.next();!D.done;D=x.next())B=D.value,A=Iq(B.g,"EXT-X-KEY"),w.push.apply(w,ia(A));F=!1;G=[];H=new Set;K=r(w);for(J=K.next();!J.done;J=K.next())if(L=J.value,
691
+ W=Fq(L,"METHOD"),"NONE"!=W){F=!0;if("AES-128"==W)return a.Ba=!0,lb["return"](null);Z=Fq(L,"KEYFORMAT");if(ja=(ka=yr[Z])?ka(L):null){if(ja.keyIds)for(ea=r(ja.keyIds),Ia=ea.next();!Ia.done;Ia=ea.next())Ma=Ia.value,H.add(Ma);G.push(ja)}}if(F&&!G.length)throw new P(2,4,4026);Da=Iq(y.g,"EXT-X-DEFINE");Qa=er(a,Da);zr(a,y);return z(lb,Ar(a,d,c,y,Qa),3);case 3:return ac=lb.h,Br.includes(ac)&&(c=""),Dd=new Map,gb=new Map,E(lb,4),z(lb,fr(a,b,y,d,ac,Dd,Qa,gb,c,p),6);case 6:Sc=lb.h;va(lb,5);break;case 4:Fe=I(lb);
692
+ if(4035==Fe.code)return Sa("Skipping unsupported HLS stream",ac,b),lb["return"](null);throw Fe;case 5:pp=Sc[0].startTime;qp=Sc[Sc.length-1].endTime;rp=new Pi(Sc);sp=d==Mb?"subtitle":void 0;Yi=[];if(l)for(Zi=r(l.split(",")),ig=Zi.next();!ig.done;ig=Zi.next())tp=ig.value,Yi.push(tp);vp=(up=Kq(y.g,"EXT-X-SERVER-CONTROL"))?null!=up.getAttribute("CAN-SKIP-UNTIL"):!1;wp={id:a.Aa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:rp,mimeType:ac,codecs:c,kind:sp,encrypted:F,
693
+ drmInfos:G,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Yi,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return lb["return"]({stream:wp,xd:b,Hf:t,lf:pp,Hg:qp,Yd:Dd,Rf:gb,Mf:vp})}})}
694
+ function zr(a,b){var c=Kq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Kq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)gr(a,$q);else{c?gr(a,Cr):gr(a,Dr);d=Kq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Kq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ba=Number(Fq(c,"PART-TARGET")),a.I=Math.min(a.ba,a.I),c=Kq(b.g,"EXT-X-SERVER-CONTROL"),a.Z=c?Number(Fq(c,"PART-HOLD-BACK")):0):a.I=Math.min(d,a.I);a.aa=Math.max(d,a.aa)}}
695
+ function Er(a,b,c,d){c=Kq(c,"EXT-X-MAP");if(!c)return null;var e=Fq(c,"URI");d=wr(Hb([b],[e])[0],d);b=[d,Eq(c,"BYTERANGE","")].join("-");a.va.has(b)||(c=Fr(d,c),a.va.set(b,c));return a.va.get(b)}function Fr(a,b){var c=0,d=null,e=Eq(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new qi(function(){return[a]},c,d)}
696
+ function Gr(a,b,c,d,e,f,g,h,k){var l=d.g,m=wr(d.h,g),n=Kq(l,"EXTINF"),p=g=0,t=null;if(!n){if(0==d.i.length)throw new P(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},w=0;w<d.i.length;y={Hd:y.Hd},w++){var x=d.i[w],D=0==w?c:v[v.length-1],B=0==w?e:D.endTime,A=Number(Eq(x,"DURATION"))||a.ba;if(A){A=B+A;var F=0,G=null;"EXT-X-PRELOAD-HINT"==x.name?F=(D=Eq(x,"BYTERANGE-START"))?Number(D):0:(F=Eq(x,"BYTERANGE"),D=r(Hr(D,F)),F=D.next().value,G=D.next().value);if(x=Eq(x,"URI"))y.Hd=Hb([h],
697
+ [x])[0],v.push(new si(B,A,function(H){return function(){return[H.Hd]}}(y),F,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=Kq(l,"EXT-X-BYTERANGE"))?(t=r(Hr(c,a.value)),p=t.next().value,t=t.next().value):v.length&&(p=v[0].Ha,t=v[v.length-1].wa);c="";a=null;"image"==k&&(c="1x1",k=Kq(l,"EXT-X-TILES"))&&(c=Fq(k,"LAYOUT"),(k=Eq(k,"DURATION"))&&(a=Number(k)));return new si(e,g,function(){return m.length?[m]:[]},p,t,b,f,0,Infinity,v,c,a)}
698
+ function Hr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.wa+1,d=c+d-1);return[c,d]}function or(a){if(a.j){for(var b=r(a.W),c=b.next();!c.done;c=b.next())a.j.hc(c.value);a.W=[]}}
699
+ function fr(a,b,c,d,e,f,g,h,k,l){var m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja;return M(function(ea){switch(ea.g){case 1:m=c.segments;p=Lq(c.g,"EXT-X-MEDIA-SEQUENCE",0);v=(t=Kq(c.g,"EXT-X-SKIP"))?Number(Eq(t,"SKIPPED-SEGMENTS")):0;y=p+v;if(a.m!=$q&&f.has(y)){w=f.get(y);ea.D(2);break}if(null!=a.R){ea.D(3);break}n=Er(a,c.h,m[0].g,g);x=a;return z(ea,Ir(a,b,n,e,y,!1,m[0],g,d,k,l),4);case 4:x.R=ea.h;case 3:w=a.R;case 2:D=m[0].h;D.split("/").pop();B=Lq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(B)||
700
+ h.set(B,y),v))for(A=h;A.has(B+1)&&A.get(B+1)<y;)B++;F=a.J.get(B)||0;G=[];H=0;case 5:if(!(H<m.length)){ea.D(7);break}K=m[H];J=G[G.length-1];L=0==H?w:J.endTime;y=p+v+H;f.set(y,L);n=Er(a,c.h,K.g,g);W=Kq(K.g,"EXT-X-DISCONTINUITY");if(!W){ea.D(8);break}B++;h.set(B,y);return z(ea,Jr(a,B,b,n,e,y,K,g,L,d,k,l),9);case 9:F=ea.h;case 8:!a.l&&(Z=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());ka=Kq(K.g,"EXTINF");a.l||ka?(ja=Gr(a,n,J,K,L,F,g,c.h,d))&&G.push(ja):a.l||Sa("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
701
+ H++;ea.D(5);break;case 7:return ea["return"](G)}})}function Jr(a,b,c,d,e,f,g,h,k,l,m,n){var p,t;return M(function(v){if(1==v.g)return p=0,a.J.has(b)?(p=a.J.get(b),v.D(2)):z(v,Ir(a,c,d,e,f,!0,g,h,l,m,n),3);2!=v.g&&(t=v.h,p=k-t,a.J.set(b,p));return v["return"](p)})}
702
+ function Kr(a,b,c,d,e,f){var g,h,k,l,m,n;return M(function(p){switch(p.g){case 1:g=nf;h=ij(b.Ka(),b.Ha,b.wa,a.g.retryParameters);a.i.modifySegmentRequest(h,{type:c,init:b instanceof qi,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});if(a.g.hls.useFullSegmentsForStartTime)return p["return"](Lr(a,h,g));k=ij(b.Ka(),b.Ha,b.Ha+2048-1,a.g.retryParameters);a.i.modifySegmentRequest(k,{type:c,init:b instanceof qi,duration:b.endTime-b.startTime,mimeType:d,codecs:e,bandwidth:f});E(p,2);return z(p,
703
+ Lr(a,k,g),4);case 4:return l=p.h,p["return"](l);case 2:m=I(p);if(7001==m.code)throw m;Sa("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",k.uris[0]);return z(p,Lr(a,h,g),5);case 5:return n=p.h,p["return"](n)}})}
704
+ function Ir(a,b,c,d,e,f,g,h,k,l,m){var n,p,t,v,y,w,x,D;return M(function(B){switch(B.g){case 1:n=Gr(a,c,null,g,0,0,h,"",k);if(a.G&&!f&&(p=a.h.get(b),t=p.Yd.get(e),void 0!=t))return B["return"](t);d=d.toLowerCase();if(Br.includes(d))throw Sa("Raw formats are not yet supported. Skipping "+d),new P(1,4,4035);if("video/webm"==d)throw Sa("WebM in HLS is not yet supported. Skipping."),new P(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){B.D(2);break}v=[Kr(a,n,k,d,l,m)];c&&v.push(Kr(a,c,k,d,l,m));return z(B,
705
+ Promise.all(v),3);case 3:return y=B.h,w=y[0],x=y[1]||y[0],B["return"](Mr(b,w.uri,w.data,x.data));case 2:if("video/mp2t"!=d){B.D(4);break}return z(B,Kr(a,n,k,d,l,m),5);case 5:return D=B.h,B["return"](Nr(b,D.uri,D.data));case 4:throw new P(2,4,4030,b);}})}
706
+ function Mr(a,b,c,d){var e=0;(new vg).box("moov",zg).box("trak",zg).box("mdia",zg).X("mdhd",function(h){e=Mh(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new P(2,4,4030,a,b);var f=0,g=!1;(new vg).box("moof",zg).box("traf",zg).X("tfdt",function(h){f=Lh(h.reader,h.version).Qd/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new P(2,4,4030,a,b);return f}
707
+ function Nr(a,b,c){function d(){f.seek(g+188);h=f.ka();71!=h&&(f.seek(g+192),h=f.ka());71!=h&&(f.seek(g+204),h=f.ka());71!=h&&e();f.rf(1)}function e(){throw new P(2,4,4030,a,b);}var f=new sg(c,0),g=0,h=0;for(c=Math.min(f.U.byteLength-188,940);;){g=f.ia();h=f.ka();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.kc();if(8191==(k&8191))d();else if(k&16384)if(k=(f.ka()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.ka(),f.skip(k)),1!=f.P()>>8)d();else{f.skip(3);c=f.ka()>>6;0!=c&&1!=c||e();0==f.ka()&&e();c=f.ka();k=
708
+ f.kc();var l=f.kc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function wr(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new P(2,4,4039,f);}}return c}
709
+ function Ar(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y;return M(function(w){if(1==w.g){f=Nb;g=nf;h=wr(d.segments[0].h,e);k=new jb(h);l=k.Na.split(".").pop();m=Or[b];if(n=m[l])return w["return"](n);if(b==f.oa)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");if(b==f.wc&&(!c||"jpeg"==c))return w["return"]("image/jpeg");p=gf([h],a.g.retryParameters);p.method="HEAD";return z(w,Lr(a,p,g),2)}t=w.h;v=t.headers["content-type"];return v?w["return"](v.split(";")[0]):(y=m.mp4,w["return"](y))})}
710
+ function ar(a,b){var c=gf([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Lr(a,c,0)}function Zq(a){var b,c;M(function(d){if(1==d.g){if(!a.i)return d["return"]();E(d,2);return z(d,a.update(),4)}if(2!=d.g)return b=a.ma,a.F.S(b),va(d,0);c=I(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.F.S(.1);C(d)})}function gr(a,b){a.m=b;a.j&&a.j.Oc(a.m==$q);a.m!=$q||a.F.stop()}
711
+ function Lr(a,b,c){if(!a.H)throw new P(2,7,7001);b=a.i.networkingEngine.request(c,b);bf(a.H,b);return b.promise}N("shaka.hls.HlsParser",Yq);
712
+ var Br=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Or={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
713
+ vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},yr={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Fq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Fq(a,"URI");b=Xq(b);b=Ic(b.data);b=Ib("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Eq(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
714
+ Fq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Fq(a,"URI");a=Xq(a);a=Ic(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=io(a,b);return Ib("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},$q="VOD",Dr="EVENT",Cr="LIVE",dr={Gf:$q,Bh:Dr,Le:Cr};qg.m3u8=function(){return new Yq};og["application/x-mpegurl"]=function(){return new Yq};og["application/vnd.apple.mpegurl"]=function(){return new Yq};function Pr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,nf:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=id(b)}catch(g){}throw new P(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Qr(){}function Rr(a,b,c,d,e){var f=new Sr;yf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Tr,h={Oe:!1,Cf:!1};a=Ur(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Se(a,function(){h.Oe=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Q(function(){h.Cf=!0;g.abort()});k.S(b/1E3);a["finally"](function(){k.stop()})}return a}
715
+ function Ur(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,y,w,x,D,B;return M(function(A){switch(A.g){case 1:return h=Vr,k=Wr,p=n=0,t=Date.now(),E(A,2),z(A,h(a,c),4);case 4:return l=A.h,f(Xr(l.headers)),v=l.clone().body.getReader(),w=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,x=function(F){function G(){var H,K;return M(function(J){switch(J.g){case 1:return E(J,2),z(J,v.read(),4);case 4:H=J.h;va(J,3);break;case 2:return I(J),J["return"]();case 3:if(H.done){J.D(5);break}n+=H.value.byteLength;if(!g){J.D(5);
716
+ break}return z(J,g(H.value),5);case 5:K=Date.now();if(100<K-t||H.done)e(K-t,n-p,w-n),p=n,t=K;H.done?F.close():(F.enqueue(H.value),G());C(J)}})}G()},new k({start:x}),z(A,l.arrayBuffer(),5);case 5:m=A.h;va(A,3);break;case 2:D=I(A);if(d.Oe)throw new P(1,1,7001,a,b);if(d.Cf)throw new P(1,1,1003,a,b);throw new P(1,1,1002,a,D,b);case 3:return B=Xr(l.headers),A["return"](Pr(B,m,l.status,a,l.url,b))}})}function Xr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
717
+ function Yr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}N("shaka.net.HttpFetchPlugin",Qr);Qr.isSupported=Yr;Qr.parse=Rr;var Vr=window.fetch,Tr=window.AbortController,Wr=window.ReadableStream,Sr=window.Headers;Yr()&&(df("http",Rr,2,!0),df("https",Rr,2,!0),df("blob",Rr,2,!0));function Zr(){}
718
+ function $r(a,b,c,d,e){var f=new as,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new P(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var t=bs(f);e(t);n=!0}};f.onload=function(){var t=bs(f),v=f.response;try{var y=Pr(t,v,f.status,a,f.responseURL,c);l(y)}catch(w){m(w)}};f.onerror=function(t){m(new P(1,1,1002,a,t,
719
+ c))};f.ontimeout=function(){m(new P(1,1,1003,a,c))};f.onprogress=function(t){var v=Date.now();if(100<v-g||t.lengthComputable&&t.loaded==t.total)d(v-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=v};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Se(k,function(){f.abort();return Promise.resolve()})}
720
+ function bs(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}N("shaka.net.HttpXHRPlugin",Zr);Zr.parse=$r;var as=window.XMLHttpRequest;df("http",$r,1,!0);df("https",$r,1,!0);df("blob",$r,1,!0);function cs(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function ds(a){return a.Ka().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ha+":"+a.wa}function es(a,b){return ij(a.g.Ka(),a.g.Ha,a.g.wa,b.streaming.retryParameters)};function fs(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function gs(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}fs.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g["delete"](a);this.j+=c;this.h+=b}};function hs(a){var b=this;this.A=a;this.j=new Map;this.i=new of(function(){return is(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new fs}hs.prototype.destroy=function(){return this.i.destroy()};function js(a,b,c){a.m=b;a.l=c}function is(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
721
+ function ks(a,b,c,d,e,f){pf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return M(function(v){if(1==v.g)return z(v,ls(a,c),2);h=v.h;if(a.i.g)throw new P(2,9,7001);if(e)for(m in k=Ic(h),l=new ho(k),l.data)n=Number(m),p=l.data[n],t=l.g[n],a.l(p,t);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v["return"](f(h))})});a.j.set(b,g)}function ms(a){return M(function(b){return 1==b.g?z(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
722
+ function ls(a,b){var c,d,e,f;return M(function(g){if(1==g.g)return c=nf,d=a.A.request(c,b),e=function(){return d.abort()},a.h.push(e),z(g,d.promise,2);f=g.h;ic(a.h,e);return g["return"](f.data)})};function ns(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Pc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}ns.prototype.abort=function(){var a=this;return M(function(b){if(1==b.g){try{a.i.abort()}catch(c){}E(b,2);return z(b,a.g,4)}if(2!=b.g)return va(b,0);I(b);C(b)})};
723
+ function os(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return M(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return z(g,b(f.key,f.value,f),2)}f["continue"]();C(g)})}})}ns.prototype.store=function(){return this.h};ns.prototype.promise=function(){return this.g};function ps(a){this.h=a;this.g=[]}ps.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function qs(a,b){return rs(a,b,"readwrite")}function rs(a,b,c){c=a.h.transaction([b],c);var d=new ns(c,b);a.g.push(d);d.promise().then(function(){ic(a.g,d)},function(){ic(a.g,d)});return d};function ss(a,b,c){this.h=new ps(a);this.i=b;this.g=c}q=ss.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return ts(this.i)};q.removeSegments=function(a,b){return us(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return M(function(d){if(1==d.g)return z(d,vs(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Re(e)}))})};q.addManifests=function(){return ts(this.g)};
724
+ q.updateManifest=function(){return Promise.reject(new P(2,9,9016,"Cannot modify values in "+this.g))};function ws(a,b,c){a=qs(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=qs(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return us(this,this.g,a,b)};
725
+ q.getManifests=function(a){var b=this,c;return M(function(d){if(1==d.g)return z(d,vs(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.zc(e)})))})};q.getAllManifests=function(){var a=this,b,c;return M(function(d){return 1==d.g?(b=rs(a.h,a.g,"readonly"),c=new Map,z(d,os(b,function(e,f){var g;return M(function(h){if(1==h.g)return z(h,a.zc(f),2);g=h.h;c.set(e,g);C(h)})}),2)):3!=d.g?z(d,b.promise(),3):d["return"](c)})};q.Re=function(a){return a};q.zc=function(a){return Promise.resolve(a)};
726
+ function ts(a){return Promise.reject(new P(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){if(1==m.g){d=qs(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Tc:g.Tc},k=h.next())l=k.value,g.Tc=e.add(l),g.Tc.onsuccess=function(n){return function(){f.push(n.Tc.result)}}(g);return z(m,d.promise(),2)}return m["return"](f)})};
727
+ function us(a,b,c,d){a=qs(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Sc:e.Sc},f=c.next())e.Sc=f.value,b["delete"](e.Sc).onsuccess=function(g){return function(){return d(g.Sc)}}(e);return a.promise()}
728
+ function vs(a,b,c){var d,e,f,g,h,k,l;return M(function(m){if(1==m.g){d=rs(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={uc:h.uc,qc:h.qc},l=k.next())h.qc=l.value,h.uc=e.get(h.qc),h.uc.onsuccess=function(n){return function(){void 0==n.uc.result&&g.push(n.qc);f[n.qc]=n.uc.result}}(h);return z(m,d.promise(),2)}if(g.length)throw new P(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function xs(a){this.g=new ps(a)}xs.prototype.destroy=function(){return this.g.destroy()};xs.prototype.getAll=function(){var a=this,b,c;return M(function(d){return 1==d.g?(b=rs(a.g,"session-ids","readonly"),c=[],z(d,os(b,function(e,f){c.push(f)}),2)):3!=d.g?z(d,b.promise(),3):d["return"](c)})};xs.prototype.add=function(a){var b=qs(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
729
+ xs.prototype.remove=function(a){var b=this,c;return M(function(d){return 1==d.g?(c=qs(b.g,"session-ids"),z(d,os(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):z(d,c.promise(),0)})};function ys(){this.g=new Map}ys.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};ys.prototype.init=function(){var a=this;zs.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
730
+ function As(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Sa:d,Da:f},Da:e})})});if(b)return b;throw new P(2,9,9013,"Could not find a cell that supports add-operations");}function Bs(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Sa:d,Da:f},e)})})}
731
+ function Cs(a,b,c){a=a.g.get(b);if(!a)throw new P(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new P(2,9,9013,"Could not find cell with name "+c);return b}function Ds(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Es(a){var b=Array.from(a.g.keys());if(!b.length)throw new P(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
732
+ function Fs(a){var b,c,d;return M(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=zs,d.forEach(function(f){(f=f())&&b.push(f)})),z(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):z(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Gs(a,b){zs.set(a,b)}N("shaka.offline.StorageMuxer",ys);ys.unregister=function(a){zs["delete"](a)};ys.register=Gs;ys.prototype.destroy=ys.prototype.destroy;var zs=new Map;function Hs(){ss.apply(this,arguments)}u(Hs,ss);Hs.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return M(function(g){d=qs(c.h,c.g);e=d.store();f=new Pc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new P(2,9,9012,"Could not find values for "+a))};return z(g,Promise.all([d.promise(),f]),0)})};
733
+ Hs.prototype.zc=function(a){var b,c,d,e,f,g;return M(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Is(a.periods[c],e),b.push(f);return z(h,Pp(b),2)}g=h.h;return h["return"]({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata})})};
734
+ function Is(a,b){Js(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Ks(e,a.startTime,b)})}
735
+ function Ks(a,b,c){var d=a.initSegmentUri?Ls(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=Ls(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
736
+ dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}Hs.prototype.Re=function(a){return{data:a.data}};function Ls(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new P(2,9,9004,"Could not parse uri "+a);}
737
+ function Js(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
738
+ f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Ms(){ss.apply(this,arguments)}u(Ms,ss);
739
+ Ms.prototype.zc=function(a){var b,c,d,e,f,g;return M(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=r(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Ns(n,k.startTime,k.startTime+e));f=l;b.push(f)}return z(h,Pp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
739
740
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
740
- function Ls(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
741
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Ms(){qs.apply(this,arguments)}u(Ms,qs);q=Ms.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return us(this,a,b)};q.zc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Ns(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Ns.prototype;
742
- q.init=function(){var a=this,b=new Pc,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Fs(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Ks(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Ks(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
743
- e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Ms(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new vs(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=r(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new P(2,9,9001,c.error));d.preventDefault()};return b};
741
+ function Ns(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
742
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Os(){ss.apply(this,arguments)}u(Os,ss);q=Os.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return ws(this,a,b)};q.zc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Ps(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Ps.prototype;
743
+ q.init=function(){var a=this,b=new Pc,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Hs(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Ms(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Ms(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
744
+ e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Os(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new xs(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=r(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new P(2,9,9001,c.error));d.preventDefault()};return b};
744
745
  q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return z(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return z(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return z(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return z(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return z(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),C(b)}})};
745
746
  q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
746
- q.erase=function(){var a=this;return M(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return z(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return z(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return z(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return z(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),z(b,Os(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,z(b,a.init(),0)}})};
747
- function Os(){var a=new Pc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new P(2,9,9001,b.error));c.preventDefault()};return a}Es("idb",function(){return Gd()||Cd()||!window.indexedDB?null:new Ns});function Ps(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Ps.prototype.Sa=function(){return this.i};Ps.prototype.Da=function(){return this.h};Ps.prototype.key=function(){return this.l};Ps.prototype.toString=function(){return this.j};
748
- function Qs(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new Ps(b,c,d,Number(a[4])):null};function Rs(a,b){this.h=a;this.g=b}
749
- function Ss(a,b){var c=new R(null,0);c.bb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Ts(a,d,e,c);e=b.streams.filter(function(l){return l.type==Mb}).map(function(l){return Us(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Us(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
747
+ q.erase=function(){var a=this;return M(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return z(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return z(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return z(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return z(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),z(b,Qs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,z(b,a.init(),0)}})};
748
+ function Qs(){var a=new Pc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new P(2,9,9001,b.error));c.preventDefault()};return a}Gs("idb",function(){return Zc()||Wc()||!window.indexedDB?null:new Ps});function Rs(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Rs.prototype.Sa=function(){return this.i};Rs.prototype.Da=function(){return this.h};Rs.prototype.key=function(){return this.l};Rs.prototype.toString=function(){return this.j};
749
+ function Ss(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new Rs(b,c,d,Number(a[4])):null};function Ts(a,b){this.h=a;this.g=b}
750
+ function Us(a,b){var c=new R(null,0);c.bb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Vs(a,d,e,c);e=b.streams.filter(function(l){return l.type==Mb}).map(function(l){return Ws(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Ws(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
750
751
  g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f}}
751
- function Ts(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=b.next())for(e=
752
- e.value,g=Us(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Us(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
753
- function Us(a,b,c){var d=b.segments.map(function(e){return Vs(a,e)});c.hc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ni(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
754
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Vs(a,b){var c=new Ps("segment",a.h,a.g,b.dataKey);return new qi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Ws(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
755
- function Ws(a,b){var c=new Ps("segment",a.h,a.g,b);return new oi(function(){return[c.toString()]},0,null)};function Xs(){this.g=null}q=Xs.prototype;q.configure=function(){};
756
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:d=Qs(a);c.g=d;if(null==d||"manifest"!=d.g)throw new P(2,1,9004,a);e=new ws;ua(m);return z(m,e.init(),4);case 4:return z(m,As(e,d.Sa(),d.Da()),5);case 5:return f=m.h,z(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Rs(d.Sa(),d.Da()),l=Ss(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),z(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
757
- q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:return d=c.g,e=new ws,E(m,2,3),z(m,e.init(),5);case 5:return z(m,As(e,d.Sa(),d.Da()),6);case 6:return f=m.h,z(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.D(3);break}return z(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),z(m,e.destroy(),10);case 10:xa(m,0);break;case 2:I(m),m.D(3)}})};
758
- mg["application/x-offline-manifest"]=function(){return new Xs};function Ys(){}function Zs(a){var b=Qs(a);b&&"manifest"==b.g?(a={uri:a,mf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Te(a)):a=b&&"segment"==b.g?$s(b.key(),b):Re(new P(2,1,9004,a));return a}
759
- function $s(a,b){var c=new ws;return Te(void 0).qa(function(){return c.init()}).qa(function(){return As(c,b.Sa(),b.Da())}).qa(function(d){return d.getSegments([b.key()])}).qa(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}N("shaka.offline.OfflineScheme",Ys);Ys.plugin=Zs;bf("offline",Zs);function at(a,b,c){var d,e,f,g,h,k;return M(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,v=r(m),y=v.next();!y.done;y=v.next())if(y=y.value,bt(y.info,p)){y.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=ct(a,b,g);return z(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l["return"](d)}})}
760
- function ct(a,b,c){var d,e;return M(function(f){switch(f.g){case 1:return d=new zf({Pb:b,onError:function(){},pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),E(f,2),d.configure(a),z(f,Hf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return I(f),z(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return E(f,6),z(f,Qf(d),8);case 8:va(f,7);break;case 6:return I(f),z(f,d.destroy(),
761
- 9);case 9:return f["return"]([]);case 7:return e=[],z(f,Promise.all(c.sessionIds.map(function(g){return M(function(h){if(1==h.g)return E(h,2),z(h,Rf(d,g),4);if(2!=h.g)return e.push(g),va(h,0);I(h);C(h)})})),10);case 10:return z(f,d.destroy(),11);case 11:return f["return"](e)}})}
762
- function bt(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&jc(a.audioCapabilities,b.audioCapabilities,c)&&jc(a.videoCapabilities,b.videoCapabilities,c)};function dt(a,b,c){var d=b.presentationTimeline.getDuration();b=et(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function ft(a,b){var c=Ss(new Rs(a.Sa(),a.Da()),b),d=b.appMetadata||{};c=et(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
763
- function et(a){var b=[],c=se(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(je(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ke(c.value));return b};function gt(){this.g={}}function ht(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function it(a,b){a.g[b.id]=b.bandwidth||2048}function jt(a,b){var c=a.g[b];null==c&&(c=0);return c};function kt(a){var b=this;if(a&&a.constructor!=T)throw new P(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Dc()):(this.h=Fk(),this.g=new af);this.i=[];this.j=[];var c=!a;this.l=new mf(function(){var d,e,f,g,h;return M(function(k){switch(k.g){case 1:return z(k,Promise.all(b.j.map(function(l){return gs(l)})),2);case 2:d=function(){};e=[];f=r(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return z(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return z(k,b.g.destroy(),4);
764
- case 4:b.h=null,b.g=null,C(k)}})})}function lt(){if(zd())a:{var a=r(xs.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=kt.prototype;q.destroy=function(){return this.l.destroy()};
765
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ck(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(zb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return Hk(this.h,a)};q.getConfiguration=function(){var a=Fk();Hk(a,this.h,Fk());return a};q.Dc=function(){return this.g};
766
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new fs(this.g);this.j.push(f);b=mt(this,a,b||{},function(){var h;return M(function(k){if(1==k.g)return z(k,lg(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Gb(h))})},e,f);var g=new Qe(b,function(){return gs(f)});g["finally"](function(){ic(d.j,f)});g.then=function(h){zb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
767
- return g.promise.then(h)};return nt(this,g)};q.qg=function(){zb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
768
- function mt(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,y,w,x,D,B;return M(function(A){switch(A.g){case 1:return ot(),h=g=null,k=new ws,n=m=l=null,E(A,2,3),z(A,d(),5);case 5:return g=A.h,z(A,pt(a,b,g,e),6);case 6:p=A.h;qt(a);t=!p.presentationTimeline.T()&&!p.presentationTimeline.Mb();if(!t)throw new P(2,9,9005,b);return z(A,rt(a,p,function(F){n=n||F},e),7);case 7:h=A.h;qt(a);if(n)throw n;return z(A,st(p,e),8);case 8:return z(A,k.init(),9);case 9:return qt(a),z(A,ys(k),10);case 10:return l=A.h,qt(a),v=tt(h,
769
- p,b,c,e,f),y=v.Eg,w=v.ze,z(A,l.Da.addManifests([y]),11);case 11:x=A.h;qt(a);m=x[0];qt(a);if(n)throw n;return z(A,ut(a,w,m,y,f,e,l.Da,p,h),12);case 12:return qt(a),D=new Ps("manifest",l.path.Sa,l.path.Da,m),A["return"](ft(D,y));case 3:return wa(A),z(A,k.destroy(),13);case 13:if(!g){A.D(14);break}return z(A,g.stop(),14);case 14:if(!h){A.D(16);break}return z(A,h.destroy(),16);case 16:xa(A,0);break;case 2:B=I(A);if(null==m){A.D(18);break}return z(A,vt(m),18);case 18:throw n||B;}})}
770
- function ut(a,b,c,d,e,f,g,h,k){var l,m,n,p,t,v,y,w,x,D;return M(function(B){switch(B.g){case 1:l={};m=0;n=function(A,F){var G,H,K,J,L,W,Z;return M(function(ka){if(1==ka.g){G={};H=r(A);for(K=H.next();!K.done;G={Eb:G.Eb},K=H.next())G.Eb=K.value,J=cs(G.Eb,f),L=G.Eb.i,W=G.Eb.h,Z=function(ja){return function(ea){var Ia,Ma,Da;return M(function(Qa){if(1==Qa.g)return z(Qa,g.addSegments([{data:ea}]),2);Ia=Qa.h;qt(a);Ma=ja.Eb.g;Da=bs(Ma);l[Da]=Ia[0];m+=ea.byteLength;C(Qa)})}}(G),is(e,G.Eb.groupId,J,L,W,Z);
771
- return z(ka,ks(e),2)}if(!F)return ka.D(0);qt(a);wt(h,d,k,f);return z(ka,g.updateManifest(c,d),0)})};p=!1;E(B,2);if(!xt(h)||!p||yt(h)){B.D(4);break}return z(B,n(b.filter(function(A){return A.h}),!0),5);case 5:return qt(a),b=b.filter(function(A){return!A.h}),t=l,v=m,l={},m=0,z(B,zt(g,c,d,t,v,function(){return qt(a)}),6);case 6:qt(a);case 4:if(p){B.D(7);break}return z(B,n(b,!1),8);case 8:return qt(a),y=l,w=m,l={},m=0,z(B,zt(g,c,d,y,w,function(){return qt(a)}),9);case 9:qt(a);case 7:va(B,0);break;case 2:return x=
772
- I(B),D=Object.values(l),z(B,g.removeSegments(D,function(){}),10);case 10:throw x;}})}function vt(a){var b,c,d,e;return M(function(f){switch(f.g){case 1:return b=new ws,z(f,b.init(),2);case 2:return z(f,ys(b),3);case 3:return c=f.h,d=new Ps("manifest",c.path.Sa,c.path.Da,a),z(f,b.destroy(),4);case 4:return e=new kt,z(f,e.remove(d.toString()),0)}})}
773
- function zt(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,y,w;return M(function(x){switch(x.g){case 1:g=!1;E(x,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=r(m.segments),p=n.next();!p.done;p=n.next())t=p.value,v=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=v&&(t.dataKey=v,t.pendingSegmentRefId=void 0),v=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=v&&(t.initSegmentKey=v,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
774
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return z(x,a.updateManifest(b,c),4);case 4:g=!0;f();va(x,0);break;case 2:return y=I(x),z(x,vt(b),5);case 5:if(g){x.D(6);break}w=Object.values(d);return z(x,a.removeSegments(w,function(){}),6);case 6:throw y;}})}
775
- function st(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja;return M(function(ea){switch(ea.g){case 1:return c={width:Infinity,height:Infinity},Xd(a,b.restrictions,c),z(ea,$d(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Ld(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(je(m));n=r(a.textStreams);for(p=n.next();!p.done;p=n.next())t=
776
- p.value,d.push(ke(t));v=r(a.imageStreams);for(y=v.next();!y.done;y=v.next())w=y.value,d.push(le(w));return z(ea,b.offline.trackSelectionCallback(d),3);case 3:x=ea.h;D=a.presentationTimeline.getDuration();B=0;A=r(x);for(F=A.next();!F.done;F=A.next())G=F.value,H=G.bandwidth*D/8,B+=H;E(ea,4);return z(ea,b.offline.downloadSizeCallback(B),6);case 6:K=ea.h;if(!K)throw new P(2,9,9014);va(ea,5);break;case 4:J=I(ea);if(J instanceof P)throw J;throw new P(2,9,9015);case 5:L=new Set;W=new Set;Z=new Set;ka=r(x);
777
- for(F=ka.next();!F.done;F=ka.next())ja=F.value,"variant"==ja.type&&L.add(ja.id),"text"==ja.type&&W.add(ja.id),"image"==ja.type&&Z.add(ja.id);a.variants=a.variants.filter(function(Ia){return L.has(Ia.id)});a.textStreams=a.textStreams.filter(function(Ia){return W.has(Ia.id)});a.imageStreams=a.imageStreams.filter(function(Ia){return Z.has(Ia.id)});At(a);C(ea)}})}
778
- function tt(a,b,c,d,e,f){var g=dt(c,b,d),h=e.offline.progressCallback;hs(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&Pf(a,"cenc",t)});var k=xt(b)&&!yt(b),l=null;k&&(l=Bt.get(a.g.keySystem));for(var m=new gt,n=r(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=r(b.imageStreams);for(p=n.next();!p.done;p=n.next())it(m,p.value);p=r(b.variants);for(n=p.next();!n.done;n=p.next())ht(m,n.value);m=Ct(f,m,b);f=m.streams;m=m.ze;p=a.g;n=e.offline.usePersistentLicense;
779
- p&&n&&(p.initData=[]);return{Eg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Cc(),streams:f,sessionIds:n?Vf(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0},ze:m}}function xt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
780
- function yt(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function wt(a,b,c,d){b.expiration=c.Cc();c=Vf(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(xt(a)&&d.offline.usePersistentLicense&&!c.length)throw new P(2,9,9007);}q.remove=function(a){return Dt(this,Et(this,a))};
781
- function Et(a,b){var c,d,e,f,g,h;return M(function(k){switch(k.g){case 1:ot();c=Qs(b);if(null==c||"manifest"!=c.g)throw new P(2,9,9004,b);d=c;e=new ws;ua(k);return z(k,e.init(),4);case 4:return z(k,As(e,d.Sa(),d.Da()),5);case 5:return f=k.h,z(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],z(k,Promise.all([Ft(a,h,e),Gt(f,d,h)]),2);case 2:return wa(k),z(k,e.destroy(),8);case 8:xa(k,0)}})}
782
- function Ht(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:kd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:kd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Ft(a,b,c){return M(function(d){return z(d,It(a.g,a.h.drm,c,b),0)})}
783
- function Gt(a,b,c){function d(){}var e=Jt(c);ft(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Sg=function(){return Dt(this,Kt(this))};
784
- function Kt(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return ot(),b=a.g,c=a.h.drm,d=new ws,e=!1,ua(n),z(n,d.init(),4);case 4:f=[],Bs(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.D(2);break}k=h.value;return z(n,k.getAll(),8);case 8:return l=n.h,z(n,at(c,b,l),9);case 9:return m=n.h,z(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.D(5);break;case 2:return wa(n),z(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
785
- q.list=function(){return Dt(this,Lt())};function Lt(){var a,b,c;return M(function(d){switch(d.g){case 1:return ot(),a=[],b=new ws,ua(d),z(d,b.init(),4);case 4:return c=Promise.resolve(),zs(b,function(e,f){c=c.then(function(){var g;return M(function(h){if(1==h.g)return z(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=ft(new Ps("manifest",e.Sa,e.Da,l),k);a.push(m)});C(h)})})}),z(d,c,2);case 2:return wa(d),z(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
786
- function pt(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),qt(a),z(l,c.start(b,
787
- g),2);if(3!=l.g)return h=l.h,qt(a),k=Mt(h),z(l,Promise.all(db(k,function(m){return m.createSegmentIndex()})),3);qt(a);if(e)throw e;return l["return"](h)})}function rt(a,b,c,d){var e;return M(function(f){switch(f.g){case 1:return e=new zf({Pb:a.g,onError:c,pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),z(f,Ef(e,b.variants,d.offline.usePersistentLicense),2);case 2:return z(f,Qf(e),3);case 3:return z(f,Of(e),4);case 4:return f["return"](e)}})}
788
- function Ct(a,b,c){var d=new Map,e=Mt(c),f=new Map;e=r(e);for(var g=e.next();!g.done;g=e.next()){g=g.value;var h=Nt(a,b,c,g,d);f.set(g.id,h)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&f.get(b.audio.id).variantIds.push(b.id),b.video&&f.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(f.values()),ze:Array.from(d.values())}}
789
- function Nt(a,b,c,d,e){var f={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
790
- tilesLayout:d.tilesLayout};Ot(d,c.presentationTimeline.ob(),function(g){var h=bs(g),k=void 0;if(!e.has(h)){var l=g.endTime-g.startTime;l=jt(b,d.id)*l;l=es(a.g,l);e.set(h,new as(g,l,d.id,!1))}g.g&&(k=bs(g.g),e.has(k)||(l=.5*jt(b,d.id),l=es(a.g,l),e.set(k,new as(g.g,l,d.id,!0))));f.segments.push({pendingInitSegmentRefId:k,initSegmentKey:k?0:null,startTime:g.startTime,endTime:g.endTime,appendWindowStart:g.appendWindowStart,appendWindowEnd:g.appendWindowEnd,timestampOffset:g.timestampOffset,tilesLayout:g.tilesLayout,
791
- pendingSegmentRefId:h,dataKey:0})});return f}function Ot(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function qt(a){if(a.l.g)throw new P(2,9,7001);}function ot(){if(!lt())throw new P(2,9,9E3);}function Dt(a,b){return M(function(c){if(1==c.g)return a.i.push(b),ua(c),z(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);ic(a.i,b);return xa(c,0)})}function nt(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){ic(a.i,c)})}
792
- function Jt(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
793
- function It(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Cs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Ht(d,!1),videoCapabilities:Ht(d,!0)}});return z(h,at(b,a,f),2)}return 3!=h.g?(g=h.h,z(h,e.remove(g),3)):z(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
794
- function Mt(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
795
- function At(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}N("shaka.offline.Storage",kt);kt.deleteAll=function(){var a;return M(function(b){return 1==b.g?(a=new ws,ua(b),z(b,Ds(a),2)):5!=b.g?(wa(b),z(b,a.destroy(),5)):xa(b,0)})};kt.prototype.list=kt.prototype.list;
796
- kt.prototype.removeEmeSessions=kt.prototype.Sg;kt.prototype.remove=kt.prototype.remove;kt.prototype.getStoreInProgress=kt.prototype.qg;kt.prototype.store=kt.prototype.store;kt.prototype.getNetworkingEngine=kt.prototype.Dc;kt.prototype.getConfiguration=kt.prototype.getConfiguration;kt.prototype.configure=kt.prototype.configure;kt.prototype.destroy=kt.prototype.destroy;kt.support=lt;
797
- var Bt=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
798
- Lm.offline=lt;function Pt(){}function Qt(){for(var a=r(Rt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Kf()}catch(c){Sa("Error installing polyfill!",c)}}}function St(a,b){for(var c={priority:b||0,Kf:a},d=0;d<Rt.length;d++)if(Rt[d].priority<c.priority){Rt.splice(d,0,c);return}Rt.push(c)}N("shaka.polyfill",Pt);Pt.register=St;Pt.installAll=Qt;var Rt=[];function Tt(){}function Ut(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Vt(b.value)}function Vt(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}Pt.Aria=Tt;Tt.install=Ut;St(Ut);function Wt(){}function Xt(){Yt()}Pt.EncryptionScheme=Wt;Wt.install=Xt;St(Xt,-2);function Zt(){}
799
- function $t(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
800
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",au);document.addEventListener("webkitfullscreenerror",au);document.addEventListener("mozfullscreenchange",au);document.addEventListener("mozfullscreenerror",au);document.addEventListener("MSFullscreenChange",au);document.addEventListener("MSFullscreenError",au)}}
801
- function au(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Pt.Fullscreen=Zt;Zt.install=$t;St($t);function bu(){}function cu(){}Pt.MathRound=bu;bu.install=cu;St(cu);function du(){}function eu(){if(Gd()||Hd()||Ed("PlayStation 5")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),fu=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=gu}
802
- function gu(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,w;return M(function(x){switch(x.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return x["return"](b);if("media-source"==a.type){if(!zd()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return x["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=Ad(g),!h)||a.audio&&(k=a.audio.contentType,
803
- l=Ad(k),!l))return x["return"](b)}else return x["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,x["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(t={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(t));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
804
- n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);E(x,3);return z(x,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:w=x.h;va(x,4);break;case 3:I(x);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return x["return"](b)}})}Pt.MediaCapabilities=du;du.install=eu;var fu=null;du.originalMcap=fu;St(eu,-1);function hu(){}function iu(){var a=Id();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?ju():a?(ku(),12>=a?(lu(),mu()):lu()):(Ed("Tizen 2")||Ed("Tizen 3")||Ed("Tizen 4"))&&nu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&ou()}
805
- function lu(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function mu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function ku(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
806
- function nu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=nd(b)[0]&&a(b)}}function ju(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
807
- function ou(){var a=MediaSource.isTypeSupported;Ed("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Pt.MediaSource=hu;hu.install=iu;St(iu);function pu(){}function qu(){screen.orientation||void 0!=window.orientation&&ru()}function ru(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new su;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new O("change");b.dispatchEvent(c)})}Pt.Orientation=pu;
808
- pu.install=qu;function su(){cb.call(this);this.type="";this.angle=0}u(su,cb);
809
- su.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
810
- su.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};St(qu);function tu(){}function uu(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=vu,window.MediaKeys=wu,window.MediaKeySystemAccess=xu,navigator.requestMediaKeySystemAccess=yu)}function yu(a,b){try{var c=new xu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
811
- function vu(a){var b=this.mediaKeys;b&&b!=a&&zu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?zu(a,this):Promise.resolve()}function Au(a){a=Ic(a.initData);if(Lc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Uc(a.subarray(4),!0);a=Xc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Jc(a);this.dispatchEvent(b)}Pt.PatchedMediaKeysApple=tu;tu.install=uu;
812
- function xu(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
752
+ function Vs(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=b.next())for(e=
753
+ e.value,g=Ws(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Ws(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
754
+ function Ws(a,b,c){var d=b.segments.map(function(e){return Xs(a,e)});c.hc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Pi(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
755
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Xs(a,b){var c=new Rs("segment",a.h,a.g,b.dataKey);return new si(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Ys(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
756
+ function Ys(a,b){var c=new Rs("segment",a.h,a.g,b);return new qi(function(){return[c.toString()]},0,null)};function Zs(){this.g=null}q=Zs.prototype;q.configure=function(){};
757
+ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:d=Ss(a);c.g=d;if(null==d||"manifest"!=d.g)throw new P(2,1,9004,a);e=new ys;ua(m);return z(m,e.init(),4);case 4:return z(m,Cs(e,d.Sa(),d.Da()),5);case 5:return f=m.h,z(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Ts(d.Sa(),d.Da()),l=Us(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),z(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
758
+ q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:return d=c.g,e=new ys,E(m,2,3),z(m,e.init(),5);case 5:return z(m,Cs(e,d.Sa(),d.Da()),6);case 6:return f=m.h,z(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.D(3);break}return z(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),z(m,e.destroy(),10);case 10:xa(m,0);break;case 2:I(m),m.D(3)}})};
759
+ og["application/x-offline-manifest"]=function(){return new Zs};function $s(){}function at(a){var b=Ss(a);b&&"manifest"==b.g?(a={uri:a,nf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ve(a)):a=b&&"segment"==b.g?bt(b.key(),b):Te(new P(2,1,9004,a));return a}
760
+ function bt(a,b){var c=new ys;return Ve(void 0).qa(function(){return c.init()}).qa(function(){return Cs(c,b.Sa(),b.Da())}).qa(function(d){return d.getSegments([b.key()])}).qa(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}N("shaka.offline.OfflineScheme",$s);$s.plugin=at;df("offline",at);function ct(a,b,c){var d,e,f,g,h,k;return M(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,v=r(m),y=v.next();!y.done;y=v.next())if(y=y.value,dt(y.info,p)){y.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=et(a,b,g);return z(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l["return"](d)}})}
761
+ function et(a,b,c){var d,e;return M(function(f){switch(f.g){case 1:return d=new Bf({Pb:b,onError:function(){},pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),E(f,2),d.configure(a),z(f,Jf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return I(f),z(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return E(f,6),z(f,Sf(d),8);case 8:va(f,7);break;case 6:return I(f),z(f,d.destroy(),
762
+ 9);case 9:return f["return"]([]);case 7:return e=[],z(f,Promise.all(c.sessionIds.map(function(g){return M(function(h){if(1==h.g)return E(h,2),z(h,Tf(d,g),4);if(2!=h.g)return e.push(g),va(h,0);I(h);C(h)})})),10);case 10:return z(f,d.destroy(),11);case 11:return f["return"](e)}})}
763
+ function dt(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&jc(a.audioCapabilities,b.audioCapabilities,c)&&jc(a.videoCapabilities,b.videoCapabilities,c)};function ft(a,b,c){var d=b.presentationTimeline.getDuration();b=gt(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function ht(a,b){var c=Us(new Ts(a.Sa(),a.Da()),b),d=b.appMetadata||{};c=gt(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
764
+ function gt(a){var b=[],c=ue(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(le(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(me(c.value));return b};function it(){this.g={}}function jt(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function kt(a,b){a.g[b.id]=b.bandwidth||2048}function lt(a,b){var c=a.g[b];null==c&&(c=0);return c};function mt(a){var b=this;if(a&&a.constructor!=T)throw new P(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Dc()):(this.h=Hk(),this.g=new cf);this.i=[];this.j=[];var c=!a;this.l=new of(function(){var d,e,f,g,h;return M(function(k){switch(k.g){case 1:return z(k,Promise.all(b.j.map(function(l){return is(l)})),2);case 2:d=function(){};e=[];f=r(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return z(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return z(k,b.g.destroy(),4);
765
+ case 4:b.h=null,b.g=null,C(k)}})})}function nt(){if(Tc())a:{var a=r(zs.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=mt.prototype;q.destroy=function(){return this.l.destroy()};
766
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ek(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(zb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return Jk(this.h,a)};q.getConfiguration=function(){var a=Hk();Jk(a,this.h,Hk());return a};q.Dc=function(){return this.g};
767
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new hs(this.g);this.j.push(f);b=ot(this,a,b||{},function(){var h;return M(function(k){if(1==k.g)return z(k,ng(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Gb(h))})},e,f);var g=new Se(b,function(){return is(f)});g["finally"](function(){ic(d.j,f)});g.then=function(h){zb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
768
+ return g.promise.then(h)};return pt(this,g)};q.rg=function(){zb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
769
+ function ot(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,y,w,x,D,B;return M(function(A){switch(A.g){case 1:return qt(),h=g=null,k=new ys,n=m=l=null,E(A,2,3),z(A,d(),5);case 5:return g=A.h,z(A,rt(a,b,g,e),6);case 6:p=A.h;st(a);t=!p.presentationTimeline.T()&&!p.presentationTimeline.Mb();if(!t)throw new P(2,9,9005,b);return z(A,tt(a,p,function(F){n=n||F},e),7);case 7:h=A.h;st(a);if(n)throw n;return z(A,ut(p,e),8);case 8:return z(A,k.init(),9);case 9:return st(a),z(A,As(k),10);case 10:return l=A.h,st(a),v=vt(h,
770
+ p,b,c,e,f),y=v.Fg,w=v.Ae,z(A,l.Da.addManifests([y]),11);case 11:x=A.h;st(a);m=x[0];st(a);if(n)throw n;return z(A,wt(a,w,m,y,f,e,l.Da,p,h),12);case 12:return st(a),D=new Rs("manifest",l.path.Sa,l.path.Da,m),A["return"](ht(D,y));case 3:return wa(A),z(A,k.destroy(),13);case 13:if(!g){A.D(14);break}return z(A,g.stop(),14);case 14:if(!h){A.D(16);break}return z(A,h.destroy(),16);case 16:xa(A,0);break;case 2:B=I(A);if(null==m){A.D(18);break}return z(A,xt(m),18);case 18:throw n||B;}})}
771
+ function wt(a,b,c,d,e,f,g,h,k){var l,m,n,p,t,v,y,w,x,D;return M(function(B){switch(B.g){case 1:l={};m=0;n=function(A,F){var G,H,K,J,L,W,Z;return M(function(ka){if(1==ka.g){G={};H=r(A);for(K=H.next();!K.done;G={Eb:G.Eb},K=H.next())G.Eb=K.value,J=es(G.Eb,f),L=G.Eb.i,W=G.Eb.h,Z=function(ja){return function(ea){var Ia,Ma,Da;return M(function(Qa){if(1==Qa.g)return z(Qa,g.addSegments([{data:ea}]),2);Ia=Qa.h;st(a);Ma=ja.Eb.g;Da=ds(Ma);l[Da]=Ia[0];m+=ea.byteLength;C(Qa)})}}(G),ks(e,G.Eb.groupId,J,L,W,Z);
772
+ return z(ka,ms(e),2)}if(!F)return ka.D(0);st(a);yt(h,d,k,f);return z(ka,g.updateManifest(c,d),0)})};p=!1;E(B,2);if(!zt(h)||!p||At(h)){B.D(4);break}return z(B,n(b.filter(function(A){return A.h}),!0),5);case 5:return st(a),b=b.filter(function(A){return!A.h}),t=l,v=m,l={},m=0,z(B,Bt(g,c,d,t,v,function(){return st(a)}),6);case 6:st(a);case 4:if(p){B.D(7);break}return z(B,n(b,!1),8);case 8:return st(a),y=l,w=m,l={},m=0,z(B,Bt(g,c,d,y,w,function(){return st(a)}),9);case 9:st(a);case 7:va(B,0);break;case 2:return x=
773
+ I(B),D=Object.values(l),z(B,g.removeSegments(D,function(){}),10);case 10:throw x;}})}function xt(a){var b,c,d,e;return M(function(f){switch(f.g){case 1:return b=new ys,z(f,b.init(),2);case 2:return z(f,As(b),3);case 3:return c=f.h,d=new Rs("manifest",c.path.Sa,c.path.Da,a),z(f,b.destroy(),4);case 4:return e=new mt,z(f,e.remove(d.toString()),0)}})}
774
+ function Bt(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,y,w;return M(function(x){switch(x.g){case 1:g=!1;E(x,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=r(m.segments),p=n.next();!p.done;p=n.next())t=p.value,v=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=v&&(t.dataKey=v,t.pendingSegmentRefId=void 0),v=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=v&&(t.initSegmentKey=v,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
775
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return z(x,a.updateManifest(b,c),4);case 4:g=!0;f();va(x,0);break;case 2:return y=I(x),z(x,xt(b),5);case 5:if(g){x.D(6);break}w=Object.values(d);return z(x,a.removeSegments(w,function(){}),6);case 6:throw y;}})}
776
+ function ut(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,D,B,A,F,G,H,K,J,L,W,Z,ka,ja;return M(function(ea){switch(ea.g){case 1:return c={width:Infinity,height:Infinity},Zd(a,b.restrictions,c),z(ea,be(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Nd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(le(m));n=r(a.textStreams);for(p=n.next();!p.done;p=n.next())t=
777
+ p.value,d.push(me(t));v=r(a.imageStreams);for(y=v.next();!y.done;y=v.next())w=y.value,d.push(ne(w));return z(ea,b.offline.trackSelectionCallback(d),3);case 3:x=ea.h;D=a.presentationTimeline.getDuration();B=0;A=r(x);for(F=A.next();!F.done;F=A.next())G=F.value,H=G.bandwidth*D/8,B+=H;E(ea,4);return z(ea,b.offline.downloadSizeCallback(B),6);case 6:K=ea.h;if(!K)throw new P(2,9,9014);va(ea,5);break;case 4:J=I(ea);if(J instanceof P)throw J;throw new P(2,9,9015);case 5:L=new Set;W=new Set;Z=new Set;ka=r(x);
778
+ for(F=ka.next();!F.done;F=ka.next())ja=F.value,"variant"==ja.type&&L.add(ja.id),"text"==ja.type&&W.add(ja.id),"image"==ja.type&&Z.add(ja.id);a.variants=a.variants.filter(function(Ia){return L.has(Ia.id)});a.textStreams=a.textStreams.filter(function(Ia){return W.has(Ia.id)});a.imageStreams=a.imageStreams.filter(function(Ia){return Z.has(Ia.id)});Ct(a);C(ea)}})}
779
+ function vt(a,b,c,d,e,f){var g=ft(c,b,d),h=e.offline.progressCallback;js(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&Rf(a,"cenc",t)});var k=zt(b)&&!At(b),l=null;k&&(l=Dt.get(a.g.keySystem));for(var m=new it,n=r(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=r(b.imageStreams);for(p=n.next();!p.done;p=n.next())kt(m,p.value);p=r(b.variants);for(n=p.next();!n.done;n=p.next())jt(m,n.value);m=Et(f,m,b);f=m.streams;m=m.Ae;p=a.g;n=e.offline.usePersistentLicense;
780
+ p&&n&&(p.initData=[]);return{Fg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Cc(),streams:f,sessionIds:n?Xf(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0},Ae:m}}function zt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
781
+ function At(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function yt(a,b,c,d){b.expiration=c.Cc();c=Xf(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(zt(a)&&d.offline.usePersistentLicense&&!c.length)throw new P(2,9,9007);}q.remove=function(a){return Ft(this,Gt(this,a))};
782
+ function Gt(a,b){var c,d,e,f,g,h;return M(function(k){switch(k.g){case 1:qt();c=Ss(b);if(null==c||"manifest"!=c.g)throw new P(2,9,9004,b);d=c;e=new ys;ua(k);return z(k,e.init(),4);case 4:return z(k,Cs(e,d.Sa(),d.Da()),5);case 5:return f=k.h,z(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],z(k,Promise.all([Ht(a,h,e),It(f,d,h)]),2);case 2:return wa(k),z(k,e.destroy(),8);case 8:xa(k,0)}})}
783
+ function Jt(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:yd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:yd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Ht(a,b,c){return M(function(d){return z(d,Kt(a.g,a.h.drm,c,b),0)})}
784
+ function It(a,b,c){function d(){}var e=Lt(c);ht(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Tg=function(){return Ft(this,Mt(this))};
785
+ function Mt(a){var b,c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return qt(),b=a.g,c=a.h.drm,d=new ys,e=!1,ua(n),z(n,d.init(),4);case 4:f=[],Ds(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.D(2);break}k=h.value;return z(n,k.getAll(),8);case 8:return l=n.h,z(n,ct(c,b,l),9);case 9:return m=n.h,z(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.D(5);break;case 2:return wa(n),z(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
786
+ q.list=function(){return Ft(this,Nt())};function Nt(){var a,b,c;return M(function(d){switch(d.g){case 1:return qt(),a=[],b=new ys,ua(d),z(d,b.init(),4);case 4:return c=Promise.resolve(),Bs(b,function(e,f){c=c.then(function(){var g;return M(function(h){if(1==h.g)return z(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=ht(new Rs("manifest",e.Sa,e.Da,l),k);a.push(m)});C(h)})})}),z(d,c,2);case 2:return wa(d),z(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
787
+ function rt(a,b,c,d){var e,f,g,h,k;return M(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),st(a),z(l,c.start(b,
788
+ g),2);if(3!=l.g)return h=l.h,st(a),k=Ot(h),z(l,Promise.all(db(k,function(m){return m.createSegmentIndex()})),3);st(a);if(e)throw e;return l["return"](h)})}function tt(a,b,c,d){var e;return M(function(f){switch(f.g){case 1:return e=new Bf({Pb:a.g,onError:c,pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),z(f,Gf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return z(f,Sf(e),3);case 3:return z(f,Qf(e),4);case 4:return f["return"](e)}})}
789
+ function Et(a,b,c){var d=new Map,e=Ot(c),f=new Map;e=r(e);for(var g=e.next();!g.done;g=e.next()){g=g.value;var h=Pt(a,b,c,g,d);f.set(g.id,h)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&f.get(b.audio.id).variantIds.push(b.id),b.video&&f.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(f.values()),Ae:Array.from(d.values())}}
790
+ function Pt(a,b,c,d,e){var f={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
791
+ tilesLayout:d.tilesLayout};Qt(d,c.presentationTimeline.ob(),function(g){var h=ds(g),k=void 0;if(!e.has(h)){var l=g.endTime-g.startTime;l=lt(b,d.id)*l;l=gs(a.g,l);e.set(h,new cs(g,l,d.id,!1))}g.g&&(k=ds(g.g),e.has(k)||(l=.5*lt(b,d.id),l=gs(a.g,l),e.set(k,new cs(g.g,l,d.id,!0))));f.segments.push({pendingInitSegmentRefId:k,initSegmentKey:k?0:null,startTime:g.startTime,endTime:g.endTime,appendWindowStart:g.appendWindowStart,appendWindowEnd:g.appendWindowEnd,timestampOffset:g.timestampOffset,tilesLayout:g.tilesLayout,
792
+ pendingSegmentRefId:h,dataKey:0})});return f}function Qt(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function st(a){if(a.l.g)throw new P(2,9,7001);}function qt(){if(!nt())throw new P(2,9,9E3);}function Ft(a,b){return M(function(c){if(1==c.g)return a.i.push(b),ua(c),z(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);ic(a.i,b);return xa(c,0)})}function pt(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){ic(a.i,c)})}
793
+ function Lt(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
794
+ function Kt(a,b,c,d){var e,f,g;return M(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Es(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Jt(d,!1),videoCapabilities:Jt(d,!0)}});return z(h,ct(b,a,f),2)}return 3!=h.g?(g=h.h,z(h,e.remove(g),3)):z(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
795
+ function Ot(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
796
+ function Ct(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}N("shaka.offline.Storage",mt);mt.deleteAll=function(){var a;return M(function(b){return 1==b.g?(a=new ys,ua(b),z(b,Fs(a),2)):5!=b.g?(wa(b),z(b,a.destroy(),5)):xa(b,0)})};mt.prototype.list=mt.prototype.list;
797
+ mt.prototype.removeEmeSessions=mt.prototype.Tg;mt.prototype.remove=mt.prototype.remove;mt.prototype.getStoreInProgress=mt.prototype.rg;mt.prototype.store=mt.prototype.store;mt.prototype.getNetworkingEngine=mt.prototype.Dc;mt.prototype.getConfiguration=mt.prototype.getConfiguration;mt.prototype.configure=mt.prototype.configure;mt.prototype.destroy=mt.prototype.destroy;mt.support=nt;
798
+ var Dt=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
799
+ Nm.offline=nt;function Rt(){}function St(){for(var a=r(Tt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Lf()}catch(c){Sa("Error installing polyfill!",c)}}}function Ut(a,b){for(var c={priority:b||0,Lf:a},d=0;d<Tt.length;d++)if(Tt[d].priority<c.priority){Tt.splice(d,0,c);return}Tt.push(c)}N("shaka.polyfill",Rt);Rt.register=Ut;Rt.installAll=St;var Tt=[];function Vt(){}function Wt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Xt(b.value)}function Xt(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}Rt.Aria=Vt;Vt.install=Wt;Ut(Wt);function Yt(){}function Zt(){$t()}Rt.EncryptionScheme=Yt;Yt.install=Zt;Ut(Zt,-2);function au(){}
800
+ function bu(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
801
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",cu);document.addEventListener("webkitfullscreenerror",cu);document.addEventListener("mozfullscreenchange",cu);document.addEventListener("mozfullscreenerror",cu);document.addEventListener("MSFullscreenChange",cu);document.addEventListener("MSFullscreenError",cu)}}
802
+ function cu(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Rt.Fullscreen=au;au.install=bu;Ut(bu);function du(){}function eu(){}Rt.MathRound=du;du.install=eu;Ut(eu);function fu(){}function gu(){if(Zc()||$c()||ad()||Xc("PlayStation 5")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),hu=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=iu}
803
+ function iu(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,w;return M(function(x){switch(x.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return x["return"](b);if("media-source"==a.type){if(!Tc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return x["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=Uc(g),!h)||a.audio&&(k=a.audio.contentType,
804
+ l=Uc(k),!l))return x["return"](b)}else return x["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,x["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(t={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(t));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
805
+ n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);E(x,3);return z(x,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:w=x.h;va(x,4);break;case 3:I(x);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return x["return"](b)}})}Rt.MediaCapabilities=fu;fu.install=gu;var hu=null;fu.originalMcap=hu;Ut(gu,-1);function ju(){}function ku(){var a=bd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?lu():a?(mu(),12>=a?(nu(),ou()):nu()):(Xc("Tizen 2")||Xc("Tizen 3")||Xc("Tizen 4"))&&pu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&qu()}
806
+ function nu(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function ou(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function mu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
807
+ function pu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Bd(b)[0]&&a(b)}}function lu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
808
+ function qu(){var a=MediaSource.isTypeSupported;Xc("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Rt.MediaSource=ju;ju.install=ku;Ut(ku);function ru(){}function su(){screen.orientation||void 0!=window.orientation&&tu()}function tu(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new uu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new O("change");b.dispatchEvent(c)})}Rt.Orientation=ru;
809
+ ru.install=su;function uu(){cb.call(this);this.type="";this.angle=0}u(uu,cb);
810
+ uu.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
811
+ uu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Ut(su);function vu(){}function wu(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=xu,window.MediaKeys=yu,window.MediaKeySystemAccess=zu,navigator.requestMediaKeySystemAccess=Au)}function Au(a,b){try{var c=new zu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
812
+ function xu(a){var b=this.mediaKeys;b&&b!=a&&Bu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Bu(a,this):Promise.resolve()}function Cu(a){a=Ic(a.initData);if(Lc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=hd(a.subarray(4),!0);a=jd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Jc(a);this.dispatchEvent(b)}Rt.PatchedMediaKeysApple=vu;vu.install=wu;
813
+ function zu(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
813
814
  k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=r(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.g=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
814
- xu.prototype.createMediaKeys=function(){var a=new wu(this.keySystem);return Promise.resolve(a)};xu.prototype.getConfiguration=function(){return this.g};function wu(a){this.h=new WebKitMediaKeys(a);this.g=new of}wu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Bu(this.h,a)};wu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
815
- function zu(a,b){a.g.rb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",Au);try{return xi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Bu(a){cb.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new of;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new Cu}u(Bu,cb);q=Bu.prototype;
816
- q.generateRequest=function(a,b){var c=this;this.g=new Pc;try{var d=this.l.createSession("video/mp4",Ic(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Jc(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.h&&(Du(c,"usable"),c.h.resolve(),c.h=null)});this.j.o(d,"webkitkeyerror",function(){var e=
817
- Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.h)c.h.reject(e),c.h=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Du(c,"output-not-allowed");break;default:Du(c,"internal-error")}});Du(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
818
- q.update=function(a){this.h=new Pc;try{this.i.update(Ic(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.rb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Du(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}
819
- function Cu(){this.size=0;this.g=void 0}q=Cu.prototype;q.forEach=function(a){this.g&&a(this.g,jg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=jg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};St(uu);function Eu(){}function Fu(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Gu,window.MediaKeySystemAccess=Hu,navigator.requestMediaKeySystemAccess=Iu,HTMLMediaElement.prototype.setMediaKeys=Ju)}function Iu(a,b){try{var c=new Hu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
820
- function Ku(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Jc(ho(a.initData));this.dispatchEvent(b)}}Pt.PatchedMediaKeysMs=Eu;Eu.install=Fu;
821
- function Hu(a,b){this.keySystem=a;for(var c=!1,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
815
+ zu.prototype.createMediaKeys=function(){var a=new yu(this.keySystem);return Promise.resolve(a)};zu.prototype.getConfiguration=function(){return this.g};function yu(a){this.h=new WebKitMediaKeys(a);this.g=new qf}yu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Du(this.h,a)};yu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
816
+ function Bu(a,b){a.g.rb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",Cu);try{return zi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Du(a){cb.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new qf;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new Eu}u(Du,cb);q=Du.prototype;
817
+ q.generateRequest=function(a,b){var c=this;this.g=new Pc;try{var d=this.l.createSession("video/mp4",Ic(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Jc(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.h&&(Fu(c,"usable"),c.h.resolve(),c.h=null)});this.j.o(d,"webkitkeyerror",function(){var e=
818
+ Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.h)c.h.reject(e),c.h=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Fu(c,"output-not-allowed");break;default:Fu(c,"internal-error")}});Fu(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
819
+ q.update=function(a){this.h=new Pc;try{this.i.update(Ic(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.rb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Fu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}
820
+ function Eu(){this.size=0;this.g=void 0}q=Eu.prototype;q.forEach=function(a){this.g&&a(this.g,lg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=lg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Ut(wu);function Gu(){}function Hu(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Iu,window.MediaKeySystemAccess=Ju,navigator.requestMediaKeySystemAccess=Ku,HTMLMediaElement.prototype.setMediaKeys=Lu)}function Ku(a,b){try{var c=new Ju(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
821
+ function Mu(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=Jc(jo(a.initData));this.dispatchEvent(b)}}Rt.PatchedMediaKeysMs=Gu;Gu.install=Hu;
822
+ function Ju(a,b){this.keySystem=a;for(var c=!1,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
822
823
  !0));if(e.videoCapabilities)for(h=r(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.g=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
823
- Hu.prototype.createMediaKeys=function(){var a=new Gu(this.keySystem);return Promise.resolve(a)};Hu.prototype.getConfiguration=function(){return this.g};function Ju(a){var b=this.mediaKeys;b&&b!=a&&Lu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Lu(a,this):Promise.resolve()}function Gu(a){this.h=new MSMediaKeys(a);this.g=new of}
824
- Gu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Mu(this.h,a)};Gu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Lu(a,b){a.g.rb();if(!b)return Promise.resolve();a.g.o(b,"msneedkey",Ku);try{return xi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.msSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
825
- function Mu(a){cb.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new of;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new Nu}u(Mu,cb);q=Mu.prototype;
826
- q.generateRequest=function(a,b){var c=this;this.g=new Pc;try{this.i=this.l.createSession("video/mp4",Ic(b),null),this.j.o(this.i,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Jc(d.message));d=new O("message",d);c.dispatchEvent(d)}),this.j.o(this.i,"mskeyadded",function(){c.g?(Ou(c,"usable"),c.g.resolve(),c.g=null):c.h&&(Ou(c,"usable"),c.h.resolve(),c.h=null)}),this.j.o(this.i,"mskeyerror",
827
- function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.i.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.h)c.h.reject(d),c.h=null;else switch(c.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Ou(c,"output-not-allowed");break;default:Ou(c,"internal-error")}}),Ou(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
828
- q.update=function(a){this.h=new Pc;try{this.i.update(Ic(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.rb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Ou(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}
829
- function Nu(){this.size=0;this.g=void 0}q=Nu.prototype;q.forEach=function(a){this.g&&a(this.g,jg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=jg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};St(Fu);function Pu(){}function Qu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Ru,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Su,window.MediaKeys=Tu,window.MediaKeySystemAccess=Uu)}function Ru(){return Promise.reject(Error("The key system specified is not supported."))}
830
- function Su(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Pt.PatchedMediaKeysNop=Pu;Pu.install=Qu;function Tu(){throw new TypeError("Illegal constructor.");}Tu.prototype.createSession=function(){};Tu.prototype.setServerCertificate=function(){};function Uu(){this.keySystem="";throw new TypeError("Illegal constructor.");}Uu.prototype.getConfiguration=function(){};Uu.prototype.createMediaKeys=function(){};St(Qu,-10);function Vu(){}function Wu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Xu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Yu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Zu;window.MediaKeys=$u;window.MediaKeySystemAccess=av}}
831
- function bv(a){var b=Xu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Yu(a,b){try{var c=new av(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Zu(a){var b=this.mediaKeys;b&&b!=a&&cv(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&cv(a,this);return Promise.resolve()}Pt.PatchedMediaKeysWebkit=Vu;Vu.install=Wu;
832
- function av(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=r(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=r(g.audioCapabilities),
824
+ Ju.prototype.createMediaKeys=function(){var a=new Iu(this.keySystem);return Promise.resolve(a)};Ju.prototype.getConfiguration=function(){return this.g};function Lu(a){var b=this.mediaKeys;b&&b!=a&&Nu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Nu(a,this):Promise.resolve()}function Iu(a){this.h=new MSMediaKeys(a);this.g=new qf}
825
+ Iu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Ou(this.h,a)};Iu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Nu(a,b){a.g.rb();if(!b)return Promise.resolve();a.g.o(b,"msneedkey",Mu);try{return zi(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.msSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
826
+ function Ou(a){cb.call(this);this.i=null;this.l=a;this.h=this.g=null;this.j=new qf;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new Pu}u(Ou,cb);q=Ou.prototype;
827
+ q.generateRequest=function(a,b){var c=this;this.g=new Pc;try{this.i=this.l.createSession("video/mp4",Ic(b),null),this.j.o(this.i,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",Jc(d.message));d=new O("message",d);c.dispatchEvent(d)}),this.j.o(this.i,"mskeyadded",function(){c.g?(Qu(c,"usable"),c.g.resolve(),c.g=null):c.h&&(Qu(c,"usable"),c.h.resolve(),c.h=null)}),this.j.o(this.i,"mskeyerror",
828
+ function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.i.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.h)c.h.reject(d),c.h=null;else switch(c.i.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Qu(c,"output-not-allowed");break;default:Qu(c,"internal-error")}}),Qu(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
829
+ q.update=function(a){this.h=new Pc;try{this.i.update(Ic(a))}catch(b){this.h.reject(b)}return this.h};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.rb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Qu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}
830
+ function Pu(){this.size=0;this.g=void 0}q=Pu.prototype;q.forEach=function(a){this.g&&a(this.g,lg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=lg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Ut(Hu);function Ru(){}function Su(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Tu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Uu,window.MediaKeys=Vu,window.MediaKeySystemAccess=Wu)}function Tu(){return Promise.reject(Error("The key system specified is not supported."))}
831
+ function Uu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Rt.PatchedMediaKeysNop=Ru;Ru.install=Su;function Vu(){throw new TypeError("Illegal constructor.");}Vu.prototype.createSession=function(){};Vu.prototype.setServerCertificate=function(){};function Wu(){this.keySystem="";throw new TypeError("Illegal constructor.");}Wu.prototype.getConfiguration=function(){};Wu.prototype.createMediaKeys=function(){};Ut(Su,-10);function Xu(){}function Yu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Zu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=$u;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=av;window.MediaKeys=bv;window.MediaKeySystemAccess=cv}}
832
+ function dv(a){var b=Zu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function $u(a,b){try{var c=new cv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function av(a){var b=this.mediaKeys;b&&b!=a&&ev(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&ev(a,this);return Promise.resolve()}Rt.PatchedMediaKeysWebkit=Xu;Xu.install=Yu;
833
+ function cv(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=r(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=r(g.audioCapabilities),
833
834
  m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=r(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
834
- d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}av.prototype.createMediaKeys=function(){var a=new $u(this.g);return Promise.resolve(a)};av.prototype.getConfiguration=function(){return this.h};function $u(a){this.l=a;this.h=null;this.g=new of;this.i=[];this.j=new Map}
835
- function cv(a,b){a.h=b;a.g.rb();var c=Xu;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Jc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=dv(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new O("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=dv(a,d.sessionId))ev(d,"usable"),
836
- d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=dv(a,d.sessionId);e&&e.handleError(d)}))}$u.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new fv(b,this.l,a);this.i.push(a);return a};$u.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
837
- function dv(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function fv(a,b,c){cb.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new gv}u(fv,cb);q=fv.prototype;
838
- q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?ev(this,"output-restricted"):1==b?ev(this,"expired"):ev(this,"internal-error"))};
839
- function hv(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Ic(Xc("LOAD_SESSION|"+c));else{var e=Xc("PERSISTENT|");d=ed(e,b)}else d=Ic(b)}catch(g){return Promise.reject(g)}a.h=new Pc;var f=bv("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Q(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
840
- function iv(a,b,c){if(a.g)a.g.then(function(){return iv(a,b,c)})["catch"](function(){return iv(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Tc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=bd(e.keys[0].k);e=bd(e.keys[0].kid)}else d=Ic(c),e=null;var f=bv("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
841
- function ev(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return hv(this,b,null)};q.load=function(a){return"persistent-license"==this.l?hv(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Pc;iv(this,b,a);return b};
842
- q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=bv("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function gv(){this.size=0;this.g=void 0}q=gv.prototype;q.forEach=function(a){this.g&&a(this.g,jg.value())};q.get=function(a){if(this.has(a))return this.g};
843
- q.has=function(a){var b=jg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Xu="";St(Wu);function jv(){}function kv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=lv,Object.defineProperty(a,"disablePictureInPicture",{get:mv,set:nv,enumerable:!0,configurable:!0}),document.exitPictureInPicture=ov,document.addEventListener("webkitpresentationmodechanged",pv,!0))}}
844
- function pv(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
845
- function lv(){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 ov(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
846
- function mv(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function nv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Pt.PiPWebkit=jv;jv.install=kv;St(kv);function qv(){}function rv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=sv))}function sv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Pt.RandomUUID=qv;qv.install=rv;St(rv);function tv(){}function uv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=vv)}function vv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Pt.StorageEstimate=tv;tv.install=uv;St(uv);function wv(){}function xv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:yv})}function yv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Pt.Symbol=wv;wv.install=xv;St(xv);function zv(){}function Av(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Pt.VideoPlayPromise=zv;zv.install=Av;St(Av);function Bv(){}function Cv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Dv)}}function Dv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Pt.VideoPlaybackQuality=Bv;Bv.install=Cv;St(Cv);function Ev(){}function Fv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Gv;else if(6==b)a=Hv;else{try{var c=!!Gv(1,2,"")}catch(d){c=!1}c&&(a=Gv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Gv(a,b,c){return new window.TextTrackCue(a,b,c)}function Hv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Pt.VTTCue=Ev;Ev.install=Fv;St(Fv);function Iv(){}Iv.prototype.parseInit=function(){};Iv.prototype.parseMedia=function(a,b){var c=null,d=[],e=Tc(a).split(/\r?\n/);e=r(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Jv.exec(f))){var g=Kv.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new lc(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};N("shaka.text.LrcTextParser",Iv);Iv.prototype.parseMedia=Iv.prototype.parseMedia;
847
- Iv.prototype.parseInit=Iv.prototype.parseInit;var Jv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Kv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;rd["application/x-subtitle-lrc"]=function(){return new Iv};function Lv(){}Lv.prototype.parseInit=function(){};
848
- Lv.prototype.parseMedia=function(a,b){var c=Tc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(B){throw new P(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new P(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new P(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=oo(g,Mv,"frameRate"),k=oo(g,Mv,"subFrameRate"),l=oo(g,Mv,"frameRateMultiplier"),
849
- m=oo(g,Mv,"tickRate"),n=oo(g,Mv,"cellResolution");c=g.getAttribute("xml:space")||"default";e=oo(g,Nv,"extent");if("default"!=c&&"preserve"!=c)throw new P(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Ov(h,k,l,m);n=n?(n=/^(\d+) (\d+)$/.exec(n))?{columns:parseInt(n[1],10),rows:parseInt(n[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?mo(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=r(g),t=p.next();!t.done;t=
850
- p.next()){var v=t.value;t=new nc;var y=v.getAttribute("xml:id");if(y){t.id=y;var w=null;e&&(w=Pv.exec(e)||Qv.exec(e));y=w?Number(w[1]):null;w=w?Number(w[2]):null;var x,D;if(x=Rv(v,l,"extent"))x=(D=Pv.exec(x))||Qv.exec(x),null!=x&&(t.width=Number(x[1]),t.height=Number(x[2]),D||(null!=y&&(t.width=100*t.width/y),null!=w&&(t.height=100*t.height/w)),t.widthUnits=D||null!=y?Dc:0,t.heightUnits=D||null!=w?Dc:0);if(v=Rv(v,l,"origin"))x=(D=Pv.exec(v))||Qv.exec(v),null!=x&&(t.viewportAnchorX=Number(x[1]),t.viewportAnchorY=
851
- Number(x[2]),D||(null!=w&&(t.viewportAnchorY=100*t.viewportAnchorY/w),null!=y&&(t.viewportAnchorX=100*t.viewportAnchorX/y)),t.viewportAnchorUnits=D||null!=y?Dc:0)}else t=null;t&&m.push(t)}if(jo(f,"p").length)throw new P(2,2,2001,"<p> can only be inside <div> in TTML");e=r(jo(f,"div"));for(p=e.next();!p.done;p=e.next())if(jo(p.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");(f=Sv(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
852
- function Sv(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var t=null,v=r(Tv),y=v.next();!y.done&&!(t=Uv(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||t)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(p.childNodes).every(function(A){return A.nodeType==Node.TEXT_NODE});
853
- a=[];if(!y)for(var w=r(p.childNodes),x=w.next();!x.done;x=w.next())(x=Sv(x.value,b,c,d,e,f,g,h,k,p,m))&&a.push(x);d=null!=l;w=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||w||"br"==p.tagName||0!=a.length||d&&!h))return null;x=Vv(p,c);w=x.start;for(x=x.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)x=Wv(n,c,w,x),w=x.start,x=x.end,n=n.parentNode;null==w&&(w=0);w+=b;x=null==x?Infinity:x+b;if(!D&&0<a.length)for(w=Infinity,x=0,b=r(a),
854
- c=b.next();!c.done;c=b.next())c=c.value,w=Math.min(w,c.startTime),x=Math.max(x,c.endTime);if("br"==p.tagName)return e=new lc(w,x,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new lc(w,x,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Uv(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var B=k.getAttribute("xml:id");b.region=g.filter(function(A){return A.id==B})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
855
- (g=Uv(l,"region",f,"")[0]);Xv(b,p,g,t,e,v,0==a.length);return b}
856
- function Xv(a,b,c,d,e,f,g){f=f||g;"rtl"==Yv(b,c,e,"direction",f)&&(a.direction="rtl");g=Yv(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=mc);(g=Yv(b,c,e,"textAlign",!0))?(a.positionAlign=Zv[g],a.lineAlign=$v[g],a.textAlign=xc[g.toUpperCase()]):a.textAlign=pc;if(g=Yv(b,c,e,"displayAlign",!0))a.displayAlign=yc[g.toUpperCase()];if(g=Yv(b,c,e,"color",f))a.color=g;if(g=Yv(b,c,e,"backgroundColor",
857
- f))a.backgroundColor=g;if(g=Yv(b,c,e,"border",f))a.border=g;if(g=Yv(b,c,e,"fontFamily",f))a.fontFamily=g;(g=Yv(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=Yv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Yv(b,c,e,"lineHeight",f))&&g.match(aw)&&(a.lineHeight=g);(g=Yv(b,c,e,"fontSize",f))&&(g.match(aw)||g.match(bw))&&(a.fontSize=g);if(g=Yv(b,c,e,"fontStyle",f))a.fontStyle=Cc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
858
- d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=Yv(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(aw)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(aw)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=Yv(b,c,e,"letterSpacing",f))&&d.match(aw)&&(a.letterSpacing=d);(d=Yv(b,c,e,"linePadding",f))&&d.match(aw)&&(a.linePadding=d);if(f=Yv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Rv(c,e,"textDecoration"))&&cw(a,c);(b=
859
- dw(b,e,"textDecoration"))&&cw(a,b)}
860
- function cw(a,b){for(var c=r(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&ic(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&ic(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
861
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&ic(a.textDecoration,"overline")}}function Yv(a,b,c,d,e){e=void 0===e?!0:e;return(a=dw(a,c,d))?a:e?Rv(b,c,d):null}function Rv(a,b,c){if(!a)return null;var d=oo(a,Nv,c);return d?d:ew(a,b,c)}function dw(a,b,c){var d=oo(a,Nv,c);return d?d:ew(a,b,c)}
862
- function ew(a,b,c){a=Uv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=no(a[e],"urn:ebu:tt:style",c);f||(f=oo(a[e],Nv,c));f||(f=dw(a[e],b,c));f&&(d=f)}return d}
863
- function Uv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?no(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Wv(a,b,c,d){a=Vv(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
864
- function Vv(a,b){var c=fw(a.getAttribute("begin"),b),d=fw(a.getAttribute("end"),b),e=fw(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
865
- function fw(a,b){var c=null;if(gw.test(a)){c=gw.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(hw.test(a))c=iw(hw,a);else if(jw.test(a))c=iw(jw,a);else if(kw.test(a))c=kw.exec(a),c=Number(c[1])/b.frameRate;else if(lw.test(a))c=lw.exec(a),c=Number(c[1])/b.g;else if(mw.test(a))c=iw(mw,a);else if(a)throw new P(2,2,2001,"Could not parse cue time range in TTML");return c}
866
- function iw(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}N("shaka.text.TtmlTextParser",Lv);Lv.prototype.parseMedia=Lv.prototype.parseMedia;Lv.prototype.parseInit=Lv.prototype.parseInit;function Ov(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
867
- var Pv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,bw=/^(\d{1,2}(?:\.\d+)?|100)%$/,aw=/^(\d+px|\d+em|\d*\.?\d+c)$/,Qv=/^(\d+)px (\d+)px$/,gw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,hw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,jw=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,kw=/^(\d*(?:\.\d*)?)f$/,lw=/^(\d*(?:\.\d*)?)t$/,mw=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),$v={left:sc,center:"center",right:"end",start:sc,
868
- end:"end"},Zv={left:"line-left",center:"center",right:"line-right"},Mv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Nv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Tv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];rd["application/ttml+xml"]=function(){return new Lv};function nw(){this.g=new Lv}nw.prototype.parseInit=function(a){var b=!1;(new tg).box("moov",xg).box("trak",xg).box("mdia",xg).box("minf",xg).box("stbl",xg).X("stsd",zg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new P(2,2,2007);};nw.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new tg).box("mdat",Ag(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new P(2,2,2007);return e};N("shaka.text.Mp4TtmlParser",nw);nw.prototype.parseMedia=nw.prototype.parseMedia;
869
- nw.prototype.parseInit=nw.prototype.parseInit;rd['application/mp4; codecs="stpp"']=function(){return new nw};rd['application/mp4; codecs="stpp.ttml"']=function(){return new nw};rd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new nw};rd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new nw};function ow(){}ow.prototype.parseInit=function(){};
870
- ow.prototype.parseMedia=function(a,b){var c=Tc(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new P(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=pw(new Kq(e[1]));if(null==c)throw new P(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
871
- [];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new Kq(g);var h=new nc;Nq(g);Lq(g);for(var k=Nq(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
872
- (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Lq(g);k=Nq(g)}f.push(h)}e=new Map;qw(e);g=[];d=r(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new lc(0,0,"");for(var n=!1,p=0;p<k.length;p++){var t=
835
+ d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}cv.prototype.createMediaKeys=function(){var a=new bv(this.g);return Promise.resolve(a)};cv.prototype.getConfiguration=function(){return this.h};function bv(a){this.l=a;this.h=null;this.g=new qf;this.i=[];this.j=new Map}
836
+ function ev(a,b){a.h=b;a.g.rb();var c=Zu;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Jc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=fv(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new O("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=fv(a,d.sessionId))gv(d,"usable"),
837
+ d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=fv(a,d.sessionId);e&&e.handleError(d)}))}bv.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new hv(b,this.l,a);this.i.push(a);return a};bv.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
838
+ function fv(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function hv(a,b,c){cb.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Pc;this.keyStatuses=new iv}u(hv,cb);q=hv.prototype;
839
+ q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?gv(this,"output-restricted"):1==b?gv(this,"expired"):gv(this,"internal-error"))};
840
+ function jv(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Ic(jd("LOAD_SESSION|"+c));else{var e=jd("PERSISTENT|");d=sd(e,b)}else d=Ic(b)}catch(g){return Promise.reject(g)}a.h=new Pc;var f=dv("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Q(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
841
+ function kv(a,b,c){if(a.g)a.g.then(function(){return kv(a,b,c)})["catch"](function(){return kv(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=fd(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=pd(e.keys[0].k);e=pd(e.keys[0].kid)}else d=Ic(c),e=null;var f=dv("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
842
+ function gv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new O("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return jv(this,b,null)};q.load=function(a){return"persistent-license"==this.l?jv(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Pc;kv(this,b,a);return b};
843
+ q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=dv("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function iv(){this.size=0;this.g=void 0}q=iv.prototype;q.forEach=function(a){this.g&&a(this.g,lg.value())};q.get=function(a){if(this.has(a))return this.g};
844
+ q.has=function(a){var b=lg.value();return this.g&&Gc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Zu="";Ut(Yu);function lv(){}function mv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=nv,Object.defineProperty(a,"disablePictureInPicture",{get:ov,set:pv,enumerable:!0,configurable:!0}),document.exitPictureInPicture=qv,document.addEventListener("webkitpresentationmodechanged",rv,!0))}}
845
+ function rv(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
846
+ function nv(){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 qv(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
847
+ function ov(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function pv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Rt.PiPWebkit=lv;lv.install=mv;Ut(mv);function sv(){}function tv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=uv))}function uv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Rt.RandomUUID=sv;sv.install=tv;Ut(tv);function vv(){}function wv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=xv)}function xv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Rt.StorageEstimate=vv;vv.install=wv;Ut(wv);function yv(){}function zv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Av})}function Av(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Rt.Symbol=yv;yv.install=zv;Ut(zv);function Bv(){}function Cv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Rt.VideoPlayPromise=Bv;Bv.install=Cv;Ut(Cv);function Dv(){}function Ev(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Xc("Web0S")&&Xc("Chrome/38.0.2125.122 Safari/537.36"))&&(a.getVideoPlaybackQuality=Fv)}}function Fv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Rt.VideoPlaybackQuality=Dv;Dv.install=Ev;Ut(Ev);function Gv(){}function Hv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Iv;else if(6==b)a=Jv;else{try{var c=!!Iv(1,2,"")}catch(d){c=!1}c&&(a=Iv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Iv(a,b,c){return new window.TextTrackCue(a,b,c)}function Jv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Rt.VTTCue=Gv;Gv.install=Hv;Ut(Hv);function Kv(){}Kv.prototype.parseInit=function(){};Kv.prototype.parseMedia=function(a,b){var c=null,d=[],e=fd(a).split(/\r?\n/);e=r(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Lv.exec(f))){var g=Mv.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new lc(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};N("shaka.text.LrcTextParser",Kv);Kv.prototype.parseMedia=Kv.prototype.parseMedia;
848
+ Kv.prototype.parseInit=Kv.prototype.parseInit;var Lv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Mv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Gd["application/x-subtitle-lrc"]=function(){return new Kv};function Nv(){}Nv.prototype.parseInit=function(){};
849
+ Nv.prototype.parseMedia=function(a,b){var c=fd(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(B){throw new P(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new P(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new P(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=qo(g,Ov,"frameRate"),k=qo(g,Ov,"subFrameRate"),l=qo(g,Ov,"frameRateMultiplier"),
850
+ m=qo(g,Ov,"tickRate"),n=qo(g,Ov,"cellResolution");c=g.getAttribute("xml:space")||"default";e=qo(g,Pv,"extent");if("default"!=c&&"preserve"!=c)throw new P(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Qv(h,k,l,m);n=n?(n=/^(\d+) (\d+)$/.exec(n))?{columns:parseInt(n[1],10),rows:parseInt(n[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?oo(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=r(g),t=p.next();!t.done;t=
851
+ p.next()){var v=t.value;t=new nc;var y=v.getAttribute("xml:id");if(y){t.id=y;var w=null;e&&(w=Rv.exec(e)||Sv.exec(e));y=w?Number(w[1]):null;w=w?Number(w[2]):null;var x,D;if(x=Tv(v,l,"extent"))x=(D=Rv.exec(x))||Sv.exec(x),null!=x&&(t.width=Number(x[1]),t.height=Number(x[2]),D||(null!=y&&(t.width=100*t.width/y),null!=w&&(t.height=100*t.height/w)),t.widthUnits=D||null!=y?Dc:0,t.heightUnits=D||null!=w?Dc:0);if(v=Tv(v,l,"origin"))x=(D=Rv.exec(v))||Sv.exec(v),null!=x&&(t.viewportAnchorX=Number(x[1]),t.viewportAnchorY=
852
+ Number(x[2]),D||(null!=w&&(t.viewportAnchorY=100*t.viewportAnchorY/w),null!=y&&(t.viewportAnchorX=100*t.viewportAnchorX/y)),t.viewportAnchorUnits=D||null!=y?Dc:0)}else t=null;t&&m.push(t)}if(lo(f,"p").length)throw new P(2,2,2001,"<p> can only be inside <div> in TTML");e=r(lo(f,"div"));for(p=e.next();!p.done;p=e.next())if(lo(p.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");(f=Uv(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
853
+ function Uv(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var t=null,v=r(Vv),y=v.next();!y.done&&!(t=Wv(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||t)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(p.childNodes).every(function(A){return A.nodeType==Node.TEXT_NODE});
854
+ a=[];if(!y)for(var w=r(p.childNodes),x=w.next();!x.done;x=w.next())(x=Uv(x.value,b,c,d,e,f,g,h,k,p,m))&&a.push(x);d=null!=l;w=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||w||"br"==p.tagName||0!=a.length||d&&!h))return null;x=Xv(p,c);w=x.start;for(x=x.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)x=Yv(n,c,w,x),w=x.start,x=x.end,n=n.parentNode;null==w&&(w=0);w+=b;x=null==x?Infinity:x+b;if(!D&&0<a.length)for(w=Infinity,x=0,b=r(a),
855
+ c=b.next();!c.done;c=b.next())c=c.value,w=Math.min(w,c.startTime),x=Math.max(x,c.endTime);if("br"==p.tagName)return e=new lc(w,x,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new lc(w,x,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Wv(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var B=k.getAttribute("xml:id");b.region=g.filter(function(A){return A.id==B})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
856
+ (g=Wv(l,"region",f,"")[0]);Zv(b,p,g,t,e,v,0==a.length);return b}
857
+ function Zv(a,b,c,d,e,f,g){f=f||g;"rtl"==$v(b,c,e,"direction",f)&&(a.direction="rtl");g=$v(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=mc);(g=$v(b,c,e,"textAlign",!0))?(a.positionAlign=aw[g],a.lineAlign=bw[g],a.textAlign=xc[g.toUpperCase()]):a.textAlign=pc;if(g=$v(b,c,e,"displayAlign",!0))a.displayAlign=yc[g.toUpperCase()];if(g=$v(b,c,e,"color",f))a.color=g;if(g=$v(b,c,e,"backgroundColor",
858
+ f))a.backgroundColor=g;if(g=$v(b,c,e,"border",f))a.border=g;if(g=$v(b,c,e,"fontFamily",f))a.fontFamily=g;(g=$v(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=$v(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=$v(b,c,e,"lineHeight",f))&&g.match(cw)&&(a.lineHeight=g);(g=$v(b,c,e,"fontSize",f))&&(g.match(cw)||g.match(dw))&&(a.fontSize=g);if(g=$v(b,c,e,"fontStyle",f))a.fontStyle=Cc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
859
+ d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=$v(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(cw)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(cw)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=$v(b,c,e,"letterSpacing",f))&&d.match(cw)&&(a.letterSpacing=d);(d=$v(b,c,e,"linePadding",f))&&d.match(cw)&&(a.linePadding=d);if(f=$v(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Tv(c,e,"textDecoration"))&&ew(a,c);(b=
860
+ fw(b,e,"textDecoration"))&&ew(a,b)}
861
+ function ew(a,b){for(var c=r(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&ic(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&ic(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
862
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&ic(a.textDecoration,"overline")}}function $v(a,b,c,d,e){e=void 0===e?!0:e;return(a=fw(a,c,d))?a:e?Tv(b,c,d):null}function Tv(a,b,c){if(!a)return null;var d=qo(a,Pv,c);return d?d:gw(a,b,c)}function fw(a,b,c){var d=qo(a,Pv,c);return d?d:gw(a,b,c)}
863
+ function gw(a,b,c){a=Wv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=po(a[e],"urn:ebu:tt:style",c);f||(f=qo(a[e],Pv,c));f||(f=fw(a[e],b,c));f&&(d=f)}return d}
864
+ function Wv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?po(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Yv(a,b,c,d){a=Xv(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
865
+ function Xv(a,b){var c=hw(a.getAttribute("begin"),b),d=hw(a.getAttribute("end"),b),e=hw(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
866
+ function hw(a,b){var c=null;if(iw.test(a)){c=iw.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(jw.test(a))c=kw(jw,a);else if(lw.test(a))c=kw(lw,a);else if(mw.test(a))c=mw.exec(a),c=Number(c[1])/b.frameRate;else if(nw.test(a))c=nw.exec(a),c=Number(c[1])/b.g;else if(ow.test(a))c=kw(ow,a);else if(a)throw new P(2,2,2001,"Could not parse cue time range in TTML");return c}
867
+ function kw(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}N("shaka.text.TtmlTextParser",Nv);Nv.prototype.parseMedia=Nv.prototype.parseMedia;Nv.prototype.parseInit=Nv.prototype.parseInit;function Qv(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
868
+ var Rv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,dw=/^(\d{1,2}(?:\.\d+)?|100)%$/,cw=/^(\d+px|\d+em|\d*\.?\d+c)$/,Sv=/^(\d+)px (\d+)px$/,iw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,jw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,lw=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,mw=/^(\d*(?:\.\d*)?)f$/,nw=/^(\d*(?:\.\d*)?)t$/,ow=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),bw={left:sc,center:"center",right:"end",start:sc,
869
+ end:"end"},aw={left:"line-left",center:"center",right:"line-right"},Ov=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Pv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Vv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Gd["application/ttml+xml"]=function(){return new Nv};function pw(){this.g=new Nv}pw.prototype.parseInit=function(a){var b=!1;(new vg).box("moov",zg).box("trak",zg).box("mdia",zg).box("minf",zg).box("stbl",zg).X("stsd",Bg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new P(2,2,2007);};pw.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new vg).box("mdat",Cg(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new P(2,2,2007);return e};N("shaka.text.Mp4TtmlParser",pw);pw.prototype.parseMedia=pw.prototype.parseMedia;
870
+ pw.prototype.parseInit=pw.prototype.parseInit;Gd['application/mp4; codecs="stpp"']=function(){return new pw};Gd['application/mp4; codecs="stpp.ttml"']=function(){return new pw};Gd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new pw};Gd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new pw};function qw(){}qw.prototype.parseInit=function(){};
871
+ qw.prototype.parseMedia=function(a,b){var c=fd(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new P(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=rw(new Mq(e[1]));if(null==c)throw new P(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
872
+ [];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new Mq(g);var h=new nc;Pq(g);Nq(g);for(var k=Pq(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
873
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Nq(g);k=Pq(g)}f.push(h)}e=new Map;sw(e);g=[];d=r(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new lc(0,0,"");for(var n=!1,p=0;p<k.length;p++){var t=
873
874
  /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(t){var v=t[2].trim().replace(";","");switch(t[1].trim()){case "background-color":n=!0;m.backgroundColor=v;break;case "color":n=!0;m.color=v;break;case "font-family":n=!0;m.fontFamily=v;break;case "font-size":n=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":n=!0;m.fontStyle=vc;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
874
- !0;m.opacity=parseFloat(v);break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new Kq(h[0]);m=pw(k);t=Mq(k,/[ \t]+--\x3e[ \t]+/g);n=pw(k);if(null==m||null==t||null==n)throw new P(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=
875
- ""):h=new lc(m,n,"");rw(p,h,e);Lq(k);for(m=Nq(k);m;)sw(h,m,f),Lq(k),m=Nq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function qw(a){for(var b=r(Object.entries(Ac)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new lc(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(Bc));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new lc(0,0,""),e.backgroundColor=d,a.set(c,e)}
876
- function rw(a,b,c){0===c.size&&qw(c);a=tw(a);var d=Ao("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=r(d);for(d=a.next();!d.done;d=a.next())uw(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
877
- function tw(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function vw(a,b){return a&&0<a.length?a:b}
878
- function uw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=vw(h.backgroundColor,e.backgroundColor),e.color=vw(h.color,e.color),e.fontFamily=vw(h.fontFamily,e.fontFamily),e.fontSize=vw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
879
- "italic";break;case "u":e.textDecoration.push("underline")}}if(qo(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())uw(a.value,e,c,d)}
880
- function sw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=pc:a.textAlign=xc[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
881
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=ww(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=zc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=rc,a.line=Number(c[1]),c[2]&&(a.lineAlign=zc[c[2].toUpperCase()])}function ww(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
882
- function pw(a){a=Mq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}N("shaka.text.VttTextParser",ow);ow.prototype.parseMedia=ow.prototype.parseMedia;ow.prototype.parseInit=ow.prototype.parseInit;rd["text/vtt"]=function(){return new ow};rd['text/vtt; codecs="vtt"']=function(){return new ow};rd['text/vtt; codecs="wvtt"']=function(){return new ow};function xw(){this.g=null}xw.prototype.parseInit=function(a){var b=this,c=!1;(new tg).box("moov",xg).box("trak",xg).box("mdia",xg).X("mdhd",function(d){d=Kh(d.reader,d.version);b.g=d.timescale}).box("minf",xg).box("stbl",xg).X("stsd",zg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};
883
- xw.prototype.parseMedia=function(a,b){if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new tg).box("moof",xg).box("traf",xg).X("tfdt",function(A){g=!0;c=Jh(A.reader,A.version).Qd}).X("tfhd",function(A){l=Ih(A.reader,A.flags).Ue}).X("trun",function(A){h=!0;d=Lh(A.reader,A.version,A.flags).rf}).box("mdat",Ag(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);for(var m=c,n=new qg(e,0),p=r(d),t=p.next();!t.done;t=p.next()){t=t.value;var v=t.je||l,y=t.ud?
884
- c+t.ud:m;m=y+(v||0);var w=0;do{var x=n.P();w+=x;var D=n.P(),B=null;"vttc"==Bg(D)?8<x&&(B=n.Cb(x-8)):n.skip(x-8);v&&B&&(x=yw(B,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(x))}while(t.sampleSize&&w<t.sampleSize)}return f.filter(Fb)};function yw(a,b,c){var d,e,f;(new tg).box("payl",Ag(function(g){d=Tc(g)})).box("iden",Ag(function(g){e=Tc(g)})).box("sttg",Ag(function(g){f=Tc(g)})).parse(a);return d?zw(d,e,f,b,c):null}
885
- function zw(a,b,c,d,e){d=new lc(d,e,"");rw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Kq(c),b=Nq(a);b;)sw(d,b,[]),Lq(a),b=Nq(a);return d}N("shaka.text.Mp4VttParser",xw);xw.prototype.parseMedia=xw.prototype.parseMedia;xw.prototype.parseInit=xw.prototype.parseInit;rd['application/mp4; codecs="wvtt"']=function(){return new xw};function Aw(){}Aw.prototype.parseInit=function(){};Aw.prototype.parseMedia=function(a){var b=Tc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Kq(c[0]),e=Bw(d),f=Mq(d,/,/g);d=Bw(d);if(null==e||null==f||null==d)throw new P(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new lc(e,d,c.slice(1).join("\n").trim()))}return a};
886
- function Bw(a){a=Mq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}N("shaka.text.SbvTextParser",Aw);Aw.prototype.parseMedia=Aw.prototype.parseMedia;Aw.prototype.parseInit=Aw.prototype.parseInit;rd["text/x-subviewer"]=function(){return new Aw};function Cw(){this.g=new ow}Cw.prototype.parseInit=function(){};Cw.prototype.parseMedia=function(a,b){var c=Tc(a);c=Dw(c);c=Ic(Xc(c));return this.g.parseMedia(c,b)};function Dw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}N("shaka.text.SrtTextParser",Cw);Cw.srt2webvtt=Dw;Cw.prototype.parseMedia=Cw.prototype.parseMedia;
887
- Cw.prototype.parseInit=Cw.prototype.parseInit;rd["text/srt"]=function(){return new Cw};function Ew(){}Ew.prototype.parseInit=function(){};
888
- Ew.prototype.parseMedia=function(a){var b="",c="";a=Tc(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Fw.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Gw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Hw);else if("Style"==e){e=f.split(Hw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
889
- [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Nd:e.Nd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Gw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Hw);else if("Dialogue"==f){g=g.split(Hw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Iw(f.Start);var k=Iw(f.End);g=new lc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Nd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Nd}}(e)))&&Jw(g,f);d.push(g)}return d};
890
- function Jw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Kw(c))a.color=c;if(c=b.BackColour)if(c=Kw(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=tc;a.textAlign="start";break;case 2:a.displayAlign=tc;a.textAlign=pc;break;case 3:a.displayAlign=tc;a.textAlign="end";
875
+ !0;m.opacity=parseFloat(v);break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new Mq(h[0]);m=rw(k);t=Oq(k,/[ \t]+--\x3e[ \t]+/g);n=rw(k);if(null==m||null==t||null==n)throw new P(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=
876
+ ""):h=new lc(m,n,"");tw(p,h,e);Nq(k);for(m=Pq(k);m;)uw(h,m,f),Nq(k),m=Pq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function sw(a){for(var b=r(Object.entries(Ac)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new lc(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(Bc));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new lc(0,0,""),e.backgroundColor=d,a.set(c,e)}
877
+ function tw(a,b,c){0===c.size&&sw(c);a=vw(a);var d=Co("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=r(d);for(d=a.next();!d.done;d=a.next())ww(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
878
+ function vw(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function xw(a,b){return a&&0<a.length?a:b}
879
+ function ww(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=xw(h.backgroundColor,e.backgroundColor),e.color=xw(h.color,e.color),e.fontFamily=xw(h.fontFamily,e.fontFamily),e.fontSize=xw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
880
+ "italic";break;case "u":e.textDecoration.push("underline")}}if(so(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())ww(a.value,e,c,d)}
881
+ function uw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=pc:a.textAlign=xc[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
882
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=yw(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=zc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=rc,a.line=Number(c[1]),c[2]&&(a.lineAlign=zc[c[2].toUpperCase()])}function yw(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
883
+ function rw(a){a=Oq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}N("shaka.text.VttTextParser",qw);qw.prototype.parseMedia=qw.prototype.parseMedia;qw.prototype.parseInit=qw.prototype.parseInit;Gd["text/vtt"]=function(){return new qw};Gd['text/vtt; codecs="vtt"']=function(){return new qw};Gd['text/vtt; codecs="wvtt"']=function(){return new qw};function zw(){this.g=null}zw.prototype.parseInit=function(a){var b=this,c=!1;(new vg).box("moov",zg).box("trak",zg).box("mdia",zg).X("mdhd",function(d){d=Mh(d.reader,d.version);b.g=d.timescale}).box("minf",zg).box("stbl",zg).X("stsd",Bg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};
884
+ zw.prototype.parseMedia=function(a,b){if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new vg).box("moof",zg).box("traf",zg).X("tfdt",function(A){g=!0;c=Lh(A.reader,A.version).Qd}).X("tfhd",function(A){l=Kh(A.reader,A.flags).Ve}).X("trun",function(A){h=!0;d=Nh(A.reader,A.version,A.flags).tf}).box("mdat",Cg(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);for(var m=c,n=new sg(e,0),p=r(d),t=p.next();!t.done;t=p.next()){t=t.value;var v=t.ke||l,y=t.ud?
885
+ c+t.ud:m;m=y+(v||0);var w=0;do{var x=n.P();w+=x;var D=n.P(),B=null;"vttc"==Dg(D)?8<x&&(B=n.Cb(x-8)):n.skip(x-8);v&&B&&(x=Aw(B,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(x))}while(t.sampleSize&&w<t.sampleSize)}return f.filter(Fb)};function Aw(a,b,c){var d,e,f;(new vg).box("payl",Cg(function(g){d=fd(g)})).box("iden",Cg(function(g){e=fd(g)})).box("sttg",Cg(function(g){f=fd(g)})).parse(a);return d?Bw(d,e,f,b,c):null}
886
+ function Bw(a,b,c,d,e){d=new lc(d,e,"");tw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Mq(c),b=Pq(a);b;)uw(d,b,[]),Nq(a),b=Pq(a);return d}N("shaka.text.Mp4VttParser",zw);zw.prototype.parseMedia=zw.prototype.parseMedia;zw.prototype.parseInit=zw.prototype.parseInit;Gd['application/mp4; codecs="wvtt"']=function(){return new zw};function Cw(){}Cw.prototype.parseInit=function(){};Cw.prototype.parseMedia=function(a){var b=fd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Mq(c[0]),e=Dw(d),f=Oq(d,/,/g);d=Dw(d);if(null==e||null==f||null==d)throw new P(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new lc(e,d,c.slice(1).join("\n").trim()))}return a};
887
+ function Dw(a){a=Oq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}N("shaka.text.SbvTextParser",Cw);Cw.prototype.parseMedia=Cw.prototype.parseMedia;Cw.prototype.parseInit=Cw.prototype.parseInit;Gd["text/x-subviewer"]=function(){return new Cw};function Ew(){this.g=new qw}Ew.prototype.parseInit=function(){};Ew.prototype.parseMedia=function(a,b){var c=fd(a);c=Fw(c);c=Ic(jd(c));return this.g.parseMedia(c,b)};function Fw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}N("shaka.text.SrtTextParser",Ew);Ew.srt2webvtt=Fw;Ew.prototype.parseMedia=Ew.prototype.parseMedia;
888
+ Ew.prototype.parseInit=Ew.prototype.parseInit;Gd["text/srt"]=function(){return new Ew};function Gw(){}Gw.prototype.parseInit=function(){};
889
+ Gw.prototype.parseMedia=function(a){var b="",c="";a=fd(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Hw.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Iw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Jw);else if("Style"==e){e=f.split(Jw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
890
+ [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Nd:e.Nd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Iw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Jw);else if("Dialogue"==f){g=g.split(Jw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Kw(f.Start);var k=Kw(f.End);g=new lc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Nd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Nd}}(e)))&&Lw(g,f);d.push(g)}return d};
891
+ function Lw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Mw(c))a.color=c;if(c=b.BackColour)if(c=Mw(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=tc;a.textAlign="start";break;case 2:a.displayAlign=tc;a.textAlign=pc;break;case 3:a.displayAlign=tc;a.textAlign="end";
891
892
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=pc;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=pc;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
892
- function Kw(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function Iw(a){a=Lw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}N("shaka.text.SsaTextParser",Ew);Ew.prototype.parseMedia=Ew.prototype.parseMedia;Ew.prototype.parseInit=Ew.prototype.parseInit;var Fw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Gw=/^\s*([^:]+):\s*(.*)/,Hw=/\s*,\s*/,Lw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
893
- rd["text/x-ssa"]=function(){return new Ew};/*
893
+ function Mw(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function Kw(a){a=Nw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}N("shaka.text.SsaTextParser",Gw);Gw.prototype.parseMedia=Gw.prototype.parseMedia;Gw.prototype.parseInit=Gw.prototype.parseInit;var Hw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Iw=/^\s*([^:]+):\s*(.*)/,Jw=/\s*,\s*/,Nw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
894
+ Gd["text/x-ssa"]=function(){return new Gw};/*
894
895
  @license
895
896
  EME Encryption Scheme Polyfill
896
897
  Copyright 2019 Google LLC
897
898
  SPDX-License-Identifier: Apache-2.0
898
899
  */
899
- function Mw(){}var Nw;function Ow(){Nw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Nw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Pw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
900
- function Pw(a,b){var c=this,d;return M(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),z(e,Nw.call(c,a,b),2);d=e.h;if(Qw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Nw,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Rw;return e["return"](Rw.call(c,
900
+ function Ow(){}var Pw;function Qw(){Pw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Pw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Rw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
901
+ function Rw(a,b){var c=this,d;return M(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),z(e,Pw.call(c,a,b),2);d=e.h;if(Sw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Pw,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Tw;return e["return"](Tw.call(c,
901
902
  a,b))})}
902
- function Rw(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return M(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Sw(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Tw(h.videoCapabilities,d),l=Tw(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
903
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return z(t,Nw.call(c,a,e),2)}p=t.h;return t["return"](new Uw(p,d))})}function Tw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}N("EmeEncryptionSchemePolyfill",Mw);Mw.install=Ow;function Vw(){}var Ww;
904
- function Xw(){Ww?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Ww=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Yw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
905
- function Yw(a){var b=this,c,d;return M(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),z(e,Ww.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Qw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Ww,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
906
- navigator.mediaCapabilities.decodingInfo=Zw;return e["return"](Zw.call(b,a))})}
907
- function Zw(a){var b=this,c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Sw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):z(n,Ww.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
908
- new Uw(k.keySystemAccess,c);n.D(3);break}if(!a.keySystemConfiguration){n.D(3);break}var p=a.keySystemConfiguration,t=[],v=[];p.audio&&t.push({robustness:p.audio.robustness||"",contentType:a.audio.contentType});p.video&&v.push({robustness:p.video.robustness||"",contentType:a.video.contentType});p={initDataTypes:p.initDataType?[p.initDataType]:[],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};t.length&&(p.audioCapabilities=t);v.length&&(p.videoCapabilities=
909
- v);l=p;m=k;return z(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}N("McEncryptionSchemePolyfill",Vw);Vw.install=Xw;function Uw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
910
- Uw.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Uw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
911
- function Sw(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Qw(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function $w(){}
912
- function Yt(){Ow();Xw()}N("EncryptionSchemePolyfills",$w);$w.install=Yt;"undefined"!==typeof module&&module.exports&&(module.exports=$w);/*
903
+ function Tw(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return M(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Uw(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Vw(h.videoCapabilities,d),l=Vw(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
904
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return z(t,Pw.call(c,a,e),2)}p=t.h;return t["return"](new Ww(p,d))})}function Vw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}N("EmeEncryptionSchemePolyfill",Ow);Ow.install=Qw;function Xw(){}var Yw;
905
+ function Zw(){Yw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Yw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=$w):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
906
+ function $w(a){var b=this,c,d;return M(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),z(e,Yw.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Sw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Yw,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
907
+ navigator.mediaCapabilities.decodingInfo=ax;return e["return"](ax.call(b,a))})}
908
+ function ax(a){var b=this,c,d,e,f,g,h,k,l,m;return M(function(n){switch(n.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Uw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):z(n,Yw.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
909
+ new Ww(k.keySystemAccess,c);n.D(3);break}if(!a.keySystemConfiguration){n.D(3);break}var p=a.keySystemConfiguration,t=[],v=[];p.audio&&t.push({robustness:p.audio.robustness||"",contentType:a.audio.contentType});p.video&&v.push({robustness:p.video.robustness||"",contentType:a.video.contentType});p={initDataTypes:p.initDataType?[p.initDataType]:[],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};t.length&&(p.audioCapabilities=t);v.length&&(p.videoCapabilities=
910
+ v);l=p;m=k;return z(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}N("McEncryptionSchemePolyfill",Xw);Xw.install=Zw;function Ww(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
911
+ Ww.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Ww.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
912
+ function Uw(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Sw(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function bx(){}
913
+ function $t(){Qw();Zw()}N("EncryptionSchemePolyfills",bx);bx.install=$t;"undefined"!==typeof module&&module.exports&&(module.exports=bx);/*
913
914
  @license
914
915
  Copyright 2013 Ali Al Dallal
915
916
 
@@ -933,7 +934,7 @@ function Yt(){Ow();Xw()}N("EncryptionSchemePolyfills",$w);$w.install=Yt;"undefin
933
934
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
934
935
  SOFTWARE.
935
936
  */
936
- for(var ax={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
937
+ for(var cx={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
937
938
  "ar-SA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",u:"Arabic (Saudi Arabia)"},"ay-BO":{s:"Aymar aru",u:"Aymara"},az:{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"az-AZ":{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"be-BY":{s:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",u:"Belarusian"},bg:{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",u:"Bulgarian"},"bg-BG":{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
938
939
  u:"Bulgarian"},bn:{s:"\u09ac\u09be\u0982\u09b2\u09be",u:"Bengali"},"bn-IN":{s:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",u:"Bengali (India)"},"bn-BD":{s:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",u:"Bengali (Bangladesh)"},"bs-BA":{s:"Bosanski",u:"Bosnian"},ca:{s:"Catal\u00e0",u:"Catalan"},"ca-ES":{s:"Catal\u00e0",u:"Catalan"},cak:{s:"Maya Kaqchikel",u:"Kaqchikel"},"ck-US":{s:"\u13e3\u13b3\u13a9 (tsalagi)",u:"Cherokee"},cs:{s:"\u010ce\u0161tina",
939
940
  u:"Czech"},"cs-CZ":{s:"\u010ce\u0161tina",u:"Czech"},cy:{s:"Cymraeg",u:"Welsh"},"cy-GB":{s:"Cymraeg",u:"Welsh"},da:{s:"Dansk",u:"Danish"},"da-DK":{s:"Dansk",u:"Danish"},de:{s:"Deutsch",u:"German"},"de-AT":{s:"Deutsch (\u00d6sterreich)",u:"German (Austria)"},"de-DE":{s:"Deutsch (Deutschland)",u:"German (Germany)"},"de-CH":{s:"Deutsch (Schweiz)",u:"German (Switzerland)"},dsb:{s:"Dolnoserb\u0161\u0107ina",u:"Lower Sorbian"},el:{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",u:"Greek"},"el-GR":{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
@@ -954,54 +955,54 @@ u:"Slovak"},"sk-SK":{s:"Sloven\u010dina (Slovakia)",u:"Slovak (Slovakia)"},sl:{s
954
955
  sw:{s:"Kiswahili",u:"Swahili"},"sw-KE":{s:"Kiswahili",u:"Swahili (Kenya)"},ta:{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},"ta-IN":{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},te:{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},"te-IN":{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},tg:{s:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",u:"Tajik"},"tg-TJ":{s:"\u0442\u043e\u04b7\u0438\u043a\u04e3",u:"Tajik"},th:{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
955
956
  u:"Thai"},"th-TH":{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",u:"Thai (Thailand)"},tl:{s:"Filipino",u:"Filipino"},"tl-PH":{s:"Filipino",u:"Filipino"},tlh:{s:"tlhIngan-Hol",u:"Klingon"},tr:{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tr-TR":{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tt-RU":{s:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",u:"Tatar"},uk:{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",u:"Ukrainian"},"uk-UA":{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
956
957
  u:"Ukrainian"},ur:{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},"ur-PK":{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},uz:{s:"O'zbek",u:"Uzbek"},"uz-UZ":{s:"O'zbek",u:"Uzbek"},vi:{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"vi-VN":{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"xh-ZA":{s:"isiXhosa",u:"Xhosa"},yi:{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",u:"Yiddish"},"yi-DE":{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",u:"Yiddish (German)"},zh:{s:"\u4e2d\u6587",u:"Chinese"},"zh-HANS":{s:"\u4e2d\u6587\u7b80\u4f53",
957
- u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},bx=r(Object.keys(ax)),cx=bx.next();!cx.done;cx=
958
- bx.next()){var dx=cx.value;ax[dx.toLowerCase()]=ax[dx]};function V(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new of;this.localization=this.controls.Ba;this.player=this.controls.ac();this.video=this.controls.Bb();this.adManager=this.player.$c();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
959
- V.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};N("shaka.ui.Element",V);V.prototype.release=V.prototype.release;function ex(a){return fx(a,"shaka-back-to-overflow-button")}function fx(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function gx(a){a&&(a=fx(a,"shaka-chosen-item"))&&a.parentElement.focus()}function hx(){var a=S("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function X(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
960
- function ix(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60),e=Math.floor(a%60);10>e&&(e="0"+e);e=d+":"+e;b&&(10>d&&(e="0"+e),e=c+":"+e);return e};function jx(a,b){V.call(this,a,b);var c=this;this.i=S("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=S("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Q(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=ix(e-d,!1)+" / "+ix(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
961
- ""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.za();c.g.ha(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.za(),this.g.ha(.5))}u(jx,V);jx.prototype.release=function(){this.g.stop();this.g=null;V.prototype.release.call(this)};N("shaka.ui.AdCounter",jx);function kx(a,b){V.call(this,a,b);var c=this;this.g=S("div");this.g.classList.add("shaka-ad-position");X(this.g,!1);this.parent.appendChild(this.g);this.h=S("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&lx(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&lx(c)});this.eventManager.o(this.adManager,"ad-started",function(){lx(c)});this.eventManager.o(this.adManager,
962
- "ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&lx(this)}u(kx,V);function lx(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));X(a.g,!0)}}N("shaka.ui.AdPosition",kx);function mx(a,b){V.call(this,a,b);var c=this;this.button=Vj();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
963
- c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?nx(c.controls):ox(c.controls)});this.ad&&(this.g(),this.h())}u(mx,V);mx.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.A.paused&&!a.$;return a};mx.prototype.g=function(){};mx.prototype.h=function(){};
964
- N("shaka.ui.PlayButton",mx);function px(a,b){mx.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}u(px,mx);px.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};px.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};N("shaka.ui.BigPlayButton",px);function qx(a,b){V.call(this,a,b);var c=this;this.j=this.controls.i;this.h=this.controls.g;this.i=[];this.g=S("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";X(c.g,!0)}else X(c.g,
965
- !1)});this.eventManager.o(window,"click",function(){X(c.g,!1)});rx(this)}u(qx,V);qx.prototype.release=function(){this.h=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];V.prototype.release.call(this)};function sx(a,b){tx.set(a,b)}function rx(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=tx.get(c);d?a.i.push(d.create(a.g,a.controls)):Sa("Unrecognized context menu element:",c)}}N("shaka.ui.ContextMenu",qx);
966
- qx.registerElement=sx;var tx=new Map;function ux(a,b,c,d){V.call(this,a,b);var e=this;this.container=S("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ia(c));this.g=!1;this.bar=document.createElement("input");this.l=new Q(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ia(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
967
- this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Nb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Nb()&&(e.g=!0,vx(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(vx(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,vx(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
968
- "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}u(ux,V);q=ux.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);V.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.S(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
969
- q.setValue=function(a){this.g||(this.bar.value=a)};function vx(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect(),e=parseFloat(a.bar.min),f=parseFloat(a.bar.max);c=e+(f-e)/d.width*(c.clientX-d.left);c<e?c=e:c>f&&(c=f);a.bar.value=c}N("shaka.ui.RangeElement",ux);ux.prototype.setValue=ux.prototype.setValue;ux.prototype.getValue=ux.prototype.getValue;ux.prototype.changeTo=ux.prototype.changeTo;ux.prototype.onChangeEnd=ux.prototype.onChangeEnd;ux.prototype.onChange=ux.prototype.onChange;
970
- ux.prototype.onChangeStart=ux.prototype.onChangeStart;ux.prototype.setRange=ux.prototype.setRange;function wx(a,b){ux.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=S("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.m=this.controls.i;this.h=new Q(function(){c.video.currentTime=c.getValue()});this.A=new Q(function(){xx(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return yx(c)});this.eventManager.o(this.localization,
971
- "locale-changed",function(){return yx(c)});this.eventManager.o(this.adManager,"ad-started",function(){zx(c)||X(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){zx(c)&&X(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Ax(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Ax(c)});this.setValue(this.video.currentTime);this.update();yx(this);this.ad&&X(this.container,!1)}u(wx,ux);q=wx.prototype;
972
- q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);ux.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.ue(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.S(.125))};q.onChangeEnd=function(){this.h.za();this.controls.ue(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
973
- q.update=function(){var a=this.m.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.La(),g=f.end-f.start;this.setRange(f.start,f.end);zx(this)?(X(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
958
+ u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},dx=r(Object.keys(cx)),ex=dx.next();!ex.done;ex=
959
+ dx.next()){var fx=ex.value;cx[fx.toLowerCase()]=cx[fx]};function V(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new qf;this.localization=this.controls.Ba;this.player=this.controls.ac();this.video=this.controls.Bb();this.adManager=this.player.$c();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
960
+ V.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};N("shaka.ui.Element",V);V.prototype.release=V.prototype.release;function gx(a){return hx(a,"shaka-back-to-overflow-button")}function hx(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function ix(a){a&&(a=hx(a,"shaka-chosen-item"))&&a.parentElement.focus()}function jx(){var a=S("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function X(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
961
+ function kx(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60),e=Math.floor(a%60);10>e&&(e="0"+e);e=d+":"+e;b&&(10>d&&(e="0"+e),e=c+":"+e);return e};function lx(a,b){V.call(this,a,b);var c=this;this.i=S("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=S("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Q(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=kx(e-d,!1)+" / "+kx(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
962
+ ""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.za();c.g.ha(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.za(),this.g.ha(.5))}u(lx,V);lx.prototype.release=function(){this.g.stop();this.g=null;V.prototype.release.call(this)};N("shaka.ui.AdCounter",lx);function mx(a,b){V.call(this,a,b);var c=this;this.g=S("div");this.g.classList.add("shaka-ad-position");X(this.g,!1);this.parent.appendChild(this.g);this.h=S("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&nx(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&nx(c)});this.eventManager.o(this.adManager,"ad-started",function(){nx(c)});this.eventManager.o(this.adManager,
963
+ "ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&nx(this)}u(mx,V);function nx(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));X(a.g,!0)}}N("shaka.ui.AdPosition",mx);function ox(a,b){V.call(this,a,b);var c=this;this.button=Xj();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
964
+ c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?px(c.controls):qx(c.controls)});this.ad&&(this.g(),this.h())}u(ox,V);ox.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.A.paused&&!a.$;return a};ox.prototype.g=function(){};ox.prototype.h=function(){};
965
+ N("shaka.ui.PlayButton",ox);function rx(a,b){ox.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}u(rx,ox);rx.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};rx.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};N("shaka.ui.BigPlayButton",rx);function sx(a,b){V.call(this,a,b);var c=this;this.j=this.controls.i;this.h=this.controls.g;this.i=[];this.g=S("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";X(c.g,!0)}else X(c.g,
966
+ !1)});this.eventManager.o(window,"click",function(){X(c.g,!1)});tx(this)}u(sx,V);sx.prototype.release=function(){this.h=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];V.prototype.release.call(this)};function ux(a,b){vx.set(a,b)}function tx(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=vx.get(c);d?a.i.push(d.create(a.g,a.controls)):Sa("Unrecognized context menu element:",c)}}N("shaka.ui.ContextMenu",sx);
967
+ sx.registerElement=ux;var vx=new Map;function wx(a,b,c,d){V.call(this,a,b);var e=this;this.container=S("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ia(c));this.g=!1;this.bar=document.createElement("input");this.l=new Q(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ia(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
968
+ this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Nb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Nb()&&(e.g=!0,xx(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(xx(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,xx(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
969
+ "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}u(wx,V);q=wx.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);V.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.S(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
970
+ q.setValue=function(a){this.g||(this.bar.value=a)};function xx(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect(),e=parseFloat(a.bar.min),f=parseFloat(a.bar.max);c=e+(f-e)/d.width*(c.clientX-d.left);c<e?c=e:c>f&&(c=f);a.bar.value=c}N("shaka.ui.RangeElement",wx);wx.prototype.setValue=wx.prototype.setValue;wx.prototype.getValue=wx.prototype.getValue;wx.prototype.changeTo=wx.prototype.changeTo;wx.prototype.onChangeEnd=wx.prototype.onChangeEnd;wx.prototype.onChange=wx.prototype.onChange;
971
+ wx.prototype.onChangeStart=wx.prototype.onChangeStart;wx.prototype.setRange=wx.prototype.setRange;function yx(a,b){wx.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=S("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.m=this.controls.i;this.h=new Q(function(){c.video.currentTime=c.getValue()});this.A=new Q(function(){zx(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Ax(c)});this.eventManager.o(this.localization,
972
+ "locale-changed",function(){return Ax(c)});this.eventManager.o(this.adManager,"ad-started",function(){Bx(c)||X(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Bx(c)&&X(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Cx(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Cx(c)});this.setValue(this.video.currentTime);this.update();Ax(this);this.ad&&X(this.container,!1)}u(yx,wx);q=yx.prototype;
973
+ q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);wx.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.ve(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.S(.125))};q.onChangeEnd=function(){this.h.za();this.controls.ve(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
974
+ q.update=function(){var a=this.m.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.La(),g=f.end-f.start;this.setRange(f.start,f.end);Bx(this)?(X(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
974
975
  a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):X(this.container,!1)};
975
- function xx(a){if(a.i.length){for(var b=a.player.La(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
976
- 100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function Ax(a){xx(a);var b=a.player.La();b=b.end-b.start;a.player.T()&&5<b&&a.A.ha(1)}function zx(a){var b=a.player.La();b=b.end-b.start;return a.player.T()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function yx(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}N("shaka.ui.SeekBar",wx);function Bx(){}
977
- Bx.prototype.create=function(a,b){return new wx(a,b)};wx.Factory=Bx;function Y(a,b,c,d){cb.call(this);var e=this;this.W=!0;this.i=d;this.B=new An(c,a,this.i.castReceiverAppId);this.hb=!0;this.A=this.B.Bb();this.C=c;this.F=this.B.ac();this.Aa=a;this.j=b;this.Wa=this.F.$c();this.m=this.l=null;this.$=!1;this.G=[];this.wb=[];this.jb=!1;this.aa=new Q(function(){e.j.style.cursor="none";e.jb=!1;Cx(e)});this.ma=new Q(function(){e.g.removeAttribute("shown");e.I.S(2)});this.I=new Q(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.Oa=new Q(function(){e.Nb()&&
978
- Dx(e)});this.J=null;this.H=[];this.Ba=Ex();this.h=new of;this.configure(this.i);Fx(this);this.na=new Set;Gx(this);this.Oa.ha(.125);this.h.o(this.Ba,"locale-changed",function(f){e.Wa.setLocale(f.locales[0])})}u(Y,cb);q=Y.prototype;
979
- q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.C){b.D(2);break}return z(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ma&&(a.ma.stop(),a.ma=null);a.I&&(a.I.stop(),a.I=null);a.Oa&&(a.Oa.stop(),a.Oa=null);Hx(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.B){b.D(4);break}return z(b,a.B.destroy(),5);case 5:a.B=null;case 4:if(!a.Aa){b.D(6);break}return z(b,a.Aa.destroy(),7);case 7:a.Aa=
980
- null;case 6:a.F=null,a.C=null,a.A=null,a.Ba=null,a.na.clear(),cb.prototype.release.call(a),C(b)}})};function Hx(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function Ix(a,b){Jx.set(a,b)}q.Jf=function(a){this.hb=a;Gx(this)};q.Dg=function(){Cx(this)};
981
- q.configure=function(a){this.i=a;this.B.Pe(a.castReceiverAppId);this.m&&(this.m=null);this.fb&&(this.fb=null);this.Xa&&(this.Xa=null);this.g?(Wj(this.g),Hx(this)):(Kx(this),Lx(this));this.j.classList.add("shaka-video-container");this.C.classList.add("shaka-video");Mx(this);this.i.addBigPlayButton&&Nx(this);this.i.customContextMenu&&(this.Xa=new qx(this.Z,this),this.H.push(this.Xa));this.ba||Ox(this);this.ib=S("div");this.ib.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.ib);
982
- Px(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ia(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Qx(this);this.wb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Cx(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.o(b,"click",c);this.h.o(b,"dblclick",c)}};
983
- q.pe=function(a){(this.W=a)?(this.j.setAttribute("shaka-controls","true"),this.C.tabIndex=-1,this.C.controls=!1):this.j.removeAttribute("shaka-controls");Cx(this)};q.wf=function(a){this.C.controls=a;this.C.tabIndex=a?0:-1;a&&this.pe(!1)};q.getAd=function(){return this.l};q.Vf=function(){return this.B};q.hg=function(){return this.Ba};q.xg=function(){return this.j};q.Bb=function(){return this.A};q.gg=function(){return this.C};q.ac=function(){return this.F};q.fg=function(){return this.Aa};q.$f=function(){return this.g};
984
- q.pg=function(){return this.ib};q.Xf=function(){return this.R};q.Yf=function(){return this.i};q.Cg=function(){return this.$};q.ue=function(a){this.$=a};q.Ag=function(){return this.hb};q.Ze=function(){return this.m?this.m.getValue():this.A.currentTime};q.xf=function(a){this.J=a};q.Vc=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.cc=function(){this.I.za()};
985
- q.Ae=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),z(c,document.exitFullscreen(),0);E(c,4);if(!document.pictureInPictureElement){c.D(6);break}return z(c,document.exitPictureInPicture(),6);case 6:return z(c,a.j.requestFullscreen({navigationUI:"hide"}),8);case 8:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){c.D(9);break}E(c,10);return z(c,screen.orientation.lock("landscape"),12);case 12:va(c,
986
- 9,4);break;case 10:I(c,4);case 9:va(c,0);break;case 4:b=I(c),a.dispatchEvent(new O("error",(new Map).set("detail",b))),c.D(0)}})};q.zf=function(){X(this.K,!0);X(this.R,!0);this.g.setAttribute("ad-active","true")};q.cf=function(){X(this.K,!1);X(this.R,!1);this.g.removeAttribute("ad-active")};function ox(a){a.W&&a.A.duration&&(a.F.Me(),a.A.paused&&!a.$?a.A.play():a.A.pause())}function nx(a){a.l&&a.l.isPaused()?a.l.play():a.l&&a.l.pause()}
987
- function Kx(a){a.g=S("div");a.g.classList.add("shaka-controls-container");a.j.appendChild(a.g);a.j.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.A.duration&&(a.Nb()?a.J=Date.now():(Rx(a,b),b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){Sx(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&document.fullscreenEnabled&&a.Ae()})}
988
- function Nx(a){var b=S("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.fb=new px(b,a);a.H.push(a.fb)}function Mx(a){var b=S("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function Tx(a){a.K=S("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.l&&a.l.isLinear();X(a.K,b);a.N.appendChild(a.K);b=new kx(a.K,a);a.H.push(b);b=new jx(a.K,a);a.H.push(b)}
989
- function Ox(a){a.ba=S("div");a.ba.classList.add("shaka-spinner-container");a.j.appendChild(a.ba);var b=S("div");b.classList.add("shaka-spinner");a.ba.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
976
+ function zx(a){if(a.i.length){for(var b=a.player.La(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
977
+ 100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function Cx(a){zx(a);var b=a.player.La();b=b.end-b.start;a.player.T()&&5<b&&a.A.ha(1)}function Bx(a){var b=a.player.La();b=b.end-b.start;return a.player.T()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function Ax(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}N("shaka.ui.SeekBar",yx);function Dx(){}
978
+ Dx.prototype.create=function(a,b){return new yx(a,b)};yx.Factory=Dx;function Y(a,b,c,d){cb.call(this);var e=this;this.W=!0;this.i=d;this.B=new Cn(c,a,this.i.castReceiverAppId);this.hb=!0;this.A=this.B.Bb();this.C=c;this.F=this.B.ac();this.Aa=a;this.j=b;this.Wa=this.F.$c();this.m=this.l=null;this.$=!1;this.G=[];this.wb=[];this.jb=!1;this.aa=new Q(function(){e.j.style.cursor="none";e.jb=!1;Ex(e)});this.ma=new Q(function(){e.g.removeAttribute("shown");e.I.S(2)});this.I=new Q(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.Oa=new Q(function(){e.Nb()&&
979
+ Fx(e)});this.J=null;this.H=[];this.Ba=Gx();this.h=new qf;this.configure(this.i);Hx(this);this.na=new Set;Ix(this);this.Oa.ha(.125);this.h.o(this.Ba,"locale-changed",function(f){e.Wa.setLocale(f.locales[0])})}u(Y,cb);q=Y.prototype;
980
+ q.destroy=function(){var a=this;return M(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.C){b.D(2);break}return z(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ma&&(a.ma.stop(),a.ma=null);a.I&&(a.I.stop(),a.I=null);a.Oa&&(a.Oa.stop(),a.Oa=null);Jx(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.B){b.D(4);break}return z(b,a.B.destroy(),5);case 5:a.B=null;case 4:if(!a.Aa){b.D(6);break}return z(b,a.Aa.destroy(),7);case 7:a.Aa=
981
+ null;case 6:a.F=null,a.C=null,a.A=null,a.Ba=null,a.na.clear(),cb.prototype.release.call(a),C(b)}})};function Jx(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function Kx(a,b){Lx.set(a,b)}q.Kf=function(a){this.hb=a;Ix(this)};q.Eg=function(){Ex(this)};
982
+ q.configure=function(a){this.i=a;this.B.Qe(a.castReceiverAppId);this.m&&(this.m=null);this.fb&&(this.fb=null);this.Xa&&(this.Xa=null);this.g?(Yj(this.g),Jx(this)):(Mx(this),Nx(this));this.j.classList.add("shaka-video-container");this.C.classList.add("shaka-video");Ox(this);this.i.addBigPlayButton&&Px(this);this.i.customContextMenu&&(this.Xa=new sx(this.Z,this),this.H.push(this.Xa));this.ba||Qx(this);this.ib=S("div");this.ib.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.ib);
983
+ Rx(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ia(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Sx(this);this.wb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Ex(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.o(b,"click",c);this.h.o(b,"dblclick",c)}};
984
+ q.qe=function(a){(this.W=a)?(this.j.setAttribute("shaka-controls","true"),this.C.tabIndex=-1,this.C.controls=!1):this.j.removeAttribute("shaka-controls");Ex(this)};q.xf=function(a){this.C.controls=a;this.C.tabIndex=a?0:-1;a&&this.qe(!1)};q.getAd=function(){return this.l};q.Wf=function(){return this.B};q.ig=function(){return this.Ba};q.yg=function(){return this.j};q.Bb=function(){return this.A};q.hg=function(){return this.C};q.ac=function(){return this.F};q.gg=function(){return this.Aa};q.ag=function(){return this.g};
985
+ q.qg=function(){return this.ib};q.Yf=function(){return this.R};q.Zf=function(){return this.i};q.Dg=function(){return this.$};q.ve=function(a){this.$=a};q.Bg=function(){return this.hb};q.$e=function(){return this.m?this.m.getValue():this.A.currentTime};q.yf=function(a){this.J=a};q.Vc=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.cc=function(){this.I.za()};
986
+ q.Be=function(){var a=this,b;return M(function(c){switch(c.g){case 1:if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),z(c,document.exitFullscreen(),0);E(c,4);if(!document.pictureInPictureElement){c.D(6);break}return z(c,document.exitPictureInPicture(),6);case 6:return z(c,a.j.requestFullscreen({navigationUI:"hide"}),8);case 8:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){c.D(9);break}E(c,10);return z(c,screen.orientation.lock("landscape"),12);case 12:va(c,
987
+ 9,4);break;case 10:I(c,4);case 9:va(c,0);break;case 4:b=I(c),a.dispatchEvent(new O("error",(new Map).set("detail",b))),c.D(0)}})};q.Af=function(){X(this.K,!0);X(this.R,!0);this.g.setAttribute("ad-active","true")};q.df=function(){X(this.K,!1);X(this.R,!1);this.g.removeAttribute("ad-active")};function qx(a){a.W&&a.A.duration&&(a.F.Ne(),a.A.paused&&!a.$?a.A.play():a.A.pause())}function px(a){a.l&&a.l.isPaused()?a.l.play():a.l&&a.l.pause()}
988
+ function Mx(a){a.g=S("div");a.g.classList.add("shaka-controls-container");a.j.appendChild(a.g);a.j.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.A.duration&&(a.Nb()?a.J=Date.now():(Tx(a,b),b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){Ux(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&document.fullscreenEnabled&&a.Be()})}
989
+ function Px(a){var b=S("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.fb=new rx(b,a);a.H.push(a.fb)}function Ox(a){var b=S("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function Vx(a){a.K=S("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.l&&a.l.isLinear();X(a.K,b);a.N.appendChild(a.K);b=new mx(a.K,a);a.H.push(b);b=new lx(a.K,a);a.H.push(b)}
990
+ function Qx(a){a.ba=S("div");a.ba.classList.add("shaka-spinner-container");a.j.appendChild(a.ba);var b=S("div");b.classList.add("shaka-spinner");a.ba.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
990
991
  b.setAttribute("fill","none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
991
- function Px(a){a.N=S("div");a.N.classList.add("shaka-bottom-controls");a.N.classList.add("shaka-no-propagation");a.g.appendChild(a.N);a.h.o(a.N,"click",function(e){e.target.closest(".shaka-overflow-button")||a.cc()});Tx(a);a.Z=S("div");a.Z.classList.add("shaka-controls-button-panel");a.Z.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.Z.classList.add("shaka-tooltips-on");a.N.appendChild(a.Z);for(var b={},c=r(a.i.controlPanelElements),d=c.next();!d.done;b={rc:b.rc},d=c.next())d=
992
- d.value,Jx.get(d)?(d=Jx.get(d).create(a.Z,a),"function"!=typeof d.release&&(zb("shaka.extern.IUIElement","Please update UI elements to have a release() method."),b.rc=d,b.rc.release=function(e){return function(){e.rc.destroy&&e.rc.destroy()}}(b)),a.H.push(d)):Sa("Unrecognized control panel element requested:",d)}function Qx(a){if(a.i.addSeekBar)a.m=Ux.create(a.N,a),a.H.push(a.m);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}
993
- function Lx(a){a.R=S("div");a.R.classList.add("shaka-client-side-ad-container");X(a.R,!1);a.h.o(a.R,"click",function(){Sx(a)});a.j.appendChild(a.R)}
994
- function Fx(a){a.h.o(a.F,"buffering",function(){a.W&&X(a.ba,a.F.Ic())});a.W&&X(a.ba,a.F.Ic());a.h.o(window,"keydown",function(b){Vx(a,b)});a.h.o(window,"click",function(){return a.cc()});a.h.o(a,"submenuopen",function(){a.cc()});a.h.o(a.A,"play",function(){Cx(a)});a.h.o(a.A,"pause",function(){Cx(a)});a.h.o(a.j,"mousemove",function(b){Rx(a,b)});a.h.o(a.j,"touchmove",function(b){Rx(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){Rx(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.aa.za()});
995
- a.h.o(a.B,"caststatuschanged",function(){Gx(a)});a.h.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.g.contains(c)&&Rx(a,b);if(a.i.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.m&&!d&&(b.preventDefault(),Wx(a,a.m.getValue()-5));break;case "ArrowRight":a.m&&!d&&(b.preventDefault(),Wx(a,a.m.getValue()+5));break;case "Home":a.m&&Wx(a,a.F.La().start);break;
996
- case "End":a.m&&Wx(a,a.F.La().end);break;case " ":e&&Xx(a)}});a.h.o(a.j,"keyup",function(b){a.na["delete"](b.key)});a.h.o(a.Wa,"ad-started",function(b){a.l=b.ad;a.zf()});a.h.o(a.Wa,"ad-stopped",function(){a.l=null;a.cf()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return M(function(b){return z(b,Yx(a),0)})});a.h.o(document,"fullscreenchange",function(){a.l&&a.l.resize(a.C.offsetWidth,a.C.offsetHeight)})}
997
- function Yx(a){return M(function(b){return a.A&&0!=a.A.readyState&&!a.B.ra()&&a.i.enableFullscreenOnRotation?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?z(b,a.j.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?z(b,document.exitFullscreen(),0):b.D(0):b["return"]()})}
998
- function Rx(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Cx(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.jb=!0,a.I.stop(),a.Nb()||(Dx(a),Cx(a)),a.aa.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.aa.S(3))}function Zx(a){return window.matchMedia("hover: hover").matches?a.wb.some(function(b){return b.matches(":hover")}):!1}
999
- function Cx(a){var b=a.l?a.l.isPaused():!1,c=a.A.paused&&!a.$,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.l||!a.l.isLinear())&&c||a.jb||d||Zx(a)?(Dx(a),a.g.setAttribute("shown","true"),a.ma.stop()):a.ma.S(a.i.fadeDelay)}function Sx(a){a.W&&(a.Vc()?a.I.za():a.i.singleClickForPlayAndPause&&Xx(a))}function Xx(a){a.l&&a.l.isLinear()?nx(a):ox(a)}
1000
- function Gx(a){var b=a.B.ra();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Nb=function(){return this.W?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function Wx(a,b){a.m.changeTo(b);a.Nb()&&Dx(a)}
1001
- function Dx(a){if(a.m)if(a.m.setValue(a.A.currentTime),a.m.update(),a.m.isShowing())for(var b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new O("timeandseekrangeupdated"))}
1002
- function Vx(a,b){a.na.add(b.key);var c=a.Vc();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Cx(a),a.h.o(window,"mousedown",function(){a.h.nc(window,"mousedown")}));"Escape"==b.key&&a.I.za();c&&a.na.has("Tab")&&$x(a,b)}
1003
- function $x(a,b){var c=a.G.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.na.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
1004
- function Ex(){var a=new Zb("en");a.ea("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
992
+ function Rx(a){a.N=S("div");a.N.classList.add("shaka-bottom-controls");a.N.classList.add("shaka-no-propagation");a.g.appendChild(a.N);a.h.o(a.N,"click",function(e){e.target.closest(".shaka-overflow-button")||a.cc()});Vx(a);a.Z=S("div");a.Z.classList.add("shaka-controls-button-panel");a.Z.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.Z.classList.add("shaka-tooltips-on");a.N.appendChild(a.Z);for(var b={},c=r(a.i.controlPanelElements),d=c.next();!d.done;b={rc:b.rc},d=c.next())d=
993
+ d.value,Lx.get(d)?(d=Lx.get(d).create(a.Z,a),"function"!=typeof d.release&&(zb("shaka.extern.IUIElement","Please update UI elements to have a release() method."),b.rc=d,b.rc.release=function(e){return function(){e.rc.destroy&&e.rc.destroy()}}(b)),a.H.push(d)):Sa("Unrecognized control panel element requested:",d)}function Sx(a){if(a.i.addSeekBar)a.m=Wx.create(a.N,a),a.H.push(a.m);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}
994
+ function Nx(a){a.R=S("div");a.R.classList.add("shaka-client-side-ad-container");X(a.R,!1);a.h.o(a.R,"click",function(){Ux(a)});a.j.appendChild(a.R)}
995
+ function Hx(a){a.h.o(a.F,"buffering",function(){a.W&&X(a.ba,a.F.Ic())});a.W&&X(a.ba,a.F.Ic());a.h.o(window,"keydown",function(b){Xx(a,b)});a.h.o(window,"click",function(){return a.cc()});a.h.o(a,"submenuopen",function(){a.cc()});a.h.o(a.A,"play",function(){Ex(a)});a.h.o(a.A,"pause",function(){Ex(a)});a.h.o(a.j,"mousemove",function(b){Tx(a,b)});a.h.o(a.j,"touchmove",function(b){Tx(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){Tx(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.aa.za()});
996
+ a.h.o(a.B,"caststatuschanged",function(){Ix(a)});a.h.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.g.contains(c)&&Tx(a,b);if(a.i.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.m&&!d&&(b.preventDefault(),Yx(a,a.m.getValue()-5));break;case "ArrowRight":a.m&&!d&&(b.preventDefault(),Yx(a,a.m.getValue()+5));break;case "Home":a.m&&Yx(a,a.F.La().start);break;
997
+ case "End":a.m&&Yx(a,a.F.La().end);break;case " ":e&&Zx(a)}});a.h.o(a.j,"keyup",function(b){a.na["delete"](b.key)});a.h.o(a.Wa,"ad-started",function(b){a.l=b.ad;a.Af()});a.h.o(a.Wa,"ad-stopped",function(){a.l=null;a.df()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return M(function(b){return z(b,$x(a),0)})});a.h.o(document,"fullscreenchange",function(){a.l&&a.l.resize(a.C.offsetWidth,a.C.offsetHeight)})}
998
+ function $x(a){return M(function(b){return a.A&&0!=a.A.readyState&&!a.B.ra()&&a.i.enableFullscreenOnRotation?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?z(b,a.j.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?z(b,document.exitFullscreen(),0):b.D(0):b["return"]()})}
999
+ function Tx(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Ex(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.jb=!0,a.I.stop(),a.Nb()||(Fx(a),Ex(a)),a.aa.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.aa.S(3))}function ay(a){return window.matchMedia("hover: hover").matches?a.wb.some(function(b){return b.matches(":hover")}):!1}
1000
+ function Ex(a){var b=a.l?a.l.isPaused():!1,c=a.A.paused&&!a.$,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.l||!a.l.isLinear())&&c||a.jb||d||ay(a)?(Fx(a),a.g.setAttribute("shown","true"),a.ma.stop()):a.ma.S(a.i.fadeDelay)}function Ux(a){a.W&&(a.Vc()?a.I.za():a.i.singleClickForPlayAndPause&&Zx(a))}function Zx(a){a.l&&a.l.isLinear()?px(a):qx(a)}
1001
+ function Ix(a){var b=a.B.ra();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Nb=function(){return this.W?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function Yx(a,b){a.m.changeTo(b);a.Nb()&&Fx(a)}
1002
+ function Fx(a){if(a.m)if(a.m.setValue(a.A.currentTime),a.m.update(),a.m.isShowing())for(var b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new O("timeandseekrangeupdated"))}
1003
+ function Xx(a,b){a.na.add(b.key);var c=a.Vc();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Ex(a),a.h.o(window,"mousedown",function(){a.h.nc(window,"mousedown")}));"Escape"==b.key&&a.I.za();c&&a.na.has("Tab")&&by(a,b)}
1004
+ function by(a,b){var c=a.G.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.na.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
1005
+ function Gx(){var a=new Zb("en");a.ea("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
1005
1006
  ["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],
1006
1007
  ["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],
1007
1008
  ["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],
@@ -1059,75 +1060,75 @@ a.ea("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
1059
1060
  ["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\u5206\u8fa8\u7387"],["REWIND","\u5feb\u9000"],["SEEK","\u8fdb\u5ea6"],["SKIP_AD","\u8df3\u8fc7\u5e7f\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u672a\u786e\u5b9a"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],["UNRECOGNIZED_LANGUAGE","\u65e0\u6cd5\u8bc6\u522b"],["VOLUME","\u97f3\u91cf"]]));a.ea("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],
1060
1061
  ["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],
1061
1062
  ["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],
1062
- ["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Oe(navigator.languages||[]);return a}N("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.Nb;Y.prototype.hideAdUI=Y.prototype.cf;Y.prototype.showAdUI=Y.prototype.zf;
1063
- Y.prototype.toggleFullScreen=Y.prototype.Ae;Y.prototype.hideSettingsMenus=Y.prototype.cc;Y.prototype.anySettingsMenusAreOpen=Y.prototype.Vc;Y.prototype.setLastTouchEventTime=Y.prototype.xf;Y.prototype.getDisplayTime=Y.prototype.Ze;Y.prototype.isCastAllowed=Y.prototype.Ag;Y.prototype.setSeeking=Y.prototype.ue;Y.prototype.isSeeking=Y.prototype.Cg;Y.prototype.getConfig=Y.prototype.Yf;Y.prototype.getClientSideAdContainer=Y.prototype.Xf;Y.prototype.getServerSideAdContainer=Y.prototype.pg;
1064
- Y.prototype.getControlsContainer=Y.prototype.$f;Y.prototype.getLocalPlayer=Y.prototype.fg;Y.prototype.getPlayer=Y.prototype.ac;Y.prototype.getLocalVideo=Y.prototype.gg;Y.prototype.getVideo=Y.prototype.Bb;Y.prototype.getVideoContainer=Y.prototype.xg;Y.prototype.getLocalization=Y.prototype.hg;Y.prototype.getCastProxy=Y.prototype.Vf;Y.prototype.getAd=Y.prototype.getAd;Y.prototype.setEnabledNativeControls=Y.prototype.wf;Y.prototype.setEnabledShakaControls=Y.prototype.pe;Y.prototype.configure=Y.prototype.configure;
1065
- Y.prototype.loadComplete=Y.prototype.Dg;Y.prototype.allowCast=Y.prototype.Jf;Y.registerSeekBar=function(a){Ux=a};Y.registerElement=Ix;Y.prototype.destroy=Y.prototype.destroy;var Jx=new Map,Ux=new Bx;function ay(a,b){V.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=Vj();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=S("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
1066
- this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);by(this);this.eventManager.o(this.localization,"locale-updated",function(){cy(c)});this.eventManager.o(this.localization,"locale-changed",function(){cy(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&X(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){X(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){X(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.xf(Date.now());
1067
- d.stopPropagation()});this.eventManager.o(this.g,"click",function(){dy(c)});cy(this);this.ad&&this.ad.isLinear()&&X(this.g,!1)}u(ay,V);ay.prototype.release=function(){this.j=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];V.prototype.release.call(this)};function ey(a,b){fy.set(a,b)}
1068
- function by(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,fy.get(c)?(c=fy.get(c),a.i.push(c.create(a.h,a.controls))):Sa("Unrecognized overflow menu element requested:",c)}function dy(a){if(a.controls.Vc())a.controls.cc();else{X(a.h,!0);Cx(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};fb(a.h.childNodes,b)&&hb(a.h.childNodes,b)[0].focus()}}function cy(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1069
- N("shaka.ui.OverflowMenu",ay);ay.registerElement=ey;function gy(){}gy.prototype.create=function(a,b){return new ay(a,b)};Ix("overflow_menu",new gy);var fy=new Map;function hy(a,b){V.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=S("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");d.appendChild(this.j);
1070
- this.i=S("span");this.i.classList.add("shaka-current-selection-span");d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);iy(this);jy(this);this.eventManager.o(this.localization,"locale-updated",function(){iy(c)});this.eventManager.o(this.localization,"locale-changed",function(){iy(c)});this.eventManager.o(this.g,"click",function(){c.controls.Bb().webkitShowPlaybackTargetPicker()});d=this.controls.Bb();this.eventManager.o(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=
1071
- c.player.$e()==Zl;X(c.g,"available"==e.availability&&f)});this.eventManager.o(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){jy(c)})}u(hy,V);function jy(a){var b=a.controls.Bb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function iy(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}N("shaka.ui.AirPlayButton",hy);function ky(){}ky.prototype.create=function(a,b){return new hy(a,b)};ey("airplay",new ky);
1072
- Ix("airplay",new ky);function ly(a,b,c){this.i=a;this.h=my(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Sd()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.xe(b);b.ui=this;c.ui=this}q=ly.prototype;q.destroy=function(){var a=this;return M(function(b){if(1==b.g)return a.g?z(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?z(b,a.i.destroy(),4):b.D(4);a.i=null;C(b)})};q.Sd=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Hd()&&1<navigator.maxTouchPoints};
1073
- q.getConfiguration=function(){var a=my(this);Bk(a,this.h,my(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ck(a,b));Bk(this.h,a,my(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new O("uiupdated"))};q.Zf=function(){return this.g};q.bh=function(a){this.g.pe(a)};
1074
- function my(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
1075
- "picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},trackLabelFormat:ny,fadeDelay:0,
1063
+ ["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Pe(navigator.languages||[]);return a}N("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.Nb;Y.prototype.hideAdUI=Y.prototype.df;Y.prototype.showAdUI=Y.prototype.Af;
1064
+ Y.prototype.toggleFullScreen=Y.prototype.Be;Y.prototype.hideSettingsMenus=Y.prototype.cc;Y.prototype.anySettingsMenusAreOpen=Y.prototype.Vc;Y.prototype.setLastTouchEventTime=Y.prototype.yf;Y.prototype.getDisplayTime=Y.prototype.$e;Y.prototype.isCastAllowed=Y.prototype.Bg;Y.prototype.setSeeking=Y.prototype.ve;Y.prototype.isSeeking=Y.prototype.Dg;Y.prototype.getConfig=Y.prototype.Zf;Y.prototype.getClientSideAdContainer=Y.prototype.Yf;Y.prototype.getServerSideAdContainer=Y.prototype.qg;
1065
+ Y.prototype.getControlsContainer=Y.prototype.ag;Y.prototype.getLocalPlayer=Y.prototype.gg;Y.prototype.getPlayer=Y.prototype.ac;Y.prototype.getLocalVideo=Y.prototype.hg;Y.prototype.getVideo=Y.prototype.Bb;Y.prototype.getVideoContainer=Y.prototype.yg;Y.prototype.getLocalization=Y.prototype.ig;Y.prototype.getCastProxy=Y.prototype.Wf;Y.prototype.getAd=Y.prototype.getAd;Y.prototype.setEnabledNativeControls=Y.prototype.xf;Y.prototype.setEnabledShakaControls=Y.prototype.qe;Y.prototype.configure=Y.prototype.configure;
1066
+ Y.prototype.loadComplete=Y.prototype.Eg;Y.prototype.allowCast=Y.prototype.Kf;Y.registerSeekBar=function(a){Wx=a};Y.registerElement=Kx;Y.prototype.destroy=Y.prototype.destroy;var Lx=new Map,Wx=new Dx;function cy(a,b){V.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=Xj();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=S("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
1067
+ this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);dy(this);this.eventManager.o(this.localization,"locale-updated",function(){ey(c)});this.eventManager.o(this.localization,"locale-changed",function(){ey(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&X(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){X(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){X(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.yf(Date.now());
1068
+ d.stopPropagation()});this.eventManager.o(this.g,"click",function(){fy(c)});ey(this);this.ad&&this.ad.isLinear()&&X(this.g,!1)}u(cy,V);cy.prototype.release=function(){this.j=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];V.prototype.release.call(this)};function gy(a,b){hy.set(a,b)}
1069
+ function dy(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,hy.get(c)?(c=hy.get(c),a.i.push(c.create(a.h,a.controls))):Sa("Unrecognized overflow menu element requested:",c)}function fy(a){if(a.controls.Vc())a.controls.cc();else{X(a.h,!0);Ex(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};fb(a.h.childNodes,b)&&hb(a.h.childNodes,b)[0].focus()}}function ey(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1070
+ N("shaka.ui.OverflowMenu",cy);cy.registerElement=gy;function iy(){}iy.prototype.create=function(a,b){return new cy(a,b)};Kx("overflow_menu",new iy);var hy=new Map;function jy(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=S("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");d.appendChild(this.j);
1071
+ this.i=S("span");this.i.classList.add("shaka-current-selection-span");d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);ky(this);ly(this);this.eventManager.o(this.localization,"locale-updated",function(){ky(c)});this.eventManager.o(this.localization,"locale-changed",function(){ky(c)});this.eventManager.o(this.g,"click",function(){c.controls.Bb().webkitShowPlaybackTargetPicker()});d=this.controls.Bb();this.eventManager.o(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=
1072
+ c.player.bf()==am;X(c.g,"available"==e.availability&&f)});this.eventManager.o(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){ly(c)})}u(jy,V);function ly(a){var b=a.controls.Bb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function ky(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}N("shaka.ui.AirPlayButton",jy);function my(){}my.prototype.create=function(a,b){return new jy(a,b)};gy("airplay",new my);
1073
+ Kx("airplay",new my);function ny(a,b,c){this.i=a;this.h=oy(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Sd()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.ye(b);b.ui=this;c.ui=this}q=ny.prototype;q.destroy=function(){var a=this;return M(function(b){if(1==b.g)return a.g?z(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?z(b,a.i.destroy(),4):b.D(4);a.i=null;C(b)})};q.Sd=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:$c()&&1<navigator.maxTouchPoints};
1074
+ q.getConfiguration=function(){var a=oy(this);Dk(a,this.h,oy(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ek(a,b));Dk(this.h,a,oy(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new O("uiupdated"))};q.$f=function(){return this.g};q.dh=function(a){this.g.qe(a)};
1075
+ function oy(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
1076
+ "picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},trackLabelFormat:py,fadeDelay:0,
1076
1077
  doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Sd()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1077
- function oy(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return M(function(t){switch(t.g){case 1:Qt();if(!gl())return py("shaka-ui-load-failed",qy),t["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){t.D(2);break}if(b.length&&!a.length){c=r(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),ry(f,e));t.D(2);break}h=r(a);k=h.next();
1078
- case 4:if(k.done){t.D(2);break}l=k.value;if(l.ui){t.D(5);break}m=null;n=r(b);for(d=n.next();!d.done;d=n.next())if(p=d.value,p.parentElement==l){m=p;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));E(t,7);return z(t,ry(l,m),9);case 9:va(t,5);break;case 7:return I(t),py("shaka-ui-load-failed",sy),t["return"]();case 5:k=h.next();t.D(4);break;case 2:py("shaka-ui-loaded"),C(t)}})}
1079
- function py(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1080
- function ry(a,b){var c,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:c=new T(b);d=new ly(c,a,b);e="";a.dataset&&a.dataset.shakaPlayerCastReceiverId?e=a.dataset.shakaPlayerCastReceiverId:b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId);e.length&&d.configure({castReceiverAppId:e});b.controls&&d.g.wf(!0);if(f=b.getAttribute("src"))g=document.createElement("source"),g.setAttribute("src",f),b.appendChild(g),b.removeAttribute("src");h=r(b.querySelectorAll("source"));
1081
- k=h.next();case 2:if(k.done){m.D(0);break}l=k.value;E(m,5);return z(m,d.g.ac().load(l.getAttribute("src")),7);case 7:m.D(0);break;case 5:I(m);case 3:k=h.next(),m.D(2)}})}N("shaka.ui.Overlay",ly);ly.prototype.setEnabled=ly.prototype.bh;ly.prototype.getControls=ly.prototype.Zf;ly.prototype.configure=ly.prototype.configure;ly.prototype.getConfiguration=ly.prototype.getConfiguration;ly.prototype.isMobile=ly.prototype.Sd;ly.prototype.destroy=ly.prototype.destroy;var ny=0;
1082
- ly.TrackLabelFormat={LANGUAGE:ny,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var qy=0,sy=1;ly.FailReasonCode={NO_BROWSER_SUPPORT:qy,PLAYER_FAILED_TO_LOAD:sy};"complete"==document.readyState?M(function(a){if(1==a.g)return z(a,Promise.resolve(),2);oy();C(a)}):window.addEventListener("load",oy);function ty(a,b,c,d,e,f,g){function h(B,A){return B+": "+A}function k(B){return"variant"==B.type?B.audioRoles?B.audioRoles.join(", "):void 0:B.roles.join(", ")}var l=a.find(function(B){return 1==B.active}),m=ex(b);Wj(b);b.appendChild(m);m=new Map;for(var n=r(a),p=n.next();!p.done;p=n.next())p=p.value,m.has(p.language)||m.set(p.language,new Set),m.get(p.language).add(k(p));m=new Set;l=l?h(l.language,k(l)):"";n={};a=r(a);for(p=a.next();!p.done;n={Ua:n.Ua},p=a.next()){n.Ua=p.value;p=n.Ua.language;var t=
1083
- n.Ua.forced,v=f.resolve(dc.Ef),y=k(n.Ua),w=h(p,y);if(!m.has(w)){m.add(w);var x=Vj();x.addEventListener("click",function(B){return function(){c(B.Ua)}}(n));var D=S("span");x.appendChild(D);D.textContent=uy(p,f);switch(g){case ny:t&&(D.textContent+=" ("+v+")");break;case 1:y?D.textContent=y:(Sa("Track #"+n.Ua.id+" does not have a role, but the UI is configured to only show role."),D.textContent="?");t&&(D.textContent+=" ("+v+")");break;case 2:y&&(D.textContent+=": "+y);t&&(D.textContent+=" ("+v+")");
1084
- break;case 3:n.Ua.label?D.textContent=n.Ua.label:(Sa("Track #"+n.Ua.id+" does not have a label, but the UI is configured to only show labels."),D.textContent="?")}d&&w==l&&(x.appendChild(hx()),D.classList.add("shaka-chosen-item"),x.ariaSelected="true",e.textContent=D.textContent);b.appendChild(x)}}}
1085
- function uy(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Vb(a);return a in ax?ax[a].s:c in ax?ax[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function vy(a,b,c){V.call(this,a,b);var d=this;wy(this,c);xy(this);yy(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new O("submenuopen")),X(d.menu,!0),gx(d.menu)):X(d.menu,!1)})}u(vy,V);
1086
- function wy(a,b){a.button=Vj();a.button.classList.add("shaka-overflow-button");a.icon=S("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);var c=S("label");c.classList.add("shaka-overflow-button-label");c.classList.add("shaka-overflow-menu-only");a.nameSpan=S("span");c.appendChild(a.nameSpan);a.currentSelection=S("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
1087
- function xy(a){a.menu=S("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Vj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.cc()});var b=S("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1088
- S("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function yy(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){X(a.parent,!0);a.parent.childNodes[0].focus();Cx(a.controls)}))}N("shaka.ui.SettingsMenu",vy);function zy(a,b){vy.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){Ay(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ay(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Za().length;X(c.button,d);By(c)});this.eventManager.o(this.player,"variantchanged",
1089
- function(){By(c)});Ay(this);By(this)}u(zy,vy);function By(a){var b=a.player.Za();ty(b,a.menu,function(c){a.player.vd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);gx(a.menu);a.controls.dispatchEvent(new O("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
1090
- function Ay(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}N("shaka.ui.AudioLanguageSelection",zy);function Cy(){}Cy.prototype.create=function(a,b){return new zy(a,b)};ey("language",new Cy);Ix("language",new Cy);function Dy(a,b){V.call(this,a,b);var c=this;this.h=this.controls.B;this.g=Vj();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=S("span");d.appendChild(this.l);this.j=S("span");this.j.classList.add("shaka-current-selection-span");
1091
- d.appendChild(this.j);this.g.appendChild(d);this.parent.appendChild(this.g);Ey(this);Fy(this);this.eventManager.o(this.localization,"locale-updated",function(){Ey(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ey(c)});this.eventManager.o(this.g,"click",function(){Gy(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){Fy(c)})}u(Dy,V);
1092
- function Gy(a){var b;M(function(c){if(1==c.g){if(a.h.ra())return a.h.Af(),c.D(0);E(c,3);a.g.disabled=!0;return z(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=I(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));C(c)})}function Fy(a){var b=a.h.Le()&&a.controls.hb,c=a.h.ra();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Hy(a)}
1093
- function Hy(a){a.j.textContent=a.h.ra()?a.h.td():a.localization.resolve("OFF")}function Ey(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Hy(a)}N("shaka.ui.CastButton",Dy);function Iy(){}Iy.prototype.create=function(a,b){return new Dy(a,b)};ey("cast",new Iy);Ix("cast",new Iy);function Jy(a,b){V.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);Ky(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){Ky(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ky(c)});
1094
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ab())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Ce(d);c.g.setAttribute("shaka-status",d+"x")}})}u(Jy,V);function Ky(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}N("shaka.ui.FastForwardButton",Jy);function Ly(){}Ly.prototype.create=function(a,b){return new Jy(a,b)};Ix("fast_forward",new Ly);function My(a,b){V.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");document.fullscreenEnabled||this.g.classList.add("shaka-hidden");this.g.textContent="fullscreen";this.parent.appendChild(this.g);Ny(this);this.eventManager.o(this.localization,"locale-updated",function(){Ny(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ny(c)});this.eventManager.o(this.g,
1095
- "click",function(){return M(function(d){return z(d,c.controls.Ae(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Ny(c)})}u(My,V);function Ny(a){a.g.ariaLabel=a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN")}N("shaka.ui.FullscreenButton",My);function Oy(){}Oy.prototype.create=function(a,b){return new My(a,b)};Ix("fullscreen",new Oy);function Py(a,b){V.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("LOOP");d.appendChild(this.j);this.l=S("span");this.l.classList.add("shaka-current-selection-span");
1096
- d.appendChild(this.l);this.g.appendChild(d);Qy(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){Qy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Qy(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.za();c.h.ha(1)});this.m=this.video.loop;this.h=new Q(function(){c.m!=c.video.loop&&(Qy(c),c.m=c.video.loop)});this.h.ha(1)}u(Py,V);Py.prototype.release=function(){this.h.stop();this.h=null;V.prototype.release.call(this)};
1097
- function Qy(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}N("shaka.ui.LoopButton",Py);function Ry(){}Ry.prototype.create=function(a,b){return new Py(a,b)};ey("loop",new Ry);Ix("loop",new Ry);sx("loop",new Ry);function Sy(a,b){V.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);Ty(this);Uy(this);this.eventManager.o(this.localization,"locale-updated",function(){Ty(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ty(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
1098
- this.eventManager.o(this.video,"volumechange",function(){Ty(c);Uy(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){Ty(c);Uy(c)});this.eventManager.o(this.adManager,"ad-muted",function(){Ty(c);Uy(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;Ty(c);Uy(c)})}u(Sy,V);function Ty(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1099
- function Uy(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}N("shaka.ui.MuteButton",Sy);function Vy(){}Vy.prototype.create=function(a,b){return new Sy(a,b)};Ix("mute",new Vy);function Wy(a,b){V.call(this,a,b);var c=this;this.l=this.controls.C;this.g=Vj();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);
1100
- this.h=S("span");this.h.classList.add("shaka-current-selection-span");d.appendChild(this.h);this.g.appendChild(d);Xy(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){Xy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Xy(c)});this.eventManager.o(this.g,"click",function(){Yy(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent=
1078
+ function qy(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return M(function(t){switch(t.g){case 1:St();if(!il())return ry("shaka-ui-load-failed",sy),t["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){t.D(2);break}if(b.length&&!a.length){c=r(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),ty(f,e));t.D(2);break}h=r(a);k=h.next();
1079
+ case 4:if(k.done){t.D(2);break}l=k.value;if(l.ui){t.D(5);break}m=null;n=r(b);for(d=n.next();!d.done;d=n.next())if(p=d.value,p.parentElement==l){m=p;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));E(t,7);return z(t,ty(l,m),9);case 9:va(t,5);break;case 7:return I(t),ry("shaka-ui-load-failed",uy),t["return"]();case 5:k=h.next();t.D(4);break;case 2:ry("shaka-ui-loaded"),C(t)}})}
1080
+ function ry(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1081
+ function ty(a,b){var c,d,e,f,g,h,k,l;return M(function(m){switch(m.g){case 1:c=new T(b);d=new ny(c,a,b);e="";a.dataset&&a.dataset.shakaPlayerCastReceiverId?e=a.dataset.shakaPlayerCastReceiverId:b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId);e.length&&d.configure({castReceiverAppId:e});b.controls&&d.g.xf(!0);if(f=b.getAttribute("src"))g=document.createElement("source"),g.setAttribute("src",f),b.appendChild(g),b.removeAttribute("src");h=r(b.querySelectorAll("source"));
1082
+ k=h.next();case 2:if(k.done){m.D(0);break}l=k.value;E(m,5);return z(m,d.g.ac().load(l.getAttribute("src")),7);case 7:m.D(0);break;case 5:I(m);case 3:k=h.next(),m.D(2)}})}N("shaka.ui.Overlay",ny);ny.prototype.setEnabled=ny.prototype.dh;ny.prototype.getControls=ny.prototype.$f;ny.prototype.configure=ny.prototype.configure;ny.prototype.getConfiguration=ny.prototype.getConfiguration;ny.prototype.isMobile=ny.prototype.Sd;ny.prototype.destroy=ny.prototype.destroy;var py=0;
1083
+ ny.TrackLabelFormat={LANGUAGE:py,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var sy=0,uy=1;ny.FailReasonCode={NO_BROWSER_SUPPORT:sy,PLAYER_FAILED_TO_LOAD:uy};"complete"==document.readyState?M(function(a){if(1==a.g)return z(a,Promise.resolve(),2);qy();C(a)}):window.addEventListener("load",qy);function vy(a,b,c,d,e,f,g){function h(B,A){return B+": "+A}function k(B){return"variant"==B.type?B.audioRoles?B.audioRoles.join(", "):void 0:B.roles.join(", ")}var l=a.find(function(B){return 1==B.active}),m=gx(b);Yj(b);b.appendChild(m);m=new Map;for(var n=r(a),p=n.next();!p.done;p=n.next())p=p.value,m.has(p.language)||m.set(p.language,new Set),m.get(p.language).add(k(p));m=new Set;l=l?h(l.language,k(l)):"";n={};a=r(a);for(p=a.next();!p.done;n={Ua:n.Ua},p=a.next()){n.Ua=p.value;p=n.Ua.language;var t=
1084
+ n.Ua.forced,v=f.resolve(dc.Ff),y=k(n.Ua),w=h(p,y);if(!m.has(w)){m.add(w);var x=Xj();x.addEventListener("click",function(B){return function(){c(B.Ua)}}(n));var D=S("span");x.appendChild(D);D.textContent=wy(p,f);switch(g){case py:t&&(D.textContent+=" ("+v+")");break;case 1:y?D.textContent=y:(Sa("Track #"+n.Ua.id+" does not have a role, but the UI is configured to only show role."),D.textContent="?");t&&(D.textContent+=" ("+v+")");break;case 2:y&&(D.textContent+=": "+y);t&&(D.textContent+=" ("+v+")");
1085
+ break;case 3:n.Ua.label?D.textContent=n.Ua.label:(Sa("Track #"+n.Ua.id+" does not have a label, but the UI is configured to only show labels."),D.textContent="?")}d&&w==l&&(x.appendChild(jx()),D.classList.add("shaka-chosen-item"),x.ariaSelected="true",e.textContent=D.textContent);b.appendChild(x)}}}
1086
+ function wy(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Vb(a);return a in cx?cx[a].s:c in cx?cx[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function xy(a,b,c){V.call(this,a,b);var d=this;yy(this,c);zy(this);Ay(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new O("submenuopen")),X(d.menu,!0),ix(d.menu)):X(d.menu,!1)})}u(xy,V);
1087
+ function yy(a,b){a.button=Xj();a.button.classList.add("shaka-overflow-button");a.icon=S("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);var c=S("label");c.classList.add("shaka-overflow-button-label");c.classList.add("shaka-overflow-menu-only");a.nameSpan=S("span");c.appendChild(a.nameSpan);a.currentSelection=S("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
1088
+ function zy(a){a.menu=S("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Xj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.cc()});var b=S("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1089
+ S("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function Ay(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){X(a.parent,!0);a.parent.childNodes[0].focus();Ex(a.controls)}))}N("shaka.ui.SettingsMenu",xy);function By(a,b){xy.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){Cy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Cy(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Za().length;X(c.button,d);Dy(c)});this.eventManager.o(this.player,"variantchanged",
1090
+ function(){Dy(c)});Cy(this);Dy(this)}u(By,xy);function Dy(a){var b=a.player.Za();vy(b,a.menu,function(c){a.player.vd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);ix(a.menu);a.controls.dispatchEvent(new O("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
1091
+ function Cy(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}N("shaka.ui.AudioLanguageSelection",By);function Ey(){}Ey.prototype.create=function(a,b){return new By(a,b)};gy("language",new Ey);Kx("language",new Ey);function Fy(a,b){V.call(this,a,b);var c=this;this.h=this.controls.B;this.g=Xj();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=S("span");d.appendChild(this.l);this.j=S("span");this.j.classList.add("shaka-current-selection-span");
1092
+ d.appendChild(this.j);this.g.appendChild(d);this.parent.appendChild(this.g);Gy(this);Hy(this);this.eventManager.o(this.localization,"locale-updated",function(){Gy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Gy(c)});this.eventManager.o(this.g,"click",function(){Iy(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){Hy(c)})}u(Fy,V);
1093
+ function Iy(a){var b;M(function(c){if(1==c.g){if(a.h.ra())return a.h.Bf(),c.D(0);E(c,3);a.g.disabled=!0;return z(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=I(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));C(c)})}function Hy(a){var b=a.h.Me()&&a.controls.hb,c=a.h.ra();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Jy(a)}
1094
+ function Jy(a){a.j.textContent=a.h.ra()?a.h.td():a.localization.resolve("OFF")}function Gy(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Jy(a)}N("shaka.ui.CastButton",Fy);function Ky(){}Ky.prototype.create=function(a,b){return new Fy(a,b)};gy("cast",new Ky);Kx("cast",new Ky);function Ly(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);My(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){My(c)});this.eventManager.o(this.localization,"locale-changed",function(){My(c)});
1095
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ab())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.De(d);c.g.setAttribute("shaka-status",d+"x")}})}u(Ly,V);function My(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}N("shaka.ui.FastForwardButton",Ly);function Ny(){}Ny.prototype.create=function(a,b){return new Ly(a,b)};Kx("fast_forward",new Ny);function Oy(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");document.fullscreenEnabled||this.g.classList.add("shaka-hidden");this.g.textContent="fullscreen";this.parent.appendChild(this.g);Py(this);this.eventManager.o(this.localization,"locale-updated",function(){Py(c)});this.eventManager.o(this.localization,"locale-changed",function(){Py(c)});this.eventManager.o(this.g,
1096
+ "click",function(){return M(function(d){return z(d,c.controls.Be(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Py(c)})}u(Oy,V);function Py(a){a.g.ariaLabel=a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN")}N("shaka.ui.FullscreenButton",Oy);function Qy(){}Qy.prototype.create=function(a,b){return new Oy(a,b)};Kx("fullscreen",new Qy);function Ry(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("LOOP");d.appendChild(this.j);this.l=S("span");this.l.classList.add("shaka-current-selection-span");
1097
+ d.appendChild(this.l);this.g.appendChild(d);Sy(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){Sy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Sy(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.za();c.h.ha(1)});this.m=this.video.loop;this.h=new Q(function(){c.m!=c.video.loop&&(Sy(c),c.m=c.video.loop)});this.h.ha(1)}u(Ry,V);Ry.prototype.release=function(){this.h.stop();this.h=null;V.prototype.release.call(this)};
1098
+ function Sy(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}N("shaka.ui.LoopButton",Ry);function Ty(){}Ty.prototype.create=function(a,b){return new Ry(a,b)};gy("loop",new Ty);Kx("loop",new Ty);ux("loop",new Ty);function Uy(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);Vy(this);Wy(this);this.eventManager.o(this.localization,"locale-updated",function(){Vy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Vy(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
1099
+ this.eventManager.o(this.video,"volumechange",function(){Vy(c);Wy(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){Vy(c);Wy(c)});this.eventManager.o(this.adManager,"ad-muted",function(){Vy(c);Wy(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;Vy(c);Wy(c)})}u(Uy,V);function Vy(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1100
+ function Wy(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}N("shaka.ui.MuteButton",Uy);function Xy(){}Xy.prototype.create=function(a,b){return new Uy(a,b)};Kx("mute",new Xy);function Yy(a,b){V.call(this,a,b);var c=this;this.l=this.controls.C;this.g=Xj();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);
1101
+ this.h=S("span");this.h.classList.add("shaka-current-selection-span");d.appendChild(this.h);this.g.appendChild(d);Zy(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){Zy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Zy(c)});this.eventManager.o(this.g,"click",function(){$y(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent=
1101
1102
  "branding_watermark";c.g.ariaLabel=c.localization.resolve("EXIT_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("ON")});this.eventManager.o(this.l,"leavepictureinpicture",function(){c.i.textContent="picture_in_picture_alt";c.g.ariaLabel=c.localization.resolve("ENTER_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("OFF")});this.eventManager.o(this.controls,"caststatuschanged",function(e){e.newStatus?document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!1):
1102
- document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){Zy(c)})}u(Wy,V);function Yy(a){var b;M(function(c){if(1==c.g)return E(c,2),document.pictureInPictureElement?z(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),z(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return va(c,0);b=I(c);a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));C(c)})}
1103
- function Xy(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.ariaLabel=a.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
1104
- function Zy(a){M(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.D(0);if(!a.player||!a.player.gf())return X(a.g,!0),b.D(0);X(a.g,!1);return document.pictureInPictureElement?z(b,document.exitPictureInPicture(),0):b.D(0)})}N("shaka.ui.PipButton",Wy);function $y(){}$y.prototype.create=function(a,b){return new Wy(a,b)};ey("picture_in_picture",new $y);Ix("picture_in_picture",new $y);sx("picture_in_picture",new $y);function az(a,b){vy.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){bz(c)});this.eventManager.o(this.localization,"locale-changed",function(){bz(c)});this.eventManager.o(this.player,"ratechange",function(){cz(c,c.player.Ab())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
1105
- "x",d]}));bz(this);dz(this);cz(this,this.player.Ab())}u(az,vy);function bz(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
1106
- function cz(a,b){var c=fx(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(hx()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1107
- "x")}function dz(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={sc:b.sc},d=c.next()){b.sc=d.value;d=Vj();var e=S("span");e.textContent=b.sc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.sc);a.video.defaultPlaybackRate=a.g.get(f.sc)}}(b));a.menu.appendChild(d)}gx(a.menu)}N("shaka.ui.PlaybackRateSelection",az);function ez(){}ez.prototype.create=function(a,b){return new az(a,b)};ey("playback_rate",new ez);Ix("playback_rate",new ez);function fz(a,b){V.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-current-time");gz(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.T()&&(c.video.currentTime=c.player.La().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.Ze(),f=c.video.duration,g=c.player.La(),h=g.end-g.start;c.player.T()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(gz(c,"- "+ix(e,f)),c.g.disabled=
1108
- !1):(gz(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=ix(e,d),f&&(e+=" / "+ix(f,d)),gz(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.T()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}u(fz,V);function gz(a,b){b!=a.g.textContent&&(a.g.textContent=b)}N("shaka.ui.PresentationTimeTracker",fz);function hz(){}hz.prototype.create=function(a,b){return new fz(a,b)};Ix("time_and_duration",new hz);function iz(a,b){vy.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){jz(c)});this.eventManager.o(this.localization,"locale-changed",function(){jz(c)});this.eventManager.o(this.player,"variantchanged",function(){kz(c)});this.eventManager.o(this.player,"trackschanged",function(){kz(c)});this.eventManager.o(this.player,
1109
- "abrstatuschanged",function(){kz(c)});kz(this);jz(this)}u(iz,vy);
1110
- function kz(a){var b=a.player.Za();if(b.length&&!b[0].height)X(a.menu,!1),X(a.button,!1);else{X(a.button,!0);b.sort(function(k,l){return l.height-k.height});var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height})==l});var d=ex(a.menu);Wj(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e=
1111
- {vc:e.vc},g=f.next()){e.vc=g.value;g=Vj();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.vc;a.player.configure({abr:{enabled:!1}});a.player.me(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=S("span");h.textContent=e.vc.height+"p";g.appendChild(h);d||e.vc!=c||(g.ariaSelected="true",g.appendChild(hx()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Vj();e.classList.add("shaka-enable-abr-button");
1112
- a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});kz(a)});a.g=S("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(hx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);gx(a.menu);a.controls.dispatchEvent(new O("resolutionselectionupdated"))}}
1113
- function jz(a){a.button.ariaLabel=a.localization.resolve("RESOLUTION");a.backButton.ariaLabel=a.localization.resolve("RESOLUTION");a.backSpan.textContent=a.localization.resolve("RESOLUTION");a.nameSpan.textContent=a.localization.resolve("RESOLUTION");a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}N("shaka.ui.ResolutionSelection",iz);function lz(){}
1114
- lz.prototype.create=function(a,b){return new iz(a,b)};ey("quality",new lz);Ix("quality",new lz);function mz(a,b){V.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);nz(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){nz(c)});this.eventManager.o(this.localization,"locale-changed",function(){nz(c)});
1115
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ab())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Ce(d);c.g.setAttribute("shaka-status",d+"x")}})}u(mz,V);function nz(a){a.g.ariaLabel=a.localization.resolve("REWIND")}N("shaka.ui.RewindButton",mz);function oz(){}oz.prototype.create=function(a,b){return new mz(a,b)};Ix("rewind",new oz);function pz(a,b){V.call(this,a,b);var c=this;this.j=S("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=S("div");this.h.classList.add("shaka-skip-ad-counter");X(this.h,!1);this.j.appendChild(this.h);this.g=Vj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;X(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);qz(this);this.i=new Q(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1116
- d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){qz(c)});this.eventManager.o(this.localization,"locale-changed",function(){qz(c)});this.eventManager.o(this.adManager,"ad-started",function(){rz(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),X(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;X(c.g,!1);X(c.h,!1)});this.eventManager.o(this.g,
1117
- "click",function(){c.ad.skip()});this.ad&&rz(this)}u(pz,V);pz.prototype.release=function(){this.i.stop();this.i=null;V.prototype.release.call(this)};function qz(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function rz(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.za(),a.i.ha(.5))}N("shaka.ui.SkipAdButton",pz);function sz(a,b){mx.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}u(sz,mx);sz.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};sz.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
1118
- N("shaka.ui.SmallPlayButton",sz);function tz(){}tz.prototype.create=function(a,b){return new sz(a,b)};Ix("play_pause",new tz);function uz(a,b){V.call(this,a,b);var c=S("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}u(uz,V);N("shaka.ui.Spacer",uz);function vz(){}vz.prototype.create=function(a,b){return new uz(a,b)};Ix("spacer",new vz);function wz(a,b){function c(l){return ix(h.h[l],!1)+" (m)"}function d(l){return Math.round(h.h[l]/1E3)+" (kbits/s)"}function e(l){return h.h[l].toFixed(2)+" (s)"}function f(l){return h.h[l]+" (frames)"}function g(l){return h.h[l]+" (px)"}V.call(this,a,b);var h=this;this.i=Vj();this.i.classList.add("shaka-statistics-button");this.j=S("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);var k=S("label");k.classList.add("shaka-overflow-button-label");
1103
+ document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){az(c)})}u(Yy,V);function $y(a){var b;M(function(c){if(1==c.g)return E(c,2),document.pictureInPictureElement?z(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),z(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return va(c,0);b=I(c);a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));C(c)})}
1104
+ function Zy(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.ariaLabel=a.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
1105
+ function az(a){M(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.D(0);if(!a.player||!a.player.hf())return X(a.g,!0),b.D(0);X(a.g,!1);return document.pictureInPictureElement?z(b,document.exitPictureInPicture(),0):b.D(0)})}N("shaka.ui.PipButton",Yy);function bz(){}bz.prototype.create=function(a,b){return new Yy(a,b)};gy("picture_in_picture",new bz);Kx("picture_in_picture",new bz);ux("picture_in_picture",new bz);function cz(a,b){xy.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){dz(c)});this.eventManager.o(this.localization,"locale-changed",function(){dz(c)});this.eventManager.o(this.player,"ratechange",function(){ez(c,c.player.Ab())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
1106
+ "x",d]}));dz(this);fz(this);ez(this,this.player.Ab())}u(cz,xy);function dz(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
1107
+ function ez(a,b){var c=hx(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(jx()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1108
+ "x")}function fz(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={sc:b.sc},d=c.next()){b.sc=d.value;d=Xj();var e=S("span");e.textContent=b.sc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.sc);a.video.defaultPlaybackRate=a.g.get(f.sc)}}(b));a.menu.appendChild(d)}ix(a.menu)}N("shaka.ui.PlaybackRateSelection",cz);function gz(){}gz.prototype.create=function(a,b){return new cz(a,b)};gy("playback_rate",new gz);Kx("playback_rate",new gz);function hz(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-current-time");iz(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.T()&&(c.video.currentTime=c.player.La().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.$e(),f=c.video.duration,g=c.player.La(),h=g.end-g.start;c.player.T()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(iz(c,"- "+kx(e,f)),c.g.disabled=
1109
+ !1):(iz(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=kx(e,d),f&&(e+=" / "+kx(f,d)),iz(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.T()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}u(hz,V);function iz(a,b){b!=a.g.textContent&&(a.g.textContent=b)}N("shaka.ui.PresentationTimeTracker",hz);function jz(){}jz.prototype.create=function(a,b){return new hz(a,b)};Kx("time_and_duration",new jz);function kz(a,b){xy.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){lz(c)});this.eventManager.o(this.localization,"locale-changed",function(){lz(c)});this.eventManager.o(this.player,"variantchanged",function(){mz(c)});this.eventManager.o(this.player,"trackschanged",function(){mz(c)});this.eventManager.o(this.player,
1110
+ "abrstatuschanged",function(){mz(c)});mz(this);lz(this)}u(kz,xy);
1111
+ function mz(a){var b=a.player.Za();if(b.length&&!b[0].height)X(a.menu,!1),X(a.button,!1);else{X(a.button,!0);b.sort(function(k,l){return l.height-k.height});var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height})==l});var d=gx(a.menu);Yj(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e=
1112
+ {vc:e.vc},g=f.next()){e.vc=g.value;g=Xj();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.vc;a.player.configure({abr:{enabled:!1}});a.player.oe(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=S("span");h.textContent=e.vc.height+"p";g.appendChild(h);d||e.vc!=c||(g.ariaSelected="true",g.appendChild(jx()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Xj();e.classList.add("shaka-enable-abr-button");
1113
+ a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});mz(a)});a.g=S("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(jx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);ix(a.menu);a.controls.dispatchEvent(new O("resolutionselectionupdated"))}}
1114
+ function lz(a){a.button.ariaLabel=a.localization.resolve("RESOLUTION");a.backButton.ariaLabel=a.localization.resolve("RESOLUTION");a.backSpan.textContent=a.localization.resolve("RESOLUTION");a.nameSpan.textContent=a.localization.resolve("RESOLUTION");a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}N("shaka.ui.ResolutionSelection",kz);function nz(){}
1115
+ nz.prototype.create=function(a,b){return new kz(a,b)};gy("quality",new nz);Kx("quality",new nz);function oz(a,b){V.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);pz(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){pz(c)});this.eventManager.o(this.localization,"locale-changed",function(){pz(c)});
1116
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Ab())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.De(d);c.g.setAttribute("shaka-status",d+"x")}})}u(oz,V);function pz(a){a.g.ariaLabel=a.localization.resolve("REWIND")}N("shaka.ui.RewindButton",oz);function qz(){}qz.prototype.create=function(a,b){return new oz(a,b)};Kx("rewind",new qz);function rz(a,b){V.call(this,a,b);var c=this;this.j=S("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=S("div");this.h.classList.add("shaka-skip-ad-counter");X(this.h,!1);this.j.appendChild(this.h);this.g=Xj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;X(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);sz(this);this.i=new Q(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1117
+ d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){sz(c)});this.eventManager.o(this.localization,"locale-changed",function(){sz(c)});this.eventManager.o(this.adManager,"ad-started",function(){tz(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),X(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;X(c.g,!1);X(c.h,!1)});this.eventManager.o(this.g,
1118
+ "click",function(){c.ad.skip()});this.ad&&tz(this)}u(rz,V);rz.prototype.release=function(){this.i.stop();this.i=null;V.prototype.release.call(this)};function sz(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function tz(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.za(),a.i.ha(.5))}N("shaka.ui.SkipAdButton",rz);function uz(a,b){ox.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}u(uz,ox);uz.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};uz.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
1119
+ N("shaka.ui.SmallPlayButton",uz);function vz(){}vz.prototype.create=function(a,b){return new uz(a,b)};Kx("play_pause",new vz);function wz(a,b){V.call(this,a,b);var c=S("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}u(wz,V);N("shaka.ui.Spacer",wz);function xz(){}xz.prototype.create=function(a,b){return new wz(a,b)};Kx("spacer",new xz);function yz(a,b){function c(l){return kx(h.h[l],!1)+" (m)"}function d(l){return Math.round(h.h[l]/1E3)+" (kbits/s)"}function e(l){return h.h[l].toFixed(2)+" (s)"}function f(l){return h.h[l]+" (frames)"}function g(l){return h.h[l]+" (px)"}V.call(this,a,b);var h=this;this.i=Xj();this.i.classList.add("shaka-statistics-button");this.j=S("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);var k=S("label");k.classList.add("shaka-overflow-button-label");
1119
1120
  this.A=S("span");k.appendChild(this.A);this.m=S("span");this.m.classList.add("shaka-current-selection-span");k.appendChild(this.m);this.i.appendChild(k);this.parent.appendChild(this.i);this.g=S("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-statistics-container");this.g.classList.add("shaka-hidden");this.controls.g.appendChild(this.g);this.F=[];this.G=["stateHistory","switchHistory"];this.h=this.player.getStats();
1120
- this.B={};this.C={width:g,height:g,completionPercent:function(l){return h.h[l]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f};this.l=new Q(function(){h.h=h.player.getStats();for(var l=r(h.F),m=l.next();!m.done;m=l.next())m=m.value,h.B[m].textContent=h.C[m](m)});xz(this);yz(this);this.eventManager.o(this.localization,
1121
- "locale-updated",function(){xz(h)});this.eventManager.o(this.localization,"locale-changed",function(){xz(h)});this.eventManager.o(this.i,"click",function(){X(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ha(.1),X(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),X(h.g,!1));xz(h)})}u(wz,V);
1122
- function xz(a){a.A.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
1123
- function yz(a){for(var b=r(a.controls.i.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=S("div"),h=S("label");h.textContent=c+":";g.appendChild(h);h=S("span");h.textContent=f.C[c](c);g.appendChild(h);f.B[c]=h;e.call(d,g);a.F.push(c)}else Sa("Unrecognized statistic element:",c)}wz.prototype.release=function(){this.l.stop();this.l=null;V.prototype.release.call(this)};N("shaka.ui.StatisticsButton",wz);function zz(){}
1124
- zz.prototype.create=function(a,b){return new wz(a,b)};ey("statistics",new zz);sx("statistics",new zz);function Az(a,b){vy.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Ob()?this.button.ariaPressed="true":this.button.ariaPressed="false";Bz(this);this.eventManager.o(this.localization,"locale-updated",function(){Cz(c);Dz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Cz(c);Dz(c)});this.eventManager.o(this.player,
1125
- "texttrackvisibility",function(){Ez(c);Dz(c)});this.eventManager.o(this.player,"textchanged",function(){Dz(c)});this.eventManager.o(this.player,"trackschanged",function(){Fz(c)});Ez(this);Cz(this);Dz(this);Fz(this)}u(Az,vy);function Bz(a){var b=Vj();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(hx());a.g=S("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1126
- function Ez(a){a.player.Ob()?(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption",a.button.ariaPressed="false");a.controls.dispatchEvent(new O("captionselectionupdated"))}
1127
- function Dz(a){var b=a.player.pb();ty(b,a.menu,function(c){return Gz(a,c)},a.player.Ob(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=Vj();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.we(!1);Dz(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Ob()||(b.ariaSelected="true",b.appendChild(hx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
1128
- a.currentSelection.textContent);gx(a.menu);a.controls.dispatchEvent(new O("captionselectionupdated"))}function Gz(a,b){return M(function(c){a.player.le(b);return z(c,a.player.we(!0),0)})}function Cz(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}
1129
- function Fz(a){var b=0<a.player.pb().length;X(a.button,b);Dz(a)}N("shaka.ui.TextSelection",Az);function Hz(){}Hz.prototype.create=function(a,b){return new Az(a,b)};ey("captions",new Hz);Ix("captions",new Hz);function Iz(a,b){ux.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.i;this.eventManager.o(this.video,"volumechange",function(){return Jz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return Kz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return Kz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return Jz(c)});this.eventManager.o(this.localization,"locale-updated",function(){return Lz(c)});
1130
- this.eventManager.o(this.localization,"locale-changed",function(){return Lz(c)});Jz(this);Lz(this);if(this.ad)this.onChange()}u(Iz,ux);Iz.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function Jz(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);Mz(a)}function Kz(a){var b=a.ad.getVolume();a.setValue(b);Mz(a)}
1131
- function Mz(a){var b=a.h.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function Lz(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}N("shaka.ui.VolumeBar",Iz);function Nz(){}Nz.prototype.create=function(a,b){return new Iz(a,b)};Ix("volume",new Nz);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
1121
+ this.B={};this.C={width:g,height:g,completionPercent:function(l){return h.h[l]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f};this.l=new Q(function(){h.h=h.player.getStats();for(var l=r(h.F),m=l.next();!m.done;m=l.next())m=m.value,h.B[m].textContent=h.C[m](m)});zz(this);Az(this);this.eventManager.o(this.localization,
1122
+ "locale-updated",function(){zz(h)});this.eventManager.o(this.localization,"locale-changed",function(){zz(h)});this.eventManager.o(this.i,"click",function(){X(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ha(.1),X(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),X(h.g,!1));zz(h)})}u(yz,V);
1123
+ function zz(a){a.A.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
1124
+ function Az(a){for(var b=r(a.controls.i.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=S("div"),h=S("label");h.textContent=c+":";g.appendChild(h);h=S("span");h.textContent=f.C[c](c);g.appendChild(h);f.B[c]=h;e.call(d,g);a.F.push(c)}else Sa("Unrecognized statistic element:",c)}yz.prototype.release=function(){this.l.stop();this.l=null;V.prototype.release.call(this)};N("shaka.ui.StatisticsButton",yz);function Bz(){}
1125
+ Bz.prototype.create=function(a,b){return new yz(a,b)};gy("statistics",new Bz);ux("statistics",new Bz);function Cz(a,b){xy.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Ob()?this.button.ariaPressed="true":this.button.ariaPressed="false";Dz(this);this.eventManager.o(this.localization,"locale-updated",function(){Ez(c);Fz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ez(c);Fz(c)});this.eventManager.o(this.player,
1126
+ "texttrackvisibility",function(){Gz(c);Fz(c)});this.eventManager.o(this.player,"textchanged",function(){Fz(c)});this.eventManager.o(this.player,"trackschanged",function(){Hz(c)});Gz(this);Ez(this);Fz(this);Hz(this)}u(Cz,xy);function Dz(a){var b=Xj();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(jx());a.g=S("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1127
+ function Gz(a){a.player.Ob()?(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption",a.button.ariaPressed="false");a.controls.dispatchEvent(new O("captionselectionupdated"))}
1128
+ function Fz(a){var b=a.player.pb();vy(b,a.menu,function(c){return Iz(a,c)},a.player.Ob(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=Xj();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.xe(!1);Fz(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Ob()||(b.ariaSelected="true",b.appendChild(jx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
1129
+ a.currentSelection.textContent);ix(a.menu);a.controls.dispatchEvent(new O("captionselectionupdated"))}function Iz(a,b){return M(function(c){a.player.me(b);return z(c,a.player.xe(!0),0)})}function Ez(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}
1130
+ function Hz(a){var b=0<a.player.pb().length;X(a.button,b);Fz(a)}N("shaka.ui.TextSelection",Cz);function Jz(){}Jz.prototype.create=function(a,b){return new Cz(a,b)};gy("captions",new Jz);Kx("captions",new Jz);function Kz(a,b){wx.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.i;this.eventManager.o(this.video,"volumechange",function(){return Lz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return Mz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return Mz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return Lz(c)});this.eventManager.o(this.localization,"locale-updated",function(){return Nz(c)});
1131
+ this.eventManager.o(this.localization,"locale-changed",function(){return Nz(c)});Lz(this);Nz(this);if(this.ad)this.onChange()}u(Kz,wx);Kz.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function Lz(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);Oz(a)}function Mz(a){var b=a.ad.getVolume();a.setValue(b);Oz(a)}
1132
+ function Oz(a){var b=a.h.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function Nz(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}N("shaka.ui.VolumeBar",Kz);function Pz(){}Pz.prototype.create=function(a,b){return new Kz(a,b)};Kx("volume",new Pz);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
1132
1133
 
1133
1134
  //# sourceMappingURL=shaka-player.ui.map