shaka-player 4.3.7 → 4.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 (49) hide show
  1. package/.github/workflows/appspot.yaml +39 -0
  2. package/CHANGELOG.md +25 -0
  3. package/CONTRIBUTORS +1 -0
  4. package/demo/custom.js +1 -1
  5. package/dist/demo.compiled.debug.js +2 -2
  6. package/dist/demo.compiled.debug.map +2 -2
  7. package/dist/demo.compiled.js +2 -2
  8. package/dist/demo.compiled.map +2 -2
  9. package/dist/deps.js +1 -1
  10. package/dist/locales.js +31 -31
  11. package/dist/shaka-player.compiled.d.ts +22 -0
  12. package/dist/shaka-player.compiled.debug.d.ts +22 -0
  13. package/dist/shaka-player.compiled.debug.js +215 -213
  14. package/dist/shaka-player.compiled.debug.map +3 -3
  15. package/dist/shaka-player.compiled.js +789 -786
  16. package/dist/shaka-player.compiled.map +4 -4
  17. package/dist/shaka-player.ui.d.ts +22 -0
  18. package/dist/shaka-player.ui.debug.d.ts +22 -0
  19. package/dist/shaka-player.ui.debug.js +253 -252
  20. package/dist/shaka-player.ui.debug.map +3 -3
  21. package/dist/shaka-player.ui.js +823 -820
  22. package/dist/shaka-player.ui.map +4 -4
  23. package/docs/tutorials/drm-config.md +9 -6
  24. package/externs/ima.js +34 -0
  25. package/lib/abr/simple_abr_manager.js +1 -1
  26. package/lib/cea/mp4_cea_parser.js +24 -18
  27. package/lib/dash/dash_parser.js +18 -3
  28. package/lib/hls/hls_parser.js +23 -4
  29. package/lib/media/drm_engine.js +14 -8
  30. package/lib/media/gap_jumping_controller.js +24 -2
  31. package/lib/media/media_source_engine.js +5 -3
  32. package/lib/media/playhead.js +11 -0
  33. package/lib/media/region_observer.js +19 -1
  34. package/lib/media/streaming_engine.js +39 -19
  35. package/lib/media/video_wrapper.js +6 -1
  36. package/lib/player.js +12 -5
  37. package/lib/polyfill/abort_controller.js +7 -0
  38. package/lib/text/vtt_text_parser.js +2 -1
  39. package/lib/util/manifest_parser_utils.js +1 -1
  40. package/lib/util/stream_utils.js +1 -0
  41. package/package.json +2 -2
  42. package/test/cea/mp4_cea_parser_unit.js +28 -5
  43. package/test/dash/dash_parser_manifest_unit.js +120 -0
  44. package/test/hls/hls_parser_unit.js +144 -0
  45. package/test/media/region_observer_unit.js +2 -1
  46. package/test/media/streaming_engine_unit.js +26 -2
  47. package/test/test/assets/multiple-trun-init.mp4 +0 -0
  48. package/test/test/assets/multiple-trun-segment.mp4 +0 -0
  49. package/ui/resolution_selection.js +7 -1
@@ -21,12 +21,12 @@ ea("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
21
21
  ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(aa(this))}})}return a});function fa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
22
22
  function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ha(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
23
23
  if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ka;
24
- function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.xj=b.prototype}function ra(){this.s=!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.s)throw new TypeError("Generator is already running");a.s=!0}ra.prototype.B=function(a){this.h=a};
25
- function ta(a,b){a.i={Ff:b,Of:!0};a.g=a.m||a.j}ra.prototype.return=function(a){this.i={return:a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ra.prototype.D=function(a){this.g=a};function B(a){a.g=0}function D(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 wa(a,b){a.m=b||0;b=a.i.Ff;a.i=null;return b}function xa(a){a.C=[a.i];a.m=0;a.j=0}
24
+ function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.wj=b.prototype}function ra(){this.s=!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.s)throw new TypeError("Generator is already running");a.s=!0}ra.prototype.B=function(a){this.h=a};
25
+ function ta(a,b){a.i={Gf:b,Of:!0};a.g=a.m||a.j}ra.prototype.return=function(a){this.i={return:a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ra.prototype.D=function(a){this.g=a};function B(a){a.g=0}function D(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 wa(a,b){a.m=b||0;b=a.i.Gf;a.i=null;return b}function xa(a){a.C=[a.i];a.m=0;a.j=0}
26
26
  function ya(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.Of?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 za(a){this.g=new ra;this.h=a}function Aa(a,b){sa(a.g);var c=a.g.l;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Da(a)}
27
- function Ba(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.s=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Da(a)}a.g.l=null;d.call(a.g,f);return Da(a)}function Da(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Of)throw b.Ff;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
27
+ function Ba(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.s=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Da(a)}a.g.l=null;d.call(a.g,f);return Da(a)}function Da(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Of)throw b.Gf;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
28
28
  function Ea(a){this.next=function(b){sa(a.g);a.g.l?b=Ba(a,a.g.l.next,b,a.g.B):(a.g.B(b),b=Da(a));return b};this.throw=function(b){sa(a.g);a.g.l?b=Ba(a,a.g.l["throw"],b,a.g.B):(ta(a.g,b),b=Da(a));return b};this.return=function(b){return Aa(a,b)};this[Symbol.iterator]=function(){return this}}function Fa(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
29
- function G(a){return Fa(new Ea(new za(a)))}function Ga(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
29
+ function F(a){return Fa(new Ea(new za(a)))}function Ga(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
30
30
  ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.s=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
31
31
  g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.H),reject:g(this.l)}};b.prototype.H=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.J(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.G(g):this.m(g)}};
32
32
  b.prototype.G=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.B(2,g)};b.prototype.m=function(g){this.B(1,g)};b.prototype.B=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.I();this.C()};b.prototype.I=function(){var g=this;e(function(){if(g.F()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
@@ -54,8 +54,8 @@ ea("String.prototype.repeat",function(a){return a?a:function(b){var c=La(this,nu
54
54
  ea("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push([d,b[d]]);return c}});var Na=this||self;
55
55
  function I(a,b){a=a.split(".");var c=Na;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};function L(a,b){if(b)if(b instanceof Map)for(var c=r(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
56
56
  function Pa(a){var b=new L(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}L.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};L.prototype.stopImmediatePropagation=function(){this.g=!0};L.prototype.stopPropagation=function(){};I("shaka.util.FakeEvent",L);
57
- var Qa={Yh:"abrstatuschanged",Zh:"adaptation",$h:"buffering",ci:"downloadfailed",di:"downloadheadersreceived",ei:"drmsessionupdate",ni:"emsg",Qi:"prft",Error:"error",oi:"expirationupdated",si:"gapjumped",xi:"loaded",zi:"loading",Ei:"manifestparsed",Fi:"mediaqualitychanged",Metadata:"metadata",Ki:"onstatechange",Li:"onstateidle",Vi:"ratechange",aj:"segmentappended",bj:"sessiondata",cj:"stalldetected",dj:"streaming",ej:"textchanged",fj:"texttrackvisibility",gj:"timelineregionadded",hj:"timelineregionenter",
58
- ij:"timelineregionexit",jj:"trackschanged",oj:"unloading",qj:"variantchanged"};function Ra(){}function Ta(){}function Ua(){}function Wa(a){var b=Ga.apply(1,arguments);Xa.has(a)||(Xa.add(a),Ua.apply(Ra,ha(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Xa=new Set;window.console&&(Ua=function(){return console.warn.apply(console,ha(Ga.apply(0,arguments)))},Ta=function(){console.error.apply(console,ha(Ga.apply(0,arguments)))});function bb(){this.g={}}q=bb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function db(){this.ra=new bb;this.Id=this}db.prototype.addEventListener=function(a,b){this.ra&&this.ra.push(a,b)};db.prototype.removeEventListener=function(a,b){this.ra&&this.ra.remove(a,b)};db.prototype.dispatchEvent=function(a){if(!this.ra)return!0;var b=this.ra.get(a.type)||[],c=this.ra.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Id;a.currentTarget=this.Id;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
57
+ var Qa={Yh:"abrstatuschanged",Zh:"adaptation",$h:"buffering",ci:"downloadfailed",di:"downloadheadersreceived",ei:"drmsessionupdate",ni:"emsg",Pi:"prft",Error:"error",oi:"expirationupdated",si:"gapjumped",xi:"loaded",zi:"loading",Ei:"manifestparsed",Fi:"mediaqualitychanged",Metadata:"metadata",Ji:"onstatechange",Ki:"onstateidle",Ui:"ratechange",$i:"segmentappended",aj:"sessiondata",bj:"stalldetected",cj:"streaming",dj:"textchanged",ej:"texttrackvisibility",fj:"timelineregionadded",gj:"timelineregionenter",
58
+ hj:"timelineregionexit",ij:"trackschanged",nj:"unloading",pj:"variantchanged"};function Ra(){}function Ta(){}function Ua(){}function Wa(a){var b=Ga.apply(1,arguments);Xa.has(a)||(Xa.add(a),Ua.apply(Ra,ha(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Xa=new Set;window.console&&(Ua=function(){return console.warn.apply(console,ha(Ga.apply(0,arguments)))},Ta=function(){console.error.apply(console,ha(Ga.apply(0,arguments)))});function bb(){this.g={}}q=bb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function db(){this.ra=new bb;this.Id=this}db.prototype.addEventListener=function(a,b){this.ra&&this.ra.push(a,b)};db.prototype.removeEventListener=function(a,b){this.ra&&this.ra.remove(a,b)};db.prototype.dispatchEvent=function(a){if(!this.ra)return!0;var b=this.ra.get(a.type)||[],c=this.ra.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Id;a.currentTarget=this.Id;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
59
59
  db.prototype.release=function(){this.ra=null};function eb(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function fb(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function gb(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function hb(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/*
60
60
  @license
61
61
  Copyright 2008 The Closure Library Authors
@@ -82,7 +82,7 @@ NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILE
82
82
  LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,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,
83
83
  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,INDEXED_DB_INIT_TIMED_OUT:9017,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 xb(a,b){return a.concat(b)}function zb(){}function Ab(a){return null!=a};function Bb(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(xb,[]).map(function(d){return d.toString()})}function Cb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
84
84
  function Db(a,b){if(1==b.length)return b[0];a=Eb(a,b);if(null!=a)return a;throw new M(2,4,4025,b);}function Eb(a,b){for(var c=r(Fb[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==Gb?"":null}
85
- var Gb="text",Hb={Ma:"video",kd:"audio",ea:Gb,Bc:"image",Vh:"application"},Fb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ib(){}function Jb(a,b){a=Kb(a);b=Kb(b);return a.split("-")[0]==b.split("-")[0]}function Lb(a,b){a=Kb(a);b=Kb(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Mb(a,b){a=Kb(a);b=Kb(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function Kb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Nb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Ob(a,b){var c=Pb(a),d=Pb(b);return a!=c&&b!=d&&c==d}
85
+ var Gb="text",Hb={Ma:"video",kd:"audio",ea:Gb,Bc:"image",Vh:"application"},Fb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ib(){}function Jb(a,b){a=Kb(a);b=Kb(b);return a.split("-")[0]==b.split("-")[0]}function Lb(a,b){a=Kb(a);b=Kb(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Mb(a,b){a=Kb(a);b=Kb(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function Kb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Nb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Ob(a,b){var c=Pb(a),d=Pb(b);return a!=c&&b!=d&&c==d}
86
86
  function Qb(a,b){a=Kb(a);b=Kb(b);return b==a?4:Lb(b,a)?3:Mb(b,a)?2:Lb(a,b)?1:0}function Pb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Nb.get(a)||a}function Rb(a){return a.language?Kb(a.language):a.audio&&a.audio.language?Kb(a.audio.language):a.video&&a.video.language?Kb(a.video.language):"und"}
87
87
  function Sb(a,b){a=Kb(a);var c=new Set,d=r(b);for(b=d.next();!b.done;b=d.next())c.add(Kb(b.value));d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Lb(b,a))return b;d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Mb(b,a))return b;c=r(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Lb(a,b))return b;return null}I("shaka.util.LanguageUtils",Ib);Ib.findClosestLocale=Sb;Ib.getLocaleForVariant=Rb;
88
88
  Ib.getLocaleForText=function(a){return Kb(a.language||"und")};Ib.getBase=Pb;Ib.relatedness=Qb;Ib.areSiblings=Ob;Ib.normalize=Kb;Ib.isSiblingOf=Mb;Ib.isParentOf=Lb;Ib.areLanguageCompatible=Jb;Ib.areLocaleCompatible=function(a,b){a=Kb(a);b=Kb(b);return a==b};
@@ -92,12 +92,12 @@ var Nb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
92
92
  "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",
93
93
  "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",
94
94
  "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Tb(a){db.call(this);this.j=Kb(a);this.i=new Map;this.g=new Set;this.h=new Map}pa(Tb,db);q=Tb.prototype;q.release=function(){db.prototype.release.call(this)};
95
- q.yf=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Kb(c.value));Ub(this);a=hb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new L("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 L("locale-changed",a))};
95
+ q.zf=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Kb(c.value));Ub(this);a=hb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new L("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 L("locale-changed",a))};
96
96
  q.ha=function(a,b,c){a=Kb(a);void 0===c&&(c=Wb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Wb||d.set(f,e)});this.h.set(a,d);Ub(this);this.dispatchEvent(new L("locale-updated"));return this};q.Fh=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 L("unknown-localization",a));return""};
97
97
  function Ub(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={Yb:f.Yb},h=g.next()){f.Yb=h.value;e.add(f.Yb);e.add(Pb(f.Yb));h=hb(b.keys(),function(l){return function(m){return Ob(m,l.Yb)}}(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 Pb(m)==l.Yb}}(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);
98
98
  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,Xb(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new L("missing-localizations",d)))}function Xb(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)}I("shaka.ui.Localization",Tb);Tb.prototype.resolve=Tb.prototype.resolve;
99
- Tb.prototype.resolveDictionary=Tb.prototype.Fh;Tb.prototype.insert=Tb.prototype.ha;Tb.prototype.changeLocale=Tb.prototype.yf;Tb.prototype.release=Tb.prototype.release;var Wb=1;Tb.ConflictResolution={USE_OLD:0,USE_NEW:Wb};Tb.UNKNOWN_LOCALES="unknown-locales";Tb.UNKNOWN_LOCALIZATION="unknown-localization";Tb.MISSING_LOCALIZATIONS="missing-localizations";Tb.LOCALE_CHANGED="locale-changed";Tb.LOCALE_UPDATED="locale-updated";var Yb={Hi:"OFF",Sh:"AD_DURATION",ri:"FULL_SCREEN",Wh:"AUTO_QUALITY",AD_PROGRESS:"AD_PROGRESS",$i:"STATISTICS",Di:"MUTE",wi:"LOOP",Oi:"PLAY",Si:"REPLAY",Ri:"QUALITY",ai:"CAPTIONS",Ui:"REWIND",mj:"UNMUTE",Wi:"SEEK",bi:"CAST",Yi:"SKIP_TO_LIVE",Bi:"MORE_SETTINGS",Ni:"PICTURE_IN_PICTURE",Pi:"PLAYBACK_RATE",nj:"UNRECOGNIZED_LANGUAGE",ig:"LIVE",Th:"AD_TIME",mi:"EXIT_PICTURE_IN_PICTURE",Ti:"RESOLUTION",pj:"VOLUME",Mi:"PAUSE",jg:"SUBTITLE_FORCED",lj:"UNDETERMINED_LANGUAGE",pi:"FAST_FORWARD",ii:"ENTER_PICTURE_IN_PICTURE",
100
- gi:"ENTER_LOOP_MODE",Ii:"ON",Ci:"MULTIPLE_LANGUAGES",Uh:"AIRPLAY",Gi:"NOT_APPLICABLE",ti:"LANGUAGE",li:"EXIT_LOOP_MODE",ki:"EXIT_FULL_SCREEN",Xi:"SKIP_AD",BACK:"BACK"};function Zb(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Zb.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function $b(a){return a.h/(1-Math.pow(a.g,a.i))};function ac(){this.h=new Zb(2);this.j=new Zb(5);this.g=0;this.i=128E3;this.l=16E3}ac.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)};ac.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};ac.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min($b(this.h),$b(this.j))};function bc(a){if(cc.has(a))return cc.get(a);var b=MediaSource.isTypeSupported(a);cc.set(a,b);return b}var cc=new Map;function dc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ec(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function fc(a,b,c){c||(c=dc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Ud:d.Ud},e=a.next()){d.Ud=e.value;e=b.findIndex(function(f){return function(g){return c(f.Ud,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
99
+ Tb.prototype.resolveDictionary=Tb.prototype.Fh;Tb.prototype.insert=Tb.prototype.ha;Tb.prototype.changeLocale=Tb.prototype.zf;Tb.prototype.release=Tb.prototype.release;var Wb=1;Tb.ConflictResolution={USE_OLD:0,USE_NEW:Wb};Tb.UNKNOWN_LOCALES="unknown-locales";Tb.UNKNOWN_LOCALIZATION="unknown-localization";Tb.MISSING_LOCALIZATIONS="missing-localizations";Tb.LOCALE_CHANGED="locale-changed";Tb.LOCALE_UPDATED="locale-updated";var Yb={Wi:"SKIP_AD",Ni:"PLAY",ig:"LIVE",kj:"UNDETERMINED_LANGUAGE",oj:"VOLUME",Sh:"AD_DURATION",Di:"MUTE",Vi:"SEEK",Xi:"SKIP_TO_LIVE",Oi:"PLAYBACK_RATE",Uh:"AIRPLAY",Li:"PAUSE",AD_PROGRESS:"AD_PROGRESS",Th:"AD_TIME",ai:"CAPTIONS",Ci:"MULTIPLE_LANGUAGES",pi:"FAST_FORWARD",Si:"RESOLUTION",Mi:"PICTURE_IN_PICTURE",ti:"LANGUAGE",Hi:"OFF",gi:"ENTER_LOOP_MODE",Ti:"REWIND",bi:"CAST",Wh:"AUTO_QUALITY",mj:"UNRECOGNIZED_LANGUAGE",li:"EXIT_LOOP_MODE",mi:"EXIT_PICTURE_IN_PICTURE",Ri:"REPLAY",jg:"SUBTITLE_FORCED",
100
+ Gi:"NOT_APPLICABLE",ri:"FULL_SCREEN",Ii:"ON",Qi:"QUALITY",Zi:"STATISTICS",Bi:"MORE_SETTINGS",ii:"ENTER_PICTURE_IN_PICTURE",lj:"UNMUTE",BACK:"BACK",wi:"LOOP",ki:"EXIT_FULL_SCREEN"};function Zb(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Zb.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function $b(a){return a.h/(1-Math.pow(a.g,a.i))};function ac(){this.h=new Zb(2);this.j=new Zb(5);this.g=0;this.i=128E3;this.l=16E3}ac.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)};ac.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};ac.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min($b(this.h),$b(this.j))};function bc(a){if(cc.has(a))return cc.get(a);var b=MediaSource.isTypeSupported(a);cc.set(a,b);return b}var cc=new Map;function dc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ec(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function fc(a,b,c){c||(c=dc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Vd:d.Vd},e=a.next()){d.Vd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Vd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
101
101
  function gc(a,b,c){c||(c=dc);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 hc(a,b,c){this.startTime=a;this.direction=ic;this.endTime=b;this.payload=c;this.region=new jc;this.position=null;this.positionAlign=lc;this.size=0;this.textAlign=mc;this.writingMode=nc;this.lineInterpretation=oc;this.line=null;this.lineHeight="";this.lineAlign=pc;this.displayAlign=qc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=rc;this.fontStyle=sc;this.linePadding=this.letterSpacing=
102
102
  this.fontFamily="";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}hc.prototype.clone=function(){var a=new hc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
103
103
  function tc(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(!gc(a.nestedCues,b.nestedCues,tc))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(!gc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}I("shaka.text.Cue",hc);var lc="auto";
@@ -120,31 +120,31 @@ function sd(a,b){b=b.replace(/mp2t/i,"mp4");"audio"==a&&(b=b.replace("video","au
120
120
  function yd(a){var b=zd(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";
121
121
  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 Ad(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function zd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}I("shaka.util.MimeUtils",vd);vd.getFullType=wd;
122
122
  (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Bd(a){this.i=null;this.j=a;this.C=!1;this.l=this.B=0;this.m=Infinity;this.h=this.g=null;this.F="";this.s=new Map}function Cd(a){return Dd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Bd.prototype.destroy=function(){this.j=this.i=null;this.s.clear();return Promise.resolve()};
123
- function Ed(a,b,c,d){var e,f,g,h;return G(function(k){if(1==k.g)return u(k,Promise.resolve(),2);if(!a.i||!a.j)return k.return();if(null==c||null==d)return a.i.parseInit(Fc(b)),k.return();e=a.C?c:a.B;f={periodStart:a.B,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.i.parseMedia(Fc(b),f);h=g.filter(function(l){return l.startTime>=a.l&&l.startTime<a.m});a.j.append(h);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);B(k)})}
124
- Bd.prototype.remove=function(a,b){var c=this;return G(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));B(d)})};function Fd(a,b,c){a.l=b;a.m=c}function Gd(a,b,c){a.F=b;if(b=a.s.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.j.append(e)}
123
+ function Ed(a,b,c,d){var e,f,g,h;return F(function(k){if(1==k.g)return u(k,Promise.resolve(),2);if(!a.i||!a.j)return k.return();if(null==c||null==d)return a.i.parseInit(Fc(b)),k.return();e=a.C?c:a.B;f={periodStart:a.B,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.i.parseMedia(Fc(b),f);h=g.filter(function(l){return l.startTime>=a.l&&l.startTime<a.m});a.j.append(h);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);B(k)})}
124
+ Bd.prototype.remove=function(a,b){var c=this;return F(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));B(d)})};function Fd(a,b,c){a.l=b;a.m=c}function Gd(a,b,c){a.F=b;if(b=a.s.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.j.append(e)}
125
125
  function Hd(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 hc(c.startTime,c.endTime,c.text)});return b}function Id(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Id(a,d.value,c)}
126
126
  function Jd(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,[]);Id(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.F&&a.j.append([k]))}e=r(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.s.has(f)||a.s.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.s.get(f).set(h,k);a.g=null==a.g?Math.max(c,
127
127
  a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}I("shaka.text.TextEngine",Bd);Bd.prototype.destroy=Bd.prototype.destroy;Bd.findParser=function(a){return Dd[a]};Bd.unregisterParser=function(a){delete Dd[a]};Bd.registerParser=function(a,b){Dd[a]=b};var Dd={};function Kd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Ld(f,b,c);f=Md(f,d);b=Nd(f);b=Od(b);var g=Pd(b,e);a.variants=a.variants.filter(function(h){return Qd(h)==g?!0:!1})}function Nd(a){var b=new bb;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Qd(c);b.push(d,c)}return b}
128
128
  function Od(a){var b=0,c=new Map,d=a.size();a.forEach(function(e,f){f=r(f);for(var g=f.next();!g.done;g=f.next()){g=g.value;var h=g.video;if(h&&h.width&&h.height){h=h.width*h.height*(h.frameRate||1);c.has(h)||c.set(h,new bb);var k=c.get(h);k.push(e,g);k.size()===d&&(b=Math.max(b,h))}}});return b?c.get(b):a}
129
- function Ld(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={fe:d.fe},e=b.next())if(d.fe=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.fe)}}(d)),e.length){a=e;break}d={};c=r(c);for(b=c.next();!b.done;d={Rd:d.Rd},b=c.next())if(d.Rd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Rd)}}(d)),b.length){a=b;break}return a}
129
+ function Ld(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={ge:d.ge},e=b.next())if(d.ge=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.ge)}}(d)),e.length){a=e;break}d={};c=r(c);for(b=c.next();!b.done;d={Sd:d.Sd},b=c.next())if(d.Sd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Sd)}}(d)),b.length){a=b;break}return a}
130
130
  function Pd(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c==Rd||c==Sd){if(a=Td(a,c),1==a.size())return a.keys()[0]}else if(c==Ud)break;return Vd(a)}function Td(a,b){var c=0,d=new bb;a.forEach(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}
131
131
  function Vd(a){var b="",c=Infinity;a.forEach(function(d,e){var f=0,g=0;e=r(e);for(var h=e.next();!h.done;h=e.next())f+=h.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Qd(a){var b="";a.video&&(b=yd(a.video.codecs));var c="";a.audio&&(c=yd(a.audio.codecs));return b+"-"+c}function Wd(a,b,c){a.variants=a.variants.filter(function(d){return Xd(d,b,c)})}
132
132
  function Xd(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;if(0!=a.disabledUntilTime){if(a.disabledUntilTime>Date.now()/1E3)return!1;a.disabledUntilTime=0}return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
133
- function Yd(a,b,c){var d=!1;a=r(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Xd(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Zd(a,b){return G(function(c){if(1==c.g)return u(c,$d(b,0<b.offlineSessionIds.length),2);ae(a,b);be(b);return u(c,ce(b),0)})}
134
- function $d(a,b){return G(function(c){if(1==c.g)return u(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=Db("video",g);f=ee(f);g=Db("audio",g);g=fe(g);var h=xd(e.mimeType,g,"audio");if(!bc(h))return!1;f=[f,g].join()}g=xd(e.mimeType,f,"video");if(!bc(g))return!1;e.codecs=f}if(f=d.audio){g=fe(f.codecs);h=xd(f.mimeType,g,"audio");if(!bc(h))return!1;f.codecs=g}if(Qc()&&e&&(e.width&&1920<e.width||
133
+ function Yd(a,b,c){var d=!1;a=r(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Xd(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Zd(a,b){return F(function(c){if(1==c.g)return u(c,$d(b,0<b.offlineSessionIds.length),2);ae(a,b);be(b);return u(c,ce(b),0)})}
134
+ function $d(a,b){return F(function(c){if(1==c.g)return u(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=Db("video",g);f=ee(f);g=Db("audio",g);g=fe(g);var h=xd(e.mimeType,g,"audio");if(!bc(h))return!1;f=[f,g].join()}g=xd(e.mimeType,f,"video");if(!bc(g))return!1;e.codecs=f}if(f=d.audio){g=fe(f.codecs);h=xd(f.mimeType,g,"audio");if(!bc(h))return!1;f.codecs=g}if(Qc()&&e&&(e.width&&1920<e.width||
135
135
  e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Za(ge(d)),!1;(e=d.decodingInfos.some(function(k){return k.supported}))||Za(ge(d));return e});B(c)})}
136
- function de(a,b,c){var d,e,f,g,h,k,l,m,p,n,t;return G(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 G(function(C){if(1==C.g)return D(C,2),u(C,e.decodingInfo(w),4);if(2!=C.g)return x=C.h,y.decodingInfos.push(x),va(C,0);wa(C);JSON.stringify(w);B(C)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=he(l,b,c),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,f.push(g(l,t));return u(v,Promise.all(f),
136
+ function de(a,b,c){var d,e,f,g,h,k,l,m,p,n,t;return F(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 F(function(C){if(1==C.g)return D(C,2),u(C,e.decodingInfo(w),4);if(2!=C.g)return x=C.h,y.decodingInfos.push(x),va(C,0);wa(C);JSON.stringify(w);B(C)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=he(l,b,c),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,f.push(g(l,t));return u(v,Promise.all(f),
137
137
  0)})}
138
138
  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=Db("video",g);f=ee(f);g=Db("audio",g);g=xd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=ee(f);f=xd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
139
139
  break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=fe(d.codecs),f=xd(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,[]);
140
140
  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 p=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=r(p);for(h=p.next();!h.done;h=p.next()){h=h.value;if(h.initData&&h.initData.length){for(var n=new Set,t=r(h.initData),v=t.next();!v.done;v=t.next())n.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
141
141
  (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(""!=h.audioRobustness?m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness}:m.audio||(m.audio={}));e&&(""!=h.videoRobustness?m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness}:m.video||(m.video={}))}l.keySystemConfiguration=m;a.push(l)}return a}
142
142
  function fe(a){return Sc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}function ee(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function 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})}
143
- function be(a){a.textStreams=a.textStreams.filter(function(b){return Cd(wd(b.mimeType,b.codecs))})}function ce(a){var b,c,d,e,f,g,h,k;return G(function(l){switch(l.g){case 1:b=[],c=r(a.imageStreams),d=c.next();case 2:if(d.done){l.D(4);break}e=d.value;f=e.mimeType;if(je.has(f)){l.D(5);break}g=ke.get(f);if(!g){je.set(f,!1);l.D(5);break}return u(l,le(g),7);case 7:h=l.h,je.set(f,h);case 5:(k=je.get(f))&&b.push(e);d=c.next();l.D(2);break;case 4:a.imageStreams=b,B(l)}})}
143
+ function be(a){a.textStreams=a.textStreams.filter(function(b){return Cd(wd(b.mimeType,b.codecs))})}function ce(a){var b,c,d,e,f,g,h,k;return F(function(l){switch(l.g){case 1:b=[],c=r(a.imageStreams),d=c.next();case 2:if(d.done){l.D(4);break}e=d.value;f=e.mimeType;if(je.has(f)){l.D(5);break}g=ke.get(f);if(!g){je.set(f,!1);l.D(5);break}return u(l,le(g),7);case 7:h=l.h,je.set(f,h);case 5:(k=je.get(f))&&b.push(e);d=c.next();l.D(2);break;case 4:a.imageStreams=b,B(l)}})}
144
144
  function le(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function ie(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
145
145
  function me(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var p=r(b.roles),n=p.next();!n.done;n=p.next())m.add(n.value);if(c)for(p=r(c.roles),n=p.next();!n.done;n=p.next())m.add(n.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
146
146
  kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:h.join(", "),audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,
147
- a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);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}
147
+ a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null,a.hdr=c.hdr||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles);return a}
148
148
  function ne(a){return{id:a.id,active:!1,type:Gb,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
149
149
  originalAudioId:null,originalTextId:a.originalId,originalImageId:null}}
150
150
  function oe(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],
@@ -156,7 +156,7 @@ function Md(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCoun
156
156
  function we(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=Sb(Kb(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Kb(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=xe(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(xb,[]);return a.length?
157
157
  xe(e,a[0]):e}function xe(a,b){return a.filter(function(c){return c.roles.includes(b)})}function ge(a){var b=[];a.audio&&b.push(ye(a.audio));a.video&&b.push(ye(a.video));return b.join(", ")}
158
158
  function ye(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"}
159
- var qe=0,Rd="smooth",Sd="powerEfficient",Ud="bandwidth",je=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),ke=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function ze(){var a=this;this.m=null;this.l=!1;this.i=new ac;navigator.connection&&navigator.connection.addEventListener&&(this.C=function(){if(a.g.useNetworkInformation&&a.l){a.i=new ac;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.m(b)}},navigator.connection.addEventListener("change",this.C));this.s=[];this.F=1;this.H=!1;this.C=this.h=this.j=this.g=this.B=null;this.G=new N(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();b&&a.m(b)}})}q=ze.prototype;
159
+ var qe=0,Rd="smooth",Sd="powerEfficient",Ud="bandwidth",je=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),ke=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function ze(){var a=this;this.m=null;this.l=!1;this.i=new ac;navigator.connection&&navigator.connection.addEventListener&&(this.C=function(){if(a.l&&a.g.useNetworkInformation){a.i=new ac;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.m(b)}},navigator.connection.addEventListener("change",this.C));this.s=[];this.F=1;this.H=!1;this.C=this.h=this.j=this.g=this.B=null;this.G=new N(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();b&&a.m(b)}})}q=ze.prototype;
160
160
  q.stop=function(){this.m=null;this.l=!1;this.s=[];this.F=1;this.j=this.B=null;this.h&&(this.h.disconnect(),this.h=null);this.G.stop()};q.release=function(){navigator.connection&&navigator.connection.removeEventListener&&(navigator.connection.removeEventListener("change",this.C),this.C=null);this.G=null};q.init=function(a){this.m=a};
161
161
  q.chooseVariant=function(){var a=Infinity,b=Infinity;this.g.restrictToScreenSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=window.screen.height*b,b*=window.screen.width);this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.clientWidth*b,b*=this.j.clientHeight);a=Ae(this.g.restrictions,this.s,a,b);b=this.i.getBandwidthEstimate(Be(this));this.s.length&&!a.length&&(a=Ae(null,this.s,Infinity,Infinity),a=[a[0]]);for(var c=a[0]||null,
162
162
  d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.F)?1:Math.abs(this.F),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.B=Date.now();return c};q.enable=function(){this.l=!0};q.disable=function(){this.l=!1};
@@ -168,30 +168,30 @@ function Je(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.lang
168
168
  function Ke(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return zd(d)[0]});b=b.codecs.split(",").map(function(d){return zd(d)[0]});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function Le(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Me(a){this.g=a;this.h=new Ne(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Me.prototype.create=function(a){var b=this,c=a.filter(function(d){return Je(b.g,d)});return c.length?new Ie(c[0],c):this.h.create(a)};function Ne(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
169
169
  Ne.prototype.create=function(a){var b=[];b=Oe(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Pe(b,this.j);a.length&&(b=a);this.g&&(a=Md(b,this.g),a.length&&(b=a));this.h&&(a=Qe(b,this.h),a.length&&(b=a));a=new Ie(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,Je(a.h,c)&&a.add(c);return a};function Oe(a,b){b=Kb(b);var c=Sb(b,a.map(function(d){return Rb(d)}));return c?a.filter(function(d){return c==Rb(d)}):[]}
170
170
  function Pe(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Qe(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Re(){this.g=Se;this.h=(new Map).set(Se,2).set(Te,1)}function Ue(a,b,c){a.h.set(Se,c).set(Te,b)}var Te=0,Se=1;function Ve(a,b){var c=We();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
171
- function Xe(a){var b,c;return G(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new M(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.s);return u(d,new Promise(function(e){(new N(e)).R(c/1E3)}),2)}a.h*=a.m;B(d)})}function We(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ye(a,b){this.promise=a;this.i=b;this.g=!1}function Ze(a){return new Ye(Promise.reject(a),function(){return Promise.resolve()})}function $e(){var a=Promise.reject(new M(2,7,7001));a.catch(function(){});return new Ye(a,function(){return Promise.resolve()})}function af(a){return new Ye(Promise.resolve(a),function(){return Promise.resolve()})}function bf(a){return new Ye(a,function(){return a.catch(function(){})})}Ye.prototype.abort=function(){this.g=!0;return this.i()};
171
+ function Xe(a){var b,c;return F(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new M(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.s);return u(d,new Promise(function(e){(new N(e)).R(c/1E3)}),2)}a.h*=a.m;B(d)})}function We(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ye(a,b){this.promise=a;this.i=b;this.g=!1}function Ze(a){return new Ye(Promise.reject(a),function(){return Promise.resolve()})}function $e(){var a=Promise.reject(new M(2,7,7001));a.catch(function(){});return new Ye(a,function(){return Promise.resolve()})}function af(a){return new Ye(Promise.resolve(a),function(){return Promise.resolve()})}function bf(a){return new Ye(a,function(){return a.catch(function(){})})}Ye.prototype.abort=function(){this.g=!0;return this.i()};
172
172
  function cf(a){return new Ye(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Ye.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
173
173
  Ye.prototype.ma=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=df(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Jc,g=new M(2,7,7001);this.promise.then(c(!0),c(!1));return new Ye(f,function(){return d()})};
174
- function df(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()}}}I("shaka.util.AbortableOperation",Ye);Ye.prototype.chain=Ye.prototype.ma;Ye.prototype["finally"]=Ye.prototype.finally;Ye.all=cf;Ye.prototype.abort=Ye.prototype.abort;Ye.notAbortable=bf;Ye.completed=af;Ye.aborted=$e;Ye.failed=Ze;function ef(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 ff(a){var b={},c;for(c in a)b[c]=a[c];return b};function gf(){this.g=[]}function hf(a,b){a.g.push(b.finally(function(){ec(a.g,b)}))}gf.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 jf(a,b,c){db.call(this);this.i=!1;this.m=new gf;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.s=!1}pa(jf,db);q=jf.prototype;q.Oe=function(a){this.s=a};function kf(a,b,c,d){c=c||lf;var e=mf[a];if(!e||c>=e.priority)mf[a]={priority:c,vh:b,wh:void 0===d?!1:d}}q.xh=function(a){this.g.add(a)};q.Nh=function(a){this.g.delete(a)};q.rg=function(){this.g.clear()};q.yh=function(a){this.h.add(a)};q.Oh=function(a){this.h.delete(a)};q.sg=function(){this.h.clear()};
174
+ function df(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()}}}I("shaka.util.AbortableOperation",Ye);Ye.prototype.chain=Ye.prototype.ma;Ye.prototype["finally"]=Ye.prototype.finally;Ye.all=cf;Ye.prototype.abort=Ye.prototype.abort;Ye.notAbortable=bf;Ye.completed=af;Ye.aborted=$e;Ye.failed=Ze;function ef(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 ff(a){var b={},c;for(c in a)b[c]=a[c];return b};function gf(){this.g=[]}function hf(a,b){a.g.push(b.finally(function(){ec(a.g,b)}))}gf.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 jf(a,b,c){db.call(this);this.i=!1;this.m=new gf;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.s=!1}pa(jf,db);q=jf.prototype;q.Qe=function(a){this.s=a};function kf(a,b,c,d){c=c||lf;var e=mf[a];if(!e||c>=e.priority)mf[a]={priority:c,vh:b,wh:void 0===d?!1:d}}q.xh=function(a){this.g.add(a)};q.Nh=function(a){this.g.delete(a)};q.rg=function(){this.g.clear()};q.yh=function(a){this.h.add(a)};q.Oh=function(a){this.h.delete(a)};q.sg=function(){this.h.clear()};
175
175
  function nf(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();db.prototype.release.call(this);return this.m.destroy()};
176
176
  q.request=function(a,b){var c=this,d=new of;if(this.i){var e=Promise.reject(new M(2,7,7001));e.catch(function(){});return new pf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?ef(b.retryParameters):We();b.uris=ef(b.uris);e=qf(this,a,b);var f=e.ma(function(){return rf(c,a,b,new Ve(b.retryParameters,!1),0,null,d)}),g=f.ma(function(p){return sf(c,a,p)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
177
177
  var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.ma(function(p){var n=Date.now()-l,t=p.response;t.timeMs+=k;t.timeMs+=n;p.fh||!c.l||t.fromCache||"HEAD"==b.method||a!=tf||c.l(t.timeMs,t.data.byteLength);return t},function(p){p&&(p.severity=2);throw p;});e=new pf(m.promise,function(){return m.abort()},d);hf(this.m,e);return e};
178
- function qf(a,b,c){var d=af(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={$d:e.$d},f=a.next())e.$d=f.value,d=d.ma(function(g){return function(){c.body&&(c.body=Gc(c.body));return g.$d(b,c)}}(e));return d.ma(void 0,function(g){if(g instanceof M&&7001==g.code)throw g;throw new M(2,1,1006,g);})}
179
- function rf(a,b,c,d,e,f,g){a.s&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Wa,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=mf[k])?k.vh:null;if(!m)return Ze(new M(2,1,1E3,h));var p=k.wh,n=null,t=null,v=!1,y=!1,w;return bf(Xe(d)).ma(function(){if(a.i)return $e();w=Date.now();var x=m(c.uris[e],c,b,function(A,E,F){n&&n.stop();t&&t.R(z/1E3);a.l&&b==tf&&(a.l(A,E),l=!0,g.g=F)},function(A){a.j&&a.j(A,c,b);y=!0});
178
+ function qf(a,b,c){var d=af(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={ae:e.ae},f=a.next())e.ae=f.value,d=d.ma(function(g){return function(){c.body&&(c.body=Gc(c.body));return g.ae(b,c)}}(e));return d.ma(void 0,function(g){if(g instanceof M&&7001==g.code)throw g;throw new M(2,1,1006,g);})}
179
+ function rf(a,b,c,d,e,f,g){a.s&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Wa,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=mf[k])?k.vh:null;if(!m)return Ze(new M(2,1,1E3,h));var p=k.wh,n=null,t=null,v=!1,y=!1,w;return bf(Xe(d)).ma(function(){if(a.i)return $e();w=Date.now();var x=m(c.uris[e],c,b,function(A,E,G){n&&n.stop();t&&t.R(z/1E3);a.l&&b==tf&&(a.l(A,E),l=!0,g.g=G)},function(A){a.j&&a.j(A,c,b);y=!0});
180
180
  if(!p)return x;var C=c.retryParameters.connectionTimeout;C&&(n=new N(function(){v=!0;x.abort()}),n.R(C/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new N(function(){v=!0;x.abort()}));return x}).ma(function(x){n&&n.stop();t&&t.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-w);var C={response:x,fh:l};!y&&a.j&&a.j(x.headers,c,b);return C},function(x){n&&n.stop();t&&t.stop();if(a.B){var C=null,z=0;x instanceof M&&(C=x,1001==x.code&&(z=x.data[1]));a.B(c,C,z,v)}if(a.i)return $e();v&&(x=new M(1,1,1003,
181
181
  c.uris[e],b));if(x instanceof M){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return C=(new Map).set("error",x),C=new L("retry",C),a.dispatchEvent(C),e=(e+1)%c.uris.length,rf(a,b,c,d,e,x,g)}throw x;})}
182
- function sf(a,b,c){var d=af(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={ae:e.ae},f=a.next())e.ae=f.value,d=d.ma(function(g){return function(){var h=c.response;h.data&&(h.data=Gc(h.data));return g.ae(b,h)}}(e));return d.ma(function(){return c},function(g){var h=2;if(g instanceof M){if(7001==g.code)throw g;h=g.severity}throw new M(h,1,1007,g);})}I("shaka.net.NetworkingEngine",jf);jf.prototype.request=jf.prototype.request;jf.prototype.destroy=jf.prototype.destroy;jf.makeRequest=nf;
183
- jf.defaultRetryParameters=function(){return We()};jf.prototype.clearAllResponseFilters=jf.prototype.sg;jf.prototype.unregisterResponseFilter=jf.prototype.Oh;jf.prototype.registerResponseFilter=jf.prototype.yh;jf.prototype.clearAllRequestFilters=jf.prototype.rg;jf.prototype.unregisterRequestFilter=jf.prototype.Nh;jf.prototype.registerRequestFilter=jf.prototype.xh;jf.unregisterScheme=function(a){delete mf[a]};jf.registerScheme=kf;jf.prototype.setForceHTTPS=jf.prototype.Oe;function of(){this.g=0}
182
+ function sf(a,b,c){var d=af(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={be:e.be},f=a.next())e.be=f.value,d=d.ma(function(g){return function(){var h=c.response;h.data&&(h.data=Gc(h.data));return g.be(b,h)}}(e));return d.ma(function(){return c},function(g){var h=2;if(g instanceof M){if(7001==g.code)throw g;h=g.severity}throw new M(h,1,1007,g);})}I("shaka.net.NetworkingEngine",jf);jf.prototype.request=jf.prototype.request;jf.prototype.destroy=jf.prototype.destroy;jf.makeRequest=nf;
183
+ jf.defaultRetryParameters=function(){return We()};jf.prototype.clearAllResponseFilters=jf.prototype.sg;jf.prototype.unregisterResponseFilter=jf.prototype.Oh;jf.prototype.registerResponseFilter=jf.prototype.yh;jf.prototype.clearAllRequestFilters=jf.prototype.rg;jf.prototype.unregisterRequestFilter=jf.prototype.Nh;jf.prototype.registerRequestFilter=jf.prototype.xh;jf.unregisterScheme=function(a){delete mf[a]};jf.registerScheme=kf;jf.prototype.setForceHTTPS=jf.prototype.Qe;function of(){this.g=0}
184
184
  jf.NumBytesRemainingClass=of;function pf(a,b,c){Ye.call(this,a,b);this.h=c}pa(pf,Ye);jf.PendingRequest=pf;var tf=1;jf.RequestType={MANIFEST:0,SEGMENT:tf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var lf=3;jf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:lf};var mf={};function uf(a){this.g=!1;this.h=new Jc;this.i=a}uf.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 vf(a,b){if(a.g){if(b instanceof M&&7003==b.code)throw b;throw new M(2,7,7003,b);}};function wf(){this.g=new bb}q=wf.prototype;q.release=function(){this.Sb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new xf(a,b,c,d),this.g.push(b,a))};q.ya=function(a,b,c,d){function e(g){f.rc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.rc=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.rc(),this.g.remove(b,e))}};
185
185
  q.Sb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ha(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.rc();this.g.g={}}};I("shaka.util.EventManager",wf);wf.prototype.removeAll=wf.prototype.Sb;wf.prototype.unlisten=wf.prototype.rc;wf.prototype.listenOnce=wf.prototype.ya;wf.prototype.listen=wf.prototype.o;wf.prototype.release=wf.prototype.release;function xf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=yf(a,d);this.target.addEventListener(b,c,this.g)}
186
186
  xf.prototype.rc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function yf(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 zf(a)?b:b.capture||!1}
187
- function zf(a){var b=Af;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}Af=b}return b||!1}var Af=void 0;function Bf(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 Cf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Df(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=r(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function Ef(a,b){this.W=Ic(a);this.h=b==Ff;this.g=0}q=Ef.prototype;q.xa=function(){return this.g<this.W.byteLength};q.na=function(){return this.g};q.Lg=function(){return this.W.byteLength};q.pb=function(){try{var a=this.W.getUint8(this.g);this.g+=1;return a}catch(b){throw Gf();}};q.Ee=function(){try{var a=this.W.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Gf();}};q.O=function(){try{var a=this.W.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Gf();}};
187
+ function zf(a){var b=Af;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}Af=b}return b||!1}var Af=void 0;function Bf(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 Cf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Df(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=r(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function Ef(a,b){this.W=Ic(a);this.h=b==Ff;this.g=0}q=Ef.prototype;q.xa=function(){return this.g<this.W.byteLength};q.na=function(){return this.g};q.Lg=function(){return this.W.byteLength};q.pb=function(){try{var a=this.W.getUint8(this.g);this.g+=1;return a}catch(b){throw Gf();}};q.Ge=function(){try{var a=this.W.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Gf();}};q.O=function(){try{var a=this.W.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Gf();}};
188
188
  q.Sf=function(){try{var a=this.W.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Gf();}};q.Cb=function(){try{if(this.h){var a=this.W.getUint32(this.g,!0);var b=this.W.getUint32(this.g+4,!0)}else b=this.W.getUint32(this.g,!1),a=this.W.getUint32(this.g+4,!1)}catch(c){throw Gf();}if(2097151<b)throw new M(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Bb=function(a){if(this.g+a>this.W.byteLength)throw Gf();var b=Fc(this.W,this.g,a);this.g+=a;return b};
189
189
  q.skip=function(a){if(this.g+a>this.W.byteLength)throw Gf();this.g+=a};q.Gh=function(a){if(this.g<a)throw Gf();this.g-=a};q.seek=function(a){if(0>a||a>this.W.byteLength)throw Gf();this.g=a};q.Wc=function(){for(var a=this.g;this.xa()&&0!=this.W.getUint8(this.g);)this.g+=1;a=Fc(this.W,a,this.g-a);this.g+=1;return $c(a)};function Gf(){return new M(2,3,3E3)}I("shaka.util.DataViewReader",Ef);Ef.prototype.readTerminatedString=Ef.prototype.Wc;Ef.prototype.seek=Ef.prototype.seek;Ef.prototype.rewind=Ef.prototype.Gh;
190
- Ef.prototype.skip=Ef.prototype.skip;Ef.prototype.readBytes=Ef.prototype.Bb;Ef.prototype.readUint64=Ef.prototype.Cb;Ef.prototype.readInt32=Ef.prototype.Sf;Ef.prototype.readUint32=Ef.prototype.O;Ef.prototype.readUint16=Ef.prototype.Ee;Ef.prototype.readUint8=Ef.prototype.pb;Ef.prototype.getLength=Ef.prototype.Lg;Ef.prototype.getPosition=Ef.prototype.na;Ef.prototype.hasMoreData=Ef.prototype.xa;var Ff=1;Ef.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Ff};function Hf(){this.i=[];this.h=[];this.g=!1}q=Hf.prototype;q.box=function(a,b){a=If(a);this.i[a]=Jf;this.h[a]=b;return this};q.T=function(a,b){a=If(a);this.i[a]=Kf;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Ef(a,0);for(this.g=!1;a.xa()&&!this.g;)this.Uc(0,a,b,c)};
190
+ Ef.prototype.skip=Ef.prototype.skip;Ef.prototype.readBytes=Ef.prototype.Bb;Ef.prototype.readUint64=Ef.prototype.Cb;Ef.prototype.readInt32=Ef.prototype.Sf;Ef.prototype.readUint32=Ef.prototype.O;Ef.prototype.readUint16=Ef.prototype.Ge;Ef.prototype.readUint8=Ef.prototype.pb;Ef.prototype.getLength=Ef.prototype.Lg;Ef.prototype.getPosition=Ef.prototype.na;Ef.prototype.hasMoreData=Ef.prototype.xa;var Ff=1;Ef.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Ff};function Hf(){this.i=[];this.h=[];this.g=!1}q=Hf.prototype;q.box=function(a,b){a=If(a);this.i[a]=Jf;this.h[a]=b;return this};q.U=function(a,b){a=If(a);this.i[a]=Kf;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Ef(a,0);for(this.g=!1;a.xa()&&!this.g;)this.Uc(0,a,b,c)};
191
191
  q.Uc=function(a,b,c,d){var e=b.na();if(d&&e+8>b.W.byteLength)this.g=!0;else{var f=b.O(),g=b.O(),h=Lf(g),k=!1;switch(f){case 0:f=b.W.byteLength-e;break;case 1:if(d&&b.na()+8>b.W.byteLength){this.g=!0;return}f=b.Cb();k=!0}var l=this.h[g];if(l){var m=null,p=null;if(this.i[g]==Kf){if(d&&b.na()+4>b.W.byteLength){this.g=!0;return}p=b.O();m=p>>>24;p&=16777215}g=e+f;c&&g>b.W.byteLength&&(g=b.W.byteLength);d&&g>b.W.byteLength?this.g=!0:(d=g-b.na(),b=0<d?b.Bb(d):new Uint8Array(0),b=new Ef(b,0),l({name:h,parser:this,
192
192
  partialOkay:c||!1,version:m,flags:p,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.na(),b.W.byteLength-b.na()))}};function Mf(a){for(var b=Nf(a);a.reader.xa()&&!a.parser.g;)a.parser.Uc(a.start+b,a.reader,a.partialOkay)}function Of(a){for(var b=Nf(a),c=a.reader.O(),d=0;d<c&&(a.parser.Uc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Pf(a){var b=Nf(a);for(a.reader.skip(78);a.reader.xa()&&!a.parser.g;)a.parser.Uc(a.start+b,a.reader,a.partialOkay)}
193
193
  function Qf(a){return function(b){a(b.reader.Bb(b.reader.W.byteLength-b.reader.na()))}}function If(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 Lf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Nf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}I("shaka.util.Mp4Parser",Hf);Hf.headerSize=Nf;Hf.typeToString=Lf;Hf.allData=Qf;Hf.visualSampleEntry=Pf;Hf.sampleDescription=Of;Hf.children=Mf;
194
- Hf.prototype.parseNext=Hf.prototype.Uc;Hf.prototype.parse=Hf.prototype.parse;Hf.prototype.stop=Hf.prototype.stop;Hf.prototype.fullBox=Hf.prototype.T;Hf.prototype.box=Hf.prototype.box;var Jf=0,Kf=1;function Rf(a){var b=this;this.g=[];this.h=[];this.data=[];(new Hf).box("moov",Mf).box("moof",Mf).T("pssh",function(c){if(!(1<c.version)){var d=Fc(c.reader.W,-12,c.size);b.data.push(d);b.g.push(kd(c.reader.Bb(16)));if(0<c.version){d=c.reader.O();for(var e=0;e<d;e++){var f=kd(c.reader.Bb(16));b.h.push(f)}}}}).parse(a)}
194
+ Hf.prototype.parseNext=Hf.prototype.Uc;Hf.prototype.parse=Hf.prototype.parse;Hf.prototype.stop=Hf.prototype.stop;Hf.prototype.fullBox=Hf.prototype.U;Hf.prototype.box=Hf.prototype.box;var Jf=0,Kf=1;function Rf(a){var b=this;this.g=[];this.h=[];this.data=[];(new Hf).box("moov",Mf).box("moof",Mf).U("pssh",function(c){if(!(1<c.version)){var d=Fc(c.reader.W,-12,c.size);b.data.push(d);b.g.push(kd(c.reader.Bb(16)));if(0<c.version){d=c.reader.O();for(var e=0;e<d;e++){var f=kd(c.reader.Bb(16));b.h.push(f)}}}}).parse(a)}
195
195
  function Sf(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Ic(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=r(c),c=b.next();!c.done;c=b.next())c=jd(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Tf(a,b){a=Uf(a,b);return 1!=a.length?null:a[0]}function Vf(a,b,c){a=Wf(a,b,c);return 1!=a.length?null:a[0]}function Uf(a,b){var c=[];a=r(a.childNodes);for(var d=a.next();!d.done;d=a.next())d=d.value,d instanceof Element&&d.tagName==b&&c.push(d);return c}function Xf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
196
196
  function Wf(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 Yf(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Zf(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 $f(a){return Array.from(a.childNodes).every(ag)?a.textContent.trim():null}
197
197
  function ag(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function bg(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 cg(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}
@@ -199,52 +199,52 @@ function dg(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-
199
199
  function eg(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 fg(a){a=Number(a);return 0===a%1?a:null}function gg(a){a=Number(a);return 0===a%1&&0<a?a:null}function hg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function ig(a){a=Number(a);return isNaN(a)?null:a}function jg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
200
200
  function kg(a,b){var c=new DOMParser,d=lg.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function mg(a,b){try{var c=$c(a);return kg(c,b)}catch(d){return null}}
201
201
  var lg=new Kc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function ng(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.I=new Set;this.l=this.C=null;this.aa=this.Z=!1;this.J=0;this.g=null;this.B=new wf;this.i=new Map;this.F=[];this.s=new Jc;this.h=null;this.m=function(d){c.s.reject(d);a.onError(d)};this.ba=new Map;this.$=new Map;this.V=new N(function(){return og(c)});this.N=!1;this.M=[];this.P=!1;this.ra=(new N(function(){pg(c)})).ka(b);this.s.catch(function(){});this.j=new uf(function(){return qg(c)});this.X=!1;this.K=this.H=null}q=ng.prototype;
202
- q.destroy=function(){return this.j.destroy()};function qg(a){return G(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.s.reject(),a.ra.stop(),a.ra=null,a.V.stop(),a.V=null,u(b,rg(a),2);case 2:if(!a.l){b.D(3);break}D(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:wa(b);case 5:a.l=null;case 3:a.g=null,a.I.clear(),a.C=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.X=!1,a.H=null,B(b)}})}q.configure=function(a){this.h=a};
202
+ q.destroy=function(){return this.j.destroy()};function qg(a){return F(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.s.reject(),a.ra.stop(),a.ra=null,a.V.stop(),a.V=null,u(b,rg(a),2);case 2:if(!a.l){b.D(3);break}D(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:wa(b);case 5:a.l=null;case 3:a.g=null,a.I.clear(),a.C=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.X=!1,a.H=null,B(b)}})}q.configure=function(a){this.h=a};
203
203
  function sg(a,b,c){a.aa=!0;a.F=[];a.N=c;return tg(a,b)}function ug(a,b,c){a.F=c;a.N=0<c.length;return tg(a,b)}
204
204
  function vg(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 wg(a,g,[])}
205
- function tg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y;return G(function(w){if(1==w.g){if(c=xg(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=Bf(a.h.servers),yg(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=zg(l),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,Ag(t,Bf(a.h.servers),Bf(a.h.advanced||{}),a.h.keySystemsMapping);
206
- return u(w,de(b,a.N,a.X),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.Z=!0,w.return(Promise.resolve());y=wg(a,void 0,b);return w.return(g?y:y.catch(function(){}))})}function Bg(a){var b;return G(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.H){c.D(2);break}return u(c,a.H,3);case 3:return vf(a.j),c.return();case 2:return D(c,4),a.H=a.l.setMediaKeys(a.C),u(c,a.H,6);case 6:va(c,5);break;case 4:b=wa(c),a.m(new M(2,6,6003,b.message));case 5:vf(a.j),B(c)}})}
207
- function Cg(a,b){return G(function(c){if(1==c.g)return u(c,Bg(a),2);Dg(a,b.initDataType,Fc(b.initData));B(c)})}
208
- q.Cc=function(a){var b=this;return G(function(c){if(1==c.g){if(!b.C)return b.B.ya(a,"encrypted",function(){b.m(new M(2,6,6010))}),c.return();b.l=a;b.B.ya(b.l,"play",function(){for(var d=r(b.M),e=d.next();!e.done;e=d.next())Eg(b,e.value);b.P=!0;b.M=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.B.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return rg(b)});b.K=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.K||"com.apple.fps"!==b.g.keySystem||
205
+ function tg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C;return F(function(z){if(1==z.g){if(c=xg(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(A){return A.video&&A.video.drmInfos.length||A.audio&&A.audio.drmInfos.length?!0:!1});g||(h=Bf(a.h.servers),yg(b,h));k=new Set;l=r(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,p=zg(m),n=r(p),t=n.next();!t.done;t=n.next())v=t.value,k.add(v);y=r(k);for(t=y.next();!t.done;t=
206
+ y.next())w=t.value,Ag(w,Bf(a.h.servers),Bf(a.h.advanced||{}),a.h.keySystemsMapping);return u(z,de(b,a.N,a.X),2)}x=g||Object.keys(a.h.servers).length;if(!x)return a.Z=!0,z.return(Promise.resolve());C=wg(a,void 0,b);return z.return(g?C:C.catch(function(){}))})}
207
+ function Bg(a){var b;return F(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.H){c.D(2);break}return u(c,a.H,3);case 3:return vf(a.j),c.return();case 2:return D(c,4),a.H=a.l.setMediaKeys(a.C),u(c,a.H,6);case 6:va(c,5);break;case 4:b=wa(c),a.m(new M(2,6,6003,b.message));case 5:vf(a.j),B(c)}})}function Cg(a,b){return F(function(c){if(1==c.g)return u(c,Bg(a),2);Dg(a,b.initDataType,Fc(b.initData));B(c)})}
208
+ q.Cc=function(a){var b=this;return F(function(c){if(1==c.g){if(!b.C)return b.B.ya(a,"encrypted",function(){b.m(new M(2,6,6010))}),c.return();b.l=a;b.B.ya(b.l,"play",function(){for(var d=r(b.M),e=d.next();!e.done;e=d.next())Eg(b,e.value);b.P=!0;b.M=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.B.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return rg(b)});b.K=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.K||"com.apple.fps"!==b.g.keySystem||
209
209
  b.F.length?u(c,Bg(b),2):c.D(2)}Fg(b);b.K||b.F.length||b.h.parseInbandPsshEnabled||b.B.o(b.l,"encrypted",function(d){return Cg(b,d)});B(c)})};
210
- function Gg(a){var b,c,d,e,f;return G(function(g){switch(g.g){case 1:if(!a.C||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=nf([a.g.serverCertificateUri],a.h.retryParameters);D(g,3);c=a.G.Pb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fc(d.data);va(g,4);break;case 3:throw e=wa(g),new M(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();
211
- D(g,6);return u(g,a.C.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=wa(g),new M(2,6,6004,f.message);}})}function Hg(a,b){var c,d,e;return G(function(f){if(1==f.g)return u(f,Ig(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 Jc,d.push(e.cb);d.push(c.remove());return u(f,Promise.all(d),3)}a.i.delete(c);B(f)})}
210
+ function Gg(a){var b,c,d,e,f;return F(function(g){switch(g.g){case 1:if(!a.C||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=nf([a.g.serverCertificateUri],a.h.retryParameters);D(g,3);c=a.G.Pb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fc(d.data);va(g,4);break;case 3:throw e=wa(g),new M(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();
211
+ D(g,6);return u(g,a.C.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=wa(g),new M(2,6,6004,f.message);}})}function Hg(a,b){var c,d,e;return F(function(f){if(1==f.g)return u(f,Ig(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 Jc,d.push(e.cb);d.push(c.remove());return u(f,Promise.all(d),3)}a.i.delete(c);B(f)})}
212
212
  function Fg(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Dg(a,d.initDataType,d.initData);c=r(a.F);for(d=c.next();!d.done;d=c.next())Ig(a,d.value);b.length||a.F.length||a.s.resolve();return a.s}function Dg(a,b,c){if(c.length){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Dc(c,e.value.initData)&&!Rc("Tizen 2"))return;0<a.i.size&&Jg(a)&&(a.s.resolve(),a.s=new Jc,a.s.catch(function(){}));Kg(a,b,c,a.g.sessionType)}}
213
213
  function Lg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Mg(a){a=a.i.keys();a=eb(a,function(b){return b.sessionId});return Array.from(a)}q.Hc=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.vd=function(){return Cf(this.$)};
214
- function wg(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y;return G(function(w){switch(w.g){case 1:d=new Map;if(c.length){e=Ng(a,c,d);w.D(2);break}return u(w,Og(a,b),3);case 3:e=w.h;case 2:f=e;if(!f)throw new M(2,6,6001);vf(a.j);D(w,4);a.I.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())p=m.value,a.I.add(p.contentType.toLowerCase());n=r(k);for(m=n.next();!m.done;m=n.next())t=m.value,a.I.add(t.contentType.toLowerCase());if(c.length){var x=
215
- f.keySystem;var C=d.get(f.keySystem);var z=[],A=[],E=[],F=[],H=new Set;Pg(C,z,E,A,F,H);var J=a.N?"persistent-license":"temporary";x={keySystem:x,licenseServerUri:z[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||J,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:A[0],initData:F,keyIds:H};C=r(C);for(z=C.next();!z.done;z=
216
- C.next())z=z.value,z.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(x.persistentStateRequired=z.persistentStateRequired);C=x}else C=f.keySystem,x=b.get(f.keySystem),z=[],A=[],E=[],F=[],H=new Set,Pg(x.drmInfos,z,E,A,F,H),C={keySystem:C,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==x.distinctiveIdentifier,persistentStateRequired:"required"==x.persistentState,sessionType:x.sessionTypes[0]||"temporary",audioRobustness:(x.audioCapabilities?
217
- x.audioCapabilities[0].robustness:"")||"",videoRobustness:(x.videoCapabilities?x.videoCapabilities[0].robustness:"")||"",serverCertificate:E[0],serverCertificateUri:A[0],initData:F,keyIds:H};a.g=C;if(!a.g.licenseServerUri)throw new M(2,6,6012,a.g.keySystem);return u(w,f.createMediaKeys(),6);case 6:return v=w.h,vf(a.j),a.C=v,a.Z=!0,u(w,Gg(a),7);case 7:vf(a.j);va(w,0);break;case 4:y=wa(w);vf(a.j,y);a.g=null;a.I.clear();if(y instanceof M)throw y;throw new M(2,6,6002,y.message);}})}
218
- function Ng(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(zg(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 M(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Yd:d.Yd},e=a.next())for(d.Yd=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==
219
- l.Yd}}(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}
220
- function Og(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w;return G(function(x){switch(x.g){case 1:if(1==b.size&&b.has(""))throw new M(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);D(x,6);return u(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
214
+ function wg(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y;return F(function(w){switch(w.g){case 1:d=new Map;if(c.length){e=Ng(a,c,d);w.D(2);break}return u(w,Og(a,b),3);case 3:e=w.h;case 2:f=e;if(!f)throw new M(2,6,6001);vf(a.j);D(w,4);a.I.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())p=m.value,a.I.add(p.contentType.toLowerCase());n=r(k);for(m=n.next();!m.done;m=n.next())t=m.value,a.I.add(t.contentType.toLowerCase());if(c.length){var x=
215
+ f.keySystem;var C=d.get(f.keySystem);var z=[],A=[],E=[],G=[],H=new Set;Pg(C,z,E,A,G,H);var J=a.N?"persistent-license":"temporary";x={keySystem:x,licenseServerUri:z[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||J,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:A[0],initData:G,keyIds:H};C=r(C);for(z=C.next();!z.done;z=
216
+ C.next())z=z.value,z.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(x.persistentStateRequired=z.persistentStateRequired);C=x}else C=f.keySystem,x=b.get(f.keySystem),z=[],A=[],E=[],G=[],H=new Set,Pg(x.drmInfos,z,E,A,G,H),C={keySystem:C,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==x.distinctiveIdentifier,persistentStateRequired:"required"==x.persistentState,sessionType:x.sessionTypes[0]||"temporary",audioRobustness:(x.audioCapabilities?
217
+ x.audioCapabilities[0].robustness:"")||"",videoRobustness:(x.videoCapabilities?x.videoCapabilities[0].robustness:"")||"",serverCertificate:E[0],serverCertificateUri:A[0],initData:G,keyIds:H};a.g=C;if(!a.g.licenseServerUri)throw new M(2,6,6012,a.g.keySystem);return u(w,f.createMediaKeys(),6);case 6:return v=w.h,vf(a.j),a.C=v,a.Z=!0,u(w,Gg(a),7);case 7:vf(a.j);va(w,0);break;case 4:y=wa(w);vf(a.j,y);a.g=null;a.I.clear();if(y instanceof M)throw y;throw new M(2,6,6002,y.message);}})}
218
+ function Ng(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(zg(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 M(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Zd:d.Zd},e=a.next())for(d.Zd=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==
219
+ l.Zd}}(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}
220
+ function Og(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w;return F(function(x){switch(x.g){case 1:if(1==b.size&&b.has(""))throw new M(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);D(x,6);return u(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
221
221
  x.h,x.return(c);case 6:wa(x);case 7:vf(a.j);case 3:h=g.next();x.D(2);break;case 4:m=r([!0,!1]),p=m.next();case 9:if(p.done){x.D(11);break}n=p.value;t=r(b.keys());h=t.next();case 12:if(h.done){p=m.next();x.D(9);break}v=h.value;y=b.get(v);w=y.drmInfos.some(function(C){return!!C.licenseServerUri});if(w!=n){x.D(13);break}D(x,15);return u(x,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=x.h,x.return(c);case 15:wa(x);case 16:vf(a.j);case 13:h=t.next();x.D(12);break;case 11:return x.return(c)}})}
222
222
  function xg(a){a=Bf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=f;22!=g.length&&(g=hd(jd(f),!1));f=e;22!=f.length&&(f=hd(jd(e),!1));e={kty:"oct",kid:g,k:f};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Fc(dd(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",
223
223
  videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
224
- function Ig(a,b){var c,d,e,f,g;return G(function(h){switch(h.g){case 1:try{c=a.C.createSession("persistent-license")}catch(k){return d=new M(2,6,6005,k.message),a.m(d),h.return(Promise.reject(d))}a.B.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.M.push(k):Eg(a,k)});a.B.o(c,"keystatuseschange",function(k){return Qg(a,k)});e={initData:null,initDataType:null,loaded:!1,Ce:Infinity,cb:null,type:"persistent-license"};a.i.set(c,e);D(h,2);return u(h,c.load(b),4);case 4:f=
224
+ function Ig(a,b){var c,d,e,f,g;return F(function(h){switch(h.g){case 1:try{c=a.C.createSession("persistent-license")}catch(k){return d=new M(2,6,6005,k.message),a.m(d),h.return(Promise.reject(d))}a.B.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.M.push(k):Eg(a,k)});a.B.o(c,"keystatuseschange",function(k){return Qg(a,k)});e={initData:null,initDataType:null,loaded:!1,Ee:Infinity,cb:null,type:"persistent-license"};a.i.set(c,e);D(h,2);return u(h,c.load(b),4);case 4:f=
225
225
  h.h;vf(a.j);if(!f)return a.i.delete(c),a.m(new M(2,6,6013)),h.return(Promise.resolve());e.loaded=!0;Jg(a)&&a.s.resolve();return h.return(c);case 2:g=wa(h),vf(a.j,g),a.i.delete(c),a.m(new M(2,6,6005,g.message));case 3:return h.return(Promise.resolve())}})}
226
- function Kg(a,b,c,d){try{var e=a.C.createSession(d)}catch(f){a.m(new M(2,6,6005,f.message));return}a.B.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.M.push(f):Eg(a,f)});a.B.o(e,"keystatuseschange",function(f){return Qg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Ce:Infinity,cb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof M||(b=new M(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&hd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
226
+ function Kg(a,b,c,d){try{var e=a.C.createSession(d)}catch(f){a.m(new M(2,6,6005,f.message));return}a.B.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.M.push(f):Eg(a,f)});a.B.o(e,"keystatuseschange",function(f){return Qg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Ee:Infinity,cb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof M||(b=new M(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&hd(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
227
227
  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 M(2,6,6006,f.message,f,h))}})}
228
- function Eg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y;G(function(w){switch(w.g){case 1:return c=b.target,a.h.logLicenseExchange&&hd(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=nf([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,g.drmInfo=a.g,d&&(g.initData=d.initData,g.initDataType=d.initDataType),
228
+ function Eg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y;F(function(w){switch(w.g){case 1:return c=b.target,a.h.logLicenseExchange&&hd(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=nf([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,g.drmInfo=a.g,d&&(g.initData=d.initData,g.initDataType=d.initDataType),
229
229
  Lg(a.g.keySystem)&&Rg(g),h=Date.now(),D(w,2),l=a.G.Pb.request(2,g),u(w,l.promise,4);case 4:k=w.h;va(w,3);break;case 2:return m=wa(w),p=new M(2,6,6007,m),a.m(p),d&&d.cb&&d.cb.reject(p),w.return();case 3:if(a.j.g)return w.return();a.J+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&hd(k.data);D(w,5);return u(w,c.update(k.data),7);case 7:va(w,6);break;case 5:return n=wa(w),t=new M(2,6,6008,n.message),a.m(t),d&&d.cb&&d.cb.reject(t),w.return();case 6:if(a.j.g)return w.return();v=new L("drmsessionupdate");
230
230
  a.G.onEvent(v);d&&(d.cb&&d.cb.resolve(),y=new N(function(){d.loaded=!0;Jg(a)&&a.s.resolve()}),y.R(Sg));B(w)}})}
231
231
  function Rg(a){var b=ad(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=kg(b,"PlayReadyKeyMessage");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=id(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
232
232
  function Qg(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Lg(a.g.keySystem)&&16==g.byteLength&&(Pc()||Vc())){h=Ic(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=kd(g).slice(0,32);a.ba.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.cb&&(a.i.delete(b),b.close().catch(function(){}));
233
233
  Jg(a)&&(a.s.resolve(),a.V.R(Tg))}function og(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 M(2,6,6014));a.G.Gd(Cf(c))}
234
- function Ug(){var a,b,c,d,e,f,g,h;return G(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,p,
235
- n;return G(function(t){switch(t.g){case 1:D(t,2);if("org.w3.clearkey"===l&&Wc())throw Error("Unsupported keySystem");return u(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,Rc("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),u(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:wa(t),f.set(l,null),B(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k.return(Cf(f))})}
236
- function Vg(a){var b;return G(function(c){if(1==c.g)return b=new Promise(function(d,e){(new N(e)).R(Wg)}),D(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);wa(c);B(c)})}
237
- function rg(a){var b;return G(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return G(function(g){if(1==g.g)return D(g,2),a.aa||a.F.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Vg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);wa(g);B(g)})})),0)})}
234
+ function Ug(){var a,b,c,d,e,f,g,h;return F(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,p,
235
+ n;return F(function(t){switch(t.g){case 1:D(t,2);if("org.w3.clearkey"===l&&Wc())throw Error("Unsupported keySystem");return u(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,Rc("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),u(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:wa(t),f.set(l,null),B(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k.return(Cf(f))})}
236
+ function Vg(a){var b;return F(function(c){if(1==c.g)return b=new Promise(function(d,e){(new N(e)).R(Wg)}),D(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);wa(c);B(c)})}
237
+ function rg(a){var b;return F(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return F(function(g){if(1==g.g)return D(g,2),a.aa||a.F.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Vg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);wa(g);B(g)})})),0)})}
238
238
  function Xg(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e={},f=r(b),g=f.next();!g.done;e={Ua:e.Ua},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.Ua=[];e.Ua=e.Ua.concat(d.initData||[]);e.Ua=e.Ua.concat(g.initData||[]);e.Ua=e.Ua.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.Ua.findIndex(function(m){return m.keyId===k.keyId})}}(e));f=d.keyIds&&g.keyIds?new Set([].concat(ha(d.keyIds),ha(g.keyIds))):
239
239
  d.keyIds||g.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||g.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||g.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||g.persistentStateRequired,videoRobustness:d.videoRobustness||g.videoRobustness,audioRobustness:d.audioRobustness||g.audioRobustness,serverCertificate:d.serverCertificate||g.serverCertificate,serverCertificateUri:d.serverCertificateUri||g.serverCertificateUri,
240
- initData:e.Ua,keyIds:f});break}}return c}function zg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function pg(a){a.i.forEach(function(b,c){var d=b.Ce,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.Ce=e)})}function Jg(a){a=a.i.values();return fb(a,function(b){return b.loaded})}
240
+ initData:e.Ua,keyIds:f});break}}return c}function zg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function pg(a){a.i.forEach(function(b,c){var d=b.Ee,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.Ee=e)})}function Jg(a){a=a.i.values();return fb(a,function(b){return b.loaded})}
241
241
  function yg(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=r(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
242
242
  function Pg(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Fa:g.Fa},h=a.next()){g.Fa=h.value;b.includes(g.Fa.licenseServerUri)||b.push(g.Fa.licenseServerUri);d.includes(g.Fa.serverCertificateUri)||d.push(g.Fa.serverCertificateUri);g.Fa.serverCertificate&&(c.some(function(m){return function(p){return Dc(p,m.Fa.serverCertificate)}}(g))||c.push(g.Fa.serverCertificate));if(g.Fa.initData){h={};for(var k=r(g.Fa.initData),l=k.next();!l.done;h={fd:h.fd},l=k.next())h.fd=l.value,e.some(function(m){return function(p){var n=
243
243
  m.fd;return p.keyId&&p.keyId==n.keyId?!0:p.initDataType==n.initDataType&&Dc(p.initData,n.initData)}}(h))||e.push(h.fd)}if(g.Fa.keyIds)for(h=r(g.Fa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
244
244
  function Ag(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
245
- c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var Wg=1,Sg=5,Tg=.5,Yg=new Kc(function(){return Gc(new Uint8Array([0]))});function Zg(){}function $g(a,b,c,d){var e,f,g,h;return G(function(k){if(1==k.g){if(d&&(e=ah[d.toLowerCase()]))return k.return(e);if(f=bh(a))if(g=ch[f])return k.return(g);return d?k.D(2):u(k,dh(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=ah[d]))return k.return(h);throw new M(2,4,4E3,a);})}function dh(a,b,c){var d,e,f;return G(function(g){if(1==g.g)return d=nf([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g.return(f?f.toLowerCase().split(";").shift():"")})}
246
- function bh(a){a=(new jb(a)).Ha.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}I("shaka.media.ManifestParser",Zg);Zg.unregisterParserByMime=function(a){delete ah[a]};Zg.registerParserByMime=function(a,b){ah[a]=b};Zg.registerParserByExtension=function(a,b){ch[a]=b};var ah={},ch={};function eh(a){function b(){d=!0}function c(l){f.push(l);Mf(l)}a=Fc(a);var d=!1,e,f=[],g=[];(new Hf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).T("stsd",function(l){e=l;f.push(l);Of(l)}).T("encv",b).T("enca",b).T("hev1",function(l){g.push({box:l,Qb:1701733238})}).T("hvc1",function(l){g.push({box:l,Qb:1701733238})}).T("avc1",function(l){g.push({box:l,Qb:1701733238})}).T("avc3",function(l){g.push({box:l,Qb:1701733238})}).T("ac-3",function(l){g.push({box:l,Qb:1701733217})}).T("ec-3",
247
- function(l){g.push({box:l,Qb:1701733217})}).T("mp4a",function(l){g.push({box:l,Qb:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw ab(kd(a)),new M(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=fh(a,e,k.box,f,k.Qb);return a}
245
+ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var Wg=1,Sg=5,Tg=.5,Yg=new Kc(function(){return Gc(new Uint8Array([0]))});function Zg(){}function $g(a,b,c,d){var e,f,g,h;return F(function(k){if(1==k.g){if(d&&(e=ah[d.toLowerCase()]))return k.return(e);if(f=bh(a))if(g=ch[f])return k.return(g);return d?k.D(2):u(k,dh(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=ah[d]))return k.return(h);throw new M(2,4,4E3,a);})}function dh(a,b,c){var d,e,f;return F(function(g){if(1==g.g)return d=nf([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g.return(f?f.toLowerCase().split(";").shift():"")})}
246
+ function bh(a){a=(new jb(a)).Ha.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}I("shaka.media.ManifestParser",Zg);Zg.unregisterParserByMime=function(a){delete ah[a]};Zg.registerParserByMime=function(a,b){ah[a]=b};Zg.registerParserByExtension=function(a,b){ch[a]=b};var ah={},ch={};function eh(a){function b(){d=!0}function c(l){f.push(l);Mf(l)}a=Fc(a);var d=!1,e,f=[],g=[];(new Hf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).U("stsd",function(l){e=l;f.push(l);Of(l)}).U("encv",b).U("enca",b).U("hev1",function(l){g.push({box:l,Qb:1701733238})}).U("hvc1",function(l){g.push({box:l,Qb:1701733238})}).U("avc1",function(l){g.push({box:l,Qb:1701733238})}).U("avc3",function(l){g.push({box:l,Qb:1701733238})}).U("ac-3",function(l){g.push({box:l,Qb:1701733217})}).U("ec-3",
247
+ function(l){g.push({box:l,Qb:1701733217})}).U("mp4a",function(l){g.push({box:l,Qb:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw ab(kd(a)),new M(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=fh(a,e,k.box,f,k.Qb);return a}
248
248
  function fh(a,b,c,d,e){var f=gh.value(),g=a.subarray(c.start,c.start+c.size),h=Ic(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Ic(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);hh(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Qc()?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,hh(e,d.start,d.size+k.byteLength);k=Ic(e,b.start);b=Nf(b);a=k.getUint32(b);
249
249
  k.setUint32(b,a+1);return e}function hh(a,b,c){a=Ic(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 gh=new Kc(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 ih(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",p=jh(d,e,h,k,l,m);f<=g;f++){for(var n=c[f],t=-1,v=-1,y=0;y<n.length;y++)if(null!=n[y]&&""!==n[y].g.trim()){t=y;break}for(y=n.length-1;0<=y;y--)if(null!=n[y]&&""!==n[y].g.trim()){v=y;break}if(-1===
250
250
  t||-1===v)n=kh(d,e),a.nestedCues.push(n);else{for(;t<=v;t++)if(y=n[t]){var w=y.l,x=y.i,C=y.j,z=y.h;if(w!=h||x!=k||C!=l||z!=m)p.payload&&a.nestedCues.push(p),p=jh(d,e,w,x,C,z),h=w,k=x,l=C,m=z;p.payload+=y.g}else p.payload+=" ";p.payload&&a.nestedCues.push(p);f!==g&&(p=kh(d,e),a.nestedCues.push(p));p=jh(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
@@ -267,719 +267,722 @@ a=1===(a&1);if(c.h!==Eh){e=c.g;if(c.h===Dh&&b!==e.g){var g=1+b-e.h;zh(e,g,1+e.g-
267
267
  f-1),ph(b,b.g,15-b.g),c.j=a);break;case 46:ph(c.l,0,15);break;case 47:b=null,c.h!==Eh&&(b=oh(c.i,c.j,a)),d=c.l,c.l=c.i,c.i=d,Fh(c),c.j=a,d=b}a=d;break a}a=null}else d=b.hb,qh(c.g,rh,b.Oa),qh(c.g,rh,d);return a}
268
268
  function ii(a,b){var c=[];try{for(;b.xa();){var d=Wh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Wh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Xh(e));for(var g=a.j.get(e),h=b.na();b.na()-h<f;){e=b;var k=Wh(e),l=k.value,m=k.pts;if(16===l){var p=Wh(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Ph(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=Qh(t,n,g.i));if(t.h+1>=t.H){n=t;for(var v=0,y=1;16>y;y++,
269
269
  v++)n.i[v]=n.i[y];for(y=0;1>y;y++,v++)n.i[v]=Nh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Qh(t,n,g.i));t.i[t.h]=Nh();t.g=0;break;case 12:t.isVisible()&&(e=Qh(t,n,g.i)),Mh(t),n=t,n.h=0,n.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Yh(g,e,l,m);else{if(4096<=l&&4127>=l)n=l&255,8<=n&&15>=n?e.skip(1):16<=n&&23>=n?e.skip(2):24<=n&&31>=n&&e.skip(3);else if(4224<=l&&4255>=l)n=l&255,128<=n&&135>=n?e.skip(4):136<=n&&143>=n&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Oh(g.g,"\u266a"):Oh(g.g,
270
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Oh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(di.has(e)){var x=di.get(e);Oh(g.g,x)}else Oh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Oh(g.g,"_"):Oh(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(C){if(C instanceof M&&3E3===C.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function ji(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function ki(){}ki.prototype.init=function(){};ki.prototype.parse=function(){return[]};function li(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Cb());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,Df:c,xg:d,rj:e}}function mi(a,b){return{tf:1==b?a.Cb():a.O()}}function ni(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.O()}}
271
- function oi(a,b,c){var d=a.O(),e=[],f=null;c&1&&(f=a.O());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={He:null,sampleSize:null,Md:null};c&256&&(h.He=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.Md=0==b?a.O():a.Sf());e.push(h)}return{wj:d,Uf:e,wg:f}};function pi(){this.j=new Map;this.i=this.h=0;this.g=qi}
272
- pi.prototype.init=function(a){function b(f){f=f.name;f in ri&&(c.g=ri[f])}var c=this,d=[],e=[];(new Hf).box("moov",Mf).box("mvex",Mf).T("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.O();g=g.O();c.h=f;c.i=g}).box("trak",Mf).T("tkhd",function(f){var g=f.reader;1==f.version?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));f=g.O();d.push(f)}).box("mdia",Mf).T("mdhd",function(f){f=ni(f.reader,f.version);e.push(f.timescale)}).box("minf",Mf).box("stbl",Mf).T("stsd",Of).box("avc1",b).box("avc3",b).box("hev1",
273
- b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("encv",Pf).box("sinf",Mf).box("frma",function(f){f=f.reader.O();f=Lf(f);f in ri&&(c.g=ri[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new M(2,2,2010);this.g==qi&&Ua("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
274
- pi.prototype.parse=function(a){var b=this;if(this.g==qi)return[];var c=[],d=this.h,e=this.i,f=[],g=null,h=null,k=null,l=9E4;(new Hf).box("moof",function(m){g=m.start;Mf(m)}).box("traf",Mf).T("trun",function(m){m=oi(m.reader,m.version,m.flags);f=m.Uf;h=m.wg}).T("tfhd",function(m){m=li(m.reader,m.flags);d=m.Df||b.h;e=m.xg||b.i;m=m.trackId;b.j.has(m)&&(l=b.j.get(m))}).T("tfdt",function(m){k=mi(m.reader,m.version).tf}).box("mdat",function(m){if(null===k)throw new M(2,2,2010);a:{var p=m.reader,n=k,t=l,
275
- v=d,y=e,w=f,x=0,C=y;w.length&&(C=w[0].sampleSize||y);for(p.skip((g||0)+(h||0)-m.start-8);p.xa();){m=p.O();var z=p.pb(),A=1;switch(b.g){case si:z&=31;z=6==z;break;case ti:A=2;p.skip(1);z=z>>1&63;z=39==z||40==z;break;default:break a}if(z){z=0;w.length>x&&(z=w[x].Md||0);z=(n+z)/t;for(var E=[],F=p.Bb(m-A),H=A=0;H<F.length;)2==A&&3==F[H]?(A=0,F=[].concat(ha(F)),F.splice(H,1),F=new Uint8Array(F)):0==F[H]?A++:A=0,H++;A=F;for(H=0;H<A.length;){for(F=0;255==A[H];)F+=255,H++;F+=A[H++];for(var J=0;255==A[H];)J+=
276
- 255,H++;J+=A[H++];4==F&&E.push(A.subarray(H,H+J));H+=J}E=r(E);for(A=E.next();!A.done;A=E.next())c.push({uh:A.value,pts:z})}else try{p.skip(m-A)}catch(K){break}C-=m+4;0==C&&(n=w.length>x?n+(w[x].He||v):n+v,x++,C=w.length>x?w[x].sampleSize||y:y)}}}).parse(a,!1);return c};var qi=0,si=1,ti=2,ri={avc1:si,avc3:si,hev1:ti,hvc1:ti,dvh1:ti,dvhe:ti};function ui(a){this.h=new ki;a.includes("video/mp4")&&(this.h=new pi);this.g=new ei}ui.prototype.init=function(a){this.h.init(a)};
277
- function vi(a,b){b=a.h.parse(b);b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Fc(d.uh);if(0<e.length&&(c=a.g,d=d.pts,e=new Ef(e,0),181===e.pb()&&49===e.Ee()&&1195456820===e.O()&&3===e.pb())){var f=e.pb();if(0!==(f&64)){f&=31;e.skip(1);for(var g=0;g<f;g++){var h=e.pb(),k=(h&4)>>2,l=e.pb(),m=e.pb();k&&(h&=3,0===h||1===h?c.h.push({pts:d,type:h,Oa:l,hb:m,order:c.h.length}):(c.g.push({pts:d,type:h,value:l,order:c.g.length}),c.g.push({pts:d,type:2,value:m,order:c.g.length})))}}}}return gi(a.g)}
278
- ;function wi(a,b,c,d,e){this.Pa=a;this.Ta=b;this.Ca=c;this.xe=void 0===d?null:d;this.timescale=e}wi.prototype.Kc=function(){return this.Ta};wi.prototype.Gc=function(){return this.Ca};function xi(a,b){return a&&b?a.Kc()==b.Kc()&&a.Gc()==b.Gc()&&gc(a.Pa(),b.Pa()):a==b}I("shaka.media.InitSegmentReference",wi);wi.prototype.getEndByte=wi.prototype.Gc;wi.prototype.getStartByte=wi.prototype.Kc;
279
- function yi(a,b,c,d,e,f,g,h,k,l,m,p,n,t,v){l=void 0===l?[]:l;t=void 0===t?zi:t;this.startTime=a;this.l=this.endTime=b;this.F=c;this.Ta=d;this.Ca=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.i=l;this.tilesLayout=void 0===m?"":m;this.B=void 0===p?null:p;this.g=void 0===n?null:n;this.status=t;this.C=!1;this.m=void 0===v?null:v;this.s=null;this.j=0}q=yi.prototype;q.Pa=function(){return this.F()};q.getStartTime=function(){return this.startTime};q.Jg=function(){return this.endTime};
280
- q.Kc=function(){return this.Ta};q.Gc=function(){return this.Ca};q.bh=function(){return this.tilesLayout};q.ah=function(){return this.B};q.fc=function(){return this.status};q.mh=function(){this.status=Ai};q.Pf=function(){this.C=!0};q.ih=function(){return this.C};q.ag=function(a){this.s=a};q.Zg=function(){return this.s};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.l+=a;for(var b=r(this.i),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.l+=a};
281
- q.We=function(a){null==this.g?Ta("Sync attempted without sync time!"):(a=this.g-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};I("shaka.media.SegmentReference",yi);yi.prototype.syncAgainst=yi.prototype.We;yi.prototype.offset=yi.prototype.offset;yi.prototype.getThumbnailSprite=yi.prototype.Zg;yi.prototype.setThumbnailSprite=yi.prototype.ag;yi.prototype.isPreload=yi.prototype.ih;yi.prototype.markAsPreload=yi.prototype.Pf;yi.prototype.markAsUnavailable=yi.prototype.mh;yi.prototype.getStatus=yi.prototype.fc;
282
- yi.prototype.getTileDuration=yi.prototype.ah;yi.prototype.getTilesLayout=yi.prototype.bh;yi.prototype.getEndByte=yi.prototype.Gc;yi.prototype.getStartByte=yi.prototype.Kc;yi.prototype.getEndTime=yi.prototype.Jg;yi.prototype.getStartTime=yi.prototype.getStartTime;yi.prototype.getUris=yi.prototype.Pa;var zi=0,Ai=1;yi.Status={Xh:zi,kj:Ai,Ai:2};function Bi(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function Ci(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Di(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
283
- function Ei(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=r(Fi(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}function Gi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Fi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}
284
- function Fi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};/*
270
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Oh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(di.has(e)){var x=di.get(e);Oh(g.g,x)}else Oh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Oh(g.g,"_"):Oh(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(C){if(C instanceof M&&3E3===C.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function ji(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function ki(){}ki.prototype.init=function(){};ki.prototype.parse=function(){return[]};function li(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(ha(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function mi(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Cb());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,Ef:c,xg:d,qj:e}}function ni(a,b){return{uf:1==b?a.Cb():a.O()}}function oi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.O()}}
271
+ function pi(a,b,c){var d=a.O(),e=[],f=null;c&1&&(f=a.O());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Je:null,sampleSize:null,Md:null};c&256&&(h.Je=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.Md=0==b?a.O():a.Sf());e.push(h)}return{vj:d,Uf:e,wg:f}};function qi(){this.j=new Map;this.i=this.h=0;this.g=ri}
272
+ qi.prototype.init=function(a){function b(f){f=f.name;f in si&&(c.g=si[f])}var c=this,d=[],e=[];(new Hf).box("moov",Mf).box("mvex",Mf).U("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.O();g=g.O();c.h=f;c.i=g}).box("trak",Mf).U("tkhd",function(f){var g=f.reader;1==f.version?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));f=g.O();d.push(f)}).box("mdia",Mf).U("mdhd",function(f){f=oi(f.reader,f.version);e.push(f.timescale)}).box("minf",Mf).box("stbl",Mf).U("stsd",Of).box("avc1",b).box("avc3",b).box("hev1",
273
+ b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("encv",Pf).box("sinf",Mf).box("frma",function(f){f=f.reader.O();f=Lf(f);f in si&&(c.g=si[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new M(2,2,2010);this.g==ri&&Ua("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
274
+ qi.prototype.parse=function(a){var b=this;if(this.g==ri)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Hf).box("moof",function(l){f=l.start;g=[];Mf(l)}).box("traf",Mf).U("trun",function(l){l=pi(l.reader,l.version,l.flags);g.push(l)}).U("tfhd",function(l){l=mi(l.reader,l.flags);d=l.Ef||b.h;e=l.xg||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).U("tfdt",function(l){h=ni(l.reader,l.version).uf}).box("mdat",function(l){if(null===h)throw Ua("Unable to find base media decode time for CEA captions!"),
275
+ new M(2,2,2010);ti(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
276
+ function ti(a,b,c,d,e,f,g,h,k){var l=0,m=f,p=h.map(function(v){return v.Uf});p=[].concat.apply([],ha(p));p.length&&(m=p[0].sampleSize||f);for(b.skip(g+h[0].wg);b.xa();){g=b.O();var n=b.pb(),t=null;t=!1;h=1;switch(a.g){case ui:t=n&31;t=6==t;break;case vi:h=2;b.skip(1);t=n>>1&63;t=39==t||40==t;break;default:return}if(t)for(n=0,l<p.length&&(n=p[l].Md||0),n=(c+n)/d,h=r(li(b.Bb(g-h))),t=h.next();!t.done;t=h.next())k.push({uh:t.value,pts:n});else try{b.skip(g-h)}catch(v){break}m-=g+4;0==m&&(c=l<p.length?
277
+ c+(p[l].Je||e):c+e,l++,l<p.length?m=p[l].sampleSize||f:m=f)}}var ri=0,ui=1,vi=2,si={avc1:ui,avc3:ui,hev1:vi,hvc1:vi,dvh1:vi,dvhe:vi};function wi(a){this.h=new ki;a.includes("video/mp4")&&(this.h=new qi);this.g=new ei}wi.prototype.init=function(a){this.h.init(a)};
278
+ function xi(a,b){b=a.h.parse(b);b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Fc(d.uh);if(0<e.length&&(c=a.g,d=d.pts,e=new Ef(e,0),181===e.pb()&&49===e.Ge()&&1195456820===e.O()&&3===e.pb())){var f=e.pb();if(0!==(f&64)){f&=31;e.skip(1);for(var g=0;g<f;g++){var h=e.pb(),k=(h&4)>>2,l=e.pb(),m=e.pb();k&&(h&=3,0===h||1===h?c.h.push({pts:d,type:h,Oa:l,hb:m,order:c.h.length}):(c.g.push({pts:d,type:h,value:l,order:c.g.length}),c.g.push({pts:d,type:2,value:m,order:c.g.length})))}}}}return gi(a.g)}
279
+ ;function yi(a,b,c,d,e){this.Pa=a;this.Ta=b;this.Ca=c;this.ze=void 0===d?null:d;this.timescale=e}yi.prototype.Kc=function(){return this.Ta};yi.prototype.Gc=function(){return this.Ca};function zi(a,b){return a&&b?a.Kc()==b.Kc()&&a.Gc()==b.Gc()&&gc(a.Pa(),b.Pa()):a==b}I("shaka.media.InitSegmentReference",yi);yi.prototype.getEndByte=yi.prototype.Gc;yi.prototype.getStartByte=yi.prototype.Kc;
280
+ function Ai(a,b,c,d,e,f,g,h,k,l,m,p,n,t,v){l=void 0===l?[]:l;t=void 0===t?Bi:t;this.startTime=a;this.l=this.endTime=b;this.F=c;this.Ta=d;this.Ca=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.i=l;this.tilesLayout=void 0===m?"":m;this.B=void 0===p?null:p;this.g=void 0===n?null:n;this.status=t;this.C=!1;this.m=void 0===v?null:v;this.s=null;this.j=0}q=Ai.prototype;q.Pa=function(){return this.F()};q.getStartTime=function(){return this.startTime};q.Jg=function(){return this.endTime};
281
+ q.Kc=function(){return this.Ta};q.Gc=function(){return this.Ca};q.bh=function(){return this.tilesLayout};q.ah=function(){return this.B};q.fc=function(){return this.status};q.mh=function(){this.status=Ci};q.Pf=function(){this.C=!0};q.ih=function(){return this.C};q.ag=function(a){this.s=a};q.Zg=function(){return this.s};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.l+=a;for(var b=r(this.i),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.l+=a};
282
+ q.Xe=function(a){null==this.g?Ta("Sync attempted without sync time!"):(a=this.g-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};I("shaka.media.SegmentReference",Ai);Ai.prototype.syncAgainst=Ai.prototype.Xe;Ai.prototype.offset=Ai.prototype.offset;Ai.prototype.getThumbnailSprite=Ai.prototype.Zg;Ai.prototype.setThumbnailSprite=Ai.prototype.ag;Ai.prototype.isPreload=Ai.prototype.ih;Ai.prototype.markAsPreload=Ai.prototype.Pf;Ai.prototype.markAsUnavailable=Ai.prototype.mh;Ai.prototype.getStatus=Ai.prototype.fc;
283
+ Ai.prototype.getTileDuration=Ai.prototype.ah;Ai.prototype.getTilesLayout=Ai.prototype.bh;Ai.prototype.getEndByte=Ai.prototype.Gc;Ai.prototype.getStartByte=Ai.prototype.Kc;Ai.prototype.getEndTime=Ai.prototype.Jg;Ai.prototype.getStartTime=Ai.prototype.getStartTime;Ai.prototype.getUris=Ai.prototype.Pa;var Bi=0,Ci=1;Ai.Status={Xh:Bi,jj:Ci,Ai:2};function Di(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function Ei(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Fi(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
284
+ function Gi(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=r(Hi(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}function Ii(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Hi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}
285
+ function Hi(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};/*
285
286
  @license
286
287
  Shaka Player
287
288
  Copyright 2022 Google LLC
288
289
  SPDX-License-Identifier: Apache-2.0
289
290
  */
290
- function Hi(){}function Ii(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
291
- function Ji(a){var b={key:a.type,description:"",data:""};if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=$c(Fc(a.data,1,c));a=$c(Fc(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;c=a.data.subarray(1).indexOf(0);if(-1===c)return null;d=$c(Fc(a.data,1,c));a=$c(Fc(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("PRIV"===a.type){if(2>
291
+ function Ji(){}function Ki(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
292
+ function Li(a){var b={key:a.type,description:"",data:""};if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=$c(Fc(a.data,1,c));a=$c(Fc(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;c=a.data.subarray(1).indexOf(0);if(-1===c)return null;d=$c(Fc(a.data,1,c));a=$c(Fc(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("PRIV"===a.type){if(2>
292
293
  a.size)return null;d=a.data.indexOf(0);if(-1===d)return null;d=$c(Fc(a.data,0,d));a=Gc(a.data.subarray(d.length+1));b.description=d;b.data=a;return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=$c(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=$c(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Gc(a.data),b):null}
293
- function Ki(a){for(var b=0,c=[];b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9];){var d=Ii(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Ii(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Ji(e))&&c.push(f);b+=e.size+10}b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]&&(b+=10)}return c}
294
- I("shaka.util.Id3Utils",Hi);Hi.getID3Frames=Ki;function Li(){this.s=null;this.B=!1;this.l=this.m=null;this.F=[];this.g=this.h=null;this.C=[];this.j=null;this.i=[]}
295
- Li.prototype.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,Mi(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71===a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h===e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.s=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.s:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,oe:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&
296
- 15)<<8|f[h+11]);h<k;){var l=(f[h+1]&31)<<8|f[h+2];switch(f[h]){case 15:-1===g.audio&&(g.audio=l,g.audioCodec="aac");break;case 21:-1===g.oe&&(g.oe=l);break;case 27:-1===g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1===g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1===g.video&&(g.video=l,g.videoCodec="hvc")}h+=((f[h+3]&15)<<8|f[h+4])+5}f=g;null==this.l&&(this.l=f.video);null==this.g&&(this.g=f.audio);null==this.j&&(this.j=f.oe);d&&!this.B&&(d=!1,e=b-188);this.B=!0;break;case this.l:f=
297
- a.subarray(h,e+188);null==this.m&&(h=Ni(f))&&null!=h.pts&&(this.m=h.pts/9E4);this.F.push(f);break;case this.g:f=a.subarray(h,e+188);null==this.h&&(h=Ni(f))&&null!=h.pts&&(this.h=h.pts/9E4);this.C.push(f);break;case this.j:this.i.push(a.subarray(h,e+188));break;default:d=!0}}return this};
298
- function Ni(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),vj:6+(a[4]<<8|a[5]),pts:null,dts:null},c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));b.data=a.subarray(9+a[8]);return b}
299
- function Oi(a){for(var b=[],c=new Uint8Array(0),d=a.i.length-1;0<=d;d--){c=ld(a.i[d],c);var e=Ni(c);e&&(b.unshift({cueTime:e.pts?e.pts/9E4:null,data:e.data,frames:Ki(e.data),dts:e.dts,pts:e.pts}),c=new Uint8Array(0))}return b}Li.prototype.getStartTime=function(){return{audio:this.h,video:this.m}};function Mi(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71===a[c]&&71===a[c+188]&&71===a[c+376])return c;c++}return-1}I("shaka.util.TsParser",Li);function Pi(a,b,c){this.g=null;this.i=-1;this.j=a;this.h=b;this.l=c;"undefined"===typeof libDPIModule&&Ua("Could not Find LCEVC Library dependencies on this page");"undefined"===typeof LcevcDil?Ua("Could not Find LCEVC Library on this page"):LcevcDil.SupportObject.SupportStatus||Ua(LcevcDil.SupportObject.SupportError);"undefined"!==typeof LcevcDil&&"undefined"!==typeof libDPIModule&&this.h instanceof HTMLCanvasElement&&LcevcDil.SupportObject.SupportStatus&&!this.g&&LcevcDil.SupportObject.webGLSupport(this.h)&&
300
- (this.h.classList.remove("shaka-hidden"),this.g=new LcevcDil.LcevcDil(this.j,this.h,this.l))}Pi.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Qi(a,b){var c=Ri;switch(b.mimeType){case "video/webm":c=Si;break;case "video/mp4":c=Ti}a.g&&(a.i=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(c))}I("shaka.lcevc.Dil",Pi);Pi.prototype.release=Pi.prototype.release;var Ri=0,Si=1,Ti=2;function Ui(a,b,c,d){var e=this;this.l=a;this.I=null;this.m=b;this.h={};this.M={};this.P={};this.g=null;this.J=!1;this.V=c||function(){};this.H=d||null;this.i={};this.C=new wf;this.s={};this.B=null;this.K=new Jc;this.N="";this.j=Vi(this,this.K);this.G=new uf(function(){return Wi(e)});this.F=!1;this.X=new Jc}function Vi(a,b){var c=new MediaSource;a.C.ya(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.N=Xi(c);a.l.src=a.N;return c}q=Ui.prototype;q.destroy=function(){return this.G.destroy()};
301
- function Wi(a){var b,c,d,e,f,g,h,k;return G(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(zb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new M(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.s)b.push(a.s[k].destroy());return u(l,Promise.all(b),2)}a.C&&(a.C.release(),a.C=null);a.l&&(a.l.removeAttribute("src"),a.l.load(),a.l=null);a.I=null;a.j=null;a.g=null;a.m=null;a.h={};a.s={};a.B=null;
294
+ function Mi(a){for(var b=0,c=[];b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9];){var d=Ki(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Ki(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Li(e))&&c.push(f);b+=e.size+10}b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]&&(b+=10)}return c}
295
+ I("shaka.util.Id3Utils",Ji);Ji.getID3Frames=Mi;function Ni(){this.s=null;this.B=!1;this.l=this.m=null;this.F=[];this.g=this.h=null;this.C=[];this.j=null;this.i=[]}
296
+ Ni.prototype.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,Oi(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71===a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h===e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.s=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.s:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,qe:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&
297
+ 15)<<8|f[h+11]);h<k;){var l=(f[h+1]&31)<<8|f[h+2];switch(f[h]){case 15:-1===g.audio&&(g.audio=l,g.audioCodec="aac");break;case 21:-1===g.qe&&(g.qe=l);break;case 27:-1===g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1===g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1===g.video&&(g.video=l,g.videoCodec="hvc")}h+=((f[h+3]&15)<<8|f[h+4])+5}f=g;null==this.l&&(this.l=f.video);null==this.g&&(this.g=f.audio);null==this.j&&(this.j=f.qe);d&&!this.B&&(d=!1,e=b-188);this.B=!0;break;case this.l:f=
298
+ a.subarray(h,e+188);null==this.m&&(h=Pi(f))&&null!=h.pts&&(this.m=h.pts/9E4);this.F.push(f);break;case this.g:f=a.subarray(h,e+188);null==this.h&&(h=Pi(f))&&null!=h.pts&&(this.h=h.pts/9E4);this.C.push(f);break;case this.j:this.i.push(a.subarray(h,e+188));break;default:d=!0}}return this};
299
+ function Pi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),uj:6+(a[4]<<8|a[5]),pts:null,dts:null},c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));b.data=a.subarray(9+a[8]);return b}
300
+ function Qi(a){for(var b=[],c=new Uint8Array(0),d=a.i.length-1;0<=d;d--){c=ld(a.i[d],c);var e=Pi(c);e&&(b.unshift({cueTime:e.pts?e.pts/9E4:null,data:e.data,frames:Mi(e.data),dts:e.dts,pts:e.pts}),c=new Uint8Array(0))}return b}Ni.prototype.getStartTime=function(){return{audio:this.h,video:this.m}};function Oi(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71===a[c]&&71===a[c+188]&&71===a[c+376])return c;c++}return-1}I("shaka.util.TsParser",Ni);function Ri(a,b,c){this.g=null;this.i=-1;this.j=a;this.h=b;this.l=c;"undefined"===typeof libDPIModule&&Ua("Could not Find LCEVC Library dependencies on this page");"undefined"===typeof LcevcDil?Ua("Could not Find LCEVC Library on this page"):LcevcDil.SupportObject.SupportStatus||Ua(LcevcDil.SupportObject.SupportError);"undefined"!==typeof LcevcDil&&"undefined"!==typeof libDPIModule&&this.h instanceof HTMLCanvasElement&&LcevcDil.SupportObject.SupportStatus&&!this.g&&LcevcDil.SupportObject.webGLSupport(this.h)&&
301
+ (this.h.classList.remove("shaka-hidden"),this.g=new LcevcDil.LcevcDil(this.j,this.h,this.l))}Ri.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Si(a,b){var c=Ti;switch(b.mimeType){case "video/webm":c=Ui;break;case "video/mp4":c=Vi}a.g&&(a.i=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(c))}I("shaka.lcevc.Dil",Ri);Ri.prototype.release=Ri.prototype.release;var Ti=0,Ui=1,Vi=2;function Wi(a,b,c,d){var e=this;this.l=a;this.I=null;this.m=b;this.h={};this.M={};this.P={};this.g=null;this.J=!1;this.V=c||function(){};this.H=d||null;this.i={};this.C=new wf;this.s={};this.B=null;this.K=new Jc;this.N="";this.j=Xi(this,this.K);this.G=new uf(function(){return Yi(e)});this.F=!1;this.X=new Jc}function Xi(a,b){var c=new MediaSource;a.C.ya(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.N=Zi(c);a.l.src=a.N;return c}q=Wi.prototype;q.destroy=function(){return this.G.destroy()};
302
+ function Yi(a){var b,c,d,e,f,g,h,k;return F(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(zb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new M(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.s)b.push(a.s[k].destroy());return u(l,Promise.all(b),2)}a.C&&(a.C.release(),a.C=null);a.l&&(a.l.removeAttribute("src"),a.l.load(),a.l=null);a.I=null;a.j=null;a.g=null;a.m=null;a.h={};a.s={};a.B=null;
302
303
  a.i={};a.H=null;B(l)})}
303
- q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,p;return G(function(n){if(1==n.g)return e=Hb,u(n,d.K,2);d.F=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={Ea:f.Ea},h=g.next())if(f.Ea=h.value,k=a.get(f.Ea),l=wd(k.mimeType,k.codecs),f.Ea==e.ea)Yi(d,l,c);else{!b&&bc(l)||!qd(l,f.Ea)||(d.s[f.Ea]=new pd(l),l=td(f.Ea,l));m=l+d.I.sourceBufferExtraFeatures;vf(d.G);p=void 0;try{p=d.j.addSourceBuffer(m)}catch(t){throw new M(2,3,3015,t,"The mediaSource_ status was"+d.j.readyState+"expected 'open'");
304
- }d.C.o(p,"error",function(t){return function(){d.i[t.Ea][0].p.reject(new M(2,3,3014,d.l.error?d.l.error.code:0))}}(f));d.C.o(p,"updateend",function(t){return function(){return Zi(d,t.Ea)}}(f));d.h[f.Ea]=p;d.M[f.Ea]=l;d.i[f.Ea]=[];d.P[f.Ea]=!!k.drmInfos.length}B(n)})};q.configure=function(a){this.I=a};
305
- function Yi(a,b,c){a.g||(a.g=new Bd(a.m));var d=a.g;a=a.J;"application/cea-608"==b||"application/cea-708"==b?d.i=null:(d.i=(0,Dd[b])(),d.i.setSequenceMode?d.i.setSequenceMode(c):Ua('Text parsers should have a "setSequenceMode" method!'),d.C=a)}function $i(a){return a.j?"ended"==a.j.readyState:!0}function aj(a,b){return b==Gb?a.g.g:Bi(bj(a,b))}function cj(a,b){return b==Gb?a.g.h:Ci(bj(a,b))}function dj(a,b,c){if(b==Gb)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=bj(a,b);return Ei(a,c)}
306
- q.ib=function(){var a={total:Fi(this.l.buffered),audio:Fi(bj(this,"audio")),video:Fi(bj(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function bj(a,b){try{return a.h[b].buffered}catch(c){return null}}
307
- function ej(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,F,H,J,K,Q,V,U,ia;return G(function(O){switch(O.g){case 1:h=Hb;if(b!=h.ea){O.D(2);break}if(!a.F){O.D(3);break}return u(O,a.X,4);case 4:k=O.h,a.g.B=k;case 3:return u(O,Ed(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return O.return();case 2:l=Fc(c);m=a.M[b];a.s[b]&&(m=a.s[b].s);0>Mi(l)?fj.includes(m)&&(v=Ki(l),v.length&&d&&(y={cueTime:d.startTime,data:l,frames:v,dts:d.startTime,pts:d.startTime},
308
- a.V([y],0,d.endTime))):(p=(new Li).parse(l),n=d.startTime-(p.getStartTime()[b]||0),t=Oi(p),t.length&&a.V(t,n,d?d.endTime:null));if(!a.s[b]){e&&b==h.Ma&&(a.g||Yi(a,"application/cea-608",a.F),a.B||(a.B=new ui(m)),d?(w=vi(a.B,c),w.length&&(x=a.h[h.Ma].timestampOffset,Jd(a.g,w,d.startTime,d.endTime,x))):a.B.init(c));O.D(6);break}f&&a.s[b].g.resetCaptions();return u(O,ud(a.s[b],c),7);case 7:C=O.h,a.g||Yi(a,"application/cea-608",a.F),C.captions&&C.captions.length&&(z=a.h[h.Ma].timestampOffset,A=Hd(C.captions),
309
- Jd(a.g,A,d?d.startTime:null,d?d.endTime:null,z)),c=C.data;case 6:c=gj(a,c,d?d.startTime:null,b);E=a.h[b];F=hj;if(!a.F||E.mode==F||!d){O.D(8);break}H=a.j.duration;J=b==h.Ma||!(h.Ma in a.h);if(!J){O.D(9);break}K=[E.appendWindowStart,E.appendWindowEnd];E.appendWindowStart=0;E.appendWindowEnd=Infinity;Q=E.timestampOffset;E.timestampOffset=0;return u(O,ij(a,b,function(){return jj(a,b,c)}),10);case 10:return u(O,ij(a,b,function(){return kj(a,b)}),11);case 11:return E.timestampOffset=Q,E.appendWindowStart=
310
- K[0],E.appendWindowEnd=K[1],V=Bi(bj(a,b)),U=(d.startTime||0)-(V||0),a.X.resolve(U),u(O,ij(a,b,function(){return lj(a,b,0,H)}),12);case 12:if(b!=h.Ma){O.D(9);break}return u(O,ij(a,b,function(){a.l.currentTime-=.001;Zi(a,b)}),9);case 9:return E.mode=F,u(O,a.Sa(H),8);case 8:return d&&a.F&&b!=h.ea&&(f||g)&&(ia=d.startTime,ij(a,b,function(){return kj(a,b)}),ij(a,b,function(){return mj(a,b,ia)})),u(O,ij(a,b,function(){jj(a,b,c)}),16);case 16:B(O)}})}function nj(a,b){var c=cj(a,"video")||0;Gd(a.g,b,c)}
311
- function oj(a){a.g&&Gd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return G(function(f){e=Hb;return a==e.ea?u(f,d.g.remove(b,c),0):u(f,ij(d,a,function(){return lj(d,a,b,c)}),0)})};function pj(a,b){var c;return G(function(d){c=Hb;return b==c.ea?a.g?u(d,a.g.remove(0,Infinity),0):d.return():u(d,ij(a,b,function(){return lj(a,b,0,a.j.duration)}),0)})}q.flush=function(a){var b=this,c;return G(function(d){c=Hb;return a==c.ea?d.return():u(d,ij(b,a,function(){b.l.currentTime-=.001;Zi(b,a)}),0)})};
312
- function qj(a,b,c,d,e,f){var g;return G(function(h){g=Hb;return b==g.ea?(f||(a.g.B=c),Fd(a.g,d,e),h.return()):u(h,Promise.all([ij(a,b,function(){return kj(a,b)}),f?Promise.resolve():ij(a,b,function(){return mj(a,b,c)}),ij(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Zi(a,b)})]),0)})}
313
- function rj(a,b,c){var d;return G(function(e){d=Hb;if(b==d.ea)return e.return();ij(a,b,function(){return kj(a,b)});return u(e,ij(a,b,function(){return mj(a,b,c)}),0)})}q.endOfStream=function(a){var b=this;return G(function(c){return u(c,sj(b,function(){$i(b)||"closed"===b.j.readyState||(a?b.j.endOfStream(a):b.j.endOfStream())}),0)})};
314
- q.Sa=function(a){var b=this;return G(function(c){return u(c,sj(b,function(){if(a<b.j.duration)for(var d in b.h){var e={start:function(){},p:new Jc};b.i[d].unshift(e)}b.j.duration=a}),0)})};q.getDuration=function(){return this.j.duration};function jj(a,b,c){if("video"==b&&a.H){var d=a.H;d.g&&d.g.appendBuffer(c,"video",d.i)}a.h[b].appendBuffer(c)}function lj(a,b,c,d){d<=c?Zi(a,b):a.h[b].remove(c,d)}
315
- function kj(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Zi(a,b)}function mj(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Zi(a,b)}function Zi(a,b){var c=a.i[b][0];c&&(c.p.resolve(),tj(a,b))}function ij(a,b,c){vf(a.G);c={start:c,p:new Jc};a.i[b].push(c);1==a.i[b].length&&uj(a,b);return c.p}
316
- function sj(a,b){var c,d,e,f,g,h;return G(function(k){switch(k.g){case 1:vf(a.G);c=[];d={};for(e in a.h)d.zc=new Jc,f={start:function(l){return function(){return l.zc.resolve()}}(d),p:d.zc},a.i[e].push(f),c.push(d.zc),1==a.i[e].length&&f.start(),d={zc:d.zc};D(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=wa(k),g;case 3:try{b()}catch(l){throw new M(2,3,3015,l);}finally{for(h in a.h)tj(a,h)}B(k)}})}function tj(a,b){a.i[b].shift();uj(a,b)}
317
- function uj(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new M(2,3,3017,b)):c.p.reject(new M(2,3,3015,d)),tj(a,b)}}function gj(a,b,c,d){var e=a.P[d];null==c&&e&&(Sc()||Qc())&&"mp4"==a.M[d].split(";")[0].split("/")[1]&&(b=eh(b));return b}var Xi=window.URL.createObjectURL,hj="sequence",fj=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function P(a,b,c){this.i=a;this.m=b;this.s=this.j=Infinity;this.g=1;this.h=this.l=null;this.B=0;this.C=!0;this.F=0;this.G=void 0===c?!0:c;this.H=0;this.I=!1}q=P.prototype;q.getDuration=function(){return this.j};q.Rg=function(){return this.g};q.$f=function(a){this.i=a};q.Sa=function(a){this.j=a};q.Vg=function(){return this.i};q.Wf=function(a){this.B=a};q.bd=function(a){this.C=a};q.Se=function(a){this.s=a};q.Xf=function(a){this.m=a};q.Ig=function(){return this.m};
318
- q.mc=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.B)/1E3;a=r(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.Be(b);this.h=Math.max(this.h,c);null!=this.i&&this.G&&!this.I&&(this.i=d-this.h-this.g)}};q.we=function(){this.I=!0};q.Be=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.Ae=function(a){this.g=Math.max(this.g,a)};
319
- q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.U=function(){return Infinity==this.j&&!this.C};q.Lb=function(){return Infinity!=this.j&&!this.C};q.kb=function(){return Math.max(this.F,this.Ib()-this.s)};q.cg=function(a){this.F=a};q.Ib=function(){return this.U()||this.Lb()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j};
320
- q.Jc=function(a){var b=Math.max(this.l,this.F);return Infinity==this.s?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Ib()-this.s+a,this.jb()))};q.ec=function(){return this.Jc(0)};q.jb=function(){return Math.max(0,this.Ib()-(this.U()||this.Lb()?this.m:0))};q.gg=function(){return null==this.i||null!=this.h&&this.G?!1:!0};q.Vf=function(a){this.H=a};I("shaka.media.PresentationTimeline",P);P.prototype.setAvailabilityTimeOffset=P.prototype.Vf;P.prototype.usingPresentationStartTime=P.prototype.gg;
321
- P.prototype.getSeekRangeEnd=P.prototype.jb;P.prototype.getSeekRangeStart=P.prototype.ec;P.prototype.getSafeSeekRangeStart=P.prototype.Jc;P.prototype.getSegmentAvailabilityEnd=P.prototype.Ib;P.prototype.setUserSeekStart=P.prototype.cg;P.prototype.getSegmentAvailabilityStart=P.prototype.kb;P.prototype.isInProgress=P.prototype.Lb;P.prototype.isLive=P.prototype.U;P.prototype.offset=P.prototype.offset;P.prototype.notifyMaxSegmentDuration=P.prototype.Ae;P.prototype.notifyMinSegmentStartTime=P.prototype.Be;
322
- P.prototype.lockStartTime=P.prototype.we;P.prototype.notifySegments=P.prototype.mc;P.prototype.getDelay=P.prototype.Ig;P.prototype.setDelay=P.prototype.Xf;P.prototype.setSegmentAvailabilityDuration=P.prototype.Se;P.prototype.setStatic=P.prototype.bd;P.prototype.setClockOffset=P.prototype.Wf;P.prototype.getPresentationStartTime=P.prototype.Vg;P.prototype.setDuration=P.prototype.Sa;P.prototype.setPresentationStartTime=P.prototype.$f;P.prototype.getMaxSegmentDuration=P.prototype.Rg;
323
- P.prototype.getDuration=P.prototype.getDuration;function vj(a,b,c){this.l=c;this.j=a;this.B=wj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.C=b;this.i=function(){}}vj.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function xj(a,b){a.i=b}function yj(a){this.g=a}function wj(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(Fi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function zj(a,b,c,d,e){var f=this;this.s=e;this.g=a;this.B=b;this.G=c;this.i=new wf;this.m=!1;this.F=a.readyState;this.C=0;this.h=d;this.l=!1;this.i.o(a,"waiting",function(){return Aj(f)});this.j=(new N(function(){Aj(f)})).ka(.25)}zj.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.s=null};zj.prototype.De=function(){this.l=!0;Aj(this)};
324
- function Aj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=wj(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.B!=d)b.m=f,b.g=e,b.B=d,b.h=!1;e=f-b.m;if(d=e>=b.C&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.s++,b.l(new L("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Gi(c,b,a.G.gapDetectionThreshold),null==
325
- d||0==d&&!a.l||(e=c.start(d),e>=a.B.jb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.C++,a.s(new L("gapjumped")))))}}};function Bj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Cj.value().get(b),c.ya(a,b,d))}var Cj=new Kc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Dj(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new wf;this.i=new Ej(a);Bj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Fj(d,d.j)})}Dj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Gj(a){return a.m?a.g.currentTime:a.j}function Hj(a,b){0<a.g.readyState?Ij(a.i,b):Bj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Fj(a,a.j)})}
326
- function Fj(a,b){.001>Math.abs(a.g.currentTime-b)?Jj(a):(a.h.ya(a.g,"seeking",function(){Jj(a)}),Ij(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Jj(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function Ej(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new N(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Ej.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
327
- function Ij(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ka(.1)};function Kj(a){this.g=a;this.j=!1;this.h=null;this.i=new wf}q=Kj.prototype;q.ie=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ya(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Bj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.je=function(a){this.h=this.j?this.h:a};q.ld=function(){return(this.j?this.g.currentTime:this.h)||0};q.pf=function(){return 0};
328
- q.nf=function(){return 0};q.Rf=function(){};
329
- function Lj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.C=e;this.B=null;this.s=Mj(a,c,f);this.j=new zj(a,b.presentationTimeline,c,this.s,f);this.h=new Dj(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=Gj(g.h);h=Nj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;Hj(g.h,h);h=void 0;break a}g.C();h=void 0}return h},Oj(this,d));this.m=new N(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Gj(g.h),k=g.g.ec(),l=g.g.jb();3>
330
- l-k&&(k=l-3);h<k&&(h=Nj(g,h),g.i.currentTime=h)}})}q=Lj.prototype;q.ie=function(){this.m.ka(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.C=function(){}};q.je=function(a){Hj(this.h,a)};q.ld=function(){var a=Gj(this.h);return 0<this.i.readyState&&!this.i.paused?Pj(this,a):a};q.pf=function(){return this.s?this.s.s:0};q.nf=function(){return this.j.C};
331
- function Oj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.ec():a.g.jb():0>b&&(b=a.g.jb()+b);return Qj(a,Pj(a,b))}q.Rf=function(){this.j.De()};function Qj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Nj(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.ec(),f=a.g.jb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Jc(c),k=a.g.Jc(d);c=a.g.Jc(c+d);return b>=g?Qj(a,b):b>f?f:b<e?Di(a.i.buffered,k)?k:c:b>=h||Di(a.i.buffered,b)?b:c}
332
- function Pj(a,b){var c=a.g.ec();if(b<c)return c;a=a.g.jb();return b>a?a:b}function Mj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new vj(new yj(a),b.stallThreshold,c);xj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Rj(a){this.g=a;this.h=null;this.i=0;this.j=!1}q=Rj.prototype;q.release=function(){this.j||(this.g=[],this.h&&this.h.stop(),this.h=null)};q.nh=function(){this.j=!0};function Sj(a,b){a=r(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};
304
+ q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,p;return F(function(n){if(1==n.g)return e=Hb,u(n,d.K,2);d.F=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={Ea:f.Ea},h=g.next())if(f.Ea=h.value,k=a.get(f.Ea),l=wd(k.mimeType,k.codecs),f.Ea==e.ea)$i(d,l,c);else{!b&&bc(l)||!qd(l,f.Ea)||(d.s[f.Ea]=new pd(l),l=td(f.Ea,l));m=l+d.I.sourceBufferExtraFeatures;vf(d.G);p=void 0;try{p=d.j.addSourceBuffer(m)}catch(t){throw new M(2,3,3015,t,"The mediaSource_ status was"+d.j.readyState+"expected 'open'");
305
+ }d.C.o(p,"error",function(t){return function(){d.i[t.Ea][0].p.reject(new M(2,3,3014,d.l.error?d.l.error.code:0))}}(f));d.C.o(p,"updateend",function(t){return function(){return aj(d,t.Ea)}}(f));d.h[f.Ea]=p;d.M[f.Ea]=l;d.i[f.Ea]=[];d.P[f.Ea]=!!k.drmInfos.length}B(n)})};q.configure=function(a){this.I=a};
306
+ function $i(a,b,c){a.g||(a.g=new Bd(a.m));var d=a.g;a=a.J;"application/cea-608"==b||"application/cea-708"==b?d.i=null:(d.i=(0,Dd[b])(),d.i.setSequenceMode?d.i.setSequenceMode(c):Ua('Text parsers should have a "setSequenceMode" method!'),d.C=a)}function bj(a){return a.j?"ended"==a.j.readyState:!0}function cj(a,b){return b==Gb?a.g.g:Di(dj(a,b))}function ej(a,b){return b==Gb?a.g.h:Ei(dj(a,b))}function fj(a,b,c){if(b==Gb)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=dj(a,b);return Gi(a,c)}
307
+ q.ib=function(){var a={total:Hi(this.l.buffered),audio:Hi(dj(this,"audio")),video:Hi(dj(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 dj(a,b){try{return a.h[b].buffered}catch(c){return null}}
308
+ function gj(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K,Q,V,U,ia;return F(function(O){switch(O.g){case 1:h=Hb;if(b!=h.ea){O.D(2);break}if(!a.F){O.D(3);break}return u(O,a.X,4);case 4:k=O.h,a.g.B=k;case 3:return u(O,Ed(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return O.return();case 2:l=Fc(c);m=a.M[b];a.s[b]&&(m=a.s[b].s);0>Oi(l)?hj.includes(m)&&(v=Mi(l),v.length&&d&&(y={cueTime:d.startTime,data:l,frames:v,dts:d.startTime,pts:d.startTime},
309
+ a.V([y],0,d.endTime))):(p=(new Ni).parse(l),n=d.startTime-(p.getStartTime()[b]||0),t=Qi(p),t.length&&a.V(t,n,d?d.endTime:null));if(!a.s[b]){e&&b==h.Ma&&(a.g||$i(a,"application/cea-608",a.F),a.B||(a.B=new wi(m)),d?(w=xi(a.B,c),w.length&&(x=a.h[h.Ma].timestampOffset,Jd(a.g,w,d.startTime,d.endTime,x))):a.B.init(c));O.D(6);break}f&&a.s[b].g.resetCaptions();return u(O,ud(a.s[b],c),7);case 7:C=O.h,a.g||$i(a,"application/cea-608",a.F),C.captions&&C.captions.length&&(z=a.h[h.Ma].timestampOffset,A=Hd(C.captions),
310
+ Jd(a.g,A,d?d.startTime:null,d?d.endTime:null,z)),c=C.data;case 6:c=ij(a,c,d?d.startTime:null,b);E=a.h[b];G=jj;if(!a.F||E.mode==G||!d){O.D(8);break}H=a.j.duration;J=b==h.Ma||!(h.Ma in a.h);if(!J){O.D(9);break}K=[E.appendWindowStart,E.appendWindowEnd];E.appendWindowStart=0;E.appendWindowEnd=Infinity;Q=E.timestampOffset;E.timestampOffset=0;return u(O,kj(a,b,function(){return lj(a,b,c)}),10);case 10:return u(O,kj(a,b,function(){return mj(a,b)}),11);case 11:return E.timestampOffset=Q,E.appendWindowStart=
311
+ K[0],E.appendWindowEnd=K[1],V=Di(dj(a,b)),U=(d.startTime||0)-(V||0),a.X.resolve(U),u(O,kj(a,b,function(){return nj(a,b,0,H)}),12);case 12:if(b!=h.Ma){O.D(9);break}return u(O,kj(a,b,function(){a.l.currentTime-=.001;aj(a,b)}),9);case 9:return E.mode=G,u(O,a.Sa(H),8);case 8:return d&&a.F&&b!=h.ea&&(f||g)&&(ia=d.startTime,kj(a,b,function(){return mj(a,b)}),kj(a,b,function(){return oj(a,b,ia)})),u(O,kj(a,b,function(){lj(a,b,c)}),16);case 16:B(O)}})}function pj(a,b){var c=ej(a,"video")||0;Gd(a.g,b,c)}
312
+ function qj(a){a.g&&Gd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return F(function(f){e=Hb;return a==e.ea?u(f,d.g.remove(b,c),0):u(f,kj(d,a,function(){return nj(d,a,b,c)}),0)})};function rj(a,b){var c;return F(function(d){c=Hb;return b==c.ea?a.g?u(d,a.g.remove(0,Infinity),0):d.return():u(d,kj(a,b,function(){return nj(a,b,0,a.j.duration)}),0)})}q.flush=function(a){var b=this,c;return F(function(d){c=Hb;return a==c.ea?d.return():u(d,kj(b,a,function(){b.l.currentTime-=.001;aj(b,a)}),0)})};
313
+ function sj(a,b,c,d,e,f){var g;return F(function(h){g=Hb;return b==g.ea?(f||(a.g.B=c),Fd(a.g,d,e),h.return()):u(h,Promise.all([kj(a,b,function(){return mj(a,b)}),f?Promise.resolve():kj(a,b,function(){return oj(a,b,c)}),kj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;aj(a,b)})]),0)})}
314
+ function tj(a,b,c){var d;return F(function(e){d=Hb;if(b==d.ea)return e.return();kj(a,b,function(){return mj(a,b)});return u(e,kj(a,b,function(){return oj(a,b,c)}),0)})}q.endOfStream=function(a){var b=this;return F(function(c){return u(c,uj(b,function(){bj(b)||"closed"===b.j.readyState||(a?b.j.endOfStream(a):b.j.endOfStream())}),0)})};
315
+ q.Sa=function(a){var b=this;return F(function(c){return u(c,uj(b,function(){if(a<b.j.duration)for(var d in b.h){var e={start:function(){},p:new Jc};b.i[d].unshift(e)}b.j.duration=a}),0)})};q.getDuration=function(){return this.j.duration};function lj(a,b,c){if("video"==b&&a.H){var d=a.H;d.g&&d.g.appendBuffer(c,"video",d.i)}a.h[b].appendBuffer(c)}function nj(a,b,c,d){d<=c?aj(a,b):a.h[b].remove(c,d)}
316
+ function mj(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;aj(a,b)}function oj(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;aj(a,b)}function aj(a,b){var c=a.i[b][0];c&&(c.p.resolve(),vj(a,b))}function kj(a,b,c){vf(a.G);c={start:c,p:new Jc};a.i[b].push(c);1==a.i[b].length&&wj(a,b);return c.p}
317
+ function uj(a,b){var c,d,e,f,g,h;return F(function(k){switch(k.g){case 1:vf(a.G);c=[];d={};for(e in a.h)d.zc=new Jc,f={start:function(l){return function(){return l.zc.resolve()}}(d),p:d.zc},a.i[e].push(f),c.push(d.zc),1==a.i[e].length&&f.start(),d={zc:d.zc};D(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=wa(k),g;case 3:try{b()}catch(l){throw new M(2,3,3015,l);}finally{for(h in a.h)vj(a,h)}B(k)}})}function vj(a,b){a.i[b].shift();wj(a,b)}
318
+ function wj(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new M(2,3,3017,b)):c.p.reject(new M(2,3,3015,d)),vj(a,b)}}function ij(a,b,c,d){var e=a.P[d];null==c&&e&&(Sc()||Qc())&&"mp4"==a.M[d].split(";")[0].split("/")[1]&&(b=eh(b));return b}var Zi=window.URL.createObjectURL,jj="sequence",hj=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function P(a,b,c){this.i=a;this.m=b;this.s=this.j=Infinity;this.g=1;this.h=this.l=null;this.B=0;this.C=!0;this.F=0;this.G=void 0===c?!0:c;this.H=0;this.I=!1}q=P.prototype;q.getDuration=function(){return this.j};q.Rg=function(){return this.g};q.$f=function(a){this.i=a};q.Sa=function(a){this.j=a};q.Vg=function(){return this.i};q.Wf=function(a){this.B=a};q.bd=function(a){this.C=a};q.Ue=function(a){this.s=a};q.Xf=function(a){this.m=a};q.Ig=function(){return this.m};
319
+ q.mc=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.B)/1E3;a=r(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.De(b);this.h=Math.max(this.h,c);null!=this.i&&this.G&&!this.I&&(this.i=d-this.h-this.g)}};q.ye=function(){this.I=!0};q.De=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.Ce=function(a){this.g=Math.max(this.g,a)};
320
+ q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.S=function(){return Infinity==this.j&&!this.C};q.Lb=function(){return Infinity!=this.j&&!this.C};q.kb=function(){return Math.max(this.F,this.Ib()-this.s)};q.cg=function(a){this.F=a};q.Ib=function(){return this.S()||this.Lb()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j};
321
+ q.Jc=function(a){var b=Math.max(this.l,this.F);return Infinity==this.s?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Ib()-this.s+a,this.jb()))};q.ec=function(){return this.Jc(0)};q.jb=function(){return Math.max(0,this.Ib()-(this.S()||this.Lb()?this.m:0))};q.gg=function(){return null==this.i||null!=this.h&&this.G?!1:!0};q.Vf=function(a){this.H=a};I("shaka.media.PresentationTimeline",P);P.prototype.setAvailabilityTimeOffset=P.prototype.Vf;P.prototype.usingPresentationStartTime=P.prototype.gg;
322
+ P.prototype.getSeekRangeEnd=P.prototype.jb;P.prototype.getSeekRangeStart=P.prototype.ec;P.prototype.getSafeSeekRangeStart=P.prototype.Jc;P.prototype.getSegmentAvailabilityEnd=P.prototype.Ib;P.prototype.setUserSeekStart=P.prototype.cg;P.prototype.getSegmentAvailabilityStart=P.prototype.kb;P.prototype.isInProgress=P.prototype.Lb;P.prototype.isLive=P.prototype.S;P.prototype.offset=P.prototype.offset;P.prototype.notifyMaxSegmentDuration=P.prototype.Ce;P.prototype.notifyMinSegmentStartTime=P.prototype.De;
323
+ P.prototype.lockStartTime=P.prototype.ye;P.prototype.notifySegments=P.prototype.mc;P.prototype.getDelay=P.prototype.Ig;P.prototype.setDelay=P.prototype.Xf;P.prototype.setSegmentAvailabilityDuration=P.prototype.Ue;P.prototype.setStatic=P.prototype.bd;P.prototype.setClockOffset=P.prototype.Wf;P.prototype.getPresentationStartTime=P.prototype.Vg;P.prototype.setDuration=P.prototype.Sa;P.prototype.setPresentationStartTime=P.prototype.$f;P.prototype.getMaxSegmentDuration=P.prototype.Rg;
324
+ P.prototype.getDuration=P.prototype.getDuration;function xj(a,b,c){this.l=c;this.j=a;this.B=yj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.C=b;this.i=function(){}}xj.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function zj(a,b){a.i=b}function Aj(a){this.g=a}function yj(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(Hi(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 Bj(a,b,c,d,e){var f=this;this.B=e;this.g=a;this.C=b;this.H=c;this.l=new wf;this.j=!1;this.G=a.readyState;this.F=this.i=0;this.h=d;this.s=!1;this.l.o(a,"waiting",function(){return Cj(f)});this.m=(new N(function(){Cj(f)})).ka(.25)}Bj.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.C=this.B=null};Bj.prototype.Fe=function(){this.s=!0;Cj(this)};
325
+ function Cj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.G&&(a.G=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=yj(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.B!=d)b.m=f,b.g=e,b.B=d,b.h=!1;e=f-b.m;if(d=e>=b.C&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.s++,b.l(new L("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Ii(c,b,a.H.gapDetectionThreshold),null==
326
+ d||0==d&&!a.s||(e=c.start(d),e>=a.C.jb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.F++,a.B(new L("gapjumped")))))}}};function Dj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ej.value().get(b),c.ya(a,b,d))}var Ej=new Kc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Fj(a,b,c,d){var e=this;this.g=a;this.l=b;this.s=c;this.j=d;this.m=!1;this.h=new wf;this.i=new Gj(a);Dj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Hj(e,e.j)})}Fj.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 Ij(a){return a.m?a.g.currentTime:a.j}function Jj(a,b){0<a.g.readyState?Kj(a.i,b):Dj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Hj(a,a.j)})}
327
+ function Hj(a,b){.001>Math.abs(a.g.currentTime-b)?Lj(a):(a.h.ya(a.g,"seeking",function(){Lj(a)}),Kj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Lj(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()});a.s(a.g.currentTime)}function Gj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new N(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Gj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
328
+ function Kj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ka(.1)};function Mj(a){this.g=a;this.j=!1;this.h=null;this.i=new wf}q=Mj.prototype;q.je=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ya(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Dj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.ke=function(a){this.h=this.j?this.h:a};q.ld=function(){return(this.j?this.g.currentTime:this.h)||0};q.qf=function(){return 0};
329
+ q.pf=function(){return 0};q.Rf=function(){};
330
+ function Nj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.C=e;this.B=null;this.s=Oj(a,c,f);this.j=new Bj(a,b.presentationTimeline,c,this.s,f);this.h=new Fj(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=Ij(g.h);h=Pj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;Jj(g.h,h);h=void 0;break a}g.C();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},Qj(this,d));this.m=new N(function(){if(0!=g.i.readyState&&
331
+ !g.i.paused){var h=Ij(g.h),k=g.g.ec(),l=g.g.jb();3>l-k&&(k=l-3);h<k&&(h=Pj(g,h),g.i.currentTime=h)}})}q=Nj.prototype;q.je=function(){this.m.ka(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.C=function(){}};q.ke=function(a){Jj(this.h,a)};q.ld=function(){var a=Ij(this.h);return 0<this.i.readyState&&!this.i.paused?Rj(this,a):a};q.qf=function(){return this.s?this.s.s:0};
332
+ q.pf=function(){return this.j.F};function Qj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.ec():a.g.jb():0>b&&(b=a.g.jb()+b);return Sj(a,Rj(a,b))}q.Rf=function(){this.j.Fe()};function Sj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
333
+ function Pj(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.ec(),f=a.g.jb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Jc(c),k=a.g.Jc(d);c=a.g.Jc(c+d);return b>=g?Sj(a,b):b>f?f:b<e?Fi(a.i.buffered,k)?k:c:b>=h||Fi(a.i.buffered,b)?b:c}function Rj(a,b){var c=a.g.ec();if(b<c)return c;a=a.g.jb();return b>a?a:b}
334
+ function Oj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new xj(new Aj(a),b.stallThreshold,c);zj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Tj(a){this.g=a;this.h=null;this.i=0;this.j=!1}q=Tj.prototype;q.release=function(){this.j||(this.g=[],this.h&&this.h.stop(),this.h=null)};q.nh=function(){this.j=!0};function Uj(a,b){a=r(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};
333
335
  q.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.j)for(var b=r(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};q.Tc=function(a){if(!this.j&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,ha(a))}};
334
336
  q.lc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Tc(a);this.Gb(b)};q.Gb=function(a){if(!this.j){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
335
- q.xb=function(a,b,c){c=void 0===c?!1:c;if(!this.j){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new yi(a.startTime,b,a.F,a.Ta,a.Ca,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.i,a.tilesLayout,a.B,a.g,a.status,a.m),this.g[this.g.length-1].j=a.j)}};
336
- q.Od=function(a,b){var c=this;this.j||(this.h&&this.h.stop(),this.h=new N(function(){var d=b();d?c.g.push.apply(c.g,ha(d)):(c.h.stop(),c.h=null)}),this.h.ka(a))};Rj.prototype[Symbol.iterator]=function(){return this.cc(0)};Rj.prototype.cc=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.i.length)for(var e=c.i.length-1;0<=e;--e){var f=c.i[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Tj(this,b,d)};
337
- function Uj(a,b,c){return new Rj([new yi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}I("shaka.media.SegmentIndex",Rj);Rj.forSingleSegment=Uj;Rj.prototype.getIteratorForTime=Rj.prototype.cc;Rj.prototype.updateEvery=Rj.prototype.Od;Rj.prototype.fit=Rj.prototype.xb;Rj.prototype.evict=Rj.prototype.Gb;Rj.prototype.mergeAndEvict=Rj.prototype.lc;Rj.prototype.offset=Rj.prototype.offset;Rj.prototype.get=Rj.prototype.get;Rj.prototype.find=Rj.prototype.find;Rj.prototype.markImmutable=Rj.prototype.nh;
338
- Rj.prototype.release=Rj.prototype.release;function Tj(a,b,c){this.i=a;this.g=b;this.h=c}Tj.prototype.vg=function(){return this.g};Tj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.i.length&&a.Pa().length&&this.h>=a.i.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.i.length?a.i[this.h]:a};
339
- Tj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.i.length?(this.h++,a.Pa().length&&this.h==a.i.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};I("shaka.media.SegmentIterator",Tj);Tj.prototype.next=Tj.prototype.next;Tj.prototype.current=Tj.prototype.current;Tj.prototype.currentPosition=Tj.prototype.vg;function Vj(){Rj.call(this,[]);this.l=[]}pa(Vj,Rj);q=Vj.prototype;q.clone=function(){var a=new Vj;a.l=this.l.slice();return a};
340
- q.release=function(){for(var a=r(this.l),b=a.next();!b.done;b=a.next())b.value.release();this.l=[]};q.find=function(a){for(var b=0,c=r(this.l),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.i+d.g.length}return null};q.get=function(a){for(var b=0,c=r(this.l),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.i+d.g.length}return null};q.offset=function(){};q.Tc=function(){};q.Gb=function(){};q.lc=function(){};q.xb=function(){};q.Od=function(){};
341
- I("shaka.media.MetaSegmentIndex",Vj);Vj.prototype.updateEvery=Vj.prototype.Od;Vj.prototype.fit=Vj.prototype.xb;Vj.prototype.mergeAndEvict=Vj.prototype.lc;Vj.prototype.evict=Vj.prototype.Gb;Vj.prototype.merge=Vj.prototype.Tc;Vj.prototype.offset=Vj.prototype.offset;Vj.prototype.get=Vj.prototype.get;Vj.prototype.find=Vj.prototype.find;Vj.prototype.release=Vj.prototype.release;function Wj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.xd();this.h=new N(function(){b.g.Qf(.25*b.i)})}Wj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Wj.prototype.set=function(a){this.i=a;Xj(this)};Wj.prototype.ud=function(){return this.g.ud()};function Xj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.xd()!=b&&a.g.Qe(b);return}catch(c){}a.h.ka(.25);0!=a.g.xd()&&a.g.Qe(0)};function Yj(a){var b=this;this.h=a;this.g=new Set;this.i=(new N(function(){Zj(b,!1)})).ka(.25)}Yj.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 Zj(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function ak(a){db.call(this);this.g=new Map;this.h=a}pa(ak,db);ak.prototype.release=function(){this.g.clear();db.prototype.release.call(this)};function bk(a,b){var c=a.g.get(b);c||(c={Vc:[],Bf:null,contentType:b},a.g.set(b,c));return c}function ck(a,b,c){var d=bk(a,b.contentType);dk(a,d);a={xe:b,position:c};d=d.Vc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
342
- ak.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.Vc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.xe;break a}}d=null}if(e=d)e=c.Bf,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);
343
- 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.Bf=d,JSON.stringify(d),c=new L("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function dk(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Vc;b.Vc=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.Vc=[]};function ek(a){db.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new N(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 L("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ka(2)}pa(ek,db);ek.prototype.release=function(){this.g.clear();this.h.stop();db.prototype.release.call(this)};function fk(a){db.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Wb:null,Vb:gk,Kb:function(c,d){return hk(b,"enter",c,d)}},{Wb:ik,Vb:gk,Kb:function(c,d){return hk(b,"enter",c,d)}},{Wb:jk,Vb:gk,Kb:function(c,d){return hk(b,"enter",c,d)}},{Wb:gk,Vb:ik,Kb:function(c,d){return hk(b,"exit",c,d)}},{Wb:gk,Vb:jk,Kb:function(c,d){return hk(b,"exit",c,d)}},{Wb:ik,Vb:jk,Kb:function(c,d){return hk(b,"skip",c,d)}},{Wb:jk,Vb:ik,Kb:function(c,d){return hk(b,"skip",c,d)}}];this.h=new wf;this.h.o(this.i,"regionremove",
344
- function(c){b.g.delete(c.region)})}pa(fk,db);fk.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;db.prototype.release.call(this)};fk.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?ik:a>d.endTime?jk:gk;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Wb==e&&h.Vb==f&&h.Kb(d,b)}};
345
- function hk(a,b,c,d){b=new L(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var ik=1,gk=2,jk=3;function kk(a,b,c,d,e){a=nf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function lk(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.C=1;this.s=this.l=null;this.H=0;this.G=!1;this.j=new Map;this.F=!1;this.I=null;this.B=!1;this.h=new uf(function(){return mk(c)})}q=lk.prototype;q.destroy=function(){return this.h.destroy()};function mk(a){var b,c,d,e;return G(function(f){if(1==f.g){b=[];c=r(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,nk(e),b.push(ok(e));return u(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.i=null;B(f)})}
346
- q.configure=function(a){this.i=a;this.I=new Ve({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)};q.start=function(){var a=this;return G(function(b){if(1==b.g)return u(b,pk(a),2);vf(a.h);a.F=!0;B(b)})};
347
- function qk(a,b){var c,d,e,f,g,h,k;G(function(l){switch(l.g){case 1:return c=Hb,a.H++,d=a.H,D(l,2),u(l,pj(a.g.S,c.ea),4);case 4:va(l,3);break;case 2:if(e=wa(l),a.g)a.g.onError(e);case 3:f=wd(b.mimeType,b.codecs),Yi(a.g.S,f,a.m.sequenceMode),g=a.g.S.m,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.H==d&&(k=rk(b),a.j.set(c.ea,k),sk(a,k,0)),B(l)}})}function tk(a){var b=a.j.get(Gb);b&&(nk(b),ok(b).catch(function(){}),a.j.delete(Gb));a.s=null}
348
- function uk(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.Tb&&(vk(a,b,!1,0,!1),c.Tb=d);else if(d=c.Tb)c.Tb=null,vk(a,d,!0,0,!1)}}function wk(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.F&&(b.video&&vk(a,b.video,c,d,e,f),b.audio&&vk(a,b.audio,c,d,e,f))}function xk(a,b){G(function(c){if(1==c.g)return a.s=b,a.F?b.segmentIndex?c.D(2):u(c,b.createSegmentIndex(),2):c.return();vk(a,b,!0,0,!1);B(c)})}
349
- function vk(a,b,c,d,e,f){var g=a.j.get(b.type);g||b.type!=Gb?g&&(g.Tb&&(b.trickModeVideo?(g.Tb=b,b=b.trickModeVideo):g.Tb=null),g.stream!=b||e)&&(b.type==Gb&&Yi(a.g.S,wd(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ia=null,g.qf=!!f,c&&(g.Dc?g.Qd=!0:g.Ia?(g.Eb=!0,g.rd=d,g.Qd=!0):(nk(g),yk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),zk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):qk(a,b)}
350
- function zk(a,b){var c,d;return G(function(e){if(1==e.g){if(!b.Ka)return e.return();c=b.stream;d=b.Ka;return c.segmentIndex?e.D(2):u(e,c.createSegmentIndex(),2)}if(b.Ka!=d||b.stream!=c)return e.return();var f=a.g.wd();var g=cj(a.g.S,b.type),h=b.stream.segmentIndex.find(b.Ga?b.Ga.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Ca?k.Ca-k.Ta:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.Ca?k.Ca-k.Ta:null)||0),k=a.g.getBandwidthEstimate(),
337
+ q.xb=function(a,b,c){c=void 0===c?!1:c;if(!this.j){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new Ai(a.startTime,b,a.F,a.Ta,a.Ca,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.i,a.tilesLayout,a.B,a.g,a.status,a.m),this.g[this.g.length-1].j=a.j)}};
338
+ q.Pd=function(a,b){var c=this;this.j||(this.h&&this.h.stop(),this.h=new N(function(){var d=b();d?c.g.push.apply(c.g,ha(d)):(c.h.stop(),c.h=null)}),this.h.ka(a))};Tj.prototype[Symbol.iterator]=function(){return this.cc(0)};Tj.prototype.cc=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.i.length)for(var e=c.i.length-1;0<=e;--e){var f=c.i[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Vj(this,b,d)};
339
+ function Wj(a,b,c){return new Tj([new Ai(a,a+b,function(){return c},0,null,null,a,a,a+b)])}I("shaka.media.SegmentIndex",Tj);Tj.forSingleSegment=Wj;Tj.prototype.getIteratorForTime=Tj.prototype.cc;Tj.prototype.updateEvery=Tj.prototype.Pd;Tj.prototype.fit=Tj.prototype.xb;Tj.prototype.evict=Tj.prototype.Gb;Tj.prototype.mergeAndEvict=Tj.prototype.lc;Tj.prototype.offset=Tj.prototype.offset;Tj.prototype.get=Tj.prototype.get;Tj.prototype.find=Tj.prototype.find;Tj.prototype.markImmutable=Tj.prototype.nh;
340
+ Tj.prototype.release=Tj.prototype.release;function Vj(a,b,c){this.i=a;this.g=b;this.h=c}Vj.prototype.vg=function(){return this.g};Vj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.i.length&&a.Pa().length&&this.h>=a.i.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.i.length?a.i[this.h]:a};
341
+ Vj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.i.length?(this.h++,a.Pa().length&&this.h==a.i.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};I("shaka.media.SegmentIterator",Vj);Vj.prototype.next=Vj.prototype.next;Vj.prototype.current=Vj.prototype.current;Vj.prototype.currentPosition=Vj.prototype.vg;function Xj(){Tj.call(this,[]);this.l=[]}pa(Xj,Tj);q=Xj.prototype;q.clone=function(){var a=new Xj;a.l=this.l.slice();return a};
342
+ q.release=function(){for(var a=r(this.l),b=a.next();!b.done;b=a.next())b.value.release();this.l=[]};q.find=function(a){for(var b=0,c=r(this.l),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.i+d.g.length}return null};q.get=function(a){for(var b=0,c=r(this.l),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.i+d.g.length}return null};q.offset=function(){};q.Tc=function(){};q.Gb=function(){};q.lc=function(){};q.xb=function(){};q.Pd=function(){};
343
+ I("shaka.media.MetaSegmentIndex",Xj);Xj.prototype.updateEvery=Xj.prototype.Pd;Xj.prototype.fit=Xj.prototype.xb;Xj.prototype.mergeAndEvict=Xj.prototype.lc;Xj.prototype.evict=Xj.prototype.Gb;Xj.prototype.merge=Xj.prototype.Tc;Xj.prototype.offset=Xj.prototype.offset;Xj.prototype.get=Xj.prototype.get;Xj.prototype.find=Xj.prototype.find;Xj.prototype.release=Xj.prototype.release;function Yj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.xd();this.h=new N(function(){b.g.Qf(.25*b.i)})}Yj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Yj.prototype.set=function(a){this.i=a;Zj(this)};Yj.prototype.ud=function(){return this.g.ud()};function Zj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.xd()!=b&&a.g.Se(b);return}catch(c){}a.h.ka(.25);0!=a.g.xd()&&a.g.Se(0)};function ak(a){var b=this;this.h=a;this.g=new Set;this.i=(new N(function(){bk(b,!1)})).ka(.25)}ak.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 bk(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function ck(a){db.call(this);this.g=new Map;this.h=a}pa(ck,db);ck.prototype.release=function(){this.g.clear();db.prototype.release.call(this)};function dk(a,b){var c=a.g.get(b);c||(c={Vc:[],Cf:null,contentType:b},a.g.set(b,c));return c}function ek(a,b,c){var d=dk(a,b.contentType);fk(a,d);a={ze:b,position:c};d=d.Vc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
344
+ ck.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.Vc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.ze;break a}}d=null}if(e=d)e=c.Cf,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);
345
+ 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.Cf=d,JSON.stringify(d),c=new L("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function fk(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Vc;b.Vc=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.Vc=[]};function gk(a){db.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new N(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 L("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ka(2)}pa(gk,db);gk.prototype.release=function(){this.g.clear();this.h.stop();db.prototype.release.call(this)};function hk(a,b){db.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Wb:null,Vb:ik,Kb:function(d,e){return jk(c,"enter",d,e)}},{Wb:kk,Vb:ik,Kb:function(d,e){return jk(c,"enter",d,e)}},{Wb:lk,Vb:ik,Kb:function(d,e){return jk(c,"enter",d,e)}},{Wb:ik,Vb:kk,Kb:function(d,e){return jk(c,"exit",d,e)}},{Wb:ik,Vb:lk,Kb:function(d,e){return jk(c,"exit",d,e)}},{Wb:kk,Vb:lk,Kb:function(d,e){return jk(c,"skip",d,e)}},{Wb:lk,Vb:kk,Kb:function(d,e){return jk(c,"skip",d,e)}}];this.h=new wf;this.h.o(this.i,
346
+ "regionremove",function(d){c.g.delete(d.region)})}pa(hk,db);hk.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;db.prototype.release.call(this)};hk.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;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?kk:a>d.endTime?lk:ik;this.g.set(d,f);for(var g=r(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Wb==e&&h.Vb==f&&h.Kb(d,b)}}};
347
+ function jk(a,b,c,d){b=new L(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var kk=1,ik=2,lk=3;function mk(a,b,c,d,e){a=nf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function nk(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.C=1;this.s=this.l=null;this.H=0;this.G=!1;this.j=new Map;this.F=!1;this.I=null;this.B=!1;this.h=new uf(function(){return ok(c)})}q=nk.prototype;q.destroy=function(){return this.h.destroy()};function ok(a){var b,c,d,e;return F(function(f){if(1==f.g){b=[];c=r(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,pk(e),b.push(qk(e));return u(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.i=null;B(f)})}
348
+ q.configure=function(a){this.i=a;this.I=new Ve({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)};q.start=function(){var a=this;return F(function(b){if(1==b.g)return u(b,rk(a),2);vf(a.h);a.F=!0;B(b)})};
349
+ function sk(a,b){var c,d,e,f,g,h,k;F(function(l){switch(l.g){case 1:return c=Hb,a.H++,d=a.H,D(l,2),u(l,rj(a.g.T,c.ea),4);case 4:va(l,3);break;case 2:if(e=wa(l),a.g)a.g.onError(e);case 3:f=wd(b.mimeType,b.codecs),$i(a.g.T,f,a.m.sequenceMode),g=a.g.T.m,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.H==d&&(k=tk(b),a.j.set(c.ea,k),uk(a,k,0)),B(l)}})}function vk(a){var b=a.j.get(Gb);b&&(pk(b),qk(b).catch(function(){}),a.j.delete(Gb));a.s=null}
350
+ function wk(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.Tb&&(xk(a,b,!1,0,!1),c.Tb=d);else if(d=c.Tb)c.Tb=null,xk(a,d,!0,0,!1)}}function yk(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.F&&(b.video&&xk(a,b.video,c,d,e,f),b.audio&&xk(a,b.audio,c,d,e,f))}function zk(a,b){F(function(c){if(1==c.g)return a.s=b,a.F?b.segmentIndex?c.D(2):u(c,b.createSegmentIndex(),2):c.return();xk(a,b,!0,0,!1);B(c)})}
351
+ function xk(a,b,c,d,e,f){var g=a.j.get(b.type);g||b.type!=Gb?g&&(g.Tb&&(b.trickModeVideo?(g.Tb=b,b=b.trickModeVideo):g.Tb=null),g.stream!=b||e)&&(b.type==Gb&&$i(a.g.T,wd(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ia=null,g.rf=!!f,c&&(g.Dc?g.Rd=!0:g.Ia?(g.Eb=!0,g.rd=d,g.Rd=!0):(pk(g),Ak(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Bk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):sk(a,b)}
352
+ function Bk(a,b){var c,d;return F(function(e){if(1==e.g){if(!b.Ka)return e.return();c=b.stream;d=b.Ka;return c.segmentIndex?e.D(2):u(e,c.createSegmentIndex(),2)}if(b.Ka!=d||b.stream!=c)return e.return();var f=a.g.wd();var g=ej(a.g.T,b.type),h=b.stream.segmentIndex.find(b.Ga?b.Ga.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Ca?k.Ca-k.Ta:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.Ca?k.Ca-k.Ta:null)||0),k=a.g.getBandwidthEstimate(),
351
353
  f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.Ka.h.g>h?!0:!1):f=!1;f&&b.Ka.abort();B(e)})}
352
- q.Yc=function(){if(this.g)for(var a=this.g.wd(),b=r(this.j.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.j.get(d);var e=null;c.ia&&(e=c.ia.current());if(!e||e.startTime>a||e.endTime<a)c.ia=null;e=this.g.S;d==Gb?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=bj(e,d),e=Di(e,a));if(!e){(null!=cj(this.g.S,d)||c.Ia)&&Ak(this,c);c.Ka&&(c.Ka.abort(),c.Ka=null);if(d===Gb&&(d=this.g.S,d.B))for(d=d.B.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,fi(d),d=r(d.j.values()),e=d.next();!e.done;e=
353
- d.next())ai(e.value);c.Yc=!0}}};function Ak(a,b){b.Dc||b.Eb||(b.Ia?(b.Eb=!0,b.rd=0):null==aj(a.g.S,b.type)?null==b.eb&&sk(a,b,0):(nk(b),yk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
354
- function pk(a){var b,c,d,e,f,g,h,k,l,m;return G(function(p){if(1==p.g){b=Hb;if(!a.l)throw new M(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.kd,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Ma,a.l.video),d.add(a.l.video));a.s&&(c.set(b.ea,a.s),d.add(a.s));e=a.g.S;f=a.i.forceTransmux;return u(p,e.init(c,f,a.m.sequenceMode),2)}vf(a.h);a.updateDuration();g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||(m=rk(l),a.j.set(k,m),sk(a,m,0));B(p)})}
355
- function rk(a){return{stream:a,type:a.type,ia:null,Ga:null,zd:null,ue:null,se:null,re:null,Tb:null,endOfStream:!1,Ia:!1,eb:null,Eb:!1,rd:0,Qd:!1,Dc:!1,Yc:!0,ze:!1,Fe:!1,Nc:!1,Ka:null}}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.S.Sa(a):this.g.S.Sa(Math.pow(2,32))};
356
- function Bk(a,b){var c,d,e,f,g;return G(function(h){switch(h.g){case 1:vf(a.h);if(b.Ia||null==b.eb||b.Dc)return h.return();b.eb=null;if(!b.Eb){h.D(2);break}return u(h,yk(a,b,b.Qd,b.rd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ia||b.eb||sk(a,b,0),h.return();case 4:D(h,6);d=Ck(a,b);null!=d&&(sk(a,b,d),b.Nc=!1);va(h,7);break;case 6:return e=
357
- wa(h),u(h,Dk(a,e),8);case 8:return h.return();case 7:f=Array.from(a.j.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return u(h,a.g.S.endOfStream(),10);case 10:vf(a.h),g=a.g.S.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Sa(g),B(h)}})}
358
- function Ck(a,b){if(Ek(b))return nj(a.g.S,b.stream.originalId||""),null;b.type==Gb&&oj(a.g.S);var c=a.g.wd(),d=b.Ga?b.Ga.endTime:c,e=dj(a.g.S,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=cj(a.g.S,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.j.get(Gb))&&Ek(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=Fk(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;
359
- f=Infinity;g=Array.from(a.j.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,Ek(h)||h.ia&&!h.ia.current()||(f=Math.min(f,h.Ga?h.Ga.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;Gk(a,b,c,e).catch(function(){});return null}
360
- function Fk(a,b,c,d){if(b.ia)return b.ia.current();if(b.Ga||d)return c=b.Ga?b.Ga.endTime:d,b.ze=!0,b.ia=b.stream.segmentIndex.cc(c),b.ia&&b.ia.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ia=b.stream.segmentIndex.cc(d),e=b.ia&&b.ia.next().value);e||(b.ia=b.stream.segmentIndex.cc(c),e=b.ia&&b.ia.next().value);return e}
361
- function Gk(a,b,c,d){var e,f,g,h,k,l,m,p,n,t,v,y,w,x,C;return G(function(z){switch(z.g){case 1:e=Hb;f=b.stream;g=b.ia;b.Ia=!0;D(z,2);if(2==d.fc())throw new M(1,1,1011);return u(z,Hk(a,b,d),4);case 4:vf(a.h);if(a.B)return z.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h&&!d.m)return p=new Uint8Array(0),t=n=!1,v=function(A){var E,F,H;return G(function(J){if(n)return J.return();t=!0;vf(a.h);if(a.B)return J.return();p=Ik(p,A);E=!1;F=0;(new Hf).box("mdat",
362
- function(K){F=K.size+K.start;E=!0}).parse(p,!1,!0);if(!E)return J.D(0);H=p.subarray(0,F);p=p.subarray(F);return u(J,Jk(a,b,c,f,d,H),0)})},u(z,Kk(a,b,d,v),11);l=Kk(a,b,d);return u(z,l,7);case 7:m=z.h;vf(a.h);if(a.B)return z.return();if(!d.m){z.D(8);break}return u(z,Lk(m,d,g),9);case 9:m=z.h;case 8:return vf(a.h),b.Eb?(b.Ia=!1,sk(a,b,0),z.return()):u(z,Jk(a,b,c,f,d,m),6);case 11:y=z.h;if(t){z.D(6);break}n=!0;vf(a.h);return a.B?z.return():b.Eb?(b.Ia=!1,sk(a,b,0),z.return()):u(z,Jk(a,b,c,f,d,y),6);case 6:vf(a.h);
363
- if(a.B)return z.return();b.Ga=d;g.next();b.Ia=!1;b.Fe=!1;w=a.g.S.ib();x=w[b.type];$a(JSON.stringify(x));b.Eb||a.g.De(d.startTime,d.endTime,b.type);sk(a,b,0);va(z,0);break;case 2:C=wa(z);vf(a.h,C);if(a.B)return z.return();b.Ia=!1;if(7001==C.code)b.Ia=!1,nk(b),sk(a,b,0),z.D(0);else if(b.type==e.ea&&a.i.ignoreTextStreamFailures)a.j.delete(e.ea),z.D(0);else if(3017==C.code)Mk(a,b,C),z.D(0);else return b.Nc=!0,C.severity=2,u(z,Dk(a,C),0)}})}
364
- function Lk(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g)return d=b.m,d.cryptoKey?h.D(2):u(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=Fc(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c.g,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function Ik(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
365
- function Mk(a,b,c){if(!Array.from(a.j.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.Nc=!0;a.B=!0;a.g.onError(c);return}b.Fe=!0}sk(a,b,4)}
366
- function Hk(a,b,c){var d,e,f,g,h,k,l,m;return G(function(p){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.ue||e!=b.se||f!=b.re)h=function(){var n;return G(function(t){if(1==t.g)return D(t,2),b.se=e,b.re=f,b.ue=g,u(t,qj(a.g.S,b.type,g,e,f,a.m.sequenceMode),4);if(2!=t.g)return va(t,0);n=wa(t);b.se=null;b.re=null;b.ue=null;throw n;})},d.push(h());!xi(c.h,b.zd)&&(b.zd=c.h)&&(k=Kk(a,b,c.h),l=function(){var n,t,v,y;return G(function(w){switch(w.g){case 1:return D(w,
367
- 2),u(w,k,4);case 4:return n=w.h,vf(a.h),t=new Hf,t.box("moov",Mf).box("trak",Mf).box("mdia",Mf).T("mdhd",function(x){x=ni(x.reader||0,x.version||0);c.h.timescale=x.timescale}).parse(n),v=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(w,a.g.uf(b.type,n),5);case 5:return u(w,ej(a.g.S,b.type,n,null,v),6);case 6:va(w,0);break;case 2:throw y=wa(w),b.zd=null,y;}})},a.g.qh(c.startTime,c.h),d.push(l()));m=b.Ga?b.Ga.j:null;if(a.m.sequenceMode){if(c.j!=m||b.ze)b.ze=!1,d.push(rj(a.g.S,b.type,c.startTime))}else c.j!=
368
- m&&d.push(rj(a.g.S,b.type,c.timestampOffset));return u(p,Promise.all(d),0)})}
369
- function Jk(a,b,c,d,e,f){var g,h,k,l,m,p;return G(function(n){switch(n.g){case 1:g=d.closedCaptions&&0<d.closedCaptions.size;k=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;l=a.i.parsePrftBox&&!a.G;if(k||l)h=new Hf;k&&h.T("emsg",function(t){var v=d.emsgSchemeIdUris;if(0===t.version){var y=t.reader.Wc();var w=t.reader.Wc();var x=t.reader.O();var C=t.reader.O();var z=t.reader.O();var A=t.reader.O();var E=e.startTime+C/x}else x=t.reader.O(),E=t.reader.Cb()/x+e.timestampOffset,
370
- C=E-e.startTime,z=t.reader.O(),A=t.reader.O(),y=t.reader.Wc(),w=t.reader.Wc();t=t.reader.Bb(t.reader.W.byteLength-t.reader.na());if(v&&v.includes(y)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==y?a.g.rh():"https://aomedia.org/emsg/ID3"==y?(v=Ki(t),v.length&&e&&a.g.sh([{cueTime:e.startTime,data:t,frames:v,dts:e.startTime,pts:e.startTime}],0,e.endTime)):(v=(new Map).set("detail",{startTime:E,endTime:E+z/x,schemeIdUri:y,value:w,timescale:x,presentationTimeDelta:C,eventDuration:z,id:A,messageData:t}),
371
- v=new L("emsg",v),a.g.onEvent(v))});l&&h.T("prft",function(t){a:{if(!a.G&&e.h.timescale){t.reader.O();var v=t.reader.O(),y=t.reader.O();v=1E3*v+y/Math.pow(2,32)*1E3;if(0===t.version)var w=t.reader.O();else try{w=t.reader.Cb()}catch(x){a.G=!0;w=void 0;break a}t=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+v)).getTime();w=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-w/e.h.timescale*1E3)});w=new L("prft",w);a.g.onEvent(w);a.G=!0}w=void 0}return w});(k||l)&&h.parse(f);
372
- return u(n,Nk(a,b,c),2);case 2:return vf(a.h),m=b.Yc,b.Yc=!1,p=b.qf,b.qf=!1,u(n,a.g.uf(b.type,f),3);case 3:return u(n,ej(a.g.S,b.type,f,e,g,m,p),4);case 4:vf(a.h),B(n)}})}function Nk(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=aj(a.g.S,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():u(h,a.g.S.remove(b.type,e,e+g),2)}vf(a.h);B(h)})}
373
- function Ek(a){return a&&a.type==Gb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}function Kk(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=tf,f=kk(c.Pa(),c.Ta,c.Ca,a.i.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof wi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Pb.request(e,f),b.Ka=h,u(l,h.promise,2);k=l.h;b.Ka=null;return l.return(k.data)})}
374
- function yk(a,b,c,d){var e,f;return G(function(g){if(1==g.g)return b.Eb=!1,b.Qd=!1,b.rd=0,b.Dc=!0,b.Ga=null,b.zd=null,b.ia=null,d?(e=a.g.wd(),f=a.g.S.getDuration(),u(g,a.g.S.remove(b.type,e+d,f),3)):u(g,pj(a.g.S,b.type),4);if(3!=g.g)return vf(a.h),c?u(g,a.g.S.flush(b.type),3):g.D(3);vf(a.h);b.Dc=!1;b.endOfStream=!1;b.Ia||b.eb||sk(a,b,0);B(g)})}
375
- function sk(a,b,c){var d=b.type;if(d!=Gb||a.j.has(d))b.eb=(new Lc(function(){var e;return G(function(f){if(1==f.g)return D(f,2),u(f,Bk(a,b),4);if(2!=f.g)return va(f,0);e=wa(f);if(a.g)a.g.onError(e);B(f)})})).R(c)}function nk(a){null!=a.eb&&(a.eb.stop(),a.eb=null)}function ok(a){return G(function(b){return a.Ka?u(b,a.Ka.abort(),0):b.D(0)})}function Dk(a,b){return G(function(c){if(1==c.g)return u(c,Xe(a.I),2);vf(a.h);a.g.onError(b);b.handled||a.i.failureCallback(b);B(c)})};function Ok(a,b){var c=Pk(),d=this;this.j=b;this.i=a;this.l=c;this.s=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return Qk(d)});this.B=new uf(function(){return Rk(d)})}Ok.prototype.destroy=function(){return this.B.destroy()};function Rk(a){var b,c,d;return G(function(e){if(1==e.g)return a.h&&a.h.abort(),Sk(a),u(e,a.C,2);a.g&&a.g.bb.Rb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.bb.Rb();a.g=null;a.m=[];a.j=null;B(e)})}
376
- function Tk(a,b){var c={nc:function(){},Fd:function(){},Rb:function(){},onError:function(){},Hd:function(){},uj:function(){}};a.m.push({create:b,bb:c});a.h&&a.h.abort();Sk(a);return c}
377
- function Qk(a){return G(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Jb)var c=!1;else{a.g&&(a.g.bb.Rb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.bb.nc(),a.g={node:d.node,payload:d.payload,Jb:d.Jb,bb:c.bb}):c.bb.Hd();c=!0}c?c=Promise.resolve():a.g?c=Uk(a):(a.j.ph(a.i),a.s=new Jc,c=a.s);b=u(b,c,1)}return b})}
378
- function Uk(a){var b,c;return G(function(d){switch(d.g){case 1:return a.i=a.j.Tg(a.i,a.l,a.g.node,a.g.payload),D(d,2),a.h=a.j.yg(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.bb.Fd(),a.g=null);va(d,0);break;case 2:b=wa(d);if(7001==b.code)a.g.bb.Rb();else a.g.bb.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,B(d)}})}function Sk(a){a.s&&(a.s.resolve(),a.s=null)};function Vk(a){var b=[],c=700<=a.fontWeight,d="italic"==a.fontStyle,e=a.textDecoration.includes("underline");c&&b.push("b");d&&b.push("i");e&&b.push("u");c=b.reduce(function(f,g){return f+"<"+g+">"},"");b=b.reduceRight(function(f,g){return f+"</"+g+">"},"");return a.lineBreak?"\n":a.nestedCues.length?a.nestedCues.map(Vk).join(""):c+a.payload+b}
379
- function Wk(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.isContainer)Wk(c.nestedCues,b);else{var d=c.clone();d.nestedCues=[];d.payload=Vk(c);b.push(d)}return b};function Xk(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=Xk.prototype;q.remove=function(a,b){if(!this.g)return!1;Yk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
380
- q.append=function(a){var b=Wk(a,[]),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=r(b);for(var e=b.next();!e.done;d={Xb:d.Xb},e=b.next())d.Xb=e.value,a.some(function(f){return function(g){return g.startTime==f.Xb.startTime&&g.endTime==f.Xb.endTime&&g.text==f.Xb.payload?!0:!1}}(d))||(e=Zk(d.Xb))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
381
- c.indexOf(g)});a=r(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};q.destroy=function(){this.g&&(Yk(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"};
382
- function Zk(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}
383
- function Yk(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}I("shaka.text.SimpleTextDisplayer",Xk);Xk.prototype.setTextVisibility=Xk.prototype.setTextVisibility;Xk.prototype.isTextVisible=Xk.prototype.isTextVisible;Xk.prototype.destroy=Xk.prototype.destroy;Xk.prototype.append=Xk.prototype.append;Xk.prototype.remove=Xk.prototype.remove;function $k(){}function R(a){return document.createElement(a)}function al(){var a=document.createElement("button");a.setAttribute("type","button");return a}function bl(a){for(;a.firstChild;)a.removeChild(a.firstChild)}I("shaka.util.Dom",$k);$k.removeAllChildren=bl;function cl(a,b){var c=this;this.j=!1;this.i=[];this.F=a;this.m=b;this.g=R("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.C=(new N(function(){dl(c)})).ka(.25);this.h=new Map;this.B=new wf;this.B.o(document,"fullscreenchange",function(){dl(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){dl(c,
384
- !0)}),this.l.observe(this.g));this.s=new Map}q=cl.prototype;q.append=function(a){var b=[].concat(ha(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={ed:c.ed},d=a.next())c.ed=d.value,b.some(function(e){return function(f){return tc(f,e.ed)}}(c))||this.i.push(c.ed);dl(this)};q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.C&&this.C.stop();this.h.clear();this.B&&(this.B.release(),this.B=null);this.l&&(this.l.disconnect(),this.l=null)};
385
- 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});dl(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};function el(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
386
- function fl(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,p=l?l.hg:null;l&&(g.push(l.ke),l.Xc&&g.push(l.Xc),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?el(a,p)||(f=!0):(gl(a,k,e),l=a.h.get(k),p=l.hg,f=!0));0<k.nestedCues.length&&p&&fl(a,k.nestedCues,p,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(n,t){return n.startTime!=
387
- t.startTime?n.startTime-t.startTime:n.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.Xc?(c.appendChild(d.Xc),d.Xc.appendChild(d.ke)):c.appendChild(d.ke)}}function dl(a,b){if(a.g){var c=a.F.currentTime;if(!a.j||(void 0===b?0:b)){b=r(a.s.values());for(var d=b.next();!d.done;d=b.next())bl(d.value);bl(a.g);a.h.clear();a.s.clear()}if(a.j){b=new Map;d=r(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));fl(a,a.i,a.g,c,[])}}}
388
- function gl(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=R(e);"br"!=e&&hl(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,e=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==Ac?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Ac?"%":"px"),a.s.has(e))c=a.s.get(e);else{var g=R("span"),h=c.heightUnits==Ac?"%":"px",k=c.widthUnits==Ac?"%":"px",l=c.viewportAnchorUnits==Ac?"%":"px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");
354
+ q.Yc=function(){if(this.g)for(var a=this.g.wd(),b=r(this.j.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.j.get(d);var e=null;c.ia&&(e=c.ia.current());if(!e||e.startTime>a||e.endTime<a)c.ia=null;e=this.g.T;d==Gb?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=dj(e,d),e=Fi(e,a));if(!e){(null!=ej(this.g.T,d)||c.Ia)&&Ck(this,c);c.Ka&&(c.Ka.abort(),c.Ka=null);if(d===Gb&&(d=this.g.T,d.B))for(d=d.B.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,fi(d),d=r(d.j.values()),e=d.next();!e.done;e=
355
+ d.next())ai(e.value);c.Yc=!0}}};function Ck(a,b){b.Dc||b.Eb||(b.Ia?(b.Eb=!0,b.rd=0):null==cj(a.g.T,b.type)?null==b.eb&&uk(a,b,0):(pk(b),Ak(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
356
+ function rk(a){var b,c,d,e,f,g,h,k,l,m;return F(function(p){if(1==p.g){b=Hb;if(!a.l)throw new M(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.kd,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Ma,a.l.video),d.add(a.l.video));a.s&&(c.set(b.ea,a.s),d.add(a.s));e=a.g.T;f=a.i.forceTransmux;return u(p,e.init(c,f,a.m.sequenceMode),2)}vf(a.h);a.updateDuration();g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||(m=tk(l),a.j.set(k,m),uk(a,m,0));B(p)})}
357
+ function tk(a){return{stream:a,type:a.type,ia:null,Ga:null,zd:null,we:null,ve:null,ue:null,Tb:null,endOfStream:!1,Ia:!1,eb:null,Eb:!1,rd:0,Rd:!1,Dc:!1,Yc:!0,Be:!1,He:!1,Nc:!1,Ka:null}}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.T.Sa(a):this.g.T.Sa(Math.pow(2,32))};
358
+ function Dk(a,b){var c,d,e,f,g;return F(function(h){switch(h.g){case 1:vf(a.h);if(b.Ia||null==b.eb||b.Dc)return h.return();b.eb=null;if(!b.Eb){h.D(2);break}return u(h,Ak(a,b,b.Rd,b.rd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ia||b.eb||uk(a,b,0),h.return();case 4:D(h,6);d=Ek(a,b);null!=d&&(uk(a,b,d),b.Nc=!1);va(h,7);break;case 6:return e=
359
+ wa(h),u(h,Fk(a,e),8);case 8:return h.return();case 7:f=Array.from(a.j.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return u(h,a.g.T.endOfStream(),10);case 10:vf(a.h),g=a.g.T.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Sa(g),B(h)}})}
360
+ function Ek(a,b){if(Gk(b))return pj(a.g.T,b.stream.originalId||""),null;b.type==Gb&&qj(a.g.T);var c=a.g.wd(),d=b.Ga?b.Ga.endTime:c,e=fj(a.g.T,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=ej(a.g.T,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.j.get(Gb))&&Gk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=Hk(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;
361
+ f=Infinity;g=Array.from(a.j.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,Gk(h)||h.ia&&!h.ia.current()||(f=Math.min(f,h.Ga?h.Ga.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;Ik(a,b,c,e).catch(function(){});return null}
362
+ function Hk(a,b,c,d){if(b.ia)return b.ia.current();if(b.Ga||d)return c=b.Ga?b.Ga.endTime:d,b.Be=!0,b.ia=b.stream.segmentIndex.cc(c),b.ia&&b.ia.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ia=b.stream.segmentIndex.cc(d),e=b.ia&&b.ia.next().value);e||(b.ia=b.stream.segmentIndex.cc(c),e=b.ia&&b.ia.next().value);return e}
363
+ function Ik(a,b,c,d){var e,f,g,h,k,l,m,p,n,t,v,y,w,x,C;return F(function(z){switch(z.g){case 1:e=Hb;f=b.stream;g=b.ia;b.Ia=!0;D(z,2);if(2==d.fc())throw new M(1,1,1011);return u(z,Jk(a,b,d),4);case 4:vf(a.h);if(a.B)return z.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h&&!d.m)return p=new Uint8Array(0),t=n=!1,v=function(A){var E,G,H;return F(function(J){if(n)return J.return();t=!0;vf(a.h);if(a.B)return J.return();p=Kk(p,A);E=!1;G=0;(new Hf).box("mdat",
364
+ function(K){G=K.size+K.start;E=!0}).parse(p,!1,!0);if(!E)return J.D(0);H=p.subarray(0,G);p=p.subarray(G);return u(J,Lk(a,b,c,f,d,H),0)})},u(z,Mk(a,b,d,v),11);l=Mk(a,b,d);return u(z,l,7);case 7:m=z.h;vf(a.h);if(a.B)return z.return();if(!d.m){z.D(8);break}return u(z,Nk(m,d,g),9);case 9:m=z.h;case 8:return vf(a.h),b.Eb?(b.Ia=!1,uk(a,b,0),z.return()):u(z,Lk(a,b,c,f,d,m),6);case 11:y=z.h;if(t){z.D(6);break}n=!0;vf(a.h);return a.B?z.return():b.Eb?(b.Ia=!1,uk(a,b,0),z.return()):u(z,Lk(a,b,c,f,d,y),6);case 6:vf(a.h);
365
+ if(a.B)return z.return();b.Ga=d;g.next();b.Ia=!1;b.He=!1;w=a.g.T.ib();x=w[b.type];$a(JSON.stringify(x));b.Eb||a.g.Fe(d.startTime,d.endTime,b.type);uk(a,b,0);va(z,0);break;case 2:C=wa(z);vf(a.h,C);if(a.B)return z.return();b.Ia=!1;if(7001==C.code)b.Ia=!1,pk(b),uk(a,b,0),z.D(0);else if(b.type==e.ea&&a.i.ignoreTextStreamFailures)a.j.delete(e.ea),z.D(0);else if(3017==C.code)Ok(a,b,C),z.D(0);else return b.Nc=!0,C.severity=2,u(z,Fk(a,C),0)}})}
366
+ function Nk(a,b,c){var d,e,f,g;return F(function(h){if(1==h.g)return d=b.m,d.cryptoKey?h.D(2):u(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=Fc(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c.g,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function Kk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
367
+ function Ok(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.He})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Nc=!0;a.B=!0;a.g.onError(c);return}b.He=!0}uk(a,b,4)}
368
+ function Jk(a,b,c){var d,e,f,g,h,k,l,m;return F(function(p){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.we||e!=b.ve||f!=b.ue)h=function(){var n;return F(function(t){if(1==t.g)return D(t,2),b.ve=e,b.ue=f,b.we=g,u(t,sj(a.g.T,b.type,g,e,f,a.m.sequenceMode),4);if(2!=t.g)return va(t,0);n=wa(t);b.ve=null;b.ue=null;b.we=null;throw n;})},d.push(h());!zi(c.h,b.zd)&&(b.zd=c.h)&&(k=Mk(a,b,c.h),l=function(){var n,t,v,y;return F(function(w){switch(w.g){case 1:return D(w,
369
+ 2),u(w,k,4);case 4:return n=w.h,vf(a.h),t=new Hf,t.box("moov",Mf).box("trak",Mf).box("mdia",Mf).U("mdhd",function(x){x=oi(x.reader||0,x.version||0);c.h.timescale=x.timescale}).parse(n),v=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(w,a.g.vf(b.type,n),5);case 5:return u(w,gj(a.g.T,b.type,n,null,v),6);case 6:va(w,0);break;case 2:throw y=wa(w),b.zd=null,y;}})},a.g.qh(c.startTime,c.h),d.push(l()));m=b.Ga?b.Ga.j:null;if(a.m.sequenceMode){if(c.j!=m||b.Be)b.Be=!1,d.push(tj(a.g.T,b.type,c.startTime))}else c.j!=
370
+ m&&d.push(tj(a.g.T,b.type,c.timestampOffset));return u(p,Promise.all(d),0)})}
371
+ function Lk(a,b,c,d,e,f){var g,h,k,l,m,p;return F(function(n){switch(n.g){case 1:g=d.closedCaptions&&0<d.closedCaptions.size;k=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;l=a.i.parsePrftBox&&!a.G;if(k||l)h=new Hf;k&&h.U("emsg",function(t){var v=d.emsgSchemeIdUris;if(0===t.version){var y=t.reader.Wc();var w=t.reader.Wc();var x=t.reader.O();var C=t.reader.O();var z=t.reader.O();var A=t.reader.O();var E=e.startTime+C/x}else x=t.reader.O(),E=t.reader.Cb()/x+e.timestampOffset,
372
+ C=E-e.startTime,z=t.reader.O(),A=t.reader.O(),y=t.reader.Wc(),w=t.reader.Wc();t=t.reader.Bb(t.reader.W.byteLength-t.reader.na());if(v&&v.includes(y)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==y?a.g.rh():(v=(new Map).set("detail",{startTime:E,endTime:E+z/x,schemeIdUri:y,value:w,timescale:x,presentationTimeDelta:C,eventDuration:z,id:A,messageData:t}),v=new L("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=y&&"https://developer.apple.com/streaming/emsg-id3"!=
373
+ y||(y=Mi(t),y.length&&e&&a.g.sh([{cueTime:e.startTime,data:t,frames:y,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});l&&h.U("prft",function(t){a:{if(!a.G&&e.h.timescale){t.reader.O();var v=t.reader.O(),y=t.reader.O();v=1E3*v+y/Math.pow(2,32)*1E3;if(0===t.version)var w=t.reader.O();else try{w=t.reader.Cb()}catch(x){a.G=!0;w=void 0;break a}t=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+v)).getTime();w=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-w/e.h.timescale*
374
+ 1E3)});w=new L("prft",w);a.g.onEvent(w);a.G=!0}w=void 0}return w});(k||l)&&h.parse(f);return u(n,Pk(a,b,c),2);case 2:return vf(a.h),m=b.Yc,b.Yc=!1,p=b.rf,b.rf=!1,u(n,a.g.vf(b.type,f),3);case 3:return u(n,gj(a.g.T,b.type,f,e,g,m,p),4);case 4:vf(a.h),B(n)}})}
375
+ function Pk(a,b,c){var d,e,f,g;return F(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=cj(a.g.T,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():u(h,a.g.T.remove(b.type,e,e+g),2)}vf(a.h);B(h)})}function Gk(a){return a&&a.type==Gb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
376
+ function Mk(a,b,c,d){var e,f,g,h,k;return F(function(l){if(1==l.g)return e=tf,f=mk(c.Pa(),c.Ta,c.Ca,a.i.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof yi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Pb.request(e,f),b.Ka=h,u(l,h.promise,2);k=l.h;b.Ka=null;return l.return(k.data)})}
377
+ function Ak(a,b,c,d){var e,f;return F(function(g){if(1==g.g)return b.Eb=!1,b.Rd=!1,b.rd=0,b.Dc=!0,b.Ga=null,b.zd=null,b.ia=null,d?(e=a.g.wd(),f=a.g.T.getDuration(),u(g,a.g.T.remove(b.type,e+d,f),3)):u(g,rj(a.g.T,b.type),4);if(3!=g.g)return vf(a.h),c?u(g,a.g.T.flush(b.type),3):g.D(3);vf(a.h);b.Dc=!1;b.endOfStream=!1;b.Ia||b.eb||uk(a,b,0);B(g)})}
378
+ function uk(a,b,c){var d=b.type;if(d!=Gb||a.j.has(d))b.eb=(new Lc(function(){var e;return F(function(f){if(1==f.g)return D(f,2),u(f,Dk(a,b),4);if(2!=f.g)return va(f,0);e=wa(f);if(a.g)a.g.onError(e);B(f)})})).R(c)}function pk(a){null!=a.eb&&(a.eb.stop(),a.eb=null)}function qk(a){return F(function(b){return a.Ka?u(b,a.Ka.abort(),0):b.D(0)})}function Fk(a,b){return F(function(c){if(1==c.g)return u(c,Xe(a.I),2);vf(a.h);a.g.onError(b);b.handled||a.i.failureCallback(b);B(c)})};function Qk(a,b){var c=Rk(),d=this;this.j=b;this.i=a;this.l=c;this.s=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return Sk(d)});this.B=new uf(function(){return Tk(d)})}Qk.prototype.destroy=function(){return this.B.destroy()};function Tk(a){var b,c,d;return F(function(e){if(1==e.g)return a.h&&a.h.abort(),Uk(a),u(e,a.C,2);a.g&&a.g.bb.Rb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.bb.Rb();a.g=null;a.m=[];a.j=null;B(e)})}
379
+ function Vk(a,b){var c={nc:function(){},Fd:function(){},Rb:function(){},onError:function(){},Hd:function(){},tj:function(){}};a.m.push({create:b,bb:c});a.h&&a.h.abort();Uk(a);return c}
380
+ function Sk(a){return F(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Jb)var c=!1;else{a.g&&(a.g.bb.Rb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.bb.nc(),a.g={node:d.node,payload:d.payload,Jb:d.Jb,bb:c.bb}):c.bb.Hd();c=!0}c?c=Promise.resolve():a.g?c=Wk(a):(a.j.ph(a.i),a.s=new Jc,c=a.s);b=u(b,c,1)}return b})}
381
+ function Wk(a){var b,c;return F(function(d){switch(d.g){case 1:return a.i=a.j.Tg(a.i,a.l,a.g.node,a.g.payload),D(d,2),a.h=a.j.yg(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.bb.Fd(),a.g=null);va(d,0);break;case 2:b=wa(d);if(7001==b.code)a.g.bb.Rb();else a.g.bb.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,B(d)}})}function Uk(a){a.s&&(a.s.resolve(),a.s=null)};function Xk(a){var b=[],c=700<=a.fontWeight,d="italic"==a.fontStyle,e=a.textDecoration.includes("underline");c&&b.push("b");d&&b.push("i");e&&b.push("u");c=b.reduce(function(f,g){return f+"<"+g+">"},"");b=b.reduceRight(function(f,g){return f+"</"+g+">"},"");return a.lineBreak?"\n":a.nestedCues.length?a.nestedCues.map(Xk).join(""):c+a.payload+b}
382
+ function Yk(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.isContainer)Yk(c.nestedCues,b);else{var d=c.clone();d.nestedCues=[];d.payload=Xk(c);b.push(d)}return b};function Zk(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=Zk.prototype;q.remove=function(a,b){if(!this.g)return!1;$k(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
383
+ q.append=function(a){var b=Yk(a,[]),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=r(b);for(var e=b.next();!e.done;d={Xb:d.Xb},e=b.next())d.Xb=e.value,a.some(function(f){return function(g){return g.startTime==f.Xb.startTime&&g.endTime==f.Xb.endTime&&g.text==f.Xb.payload?!0:!1}}(d))||(e=al(d.Xb))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
384
+ c.indexOf(g)});a=r(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};q.destroy=function(){this.g&&($k(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"};
385
+ function al(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}
386
+ function $k(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}I("shaka.text.SimpleTextDisplayer",Zk);Zk.prototype.setTextVisibility=Zk.prototype.setTextVisibility;Zk.prototype.isTextVisible=Zk.prototype.isTextVisible;Zk.prototype.destroy=Zk.prototype.destroy;Zk.prototype.append=Zk.prototype.append;Zk.prototype.remove=Zk.prototype.remove;function bl(){}function R(a){return document.createElement(a)}function cl(){var a=document.createElement("button");a.setAttribute("type","button");return a}function dl(a){for(;a.firstChild;)a.removeChild(a.firstChild)}I("shaka.util.Dom",bl);bl.removeAllChildren=dl;function el(a,b){var c=this;this.j=!1;this.i=[];this.F=a;this.m=b;this.g=R("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.C=(new N(function(){fl(c)})).ka(.25);this.h=new Map;this.B=new wf;this.B.o(document,"fullscreenchange",function(){fl(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){fl(c,
387
+ !0)}),this.l.observe(this.g));this.s=new Map}q=el.prototype;q.append=function(a){var b=[].concat(ha(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={ed:c.ed},d=a.next())c.ed=d.value,b.some(function(e){return function(f){return tc(f,e.ed)}}(c))||this.i.push(c.ed);fl(this)};q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.C&&this.C.stop();this.h.clear();this.B&&(this.B.release(),this.B=null);this.l&&(this.l.disconnect(),this.l=null)};
388
+ 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});fl(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};function gl(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
389
+ function hl(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,p=l?l.hg:null;l&&(g.push(l.le),l.Xc&&g.push(l.Xc),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?gl(a,p)||(f=!0):(il(a,k,e),l=a.h.get(k),p=l.hg,f=!0));0<k.nestedCues.length&&p&&hl(a,k.nestedCues,p,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(n,t){return n.startTime!=
390
+ t.startTime?n.startTime-t.startTime:n.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.Xc?(c.appendChild(d.Xc),d.Xc.appendChild(d.le)):c.appendChild(d.le)}}function fl(a,b){if(a.g){var c=a.F.currentTime;if(!a.j||(void 0===b?0:b)){b=r(a.s.values());for(var d=b.next();!d.done;d=b.next())dl(d.value);dl(a.g);a.h.clear();a.s.clear()}if(a.j){b=new Map;d=r(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));hl(a,a.i,a.g,c,[])}}}
391
+ function il(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=R(e);"br"!=e&&jl(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,e=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==Ac?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Ac?"%":"px"),a.s.has(e))c=a.s.get(e);else{var g=R("span"),h=c.heightUnits==Ac?"%":"px",k=c.widthUnits==Ac?"%":"px",l=c.viewportAnchorUnits==Ac?"%":"px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");
389
392
  g.style.height=c.height+h;g.style.width=c.width+k;g.style.position="absolute";g.style.top=c.viewportAnchorY+l;g.style.left=c.viewportAnchorX+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.s.set(e,g);c=g}e=f;d&&(e=R("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,
390
- {ke:f,hg:e,Xc:c})}
391
- function hl(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=il(c.linePadding,c,a.m);f.paddingRight=il(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
392
- "no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=R("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=jl(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?
393
- "flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=il(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",c.writingMode==nc?(f.width="100%",c.lineAlign==pc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==pc?f.left=c.line+"%":"end"==c.lineAlign&&
393
+ {le:f,hg:e,Xc:c})}
394
+ function jl(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=kl(c.linePadding,c,a.m);f.paddingRight=kl(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
395
+ "no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=R("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=ll(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?
396
+ "flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=kl(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",c.writingMode==nc?(f.width="100%",c.lineAlign==pc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==pc?f.left=c.line+"%":"end"==c.lineAlign&&
394
397
  (f.right=100-c.line+"%")):(f.height="100%",c.lineAlign==pc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=100-c.line+"%")));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==nc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==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||
395
- (f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==nc?f.width=c.size+"%":f.height=c.size+"%")}function il(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 jl(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}
396
- I("shaka.text.UITextDisplayer",cl);cl.prototype.setTextVisibility=cl.prototype.setTextVisibility;cl.prototype.isTextVisible=cl.prototype.isTextVisible;cl.prototype.remove=cl.prototype.remove;cl.prototype.destroy=cl.prototype.destroy;cl.prototype.append=cl.prototype.append;function kl(a,b){function c(f){for(var g=f,h=r(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Wk(a,[]);a="WEBVTT\n\n";d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
397
- break;case "right":g.push("align:right");break;case mc:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}I("shaka.text.WebVttGenerator",function(){});function ll(a,b){this.h=a;this.g=b;this.j="";this.s=void 0;this.i=!1;this.m=!0;this.l=!1}function ml(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.U()?nl:ol};d.ot=pl(c);var e=d.ot===ql||d.ot===rl||d.ot===sl||d.ot===tl;e&&(d.bl=ul(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==tl&&(d.tb=vl(a,d.ot)/1E3);wl(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
398
- function xl(a,b,c){try{if(!a.g.enabled)return b;var d=yl(a);a:{switch(c){case "video/webm":case "video/mp4":var e=sl;break a;case "application/x-mpegurl":e=zl;break a}e=void 0}d.ot=e;d.su=!0;var f=Al(d);return Bl(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function yl(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.s,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
399
- function wl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,yl(a));c.pr=a.h.yb();var e=c.ot===ql||c.ot===sl;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Cl(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=Al(c);f&&(b.uris=b.uris.map(function(g){return Bl(g,f)}))}}}
400
- function pl(a){var b=a.type;if(a.init)return Dl;if("video"==b)return a.codecs.includes(",")?sl:ql;if("audio"==b)return rl;if("text"==b)return"application/mp4"===a.mimeType?tl:El}function ul(a,b){b=a.h.ib()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
401
- function vl(a,b){var c=a.h.Qa();if(!c.length)return NaN;a=c[0];c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case ql:return a.videoBandwidth||NaN;case rl:return a.audioBandwidth||NaN;default:return a.bandwidth}}
402
- function Al(a){function b(p){return 100*c(p/100)}function c(p){return Math.round(p)}function d(p){return!Number.isNaN(p)&&null!=p&&""!==p&&!1!==p}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(p){return encodeURIComponent(p)},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"===
403
- l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Cl(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=Al(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
404
- function Bl(a,b){if(!b||a.includes("offline:"))return a;a=new jb(a);a.g.set("CMCD",b);return a.toString()}var zl="m",rl="a",ql="v",sl="av",Dl="i",El="c",tl="tt",ol="v",nl="l";I("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Zi:"s",Ji:"o"});function Fl(){}
405
- function Gl(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]=ef(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=ef(l)),k=Gl(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?(Ta("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ua("Unexpected number of arguments for "+k),a[h]=b[h]):(Ta("Invalid config, unrecognized key "+
406
- k),g=!1)}return g}function Hl(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 Il(a,b){return a&&b}I("shaka.util.ConfigUtils",Fl);Fl.convertToConfigObject=Hl;Fl.mergeConfigObjects=Gl;function Jl(){}function Kl(a){a=cd(a);return(new jb(a)).ab}function Ll(a,b,c){function d(h){Ic(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new M(2,6,6015);var e;"string"==typeof b?e=ed(b,!0):e=b;a=cd(a);a=ed(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}I("shaka.util.FairPlayUtils",Jl);
407
- Jl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=$c(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Gc(id(c)))}};Jl.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};Jl.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
408
- Jl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Fc(b.body),a=hd(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=dd("spc="+a))};Jl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=cd(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=new Uint16Array(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Ll(a,d,b)};
409
- Jl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=cd(a).split(";").pop();return Ll(a,c,b)};Jl.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=cd(a).split("skd://").pop();return Ll(a,c,b)};Jl.initDataTransform=Ll;Jl.defaultGetContentId=Kl;
410
- Jl.isFairPlaySupported=function(){var a;return G(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},D(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);wa(b);return b.return(!1)})};function Ml(){}
411
- function Nl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:We(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){"com.apple.fps.1_0"==k.keySystem&&"skd"==h&&(h=k.serverCertificate,k=Kl(g),g=Ll(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Qc()},c={retryParameters:We(),availabilityWindowOverride:NaN,disableAudio:!1,
398
+ (f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==nc?f.width=c.size+"%":f.height=c.size+"%")}function kl(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 ll(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}
399
+ I("shaka.text.UITextDisplayer",el);el.prototype.setTextVisibility=el.prototype.setTextVisibility;el.prototype.isTextVisible=el.prototype.isTextVisible;el.prototype.remove=el.prototype.remove;el.prototype.destroy=el.prototype.destroy;el.prototype.append=el.prototype.append;function ml(a,b){function c(f){for(var g=f,h=r(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Yk(a,[]);a="WEBVTT\n\n";d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
400
+ break;case "right":g.push("align:right");break;case mc:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}I("shaka.text.WebVttGenerator",function(){});function nl(a,b){this.h=a;this.g=b;this.j="";this.s=void 0;this.i=!1;this.m=!0;this.l=!1}function ol(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.S()?pl:ql};d.ot=rl(c);var e=d.ot===sl||d.ot===tl||d.ot===ul||d.ot===vl;e&&(d.bl=wl(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==vl&&(d.tb=xl(a,d.ot)/1E3);yl(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
401
+ function zl(a,b,c){try{if(!a.g.enabled)return b;var d=Al(a);a:{switch(c){case "video/webm":case "video/mp4":var e=ul;break a;case "application/x-mpegurl":e=Bl;break a}e=void 0}d.ot=e;d.su=!0;var f=Cl(d);return Dl(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Al(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.s,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
402
+ function yl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Al(a));c.pr=a.h.yb();var e=c.ot===sl||c.ot===ul;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=El(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=Cl(c);f&&(b.uris=b.uris.map(function(g){return Dl(g,f)}))}}}
403
+ function rl(a){var b=a.type;if(a.init)return Fl;if("video"==b)return a.codecs.includes(",")?ul:sl;if("audio"==b)return tl;if("text"==b)return"application/mp4"===a.mimeType?vl:Gl}function wl(a,b){b=a.h.ib()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
404
+ function xl(a,b){var c=a.h.Qa();if(!c.length)return NaN;a=c[0];c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case sl:return a.videoBandwidth||NaN;case tl:return a.audioBandwidth||NaN;default:return a.bandwidth}}
405
+ function Cl(a){function b(p){return 100*c(p/100)}function c(p){return Math.round(p)}function d(p){return!Number.isNaN(p)&&null!=p&&""!==p&&!1!==p}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(p){return encodeURIComponent(p)},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"===
406
+ l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function El(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=Cl(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
407
+ function Dl(a,b){if(!b||a.includes("offline:"))return a;a=new jb(a);a.g.set("CMCD",b);return a.toString()}var Bl="m",tl="a",sl="v",ul="av",Fl="i",Gl="c",vl="tt",ql="v",pl="l";I("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Yi:"s",OTHER:"o"});function Hl(){}
408
+ function Il(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]=ef(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=ef(l)),k=Il(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?(Ta("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ua("Unexpected number of arguments for "+k),a[h]=b[h]):(Ta("Invalid config, unrecognized key "+
409
+ k),g=!1)}return g}function Jl(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 Kl(a,b){return a&&b}I("shaka.util.ConfigUtils",Hl);Hl.convertToConfigObject=Jl;Hl.mergeConfigObjects=Il;function Ll(){}function Ml(a){a=cd(a);return(new jb(a)).ab}function Nl(a,b,c){function d(h){Ic(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new M(2,6,6015);var e;"string"==typeof b?e=ed(b,!0):e=b;a=cd(a);a=ed(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}I("shaka.util.FairPlayUtils",Ll);
410
+ Ll.commonFairPlayResponse=function(a,b){if(2===a){try{var c=$c(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Gc(id(c)))}};Ll.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};Ll.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
411
+ Ll.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Fc(b.body),a=hd(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=dd("spc="+a))};Ll.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=cd(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=new Uint16Array(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Nl(a,d,b)};
412
+ Ll.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=cd(a).split(";").pop();return Nl(a,c,b)};Ll.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=cd(a).split("skd://").pop();return Nl(a,c,b)};Ll.initDataTransform=Nl;Ll.defaultGetContentId=Ml;
413
+ Ll.isFairPlaySupported=function(){var a;return F(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},D(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);wa(b);return b.return(!1)})};function Ol(){}
414
+ function Pl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:We(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){"com.apple.fps.1_0"==k.keySystem&&"skd"==h&&(h=k.serverCertificate,k=Ml(g),g=Nl(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Qc()},c={retryParameters:We(),availabilityWindowOverride:NaN,disableAudio:!1,
412
415
  disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey",
413
- "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return Il([g],g)},sequenceMode:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,
414
- mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3}},d={retryParameters:We(),failureCallback:function(g){return Il([g])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmux:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,
415
- autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1};if(Rc("Web0S")||Sc()||Rc("CrKey"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return G(function(h){return h.return(g)})},downloadSizeCallback:function(g){var h;return G(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k.return(!0);h=k.h;return k.return(h.usage+g<
416
- .95*h.quota)})},progressCallback:function(g,h){return Il([g,h])},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,mediaSource:{sourceBufferExtraFeatures:""},offline:e,abrFactory:function(){return new ze},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,
416
+ "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return Kl([g],g)},sequenceMode:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,
417
+ mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3}},d={retryParameters:We(),failureCallback:function(g){return Kl([g])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmux:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,
418
+ autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1};if(Rc("Web0S")||Sc()||Rc("CrKey"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return F(function(h){return h.return(g)})},downloadSizeCallback:function(g){var h;return F(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k.return(!0);h=k.h;return k.return(h.usage+g<
419
+ .95*h.quota)})},progressCallback:function(g,h){return Kl([g,h])},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,mediaSource:{sourceBufferExtraFeatures:""},offline:e,abrFactory:function(){return new ze},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,
417
420
  minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1},autoShowText:3,preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,
418
- minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1}};e.trackSelectionCallback=function(g){return G(function(h){return h.return(Ol(g,f.preferredAudioLanguage))})};return f}
419
- function Pl(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Gl(a,b,c||Nl(),d,"")}
420
- function Ol(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=Sb(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return Kb(g.language)==e}));0==d.length&&(d=c.filter(function(g){return g.primary}));0==d.length&&(c.map(function(g){return g.language}),d=c);var f=d.filter(function(g){return g.height&&480>=g.height});f.length&&(f.sort(function(g,h){return h.height-g.height}),d=f.filter(function(g){return g.height==f[0].height}));b=[];d.length&&(c=Math.floor(d.length/
421
- 2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=Gb&&"image"!=d.type||b.push(d);return b}I("shaka.util.PlayerConfiguration",Ml);Ml.mergeConfigObjects=Pl;Ml.createDefault=Nl;function Ql(){this.g=null;this.h=[]}function Rl(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 Sl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=r(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}
422
- function Tl(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 Ul(){this.i=this.h=null;this.g=[]}function Vl(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 Wl(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.N=this.P=this.J=this.K=this.M=this.l=this.s=NaN;this.g=new Ql;this.h=new Ul};function S(a,b){db.call(this);var c=this;this.l=Xl;this.Cd=this.g=null;this.$=!1;this.Jd=new wf;this.gb=new wf;this.C=new wf;this.fb=this.i=this.Ld=this.K=this.j=this.ba=this.M=this.mf=this.V=this.sa=this.N=this.Ed=this.J=this.Za=this.F=this.I=this.m=this.H=null;this.Oc=!1;this.bf=this.B=null;this.jf=1E9;this.h=Yl(this);this.Rc={width:Infinity,height:Infinity};this.s=null;this.La=new Ne(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Xa=this.h.preferredTextLanguage;
423
- this.Lc=this.h.preferredTextRole;this.Fc=this.h.preferForcedSubs;this.vb=[];this.Sc=null;b&&b(this);this.H=Zl(this);this.H.Oe(this.h.streaming.forceHTTPS);this.G=null;$l&&(this.G=$l());this.Jd.o(window,"online",function(){c.Ge()});this.P={name:"detach"};this.X={name:"attach"};this.aa={name:"unload"};this.kf={name:"manifest-parser"};this.hf={name:"manifest"};this.Ya={name:"media-source"};this.ef={name:"drm-engine"};this.Z={name:"load"};this.ge={name:"src-equals-drm-engine"};this.$a={name:"src-equals"};
424
- var d=new Map;d.set(this.X,function(e,f){return bf(am(c,e,f))});d.set(this.P,function(e){e.mediaElement&&(c.gb.Sb(),e.mediaElement=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return bf(e)});d.set(this.aa,function(e){return bf(bm(c,e))});d.set(this.Ya,function(e){e=cm(c,e);return bf(e)});d.set(this.kf,function(e,f){e=dm(c,e,f);return bf(e)});d.set(this.hf,function(e){return em(c,e)});d.set(this.ef,function(e){e=fm(c,e);return bf(e)});d.set(this.Z,function(e,f){return bf(gm(c,e,f))});d.set(this.ge,
425
- function(e,f){e=hm(c,e,f);return bf(e)});d.set(this.$a,function(e,f){return im(c,e,f)});this.ua=new Ok(this.P,{Tg:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.X);e==c.X&&(k=g==c.P||f.mediaElement!=h.mediaElement?c.P:g==c.X?c.X:g==c.Ya||g==c.Z?c.Ya:g==c.$a?c.ge:null);e==c.Ya&&(k=g==c.Z&&f.mediaElement==h.mediaElement?c.kf:c.aa);e==c.kf&&(k=jm(c.Z,c.hf,c.aa,g,f,h));e==c.hf&&(k=jm(c.Z,c.ef,c.aa,g,f,h));e==c.ef&&(k=jm(c.Z,c.Z,c.aa,g,f,h));e==c.ge&&(k=g==c.$a&&f.mediaElement==h.mediaElement?c.$a:
426
- c.aa);if(e==c.Z||e==c.$a)k=c.aa;e==c.aa&&(k=h.mediaElement&&f.mediaElement==h.mediaElement?c.X:c.P);return k},yg:function(e,f,g){c.dispatchEvent(km("onstatechange",(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return G(function(f){return 1==f.g?u(f,bm(c,e),2):f.return(e.mediaElement?c.X:c.P)})},ph:function(e){c.dispatchEvent(km("onstateidle",(new Map).set("state",e.name)))}});this.lf=new N(function(){Yd(c.i.variants,c.h.restrictions,c.Rc)&&lm(c)});a&&this.Cc(a,!0)}
427
- pa(S,db);function mm(a){null!=a.M&&(a.M.release(),a.M=null)}function nm(a,b){if(b.lcevc.enabled){var c=a.Qa();c&&c[0]&&c[0].videoMimeType==om.ts&&(Pc()||navigator.userAgent.match(/Edge\//))&&(b.streaming.forceTransmux||Ua("LCEVC Warning: For MPEG-2 TS decoding the config.streaming.forceTransmux must be enabled."));mm(a);null==a.M&&(a.M=new Pi(a.g,a.mf,b.lcevc),a.I&&(a.I.H=a.M))}else mm(a)}function km(a,b){return new L(a,b)}q=S.prototype;
428
- q.destroy=function(){var a=this,b;return G(function(c){switch(c.g){case 1:if(a.l==pm)return c.return();mm(a);a.l=pm;b=Tk(a.ua,function(){return{node:a.P,payload:Pk(),Jb:!1}});return u(c,new Promise(function(d){b.nc=function(){};b.Fd=function(){d()};b.Rb=function(){d()};b.onError=function(){d()};b.Hd=function(){d()}}),2);case 2:return u(c,a.ua.destroy(),3);case 3:a.Jd&&(a.Jd.release(),a.Jd=null);a.gb&&(a.gb.release(),a.gb=null);a.C&&(a.C.release(),a.C=null);a.bf=null;a.h=null;a.s=null;a.Cd=null;a.V=
421
+ minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1}};e.trackSelectionCallback=function(g){return F(function(h){return h.return(Ql(g,f.preferredAudioLanguage))})};return f}
422
+ function Rl(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Il(a,b,c||Pl(),d,"")}
423
+ function Ql(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=Sb(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return Kb(g.language)==e}));0==d.length&&(d=c.filter(function(g){return g.primary}));0==d.length&&(c.map(function(g){return g.language}),d=c);var f=d.filter(function(g){return g.height&&480>=g.height});f.length&&(f.sort(function(g,h){return h.height-g.height}),d=f.filter(function(g){return g.height==f[0].height}));b=[];d.length&&(c=Math.floor(d.length/
424
+ 2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=Gb&&"image"!=d.type||b.push(d);return b}I("shaka.util.PlayerConfiguration",Ol);Ol.mergeConfigObjects=Rl;Ol.createDefault=Pl;function Sl(){this.g=null;this.h=[]}function Tl(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 Ul(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=r(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}
425
+ function Vl(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 Wl(){this.i=this.h=null;this.g=[]}function Xl(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 Yl(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.N=this.P=this.J=this.K=this.M=this.l=this.s=NaN;this.g=new Sl;this.h=new Wl};function S(a,b){db.call(this);var c=this;this.l=Zl;this.Cd=this.g=null;this.$=!1;this.Jd=new wf;this.gb=new wf;this.C=new wf;this.fb=this.i=this.Ld=this.K=this.j=this.ba=this.M=this.nf=this.V=this.sa=this.N=this.Ed=this.J=this.Za=this.F=this.I=this.m=this.H=null;this.Oc=!1;this.cf=this.B=null;this.kf=1E9;this.h=$l(this);this.Rc={width:Infinity,height:Infinity};this.s=null;this.La=new Ne(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Xa=this.h.preferredTextLanguage;
426
+ this.Lc=this.h.preferredTextRole;this.Fc=this.h.preferForcedSubs;this.vb=[];this.Sc=null;b&&b(this);this.H=am(this);this.H.Qe(this.h.streaming.forceHTTPS);this.G=null;bm&&(this.G=bm());this.Jd.o(window,"online",function(){c.Ie()});this.P={name:"detach"};this.X={name:"attach"};this.aa={name:"unload"};this.lf={name:"manifest-parser"};this.jf={name:"manifest"};this.Ya={name:"media-source"};this.gf={name:"drm-engine"};this.Z={name:"load"};this.ie={name:"src-equals-drm-engine"};this.$a={name:"src-equals"};
427
+ var d=new Map;d.set(this.X,function(e,f){return bf(cm(c,e,f))});d.set(this.P,function(e){e.mediaElement&&(c.gb.Sb(),e.mediaElement=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return bf(e)});d.set(this.aa,function(e){return bf(dm(c,e))});d.set(this.Ya,function(e){e=em(c,e);return bf(e)});d.set(this.lf,function(e,f){e=fm(c,e,f);return bf(e)});d.set(this.jf,function(e){return gm(c,e)});d.set(this.gf,function(e){e=hm(c,e);return bf(e)});d.set(this.Z,function(e,f){return bf(im(c,e,f))});d.set(this.ie,
428
+ function(e,f){e=jm(c,e,f);return bf(e)});d.set(this.$a,function(e,f){return km(c,e,f)});this.ua=new Qk(this.P,{Tg:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.X);e==c.X&&(k=g==c.P||f.mediaElement!=h.mediaElement?c.P:g==c.X?c.X:g==c.Ya||g==c.Z?c.Ya:g==c.$a?c.ie:null);e==c.Ya&&(k=g==c.Z&&f.mediaElement==h.mediaElement?c.lf:c.aa);e==c.lf&&(k=lm(c.Z,c.jf,c.aa,g,f,h));e==c.jf&&(k=lm(c.Z,c.gf,c.aa,g,f,h));e==c.gf&&(k=lm(c.Z,c.Z,c.aa,g,f,h));e==c.ie&&(k=g==c.$a&&f.mediaElement==h.mediaElement?c.$a:
429
+ c.aa);if(e==c.Z||e==c.$a)k=c.aa;e==c.aa&&(k=h.mediaElement&&f.mediaElement==h.mediaElement?c.X:c.P);return k},yg:function(e,f,g){c.dispatchEvent(mm("onstatechange",(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return F(function(f){return 1==f.g?u(f,dm(c,e),2):f.return(e.mediaElement?c.X:c.P)})},ph:function(e){c.dispatchEvent(mm("onstateidle",(new Map).set("state",e.name)))}});this.mf=new N(function(){Yd(c.i.variants,c.h.restrictions,c.Rc)&&nm(c)});a&&this.Cc(a,!0)}
430
+ pa(S,db);function om(a){null!=a.M&&(a.M.release(),a.M=null)}function pm(a,b){if(b.lcevc.enabled){var c=a.Qa();c&&c[0]&&c[0].videoMimeType==qm.ts&&(Pc()||navigator.userAgent.match(/Edge\//))&&(b.streaming.forceTransmux||Ua("LCEVC Warning: For MPEG-2 TS decoding the config.streaming.forceTransmux must be enabled."));om(a);null==a.M&&(a.M=new Ri(a.g,a.nf,b.lcevc),a.I&&(a.I.H=a.M))}else om(a)}function mm(a,b){return new L(a,b)}q=S.prototype;
431
+ q.destroy=function(){var a=this,b;return F(function(c){switch(c.g){case 1:if(a.l==rm)return c.return();om(a);a.l=rm;b=Vk(a.ua,function(){return{node:a.P,payload:Rk(),Jb:!1}});return u(c,new Promise(function(d){b.nc=function(){};b.Fd=function(){d()};b.Rb=function(){d()};b.onError=function(){d()};b.Hd=function(){d()}}),2);case 2:return u(c,a.ua.destroy(),3);case 3:a.Jd&&(a.Jd.release(),a.Jd=null);a.gb&&(a.gb.release(),a.gb=null);a.C&&(a.C.release(),a.C=null);a.cf=null;a.h=null;a.s=null;a.Cd=null;a.V=
429
432
  null;if(!a.H){c.D(4);break}return u(c,a.H.destroy(),5);case 5:a.H=null;case 4:a.B&&(a.B.release(),a.B=null),db.prototype.release.call(a),B(c)}})};
430
- function qm(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Rc("Trident/"))return!1;var a=Wc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Mc()?!0:Nc("application/x-mpegurl")}
431
- q.Cc=function(a,b){b=void 0===b?!0:b;if(this.l==pm)return Promise.reject(rm());var c=Pk();c.mediaElement=a;Mc()||(b=!1);var d=b?this.Ya:this.X;a=Tk(this.ua,function(){return{node:d,payload:c,Jb:!1}});a.nc=function(){};return sm(a)};q.rf=function(a){this.mf=a};q.detach=function(){var a=this;if(this.l==pm)return Promise.reject(rm());var b=Tk(this.ua,function(){return{node:a.P,payload:Pk(),Jb:!1}});b.nc=function(){};return sm(b)};
432
- q.cf=function(a){var b=this;a=void 0===a?!0:a;if(this.l==pm)return Promise.reject(rm());this.Oc=!1;Mc()||(a=!1);mm(this);var c=Pk(),d=Tk(this.ua,function(e){var f=e.mediaElement&&a?b.Ya:e.mediaElement?b.X:b.P;c.mediaElement=e.mediaElement;return{node:f,payload:c,Jb:!1}});d.nc=function(){};return sm(d)};q.Rh=function(a){this.Sc=a};
433
- q.load=function(a,b,c){var d=this;this.Sc=null;this.Oc=!1;if(this.l==pm)return Promise.reject(rm());this.dispatchEvent(km("loading"));var e=Pk();e.uri=a;e.Ve=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=tm(this,e)?this.$a:this.Z,g=Tk(this.ua,function(h){if(null==h.mediaElement)return null;e.mediaElement=h.mediaElement;return{node:f,payload:e,Jb:!0}});this.s=new Wl;this.V=um(this);g.nc=function(){};return new Promise(function(h,k){g.Hd=function(){return k(new M(2,7,7002))};g.Fd=
434
- function(){h();d.dispatchEvent(km("loaded"))};g.Rb=function(){return k(rm())};g.onError=function(l){return k(l)}})};function tm(a,b){if(!Mc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=bh(d),c=om[c]);if(c){if(""==(b.mediaElement||Oc()).canPlayType(c))return!1;if(!Mc()||!(c in ah||bh(d)in ch)||("application/x-mpegurl"===c||"application/vnd.apple.mpegurl"===c)&&a.h.streaming.preferNativeHls)return!0;if(Uc())return a.h.streaming.useNativeHlsOnSafari}return!1}
435
- function am(a,b,c){null==b.mediaElement&&(b.mediaElement=c.mediaElement,a.gb.o(b.mediaElement,"error",function(){var d=vm(a);d&&wm(a,d)}));a.g=b.mediaElement;return Promise.resolve()}
436
- function bm(a,b){var c,d,e,f,g,h,k,l,m;return G(function(p){switch(p.g){case 1:return a.l!=pm&&(a.l=Xl),c=a.vb.map(function(n){return n()}),a.vb=[],u(p,Promise.all(c),2);case 2:a.dispatchEvent(km("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;a.sa&&(a.sa.release(),a.sa=null);b.mediaElement&&a.C.Sb();a.lf.stop();a.Za&&(a.Za.release(),a.Za=null);a.Ed&&(a.Ed.stop(),a.Ed=null);if(!a.K){p.D(3);break}return u(p,a.K.stop(),4);case 4:a.K=null,a.Ld=null;case 3:if(!a.B){p.D(5);break}return u(p,a.B.stop(),
433
+ function sm(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Rc("Trident/"))return!1;var a=Wc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Mc()?!0:Nc("application/x-mpegurl")}
434
+ q.Cc=function(a,b){b=void 0===b?!0:b;if(this.l==rm)return Promise.reject(tm());var c=Rk();c.mediaElement=a;Mc()||(b=!1);var d=b?this.Ya:this.X;a=Vk(this.ua,function(){return{node:d,payload:c,Jb:!1}});a.nc=function(){};return um(a)};q.tf=function(a){this.nf=a};q.detach=function(){var a=this;if(this.l==rm)return Promise.reject(tm());var b=Vk(this.ua,function(){return{node:a.P,payload:Rk(),Jb:!1}});b.nc=function(){};return um(b)};
435
+ q.df=function(a){var b=this;a=void 0===a?!0:a;if(this.l==rm)return Promise.reject(tm());this.Oc=!1;Mc()||(a=!1);om(this);var c=Rk(),d=Vk(this.ua,function(e){var f=e.mediaElement&&a?b.Ya:e.mediaElement?b.X:b.P;c.mediaElement=e.mediaElement;return{node:f,payload:c,Jb:!1}});d.nc=function(){};return um(d)};q.Rh=function(a){this.Sc=a};
436
+ q.load=function(a,b,c){var d=this;this.Sc=null;this.Oc=!1;if(this.l==rm)return Promise.reject(tm());this.dispatchEvent(mm("loading"));var e=Rk();e.uri=a;e.Od=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=vm(this,e)?this.$a:this.Z,g=Vk(this.ua,function(h){if(null==h.mediaElement)return null;e.mediaElement=h.mediaElement;return{node:f,payload:e,Jb:!0}});this.s=new Yl;this.V=wm(this);g.nc=function(){};return new Promise(function(h,k){g.Hd=function(){return k(new M(2,7,7002))};g.Fd=
437
+ function(){h();d.dispatchEvent(mm("loaded"))};g.Rb=function(){return k(tm())};g.onError=function(l){return k(l)}})};function vm(a,b){if(!Mc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=bh(d),c=qm[c]);if(c){if(""==(b.mediaElement||Oc()).canPlayType(c))return!1;if(!Mc()||!(c in ah||bh(d)in ch)||("application/x-mpegurl"===c||"application/vnd.apple.mpegurl"===c)&&a.h.streaming.preferNativeHls)return!0;if(Uc())return a.h.streaming.useNativeHlsOnSafari}return!1}
438
+ function cm(a,b,c){null==b.mediaElement&&(b.mediaElement=c.mediaElement,a.gb.o(b.mediaElement,"error",function(){var d=xm(a);d&&ym(a,d)}));a.g=b.mediaElement;return Promise.resolve()}
439
+ function dm(a,b){var c,d,e,f,g,h,k,l,m;return F(function(p){switch(p.g){case 1:return a.l!=rm&&(a.l=Zl),c=a.vb.map(function(n){return n()}),a.vb=[],u(p,Promise.all(c),2);case 2:a.dispatchEvent(mm("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;a.sa&&(a.sa.release(),a.sa=null);b.mediaElement&&a.C.Sb();a.mf.stop();a.Za&&(a.Za.release(),a.Za=null);a.Ed&&(a.Ed.stop(),a.Ed=null);if(!a.K){p.D(3);break}return u(p,a.K.stop(),4);case 4:a.K=null,a.Ld=null;case 3:if(!a.B){p.D(5);break}return u(p,a.B.stop(),
437
440
  5);case 5:if(!a.j){p.D(7);break}return u(p,a.j.destroy(),8);case 8:a.j=null;case 7:a.J&&(a.J.release(),a.J=null);a.F&&(a.F.release(),a.F=null);if(!a.I){p.D(9);break}return u(p,a.I.destroy(),10);case 10:a.I=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.mediaElement||!b.mediaElement.src){p.D(11);break}return u(p,new Promise(function(n){return(new N(n)).R(.1)}),12);case 12:for(b.mediaElement.removeAttribute("src"),b.mediaElement.load();b.mediaElement.lastChild;)b.mediaElement.removeChild(b.mediaElement.firstChild);
438
- case 11:if(!a.m){p.D(13);break}return u(p,a.m.destroy(),14);case 14:a.m=null;case 13:a.fb=null;a.N=null;if(a.i){d=r(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.s=new Wl;a.gf=null;xm(a);B(p)}})}
439
- function cm(a,b){var c,d,e,f,g;return G(function(h){if(1==h.g)return c=a.h.textDisplayFactory,d=c(),a.gf=c,e=ym(b.mediaElement,d,function(k,l,m){zm(a,k,l,m)},a.M),e.configure(a.h.mediaSource),f=a.h.manifest,g=f.segmentRelativeVttTiming,e.J=g,u(h,e.K,2);a.I=e;B(h)})}
440
- function dm(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.fb=d,f=a,u(h,$g(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Ld=h.h;a.K=a.Ld();g=ef(a.h.manifest);c.mediaElement&&"AUDIO"===c.mediaElement.nodeName&&(g.disableVideo=!0);a.K.configure(g);B(h)})}
441
- function em(a,b){var c=b.uri;b=a.H;a.sa=new ek(function(){return a.Ja()});a.sa.addEventListener("regionadd",function(f){f=f.region;Am(a,"timelineregionadded",f);if(a.G)a.G.onDashTimedMetadata(f)});a.ba=null;a.h.streaming.observeQualityChanges&&(a.ba=new ak(function(){return a.ib()}),a.ba.addEventListener("qualitychange",function(f){var g=f.quality;f=f.position;g=(new Map).set("mediaQuality",{bandwidth:g.bandwidth,audioSamplingRate:g.audioSamplingRate,codecs:g.codecs,contentType:g.contentType,frameRate:g.frameRate,
442
- height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(km("mediaqualitychanged",g))}));var d={networkingEngine:b,modifyManifestRequest:function(f,g){var h=a.V;try{h.g.enabled&&(h.s=g.format,wl(h,f,{ot:zl,su:!h.i}))}catch(k){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",k)}},modifySegmentRequest:function(f,g){ml(a.V,f,g)},filter:function(f){return Bm(a,f)},makeTextStreamsForClosedCaptions:function(f){return Cm(a,
443
- f)},onTimelineRegionAdded:function(f){var g=a.sa;a:{var h=r(g.g);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.schemeIdUri==f.schemeIdUri&&k.id==f.id&&k.startTime==f.startTime&&k.endTime==f.endTime){h=k;break a}h=null}null==h&&(g.g.add(f),f=new L("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return wm(a,f)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
444
- enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(f){var g=a.m?a.m.g:null;g&&a.m.C&&Dm(a,g.keySystem,f)}},e=Date.now()/1E3;return new Ye(function(){var f,g,h,k;return G(function(l){if(1==l.g)return f=a,u(l,a.K.start(c,d),2);f.i=l.h;g=km("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new M(2,4,4036);Em(a.i);h=Date.now()/1E3;k=h-e;a.s.H=k;B(l)})}(),function(){return a.K.stop()})}
445
- function fm(a,b){var c,d;return G(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Fm(a,{Pb:a.H,onError:function(f){wm(a,f)},Gd:function(f){Gm(a,f)},onExpirationUpdated:function(f,g){Hm(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.s.j=Date.now()/1E3-c,a.M&&(f=a.M,f.g&&f.h.classList.add("shaka-hidden")))}}),a.m.configure(a.h.drm),u(e,ug(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Cc(b.mediaElement),3):u(e,Bm(a,a.i),0)})}
446
- function gm(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z;return G(function(A){switch(A.g){case 1:b.startTime=c.startTime;null!=a.Sc&&(b.startTime=a.Sc,a.Sc=null);d=b.mediaElement;e=b.uri;a.fb=e;a.J=new Wj({xd:function(){return d.playbackRate},ud:function(){return d.defaultPlaybackRate},Qe:function(E){d.playbackRate=E},Qf:function(E){d.currentTime+=E}});f=function(){return Im(a)};g=function(){return Jm(a)};a.C.o(d,"playing",f);a.C.o(d,"pause",f);a.C.o(d,"ended",f);a.C.o(d,"ratechange",g);nm(a,a.h);
447
- h=a.h.abrFactory;a.B&&a.bf==h||(a.bf=h,a.B=h(),"function"!=typeof a.B.setMediaElement&&(Ee("AbrManager","Please use an AbrManager with setMediaElement function."),a.B.setMediaElement=function(){}),a.B.configure(a.h.abr));a.La=new Ne(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Xa=a.h.preferredTextLanguage;a.Lc=a.h.preferredTextRole;a.Fc=a.h.preferForcedSubs;Km(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(E,F,H){a.j&&E!=a.j.l&&
448
- Lm(a,E,!0,void 0===F?!1:F,void 0===H?0:H)});a.B.setMediaElement(d);Kd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Mm(a);a.j.configure(a.h.streaming);a.l=Nm;d.textTracks&&a.C.o(d.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Om(a,E)}});a.dispatchEvent(km("streaming"));k=null;(l=a.j.l)||(k=lm(a));m=[];p=l||k;n=r([p.video,p.audio]);for(t=n.next();!t.done;t=n.next())(v=t.value)&&!v.segmentIndex&&
449
- m.push(v.createSegmentIndex());if(!(0<m.length)){A.D(2);break}return u(A,Promise.all(m),2);case 2:a.F=Pm(a,b.startTime);a.Za=Qm(a);y=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Rm(a,y);if(l){A.D(4);break}Lm(a,k,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){A.D(5);break}w=a.F.ld();return u(A,Sm(k,w),6);case 6:x=A.h,a.F.je(x);case 5:Tm(a,null,me(k));case 4:return a.F.ie(),C=a.zb().find(function(E){return E.active}),C||((z=we(a.i.textStreams,a.Xa,a.Lc,a.Fc)[0]||null)&&Vl(a.s.h,z,!0),
450
- k&&(z?(k.audio&&Um(a,k.audio,z)&&(a.$=!0),a.$&&a.I.m.setTextVisibility(!0),Vm(a)):a.$=!1),z&&(a.h.streaming.alwaysStreamText||a.Nb())&&xk(a.j,z)),u(A,a.j.start(),7);case 7:a.h.abr.enabled&&(a.B.enable(),Wm(a)),ae(a.j?a.j.l:null,a.i),Xm(a.i),Ym(a),Zm(a),a.i.variants.some(function(E){return E.primary}),a.Oc=!0,a.C.ya(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Ve}),B(A)}})}
451
- function hm(a,b,c){var d,e,f,g,h,k,l;return G(function(m){return 1==m.g?(d=Hb,e=Date.now()/1E3,f=!0,a.m=Fm(a,{Pb:a.H,onError:function(p){wm(a,p)},Gd:function(p){Gm(a,p)},onExpirationUpdated:function(p,n){Hm(a,p,n)},onEvent:function(p){a.dispatchEvent(p);"drmsessionupdate"==p.type&&f&&(f=!1,a.s.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=bh(g),k=om[h],"application/x-mpegurl"==k&&Uc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
441
+ case 11:if(!a.m){p.D(13);break}return u(p,a.m.destroy(),14);case 14:a.m=null;case 13:a.fb=null;a.N=null;if(a.i){d=r(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.s=new Yl;a.hf=null;zm(a);B(p)}})}
442
+ function em(a,b){var c,d,e,f,g;return F(function(h){if(1==h.g)return c=a.h.textDisplayFactory,d=c(),a.hf=c,e=Am(b.mediaElement,d,function(k,l,m){Bm(a,k,l,m)},a.M),e.configure(a.h.mediaSource),f=a.h.manifest,g=f.segmentRelativeVttTiming,e.J=g,u(h,e.K,2);a.I=e;B(h)})}
443
+ function fm(a,b,c){var d,e,f,g;return F(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.fb=d,f=a,u(h,$g(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Ld=h.h;a.K=a.Ld();g=ef(a.h.manifest);c.mediaElement&&"AUDIO"===c.mediaElement.nodeName&&(g.disableVideo=!0);a.K.configure(g);B(h)})}
444
+ function gm(a,b){var c=b.uri;b=a.H;a.sa=new gk(function(){return a.Ja()});a.sa.addEventListener("regionadd",function(f){f=f.region;Cm(a,"timelineregionadded",f);if(a.G)a.G.onDashTimedMetadata(f)});a.ba=null;a.h.streaming.observeQualityChanges&&(a.ba=new ck(function(){return a.ib()}),a.ba.addEventListener("qualitychange",function(f){var g=f.quality;f=f.position;g=(new Map).set("mediaQuality",{bandwidth:g.bandwidth,audioSamplingRate:g.audioSamplingRate,codecs:g.codecs,contentType:g.contentType,frameRate:g.frameRate,
445
+ height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(mm("mediaqualitychanged",g))}));var d={networkingEngine:b,modifyManifestRequest:function(f,g){var h=a.V;try{h.g.enabled&&(h.s=g.format,yl(h,f,{ot:Bl,su:!h.i}))}catch(k){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",k)}},modifySegmentRequest:function(f,g){ol(a.V,f,g)},filter:function(f){return Dm(a,f)},makeTextStreamsForClosedCaptions:function(f){return Em(a,
446
+ f)},onTimelineRegionAdded:function(f){var g=a.sa;a:{var h=r(g.g);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.schemeIdUri==f.schemeIdUri&&k.id==f.id&&k.startTime==f.startTime&&k.endTime==f.endTime){h=k;break a}h=null}null==h&&(g.g.add(f),f=new L("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return ym(a,f)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
447
+ enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(f){var g=a.m?a.m.g:null;g&&a.m.C&&Fm(a,g.keySystem,f)}},e=Date.now()/1E3;return new Ye(function(){var f,g,h,k;return F(function(l){if(1==l.g)return f=a,u(l,a.K.start(c,d),2);f.i=l.h;g=mm("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new M(2,4,4036);Gm(a.i);h=Date.now()/1E3;k=h-e;a.s.H=k;B(l)})}(),function(){return a.K.stop()})}
448
+ function hm(a,b){var c,d;return F(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Hm(a,{Pb:a.H,onError:function(f){ym(a,f)},Gd:function(f){Im(a,f)},onExpirationUpdated:function(f,g){Jm(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.s.j=Date.now()/1E3-c,a.M&&(f=a.M,f.g&&f.h.classList.add("shaka-hidden")))}}),a.m.configure(a.h.drm),u(e,ug(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Cc(b.mediaElement),3):u(e,Dm(a,a.i),0)})}
449
+ function im(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z;return F(function(A){switch(A.g){case 1:b.startTime=c.startTime;null!=a.Sc&&(b.startTime=a.Sc,a.Sc=null);d=b.mediaElement;e=b.uri;a.fb=e;a.J=new Yj({xd:function(){return d.playbackRate},ud:function(){return d.defaultPlaybackRate},Se:function(E){d.playbackRate=E},Qf:function(E){d.currentTime+=E}});f=function(){return Km(a)};g=function(){return Lm(a)};a.C.o(d,"playing",f);a.C.o(d,"pause",f);a.C.o(d,"ended",f);a.C.o(d,"ratechange",g);pm(a,a.h);
450
+ h=a.h.abrFactory;a.B&&a.cf==h||(a.cf=h,a.B=h(),"function"!=typeof a.B.setMediaElement&&(Ee("AbrManager","Please use an AbrManager with setMediaElement function."),a.B.setMediaElement=function(){}),a.B.configure(a.h.abr));a.La=new Ne(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Xa=a.h.preferredTextLanguage;a.Lc=a.h.preferredTextRole;a.Fc=a.h.preferForcedSubs;Mm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(E,G,H){a.j&&E!=a.j.l&&
451
+ Nm(a,E,!0,void 0===G?!1:G,void 0===H?0:H)});a.B.setMediaElement(d);Kd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Om(a);a.j.configure(a.h.streaming);a.l=Pm;d.textTracks&&a.C.o(d.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Qm(a,E)}});a.dispatchEvent(mm("streaming"));k=null;(l=a.j.l)||(k=nm(a));m=[];p=l||k;n=r([p.video,p.audio]);for(t=n.next();!t.done;t=n.next())(v=t.value)&&!v.segmentIndex&&
452
+ m.push(v.createSegmentIndex());if(!(0<m.length)){A.D(2);break}return u(A,Promise.all(m),2);case 2:a.F=Rm(a,b.startTime);a.Za=Sm(a,b.Od);y=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Tm(a,y);if(l){A.D(4);break}Nm(a,k,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){A.D(5);break}w=a.F.ld();return u(A,Um(k,w),6);case 6:x=A.h,a.F.ke(x);case 5:Vm(a,null,me(k));case 4:return a.F.je(),C=a.zb().find(function(E){return E.active}),C||((z=we(a.i.textStreams,a.Xa,a.Lc,a.Fc)[0]||null)&&Xl(a.s.h,
453
+ z,!0),k&&(z?(k.audio&&Wm(a,k.audio,z)&&(a.$=!0),a.$&&a.I.m.setTextVisibility(!0),Xm(a)):a.$=!1),z&&(a.h.streaming.alwaysStreamText||a.Nb())&&zk(a.j,z)),u(A,a.j.start(),7);case 7:a.h.abr.enabled&&(a.B.enable(),Ym(a)),ae(a.j?a.j.l:null,a.i),Zm(a.i),$m(a),an(a),a.i.variants.some(function(E){return E.primary}),a.Oc=!0,a.C.ya(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Od}),B(A)}})}
454
+ function jm(a,b,c){var d,e,f,g,h,k,l;return F(function(m){return 1==m.g?(d=Hb,e=Date.now()/1E3,f=!0,a.m=Hm(a,{Pb:a.H,onError:function(p){ym(a,p)},Gd:function(p){Im(a,p)},onExpirationUpdated:function(p,n){Jm(a,p,n)},onEvent:function(p){a.dispatchEvent(p);"drmsessionupdate"==p.type&&f&&(f=!1,a.s.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=bh(g),k=qm[h],"application/x-mpegurl"==k&&Uc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
452
455
  primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Ad(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
453
456
  a.m.X=!0,u(m,ug(a.m,[l],[]),2)):u(m,a.m.Cc(b.mediaElement),0)})}
454
- function im(a,b,c){function d(){return Im(a)}b.uri=c.uri;b.startTime=c.startTime;a.fb=b.uri;var e=b.mediaElement;a.F=new Kj(e);var f=!1;a.vb.push(function(){f=!0});null!=b.startTime&&a.F.je(b.startTime);a.J=new Wj({xd:function(){return e.playbackRate},ud:function(){return e.defaultPlaybackRate},Qe:function(k){e.playbackRate=k},Qf:function(k){e.currentTime+=k}});Rm(a,a.h.streaming.rebufferingGoal);a.C.o(e,"playing",d);a.C.o(e,"pause",d);a.C.o(e,"ended",d);a.C.o(e,"ratechange",function(){return Jm(a)});
455
- "none"!=e.preload&&a.C.ya(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Ve});e.audioTracks&&(a.C.o(e.audioTracks,"addtrack",function(){return Ym(a)}),a.C.o(e.audioTracks,"removetrack",function(){return Ym(a)}),a.C.o(e.audioTracks,"change",function(){return Ym(a)}));e.textTracks&&(a.C.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":$m(a,k);break;case "chapters":Om(a,k);break;default:Ym(a)}}),a.C.o(e.textTracks,"removetrack",function(){return Ym(a)}),
456
- a.C.o(e.textTracks,"change",function(){return Ym(a)}));var g=bh(b.uri);e.src=xl(a.V,b.uri,om[g]);(Sc()||Rc("Web0S"))&&e.load();a.l=an;a.dispatchEvent(km("streaming"));var h=new Jc;Bj(e,HTMLMediaElement.HAVE_METADATA,a.C,function(){a.F.ie();h.resolve()});Bj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.C,function(){var k;return G(function(l){if(1==l.g)return bn(a),k=cn(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.$=!0),l.D(2)):u(l,new Promise(function(m){a.C.ya(e.textTracks,"change",m);
457
- (new N(m)).R(1)}),2);if(f)return l.return();dn(a);B(l)})});e.error?h.reject(vm(a)):"none"==e.preload&&(Ua('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.C.ya(e,"error",function(){h.reject(vm(a))});return(new Ye(h,function(){h.reject(new M(2,7,7001));return Promise.resolve()})).ma(function(){a.Oc=
458
- !0})}function bn(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Nd(b);var c=a.h.preferredVariantRole;""!=c&&a.Nd(b,c)}}function dn(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Je(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Je(b,d,c)}}
459
- function $m(a,b){if("metadata"==b.kind){b.mode="hidden";a.C.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,en(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new N(function(){var d=fn(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Aa().R(.5);a.vb.push(function(){c.stop()})}}
460
- function zm(a,b,c,d){b=r(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=r(e.frames),k=h.next();!k.done;k=h.next())en(a,f,g,"org.id3",k.value);if(a.G)a.G.onHlsTimedMetadata(e,f)}}function en(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(km("metadata",b))}
461
- function Om(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new N(function(){b.mode="hidden"})).Aa().R(.5);a.vb.push(function(){c.stop()})}}function Em(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 Fm(a,b){return new ng(b,a.h.drm.updateExpirationTime)}
462
- function Zl(a){return new jf(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(km("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(km("downloadfailed",b))})}
463
- function Pm(a,b){return new Lj(a.g,a.i,a.h.streaming,b,function(){a.Za&&Zj(a.Za,!0);a.j&&a.j.Yc();a.N&&gn(a)},function(c){return a.dispatchEvent(c)})}
464
- function Qm(a){var b=new fk(a.sa);b.addEventListener("enter",function(d){Am(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Am(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Am(a,"timelineregionenter",e),Am(a,"timelineregionexit",e))});var c=new Yj(a.g);c.g.add(b);a.ba&&c.g.add(a.ba);return c}function Rm(a,b){a.N=new Re;a.N.g=Te;Ue(a.N,b,Math.min(.5,b/2));xm(a);a.Ed=(new N(function(){gn(a)})).ka(.25)}
465
- function gn(a){switch(a.l){case an:if(a.g.ended)var b=!0;else{var c=Ci(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Nm:a:if(a.g.ended||$i(a.I))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.Ib();var d=Ci(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ei(a.g.buffered,a.g.currentTime);c=a.N;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Se:Te;c.g=d;b!=d&&xm(a)}function ym(a,b,c,d){return new Ui(a,b,c,d)}
466
- function um(a){return new ll({getBandwidthEstimate:function(){return a.B?a.B.getBandwidthEstimate():NaN},ib:function(){return a.ib()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Qa:function(){return a.Qa()},yb:function(){return a.yb()},U:function(){return a.U()}},a.h.cmcd)}
467
- function Mm(a){return new lk(a.i,{wd:function(){return a.F?a.F.ld():0},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},modifySegmentRequest:function(b,c){ml(a.V,b,c)},S:a.I,Pb:a.H,onError:function(b){return wm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},rh:function(){a.K&&a.K.update&&a.K.update()},De:function(b,c,d){a.F&&a.F.Rf();gn(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(km("segmentappended",b))},qh:function(b,c){(c=c.xe)&&a.ba&&
468
- ck(a.ba,c,b)},uf:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&!d.K&&["audio","video"].includes(b)){c=new Rf(Fc(c));var e=0,f=r(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=r(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Dg(d,"cenc",e);d=d.s}}else d=Promise.resolve();return d},sh:function(b,c,d){zm(a,b,c,d)}})}
469
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Hl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(Ee("streaming.forceTransmuxTS configuration","Please Use streaming.forceTransmux instead."),a.streaming.forceTransmux=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=
470
- .01));var c=Pl(this.h,a,Yl(this));hn(this);return c};
471
- function hn(a){if(a.K){var b=ef(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.K.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{jn(a,a.i)}catch(f){wm(a,f)}a.B&&Zm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||kn(a)}a.H&&a.H.Oe(a.h.streaming.forceHTTPS);if(a.I&&(a.I.configure(a.h.mediaSource),a.I.J=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.gf!=b)){var c=b(),d=a.I,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),
472
- e.destroy());d.g&&(d.g.j=c);a.gf=b;a.j&&(b=a.j,(c=b.j.get(Gb))&&vk(b,c.stream,!0,0,!0))}a.B&&(a.B.configure(a.h.abr),a.h.abr.enabled?a.B.enable():a.B.disable(),Wm(a));a.N&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ue(a.N,b,Math.min(.5,b/2)));a.i&&Km(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Yl(this);Pl(a,this.h,Yl(this));return a};
473
- q.Bg=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.Ja().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.Eh=function(){for(var a in this.h)delete this.h[a];Pl(this.h,Yl(this),Yl(this));hn(this)};q.Jf=function(){return this.l};q.Sg=function(){return this.g};q.Ic=function(){return this.H};q.me=function(){return this.fb};
474
- q.td=function(){return this.G?this.G:null};q.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Lb=function(){return this.i?this.i.presentationTimeline.Lb():!1};q.ic=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};
475
- q.Ja=function(){if(!this.Oc)return{start:0,end:0};if(this.i){var a=this.i.presentationTimeline;return{start:a.ec(),end:a.jb()}}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.eh=function(){this.U()&&(this.g.currentTime=this.Ja().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Hc=function(){return this.m?this.m.Hc():Infinity};
476
- q.vd=function(){return this.m?this.m.vd():{}};q.Qc=function(){return this.N?this.N.g==Te:!1};q.yb=function(){return this.g?this.J?this.J.i:1:0};q.$e=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.J.set(a),this.l==Nm&&(this.B.playbackRateChanged(a),uk(this.j,1<Math.abs(a))))};q.wf=function(){var a=this.J.ud();this.l==an&&this.J.set(a);this.l==Nm&&(this.J.set(a),this.B.playbackRateChanged(a),uk(this.j,!1))};
457
+ function km(a,b,c){function d(){return Km(a)}b.uri=c.uri;b.startTime=c.startTime;a.fb=b.uri;var e=b.mediaElement;a.F=new Mj(e);var f=!1;a.vb.push(function(){f=!0});null!=b.startTime&&a.F.ke(b.startTime);a.J=new Yj({xd:function(){return e.playbackRate},ud:function(){return e.defaultPlaybackRate},Se:function(k){e.playbackRate=k},Qf:function(k){e.currentTime+=k}});Tm(a,a.h.streaming.rebufferingGoal);a.C.o(e,"playing",d);a.C.o(e,"pause",d);a.C.o(e,"ended",d);a.C.o(e,"ratechange",function(){return Lm(a)});
458
+ "none"!=e.preload&&a.C.ya(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Od});e.audioTracks&&(a.C.o(e.audioTracks,"addtrack",function(){return $m(a)}),a.C.o(e.audioTracks,"removetrack",function(){return $m(a)}),a.C.o(e.audioTracks,"change",function(){return $m(a)}));e.textTracks&&(a.C.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":bn(a,k);break;case "chapters":Qm(a,k);break;default:$m(a)}}),a.C.o(e.textTracks,"removetrack",function(){return $m(a)}),
459
+ a.C.o(e.textTracks,"change",function(){return $m(a)}));var g=bh(b.uri);e.src=zl(a.V,b.uri,qm[g]);(Sc()||Rc("Web0S"))&&e.load();a.l=cn;a.dispatchEvent(mm("streaming"));var h=new Jc;Dj(e,HTMLMediaElement.HAVE_METADATA,a.C,function(){a.F.je();h.resolve()});Dj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.C,function(){var k;return F(function(l){if(1==l.g)return dn(a),k=en(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.$=!0),l.D(2)):u(l,new Promise(function(m){a.C.ya(e.textTracks,"change",m);
460
+ (new N(m)).R(1)}),2);if(f)return l.return();fn(a);B(l)})});e.error?h.reject(xm(a)):"none"==e.preload&&(Ua('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.C.ya(e,"error",function(){h.reject(xm(a))});return(new Ye(h,function(){h.reject(new M(2,7,7001));return Promise.resolve()})).ma(function(){a.Oc=
461
+ !0})}function dn(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Nd(b);var c=a.h.preferredVariantRole;""!=c&&a.Nd(b,c)}}function fn(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)}}
462
+ function bn(a,b){if("metadata"==b.kind){b.mode="hidden";a.C.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,gn(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new N(function(){var d=hn(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Aa().R(.5);a.vb.push(function(){c.stop()})}}
463
+ function Bm(a,b,c,d){b=r(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=r(e.frames),k=h.next();!k.done;k=h.next())gn(a,f,g,"org.id3",k.value);if(a.G)a.G.onHlsTimedMetadata(e,f)}}function gn(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(mm("metadata",b))}
464
+ function Qm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new N(function(){b.mode="hidden"})).Aa().R(.5);a.vb.push(function(){c.stop()})}}function Gm(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 Hm(a,b){return new ng(b,a.h.drm.updateExpirationTime)}
465
+ function am(a){return new jf(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(mm("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(mm("downloadfailed",b))})}
466
+ function Rm(a,b){return new Nj(a.g,a.i,a.h.streaming,b,function(){a.Za&&bk(a.Za,!0);a.j&&a.j.Yc();a.N&&jn(a)},function(c){return a.dispatchEvent(c)})}
467
+ function Sm(a,b){b=new hk(a.sa,a.S()||0<b);b.addEventListener("enter",function(d){Cm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Cm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Cm(a,"timelineregionenter",e),Cm(a,"timelineregionexit",e))});var c=new ak(a.g);c.g.add(b);a.ba&&c.g.add(a.ba);return c}function Tm(a,b){a.N=new Re;a.N.g=Te;Ue(a.N,b,Math.min(.5,b/2));zm(a);a.Ed=(new N(function(){jn(a)})).ka(.25)}
468
+ function jn(a){switch(a.l){case cn:if(a.g.ended)var b=!0;else{var c=Ei(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Pm:a:if(a.g.ended||bj(a.I))b=!0;else{if(a.i.presentationTimeline.S()){c=a.i.presentationTimeline.Ib();var d=Ei(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Gi(a.g.buffered,a.g.currentTime);c=a.N;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Se:Te;c.g=d;b!=d&&zm(a)}function Am(a,b,c,d){return new Wi(a,b,c,d)}
469
+ function wm(a){return new nl({getBandwidthEstimate:function(){return a.B?a.B.getBandwidthEstimate():NaN},ib:function(){return a.ib()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Qa:function(){return a.Qa()},yb:function(){return a.yb()},S:function(){return a.S()}},a.h.cmcd)}
470
+ function Om(a){return new nk(a.i,{wd:function(){return a.F?a.F.ld():0},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},modifySegmentRequest:function(b,c){ol(a.V,b,c)},T:a.I,Pb:a.H,onError:function(b){return ym(a,b)},onEvent:function(b){return a.dispatchEvent(b)},rh:function(){a.K&&a.K.update&&a.K.update()},Fe:function(b,c,d){a.F&&a.F.Rf();jn(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(mm("segmentappended",b))},qh:function(b,c){(c=c.ze)&&a.ba&&
471
+ ek(a.ba,c,b)},vf:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&!d.K&&["audio","video"].includes(b)){c=new Rf(Fc(c));var e=0,f=r(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=r(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Dg(d,"cenc",e);d=d.s}}else d=Promise.resolve();return d},sh:function(b,c,d){Bm(a,b,c,d)}})}
472
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Jl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(Ee("streaming.forceTransmuxTS configuration","Please Use streaming.forceTransmux instead."),a.streaming.forceTransmux=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=
473
+ .01));var c=Rl(this.h,a,$l(this));kn(this);return c};
474
+ function kn(a){if(a.K){var b=ef(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.K.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{ln(a,a.i)}catch(f){ym(a,f)}a.B&&an(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||mn(a)}a.H&&a.H.Qe(a.h.streaming.forceHTTPS);if(a.I&&(a.I.configure(a.h.mediaSource),a.I.J=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.hf!=b)){var c=b(),d=a.I,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),
475
+ e.destroy());d.g&&(d.g.j=c);a.hf=b;a.j&&(b=a.j,(c=b.j.get(Gb))&&xk(b,c.stream,!0,0,!0))}a.B&&(a.B.configure(a.h.abr),a.h.abr.enabled?a.B.enable():a.B.disable(),Ym(a));a.N&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ue(a.N,b,Math.min(.5,b/2)));a.i&&Mm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=$l(this);Rl(a,this.h,$l(this));return a};
476
+ q.Bg=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.Ja().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.Eh=function(){for(var a in this.h)delete this.h[a];Rl(this.h,$l(this),$l(this));kn(this)};q.pe=function(){return this.l};q.Sg=function(){return this.g};q.Ic=function(){return this.H};q.oe=function(){return this.fb};
477
+ q.td=function(){return this.G?this.G:null};q.S=function(){return this.i?this.i.presentationTimeline.S():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Lb=function(){return this.i?this.i.presentationTimeline.Lb():!1};q.ic=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
478
+ q.Ja=function(){if(!this.Oc)return{start:0,end:0};if(this.i){var a=this.i.presentationTimeline;return{start:a.ec(),end:a.jb()}}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.eh=function(){this.S()&&(this.g.currentTime=this.Ja().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Hc=function(){return this.m?this.m.Hc():Infinity};
479
+ q.vd=function(){return this.m?this.m.vd():{}};q.Qc=function(){return this.N?this.N.g==Te:!1};q.yb=function(){return this.g?this.J?this.J.i:1:0};q.bf=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.J.set(a),this.l==Pm&&(this.B.playbackRateChanged(a),wk(this.j,1<Math.abs(a))))};q.xf=function(){var a=this.J.ud();this.l==cn&&this.J.set(a);this.l==Pm&&(this.J.set(a),this.B.playbackRateChanged(a),wk(this.j,!1))};
477
480
  q.Qa=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,ue(e)){var f=me(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 te(g)}):[]};
478
- q.zb=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ne(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?cn(this).map(function(f){return re(f)}):[]};q.Kg=function(){return this.i?this.i.imageStreams.map(function(a){return oe(a)}):[]};
479
- q.$g=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,F;return G(function(H){if(1==H.g)return c.i?(d=c.i.imageStreams.find(function(J){return J.id==a}))?d.segmentIndex?H.D(3):u(H,d.createSegmentIndex(),3):H.return(null):H.D(2);if(2!=H.g){e=d.segmentIndex.find(b);if(null==e)return H.return(null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return H.return(null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;t=l/p;v=m*p;
480
- y=f.l-f.startTime;w=f.B||y/v;x=f.startTime;z=C=0;1<v&&(A=Math.floor((b-f.startTime)/w),x=f.startTime+A*w,C=A%m*n,z=Math.floor(A/m)*t);E=!1;if(F=f.s)E=!0,t=F.height,C=F.positionX,z=F.positionY,n=F.width;return H.return({imageHeight:l,imageWidth:k,height:t,positionX:C,positionY:z,startTime:x,duration:w,uris:f.Pa(),width:n,sprite:E})}return H.return(null)})};
481
- q.Ke=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(Vl(this.s.h,b,!1),xk(this.j,b),ln(this),this.Xa=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=cn(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,pe(c)==a.id?c.mode=this.$?"showing":"hidden":c.mode="disabled";ln(this)}};
482
- q.Le=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ua("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&&ue(d)&&(Lm(this,d,!1,b,c),this.La=new Me(d),Zm(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,
483
- pe(c)==a.id){mn(this,c);break}};q.Ag=function(){return nn(this.Qa())};q.Yg=function(){return nn(this.zb())};q.zg=function(){return Array.from(on(this.Qa()))};q.Xg=function(){return Array.from(on(this.zb()))};
484
- q.Nd=function(a,b,c){c=void 0===c?0:c;if(this.i&&this.F){this.La=new Ne(a,b||"",c,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var d=this.La.create(this.i.variants);c=null;d=r(d.values());for(var e=d.next();!e.done;e=d.next())if(e=e.value,!c||b(c,a)>b(e,a))c=e;c?(b=me(c),this.Le(b,!0)):kn(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
485
- a=Kb(a);d=c=null;e=r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=te(f);Kb(g.language)==a&&(c=f,b?g.roles.includes(b)&&(d=f):0==g.roles.length&&(d=f))}d?mn(this,d):c&&mn(this,c)}};
486
- q.Je=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.Xa=a,this.Lc=b||"",this.Fc=c,(a=we(this.i.textStreams,this.Xa,this.Lc,this.Fc)[0]||null)&&a!=this.j.s&&(Vl(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.Nb()))xk(this.j,a),ln(this)}else{var d=Kb(a);(a=this.zb().find(function(e){return Kb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Ke(a)}};
487
- q.Hh=function(a){if(this.i&&this.F){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.La=new Ne(b.language,"",0,a),kn(this))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&mn(this,b)}};
488
- q.Nb=function(){var a=this.$;return this.I?this.I.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?cn(this).some(function(b){return"showing"==b.mode}):a};q.Hf=function(){return this.g&&this.g.src&&this.g.textTracks?pn(this).map(function(a){return re(a)}):[]};
489
- q.Dg=function(a){var b=Kb(a),c=pn(this).filter(function(h){return Kb(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=r(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=r(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
490
- function cn(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function fn(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function pn(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
491
- q.Te=function(a){a=!!a;if(this.$!=a){this.$=a;if(this.l==Nm)this.I.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=we(this.i.textStreams,this.Xa,this.Lc,this.Fc),0<a.length&&(xk(this.j,a[0]),ln(this))):tk(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=cn(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")}Vm(this)}};
492
- q.Ug=function(){if(!this.U())return null;var a=this.ua.l,b=0;if(this.F)b=this.F.ld();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.i+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
493
- q.Kf=function(){if(!this.U())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.ib=function(){if(this.l==Nm)return this.I.ib();var a={total:[],audio:[],video:[],text:[]};this.l==an&&(a.total=Fi(this.g.buffered));return a};
494
- q.getStats=function(){if(this.l!=Nm&&this.l!=an)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Im(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.s;b=
495
- Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.s.N=this.F.nf(),this.s.P=this.F.pf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.K=d;this.s.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.J?c.J:NaN):c=NaN;this.s.B=c;if(this.l==Nm){if(c=this.j.l)this.s.F=(this.J?this.J.i:1)*c.bandwidth;c&&c.video&&(b=this.s,d=c.video.height||NaN,b.s=c.video.width||NaN,b.l=d);this.U()&&(c=this.Kf().valueOf()+
496
- 1E3*this.Ja().end,this.s.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.I=this.i.presentationTimeline.g);c=this.B.getBandwidthEstimate();this.s.C=c}this.l==an&&(c=this.s,b=a.videoHeight||NaN,c.s=a.videoWidth||NaN,c.l=b);var e=this.s;a=e.s;c=e.l;b=e.F;d=e.K;var f=e.M,g=e.J,h=e.P,k=e.N,l=e.C,m=e.i,p=e.m,n=e.H,t=e.j,v=Sl(e.g,"playing"),y=Sl(e.g,"paused"),w=Sl(e.g,"buffering"),x=e.B,C=e.G,z=e.I,A=Tl(e.g),E=[];e=r(e.h.g);for(var F=e.next();!F.done;F=e.next())F=F.value,E.push({timestamp:F.timestamp,
497
- id:F.id,type:F.type,fromAdaptation:F.fromAdaptation,bandwidth:F.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:p,manifestTimeSeconds:n,drmTimeSeconds:t,playTime:v,pauseTime:y,bufferingTime:w,licenseTime:x,liveLatency:C,maxSegmentDuration:z,stateHistory:A,switchHistory:E}};
498
- q.mg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,v,y,w,x,C;return G(function(z){switch(z.g){case 1:if(h.l!=Nm&&h.l!=an)throw new M(1,7,7004);if(d){z.D(2);break}return u(z,qn(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(A){}if(h.l!=an){z.D(4);break}g&&(c="forced");return u(z,rn(h,a,b,c,d,f||"",k),5);case 5:l=h.zb();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return Ym(h),z.return(m);throw new M(1,2,2012);case 4:p=
499
- Hb;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new M(1,4,4033);if(!k.length){z.D(6);break}return u(z,sn(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=z.h,v=tn(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=Xi(y),d="text/vtt";case 6:w={id:h.jf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Uj(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.ea,primary:!1,trickModeVideo:null,
500
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};x=wd(w.mimeType,w.codecs);C=Cd(x);if(!C)throw new M(2,2,2014,d);h.i.textStreams.push(w);Ym(h);return z.return(ne(w))}})};
501
- q.ng=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C;return G(function(z){switch(z.g){case 1:if(c.l!=Nm&&c.l!=an)throw new M(1,7,7004);if(c.l==an)throw new M(1,2,2016);if(b){z.D(2);break}return u(z,qn(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new M(1,2,2017,a);d=Hb;e=c.i.presentationTimeline.getDuration();if(Infinity==e)throw new M(1,4,4045);return u(z,sn(c,a,c.H,c.h.streaming.retryParameters),4);case 4:f=z.h;g=Dd[b];if(!g)throw new M(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,
502
- segmentEnd:e,vttOffset:0};l=Fc(f);m=h.parseMedia(l,k);p=[];n={};t=r(m);for(v=t.next();!v.done;n={vc:n.vc},v=t.next())y=v.value,n.vc=Bb([a],[y.payload])[0],w=new yi(y.startTime,y.endTime,function(A){return function(){return[A.vc]}}(n),0,null,null,0,0,Infinity),n.vc.includes("#xywh")&&(x=n.vc.split("#xywh=")[1].split(","),4===x.length&&w.ag({height:parseInt(x[3],10),positionX:parseInt(x[0],10),positionY:parseInt(x[1],10),width:parseInt(x[2],10)})),p.push(w);C={id:c.jf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},
503
- segmentIndex:new Rj(p),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Bc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1"};c.i.imageStreams.push(C);Ym(c);return z.return(oe(C))}})};
504
- q.lg=function(a,b,c){var d=this,e,f,g,h;return G(function(k){switch(k.g){case 1:if(d.l!=Nm&&d.l!=an)throw new M(1,7,7004);if(c){k.D(2);break}return u(k,qn(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return u(k,rn(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Hf();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return u(k,new Promise(function(l,m){d.C.ya(f,"load",l);d.C.ya(f,"error",function(){m(new M(1,2,2015))})}),6);case 6:return k.return(h);
505
- case 5:throw new M(1,2,2012);}})};function qn(a,b){var c,d;return G(function(e){switch(e.g){case 1:c=bh(b);if(d=un[c])return e.return(d);D(e,2);return u(e,dh(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:wa(e);case 3:if(d)return e.return(d);throw new M(1,2,2011,c);}})}
506
- function rn(a,b,c,d,e,f,g){var h,k,l,m;return G(function(p){if(1==p.g)return"text/vtt"!=e||g.length?u(p,sn(a,b,a.H,a.h.streaming.retryParameters),3):p.D(2);2!=p.g&&(h=p.h,k=tn(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Xi(l),e="text/vtt");m=document.createElement("track");var n=a.V,t=b;try{if(n.g.enabled){var v=yl(n);v.ot=El;v.su=!0;var y=Al(v);var w=Bl(t,y)}else w=t}catch(x){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",x),w=t}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
507
- a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function sn(a,b,c,d){var e,f,g;return G(function(h){if(1==h.g){e=tf;f=nf([b],d);f.method="GET";var k=a.V;try{k.g.enabled&&wl(k,f,{ot:El,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
508
- function tn(a,b,c,d){var e=Dd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Fc(b),b=c.parseMedia(b,a),kl(b,d);throw new M(2,2,2014,c);}q.Pe=function(a,b){this.Rc.width=a;this.Rc.height=b};q.Ge=function(a){if(this.l==Nm){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.B)b=!1;else{for(var c=r(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Nc||d.Ia||d.eb||(d.Nc=!1,sk(b,d,a));b=!0}}else b=!1;return b};
481
+ q.zb=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ne(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?en(this).map(function(f){return re(f)}):[]};q.Kg=function(){return this.i?this.i.imageStreams.map(function(a){return oe(a)}):[]};
482
+ q.$g=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G;return F(function(H){if(1==H.g)return c.i?(d=c.i.imageStreams.find(function(J){return J.id==a}))?d.segmentIndex?H.D(3):u(H,d.createSegmentIndex(),3):H.return(null):H.D(2);if(2!=H.g){e=d.segmentIndex.find(b);if(null==e)return H.return(null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return H.return(null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;t=l/p;v=m*p;
483
+ y=f.l-f.startTime;w=f.B||y/v;x=f.startTime;z=C=0;1<v&&(A=Math.floor((b-f.startTime)/w),x=f.startTime+A*w,C=A%m*n,z=Math.floor(A/m)*t);E=!1;if(G=f.s)E=!0,t=G.height,C=G.positionX,z=G.positionY,n=G.width;return H.return({imageHeight:l,imageWidth:k,height:t,positionX:C,positionY:z,startTime:x,duration:w,uris:f.Pa(),width:n,sprite:E})}return H.return(null)})};
484
+ 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.s&&(Xl(this.s.h,b,!1),zk(this.j,b),nn(this),this.Xa=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=en(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,pe(c)==a.id?c.mode=this.$?"showing":"hidden":c.mode="disabled";nn(this)}};
485
+ q.Ne=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&&Ua("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&&ue(d)&&(Nm(this,d,!1,b,c),this.La=new Me(d),an(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,
486
+ pe(c)==a.id){on(this,c);break}};q.Ag=function(){return pn(this.Qa())};q.Yg=function(){return pn(this.zb())};q.zg=function(){return Array.from(qn(this.Qa()))};q.Xg=function(){return Array.from(qn(this.zb()))};
487
+ q.Nd=function(a,b,c){c=void 0===c?0:c;if(this.i&&this.F){this.La=new Ne(a,b||"",c,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var d=this.La.create(this.i.variants);c=null;d=r(d.values());for(var e=d.next();!e.done;e=d.next())if(e=e.value,!c||b(c,a)>b(e,a))c=e;c?(b=me(c),this.Ne(b,!0)):mn(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
488
+ a=Kb(a);d=c=null;e=r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=te(f);Kb(g.language)==a&&(c=f,b?g.roles.includes(b)&&(d=f):0==g.roles.length&&(d=f))}d?on(this,d):c&&on(this,c)}};
489
+ q.Le=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.Xa=a,this.Lc=b||"",this.Fc=c,(a=we(this.i.textStreams,this.Xa,this.Lc,this.Fc)[0]||null)&&a!=this.j.s&&(Xl(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.Nb()))zk(this.j,a),nn(this)}else{var d=Kb(a);(a=this.zb().find(function(e){return Kb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Me(a)}};
490
+ q.Hh=function(a){if(this.i&&this.F){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.La=new Ne(b.language,"",0,a),mn(this))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&on(this,b)}};
491
+ q.Nb=function(){var a=this.$;return this.I?this.I.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?en(this).some(function(b){return"showing"==b.mode}):a};q.If=function(){return this.g&&this.g.src&&this.g.textTracks?rn(this).map(function(a){return re(a)}):[]};
492
+ q.Dg=function(a){var b=Kb(a),c=rn(this).filter(function(h){return Kb(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=r(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=r(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
493
+ function en(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function hn(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function rn(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
494
+ q.Ve=function(a){a=!!a;if(this.$!=a){this.$=a;if(this.l==Pm)this.I.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.s||(a=we(this.i.textStreams,this.Xa,this.Lc,this.Fc),0<a.length&&(zk(this.j,a[0]),nn(this))):vk(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=en(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")}Xm(this)}};
495
+ q.Ug=function(){if(!this.S())return null;var a=this.ua.l,b=0;if(this.F)b=this.F.ld();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.i+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
496
+ q.Kf=function(){if(!this.S())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.ib=function(){if(this.l==Pm)return this.I.ib();var a={total:[],audio:[],video:[],text:[]};this.l==cn&&(a.total=Hi(this.g.buffered));return a};
497
+ q.getStats=function(){if(this.l!=Pm&&this.l!=cn)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Km(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.s;b=
498
+ Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.s.N=this.F.pf(),this.s.P=this.F.qf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.K=d;this.s.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.J?c.J:NaN):c=NaN;this.s.B=c;if(this.l==Pm){if(c=this.j.l)this.s.F=(this.J?this.J.i:1)*c.bandwidth;c&&c.video&&(b=this.s,d=c.video.height||NaN,b.s=c.video.width||NaN,b.l=d);this.S()&&(c=this.Kf().valueOf()+
499
+ 1E3*this.Ja().end,this.s.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.I=this.i.presentationTimeline.g);c=this.B.getBandwidthEstimate();this.s.C=c}this.l==cn&&(c=this.s,b=a.videoHeight||NaN,c.s=a.videoWidth||NaN,c.l=b);var e=this.s;a=e.s;c=e.l;b=e.F;d=e.K;var f=e.M,g=e.J,h=e.P,k=e.N,l=e.C,m=e.i,p=e.m,n=e.H,t=e.j,v=Ul(e.g,"playing"),y=Ul(e.g,"paused"),w=Ul(e.g,"buffering"),x=e.B,C=e.G,z=e.I,A=Vl(e.g),E=[];e=r(e.h.g);for(var G=e.next();!G.done;G=e.next())G=G.value,E.push({timestamp:G.timestamp,
500
+ id:G.id,type:G.type,fromAdaptation:G.fromAdaptation,bandwidth:G.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:p,manifestTimeSeconds:n,drmTimeSeconds:t,playTime:v,pauseTime:y,bufferingTime:w,licenseTime:x,liveLatency:C,maxSegmentDuration:z,stateHistory:A,switchHistory:E}};
501
+ q.mg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,v,y,w,x,C;return F(function(z){switch(z.g){case 1:if(h.l!=Pm&&h.l!=cn)throw new M(1,7,7004);if(d){z.D(2);break}return u(z,sn(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(A){}if(h.l!=cn){z.D(4);break}g&&(c="forced");return u(z,tn(h,a,b,c,d,f||"",k),5);case 5:l=h.zb();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return $m(h),z.return(m);throw new M(1,2,2012);case 4:p=
502
+ Hb;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new M(1,4,4033);if(!k.length){z.D(6);break}return u(z,un(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=z.h,v=vn(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=Zi(y),d="text/vtt";case 6:w={id:h.kf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Wj(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.ea,primary:!1,trickModeVideo:null,
503
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};x=wd(w.mimeType,w.codecs);C=Cd(x);if(!C)throw new M(2,2,2014,d);h.i.textStreams.push(w);$m(h);return z.return(ne(w))}})};
504
+ q.ng=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C;return F(function(z){switch(z.g){case 1:if(c.l!=Pm&&c.l!=cn)throw new M(1,7,7004);if(c.l==cn)throw new M(1,2,2016);if(b){z.D(2);break}return u(z,sn(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new M(1,2,2017,a);d=Hb;e=c.i.presentationTimeline.getDuration();if(Infinity==e)throw new M(1,4,4045);return u(z,un(c,a,c.H,c.h.streaming.retryParameters),4);case 4:f=z.h;g=Dd[b];if(!g)throw new M(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,
505
+ segmentEnd:e,vttOffset:0};l=Fc(f);m=h.parseMedia(l,k);p=[];n={};t=r(m);for(v=t.next();!v.done;n={vc:n.vc},v=t.next())y=v.value,n.vc=Bb([a],[y.payload])[0],w=new Ai(y.startTime,y.endTime,function(A){return function(){return[A.vc]}}(n),0,null,null,0,0,Infinity),n.vc.includes("#xywh")&&(x=n.vc.split("#xywh=")[1].split(","),4===x.length&&w.ag({height:parseInt(x[3],10),positionX:parseInt(x[0],10),positionY:parseInt(x[1],10),width:parseInt(x[2],10)})),p.push(w);C={id:c.kf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},
506
+ segmentIndex:new Tj(p),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Bc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1"};c.i.imageStreams.push(C);$m(c);return z.return(oe(C))}})};
507
+ q.lg=function(a,b,c){var d=this,e,f,g,h;return F(function(k){switch(k.g){case 1:if(d.l!=Pm&&d.l!=cn)throw new M(1,7,7004);if(c){k.D(2);break}return u(k,sn(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return u(k,tn(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.If();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return u(k,new Promise(function(l,m){d.C.ya(f,"load",l);d.C.ya(f,"error",function(){m(new M(1,2,2015))})}),6);case 6:return k.return(h);
508
+ case 5:throw new M(1,2,2012);}})};function sn(a,b){var c,d;return F(function(e){switch(e.g){case 1:c=bh(b);if(d=wn[c])return e.return(d);D(e,2);return u(e,dh(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:wa(e);case 3:if(d)return e.return(d);throw new M(1,2,2011,c);}})}
509
+ function tn(a,b,c,d,e,f,g){var h,k,l,m;return F(function(p){if(1==p.g)return"text/vtt"!=e||g.length?u(p,un(a,b,a.H,a.h.streaming.retryParameters),3):p.D(2);2!=p.g&&(h=p.h,k=vn(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Zi(l),e="text/vtt");m=document.createElement("track");var n=a.V,t=b;try{if(n.g.enabled){var v=Al(n);v.ot=Gl;v.su=!0;var y=Cl(v);var w=Dl(t,y)}else w=t}catch(x){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",x),w=t}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
510
+ a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function un(a,b,c,d){var e,f,g;return F(function(h){if(1==h.g){e=tf;f=nf([b],d);f.method="GET";var k=a.V;try{k.g.enabled&&yl(k,f,{ot:Gl,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
511
+ function vn(a,b,c,d){var e=Dd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Fc(b),b=c.parseMedia(b,a),ml(b,d);throw new M(2,2,2014,c);}q.Re=function(a,b){this.Rc.width=a;this.Rc.height=b};q.Ie=function(a){if(this.l==Pm){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.B)b=!1;else{for(var c=r(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Nc||d.Ia||d.eb||(d.Nc=!1,uk(b,d,a));b=!0}}else b=!1;return b};
509
512
  q.Pg=function(){Ua("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};q.Qg=function(){return this.Ld};
510
- function Yl(a){var b=Nl();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Ge(d))}};b.textDisplayFactory=function(){return a.Cd?new cl(a.g,a.Cd):new Xk(a.g)};return b}q.Ue=function(a){this.Cd=a};
511
- function Cm(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 Vj;h={id:a.jf++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
512
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Gb,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 Bm(a,b){return G(function(c){if(1==c.g)return u(c,vn(a,b),2);jn(a,b);B(c)})}
513
- function vn(a,b){var c;return G(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Zd(c,b),2);Xm(b);B(d)})}function jn(a,b){if(a.l!=pm){Yd(b.variants,a.h.restrictions,a.Rc)&&a.j&&Ym(a);var c=a.m?a.m.g:null;if(c&&a.m.C)for(var d=r(b.variants),e=d.next();!e.done;e=d.next())e=e.value,Dm(a,c.keySystem,e.video),Dm(a,c.keySystem,e.audio);wn(a,b)}}
514
- function Dm(a,b,c){if(c){c=r(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=r(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Dg(a.m,e.initDataType,e.initData)}}}
515
- function Sm(a,b){var c,d,e,f,g;return G(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p,n;return G(function(t){if(1==t.g)return k?u(t,k.createSegmentIndex(),2):t.return(null);p=(m=k.segmentIndex.cc(l))?m.next().value:null;if(!p)return t.return(null);n=p.startTime;return t.return(n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
516
- function xm(a){var b=a.Qc();if(a.s&&a.N&&a.F){var c=a.J;c.j=b;Xj(c);a.V&&(c=a.V,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Im(a)}b=(new Map).set("buffering",b);a.dispatchEvent(km("buffering",b))}function Jm(a){var b=a.g.playbackRate;0!=b&&(a.J&&a.J.set(b),b=km("ratechange"),a.dispatchEvent(b))}function Im(a){if(a.s&&a.N){var b=a.s.g;a.N.g==Te?Rl(b,"buffering"):a.g.paused?Rl(b,"paused"):a.g.ended?Rl(b,"ended"):Rl(b,"playing")}}
517
- function Zm(a){try{wn(a,a.i)}catch(c){return wm(a,c),!1}var b=a.i.variants.filter(function(c){return ue(c)});b=a.La.create(b);a.B.setVariants(Array.from(b.values()));return!0}function lm(a){return Zm(a)?a.B.chooseVariant():null}function kn(a){var b=lm(a);b&&Lm(a,b,!0,!0,0)}
518
- function Lm(a,b,c,d,e){var f=a.j.l;if(b==f)d&&wk(a.j,b,d,e,!0);else{var g=a.s.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));wk(a.j,b,d,e,void 0,c);d=null;f&&(d=me(f));b=me(b);c?Tm(a,d,b):xn(a,d,b)}}function mn(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=te(c);b=te(b);xn(a,c,b)}
519
- function Um(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=Kb(a.h.preferredTextLanguage);c=Kb(c.language);if(2==a.h.autoShowText)return Jb(c,d);if(3==a.h.autoShowText)return a=Kb(b.language),Jb(c,d)&&!Jb(a,c);Ua("Invalid autoShowText setting!");return!1}function Tm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.M&&Qi(a.M,c);c=km("adaptation",b);yn(a,c)}function Ym(a){var b=km("trackschanged");yn(a,b)}
520
- function xn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.M&&Qi(a.M,c);c=km("variantchanged",b);yn(a,c)}function ln(a){var b=km("textchanged");yn(a,b)}function Vm(a){var b=km("texttrackvisibility");yn(a,b)}function Wm(a){var b=(new Map).set("newStatus",a.h.abr.enabled);yn(a,km("abrstatuschanged",b))}
521
- function zn(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||a.l!=Nm||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;b=a.Qa().find(function(g){return g.active});for(var d=a.i,e=r(d.variants),f=e.next();!f.done;f=e.next())f=f.value,f.id===b.id&&(f.disabledUntilTime=Date.now()/1E3+c);Yd(d.variants,a.h.restrictions,a.Rc);b=lm(a);if(!b)return!1;d=a.ib().video.reduce(function(g,h){return g+h.end-h.start},0);Lm(a,b,!1,!0,d);a.lf.R(c);return!0}
522
- function wm(a,b){if(a.l!=pm)if(zn(a,b))b.handled=!0;else{var c=km("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Am(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(km(b,c))}
523
- function vm(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new M(2,3,3016,b,c,a.g.error.message)}
524
- function Gm(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&&!An.includes(l)}h!=f.allowedByKeySystem&&
525
- (e=!0)}}}if(!e||Zm(a))(b=a.j.l)&&!b.allowedByKeySystem&&kn(a),e&&Ym(a)}}function Hm(a,b,c){if(a.K&&a.K.onExpirationUpdated)a.K.onExpirationUpdated(b,c);b=km("expirationupdated");a.dispatchEvent(b)}function Km(a,b,c){0<b&&(a.U()||a.cg(b));b=a.getDuration();c<b&&(a.U()||a.Sa(c))}
526
- function wn(a,b){a=a.m?a.m.vd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=r(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=r(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=r(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var p=a[c?"00":m];p?An.includes(p)&&g.add(p):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
527
- missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new M(2,4,4012,a);}function Xm(a){if(!a.variants.some(ue))throw new M(2,4,4032);}function yn(a,b){G(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=pm&&a.dispatchEvent(b);B(c)})}function on(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(Kb(c.language)):b.add("und");return b}
528
- function nn(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=Kb(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){k=r(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var p=null;c.has(l)&&c.get(l).has(m)&&(p=c.get(l).get(m));
529
- h.push({language:l,role:m,label:p})}});return h}function rm(){return new M(2,7,7E3)}function jm(a,b,c,d,e,f){return d==a&&e.mediaElement==f.mediaElement&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Pk(){return{mediaElement:null,mimeType:null,startTime:null,Ve:NaN,uri:null}}function sm(a){return new Promise(function(b,c){a.Rb=function(){return c(rm())};a.Fd=function(){return b()};a.onError=function(d){return c(d)};a.Hd=function(){return c(rm())}})}I("shaka.Player",S);
530
- S.prototype.setVideoContainer=S.prototype.Ue;S.prototype.getManifestParserFactory=S.prototype.Qg;S.prototype.getManifest=S.prototype.Pg;S.prototype.retryStreaming=S.prototype.Ge;S.prototype.setMaxHardwareResolution=S.prototype.Pe;S.prototype.addChaptersTrack=S.prototype.lg;S.prototype.addThumbnailsTrack=S.prototype.ng;S.prototype.addTextTrackAsync=S.prototype.mg;S.prototype.getStats=S.prototype.getStats;S.prototype.getBufferedInfo=S.prototype.ib;S.prototype.getPresentationStartTimeAsDate=S.prototype.Kf;
531
- S.prototype.getPlayheadTimeAsDate=S.prototype.Ug;S.prototype.setTextTrackVisibility=S.prototype.Te;S.prototype.getChapters=S.prototype.Dg;S.prototype.getChaptersTracks=S.prototype.Hf;S.prototype.isTextTrackVisible=S.prototype.Nb;S.prototype.selectVariantsByLabel=S.prototype.Hh;S.prototype.selectTextLanguage=S.prototype.Je;S.prototype.selectAudioLanguage=S.prototype.Nd;S.prototype.getTextLanguages=S.prototype.Xg;S.prototype.getAudioLanguages=S.prototype.zg;S.prototype.getTextLanguagesAndRoles=S.prototype.Yg;
532
- S.prototype.getAudioLanguagesAndRoles=S.prototype.Ag;S.prototype.selectVariantTrack=S.prototype.Le;S.prototype.selectTextTrack=S.prototype.Ke;S.prototype.getThumbnails=S.prototype.$g;S.prototype.getImageTracks=S.prototype.Kg;S.prototype.getTextTracks=S.prototype.zb;S.prototype.getVariantTracks=S.prototype.Qa;S.prototype.cancelTrickPlay=S.prototype.wf;S.prototype.trickPlay=S.prototype.$e;S.prototype.getPlaybackRate=S.prototype.yb;S.prototype.isBuffering=S.prototype.Qc;S.prototype.getKeyStatuses=S.prototype.vd;
533
- S.prototype.getExpiration=S.prototype.Hc;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.eh;S.prototype.seekRange=S.prototype.Ja;S.prototype.isAudioOnly=S.prototype.ic;S.prototype.isInProgress=S.prototype.Lb;S.prototype.isLive=S.prototype.U;S.prototype.getAdManager=S.prototype.td;S.prototype.getAssetUri=S.prototype.me;S.prototype.getNetworkingEngine=S.prototype.Ic;S.prototype.getMediaElement=S.prototype.Sg;
534
- S.prototype.getLoadMode=S.prototype.Jf;S.prototype.resetConfiguration=S.prototype.Eh;S.prototype.getBufferFullness=S.prototype.Bg;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.configure=S.prototype.configure;S.prototype.load=S.prototype.load;S.prototype.updateStartTime=S.prototype.Rh;S.prototype.unload=S.prototype.cf;S.prototype.detach=S.prototype.detach;S.prototype.attachCanvas=S.prototype.rf;S.prototype.attach=S.prototype.Cc;
535
- S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return G(function(h){if(1==h.g)return b={},a?u(h,Ug(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Mc()){for(var l in ah)k[l]=!0;for(var m in ch)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 p=m.next();!p.done;p=m.next())p=p.value,k[p]=Mc()?!!ah[p]:Nc(p);for(var n in l)k[n]=
536
- Mc()?!!ch[n]:Nc(l[n]);c=k;n='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",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(ha(fj));
537
- k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=Mc()?Cd(l)?!0:bc(l)||qd(l):Nc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Bn;for(g in f)e[g]=f[g]();return h.return(e)})};S.isBrowserSupported=qm;S.setAdManagerFactory=function(a){$l=a};S.registerSupportPlugin=function(a,b){Bn[a]=b};S.prototype.destroy=S.prototype.destroy;var pm=0,Xl=1,Nm=2,an=3;S.LoadMode={DESTROYED:pm,NOT_LOADED:Xl,MEDIA_SOURCE:Nm,SRC_EQUALS:an};S.version="v4.3.7";var Cn=["4","3"];
538
- Fe=new function(a){this.g=a;this.i=Ge;this.h=He}(new De(Number(Cn[0]),Number(Cn[1])));
539
- var An=["output-restricted","internal-error"],Bn={},$l=null,om={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"},un={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
540
- ssa:"text/x-ssa",ass:"text/x-ssa"};function Dn(){this.h=[];this.j=this.i=this.g=0};function En(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new wf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=En.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};
513
+ function $l(a){var b=Pl();b.streaming.failureCallback=function(c){if(a.S()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Ie(d))}};b.textDisplayFactory=function(){return a.Cd?new el(a.g,a.Cd):new Zk(a.g)};return b}q.We=function(a){this.Cd=a};
514
+ function Em(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 Xj;h={id:a.kf++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
515
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Gb,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 Dm(a,b){return F(function(c){if(1==c.g)return u(c,xn(a,b),2);ln(a,b);B(c)})}
516
+ function xn(a,b){var c;return F(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Zd(c,b),2);Zm(b);B(d)})}function ln(a,b){if(a.l!=rm){Yd(b.variants,a.h.restrictions,a.Rc)&&a.j&&$m(a);var c=a.m?a.m.g:null;if(c&&a.m.C)for(var d=r(b.variants),e=d.next();!e.done;e=d.next())e=e.value,Fm(a,c.keySystem,e.video),Fm(a,c.keySystem,e.audio);yn(a,b)}}
517
+ function Fm(a,b,c){if(c){c=r(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=r(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Dg(a.m,e.initDataType,e.initData)}}}
518
+ function Um(a,b){var c,d,e,f,g;return F(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p,n;return F(function(t){if(1==t.g)return k?u(t,k.createSegmentIndex(),2):t.return(null);p=(m=k.segmentIndex.cc(l))?m.next().value:null;if(!p)return t.return(null);n=p.startTime;return t.return(n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
519
+ function zm(a){var b=a.Qc();if(a.s&&a.N&&a.F){var c=a.J;c.j=b;Zj(c);a.V&&(c=a.V,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Km(a)}b=(new Map).set("buffering",b);a.dispatchEvent(mm("buffering",b))}function Lm(a){var b=a.g.playbackRate;0!=b&&(a.J&&a.J.set(b),b=mm("ratechange"),a.dispatchEvent(b))}function Km(a){if(a.s&&a.N){var b=a.s.g;a.N.g==Te?Tl(b,"buffering"):a.g.paused?Tl(b,"paused"):a.g.ended?Tl(b,"ended"):Tl(b,"playing")}}
520
+ function an(a){try{yn(a,a.i)}catch(c){return ym(a,c),!1}var b=a.i.variants.filter(function(c){return ue(c)});b=a.La.create(b);a.B.setVariants(Array.from(b.values()));return!0}function nm(a){return an(a)?a.B.chooseVariant():null}function mn(a){var b=nm(a);b&&Nm(a,b,!0,!0,0)}
521
+ function Nm(a,b,c,d,e){var f=a.j.l;if(b==f)d&&yk(a.j,b,d,e,!0);else{var g=a.s.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));yk(a.j,b,d,e,void 0,c);d=null;f&&(d=me(f));b=me(b);c?Vm(a,d,b):zn(a,d,b)}}function on(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=te(c);b=te(b);zn(a,c,b)}
522
+ function Wm(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=Kb(a.h.preferredTextLanguage);c=Kb(c.language);if(2==a.h.autoShowText)return Jb(c,d);if(3==a.h.autoShowText)return a=Kb(b.language),Jb(c,d)&&!Jb(a,c);Ua("Invalid autoShowText setting!");return!1}function Vm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.M&&Si(a.M,c);c=mm("adaptation",b);An(a,c)}function $m(a){var b=mm("trackschanged");An(a,b)}
523
+ function zn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.M&&Si(a.M,c);c=mm("variantchanged",b);An(a,c)}function nn(a){var b=mm("textchanged");An(a,b)}function Xm(a){var b=mm("texttrackvisibility");An(a,b)}function Ym(a){var b=(new Map).set("newStatus",a.h.abr.enabled);An(a,mm("abrstatuschanged",b))}
524
+ function Bn(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||a.l!=Pm||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;b=a.Qa().find(function(g){return g.active});for(var d=a.i,e=r(d.variants),f=e.next();!f.done;f=e.next())f=f.value,f.id===b.id&&(f.disabledUntilTime=Date.now()/1E3+c);Yd(d.variants,a.h.restrictions,a.Rc);b=nm(a);if(!b)return!1;d=a.ib().video.reduce(function(g,h){return g+h.end-h.start},0);Nm(a,b,!1,!0,d);a.mf.R(c);return!0}
525
+ function ym(a,b){if(a.l!=rm)if(Bn(a,b))b.handled=!0;else{var c=mm("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Cm(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(mm(b,c))}
526
+ function xm(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new M(2,3,3016,b,c,a.g.error.message)}
527
+ function Im(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&&!Cn.includes(l)}h!=f.allowedByKeySystem&&
528
+ (e=!0)}}}if(!e||an(a))(b=a.j.l)&&!b.allowedByKeySystem&&mn(a),e&&$m(a)}}function Jm(a,b,c){if(a.K&&a.K.onExpirationUpdated)a.K.onExpirationUpdated(b,c);b=mm("expirationupdated");a.dispatchEvent(b)}function Mm(a,b,c){0<b&&(a.S()||a.cg(b));b=a.getDuration();c<b&&(a.S()||a.Sa(c))}
529
+ function yn(a,b){a=a.m?a.m.vd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=r(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=r(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=r(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var p=a[c?"00":m];p?Cn.includes(p)&&g.add(p):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
530
+ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new M(2,4,4012,a);}function Zm(a){if(!a.variants.some(ue))throw new M(2,4,4032);}function An(a,b){F(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=rm&&a.dispatchEvent(b);B(c)})}function qn(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(Kb(c.language)):b.add("und");return b}
531
+ function pn(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=Kb(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){k=r(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var p=null;c.has(l)&&c.get(l).has(m)&&(p=c.get(l).get(m));
532
+ h.push({language:l,role:m,label:p})}});return h}function tm(){return new M(2,7,7E3)}function lm(a,b,c,d,e,f){return d==a&&e.mediaElement==f.mediaElement&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Rk(){return{mediaElement:null,mimeType:null,startTime:null,Od:NaN,uri:null}}function um(a){return new Promise(function(b,c){a.Rb=function(){return c(tm())};a.Fd=function(){return b()};a.onError=function(d){return c(d)};a.Hd=function(){return c(tm())}})}I("shaka.Player",S);
533
+ S.prototype.setVideoContainer=S.prototype.We;S.prototype.getManifestParserFactory=S.prototype.Qg;S.prototype.getManifest=S.prototype.Pg;S.prototype.retryStreaming=S.prototype.Ie;S.prototype.setMaxHardwareResolution=S.prototype.Re;S.prototype.addChaptersTrack=S.prototype.lg;S.prototype.addThumbnailsTrack=S.prototype.ng;S.prototype.addTextTrackAsync=S.prototype.mg;S.prototype.getStats=S.prototype.getStats;S.prototype.getBufferedInfo=S.prototype.ib;S.prototype.getPresentationStartTimeAsDate=S.prototype.Kf;
534
+ S.prototype.getPlayheadTimeAsDate=S.prototype.Ug;S.prototype.setTextTrackVisibility=S.prototype.Ve;S.prototype.getChapters=S.prototype.Dg;S.prototype.getChaptersTracks=S.prototype.If;S.prototype.isTextTrackVisible=S.prototype.Nb;S.prototype.selectVariantsByLabel=S.prototype.Hh;S.prototype.selectTextLanguage=S.prototype.Le;S.prototype.selectAudioLanguage=S.prototype.Nd;S.prototype.getTextLanguages=S.prototype.Xg;S.prototype.getAudioLanguages=S.prototype.zg;S.prototype.getTextLanguagesAndRoles=S.prototype.Yg;
535
+ S.prototype.getAudioLanguagesAndRoles=S.prototype.Ag;S.prototype.selectVariantTrack=S.prototype.Ne;S.prototype.selectTextTrack=S.prototype.Me;S.prototype.getThumbnails=S.prototype.$g;S.prototype.getImageTracks=S.prototype.Kg;S.prototype.getTextTracks=S.prototype.zb;S.prototype.getVariantTracks=S.prototype.Qa;S.prototype.cancelTrickPlay=S.prototype.xf;S.prototype.trickPlay=S.prototype.bf;S.prototype.getPlaybackRate=S.prototype.yb;S.prototype.isBuffering=S.prototype.Qc;S.prototype.getKeyStatuses=S.prototype.vd;
536
+ S.prototype.getExpiration=S.prototype.Hc;S.prototype.drmInfo=S.prototype.drmInfo;S.prototype.keySystem=S.prototype.keySystem;S.prototype.goToLive=S.prototype.eh;S.prototype.seekRange=S.prototype.Ja;S.prototype.isAudioOnly=S.prototype.ic;S.prototype.isInProgress=S.prototype.Lb;S.prototype.isLive=S.prototype.S;S.prototype.getAdManager=S.prototype.td;S.prototype.getAssetUri=S.prototype.oe;S.prototype.getNetworkingEngine=S.prototype.Ic;S.prototype.getMediaElement=S.prototype.Sg;
537
+ S.prototype.getLoadMode=S.prototype.pe;S.prototype.resetConfiguration=S.prototype.Eh;S.prototype.getBufferFullness=S.prototype.Bg;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.configure=S.prototype.configure;S.prototype.load=S.prototype.load;S.prototype.updateStartTime=S.prototype.Rh;S.prototype.unload=S.prototype.df;S.prototype.detach=S.prototype.detach;S.prototype.attachCanvas=S.prototype.tf;S.prototype.attach=S.prototype.Cc;
538
+ S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return F(function(h){if(1==h.g)return b={},a?u(h,Ug(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Mc()){for(var l in ah)k[l]=!0;for(var m in ch)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 p=m.next();!p.done;p=m.next())p=p.value,k[p]=Mc()?!!ah[p]:Nc(p);for(var n in l)k[n]=
539
+ Mc()?!!ch[n]:Nc(l[n]);c=k;n='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",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(ha(hj));
540
+ k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=Mc()?Cd(l)?!0:bc(l)||qd(l):Nc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Dn;for(g in f)e[g]=f[g]();return h.return(e)})};S.isBrowserSupported=sm;S.setAdManagerFactory=function(a){bm=a};S.registerSupportPlugin=function(a,b){Dn[a]=b};S.prototype.destroy=S.prototype.destroy;var rm=0,Zl=1,Pm=2,cn=3;S.LoadMode={DESTROYED:rm,NOT_LOADED:Zl,MEDIA_SOURCE:Pm,SRC_EQUALS:cn};S.version="v4.3.8";var En=["4","3"];
541
+ Fe=new function(a){this.g=a;this.i=Ge;this.h=He}(new De(Number(En[0]),Number(En[1])));
542
+ var Cn=["output-restricted","internal-error"],Dn={},bm=null,qm={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"},wn={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
543
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function Fn(){this.h=[];this.j=this.i=this.g=0};function Gn(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new wf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Gn.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};
541
544
  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()};
542
545
  q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};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()};
543
- q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.h.getTitle()};q.getDescription=function(){return this.h.getDescription()};q.release=function(){this.g=this.h=null};I("shaka.ads.ClientSideAd",En);En.prototype.release=En.prototype.release;En.prototype.getDescription=En.prototype.getDescription;En.prototype.getTitle=En.prototype.getTitle;En.prototype.getPositionInSequence=En.prototype.getPositionInSequence;
544
- En.prototype.getSequenceLength=En.prototype.getSequenceLength;En.prototype.setMuted=En.prototype.setMuted;En.prototype.resize=En.prototype.resize;En.prototype.isLinear=En.prototype.isLinear;En.prototype.isMuted=En.prototype.isMuted;En.prototype.setVolume=En.prototype.setVolume;En.prototype.getVolume=En.prototype.getVolume;En.prototype.play=En.prototype.play;En.prototype.pause=En.prototype.pause;En.prototype.skip=En.prototype.skip;En.prototype.canSkipNow=En.prototype.canSkipNow;
545
- En.prototype.getTimeUntilSkippable=En.prototype.getTimeUntilSkippable;En.prototype.isSkippable=En.prototype.isSkippable;En.prototype.isPaused=En.prototype.isPaused;En.prototype.getRemainingTime=En.prototype.getRemainingTime;En.prototype.getMinSuggestedDuration=En.prototype.getMinSuggestedDuration;En.prototype.getDuration=En.prototype.getDuration;function Fn(a,b,c,d){var e=this;this.s=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new wf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.3.7");this.g=null;this.h.ya(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Gn(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
546
- function(f){Hn(e,f)});this.h.o(this.i,"ended",function(){e.m.contentComplete()})}Fn.prototype.stop=function(){this.g&&this.g.stop();this.s&&bl(this.s)};Fn.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function Hn(a,b){b.getError();In(a,null);a.l(new L("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
547
- function Gn(a,b){a.l(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.l(new L("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=r(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new L("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Jn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Kn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",
548
- function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Kn(a)?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,Kn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Kn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.h.ya(a.i,"play",function(){a.g.start()})}catch(e){In(a,
549
- null)}}function Kn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
550
- function Jn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new L(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Hn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Ln(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Ln(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,
551
- 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){In(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){In(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")});
546
+ q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.h.getTitle()};q.getDescription=function(){return this.h.getDescription()};q.release=function(){this.g=this.h=null};I("shaka.ads.ClientSideAd",Gn);Gn.prototype.release=Gn.prototype.release;Gn.prototype.getDescription=Gn.prototype.getDescription;Gn.prototype.getTitle=Gn.prototype.getTitle;Gn.prototype.getPositionInSequence=Gn.prototype.getPositionInSequence;
547
+ Gn.prototype.getSequenceLength=Gn.prototype.getSequenceLength;Gn.prototype.setMuted=Gn.prototype.setMuted;Gn.prototype.resize=Gn.prototype.resize;Gn.prototype.isLinear=Gn.prototype.isLinear;Gn.prototype.isMuted=Gn.prototype.isMuted;Gn.prototype.setVolume=Gn.prototype.setVolume;Gn.prototype.getVolume=Gn.prototype.getVolume;Gn.prototype.play=Gn.prototype.play;Gn.prototype.pause=Gn.prototype.pause;Gn.prototype.skip=Gn.prototype.skip;Gn.prototype.canSkipNow=Gn.prototype.canSkipNow;
548
+ Gn.prototype.getTimeUntilSkippable=Gn.prototype.getTimeUntilSkippable;Gn.prototype.isSkippable=Gn.prototype.isSkippable;Gn.prototype.isPaused=Gn.prototype.isPaused;Gn.prototype.getRemainingTime=Gn.prototype.getRemainingTime;Gn.prototype.getMinSuggestedDuration=Gn.prototype.getMinSuggestedDuration;Gn.prototype.getDuration=Gn.prototype.getDuration;function Hn(a,b,c,d){var e=this;this.s=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new wf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.3.8");this.g=null;this.h.ya(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){In(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
549
+ function(f){Jn(e,f)});this.h.o(this.i,"ended",function(){e.m.contentComplete()})}Hn.prototype.stop=function(){this.g&&this.g.stop();this.s&&dl(this.s)};Hn.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function Jn(a,b){b.getError();Kn(a,null);a.l(new L("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
550
+ function In(a,b){a.l(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.l(new L("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=r(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new L("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Ln(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Mn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",
551
+ function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Mn(a)?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,Mn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Mn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.h.ya(a.i,"play",function(){a.g.start()})}catch(e){Kn(a,
552
+ null)}}function Mn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
553
+ function Ln(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new L(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Jn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Nn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Nn(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,
554
+ 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){Kn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Kn(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")});
552
555
  a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&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")});
553
556
  a.h.o(a.g,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,
554
557
  google.ima.AdEvent.Type.AD_METADATA,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")})}
555
- function Ln(a,b){var c=b.getAd();c?(a.j=new En(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new L("ad-started",b)),a.j.isLinear()&&(a.s.setAttribute("ad-active","true"),a.i.pause(),a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))):Ua("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
556
- function In(a,b){a.l(new L("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.i.ended||a.i.play())};function Mn(a,b){this.i=a;this.h=null;this.g=b}q=Mn.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)};
558
+ function Nn(a,b){var c=b.getAd();c?(a.j=new Gn(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new L("ad-started",b)),a.j.isLinear()&&(a.s.setAttribute("ad-active","true"),a.i.pause(),a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))):Ua("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
559
+ function Kn(a,b){a.l(new L("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.s.removeAttribute("ad-active"),a.i.ended||a.i.play())};function On(a,b){this.i=a;this.h=null;this.g=b}q=On.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)};
557
560
  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};
558
- 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.getTitle=function(){return this.i.getTitle()};q.getDescription=function(){return this.i.getDescription()};q.release=function(){this.g=this.h=this.i=null};I("shaka.ads.ServerSideAd",Mn);Mn.prototype.release=Mn.prototype.release;Mn.prototype.getDescription=Mn.prototype.getDescription;Mn.prototype.getTitle=Mn.prototype.getTitle;
559
- Mn.prototype.getPositionInSequence=Mn.prototype.getPositionInSequence;Mn.prototype.getSequenceLength=Mn.prototype.getSequenceLength;Mn.prototype.setMuted=Mn.prototype.setMuted;Mn.prototype.resize=Mn.prototype.resize;Mn.prototype.isLinear=Mn.prototype.isLinear;Mn.prototype.isMuted=Mn.prototype.isMuted;Mn.prototype.setVolume=Mn.prototype.setVolume;Mn.prototype.getVolume=Mn.prototype.getVolume;Mn.prototype.play=Mn.prototype.play;Mn.prototype.pause=Mn.prototype.pause;Mn.prototype.skip=Mn.prototype.skip;
560
- Mn.prototype.canSkipNow=Mn.prototype.canSkipNow;Mn.prototype.getTimeUntilSkippable=Mn.prototype.getTimeUntilSkippable;Mn.prototype.isSkippable=Mn.prototype.isSkippable;Mn.prototype.isPaused=Mn.prototype.isPaused;Mn.prototype.getRemainingTime=Mn.prototype.getRemainingTime;Mn.prototype.getMinSuggestedDuration=Mn.prototype.getMinSuggestedDuration;Mn.prototype.getDuration=Mn.prototype.getDuration;function Nn(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.s=null;this.F="";this.G=[];this.h=new wf;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 L("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){On(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
561
- 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 Mn(f,e.l);e.C&&(e.m.h=e.C);e.i(new L("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");
561
+ 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.getTitle=function(){return this.i.getTitle()};q.getDescription=function(){return this.i.getDescription()};q.release=function(){this.g=this.h=this.i=null};I("shaka.ads.ServerSideAd",On);On.prototype.release=On.prototype.release;On.prototype.getDescription=On.prototype.getDescription;On.prototype.getTitle=On.prototype.getTitle;
562
+ On.prototype.getPositionInSequence=On.prototype.getPositionInSequence;On.prototype.getSequenceLength=On.prototype.getSequenceLength;On.prototype.setMuted=On.prototype.setMuted;On.prototype.resize=On.prototype.resize;On.prototype.isLinear=On.prototype.isLinear;On.prototype.isMuted=On.prototype.isMuted;On.prototype.setVolume=On.prototype.setVolume;On.prototype.getVolume=On.prototype.getVolume;On.prototype.play=On.prototype.play;On.prototype.pause=On.prototype.pause;On.prototype.skip=On.prototype.skip;
563
+ On.prototype.canSkipNow=On.prototype.canSkipNow;On.prototype.getTimeUntilSkippable=On.prototype.getTimeUntilSkippable;On.prototype.isSkippable=On.prototype.isSkippable;On.prototype.isPaused=On.prototype.isPaused;On.prototype.getRemainingTime=On.prototype.getRemainingTime;On.prototype.getMinSuggestedDuration=On.prototype.getMinSuggestedDuration;On.prototype.getDuration=On.prototype.getDuration;function Pn(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.s=null;this.F="";this.G=[];this.h=new wf;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 L("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Qn(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
564
+ 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 On(f,e.l);e.C&&(e.m.h=e.C);e.i(new L("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");
562
565
  var f=e.l.currentTime;e.s&&e.s>f&&(e.l.currentTime=e.s,e.s=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 L("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new L("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new L("ad-third-quartile"))});
563
566
  this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new L("ad-complete"));e.i(new L("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 L("ad-skipped"));e.i(new L("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=
564
- f;e.i(new L("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Nn.prototype.stop=function(){this.F="";this.s=null;this.G=[]};Nn.prototype.release=function(){this.stop();this.h&&this.h.release()};Nn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
565
- function On(a,b){a.i(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.s=c,a.l.currentTime=d.start)}})};function T(){db.call(this);this.g=this.i=null;this.h=new Dn;this.j=navigator.language}pa(T,db);q=T.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 M(2,10,1E4);this.i&&this.i.release();this.i=new Fn(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)})};
566
- q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);db.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new L("ad-stopped"));this.h=new Dn};q.requestClientSideAds=function(a){if(!this.i)throw new M(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.m.requestAds(a)};
567
- q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new M(2,10,10002);this.g&&this.g.release();this.g=new Nn(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)})};
568
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new M(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.3.7";c=this.g;c.j?a=Promise.reject(new M(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
569
- (c.H=!0),c.j=new Jc,c.g.requestStream(a),c.F=b||"",c.I=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new M(1,10,10003);(a.mpt||a.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.3.7";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new M(1,10,10003);return this.g.G};
567
+ f;e.i(new L("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Pn.prototype.stop=function(){this.F="";this.s=null;this.G=[]};Pn.prototype.release=function(){this.stop();this.h&&this.h.release()};Pn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
568
+ function Qn(a,b){a.i(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.s=c,a.l.currentTime=d.start)}})};function T(){db.call(this);this.g=this.i=null;this.h=new Fn;this.j=navigator.language}pa(T,db);q=T.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 M(2,10,1E4);this.i&&this.i.release();this.i=new Hn(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)})};
569
+ q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);db.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new L("ad-stopped"));this.h=new Fn};q.requestClientSideAds=function(a){if(!this.i)throw new M(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.m.requestAds(a)};
570
+ q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new M(2,10,10002);this.g&&this.g.release();this.g=new Pn(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)})};
571
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new M(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.3.8";c=this.g;c.j?a=Promise.reject(new M(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
572
+ (c.H=!0),c.j=new Jc,c.g.requestStream(a),c.F=b||"",c.I=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new M(1,10,10003);(a.mpt||a.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.3.8";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new M(1,10,10003);return this.g.G};
570
573
  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)};I("shaka.ads.AdManager",T);
571
574
  T.prototype.onCueMetadataChange=T.prototype.onCueMetadataChange;T.prototype.onHlsTimedMetadata=T.prototype.onHlsTimedMetadata;T.prototype.onDashTimedMetadata=T.prototype.onDashTimedMetadata;T.prototype.getStats=T.prototype.getStats;T.prototype.getServerSideCuePoints=T.prototype.getServerSideCuePoints;T.prototype.replaceServerSideAdTagParameters=T.prototype.replaceServerSideAdTagParameters;T.prototype.requestServerSideStream=T.prototype.requestServerSideStream;T.prototype.initServerSide=T.prototype.initServerSide;
572
575
  T.prototype.requestClientSideAds=T.prototype.requestClientSideAds;T.prototype.onAssetUnload=T.prototype.onAssetUnload;T.prototype.release=T.prototype.release;T.prototype.initClientSide=T.prototype.initClientSide;T.prototype.setLocale=T.prototype.setLocale;T.ADS_LOADED="ads-loaded";T.AD_STARTED="ad-started";T.AD_FIRST_QUARTILE="ad-first-quartile";T.AD_MIDPOINT="ad-midpoint";T.AD_THIRD_QUARTILE="ad-third-quartile";T.AD_COMPLETE="ad-complete";T.AD_STOPPED="ad-stopped";T.AD_SKIPPED="ad-skipped";
573
576
  T.AD_VOLUME_CHANGED="ad-volume-changed";T.AD_MUTED="ad-muted";T.AD_PAUSED="ad-paused";T.AD_RESUMED="ad-resumed";T.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";T.CUEPOINTS_CHANGED="ad-cue-points-changed";T.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";T.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";T.AD_CLICKED="ad-clicked";T.AD_PROGRESS="ad-progress";T.AD_BUFFERING="ad-buffering";T.AD_IMPRESSION="ad-impression";T.AD_DURATION_CHANGED="ad-duration-changed";T.AD_CLOSED="ad-closed";
574
- T.AD_LOADED="ad-loaded";T.ALL_ADS_COMPLETED="all-ads-completed";T.AD_LINEAR_CHANGED="ad-linear-changed";T.AD_METADATA="ad-metadata";T.AD_RECOVERABLE_ERROR="ad-recoverable-error";T.AD_BREAK_READY="ad-break-ready";T.AD_INTERACTION="ad-interaction";$l=function(){return new T};function Pn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof L){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=r(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=r(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
575
- TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=r(Fi(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
576
- function Qn(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=Rn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
577
- function Rn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
578
- var Sn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Tn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Un=["loop","playbackRate"],Vn=["pause","play"],Wn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
579
- isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Xn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Yn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Zn=[["getConfiguration","configure"]],$n=[["isTextTrackVisible","setTextTrackVisibility"]],ao="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
580
- bo=["attach","attachCanvas","detach","load","unload"];function co(a,b,c,d,e,f,g){var h=this;this.I=a;this.N=g;this.j=new N(b);this.P=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.M="";this.s=null;this.F=function(){return eo(h)};this.G=function(k,l){k=Qn(l);switch(k.type){case "event":var m=k.targetName,p=Pa(k.event);h.B(m,p);break;case "update":m=k.update;for(p in m){k=h.g[p]||{};for(var n in m[p])k[n]=m[p][n]}h.C&&(h.P(),h.C=!1);break;case "asyncComplete":if(p=k.id,n=k.error,k=h.i[p],delete h.i[p],k)if(n){p=new M(n.severity,n.category,
581
- n.code);for(m in n)p[m]=n[m];k.reject(p)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;fo.add(this)}q=co.prototype;q.destroy=function(){fo.delete(this);go(this);ho&&io(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.s=null;return Promise.resolve()};q.oa=function(){return this.h};q.Kd=function(){return this.M};
582
- q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Aa();var a=new chrome.cast.SessionRequest(this.I,[],null,this.N,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(fo),d=c.next();!d.done;d=c.next())jo(d.value,b)},function(b){for(var c=r(fo),d=c.next();!d.done;d=c.next())d=d.value,ko="available"==b,d.j.Aa()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});ko&&this.j.R(lo);(a=ho)&&a.status!=chrome.cast.SessionStatus.STOPPED?
583
- jo(this,a):ho=null}else window.__onGCastApiAvailable!==mo&&(no=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=mo)};q.Me=function(a){this.s=a;this.h&&oo(this,{type:"appData",appData:this.s})};q.cast=function(a){var b=this;return G(function(c){if(!b.m)throw new M(1,8,8E3);if(!ko)throw new M(1,8,8001);if(b.h)throw new M(1,8,8002);b.l=new Jc;chrome.cast.requestSession(function(d){return po(b,a,d)},function(d){return qo(b,d)});return u(c,b.l,0)})};
584
- function ro(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return po(a,b,c)},function(c){return qo(a,c)})}}q.ac=function(){if(this.h){go(this);if(ho){io(this);try{ho.stop(function(){},function(){})}catch(a){}ho=null}eo(this)}};
585
- q.get=function(a,b){var c=this;if("video"==a){if(Vn.includes(b))return function(){return c.Tf.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))}}else if("player"==a){if(Yn[b]&&!this.get("player","isLive")())return function(){};if(ao.includes(b))return function(){return c.Tf.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))};if(bo.includes(b))return function(){return c.Bh.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))};if(Wn[b]||Xn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
586
- q.set=function(a,b,c){this.g[a][b]=c;oo(this,{type:"set",targetName:a,property:b,value:c})};function po(a,b,c){ho=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);eo(a);oo(a,{type:"init",initState:b,appData:a.s});a.l.resolve()}function qo(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new M(2,8,c,b))}
587
- q.Tf=function(a,b){oo(this,{type:"call",targetName:a,methodName:b,args:Ga.apply(2,arguments)})};q.Bh=function(a,b){var c=Ga.apply(2,arguments),d=new Jc,e=this.J.toString();this.J++;this.i[e]=d;try{oo(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function jo(a,b){var c=a.K();a.l=new Jc;a.C=!0;po(a,c,b)}function io(a){var b=ho;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
588
- function eo(a){var b=ho?"connected"==ho.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};go(a)}a.h=b;a.M=b?ho.receiver.friendlyName:"";a.j.Aa()}function go(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new M(1,7,7E3))}}function oo(a,b){b=Pn(b);var c=ho;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Ya)}catch(d){throw b=new M(2,8,8005,d),c=new L("error",(new Map).set("detail",b)),a.B("player",c),a.ac(),b;}}var lo=.02,ko=!1,ho=null,no=null,fo=new Set;
589
- function mo(a){no?window.__onGCastApiAvailable=no:delete window.__onGCastApiAvailable;no=null;if(a)for(var b=r(fo),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function so(a,b,c,d){d=void 0===d?!1:d;db.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.j=this.B=this.l=null;this.G=c;this.F=d;this.C=new Map;this.g=new co(c,function(){return to(e)},function(){return uo(e)},function(f,g){return vo(e,f,g)},function(){return wo(e)},function(){return xo(e)},d);yo(this)}pa(so,db);q=so.prototype;
590
- q.destroy=function(a){a&&this.g.ac();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;db.prototype.release.call(this);return Promise.all(a)};q.Ab=function(){return this.l};q.dc=function(){return this.B};q.vf=function(){return this.g.m&&ko};q.oa=function(){return this.g.oa()};q.Kd=function(){return this.g.Kd()};
591
- q.cast=function(){var a=this,b;return G(function(c){return 1==c.g?(b=xo(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.cf(),0):c.return()})};q.Me=function(a){this.g.Me(a)};q.eg=function(){ro(this.g)};q.ac=function(){this.g.ac()};
592
- q.zf=function(a,b){b=void 0===b?!1:b;var c=this;return G(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d.return();c.G=a;c.F=b;c.g.ac();return u(d,c.g.destroy(),2)}c.g=null;c.g=new co(a,function(){return to(c)},function(){return uo(c)},function(e,f){return vo(c,e,f)},function(){return wo(c)},function(){return xo(c)},b);c.g.init();B(d)})};
593
- function yo(a){a.g.init();a.m=new wf;for(var b=r(Sn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.oa()||(f=Pa(f),a.j.dispatchEvent(f))});for(var d in Qa)a.m.o(a.h,Qa[d],function(f){a.g.oa()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.wc=e,Object.defineProperty(a.l,b.wc,{configurable:!1,enumerable:!0,get:function(f){return function(){return zo(a,f.wc)}}(b),set:function(f){return function(g){var h=f.wc;a.g.oa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={wc:b.wc};a.B={};Ao(a,
594
- function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return Bo(a,f)}})});Co(a);a.j=new db;a.j.Id=a.l;a.s=new db;a.s.Id=a.B}function Co(a){var b=new Map;Ao(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.C.set(c,d):a.C.set(d,c)):b.set(d,c)})}
595
- function Ao(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=r(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
596
- function xo(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.me(),startTime:null};a.i.pause();for(var c=r(Un),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(Zn);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($n);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 to(a){var b=new L("caststatuschanged");a.dispatchEvent(b)}
597
- function uo(a){var b=new L(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
598
- function wo(a){for(var b=r(Zn),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(Un);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(Un),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r($n);for(k=
577
+ T.AD_LOADED="ad-loaded";T.ALL_ADS_COMPLETED="all-ads-completed";T.AD_LINEAR_CHANGED="ad-linear-changed";T.AD_METADATA="ad-metadata";T.AD_RECOVERABLE_ERROR="ad-recoverable-error";T.AD_BREAK_READY="ad-break-ready";T.AD_INTERACTION="ad-interaction";bm=function(){return new T};function Rn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof L){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=r(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=r(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
578
+ TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=r(Hi(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
579
+ function Sn(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=Tn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
580
+ function Tn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
581
+ var Un="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Vn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Wn=["loop","playbackRate"],Xn=["pause","play"],Yn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
582
+ isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Zn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},$n={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},ao=[["getConfiguration","configure"]],bo=[["isTextTrackVisible","setTextTrackVisibility"]],co="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
583
+ eo=["attach","attachCanvas","detach","load","unload"];function fo(a,b,c,d,e,f,g){var h=this;this.I=a;this.N=g;this.j=new N(b);this.P=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.M="";this.s=null;this.F=function(){return go(h)};this.G=function(k,l){k=Sn(l);switch(k.type){case "event":var m=k.targetName,p=Pa(k.event);h.B(m,p);break;case "update":m=k.update;for(p in m){k=h.g[p]||{};for(var n in m[p])k[n]=m[p][n]}h.C&&(h.P(),h.C=!1);break;case "asyncComplete":if(p=k.id,n=k.error,k=h.i[p],delete h.i[p],k)if(n){p=new M(n.severity,n.category,
584
+ n.code);for(m in n)p[m]=n[m];k.reject(p)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;ho.add(this)}q=fo.prototype;q.destroy=function(){ho.delete(this);io(this);jo&&ko(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.s=null;return Promise.resolve()};q.oa=function(){return this.h};q.Kd=function(){return this.M};
585
+ q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Aa();var a=new chrome.cast.SessionRequest(this.I,[],null,this.N,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(ho),d=c.next();!d.done;d=c.next())lo(d.value,b)},function(b){for(var c=r(ho),d=c.next();!d.done;d=c.next())d=d.value,mo="available"==b,d.j.Aa()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});mo&&this.j.R(no);(a=jo)&&a.status!=chrome.cast.SessionStatus.STOPPED?
586
+ lo(this,a):jo=null}else window.__onGCastApiAvailable!==oo&&(po=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=oo)};q.Oe=function(a){this.s=a;this.h&&qo(this,{type:"appData",appData:this.s})};q.cast=function(a){var b=this;return F(function(c){if(!b.m)throw new M(1,8,8E3);if(!mo)throw new M(1,8,8001);if(b.h)throw new M(1,8,8002);b.l=new Jc;chrome.cast.requestSession(function(d){return ro(b,a,d)},function(d){return so(b,d)});return u(c,b.l,0)})};
587
+ function to(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return ro(a,b,c)},function(c){return so(a,c)})}}q.ac=function(){if(this.h){io(this);if(jo){ko(this);try{jo.stop(function(){},function(){})}catch(a){}jo=null}go(this)}};
588
+ q.get=function(a,b){var c=this;if("video"==a){if(Xn.includes(b))return function(){return c.Tf.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))}}else if("player"==a){if($n[b]&&!this.get("player","isLive")())return function(){};if(co.includes(b))return function(){return c.Tf.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))};if(eo.includes(b))return function(){return c.Bh.apply(c,[a,b].concat(ha(Ga.apply(0,arguments))))};if(Yn[b]||Zn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
589
+ q.set=function(a,b,c){this.g[a][b]=c;qo(this,{type:"set",targetName:a,property:b,value:c})};function ro(a,b,c){jo=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);go(a);qo(a,{type:"init",initState:b,appData:a.s});a.l.resolve()}function so(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new M(2,8,c,b))}
590
+ q.Tf=function(a,b){qo(this,{type:"call",targetName:a,methodName:b,args:Ga.apply(2,arguments)})};q.Bh=function(a,b){var c=Ga.apply(2,arguments),d=new Jc,e=this.J.toString();this.J++;this.i[e]=d;try{qo(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function lo(a,b){var c=a.K();a.l=new Jc;a.C=!0;ro(a,c,b)}function ko(a){var b=jo;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
591
+ function go(a){var b=jo?"connected"==jo.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};io(a)}a.h=b;a.M=b?jo.receiver.friendlyName:"";a.j.Aa()}function io(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new M(1,7,7E3))}}function qo(a,b){b=Rn(b);var c=jo;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Ya)}catch(d){throw b=new M(2,8,8005,d),c=new L("error",(new Map).set("detail",b)),a.B("player",c),a.ac(),b;}}var no=.02,mo=!1,jo=null,po=null,ho=new Set;
592
+ function oo(a){po?window.__onGCastApiAvailable=po:delete window.__onGCastApiAvailable;po=null;if(a)for(var b=r(ho),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function uo(a,b,c,d){d=void 0===d?!1:d;db.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.j=this.B=this.l=null;this.G=c;this.F=d;this.C=new Map;this.g=new fo(c,function(){return vo(e)},function(){return wo(e)},function(f,g){return xo(e,f,g)},function(){return yo(e)},function(){return zo(e)},d);Ao(this)}pa(uo,db);q=uo.prototype;
593
+ q.destroy=function(a){a&&this.g.ac();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;db.prototype.release.call(this);return Promise.all(a)};q.Ab=function(){return this.l};q.dc=function(){return this.B};q.wf=function(){return this.g.m&&mo};q.oa=function(){return this.g.oa()};q.Kd=function(){return this.g.Kd()};
594
+ q.cast=function(){var a=this,b;return F(function(c){return 1==c.g?(b=zo(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.df(),0):c.return()})};q.Oe=function(a){this.g.Oe(a)};q.eg=function(){to(this.g)};q.ac=function(){this.g.ac()};
595
+ q.Af=function(a,b){b=void 0===b?!1:b;var c=this;return F(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d.return();c.G=a;c.F=b;c.g.ac();return u(d,c.g.destroy(),2)}c.g=null;c.g=new fo(a,function(){return vo(c)},function(){return wo(c)},function(e,f){return xo(c,e,f)},function(){return yo(c)},function(){return zo(c)},b);c.g.init();B(d)})};
596
+ function Ao(a){a.g.init();a.m=new wf;for(var b=r(Un),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.oa()||(f=Pa(f),a.j.dispatchEvent(f))});for(var d in Qa)a.m.o(a.h,Qa[d],function(f){a.g.oa()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.wc=e,Object.defineProperty(a.l,b.wc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Bo(a,f.wc)}}(b),set:function(f){return function(g){var h=f.wc;a.g.oa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={wc:b.wc};a.B={};Co(a,
597
+ function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return Do(a,f)}})});Eo(a);a.j=new db;a.j.Id=a.l;a.s=new db;a.s.Id=a.B}function Eo(a){var b=new Map;Co(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.C.set(c,d):a.C.set(d,c)):b.set(d,c)})}
598
+ function Co(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=r(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
599
+ function zo(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.oe(),startTime:null};a.i.pause();for(var c=r(Wn),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(ao);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(bo);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 vo(a){var b=new L("caststatuschanged");a.dispatchEvent(b)}
600
+ function wo(a){var b=new L(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
601
+ function yo(a){for(var b=r(ao),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(Wn);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(Wn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(bo);for(k=
599
602
  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 L("error",h);a.h.dispatchEvent(h)})}
600
- function zo(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.oa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.oa()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
601
- function Bo(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Ic()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.td()};
602
- if("setVideoContainer"==b)return function(c){return a.h.Ue(c)};if(a.g.oa()){if("getManifest"==b||"drmInfo"==b)return function(){Ua(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ua(b+"() does not work while casting!");return Promise.resolve()}}return a.g.oa()&&0==Object.keys(a.g.g.video).length&&(Wn[b]||Xn[b])||!a.g.oa()?a.h[b].bind(a.h):a.g.get("player",b)}
603
- function vo(a,b,c){a.g.oa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}I("shaka.cast.CastProxy",so);so.prototype.changeReceiverId=so.prototype.zf;so.prototype.forceDisconnect=so.prototype.ac;so.prototype.suggestDisconnect=so.prototype.eg;so.prototype.setAppData=so.prototype.Me;so.prototype.cast=so.prototype.cast;so.prototype.receiverName=so.prototype.Kd;so.prototype.isCasting=so.prototype.oa;so.prototype.canCast=so.prototype.vf;so.prototype.getPlayer=so.prototype.dc;
604
- so.prototype.getVideo=so.prototype.Ab;so.prototype.destroy=so.prototype.destroy;function Do(a,b,c,d){db.call(this);var e=this;this.g=a;this.h=b;this.j=new wf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.s=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new N(function(){Eo(e)});Fo(this)}pa(Do,db);q=Do.prototype;q.isConnected=function(){return this.H};q.hh=function(){return this.s};q.Kh=function(a){this.i=a};q.ug=function(){this.i=null};
603
+ function Bo(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.oa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.oa()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
604
+ function Do(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Ic()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.td()};
605
+ if("setVideoContainer"==b)return function(c){return a.h.We(c)};if(a.g.oa()){if("getManifest"==b||"drmInfo"==b)return function(){Ua(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ua(b+"() does not work while casting!");return Promise.resolve()}}return a.g.oa()&&0==Object.keys(a.g.g.video).length&&(Yn[b]||Zn[b])||!a.g.oa()?a.h[b].bind(a.h):a.g.get("player",b)}
606
+ function xo(a,b,c){a.g.oa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}I("shaka.cast.CastProxy",uo);uo.prototype.changeReceiverId=uo.prototype.Af;uo.prototype.forceDisconnect=uo.prototype.ac;uo.prototype.suggestDisconnect=uo.prototype.eg;uo.prototype.setAppData=uo.prototype.Oe;uo.prototype.cast=uo.prototype.cast;uo.prototype.receiverName=uo.prototype.Kd;uo.prototype.isCasting=uo.prototype.oa;uo.prototype.canCast=uo.prototype.wf;uo.prototype.getPlayer=uo.prototype.dc;
607
+ uo.prototype.getVideo=uo.prototype.Ab;uo.prototype.destroy=uo.prototype.destroy;function Fo(a,b,c,d){db.call(this);var e=this;this.g=a;this.h=b;this.j=new wf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.s=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new N(function(){Go(e)});Ho(this)}pa(Fo,db);q=Fo.prototype;q.isConnected=function(){return this.H};q.hh=function(){return this.s};q.Kh=function(a){this.i=a};q.ug=function(){this.i=null};
605
608
  q.Lh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.Jh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Ih=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
606
- q.destroy=function(){var a=this,b,c;return G(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.s=!0,a.l=null,a.B=null,db.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();B(d)})};
607
- function Fo(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Go(a)};b.onSenderDisconnected=function(){return Go(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Ho(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Ho(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 Io(a,
608
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Jo(a,e)};b.start();b=r(Sn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Ko(a,"video",e)});for(var d in Qa)a.j.o(a.h,Qa[d],function(e){return Ko(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Pe(3840,2160):a.h.Pe(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.s=
609
- !1;Lo(a)});a.j.o(a.g,"playing",function(){a.s=!1;Lo(a)});a.j.o(a.g,"pause",function(){Lo(a)});a.j.o(a.h,"unloading",function(){a.s=!0;Lo(a)});a.j.o(a.g,"ended",function(){(new N(function(){a.g&&a.g.ended&&(a.s=!0,Lo(a))})).R(Mo)})}function Go(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Lo(a)}
610
- function Lo(a){var b;G(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c.return();b=new L("caststatuschanged");a.dispatchEvent(b);No(a)||Oo(a);B(c)})}
611
- function Po(a,b,c){var d,e,f,g,h,k,l,m,p,n;G(function(t){switch(t.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,D(t,5),u(t,a.h.load(b.manifest,b.startTime),7)):u(t,Promise.resolve(),3);case 7:va(t,3);break;case 5:return g=wa(t),h=(new Map).set("detail",g),k=new L("error",h),a.h&&a.h.dispatchEvent(k),t.return();case 3:if(!a.h)return t.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(p in b.playerAfterLoad)n=b.playerAfterLoad[p],a.h[p](n);
612
- a.g.autoplay=f;b.manifest&&(a.g.play(),Oo(a));B(t)}})}function Ko(a,b,c){a.h&&(Eo(a),Ho(a,{type:"event",targetName:b,event:c},a.l))}
613
- function Eo(a){a.I.R(Qo);for(var b={video:{},player:{}},c=r(Tn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in Yn)0==a.m%Yn[e]&&(b.player[e]=a.h[e]());for(var f in Wn)0==a.m%Wn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Ho(a,{type:"update",update:b},a.l);for(var g in Xn)0==a.m%Xn[g]&&(b={player:{}},b.player[g]=a.h[g](),Ho(a,{type:"update",update:b},a.l));a.F&&(a.m+=
614
- 1);No(a)}function No(a){return a.C&&(a.g.duration||a.h.U())?(Ro(a),a.C=!1,!0):!1}function Ro(a,b){var c={contentId:a.h.me(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Oo(a,void 0===b?0:b,c)}
615
- function Jo(a,b){var c=Qn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;Po(a,c.initState,c.appData);Eo(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.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=c.methodName;
616
- "player"==d&&"load"==e&&(a.m=0,a.F=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return So(a,g,f,null)},function(h){return So(a,g,f,h)})}}
617
- function Io(a,b){var c=Qn(b.data);switch(c.type){case "PLAY":a.g.play();Oo(a);break;case "PAUSE":a.g.pause();Oo(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Oo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Oo(a));break;case "STOP":a.h.cf().then(function(){a.h&&Oo(a)});break;case "GET_STATUS":Ro(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
618
- null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Oo(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Ro(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Ho(a,{requestId:Number(c.requestId),type:h},a.B)});break;default:Ho(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
619
- function So(a,b,c,d){a.h&&Ho(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Ho(a,b,c,d){a.H&&(a=Pn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Oo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?To:a.h.Qc()?Uo:a.g.paused?Vo:Wo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Ho(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
620
- I("shaka.cast.CastReceiver",Do);Do.prototype.destroy=Do.prototype.destroy;Do.prototype.setContentArtist=Do.prototype.Ih;Do.prototype.setContentImage=Do.prototype.Jh;Do.prototype.setContentTitle=Do.prototype.Lh;Do.prototype.clearContentMetadata=Do.prototype.ug;Do.prototype.setContentMetadata=Do.prototype.Kh;Do.prototype.isIdle=Do.prototype.hh;Do.prototype.isConnected=Do.prototype.isConnected;var Qo=.5,Mo=5,To="IDLE",Wo="PLAYING",Uo="BUFFERING",Vo="PAUSED";function Xo(a,b,c){var d=Yo(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g.delete(null);if(1<g.size)throw new M(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Ie?(e=h.init||e,!1):!0}),f.length&&(a=Zo(e,f,c,g),0==a.length&&(a=[Cb("",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(Cb(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
621
- r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Cf:g,sj:e,drmInfos:a,Gf:!0}}function $o(a,b,c,d){var e=Xo(a,c,d);if(b.Gf){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.Gf=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new M(2,4,4008);return e.Cf||b.Cf}
622
- function ap(a){var b=0,c=Ic(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=Fc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
623
- function bp(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 cp(a){a=Vf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=id(a.textContent);a=ap(a).filter(function(b){return b.type===dp})[0];if(!a)return"";a=ad(a.value,!0);return(a=kg(a,"WRMHEADER"))?bp(a):""}
624
- function Zo(a,b,c,d){var e=[];b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Ie];if(g){var h;if(h=Vf(f.node,"urn:microsoft:playready","pro")){h=id(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Sf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Ie)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
625
- 226,251,75]),m=new Uint8Array([]);k=[{initData:Sf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Cb(g,f.init||a||h||k);if(g=ep.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function Yo(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=fp(c.value))&&b.push(c);return b}
626
- function fp(a){var b=a.getAttribute("schemeIdUri"),c=Yf(a,"urn:mpeg:cenc:2013","default_KID"),d=Wf(a,"urn:mpeg:cenc:2013","pssh").map($f);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new M(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:id(f),keyId:null}})}catch(f){throw new M(2,4,4007);}return{node:a,Ie:b,keyId:c,init:0<e.length?e:null}}
627
- var dp=1,ep=(new Map).set("com.widevine.alpha",function(a){return(a=Vf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",cp).set("com.microsoft.playready.recommendation",cp).set("com.microsoft.playready.software",cp).set("com.microsoft.playready.hardware",cp).set("org.w3.clearkey",function(a){return(a=Vf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function gp(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=
609
+ q.destroy=function(){var a=this,b,c;return F(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.s=!0,a.l=null,a.B=null,db.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();B(d)})};
610
+ function Ho(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Io(a)};b.onSenderDisconnected=function(){return Io(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Jo(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Jo(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 Ko(a,
611
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Lo(a,e)};b.start();b=r(Un);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return Mo(a,"video",e)});for(var d in Qa)a.j.o(a.h,Qa[d],function(e){return Mo(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.s=
612
+ !1;No(a)});a.j.o(a.g,"playing",function(){a.s=!1;No(a)});a.j.o(a.g,"pause",function(){No(a)});a.j.o(a.h,"unloading",function(){a.s=!0;No(a)});a.j.o(a.g,"ended",function(){(new N(function(){a.g&&a.g.ended&&(a.s=!0,No(a))})).R(Oo)})}function Io(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;No(a)}
613
+ function No(a){var b;F(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c.return();b=new L("caststatuschanged");a.dispatchEvent(b);Po(a)||Qo(a);B(c)})}
614
+ function Ro(a,b,c){var d,e,f,g,h,k,l,m,p,n;F(function(t){switch(t.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,D(t,5),u(t,a.h.load(b.manifest,b.startTime),7)):u(t,Promise.resolve(),3);case 7:va(t,3);break;case 5:return g=wa(t),h=(new Map).set("detail",g),k=new L("error",h),a.h&&a.h.dispatchEvent(k),t.return();case 3:if(!a.h)return t.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(p in b.playerAfterLoad)n=b.playerAfterLoad[p],a.h[p](n);
615
+ a.g.autoplay=f;b.manifest&&(a.g.play(),Qo(a));B(t)}})}function Mo(a,b,c){a.h&&(Go(a),Jo(a,{type:"event",targetName:b,event:c},a.l))}
616
+ function Go(a){a.I.R(So);for(var b={video:{},player:{}},c=r(Vn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.S())for(var e in $n)0==a.m%$n[e]&&(b.player[e]=a.h[e]());for(var f in Yn)0==a.m%Yn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Jo(a,{type:"update",update:b},a.l);for(var g in Zn)0==a.m%Zn[g]&&(b={player:{}},b.player[g]=a.h[g](),Jo(a,{type:"update",update:b},a.l));a.F&&(a.m+=
617
+ 1);Po(a)}function Po(a){return a.C&&(a.g.duration||a.h.S())?(To(a),a.C=!1,!0):!1}function To(a,b){var c={contentId:a.h.oe(),streamType:a.h.S()?"LIVE":"BUFFERED",contentType:""};a.h.S()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Qo(a,void 0===b?0:b,c)}
618
+ function Lo(a,b){var c=Sn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;Ro(a,c.initState,c.appData);Go(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.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=c.methodName;
619
+ "player"==d&&"load"==e&&(a.m=0,a.F=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return Uo(a,g,f,null)},function(h){return Uo(a,g,f,h)})}}
620
+ function Ko(a,b){var c=Sn(b.data);switch(c.type){case "PLAY":a.g.play();Qo(a);break;case "PAUSE":a.g.pause();Qo(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Qo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Qo(a));break;case "STOP":a.h.df().then(function(){a.h&&Qo(a)});break;case "GET_STATUS":To(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
621
+ null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Qo(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&To(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Jo(a,{requestId:Number(c.requestId),type:h},a.B)});break;default:Jo(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
622
+ function Uo(a,b,c,d){a.h&&Jo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Jo(a,b,c,d){a.H&&(a=Rn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Qo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?Vo:a.h.Qc()?Wo:a.g.paused?Xo:Yo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Jo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
623
+ I("shaka.cast.CastReceiver",Fo);Fo.prototype.destroy=Fo.prototype.destroy;Fo.prototype.setContentArtist=Fo.prototype.Ih;Fo.prototype.setContentImage=Fo.prototype.Jh;Fo.prototype.setContentTitle=Fo.prototype.Lh;Fo.prototype.clearContentMetadata=Fo.prototype.ug;Fo.prototype.setContentMetadata=Fo.prototype.Kh;Fo.prototype.isIdle=Fo.prototype.hh;Fo.prototype.isConnected=Fo.prototype.isConnected;var So=.5,Oo=5,Vo="IDLE",Yo="PLAYING",Wo="BUFFERING",Xo="PAUSED";function Zo(a,b,c){var d=$o(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g.delete(null);if(1<g.size)throw new M(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Ke?(e=h.init||e,!1):!0}),f.length&&(a=ap(e,f,c,g),0==a.length&&(a=[Cb("",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(Cb(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
624
+ r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Df:g,rj:e,drmInfos:a,Hf:!0}}function bp(a,b,c,d){var e=Zo(a,c,d);if(b.Hf){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.Hf=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new M(2,4,4008);return e.Df||b.Df}
625
+ function cp(a){var b=0,c=Ic(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=Fc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
626
+ function dp(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 ep(a){a=Vf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=id(a.textContent);a=cp(a).filter(function(b){return b.type===fp})[0];if(!a)return"";a=ad(a.value,!0);return(a=kg(a,"WRMHEADER"))?dp(a):""}
627
+ function ap(a,b,c,d){var e=[];b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Ke];if(g){var h;if(h=Vf(f.node,"urn:microsoft:playready","pro")){h=id(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Sf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Ke)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
628
+ 226,251,75]),m=new Uint8Array([]);k=[{initData:Sf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Cb(g,f.init||a||h||k);if(g=gp.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function $o(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=hp(c.value))&&b.push(c);return b}
629
+ function hp(a){var b=a.getAttribute("schemeIdUri"),c=Yf(a,"urn:mpeg:cenc:2013","default_KID"),d=Wf(a,"urn:mpeg:cenc:2013","pssh").map($f);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new M(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:id(f),keyId:null}})}catch(f){throw new M(2,4,4007);}return{node:a,Ke:b,keyId:c,init:0<e.length?e:null}}
630
+ var fp=1,gp=(new Map).set("com.widevine.alpha",function(a){return(a=Vf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",ep).set("com.microsoft.playready.recommendation",ep).set("com.microsoft.playready.software",ep).set("com.microsoft.playready.hardware",ep).set("org.w3.clearkey",function(a){return(a=Vf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function ip(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=
628
631
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
629
- function hp(a,b){var c=ip(a,b,"timescale"),d=1;c&&(d=gg(c)||1);var e=ip(a,b,"duration");c=gg(e||"");"image"==a.L.contentType&&(c=ig(e||""));c&&(c/=d);var f=ip(a,b,"startNumber");e=Number(ip(a,b,"presentationTimeOffset"))||0;var g=hg(f||"");if(null==f||null==g)g=1;f=jp(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.Y.duration||Infinity;f=Uf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],p=f[l+1],n=bg(m,"t",hg),t=bg(m,"d",hg);m=bg(m,"r",fg);null!=n&&(n-=e);if(!t)break;n=null!=n?n:k;m=m||0;if(0>
630
- m)if(p){p=bg(p,"t",hg);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,Ph:n}),n=k}b=h}return{timescale:d,za:c,qc:g,qb:e/d||0,df:e,timeline:b}}function ip(a,b,c){return[b(a.L),b(a.va),b(a.qa)].filter(Ab).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
631
- function jp(a,b,c){return[b(a.L),b(a.va),b(a.qa)].filter(Ab).map(function(d){return Tf(d,c)}).reduce(function(d,e){return d||e})}
632
- function kp(a,b,c,d,e,f){for(var g=Yf(a,"http://www.w3.org/1999/xlink","href"),h=Yf(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 Ze(new M(2,4,4028));if("onLoad"!=h)return Ze(new M(2,4,4027));var m=Bb([d],[g]);return e.request(0,nf(m,b)).ma(function(p){p=mg(p.data,a.tagName);if(!p)return Ze(new M(2,4,4001,g));
633
- for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return lp(a,b,c,m[0],e,f+1)})}
634
- function lp(a,b,c,d,e,f){f=void 0===f?0:f;if(Yf(a,"http://www.w3.org/1999/xlink","href")){var g=kp(a,b,c,d,e,f);c&&(g=g.ma(void 0,function(){return lp(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"==Yf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(lp(k,b,c,d,e,f)));return cf(g).ma(function(){return a})};function mp(a,b,c,d,e,f,g){var h,k=(new Hf).T("sidx",function(l){h=np(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new M(2,3,3004);}
635
- function np(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new M(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.Cb(),m=g.reader.Cb();g.reader.skip(2);var p=g.reader.Ee();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.O(),t=(n&2147483648)>>>31;n&=2147483647;var v=g.reader.O();g.reader.skip(4);if(1==t)throw new M(2,3,3006);h.push(new yi(l/k+c,(l+v)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=v;a+=n}g.parser.stop();return h};function op(a){this.h=Ic(a);this.g=new Ef(this.h,0)}op.prototype.xa=function(){return this.g.xa()};
636
- function pp(a){var b=qp(a);if(7<b.length)throw new M(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=qp(a);a:{d=r(rp);for(var e=d.next();!e.done;e=d.next())if(Dc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.na();else{if(8==b.length&&b[1]&224)throw new M(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.na()+b<=a.h.byteLength?b:a.h.byteLength-a.g.na();d=Ic(a.h,a.g.na(),b);a.g.skip(b);return new sp(c,
637
- d)}function qp(a){var b=a.g.na(),c=a.g.pb();if(0==c)throw new M(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fc(a.h,b,c)}var rp=[[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 sp(a,b){this.id=a;this.g=b}
638
- function tp(a){if(8<a.g.byteLength)throw new M(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new M(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function up(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new op(a.g);for(var p=null,n=null;a.xa();){var t=pp(a);if(187==t.id){var v=vp(t);v&&(t=c*v.Qh,v=b+v.Ah,null!=p&&m.push(new yi(p+g,t+g,l,n,v-1,f,g,h,k)),p=t,n=v)}}null!=p&&m.push(new yi(p+g,d+g,l,n,null,f,g,h,k));return m}
639
- function vp(a){var b=new op(a.g);a=pp(b);if(179!=a.id)throw new M(2,3,3013);a=tp(a);b=pp(b);if(183!=b.id)throw new M(2,3,3012);b=new op(b.g);for(var c=0;b.xa();){var d=pp(b);if(241==d.id){c=tp(d);break}}return{Qh:a,Ah:c}};function wp(a,b){b=jp(a,b,"Initialization");if(!b)return null;var c=a.L.Na,d=b.getAttribute("sourceURL");d&&(c=Bb(a.L.Na,[d]));d=0;var e=null;if(b=bg(b,"range",eg))d=b.start,e=b.end;return new wi(function(){return c},d,e,xp(a))}
640
- function yp(a,b){var c=Number(ip(a,zp,"presentationTimeOffset"))||0,d=ip(a,zp,"timescale"),e=1;d&&(e=gg(d)||1);var f=c/e||0,g=wp(a,zp);Ap(a,g);var h=ff(a);return{bc:function(){var k=jp(h,zp,"RepresentationIndex");var l=h.L.Na;k&&(k=k.getAttribute("sourceURL"))&&(l=Bb(h.L.Na,[k]));k=Bp(h);return Cp(h,b,g,l,k.start,k.end,f)}}}
641
- function Cp(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,v,y,w,x,C,z,A,E;return G(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.wb||!a.Y.pe,l=a.Y.start,m=a.Y.duration,p=a.L.mimeType.split("/")[1],n=b,t=null,v=[n(d,e,f),"webm"==p?n(c.Pa(),c.Ta,c.Ca):null],n=null,u(F,Promise.all(v),2);y=F.h;w=y[0];x=y[1]||null;C=null;z=l-g;A=l;E=m?l+m:Infinity;if("mp4"==p)var H=mp(w,e,d,c,z,A,E);else{H=new op(x);if(440786851!=pp(H).id)throw new M(2,3,3008);var J=pp(H);if(408125543!=J.id)throw new M(2,3,3009);H=J.g.byteOffset;
642
- J=new op(J.g);for(var K=null;J.xa();){var Q=pp(J);if(357149030==Q.id){K=Q;break}}if(!K)throw new M(2,3,3010);K=new op(K.g);Q=1E6;for(J=null;K.xa();){var V=pp(K);if(2807729==V.id)Q=tp(V);else if(17545==V.id)if(4==V.g.byteLength)J=V.g.getFloat32(0);else if(8==V.g.byteLength)J=V.g.getFloat64(0);else throw new M(2,3,3003);}if(null==J)throw new M(2,3,3011);K=Q/1E9;J*=K;Q=pp(new op(w));if(475249515!=Q.id)throw new M(2,3,3007);H=up(Q,H,K,J,d,c,z,A,E)}C=H;h.mc(C);t=new Rj(C);k&&t.xb(A,E,!0);return F.return(t)})}
643
- function zp(a){return a.Zc}function Bp(a){var b=jp(a,zp,"RepresentationIndex");a=ip(a,zp,"indexRange");a=eg(a||"");b&&(a=bg(b,"range",eg,a));return a}function Ap(a,b){Dp(a,b);if(!Bp(a))throw new M(2,4,4002);}function Dp(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Gb&&"mp4"!=c&&"webm"!=c)throw new M(2,4,4006);if("webm"==c&&!b)throw new M(2,4,4005);}
644
- function xp(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.Dd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Ep(a,b){var c=wp(a,Fp),d=Gp(a);if(!d.za&&!d.timeline&&1<d.kc.length)throw new M(2,4,4002);if(!d.za&&!a.Y.duration&&!d.timeline&&1==d.kc.length)throw new M(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new M(2,4,4002);var e=null,f=null;a.qa.id&&a.L.id&&(f=b[a.qa.id+","+a.L.id])&&(e=f.segmentIndex);var g=Hp(a.Y.start,a.Y.duration,a.L.Na,d,c);b=!e;e?e.lc(g,a.presentationTimeline.kb()):e=new Rj(g);a.presentationTimeline.mc(g);a.wb&&a.Y.pe||e.xb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
645
- Infinity,b);f&&(f.segmentIndex=e);return{bc:function(){e&&0!=e.g.length||e.Tc(g);return Promise.resolve(e)}}}function Fp(a){return a.Db}function Gp(a){var b=Ip(a);a=hp(a,Fp);var c=a.qc;0==c&&(c=1);var d=0;a.za?d=a.za*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{za:a.za,startTime:d,qc:c,qb:a.qb,timeline:a.timeline,kc:b}}
646
- function Hp(a,b,c,d,e){var f=d.kc.length;d.timeline&&d.timeline.length!=d.kc.length&&(f=Math.min(d.timeline.length,d.kc.length));for(var g=a-d.qb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={Wd:m.Wd},p++){var n=d.kc[p];m.Wd=Bb(c,[n.oh]);var t=void 0;t=null!=d.za?l+d.za:d.timeline?d.timeline[p].end:l+b;k.push(new yi(a+l,a+t,function(v){return function(){return v.Wd}}(m),n.start,n.end,e,g,a,h));l=t}return k}
647
- function Ip(a){return[a.L.Db,a.va.Db,a.qa.Db].filter(Ab).map(function(b){return Uf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Nf&&(a.Nf=!0);var c=b.getAttribute("media");b=bg(b,"mediaRange",eg,{start:0,end:null});return{oh:c,start:b.start,end:b.end}})};function Jp(a,b,c,d,e,f){var g=Kp(a),h=Lp(a);Np(h);var k=ff(a);if(h.Pc)return Dp(a,g),{bc:function(){var t=gp(h.Pc,k.L.id,null,k.bandwidth||null,null);t=Bb(k.L.Na,[t]);return Cp(k,b,g,t,0,null,h.qb)}};if(h.za)return d||"image"===a.va.contentType||(a.presentationTimeline.Ae(h.za),a.presentationTimeline.Be(a.Y.start)),{bc:function(){return Op(k,h,e,g,f)}};var l=null;d=d=null;a.qa.id&&a.L.id&&(d=a.qa.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Pp(k,h,g);c=a.Y.start;var p=a.Y.duration?a.Y.start+a.Y.duration:
648
- Infinity,n=!(a.wb&&a.Y.pe);l?(n&&(new Rj(m)).xb(c,p,!0),l.lc(m,a.presentationTimeline.kb())):l=new Rj(m);a.presentationTimeline.mc(m);n&&l.xb(c,p);d&&a.wb&&(d.segmentIndex=l);return{bc:function(){l&&0!=l.g.length||l.Tc(m);return Promise.resolve(l)}}}function Qp(a){return a.$c}function Lp(a){var b=hp(a,Qp),c=ip(a,Qp,"media");a=ip(a,Qp,"index");return{za:b.za,timescale:b.timescale,qc:b.qc,qb:b.qb,df:b.df,timeline:b.timeline,ye:c,Pc:a}}
649
- function Np(a){var b=a.Pc?1:0;b+=a.timeline?1:0;b+=a.za?1:0;if(0==b)throw new M(2,4,4002);1!=b&&(a.Pc&&(a.timeline=null),a.za=null);if(!a.Pc&&!a.ye)throw new M(2,4,4002);}
650
- function Op(a,b,c,d,e){function f(K){var Q=(K-t)*n,V=Q+b.qb,U=Q+l;Q=U+n;var ia=Math.min(Q,h());U=new yi(U,ia,function(){var O=gp(y,x,K,w,V*v);return Bb(C,[O])},0,null,d,z,l,h());U.l=Q;return U}function g(){var K=[Math.max(k.kb(),l),Math.min(k.Ib(),h())].map(function(Q){return Q-l});return[Math.ceil(K[0]/n),Math.ceil(K[1]/n)-1].map(function(Q){return Q+t})}function h(){var K=null!=m&&e[m]||p;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.qa.id,p=a.Y.duration,n=b.za,t=b.qc,v=b.timescale,
651
- y=b.ye,w=a.bandwidth||null,x=a.L.id,C=a.L.Na,z=l-b.qb,A=g();a=a.wb?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var E=a;E<=A;++E){var F=f(E);c.push(F)}var H=new Rj(c);c=k.Ib()<h();E=k.U();if(c||E){var J=Math.max(a,A+1);H.Od(n,function(){var K=k.kb();H.Gb(K);var Q=r(g());Q.next();Q=Q.next().value;for(var V=[];J<=Q;){var U=f(J);V.push(U);J++}return K>h()&&!V.length?null:V})}return Promise.resolve(H)}
652
- function Pp(a,b,c){var d=a.Y.start,e=a.Y.duration,f=d-b.qb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Vd:h.Vd,Zd:h.Zd,be:h.be,Sd:h.Sd,ee:h.ee,Td:h.Td},k++){var l=b.timeline[k],m=l.start,p=l.Ph;l=l.end;h.be=k+b.qc;h.ee=p+b.df;h.Zd=a.L.id;h.Sd=a.bandwidth||null;h.Vd=b.ye;h.Td=a.L.Na;g.push(new yi(d+m,d+l,function(n){return function(){var t=gp(n.Vd,n.Zd,n.be,n.Sd||null,n.ee);return Bb(n.Td,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
653
- function Kp(a){var b=ip(a,Qp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Na;return new wi(function(){var f=gp(b,c,null,d,null);return Bb(e,[f])},0,null,xp(a))};function Rp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Rp.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=[]};
654
- function Sp(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,F,H,J,K,Q,V,U,ia,O,qa,Ka;return G(function(Ca){switch(Ca.g){case 1:d=Hb;Tp(b);Up(b);Vp(b);Wp(b);if(!c&&1==b.length){e=b[0];a.g=e.od;a.h=e.Pd;a.j=e.textStreams;a.i=e.imageStreams;Ca.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 Ca.return();k=b.map(function(Va){return Va.od});l=b.map(function(Va){return Va.Pd});m=b.map(function(Va){return Va.textStreams});p=b.map(function(Va){return Va.imageStreams});
655
- n=r(m);for(t=n.next();!t.done;t=n.next())v=t.value,v.push(Xp(d.ea));y=r(p);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(Xp(d.Bc));return u(Ca,Yp(a.g,k,f,Zp,$p),3);case 3:return u(Ca,Yp(a.h,l,f,Zp,$p),4);case 4:return u(Ca,Yp(a.j,m,f,Zp,$p),5);case 5:return u(Ca,Yp(a.i,p,f,Zp,$p),2);case 2:C=0;z=[];if(a.h.length&&a.g.length)for(K=r(a.g),Q=K.next();!Q.done;Q=K.next())for(V=Q.value,U=r(a.h),ia=U.next();!ia.done;ia=U.next())O=ia.value,qa=Xg(V.drmInfos,O.drmInfos),V.drmInfos.length&&O.drmInfos.length&&
656
- !qa.length||(Ka=C++,z.push({id:Ka,language:V.language,primary:V.primary,audio:V,video:O,bandwidth:(V.bandwidth||0)+(O.bandwidth||0),drmInfos:qa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),E=r(A),F=E.next();!F.done;F=E.next())H=F.value,J=C++,z.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.kd?H:null,video:H.type==d.Ma?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
657
- a.l=z;B(Ca)}})}function Tp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.od),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&&fc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.od=c}}
658
- function Vp(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&&fc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
659
- function Up(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Pd),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&&fc(e.roles,h.roles)&&Df(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Pd=c}}
660
- function Wp(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}}
661
- function aq(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,F,H,J,K,Q,V;return G(function(U){switch(U.g){case 1:b=Hb;if(1==a.length)return U.return(a[0]);c=a.map(function(ia){return ia.filter(function(O){return O.type==b.kd})});d=a.map(function(ia){return ia.filter(function(O){return O.type==b.Ma})});e=a.map(function(ia){return ia.filter(function(O){return O.type==b.ea})});f=a.map(function(ia){return ia.filter(function(O){return O.type==b.Bc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=h.value,
662
- k.push(bq(b.ea));l=r(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(bq(b.Bc));return u(U,Yp([],c,0,cq,dq),2);case 2:return n=U.h,u(U,Yp([],d,0,cq,dq),3);case 3:return t=U.h,u(U,Yp([],e,0,cq,dq),4);case 4:return v=U.h,u(U,Yp([],f,0,cq,dq),5);case 5:y=U.h;w=0;if(t.length&&n.length)for(E=r(n),F=E.next();!F.done;F=E.next())for(H=F.value,J=r(t),K=J.next();!K.done;K=J.next())Q=K.value,V=w++,Q.variantIds.push(V),H.variantIds.push(V);else for(x=t.concat(n),C=r(x),z=C.next();!z.done;z=C.next())A=z.value,
632
+ function jp(a,b){var c=kp(a,b,"timescale"),d=1;c&&(d=gg(c)||1);var e=kp(a,b,"duration");c=gg(e||"");"image"==a.L.contentType&&(c=ig(e||""));c&&(c/=d);var f=kp(a,b,"startNumber");e=Number(kp(a,b,"presentationTimeOffset"))||0;var g=hg(f||"");if(null==f||null==g)g=1;f=lp(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.Y.duration||Infinity;f=Uf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],p=f[l+1],n=bg(m,"t",hg),t=bg(m,"d",hg);m=bg(m,"r",fg);null!=n&&(n-=e);if(!t)break;n=null!=n?n:k;m=m||0;if(0>
633
+ m)if(p){p=bg(p,"t",hg);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,Ph:n}),n=k}b=h}return{timescale:d,za:c,qc:g,qb:e/d||0,ef:e,timeline:b}}function kp(a,b,c){return[b(a.L),b(a.va),b(a.qa)].filter(Ab).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
634
+ function lp(a,b,c){return[b(a.L),b(a.va),b(a.qa)].filter(Ab).map(function(d){return Tf(d,c)}).reduce(function(d,e){return d||e})}
635
+ function mp(a,b,c,d,e,f){for(var g=Yf(a,"http://www.w3.org/1999/xlink","href"),h=Yf(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 Ze(new M(2,4,4028));if("onLoad"!=h)return Ze(new M(2,4,4027));var m=Bb([d],[g]);return e.request(0,nf(m,b)).ma(function(p){p=mg(p.data,a.tagName);if(!p)return Ze(new M(2,4,4001,g));
636
+ for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return np(a,b,c,m[0],e,f+1)})}
637
+ function np(a,b,c,d,e,f){f=void 0===f?0:f;if(Yf(a,"http://www.w3.org/1999/xlink","href")){var g=mp(a,b,c,d,e,f);c&&(g=g.ma(void 0,function(){return np(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"==Yf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(np(k,b,c,d,e,f)));return cf(g).ma(function(){return a})};function op(a,b,c,d,e,f,g){var h,k=(new Hf).U("sidx",function(l){h=pp(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new M(2,3,3004);}
638
+ function pp(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new M(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.Cb(),m=g.reader.Cb();g.reader.skip(2);var p=g.reader.Ge();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.O(),t=(n&2147483648)>>>31;n&=2147483647;var v=g.reader.O();g.reader.skip(4);if(1==t)throw new M(2,3,3006);h.push(new Ai(l/k+c,(l+v)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=v;a+=n}g.parser.stop();return h};function qp(a){this.h=Ic(a);this.g=new Ef(this.h,0)}qp.prototype.xa=function(){return this.g.xa()};
639
+ function rp(a){var b=sp(a);if(7<b.length)throw new M(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=sp(a);a:{d=r(tp);for(var e=d.next();!e.done;e=d.next())if(Dc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.na();else{if(8==b.length&&b[1]&224)throw new M(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.na()+b<=a.h.byteLength?b:a.h.byteLength-a.g.na();d=Ic(a.h,a.g.na(),b);a.g.skip(b);return new up(c,
640
+ d)}function sp(a){var b=a.g.na(),c=a.g.pb();if(0==c)throw new M(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fc(a.h,b,c)}var tp=[[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 up(a,b){this.id=a;this.g=b}
641
+ function vp(a){if(8<a.g.byteLength)throw new M(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new M(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function wp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new qp(a.g);for(var p=null,n=null;a.xa();){var t=rp(a);if(187==t.id){var v=xp(t);v&&(t=c*v.Qh,v=b+v.Ah,null!=p&&m.push(new Ai(p+g,t+g,l,n,v-1,f,g,h,k)),p=t,n=v)}}null!=p&&m.push(new Ai(p+g,d+g,l,n,null,f,g,h,k));return m}
642
+ function xp(a){var b=new qp(a.g);a=rp(b);if(179!=a.id)throw new M(2,3,3013);a=vp(a);b=rp(b);if(183!=b.id)throw new M(2,3,3012);b=new qp(b.g);for(var c=0;b.xa();){var d=rp(b);if(241==d.id){c=vp(d);break}}return{Qh:a,Ah:c}};function yp(a,b){b=lp(a,b,"Initialization");if(!b)return null;var c=a.L.Na,d=b.getAttribute("sourceURL");d&&(c=Bb(a.L.Na,[d]));d=0;var e=null;if(b=bg(b,"range",eg))d=b.start,e=b.end;return new yi(function(){return c},d,e,zp(a))}
643
+ function Ap(a,b){var c=Number(kp(a,Bp,"presentationTimeOffset"))||0,d=kp(a,Bp,"timescale"),e=1;d&&(e=gg(d)||1);var f=c/e||0,g=yp(a,Bp);Cp(a,g);var h=ff(a);return{bc:function(){var k=lp(h,Bp,"RepresentationIndex");var l=h.L.Na;k&&(k=k.getAttribute("sourceURL"))&&(l=Bb(h.L.Na,[k]));k=Dp(h);return Ep(h,b,g,l,k.start,k.end,f)}}}
644
+ function Ep(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,v,y,w,x,C,z,A,E;return F(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.wb||!a.Y.re,l=a.Y.start,m=a.Y.duration,p=a.L.mimeType.split("/")[1],n=b,t=null,v=[n(d,e,f),"webm"==p?n(c.Pa(),c.Ta,c.Ca):null],n=null,u(G,Promise.all(v),2);y=G.h;w=y[0];x=y[1]||null;C=null;z=l-g;A=l;E=m?l+m:Infinity;if("mp4"==p)var H=op(w,e,d,c,z,A,E);else{H=new qp(x);if(440786851!=rp(H).id)throw new M(2,3,3008);var J=rp(H);if(408125543!=J.id)throw new M(2,3,3009);H=J.g.byteOffset;
645
+ J=new qp(J.g);for(var K=null;J.xa();){var Q=rp(J);if(357149030==Q.id){K=Q;break}}if(!K)throw new M(2,3,3010);K=new qp(K.g);Q=1E6;for(J=null;K.xa();){var V=rp(K);if(2807729==V.id)Q=vp(V);else if(17545==V.id)if(4==V.g.byteLength)J=V.g.getFloat32(0);else if(8==V.g.byteLength)J=V.g.getFloat64(0);else throw new M(2,3,3003);}if(null==J)throw new M(2,3,3011);K=Q/1E9;J*=K;Q=rp(new qp(w));if(475249515!=Q.id)throw new M(2,3,3007);H=wp(Q,H,K,J,d,c,z,A,E)}C=H;h.mc(C);t=new Tj(C);k&&t.xb(A,E,!0);return G.return(t)})}
646
+ function Bp(a){return a.Zc}function Dp(a){var b=lp(a,Bp,"RepresentationIndex");a=kp(a,Bp,"indexRange");a=eg(a||"");b&&(a=bg(b,"range",eg,a));return a}function Cp(a,b){Fp(a,b);if(!Dp(a))throw new M(2,4,4002);}function Fp(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Gb&&"mp4"!=c&&"webm"!=c)throw new M(2,4,4006);if("webm"==c&&!b)throw new M(2,4,4005);}
647
+ function zp(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.Dd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Gp(a,b){var c=yp(a,Hp),d=Ip(a);if(!d.za&&!d.timeline&&1<d.kc.length)throw new M(2,4,4002);if(!d.za&&!a.Y.duration&&!d.timeline&&1==d.kc.length)throw new M(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new M(2,4,4002);var e=null,f=null;a.qa.id&&a.L.id&&(f=b[a.qa.id+","+a.L.id])&&(e=f.segmentIndex);var g=Jp(a.Y.start,a.Y.duration,a.L.Na,d,c);b=!e;e?e.lc(g,a.presentationTimeline.kb()):e=new Tj(g);a.presentationTimeline.mc(g);a.wb&&a.Y.re||e.xb(a.Y.start,a.Y.duration?a.Y.start+a.Y.duration:
648
+ Infinity,b);f&&(f.segmentIndex=e);return{bc:function(){e&&0!=e.g.length||e.Tc(g);return Promise.resolve(e)}}}function Hp(a){return a.Db}function Ip(a){var b=Kp(a);a=jp(a,Hp);var c=a.qc;0==c&&(c=1);var d=0;a.za?d=a.za*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{za:a.za,startTime:d,qc:c,qb:a.qb,timeline:a.timeline,kc:b}}
649
+ function Jp(a,b,c,d,e){var f=d.kc.length;d.timeline&&d.timeline.length!=d.kc.length&&(f=Math.min(d.timeline.length,d.kc.length));for(var g=a-d.qb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={Xd:m.Xd},p++){var n=d.kc[p];m.Xd=Bb(c,[n.oh]);var t=void 0;t=null!=d.za?l+d.za:d.timeline?d.timeline[p].end:l+b;k.push(new Ai(a+l,a+t,function(v){return function(){return v.Xd}}(m),n.start,n.end,e,g,a,h));l=t}return k}
650
+ function Kp(a){return[a.L.Db,a.va.Db,a.qa.Db].filter(Ab).map(function(b){return Uf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Nf&&(a.Nf=!0);var c=b.getAttribute("media");b=bg(b,"mediaRange",eg,{start:0,end:null});return{oh:c,start:b.start,end:b.end}})};function Lp(a,b,c,d,e,f){var g=Np(a),h=Op(a);Pp(h);var k=ff(a);if(h.Pc)return Fp(a,g),{bc:function(){var t=ip(h.Pc,k.L.id,null,k.bandwidth||null,null);t=Bb(k.L.Na,[t]);return Ep(k,b,g,t,0,null,h.qb)}};if(h.za)return d||"image"===a.va.contentType||(a.presentationTimeline.Ce(h.za),a.presentationTimeline.De(a.Y.start)),{bc:function(){return Qp(k,h,e,g,f)}};var l=null;d=d=null;a.qa.id&&a.L.id&&(d=a.qa.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=Rp(k,h,g);c=a.Y.start;var p=a.Y.duration?a.Y.start+a.Y.duration:
651
+ Infinity,n=!(a.wb&&a.Y.re);l?(n&&(new Tj(m)).xb(c,p,!0),l.lc(m,a.presentationTimeline.kb())):l=new Tj(m);a.presentationTimeline.mc(m);n&&l.xb(c,p);d&&a.wb&&(d.segmentIndex=l);return{bc:function(){l&&0!=l.g.length||l.Tc(m);return Promise.resolve(l)}}}function Sp(a){return a.$c}function Op(a){var b=jp(a,Sp),c=kp(a,Sp,"media");a=kp(a,Sp,"index");return{za:b.za,timescale:b.timescale,qc:b.qc,qb:b.qb,ef:b.ef,timeline:b.timeline,Ae:c,Pc:a}}
652
+ function Pp(a){var b=a.Pc?1:0;b+=a.timeline?1:0;b+=a.za?1:0;if(0==b)throw new M(2,4,4002);1!=b&&(a.Pc&&(a.timeline=null),a.za=null);if(!a.Pc&&!a.Ae)throw new M(2,4,4002);}
653
+ function Qp(a,b,c,d,e){function f(K){var Q=(K-t)*n,V=Q+b.qb,U=Q+l;Q=U+n;var ia=Math.min(Q,h());U=new Ai(U,ia,function(){var O=ip(y,x,K,w,V*v);return Bb(C,[O])},0,null,d,z,l,h());U.l=Q;return U}function g(){var K=[Math.max(k.kb(),l),Math.min(k.Ib(),h())].map(function(Q){return Q-l});return[Math.ceil(K[0]/n),Math.ceil(K[1]/n)-1].map(function(Q){return Q+t})}function h(){var K=null!=m&&e[m]||p;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.Y.start,m=a.qa.id,p=a.Y.duration,n=b.za,t=b.qc,v=b.timescale,
654
+ y=b.Ae,w=a.bandwidth||null,x=a.L.id,C=a.L.Na,z=l-b.qb,A=g();a=a.wb?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var E=a;E<=A;++E){var G=f(E);c.push(G)}var H=new Tj(c);c=k.Ib()<h();E=k.S();if(c||E){var J=Math.max(a,A+1);H.Pd(n,function(){var K=k.kb();H.Gb(K);var Q=r(g());Q.next();Q=Q.next().value;for(var V=[];J<=Q;){var U=f(J);V.push(U);J++}return K>h()&&!V.length?null:V})}return Promise.resolve(H)}
655
+ function Rp(a,b,c){var d=a.Y.start,e=a.Y.duration,f=d-b.qb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Wd:h.Wd,$d:h.$d,ce:h.ce,Td:h.Td,fe:h.fe,Ud:h.Ud},k++){var l=b.timeline[k],m=l.start,p=l.Ph;l=l.end;h.ce=k+b.qc;h.fe=p+b.ef;h.$d=a.L.id;h.Td=a.bandwidth||null;h.Wd=b.Ae;h.Ud=a.L.Na;g.push(new Ai(d+m,d+l,function(n){return function(){var t=ip(n.Wd,n.$d,n.ce,n.Td||null,n.fe);return Bb(n.Ud,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
656
+ function Np(a){var b=kp(a,Sp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Na;return new yi(function(){var f=ip(b,c,null,d,null);return Bb(e,[f])},0,null,zp(a))};function Tp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Tp.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=[]};
657
+ function Up(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K,Q,V,U,ia,O,qa,Ka;return F(function(Ca){switch(Ca.g){case 1:d=Hb;Vp(b);Wp(b);Xp(b);Yp(b);if(!c&&1==b.length){e=b[0];a.g=e.od;a.h=e.Qd;a.j=e.textStreams;a.i=e.imageStreams;Ca.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 Ca.return();k=b.map(function(Va){return Va.od});l=b.map(function(Va){return Va.Qd});m=b.map(function(Va){return Va.textStreams});p=b.map(function(Va){return Va.imageStreams});
658
+ n=r(m);for(t=n.next();!t.done;t=n.next())v=t.value,v.push(Zp(d.ea));y=r(p);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(Zp(d.Bc));return u(Ca,$p(a.g,k,f,aq,bq),3);case 3:return u(Ca,$p(a.h,l,f,aq,bq),4);case 4:return u(Ca,$p(a.j,m,f,aq,bq),5);case 5:return u(Ca,$p(a.i,p,f,aq,bq),2);case 2:C=0;z=[];if(a.h.length&&a.g.length)for(K=r(a.g),Q=K.next();!Q.done;Q=K.next())for(V=Q.value,U=r(a.h),ia=U.next();!ia.done;ia=U.next())O=ia.value,qa=Xg(V.drmInfos,O.drmInfos),V.drmInfos.length&&O.drmInfos.length&&
659
+ !qa.length||(Ka=C++,z.push({id:Ka,language:V.language,primary:V.primary,audio:V,video:O,bandwidth:(V.bandwidth||0)+(O.bandwidth||0),drmInfos:qa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),E=r(A),G=E.next();!G.done;G=E.next())H=G.value,J=C++,z.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.kd?H:null,video:H.type==d.Ma?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
660
+ a.l=z;B(Ca)}})}function Vp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.od),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&&fc(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.od=c}}
661
+ function Xp(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&&fc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
662
+ function Wp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Qd),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&&fc(e.roles,h.roles)&&Df(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Qd=c}}
663
+ function Yp(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}}
664
+ function cq(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K,Q,V;return F(function(U){switch(U.g){case 1:b=Hb;if(1==a.length)return U.return(a[0]);c=a.map(function(ia){return ia.filter(function(O){return O.type==b.kd})});d=a.map(function(ia){return ia.filter(function(O){return O.type==b.Ma})});e=a.map(function(ia){return ia.filter(function(O){return O.type==b.ea})});f=a.map(function(ia){return ia.filter(function(O){return O.type==b.Bc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=h.value,
665
+ k.push(dq(b.ea));l=r(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(dq(b.Bc));return u(U,$p([],c,0,eq,fq),2);case 2:return n=U.h,u(U,$p([],d,0,eq,fq),3);case 3:return t=U.h,u(U,$p([],e,0,eq,fq),4);case 4:return v=U.h,u(U,$p([],f,0,eq,fq),5);case 5:y=U.h;w=0;if(t.length&&n.length)for(E=r(n),G=E.next();!G.done;G=E.next())for(H=G.value,J=r(t),K=J.next();!K.done;K=J.next())Q=K.value,V=w++,Q.variantIds.push(V),H.variantIds.push(V);else for(x=t.concat(n),C=r(x),z=C.next();!z.done;z=C.next())A=z.value,
663
666
  A.variantIds=[w++];return U.return(t.concat(n).concat(v).concat(y))}})}
664
- function Yp(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,F,H,J,K;return G(function(Q){switch(Q.g){case 1:f=Hb;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){Q.D(4);break}m=l.value;return u(Q,eq(m,b,c,e,g),5);case 5:p=Q.h;if(!p)throw new M(2,4,4037);l=k.next();Q.D(2);break;case 4:n=r(g);for(t=n.next();!t.done;t=n.next())for(v=t.value,y=r(v),w=y.next();!w.done;w=y.next())x=w.value,(C=fq(x,b,d,e,g))&&a.push(C);z=r(g);for(t=z.next();!t.done;t=
665
- z.next())for(A=t.value,E={},F=r(A),w=F.next();!w.done;E={ub:E.ub},w=F.next())if(E.ub=w.value,H=E.ub.type==f.ea&&!E.ub.language,J=E.ub.type==f.Bc&&!E.ub.tilesLayout,!H&&!J&&(K=a.some(function(V){return function(U){return U.mimeType==V.ub.mimeType&&yd(U.codecs)==yd(V.ub.codecs)}}(E))))throw new M(2,4,4037);return Q.return(a)}})}function eq(a,b,c,d,e){return G(function(f){if(1==f.g)return gq(b,a),a.matchedStreams?a.segmentIndex?u(f,hq(a,c),2):f.D(2):f.return(!1);iq(a,c,d,e);return f.return(!0)})}
666
- function hq(a,b){var c,d,e,f,g,h,k;return G(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 u(l,Promise.all(c),2)}if(a.segmentIndex instanceof Vj)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.l.push(k.segmentIndex);B(l)})}
667
- function fq(a,b,c,d,e){var f=c(a);gq(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return G(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new Vj;return u(g,hq(f,0),0)})});if(!f.matchedStreams||!f.matchedStreams.length)return null;iq(f,0,d,e);return f}function iq(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==Qb(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
668
- function Zp(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}
669
- function cq(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
670
- function $p(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(ha(f),ha(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=Xg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new M(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
671
- (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=Zp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),$p(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&$p(a.trickModeVideo,b)}
672
- function dq(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ha(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=r(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
673
- function gq(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:jq,video:jq,text:kq,image:lq}[e.type],g={audio:mq,video:nq,text:oq,image:pq}[e.type],h=null;d=r(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}function jq(a,b){var c;!(c=b.mimeType!=a.mimeType||yd(b.codecs)!=yd(a.codecs))&&(c=a.drmInfos)&&(a=a.drmInfos,b=b.drmInfos,c=!(a.length&&b.length?0<Xg(a,b).length:1));return c?!1:!0}
674
- function kq(a,b){return a.language?b.language?0==Qb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function lq(a){return a.tilesLayout?!0:!1}
675
- function mq(a,b,c){if(a.id==c.id)return!0;var d=Qb(a.language,b.language),e=Qb(a.language,c.language);if(e>d)return!0;if(e<d)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;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
676
- d=qq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==rq)return!0;if(d==sq)return!1;d=qq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==rq?!0:d==sq?!1:a.bandwidth&&tq(a.bandwidth,b.bandwidth,c.bandwidth)==rq?!0:!1}
677
- function nq(a,b,c){if(a.id==c.id)return!0;var d=qq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==rq)return!0;if(d==sq)return!1;if(a.frameRate){d=qq(a.frameRate,b.frameRate,c.frameRate);if(d==rq)return!0;if(d==sq)return!1}return a.bandwidth&&tq(a.bandwidth,b.bandwidth,c.bandwidth)==rq?!0:!1}
678
- function oq(a,b,c){if(a.id==c.id)return!0;var d=Qb(a.language,b.language),e=Qb(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!=
679
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function pq(a,b,c){return a.id==c.id?!0:qq(a.width*a.height,b.width*b.height,c.width*c.height)==rq?!0:!1}function bq(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}}
680
- function Xp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Rj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
681
- function qq(a,b,c){if(b==a&&a!=c)return sq;if(c==a&&a!=b)return rq;if(b>a){if(c<=a||c-a<b-a)return rq;if(c-a>b-a)return sq}else{if(c>a)return sq;if(a-c<a-b)return rq;if(a-c>a-b)return sq}return uq}function tq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?rq:b<a?sq:uq}var rq=1,uq=0,sq=-1;function vq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.M={};this.j=new Rp;this.H=0;this.J=new Zb(5);this.G=new N(function(){wq(a)});this.s=new gf;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=vq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return G(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,xq(c),2);d=e.h;c.h&&yq(c,d);if(!c.h)throw new M(2,7,7001);return e.return(c.i)})};
682
- 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.s.destroy()};q.update=function(){var a=this,b;return G(function(c){if(1==c.g)return D(c,2),u(c,xq(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.h||!b)return c.return();a.h.onError(b);B(c)})};q.onExpirationUpdated=function(){};
683
- function xq(a){var b,c,d,e,f,g,h;return G(function(k){if(1==k.g)return b=nf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),hf(a.s,e),u(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 u(k,zq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k.return(h)})}
684
- function zq(a,b,c){var d,e,f,g,h;return G(function(k){if(1==k.g){d=mg(b,"MPD");if(!d)throw new M(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(Aq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=lp(d,a.g.retryParameters,f,c,a.h.networkingEngine);hf(a.s,g);return u(k,g.promise,2)}h=k.h;return k.return(Aq(a,h,c))})}
685
- function Aq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,F,H,J,K,Q,V,U,ia,O,qa,Ka,Ca,Va;return G(function(Oa){switch(Oa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Uf(b,"Location").map($f).filter(Ab);0<f.length&&(g=Bb(e,f),e=a.m=g);h=Uf(b,"BaseURL");k=h.map($f);l=Bb(e,k);m=0;h&&h.length&&(m=bg(h[0],"availabilityTimeOffset",ig)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=bg(b,"minBufferTime",dg)||0);a.H=bg(b,"minimumUpdatePeriod",dg,-1);t=bg(b,"availabilityStartTime",cg);v=bg(b,
686
- "timeShiftBufferDepth",dg);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=bg(b,"suggestedPresentationDelay",dg));x=a.g.dash.ignoreMaxSegmentDuration;C=null;x||(C=bg(b,"maxSegmentDuration",dg));z=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,E=r(Object.values(a.l)),F=E.next();!F.done;F=E.next())H=F.value,H.segmentIndex&&H.segmentIndex.Gb(A.kb());else J=a.g.defaultPresentationDelay||1.5*n,K=null!=w?w:J,A=new P(t,K,a.g.dash.autoCorrectDrift);A.bd("static"==z);(Q=A.U())&&
687
- !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.Se(v);V=b.getAttribute("profiles")||"";U={wb:"static"!=z,presentationTimeline:A,qa:null,Y:null,va:null,L:null,bandwidth:0,Nf:!1,$b:m,profiles:V.split(",")};ia=Bq(a,U,l,b);O=ia.duration;qa=ia.periods;"static"!=z&&ia.Ef||A.Sa(O||Infinity);a.C&&!a.F&&(Ka=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?A.Vf(a.C):a.C&&Ua("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.");
688
- A.Ae(C||1);return u(Oa,Sp(a.j,qa,U.wb),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);Oa.D(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:a.g.dash.sequenceMode};if(!A.gg()){Oa.D(4);break}Ca=Uf(b,"UTCTiming");return u(Oa,Cq(a,l,Ca),5);case 5:Va=Oa.h;if(!a.h)return Oa.return();A.Wf(Va);case 4:A.we();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),
667
+ function $p(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K;return F(function(Q){switch(Q.g){case 1:f=Hb;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){Q.D(4);break}m=l.value;return u(Q,gq(m,b,c,e,g),5);case 5:p=Q.h;if(!p)throw new M(2,4,4037);l=k.next();Q.D(2);break;case 4:n=r(g);for(t=n.next();!t.done;t=n.next())for(v=t.value,y=r(v),w=y.next();!w.done;w=y.next())x=w.value,(C=hq(x,b,d,e,g))&&a.push(C);z=r(g);for(t=z.next();!t.done;t=
668
+ z.next())for(A=t.value,E={},G=r(A),w=G.next();!w.done;E={ub:E.ub},w=G.next())if(E.ub=w.value,H=E.ub.type==f.ea&&!E.ub.language,J=E.ub.type==f.Bc&&!E.ub.tilesLayout,!H&&!J&&(K=a.some(function(V){return function(U){return U.mimeType==V.ub.mimeType&&yd(U.codecs)==yd(V.ub.codecs)}}(E))))throw new M(2,4,4037);return Q.return(a)}})}function gq(a,b,c,d,e){return F(function(f){if(1==f.g)return iq(b,a),a.matchedStreams?a.segmentIndex?u(f,jq(a,c),2):f.D(2):f.return(!1);kq(a,c,d,e);return f.return(!0)})}
669
+ function jq(a,b){var c,d,e,f,g,h,k;return F(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 u(l,Promise.all(c),2)}if(a.segmentIndex instanceof Xj)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.l.push(k.segmentIndex);B(l)})}
670
+ function hq(a,b,c,d,e){var f=c(a);iq(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return F(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new Xj;return u(g,jq(f,0),0)})});if(!f.matchedStreams||!f.matchedStreams.length)return null;kq(f,0,d,e);return f}function kq(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==Qb(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
671
+ function aq(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}
672
+ function eq(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
673
+ function bq(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(ha(f),ha(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=Xg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new M(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
674
+ (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=aq(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),bq(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&bq(a.trickModeVideo,b)}
675
+ function fq(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ha(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=r(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
676
+ function iq(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:lq,video:lq,text:mq,image:nq}[e.type],g={audio:oq,video:pq,text:qq,image:rq}[e.type],h=null;d=r(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}function lq(a,b){var c;!(c=b.mimeType!=a.mimeType||yd(b.codecs)!=yd(a.codecs))&&(c=a.drmInfos)&&(a=a.drmInfos,b=b.drmInfos,c=!(a.length&&b.length?0<Xg(a,b).length:1));return c?!1:!0}
677
+ function mq(a,b){return a.language?b.language?0==Qb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function nq(a){return a.tilesLayout?!0:!1}
678
+ function oq(a,b,c){if(a.id==c.id)return!0;var d=Qb(a.language,b.language),e=Qb(a.language,c.language);if(e>d)return!0;if(e<d)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;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
679
+ d=sq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==tq)return!0;if(d==uq)return!1;d=sq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==tq?!0:d==uq?!1:a.bandwidth&&vq(a.bandwidth,b.bandwidth,c.bandwidth)==tq?!0:!1}
680
+ function pq(a,b,c){if(a.id==c.id)return!0;var d=sq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==tq)return!0;if(d==uq)return!1;if(a.frameRate){d=sq(a.frameRate,b.frameRate,c.frameRate);if(d==tq)return!0;if(d==uq)return!1}return a.bandwidth&&vq(a.bandwidth,b.bandwidth,c.bandwidth)==tq?!0:!1}
681
+ function qq(a,b,c){if(a.id==c.id)return!0;var d=Qb(a.language,b.language),e=Qb(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!=
682
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function rq(a,b,c){return a.id==c.id?!0:sq(a.width*a.height,b.width*b.height,c.width*c.height)==tq?!0:!1}function dq(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}}
683
+ function Zp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Tj([]),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}}
684
+ function sq(a,b,c){if(b==a&&a!=c)return uq;if(c==a&&a!=b)return tq;if(b>a){if(c<=a||c-a<b-a)return tq;if(c-a>b-a)return uq}else{if(c>a)return uq;if(a-c<a-b)return tq;if(a-c>a-b)return uq}return wq}function vq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?tq:b<a?uq:wq}var tq=1,wq=0,uq=-1;function xq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.M={};this.j=new Tp;this.H=0;this.J=new Zb(5);this.G=new N(function(){yq(a)});this.s=new gf;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=xq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return F(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,zq(c),2);d=e.h;c.h&&Aq(c,d);if(!c.h)throw new M(2,7,7001);return e.return(c.i)})};
685
+ 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.s.destroy()};q.update=function(){var a=this,b;return F(function(c){if(1==c.g)return D(c,2),u(c,zq(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.h||!b)return c.return();a.h.onError(b);B(c)})};q.onExpirationUpdated=function(){};
686
+ function zq(a){var b,c,d,e,f,g,h;return F(function(k){if(1==k.g)return b=nf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),hf(a.s,e),u(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 u(k,Bq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k.return(h)})}
687
+ function Bq(a,b,c){var d,e,f,g,h;return F(function(k){if(1==k.g){d=mg(b,"MPD");if(!d)throw new M(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(Cq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=np(d,a.g.retryParameters,f,c,a.h.networkingEngine);hf(a.s,g);return u(k,g.promise,2)}h=k.h;return k.return(Cq(a,h,c))})}
688
+ function Cq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K,Q,V,U,ia,O,qa,Ka,Ca,Va;return F(function(Oa){switch(Oa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Uf(b,"Location").map($f).filter(Ab);0<f.length&&(g=Bb(e,f),e=a.m=g);h=Uf(b,"BaseURL");k=h.map($f);l=Bb(e,k);m=0;h&&h.length&&(m=bg(h[0],"availabilityTimeOffset",ig)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=bg(b,"minBufferTime",dg)||0);a.H=bg(b,"minimumUpdatePeriod",dg,-1);t=bg(b,"availabilityStartTime",cg);v=bg(b,
689
+ "timeShiftBufferDepth",dg);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=bg(b,"suggestedPresentationDelay",dg));x=a.g.dash.ignoreMaxSegmentDuration;C=null;x||(C=bg(b,"maxSegmentDuration",dg));z=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,E=r(Object.values(a.l)),G=E.next();!G.done;G=E.next())H=G.value,H.segmentIndex&&H.segmentIndex.Gb(A.kb());else J=a.g.defaultPresentationDelay||1.5*n,K=null!=w?w:J,A=new P(t,K,a.g.dash.autoCorrectDrift);A.bd("static"==z);(Q=A.S())&&
690
+ !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.Ue(v);V=b.getAttribute("profiles")||"";U={wb:"static"!=z,presentationTimeline:A,qa:null,Y:null,va:null,L:null,bandwidth:0,Nf:!1,$b:m,profiles:V.split(",")};ia=Dq(a,U,l,b);O=ia.duration;qa=ia.periods;"static"!=z&&ia.Ff||A.Sa(O||Infinity);a.C&&!a.F&&(Ka=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?A.Vf(a.C):a.C&&Ua("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.");
691
+ A.Ce(C||1);return u(Oa,Up(a.j,qa,U.wb),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);Oa.D(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:a.g.dash.sequenceMode};if(!A.gg()){Oa.D(4);break}Ca=Uf(b,"UTCTiming");return u(Oa,Eq(a,l,Ca),5);case 5:Va=Oa.h;if(!a.h)return Oa.return();A.Wf(Va);case 4:A.ye();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),
689
692
  B(Oa)}})}
690
- function Bq(a,b,c,d){var e=bg(d,"mediaPresentationDuration",dg),f=[],g=0;d=Uf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=bg(k,"start",dg,g),p=k.id,n=bg(k,"duration",dg),t=null;if(l){var v=bg(l,"start",dg);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.B&&null!==p&&null!==m&&m<a.B)||a.K.includes(p)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=Dq(a,b,c,{start:m,duration:t,node:k,pe:null==t||!l});f.push(g);b.qa.id&&t&&(a.M[b.qa.id]=t);if(null==t){g=
691
- null;break}g=m+t}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,Ef:!1}:{periods:f,duration:g,Ef:!0}}
692
- function Dq(a,b,c,d){b.qa=Eq(d.node,null,c);b.Y=d;b.qa.$b=b.$b;b.qa.id||(b.qa.id="__shaka_period_"+d.start);var e=Uf(d.node,"EventStream");c=b.presentationTimeline.kb();e=r(e);for(var f=e.next();!f.done;f=e.next())Fq(a,d.start,d.duration,f.value,c);c=Uf(d.node,"AdaptationSet").map(function(m){return Gq(a,b,m)}).filter(Ab);if(b.wb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Dh);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new M(2,4,4018);
693
- }d=c.filter(function(m){return!m.Ze});c=c.filter(function(m){return m.Ze});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ze.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={jd:h.jd},l=k.next())h.jd=l.value,h.jd.trickModeVideo=e.streams.find(function(m){return function(p){return yd(m.jd.codecs)==yd(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:Hq(d,"audio");g=a.g.disableVideo?[]:Hq(d,"video");f=a.g.disableText?
694
- []:Hq(d,Gb);c=a.g.disableThumbnails?[]:Hq(d,"image");if(!g.length&&!e.length)throw new M(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ha(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ha(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ha(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ha(h.value.streams));return{id:b.qa.id,od:d,Pd:e,textStreams:g,imageStreams:f}}
695
- function Hq(a,b){return a.filter(function(c){return c.contentType==b})}
696
- function Gq(a,b,c){function d(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.va=Eq(c,b.qa,null);var e=!1,f=Uf(c,"Role"),g=f.map(function(F){return F.getAttribute("value")}).filter(Ab),h=void 0,k=b.va.contentType==Gb;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=
697
- l}}var p;m=Uf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var t=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?p=d(parseInt(n.getAttribute("value"),10)):l=!0}m=Uf(c,"SupplementalProperty");m=r(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),
698
- 10)));m=Uf(c,"Accessibility");var v=new Map;m=r(m);for(n=m.next();!n.done;n=m.next())if(t=n.value,n=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=t){t=t.split(";");for(var y=r(t),w=y.next();!w.done;w=y.next()){var x=w.value,C=w=void 0;x.includes("=")?(x=x.split("="),w=x[0].startsWith("CC")?x[0]:"CC"+x[0],C=x[1]||"und"):(w="CC"+n,2==t.length?n+=2:n++,C=x);v.set(w,Kb(C))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=
699
- 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"+n,n++,x=w),v.set(y,Kb(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Uf(c,"ContentProtection");var z=Xo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=Kb(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=Uf(c,"Label"))&&l.length&&
700
- (l=l[0],l.textContent&&(E=l.textContent));l=Uf(c,"Representation");c=l.map(function(F){if(F=Iq(a,b,z,h,A,E,e,g,v,F))F.hdr=F.hdr||p;return F}).filter(function(F){return!!F});if(0==c.length){f="image"==b.va.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new M(2,4,4003);}if(!b.va.contentType||"application"==b.va.contentType)for(b.va.contentType=Jq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.va.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
701
- m.value,n=r(z.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ha(t.keyIds),ha(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(F){return F.getAttribute("id")}).filter(Ab);return{id:b.va.id||"__fake__"+a.I++,contentType:b.va.contentType,language:A,tj:e,streams:c,drmInfos:z.drmInfos,Ze:f,Dh:k}}
702
- function Iq(a,b,c,d,e,f,g,h,k,l){b.L=Eq(l,b.va,null);a.C=Math.min(a.C,b.L.$b);if(!Kq(b.L))return null;var m=b.Y.start;b.bandwidth=bg(l,"bandwidth",gg)||0;var p=b.L.contentType,n=p==Gb||"application"==p;p="image"==p;try{var t=function(F,H,J){return Lq(a,F,H,J)};if(b.L.Zc)var v=yp(b,t);else if(b.L.Db)v=Ep(b,a.l);else if(b.L.$c)v=Jp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.L.Na,w=b.Y.duration||0;v={bc:function(){return Promise.resolve(Uj(m,w,y))}}}}catch(F){if((n||p)&&4002==F.code)return null;
703
- throw F;}t=Uf(l,"ContentProtection");t=$o(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var x=!1;Uf(l,"SupplementalProperty").some(function(F){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==F.getAttribute("schemeIdUri")&&"JOC"==F.getAttribute("value")})&&(x=!0);var C=!1;n&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(p&&((l=Uf(l,"EssentialProperty").find(function(F){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(F.getAttribute("schemeIdUri"))}))&&
693
+ function Dq(a,b,c,d){var e=bg(d,"mediaPresentationDuration",dg),f=[],g=0;d=Uf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=bg(k,"start",dg,g),p=k.id,n=bg(k,"duration",dg),t=null;if(l){var v=bg(l,"start",dg);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.B&&null!==p&&null!==m&&m<a.B)||a.K.includes(p)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=Fq(a,b,c,{start:m,duration:t,node:k,re:null==t||!l});f.push(g);b.qa.id&&t&&(a.M[b.qa.id]=t);if(null==t){g=
694
+ null;break}g=m+t}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,Ff:!1}:{periods:f,duration:g,Ff:!0}}
695
+ function Fq(a,b,c,d){b.qa=Gq(d.node,null,c);b.Y=d;b.qa.$b=b.$b;b.qa.id||(b.qa.id="__shaka_period_"+d.start);var e=Uf(d.node,"EventStream");c=b.presentationTimeline.kb();e=r(e);for(var f=e.next();!f.done;f=e.next())Hq(a,d.start,d.duration,f.value,c);c=Uf(d.node,"AdaptationSet").map(function(m){return Iq(a,b,m)}).filter(Ab);if(b.wb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.Dh);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new M(2,4,4018);
696
+ }d=c.filter(function(m){return!m.$e});c=c.filter(function(m){return m.$e});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.$e.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={jd:h.jd},l=k.next())h.jd=l.value,h.jd.trickModeVideo=e.streams.find(function(m){return function(p){return yd(m.jd.codecs)==yd(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:Jq(d,"audio");g=a.g.disableVideo?[]:Jq(d,"video");f=a.g.disableText?
697
+ []:Jq(d,Gb);c=a.g.disableThumbnails?[]:Jq(d,"image");if(!g.length&&!e.length)throw new M(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ha(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ha(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ha(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ha(h.value.streams));return{id:b.qa.id,od:d,Qd:e,textStreams:g,imageStreams:f}}
698
+ function Jq(a,b){return a.filter(function(c){return c.contentType==b})}
699
+ function Iq(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.va=Gq(c,b.qa,null);var e=!1,f=Uf(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Ab),h=void 0,k=b.va.contentType==Gb;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=
700
+ l}}var p;m=Uf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var t=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?p=d(parseInt(n.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=t&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=t&&(l=!0)}m=Uf(c,"SupplementalProperty");m=r(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==
701
+ n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),10)));m=Uf(c,"Accessibility");var v=new Map;m=r(m);for(n=m.next();!n.done;n=m.next())if(t=n.value,n=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=t){t=t.split(";");for(var y=r(t),w=y.next();!w.done;w=y.next()){var x=w.value,C=w=void 0;x.includes("=")?(x=x.split("="),w=x[0].startsWith("CC")?x[0]:"CC"+x[0],C=x[1]||"und"):(w="CC"+n,2==t.length?n+=2:n++,C=x);v.set(w,Kb(C))}}else v.set("CC1",
702
+ "und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=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"+n,n++,x=w),v.set(y,Kb(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Uf(c,"ContentProtection");var z=Zo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=Kb(c.getAttribute("lang")||"und"),
703
+ E=c.getAttribute("label");(l=Uf(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(E=l.textContent));l=Uf(c,"Representation");c=l.map(function(G){if(G=Kq(a,b,z,h,A,E,e,g,v,G))G.hdr=G.hdr||p;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.va.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new M(2,4,4003);}if(!b.va.contentType||"application"==b.va.contentType)for(b.va.contentType=Lq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=
704
+ b.va.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=m.value,n=r(z.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ha(t.keyIds),ha(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Ab);return{id:b.va.id||"__fake__"+a.I++,contentType:b.va.contentType,language:A,sj:e,streams:c,drmInfos:z.drmInfos,$e:f,Dh:k}}
705
+ function Kq(a,b,c,d,e,f,g,h,k,l){b.L=Gq(l,b.va,null);a.C=Math.min(a.C,b.L.$b);if(!Mq(b.L))return null;var m=b.Y.start;b.bandwidth=bg(l,"bandwidth",gg)||0;var p=b.L.contentType,n=p==Gb||"application"==p;p="image"==p;try{var t=function(G,H,J){return Nq(a,G,H,J)};if(b.L.Zc)var v=Ap(b,t);else if(b.L.Db)v=Gp(b,a.l);else if(b.L.$c)v=Lp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.L.Na,w=b.Y.duration||0;v={bc:function(){return Promise.resolve(Wj(m,w,y))}}}}catch(G){if((n||p)&&4002==G.code)return null;
706
+ throw G;}t=Uf(l,"ContentProtection");t=bp(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var x=!1;Uf(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(x=!0);var C=!1;n&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(p&&((l=Uf(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
704
707
  (z=l.getAttribute("value")),!z))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");l=b.L.id?b.qa.id+","+b.L.id:"";var E=l&&a.l[l]?a.l[l]:{id:a.I++,originalId:b.L.id,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){E.segmentIndex&&(E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,
705
- 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.va.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.L.Dd,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:A,tilesLayout:z,matchedStreams:[]};E.createSegmentIndex=function(){var F;return G(function(H){if(1==
706
- H.g){if(E.segmentIndex)return H.D(0);F=E;return u(H,v.bc(),3)}F.segmentIndex=H.h;B(H)})};l&&b.wb&&!a.l[l]&&(a.l[l]=E);return E}function wq(a){var b,c;G(function(d){switch(d.g){case 1:return b=0,D(d,2),u(d,xq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=wa(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();yq(a,b);B(d)}})}function yq(a,b){0>a.H||a.G.R(Math.max(3,a.H-b,$b(a.J)))}
707
- function Eq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Dd:null,audioSamplingRate:null,$b:0};c=c||b.Na;var d=Uf(a,"BaseURL"),e=d.map($f),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=bg(a,"frameRate",jg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Uf(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
708
- m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Uf(a,"AudioChannelConfiguration");m=Mq(m)||b.Dd;n=bg(a,"audioSamplingRate",hg)||b.audioSamplingRate;f||(f=Jq(g,h));var t=Tf(a,"SegmentBase"),v=Tf(a,"SegmentTemplate"),y=t?bg(t,"availabilityTimeOffset",ig)||0:0,w=v?bg(v,"availabilityTimeOffset",ig)||0:0;d=d&&d.length?bg(d[0],"availabilityTimeOffset",ig)||0:0;d=b.$b+d+y+w;return{Na:Bb(c,e),Zc:t||b.Zc,Db:Tf(a,"SegmentList")||b.Db,$c:v||b.$c,width:bg(a,"width",hg)||b.width,height:bg(a,
708
+ 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.va.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.L.Dd,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:A,tilesLayout:z,matchedStreams:[]};E.createSegmentIndex=function(){var G;return F(function(H){if(1==
709
+ H.g){if(E.segmentIndex)return H.D(0);G=E;return u(H,v.bc(),3)}G.segmentIndex=H.h;B(H)})};l&&b.wb&&!a.l[l]&&(a.l[l]=E);return E}function yq(a){var b,c;F(function(d){switch(d.g){case 1:return b=0,D(d,2),u(d,zq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=wa(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();Aq(a,b);B(d)}})}function Aq(a,b){0>a.H||a.G.R(Math.max(3,a.H-b,$b(a.J)))}
710
+ function Gq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Dd:null,audioSamplingRate:null,$b:0};c=c||b.Na;var d=Uf(a,"BaseURL"),e=d.map($f),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=bg(a,"frameRate",jg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Uf(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
711
+ m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Uf(a,"AudioChannelConfiguration");m=Oq(m)||b.Dd;n=bg(a,"audioSamplingRate",hg)||b.audioSamplingRate;f||(f=Lq(g,h));var t=Tf(a,"SegmentBase"),v=Tf(a,"SegmentTemplate"),y=t?bg(t,"availabilityTimeOffset",ig)||0:0,w=v?bg(v,"availabilityTimeOffset",ig)||0:0;d=d&&d.length?bg(d[0],"availabilityTimeOffset",ig)||0:0;d=b.$b+d+y+w;return{Na:Bb(c,e),Zc:t||b.Zc,Db:Tf(a,"SegmentList")||b.Db,$c:v||b.$c,width:bg(a,"width",hg)||b.width,height:bg(a,
709
712
  "height",hg)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:p,id:a.getAttribute("id"),Dd:m,audioSamplingRate:n,$b:d}}
710
- function Mq(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=
711
- 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 Kq(a){var b=a.Zc?1:0;b+=a.Db?1:0;b+=a.$c?1:0;if(0==b)return a.contentType==Gb||"application"==a.contentType?!0:!1;1!=b&&(a.Zc&&(a.Db=null),a.$c=null);return!0}
712
- function Nq(a,b,c,d){var e,f,g,h,k,l;return G(function(m){if(1==m.g)return e=Bb(b,[c]),f=nf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),hf(a.s,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m.return(0);k=h.headers.date}else k=$c(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
713
- function Cq(a,b,c){var d,e,f,g,h,k,l,m;return G(function(p){switch(p.g){case 1:d=c.map(function(n){return{scheme:n.getAttribute("schemeIdUri"),value:n.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){p.D(4);break}h=g.value;D(p,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 p.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 p.D(8);
714
- case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p.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":Ua("NTP UTCTiming scheme is not supported");break;default:Ua("Unrecognized scheme in UTCTiming element",k)}p.D(9);break;case 7:return u(p,Nq(a,b,l,"HEAD"),10);case 10:return p.return(p.h);case 8:return u(p,Nq(a,b,l,"GET"),11);case 11:return p.return(p.h);case 9:va(p,
713
+ function Oq(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=
714
+ 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 Mq(a){var b=a.Zc?1:0;b+=a.Db?1:0;b+=a.$c?1:0;if(0==b)return a.contentType==Gb||"application"==a.contentType?!0:!1;1!=b&&(a.Zc&&(a.Db=null),a.$c=null);return!0}
715
+ function Pq(a,b,c,d){var e,f,g,h,k,l;return F(function(m){if(1==m.g)return e=Bb(b,[c]),f=nf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),hf(a.s,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m.return(0);k=h.headers.date}else k=$c(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
716
+ function Eq(a,b,c){var d,e,f,g,h,k,l,m;return F(function(p){switch(p.g){case 1:d=c.map(function(n){return{scheme:n.getAttribute("schemeIdUri"),value:n.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){p.D(4);break}h=g.value;D(p,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 p.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 p.D(8);
717
+ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p.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":Ua("NTP UTCTiming scheme is not supported");break;default:Ua("Unrecognized scheme in UTCTiming element",k)}p.D(9);break;case 7:return u(p,Pq(a,b,l,"HEAD"),10);case 10:return p.return(p.h);case 8:return u(p,Pq(a,b,l,"GET"),11);case 11:return p.return(p.h);case 9:va(p,
715
718
  3);break;case 5:wa(p);case 3:g=f.next();p.D(2);break;case 4:return Ua("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),p.return(0)}})}
716
- function Fq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=bg(d,"timescale",hg)||1;d=r(Uf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=bg(k,"presentationTime",hg)||0,m=bg(k,"duration",hg)||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))}}
717
- function Lq(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=tf,f=kk(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),hf(a.s,h),u(l,h.promise,2);k=l.h;return l.return(k.data)})}function Jq(a,b){return Cd(wd(a,b))?Gb:a.split("/")[0]}I("shaka.dash.DashParser",vq);ch.mpd=function(){return new vq};ah["application/dash+xml"]=function(){return new vq};ah["video/vnd.mpeg.dash.mpd"]=function(){return new vq};function Oq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Pq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Pq.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};
718
- Pq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function W(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Qq(a,b){a=a.getAttribute(b);if(!a)throw new M(2,4,4023,b);return a.value}function Rq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function Sq(a,b){this.name=a;this.value=b};function Tq(a,b){return a.filter(function(c){return c.name==b})}function Uq(a,b){return a.filter(function(c){return Qq(c,"TYPE")==b})}function Vq(a,b){a=Tq(a,b);return a.length?a[0]:null}function Wq(a,b){var c=0;c=void 0===c?0:c;return(a=Vq(a,b))?Number(a.value):c}function Xq(a,b){return Bb([a],[b])[0]};function Yq(a){this.h=a;this.g=0}function Zq(a){$q(a,/[ \t]+/gm)}function $q(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function ar(a){return a.g==a.h.length?null:(a=$q(a,/[^ \t\n]*/gm))?a[0]:null};function br(){this.g=0}
719
- function cr(a,b,c){b=$c(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new M(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=dr(a,g),--a.g,er.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=dr(a,h);if(fr.includes(h.name)){if(1!=b)throw new M(2,4,4017);
720
- 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=dr(a,m),er.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"==W(m,"TYPE")?null!=W(m,"BYTERANGE-START")?null!=W(m,"BYTERANGE-LENGTH")&&k.push(m):k.push(m):"MAP"==W(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Xq(d,m.trim()),h&&g.push(h),e.push(new Rq(m,g,k)),g=[],k=[]);k.length&&
721
- (h&&g.push(h),e.push(new Rq("",g,k)));return new Oq(c,b,f,e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Sq("URI",k)),e=!0)}}return new Oq(c,b,f)}function dr(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new M(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Yq(d);var f;(f=$q(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=$q(d,g);)c.push(new Sq(f[1],f[2]||f[3])),Zq(d)}return new Pq(a,b,c,e)}
722
- var er="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),fr="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function gr(){}function hr(a){try{var b=ir(a);return af({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ze(c)}}
723
- function ir(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new M(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new M(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=id(a):e=dd(a);return{data:e,contentType:c}}I("shaka.net.DataUriPlugin",gr);gr.parse=hr;kf("data",hr);function jr(){var a=this;this.g=this.i=null;this.sa=1;this.s=new Map;this.C=new Map;this.H=new Map;this.H.set("video",new Map);this.H.set("audio",new Map);this.H.set(Gb,new Map);this.H.set("image",new Map);this.ba=new Set;this.h=new Map;this.j=null;this.N="";this.X=new br;this.P=0;this.F=-1;this.J=Infinity;this.ua=!1;this.m=new N(function(){kr(a)});this.aa=lr;this.G=null;this.$=0;this.K=Infinity;this.V=this.ra=0;this.I=new gf;this.M=new Map;this.B=new Map;this.Z=new Map;this.l=!1}q=jr.prototype;
724
- q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return G(function(e){return 1==e.g?(c.i=b,c.l=b.isLowLatencyMode(),u(e,mr(c,a),2)):3!=e.g?(d=e.h,c.N=d.uri,u(e,nr(c,d.data,a),3)):e.return(c.G)})};q.stop=function(){this.m&&(this.m.stop(),this.m=null);var a=[];this.I&&(a.push(this.I.destroy()),this.I=null);this.g=this.i=null;this.ba.clear();this.G=null;this.h.clear();this.C.clear();this.B.clear();this.s.clear();return Promise.all(a)};
725
- q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return G(function(m){if(1==m.g){if(!or(a))return m.return();b=[];c=Array.from(a.h.values());d=c.filter(function(p){return p.stream.segmentIndex});e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(pr(a,g));return u(m,Promise.all(b),2)}qr(a,d.map(function(p){return p.stream}));h=d.some(function(p){return 0==p.Mc});d.length&&!h&&(k=rr,sr(a,k.kg),l=d.map(function(p){return p.mb}),a.j.Sa(Math.min.apply(Math,ha(l))),a.i.updateDuration());h&&tr(a);
726
- B(m)})};function ur(a,b){return or(a)?a.H.get(b.type):b.Bd}
727
- function pr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z;return G(function(A){if(1==A.g)return c=b.md,d=new jb(c),a.l&&b.qd&&mb(d,new ob("_HLS_skip=YES")),u(A,mr(a,d.toString()),2);e=A.h;if(!b.stream.segmentIndex)return A.return();f=cr(a.X,e.data,e.uri);if(1!=f.type)throw new M(2,4,4017);g=Tq(f.g,"EXT-X-DEFINE");h=vr(a,g);k=b.stream;l=ur(a,b);m=wr(f,k.mimeType);p=m.keyIds;n=m.drmInfos;t=function(E,F){return E.size===F.size&&[].concat(ha(E)).every(function(H){return F.has(H)})};t(k.keyIds,p)||(k.keyIds=
728
- p,k.drmInfos=n,a.i.newDrmInfo(k));v=xr(a,f,k.type,l,h);k.segmentIndex.lc(v,a.j.kb());v.length&&(y=Wq(f.g,"EXT-X-MEDIA-SEQUENCE"),w=l.get(y),k.segmentIndex.Gb(w));x=v[0];b.Ob=x.startTime;C=v[v.length-1];b.mb=C.endTime;if(z=Vq(f.g,"EXT-X-ENDLIST"))b.Mc=!0;B(A)})}q.onExpirationUpdated=function(){};
729
- function yr(a,b){for(var c=-1==a.F,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=ur(a,e);if(f=f.g[0]||null){g=r(g);for(var h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.F=Math.max(a.F,k));e.le=k;break}}}}if(!(0>a.F))for(b=r(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(d.g.splice(0,a.F-c.le),d=d.g[0]||null)d=-d.startTime,c.stream.segmentIndex.offset(d),zr(a,c,d)}
730
- function Ar(a,b){if(Infinity==a.J){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.g&&(a.J=Math.min(a.J,d.g))}}b=a.J;if(Infinity!=b)for(d=r(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.g)Ta("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.cd,"Expect AV sync issues!");else for(zr(a,c,f.g-b-f.startTime),c=r(e),e=c.next();!e.done;e=c.next())e.value.We(b)}}}
731
- function zr(a,b,c){b.Ob+=c;b.mb+=c;a=ur(a,b);b=r(a);for(var d=b.next();!d.done;d=b.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.set(d,e+c)}}
732
- function nr(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,F,H,J,K,Q,V,U,ia,O,qa,Ka,Ca,Va;return G(function(Oa){switch(Oa.g){case 1:d=cr(a.X,b,a.N);e=Tq(d.g,"EXT-X-DEFINE");for(var Vb=r(e),Sa=Vb.next();!Sa.done;Sa=Vb.next()){var cb=Sa.value;Sa=W(cb,"NAME");cb=W(cb,"VALUE");Sa&&cb&&(a.s.has(Sa)||a.s.set(Sa,cb))}f=[];g=[];h=[];if(1==d.type)return F=a.g.hls.mediaPlaylistFullMimeType,d.segments.length&&(H=new jb(d.segments[0].i),J=H.Ha.split(".").pop(),(K=Br[J])?F=K:"ts"!==J&&"mp4"!==J&&(Cr[J]?(K=Cr[J],
733
- Q=a.g.hls.defaultAudioCodec,F=K+'; codecs="'+Q+'"'):Dr[J]&&(K=Dr[J],V=a.g.hls.defaultVideoCodec,F=K+'; codecs="'+V+'"'))),U=F.split(";")[0],ia=U.split("/")[0],O=Ad(F),qa=new Map,u(Oa,Er(a,d,c,c,O,ia,"",!0,"Media Playlist",null,qa,null,!1,!1,U),5);k=Tq(d.g,"EXT-X-MEDIA");l=Tq(d.g,"EXT-X-STREAM-INF");m=Tq(d.g,"EXT-X-IMAGE-STREAM-INF");p=Tq(d.g,"EXT-X-SESSION-KEY");Vb=r(l);for(Sa=Vb.next();!Sa.done;Sa=Vb.next()){var kc=Sa.value;cb=W(kc,"AUDIO");Sa=W(kc,"VIDEO");var yb=W(kc,"SUBTITLES");kc=Fr(a,kc);if(yb){var Mp=
734
- Eb(Gb,kc);a.B.set(yb,Mp);ec(kc,Mp)}cb&&(yb=Eb("audio",kc),yb||(yb=a.g.hls.defaultAudioCodec),a.B.set(cb,yb));Sa&&(cb=Eb("video",kc),cb||(cb=a.g.hls.defaultVideoCodec),a.B.set(Sa,cb))}n=Tq(d.g,"EXT-X-SESSION-DATA");t=r(n);for(v=t.next();!v.done;v=t.next())if(y=v.value,w=W(y,"DATA-ID"),x=W(y,"URI"),C=W(y,"LANGUAGE"),z=W(y,"VALUE"),A=(new Map).set("id",w),x&&A.set("uri",Xq(a.N,x)),C&&A.set("language",C),z&&A.set("value",z),E=new L("sessiondata",A),a.i)a.i.onEvent(E);Gr(a,k);Vb=Uq(k,"CLOSED-CAPTIONS");
735
- Vb=r(Vb);for(Sa=Vb.next();!Sa.done;Sa=Vb.next())yb=Sa.value,Sa=Hr(yb),cb=Qq(yb,"GROUP-ID"),yb=Qq(yb,"INSTREAM-ID"),a.M.get(cb)||a.M.set(cb,new Map),a.M.get(cb).set(yb,Sa);f=Ir(a,l,p);g=Jr(a,k);return u(Oa,Kr(a,m),4);case 4:h=Oa.h;Oa.D(3);break;case 5:Ka=Oa.h,a.h.set(c,Ka),f.push({id:0,language:"und",disabledUntilTime:0,primary:!0,audio:"audio"==ia?Ka.stream:null,video:"video"==ia?Ka.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new M(2,
736
- 7,7001);a.j=new P(null,0);a.j.bd(!0);1==d.type&&(or(a)&&(Lr(a),Ca=a.P,a.m.R(Ca)),Va=Array.from(a.h.values()),Mr(a,Va),tr(a));a.G={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.G);B(Oa)}})}
737
- function tr(a){if(or(a)){if(a.P=a.K,a.aa==Nr){for(var b,c=b=Infinity,d=r(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.mb),c=Math.min(c,e.Ob));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.j.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.Se(b)}}else a.j.Sa(Or(a));a.j.we()}
738
- function vr(a,b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=W(e,"NAME");var f=W(e,"VALUE");e=W(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.s.get(e))&&c.set(e,d)}return c}
739
- function Jr(a,b){var c=Uq(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Pr(a,g).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=Qq(d.value,"GROUP-ID");if(d=a.B.get(e))if(e=a.C.get(e)){e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Qr(Gb,d)||Rr(Gb)}}return b.filter(function(g){return g})}
740
- function Kr(a,b){var c,d;return G(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return G(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);D(l,2);return u(l,Sr(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=wa(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
741
- function Gr(a,b){b=b.filter(function(d){var e=W(d,"URI")||"";return"SUBTITLES"!=W(d,"TYPE")&&""!=e});b=r(b);for(var c=b.next();!c.done;c=b.next())Pr(a,c.value)}
742
- function Ir(a,b,c){var d=[],e=new Set;if(0<c.length){c=r(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=Qq(f,"METHOD");if("NONE"!=g&&"AES-128"!=g&&(g=W(f,"KEYFORMAT")||"identity",f=(g=Tr[g])?g(f,""):null)){if(f.keyIds){g=r(f.keyIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}d.push(f)}}}b=b.map(function(k){var l=W(k,"FRAME-RATE"),m=Number(W(k,"AVERAGE-BANDWIDTH"))||Number(Qq(k,"BANDWIDTH")),p=W(k,"RESOLUTION");p=r(p?p.split("x"):[null,null]);var n=p.next().value,t=p.next().value,
743
- v=W(k,"VIDEO-RANGE");k=Ur(a,k);p=k.audio;k=k.video;for(var y=r(k),w=y.next();!w.done;w=y.next())if(w=w.value.stream)w.width=Number(n)||void 0,w.height=Number(t)||void 0,w.frameRate=Number(l)||void 0,w.hdr=v||void 0;l=a.g.disableAudio;if(!p.length||l)p=[null];l=a.g.disableVideo;if(!k.length||l)k=[null];l=[];p=r(p);for(n=p.next();!n.done;n=p.next())for(n=n.value,t=r(k),v=t.next();!v.done;v=t.next()){var x=v.value;if(v=n?n.stream:null)v.drmInfos=d,v.keyIds=e;if(y=x?x.stream:null)y.drmInfos=d,y.keyIds=
719
+ function Hq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=bg(d,"timescale",hg)||1;d=r(Uf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=bg(k,"presentationTime",hg)||0,m=bg(k,"duration",hg)||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))}}
720
+ function Nq(a,b,c,d){var e,f,g,h,k;return F(function(l){if(1==l.g)return e=tf,f=mk(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),hf(a.s,h),u(l,h.promise,2);k=l.h;return l.return(k.data)})}function Lq(a,b){return Cd(wd(a,b))?Gb:a.split("/")[0]}I("shaka.dash.DashParser",xq);ch.mpd=function(){return new xq};ah["application/dash+xml"]=function(){return new xq};ah["video/vnd.mpeg.dash.mpd"]=function(){return new xq};function Qq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Rq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Rq.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};
721
+ Rq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function W(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Sq(a,b){a=a.getAttribute(b);if(!a)throw new M(2,4,4023,b);return a.value}function Tq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function Uq(a,b){this.name=a;this.value=b};function Vq(a,b){return a.filter(function(c){return c.name==b})}function Wq(a,b){return a.filter(function(c){return Sq(c,"TYPE")==b})}function Xq(a,b){a=Vq(a,b);return a.length?a[0]:null}function Yq(a,b){var c=0;c=void 0===c?0:c;return(a=Xq(a,b))?Number(a.value):c}function Zq(a,b){return Bb([a],[b])[0]};function $q(a){this.h=a;this.g=0}function ar(a){br(a,/[ \t]+/gm)}function br(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function cr(a){return a.g==a.h.length?null:(a=br(a,/[^ \t\n]*/gm))?a[0]:null};function dr(){this.g=0}
722
+ function er(a,b,c){b=$c(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new M(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=fr(a,g),--a.g,gr.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=fr(a,h);if(hr.includes(h.name)){if(1!=b)throw new M(2,4,4017);
723
+ 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=fr(a,m),gr.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"==W(m,"TYPE")?null!=W(m,"BYTERANGE-START")?null!=W(m,"BYTERANGE-LENGTH")&&k.push(m):k.push(m):"MAP"==W(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Zq(d,m.trim()),h&&g.push(h),e.push(new Tq(m,g,k)),g=[],k=[]);k.length&&
724
+ (h&&g.push(h),e.push(new Tq("",g,k)));return new Qq(c,b,f,e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Uq("URI",k)),e=!0)}}return new Qq(c,b,f)}function fr(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new M(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new $q(d);var f;(f=br(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=br(d,g);)c.push(new Uq(f[1],f[2]||f[3])),ar(d)}return new Rq(a,b,c,e)}
725
+ var gr="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),hr="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function ir(){}function jr(a){try{var b=kr(a);return af({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ze(c)}}
726
+ function kr(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new M(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new M(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=id(a):e=dd(a);return{data:e,contentType:c}}I("shaka.net.DataUriPlugin",ir);ir.parse=jr;kf("data",jr);function lr(){var a=this;this.g=this.i=null;this.sa=1;this.s=new Map;this.C=new Map;this.H=new Map;this.H.set("video",new Map);this.H.set("audio",new Map);this.H.set(Gb,new Map);this.H.set("image",new Map);this.ba=new Set;this.h=new Map;this.j=null;this.N="";this.X=new dr;this.P=0;this.F=-1;this.J=Infinity;this.ua=!1;this.m=new N(function(){mr(a)});this.aa=nr;this.G=null;this.$=0;this.K=Infinity;this.V=this.ra=0;this.I=new gf;this.M=new Map;this.B=new Map;this.Z=new Map;this.l=!1}q=lr.prototype;
727
+ q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return F(function(e){return 1==e.g?(c.i=b,c.l=b.isLowLatencyMode(),u(e,or(c,a),2)):3!=e.g?(d=e.h,c.N=d.uri,u(e,pr(c,d.data,a),3)):e.return(c.G)})};q.stop=function(){this.m&&(this.m.stop(),this.m=null);var a=[];this.I&&(a.push(this.I.destroy()),this.I=null);this.g=this.i=null;this.ba.clear();this.G=null;this.h.clear();this.C.clear();this.B.clear();this.s.clear();return Promise.all(a)};
728
+ q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return F(function(m){if(1==m.g){if(!qr(a))return m.return();b=[];c=Array.from(a.h.values());d=c.filter(function(p){return p.stream.segmentIndex});e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(rr(a,g));return u(m,Promise.all(b),2)}sr(a,d.map(function(p){return p.stream}));h=d.some(function(p){return 0==p.Mc});d.length&&!h&&(k=tr,ur(a,k.kg),l=d.map(function(p){return p.mb}),a.j.Sa(Math.min.apply(Math,ha(l))),a.i.updateDuration());h&&vr(a);
729
+ B(m)})};function wr(a,b){return qr(a)?a.H.get(b.type):b.Bd}
730
+ function rr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z;return F(function(A){if(1==A.g)return c=b.md,d=new jb(c),a.l&&b.qd&&mb(d,new ob("_HLS_skip=YES")),u(A,or(a,d.toString()),2);e=A.h;if(!b.stream.segmentIndex)return A.return();f=er(a.X,e.data,e.uri);if(1!=f.type)throw new M(2,4,4017);g=Vq(f.g,"EXT-X-DEFINE");h=xr(a,g);k=b.stream;l=wr(a,b);m=yr(f,k.mimeType);p=m.keyIds;n=m.drmInfos;t=function(E,G){return E.size===G.size&&[].concat(ha(E)).every(function(H){return G.has(H)})};t(k.keyIds,p)||(k.keyIds=
731
+ p,k.drmInfos=n,a.i.newDrmInfo(k));v=zr(a,f,k.type,l,h);k.segmentIndex.lc(v,a.j.kb());v.length&&(y=Yq(f.g,"EXT-X-MEDIA-SEQUENCE"),w=l.get(y),k.segmentIndex.Gb(w));x=v[0];b.Ob=x.startTime;C=v[v.length-1];b.mb=C.endTime;if(z=Xq(f.g,"EXT-X-ENDLIST"))b.Mc=!0;B(A)})}q.onExpirationUpdated=function(){};
732
+ function Ar(a,b){for(var c=-1==a.F,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=wr(a,e);if(f=f.g[0]||null){g=r(g);for(var h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.F=Math.max(a.F,k));e.me=k;break}}}}if(!(0>a.F))for(b=r(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(d.g.splice(0,a.F-c.me),d=d.g[0]||null)d=-d.startTime,c.stream.segmentIndex.offset(d),Br(a,c,d)}
733
+ function Cr(a,b){if(Infinity==a.J){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.g&&(a.J=Math.min(a.J,d.g))}}b=a.J;if(Infinity!=b)for(d=r(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.g)Ta("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.cd,"Expect AV sync issues!");else for(Br(a,c,f.g-b-f.startTime),c=r(e),e=c.next();!e.done;e=c.next())e.value.Xe(b)}}}
734
+ function Br(a,b,c){b.Ob+=c;b.mb+=c;a=wr(a,b);b=r(a);for(var d=b.next();!d.done;d=b.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.set(d,e+c)}}
735
+ function pr(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K,Q,V,U,ia,O,qa,Ka,Ca,Va;return F(function(Oa){switch(Oa.g){case 1:d=er(a.X,b,a.N);e=Vq(d.g,"EXT-X-DEFINE");for(var Vb=r(e),Sa=Vb.next();!Sa.done;Sa=Vb.next()){var cb=Sa.value;Sa=W(cb,"NAME");cb=W(cb,"VALUE");Sa&&cb&&(a.s.has(Sa)||a.s.set(Sa,cb))}f=[];g=[];h=[];if(1==d.type)return G=a.g.hls.mediaPlaylistFullMimeType,d.segments.length&&(H=new jb(d.segments[0].i),J=H.Ha.split(".").pop(),(K=Dr[J])?G=K:"ts"!==J&&"mp4"!==J&&(Er[J]?(K=Er[J],
736
+ Q=a.g.hls.defaultAudioCodec,G=K+'; codecs="'+Q+'"'):Fr[J]&&(K=Fr[J],V=a.g.hls.defaultVideoCodec,G=K+'; codecs="'+V+'"'))),U=G.split(";")[0],ia=U.split("/")[0],O=Ad(G),qa=new Map,u(Oa,Gr(a,d,c,c,O,ia,"",!0,"Media Playlist",null,qa,null,!1,!1,U),5);k=Vq(d.g,"EXT-X-MEDIA");l=Vq(d.g,"EXT-X-STREAM-INF");m=Vq(d.g,"EXT-X-IMAGE-STREAM-INF");p=Vq(d.g,"EXT-X-SESSION-KEY");Vb=r(l);for(Sa=Vb.next();!Sa.done;Sa=Vb.next()){var kc=Sa.value;cb=W(kc,"AUDIO");Sa=W(kc,"VIDEO");var yb=W(kc,"SUBTITLES");kc=Hr(a,kc);if(yb){var Mp=
737
+ Eb(Gb,kc);a.B.set(yb,Mp);ec(kc,Mp)}cb&&(yb=Eb("audio",kc),yb||(yb=a.g.hls.defaultAudioCodec),a.B.set(cb,yb));Sa&&(cb=Eb("video",kc),cb||(cb=a.g.hls.defaultVideoCodec),a.B.set(Sa,cb))}n=Vq(d.g,"EXT-X-SESSION-DATA");t=r(n);for(v=t.next();!v.done;v=t.next())if(y=v.value,w=W(y,"DATA-ID"),x=W(y,"URI"),C=W(y,"LANGUAGE"),z=W(y,"VALUE"),A=(new Map).set("id",w),x&&A.set("uri",Zq(a.N,x)),C&&A.set("language",C),z&&A.set("value",z),E=new L("sessiondata",A),a.i)a.i.onEvent(E);Ir(a,k);Vb=Wq(k,"CLOSED-CAPTIONS");
738
+ Vb=r(Vb);for(Sa=Vb.next();!Sa.done;Sa=Vb.next())yb=Sa.value,Sa=Jr(yb),cb=Sq(yb,"GROUP-ID"),yb=Sq(yb,"INSTREAM-ID"),a.M.get(cb)||a.M.set(cb,new Map),a.M.get(cb).set(yb,Sa);f=Kr(a,l,p);g=Lr(a,k);return u(Oa,Mr(a,m),4);case 4:h=Oa.h;Oa.D(3);break;case 5:Ka=Oa.h,a.h.set(c,Ka),f.push({id:0,language:"und",disabledUntilTime:0,primary:!0,audio:"audio"==ia?Ka.stream:null,video:"video"==ia?Ka.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new M(2,
739
+ 7,7001);a.j=new P(null,0);a.j.bd(!0);1==d.type&&(qr(a)&&(Nr(a),Ca=a.P,a.m.R(Ca)),Va=Array.from(a.h.values()),Or(a,Va),vr(a));a.G={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.G);B(Oa)}})}
740
+ function vr(a){if(qr(a)){if(a.P=a.K,a.aa==Pr){for(var b,c=b=Infinity,d=r(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.mb),c=Math.min(c,e.Ob));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.j.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.Ue(b)}}else a.j.Sa(Qr(a));a.j.ye()}
741
+ function xr(a,b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=W(e,"NAME");var f=W(e,"VALUE");e=W(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.s.get(e))&&c.set(e,d)}return c}
742
+ function Lr(a,b){var c=Wq(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Rr(a,g).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=Sq(d.value,"GROUP-ID");if(d=a.B.get(e))if(e=a.C.get(e)){e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Sr(Gb,d)||Tr(Gb)}}return b.filter(function(g){return g})}
743
+ function Mr(a,b){var c,d;return F(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return F(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);D(l,2);return u(l,Ur(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=wa(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
744
+ function Ir(a,b){b=b.filter(function(d){var e=W(d,"URI")||"";return"SUBTITLES"!=W(d,"TYPE")&&""!=e});b=r(b);for(var c=b.next();!c.done;c=b.next())Rr(a,c.value)}
745
+ function Kr(a,b,c){var d=[],e=new Set;if(0<c.length){c=r(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=Sq(f,"METHOD");if("NONE"!=g&&"AES-128"!=g&&(g=W(f,"KEYFORMAT")||"identity",f=(g=Vr[g])?g(f,""):null)){if(f.keyIds){g=r(f.keyIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}d.push(f)}}}b=b.map(function(k){var l=W(k,"FRAME-RATE"),m=Number(W(k,"AVERAGE-BANDWIDTH"))||Number(Sq(k,"BANDWIDTH")),p=W(k,"RESOLUTION");p=r(p?p.split("x"):[null,null]);var n=p.next().value,t=p.next().value,
746
+ v=W(k,"VIDEO-RANGE");k=Wr(a,k);p=k.audio;k=k.video;for(var y=r(k),w=y.next();!w.done;w=y.next())if(w=w.value.stream)w.width=Number(n)||void 0,w.height=Number(t)||void 0,w.frameRate=Number(l)||void 0,w.hdr=v||void 0;l=a.g.disableAudio;if(!p.length||l)p=[null];l=a.g.disableVideo;if(!k.length||l)k=[null];l=[];p=r(p);for(n=p.next();!n.done;n=p.next())for(n=n.value,t=r(k),v=t.next();!v.done;v=t.next()){var x=v.value;if(v=n?n.stream:null)v.drmInfos=d,v.keyIds=e;if(y=x?x.stream:null)y.drmInfos=d,y.keyIds=
744
747
  e;w=n?n.stream.drmInfos:null;var C=x?x.stream.drmInfos:null;x=(x?x.cd:"")+" - "+(n?n.cd:"");v&&y&&w.length&&C.length&&!(0<Xg(w,C).length)||a.ba.has(x)||(v={id:a.sa++,language:v?v.language:"und",primary:!!v&&v.primary||!!y&&y.primary,audio:v,video:y,bandwidth:m,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},l.push(v),a.ba.add(x))}return l}).reduce(xb,[]);return b=b.filter(function(k){return null!=k})}
745
- function Ur(a,b){var c=Fr(a,b),d=W(b,"AUDIO"),e=W(b,"VIDEO"),f=d||e;f=f&&a.C.has(f)?a.C.get(f):[];d={audio:d?f:[],video:e?f:[]};e=!1;var g=Qq(b,"URI"),h=d.audio.find(function(m){return m&&m.cd==g}),k=Eb("video",c),l=Eb("audio",c);l&&!k?f="audio":!f.length&&l&&k?(f="video",c=[[k,l].join()]):d.audio.length&&h?(f="audio",e=!0):f=d.video.length&&!d.audio.length?"audio":"video";e||(a=Vr(a,b,c,f),d[a.stream.type]=[a]);return d}
746
- function Fr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);c=W(b,"CODECS",c.join(",")).split(/\s*,\s*/);a=new Set;b=[];c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=zd(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function Hr(a){a=W(a,"LANGUAGE")||"und";return Kb(a)}
747
- function Pr(a,b){var c=Qq(b,"GROUP-ID"),d="",e=Qq(b,"TYPE").toLowerCase();"subtitles"==e&&(e=Gb);var f=e;f==Gb?d=W(b,"CODECS")||"":c&&a.B.has(c)&&(d=a.B.get(c));e=Wr(Qq(b,"URI"),a.s);if(a.h.has(e))return a.h.get(e);var g=Hr(b),h=W(b,"NAME"),k="YES"==W(b,"DEFAULT");var l="audio"==f?(l=W(b,"CHANNELS"))?parseInt(l.split("/")[0],10):null:null;var m="audio"==f?(m=W(b,"CHANNELS"))?m.includes("/JOC"):!1:!1;var p=W(b,"CHARACTERISTICS");b="YES"==W(b,"FORCED");d=Xr(a,e,d,f,g,k,h,l,null,p,b,m);a.C.has(c)?a.C.get(c).push(d):
748
+ function Wr(a,b){var c=Hr(a,b),d=W(b,"AUDIO"),e=W(b,"VIDEO"),f=d||e;f=f&&a.C.has(f)?a.C.get(f):[];d={audio:d?f:[],video:e?f:[]};e=!1;var g=Sq(b,"URI"),h=d.audio.find(function(m){return m&&m.cd==g}),k=Eb("video",c),l=Eb("audio",c);l&&!k?f="audio":!f.length&&l&&k?(f="video",c=[[k,l].join()]):d.audio.length&&h?(f="audio",e=!0):f=d.video.length&&!d.audio.length?"audio":"video";e||(a=Xr(a,b,c,f),d[a.stream.type]=[a]);return d}
749
+ function Hr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);c=W(b,"CODECS",c.join(",")).split(/\s*,\s*/);a=new Set;b=[];c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=zd(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function Jr(a){a=W(a,"LANGUAGE")||"und";return Kb(a)}
750
+ function Rr(a,b){var c=Sq(b,"GROUP-ID"),d="",e=Sq(b,"TYPE").toLowerCase();"subtitles"==e&&(e=Gb);var f=e;f==Gb?d=W(b,"CODECS")||"":c&&a.B.has(c)&&(d=a.B.get(c));e=Yr(Sq(b,"URI"),a.s);if(a.h.has(e))return a.h.get(e);var g=Jr(b),h=W(b,"NAME"),k="YES"==W(b,"DEFAULT");var l="audio"==f?(l=W(b,"CHANNELS"))?parseInt(l.split("/")[0],10):null:null;var m="audio"==f?(m=W(b,"CHANNELS"))?m.includes("/JOC"):!1:!1;var p=W(b,"CHARACTERISTICS");b="YES"==W(b,"FORCED");d=Zr(a,e,d,f,g,k,h,l,null,p,b,m);a.C.has(c)?a.C.get(c).push(d):
748
751
  a.C.set(c,[d]);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
749
- function Sr(a,b){var c,d,e,f,g,h,k,l,m,p;return G(function(n){if(1==n.g){c=Wr(Qq(b,"URI"),a.s);d=W(b,"CODECS","jpeg")||"";if(a.h.has(c))return n.return(a.h.get(c));e=Hr(b);f=W(b,"NAME");g=W(b,"CHARACTERISTICS");h=Xr(a,c,d,"image",e,!1,f,null,null,g,!1,!1);return a.h.has(c)?n.return(a.h.get(c)):(k=W(b,"RESOLUTION"))?u(n,h.stream.createSegmentIndex(),3):n.D(2)}2!=n.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
750
- Number(m.split("x")[1]));if(p=W(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function Vr(a,b,c,d){var e=Wr(Qq(b,"URI"),a.s);if(a.h.has(e))return a.h.get(e);b=W(b,"CLOSED-CAPTIONS");b="video"==d&&b&&"NONE"!=b?a.M.get(b):null;c=Db(d,c);d=Xr(a,e,c,d,"und",!1,null,null,b,null,!1,!1);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
751
- function Xr(a,b,c,d,e,f,g,h,k,l,m,p){function n(C){var z,A,E,F,H,J,K,Q,V,U,ia,O,qa,Ka;return G(function(Ca){if(1==Ca.g)return u(Ca,mr(a,y.md),2);if(3!=Ca.g){z=Ca.h;if(C.aborted)return Ca.return();A=z.uri;E=cr(a.X,z.data,A);F=or(a);return u(Ca,Er(a,E,b,A,c,d,e,f,g,h,k,l,m,p),3)}H=Ca.h;if(C.aborted)return Ca.return();J=H.stream;or(a)&&!F&&Lr(a);y.md=A;y.Ob=H.Ob;y.mb=H.mb;y.qd=H.qd;y.Mc=H.Mc;y.Bd=H.Bd;y.ve=!0;v.segmentIndex=J.segmentIndex;v.encrypted=J.encrypted;v.drmInfos=J.drmInfos;v.keyIds=J.keyIds;
752
- v.mimeType=J.mimeType;fj.includes(v.mimeType)&&(v.codecs="");v.drmInfos.length&&a.i.newDrmInfo(v);K=Hb;if(d==K.Ma||d==K.kd)for(Q=r(a.h.values()),V=Q.next();!V.done;V=Q.next())U=V.value,U.ve||U.type!=d||(U.stream.mimeType=J.mimeType,fj.includes(U.stream.mimeType)&&(U.stream.codecs=""));d==K.ea&&(ia=J.segmentIndex.get(0))&&ia.h&&(v.mimeType="application/mp4");Yr(a)&&(a.ua?Mr(a,[y]):(a.ua=!0,O=Array.from(a.h.values()),qa=O.filter(function(Va){return Va.stream.segmentIndex}),Mr(a,qa),tr(a),Ka=a.P,0<Ka&&
753
- a.m.R(Ka)));B(Ca)})}var t=Xq(a.N,b),v=Zr(a,c,d,e,f,g,h,k,l,m,p);fj.includes(v.mimeType)&&(v.codecs="");var y={stream:v,type:d,cd:b,md:t,Ob:0,mb:0,Bd:new Map,qd:!1,Mc:!1,le:-1,ve:!1},w=null,x=new AbortController;v.createSegmentIndex=function(){if(w)return w;x=new AbortController;return w=new Promise(function(C){C(n(x.signal))})};v.closeSegmentIndex=function(){w&&!v.segmentIndex&&x.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);w=null};return y}
754
- function Or(a){var b=Infinity;a=r(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.mb));return b}function qr(a,b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&Sj(d.segmentIndex,function(e){c.push(e)});a.j.mc(c)}
755
- function Mr(a,b){if(!or(a))for(var c=Or(a),d=r(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.xb(0,c);c=r(b);for(e=c.next();!e.done;e=c.next())e=e.value.stream,fj.includes(e.mimeType)&&(e.codecs="");qr(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?yr(a,b):Ar(a,b)}
756
- function Yr(a){if(!a.G)return!1;var b=[],c=[];a=r(a.G.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
757
- function Er(a,b,c,d,e,f,g,h,k,l,m,p,n,t,v){var y,w,x,C,z,A,E,F,H,J,K,Q,V,U,ia,O;return G(function(qa){if(1==qa.g){if(1!=b.type)throw new M(2,4,4017);y=Tq(b.g,"EXT-X-DEFINE");w=vr(a,y);$r(a,b);return v?qa.D(2):u(qa,as(a,f,e,b,w),3)}2!=qa.g&&(v=qa.h);x=wr(b,v);C=x.drmInfos;z=x.keyIds;A=x.encrypted;E=x.og;if(A&&!C.length&&!E)throw new M(2,4,4026);F=or(a)?a.H.get(f):new Map;H=a.l;J=xr(a,b,f,F,w);H!=a.l&&$r(a,b);K=J[0].startTime;Q=J[J.length-1].endTime;V=new Rj(J);ia=(U=Vq(b.g,"EXT-X-SERVER-CONTROL"))?
758
- null!=U.getAttribute("CAN-SKIP-UNTIL"):!1;O=Zr(a,e,f,g,h,k,l,m,p,n,t);O.segmentIndex=V;O.encrypted=A;O.drmInfos=C;O.keyIds=z;O.mimeType=v;return qa.return({stream:O,type:f,cd:c,md:d,Ob:K,mb:Q,qd:ia,Mc:!1,le:-1,Bd:F,ve:!1})})}
759
- function Zr(a,b,c,d,e,f,g,h,k,l,m){var p=Qr(c,b)||Rr(c);return{id:a.sa++,originalId:f,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:p,codecs:b,kind:c==Gb?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:k?k.split(","):[],forced:l,channelsCount:g,audioSamplingRate:null,spatialAudio:m,closedCaptions:h,
760
- hdr:void 0,tilesLayout:void 0}}
761
- function wr(a,b){var c=[];if(a.segments){a=r(a.segments);for(var d=a.next();!d.done;d=a.next())d=Tq(d.value.g,"EXT-X-KEY"),c.push.apply(c,ha(d))}d=a=!1;var e=[],f=new Set;c=r(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=Qq(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=W(g,"KEYFORMAT")||"identity",g=(h=Tr[h])?h(g,b):null){if(g.keyIds){h=r(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,og:d}}
762
- function bs(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Ua("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new M(2,4,4042);var d=0,e=W(b,"IV","");if(e){var f=jd(e.substr(2));if(16!=f.byteLength)throw new M(2,4,4043);}else d=Wq(c.g,"EXT-X-MEDIA-SEQUENCE");b=Xq(c.h,Qq(b,"URI"));var g=nf([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return G(function(p){if(1==p.g)return u(p,
763
- cs(a,g,6),2);if(3!=p.g){k=p.h;if(!k.data||16!=k.data.byteLength)throw new M(2,4,4044);l={name:"AES-CBC"};m=h;return u(p,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=p.h;h.fetchKey=void 0;B(p)})}};return h}
764
- function $r(a,b){var c=Vq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Vq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)sr(a,lr);else{c?sr(a,Nr):sr(a,ds);d=Vq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new M(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Vq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ra=Number(Qq(c,"PART-TARGET")),a.K=Math.min(a.ra,a.K),b=Vq(b.g,"EXT-X-SERVER-CONTROL"),a.V=b?Number(Qq(b,"PART-HOLD-BACK")):0):a.K=Math.min(d,a.K);a.$=Math.max(d,a.$)}}
765
- function Lr(a){var b=a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.V?a.V:a.$*a.g.hls.liveSegmentsDelay;a.j.$f(0);a.j.Xf(b);a.j.bd(!1)}function es(a,b,c,d){c=Vq(c,"EXT-X-MAP");if(!c)return null;var e=Qq(c,"URI");d=Wr(Xq(b,e),d);b=[d,W(c,"BYTERANGE","")].join("-");a.Z.has(b)||(c=fs(d,c),a.Z.set(b,c));return a.Z.get(b)}function fs(a,b){var c=0,d=null;if(b=W(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new wi(function(){return[a]},c,d)}
766
- function gs(a,b,c,d,e,f,g,h,k,l){var m=d.g,p=Wr(d.i,f),n=Vq(m,"EXTINF"),t=f=0,v=null;d.h.length&&!a.l&&Ua("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var y=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Vq(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(y=cg(w.value))}w=zi;Vq(m,"EXT-X-GAP")&&(w=2);if(!n){if(0==d.h.length)throw new M(2,4,4024,
767
- "EXTINF");if(!a.l)return null}var x=[];if(a.l)for(var C={},z=0;z<d.h.length;C={Xd:C.Xd},z++){var A=d.h[z],E=0==z?c:x[x.length-1],F=0==z?e:E.endTime,H=Number(W(A,"DURATION"))||a.ra;if(H){H=F+H;var J=0,K=null;"EXT-X-PRELOAD-HINT"==A.name?J=(J=W(A,"BYTERANGE-START"))?Number(J):0:(J=W(A,"BYTERANGE"),K=r(hs(E,J)),J=K.next().value,K=K.next().value);if(E=W(A,"URI"))C.Xd=Xq(g,E),E=zi,"YES"==W(A,"GAP")&&(E=2),F=new yi(F,H,function(Q){return function(){return[Q.Xd]}}(C),J,K,b,0,0,Infinity,[],"",null,null,E),
768
- "EXT-X-PRELOAD-HINT"==A.name&&F.Pf(),x.push(F)}}n?f=e+Number(n.value.split(",")[0]):f=x[x.length-1].endTime;(a=Vq(m,"EXT-X-BYTERANGE"))?(v=r(hs(c,a.value)),t=v.next().value,v=v.next().value):x.length&&(t=x[0].Ta,v=x[x.length-1].Ca);c="";a=null;"image"==h&&(c="1x1",h=Vq(m,"EXT-X-TILES"))&&(c=Qq(h,"LAYOUT"),(h=W(h,"DURATION"))&&(a=Number(h)));return new yi(e,f,function(){return p.length?[p]:[]},t,v,b,k,0,Infinity,x,c,a,y,w,l)}
769
- function hs(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Ca+1,d=c+b-1);return[c,d]}
770
- function xr(a,b,c,d,e){var f=b.segments,g=void 0,h=Wq(b.g,"EXT-X-DISCONTINUITY-SEQUENCE"),k=Wq(b.g,"EXT-X-MEDIA-SEQUENCE"),l=Vq(b.g,"EXT-X-SKIP");l=l?Number(W(l,"SKIPPED-SEGMENTS")):0;var m=k+l,p=0;or(a)&&d.has(m)&&(p=d.get(m));for(var n=[],t=null,v=p,y=0;y<f.length;y++){var w=f[y],x=0==y?p:t.endTime;m=k+l+y;Vq(w.g,"EXT-X-DISCONTINUITY")&&(h++,v=x);var C=r(w.g);for(var z=C.next();!z.done;z=C.next())z=z.value,"EXT-X-KEY"==z.name&&("AES-128"==Qq(z,"METHOD")?g=bs(a,z,b):g=void 0);d.set(m,x);C=es(a,b.h,
771
- w.g,e);!a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());if(t=w=gs(a,C,t,w,x,e,b.h,c,v,g))w.j=h,a.g.hls.ignoreManifestProgramDateTime&&null!=a.F&&m<a.F||n.push(w)}if(b=n.some(function(A){return null!=A.g}))for(c={},d=0;d<n.length;c={uc:c.uc,tc:c.tc,dd:c.dd,rb:c.rb,sc:c.sc},d++)if(c.rb=n[d],null==c.rb.g)for(c.tc=0,c.uc=d,e=function(A){return function(){var E=n[A.uc];if(E){if(null!=E.g)return E.g+A.tc;A.tc-=E.endTime-E.startTime;A.uc+=1}return null}}(c),c.sc=
772
- 0,c.dd=d,f=function(A){return function(){var E=n[A.dd];if(E){E!=A.rb&&(A.sc+=E.endTime-E.startTime);if(null!=E.g)return E.g+A.sc;--A.dd}return null}}(c);null==c.rb.g;)c.rb.g=f(),null==c.rb.g&&(c.rb.g=e());if(b)for(c=r(n),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=r(e.i),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.J;if(b&&Infinity!=a)for(b=r(n),d=b.next();!d.done;d=b.next())d.value.We(a);return n}
773
- function Wr(a,b){if(!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new M(2,4,4039,e);}}return a}function Qr(a,b){if(a==Gb){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":null:"image/jpeg"}
774
- function Rr(a){return a==Gb?"text/vtt":is[a].mp4}function as(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,v;return G(function(y){if(1==y.g){f=tf;g=Math.trunc((d.segments.length-1)/2);h=Wr(d.segments[g].i,e);k=new jb(h);l=k.Ha.split(".").pop();m=is[b];if((p=m[l])||(p=Br[l])||(p=Qr(b,c)))return y.return(p);n=nf([h],a.g.retryParameters);n.method="HEAD";return u(y,cs(a,n,f),2)}t=y.h;return(v=t.headers["content-type"])?y.return(v.split(";")[0]):y.return(Rr(b))})}
775
- function mr(a,b){b=nf([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return cs(a,b,0)}function kr(a){var b,c;G(function(d){if(1==d.g){if(!a.i)return d.return();D(d,2);return u(d,a.update(),4)}if(2!=d.g)return or(a)&&(b=a.P,a.m.R(b)),va(d,0);c=wa(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.m.R(.1);B(d)})}function or(a){return a.aa!=lr}function sr(a,b){a.aa=b;a.j&&a.j.bd(!or(a));or(a)||a.m.stop()}
776
- function cs(a,b,c){if(!a.I)throw new M(2,7,7001);b=a.i.networkingEngine.request(c,b);hf(a.I,b);return b.promise}I("shaka.hls.HlsParser",jr);
777
- var Br={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Cr={mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},Dr={mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},is={audio:Cr,video:Dr,text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
778
- vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Tr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new M(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new M(2,4,4041);return Cb("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Qq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
779
- b=Qq(a,"URI");b=ir(b);b=Fc(b.data);b=Cb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=W(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Qq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Qq(a,"URI");a=ir(a);a=Fc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Sf(a,b,new Set,0);return Cb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
780
- Qq(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?Cb("org.w3.clearkey",null):null}},lr="VOD",ds="EVENT",Nr="LIVE",rr={kg:lr,ji:ds,ig:Nr};Rc("Tizen 3")||Rc("Tizen 2")||Tc()||(ch.m3u8=function(){return new jr},ah["application/x-mpegurl"]=function(){return new jr},ah["application/vnd.apple.mpegurl"]=function(){return new jr});function js(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=cd(b)}catch(g){}throw new M(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function ks(){}function ls(a,b,c,d,e){var f=new ms;Bf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ns,h={xf:!1,fg:!1};a=os(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 Ye(a,function(){h.xf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new N(function(){h.fg=!0;g.abort()});k.R(b/1E3);a.finally(function(){k.stop()})}return a}
781
- function os(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,v,y,w,x,C,z;return G(function(A){switch(A.g){case 1:return h=ps,k=qs,n=p=0,t=Date.now(),D(A,2),u(A,h(a,c),4);case 4:l=A.h;f(rs(l.headers));if("HEAD"==c.method){A.D(5);break}v=l.clone().body.getReader();w=(y=l.headers.get("Content-Length"))?parseInt(y,10):0;x=function(E){function F(){var H,J;return G(function(K){switch(K.g){case 1:return D(K,2),u(K,v.read(),4);case 4:H=K.h;va(K,3);break;case 2:return wa(K),K.return();case 3:if(H.done){K.D(5);break}p+=H.value.byteLength;
782
- if(!g){K.D(5);break}return u(K,g(H.value),5);case 5:J=Date.now();if(100<J-t||H.done)e(J-t,p-n,w-p),n=p,t=J;H.done?E.close():(E.enqueue(H.value),F());B(K)}})}F()};new k({start:x});return u(A,l.arrayBuffer(),6);case 6:m=A.h;case 5:va(A,3);break;case 2:C=wa(A);if(d.xf)throw new M(1,1,7001,a,b);if(d.fg)throw new M(1,1,1003,a,b);throw new M(1,1,1002,a,C,b);case 3:return z=rs(l.headers),A.return(js(z,m,l.status,a,l.url,b))}})}function rs(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
783
- function ss(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}I("shaka.net.HttpFetchPlugin",ks);ks.isSupported=ss;ks.parse=ls;var ps=window.fetch,ns=window.AbortController,qs=window.ReadableStream,ms=window.Headers;ss()&&(kf("http",ls,2,!0),kf("https",ls,2,!0),kf("blob",ls,2,!0));function ts(){}
784
- function us(a,b,c,d,e){var f=new vs,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 M(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var t=ws(f);e(t);p=!0}};f.onload=function(){var t=ws(f),v=f.response;try{var y=js(t,v,f.status,a,f.responseURL,c);l(y)}catch(w){m(w)}};f.onerror=function(t){m(new M(1,1,1002,a,t,
752
+ function Ur(a,b){var c,d,e,f,g,h,k,l,m,p;return F(function(n){if(1==n.g){c=Yr(Sq(b,"URI"),a.s);d=W(b,"CODECS","jpeg")||"";if(a.h.has(c))return n.return(a.h.get(c));e=Jr(b);f=W(b,"NAME");g=W(b,"CHARACTERISTICS");h=Zr(a,c,d,"image",e,!1,f,null,null,g,!1,!1);return a.h.has(c)?n.return(a.h.get(c)):(k=W(b,"RESOLUTION"))?u(n,h.stream.createSegmentIndex(),3):n.D(2)}2!=n.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
753
+ Number(m.split("x")[1]));if(p=W(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function Xr(a,b,c,d){var e=Yr(Sq(b,"URI"),a.s);if(a.h.has(e))return a.h.get(e);b=W(b,"CLOSED-CAPTIONS");b="video"==d&&b&&"NONE"!=b?a.M.get(b):null;c=Db(d,c);d=Zr(a,e,c,d,"und",!1,null,null,b,null,!1,!1);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
754
+ function Zr(a,b,c,d,e,f,g,h,k,l,m,p){function n(C){var z,A,E,G,H,J,K,Q,V,U,ia,O,qa,Ka;return F(function(Ca){if(1==Ca.g)return u(Ca,or(a,y.md),2);if(3!=Ca.g){z=Ca.h;if(C.aborted)return Ca.return();A=z.uri;E=er(a.X,z.data,A);G=qr(a);return u(Ca,Gr(a,E,b,A,c,d,e,f,g,h,k,l,m,p),3)}H=Ca.h;if(C.aborted)return Ca.return();J=H.stream;qr(a)&&!G&&Nr(a);y.md=A;y.Ob=H.Ob;y.mb=H.mb;y.qd=H.qd;y.Mc=H.Mc;y.Bd=H.Bd;y.xe=!0;v.segmentIndex=J.segmentIndex;v.encrypted=J.encrypted;v.drmInfos=J.drmInfos;v.keyIds=J.keyIds;
755
+ v.mimeType=J.mimeType;hj.includes(v.mimeType)&&(v.codecs="");v.drmInfos.length&&a.i.newDrmInfo(v);K=Hb;if(d==K.Ma||d==K.kd)for(Q=r(a.h.values()),V=Q.next();!V.done;V=Q.next())U=V.value,U.xe||U.type!=d||(U.stream.mimeType=J.mimeType,hj.includes(U.stream.mimeType)&&(U.stream.codecs=""));d==K.ea&&(ia=J.segmentIndex.get(0))&&ia.h&&(v.mimeType="application/mp4");$r(a)&&(a.ua?Or(a,[y]):(a.ua=!0,O=Array.from(a.h.values()),qa=O.filter(function(Va){return Va.stream.segmentIndex}),Or(a,qa),vr(a),Ka=a.P,0<Ka&&
756
+ a.m.R(Ka)));B(Ca)})}var t=Zq(a.N,b),v=as(a,c,d,e,f,g,h,k,l,m,p);hj.includes(v.mimeType)&&(v.codecs="");var y={stream:v,type:d,cd:b,md:t,Ob:0,mb:0,Bd:new Map,qd:!1,Mc:!1,me:-1,xe:!1},w=null,x=new AbortController;v.createSegmentIndex=function(){if(w)return w;x=new AbortController;return w=new Promise(function(C){C(n(x.signal))})};v.closeSegmentIndex=function(){w&&!v.segmentIndex&&x.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);w=null};return y}
757
+ function Qr(a){var b=Infinity;a=r(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.mb));return b}function sr(a,b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&Uj(d.segmentIndex,function(e){c.push(e)});a.j.mc(c)}
758
+ function Or(a,b){if(!qr(a))for(var c=Qr(a),d=r(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.xb(0,c);c=r(b);for(e=c.next();!e.done;e=c.next())e=e.value.stream,hj.includes(e.mimeType)&&(e.codecs="");sr(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?Ar(a,b):Cr(a,b)}
759
+ function $r(a){if(!a.G)return!1;var b=[],c=[];a=r(a.G.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
760
+ function Gr(a,b,c,d,e,f,g,h,k,l,m,p,n,t,v){var y,w,x,C,z,A,E,G,H,J,K,Q,V,U,ia,O;return F(function(qa){if(1==qa.g){if(1!=b.type)throw new M(2,4,4017);y=Vq(b.g,"EXT-X-DEFINE");w=xr(a,y);bs(a,b);return v?qa.D(2):u(qa,cs(a,f,e,b,w),3)}2!=qa.g&&(v=qa.h);x=yr(b,v);C=x.drmInfos;z=x.keyIds;A=x.encrypted;E=x.og;if(A&&!C.length&&!E)throw new M(2,4,4026);G=qr(a)?a.H.get(f):new Map;H=a.l;J=zr(a,b,f,G,w);H!=a.l&&bs(a,b);K=J[0].startTime;Q=J[J.length-1].endTime;V=new Tj(J);ia=(U=Xq(b.g,"EXT-X-SERVER-CONTROL"))?
761
+ null!=U.getAttribute("CAN-SKIP-UNTIL"):!1;O=as(a,e,f,g,h,k,l,m,p,n,t);O.segmentIndex=V;O.encrypted=A;O.drmInfos=C;O.keyIds=z;O.mimeType=v;return qa.return({stream:O,type:f,cd:c,md:d,Ob:K,mb:Q,qd:ia,Mc:!1,me:-1,Bd:G,xe:!1})})}
762
+ function as(a,b,c,d,e,f,g,h,k,l,m){var p=Sr(c,b)||Tr(c),n=[];if(k){k=r(k.split(","));for(var t=k.next();!t.done;t=k.next())n.push(t.value)}k=c==Gb?"subtitle":void 0;n.length||"subtitle"!==k||n.push("subtitle");return{id:a.sa++,originalId:f,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:p,codecs:b,kind:k,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,
763
+ height:void 0,bandwidth:void 0,roles:n,forced:l,channelsCount:g,audioSamplingRate:null,spatialAudio:m,closedCaptions:h,hdr:void 0,tilesLayout:void 0}}
764
+ function yr(a,b){var c=[];if(a.segments){a=r(a.segments);for(var d=a.next();!d.done;d=a.next())d=Vq(d.value.g,"EXT-X-KEY"),c.push.apply(c,ha(d))}d=a=!1;var e=[],f=new Set;c=r(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=Sq(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=W(g,"KEYFORMAT")||"identity",g=(h=Vr[h])?h(g,b):null){if(g.keyIds){h=r(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,og:d}}
765
+ function ds(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Ua("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new M(2,4,4042);var d=0,e=W(b,"IV","");if(e){var f=jd(e.substr(2));if(16!=f.byteLength)throw new M(2,4,4043);}else d=Yq(c.g,"EXT-X-MEDIA-SEQUENCE");b=Zq(c.h,Sq(b,"URI"));var g=nf([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return F(function(p){if(1==p.g)return u(p,
766
+ es(a,g,6),2);if(3!=p.g){k=p.h;if(!k.data||16!=k.data.byteLength)throw new M(2,4,4044);l={name:"AES-CBC"};m=h;return u(p,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=p.h;h.fetchKey=void 0;B(p)})}};return h}
767
+ function bs(a,b){var c=Xq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Xq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)ur(a,nr);else{c?ur(a,Pr):ur(a,fs);d=Xq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new M(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Xq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ra=Number(Sq(c,"PART-TARGET")),a.K=Math.min(a.ra,a.K),b=Xq(b.g,"EXT-X-SERVER-CONTROL"),a.V=b?Number(Sq(b,"PART-HOLD-BACK")):0):a.K=Math.min(d,a.K);a.$=Math.max(d,a.$)}}
768
+ function Nr(a){var b=a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.V?a.V:a.$*a.g.hls.liveSegmentsDelay;a.j.$f(0);a.j.Xf(b);a.j.bd(!1)}function gs(a,b,c,d){c=Xq(c,"EXT-X-MAP");if(!c)return null;var e=Sq(c,"URI");d=Yr(Zq(b,e),d);b=[d,W(c,"BYTERANGE","")].join("-");a.Z.has(b)||(c=hs(d,c),a.Z.set(b,c));return a.Z.get(b)}function hs(a,b){var c=0,d=null;if(b=W(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new yi(function(){return[a]},c,d)}
769
+ function is(a,b,c,d,e,f,g,h,k,l){var m=d.g,p=Yr(d.i,f),n=Xq(m,"EXTINF"),t=0;f=0;var v=null;d.h.length&&!a.l&&Ua("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var y=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Xq(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(y=cg(w.value))}w=Bi;Xq(m,"EXT-X-GAP")&&(w=2);if(!n){if(0==d.h.length)throw new M(2,4,
770
+ 4024,"EXTINF");if(!a.l)return null}var x=[];if(a.l){t={};for(var C=0;C<d.h.length;t={Yd:t.Yd},C++){var z=d.h[C],A=0==C?c:x[x.length-1],E=0==C?e:A.endTime,G=Number(W(z,"DURATION"))||a.ra;if(G){G=E+G;var H=0,J=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=W(z,"BYTERANGE-START"))?Number(H):0:(H=W(z,"BYTERANGE"),J=r(js(A,H)),H=J.next().value,J=J.next().value);if(A=W(z,"URI"))t.Yd=Zq(g,A),A=Bi,"YES"==W(z,"GAP")&&(A=2),E=new Ai(E,G,function(K){return function(){return[K.Yd]}}(t),H,J,b,0,0,Infinity,[],"",null,
771
+ null,A),"EXT-X-PRELOAD-HINT"==z.name&&E.Pf(),x.push(E)}}}if(n){a=Number(n.value.split(",")[0]);if(0==a)return null;t=e+a}else t=x[x.length-1].endTime;(a=Xq(m,"EXT-X-BYTERANGE"))?(v=r(js(c,a.value)),f=v.next().value,v=v.next().value):x.length&&(f=x[0].Ta,v=x[x.length-1].Ca);c="";a=null;"image"==h&&(c="1x1",h=Xq(m,"EXT-X-TILES"))&&(c=Sq(h,"LAYOUT"),(h=W(h,"DURATION"))&&(a=Number(h)));return new Ai(e,t,function(){return p.length?[p]:[]},f,v,b,k,0,Infinity,x,c,a,y,w,l)}
772
+ function js(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Ca+1,d=c+b-1);return[c,d]}
773
+ function zr(a,b,c,d,e){var f=b.segments,g=void 0,h=Yq(b.g,"EXT-X-DISCONTINUITY-SEQUENCE"),k=Yq(b.g,"EXT-X-MEDIA-SEQUENCE"),l=Xq(b.g,"EXT-X-SKIP");l=l?Number(W(l,"SKIPPED-SEGMENTS")):0;var m=k+l,p=0;qr(a)&&d.has(m)&&(p=d.get(m));for(var n=[],t=null,v=p,y=0;y<f.length;y++){var w=f[y],x=0==y?p:t.endTime;m=k+l+y;Xq(w.g,"EXT-X-DISCONTINUITY")&&(h++,v=x);var C=r(w.g);for(var z=C.next();!z.done;z=C.next())z=z.value,"EXT-X-KEY"==z.name&&("AES-128"==Sq(z,"METHOD")?g=ds(a,z,b):g=void 0);d.set(m,x);C=gs(a,b.h,
774
+ w.g,e);!a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());if(w=is(a,C,t,w,x,e,b.h,c,v,g))t=w,w.j=h,a.g.hls.ignoreManifestProgramDateTime&&null!=a.F&&m<a.F||n.push(w)}if(b=n.some(function(A){return null!=A.g}))for(c={},d=0;d<n.length;c={uc:c.uc,tc:c.tc,dd:c.dd,rb:c.rb,sc:c.sc},d++)if(c.rb=n[d],null==c.rb.g)for(c.tc=0,c.uc=d,e=function(A){return function(){var E=n[A.uc];if(E){if(null!=E.g)return E.g+A.tc;A.tc-=E.endTime-E.startTime;A.uc+=1}return null}}(c),c.sc=
775
+ 0,c.dd=d,f=function(A){return function(){var E=n[A.dd];if(E){E!=A.rb&&(A.sc+=E.endTime-E.startTime);if(null!=E.g)return E.g+A.sc;--A.dd}return null}}(c);null==c.rb.g;)c.rb.g=f(),null==c.rb.g&&(c.rb.g=e());if(b)for(c=r(n),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=r(e.i),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.J;if(b&&Infinity!=a)for(b=r(n),d=b.next();!d.done;d=b.next())d.value.Xe(a);return n}
776
+ function Yr(a,b){if(!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new M(2,4,4039,e);}}return a}function Sr(a,b){if(a==Gb){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":null:"image/jpeg"}
777
+ function Tr(a){return a==Gb?"text/vtt":ks[a].mp4}function cs(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,v;return F(function(y){if(1==y.g){f=tf;g=Math.trunc((d.segments.length-1)/2);h=Yr(d.segments[g].i,e);k=new jb(h);l=k.Ha.split(".").pop();m=ks[b];if((p=m[l])||(p=Dr[l])||(p=Sr(b,c)))return y.return(p);n=nf([h],a.g.retryParameters);n.method="HEAD";return u(y,es(a,n,f),2)}t=y.h;return(v=t.headers["content-type"])?y.return(v.split(";")[0]):y.return(Tr(b))})}
778
+ function or(a,b){b=nf([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return es(a,b,0)}function mr(a){var b,c;F(function(d){if(1==d.g){if(!a.i)return d.return();D(d,2);return u(d,a.update(),4)}if(2!=d.g)return qr(a)&&(b=a.P,a.m.R(b)),va(d,0);c=wa(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.m.R(.1);B(d)})}function qr(a){return a.aa!=nr}function ur(a,b){a.aa=b;a.j&&a.j.bd(!qr(a));qr(a)||a.m.stop()}
779
+ function es(a,b,c){if(!a.I)throw new M(2,7,7001);b=a.i.networkingEngine.request(c,b);hf(a.I,b);return b.promise}I("shaka.hls.HlsParser",lr);
780
+ var Dr={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Er={mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},Fr={mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},ks={audio:Er,video:Fr,text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
781
+ vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Vr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new M(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new M(2,4,4041);return Cb("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Sq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
782
+ b=Sq(a,"URI");b=kr(b);b=Fc(b.data);b=Cb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=W(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Sq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Sq(a,"URI");a=kr(a);a=Fc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Sf(a,b,new Set,0);return Cb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
783
+ Sq(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?Cb("org.w3.clearkey",null):null}},nr="VOD",fs="EVENT",Pr="LIVE",tr={kg:nr,ji:fs,ig:Pr};Rc("Tizen 3")||Rc("Tizen 2")||Tc()||(ch.m3u8=function(){return new lr},ah["application/x-mpegurl"]=function(){return new lr},ah["application/vnd.apple.mpegurl"]=function(){return new lr});function ls(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=cd(b)}catch(g){}throw new M(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function ms(){}function ns(a,b,c,d,e){var f=new os;Bf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new ps,h={yf:!1,fg:!1};a=qs(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 Ye(a,function(){h.yf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new N(function(){h.fg=!0;g.abort()});k.R(b/1E3);a.finally(function(){k.stop()})}return a}
784
+ function qs(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,v,y,w,x,C,z;return F(function(A){switch(A.g){case 1:return h=rs,k=ss,n=p=0,t=Date.now(),D(A,2),u(A,h(a,c),4);case 4:l=A.h;f(ts(l.headers));if("HEAD"==c.method){A.D(5);break}v=l.clone().body.getReader();w=(y=l.headers.get("Content-Length"))?parseInt(y,10):0;x=function(E){function G(){var H,J;return F(function(K){switch(K.g){case 1:return D(K,2),u(K,v.read(),4);case 4:H=K.h;va(K,3);break;case 2:return wa(K),K.return();case 3:if(H.done){K.D(5);break}p+=H.value.byteLength;
785
+ if(!g){K.D(5);break}return u(K,g(H.value),5);case 5:J=Date.now();if(100<J-t||H.done)e(J-t,p-n,w-p),n=p,t=J;H.done?E.close():(E.enqueue(H.value),G());B(K)}})}G()};new k({start:x});return u(A,l.arrayBuffer(),6);case 6:m=A.h;case 5:va(A,3);break;case 2:C=wa(A);if(d.yf)throw new M(1,1,7001,a,b);if(d.fg)throw new M(1,1,1003,a,b);throw new M(1,1,1002,a,C,b);case 3:return z=ts(l.headers),A.return(ls(z,m,l.status,a,l.url,b))}})}function ts(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
786
+ function us(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}I("shaka.net.HttpFetchPlugin",ms);ms.isSupported=us;ms.parse=ns;var rs=window.fetch,ps=window.AbortController,ss=window.ReadableStream,os=window.Headers;us()&&(kf("http",ns,2,!0),kf("https",ns,2,!0),kf("blob",ns,2,!0));function vs(){}
787
+ function ws(a,b,c,d,e){var f=new xs,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 M(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var t=ys(f);e(t);p=!0}};f.onload=function(){var t=ys(f),v=f.response;try{var y=ls(t,v,f.status,a,f.responseURL,c);l(y)}catch(w){m(w)}};f.onerror=function(t){m(new M(1,1,1002,a,t,
785
788
  c))};f.ontimeout=function(){m(new M(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 n in b.headers)f.setRequestHeader(n.toLowerCase(),b.headers[n]);f.send(b.body)});return new Ye(k,function(){f.abort();return Promise.resolve()})}
786
- function ws(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}I("shaka.net.HttpXHRPlugin",ts);ts.parse=us;var vs=window.XMLHttpRequest;kf("http",us,1,!0);kf("https",us,1,!0);kf("blob",us,1,!0);function xs(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function ys(a){return a.Pa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ta+":"+a.Ca}function zs(a,b){return kk(a.g.Pa(),a.g.Ta,a.g.Ca,b.streaming.retryParameters)};function As(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Bs(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}As.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 Cs(a){var b=this;this.s=a;this.j=new Map;this.i=new uf(function(){return Ds(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new As}Cs.prototype.destroy=function(){return this.i.destroy()};function Es(a,b,c){a.m=b;a.l=c}function Ds(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
787
- function Fs(a,b,c,d,e,f){vf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,p,n,t;return G(function(v){if(1==v.g)return u(v,Gs(a,c),2);h=v.h;if(a.i.g)throw new M(2,9,7001);if(e)for(m in k=Fc(h),l=new Rf(k),l.data)p=Number(m),n=l.data[p],t=l.g[p],a.l(n,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 Hs(a){return G(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
788
- function Gs(a,b){var c,d,e,f;return G(function(g){if(1==g.g)return c=tf,d=a.s.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;ec(a.h,e);return g.return(f.data)})};function Is(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Jc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Is.prototype.abort=function(){var a=this;return G(function(b){if(1==b.g){try{a.i.abort()}catch(c){}D(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);wa(b);B(b)})};
789
- function Js(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return G(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return u(g,b(f.key,f.value,f),2)}f.continue();B(g)})}})}Is.prototype.store=function(){return this.h};Is.prototype.promise=function(){return this.g};function Ks(a){this.h=a;this.g=[]}Ks.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Ls(a,b){return Ms(a,b,"readwrite")}function Ms(a,b,c){c=a.h.transaction([b],c);var d=new Is(c,b);a.g.push(d);d.promise().then(function(){ec(a.g,d)},function(){ec(a.g,d)});return d};function Ns(a,b,c){this.h=new Ks(a);this.i=b;this.g=c}q=Ns.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Os(this.i)};q.removeSegments=function(a,b){return Ps(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return G(function(d){if(1==d.g)return u(d,Qs(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Af(e)}))})};q.addManifests=function(){return Os(this.g)};
790
- q.updateManifest=function(){return Promise.reject(new M(2,9,9016,"Cannot modify values in "+this.g))};function Rs(a,b,c){a=Ls(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=Ls(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 Ps(this,this.g,a,b)};
791
- q.getManifests=function(a){var b=this,c;return G(function(d){if(1==d.g)return u(d,Qs(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Ec(e)})))})};q.getAllManifests=function(){var a=this,b,c;return G(function(d){return 1==d.g?(b=Ms(a.h,a.g,"readonly"),c=new Map,u(d,Js(b,function(e,f){var g;return G(function(h){if(1==h.g)return u(h,a.Ec(f),2);g=h.h;c.set(e,g);B(h)})}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};q.Af=function(a){return a};q.Ec=function(a){return Promise.resolve(a)};
792
- function Os(a){return Promise.reject(new M(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 G(function(m){if(1==m.g){d=Ls(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={hd:g.hd},k=h.next())l=k.value,g.hd=e.add(l),g.hd.onsuccess=function(p){return function(){f.push(p.hd.result)}}(g);return u(m,d.promise(),2)}return m.return(f)})};
793
- function Ps(a,b,c,d){a=Ls(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={gd:e.gd},f=c.next())e.gd=f.value,b.delete(e.gd).onsuccess=function(g){return function(){return d(g.gd)}}(e);return a.promise()}
794
- function Qs(a,b,c){var d,e,f,g,h,k,l;return G(function(m){if(1==m.g){d=Ms(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Ac:h.Ac,xc:h.xc},l=k.next())h.xc=l.value,h.Ac=e.get(h.xc),h.Ac.onsuccess=function(p){return function(){void 0==p.Ac.result&&g.push(p.xc);f[p.xc]=p.Ac.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new M(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(p){return f[p]}))})};function Ss(a){this.g=new Ks(a)}Ss.prototype.destroy=function(){return this.g.destroy()};Ss.prototype.getAll=function(){var a=this,b,c;return G(function(d){return 1==d.g?(b=Ms(a.g,"session-ids","readonly"),c=[],u(d,Js(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};Ss.prototype.add=function(a){var b=Ls(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()};
795
- Ss.prototype.remove=function(a){var b=this,c;return G(function(d){return 1==d.g?(c=Ls(b.g,"session-ids"),u(d,Js(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):u(d,c.promise(),0)})};function Ts(){this.g=new Map}Ts.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)};Ts.prototype.init=function(){var a=this;Us.forEach(function(e,f){(e=e())&&a.g.set(f,e)});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)};
796
- function Vs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ra:d,Ba:f},Ba:e})})});if(b)return b;throw new M(2,9,9013,"Could not find a cell that supports add-operations");}function Ws(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ra:d,Ba:f},e)})})}
797
- function Xs(a,b,c){a=a.g.get(b);if(!a)throw new M(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new M(2,9,9013,"Could not find cell with name "+c);return b}function Ys(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Zs(a){var b=Array.from(a.g.keys());if(!b.length)throw new M(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
798
- function $s(a){var b,c,d;return G(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Us,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function at(a,b){Us.set(a,b)}I("shaka.offline.StorageMuxer",Ts);Ts.unregister=function(a){Us.delete(a)};Ts.register=at;Ts.prototype.destroy=Ts.prototype.destroy;var Us=new Map;function bt(){Ns.apply(this,arguments)}pa(bt,Ns);bt.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return G(function(g){d=Ls(c.h,c.g);e=d.store();f=new Jc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new M(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
799
- bt.prototype.Ec=function(a){var b,c,d,e,f,g;return G(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=ct(a.periods[c],e),b.push(f);return u(h,aq(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
800
- function ct(a,b){dt(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return et(e,a.startTime,b)})}
801
- function et(a,b,c){var d=a.initSegmentUri?ft(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=ft(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
802
- 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}}bt.prototype.Af=function(a){return{data:a.data}};function ft(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new M(2,9,9004,"Could not parse uri "+a);}
803
- function dt(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++,
804
- 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 gt(){Ns.apply(this,arguments)}pa(gt,Ns);
805
- gt.prototype.Ec=function(a){var b,c,d,e,f,g;return G(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),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(ht(p,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,aq(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
789
+ function ys(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}I("shaka.net.HttpXHRPlugin",vs);vs.parse=ws;var xs=window.XMLHttpRequest;kf("http",ws,1,!0);kf("https",ws,1,!0);kf("blob",ws,1,!0);function zs(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function As(a){return a.Pa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ta+":"+a.Ca}function Bs(a,b){return mk(a.g.Pa(),a.g.Ta,a.g.Ca,b.streaming.retryParameters)};function Cs(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Ds(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Cs.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 Es(a){var b=this;this.s=a;this.j=new Map;this.i=new uf(function(){return Fs(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Cs}Es.prototype.destroy=function(){return this.i.destroy()};function Gs(a,b,c){a.m=b;a.l=c}function Fs(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
790
+ function Hs(a,b,c,d,e,f){vf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,p,n,t;return F(function(v){if(1==v.g)return u(v,Is(a,c),2);h=v.h;if(a.i.g)throw new M(2,9,7001);if(e)for(m in k=Fc(h),l=new Rf(k),l.data)p=Number(m),n=l.data[p],t=l.g[p],a.l(n,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 Js(a){return F(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
791
+ function Is(a,b){var c,d,e,f;return F(function(g){if(1==g.g)return c=tf,d=a.s.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;ec(a.h,e);return g.return(f.data)})};function Ks(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Jc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Ks.prototype.abort=function(){var a=this;return F(function(b){if(1==b.g){try{a.i.abort()}catch(c){}D(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);wa(b);B(b)})};
792
+ function Ls(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return F(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return u(g,b(f.key,f.value,f),2)}f.continue();B(g)})}})}Ks.prototype.store=function(){return this.h};Ks.prototype.promise=function(){return this.g};function Ms(a){this.h=a;this.g=[]}Ms.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Ns(a,b){return Os(a,b,"readwrite")}function Os(a,b,c){c=a.h.transaction([b],c);var d=new Ks(c,b);a.g.push(d);d.promise().then(function(){ec(a.g,d)},function(){ec(a.g,d)});return d};function Ps(a,b,c){this.h=new Ms(a);this.i=b;this.g=c}q=Ps.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Qs(this.i)};q.removeSegments=function(a,b){return Rs(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return F(function(d){if(1==d.g)return u(d,Ss(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Bf(e)}))})};q.addManifests=function(){return Qs(this.g)};
793
+ q.updateManifest=function(){return Promise.reject(new M(2,9,9016,"Cannot modify values in "+this.g))};function Ts(a,b,c){a=Ns(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=Ns(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 Rs(this,this.g,a,b)};
794
+ q.getManifests=function(a){var b=this,c;return F(function(d){if(1==d.g)return u(d,Ss(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Ec(e)})))})};q.getAllManifests=function(){var a=this,b,c;return F(function(d){return 1==d.g?(b=Os(a.h,a.g,"readonly"),c=new Map,u(d,Ls(b,function(e,f){var g;return F(function(h){if(1==h.g)return u(h,a.Ec(f),2);g=h.h;c.set(e,g);B(h)})}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};q.Bf=function(a){return a};q.Ec=function(a){return Promise.resolve(a)};
795
+ function Qs(a){return Promise.reject(new M(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 F(function(m){if(1==m.g){d=Ns(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={hd:g.hd},k=h.next())l=k.value,g.hd=e.add(l),g.hd.onsuccess=function(p){return function(){f.push(p.hd.result)}}(g);return u(m,d.promise(),2)}return m.return(f)})};
796
+ function Rs(a,b,c,d){a=Ns(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={gd:e.gd},f=c.next())e.gd=f.value,b.delete(e.gd).onsuccess=function(g){return function(){return d(g.gd)}}(e);return a.promise()}
797
+ function Ss(a,b,c){var d,e,f,g,h,k,l;return F(function(m){if(1==m.g){d=Os(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Ac:h.Ac,xc:h.xc},l=k.next())h.xc=l.value,h.Ac=e.get(h.xc),h.Ac.onsuccess=function(p){return function(){void 0==p.Ac.result&&g.push(p.xc);f[p.xc]=p.Ac.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new M(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(p){return f[p]}))})};function Us(a){this.g=new Ms(a)}Us.prototype.destroy=function(){return this.g.destroy()};Us.prototype.getAll=function(){var a=this,b,c;return F(function(d){return 1==d.g?(b=Os(a.g,"session-ids","readonly"),c=[],u(d,Ls(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};Us.prototype.add=function(a){var b=Ns(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()};
798
+ Us.prototype.remove=function(a){var b=this,c;return F(function(d){return 1==d.g?(c=Ns(b.g,"session-ids"),u(d,Ls(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):u(d,c.promise(),0)})};function Vs(){this.g=new Map}Vs.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)};Vs.prototype.init=function(){var a=this;Ws.forEach(function(e,f){(e=e())&&a.g.set(f,e)});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)};
799
+ function Xs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ra:d,Ba:f},Ba:e})})});if(b)return b;throw new M(2,9,9013,"Could not find a cell that supports add-operations");}function Ys(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ra:d,Ba:f},e)})})}
800
+ function Zs(a,b,c){a=a.g.get(b);if(!a)throw new M(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new M(2,9,9013,"Could not find cell with name "+c);return b}function $s(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function at(a){var b=Array.from(a.g.keys());if(!b.length)throw new M(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
801
+ function bt(a){var b,c,d;return F(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Ws,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function ct(a,b){Ws.set(a,b)}I("shaka.offline.StorageMuxer",Vs);Vs.unregister=function(a){Ws.delete(a)};Vs.register=ct;Vs.prototype.destroy=Vs.prototype.destroy;var Ws=new Map;function dt(){Ps.apply(this,arguments)}pa(dt,Ps);dt.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return F(function(g){d=Ns(c.h,c.g);e=d.store();f=new Jc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new M(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
802
+ dt.prototype.Ec=function(a){var b,c,d,e,f,g;return F(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=et(a.periods[c],e),b.push(f);return u(h,cq(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
803
+ function et(a,b){ft(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return gt(e,a.startTime,b)})}
804
+ function gt(a,b,c){var d=a.initSegmentUri?ht(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=ht(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
805
+ 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}}dt.prototype.Bf=function(a){return{data:a.data}};function ht(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new M(2,9,9004,"Could not parse uri "+a);}
806
+ function ft(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++,
807
+ 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 it(){Ps.apply(this,arguments)}pa(it,Ps);
808
+ it.prototype.Ec=function(a){var b,c,d,e,f,g;return F(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=r(k.streams),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(jt(p,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,cq(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
806
809
  Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
807
- function ht(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,
808
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function it(){Ns.apply(this,arguments)}pa(it,Ns);q=it.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 Rs(this,a,b)};q.Ec=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function jt(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=jt.prototype;
809
- q.init=function(){var a=this,b=new Jc,c=!1,d=new N(function(){c=!0;b.reject(new M(2,9,9017))});d.R(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new bt(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new gt(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
810
- new gt(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new it(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Ss(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=r(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new M(2,
811
- 9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return G(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),B(b)}})};
810
+ function jt(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,
811
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function kt(){Ps.apply(this,arguments)}pa(kt,Ps);q=kt.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 Ts(this,a,b)};q.Ec=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function lt(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=lt.prototype;
812
+ q.init=function(){var a=this,b=new Jc,c=!1,d=new N(function(){c=!0;b.reject(new M(2,9,9017))});d.R(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new dt(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new it(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
813
+ new it(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new kt(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Us(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=r(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new M(2,
814
+ 9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return F(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),B(b)}})};
812
815
  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};
813
- q.erase=function(){var a=this;return G(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,kt(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
814
- function kt(){var a=new Jc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new M(2,9,9001,b.error));c.preventDefault()};return a}at("idb",function(){return Rc("CrKey")||Qc()||!window.indexedDB?null:new jt});function lt(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}lt.prototype.Ra=function(){return this.i};lt.prototype.Ba=function(){return this.h};lt.prototype.key=function(){return this.l};lt.prototype.toString=function(){return this.j};
815
- function mt(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 lt(b,c,d,Number(a[4])):null};function nt(a,b){this.h=a;this.g=b}
816
- function ot(a,b){var c=new P(null,0);c.Sa(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=pt(a,d,e,c);e=b.streams.filter(function(l){return l.type==Gb}).map(function(l){return qt(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return qt(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=
816
+ q.erase=function(){var a=this;return F(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,mt(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
817
+ function mt(){var a=new Jc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new M(2,9,9001,b.error));c.preventDefault()};return a}ct("idb",function(){return Rc("CrKey")||Qc()||!window.indexedDB?null:new lt});function nt(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}nt.prototype.Ra=function(){return this.i};nt.prototype.Ba=function(){return this.h};nt.prototype.key=function(){return this.l};nt.prototype.toString=function(){return this.j};
818
+ function ot(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 nt(b,c,d,Number(a[4])):null};function pt(a,b){this.h=a;this.g=b}
819
+ function qt(a,b){var c=new P(null,0);c.Sa(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=rt(a,d,e,c);e=b.streams.filter(function(l){return l.type==Gb}).map(function(l){return st(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return st(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=
817
820
  g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1}}
818
- function pt(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:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=
819
- b.next())for(e=e.value,g=qt(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=qt(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}
820
- function qt(a,b,c){var d=b.segments.map(function(e){return rt(a,e)});c.mc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Rj(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
821
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function rt(a,b){var c=new lt("segment",a.h,a.g,b.dataKey);return new yi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?st(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
822
- function st(a,b){var c=new lt("segment",a.h,a.g,b);return new wi(function(){return[c.toString()]},0,null)};function tt(){this.g=null}q=tt.prototype;q.configure=function(){};
823
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:d=mt(a);c.g=d;if(null==d||"manifest"!=d.g)throw new M(2,1,9004,a);e=new Ts;ua(m);return u(m,e.init(),4);case 4:return u(m,Xs(e,d.Ra(),d.Ba()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new nt(d.Ra(),d.Ba()),l=ot(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return xa(m),u(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
821
+ function rt(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:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=
822
+ b.next())for(e=e.value,g=st(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=st(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}
823
+ function st(a,b,c){var d=b.segments.map(function(e){return tt(a,e)});c.mc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Tj(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,
824
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function tt(a,b){var c=new nt("segment",a.h,a.g,b.dataKey);return new Ai(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?ut(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
825
+ function ut(a,b){var c=new nt("segment",a.h,a.g,b);return new yi(function(){return[c.toString()]},0,null)};function vt(){this.g=null}q=vt.prototype;q.configure=function(){};
826
+ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return F(function(m){switch(m.g){case 1:d=ot(a);c.g=d;if(null==d||"manifest"!=d.g)throw new M(2,1,9004,a);e=new Vs;ua(m);return u(m,e.init(),4);case 4:return u(m,Zs(e,d.Ra(),d.Ba()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new pt(d.Ra(),d.Ba()),l=qt(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return xa(m),u(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
824
827
  q.update=function(){};
825
- q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:return d=c.g,e=new Ts,D(m,2,3),u(m,e.init(),5);case 5:return u(m,Xs(e,d.Ra(),d.Ba()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.D(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),u(m,e.destroy(),10);case 10:ya(m,0);break;case 2:wa(m),m.D(3)}})};
826
- ah["application/x-offline-manifest"]=function(){return new tt};function ut(){}function vt(a){var b=mt(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=af(a)):a=b&&"segment"==b.g?wt(b.key(),b):Ze(new M(2,1,9004,a));return a}
827
- function wt(a,b){var c=new Ts;return af(void 0).ma(function(){return c.init()}).ma(function(){return Xs(c,b.Ra(),b.Ba())}).ma(function(d){return d.getSegments([b.key()])}).ma(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}I("shaka.offline.OfflineScheme",ut);ut.plugin=vt;kf("offline",vt);function xt(a,b,c){var d,e,f,g,h,k;return G(function(l){switch(l.g){case 1:d=[];for(var m=[],p=r(c),n=p.next();!n.done;n=p.next()){n=n.value;for(var t=!1,v=r(m),y=v.next();!y.done;y=v.next())if(y=y.value,yt(y.info,n)){y.sessionIds.push(n.sessionId);t=!0;break}t||m.push({info:n,sessionIds:[n.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=zt(a,b,g);return u(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)}})}
828
- function zt(a,b,c){var d,e;return G(function(f){switch(f.g){case 1:return d=new ng({Pb:b,onError:function(){},Gd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),D(f,2),d.configure(a),u(f,vg(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 wa(f),u(f,d.destroy(),5);case 5:return f.return([]);case 3:return D(f,6),u(f,Gg(d),8);case 8:va(f,7);break;case 6:return wa(f),u(f,d.destroy(),
829
- 9);case 9:return f.return([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return G(function(h){if(1==h.g)return D(h,2),u(h,Hg(d,g),4);if(2!=h.g)return e.push(g),va(h,0);wa(h);B(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f.return(e)}})}
830
- function yt(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&fc(a.audioCapabilities,b.audioCapabilities,c)&&fc(a.videoCapabilities,b.videoCapabilities,c)};function At(a,b,c){var d=b.presentationTimeline.getDuration();b=Bt(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Ct(a,b){var c=ot(new nt(a.Ra(),a.Ba()),b),d=b.appMetadata||{};c=Bt(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}}
831
- function Bt(a){var b=[],c=ve(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(me(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ne(c.value));return b};function Dt(){this.g={}}function Et(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 Ft(a,b){a.g[b.id]=b.bandwidth||2048}function Gt(a,b){a=a.g[b];null==a&&(a=0);return a};function Ht(a){var b=this;if(a&&a.constructor!=S)throw new M(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Ic()):(this.h=Nl(),this.g=new jf);this.i=[];this.j=[];var c=!a;this.l=new uf(function(){var d,e,f,g,h;return G(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Ds(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 u(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return u(k,b.g.destroy(),4);
832
- case 4:b.h=null,b.g=null,B(k)}})})}function It(){if(Mc())a:{var a=r(Us.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=Ht.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Hl(a,b));return Pl(this.h,a)};q.getConfiguration=function(){var a=Nl();Pl(a,this.h,Nl());return a};q.Ic=function(){return this.g};
833
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Cs(this.g);this.j.push(f);b=Jt(this,a,b||{},function(){var g;return G(function(h){if(1==h.g)return u(h,$g(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new Ye(b,function(){return Ds(f)});b.finally(function(){ec(d.j,f)});return Kt(this,b)};
834
- function Jt(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,w,x,C,z;return G(function(A){switch(A.g){case 1:return Lt(),h=g=null,k=new Ts,p=m=l=null,D(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,Mt(a,b,g,e),6);case 6:n=A.h;Nt(a);t=!n.presentationTimeline.U()&&!n.presentationTimeline.Lb();if(!t)throw new M(2,9,9005,b);return u(A,Ot(a,n,function(E){p=p||E},e),7);case 7:h=A.h;Nt(a);if(p)throw p;return u(A,Pt(n,e),8);case 8:return u(A,k.init(),9);case 9:return Nt(a),u(A,Vs(k),10);case 10:return l=A.h,Nt(a),v=Qt(h,
835
- n,b,c,e,f),y=v.lh,w=v.Xe,u(A,l.Ba.addManifests([y]),11);case 11:x=A.h;Nt(a);m=x[0];Nt(a);if(p)throw p;return u(A,Rt(a,w,m,y,f,e,l.Ba,n,h),12);case 12:return Nt(a),C=new lt("manifest",l.path.Ra,l.path.Ba,m),A.return(Ct(C,y));case 3:return xa(A),u(A,k.destroy(),13);case 13:if(!g){A.D(14);break}return u(A,g.stop(),14);case 14:if(!h){A.D(16);break}return u(A,h.destroy(),16);case 16:ya(A,0);break;case 2:z=wa(A);if(null==m){A.D(18);break}return u(A,St(m),18);case 18:throw p||z;}})}
836
- function Rt(a,b,c,d,e,f,g,h,k){var l,m,p,n,t,v,y,w,x,C;return G(function(z){switch(z.g){case 1:l={};m=0;p=function(A,E){var F,H,J,K,Q,V,U;return G(function(ia){if(1==ia.g){F={};H=r(A);for(J=H.next();!J.done;F={Fb:F.Fb},J=H.next())F.Fb=J.value,K=zs(F.Fb,f),Q=F.Fb.i,V=F.Fb.h,U=function(O){return function(qa){var Ka,Ca,Va;return G(function(Oa){if(1==Oa.g)return u(Oa,g.addSegments([{data:qa}]),2);Ka=Oa.h;Nt(a);Ca=O.Fb.g;Va=ys(Ca);l[Va]=Ka[0];m+=qa.byteLength;B(Oa)})}}(F),Fs(e,F.Fb.groupId,K,Q,V,U);return u(ia,
837
- Hs(e),2)}if(!E)return ia.D(0);Nt(a);Tt(h,d,k,f);return u(ia,g.updateManifest(c,d),0)})};n=!1;D(z,2);if(!Ut(h)||!n||Vt(h)){z.D(4);break}return u(z,p(b.filter(function(A){return A.h}),!0),5);case 5:return Nt(a),b=b.filter(function(A){return!A.h}),t=l,v=m,l={},m=0,u(z,Wt(g,c,d,t,v,function(){return Nt(a)}),6);case 6:Nt(a);case 4:if(n){z.D(7);break}return u(z,p(b,!1),8);case 8:return Nt(a),y=l,w=m,l={},m=0,u(z,Wt(g,c,d,y,w,function(){return Nt(a)}),9);case 9:Nt(a);case 7:va(z,0);break;case 2:return x=
838
- wa(z),C=Object.values(l),u(z,g.removeSegments(C,function(){}),10);case 10:throw x;}})}function St(a){var b,c,d,e;return G(function(f){switch(f.g){case 1:return b=new Ts,u(f,b.init(),2);case 2:return u(f,Vs(b),3);case 3:return c=f.h,d=new lt("manifest",c.path.Ra,c.path.Ba,a),u(f,b.destroy(),4);case 4:return e=new Ht,u(f,e.remove(d.toString()),0)}})}
839
- function Wt(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,w;return G(function(x){switch(x.g){case 1:g=!1;D(x,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,p=r(m.segments),n=p.next();!n.done;n=p.next())t=n.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&&
840
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(x,a.updateManifest(b,c),4);case 4:g=!0;f();va(x,0);break;case 2:return y=wa(x),u(x,St(b),5);case 5:if(g){x.D(6);break}w=Object.values(d);return u(x,a.removeSegments(w,function(){}),6);case 6:throw y;}})}
841
- function Pt(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,F,H,J,K,Q,V,U,ia,O;return G(function(qa){switch(qa.g){case 1:return c={width:Infinity,height:Infinity},Wd(a,b.restrictions,c),u(qa,$d(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Kd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(me(m));p=r(a.textStreams);for(n=p.next();!n.done;n=p.next())t=n.value,
842
- d.push(ne(t));v=r(a.imageStreams);for(y=v.next();!y.done;y=v.next())w=y.value,d.push(oe(w));return u(qa,b.offline.trackSelectionCallback(d),3);case 3:x=qa.h;C=a.presentationTimeline.getDuration();z=0;A=r(x);for(E=A.next();!E.done;E=A.next())F=E.value,H=F.bandwidth*C/8,z+=H;D(qa,4);return u(qa,b.offline.downloadSizeCallback(z),6);case 6:J=qa.h;if(!J)throw new M(2,9,9014);va(qa,5);break;case 4:K=wa(qa);if(K instanceof M)throw K;throw new M(2,9,9015);case 5:Q=new Set;V=new Set;U=new Set;ia=r(x);for(E=
843
- ia.next();!E.done;E=ia.next())O=E.value,"variant"==O.type&&Q.add(O.id),"text"==O.type&&V.add(O.id),"image"==O.type&&U.add(O.id);a.variants=a.variants.filter(function(Ka){return Q.has(Ka.id)});a.textStreams=a.textStreams.filter(function(Ka){return V.has(Ka.id)});a.imageStreams=a.imageStreams.filter(function(Ka){return U.has(Ka.id)});Xt(a);B(qa)}})}
844
- function Qt(a,b,c,d,e,f){var g=At(c,b,d),h=e.offline.progressCallback;Es(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&Dg(a,"cenc",t)});var k=Ut(b)&&!Vt(b),l=null;k&&(l=Yt.get(a.g.keySystem));for(var m=new Dt,p=r(b.textStreams),n=p.next();!n.done;n=p.next())m.g[n.value.id]=52;p=r(b.imageStreams);for(n=p.next();!n.done;n=p.next())Ft(m,n.value);n=r(b.variants);for(p=n.next();!p.done;p=n.next())Et(m,p.value);m=Zt(f,m,b,e);f=m.streams;m=m.Xe;n=a.g;p=e.offline.usePersistentLicense;
845
- n&&p&&(n.initData=[]);return{lh:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Hc(),streams:f,sessionIds:p?Mg(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},Xe:m}}function Ut(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
846
- function Vt(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 Tt(a,b,c,d){b.expiration=c.Hc();c=Mg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Ut(a)&&d.offline.usePersistentLicense&&!c.length)throw new M(2,9,9007);}q.remove=function(a){return $t(this,au(this,a))};
847
- function au(a,b){var c,d,e,f,g,h;return G(function(k){switch(k.g){case 1:Lt();c=mt(b);if(null==c||"manifest"!=c.g)throw new M(2,9,9004,b);d=c;e=new Ts;ua(k);return u(k,e.init(),4);case 4:return u(k,Xs(e,d.Ra(),d.Ba()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([bu(a,h,e),cu(f,d,h)]),2);case 2:return xa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
848
- function du(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:wd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:wd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function bu(a,b,c){return G(function(d){return u(d,eu(a.g,a.h.drm,c,b),0)})}
849
- function cu(a,b,c){function d(){}var e=fu(c);Ct(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Ch=function(){return $t(this,gu(this))};
850
- function gu(a){var b,c,d,e,f,g,h,k,l,m;return G(function(p){switch(p.g){case 1:return Lt(),b=a.g,c=a.h.drm,d=new Ts,e=!1,ua(p),u(p,d.init(),4);case 4:f=[],Ys(d,function(n){return f.push(n)}),g=r(f),h=g.next();case 5:if(h.done){p.D(2);break}k=h.value;return u(p,k.getAll(),8);case 8:return l=p.h,u(p,xt(c,b,l),9);case 9:return m=p.h,u(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.D(5);break;case 2:return xa(p),u(p,d.destroy(),11);case 11:ya(p,3);break;case 3:return p.return(!e)}})}
851
- q.list=function(){return $t(this,hu())};function hu(){var a,b,c;return G(function(d){switch(d.g){case 1:return Lt(),a=[],b=new Ts,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Ws(b,function(e,f){c=c.then(function(){var g;return G(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Ct(new lt("manifest",e.Ra,e.Ba,l),k);a.push(k)});B(h)})})}),u(d,c,2);case 2:return xa(d),u(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
852
- function Mt(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){}},
853
- c.configure(d.manifest),Nt(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Nt(a),k=iu(h),u(l,Promise.all(eb(k,function(m){return m.createSegmentIndex()})),3);Nt(a);if(e)throw e;return l.return(h)})}
854
- function Ot(a,b,c,d){var e;return G(function(f){switch(f.g){case 1:return e=new ng({Pb:a.g,onError:c,Gd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,sg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Gg(e),3);case 3:return u(f,Fg(e),4);case 4:return f.return(e)}})}
855
- function Zt(a,b,c,d){var e=new Map,f=iu(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=ju(a,b,c,h,d,e);g.set(h.id,k)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Xe:Array.from(e.values())}}
856
- function ju(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
857
- tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;ku(d,c.presentationTimeline.kb(),function(l){var m=ys(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=Gt(b,d.id)*n;n=Bs(a.g,n);f.set(m,new xs(l,n,k,!1))}l.h&&(p=ys(l.h),f.has(p)||(n=.5*Gt(b,d.id),n=Bs(a.g,n),f.set(p,new xs(l.h,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
858
- tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function ku(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 Nt(a){if(a.l.g)throw new M(2,9,7001);}function Lt(){if(!It())throw new M(2,9,9E3);}function $t(a,b){return G(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c.return(c.h);xa(c);ec(a.i,b);return ya(c,0)})}
859
- function Kt(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){ec(a.i,c)})}function fu(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)}
860
- function eu(a,b,c,d){var e,f,g;return G(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Zs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:du(d,!1),videoCapabilities:du(d,!0)}});return u(h,xt(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
861
- function iu(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}
862
- function Xt(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());}I("shaka.offline.Storage",Ht);Ht.deleteAll=function(){var a;return G(function(b){return 1==b.g?(a=new Ts,ua(b),u(b,$s(a),2)):5!=b.g?(xa(b),u(b,a.destroy(),5)):ya(b,0)})};Ht.prototype.list=Ht.prototype.list;
863
- Ht.prototype.removeEmeSessions=Ht.prototype.Ch;Ht.prototype.remove=Ht.prototype.remove;Ht.prototype.store=Ht.prototype.store;Ht.prototype.getNetworkingEngine=Ht.prototype.Ic;Ht.prototype.getConfiguration=Ht.prototype.getConfiguration;Ht.prototype.configure=Ht.prototype.configure;Ht.prototype.destroy=Ht.prototype.destroy;Ht.support=It;
864
- var Yt=(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");
865
- Bn.offline=It;function lu(){}function mu(){for(var a=r(nu),b=a.next();!b.done;b=a.next()){b=b.value;try{b.qg()}catch(c){Ua("Error installing polyfill!",c)}}}function ou(a,b){a={priority:b||0,qg:a};for(b=0;b<nu.length;b++)if(nu[b].priority<a.priority){nu.splice(b,0,a);return}nu.push(a)}I("shaka.polyfill",lu);lu.register=ou;lu.installAll=mu;var nu=[];function pu(){this.g=new qu}function ru(){window.AbortController||(window.AbortController=pu,window.AbortSignal=qu)}pu.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new L("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(pu.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});lu.AbortController=pu;pu.install=ru;
866
- function qu(){db.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(qu,db);da.Object.defineProperties(qu.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});ou(ru);function su(){}function tu(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())uu(b.value)}function uu(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)}})}lu.Aria=su;su.install=tu;ou(tu);function vu(){}function wu(){xu()}lu.EncryptionScheme=vu;vu.install=wu;ou(wu,-2);function yu(){}
867
- function zu(){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}}),
868
- 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)}}
869
- 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)}lu.Fullscreen=yu;yu.install=zu;ou(zu);function Bu(){}function Cu(){var a=!0;if(Uc()||Rc("PlayStation 5")||Vc()||Rc("Web0S")||Sc()||Rc("CrKey")||Rc("PC=EOS")||Rc("Hisense")||Rc("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Du=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Eu)}
870
- function Eu(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C;return G(function(z){switch(z.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return z.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!Mc())return z.return(b);if(c){if(Rc("CrKey"))if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var A=c.contentType;c.width&&c.height&&(A+="; width="+c.width+"; height="+c.height);c.framerate&&(A+="; framerate="+c.framerate);"pq"===
828
+ q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return F(function(m){switch(m.g){case 1:return d=c.g,e=new Vs,D(m,2,3),u(m,e.init(),5);case 5:return u(m,Zs(e,d.Ra(),d.Ba()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.D(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),u(m,e.destroy(),10);case 10:ya(m,0);break;case 2:wa(m),m.D(3)}})};
829
+ ah["application/x-offline-manifest"]=function(){return new vt};function wt(){}function xt(a){var b=ot(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=af(a)):a=b&&"segment"==b.g?yt(b.key(),b):Ze(new M(2,1,9004,a));return a}
830
+ function yt(a,b){var c=new Vs;return af(void 0).ma(function(){return c.init()}).ma(function(){return Zs(c,b.Ra(),b.Ba())}).ma(function(d){return d.getSegments([b.key()])}).ma(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}I("shaka.offline.OfflineScheme",wt);wt.plugin=xt;kf("offline",xt);function zt(a,b,c){var d,e,f,g,h,k;return F(function(l){switch(l.g){case 1:d=[];for(var m=[],p=r(c),n=p.next();!n.done;n=p.next()){n=n.value;for(var t=!1,v=r(m),y=v.next();!y.done;y=v.next())if(y=y.value,At(y.info,n)){y.sessionIds.push(n.sessionId);t=!0;break}t||m.push({info:n,sessionIds:[n.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=Bt(a,b,g);return u(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)}})}
831
+ function Bt(a,b,c){var d,e;return F(function(f){switch(f.g){case 1:return d=new ng({Pb:b,onError:function(){},Gd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),D(f,2),d.configure(a),u(f,vg(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 wa(f),u(f,d.destroy(),5);case 5:return f.return([]);case 3:return D(f,6),u(f,Gg(d),8);case 8:va(f,7);break;case 6:return wa(f),u(f,d.destroy(),
832
+ 9);case 9:return f.return([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return F(function(h){if(1==h.g)return D(h,2),u(h,Hg(d,g),4);if(2!=h.g)return e.push(g),va(h,0);wa(h);B(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f.return(e)}})}
833
+ function At(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&fc(a.audioCapabilities,b.audioCapabilities,c)&&fc(a.videoCapabilities,b.videoCapabilities,c)};function Ct(a,b,c){var d=b.presentationTimeline.getDuration();b=Dt(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Et(a,b){var c=qt(new pt(a.Ra(),a.Ba()),b),d=b.appMetadata||{};c=Dt(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}}
834
+ function Dt(a){var b=[],c=ve(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(me(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ne(c.value));return b};function Ft(){this.g={}}function Gt(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 Ht(a,b){a.g[b.id]=b.bandwidth||2048}function It(a,b){a=a.g[b];null==a&&(a=0);return a};function Jt(a){var b=this;if(a&&a.constructor!=S)throw new M(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Ic()):(this.h=Pl(),this.g=new jf);this.i=[];this.j=[];var c=!a;this.l=new uf(function(){var d,e,f,g,h;return F(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Fs(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 u(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return u(k,b.g.destroy(),4);
835
+ case 4:b.h=null,b.g=null,B(k)}})})}function Kt(){if(Mc())a:{var a=r(Ws.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=Jt.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Jl(a,b));return Rl(this.h,a)};q.getConfiguration=function(){var a=Pl();Rl(a,this.h,Pl());return a};q.Ic=function(){return this.g};
836
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Es(this.g);this.j.push(f);b=Lt(this,a,b||{},function(){var g;return F(function(h){if(1==h.g)return u(h,$g(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new Ye(b,function(){return Fs(f)});b.finally(function(){ec(d.j,f)});return Mt(this,b)};
837
+ function Lt(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,w,x,C,z;return F(function(A){switch(A.g){case 1:return Nt(),h=g=null,k=new Vs,p=m=l=null,D(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,Ot(a,b,g,e),6);case 6:n=A.h;Pt(a);t=!n.presentationTimeline.S()&&!n.presentationTimeline.Lb();if(!t)throw new M(2,9,9005,b);return u(A,Qt(a,n,function(E){p=p||E},e),7);case 7:h=A.h;Pt(a);if(p)throw p;return u(A,Rt(n,e),8);case 8:return u(A,k.init(),9);case 9:return Pt(a),u(A,Xs(k),10);case 10:return l=A.h,Pt(a),v=St(h,
838
+ n,b,c,e,f),y=v.lh,w=v.Ye,u(A,l.Ba.addManifests([y]),11);case 11:x=A.h;Pt(a);m=x[0];Pt(a);if(p)throw p;return u(A,Tt(a,w,m,y,f,e,l.Ba,n,h),12);case 12:return Pt(a),C=new nt("manifest",l.path.Ra,l.path.Ba,m),A.return(Et(C,y));case 3:return xa(A),u(A,k.destroy(),13);case 13:if(!g){A.D(14);break}return u(A,g.stop(),14);case 14:if(!h){A.D(16);break}return u(A,h.destroy(),16);case 16:ya(A,0);break;case 2:z=wa(A);if(null==m){A.D(18);break}return u(A,Ut(m),18);case 18:throw p||z;}})}
839
+ function Tt(a,b,c,d,e,f,g,h,k){var l,m,p,n,t,v,y,w,x,C;return F(function(z){switch(z.g){case 1:l={};m=0;p=function(A,E){var G,H,J,K,Q,V,U;return F(function(ia){if(1==ia.g){G={};H=r(A);for(J=H.next();!J.done;G={Fb:G.Fb},J=H.next())G.Fb=J.value,K=Bs(G.Fb,f),Q=G.Fb.i,V=G.Fb.h,U=function(O){return function(qa){var Ka,Ca,Va;return F(function(Oa){if(1==Oa.g)return u(Oa,g.addSegments([{data:qa}]),2);Ka=Oa.h;Pt(a);Ca=O.Fb.g;Va=As(Ca);l[Va]=Ka[0];m+=qa.byteLength;B(Oa)})}}(G),Hs(e,G.Fb.groupId,K,Q,V,U);return u(ia,
840
+ Js(e),2)}if(!E)return ia.D(0);Pt(a);Vt(h,d,k,f);return u(ia,g.updateManifest(c,d),0)})};n=!1;D(z,2);if(!Wt(h)||!n||Xt(h)){z.D(4);break}return u(z,p(b.filter(function(A){return A.h}),!0),5);case 5:return Pt(a),b=b.filter(function(A){return!A.h}),t=l,v=m,l={},m=0,u(z,Yt(g,c,d,t,v,function(){return Pt(a)}),6);case 6:Pt(a);case 4:if(n){z.D(7);break}return u(z,p(b,!1),8);case 8:return Pt(a),y=l,w=m,l={},m=0,u(z,Yt(g,c,d,y,w,function(){return Pt(a)}),9);case 9:Pt(a);case 7:va(z,0);break;case 2:return x=
841
+ wa(z),C=Object.values(l),u(z,g.removeSegments(C,function(){}),10);case 10:throw x;}})}function Ut(a){var b,c,d,e;return F(function(f){switch(f.g){case 1:return b=new Vs,u(f,b.init(),2);case 2:return u(f,Xs(b),3);case 3:return c=f.h,d=new nt("manifest",c.path.Ra,c.path.Ba,a),u(f,b.destroy(),4);case 4:return e=new Jt,u(f,e.remove(d.toString()),0)}})}
842
+ function Yt(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,w;return F(function(x){switch(x.g){case 1:g=!1;D(x,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,p=r(m.segments),n=p.next();!n.done;n=p.next())t=n.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&&
843
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(x,a.updateManifest(b,c),4);case 4:g=!0;f();va(x,0);break;case 2:return y=wa(x),u(x,Ut(b),5);case 5:if(g){x.D(6);break}w=Object.values(d);return u(x,a.removeSegments(w,function(){}),6);case 6:throw y;}})}
844
+ function Rt(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A,E,G,H,J,K,Q,V,U,ia,O;return F(function(qa){switch(qa.g){case 1:return c={width:Infinity,height:Infinity},Wd(a,b.restrictions,c),u(qa,$d(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Kd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(me(m));p=r(a.textStreams);for(n=p.next();!n.done;n=p.next())t=n.value,
845
+ d.push(ne(t));v=r(a.imageStreams);for(y=v.next();!y.done;y=v.next())w=y.value,d.push(oe(w));return u(qa,b.offline.trackSelectionCallback(d),3);case 3:x=qa.h;C=a.presentationTimeline.getDuration();z=0;A=r(x);for(E=A.next();!E.done;E=A.next())G=E.value,H=G.bandwidth*C/8,z+=H;D(qa,4);return u(qa,b.offline.downloadSizeCallback(z),6);case 6:J=qa.h;if(!J)throw new M(2,9,9014);va(qa,5);break;case 4:K=wa(qa);if(K instanceof M)throw K;throw new M(2,9,9015);case 5:Q=new Set;V=new Set;U=new Set;ia=r(x);for(E=
846
+ ia.next();!E.done;E=ia.next())O=E.value,"variant"==O.type&&Q.add(O.id),"text"==O.type&&V.add(O.id),"image"==O.type&&U.add(O.id);a.variants=a.variants.filter(function(Ka){return Q.has(Ka.id)});a.textStreams=a.textStreams.filter(function(Ka){return V.has(Ka.id)});a.imageStreams=a.imageStreams.filter(function(Ka){return U.has(Ka.id)});Zt(a);B(qa)}})}
847
+ function St(a,b,c,d,e,f){var g=Ct(c,b,d),h=e.offline.progressCallback;Gs(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&Dg(a,"cenc",t)});var k=Wt(b)&&!Xt(b),l=null;k&&(l=$t.get(a.g.keySystem));for(var m=new Ft,p=r(b.textStreams),n=p.next();!n.done;n=p.next())m.g[n.value.id]=52;p=r(b.imageStreams);for(n=p.next();!n.done;n=p.next())Ht(m,n.value);n=r(b.variants);for(p=n.next();!p.done;p=n.next())Gt(m,p.value);m=au(f,m,b,e);f=m.streams;m=m.Ye;n=a.g;p=e.offline.usePersistentLicense;
848
+ n&&p&&(n.initData=[]);return{lh:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Hc(),streams:f,sessionIds:p?Mg(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},Ye:m}}function Wt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
849
+ function Xt(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 Vt(a,b,c,d){b.expiration=c.Hc();c=Mg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Wt(a)&&d.offline.usePersistentLicense&&!c.length)throw new M(2,9,9007);}q.remove=function(a){return bu(this,cu(this,a))};
850
+ function cu(a,b){var c,d,e,f,g,h;return F(function(k){switch(k.g){case 1:Nt();c=ot(b);if(null==c||"manifest"!=c.g)throw new M(2,9,9004,b);d=c;e=new Vs;ua(k);return u(k,e.init(),4);case 4:return u(k,Zs(e,d.Ra(),d.Ba()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([du(a,h,e),eu(f,d,h)]),2);case 2:return xa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
851
+ function fu(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:wd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:wd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function du(a,b,c){return F(function(d){return u(d,gu(a.g,a.h.drm,c,b),0)})}
852
+ function eu(a,b,c){function d(){}var e=hu(c);Et(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Ch=function(){return bu(this,iu(this))};
853
+ function iu(a){var b,c,d,e,f,g,h,k,l,m;return F(function(p){switch(p.g){case 1:return Nt(),b=a.g,c=a.h.drm,d=new Vs,e=!1,ua(p),u(p,d.init(),4);case 4:f=[],$s(d,function(n){return f.push(n)}),g=r(f),h=g.next();case 5:if(h.done){p.D(2);break}k=h.value;return u(p,k.getAll(),8);case 8:return l=p.h,u(p,zt(c,b,l),9);case 9:return m=p.h,u(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.D(5);break;case 2:return xa(p),u(p,d.destroy(),11);case 11:ya(p,3);break;case 3:return p.return(!e)}})}
854
+ q.list=function(){return bu(this,ju())};function ju(){var a,b,c;return F(function(d){switch(d.g){case 1:return Nt(),a=[],b=new Vs,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Ys(b,function(e,f){c=c.then(function(){var g;return F(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Et(new nt("manifest",e.Ra,e.Ba,l),k);a.push(k)});B(h)})})}),u(d,c,2);case 2:return xa(d),u(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
855
+ function Ot(a,b,c,d){var e,f,g,h,k;return F(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){}},
856
+ c.configure(d.manifest),Pt(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Pt(a),k=ku(h),u(l,Promise.all(eb(k,function(m){return m.createSegmentIndex()})),3);Pt(a);if(e)throw e;return l.return(h)})}
857
+ function Qt(a,b,c,d){var e;return F(function(f){switch(f.g){case 1:return e=new ng({Pb:a.g,onError:c,Gd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,sg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Gg(e),3);case 3:return u(f,Fg(e),4);case 4:return f.return(e)}})}
858
+ function au(a,b,c,d){var e=new Map,f=ku(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=lu(a,b,c,h,d,e);g.set(h.id,k)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Ye:Array.from(e.values())}}
859
+ function lu(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
860
+ tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;mu(d,c.presentationTimeline.kb(),function(l){var m=As(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=It(b,d.id)*n;n=Ds(a.g,n);f.set(m,new zs(l,n,k,!1))}l.h&&(p=As(l.h),f.has(p)||(n=.5*It(b,d.id),n=Ds(a.g,n),f.set(p,new zs(l.h,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
861
+ tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function mu(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 Pt(a){if(a.l.g)throw new M(2,9,7001);}function Nt(){if(!Kt())throw new M(2,9,9E3);}function bu(a,b){return F(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c.return(c.h);xa(c);ec(a.i,b);return ya(c,0)})}
862
+ function Mt(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){ec(a.i,c)})}function hu(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)}
863
+ function gu(a,b,c,d){var e,f,g;return F(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=at(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:fu(d,!1),videoCapabilities:fu(d,!0)}});return u(h,zt(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
864
+ function ku(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}
865
+ function Zt(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());}I("shaka.offline.Storage",Jt);Jt.deleteAll=function(){var a;return F(function(b){return 1==b.g?(a=new Vs,ua(b),u(b,bt(a),2)):5!=b.g?(xa(b),u(b,a.destroy(),5)):ya(b,0)})};Jt.prototype.list=Jt.prototype.list;
866
+ Jt.prototype.removeEmeSessions=Jt.prototype.Ch;Jt.prototype.remove=Jt.prototype.remove;Jt.prototype.store=Jt.prototype.store;Jt.prototype.getNetworkingEngine=Jt.prototype.Ic;Jt.prototype.getConfiguration=Jt.prototype.getConfiguration;Jt.prototype.configure=Jt.prototype.configure;Jt.prototype.destroy=Jt.prototype.destroy;Jt.support=Kt;
867
+ var $t=(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");
868
+ Dn.offline=Kt;function nu(){}function ou(){for(var a=r(pu),b=a.next();!b.done;b=a.next()){b=b.value;try{b.qg()}catch(c){Ua("Error installing polyfill!",c)}}}function qu(a,b){a={priority:b||0,qg:a};for(b=0;b<pu.length;b++)if(pu[b].priority<a.priority){pu.splice(b,0,a);return}pu.push(a)}I("shaka.polyfill",nu);nu.register=qu;nu.installAll=ou;var pu=[];function ru(){this.g=new su}function tu(){window.AbortController||(window.AbortController=ru,window.AbortSignal=su)}ru.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new L("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(ru.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});nu.AbortController=ru;ru.install=tu;
869
+ function su(){db.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(su,db);da.Object.defineProperties(su.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});qu(tu);function uu(){}function vu(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())wu(b.value)}function wu(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)}})}nu.Aria=uu;uu.install=vu;qu(vu);function xu(){}function yu(){zu()}nu.EncryptionScheme=xu;xu.install=yu;qu(yu,-2);function Au(){}
870
+ 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}}),
871
+ 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)}}
872
+ 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)}nu.Fullscreen=Au;Au.install=Bu;qu(Bu);function Du(){}function Eu(){var a=!0;if(Uc()||Rc("PlayStation 5")||Vc()||Rc("Web0S")||Sc()||Rc("CrKey")||Rc("PC=EOS")||Rc("Hisense")||Rc("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Fu=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Gu)}
873
+ function Gu(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C;return F(function(z){switch(z.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return z.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!Mc())return z.return(b);if(c){if(Rc("CrKey"))if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var A=c.contentType;c.width&&c.height&&(A+="; width="+c.width+"; height="+c.height);c.framerate&&(A+="; framerate="+c.framerate);"pq"===
871
874
  c.transferFunction&&(A+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(A)}else e=bc(c.contentType);else Sc()?(f=c.contentType,c.width&&c.height&&(f+="; width="+c.width,f+="; height="+c.height),c.framerate&&(f+="; framerate="+c.framerate),c.bitrate&&(f+="; bitrate="+c.bitrate),e=bc(f)):e=bc(c.contentType);if(!e)return z.return(b)}if(d&&(g=d.contentType,h=bc(g),!h))return z.return(b)}else if("file"==a.type){if(c&&(k=c.contentType,l=Nc(k),!l)||d&&(m=d.contentType,p=Nc(m),!p))return z.return(b)}else return z.return(b);
872
875
  if(!a.keySystemConfiguration)return b.supported=!0,z.return(Promise.resolve(b));n=a.keySystemConfiguration;t=[];v=[];n.audio&&(y={robustness:n.audio.robustness||"",contentType:a.audio.contentType},t.push(y));n.video&&(w={robustness:n.video.robustness||"",contentType:a.video.contentType},v.push(w));x={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes};t.length&&(x.audioCapabilities=t);v.length&&(x.videoCapabilities=
873
- v);D(z,3);return u(z,navigator.requestMediaKeySystemAccess(n.keySystem,[x]),5);case 5:C=z.h;va(z,4);break;case 3:wa(z);case 4:C&&(b.supported=!0,b.keySystemAccess=C);case 2:return z.return(b)}})}lu.MediaCapabilities=Bu;Bu.install=Cu;var Du=null;Bu.originalMcap=Du;ou(Cu,-1);function Fu(){}function Gu(){var a=Wc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Hu():a?12>=a?(Iu(),Ju()):15>=a&&Iu():Pc()?Ku():(Rc("Tizen 2")||Rc("Tizen 3")||Rc("Tizen 4"))&&Lu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Mu()}
874
- function Iu(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function Ju(){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]&&a(b)}}
875
- function Lu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=zd(b)[0]&&a(b)}}function Hu(){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)}}
876
- function Mu(){var a=MediaSource.isTypeSupported;Rc("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)})}lu.MediaSource=Fu;Fu.install=Gu;ou(Gu);function Nu(){}function Ou(){screen.orientation||void 0!=window.orientation&&Pu()}function Pu(){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 Qu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new L("change");b.dispatchEvent(c)})}lu.Orientation=Nu;
877
- Nu.install=Ou;function Qu(){db.call(this);this.type="";this.angle=0}pa(Qu,db);
878
- Qu.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)};
879
- Qu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};ou(Ou);function Ru(){}var Su,Tu,Uu,Vu,Wu,Xu;function Yu(a,b){try{var c=new Zu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function $u(a){var b=this.mediaKeys;b&&b!=a&&av(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?av(a,this):Promise.resolve()}
880
- function bv(a){a=Fc(a.initData);if(Ic(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=ad(a.subarray(4),!0);a=dd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Gc(a);this.dispatchEvent(b)}lu.PatchedMediaKeysApple=Ru;
881
- Ru.uninstall=function(){Su&&(Su=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Tu),HTMLMediaElement.prototype.setMediaKeys=Uu,window.MediaKeys=Vu,window.MediaKeySystemAccess=Wu,navigator.requestMediaKeySystemAccess=Xu,Tu=Xu=Uu=Wu=Vu=null,window.shakaMediaKeysPolyfill=!1)};
882
- Ru.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Su=!0,Tu=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Uu=HTMLMediaElement.prototype.setMediaKeys,Vu=window.MediaKeys,Wu=window.MediaKeySystemAccess,Xu=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=$u;window.MediaKeys=cv;window.MediaKeySystemAccess=Zu;navigator.requestMediaKeySystemAccess=
883
- Yu;window.shakaMediaKeysPolyfill=!0}};
884
- function Zu(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=r(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=r(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
876
+ v);D(z,3);return u(z,navigator.requestMediaKeySystemAccess(n.keySystem,[x]),5);case 5:C=z.h;va(z,4);break;case 3:wa(z);case 4:C&&(b.supported=!0,b.keySystemAccess=C);case 2:return z.return(b)}})}nu.MediaCapabilities=Du;Du.install=Eu;var Fu=null;Du.originalMcap=Fu;qu(Eu,-1);function Hu(){}function Iu(){var a=Wc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Ju():a?12>=a?(Ku(),Lu()):15>=a&&Ku():Pc()?Mu():(Rc("Tizen 2")||Rc("Tizen 3")||Rc("Tizen 4"))&&Nu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Ou()}
877
+ function Ku(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function Lu(){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]&&a(b)}}
878
+ function Nu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=zd(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)}}
879
+ function Ou(){var a=MediaSource.isTypeSupported;Rc("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)})}nu.MediaSource=Hu;Hu.install=Iu;qu(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 L("change");b.dispatchEvent(c)})}nu.Orientation=Pu;
880
+ Pu.install=Qu;function Su(){db.call(this);this.type="";this.angle=0}pa(Su,db);
881
+ 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)};
882
+ Su.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};qu(Qu);function Tu(){}var Uu,Vu,Wu,Xu,Yu,Zu;function $u(a,b){try{var c=new av(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function bv(a){var b=this.mediaKeys;b&&b!=a&&cv(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?cv(a,this):Promise.resolve()}
883
+ function dv(a){a=Fc(a.initData);if(Ic(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=ad(a.subarray(4),!0);a=dd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Gc(a);this.dispatchEvent(b)}nu.PatchedMediaKeysApple=Tu;
884
+ Tu.uninstall=function(){Uu&&(Uu=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Vu),HTMLMediaElement.prototype.setMediaKeys=Wu,window.MediaKeys=Xu,window.MediaKeySystemAccess=Yu,navigator.requestMediaKeySystemAccess=Zu,Vu=Zu=Wu=Yu=Xu=null,window.shakaMediaKeysPolyfill=!1)};
885
+ Tu.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Uu=!0,Vu=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Wu=HTMLMediaElement.prototype.setMediaKeys,Xu=window.MediaKeys,Yu=window.MediaKeySystemAccess,Zu=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=bv;window.MediaKeys=ev;window.MediaKeySystemAccess=av;navigator.requestMediaKeySystemAccess=
886
+ $u;window.shakaMediaKeysPolyfill=!0}};
887
+ function av(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=r(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=r(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
885
888
  g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=r(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
886
- Zu.prototype.createMediaKeys=function(){var a=new cv(this.keySystem);return Promise.resolve(a)};Zu.prototype.getConfiguration=function(){return this.g};function cv(a){this.h=new WebKitMediaKeys(a);this.g=new wf}cv.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new dv(this.h,a)};cv.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
887
- function av(a,b){a.g.Sb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",bv);try{return Bj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function dv(a){db.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new wf;this.sessionId="";this.expiration=NaN;this.closed=new Jc;this.keyStatuses=new ev}pa(dv,db);q=dv.prototype;
888
- q.generateRequest=function(a,b){var c=this;this.h=new Jc;try{var d=this.l.createSession("video/mp4",Fc(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.fc()?"license-request":"license-renewal").set("message",Gc(e.message));e=new L("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(fv(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
889
- function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:fv(c,"output-not-allowed");break;default:fv(c,"internal-error")}});fv(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
890
- q.update=function(a){this.g=new Jc;try{this.i.update(Fc(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sb()}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 fv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new L("keystatuseschange");a.dispatchEvent(b)}
891
- function ev(){this.size=0;this.g=void 0}q=ev.prototype;q.fc=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Yg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Yg.value();return this.g&&Dc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function gv(){}function hv(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=iv,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=jv,window.MediaKeys=kv,window.MediaKeySystemAccess=lv,window.shakaMediaKeysPolyfill=!0)}function iv(){return Promise.reject(Error("The key system specified is not supported."))}
892
- function jv(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}lu.PatchedMediaKeysNop=gv;gv.install=hv;function kv(){throw new TypeError("Illegal constructor.");}kv.prototype.createSession=function(){};kv.prototype.setServerCertificate=function(){};function lv(){this.keySystem="";throw new TypeError("Illegal constructor.");}lv.prototype.getConfiguration=function(){};lv.prototype.createMediaKeys=function(){};ou(hv,-10);function mv(){}
893
- function nv(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)ov="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=pv;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=qv;window.MediaKeys=rv;window.MediaKeySystemAccess=sv;window.shakaMediaKeysPolyfill=!0}}
894
- function tv(a){var b=ov;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function pv(a,b){try{var c=new sv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function qv(a){var b=this.mediaKeys;b&&b!=a&&uv(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&uv(a,this);return Promise.resolve()}lu.PatchedMediaKeysWebkit=mv;mv.install=nv;
895
- function sv(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),
889
+ av.prototype.createMediaKeys=function(){var a=new ev(this.keySystem);return Promise.resolve(a)};av.prototype.getConfiguration=function(){return this.g};function ev(a){this.h=new WebKitMediaKeys(a);this.g=new wf}ev.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new fv(this.h,a)};ev.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
890
+ function cv(a,b){a.g.Sb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",dv);try{return Dj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function fv(a){db.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new wf;this.sessionId="";this.expiration=NaN;this.closed=new Jc;this.keyStatuses=new gv}pa(fv,db);q=fv.prototype;
891
+ q.generateRequest=function(a,b){var c=this;this.h=new Jc;try{var d=this.l.createSession("video/mp4",Fc(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.fc()?"license-request":"license-renewal").set("message",Gc(e.message));e=new L("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(hv(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
892
+ function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:hv(c,"output-not-allowed");break;default:hv(c,"internal-error")}});hv(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
893
+ q.update=function(a){this.g=new Jc;try{this.i.update(Fc(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sb()}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 hv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new L("keystatuseschange");a.dispatchEvent(b)}
894
+ function gv(){this.size=0;this.g=void 0}q=gv.prototype;q.fc=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Yg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Yg.value();return this.g&&Dc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function iv(){}function jv(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=kv,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=lv,window.MediaKeys=mv,window.MediaKeySystemAccess=nv,window.shakaMediaKeysPolyfill=!0)}function kv(){return Promise.reject(Error("The key system specified is not supported."))}
895
+ function lv(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}nu.PatchedMediaKeysNop=iv;iv.install=jv;function mv(){throw new TypeError("Illegal constructor.");}mv.prototype.createSession=function(){};mv.prototype.setServerCertificate=function(){};function nv(){this.keySystem="";throw new TypeError("Illegal constructor.");}nv.prototype.getConfiguration=function(){};nv.prototype.createMediaKeys=function(){};qu(jv,-10);function ov(){}
896
+ function pv(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)qv="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=rv;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=sv;window.MediaKeys=tv;window.MediaKeySystemAccess=uv;window.shakaMediaKeysPolyfill=!0}}
897
+ function vv(a){var b=qv;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function rv(a,b){try{var c=new uv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function sv(a){var b=this.mediaKeys;b&&b!=a&&wv(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&wv(a,this);return Promise.resolve()}nu.PatchedMediaKeysWebkit=ov;ov.install=pv;
898
+ function uv(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),
896
899
  l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=r(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
897
- d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}sv.prototype.createMediaKeys=function(){var a=new rv(this.g);return Promise.resolve(a)};sv.prototype.getConfiguration=function(){return this.h};function rv(a){this.l=a;this.h=null;this.g=new wf;this.i=[];this.j=new Map}
898
- function uv(a,b){a.h=b;a.g.Sb();var c=ov;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=vv(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.fc()?"licenserequest":"licenserenewal").set("message",d.message),d=new L("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=vv(a,d.sessionId))wv(d,"usable"),
899
- d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=vv(a,d.sessionId);e&&e.handleError(d)}))}rv.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 xv(b,this.l,a);this.i.push(a);return a};rv.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
900
- function vv(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 xv(a,b,c){db.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 Jc;this.keyStatuses=new yv}pa(xv,db);q=xv.prototype;
901
- 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?wv(this,"output-restricted"):1==b?wv(this,"expired"):wv(this,"internal-error"))};
902
- function zv(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=Fc(dd("LOAD_SESSION|"+c));else{var e=dd("PERSISTENT|");d=ld(e,b)}else d=Fc(b)}catch(g){return Promise.reject(g)}a.h=new Jc;var f=tv("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new N(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).R(.01)}return a.h}
903
- function Av(a,b,c){if(a.g)a.g.then(function(){return Av(a,b,c)}).catch(function(){return Av(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=$c(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=id(e.keys[0].k);e=id(e.keys[0].kid)}else d=Fc(c),e=null;var f=tv("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
904
- function wv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new L("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return zv(this,b,null)};q.load=function(a){return"persistent-license"==this.l?zv(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Jc;Av(this,b,a);return b};
905
- 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=tv("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 yv(){this.size=0;this.g=void 0}q=yv.prototype;q.fc=function(){return this.g};
906
- q.forEach=function(a){this.g&&a(this.g,Yg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Yg.value();return this.g&&Dc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var ov="";ou(nv);function Bv(){}function Cv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Dv,Object.defineProperty(a,"disablePictureInPicture",{get:Ev,set:Fv,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Gv,document.addEventListener("webkitpresentationmodechanged",Hv,!0))}}
907
- function Hv(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)}
908
- function Dv(){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 Gv(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
909
- function Ev(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Fv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}lu.PiPWebkit=Bv;Bv.install=Cv;ou(Cv);function Iv(){}function Jv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Kv))}function Kv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}lu.RandomUUID=Iv;Iv.install=Jv;ou(Jv);function Lv(){}function Mv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Nv)}function Nv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}lu.StorageEstimate=Lv;Lv.install=Mv;ou(Mv);function Ov(){}function Pv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Qv})}function Qv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}lu.Symbol=Ov;Ov.install=Pv;ou(Pv);function Rv(){}function Sv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}lu.VideoPlayPromise=Rv;Rv.install=Sv;ou(Sv);function Tv(){}function Uv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Tc())&&(a.getVideoPlaybackQuality=Vv)}}function Vv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}lu.VideoPlaybackQuality=Tv;Tv.install=Uv;ou(Uv);function Wv(){}function Xv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Yv;else if(6==b)a=Zv;else{try{var c=!!Yv(1,2,"")}catch(d){c=!1}c&&(a=Yv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Yv(a,b,c){return new window.TextTrackCue(a,b,c)}function Zv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}lu.VTTCue=Wv;Wv.install=Xv;ou(Xv);function $v(){}$v.prototype.parseInit=function(){};$v.prototype.setSequenceMode=function(){};$v.prototype.parseMedia=function(a,b){var c=null,d=[];a=$c(a).split(/\r?\n/);a=r(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=aw.exec(e))){var f=bw.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new hc(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};I("shaka.text.LrcTextParser",$v);$v.prototype.parseMedia=$v.prototype.parseMedia;
910
- $v.prototype.setSequenceMode=$v.prototype.setSequenceMode;$v.prototype.parseInit=$v.prototype.parseInit;var aw=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,bw=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Dd["application/x-subtitle-lrc"]=function(){return new $v};function cw(){}cw.prototype.parseInit=function(){};cw.prototype.setSequenceMode=function(){};
911
- cw.prototype.parseMedia=function(a,b){var c=$c(a);a=[];if(""==c)return a;var d=kg(c,"tt");if(!d)throw new M(2,2,2005,"Failed to parse TTML.");c=d.getElementsByTagName("body")[0];if(!c)return[];var e=Zf(d,dw,"frameRate"),f=Zf(d,dw,"subFrameRate"),g=Zf(d,dw,"frameRateMultiplier"),h=Zf(d,dw,"tickRate"),k=Zf(d,dw,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=Zf(d,ew,"extent");if("default"!=l&&"preserve"!=l)throw new M(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new fw(e,f,
912
- g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{columns:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?Xf(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var p=r(d),n=p.next();!n.done;n=p.next()){var t=n.value;n=new jc;var v=t.getAttribute("xml:id");if(v){n.id=v;var y=null;m&&(y=gw.exec(m)||hw.exec(m));v=y?Number(y[1]):null;y=y?Number(y[2]):null;var w,x;if(w=iw(t,g,"extent"))w=(x=gw.exec(w))||hw.exec(w),
913
- null!=w&&(n.width=Number(w[1]),n.height=Number(w[2]),x||(null!=v&&(n.width=100*n.width/v),null!=y&&(n.height=100*n.height/y)),n.widthUnits=x||null!=v?Ac:0,n.heightUnits=x||null!=y?Ac:0);if(t=iw(t,g,"origin"))w=(x=gw.exec(t))||hw.exec(t),null!=w&&(n.viewportAnchorX=Number(w[1]),n.viewportAnchorY=Number(w[2]),x||(null!=y&&(n.viewportAnchorY=100*n.viewportAnchorY/y),null!=v&&(n.viewportAnchorX=100*n.viewportAnchorX/v)),n.viewportAnchorUnits=x||null!=v?Ac:0)}else n=null;n&&h.push(n)}if(Uf(c,"p").length)throw new M(2,
914
- 2,2001,"<p> can only be inside <div> in TTML");m=r(Uf(c,"div"));for(p=m.next();!p.done;p=m.next())if(Uf(p.value,"span").length)throw new M(2,2,2001,"<span> can only be inside <p> in TTML");if(b=jw(c,b,e,f,g,d,h,l,k,null,!1))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
915
- function jw(a,b,c,d,e,f,g,h,k,l,m){var p=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var n=document.createElement("span");n.textContent=a.textContent}else n=a;for(var t=null,v=r(kw),y=v.next();!y.done&&!(t=lw(n,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||t)m=!0;h="default"==(n.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(n.childNodes).every(function(A){return A.nodeType==Node.TEXT_NODE});
916
- a=[];if(!y)for(var w=r(n.childNodes),x=w.next();!x.done;x=w.next())(x=jw(x.value,b,c,d,e,f,g,h,k,n,m))&&a.push(x);d=null!=l;w=/\S/.test(n.textContent);var C=n.hasAttribute("begin")||n.hasAttribute("end")||n.hasAttribute("dur");if(!(C||w||"br"==n.tagName||0!=a.length||d&&!h))return null;x=mw(n,c);w=x.start;for(x=x.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)x=nw(p,c,w,x),w=x.start,x=x.end,p=p.parentNode;null==w&&(w=0);w+=b.periodStart;x=null==x?Infinity:x+b.periodStart;w=Math.max(w,b.segmentStart);
917
- x=Math.min(x,b.segmentEnd);if(!C&&0<a.length)for(w=Infinity,x=0,b=r(a),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"==n.tagName)return e=new hc(w,x,""),e.lineBreak=!0,e;b="";y&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new hc(w,x,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=lw(n,"region",f,"")[0];if(n.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(A){return A.id==
918
- z})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&(g=lw(l,"region",f,"")[0]);ow(b,n,g,t,e,v,0==a.length);return b}
919
- function ow(a,b,c,d,e,f,g){f=f||g;"rtl"==pw(b,c,e,"direction",f)&&(a.direction="rtl");g=pw(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=ic);(g=pw(b,c,e,"textAlign",!0))?(a.positionAlign=qw[g],a.lineAlign=rw[g],a.textAlign=uc[g.toUpperCase()]):a.textAlign=mc;if(g=pw(b,c,e,"displayAlign",!0))a.displayAlign=vc[g.toUpperCase()];if(g=pw(b,c,e,"color",f))a.color=g;if(g=pw(b,c,e,"backgroundColor",
920
- f))a.backgroundColor=g;if(g=pw(b,c,e,"border",f))a.border=g;if(g=pw(b,c,e,"fontFamily",f))switch(g){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=g}(g=pw(b,c,e,"fontWeight",f))&&
921
- "bold"==g&&(a.fontWeight=700);g=pw(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=pw(b,c,e,"lineHeight",f))&&g.match(sw)&&(a.lineHeight=g);(g=pw(b,c,e,"fontSize",f))&&(g.match(sw)||g.match(tw))&&(a.fontSize=g);if(g=pw(b,c,e,"fontStyle",f))a.fontStyle=zc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=pw(b,c,e,"textOutline",
922
- f))d=d.split(" "),d[0].match(sw)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(sw)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=pw(b,c,e,"letterSpacing",f))&&d.match(sw)&&(a.letterSpacing=d);(d=pw(b,c,e,"linePadding",f))&&d.match(sw)&&(a.linePadding=d);if(f=pw(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=iw(c,e,"textDecoration"))&&uw(a,c);(b=vw(b,e,"textDecoration"))&&uw(a,b)}
923
- function uw(a,b){b=r(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&ec(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&ec(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
924
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&ec(a.textDecoration,"overline")}}function pw(a,b,c,d,e){e=void 0===e?!0:e;return(a=vw(a,c,d))?a:e?iw(b,c,d):null}function iw(a,b,c){if(!a)return null;var d=Zf(a,ew,c);return d?d:ww(a,b,c)}function vw(a,b,c){var d=Zf(a,ew,c);return d?d:ww(a,b,c)}
925
- function ww(a,b,c){a=lw(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Yf(a[e],"urn:ebu:tt:style",c);f||(f=Zf(a[e],ew,c));f||(f=vw(a[e],b,c));f&&(d=f)}return d}
926
- function lw(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Yf(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 nw(a,b,c,d){a=mw(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}}
927
- function mw(a,b){var c=xw(a.getAttribute("begin"),b),d=xw(a.getAttribute("end"),b);a=xw(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
928
- function xw(a,b){var c=null;if(yw.test(a)){a=yw.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(zw.test(a))c=Aw(zw,a);else if(Bw.test(a))c=Aw(Bw,a);else if(Cw.test(a))a=Cw.exec(a),c=Number(a[1])/b.frameRate;else if(Dw.test(a))a=Dw.exec(a),c=Number(a[1])/b.g;else if(Ew.test(a))c=Aw(Ew,a);else if(a)throw new M(2,2,2001,"Could not parse cue time range in TTML");return c}
929
- function Aw(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}I("shaka.text.TtmlTextParser",cw);cw.prototype.parseMedia=cw.prototype.parseMedia;cw.prototype.setSequenceMode=cw.prototype.setSequenceMode;cw.prototype.parseInit=cw.prototype.parseInit;
930
- function fw(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]))}
931
- var gw=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,tw=/^(\d{1,2}(?:\.\d+)?|100)%$/,sw=/^(\d+px|\d+em|\d*\.?\d+c)$/,hw=/^(\d+)px (\d+)px$/,yw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,zw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Bw=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Cw=/^(\d*(?:\.\d*)?)f$/,Dw=/^(\d*(?:\.\d*)?)t$/,Ew=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),rw={left:pc,center:"center",right:"end",start:pc,
932
- end:"end"},qw={left:"line-left",center:"center",right:"line-right"},dw=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],ew=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],kw=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Dd["application/ttml+xml"]=function(){return new cw};function Fw(){this.g=new cw}Fw.prototype.parseInit=function(a){var b=!1;(new Hf).box("moov",Mf).box("trak",Mf).box("mdia",Mf).box("minf",Mf).box("stbl",Mf).T("stsd",Of).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new M(2,2,2007);};Fw.prototype.setSequenceMode=function(){};Fw.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Hf).box("mdat",Qf(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new M(2,2,2007);return e};
933
- I("shaka.text.Mp4TtmlParser",Fw);Fw.prototype.parseMedia=Fw.prototype.parseMedia;Fw.prototype.setSequenceMode=Fw.prototype.setSequenceMode;Fw.prototype.parseInit=Fw.prototype.parseInit;Dd['application/mp4; codecs="stpp"']=function(){return new Fw};Dd['application/mp4; codecs="stpp.ttml"']=function(){return new Fw};Dd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Fw};Dd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Fw};function Gw(){this.g=!1}Gw.prototype.parseInit=function(){};Gw.prototype.setSequenceMode=function(a){this.g=a};
934
- Gw.prototype.parseMedia=function(a,b){a=$c(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new M(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.g){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=Hw(new Yq(d[1]));if(null==a)throw new M(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
935
- e/9E4-a}}b=[];e=r(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Yq(d);var f=new jc;ar(d);Zq(d);for(var g=ar(d);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?
936
- (h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Zq(d);g=ar(d)}b.push(f)}e=new Map;Iw(e);d=[];c=r(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=r(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&
900
+ d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}uv.prototype.createMediaKeys=function(){var a=new tv(this.g);return Promise.resolve(a)};uv.prototype.getConfiguration=function(){return this.h};function tv(a){this.l=a;this.h=null;this.g=new wf;this.i=[];this.j=new Map}
901
+ function wv(a,b){a.h=b;a.g.Sb();var c=qv;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=xv(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.fc()?"licenserequest":"licenserenewal").set("message",d.message),d=new L("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=xv(a,d.sessionId))yv(d,"usable"),
902
+ d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=xv(a,d.sessionId);e&&e.handleError(d)}))}tv.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 zv(b,this.l,a);this.i.push(a);return a};tv.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
903
+ function xv(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 zv(a,b,c){db.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 Jc;this.keyStatuses=new Av}pa(zv,db);q=zv.prototype;
904
+ 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?yv(this,"output-restricted"):1==b?yv(this,"expired"):yv(this,"internal-error"))};
905
+ function Bv(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=Fc(dd("LOAD_SESSION|"+c));else{var e=dd("PERSISTENT|");d=ld(e,b)}else d=Fc(b)}catch(g){return Promise.reject(g)}a.h=new Jc;var f=vv("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new N(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).R(.01)}return a.h}
906
+ function Cv(a,b,c){if(a.g)a.g.then(function(){return Cv(a,b,c)}).catch(function(){return Cv(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=$c(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=id(e.keys[0].k);e=id(e.keys[0].kid)}else d=Fc(c),e=null;var f=vv("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
907
+ function yv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new L("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return Bv(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Bv(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Jc;Cv(this,b,a);return b};
908
+ 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=vv("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 Av(){this.size=0;this.g=void 0}q=Av.prototype;q.fc=function(){return this.g};
909
+ q.forEach=function(a){this.g&&a(this.g,Yg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Yg.value();return this.g&&Dc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var qv="";qu(pv);function Dv(){}function Ev(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Fv,Object.defineProperty(a,"disablePictureInPicture",{get:Gv,set:Hv,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Iv,document.addEventListener("webkitpresentationmodechanged",Jv,!0))}}
910
+ function Jv(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)}
911
+ function Fv(){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 Iv(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
912
+ function Gv(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Hv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}nu.PiPWebkit=Dv;Dv.install=Ev;qu(Ev);function Kv(){}function Lv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Mv))}function Mv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}nu.RandomUUID=Kv;Kv.install=Lv;qu(Lv);function Nv(){}function Ov(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Pv)}function Pv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}nu.StorageEstimate=Nv;Nv.install=Ov;qu(Ov);function Qv(){}function Rv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Sv})}function Sv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}nu.Symbol=Qv;Qv.install=Rv;qu(Rv);function Tv(){}function Uv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}nu.VideoPlayPromise=Tv;Tv.install=Uv;qu(Uv);function Vv(){}function Wv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Tc())&&(a.getVideoPlaybackQuality=Xv)}}function Xv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}nu.VideoPlaybackQuality=Vv;Vv.install=Wv;qu(Wv);function Yv(){}function Zv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=$v;else if(6==b)a=aw;else{try{var c=!!$v(1,2,"")}catch(d){c=!1}c&&(a=$v)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function $v(a,b,c){return new window.TextTrackCue(a,b,c)}function aw(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}nu.VTTCue=Yv;Yv.install=Zv;qu(Zv);function bw(){}bw.prototype.parseInit=function(){};bw.prototype.setSequenceMode=function(){};bw.prototype.parseMedia=function(a,b){var c=null,d=[];a=$c(a).split(/\r?\n/);a=r(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=cw.exec(e))){var f=dw.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new hc(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};I("shaka.text.LrcTextParser",bw);bw.prototype.parseMedia=bw.prototype.parseMedia;
913
+ bw.prototype.setSequenceMode=bw.prototype.setSequenceMode;bw.prototype.parseInit=bw.prototype.parseInit;var cw=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,dw=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Dd["application/x-subtitle-lrc"]=function(){return new bw};function ew(){}ew.prototype.parseInit=function(){};ew.prototype.setSequenceMode=function(){};
914
+ ew.prototype.parseMedia=function(a,b){var c=$c(a);a=[];if(""==c)return a;var d=kg(c,"tt");if(!d)throw new M(2,2,2005,"Failed to parse TTML.");c=d.getElementsByTagName("body")[0];if(!c)return[];var e=Zf(d,fw,"frameRate"),f=Zf(d,fw,"subFrameRate"),g=Zf(d,fw,"frameRateMultiplier"),h=Zf(d,fw,"tickRate"),k=Zf(d,fw,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=Zf(d,gw,"extent");if("default"!=l&&"preserve"!=l)throw new M(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new hw(e,f,
915
+ g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{columns:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?Xf(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var p=r(d),n=p.next();!n.done;n=p.next()){var t=n.value;n=new jc;var v=t.getAttribute("xml:id");if(v){n.id=v;var y=null;m&&(y=iw.exec(m)||jw.exec(m));v=y?Number(y[1]):null;y=y?Number(y[2]):null;var w,x;if(w=kw(t,g,"extent"))w=(x=iw.exec(w))||jw.exec(w),
916
+ null!=w&&(n.width=Number(w[1]),n.height=Number(w[2]),x||(null!=v&&(n.width=100*n.width/v),null!=y&&(n.height=100*n.height/y)),n.widthUnits=x||null!=v?Ac:0,n.heightUnits=x||null!=y?Ac:0);if(t=kw(t,g,"origin"))w=(x=iw.exec(t))||jw.exec(t),null!=w&&(n.viewportAnchorX=Number(w[1]),n.viewportAnchorY=Number(w[2]),x||(null!=y&&(n.viewportAnchorY=100*n.viewportAnchorY/y),null!=v&&(n.viewportAnchorX=100*n.viewportAnchorX/v)),n.viewportAnchorUnits=x||null!=v?Ac:0)}else n=null;n&&h.push(n)}if(Uf(c,"p").length)throw new M(2,
917
+ 2,2001,"<p> can only be inside <div> in TTML");m=r(Uf(c,"div"));for(p=m.next();!p.done;p=m.next())if(Uf(p.value,"span").length)throw new M(2,2,2001,"<span> can only be inside <p> in TTML");if(b=lw(c,b,e,f,g,d,h,l,k,null,!1))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
918
+ function lw(a,b,c,d,e,f,g,h,k,l,m){var p=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var n=document.createElement("span");n.textContent=a.textContent}else n=a;for(var t=null,v=r(mw),y=v.next();!y.done&&!(t=nw(n,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||t)m=!0;h="default"==(n.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(n.childNodes).every(function(A){return A.nodeType==Node.TEXT_NODE});
919
+ a=[];if(!y)for(var w=r(n.childNodes),x=w.next();!x.done;x=w.next())(x=lw(x.value,b,c,d,e,f,g,h,k,n,m))&&a.push(x);d=null!=l;w=/\S/.test(n.textContent);var C=n.hasAttribute("begin")||n.hasAttribute("end")||n.hasAttribute("dur");if(!(C||w||"br"==n.tagName||0!=a.length||d&&!h))return null;x=ow(n,c);w=x.start;for(x=x.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)x=pw(p,c,w,x),w=x.start,x=x.end,p=p.parentNode;null==w&&(w=0);w+=b.periodStart;x=null==x?Infinity:x+b.periodStart;w=Math.max(w,b.segmentStart);
920
+ x=Math.min(x,b.segmentEnd);if(!C&&0<a.length)for(w=Infinity,x=0,b=r(a),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"==n.tagName)return e=new hc(w,x,""),e.lineBreak=!0,e;b="";y&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new hc(w,x,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=nw(n,"region",f,"")[0];if(n.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(A){return A.id==
921
+ z})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&(g=nw(l,"region",f,"")[0]);qw(b,n,g,t,e,v,0==a.length);return b}
922
+ function qw(a,b,c,d,e,f,g){f=f||g;"rtl"==rw(b,c,e,"direction",f)&&(a.direction="rtl");g=rw(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=ic);(g=rw(b,c,e,"textAlign",!0))?(a.positionAlign=sw[g],a.lineAlign=tw[g],a.textAlign=uc[g.toUpperCase()]):a.textAlign=mc;if(g=rw(b,c,e,"displayAlign",!0))a.displayAlign=vc[g.toUpperCase()];if(g=rw(b,c,e,"color",f))a.color=g;if(g=rw(b,c,e,"backgroundColor",
923
+ f))a.backgroundColor=g;if(g=rw(b,c,e,"border",f))a.border=g;if(g=rw(b,c,e,"fontFamily",f))switch(g){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=g}(g=rw(b,c,e,"fontWeight",f))&&
924
+ "bold"==g&&(a.fontWeight=700);g=rw(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=rw(b,c,e,"lineHeight",f))&&g.match(uw)&&(a.lineHeight=g);(g=rw(b,c,e,"fontSize",f))&&(g.match(uw)||g.match(vw))&&(a.fontSize=g);if(g=rw(b,c,e,"fontStyle",f))a.fontStyle=zc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=rw(b,c,e,"textOutline",
925
+ f))d=d.split(" "),d[0].match(uw)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(uw)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=rw(b,c,e,"letterSpacing",f))&&d.match(uw)&&(a.letterSpacing=d);(d=rw(b,c,e,"linePadding",f))&&d.match(uw)&&(a.linePadding=d);if(f=rw(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=kw(c,e,"textDecoration"))&&ww(a,c);(b=xw(b,e,"textDecoration"))&&ww(a,b)}
926
+ function ww(a,b){b=r(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&ec(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&ec(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
927
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&ec(a.textDecoration,"overline")}}function rw(a,b,c,d,e){e=void 0===e?!0:e;return(a=xw(a,c,d))?a:e?kw(b,c,d):null}function kw(a,b,c){if(!a)return null;var d=Zf(a,gw,c);return d?d:yw(a,b,c)}function xw(a,b,c){var d=Zf(a,gw,c);return d?d:yw(a,b,c)}
928
+ function yw(a,b,c){a=nw(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Yf(a[e],"urn:ebu:tt:style",c);f||(f=Zf(a[e],gw,c));f||(f=xw(a[e],b,c));f&&(d=f)}return d}
929
+ function nw(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Yf(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 pw(a,b,c,d){a=ow(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}}
930
+ function ow(a,b){var c=zw(a.getAttribute("begin"),b),d=zw(a.getAttribute("end"),b);a=zw(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
931
+ function zw(a,b){var c=null;if(Aw.test(a)){a=Aw.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(Bw.test(a))c=Cw(Bw,a);else if(Dw.test(a))c=Cw(Dw,a);else if(Ew.test(a))a=Ew.exec(a),c=Number(a[1])/b.frameRate;else if(Fw.test(a))a=Fw.exec(a),c=Number(a[1])/b.g;else if(Gw.test(a))c=Cw(Gw,a);else if(a)throw new M(2,2,2001,"Could not parse cue time range in TTML");return c}
932
+ function Cw(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}I("shaka.text.TtmlTextParser",ew);ew.prototype.parseMedia=ew.prototype.parseMedia;ew.prototype.setSequenceMode=ew.prototype.setSequenceMode;ew.prototype.parseInit=ew.prototype.parseInit;
933
+ function hw(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]))}
934
+ var iw=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,vw=/^(\d{1,2}(?:\.\d+)?|100)%$/,uw=/^(\d+px|\d+em|\d*\.?\d+c)$/,jw=/^(\d+)px (\d+)px$/,Aw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Bw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Dw=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Ew=/^(\d*(?:\.\d*)?)f$/,Fw=/^(\d*(?:\.\d*)?)t$/,Gw=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),tw={left:pc,center:"center",right:"end",start:pc,
935
+ end:"end"},sw={left:"line-left",center:"center",right:"line-right"},fw=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],gw=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],mw=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Dd["application/ttml+xml"]=function(){return new ew};function Hw(){this.g=new ew}Hw.prototype.parseInit=function(a){var b=!1;(new Hf).box("moov",Mf).box("trak",Mf).box("mdia",Mf).box("minf",Mf).box("stbl",Mf).U("stsd",Of).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new M(2,2,2007);};Hw.prototype.setSequenceMode=function(){};Hw.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Hf).box("mdat",Qf(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new M(2,2,2007);return e};
936
+ I("shaka.text.Mp4TtmlParser",Hw);Hw.prototype.parseMedia=Hw.prototype.parseMedia;Hw.prototype.setSequenceMode=Hw.prototype.setSequenceMode;Hw.prototype.parseInit=Hw.prototype.parseInit;Dd['application/mp4; codecs="stpp"']=function(){return new Hw};Dd['application/mp4; codecs="stpp.ttml"']=function(){return new Hw};Dd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Hw};Dd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Hw};function Iw(){this.g=!1}Iw.prototype.parseInit=function(){};Iw.prototype.setSequenceMode=function(a){this.g=a};
937
+ Iw.prototype.parseMedia=function(a,b){a=$c(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new M(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.g){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=Jw(new $q(d[1]));if(null==a)throw new M(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
938
+ e/9E4-a}}b=[];e=r(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new $q(d);var f=new jc;cr(d);ar(d);for(var g=cr(d);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?
939
+ (h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");ar(d);g=cr(d)}b.push(f)}e=new Map;Kw(e);d=[];c=r(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=r(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&
937
940
  (g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new hc(0,0,""));for(var m=!1,p=0;p<k.length;p++){var n=/^\s*([^:]+):\s*(.*)/.exec(k[p]);if(n){var t=n[2].trim().replace(";","");switch(n[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=t;break;case "color":m=!0;l.color=t;break;case "font-family":m=!0;l.fontFamily=t;break;case "font-size":m=!0;l.fontSize=t;break;case "font-weight":if(700<=parseInt(t,10)||"bold"==
938
941
  t)m=!0,l.fontWeight=700;break;case "font-style":switch(t){case "normal":m=!0;l.fontStyle=sc;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(t);break;case "text-shadow":m=!0;l.textShadow=t;break;case "white-space":m=!0,l.wrapLine="noWrap"!=t}}}m&&e.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else{h=null;f[0].includes("--\x3e")||(h=f[0],f.splice(0,1));
939
- g=new Yq(f[0]);k=Hw(g);p=$q(g,/[ \t]+--\x3e[ \t]+/g);l=Hw(g);if(null==k||null==p||null==l)throw new M(2,2,2001,"Could not parse cue time range in WebVTT");k+=m;l+=m;m=f.slice(1).join("\n").trim();e.has("global")?(f=e.get("global").clone(),f.startTime=k,f.endTime=l,f.payload=""):f=new hc(k,l,"");Jw(m,f,e);Zq(g);for(k=ar(g);k;)Kw(f,k,b),Zq(g),k=ar(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};
940
- function Iw(a){for(var b=r(Object.entries(xc)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new hc(0,0,"");e.color=d;a.set("."+c,e)}b=r(Object.entries(yc));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new hc(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
941
- function Jw(a,b,c){0===c.size&&Iw(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}d=[];f=-1;for(e=0;e<a.length;e++)"<"===a[e]?f=e+1:">"===a[e]&&0<f&&(f=
942
- a.substr(f,e-f),f.match(Lw)&&d.push(f),f=-1);d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,a=a.replace("<"+e+">",'<div time="'+e+'">'),a+="</div>";a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){a=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)d+="/"+k+">";else{if(!l.startsWith("v")){d+=e[h];continue}d+="/"+l+">"}h+=k.length+1}else d+=e[h]}else d+=e[h]}else"<"===e[h]?(g=h+1,"v"!=e[g]&&(g=-1)):
943
- ">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=kg("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=Mw(a);return}a=r(e);for(e=a.next();!e.done;e=a.next())Nw(e.value,b,d,c);b.nestedCues=d}else b.payload=Mw(a)}
944
- function Ow(a,b){return a&&0<a.length?a:b}
945
- function Nw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/(?=[ .])+/g)),g=f.next();!g.done;g=f.next()){var h=g=g.value;if(h.startsWith(".voice-")){var k=h.split("-").pop();h='v[voice="'+k+'"]';d.has(h)||(h="v[voice="+k+"]")}d.has(h)&&(h=d.get(h))&&(e.backgroundColor=Ow(h.backgroundColor,e.backgroundColor),e.color=Ow(h.color,e.color),e.fontFamily=Ow(h.fontFamily,e.fontFamily),e.fontSize=Ow(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=
946
- h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=Hw(new Yq(g)))e.startTime=g}}if(ag(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=Mw(a),c.push(f)),f=!1;else for(b=
947
- r(a.childNodes),a=b.next();!a.done;a=b.next())Nw(a.value,e,c,d)}
948
- function Kw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=mc:a.textAlign=uc[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"==
949
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Pw(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=wc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=oc,a.line=Number(c[1]),c[2]&&(a.lineAlign=wc[c[2].toUpperCase()])}function Pw(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
950
- function Hw(a){a=$q(a,Lw);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}function Mw(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}I("shaka.text.VttTextParser",Gw);Gw.prototype.parseMedia=Gw.prototype.parseMedia;
951
- Gw.prototype.setSequenceMode=Gw.prototype.setSequenceMode;Gw.prototype.parseInit=Gw.prototype.parseInit;var Lw=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Dd["text/vtt"]=function(){return new Gw};Dd['text/vtt; codecs="vtt"']=function(){return new Gw};Dd['text/vtt; codecs="wvtt"']=function(){return new Gw};function Qw(){this.g=null}Qw.prototype.parseInit=function(a){var b=this,c=!1;(new Hf).box("moov",Mf).box("trak",Mf).box("mdia",Mf).T("mdhd",function(d){d=ni(d.reader,d.version);b.g=d.timescale}).box("minf",Mf).box("stbl",Mf).T("stsd",Of).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new M(2,2,2008);if(!c)throw new M(2,2,2008);};Qw.prototype.setSequenceMode=function(){};
952
- Qw.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new M(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Hf).box("moof",Mf).box("traf",Mf).T("tfdt",function(z){g=!0;c=mi(z.reader,z.version).tf}).T("tfhd",function(z){l=li(z.reader,z.flags).Df}).T("trun",function(z){h=!0;d=oi(z.reader,z.version,z.flags).Uf}).box("mdat",Qf(function(z){k=!0;e=z})).parse(a,!1);if(!k&&!g&&!h)throw new M(2,2,2008);a=c;for(var m=new Ef(e,0),p=r(d),n=p.next();!n.done;n=p.next()){n=n.value;
953
- var t=n.He||l,v=n.Md?c+n.Md:a;a=v+(t||0);var y=0;do{var w=m.O();y+=w;var x=m.O(),C=null;"vttc"==Lf(x)?8<w&&(C=m.Bb(w-8)):m.skip(w-8);t&&C&&(w=Rw(C,b.periodStart+v/this.g,b.periodStart+a/this.g),f.push(w))}while(n.sampleSize&&y<n.sampleSize)}return f.filter(Ab)};function Rw(a,b,c){var d,e,f;(new Hf).box("payl",Qf(function(g){d=$c(g)})).box("iden",Qf(function(g){e=$c(g)})).box("sttg",Qf(function(g){f=$c(g)})).parse(a);return d?Sw(d,e,f,b,c):null}
954
- function Sw(a,b,c,d,e){d=new hc(d,e,"");Jw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Yq(c),b=ar(a);b;)Kw(d,b,[]),Zq(a),b=ar(a);return d}I("shaka.text.Mp4VttParser",Qw);Qw.prototype.parseMedia=Qw.prototype.parseMedia;Qw.prototype.setSequenceMode=Qw.prototype.setSequenceMode;Qw.prototype.parseInit=Qw.prototype.parseInit;Dd['application/mp4; codecs="wvtt"']=function(){return new Qw};function Tw(){}Tw.prototype.parseInit=function(){};Tw.prototype.setSequenceMode=function(){};Tw.prototype.parseMedia=function(a){var b=$c(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 Yq(c[0]),e=Uw(d),f=$q(d,/,/g);d=Uw(d);if(null==e||null==f||null==d)throw new M(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new hc(e,d,c.slice(1).join("\n").trim()))}return a};
955
- function Uw(a){a=$q(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)}I("shaka.text.SbvTextParser",Tw);Tw.prototype.parseMedia=Tw.prototype.parseMedia;Tw.prototype.setSequenceMode=Tw.prototype.setSequenceMode;Tw.prototype.parseInit=Tw.prototype.parseInit;Dd["text/x-subviewer"]=function(){return new Tw};function Vw(){this.g=new Gw}Vw.prototype.parseInit=function(){};Vw.prototype.setSequenceMode=function(){};Vw.prototype.parseMedia=function(a,b){a=$c(a);a=Ww(a);a=Fc(dd(a));return this.g.parseMedia(a,b)};function Ww(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}I("shaka.text.SrtTextParser",Vw);
956
- Vw.srt2webvtt=Ww;Vw.prototype.parseMedia=Vw.prototype.parseMedia;Vw.prototype.setSequenceMode=Vw.prototype.setSequenceMode;Vw.prototype.parseInit=Vw.prototype.parseInit;Dd["text/srt"]=function(){return new Vw};function Xw(){}Xw.prototype.parseInit=function(){};Xw.prototype.setSequenceMode=function(){};
957
- Xw.prototype.parseMedia=function(a){var b="",c="";a=$c(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Yw.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=Zw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split($w);else if("Style"==e){e=f.split($w);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
958
- [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={ce:e.ce},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Zw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split($w);else if("Dialogue"==f){g=g.split($w);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=ax(f.Start);var k=ax(f.End);g=new hc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.ce=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.ce}}(e)))&&bx(g,f);d.push(g)}return d};
959
- function bx(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=cx(c))a.color=c;if(c=b.BackColour)if(c=cx(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=qc;a.textAlign="start";break;case 2:a.displayAlign=qc;a.textAlign=mc;break;case 3:a.displayAlign=qc;a.textAlign="end";
942
+ g=new $q(f[0]);k=Jw(g);p=br(g,/[ \t]+--\x3e[ \t]+/g);l=Jw(g);if(null==k||null==p||null==l)throw new M(2,2,2001,"Could not parse cue time range in WebVTT");k+=m;l+=m;m=f.slice(1).join("\n").trim();e.has("global")?(f=e.get("global").clone(),f.startTime=k,f.endTime=l,f.payload=""):f=new hc(k,l,"");Lw(m,f,e);ar(g);for(k=cr(g);k;)Mw(f,k,b),ar(g),k=cr(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};
943
+ function Kw(a){for(var b=r(Object.entries(xc)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new hc(0,0,"");e.color=d;a.set("."+c,e)}b=r(Object.entries(yc));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new hc(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
944
+ function Lw(a,b,c){0===c.size&&Kw(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}d=[];f=-1;for(e=0;e<a.length;e++)"<"===a[e]?f=e+1:">"===a[e]&&0<f&&(f=
945
+ a.substr(f,e-f),f.match(Nw)&&d.push(f),f=-1);d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,a=a.replace("<"+e+">",'<div time="'+e+'">'),a+="</div>";a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){a=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)d+="/"+k+">";else{if(!l.startsWith("v")){d+=e[h];continue}d+="/"+l+">"}h+=k.length+1}else d+=e[h]}else d+=e[h]}else"<"===e[h]?(g=h+1,"v"!=e[g]&&(g=-1)):
946
+ ">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=kg("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=Ow(a);return}a=r(e);for(e=a.next();!e.done;e=a.next())Pw(e.value,b,d,c);b.nestedCues=d}else b.payload=Ow(a)}
947
+ function Qw(a,b){return a&&0<a.length?a:b}
948
+ function Pw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/(?=[ .])+/g)),g=f.next();!g.done;g=f.next()){var h=g=g.value;if(h.startsWith(".voice-")){var k=h.split("-").pop();h='v[voice="'+k+'"]';d.has(h)||(h="v[voice="+k+"]")}d.has(h)&&(h=d.get(h))&&(e.backgroundColor=Qw(h.backgroundColor,e.backgroundColor),e.color=Qw(h.color,e.color),e.fontFamily=Qw(h.fontFamily,e.fontFamily),e.fontSize=Qw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=
949
+ h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=Jw(new $q(g)))e.startTime=g}}if(ag(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=Ow(a),c.push(f)),f=!1;else for(b=
950
+ r(a.childNodes),a=b.next();!a.done;a=b.next())Pw(a.value,e,c,d)}
951
+ function Mw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=mc:a.textAlign=uc[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||
952
+ "end"==b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Rw(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=wc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=oc,a.line=Number(c[1]),c[2]&&(a.lineAlign=wc[c[2].toUpperCase()])}function Rw(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
953
+ function Jw(a){a=br(a,Nw);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}function Ow(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}I("shaka.text.VttTextParser",Iw);Iw.prototype.parseMedia=Iw.prototype.parseMedia;
954
+ Iw.prototype.setSequenceMode=Iw.prototype.setSequenceMode;Iw.prototype.parseInit=Iw.prototype.parseInit;var Nw=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Dd["text/vtt"]=function(){return new Iw};Dd['text/vtt; codecs="vtt"']=function(){return new Iw};Dd['text/vtt; codecs="wvtt"']=function(){return new Iw};function Sw(){this.g=null}Sw.prototype.parseInit=function(a){var b=this,c=!1;(new Hf).box("moov",Mf).box("trak",Mf).box("mdia",Mf).U("mdhd",function(d){d=oi(d.reader,d.version);b.g=d.timescale}).box("minf",Mf).box("stbl",Mf).U("stsd",Of).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new M(2,2,2008);if(!c)throw new M(2,2,2008);};Sw.prototype.setSequenceMode=function(){};
955
+ Sw.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new M(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Hf).box("moof",Mf).box("traf",Mf).U("tfdt",function(z){g=!0;c=ni(z.reader,z.version).uf}).U("tfhd",function(z){l=mi(z.reader,z.flags).Ef}).U("trun",function(z){h=!0;d=pi(z.reader,z.version,z.flags).Uf}).box("mdat",Qf(function(z){k=!0;e=z})).parse(a,!1);if(!k&&!g&&!h)throw new M(2,2,2008);a=c;for(var m=new Ef(e,0),p=r(d),n=p.next();!n.done;n=p.next()){n=n.value;
956
+ var t=n.Je||l,v=n.Md?c+n.Md:a;a=v+(t||0);var y=0;do{var w=m.O();y+=w;var x=m.O(),C=null;"vttc"==Lf(x)?8<w&&(C=m.Bb(w-8)):m.skip(w-8);t&&C&&(w=Tw(C,b.periodStart+v/this.g,b.periodStart+a/this.g),f.push(w))}while(n.sampleSize&&y<n.sampleSize)}return f.filter(Ab)};function Tw(a,b,c){var d,e,f;(new Hf).box("payl",Qf(function(g){d=$c(g)})).box("iden",Qf(function(g){e=$c(g)})).box("sttg",Qf(function(g){f=$c(g)})).parse(a);return d?Uw(d,e,f,b,c):null}
957
+ function Uw(a,b,c,d,e){d=new hc(d,e,"");Lw(a,d,new Map);b&&(d.id=b);if(c)for(a=new $q(c),b=cr(a);b;)Mw(d,b,[]),ar(a),b=cr(a);return d}I("shaka.text.Mp4VttParser",Sw);Sw.prototype.parseMedia=Sw.prototype.parseMedia;Sw.prototype.setSequenceMode=Sw.prototype.setSequenceMode;Sw.prototype.parseInit=Sw.prototype.parseInit;Dd['application/mp4; codecs="wvtt"']=function(){return new Sw};function Vw(){}Vw.prototype.parseInit=function(){};Vw.prototype.setSequenceMode=function(){};Vw.prototype.parseMedia=function(a){var b=$c(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 $q(c[0]),e=Ww(d),f=br(d,/,/g);d=Ww(d);if(null==e||null==f||null==d)throw new M(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new hc(e,d,c.slice(1).join("\n").trim()))}return a};
958
+ function Ww(a){a=br(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)}I("shaka.text.SbvTextParser",Vw);Vw.prototype.parseMedia=Vw.prototype.parseMedia;Vw.prototype.setSequenceMode=Vw.prototype.setSequenceMode;Vw.prototype.parseInit=Vw.prototype.parseInit;Dd["text/x-subviewer"]=function(){return new Vw};function Xw(){this.g=new Iw}Xw.prototype.parseInit=function(){};Xw.prototype.setSequenceMode=function(){};Xw.prototype.parseMedia=function(a,b){a=$c(a);a=Yw(a);a=Fc(dd(a));return this.g.parseMedia(a,b)};function Yw(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}I("shaka.text.SrtTextParser",Xw);
959
+ Xw.srt2webvtt=Yw;Xw.prototype.parseMedia=Xw.prototype.parseMedia;Xw.prototype.setSequenceMode=Xw.prototype.setSequenceMode;Xw.prototype.parseInit=Xw.prototype.parseInit;Dd["text/srt"]=function(){return new Xw};function Zw(){}Zw.prototype.parseInit=function(){};Zw.prototype.setSequenceMode=function(){};
960
+ Zw.prototype.parseMedia=function(a){var b="",c="";a=$c(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=$w.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=ax.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(bx);else if("Style"==e){e=f.split(bx);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
961
+ [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={ee:e.ee},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=ax.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(bx);else if("Dialogue"==f){g=g.split(bx);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=cx(f.Start);var k=cx(f.End);g=new hc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.ee=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.ee}}(e)))&&dx(g,f);d.push(g)}return d};
962
+ function dx(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=ex(c))a.color=c;if(c=b.BackColour)if(c=ex(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=qc;a.textAlign="start";break;case 2:a.displayAlign=qc;a.textAlign=mc;break;case 3:a.displayAlign=qc;a.textAlign="end";
960
963
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=mc;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=mc;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
961
- function cx(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 ax(a){a=dx.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}I("shaka.text.SsaTextParser",Xw);Xw.prototype.parseMedia=Xw.prototype.parseMedia;Xw.prototype.setSequenceMode=Xw.prototype.setSequenceMode;Xw.prototype.parseInit=Xw.prototype.parseInit;
962
- var Yw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Zw=/^\s*([^:]+):\s*(.*)/,$w=/\s*,\s*/,dx=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Dd["text/x-ssa"]=function(){return new Xw};/*
964
+ function ex(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 cx(a){a=fx.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}I("shaka.text.SsaTextParser",Zw);Zw.prototype.parseMedia=Zw.prototype.parseMedia;Zw.prototype.setSequenceMode=Zw.prototype.setSequenceMode;Zw.prototype.parseInit=Zw.prototype.parseInit;
965
+ var $w=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,ax=/^\s*([^:]+):\s*(.*)/,bx=/\s*,\s*/,fx=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Dd["text/x-ssa"]=function(){return new Zw};/*
963
966
  @license
964
967
  EME Encryption Scheme Polyfill
965
968
  Copyright 2019 Google LLC
966
969
  SPDX-License-Identifier: Apache-2.0
967
970
  */
968
- function ex(){}var fx;function gx(){fx?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(fx=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=hx):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
969
- function hx(a,b){var c=this,d;return G(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,fx.call(c,a,b),2);d=e.h;if(ix(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=fx,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=jx;return e.return(jx.call(c,
971
+ function gx(){}var hx;function ix(){hx?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(hx=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=jx):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
972
+ function jx(a,b){var c=this,d;return F(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,hx.call(c,a,b),2);d=e.h;if(kx(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=hx,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=lx;return e.return(lx.call(c,
970
973
  a,b))})}
971
- function jx(a,b){var c=this,d,e,f,g,h,k,l,m,p,n;return G(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=kx(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=lx(h.videoCapabilities,d),l=lx(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 p=Error("Unsupported keySystem or supportedConfigurations."),
972
- p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return u(t,fx.call(c,a,e),2)}n=t.h;return t.return(new mx(n,d))})}function lx(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}I("EmeEncryptionSchemePolyfill",ex);ex.install=gx;function nx(){}var ox;
973
- function px(){ox?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(ox=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=qx):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
974
- function qx(a){var b=this,c,d,e;return G(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,ox.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&ix(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=ox,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
975
- navigator.mediaCapabilities.decodingInfo=rx;if(d){f.D(3);break}e=c;return u(f,sx(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(rx.call(b,a))}})}
976
- function rx(a){var b=this,c,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=kx(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):u(m,ox.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
977
- new mx(k.keySystemAccess,c);m.D(3);break}if(!a.keySystemConfiguration){m.D(3);break}l=k;return u(m,sx(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
978
- function sx(a){var b,c;return G(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
979
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}I("McEncryptionSchemePolyfill",nx);nx.install=px;function mx(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
980
- mx.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};mx.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
981
- function kx(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function ix(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}
982
- function tx(){}function xu(){gx();px()}I("EncryptionSchemePolyfills",tx);tx.install=xu;"undefined"!==typeof module&&module.exports&&(module.exports=tx);/*
974
+ function lx(a,b){var c=this,d,e,f,g,h,k,l,m,p,n;return F(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=mx(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=nx(h.videoCapabilities,d),l=nx(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 p=Error("Unsupported keySystem or supportedConfigurations."),
975
+ p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return u(t,hx.call(c,a,e),2)}n=t.h;return t.return(new ox(n,d))})}function nx(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}I("EmeEncryptionSchemePolyfill",gx);gx.install=ix;function px(){}var qx;
976
+ function rx(){qx?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(qx=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=sx):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
977
+ function sx(a){var b=this,c,d,e;return F(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,qx.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&kx(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=qx,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
978
+ navigator.mediaCapabilities.decodingInfo=tx;if(d){f.D(3);break}e=c;return u(f,ux(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(tx.call(b,a))}})}
979
+ function tx(a){var b=this,c,d,e,f,g,h,k,l;return F(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=mx(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):u(m,qx.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
980
+ new ox(k.keySystemAccess,c);m.D(3);break}if(!a.keySystemConfiguration){m.D(3);break}l=k;return u(m,ux(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
981
+ function ux(a){var b,c;return F(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
982
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}I("McEncryptionSchemePolyfill",px);px.install=rx;function ox(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
983
+ ox.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};ox.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
984
+ function mx(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function kx(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}
985
+ function vx(){}function zu(){ix();rx()}I("EncryptionSchemePolyfills",vx);vx.install=zu;"undefined"!==typeof module&&module.exports&&(module.exports=vx);/*
983
986
  @license
984
987
  Copyright 2013 Ali Al Dallal
985
988
 
@@ -1003,7 +1006,7 @@ function tx(){}function xu(){gx();px()}I("EncryptionSchemePolyfills",tx);tx.inst
1003
1006
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1004
1007
  SOFTWARE.
1005
1008
  */
1006
- for(var ux={ach:{u:"Lwo",A:"Acholi"},ady:{u:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",A:"Adyghe"},af:{u:"Afrikaans",A:"Afrikaans"},"af-NA":{u:"Afrikaans (Namibia)",A:"Afrikaans (Namibia)"},"af-ZA":{u:"Afrikaans (South Africa)",A:"Afrikaans (South Africa)"},ak:{u:"T\u0255\u0265i",A:"Akan"},ar:{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",A:"Arabic"},"ar-AR":{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",A:"Arabic"},"ar-MA":{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",A:"Arabic (Morocco)"},
1009
+ for(var wx={ach:{u:"Lwo",A:"Acholi"},ady:{u:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",A:"Adyghe"},af:{u:"Afrikaans",A:"Afrikaans"},"af-NA":{u:"Afrikaans (Namibia)",A:"Afrikaans (Namibia)"},"af-ZA":{u:"Afrikaans (South Africa)",A:"Afrikaans (South Africa)"},ak:{u:"T\u0255\u0265i",A:"Akan"},ar:{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",A:"Arabic"},"ar-AR":{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",A:"Arabic"},"ar-MA":{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",A:"Arabic (Morocco)"},
1007
1010
  "ar-SA":{u:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",A:"Arabic (Saudi Arabia)"},"ay-BO":{u:"Aymar aru",A:"Aymara"},az:{u:"Az\u0259rbaycan dili",A:"Azerbaijani"},"az-AZ":{u:"Az\u0259rbaycan dili",A:"Azerbaijani"},"be-BY":{u:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",A:"Belarusian"},bg:{u:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",A:"Bulgarian"},"bg-BG":{u:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
1008
1011
  A:"Bulgarian"},bn:{u:"\u09ac\u09be\u0982\u09b2\u09be",A:"Bengali"},"bn-IN":{u:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",A:"Bengali (India)"},"bn-BD":{u:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",A:"Bengali (Bangladesh)"},"bs-BA":{u:"Bosanski",A:"Bosnian"},ca:{u:"Catal\u00e0",A:"Catalan"},"ca-ES":{u:"Catal\u00e0",A:"Catalan"},cak:{u:"Maya Kaqchikel",A:"Kaqchikel"},"ck-US":{u:"\u13e3\u13b3\u13a9 (tsalagi)",A:"Cherokee"},cs:{u:"\u010ce\u0161tina",
1009
1012
  A:"Czech"},"cs-CZ":{u:"\u010ce\u0161tina",A:"Czech"},cy:{u:"Cymraeg",A:"Welsh"},"cy-GB":{u:"Cymraeg",A:"Welsh"},da:{u:"Dansk",A:"Danish"},"da-DK":{u:"Dansk",A:"Danish"},de:{u:"Deutsch",A:"German"},"de-AT":{u:"Deutsch (\u00d6sterreich)",A:"German (Austria)"},"de-DE":{u:"Deutsch (Deutschland)",A:"German (Germany)"},"de-CH":{u:"Deutsch (Schweiz)",A:"German (Switzerland)"},dsb:{u:"Dolnoserb\u0161\u0107ina",A:"Lower Sorbian"},el:{u:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",A:"Greek"},"el-GR":{u:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
@@ -1024,55 +1027,55 @@ A:"Slovak"},"sk-SK":{u:"Sloven\u010dina (Slovakia)",A:"Slovak (Slovakia)"},sl:{u
1024
1027
  sw:{u:"Kiswahili",A:"Swahili"},"sw-KE":{u:"Kiswahili",A:"Swahili (Kenya)"},ta:{u:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",A:"Tamil"},"ta-IN":{u:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",A:"Tamil"},te:{u:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",A:"Telugu"},"te-IN":{u:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",A:"Telugu"},tg:{u:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",A:"Tajik"},"tg-TJ":{u:"\u0442\u043e\u04b7\u0438\u043a\u04e3",A:"Tajik"},th:{u:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
1025
1028
  A:"Thai"},"th-TH":{u:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",A:"Thai (Thailand)"},tl:{u:"Filipino",A:"Filipino"},"tl-PH":{u:"Filipino",A:"Filipino"},tlh:{u:"tlhIngan-Hol",A:"Klingon"},tr:{u:"T\u00fcrk\u00e7e",A:"Turkish"},"tr-TR":{u:"T\u00fcrk\u00e7e",A:"Turkish"},"tt-RU":{u:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",A:"Tatar"},uk:{u:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",A:"Ukrainian"},"uk-UA":{u:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
1026
1029
  A:"Ukrainian"},ur:{u:"\u0627\u0631\u062f\u0648",A:"Urdu"},"ur-PK":{u:"\u0627\u0631\u062f\u0648",A:"Urdu"},uz:{u:"O'zbek",A:"Uzbek"},"uz-UZ":{u:"O'zbek",A:"Uzbek"},vi:{u:"Ti\u1ebfng Vi\u1ec7t",A:"Vietnamese"},"vi-VN":{u:"Ti\u1ebfng Vi\u1ec7t",A:"Vietnamese"},"xh-ZA":{u:"isiXhosa",A:"Xhosa"},yi:{u:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",A:"Yiddish"},"yi-DE":{u:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",A:"Yiddish (German)"},zh:{u:"\u4e2d\u6587",A:"Chinese"},"zh-HANS":{u:"\u4e2d\u6587\u7b80\u4f53",
1027
- A:"Chinese Simplified"},"zh-HANT":{u:"\u4e2d\u6587\u7e41\u9ad4",A:"Chinese Traditional"},"zh-CN":{u:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",A:"Chinese Simplified (China)"},"zh-HK":{u:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",A:"Chinese Traditional (Hong Kong)"},"zh-SG":{u:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",A:"Chinese Simplified (Singapore)"},"zh-TW":{u:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",A:"Chinese Traditional (Taiwan)"},"zu-ZA":{u:"isiZulu",A:"Zulu"}},vx=r(Object.keys(ux)),wx=vx.next();!wx.done;wx=
1028
- vx.next()){var xx=wx.value;ux[xx.toLowerCase()]=ux[xx]};function X(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new wf;this.localization=this.controls.ua;this.player=this.controls.dc();this.video=this.controls.Ab();this.adManager=this.player.td();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})}
1029
- X.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};I("shaka.ui.Element",X);X.prototype.release=X.prototype.release;function yx(a){return zx(a,"shaka-back-to-overflow-button")}function zx(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function Ax(a){a&&(a=zx(a,"shaka-chosen-item"))&&a.parentElement.focus()}function Bx(){var a=R("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function Y(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
1030
- function Cx(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function Dx(a,b){X.call(this,a,b);var c=this;this.i=R("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=R("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new N(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=Cx(e-d,!1)+" / "+Cx(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=
1031
- ""))});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.Aa();c.g.ka(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Aa(),this.g.ka(.5))}pa(Dx,X);Dx.prototype.release=function(){this.g.stop();this.g=null;X.prototype.release.call(this)};I("shaka.ui.AdCounter",Dx);function Ex(a,b){X.call(this,a,b);var c=this;this.g=R("div");this.g.classList.add("shaka-ad-position");Y(this.g,!1);this.parent.appendChild(this.g);this.h=R("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&Fx(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&Fx(c)});this.eventManager.o(this.adManager,"ad-started",function(){Fx(c)});this.eventManager.o(this.adManager,
1032
- "ad-stopped",function(){c.h.textContent="";Y(c.g,!1)});this.ad&&Fx(this)}pa(Ex,X);function Fx(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));Y(a.g,!0)}}I("shaka.ui.AdPosition",Ex);function Gx(a,b){X.call(this,a,b);var c=this;this.button=al();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();
1033
- 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()?Hx(c.controls):Ix(c.controls)});this.ad&&(this.g(),this.h())}pa(Gx,X);Gx.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.s.paused&&!a.X;return a};Gx.prototype.g=function(){};Gx.prototype.h=function(){};
1034
- I("shaka.ui.PlayButton",Gx);function Jx(a,b){Gx.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}pa(Jx,Gx);Jx.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};Jx.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};I("shaka.ui.BigPlayButton",Jx);function Kx(a,b){X.call(this,a,b);var c=this;this.j=this.controls.i;this.h=this.controls.g;this.i=[];this.g=R("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";Y(c.g,!0)}else Y(c.g,
1035
- !1)});this.eventManager.o(window,"click",function(){Y(c.g,!1)});Lx(this)}pa(Kx,X);Kx.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=[];X.prototype.release.call(this)};function Mx(a,b){Nx.set(a,b)}function Lx(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=Nx.get(c);d?a.i.push(d.create(a.g,a.controls)):Ua("Unrecognized context menu element:",c)}}I("shaka.ui.ContextMenu",Kx);
1036
- Kx.registerElement=Mx;var Nx=new Map;function Ox(a,b,c,d){X.call(this,a,b);var e=this;this.container=R("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ha(c));this.g=!1;this.bar=document.createElement("input");this.l=new N(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ha(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);
1037
- this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Mb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Mb()&&(e.g=!0,Px(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(Px(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,Px(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
1038
- "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}pa(Ox,X);q=Ox.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);X.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.R(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
1039
- q.setValue=function(a){this.g||(this.bar.value=a)};function Px(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}I("shaka.ui.RangeElement",Ox);Ox.prototype.setValue=Ox.prototype.setValue;Ox.prototype.getValue=Ox.prototype.getValue;Ox.prototype.changeTo=Ox.prototype.changeTo;Ox.prototype.onChangeEnd=Ox.prototype.onChangeEnd;
1040
- Ox.prototype.onChange=Ox.prototype.onChange;Ox.prototype.onChangeStart=Ox.prototype.onChangeStart;Ox.prototype.setRange=Ox.prototype.setRange;function Qx(a,b){Ox.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=R("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 N(function(){c.video.currentTime=c.getValue()});this.s=new N(function(){Rx(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Sx(c)});this.eventManager.o(this.localization,
1041
- "locale-changed",function(){return Sx(c)});this.eventManager.o(this.adManager,"ad-started",function(){Tx(c)||Y(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Tx(c)&&Y(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Ux(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Ux(c)});this.setValue(this.video.currentTime);this.update();Sx(this);this.ad&&Y(this.container,!1)}pa(Qx,Ox);q=Qx.prototype;
1042
- q.release=function(){this.h&&(this.h.stop(),this.h=null,this.s.stop(),this.s=null);Ox.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Re(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.R(.125))};q.onChangeEnd=function(){this.h.Aa();this.controls.Re(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
1043
- 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.Ja(),g=f.end-f.start;this.setRange(f.start,f.end);Tx(this)?(Y(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?
1030
+ A:"Chinese Simplified"},"zh-HANT":{u:"\u4e2d\u6587\u7e41\u9ad4",A:"Chinese Traditional"},"zh-CN":{u:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",A:"Chinese Simplified (China)"},"zh-HK":{u:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",A:"Chinese Traditional (Hong Kong)"},"zh-SG":{u:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",A:"Chinese Simplified (Singapore)"},"zh-TW":{u:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",A:"Chinese Traditional (Taiwan)"},"zu-ZA":{u:"isiZulu",A:"Zulu"}},xx=r(Object.keys(wx)),yx=xx.next();!yx.done;yx=
1031
+ xx.next()){var zx=yx.value;wx[zx.toLowerCase()]=wx[zx]};function X(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new wf;this.localization=this.controls.ua;this.player=this.controls.dc();this.video=this.controls.Ab();this.adManager=this.player.td();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})}
1032
+ X.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};I("shaka.ui.Element",X);X.prototype.release=X.prototype.release;function Ax(a){return Bx(a,"shaka-back-to-overflow-button")}function Bx(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function Cx(a){a&&(a=Bx(a,"shaka-chosen-item"))&&a.parentElement.focus()}function Dx(){var a=R("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function Y(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
1033
+ function Ex(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function Fx(a,b){X.call(this,a,b);var c=this;this.i=R("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=R("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new N(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=Ex(e-d,!1)+" / "+Ex(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=
1034
+ ""))});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.Aa();c.g.ka(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Aa(),this.g.ka(.5))}pa(Fx,X);Fx.prototype.release=function(){this.g.stop();this.g=null;X.prototype.release.call(this)};I("shaka.ui.AdCounter",Fx);function Gx(a,b){X.call(this,a,b);var c=this;this.g=R("div");this.g.classList.add("shaka-ad-position");Y(this.g,!1);this.parent.appendChild(this.g);this.h=R("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&Hx(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&Hx(c)});this.eventManager.o(this.adManager,"ad-started",function(){Hx(c)});this.eventManager.o(this.adManager,
1035
+ "ad-stopped",function(){c.h.textContent="";Y(c.g,!1)});this.ad&&Hx(this)}pa(Gx,X);function Hx(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));Y(a.g,!0)}}I("shaka.ui.AdPosition",Gx);function Ix(a,b){X.call(this,a,b);var c=this;this.button=cl();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();
1036
+ 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()?Jx(c.controls):Kx(c.controls)});this.ad&&(this.g(),this.h())}pa(Ix,X);Ix.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.s.paused&&!a.X;return a};Ix.prototype.g=function(){};Ix.prototype.h=function(){};
1037
+ I("shaka.ui.PlayButton",Ix);function Lx(a,b){Ix.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}pa(Lx,Ix);Lx.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};Lx.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};I("shaka.ui.BigPlayButton",Lx);function Mx(a,b){X.call(this,a,b);var c=this;this.j=this.controls.i;this.h=this.controls.g;this.i=[];this.g=R("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";Y(c.g,!0)}else Y(c.g,
1038
+ !1)});this.eventManager.o(window,"click",function(){Y(c.g,!1)});Nx(this)}pa(Mx,X);Mx.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=[];X.prototype.release.call(this)};function Ox(a,b){Px.set(a,b)}function Nx(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=Px.get(c);d?a.i.push(d.create(a.g,a.controls)):Ua("Unrecognized context menu element:",c)}}I("shaka.ui.ContextMenu",Mx);
1039
+ Mx.registerElement=Ox;var Px=new Map;function Qx(a,b,c,d){X.call(this,a,b);var e=this;this.container=R("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ha(c));this.g=!1;this.bar=document.createElement("input");this.l=new N(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ha(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);
1040
+ this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Mb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Mb()&&(e.g=!0,Rx(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(Rx(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,Rx(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
1041
+ "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}pa(Qx,X);q=Qx.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);X.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.R(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
1042
+ q.setValue=function(a){this.g||(this.bar.value=a)};function Rx(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}I("shaka.ui.RangeElement",Qx);Qx.prototype.setValue=Qx.prototype.setValue;Qx.prototype.getValue=Qx.prototype.getValue;Qx.prototype.changeTo=Qx.prototype.changeTo;Qx.prototype.onChangeEnd=Qx.prototype.onChangeEnd;
1043
+ Qx.prototype.onChange=Qx.prototype.onChange;Qx.prototype.onChangeStart=Qx.prototype.onChangeStart;Qx.prototype.setRange=Qx.prototype.setRange;function Sx(a,b){Qx.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=R("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 N(function(){c.video.currentTime=c.getValue()});this.s=new N(function(){Tx(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return Ux(c)});this.eventManager.o(this.localization,
1044
+ "locale-changed",function(){return Ux(c)});this.eventManager.o(this.adManager,"ad-started",function(){Vx(c)||Y(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Vx(c)&&Y(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;Wx(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];Wx(c)});this.setValue(this.video.currentTime);this.update();Ux(this);this.ad&&Y(this.container,!1)}pa(Sx,Qx);q=Sx.prototype;
1045
+ q.release=function(){this.h&&(this.h.stop(),this.h=null,this.s.stop(),this.s=null);Qx.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Te(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.R(.125))};q.onChangeEnd=function(){this.h.Aa();this.controls.Te(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
1046
+ 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.Ja(),g=f.end-f.start;this.setRange(f.start,f.end);Vx(this)?(Y(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?
1044
1047
  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()+")")):Y(this.container,!1)};
1045
- function Rx(a){if(a.i.length){for(var b=a.player.Ja(),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 "+
1046
- 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 Ux(a){Rx(a);var b=a.player.Ja();b=b.end-b.start;a.player.U()&&5<b&&a.s.ka(1)}function Tx(a){var b=a.player.Ja();b=b.end-b.start;return a.player.U()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function Sx(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}I("shaka.ui.SeekBar",Qx);function Vx(){}
1047
- Vx.prototype.create=function(a,b){return new Qx(a,b)};Qx.Factory=Vx;function Z(a,b,c,d){db.call(this);var e=this;this.P=!0;this.i=d;this.C=new so(c,a,this.i.castReceiverAppId,this.i.castAndroidReceiverCompatible);this.Za=!0;this.s=this.C.Ab();this.B=c;this.F=this.C.dc();this.sa=a;this.j=b;this.Xa=this.F.td();this.l=this.m=null;this.X=!1;this.G=[];this.vb=[];this.gb=!1;this.Z=new N(function(){e.j.style.cursor="none";e.gb=!1;Wx(e)});this.aa=new N(function(){e.g.removeAttribute("shown");e.I.R(2)});this.I=new N(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())Y(g.value,
1048
- !1)});this.La=new N(function(){e.Mb()&&Xx(e)});this.J=null;this.H=[];this.ua=Yx();this.h=new wf;this.configure(this.i);Zx(this);this.ba=new Set;$x(this);this.La.ka(.125);this.h.o(this.ua,"locale-changed",function(f){e.Xa.setLocale(f.locales[0])})}pa(Z,db);q=Z.prototype;
1049
- q.destroy=function(){var a=this;return G(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.D(2);break}return u(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.Z&&(a.Z.stop(),a.Z=null);a.aa&&(a.aa.stop(),a.aa=null);a.I&&(a.I.stop(),a.I=null);a.La&&(a.La.stop(),a.La=null);ay(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.C){b.D(4);break}return u(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.sa){b.D(6);break}return u(b,a.sa.destroy(),7);case 7:a.sa=
1050
- null;case 6:a.F=null,a.B=null,a.s=null,a.ua=null,a.ba.clear(),db.prototype.release.call(a),B(b)}})};function ay(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function by(a,b){cy.set(a,b)}q.pg=function(a){this.Za=a;$x(this)};q.kh=function(){Wx(this)};
1051
- q.configure=function(a){this.i=a;this.C.zf(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.fb&&(this.fb=null);this.Ya&&(this.Ya=null);this.g?(bl(this.g),ay(this)):(dy(this),ey(this));this.j.classList.add("shaka-video-container");this.B.classList.add("shaka-video");fy(this);this.i.addBigPlayButton&&gy(this);this.i.customContextMenu&&(this.Ya=new Kx(this.V,this),this.H.push(this.Ya));this.$||hy(this);this.$a=R("div");this.$a.classList.add("shaka-server-side-ad-container");
1052
- this.g.appendChild(this.$a);iy(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ha(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));jy(this);this.vb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Wx(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",
1053
- c)}};q.Ne=function(a){(this.P=a)?(this.j.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.j.removeAttribute("shaka-controls");Wx(this)};q.Yf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.Ne(!1)};q.getAd=function(){return this.m};q.Cg=function(){return this.C};q.Og=function(){return this.ua};q.dh=function(){return this.j};q.Ab=function(){return this.s};q.Ng=function(){return this.B};q.dc=function(){return this.F};q.Mg=function(){return this.sa};
1054
- q.Hg=function(){return this.g};q.Wg=function(){return this.$a};q.Eg=function(){return this.N};q.Fg=function(){return this.i};q.jh=function(){return this.X};q.Re=function(a){this.X=a};q.gh=function(){return this.Za};q.If=function(){return this.l?this.l.getValue():this.s.currentTime};q.Zf=function(a){this.J=a};q.nd=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.hc=function(){this.I.Aa()};
1048
+ function Tx(a){if(a.i.length){for(var b=a.player.Ja(),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 "+
1049
+ 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 Wx(a){Tx(a);var b=a.player.Ja();b=b.end-b.start;a.player.S()&&5<b&&a.s.ka(1)}function Vx(a){var b=a.player.Ja();b=b.end-b.start;return a.player.S()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function Ux(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}I("shaka.ui.SeekBar",Sx);function Xx(){}
1050
+ Xx.prototype.create=function(a,b){return new Sx(a,b)};Sx.Factory=Xx;function Z(a,b,c,d){db.call(this);var e=this;this.P=!0;this.i=d;this.C=new uo(c,a,this.i.castReceiverAppId,this.i.castAndroidReceiverCompatible);this.Za=!0;this.s=this.C.Ab();this.B=c;this.F=this.C.dc();this.sa=a;this.j=b;this.Xa=this.F.td();this.l=this.m=null;this.X=!1;this.G=[];this.vb=[];this.gb=!1;this.Z=new N(function(){e.j.style.cursor="none";e.gb=!1;Yx(e)});this.aa=new N(function(){e.g.removeAttribute("shown");e.I.R(2)});this.I=new N(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())Y(g.value,
1051
+ !1)});this.La=new N(function(){e.Mb()&&Zx(e)});this.J=null;this.H=[];this.ua=$x();this.h=new wf;this.configure(this.i);ay(this);this.ba=new Set;by(this);this.La.ka(.125);this.h.o(this.ua,"locale-changed",function(f){e.Xa.setLocale(f.locales[0])})}pa(Z,db);q=Z.prototype;
1052
+ q.destroy=function(){var a=this;return F(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.D(2);break}return u(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.Z&&(a.Z.stop(),a.Z=null);a.aa&&(a.aa.stop(),a.aa=null);a.I&&(a.I.stop(),a.I=null);a.La&&(a.La.stop(),a.La=null);cy(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.C){b.D(4);break}return u(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.sa){b.D(6);break}return u(b,a.sa.destroy(),7);case 7:a.sa=
1053
+ null;case 6:a.F=null,a.B=null,a.s=null,a.ua=null,a.ba.clear(),db.prototype.release.call(a),B(b)}})};function cy(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function dy(a,b){ey.set(a,b)}q.pg=function(a){this.Za=a;by(this)};q.kh=function(){Yx(this)};
1054
+ q.configure=function(a){this.i=a;this.C.Af(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.fb&&(this.fb=null);this.Ya&&(this.Ya=null);this.g?(dl(this.g),cy(this)):(fy(this),gy(this));this.j.classList.add("shaka-video-container");this.B.classList.add("shaka-video");hy(this);this.i.addBigPlayButton&&iy(this);this.i.customContextMenu&&(this.Ya=new Mx(this.V,this),this.H.push(this.Ya));this.$||jy(this);this.$a=R("div");this.$a.classList.add("shaka-server-side-ad-container");
1055
+ this.g.appendChild(this.$a);ky(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ha(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));ly(this);this.vb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));Yx(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",
1056
+ c)}};q.Pe=function(a){(this.P=a)?(this.j.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.j.removeAttribute("shaka-controls");Yx(this)};q.Yf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.Pe(!1)};q.getAd=function(){return this.m};q.Cg=function(){return this.C};q.Og=function(){return this.ua};q.dh=function(){return this.j};q.Ab=function(){return this.s};q.Ng=function(){return this.B};q.dc=function(){return this.F};q.Mg=function(){return this.sa};
1057
+ q.Hg=function(){return this.g};q.Wg=function(){return this.$a};q.Eg=function(){return this.N};q.Fg=function(){return this.i};q.jh=function(){return this.X};q.Te=function(a){this.X=a};q.gh=function(){return this.Za};q.Jf=function(){return this.l?this.l.getValue():this.s.currentTime};q.Zf=function(a){this.J=a};q.nd=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.hc=function(){this.I.Aa()};
1055
1058
  q.yd=function(){return document.fullscreenEnabled||this.B.webkitSupportsFullscreen?!0:!1};q.jc=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.B;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
1056
- function ky(a){var b,c;return G(function(d){switch(d.g){case 1:D(d,2);if(!document.fullscreenEnabled){b=a.B;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();d.D(4);break}if(!document.pictureInPictureElement){d.D(5);break}return u(d,document.exitPictureInPicture(),5);case 5:return u(d,a.j.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){d.D(4);break}D(d,9);return u(d,screen.orientation.lock("landscape"),11);case 11:va(d,4,2);break;case 9:wa(d,
1057
- 2);case 4:va(d,0);break;case 2:c=wa(d),a.dispatchEvent(new L("error",(new Map).set("detail",c))),B(d)}})}function ly(a){var b;return G(function(c){if(!document.fullscreenEnabled)return b=a.B,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.D(0);screen.orientation&&screen.orientation.unlock();return u(c,document.exitFullscreen(),0)})}q.Ye=function(){var a=this;return G(function(b){return a.jc()?u(b,ly(a),0):u(b,ky(a),0)})};
1058
- q.dg=function(){Y(this.K,!0);Y(this.N,!0);this.g.setAttribute("ad-active","true")};q.Lf=function(){Y(this.K,!1);Y(this.N,!1);this.g.removeAttribute("ad-active")};function Ix(a){a.P&&a.s.duration&&(a.F.wf(),a.s.paused&&!a.X?a.s.play():a.s.pause())}function Hx(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
1059
- function dy(a){a.g=R("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.s.duration&&(a.Mb()?a.J=Date.now():(my(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){ny(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&a.yd()&&a.Ye()})}
1060
- function gy(a){var b=R("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.fb=new Jx(b,a);a.H.push(a.fb)}function fy(a){var b=R("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function oy(a){a.K=R("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();Y(a.K,b);a.M.appendChild(a.K);b=new Ex(a.K,a);a.H.push(b);b=new Dx(a.K,a);a.H.push(b)}
1061
- function hy(a){a.$=R("div");a.$.classList.add("shaka-spinner-container");a.j.appendChild(a.$);var b=R("div");b.classList.add("shaka-spinner");a.$.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");b.setAttribute("fill",
1059
+ function my(a){var b,c;return F(function(d){switch(d.g){case 1:D(d,2);if(!document.fullscreenEnabled){b=a.B;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();d.D(4);break}if(!document.pictureInPictureElement){d.D(5);break}return u(d,document.exitPictureInPicture(),5);case 5:return u(d,a.j.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){d.D(4);break}D(d,9);return u(d,screen.orientation.lock("landscape"),11);case 11:va(d,4,2);break;case 9:wa(d,
1060
+ 2);case 4:va(d,0);break;case 2:c=wa(d),a.dispatchEvent(new L("error",(new Map).set("detail",c))),B(d)}})}function ny(a){var b;return F(function(c){if(!document.fullscreenEnabled)return b=a.B,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.D(0);screen.orientation&&screen.orientation.unlock();return u(c,document.exitFullscreen(),0)})}q.Ze=function(){var a=this;return F(function(b){return a.jc()?u(b,ny(a),0):u(b,my(a),0)})};
1061
+ q.dg=function(){Y(this.K,!0);Y(this.N,!0);this.g.setAttribute("ad-active","true")};q.Lf=function(){Y(this.K,!1);Y(this.N,!1);this.g.removeAttribute("ad-active")};function Kx(a){a.P&&a.s.duration&&(a.F.xf(),a.s.paused&&!a.X?a.s.play():a.s.pause())}function Jx(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
1062
+ function fy(a){a.g=R("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.s.duration&&(a.Mb()?a.J=Date.now():(oy(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){py(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&a.yd()&&a.Ze()})}
1063
+ function iy(a){var b=R("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.fb=new Lx(b,a);a.H.push(a.fb)}function hy(a){var b=R("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function qy(a){a.K=R("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();Y(a.K,b);a.M.appendChild(a.K);b=new Gx(a.K,a);a.H.push(b);b=new Fx(a.K,a);a.H.push(b)}
1064
+ function jy(a){a.$=R("div");a.$.classList.add("shaka-spinner-container");a.j.appendChild(a.$);var b=R("div");b.classList.add("shaka-spinner");a.$.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");b.setAttribute("fill",
1062
1065
  "none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
1063
- function iy(a){a.M=R("div");a.M.classList.add("shaka-bottom-controls");a.M.classList.add("shaka-no-propagation");a.g.appendChild(a.M);a.h.o(a.M,"click",function(d){d.target.closest(".shaka-overflow-button")||a.hc()});oy(a);a.V=R("div");a.V.classList.add("shaka-controls-button-panel");a.V.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.V.classList.add("shaka-tooltips-on");a.M.appendChild(a.V);for(var b=r(a.i.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,cy.get(c)?
1064
- (c=cy.get(c).create(a.V,a),a.H.push(c)):Ua("Unrecognized control panel element requested:",c)}function jy(a){if(a.i.addSeekBar)a.l=py.create(a.M,a),a.H.push(a.l);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function ey(a){a.N=R("div");a.N.classList.add("shaka-client-side-ad-container");Y(a.N,!1);a.h.o(a.N,"click",function(){ny(a)});a.j.appendChild(a.N)}
1065
- function Zx(a){a.h.o(a.F,"buffering",function(){a.P&&Y(a.$,a.F.Qc())});a.P&&Y(a.$,a.F.Qc());a.h.o(window,"keydown",function(b){qy(a,b)});a.h.o(window,"click",function(){return a.hc()});a.h.o(a,"submenuopen",function(){a.hc()});a.h.o(a.s,"play",function(){Wx(a)});a.h.o(a.s,"pause",function(){Wx(a)});a.h.o(a.j,"mousemove",function(b){my(a,b)});a.h.o(a.j,"touchmove",function(b){my(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){my(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.Z.Aa()});
1066
- a.h.o(a.C,"caststatuschanged",function(){$x(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)&&my(a,b);if(a.i.enableKeyboardPlaybackControls)switch(c=a.i.keyboardSeekDistance,b.key){case "ArrowLeft":a.l&&!d&&0<c&&(b.preventDefault(),ry(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&!d&&0<c&&(b.preventDefault(),ry(a,a.l.getValue()+c));break;case "Home":a.l&&
1067
- ry(a,a.F.Ja().start);break;case "End":a.l&&ry(a,a.F.Ja().end);break;case " ":e&&sy(a)}});a.h.o(a.j,"keyup",function(b){a.ba.delete(b.key)});a.h.o(a.Xa,"ad-started",function(b){a.m=b.ad;a.dg()});a.h.o(a.Xa,"ad-stopped",function(){a.m=null;a.Lf()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return G(function(b){return u(b,ty(a),0)})})}
1068
- function ty(a){return G(function(b){return a.s&&0!=a.s.readyState&&!a.C.oa()&&a.i.enableFullscreenOnRotation&&a.yd()?screen.orientation.type.includes("landscape")&&!a.jc()?u(b,ky(a),0):screen.orientation.type.includes("portrait")&&a.jc()?u(b,ly(a),0):b.D(0):b.return()})}
1069
- function my(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Wx(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.gb=!0,a.I.stop(),a.Mb()||(Xx(a),Wx(a)),a.Z.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.Z.R(3))}function uy(a){return window.matchMedia("hover: hover").matches?a.vb.some(function(b){return b.matches(":hover")}):!1}
1070
- function Wx(a){var b=a.m?a.m.isPaused():!1,c=a.s.paused&&!a.X,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.gb||d||uy(a)?(Xx(a),a.g.setAttribute("shown","true"),a.aa.stop()):a.aa.R(a.i.fadeDelay)}function ny(a){a.P&&(a.nd()?a.I.Aa():a.i.singleClickForPlayAndPause&&sy(a))}function sy(a){a.m&&a.m.isLinear()?Hx(a):Ix(a)}
1071
- function $x(a){var b=a.C.oa();a.dispatchEvent(new L("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Mb=function(){return this.P?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function ry(a,b){a.l.changeTo(b);a.Mb()&&Xx(a)}
1072
- function Xx(a){if(a.l)if(a.l.setValue(a.s.currentTime),a.l.update(),a.l.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 L("timeandseekrangeupdated"))}
1073
- function qy(a,b){a.ba.add(b.key);var c=a.nd();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Wx(a),a.h.o(window,"mousedown",function(){a.h.rc(window,"mousedown")}));"Escape"==b.key&&a.I.Aa();c&&a.ba.has("Tab")&&vy(a,b)}
1074
- function vy(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.ba.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
1075
- function Yx(){var a=new Tb("en");a.ha("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..."],
1066
+ function ky(a){a.M=R("div");a.M.classList.add("shaka-bottom-controls");a.M.classList.add("shaka-no-propagation");a.g.appendChild(a.M);a.h.o(a.M,"click",function(d){d.target.closest(".shaka-overflow-button")||a.hc()});qy(a);a.V=R("div");a.V.classList.add("shaka-controls-button-panel");a.V.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.V.classList.add("shaka-tooltips-on");a.M.appendChild(a.V);for(var b=r(a.i.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,ey.get(c)?
1067
+ (c=ey.get(c).create(a.V,a),a.H.push(c)):Ua("Unrecognized control panel element requested:",c)}function ly(a){if(a.i.addSeekBar)a.l=ry.create(a.M,a),a.H.push(a.l);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function gy(a){a.N=R("div");a.N.classList.add("shaka-client-side-ad-container");Y(a.N,!1);a.h.o(a.N,"click",function(){py(a)});a.j.appendChild(a.N)}
1068
+ function ay(a){a.h.o(a.F,"buffering",function(){a.P&&Y(a.$,a.F.Qc())});a.P&&Y(a.$,a.F.Qc());a.h.o(window,"keydown",function(b){sy(a,b)});a.h.o(window,"click",function(){return a.hc()});a.h.o(a,"submenuopen",function(){a.hc()});a.h.o(a.s,"play",function(){Yx(a)});a.h.o(a.s,"pause",function(){Yx(a)});a.h.o(a.j,"mousemove",function(b){oy(a,b)});a.h.o(a.j,"touchmove",function(b){oy(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){oy(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.Z.Aa()});
1069
+ a.h.o(a.C,"caststatuschanged",function(){by(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)&&oy(a,b);if(a.i.enableKeyboardPlaybackControls)switch(c=a.i.keyboardSeekDistance,b.key){case "ArrowLeft":a.l&&!d&&0<c&&(b.preventDefault(),ty(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&!d&&0<c&&(b.preventDefault(),ty(a,a.l.getValue()+c));break;case "Home":a.l&&
1070
+ ty(a,a.F.Ja().start);break;case "End":a.l&&ty(a,a.F.Ja().end);break;case " ":e&&uy(a)}});a.h.o(a.j,"keyup",function(b){a.ba.delete(b.key)});a.h.o(a.Xa,"ad-started",function(b){a.m=b.ad;a.dg()});a.h.o(a.Xa,"ad-stopped",function(){a.m=null;a.Lf()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return F(function(b){return u(b,vy(a),0)})})}
1071
+ function vy(a){return F(function(b){return a.s&&0!=a.s.readyState&&!a.C.oa()&&a.i.enableFullscreenOnRotation&&a.yd()?screen.orientation.type.includes("landscape")&&!a.jc()?u(b,my(a),0):screen.orientation.type.includes("portrait")&&a.jc()?u(b,ny(a),0):b.D(0):b.return()})}
1072
+ function oy(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Yx(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.gb=!0,a.I.stop(),a.Mb()||(Zx(a),Yx(a)),a.Z.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.Z.R(3))}function wy(a){return window.matchMedia("hover: hover").matches?a.vb.some(function(b){return b.matches(":hover")}):!1}
1073
+ function Yx(a){var b=a.m?a.m.isPaused():!1,c=a.s.paused&&!a.X,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.gb||d||wy(a)?(Zx(a),a.g.setAttribute("shown","true"),a.aa.stop()):a.aa.R(a.i.fadeDelay)}function py(a){a.P&&(a.nd()?a.I.Aa():a.i.singleClickForPlayAndPause&&uy(a))}function uy(a){a.m&&a.m.isLinear()?Jx(a):Kx(a)}
1074
+ function by(a){var b=a.C.oa();a.dispatchEvent(new L("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Mb=function(){return this.P?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function ty(a,b){a.l.changeTo(b);a.Mb()&&Zx(a)}
1075
+ function Zx(a){if(a.l)if(a.l.setValue(a.s.currentTime),a.l.update(),a.l.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 L("timeandseekrangeupdated"))}
1076
+ function sy(a,b){a.ba.add(b.key);var c=a.nd();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Yx(a),a.h.o(window,"mousedown",function(){a.h.rc(window,"mousedown")}));"Escape"==b.key&&a.I.Aa();c&&a.ba.has("Tab")&&xy(a,b)}
1077
+ function xy(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.ba.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
1078
+ function $x(){var a=new Tb("en");a.ha("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..."],
1076
1079
  ["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"],
1077
1080
  ["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"],
1078
1081
  ["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"],
@@ -1130,77 +1133,77 @@ a.ha("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
1130
1133
  ["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.ha("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],
1131
1134
  ["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"],
1132
1135
  ["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"],
1133
- ["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.yf(navigator.languages||[]);return a}I("shaka.ui.Controls",Z);Z.prototype.isOpaque=Z.prototype.Mb;Z.prototype.hideAdUI=Z.prototype.Lf;Z.prototype.showAdUI=Z.prototype.dg;
1134
- Z.prototype.toggleFullScreen=Z.prototype.Ye;Z.prototype.isFullScreenEnabled=Z.prototype.jc;Z.prototype.isFullScreenSupported=Z.prototype.yd;Z.prototype.hideSettingsMenus=Z.prototype.hc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.nd;Z.prototype.setLastTouchEventTime=Z.prototype.Zf;Z.prototype.getDisplayTime=Z.prototype.If;Z.prototype.isCastAllowed=Z.prototype.gh;Z.prototype.setSeeking=Z.prototype.Re;Z.prototype.isSeeking=Z.prototype.jh;Z.prototype.getConfig=Z.prototype.Fg;
1136
+ ["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.zf(navigator.languages||[]);return a}I("shaka.ui.Controls",Z);Z.prototype.isOpaque=Z.prototype.Mb;Z.prototype.hideAdUI=Z.prototype.Lf;Z.prototype.showAdUI=Z.prototype.dg;
1137
+ Z.prototype.toggleFullScreen=Z.prototype.Ze;Z.prototype.isFullScreenEnabled=Z.prototype.jc;Z.prototype.isFullScreenSupported=Z.prototype.yd;Z.prototype.hideSettingsMenus=Z.prototype.hc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.nd;Z.prototype.setLastTouchEventTime=Z.prototype.Zf;Z.prototype.getDisplayTime=Z.prototype.Jf;Z.prototype.isCastAllowed=Z.prototype.gh;Z.prototype.setSeeking=Z.prototype.Te;Z.prototype.isSeeking=Z.prototype.jh;Z.prototype.getConfig=Z.prototype.Fg;
1135
1138
  Z.prototype.getClientSideAdContainer=Z.prototype.Eg;Z.prototype.getServerSideAdContainer=Z.prototype.Wg;Z.prototype.getControlsContainer=Z.prototype.Hg;Z.prototype.getLocalPlayer=Z.prototype.Mg;Z.prototype.getPlayer=Z.prototype.dc;Z.prototype.getLocalVideo=Z.prototype.Ng;Z.prototype.getVideo=Z.prototype.Ab;Z.prototype.getVideoContainer=Z.prototype.dh;Z.prototype.getLocalization=Z.prototype.Og;Z.prototype.getCastProxy=Z.prototype.Cg;Z.prototype.getAd=Z.prototype.getAd;
1136
- Z.prototype.setEnabledNativeControls=Z.prototype.Yf;Z.prototype.setEnabledShakaControls=Z.prototype.Ne;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.kh;Z.prototype.allowCast=Z.prototype.pg;Z.registerSeekBar=function(a){py=a};Z.registerElement=by;Z.prototype.destroy=Z.prototype.destroy;var cy=new Map,py=new Vx;function wy(a,b){X.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=al();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=R("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");
1137
- this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);xy(this);this.eventManager.o(this.localization,"locale-updated",function(){yy(c)});this.eventManager.o(this.localization,"locale-changed",function(){yy(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&Y(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Y(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){Y(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.Zf(Date.now());
1138
- d.stopPropagation()});this.eventManager.o(this.g,"click",function(){zy(c)});yy(this);this.ad&&this.ad.isLinear()&&Y(this.g,!1)}pa(wy,X);wy.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=[];X.prototype.release.call(this)};function Ay(a,b){By.set(a,b)}
1139
- function xy(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,By.get(c)?(c=By.get(c),a.i.push(c.create(a.h,a.controls))):Ua("Unrecognized overflow menu element requested:",c)}function zy(a){if(a.controls.nd())a.controls.hc();else{Y(a.h,!0);Wx(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};gb(a.h.childNodes,b)&&hb(a.h.childNodes,b)[0].focus()}}function yy(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1140
- I("shaka.ui.OverflowMenu",wy);wy.registerElement=Ay;function Cy(){}Cy.prototype.create=function(a,b){return new wy(a,b)};by("overflow_menu",new Cy);var By=new Map;function Dy(a,b){X.call(this,a,b);var c=this;this.g=al();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=R("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");a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=R("span");a.appendChild(this.j);
1141
- this.i=R("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);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(){c.controls.Ab().webkitShowPlaybackTargetPicker()});a=this.controls.Ab();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
1142
- c.player.Jf()==an;Y(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){Fy(c)})}pa(Dy,X);function Fy(a){var b=a.controls.Ab();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function Ey(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}I("shaka.ui.AirPlayButton",Dy);function Gy(){}Gy.prototype.create=function(a,b){return new Dy(a,b)};Ay("airplay",new Gy);
1143
- by("airplay",new Gy);function Hy(a,b,c){this.i=a;this.h=Iy(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.qe()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,this.h);this.configure({});c.controls||a.Ue(b);b.ui=this;c.ui=this}q=Hy.prototype;q.destroy=function(){var a=this;return G(function(b){if(1==b.g)return a.g?u(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?u(b,a.i.destroy(),4):b.D(4);a.i=null;B(b)})};q.qe=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Uc()&&1<navigator.maxTouchPoints};
1144
- q.getConfiguration=function(){var a=Iy(this);Gl(a,this.h,Iy(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Hl(a,b));Gl(this.h,a,Iy(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new L("uiupdated"))};q.Gg=function(){return this.g};q.Mh=function(a){this.g.Ne(a)};
1145
- function Iy(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",
1139
+ Z.prototype.setEnabledNativeControls=Z.prototype.Yf;Z.prototype.setEnabledShakaControls=Z.prototype.Pe;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.kh;Z.prototype.allowCast=Z.prototype.pg;Z.registerSeekBar=function(a){ry=a};Z.registerElement=dy;Z.prototype.destroy=Z.prototype.destroy;var ey=new Map,ry=new Xx;function yy(a,b){X.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=cl();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=R("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");
1140
+ this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);zy(this);this.eventManager.o(this.localization,"locale-updated",function(){Ay(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ay(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&Y(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Y(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){Y(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.Zf(Date.now());
1141
+ d.stopPropagation()});this.eventManager.o(this.g,"click",function(){By(c)});Ay(this);this.ad&&this.ad.isLinear()&&Y(this.g,!1)}pa(yy,X);yy.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=[];X.prototype.release.call(this)};function Cy(a,b){Dy.set(a,b)}
1142
+ function zy(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,Dy.get(c)?(c=Dy.get(c),a.i.push(c.create(a.h,a.controls))):Ua("Unrecognized overflow menu element requested:",c)}function By(a){if(a.controls.nd())a.controls.hc();else{Y(a.h,!0);Yx(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};gb(a.h.childNodes,b)&&hb(a.h.childNodes,b)[0].focus()}}function Ay(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1143
+ I("shaka.ui.OverflowMenu",yy);yy.registerElement=Cy;function Ey(){}Ey.prototype.create=function(a,b){return new yy(a,b)};dy("overflow_menu",new Ey);var Dy=new Map;function Fy(a,b){X.call(this,a,b);var c=this;this.g=cl();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=R("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");a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=R("span");a.appendChild(this.j);
1144
+ this.i=R("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);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(){c.controls.Ab().webkitShowPlaybackTargetPicker()});a=this.controls.Ab();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
1145
+ c.player.pe()==cn;Y(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){Hy(c)})}pa(Fy,X);function Hy(a){var b=a.controls.Ab();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function Gy(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}I("shaka.ui.AirPlayButton",Fy);function Iy(){}Iy.prototype.create=function(a,b){return new Fy(a,b)};Cy("airplay",new Iy);
1146
+ dy("airplay",new Iy);function Jy(a,b,c){this.i=a;this.h=Ky(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.se()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,this.h);this.configure({});c.controls||a.We(b);b.ui=this;c.ui=this}q=Jy.prototype;q.destroy=function(){var a=this;return F(function(b){if(1==b.g)return a.g?u(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?u(b,a.i.destroy(),4):b.D(4);a.i=null;B(b)})};q.se=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Uc()&&1<navigator.maxTouchPoints};
1147
+ q.getConfiguration=function(){var a=Ky(this);Il(a,this.h,Ky(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Jl(a,b));Il(this.h,a,Ky(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new L("uiupdated"))};q.Gg=function(){return this.g};q.Mh=function(a){this.g.Pe(a)};
1148
+ function Ky(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",
1146
1149
  "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:"",castAndroidReceiverCompatible:!1,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)"},
1147
- trackLabelFormat:Jy,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.qe()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1148
- function Ky(){var a,b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A;return G(function(E){switch(E.g){case 1:mu();if(!qm())return Ly("shaka-ui-load-failed",My),E.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");if(!b.length&&!a.length){E.D(2);break}if(b.length&&!a.length){d=r(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,!f.ui){g=document.createElement("div");h=f.parentElement;
1149
- h.replaceChild(g,f);g.appendChild(f);k=null;l=r(c);for(m=l.next();!m.done;m=l.next())if(p=m.value,p.parentElement==g){k=p;break}k||(k=document.createElement("canvas"),k.classList.add("shaka-canvas-container"),g.appendChild(k));Ny(g,f,k)}E.D(2);break}n=r(a);t=n.next();case 4:if(t.done){E.D(2);break}v=t.value;if(v.ui){E.D(5);break}y=null;w=r(b);for(e=w.next();!e.done;e=w.next())if(x=e.value,x.parentElement==v){y=x;break}y||(y=document.createElement("video"),y.setAttribute("playsinline",""),v.appendChild(y));
1150
- C=null;z=r(c);for(m=z.next();!m.done;m=z.next())if(A=m.value,A.parentElement==v){C=A;break}C||(C=document.createElement("canvas"),C.classList.add("shaka-canvas-container"),v.appendChild(C));D(E,7);return u(E,Ny(v,y,C),9);case 9:va(E,5);break;case 7:return wa(E),Ly("shaka-ui-load-failed",Oy),E.return();case 5:t=n.next();E.D(4);break;case 2:Ly("shaka-ui-loaded"),B(E)}})}function Ly(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
1151
- function Ny(a,b,c){var d,e,f,g,h,k,l,m,p;return G(function(n){switch(n.g){case 1:d=new S(b);e=new Hy(d,a,b);d.rf(c);f="";g=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(f=a.dataset.shakaPlayerCastReceiverId,g="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(f=b.dataset.shakaPlayerCastReceiverId,g="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);f.length&&e.configure({castReceiverAppId:f,castAndroidReceiverCompatible:g});
1152
- b.controls&&e.g.Yf(!0);if(h=b.getAttribute("src"))k=document.createElement("source"),k.setAttribute("src",h),b.appendChild(k),b.removeAttribute("src");l=r(b.querySelectorAll("source"));m=l.next();case 2:if(m.done){n.D(0);break}p=m.value;D(n,5);return u(n,e.g.dc().load(p.getAttribute("src")),7);case 7:n.D(0);break;case 5:wa(n);case 3:m=l.next(),n.D(2)}})}I("shaka.ui.Overlay",Hy);Hy.prototype.setEnabled=Hy.prototype.Mh;Hy.prototype.getControls=Hy.prototype.Gg;Hy.prototype.configure=Hy.prototype.configure;
1153
- Hy.prototype.getConfiguration=Hy.prototype.getConfiguration;Hy.prototype.isMobile=Hy.prototype.qe;Hy.prototype.destroy=Hy.prototype.destroy;var Jy=0;Hy.TrackLabelFormat={LANGUAGE:Jy,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var My=0,Oy=1;Hy.FailReasonCode={NO_BROWSER_SUPPORT:My,PLAYER_FAILED_TO_LOAD:Oy};"complete"==document.readyState?G(function(a){if(1==a.g)return u(a,Promise.resolve(),2);Ky();B(a)}):window.addEventListener("load",Ky);function Py(a,b,c,d,e,f,g){function h(z,A){return z+": "+A}function k(z){return"variant"==z.type?z.audioRoles?z.audioRoles.join(", "):void 0:z.roles.join(", ")}var l=a.find(function(z){return 1==z.active}),m=yx(b);bl(b);b.appendChild(m);m=new Map;for(var p=r(a),n=p.next();!n.done;n=p.next())n=n.value,m.has(n.language)||m.set(n.language,new Set),m.get(n.language).add(k(n));m=new Set;l=l?h(l.language,k(l)):"";p={};a=r(a);for(n=a.next();!n.done;p={Va:p.Va},n=a.next()){p.Va=n.value;n=p.Va.language;var t=
1154
- p.Va.forced,v=f.resolve(Yb.jg),y=k(p.Va),w=h(n,y);if(!m.has(w)){m.add(w);var x=al();x.addEventListener("click",function(z){return function(){c(z.Va)}}(p));var C=R("span");x.appendChild(C);C.textContent=Qy(n,f);switch(g){case Jy:t&&(C.textContent+=" ("+v+")");break;case 1:y?C.textContent=y:(Ua("Track #"+p.Va.id+" does not have a role, but the UI is configured to only show role."),C.textContent="?");t&&(C.textContent+=" ("+v+")");break;case 2:y&&(C.textContent+=": "+y);t&&(C.textContent+=" ("+v+")");
1155
- break;case 3:p.Va.label?C.textContent=p.Va.label:(Ua("Track #"+p.Va.id+" does not have a label, but the UI is configured to only show labels."),C.textContent="?")}d&&w==l&&(x.appendChild(Bx()),C.classList.add("shaka-chosen-item"),x.ariaSelected="true",e.textContent=C.textContent);b.appendChild(x)}}}
1156
- function Qy(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=Pb(a);return a in ux?ux[a].u:c in ux?ux[c].u+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function Ry(a,b,c){X.call(this,a,b);var d=this;Sy(this,c);Ty(this);Uy(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new L("submenuopen")),Y(d.menu,!0),Ax(d.menu)):Y(d.menu,!1)})}pa(Ry,X);
1157
- function Sy(a,b){a.button=al();a.button.classList.add("shaka-overflow-button");a.icon=R("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=R("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=R("span");b.appendChild(a.nameSpan);a.currentSelection=R("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
1158
- function Ty(a){a.menu=R("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=al();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.hc()});var b=R("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1159
- R("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function Uy(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}Y(a.parent,!0);gb(a.parent.childNodes,b)&&hb(a.parent.childNodes,b)[0].focus();Wx(a.controls)}))}I("shaka.ui.SettingsMenu",Ry);function Vy(a,b){Ry.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(){Wy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Wy(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Qa().length;Y(c.button,d);Xy(c)});this.eventManager.o(this.player,"variantchanged",
1160
- function(){Xy(c)});Wy(this);Xy(this)}pa(Vy,Ry);function Xy(a){var b=a.player.Qa();Py(b,a.menu,function(c){a.player.Nd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);Ax(a.menu);a.controls.dispatchEvent(new L("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
1161
- function Wy(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")}I("shaka.ui.AudioLanguageSelection",Vy);function Yy(){}Yy.prototype.create=function(a,b){return new Vy(a,b)};Ay("language",new Yy);by("language",new Yy);function Zy(a,b){X.call(this,a,b);var c=this;this.h=this.controls.C;this.g=al();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=R("span");a.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");
1162
- a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);$y(this);az(this);this.eventManager.o(this.localization,"locale-updated",function(){$y(c)});this.eventManager.o(this.localization,"locale-changed",function(){$y(c)});this.eventManager.o(this.g,"click",function(){bz(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){az(c)})}pa(Zy,X);
1163
- function bz(a){var b;G(function(c){if(1==c.g){if(a.h.oa())return a.h.eg(),c.D(0);D(c,3);a.g.disabled=!0;return u(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=wa(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));B(c)})}function az(a){var b=a.h.vf()&&a.controls.Za,c=a.h.oa();Y(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");cz(a)}
1164
- function cz(a){a.j.textContent=a.h.oa()?a.h.Kd():a.localization.resolve("OFF")}function $y(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");cz(a)}I("shaka.ui.CastButton",Zy);function dz(){}dz.prototype.create=function(a,b){return new Zy(a,b)};Ay("cast",new dz);by("cast",new dz);function ez(a,b){X.call(this,a,b);var c=this;this.g=al();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);fz(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){fz(c)});this.eventManager.o(this.localization,"locale-changed",function(){fz(c)});
1165
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.yb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.$e(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(ez,X);function fz(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}I("shaka.ui.FastForwardButton",ez);function gz(){}gz.prototype.create=function(a,b){return new ez(a,b)};by("fast_forward",new gz);function hz(a,b){X.call(this,a,b);var c=this;this.h=this.controls.B;this.g=al();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");iz(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);jz(this);this.eventManager.o(this.localization,"locale-updated",function(){jz(c)});this.eventManager.o(this.localization,"locale-changed",function(){jz(c)});this.eventManager.o(this.g,"click",function(){return G(function(d){return u(d,
1166
- c.controls.Ye(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.jc()?"fullscreen_exit":"fullscreen";jz(c)});this.eventManager.o(this.h,"loadedmetadata",function(){iz(c)});this.eventManager.o(this.h,"loadeddata",function(){iz(c)})}pa(hz,X);function iz(a){a.controls.yd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function jz(a){a.g.ariaLabel=a.localization.resolve(a.controls.jc()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
1167
- I("shaka.ui.FullscreenButton",hz);function kz(){}kz.prototype.create=function(a,b){return new hz(a,b)};by("fullscreen",new kz);function lz(a,b){X.call(this,a,b);var c=this;this.g=al();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=R("span");this.l.classList.add("shaka-current-selection-span");
1168
- a.appendChild(this.l);this.g.appendChild(a);mz(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){mz(c)});this.eventManager.o(this.localization,"locale-changed",function(){mz(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Aa();c.h.ka(1)});this.m=this.video.loop;this.h=new N(function(){c.m!=c.video.loop&&(mz(c),c.m=c.video.loop)});this.h.ka(1)}pa(lz,X);lz.prototype.release=function(){this.h.stop();this.h=null;X.prototype.release.call(this)};
1169
- function mz(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")}I("shaka.ui.LoopButton",lz);function nz(){}nz.prototype.create=function(a,b){return new lz(a,b)};Ay("loop",new nz);by("loop",new nz);Mx("loop",new nz);function oz(a,b){X.call(this,a,b);var c=this;this.g=al();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);pz(this);qz(this);this.eventManager.o(this.localization,"locale-updated",function(){pz(c)});this.eventManager.o(this.localization,"locale-changed",function(){pz(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});
1170
- this.eventManager.o(this.video,"volumechange",function(){pz(c);qz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){pz(c);qz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){pz(c);qz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;pz(c);qz(c)})}pa(oz,X);function pz(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1171
- function qz(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}I("shaka.ui.MuteButton",oz);function rz(){}rz.prototype.create=function(a,b){return new oz(a,b)};by("mute",new rz);function sz(a,b){X.call(this,a,b);var c=this;this.l=this.controls.B;this.g=al();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
1172
- R("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);tz(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||Y(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){tz(c)});this.eventManager.o(this.localization,"locale-changed",function(){tz(c)});this.eventManager.o(this.g,"click",function(){uz(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent=
1150
+ trackLabelFormat:Ly,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.se()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1151
+ function My(){var a,b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,C,z,A;return F(function(E){switch(E.g){case 1:ou();if(!sm())return Ny("shaka-ui-load-failed",Oy),E.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");if(!b.length&&!a.length){E.D(2);break}if(b.length&&!a.length){d=r(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,!f.ui){g=document.createElement("div");h=f.parentElement;
1152
+ h.replaceChild(g,f);g.appendChild(f);k=null;l=r(c);for(m=l.next();!m.done;m=l.next())if(p=m.value,p.parentElement==g){k=p;break}k||(k=document.createElement("canvas"),k.classList.add("shaka-canvas-container"),g.appendChild(k));Py(g,f,k)}E.D(2);break}n=r(a);t=n.next();case 4:if(t.done){E.D(2);break}v=t.value;if(v.ui){E.D(5);break}y=null;w=r(b);for(e=w.next();!e.done;e=w.next())if(x=e.value,x.parentElement==v){y=x;break}y||(y=document.createElement("video"),y.setAttribute("playsinline",""),v.appendChild(y));
1153
+ C=null;z=r(c);for(m=z.next();!m.done;m=z.next())if(A=m.value,A.parentElement==v){C=A;break}C||(C=document.createElement("canvas"),C.classList.add("shaka-canvas-container"),v.appendChild(C));D(E,7);return u(E,Py(v,y,C),9);case 9:va(E,5);break;case 7:return wa(E),Ny("shaka-ui-load-failed",Qy),E.return();case 5:t=n.next();E.D(4);break;case 2:Ny("shaka-ui-loaded"),B(E)}})}function Ny(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
1154
+ function Py(a,b,c){var d,e,f,g,h,k,l,m,p;return F(function(n){switch(n.g){case 1:d=new S(b);e=new Jy(d,a,b);d.tf(c);f="";g=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(f=a.dataset.shakaPlayerCastReceiverId,g="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(f=b.dataset.shakaPlayerCastReceiverId,g="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);f.length&&e.configure({castReceiverAppId:f,castAndroidReceiverCompatible:g});
1155
+ b.controls&&e.g.Yf(!0);if(h=b.getAttribute("src"))k=document.createElement("source"),k.setAttribute("src",h),b.appendChild(k),b.removeAttribute("src");l=r(b.querySelectorAll("source"));m=l.next();case 2:if(m.done){n.D(0);break}p=m.value;D(n,5);return u(n,e.g.dc().load(p.getAttribute("src")),7);case 7:n.D(0);break;case 5:wa(n);case 3:m=l.next(),n.D(2)}})}I("shaka.ui.Overlay",Jy);Jy.prototype.setEnabled=Jy.prototype.Mh;Jy.prototype.getControls=Jy.prototype.Gg;Jy.prototype.configure=Jy.prototype.configure;
1156
+ Jy.prototype.getConfiguration=Jy.prototype.getConfiguration;Jy.prototype.isMobile=Jy.prototype.se;Jy.prototype.destroy=Jy.prototype.destroy;var Ly=0;Jy.TrackLabelFormat={LANGUAGE:Ly,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var Oy=0,Qy=1;Jy.FailReasonCode={NO_BROWSER_SUPPORT:Oy,PLAYER_FAILED_TO_LOAD:Qy};"complete"==document.readyState?F(function(a){if(1==a.g)return u(a,Promise.resolve(),2);My();B(a)}):window.addEventListener("load",My);function Ry(a,b,c,d,e,f,g){function h(z,A){return z+": "+A}function k(z){return"variant"==z.type?z.audioRoles?z.audioRoles.join(", "):void 0:z.roles.join(", ")}var l=a.find(function(z){return 1==z.active}),m=Ax(b);dl(b);b.appendChild(m);m=new Map;for(var p=r(a),n=p.next();!n.done;n=p.next())n=n.value,m.has(n.language)||m.set(n.language,new Set),m.get(n.language).add(k(n));m=new Set;l=l?h(l.language,k(l)):"";p={};a=r(a);for(n=a.next();!n.done;p={Va:p.Va},n=a.next()){p.Va=n.value;n=p.Va.language;var t=
1157
+ p.Va.forced,v=f.resolve(Yb.jg),y=k(p.Va),w=h(n,y);if(!m.has(w)){m.add(w);var x=cl();x.addEventListener("click",function(z){return function(){c(z.Va)}}(p));var C=R("span");x.appendChild(C);C.textContent=Sy(n,f);switch(g){case Ly:t&&(C.textContent+=" ("+v+")");break;case 1:y?C.textContent=y:(Ua("Track #"+p.Va.id+" does not have a role, but the UI is configured to only show role."),C.textContent="?");t&&(C.textContent+=" ("+v+")");break;case 2:y&&(C.textContent+=": "+y);t&&(C.textContent+=" ("+v+")");
1158
+ break;case 3:p.Va.label?C.textContent=p.Va.label:(Ua("Track #"+p.Va.id+" does not have a label, but the UI is configured to only show labels."),C.textContent="?")}d&&w==l&&(x.appendChild(Dx()),C.classList.add("shaka-chosen-item"),x.ariaSelected="true",e.textContent=C.textContent);b.appendChild(x)}}}
1159
+ function Sy(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=Pb(a);return a in wx?wx[a].u:c in wx?wx[c].u+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function Ty(a,b,c){X.call(this,a,b);var d=this;Uy(this,c);Vy(this);Wy(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new L("submenuopen")),Y(d.menu,!0),Cx(d.menu)):Y(d.menu,!1)})}pa(Ty,X);
1160
+ function Uy(a,b){a.button=cl();a.button.classList.add("shaka-overflow-button");a.icon=R("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=R("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=R("span");b.appendChild(a.nameSpan);a.currentSelection=R("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
1161
+ function Vy(a){a.menu=R("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=cl();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.hc()});var b=R("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1162
+ R("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function Wy(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}Y(a.parent,!0);gb(a.parent.childNodes,b)&&hb(a.parent.childNodes,b)[0].focus();Yx(a.controls)}))}I("shaka.ui.SettingsMenu",Ty);function Xy(a,b){Ty.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(){Yy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Yy(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Qa().length;Y(c.button,d);Zy(c)});this.eventManager.o(this.player,"variantchanged",
1163
+ function(){Zy(c)});Yy(this);Zy(this)}pa(Xy,Ty);function Zy(a){var b=a.player.Qa();Ry(b,a.menu,function(c){a.player.Nd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);Cx(a.menu);a.controls.dispatchEvent(new L("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
1164
+ function Yy(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")}I("shaka.ui.AudioLanguageSelection",Xy);function $y(){}$y.prototype.create=function(a,b){return new Xy(a,b)};Cy("language",new $y);dy("language",new $y);function az(a,b){X.call(this,a,b);var c=this;this.h=this.controls.C;this.g=cl();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=R("span");a.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");
1165
+ a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);bz(this);cz(this);this.eventManager.o(this.localization,"locale-updated",function(){bz(c)});this.eventManager.o(this.localization,"locale-changed",function(){bz(c)});this.eventManager.o(this.g,"click",function(){dz(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){cz(c)})}pa(az,X);
1166
+ function dz(a){var b;F(function(c){if(1==c.g){if(a.h.oa())return a.h.eg(),c.D(0);D(c,3);a.g.disabled=!0;return u(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=wa(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));B(c)})}function cz(a){var b=a.h.wf()&&a.controls.Za,c=a.h.oa();Y(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");ez(a)}
1167
+ function ez(a){a.j.textContent=a.h.oa()?a.h.Kd():a.localization.resolve("OFF")}function bz(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");ez(a)}I("shaka.ui.CastButton",az);function fz(){}fz.prototype.create=function(a,b){return new az(a,b)};Cy("cast",new fz);dy("cast",new fz);function gz(a,b){X.call(this,a,b);var c=this;this.g=cl();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);hz(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){hz(c)});this.eventManager.o(this.localization,"locale-changed",function(){hz(c)});
1168
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.yb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.bf(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(gz,X);function hz(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}I("shaka.ui.FastForwardButton",gz);function iz(){}iz.prototype.create=function(a,b){return new gz(a,b)};dy("fast_forward",new iz);function jz(a,b){X.call(this,a,b);var c=this;this.h=this.controls.B;this.g=cl();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");kz(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);lz(this);this.eventManager.o(this.localization,"locale-updated",function(){lz(c)});this.eventManager.o(this.localization,"locale-changed",function(){lz(c)});this.eventManager.o(this.g,"click",function(){return F(function(d){return u(d,
1169
+ c.controls.Ze(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.jc()?"fullscreen_exit":"fullscreen";lz(c)});this.eventManager.o(this.h,"loadedmetadata",function(){kz(c)});this.eventManager.o(this.h,"loadeddata",function(){kz(c)})}pa(jz,X);function kz(a){a.controls.yd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function lz(a){a.g.ariaLabel=a.localization.resolve(a.controls.jc()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
1170
+ I("shaka.ui.FullscreenButton",jz);function mz(){}mz.prototype.create=function(a,b){return new jz(a,b)};dy("fullscreen",new mz);function nz(a,b){X.call(this,a,b);var c=this;this.g=cl();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=R("span");this.l.classList.add("shaka-current-selection-span");
1171
+ a.appendChild(this.l);this.g.appendChild(a);oz(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){oz(c)});this.eventManager.o(this.localization,"locale-changed",function(){oz(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Aa();c.h.ka(1)});this.m=this.video.loop;this.h=new N(function(){c.m!=c.video.loop&&(oz(c),c.m=c.video.loop)});this.h.ka(1)}pa(nz,X);nz.prototype.release=function(){this.h.stop();this.h=null;X.prototype.release.call(this)};
1172
+ function oz(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")}I("shaka.ui.LoopButton",nz);function pz(){}pz.prototype.create=function(a,b){return new nz(a,b)};Cy("loop",new pz);dy("loop",new pz);Ox("loop",new pz);function qz(a,b){X.call(this,a,b);var c=this;this.g=cl();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);rz(this);sz(this);this.eventManager.o(this.localization,"locale-updated",function(){rz(c)});this.eventManager.o(this.localization,"locale-changed",function(){rz(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});
1173
+ this.eventManager.o(this.video,"volumechange",function(){rz(c);sz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){rz(c);sz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){rz(c);sz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;rz(c);sz(c)})}pa(qz,X);function rz(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1174
+ function sz(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}I("shaka.ui.MuteButton",qz);function tz(){}tz.prototype.create=function(a,b){return new qz(a,b)};dy("mute",new tz);function uz(a,b){X.call(this,a,b);var c=this;this.l=this.controls.B;this.g=cl();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=R("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
1175
+ R("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);vz(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||Y(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){vz(c)});this.eventManager.o(this.localization,"locale-changed",function(){vz(c)});this.eventManager.o(this.g,"click",function(){wz(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent=
1173
1176
  "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(d){d.newStatus?document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&Y(c.g,!1):
1174
- document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&Y(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){vz(c)})}pa(sz,X);function uz(a){var b;G(function(c){if(1==c.g)return D(c,2),document.pictureInPictureElement?u(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),u(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return va(c,0);b=wa(c);a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));B(c)})}
1175
- function tz(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")}
1176
- function vz(a){G(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return Y(a.g,!1),b.D(0);if(!a.player||!a.player.ic())return Y(a.g,!0),b.D(0);Y(a.g,!1);return document.pictureInPictureElement?u(b,document.exitPictureInPicture(),0):b.D(0)})}I("shaka.ui.PipButton",sz);function wz(){}wz.prototype.create=function(a,b){return new sz(a,b)};Ay("picture_in_picture",new wz);by("picture_in_picture",new wz);Mx("picture_in_picture",new wz);function xz(a,b){Ry.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(){yz(c)});this.eventManager.o(this.localization,"locale-changed",function(){yz(c)});this.eventManager.o(this.player,"ratechange",function(){zz(c,c.player.yb())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
1177
- "x",d]}));yz(this);Az(this);zz(this,this.player.yb())}pa(xz,Ry);function yz(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")}
1178
- function zz(a,b){var c=zx(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(Bx()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1179
- "x")}function Az(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={yc:b.yc},d=c.next()){b.yc=d.value;d=al();var e=R("span");e.textContent=b.yc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.yc);a.video.defaultPlaybackRate=a.g.get(f.yc)}}(b));a.menu.appendChild(d)}Ax(a.menu)}I("shaka.ui.PlaybackRateSelection",xz);function Bz(){}Bz.prototype.create=function(a,b){return new xz(a,b)};Ay("playback_rate",new Bz);by("playback_rate",new Bz);function Cz(a,b){X.call(this,a,b);var c=this;this.g=al();this.g.classList.add("shaka-current-time");Dz(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.U()&&(c.video.currentTime=c.player.Ja().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.X,e=c.controls.If(),f=c.video.duration,g=c.player.Ja(),h=g.end-g.start;c.player.U()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(Dz(c,"- "+Cx(e,f)),c.g.disabled=
1180
- !1):(Dz(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=Cx(e,d),f&&(e+=" / "+Cx(f,d)),Dz(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.U()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}pa(Cz,X);function Dz(a,b){b!=a.g.textContent&&(a.g.textContent=b)}I("shaka.ui.PresentationTimeTracker",Cz);function Ez(){}Ez.prototype.create=function(a,b){return new Cz(a,b)};by("time_and_duration",new Ez);function Fz(a,b){Ry.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(){Gz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Gz(c)});this.eventManager.o(this.player,"variantchanged",function(){Hz(c)});this.eventManager.o(this.player,"trackschanged",function(){Hz(c)});this.eventManager.o(this.player,
1181
- "abrstatuschanged",function(){Hz(c)});Hz(this)}pa(Fz,Ry);
1182
- function Hz(a){var b=a.player.Qa(),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(a.player.ic()?b.findIndex(function(m){return m.bandwidth==k.bandwidth}):b.findIndex(function(m){return m.height==k.height}))==l});a.player.ic()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=yx(a.menu);bl(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;
1183
- for(var e={},f=r(b),g=f.next();!g.done;e={Zb:e.Zb},g=f.next()){e.Zb=g.value;g=al();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.Zb;a.player.configure({abr:{enabled:!1}});a.player.Le(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=a.player.ic()?Math.round(e.Zb.bandwidth/1E3)+" kbits/s":e.Zb.height+"p";g.appendChild(h);d||e.Zb!=c||(g.ariaSelected="true",g.appendChild(Bx()),h.classList.add("shaka-chosen-item"),
1184
- a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=al();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});Hz(a)});a.g=R("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(Bx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",
1185
- a.currentSelection.textContent);a.menu.appendChild(e);Ax(a.menu);a.controls.dispatchEvent(new L("resolutionselectionupdated"));Gz(a)}
1186
- function Gz(a){var b=a.player.ic()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}I("shaka.ui.ResolutionSelection",Fz);function Iz(){}
1187
- Iz.prototype.create=function(a,b){return new Fz(a,b)};Ay("quality",new Iz);by("quality",new Iz);function Jz(a,b){X.call(this,a,b);var c=this;this.g=al();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);Kz(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){Kz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Kz(c)});
1188
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.yb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.$e(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(Jz,X);function Kz(a){a.g.ariaLabel=a.localization.resolve("REWIND")}I("shaka.ui.RewindButton",Jz);function Lz(){}Lz.prototype.create=function(a,b){return new Jz(a,b)};by("rewind",new Lz);function Mz(a,b){X.call(this,a,b);var c=this;this.j=R("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=R("div");this.h.classList.add("shaka-skip-ad-counter");Y(this.h,!1);this.j.appendChild(this.h);this.g=al();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;Y(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);Nz(this);this.i=new N(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1189
- d:(c.i.stop(),Y(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){Nz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Nz(c)});this.eventManager.o(this.adManager,"ad-started",function(){Oz(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),Y(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;Y(c.g,!1);Y(c.h,!1)});this.eventManager.o(this.g,
1190
- "click",function(){c.ad.skip()});this.ad&&Oz(this)}pa(Mz,X);Mz.prototype.release=function(){this.i.stop();this.i=null;X.prototype.release.call(this)};function Nz(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function Oz(a){a.ad.isSkippable()&&(Y(a.g,!0),Y(a.h,!0),a.h.textContent="",a.i.Aa(),a.i.ka(.5))}I("shaka.ui.SkipAdButton",Mz);function Pz(a,b){Gx.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()}pa(Pz,Gx);Pz.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};Pz.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)}};
1191
- I("shaka.ui.SmallPlayButton",Pz);function Qz(){}Qz.prototype.create=function(a,b){return new Pz(a,b)};by("play_pause",new Qz);function Rz(a,b){X.call(this,a,b);a=R("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}pa(Rz,X);I("shaka.ui.Spacer",Rz);function Sz(){}Sz.prototype.create=function(a,b){return new Rz(a,b)};by("spacer",new Sz);function Tz(a,b){function c(k){return Cx(h.h[k],!1)+" (m)"}function d(k){return Math.round(h.h[k]/1E3)+" (kbits/s)"}function e(k){return h.h[k].toFixed(2)+" (s)"}function f(k){return h.h[k]+" (frames)"}function g(k){return h.h[k]+" (px)"}X.call(this,a,b);var h=this;this.i=al();this.i.classList.add("shaka-statistics-button");this.j=R("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=R("label");a.classList.add("shaka-overflow-button-label");
1177
+ document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&Y(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){xz(c)})}pa(uz,X);function wz(a){var b;F(function(c){if(1==c.g)return D(c,2),document.pictureInPictureElement?u(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),u(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return va(c,0);b=wa(c);a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));B(c)})}
1178
+ function vz(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")}
1179
+ function xz(a){F(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return Y(a.g,!1),b.D(0);if(!a.player||!a.player.ic())return Y(a.g,!0),b.D(0);Y(a.g,!1);return document.pictureInPictureElement?u(b,document.exitPictureInPicture(),0):b.D(0)})}I("shaka.ui.PipButton",uz);function yz(){}yz.prototype.create=function(a,b){return new uz(a,b)};Cy("picture_in_picture",new yz);dy("picture_in_picture",new yz);Ox("picture_in_picture",new yz);function zz(a,b){Ty.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(){Az(c)});this.eventManager.o(this.localization,"locale-changed",function(){Az(c)});this.eventManager.o(this.player,"ratechange",function(){Bz(c,c.player.yb())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
1180
+ "x",d]}));Az(this);Cz(this);Bz(this,this.player.yb())}pa(zz,Ty);function Az(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")}
1181
+ function Bz(a,b){var c=Bx(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(Dx()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1182
+ "x")}function Cz(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={yc:b.yc},d=c.next()){b.yc=d.value;d=cl();var e=R("span");e.textContent=b.yc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.yc);a.video.defaultPlaybackRate=a.g.get(f.yc)}}(b));a.menu.appendChild(d)}Cx(a.menu)}I("shaka.ui.PlaybackRateSelection",zz);function Dz(){}Dz.prototype.create=function(a,b){return new zz(a,b)};Cy("playback_rate",new Dz);dy("playback_rate",new Dz);function Ez(a,b){X.call(this,a,b);var c=this;this.g=cl();this.g.classList.add("shaka-current-time");Fz(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.S()&&(c.video.currentTime=c.player.Ja().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.X,e=c.controls.Jf(),f=c.video.duration,g=c.player.Ja(),h=g.end-g.start;c.player.S()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(Fz(c,"- "+Ex(e,f)),c.g.disabled=
1183
+ !1):(Fz(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=Ex(e,d),f&&(e+=" / "+Ex(f,d)),Fz(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.S()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}pa(Ez,X);function Fz(a,b){b!=a.g.textContent&&(a.g.textContent=b)}I("shaka.ui.PresentationTimeTracker",Ez);function Gz(){}Gz.prototype.create=function(a,b){return new Ez(a,b)};dy("time_and_duration",new Gz);function Hz(a,b){Ty.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(){Iz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Iz(c)});this.eventManager.o(this.player,"variantchanged",function(){Jz(c)});this.eventManager.o(this.player,"trackschanged",function(){Jz(c)});this.eventManager.o(this.player,
1184
+ "abrstatuschanged",function(){Jz(c)});Jz(this)}pa(Hz,Ty);
1185
+ function Jz(a){var b=[];a.player.pe()!=cn&&(b=a.player.Qa());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(a.player.ic()?b.findIndex(function(m){return m.bandwidth==k.bandwidth}):b.findIndex(function(m){return m.height==k.height}))==l});a.player.ic()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=Ax(a.menu);dl(a.menu);
1186
+ a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e={Zb:e.Zb},g=f.next()){e.Zb=g.value;g=cl();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.Zb;a.player.configure({abr:{enabled:!1}});a.player.Ne(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=a.player.ic()?Math.round(e.Zb.bandwidth/1E3)+" kbits/s":e.Zb.height+"p";g.appendChild(h);d||e.Zb!=c||(g.ariaSelected=
1187
+ "true",g.appendChild(Dx()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=cl();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});Jz(a)});a.g=R("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(Dx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=
1188
+ a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);Cx(a.menu);a.controls.dispatchEvent(new L("resolutionselectionupdated"));Iz(a)}
1189
+ function Iz(a){var b=a.player.ic()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}I("shaka.ui.ResolutionSelection",Hz);function Kz(){}
1190
+ Kz.prototype.create=function(a,b){return new Hz(a,b)};Cy("quality",new Kz);dy("quality",new Kz);function Lz(a,b){X.call(this,a,b);var c=this;this.g=cl();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);Mz(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){Mz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Mz(c)});
1191
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.yb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.bf(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(Lz,X);function Mz(a){a.g.ariaLabel=a.localization.resolve("REWIND")}I("shaka.ui.RewindButton",Lz);function Nz(){}Nz.prototype.create=function(a,b){return new Lz(a,b)};dy("rewind",new Nz);function Oz(a,b){X.call(this,a,b);var c=this;this.j=R("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=R("div");this.h.classList.add("shaka-skip-ad-counter");Y(this.h,!1);this.j.appendChild(this.h);this.g=cl();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;Y(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);Pz(this);this.i=new N(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1192
+ d:(c.i.stop(),Y(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){Pz(c)});this.eventManager.o(this.localization,"locale-changed",function(){Pz(c)});this.eventManager.o(this.adManager,"ad-started",function(){Qz(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),Y(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;Y(c.g,!1);Y(c.h,!1)});this.eventManager.o(this.g,
1193
+ "click",function(){c.ad.skip()});this.ad&&Qz(this)}pa(Oz,X);Oz.prototype.release=function(){this.i.stop();this.i=null;X.prototype.release.call(this)};function Pz(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function Qz(a){a.ad.isSkippable()&&(Y(a.g,!0),Y(a.h,!0),a.h.textContent="",a.i.Aa(),a.i.ka(.5))}I("shaka.ui.SkipAdButton",Oz);function Rz(a,b){Ix.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()}pa(Rz,Ix);Rz.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};Rz.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)}};
1194
+ I("shaka.ui.SmallPlayButton",Rz);function Sz(){}Sz.prototype.create=function(a,b){return new Rz(a,b)};dy("play_pause",new Sz);function Tz(a,b){X.call(this,a,b);a=R("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}pa(Tz,X);I("shaka.ui.Spacer",Tz);function Uz(){}Uz.prototype.create=function(a,b){return new Tz(a,b)};dy("spacer",new Uz);function Vz(a,b){function c(k){return Ex(h.h[k],!1)+" (m)"}function d(k){return Math.round(h.h[k]/1E3)+" (kbits/s)"}function e(k){return h.h[k].toFixed(2)+" (s)"}function f(k){return h.h[k]+" (frames)"}function g(k){return h.h[k]+" (px)"}X.call(this,a,b);var h=this;this.i=cl();this.i.classList.add("shaka-statistics-button");this.j=R("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=R("label");a.classList.add("shaka-overflow-button-label");
1192
1195
  this.s=R("span");a.appendChild(this.s);this.m=R("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.i.appendChild(a);this.parent.appendChild(this.i);this.g=R("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();
1193
1196
  this.B={};this.C={width:g,height:g,completionPercent:function(k){return h.h[k]+" (%)"},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,stallsDetected:function(k){return h.h[k]+" (stalls)"},gapsJumped:function(k){return h.h[k]+" (gaps)"}};this.l=new N(function(){h.h=h.player.getStats();for(var k=r(h.F),l=k.next();!l.done;l=
1194
- k.next())l=l.value,h.B[l].textContent=h.C[l](l)});Uz(this);Vz(this);this.eventManager.o(this.localization,"locale-updated",function(){Uz(h)});this.eventManager.o(this.localization,"locale-changed",function(){Uz(h)});this.eventManager.o(this.i,"click",function(){Y(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ka(.1),Y(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),Y(h.g,!1));Uz(h)})}pa(Tz,X);
1195
- function Uz(a){a.s.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")}
1196
- function Vz(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=R("div"),h=R("label");h.textContent=c+":";g.appendChild(h);h=R("span");h.textContent=f.C[c](c);g.appendChild(h);f.B[c]=h;e.call(d,g);a.F.push(c)}else Ua("Unrecognized statistic element:",c)}Tz.prototype.release=function(){this.l.stop();this.l=null;X.prototype.release.call(this)};I("shaka.ui.StatisticsButton",Tz);function Wz(){}
1197
- Wz.prototype.create=function(a,b){return new Tz(a,b)};Ay("statistics",new Wz);Mx("statistics",new Wz);function Xz(a,b){Ry.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.Nb()?this.button.ariaPressed="true":this.button.ariaPressed="false";Yz(this);this.eventManager.o(this.localization,"locale-updated",function(){Zz(c);$z(c)});this.eventManager.o(this.localization,"locale-changed",function(){Zz(c);$z(c)});this.eventManager.o(this.player,
1198
- "texttrackvisibility",function(){aA(c);$z(c)});this.eventManager.o(this.player,"textchanged",function(){$z(c)});this.eventManager.o(this.player,"trackschanged",function(){bA(c)});aA(this);Zz(this);$z(this);bA(this)}pa(Xz,Ry);function Yz(a){var b=al();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(Bx());a.g=R("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1199
- function aA(a){a.player.Nb()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new L("captionselectionupdated"))}
1200
- function $z(a){var b=a.player.zb();Py(b,a.menu,function(c){return cA(a,c)},a.player.Nb(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=al();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Te(!1);$z(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Nb()||(b.ariaSelected="true",b.appendChild(Bx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
1201
- a.currentSelection.textContent);Ax(a.menu);a.controls.dispatchEvent(new L("captionselectionupdated"))}function cA(a,b){return G(function(c){a.player.Ke(b);return u(c,a.player.Te(!0),0)})}function Zz(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")}
1202
- function bA(a){var b=0<a.player.zb().length;Y(a.button,b);$z(a)}I("shaka.ui.TextSelection",Xz);function dA(){}dA.prototype.create=function(a,b){return new Xz(a,b)};Ay("captions",new dA);by("captions",new dA);function eA(a,b){Ox.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 fA(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return gA(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return gA(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return fA(c)});this.eventManager.o(this.localization,"locale-updated",function(){return hA(c)});
1203
- this.eventManager.o(this.localization,"locale-changed",function(){return hA(c)});fA(this);hA(this);if(this.ad)this.onChange()}pa(eA,Ox);eA.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 fA(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);iA(a)}function gA(a){var b=a.ad.getVolume();a.setValue(b);iA(a)}
1204
- function iA(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 hA(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}I("shaka.ui.VolumeBar",eA);function jA(){}jA.prototype.create=function(a,b){return new eA(a,b)};by("volume",new jA);}).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})();
1197
+ k.next())l=l.value,h.B[l].textContent=h.C[l](l)});Wz(this);Xz(this);this.eventManager.o(this.localization,"locale-updated",function(){Wz(h)});this.eventManager.o(this.localization,"locale-changed",function(){Wz(h)});this.eventManager.o(this.i,"click",function(){Y(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ka(.1),Y(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),Y(h.g,!1));Wz(h)})}pa(Vz,X);
1198
+ function Wz(a){a.s.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")}
1199
+ function Xz(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=R("div"),h=R("label");h.textContent=c+":";g.appendChild(h);h=R("span");h.textContent=f.C[c](c);g.appendChild(h);f.B[c]=h;e.call(d,g);a.F.push(c)}else Ua("Unrecognized statistic element:",c)}Vz.prototype.release=function(){this.l.stop();this.l=null;X.prototype.release.call(this)};I("shaka.ui.StatisticsButton",Vz);function Yz(){}
1200
+ Yz.prototype.create=function(a,b){return new Vz(a,b)};Cy("statistics",new Yz);Ox("statistics",new Yz);function Zz(a,b){Ty.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.Nb()?this.button.ariaPressed="true":this.button.ariaPressed="false";$z(this);this.eventManager.o(this.localization,"locale-updated",function(){aA(c);bA(c)});this.eventManager.o(this.localization,"locale-changed",function(){aA(c);bA(c)});this.eventManager.o(this.player,
1201
+ "texttrackvisibility",function(){cA(c);bA(c)});this.eventManager.o(this.player,"textchanged",function(){bA(c)});this.eventManager.o(this.player,"trackschanged",function(){dA(c)});cA(this);aA(this);bA(this);dA(this)}pa(Zz,Ty);function $z(a){var b=cl();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(Dx());a.g=R("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1202
+ function cA(a){a.player.Nb()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new L("captionselectionupdated"))}
1203
+ function bA(a){var b=a.player.zb();Ry(b,a.menu,function(c){return eA(a,c)},a.player.Nb(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=cl();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Ve(!1);bA(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Nb()||(b.ariaSelected="true",b.appendChild(Dx()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
1204
+ a.currentSelection.textContent);Cx(a.menu);a.controls.dispatchEvent(new L("captionselectionupdated"))}function eA(a,b){return F(function(c){a.player.Me(b);return u(c,a.player.Ve(!0),0)})}function aA(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")}
1205
+ function dA(a){var b=0<a.player.zb().length;Y(a.button,b);bA(a)}I("shaka.ui.TextSelection",Zz);function fA(){}fA.prototype.create=function(a,b){return new Zz(a,b)};Cy("captions",new fA);dy("captions",new fA);function gA(a,b){Qx.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 hA(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return iA(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return iA(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return hA(c)});this.eventManager.o(this.localization,"locale-updated",function(){return jA(c)});
1206
+ this.eventManager.o(this.localization,"locale-changed",function(){return jA(c)});hA(this);jA(this);if(this.ad)this.onChange()}pa(gA,Qx);gA.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 hA(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);kA(a)}function iA(a){var b=a.ad.getVolume();a.setValue(b);kA(a)}
1207
+ function kA(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 jA(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}I("shaka.ui.VolumeBar",gA);function lA(){}lA.prototype.create=function(a,b){return new gA(a,b)};dy("volume",new lA);}).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})();
1205
1208
 
1206
1209
  //# sourceMappingURL=shaka-player.ui.map