shaka-player 3.2.8 → 3.2.9

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.
@@ -21,7 +21,7 @@ function wa(a,b){var c=a.B.splice(0)[0];(c=a.i=a.i||c)?c.We?a.g=a.m||a.j:void 0!
21
21
  function Aa(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.v=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(a.g,g),Ba(a)}a.g.l=null;d.call(a.g,f);return Ba(a)}
22
22
  function Ba(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.v=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.v=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.We)throw b.Me;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
23
  function Ca(a){this.next=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l.next,b,a.g.A):(a.g.A(b),b=Ba(a));return b};this["throw"]=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l["throw"],b,a.g.A):(sa(a.g,b),b=Ba(a));return b};this["return"]=function(b){return za(a,b)};this[Symbol.iterator]=function(){return this}}
24
- function Da(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function H(a){return Da(new Ca(new xa(a)))}function Fa(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
24
+ function Da(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function H(a){return Da(new Ca(new xa(a)))}function Ea(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
25
25
  ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.v=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
26
26
  g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.G),reject:g(this.l)}};b.prototype.G=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.I(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.F(g):this.m(g)}};
27
27
  b.prototype.F=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.J(h,g):this.m(g)};b.prototype.l=function(g){this.A(2,g)};b.prototype.m=function(g){this.A(1,g)};b.prototype.A=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.H();this.B()};b.prototype.H=function(){var g=this;e(function(){if(g.D()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.D=
@@ -46,14 +46,15 @@ ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==J
46
46
  var Ka="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ga(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||Ka});ea("Array.prototype.values",function(a){return a?a:function(){return Ha(this,function(b,c){return c})}});
47
47
  ea("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});ea("Array.prototype.entries",function(a){return a?a:function(){return Ha(this,function(b,c){return[b,c]})}});
48
48
  ea("String.prototype.repeat",function(a){return a?a:function(b){var c=Ja(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ga(b,d)&&c.push(b[d]);return c}});ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
49
- ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ga(b,d)&&c.push([d,b[d]]);return c}});var La=this||self;function J(a,b){var c=a.split("."),d=La;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
49
+ 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)Ga(b,d)&&c.push([d,b[d]]);return c}});var La=this||self;
50
+ function J(a,b){var c=a.split("."),d=La;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
50
51
  @license
51
52
  Shaka Player
52
53
  Copyright 2016 Google LLC
53
54
  SPDX-License-Identifier: Apache-2.0
54
55
  */
55
56
  function L(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
56
- function Ma(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(){};J("shaka.util.FakeEvent",L);function Na(){}function Oa(){}function Pa(){}function Ra(a){var b=Fa.apply(1,arguments);Sa.has(a)||(Sa.add(a),Pa.apply(Na,ha(b)))}function Va(){}function Wa(){}function Xa(){}function Za(){}var Sa=new Set;if(window.console&&window.console.log.bind){var $a={},ab=($a[1]=console.error.bind(console),$a[2]=console.warn.bind(console),$a[3]=console.info.bind(console),$a[4]=console.log.bind(console),$a[5]=console.debug.bind(console),$a[6]=console.debug.bind(console),$a);Pa=ab[2];Oa=ab[1]};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])};function cb(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function db(){this.ua=new bb;this.Tc=this}db.prototype.addEventListener=function(a,b){this.ua&&this.ua.push(a,b)};db.prototype.removeEventListener=function(a,b){this.ua&&this.ua.remove(a,b)};db.prototype.dispatchEvent=function(a){if(!this.ua)return!0;var b=this.ua.get(a.type)||[],c=this.ua.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Tc;a.currentTarget=this.Tc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
57
+ function Ma(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(){};J("shaka.util.FakeEvent",L);function Na(){}function Oa(){}function Pa(){}function Ra(a){var b=Ea.apply(1,arguments);Sa.has(a)||(Sa.add(a),Pa.apply(Na,ha(b)))}function Va(){}function Wa(){}function Xa(){}function Za(){}var Sa=new Set;if(window.console&&window.console.log.bind){var $a={},ab=($a[1]=console.error.bind(console),$a[2]=console.warn.bind(console),$a[3]=console.info.bind(console),$a[4]=console.log.bind(console),$a[5]=console.debug.bind(console),$a[6]=console.debug.bind(console),$a);Pa=ab[2];Oa=ab[1]};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])};function cb(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function db(){this.ua=new bb;this.Tc=this}db.prototype.addEventListener=function(a,b){this.ua&&this.ua.push(a,b)};db.prototype.removeEventListener=function(a,b){this.ua&&this.ua.remove(a,b)};db.prototype.dispatchEvent=function(a){if(!this.ua)return!0;var b=this.ua.get(a.type)||[],c=this.ua.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Tc;a.currentTarget=this.Tc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
57
58
  db.prototype.release=function(){this.ua=null};function eb(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function fb(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}function gb(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(b(d.value))return!0;return!1}function hb(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())e=e.value,b(e)&&c.push(e);return c};/*
58
59
  @license
59
60
  Copyright 2008 The Closure Library Authors
@@ -70,7 +71,7 @@ q.resolve=function(a){var b=this.clone();"data"===b.Ta&&(b=new jb);var c=!!a.Ta;
70
71
  h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Ma=d:c=""!==a.g.toString();c?nb(b,a.g.clone()):c=!!a.Ab;c&&(b.Ab=a.Ab);return b};q.clone=function(){return new jb(this)};function lb(a,b,c){a.Ta=c?ob(b,!0):b;a.Ta&&(a.Ta=a.Ta.replace(/:$/,""))}function mb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.ac=b}else a.ac=null}function nb(a,b,c){b instanceof pb?a.g=b:(c||(b=qb(b,vb)),a.g=new pb(b))}
71
72
  function ob(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function qb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,wb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function wb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var rb=/[#\/\?@]/g,tb=/[#\?:]/g,sb=/[#\?]/g,vb=/[#\?@]/g,ub=/#/g;function pb(a){this.g=a||null}q=pb.prototype;q.Ka=null;q.Sc=null;
72
73
  q.add=function(a,b){if(!this.Ka&&(this.Ka={},this.Sc=0,this.g))for(var c=this.g.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.g=null;(c=this.Ka.hasOwnProperty(a)&&this.Ka[a])||(this.Ka[a]=c=[]);c.push(b);this.Sc++;return this};
73
- q.toString=function(){if(this.g)return this.g;if(!this.Ka)return"";var a=[],b;for(b in this.Ka)for(var c=encodeURIComponent(b),d=this.Ka[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new pb;a.g=this.g;if(this.Ka){var b={},c;for(c in this.Ka)b[c]=this.Ka[c].concat();a.Ka=b;a.Sc=this.Sc}return a};function M(a,b,c){var d=Fa.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}M.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};J("shaka.util.Error",M);M.Severity={RECOVERABLE:1,CRITICAL:2};M.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
74
+ q.toString=function(){if(this.g)return this.g;if(!this.Ka)return"";var a=[],b;for(b in this.Ka)for(var c=encodeURIComponent(b),d=this.Ka[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new pb;a.g=this.g;if(this.Ka){var b={},c;for(c in this.Ka)b[c]=this.Ka[c].concat();a.Ka=b;a.Sc=this.Sc}return a};function M(a,b,c){var d=Ea.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}M.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};J("shaka.util.Error",M);M.Severity={RECOVERABLE:1,CRITICAL:2};M.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
74
75
  M.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,
75
76
  TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,
76
77
  WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,
@@ -92,8 +93,8 @@ q.Fe=function(a){var b=this;this.g.clear();a=t(a);for(var c=a.next();!c.done;c=a
92
93
  q.ba=function(a,b,c){a=Ob(a);void 0===c&&(c=Yb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Yb||d.set(f,e)});this.h.set(a,d);Xb(this);this.dispatchEvent(new L("locale-updated"));return this};q.Jg=function(a){for(var b=t(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""};
93
94
  function Xb(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=t(d),h=g.next();!h.done;f={Rb:f.Rb},h=g.next()){f.Rb=h.value;e.add(f.Rb);e.add(Tb(f.Rb));h=hb(b.keys(),function(l){return function(m){var n=l.Rb,p=Tb(m),r=Tb(n);return m!=p&&n!=r&&p==r}}(f));h.sort();var k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=hb(b.keys(),function(l){return function(m){return Tb(m)==l.Rb}}(f));h.sort();k=t(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=t(e);for(h=e.next();!h.done;h=e.next())(h=
94
95
  b.get(h.value))&&c.push(h);c.reverse();a.i.clear();b=t(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=t(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,Zb(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 Zb(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}J("shaka.ui.Localization",Wb);
95
- Wb.prototype.resolve=Wb.prototype.resolve;Wb.prototype.resolveDictionary=Wb.prototype.Jg;Wb.prototype.insert=Wb.prototype.ba;Wb.prototype.changeLocale=Wb.prototype.Fe;Wb.prototype.release=Wb.prototype.release;var Yb=1;Wb.ConflictResolution={USE_OLD:0,USE_NEW:Yb};Wb.UNKNOWN_LOCALES="unknown-locales";Wb.UNKNOWN_LOCALIZATION="unknown-localization";Wb.MISSING_LOCALIZATIONS="missing-localizations";Wb.LOCALE_CHANGED="locale-changed";Wb.LOCALE_UPDATED="locale-updated";var $b={Wg:"AD_TIME",rh:"LOOP",Ch:"OFF",eh:"CAST",ph:"FULL_SCREEN",Ph:"SKIP_AD",Ih:"PLAY",Be:"LIVE",Qh:"SKIP_TO_LIVE",Jh:"PLAYBACK_RATE",Lh:"RESOLUTION",AD_PROGRESS:"AD_PROGRESS",Zh:"UNDETERMINED_LANGUAGE",yh:"MUTE",Xg:"AIRPLAY",Kh:"REPLAY",oh:"FAST_FORWARD",dh:"CAPTIONS",uf:"SUBTITLE_FORCED",gh:"ENTER_LOOP_MODE",Bh:"NOT_APPLICABLE",qh:"LANGUAGE",Zg:"AUTO_QUALITY",Vg:"AD_DURATION",ai:"UNRECOGNIZED_LANGUAGE",wh:"MORE_SETTINGS",hh:"ENTER_PICTURE_IN_PICTURE",lh:"EXIT_PICTURE_IN_PICTURE",Dh:"ON",jh:"EXIT_FULL_SCREEN",
96
- $h:"UNMUTE",BACK:"BACK",kh:"EXIT_LOOP_MODE",Gh:"PAUSE",Oh:"SEEK",ci:"VOLUME",Hh:"PICTURE_IN_PICTURE",Mh:"REWIND",xh:"MULTIPLE_LANGUAGES"};function ac(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}ac.prototype.sample=function(a,b){var c=Math.pow(this.i,a);c=b*(1-c)+c*this.g;isNaN(c)||(this.g=c,this.h+=a)};function bc(a){return a.g/(1-Math.pow(a.i,a.h))};function cc(){this.h=new ac(2);this.i=new ac(5);this.g=0}cc.prototype.sample=function(a,b){if(!(16E3>b)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.i.sample(d,c)}};cc.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(bc(this.h),bc(this.i))};function dc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ec(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function fc(a,b,c){c||(c=dc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(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}
96
+ Wb.prototype.resolve=Wb.prototype.resolve;Wb.prototype.resolveDictionary=Wb.prototype.Jg;Wb.prototype.insert=Wb.prototype.ba;Wb.prototype.changeLocale=Wb.prototype.Fe;Wb.prototype.release=Wb.prototype.release;var Yb=1;Wb.ConflictResolution={USE_OLD:0,USE_NEW:Yb};Wb.UNKNOWN_LOCALES="unknown-locales";Wb.UNKNOWN_LOCALIZATION="unknown-localization";Wb.MISSING_LOCALIZATIONS="missing-localizations";Wb.LOCALE_CHANGED="locale-changed";Wb.LOCALE_UPDATED="locale-updated";var $b={Ch:"OFF",Zg:"AUTO_QUALITY",Jh:"PLAYBACK_RATE",eh:"CAST",AD_PROGRESS:"AD_PROGRESS",Oh:"SEEK",Qh:"SKIP_TO_LIVE",ai:"UNRECOGNIZED_LANGUAGE",gh:"ENTER_LOOP_MODE",Lh:"RESOLUTION",hh:"ENTER_PICTURE_IN_PICTURE",jh:"EXIT_FULL_SCREEN",kh:"EXIT_LOOP_MODE",dh:"CAPTIONS",Zh:"UNDETERMINED_LANGUAGE",Xg:"AIRPLAY",Be:"LIVE",ci:"VOLUME",oh:"FAST_FORWARD",$h:"UNMUTE",wh:"MORE_SETTINGS",Vg:"AD_DURATION",Ph:"SKIP_AD",Mh:"REWIND",BACK:"BACK",Wg:"AD_TIME",Ih:"PLAY",Hh:"PICTURE_IN_PICTURE",qh:"LANGUAGE",xh:"MULTIPLE_LANGUAGES",
97
+ yh:"MUTE",Kh:"REPLAY",Bh:"NOT_APPLICABLE",Dh:"ON",uf:"SUBTITLE_FORCED",Gh:"PAUSE",lh:"EXIT_PICTURE_IN_PICTURE",rh:"LOOP",ph:"FULL_SCREEN"};function ac(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}ac.prototype.sample=function(a,b){var c=Math.pow(this.i,a);c=b*(1-c)+c*this.g;isNaN(c)||(this.g=c,this.h+=a)};function bc(a){return a.g/(1-Math.pow(a.i,a.h))};function cc(){this.h=new ac(2);this.i=new ac(5);this.g=0}cc.prototype.sample=function(a,b){if(!(16E3>b)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.i.sample(d,c)}};cc.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(bc(this.h),bc(this.i))};function dc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ec(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function fc(a,b,c){c||(c=dc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(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}
97
98
  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=kc;this.size=0;this.textAlign=lc;this.writingMode=mc;this.lineInterpretation=nc;this.line=null;this.lineHeight="";this.lineAlign=oc;this.displayAlign=pc;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=qc;this.fontStyle=rc;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
98
99
  [];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=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};
99
100
  function sc(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,sc))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}J("shaka.text.Cue",hc);var kc="auto";
@@ -104,7 +105,7 @@ function Ec(a,b,c){c=void 0===c?Infinity:c;return Gc(a,void 0===b?0:b,c,Uint8Arr
104
105
  function Sc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Ec(a);if(239==c[0]&&187==c[1]&&191==c[2])return Oc(c);if(254==c[0]&&255==c[1])return Qc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Qc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Qc(a,!1);if(0==c[1]&&0==c[3])return Qc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Oc(a);throw new M(2,2,2003);}function Tc(a){var b=new TextEncoder;return Fc(b.encode(a))}
105
106
  function Uc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}J("shaka.util.StringUtils",Nc);Nc.resetFromCharCode=function(){Rc.g=void 0};Nc.toUTF16=Uc;Nc.toUTF8=Tc;Nc.fromBytesAutoDetect=Sc;Nc.fromUTF16=Qc;Nc.fromUTF8=Oc;
106
107
  var Rc=new Mc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={qb:65536};0<b.qb;b={qb:b.qb},b.qb/=2)if(a(b.qb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.qb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.qb));return e}}(b);return null});function Vc(){}function Wc(a){a=Ec(a);a=Rc.value()(a);return btoa(a)}function Xc(a,b){b=void 0==b?!0:b;var c=Wc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Yc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Zc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
107
- function $c(a){var b=Ec(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function ad(){for(var a=Fa.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Ec(d),c),c+=d.byteLength;return b}J("shaka.util.Uint8ArrayUtils",Vc);Vc.concat=ad;Vc.toHex=$c;Vc.fromHex=Zc;Vc.fromBase64=Yc;Vc.toBase64=Xc;Vc.toStandardBase64=Wc;
108
+ function $c(a){var b=Ec(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function ad(){for(var a=Ea.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Ec(d),c),c+=d.byteLength;return b}J("shaka.util.Uint8ArrayUtils",Vc);Vc.concat=ad;Vc.toHex=$c;Vc.fromHex=Zc;Vc.fromBase64=Yc;Vc.toBase64=Xc;Vc.toStandardBase64=Wc;
108
109
  Vc.equal=function(a,b){yb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Cc(a,b)};function bd(){var a=this;this.v=Jc.get("muxjs")();this.g=new this.v.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(ad(b.initSegment,b.data))});this.g.on("done",function(){var b={data:ad.apply(Vc,ha(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}bd.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
109
110
  function cd(a,b){if(!Jc.get("muxjs")()||!dd(a))return!1;if(b)return MediaSource.isTypeSupported(ed(b,a));var c=ed("audio",a),d=ed("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function dd(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
110
111
  function ed(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function fd(a,b){a.l=!0;a.h=new Lc;a.m=[];a.j=[];a.i=[];var c=Ec(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new M(2,3,3018));return a.h};function gd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function hd(a,b,c){a=gd(a,b);if(dd(a)){if(Jc.get("muxjs")())return ed(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
@@ -126,7 +127,7 @@ function Ud(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e
126
127
  function Vd(a,b){return H(function(c){if(1==c.g)return u(c,Wd(b,0<b.offlineSessionIds.length),2);Xd(a,b);Yd(b);Zd(b);z(c)})}
127
128
  function Wd(a,b){return H(function(c){if(1==c.g)return u(c,$d(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=ae(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Ib("video",g);g=Ib("audio",g);g=hd(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=hd(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=be(f.codecs),f=hd(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(yd()&&e&&(e.width&&
128
129
  1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Wa(ce(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Wa(ce(d));return e});z(c)})}
129
- function $d(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return H(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 H(function(C){if(1==C.g)return A(C,2),u(C,e.decodingInfo(w),4);if(2!=C.g)return x=C.h,y.decodingInfos.push(x),ua(C,0);F(C);JSON.stringify(w);z(C)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=de(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())r=p.value,f.push(g(l,r));return u(v,Promise.all(f),
130
+ function $d(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return H(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,x){var w;return H(function(C){if(1==C.g)return A(C,2),u(C,e.decodingInfo(x),4);if(2!=C.g)return w=C.h,y.decodingInfos.push(w),ua(C,0);F(C);JSON.stringify(x);z(C)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=de(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())r=p.value,f.push(g(l,r));return u(v,Promise.all(f),
130
131
  0)})}
131
132
  function de(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=Ib("video",g);f=ae(f);g=Ib("audio",g);g=hd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=ae(f);f=hd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
132
133
  break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=be(d.codecs),f=hd(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
@@ -136,7 +137,7 @@ function ae(a){return"vp9"==a?"vp09.00.10.08":a}function Xd(a,b){b.variants=b.va
136
137
  function ee(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
137
138
  function fe(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=t(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=t(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
138
139
  frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||
139
- null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.label=b.label,a.audioRoles=b.roles);return a}
140
+ 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}
140
141
  function ge(a){return{id:a.id,active:!1,type:Lb,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
141
142
  originalTextId:a.originalId,originalImageId:null}}
142
143
  function he(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,
@@ -164,9 +165,9 @@ function af(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSit
164
165
  q.request=function(a,b){var c=this,d=new bf;if(this.i){var e=Promise.reject(new M(2,7,7001));e["catch"](function(){});return new cf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Te(b.retryParameters):Ke();b.uris=Te(b.uris);e=df(this,a,b);var f=e.ma(function(){return ef(c,a,b,new Je(b.retryParameters,!1),0,null,d)}),g=f.ma(function(n){return ff(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
165
166
  var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.ma(function(n){var p=Date.now()-l,r=n.response;r.timeMs+=k;r.timeMs+=p;n.og||!c.j||r.fromCache||a!=gf||c.j(r.timeMs,r.data.byteLength);return r},function(n){n&&(n.severity=2);throw n;});e=new cf(m.promise,function(){return m.abort()},d);We(this.l,e);return e};
166
167
  function df(a,b,c){var d=Pe(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={Cd:e.Cd},f=a.next())e.Cd=f.value,d=d.ma(function(g){return function(){c.body&&(c.body=Fc(c.body));return g.Cd(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);})}
167
- function ef(a,b,c,d,e,f,g){a.m&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Ta,l=!1;k||(k=location.protocol,k=k.slice(0,-1),lb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=$e[k])?k.Ag:null;if(!m)return Ne(new M(2,1,1E3,h));var n=k.Bg,p=null,r=null,v=!1,y;return Qe(Le(d)).ma(function(){if(a.i)return Oe();y=Date.now();var w=m(c.uris[e],c,b,function(D,B,E){p&&p.stop();r&&r.P(C/1E3);a.j&&b==gf&&(a.j(D,B),l=!0,g.g=E)});if(!n)return w;var x=c.retryParameters.connectionTimeout;
168
- x&&(p=new P(function(){v=!0;w.abort()}),p.P(x/1E3));var C=c.retryParameters.stallTimeout;C&&(r=new P(function(){v=!0;w.abort()}));return w}).ma(function(w){p&&p.stop();r&&r.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-y);return{response:w,og:l}},function(w){p&&p.stop();r&&r.stop();if(a.i)return Oe();v&&(w=new M(1,1,1003,c.uris[e],b));if(w instanceof M){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity){var x=(new Map).set("error",w);x=new L("retry",x);a.dispatchEvent(x);e=(e+1)%c.uris.length;
169
- return ef(a,b,c,d,e,w,g)}}throw w;})}function ff(a,b,c){var d=Pe(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={Dd:e.Dd},f=a.next())e.Dd=f.value,d=d.ma(function(g){return function(){var h=c.response;h.data&&(h.data=Fc(h.data));return g.Dd(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);})}J("shaka.net.NetworkingEngine",Xe);Xe.prototype.request=Xe.prototype.request;Xe.prototype.destroy=Xe.prototype.destroy;
168
+ function ef(a,b,c,d,e,f,g){a.m&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new jb(c.uris[e]),k=h.Ta,l=!1;k||(k=location.protocol,k=k.slice(0,-1),lb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=$e[k])?k.Ag:null;if(!m)return Ne(new M(2,1,1E3,h));var n=k.Bg,p=null,r=null,v=!1,y;return Qe(Le(d)).ma(function(){if(a.i)return Oe();y=Date.now();var x=m(c.uris[e],c,b,function(D,B,E){p&&p.stop();r&&r.P(C/1E3);a.j&&b==gf&&(a.j(D,B),l=!0,g.g=E)});if(!n)return x;var w=c.retryParameters.connectionTimeout;
169
+ w&&(p=new P(function(){v=!0;x.abort()}),p.P(w/1E3));var C=c.retryParameters.stallTimeout;C&&(r=new P(function(){v=!0;x.abort()}));return x}).ma(function(x){p&&p.stop();r&&r.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-y);return{response:x,og:l}},function(x){p&&p.stop();r&&r.stop();if(a.i)return Oe();v&&(x=new M(1,1,1003,c.uris[e],b));if(x instanceof M){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity){var w=(new Map).set("error",x);w=new L("retry",w);a.dispatchEvent(w);e=(e+1)%c.uris.length;
170
+ return ef(a,b,c,d,e,x,g)}}throw x;})}function ff(a,b,c){var d=Pe(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={Dd:e.Dd},f=a.next())e.Dd=f.value,d=d.ma(function(g){return function(){var h=c.response;h.data&&(h.data=Fc(h.data));return g.Dd(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);})}J("shaka.net.NetworkingEngine",Xe);Xe.prototype.request=Xe.prototype.request;Xe.prototype.destroy=Xe.prototype.destroy;
170
171
  Xe.makeRequest=af;Xe.defaultRetryParameters=function(){return Ke()};Xe.prototype.clearAllResponseFilters=Xe.prototype.Df;Xe.prototype.unregisterResponseFilter=Xe.prototype.Sg;Xe.prototype.registerResponseFilter=Xe.prototype.Dg;Xe.prototype.clearAllRequestFilters=Xe.prototype.Cf;Xe.prototype.unregisterRequestFilter=Xe.prototype.Rg;Xe.prototype.registerRequestFilter=Xe.prototype.Cg;Xe.unregisterScheme=function(a){delete $e[a]};Xe.registerScheme=Ye;Xe.prototype.setForceHTTPS=Xe.prototype.ke;
171
172
  function bf(){this.g=0}Xe.NumBytesRemainingClass=bf;function cf(a,b,c){Me.call(this,a,b);this.h=c}pa(cf,Me);Xe.PendingRequest=cf;var gf=1;Xe.RequestType={MANIFEST:0,SEGMENT:gf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Ze=3;Xe.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Ze};var $e={};function hf(a){this.g=!1;this.h=new Lc;this.i=a}hf.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 jf(a,b){if(a.g){if(b instanceof M&&7003==b.code)throw b;throw new M(2,7,7003,b);}};function kf(){this.g=new bb}q=kf.prototype;q.release=function(){this.ob();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new lf(a,b,c,d),this.g.push(b,a))};q.Ga=function(a,b,c,d){function e(g){f.ec(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.ec=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.ec(),this.g.remove(b,e))}};
172
173
  q.ob=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ha(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.ec();this.g.g={}}};J("shaka.util.EventManager",kf);kf.prototype.removeAll=kf.prototype.ob;kf.prototype.unlisten=kf.prototype.ec;kf.prototype.listenOnce=kf.prototype.Ga;kf.prototype.listen=kf.prototype.o;kf.prototype.release=kf.prototype.release;function lf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=mf(a,d);this.target.addEventListener(b,c,this.g)}
@@ -174,31 +175,31 @@ lf.prototype.ec=function(){this.target.removeEventListener(this.type,this.listen
174
175
  function nf(a){var b=of;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}of=b}return b||!1}var of=void 0;function pf(){}function qf(a){a=Sc(a);return(new jb(a)).Ua}function rf(a,b,c){function d(h){Hc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ec(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new M(2,6,6015);var e;"string"==typeof b?e=Uc(b,!0):e=b;a=Sc(a);a=Uc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}J("shaka.util.FairPlayUtils",pf);pf.initDataTransform=rf;pf.defaultGetContentId=qf;function sf(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function tf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function uf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function vf(a,b){var c=this;b=void 0===b?1:b;this.F=a;this.G=new Set;this.l=this.A=null;this.$=this.Y=!1;this.H=0;this.g=null;this.v=new kf;this.i=new Map;this.D=[];this.B=new Lc;this.h=null;this.m=function(d){c.B.reject(d);a.onError(d)};this.aa=new Map;this.ua=new Map;this.R=new P(function(){return wf(c)});this.J=!1;this.I=[];this.M=!1;this.Z=(new P(function(){xf(c)})).ia(b);this.B["catch"](function(){});this.j=new hf(function(){return yf(c)});this.W=!1}q=vf.prototype;q.destroy=function(){return this.j.destroy()};
175
176
  function yf(a){return H(function(b){switch(b.g){case 1:return a.v.release(),a.v=null,a.B.reject(),a.Z.stop(),a.Z=null,a.R.stop(),a.R=null,u(b,zf(a),2);case 2:if(!a.l){b.C(3);break}A(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:ua(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.A=null,a.D=[],a.h=null,a.m=function(){},a.F=null,a.W=!1,z(b)}})}q.configure=function(a){this.h=a};function Af(a,b,c){a.$=!0;a.D=[];a.J=c;return Bf(a,b)}
176
177
  function Cf(a,b,c){a.D=c;a.J=0<c.length;return Bf(a,b)}function Df(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 Ef(a,g,[])}
177
- function Bf(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return H(function(w){if(1==w.g){if(c=Ff(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(x){return x.video&&x.video.drmInfos.length||x.audio&&x.audio.drmInfos.length?!0:!1});g||(h=sf(a.h.servers),Gf(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Hf(l),n=t(m),p=n.next();!p.done;p=n.next())r=p.value,If(r,sf(a.h.servers),sf(a.h.advanced||{}));return u(w,
178
- $d(b,a.J,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.Y=!0,w["return"](Promise.resolve());y=Ef(a,void 0,b);return w["return"](g?y:y["catch"](function(){}))})}
178
+ function Bf(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return H(function(x){if(1==x.g){if(c=Ff(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=sf(a.h.servers),Gf(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Hf(l),n=t(m),p=n.next();!p.done;p=n.next())r=p.value,If(r,sf(a.h.servers),sf(a.h.advanced||{}));return u(x,
179
+ $d(b,a.J,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.Y=!0,x["return"](Promise.resolve());y=Ef(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}
179
180
  q.pc=function(a){var b=this,c,d;return H(function(e){if(1==e.g){if(!b.A)return b.v.Ga(a,"encrypted",function(){b.m(new M(2,6,6010))}),e["return"]();b.l=a;b.v.Ga(b.l,"play",function(){for(var f=t(b.I),g=f.next();!g.done;g=f.next())Jf(b,g.value);b.M=!0;b.I=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.v.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return zf(b)});c=b.l.setMediaKeys(b.A);c=c["catch"](function(f){return Promise.reject(new M(2,6,6003,f.message))});return u(e,
180
181
  c,2)}jf(b.j);Kf(b);b.g.initData.length||b.D.length||(d=function(f){return Lf(b,f.initDataType,Ec(f.initData))},b.v.o(b.l,"encrypted",d));z(e)})};
181
182
  function Mf(a){var b,c,d,e,f;return H(function(g){switch(g.g){case 1:if(!a.A||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.C(2);break}b=af([a.g.serverCertificateUri],a.h.retryParameters);A(g,3);c=a.F.Jb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ec(d.data);ua(g,4);break;case 3:throw e=F(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"]();
182
183
  A(g,6);return u(g,a.A.setServerCertificate(a.g.serverCertificate),8);case 8:ua(g,0);break;case 6:throw f=F(g),new M(2,6,6004,f.message);}})}function Nf(a,b){var c,d,e;return H(function(f){if(1==f.g)return u(f,Of(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.Za=new Lc,d.push(e.Za);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);z(f)})}
183
184
  function Kf(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,Lf(a,d.initDataType,d.initData);c=t(a.D);for(d=c.next();!d.done;d=c.next())Of(a,d.value);b.length||a.D.length||a.B.resolve();return a.B}function Lf(a,b,c){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Cc(c,e.value.initData)&&!zd("Tizen 2"))return;Pf(a,b,c,a.g.sessionType)}function Qf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
184
185
  function Rf(a){a=a.i.keys();a=eb(a,function(b){return b.sessionId});return Array.from(a)}q.tc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Xc=function(){return tf(this.ua)};
185
- function Ef(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y;return H(function(w){switch(w.g){case 1:d=new Map;if(c.length){e=Sf(a,c,d);w.C(2);break}return u(w,Tf(a,b),3);case 3:e=w.h;case 2:f=e;if(!f)throw new M(2,6,6001);jf(a.j);A(w,4);a.G.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.G.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())r=m.value,a.G.add(r.contentType.toLowerCase());if(c.length){var x=
186
- f.keySystem;var C=d.get(f.keySystem);var D=[],B=[],E=[],G=[],I=new Set;Uf(C,D,E,B,G,I);var N=a.J?"persistent-license":"temporary";x={keySystem:x,licenseServerUri:D[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||N,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:B[0],initData:G,keyIds:I};C=t(C);for(D=C.next();!D.done;D=
187
- C.next())D=D.value,D.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=D.distinctiveIdentifierRequired),D.persistentStateRequired&&(x.persistentStateRequired=D.persistentStateRequired);C=x}else C=f.keySystem,x=b.get(f.keySystem),D=[],B=[],E=[],G=[],I=new Set,Uf(x.drmInfos,D,E,B,G,I),C={keySystem:C,licenseServerUri:D[0],distinctiveIdentifierRequired:"required"==x.distinctiveIdentifier,persistentStateRequired:"required"==x.persistentState,sessionType:x.sessionTypes[0]||"temporary",audioRobustness:(x.audioCapabilities?
188
- x.audioCapabilities[0].robustness:"")||"",videoRobustness:(x.videoCapabilities?x.videoCapabilities[0].robustness:"")||"",serverCertificate:E[0],serverCertificateUri:B[0],initData:G,keyIds:I};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,jf(a.j),a.A=v,a.Y=!0,u(w,Mf(a),7);case 7:jf(a.j);ua(w,0);break;case 4:y=F(w);jf(a.j,y);a.g=null;a.G.clear();if(y instanceof M)throw y;throw new M(2,6,6002,y.message);}})}
186
+ function Ef(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y;return H(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=Sf(a,c,d);x.C(2);break}return u(x,Tf(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new M(2,6,6001);jf(a.j);A(x,4);a.G.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.G.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())r=m.value,a.G.add(r.contentType.toLowerCase());if(c.length){var w=
187
+ f.keySystem;var C=d.get(f.keySystem);var D=[],B=[],E=[],G=[],I=new Set;Uf(C,D,E,B,G,I);var N=a.J?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:D[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||N,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:B[0],initData:G,keyIds:I};C=t(C);for(D=C.next();!D.done;D=
188
+ C.next())D=D.value,D.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=D.distinctiveIdentifierRequired),D.persistentStateRequired&&(w.persistentStateRequired=D.persistentStateRequired);C=w}else C=f.keySystem,w=b.get(f.keySystem),D=[],B=[],E=[],G=[],I=new Set,Uf(w.drmInfos,D,E,B,G,I),C={keySystem:C,licenseServerUri:D[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
189
+ w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:E[0],serverCertificateUri:B[0],initData:G,keyIds:I};a.g=C;if(!a.g.licenseServerUri)throw new M(2,6,6012,a.g.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,jf(a.j),a.A=v,a.Y=!0,u(x,Mf(a),7);case 7:jf(a.j);ua(x,0);break;case 4:y=F(x);jf(a.j,y);a.g=null;a.G.clear();if(y instanceof M)throw y;throw new M(2,6,6002,y.message);}})}
189
190
  function Sf(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Hf(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=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={zd:d.zd},e=a.next())for(d.zd=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
190
191
  l.zd}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
191
- function Tf(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,w;return H(function(x){switch(x.g){case 1:if(1==b.size&&b.has(""))throw new M(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){x.C(4);break}k=h.value;if(!b.has(k)){x.C(3);break}l=b.get(k);A(x,6);return u(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
192
- x.h,x["return"](c);case 6:F(x);case 7:jf(a.j);case 3:h=g.next();x.C(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){x.C(11);break}p=n.value;r=t(b.keys());h=r.next();case 12:if(h.done){n=m.next();x.C(9);break}v=h.value;y=b.get(v);w=y.drmInfos.some(function(C){return!!C.licenseServerUri});if(w!=p){x.C(13);break}A(x,15);return u(x,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=x.h,x["return"](c);case 15:F(x);case 16:jf(a.j);case 13:h=r.next();x.C(12);break;case 11:return x["return"](c)}})}
192
+ function Tf(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x;return H(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new M(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.C(4);break}k=h.value;if(!b.has(k)){w.C(3);break}l=b.get(k);A(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
193
+ w.h,w["return"](c);case 6:F(w);case 7:jf(a.j);case 3:h=g.next();w.C(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){w.C(11);break}p=n.value;r=t(b.keys());h=r.next();case 12:if(h.done){n=m.next();w.C(9);break}v=h.value;y=b.get(v);x=y.drmInfos.some(function(C){return!!C.licenseServerUri});if(x!=p){w.C(13);break}A(w,15);return u(w,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=w.h,w["return"](c);case 15:F(w);case 16:jf(a.j);case 13:h=r.next();w.C(12);break;case 11:return w["return"](c)}})}
193
194
  function Ff(a){a=sf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Zc(f),h=Zc(e);g={kty:"oct",kid:Xc(g,!1),k:Xc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Ec(Tc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
194
195
  serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
195
196
  function Of(a,b){var c,d,e,f,g;return H(function(h){switch(h.g){case 1:try{c=a.A.createSession("persistent-license")}catch(k){return d=new M(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.v.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.M?a.I.push(k):Jf(a,k)});a.v.o(c,"keystatuseschange",function(k){return Vf(a,k)});e={initData:null,loaded:!1,Wd:Infinity,Za:null,type:"persistent-license"};a.i.set(c,e);A(h,2);return u(h,c.load(b),4);case 4:f=h.h;jf(a.j);
196
197
  if(!f)return a.i["delete"](c),a.m(new M(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Wf(a)&&a.B.resolve();return h["return"](c);case 2:g=F(h),jf(a.j,g),a.i["delete"](c),a.m(new M(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
197
198
  function Pf(a,b,c,d){try{var e=a.A.createSession(d)}catch(f){a.m(new M(2,6,6005,f.message));return}a.v.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.M?a.I.push(f):Jf(a,f)});a.v.o(e,"keystatuseschange",function(f){return Vf(a,f)});a.i.set(e,{initData:c,loaded:!1,Wd:Infinity,Za: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&&Xc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
198
199
  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))}})}function Xf(a,b,c){"skd"==b&&(b=c.serverCertificate,c=qf(a),a=rf(a,c,b));return a}
199
- function Jf(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;H(function(w){switch(w.g){case 1:return c=b.target,a.h.logLicenseExchange&&Xc(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=af([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Qf(a.g.keySystem)&&$f(g),h=Date.now(),A(w,2),l=a.F.Jb.request(2,g),u(w,
200
- l.promise,4);case 4:k=w.h;ua(w,3);break;case 2:return m=F(w),n=new M(2,6,6007,m),a.m(n),d&&d.Za&&d.Za.reject(n),w["return"]();case 3:if(a.j.g)return w["return"]();a.H+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Xc(k.data);A(w,5);return u(w,c.update(k.data),7);case 7:ua(w,6);break;case 5:return p=F(w),r=new M(2,6,6008,p.message),a.m(r),d&&d.Za&&d.Za.reject(r),w["return"]();case 6:if(a.j.g)return w["return"]();v=new L("drmsessionupdate");a.F.onEvent(v);d&&(d.Za&&d.Za.resolve(),y=new P(function(){d.loaded=
201
- !0;Wf(a)&&a.B.resolve()}),y.P(ag));z(w)}})}function $f(a){var b=Qc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Yc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
200
+ function Jf(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;H(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&Xc(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=af([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Qf(a.g.keySystem)&&$f(g),h=Date.now(),A(x,2),l=a.F.Jb.request(2,g),u(x,
201
+ l.promise,4);case 4:k=x.h;ua(x,3);break;case 2:return m=F(x),n=new M(2,6,6007,m),a.m(n),d&&d.Za&&d.Za.reject(n),x["return"]();case 3:if(a.j.g)return x["return"]();a.H+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Xc(k.data);A(x,5);return u(x,c.update(k.data),7);case 7:ua(x,6);break;case 5:return p=F(x),r=new M(2,6,6008,p.message),a.m(r),d&&d.Za&&d.Za.reject(r),x["return"]();case 6:if(a.j.g)return x["return"]();v=new L("drmsessionupdate");a.F.onEvent(v);d&&(d.Za&&d.Za.resolve(),y=new P(function(){d.loaded=
202
+ !0;Wf(a)&&a.B.resolve()}),y.P(ag));z(x)}})}function $f(a){var b=Qc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Yc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
202
203
  function Vf(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Qf(a.g.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Hc(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=$c(h);a.aa.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Za&&(a.i["delete"](c),c.close()["catch"](function(){}));
203
204
  Wf(a)&&(a.B.resolve(),a.R.P(bg))}function wf(a){var b=a.aa,c=a.ua;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.F.gd(tf(c))}
204
205
  function cg(){var a,b,c,d,e,f,g,h;return H(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
@@ -225,7 +226,7 @@ qg.prototype.fullBox=qg.prototype.U;qg.prototype.box=qg.prototype.box;var sg=0,t
225
226
  if(d)return a;if(0==g.length||!e)throw Za($c(a)),new M(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=Ag(a,e,k.box,f,k.Cc);return a}
226
227
  function Ag(a,b,c,d,e){var f=Bg.value(),g=a.subarray(c.start,c.start+c.size),h=Hc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Hc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Cg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=yd()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Cg(e,d.start,d.size+k.byteLength);k=Hc(e,b.start);b=vg(b);a=k.getUint32(b);
227
228
  k.setUint32(b,a+1);return e}function Cg(a,b,c){a=Hc(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 Bg=new Mc(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 Dg(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Eg(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,v=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){r=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){v=y;break}if(-1===
228
- r||-1===v)p=Fg(d,e),a.nestedCues.push(p);else{for(;r<=v;r++)if(y=p[r]){var w=y.l,x=y.i,C=y.j,D=y.h;if(w!=h||x!=k||C!=l||D!=m)n.payload&&a.nestedCues.push(n),n=Eg(d,e,w,x,C,D),h=w,k=x,l=C,m=D;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Fg(d,e),a.nestedCues.push(n));n=Eg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
229
+ r||-1===v)p=Fg(d,e),a.nestedCues.push(p);else{for(;r<=v;r++)if(y=p[r]){var x=y.l,w=y.i,C=y.j,D=y.h;if(x!=h||w!=k||C!=l||D!=m)n.payload&&a.nestedCues.push(n),n=Eg(d,e,x,w,C,D),h=x,k=w,l=C,m=D;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Fg(d,e),a.nestedCues.push(n));n=Eg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
229
230
  function Eg(a,b,c,d,e,f){a=new hc(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Fg(a,b){var c=new hc(a,b,"");c.lineBreak=!0;return c}function Gg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Hg(a,b){this.i=[];this.g=1;this.h=0;this.B=a;this.A=b;this.j=this.m=!1;this.l="white";this.v="black";Ig(this)}function Jg(a,b,c){return Dg(new hc(b,c,""),"CC"+(a.B<<1|a.A+1),a.i,b,c)}function Ig(a){Kg(a,0,15);a.g=1}function Lg(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Mg:d=Ng.has(c)?Ng.get(c):String.fromCharCode(c);break;case Og:d=Pg.get(c);break;case Qg:a.i[a.g].pop();d=Rg.get(c);break;case Sg:a.i[a.g].pop(),d=Tg.get(c)}d&&a.i[a.g].push(new Gg(d,a.m,a.j,a.v,a.l))}}
230
231
  function Ug(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Kg(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
231
232
  var Mg=0,Og=1,Qg=2,Sg=3,Ng=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Pg=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Rg=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
@@ -244,12 +245,12 @@ d=1===(d&1);if(c.h!==Zg){f=c.g;if(c.h===Yg&&e!==f.g){var k=1+e-f.h;Ug(f,k,1+f.g-
244
245
  (e&246)&&32===(d&224))Lg(c.g,e&1?Sg:Qg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.hb){case 32:$g(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=Xg(c,2,d);break;case 38:e=Xg(c,3,d);break;case 39:e=Xg(c,4,d);break;case 40:Lg(c.g,Mg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Ig(c.v);bh(c);break;case 43:bh(c);break;case 44:e=c.i;g=null;c.h!==Zg&&(g=Jg(e,c.j,d));Kg(e,0,15);e=g;break;case 45:e=c.g;c.h!==Yg?e=null:(g=Jg(e,c.j,d),h=e.g-e.h+1,Ug(e,h-1,h,e.h),Kg(e,
245
246
  0,h-1),Kg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Kg(c.l,0,15);break;case 47:e=null,c.h!==Zg&&(e=Jg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,$g(c),c.j=d}d=e;break a}d=null}else e=b.hb,Lg(c.g,Mg,b.Pa),Lg(c.g,Mg,e);return d}
246
247
  function Dh(a,b){var c=[];try{for(;b.Fa();){var d=qh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=qh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new rh(e));for(var g=a.j.get(e),h=b.ea();b.ea()-h<f;){e=b;var k=qh(e),l=k.value,m=k.pts;if(16===l){var n=qh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var r=g.g;e=null;switch(l){case 8:!jh(r)||0>=r.g&&0>=r.h||(0>=r.g?(r.g=r.D-1,r.h--):r.g--,r.i[r.h][r.g]=null);break;case 13:r.isVisible()&&(e=kh(r,p,g.i));if(r.h+1>=r.G){p=r;for(var v=0,y=1;15>y;y++,
247
- v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=hh()}else r.h++;r.g=0;break;case 14:r.isVisible()&&(e=kh(r,p,g.i));r.i[r.h]=hh();r.g=0;break;case 12:r.isVisible()&&(e=kh(r,p,g.i)),gh(r),p=r,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=sh(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?ih(g.g,"\u266a"):ih(g.g,
248
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&ih(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(yh.has(e)){var x=yh.get(e);ih(g.g,x)}else ih(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?ih(g.g,"_"):ih(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(C){if(C instanceof M&&3E3===C.code)Ra("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function Eh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Fh(a,b){var c=null,d=null,e=a.O();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:e,Ke:c,Ff:d}}function Gh(a,b){return{Id:1==b?a.cc():a.O()}}function Hh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.O()}}
248
+ v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=hh()}else r.h++;r.g=0;break;case 14:r.isVisible()&&(e=kh(r,p,g.i));r.i[r.h]=hh();r.g=0;break;case 12:r.isVisible()&&(e=kh(r,p,g.i)),gh(r),p=r,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=sh(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?ih(g.g,"\u266a"):ih(g.g,
249
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&ih(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(yh.has(e)){var w=yh.get(e);ih(g.g,w)}else ih(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?ih(g.g,"_"):ih(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(C){if(C instanceof M&&3E3===C.code)Ra("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function Eh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Fh(a,b){var c=null,d=null,e=a.O();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:e,Ke:c,Ff:d}}function Gh(a,b){return{Id:1==b?a.cc():a.O()}}function Hh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.O()}}
249
250
  function Ih(a,b,c){var d=a.O(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={ce:null,sampleSize:null,md:null};c&256&&(g.ce=a.O());c&512&&(g.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(g.md=0==b?a.O():a.bf());e.push(g)}return{ji:d,ef:e}};function Jh(){this.i=new Map;this.h=this.g=0}
250
251
  Jh.prototype.init=function(a){var b=this,c=[],d=[];(new qg).box("moov",ug).box("mvex",ug).U("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.O();f=f.O();b.g=e;b.h=f}).box("trak",ug).U("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.O();c.push(e)}).box("mdia",ug).U("mdhd",function(e){e=Hh(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new M(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
251
- Jh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new qg).box("moof",ug).box("traf",ug).U("trun",function(k){f=Ih(k.reader,k.version,k.flags).ef}).U("tfhd",function(k){k=Fh(k.reader,k.flags);d=k.Ke||b.g;e=k.Ff||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).U("tfdt",function(k){g=Gh(k.reader,k.version).Id}).box("mdat",function(k){if(null===g)throw new M(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,r=f,v=0,y=p;for(r.length&&(y=r[0].sampleSize||p);k.Fa();){var w=k.O();if(6==
252
- (k.ha()&31)){var x=0;r.length>v&&(x=r[v].md||0);x=(l+x)/m;for(var C=[],D,B=k.ub(w-1),E=D=0;E<B.length;)2==D&&3==B[E]?(D=0,B=[].concat(ha(B)),B.splice(E,1),B=new Uint8Array(B)):0==B[E]?D++:D=0,E++;D=B;for(E=0;E<D.length;){for(B=0;255==D[E];)B+=255,E++;B+=D[E++];for(var G=0;255==D[E];)G+=255,E++;G+=D[E++];4==B&&C.push(D.subarray(E,E+G));E+=G}C=t(C);for(D=C.next();!D.done;D=C.next())c.push({zg:D.value,pts:x})}else try{k.skip(w-1)}catch(I){break}y-=w+4;0==y&&(l=r.length>v?l+(r[v].ce||n):l+n,v++,y=r.length>
252
+ Jh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new qg).box("moof",ug).box("traf",ug).U("trun",function(k){f=Ih(k.reader,k.version,k.flags).ef}).U("tfhd",function(k){k=Fh(k.reader,k.flags);d=k.Ke||b.g;e=k.Ff||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).U("tfdt",function(k){g=Gh(k.reader,k.version).Id}).box("mdat",function(k){if(null===g)throw new M(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,r=f,v=0,y=p;for(r.length&&(y=r[0].sampleSize||p);k.Fa();){var x=k.O();if(6==
253
+ (k.ha()&31)){var w=0;r.length>v&&(w=r[v].md||0);w=(l+w)/m;for(var C=[],D,B=k.ub(x-1),E=D=0;E<B.length;)2==D&&3==B[E]?(D=0,B=[].concat(ha(B)),B.splice(E,1),B=new Uint8Array(B)):0==B[E]?D++:D=0,E++;D=B;for(E=0;E<D.length;){for(B=0;255==D[E];)B+=255,E++;B+=D[E++];for(var G=0;255==D[E];)G+=255,E++;G+=D[E++];4==B&&C.push(D.subarray(E,E+G));E+=G}C=t(C);for(D=C.next();!D.done;D=C.next())c.push({zg:D.value,pts:w})}else try{k.skip(x-1)}catch(I){break}y-=x+4;0==y&&(l=r.length>v?l+(r[v].ce||n):l+n,v++,y=r.length>
253
254
  v?r[v].sampleSize||p:p)}}).parse(a,!1);return c};function Kh(){this.h=new Jh;this.g=new zh}Kh.prototype.init=function(a){this.h.init(a)};
254
255
  function Lh(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Ec(e.zg);if(0<f.length&&(d=a.g,e=e.pts,f=new ng(f,0),181===f.ha()&&49===f.bc()&&1195456820===f.O()&&3===f.ha())){var g=f.ha();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.ha(),l=(k&4)>>2,m=f.ha(),n=f.ha();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Pa:m,hb:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return Bh(a.g)}
255
256
  ;function Mh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Nh(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function Oh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(Ph(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
@@ -306,14 +307,14 @@ case 7:f=Array.from(a.h.values());if(!a.D||!f.every(function(k){return k.endOfSt
306
307
  function rj(a,b){if(tj(b))return ei(a.g.T,b.stream.originalId||""),null;b.type==Lb&&fi(a.g.T);var c=a.g.Yc(),d=b.Qa?b.Qa.endTime:c,e=ai(a.g.T,b.type,c),f=Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal,a.j.bufferingGoal)*a.B;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.h.get(Lb))&&tj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.j.updateIntervalSeconds/2;e=$h(a.g.T,b.type);e=uj(a,b,c,e);if(!e)return a.j.updateIntervalSeconds;f=Infinity;
307
308
  var g=Array.from(a.h.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,tj(h)||h.oa&&!h.oa.current()||(f=Math.min(f,h.Qa?h.Qa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.j.updateIntervalSeconds;vj(a,b,c,e)["catch"](function(){});return null}
308
309
  function uj(a,b,c,d){if(b.oa)return b.oa.current();if(b.Qa||d)return b.oa=b.stream.segmentIndex.Bb(b.Qa?b.Qa.endTime:d),b.oa&&b.oa.next().value;a=a.j.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.oa=b.stream.segmentIndex.Bb(d),e=b.oa&&b.oa.next().value);e||(b.oa=b.stream.segmentIndex.Bb(c),e=b.oa&&b.oa.next().value);return e}
309
- function vj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,v,y;return H(function(w){switch(w.g){case 1:return e=Mb,f=b.stream,g=b.oa,b.Xa=!0,A(w,2),u(w,wj(a,b,d),4);case 4:jf(a.i);if(a.A)return w["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.j.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(x){var C,D,B;return H(function(E){jf(a.i);if(a.A)return E["return"]();n=xj(n,x);C=!1;D=0;(new qg).box("mdat",function(G){D=G.size+G.start;C=!0}).parse(n,!1,!0);if(!C)return E.C(0);
310
- B=n.subarray(0,D);n=n.subarray(D);return u(E,yj(a,b,c,f,d,B),0)})},u(w,zj(a,b,d,p),6);l=zj(a,b,d);return u(w,l,7);case 7:return m=w.h,jf(a.i),a.A?w["return"]():b.Nb?(b.Xa=!1,hj(a,b,0),w["return"]()):u(w,yj(a,b,c,f,d,m),6);case 6:jf(a.i);if(a.A)return w["return"]();b.Qa=d;g.next();b.Xa=!1;b.$d=!1;r=a.g.T.Vc();v=r[b.type];Xa(JSON.stringify(v));b.Nb||a.g.Xd();hj(a,b,0);ua(w,0);break;case 2:y=F(w);jf(a.i,y);if(a.A)return w["return"]();b.Xa=!1;if(7001==y.code)b.Xa=!1,b.$a=null,hj(a,b,0),w.C(0);else if(b.type==
311
- e.ka&&a.j.ignoreTextStreamFailures)a.h["delete"](e.ka),w.C(0);else if(3017==y.code)Aj(a,b,y),w.C(0);else if(1001==y.code&&y.data&&404==y.data[1])b.Xa=!1,b.$a=null,hj(a,b,1),w.C(0);else return b.yc=!0,y.severity=2,u(w,sj(a,y),0)}})}function xj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
310
+ function vj(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,v,y;return H(function(x){switch(x.g){case 1:return e=Mb,f=b.stream,g=b.oa,b.Xa=!0,A(x,2),u(x,wj(a,b,d),4);case 4:jf(a.i);if(a.A)return x["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.j.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(w){var C,D,B;return H(function(E){jf(a.i);if(a.A)return E["return"]();n=xj(n,w);C=!1;D=0;(new qg).box("mdat",function(G){D=G.size+G.start;C=!0}).parse(n,!1,!0);if(!C)return E.C(0);
311
+ B=n.subarray(0,D);n=n.subarray(D);return u(E,yj(a,b,c,f,d,B),0)})},u(x,zj(a,b,d,p),6);l=zj(a,b,d);return u(x,l,7);case 7:return m=x.h,jf(a.i),a.A?x["return"]():b.Nb?(b.Xa=!1,hj(a,b,0),x["return"]()):u(x,yj(a,b,c,f,d,m),6);case 6:jf(a.i);if(a.A)return x["return"]();b.Qa=d;g.next();b.Xa=!1;b.$d=!1;r=a.g.T.Vc();v=r[b.type];Xa(JSON.stringify(v));b.Nb||a.g.Xd();hj(a,b,0);ua(x,0);break;case 2:y=F(x);jf(a.i,y);if(a.A)return x["return"]();b.Xa=!1;if(7001==y.code)b.Xa=!1,b.$a=null,hj(a,b,0),x.C(0);else if(b.type==
312
+ e.ka&&a.j.ignoreTextStreamFailures)a.h["delete"](e.ka),x.C(0);else if(3017==y.code)Aj(a,b,y),x.C(0);else if(1001==y.code&&y.data&&404==y.data[1])b.Xa=!1,b.$a=null,hj(a,b,1),x.C(0);else return b.yc=!0,y.severity=2,u(x,sj(a,y),0)}})}function xj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
312
313
  function Aj(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.$d})){var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.yc=!0;a.A=!0;a.g.onError(c);return}b.$d=!0}hj(a,b,4)}
313
314
  function wj(a,b,c){var d,e,f,g,h,k,l;return H(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Nd||e!=b.Md||f!=b.Ld)h=function(){var n;return H(function(p){if(1==p.g)return A(p,2),b.Md=e,b.Ld=f,b.Nd=g,u(p,hi(a.g.T,b.type,g,e,f),4);if(2!=p.g)return ua(p,0);n=F(p);b.Md=null;b.Ld=null;b.Nd=null;throw n;})},d.push(h());!mi(c.h,b.dd)&&(b.dd=c.h)&&(k=zj(a,b,c.h),l=function(){var n,p,r;return H(function(v){switch(v.g){case 1:return A(v,2),u(v,k,4);
314
315
  case 4:return n=v.h,jf(a.i),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,bi(a.g.T,b.type,n,null,null,p),5);case 5:ua(v,0);break;case 2:throw r=F(v),b.dd=null,r;}})},d.push(l()));return u(m,Promise.all(d),0)})}
315
- function yj(a,b,c,d,e,f){var g;return H(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new qg).U("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Dc();var n=k.reader.Dc();var p=k.reader.O();var r=k.reader.O();var v=k.reader.O();var y=k.reader.O();var w=e.startTime+r/p}else p=k.reader.O(),w=k.reader.cc()/p+e.timestampOffset,r=w-e.startTime,v=k.reader.O(),y=k.reader.O(),m=k.reader.Dc(),n=k.reader.Dc();
316
- k=k.reader.ub(k.reader.S.byteLength-k.reader.ea());l&&l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.g.yg():(l=(new Map).set("detail",{startTime:w,endTime:w+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:r,eventDuration:v,id:y,messageData:k}),l=new L(Bj,l),a.g.onEvent(l)))}).parse(f),u(h,Cj(a,b,c),2);if(3!=h.g)return jf(a.i),u(h,bi(a.g.T,b.type,f,e.startTime,e.endTime,g),3);jf(a.i);z(h)})}
316
+ function yj(a,b,c,d,e,f){var g;return H(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new qg).U("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Dc();var n=k.reader.Dc();var p=k.reader.O();var r=k.reader.O();var v=k.reader.O();var y=k.reader.O();var x=e.startTime+r/p}else p=k.reader.O(),x=k.reader.cc()/p+e.timestampOffset,r=x-e.startTime,v=k.reader.O(),y=k.reader.O(),m=k.reader.Dc(),n=k.reader.Dc();
317
+ k=k.reader.ub(k.reader.S.byteLength-k.reader.ea());l&&l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.g.yg():(l=(new Map).set("detail",{startTime:x,endTime:x+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:r,eventDuration:v,id:y,messageData:k}),l=new L(Bj,l),a.g.onEvent(l)))}).parse(f),u(h,Cj(a,b,c),2);if(3!=h.g)return jf(a.i),u(h,bi(a.g.T,b.type,f,e.startTime,e.endTime,g),3);jf(a.i);z(h)})}
317
318
  function Cj(a,b,c){var d,e,f,g;return H(function(h){if(1==h.g){d=Math.max(a.j.bufferBehind,a.m.presentationTimeline.g);e=Yh(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)}jf(a.i);z(h)})}function tj(a){return a&&a.type==Lb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
318
319
  function zj(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g)return e=gf,f=$i(c.Ea(),c.ya,c.ra,a.j.retryParameters,d),g=a.g.Jb.request(e,f),b.La=g,u(k,g.promise,2);h=k.h;b.La=null;return k["return"](h.data)})}
319
320
  function nj(a,b,c,d){var e,f;return H(function(g){if(1==g.g)return b.Nb=!1,b.rd=!1,b.Rc=0,b.qc=!0,b.Qa=null,b.dd=null,b.oa=null,d?(e=a.g.Yc(),f=a.g.T.getDuration(),u(g,a.g.T.remove(b.type,e+d,f),3)):u(g,gi(a.g.T,b.type),4);if(3!=g.g)return jf(a.i),c?u(g,a.g.T.flush(b.type),3):g.C(3);jf(a.i);b.qc=!1;b.endOfStream=!1;hj(a,b,0);z(g)})}
@@ -372,10 +373,10 @@ function vk(a,b){var c=b.uri,d=a.G;a.cd=new Xi(function(){return a.Ja()});a.cd.a
372
373
  l;break a}k=null}null==k&&(h.g.add(g),g=new L("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Nk(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Me(function(){var g,h,k,l;return H(function(m){if(1==m.g)return g=a,u(m,
373
374
  a.I.start(c,e),2);g.i=m.h;h=Bk(Wk);a.dispatchEvent(h);if(0==a.i.variants.length)throw new M(2,4,4036);Xk(a.i);k=Date.now()/1E3;l=k-f;a.A.F=l;z(m)})}(),function(){return a.I.stop()})}
374
375
  function wk(a,b){var c,d;return H(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Yk(a,{Jb:a.G,onError:function(f){Nk(a,f)},gd:function(f){Zk(a,f)},onExpirationUpdated:function(f,g){$k(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==al&&d&&(d=!1,a.A.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,Cf(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.pc(b.K),3):u(e,Uk(a,a.i),0)})}
375
- function xk(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v;return H(function(y){switch(y.g){case 1:b.startTime=c.startTime;d=b.K;e=b.uri;a.cb=e;a.H=new Qi({Zc:function(){return d.playbackRate},Wc:function(){return d.defaultPlaybackRate},me:function(w){d.playbackRate=w},Ze:function(w){d.currentTime+=w}});f=function(){return bl(a)};g=function(){return cl(a)};a.v.o(d,"playing",f);a.v.o(d,"pause",f);a.v.o(d,"ended",f);a.v.o(d,"ratechange",g);h=a.h.abrFactory;a.B&&a.Od==h||(a.Od=h,a.B=Fb(h),"function"!=typeof a.B.playbackRateChanged&&
376
- (yb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.B.playbackRateChanged=function(){}),a.B.configure(a.h.abr));a.qa=new Be(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.va=a.h.preferredTextLanguage;a.ab=a.h.preferredTextRole;a.gb=a.h.preferForcedSubs;dl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(w,x,C){a.j&&w!=a.j.l&&el(a,w,!0,void 0===x?!1:x,void 0===C?0:C)});a.F=fl(a,b.startTime);a.Ba=gl(a);
377
- k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);hl(a,k);Hd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=il(a);a.j.configure(a.h.streaming);a.l=jl;d.textTracks&&a.v.o(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "chapters":kl(a,w)}});a.dispatchEvent(Bk(ll));l=null;if(m=a.Db().find(function(w){return w.active})){y.C(2);break}l=ml(a)?a.B.chooseVariant():null;el(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.C(3);
378
- break}n=a.F.m();return u(y,nl(l,n),4);case 4:p=y.h,a.F.v(p);case 3:ol(a,null,fe(l));case 2:return r=a.kb().find(function(w){return w.active}),r||((v=pe(a.i.textStreams,a.va,a.ab,a.gb)[0]||null)&&lk(a.A.h,v,!0),l&&(v?(l.audio&&pl(a,l.audio,v)&&(a.$=!0),a.$&&a.M.l.setTextVisibility(!0),ql(a)):a.$=!1),v&&(a.h.streaming.alwaysStreamText||a.Ib())&&mj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.B.enable(),rl(a)),Xd(a.j?a.j.l:null,a.i),sl(a.i),tl(a),ml(a),a.i.variants.some(function(w){return w.primary}),
376
+ function xk(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v;return H(function(y){switch(y.g){case 1:b.startTime=c.startTime;d=b.K;e=b.uri;a.cb=e;a.H=new Qi({Zc:function(){return d.playbackRate},Wc:function(){return d.defaultPlaybackRate},me:function(x){d.playbackRate=x},Ze:function(x){d.currentTime+=x}});f=function(){return bl(a)};g=function(){return cl(a)};a.v.o(d,"playing",f);a.v.o(d,"pause",f);a.v.o(d,"ended",f);a.v.o(d,"ratechange",g);h=a.h.abrFactory;a.B&&a.Od==h||(a.Od=h,a.B=Fb(h),"function"!=typeof a.B.playbackRateChanged&&
377
+ (yb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.B.playbackRateChanged=function(){}),a.B.configure(a.h.abr));a.qa=new Be(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.va=a.h.preferredTextLanguage;a.ab=a.h.preferredTextRole;a.gb=a.h.preferForcedSubs;dl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(x,w,C){a.j&&x!=a.j.l&&el(a,x,!0,void 0===w?!1:w,void 0===C?0:C)});a.F=fl(a,b.startTime);a.Ba=gl(a);
378
+ k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);hl(a,k);Hd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=il(a);a.j.configure(a.h.streaming);a.l=jl;d.textTracks&&a.v.o(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":kl(a,x)}});a.dispatchEvent(Bk(ll));l=null;if(m=a.Db().find(function(x){return x.active})){y.C(2);break}l=ml(a)?a.B.chooseVariant():null;el(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.C(3);
379
+ break}n=a.F.m();return u(y,nl(l,n),4);case 4:p=y.h,a.F.v(p);case 3:ol(a,null,fe(l));case 2:return r=a.kb().find(function(x){return x.active}),r||((v=pe(a.i.textStreams,a.va,a.ab,a.gb)[0]||null)&&lk(a.A.h,v,!0),l&&(v?(l.audio&&pl(a,l.audio,v)&&(a.$=!0),a.$&&a.M.l.setTextVisibility(!0),ql(a)):a.$=!1),v&&(a.h.streaming.alwaysStreamText||a.Ib())&&mj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.B.enable(),rl(a)),Xd(a.j?a.j.l:null,a.i),sl(a.i),tl(a),ml(a),a.i.variants.some(function(x){return x.primary}),
379
380
  a.v.Ga(d,"loadedmetadata",function(){a.A.l=Date.now()/1E3-c.se}),z(y)}})}
380
381
  function yk(a,b,c){var d,e,f,g,h,k,l;return H(function(m){return 1==m.g?(d=Mb,e=Date.now()/1E3,f=!0,a.m=Yk(a,{Jb:a.G,onError:function(n){Nk(a,n)},gd:function(n){Zk(a,n)},onExpirationUpdated:function(n,p){$k(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==al&&f&&(f=!1,a.A.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=kg(g),k=Lk[h],"application/x-mpegurl"==k&&Dd()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
381
382
  createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?kd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.bb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.W=!0,u(m,Cf(a.m,[l],[]),2)):u(m,a.m.pc(b.K),
@@ -402,8 +403,8 @@ q.Ja=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Wb()
402
403
  q.Bc=function(){return this.J?this.J.g==He:!1};q.vc=function(){return this.g?this.H?this.H.i:1:0};q.we=function(a){0==a?Pa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.H.set(a),this.l==jl&&(this.B.playbackRateChanged(a),jj(this.j,1<Math.abs(a))))};q.De=function(){var a=this.H.Wc();this.l==vl&&this.H.set(a);this.l==jl&&(this.H.set(a),this.B.playbackRateChanged(a),jj(this.j,!1))};
403
404
  q.Db=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,ne(e)){var f=fe(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 me(g)}):[]};
404
405
  q.kb=function(){if(this.i){for(var a=this.j?this.j.v:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ge(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?xl(this).map(function(f){return ke(f)}):[]};q.Tf=function(){return this.i?this.i.imageStreams.map(function(a){return he(a)}):[]};
405
- q.jg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,v,y,w,x,C,D,B;return H(function(E){if(1==E.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?E.C(3):u(E,d.createSegmentIndex(),3):E["return"](null):E.C(2);if(2!=E.g){e=d.segmentIndex.find(b);if(null==e)return E["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return E["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;r=l/n;
406
- v=m*n;y=f.l-f.startTime;w=f.i||y/v;x=f.startTime;D=C=0;1<v&&(B=Math.floor((b-f.startTime)/w),x=f.startTime+B*w,C=B%m*p,D=Math.floor(B/m)*r);return E["return"]({imageHeight:l,imageWidth:k,height:r,positionX:C,positionY:D,startTime:x,duration:w,uris:f.Ea(),width:p})}return E["return"](null)})};
406
+ q.jg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B;return H(function(E){if(1==E.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?E.C(3):u(E,d.createSegmentIndex(),3):E["return"](null):E.C(2);if(2!=E.g){e=d.segmentIndex.find(b);if(null==e)return E["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return E["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;r=l/n;
407
+ v=m*n;y=f.l-f.startTime;x=f.i||y/v;w=f.startTime;D=C=0;1<v&&(B=Math.floor((b-f.startTime)/x),w=f.startTime+B*x,C=B%m*p,D=Math.floor(B/m)*r);return E["return"]({imageHeight:l,imageWidth:k,height:r,positionX:C,positionY:D,startTime:w,duration:x,uris:f.Ea(),width:p})}return E["return"](null)})};
407
408
  q.fe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.v&&(lk(this.A.h,b,!1),mj(this.j,b),Hl(this),this.va=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=xl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ie(c)==a.id?c.mode=this.$?"showing":"hidden":c.mode="disabled";Hl(this)}};
408
409
  q.ge=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&&Pa("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&&ne(d)&&(el(this,d,!1,b,c),this.qa=new ze(d),ml(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
409
410
  ie(c)==a.id){Il(this,c);break}};q.Jf=function(){return Jl(this.Db())};q.ig=function(){return Jl(this.kb())};q.If=function(){return Array.from(Kl(this.Db()))};q.hg=function(){return Array.from(Kl(this.kb()))};
@@ -418,14 +419,14 @@ q.dg=function(){if(!this.V())return null;var a=this.aa.l,b=0;if(this.F)b=this.F.
418
419
  q.Re=function(){if(!this.V())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.Vc=function(){if(this.l==jl)return this.M.Vc();var a={total:[],audio:[],video:[],text:[]};this.l==vl&&(a.total=Ph(this.g.buffered));return a};
419
420
  q.getStats=function(){if(this.l!=jl&&this.l!=vl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};bl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.A;b=Math.round(100*b);c.i=isNaN(c.i)?
420
421
  b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.A,b=Number(a.totalVideoFrames),c.J=Number(a.droppedVideoFrames),c.I=b,this.A.H=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.H?a.H:NaN):a=NaN;this.A.m=a;if(this.l==jl){if(a=this.j.l)this.A.A=(this.H?this.H.i:1)*a.bandwidth;a&&a.video&&(c=this.A,b=a.video.height||NaN,c.M=a.video.width||NaN,c.B=b);this.V()&&(a=this.Re().valueOf()+1E3*this.Ja().end,this.A.D=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
421
- (this.A.G=this.i.presentationTimeline.g);a=this.B.getBandwidthEstimate();this.A.v=a}var d=this.A;a=d.M;c=d.B;b=d.A;var e=d.I,f=d.J,g=d.H,h=d.v,k=d.i,l=d.l,m=d.F,n=d.j,p=ik(d.g,"playing"),r=ik(d.g,"paused"),v=ik(d.g,"buffering"),y=d.m,w=d.D,x=d.G,C=jk(d.g),D=[];d=t(d.h.g);for(var B=d.next();!B.done;B=d.next())B=B.value,D.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
422
- estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:r,bufferingTime:v,licenseTime:y,liveLatency:w,maxSegmentDuration:x,stateHistory:C,switchHistory:D}};
422
+ (this.A.G=this.i.presentationTimeline.g);a=this.B.getBandwidthEstimate();this.A.v=a}var d=this.A;a=d.M;c=d.B;b=d.A;var e=d.I,f=d.J,g=d.H,h=d.v,k=d.i,l=d.l,m=d.F,n=d.j,p=ik(d.g,"playing"),r=ik(d.g,"paused"),v=ik(d.g,"buffering"),y=d.m,x=d.D,w=d.G,C=jk(d.g),D=[];d=t(d.h.g);for(var B=d.next();!B.done;B=d.next())B=B.value,D.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
423
+ estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:r,bufferingTime:v,licenseTime:y,liveLatency:x,maxSegmentDuration:w,stateHistory:C,switchHistory:D}};
423
424
  q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;yb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=jl&&this.l!=vl)throw new M(1,7,7004);if(!d){var h=kg(a);d=Ml[h];if(!d)throw new M(1,2,2011,h);}if(this.l==vl){if("text/vtt"!=d)throw new M(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=a;d.label=f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.kb().find(function(k){return k.language==
424
425
  b&&k.label==(f||"")&&k.kind==c}))return tl(this),a;throw new M(1,2,2012);}h=this.i.presentationTimeline.getDuration();if(Infinity==h)throw new M(1,4,4033);a={id:this.be++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Oi(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:Lb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,
425
426
  closedCaptions:null};if(!md(gd(a.mimeType,a.codecs)))throw new M(2,2,2014,d);this.i.textStreams.push(a);tl(this);return ge(a)};
426
- q.yf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,v,y,w,x,C;return H(function(D){switch(D.g){case 1:if(h.l!=jl&&h.l!=vl)throw new M(1,7,7004);if(d){D.C(2);break}return u(D,Nl(h,a),3);case 3:d=D.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(B){}if(h.l!=vl){D.C(4);break}g&&(c="forced");return u(D,Ol(h,a,b,c,d,f||"",k),5);case 5:l=h.kb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return tl(h),D["return"](m);throw new M(1,2,2012);case 4:n=
427
- Mb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new M(1,4,4033);if(!k.length){D.C(6);break}return u(D,Pl(a,h.G,h.h.streaming.retryParameters),7);case 7:r=D.h,v=Ql(h,r,d,k),y=new Blob([v],{type:"text/vtt"}),a=Uh(y),d="text/vtt";case 6:w={id:h.be++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Oi(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.ka,primary:!1,trickModeVideo:null,
428
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};x=gd(w.mimeType,w.codecs);C=md(x);if(!C)throw new M(2,2,2014,d);h.i.textStreams.push(w);tl(h);return D["return"](ge(w))}})};
427
+ q.yf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,v,y,x,w,C;return H(function(D){switch(D.g){case 1:if(h.l!=jl&&h.l!=vl)throw new M(1,7,7004);if(d){D.C(2);break}return u(D,Nl(h,a),3);case 3:d=D.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(B){}if(h.l!=vl){D.C(4);break}g&&(c="forced");return u(D,Ol(h,a,b,c,d,f||"",k),5);case 5:l=h.kb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return tl(h),D["return"](m);throw new M(1,2,2012);case 4:n=
428
+ Mb;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new M(1,4,4033);if(!k.length){D.C(6);break}return u(D,Pl(a,h.G,h.h.streaming.retryParameters),7);case 7:r=D.h,v=Ql(h,r,d,k),y=new Blob([v],{type:"text/vtt"}),a=Uh(y),d="text/vtt";case 6:x={id:h.be++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Oi(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.ka,primary:!1,trickModeVideo:null,
429
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=gd(x.mimeType,x.codecs);C=md(w);if(!C)throw new M(2,2,2014,d);h.i.textStreams.push(x);tl(h);return D["return"](ge(x))}})};
429
430
  q.xf=function(a,b,c){var d=this,e,f,g,h;return H(function(k){switch(k.g){case 1:if(d.l!=jl&&d.l!=vl)throw new M(1,7,7004);if(c){k.C(2);break}return u(k,Nl(d,a),3);case 3:c=k.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(l){}return u(k,Ol(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Oe();h=g.find(function(l){return l.language==b});if(!h){k.C(5);break}return u(k,new Promise(function(l,m){d.v.Ga(f,"load",l);d.v.Ga(f,"error",function(){m(new M(1,2,2015))})}),6);case 6:return k["return"](h);
430
431
  case 5:throw new M(1,2,2012);}})};function Nl(a,b){var c,d;return H(function(e){switch(e.g){case 1:c=kg(b);if(d=Ml[c])return e["return"](d);A(e,2);return u(e,mg(b,a.G,a.h.streaming.retryParameters),4);case 4:d=e.h;ua(e,3);break;case 2:F(e);case 3:if(d)return e["return"](d);throw new M(1,2,2011,c);}})}
431
432
  function Ol(a,b,c,d,e,f,g){var h,k,l,m;return H(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,Pl(b,a.G,a.h.streaming.retryParameters),3):n.C(2);2!=n.g&&(h=n.h,k=Ql(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Uh(l),e="text/vtt");m=document.createElement("track");m.src=b;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}
@@ -459,13 +460,13 @@ S.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return H(function(h
459
460
  vd()?!!lg[p]:wd(l[p]);c=k;k={};p=t('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
460
461
  for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=vd()?md(l)?!0:MediaSource.isTypeSupported(l)||cd(l):wd(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=fm;for(g in f)e[g]=f[g]();return h["return"](e)})};S.isBrowserSupported=Fk;S.setAdManagerFactory=function(a){qk=a};S.registerSupportPlugin=function(a,b){fm[a]=b};S.prototype.destroy=S.prototype.destroy;
461
462
  var bm="abrstatuschanged",Wl="adaptation",Tl="buffering",al="drmsessionupdate",Bj="emsg",cm="error",em="expirationupdated",Kk="loaded",Ik="loading",Wk="manifestparsed",Al="metadata",Ck="onstatechange",Dk="onstateidle",Ul="ratechange",ll="streaming",$l="textchanged",am="texttrackvisibility",Tk="timelineregionadded",Cl="timelineregionenter",Dl="timelineregionexit",Yl="trackschanged",Ok="unloading",Zl="variantchanged",gm={$g:bm,ah:Wl,bh:Tl,fh:al,mh:Bj,Error:cm,nh:em,sh:"largegap",uh:Kk,vh:Ik,Ah:Wk,Metadata:Al,
462
- Eh:Ck,Fh:Dk,Nh:Ul,Rh:"sessiondata",Sh:ll,Th:$l,Uh:am,Vh:Tk,Wh:Cl,Xh:Dl,Yh:Yl,bi:Ok,di:Zl},Ek=0,nk=1,jl=2,vl=3;S.LoadMode={DESTROYED:Ek,NOT_LOADED:nk,MEDIA_SOURCE:jl,SRC_EQUALS:vl};S.version="v3.2.8";var hm=["3","2"];zb=new function(a){this.g=a;this.i=Ab;this.h=Bb}(new xb(Number(hm[0]),Number(hm[1])));
463
+ Eh:Ck,Fh:Dk,Nh:Ul,Rh:"sessiondata",Sh:ll,Th:$l,Uh:am,Vh:Tk,Wh:Cl,Xh:Dl,Yh:Yl,bi:Ok,di:Zl},Ek=0,nk=1,jl=2,vl=3;S.LoadMode={DESTROYED:Ek,NOT_LOADED:nk,MEDIA_SOURCE:jl,SRC_EQUALS:vl};S.version="v3.2.9";var hm=["3","2"];zb=new function(a){this.g=a;this.i=Ab;this.h=Bb}(new xb(Number(hm[0]),Number(hm[1])));
463
464
  var dm=["output-restricted","internal-error"],fm={},qk=null,Lk={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"},Ml={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
464
465
  ssa:"text/x-ssa",ass:"text/x-ssa"};function im(){this.h=[];this.j=this.i=this.g=0};function jm(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new kf;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}q=jm.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};
465
466
  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()};
466
467
  q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};J("shaka.ads.ClientSideAd",jm);
467
468
  jm.prototype.release=jm.prototype.release;jm.prototype.getPositionInSequence=jm.prototype.getPositionInSequence;jm.prototype.getSequenceLength=jm.prototype.getSequenceLength;jm.prototype.setMuted=jm.prototype.setMuted;jm.prototype.resize=jm.prototype.resize;jm.prototype.isMuted=jm.prototype.isMuted;jm.prototype.setVolume=jm.prototype.setVolume;jm.prototype.getVolume=jm.prototype.getVolume;jm.prototype.play=jm.prototype.play;jm.prototype.pause=jm.prototype.pause;jm.prototype.skip=jm.prototype.skip;
468
- jm.prototype.canSkipNow=jm.prototype.canSkipNow;jm.prototype.getTimeUntilSkippable=jm.prototype.getTimeUntilSkippable;jm.prototype.isSkippable=jm.prototype.isSkippable;jm.prototype.isPaused=jm.prototype.isPaused;jm.prototype.getRemainingTime=jm.prototype.getRemainingTime;jm.prototype.getMinSuggestedDuration=jm.prototype.getMinSuggestedDuration;jm.prototype.getDuration=jm.prototype.getDuration;function km(a,b,c,d){var e=this;this.m=a;this.i=b;this.A=null;this.B=NaN;this.j=d;this.v=null;this.h=new kf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.8");this.g=null;this.h.Ga(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){lm(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
469
+ jm.prototype.canSkipNow=jm.prototype.canSkipNow;jm.prototype.getTimeUntilSkippable=jm.prototype.getTimeUntilSkippable;jm.prototype.isSkippable=jm.prototype.isSkippable;jm.prototype.isPaused=jm.prototype.isPaused;jm.prototype.getRemainingTime=jm.prototype.getRemainingTime;jm.prototype.getMinSuggestedDuration=jm.prototype.getMinSuggestedDuration;jm.prototype.getDuration=jm.prototype.getDuration;function km(a,b,c,d){var e=this;this.m=a;this.i=b;this.A=null;this.B=NaN;this.j=d;this.v=null;this.h=new kf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.9");this.g=null;this.h.Ga(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){lm(e,f)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
469
470
  function(f){mm(e,f)});this.i.onended=function(){e.l.contentComplete()}}km.prototype.stop=function(){this.g&&this.g.stop();this.m&&Pj(this.m)};km.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function mm(a,b){b.getError();nm(a,null);a.j(new L("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
470
471
  function lm(a,b){a.j(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.B)));a.g=b.getAdsManager(a.i);a.j(new L("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new L("ad-cue-points-changed",(new Map).set("cuepoints",d)))}om(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
471
472
  a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)),a.g.start()}catch(f){nm(a,null)}}
@@ -486,8 +487,8 @@ f;e.i(new L("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}rm.prototyp
486
487
  function sm(a,b){a.i(new L("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.G||a.h.o(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.v=d,a.l.currentTime=e.start)}})};function T(){db.call(this);this.g=this.i=null;this.h=new im;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 km(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)})};
487
488
  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 im};q.requestClientSideAds=function(a){if(!this.i)throw new M(1,10,10001);var b=this.i;b.B=Date.now()/1E3;b.l.requestAds(a)};
488
489
  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 rm(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)})};
489
- 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)&&Pa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.2.8";c=this.g;var d=b;c.j?c=Promise.reject(new M(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
490
- (c.G=!0),c.j=new Lc,c.g.requestStream(a),c.D=d||"",c.H=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new M(1,10,10003);(a.mpt||a.mpv)&&Pa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.2.8";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new M(1,10,10003);return this.g.F};
490
+ 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)&&Pa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.2.9";c=this.g;var d=b;c.j?c=Promise.reject(new M(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
491
+ (c.G=!0),c.j=new Lc,c.g.requestStream(a),c.D=d||"",c.H=Date.now()/1E3,c=c.j);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new M(1,10,10003);(a.mpt||a.mpv)&&Pa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.2.9";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new M(1,10,10003);return this.g.F};
491
492
  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)};J("shaka.ads.AdManager",T);
492
493
  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;
493
494
  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";
@@ -503,9 +504,9 @@ for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};
503
504
  q.init=function(){if(this.H.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.za();var a=new chrome.cast.SessionRequest(this.H);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Im),d=c.next();!d.done;d=c.next())Mm(d.value,b)},function(b){for(var c=t(Im),d=c.next();!d.done;d=c.next())d=d.value,Nm="available"==b,d.j.za()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Nm&&this.j.P(Om);(a=Km)&&a.status!=chrome.cast.SessionStatus.STOPPED?Mm(this,
504
505
  a):Km=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Pm),window.__onGCastApiAvailable!=Pm&&Pa("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.ie=function(a){this.v=a;this.h&&Qm(this,{type:"appData",appData:this.v})};
505
506
  q.cast=function(a){var b=this;return H(function(c){if(!b.m)throw new M(1,8,8E3);if(!Nm)throw new M(1,8,8001);if(b.h)throw new M(1,8,8002);b.l=new Lc;chrome.cast.requestSession(function(d){return Rm(b,a,d)},function(d){return Sm(b,d)});return u(c,b.l,0)})};function Tm(a){if(a.h){var b=a.J();chrome.cast.requestSession(function(c){return Rm(a,b,c)},function(c){return Sm(a,c)})}}q.Tb=function(){if(this.h){Jm(this);if(Km){Lm(this);try{Km.stop(function(){},function(){})}catch(a){}Km=null}Hm(this)}};
506
- q.get=function(a,b){var c=this;if("video"==a){if(zm.includes(b))return function(){return c.cf.apply(c,[a,b].concat(ha(Fa.apply(0,arguments))))}}else if("player"==a){if(Bm[b]&&!this.get("player","isLive")())return function(){};if(Em.includes(b))return function(){return c.cf.apply(c,[a,b].concat(ha(Fa.apply(0,arguments))))};if(Fm.includes(b))return function(){return c.Fg.apply(c,[a,b].concat(ha(Fa.apply(0,arguments))))};if(Am[b])return function(){return c.g[a][b]}}return this.g[a][b]};
507
+ q.get=function(a,b){var c=this;if("video"==a){if(zm.includes(b))return function(){return c.cf.apply(c,[a,b].concat(ha(Ea.apply(0,arguments))))}}else if("player"==a){if(Bm[b]&&!this.get("player","isLive")())return function(){};if(Em.includes(b))return function(){return c.cf.apply(c,[a,b].concat(ha(Ea.apply(0,arguments))))};if(Fm.includes(b))return function(){return c.Fg.apply(c,[a,b].concat(ha(Ea.apply(0,arguments))))};if(Am[b])return function(){return c.g[a][b]}}return this.g[a][b]};
507
508
  q.set=function(a,b,c){this.g[a][b]=c;Qm(this,{type:"set",targetName:a,property:b,value:c})};function Rm(a,b,c){Km=c;c.addUpdateListener(a.D);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.F);Hm(a);Qm(a,{type:"init",initState:b,appData:a.v});a.l.resolve()}function Sm(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))}
508
- q.cf=function(a,b){Qm(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};q.Fg=function(a,b){var c=Fa.apply(2,arguments),d=new Lc,e=this.I.toString();this.I++;this.i[e]=d;try{Qm(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Mm(a,b){var c=a.J();a.l=new Lc;a.B=!0;Rm(a,c,b)}function Lm(a){var b=Km;b.removeUpdateListener(a.D);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.F)}
509
+ q.cf=function(a,b){Qm(this,{type:"call",targetName:a,methodName:b,args:Ea.apply(2,arguments)})};q.Fg=function(a,b){var c=Ea.apply(2,arguments),d=new Lc,e=this.I.toString();this.I++;this.i[e]=d;try{Qm(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Mm(a,b){var c=a.J();a.l=new Lc;a.B=!0;Rm(a,c,b)}function Lm(a){var b=Km;b.removeUpdateListener(a.D);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.F)}
509
510
  function Hm(a){var b=Km?"connected"==Km.status:!1;if(a.h&&!b){a.G();for(var c in a.g)a.g[c]={};Jm(a)}a.h=b;a.M=b?Km.receiver.friendlyName:"";a.j.za()}function Jm(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new M(1,7,7E3))}}function Qm(a,b){var c=tm(b),d=Km;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Va)}catch(e){throw c=new M(2,8,8005,e),d=new L("error",(new Map).set("detail",c)),a.A("player",d),a.Tb(),c;}}var Om=.02,Nm=!1,Km=null,Im=new Set;
510
511
  function Pm(a){if(a){a=t(Im);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Um(a,b,c){db.call(this);var d=this;this.i=a;this.h=b;this.m=this.v=this.j=this.A=this.l=null;this.D=c;this.B=new Map;this.g=new Gm(c,function(){return Vm(d)},function(){return Wm(d)},function(e,f){return Xm(d,e,f)},function(){return Ym(d)},function(){return Zm(d)});$m(this)}pa(Um,db);q=Um.prototype;
511
512
  q.destroy=function(a){a&&this.g.Tb();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.A=this.l=this.i=null;db.prototype.release.call(this);return Promise.all(a)};q.tb=function(){return this.l};q.Vb=function(){return this.A};q.Ce=function(){return this.g.m&&Nm};q.na=function(){return this.g.na()};q.ld=function(){return this.g.ld()};
@@ -564,30 +565,30 @@ d)}function qo(a){var b=a.g.ea(),c=a.g.ha();if(0==c)throw new M(2,3,3002);c=8-Ma
564
565
  function to(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 uo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new oo(a.g);for(var n=null,p=null;a.Fa();){var r=po(a);if(187==r.id){var v=vo(r);v&&(r=c*v.Ug,v=b+v.Eg,null!=n&&m.push(new ni(n+g,r+g,l,p,v-1,f,g,h,k)),n=r,p=v)}}null!=n&&m.push(new ni(n+g,d+g,l,p,null,f,g,h,k));return m}
565
566
  function vo(a){var b=new oo(a.g);a=po(b);if(179!=a.id)throw new M(2,3,3013);a=to(a);b=po(b);if(183!=b.id)throw new M(2,3,3012);b=new oo(b.g);for(var c=0;b.Fa();){var d=po(b);if(241==d.id){c=to(d);break}}return{Ug:a,Eg:c}};function wo(a,b){var c=jo(a,b,"Initialization");if(!c)return null;var d=a.L.Oa,e=c.getAttribute("sourceURL");e&&(d=Gb(a.L.Oa,[e]));e=0;var f=null;if(c=Ln(c,"range",On))e=c.start,f=c.end;return new li(function(){return d},e,f)}
566
567
  function xo(a,b){var c=Number(io(a,yo,"presentationTimeOffset"))||0,d=io(a,yo,"timescale"),e=1;d&&(e=Qn(d)||1);var f=c/e||0,g=wo(a,yo);zo(a,g);var h=Ue(a);return{Ub:function(){var k=jo(h,yo,"RepresentationIndex"),l=h.L.Oa;k&&(k=k.getAttribute("sourceURL"))&&(l=Gb(h.L.Oa,[k]));k=Ao(h);return Bo(h,b,g,l,k.start,k.end,f)}}}
567
- function Bo(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,v,y,w,x,C,D,B,E;return H(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.yb||!a.X.Xe,l=a.X.start,m=a.X.duration,n=a.L.mimeType.split("/")[1],p=b,r=null,v=[p(d,e,f),"webm"==n?p(c.Ea(),c.ya,c.ra):null],p=null,u(G,Promise.all(v),2);y=G.h;w=y[0];x=y[1]||null;C=null;D=l-g;B=l;E=m?l+m:Infinity;if("mp4"==n)var I=mo(w,e,d,c,D,B,E);else{I=new oo(x);if(440786851!=po(I).id)throw new M(2,3,3008);var N=po(I);if(408125543!=N.id)throw new M(2,3,3009);I=N.g.byteOffset;
568
- N=new oo(N.g);for(var K=null;N.Fa();){var O=po(N);if(357149030==O.id){K=O;break}}if(!K)throw new M(2,3,3010);K=new oo(K.g);O=1E6;for(N=null;K.Fa();){var V=po(K);if(2807729==V.id)O=to(V);else if(17545==V.id)if(4==V.g.byteLength)N=V.g.getFloat32(0);else if(8==V.g.byteLength)N=V.g.getFloat64(0);else throw new M(2,3,3003);}if(null==N)throw new M(2,3,3011);K=O/1E9;N*=K;O=po(new oo(w));if(475249515!=O.id)throw new M(2,3,3007);I=uo(O,I,K,N,d,c,D,B,E)}C=I;h.Zb(C);r=new Mi(C);k&&r.sb(B,E,!0);return G["return"](r)})}
568
+ function Bo(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,v,y,x,w,C,D,B,E;return H(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.yb||!a.X.Xe,l=a.X.start,m=a.X.duration,n=a.L.mimeType.split("/")[1],p=b,r=null,v=[p(d,e,f),"webm"==n?p(c.Ea(),c.ya,c.ra):null],p=null,u(G,Promise.all(v),2);y=G.h;x=y[0];w=y[1]||null;C=null;D=l-g;B=l;E=m?l+m:Infinity;if("mp4"==n)var I=mo(x,e,d,c,D,B,E);else{I=new oo(w);if(440786851!=po(I).id)throw new M(2,3,3008);var N=po(I);if(408125543!=N.id)throw new M(2,3,3009);I=N.g.byteOffset;
569
+ N=new oo(N.g);for(var K=null;N.Fa();){var O=po(N);if(357149030==O.id){K=O;break}}if(!K)throw new M(2,3,3010);K=new oo(K.g);O=1E6;for(N=null;K.Fa();){var V=po(K);if(2807729==V.id)O=to(V);else if(17545==V.id)if(4==V.g.byteLength)N=V.g.getFloat32(0);else if(8==V.g.byteLength)N=V.g.getFloat64(0);else throw new M(2,3,3003);}if(null==N)throw new M(2,3,3011);K=O/1E9;N*=K;O=po(new oo(x));if(475249515!=O.id)throw new M(2,3,3007);I=uo(O,I,K,N,d,c,D,B,E)}C=I;h.Zb(C);r=new Mi(C);k&&r.sb(B,E,!0);return G["return"](r)})}
569
570
  function yo(a){return a.Ec}function Ao(a){var b=jo(a,yo,"RepresentationIndex");a=io(a,yo,"indexRange");a=On(a||"");b&&(a=Ln(b,"range",On,a));return a}function zo(a,b){Co(a,b);if(!Ao(a))throw new M(2,4,4002);}function Co(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Lb&&"mp4"!=c&&"webm"!=c)throw new M(2,4,4006);if("webm"==c&&!b)throw new M(2,4,4005);};function Do(a,b){var c=wo(a,Eo),d=Fo(a);if(!d.xa&&!d.timeline&&1<d.Xb.length)throw new M(2,4,4002);if(!d.xa&&!a.X.duration&&!d.timeline&&1==d.Xb.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.sa.id&&a.L.id&&(f=a.sa.id+","+a.L.id,e=b[f]);c=Go(a.X.start,a.X.duration,a.L.Oa,d,c);d=!e;e?e.Yb(c,a.presentationTimeline.jb()):(e=new Mi(c),f&&a.yb&&(b[f]=e));a.presentationTimeline.Zb(c);a.yb&&a.X.Xe||e.sb(a.X.start,a.X.duration?a.X.start+a.X.duration:
570
571
  Infinity,d);return{Ub:function(){return Promise.resolve(e)}}}function Eo(a){return a.vb}function Fo(a){var b=Ho(a);a=ho(a,Eo);var c=a.dc;0==c&&(c=1);var d=0;a.xa?d=a.xa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{xa:a.xa,startTime:d,dc:c,pb:a.pb,timeline:a.timeline,Xb:b}}
571
572
  function Go(a,b,c,d,e){var f=d.Xb.length;d.timeline&&d.timeline.length!=d.Xb.length&&(f=Math.min(d.timeline.length,d.Xb.length));for(var g=a-d.pb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={xd:m.xd},n++){var p=d.Xb[n];m.xd=Gb(c,[p.wg]);var r=void 0;r=null!=d.xa?l+d.xa:d.timeline?d.timeline[n].end:l+b;k.push(new ni(a+l,a+r,function(v){return function(){return v.xd}}(m),p.start,p.end,e,g,a,h));l=r}return k}
572
573
  function Ho(a){return[a.L.vb,a.Ca.vb,a.sa.vb].filter(Eb).map(function(b){return Dn(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Ue&&(a.Ue=!0);var c=b.getAttribute("media");b=Ln(b,"mediaRange",On,{start:0,end:null});return{wg:c,start:b.start,end:b.end}})};function Io(a,b,c,d,e,f){var g=Jo(a),h=Ro(a);So(h);var k=Ue(a);if(h.Ac)return Co(a,g),{Ub:function(){var v=go(h.Ac,k.L.id,null,k.bandwidth||null,null);v=Gb(k.L.Oa,[v]);return Bo(k,b,g,v,0,null,h.pb)}};if(h.xa)return d||(a.presentationTimeline.Sd(h.xa),a.presentationTimeline.Td(a.X.start)),{Ub:function(){return To(k,h,e,g,f)}};var l=null;d=null;a.sa.id&&a.L.id&&(d=a.sa.id+","+a.L.id,l=c[d]);var m=Uo(k,h,g),n=a.X.start,p=a.X.duration?a.X.start+a.X.duration:Infinity,r=Infinity!=p;l?(r&&(new Mi(m)).sb(n,
573
574
  p,!0),l.Yb(m,a.presentationTimeline.jb())):(l=new Mi(m),d&&a.yb&&(c[d]=l));a.presentationTimeline.Zb(m);r&&l.sb(n,p);return{Ub:function(){return Promise.resolve(l)}}}function Vo(a){return a.Fc}function Ro(a){var b=ho(a,Vo),c=io(a,Vo,"media");a=io(a,Vo,"index");return{xa:b.xa,timescale:b.timescale,dc:b.dc,pb:b.pb,ze:b.ze,timeline:b.timeline,Qd:c,Ac:a}}
574
575
  function So(a){var b=a.Ac?1:0;b+=a.timeline?1:0;b+=a.xa?1:0;if(0==b)throw new M(2,4,4002);1!=b&&(a.Ac&&(a.timeline=null),a.xa=null);if(!a.Ac&&!a.Qd)throw new M(2,4,4002);}
575
- function To(a,b,c,d,e){function f(K){var O=(K-r)*p,V=O+b.pb,Z=O+l;O=Z+p;var W=Math.min(O,h());Z=new ni(Z,W,function(){var ma=go(y,x,K,w,V*v);return Gb(C,[ma])},0,null,d,D,l,h());Z.l=O;return Z}function g(){var K=[Math.max(k.jb(),l),Math.min(k.Cb(),h())].map(function(O){return O-l});return[Math.ceil(K[0]/p),Math.ceil(K[1]/p)-1].map(function(O){return O+r})}function h(){var K=null!=m&&e[m]||n;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.X.start,m=a.sa.id,n=a.X.duration,p=b.xa,r=b.dc,v=b.timescale,
576
- y=b.Qd,w=a.bandwidth||null,x=a.L.id,C=a.L.Oa,D=l-b.pb,B=g();a=a.yb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var E=a;E<=B;++E){var G=f(E);c.push(G)}var I=new Mi(c);c=k.Cb()<h();E=k.V();if(c||E){var N=Math.max(a,B+1);I.od(p,function(){var K=k.jb();I.zb(K);var O=t(g());O.next();O=O.next().value;for(var V=[];N<=O;){var Z=f(N);V.push(Z);N++}return K>h()&&!V.length?null:V})}return Promise.resolve(I)}
576
+ function To(a,b,c,d,e){function f(K){var O=(K-r)*p,V=O+b.pb,Z=O+l;O=Z+p;var W=Math.min(O,h());Z=new ni(Z,W,function(){var ma=go(y,w,K,x,V*v);return Gb(C,[ma])},0,null,d,D,l,h());Z.l=O;return Z}function g(){var K=[Math.max(k.jb(),l),Math.min(k.Cb(),h())].map(function(O){return O-l});return[Math.ceil(K[0]/p),Math.ceil(K[1]/p)-1].map(function(O){return O+r})}function h(){var K=null!=m&&e[m]||n;return K?l+K:Infinity}var k=a.presentationTimeline,l=a.X.start,m=a.sa.id,n=a.X.duration,p=b.xa,r=b.dc,v=b.timescale,
577
+ y=b.Qd,x=a.bandwidth||null,w=a.L.id,C=a.L.Oa,D=l-b.pb,B=g();a=a.yb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var E=a;E<=B;++E){var G=f(E);c.push(G)}var I=new Mi(c);c=k.Cb()<h();E=k.V();if(c||E){var N=Math.max(a,B+1);I.od(p,function(){var K=k.jb();I.zb(K);var O=t(g());O.next();O=O.next().value;for(var V=[];N<=O;){var Z=f(N);V.push(Z);N++}return K>h()&&!V.length?null:V})}return Promise.resolve(I)}
577
578
  function Uo(a,b,c){var d=a.X.start,e=a.X.duration,f=d-b.pb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={wd:h.wd,Bd:h.Bd,Ed:h.Ed,td:h.td,Gd:h.Gd,ud:h.ud},k++){var l=b.timeline[k],m=l.start,n=l.Tg;l=l.end;h.Ed=k+b.dc;h.Gd=n+b.ze;h.Bd=a.L.id;h.td=a.bandwidth||null;h.wd=b.Qd;h.ud=a.L.Oa;g.push(new ni(d+m,d+l,function(p){return function(){var r=go(p.wd,p.Bd,p.Ed,p.td||null,p.Gd);return Gb(p.ud,[r]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
578
579
  function Jo(a){var b=io(a,Vo,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Oa;return new li(function(){var f=go(b,c,null,d,null);return Gb(e,[f])},0,null)};function Wo(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Wo.prototype.release=function(){for(var a=t(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
579
- function Xo(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y,w,x,C,D,B,E,G,I,N,K,O,V,Z,W,ma,ya,Ta;return H(function(Qa){switch(Qa.g){case 1:d=Mb;Yo(b);Zo(b);$o(b);ap(b);if(!c&&1==b.length){e=b[0];a.g=e.Oc;a.h=e.qd;a.j=e.textStreams;a.i=e.imageStreams;Qa.C(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 Qa["return"]();k=b.map(function(Ea){return Ea.Oc});l=b.map(function(Ea){return Ea.qd});m=b.map(function(Ea){return Ea.textStreams});n=b.map(function(Ea){return Ea.imageStreams});
580
- p=t(m);for(r=p.next();!r.done;r=p.next())v=r.value,v.push(bp(d.ka));y=t(n);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(bp(d.nc));return u(Qa,cp(a.g,k,f,dp,ep),3);case 3:return u(Qa,cp(a.h,l,f,dp,ep),4);case 4:return u(Qa,cp(a.j,m,f,dp,ep),5);case 5:return u(Qa,cp(a.i,n,f,dp,ep),2);case 2:C=0;D=[];if(a.h.length&&a.g.length)for(K=t(a.g),O=K.next();!O.done;O=K.next())for(V=O.value,Z=t(a.h),W=Z.next();!W.done;W=Z.next())ma=W.value,ya=fg(V.drmInfos,ma.drmInfos),V.drmInfos.length&&ma.drmInfos.length&&
580
+ function Xo(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,E,G,I,N,K,O,V,Z,W,ma,ya,Ta;return H(function(Qa){switch(Qa.g){case 1:d=Mb;Yo(b);Zo(b);$o(b);ap(b);if(!c&&1==b.length){e=b[0];a.g=e.Oc;a.h=e.qd;a.j=e.textStreams;a.i=e.imageStreams;Qa.C(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 Qa["return"]();k=b.map(function(Fa){return Fa.Oc});l=b.map(function(Fa){return Fa.qd});m=b.map(function(Fa){return Fa.textStreams});n=b.map(function(Fa){return Fa.imageStreams});
581
+ p=t(m);for(r=p.next();!r.done;r=p.next())v=r.value,v.push(bp(d.ka));y=t(n);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(bp(d.nc));return u(Qa,cp(a.g,k,f,dp,ep),3);case 3:return u(Qa,cp(a.h,l,f,dp,ep),4);case 4:return u(Qa,cp(a.j,m,f,dp,ep),5);case 5:return u(Qa,cp(a.i,n,f,dp,ep),2);case 2:C=0;D=[];if(a.h.length&&a.g.length)for(K=t(a.g),O=K.next();!O.done;O=K.next())for(V=O.value,Z=t(a.h),W=Z.next();!W.done;W=Z.next())ma=W.value,ya=fg(V.drmInfos,ma.drmInfos),V.drmInfos.length&&ma.drmInfos.length&&
581
582
  !ya.length||(Ta=C++,D.push({id:Ta,language:V.language,primary:V.primary,audio:V,video:ma,bandwidth:(V.bandwidth||0)+(ma.bandwidth||0),drmInfos:ya,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),E=t(B),G=E.next();!G.done;G=E.next())I=G.value,N=C++,D.push({id:N,language:I.language,primary:I.primary,audio:I.type==d.wb?I:null,video:I.type==d.bb?I:null,bandwidth:I.bandwidth||0,drmInfos:I.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
582
583
  a.l=D;z(Qa)}})}function Yo(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Oc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.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.Oc=c}}
583
584
  function $o(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&fc(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
584
585
  function Zo(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.qd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&fc(e.roles,h.roles)&&uf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.qd=c}}
585
586
  function ap(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
586
- function fp(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,y,w,x,C,D,B,E,G,I,N,K,O,V;return H(function(Z){switch(Z.g){case 1:b=Mb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(W){return W.filter(function(ma){return ma.type==b.wb})});d=a.map(function(W){return W.filter(function(ma){return ma.type==b.bb})});e=a.map(function(W){return W.filter(function(ma){return ma.type==b.ka})});f=a.map(function(W){return W.filter(function(ma){return ma.type==b.nc})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
587
- k.push(gp(b.ka));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(gp(b.nc));return u(Z,cp([],c,0,hp,ip),2);case 2:return p=Z.h,u(Z,cp([],d,0,hp,ip),3);case 3:return r=Z.h,u(Z,cp([],e,0,hp,ip),4);case 4:return v=Z.h,u(Z,cp([],f,0,hp,ip),5);case 5:y=Z.h;w=0;if(r.length&&p.length)for(E=t(p),G=E.next();!G.done;G=E.next())for(I=G.value,N=t(r),K=N.next();!K.done;K=N.next())O=K.value,V=w++,O.variantIds.push(V),I.variantIds.push(V);else for(x=r.concat(p),C=t(x),D=C.next();!D.done;D=C.next())B=D.value,
588
- B.variantIds=[w++];return Z["return"](r.concat(p).concat(v).concat(y))}})}
589
- function cp(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,v,y,w,x,C,D,B,E,G,I,N,K;return H(function(O){switch(O.g){case 1:f=Mb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){O.C(4);break}m=l.value;return u(O,jp(m,b,c,e,g),5);case 5:n=O.h;if(!n)throw new M(2,4,4037);l=k.next();O.C(2);break;case 4:p=t(g),r=p.next();case 6:if(r.done){O.C(8);break}v=r.value;y=t(v);w=y.next();case 9:if(w.done){r=p.next();O.C(6);break}x=w.value;return u(O,kp(x,b,d,e,g),12);
590
- case 12:(C=O.h)&&a.push(C);w=y.next();O.C(9);break;case 8:D=t(g);for(r=D.next();!r.done;r=D.next())for(B=r.value,E={},G=t(B),w=G.next();!w.done;E={rb:E.rb},w=G.next())if(E.rb=w.value,I=E.rb.type==f.ka&&!E.rb.language,N=E.rb.type==f.nc&&!E.rb.tilesLayout,!I&&!N&&(K=a.some(function(V){return function(Z){return Z.mimeType==V.rb.mimeType&&id(Z.codecs)==id(V.rb.codecs)}}(E))))throw new M(2,4,4037);return O["return"](a)}})}
587
+ function fp(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,E,G,I,N,K,O,V;return H(function(Z){switch(Z.g){case 1:b=Mb;if(1==a.length)return Z["return"](a[0]);c=a.map(function(W){return W.filter(function(ma){return ma.type==b.wb})});d=a.map(function(W){return W.filter(function(ma){return ma.type==b.bb})});e=a.map(function(W){return W.filter(function(ma){return ma.type==b.ka})});f=a.map(function(W){return W.filter(function(ma){return ma.type==b.nc})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
588
+ k.push(gp(b.ka));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(gp(b.nc));return u(Z,cp([],c,0,hp,ip),2);case 2:return p=Z.h,u(Z,cp([],d,0,hp,ip),3);case 3:return r=Z.h,u(Z,cp([],e,0,hp,ip),4);case 4:return v=Z.h,u(Z,cp([],f,0,hp,ip),5);case 5:y=Z.h;x=0;if(r.length&&p.length)for(E=t(p),G=E.next();!G.done;G=E.next())for(I=G.value,N=t(r),K=N.next();!K.done;K=N.next())O=K.value,V=x++,O.variantIds.push(V),I.variantIds.push(V);else for(w=r.concat(p),C=t(w),D=C.next();!D.done;D=C.next())B=D.value,
589
+ B.variantIds=[x++];return Z["return"](r.concat(p).concat(v).concat(y))}})}
590
+ function cp(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,E,G,I,N,K;return H(function(O){switch(O.g){case 1:f=Mb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){O.C(4);break}m=l.value;return u(O,jp(m,b,c,e,g),5);case 5:n=O.h;if(!n)throw new M(2,4,4037);l=k.next();O.C(2);break;case 4:p=t(g),r=p.next();case 6:if(r.done){O.C(8);break}v=r.value;y=t(v);x=y.next();case 9:if(x.done){r=p.next();O.C(6);break}w=x.value;return u(O,kp(w,b,d,e,g),12);
591
+ case 12:(C=O.h)&&a.push(C);x=y.next();O.C(9);break;case 8:D=t(g);for(r=D.next();!r.done;r=D.next())for(B=r.value,E={},G=t(B),x=G.next();!x.done;E={rb:E.rb},x=G.next())if(E.rb=x.value,I=E.rb.type==f.ka&&!E.rb.language,N=E.rb.type==f.nc&&!E.rb.tilesLayout,!I&&!N&&(K=a.some(function(V){return function(Z){return Z.mimeType==V.rb.mimeType&&id(Z.codecs)==id(V.rb.codecs)}}(E))))throw new M(2,4,4037);return O["return"](a)}})}
591
592
  function jp(a,b,c,d,e){var f;return H(function(g){if(1==g.g)return(f=lp(b,a))?u(g,mp(f),2):g["return"](!1);np(a,f,c,d,e);return g["return"](!0)})}function mp(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push(c.createSegmentIndex()),c.trickModeVideo&&!c.trickModeVideo.segmentIndex&&b.push(c.trickModeVideo.createSegmentIndex());return Promise.all(b)}
592
593
  function kp(a,b,c,d,e){var f,g;return H(function(h){if(1==h.g)return f=c(a),(g=lp(b,f))?f.createSegmentIndex?u(h,mp(g),2):h.C(2):h["return"](null);np(f,g,0,d,e);return h["return"](f)})}function np(a,b,c,d,e){for(var f=0;f<b.length;f++)if(f>=c){var g=b[f];d(a,g);var h=!0;"audio"==a.type&&0==Sb(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}
593
594
  function dp(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Pi;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}function hp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
@@ -606,10 +607,10 @@ function vp(a,b,c){if(b==a&&a!=c)return xp;if(c==a&&a!=b)return wp;if(b>a){if(c<
606
607
  q.stop=function(){for(var a=t(Object.values(this.B)),b=a.next();!b.done;b=a.next())b.value.release();this.j&&this.j.release();this.g=this.h=null;this.l=[];this.i=null;this.B={};this.j=null;null!=this.F&&(this.F.stop(),this.F=null);return this.m.destroy()};q.update=function(){var a=this,b;return H(function(c){if(1==c.g)return A(c,2),u(c,Cp(a),4);if(2!=c.g)return ua(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);z(c)})};q.onExpirationUpdated=function(){};
607
608
  function Cp(a){var b,c,d,e,f,g,h;return H(function(k){if(1==k.g)return b=af(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b),We(a.m,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);return u(k,Ep(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k["return"](h)})}
608
609
  function Ep(a,b,c){var d,e,f,g,h;return H(function(k){if(1==k.g){d=Vn(b,"MPD");if(!d)throw new M(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](Fp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=lo(d,a.g.retryParameters,f,c,a.h.networkingEngine);We(a.m,g);return u(k,g.promise,2)}h=k.h;return k["return"](Fp(a,h,c))})}
609
- function Fp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y,w,x,C,D,B,E,G,I,N,K,O,V,Z,W,ma,ya,Ta,Qa,Ea;return H(function(Ua){switch(Ua.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Dn(b,"Location").map(Jn).filter(Eb);0<f.length&&(g=Gb(e,f),e=a.l=g);h=Dn(b,"BaseURL");k=h.map(Jn);l=Gb(e,k);m=0;h&&h.length&&(m=Ln(h[0],"availabilityTimeOffset",Sn)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Ln(b,"minBufferTime",Nn)||0);a.G=Ln(b,"minimumUpdatePeriod",Nn,-1);r=Ln(b,"availabilityStartTime",Mn);v=Ln(b,
610
- "timeShiftBufferDepth",Nn);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=Ln(b,"suggestedPresentationDelay",Nn));x=a.g.dash.ignoreMaxSegmentDuration;C=null;x||(C=Ln(b,"maxSegmentDuration",Nn));D=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,E=t(Object.values(a.B)),G=E.next();!G.done;G=E.next())I=G.value,I.zb(B.jb());else N=a.g.defaultPresentationDelay||1.5*p,K=null!=w?w:N,B=new Q(r,K,a.g.dash.autoCorrectDrift);B.Gc("static"==D);(O=B.V())&&!isNaN(a.g.availabilityWindowOverride)&&
610
+ function Fp(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,E,G,I,N,K,O,V,Z,W,ma,ya,Ta,Qa,Fa;return H(function(Ua){switch(Ua.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Dn(b,"Location").map(Jn).filter(Eb);0<f.length&&(g=Gb(e,f),e=a.l=g);h=Dn(b,"BaseURL");k=h.map(Jn);l=Gb(e,k);m=0;h&&h.length&&(m=Ln(h[0],"availabilityTimeOffset",Sn)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Ln(b,"minBufferTime",Nn)||0);a.G=Ln(b,"minimumUpdatePeriod",Nn,-1);r=Ln(b,"availabilityStartTime",Mn);v=Ln(b,
611
+ "timeShiftBufferDepth",Nn);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Ln(b,"suggestedPresentationDelay",Nn));w=a.g.dash.ignoreMaxSegmentDuration;C=null;w||(C=Ln(b,"maxSegmentDuration",Nn));D=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,E=t(Object.values(a.B)),G=E.next();!G.done;G=E.next())I=G.value,I.zb(B.jb());else N=a.g.defaultPresentationDelay||1.5*p,K=null!=x?x:N,B=new Q(r,K,a.g.dash.autoCorrectDrift);B.Gc("static"==D);(O=B.V())&&!isNaN(a.g.availabilityWindowOverride)&&
611
612
  (v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.pe(v);V=b.getAttribute("profiles")||"";Z={yb:"static"!=D,presentationTimeline:B,sa:null,X:null,Ca:null,L:null,bandwidth:0,Ue:!1,Sb:m,profiles:V.split(",")};W=Gp(a,Z,l,b);ma=W.duration;ya=W.periods;"static"!=D&&W.Le||B.Ya(ma||Infinity);a.A&&!a.D&&(Ta=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.D=a.h.isLowLatencyMode());a.D?B.hf(a.A):a.A&&Pa("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.");
612
- B.Sd(C||1);return u(Ua,Xo(a.j,ya,Z.yb),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);Ua.C(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.rf()){Ua.C(3);break}Qa=Dn(b,"UTCTiming");return u(Ua,Hp(a,l,Qa),5);case 5:Ea=Ua.h;if(!a.h)return Ua["return"]();B.jf(Ea);case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Ua)}})}
613
+ B.Sd(C||1);return u(Ua,Xo(a.j,ya,Z.yb),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);Ua.C(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.rf()){Ua.C(3);break}Qa=Dn(b,"UTCTiming");return u(Ua,Hp(a,l,Qa),5);case 5:Fa=Ua.h;if(!a.h)return Ua["return"]();B.jf(Fa);case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Ua)}})}
613
614
  function Gp(a,b,c,d){var e=Ln(d,"mediaPresentationDuration",Nn),f=[],g=0;d=Dn(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Ln(k,"start",Nn,g),n=k.id,p=Ln(k,"duration",Nn),r=null;if(l){var v=Ln(l,"start",Nn);null!=v&&(r=v-m)}else null!=e&&(r=e-m);null==r&&(r=p);if(!(null!==a.v&&null!==n&&null!==m&&m<a.v)||a.J.includes(n)||h+1==d.length){null!==m&&(null===a.v||m>a.v)&&(a.v=m);g=Ip(a,b,c,{start:m,duration:r,node:k,Xe:null==r||!l});f.push(g);b.sa.id&&r&&(a.M[b.sa.id]=r);if(null==r){g=
614
615
  null;break}g=m+r}}a.J=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,Le:!1}:{periods:f,duration:g,Le:!0}}
615
616
  function Ip(a,b,c,d){b.sa=Jp(d.node,null,c);b.X=d;b.sa.Sb=b.Sb;b.sa.id||(b.sa.id="__shaka_period_"+d.start);var e=Dn(d.node,"EventStream");c=b.presentationTimeline.jb();e=t(e);for(var f=e.next();!f.done;f=e.next())Kp(a,d.start,d.duration,f.value,c);c=Dn(d.node,"AdaptationSet").map(function(m){return Lp(a,b,m)}).filter(Eb);if(b.yb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Hg);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);
@@ -618,17 +619,17 @@ function Ip(a,b,c,d){b.sa=Jp(d.node,null,c);b.X=d;b.sa.Sb=b.Sb;b.sa.id||(b.sa.id
618
619
  function Mp(a,b){return a.filter(function(c){return c.contentType==b})}
619
620
  function Lp(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.Ca=Jp(c,b.sa,null);var e=!1,f=Dn(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Eb),h=void 0,k=b.Ca.contentType==Lb;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
620
621
  l}}var n;m=Dn(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var r=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==r?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==r?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=Dn(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
621
- 10)));m=Dn(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(r=p.value,p=r.getAttribute("schemeIdUri"),r=r.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=r){r=r.split(";");for(var y=t(r),w=y.next();!w.done;w=y.next()){var x=w.value,C=w=void 0;x.includes("=")?(x=x.split("="),w=x[0].startsWith("CC")?x[0]:"CC"+x[0],C=x[1]||"und"):(w="CC"+p,2==r.length?p+=2:p++,C=x);v.set(w,Ob(C))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
622
- 1,null!=r)for(r=t(r.split(";")),w=r.next();!w.done;w=r.next())w=w.value,x=y=void 0,w.includes("=")?(w=w.split("="),y="svc"+w[0],x=w[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,x=w),v.set(y,Ob(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=r&&(g.push(r),"captions"==r&&(h="caption"));if(l)return null;l=Dn(c,"ContentProtection");var D=Wn(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=Ob(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=Dn(c,"Label"))&&l.length&&
622
+ 10)));m=Dn(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(r=p.value,p=r.getAttribute("schemeIdUri"),r=r.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=r){r=r.split(";");for(var y=t(r),x=y.next();!x.done;x=y.next()){var w=x.value,C=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],C=w[1]||"und"):(x="CC"+p,2==r.length?p+=2:p++,C=w);v.set(x,Ob(C))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
623
+ 1,null!=r)for(r=t(r.split(";")),x=r.next();!x.done;x=r.next())x=x.value,w=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],w=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,w=x),v.set(y,Ob(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=r&&(g.push(r),"captions"==r&&(h="caption"));if(l)return null;l=Dn(c,"ContentProtection");var D=Wn(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=Ob(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=Dn(c,"Label"))&&l.length&&
623
624
  (l=l[0],l.textContent&&(E=l.textContent));l=Dn(c,"Representation");c=l.map(function(G){if(G=Np(a,b,D,h,B,E,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.Ca.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new M(2,4,4003);}if(!b.Ca.contentType||"application"==b.Ca.contentType)for(b.Ca.contentType=Op(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.Ca.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
624
625
  m.value,p=t(D.drmInfos),r=p.next();!r.done;r=p.next())r=r.value,r.keyIds=r.keyIds&&m.keyIds?new Set([].concat(ha(r.keyIds),ha(m.keyIds))):r.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Eb);return{id:b.Ca.id||"__fake__"+a.H++,contentType:b.Ca.contentType,language:B,gi:e,streams:c,drmInfos:D.drmInfos,ve:f,Hg:k}}
625
- function Np(a,b,c,d,e,f,g,h,k,l){b.L=Jp(l,b.Ca,null);a.A=Math.min(a.A,b.L.Sb);if(!Pp(b.L))return null;var m=b.X.start;b.bandwidth=Ln(l,"bandwidth",Qn)||0;var n=b.L.contentType,p=n==Lb||"application"==n;n="image"==n;try{var r=function(G,I,N){return Qp(a,G,I,N)};if(b.L.Ec)var v=xo(b,r);else if(b.L.vb)v=Do(b,a.B);else if(b.L.Fc)v=Io(b,r,a.B,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.L.Oa,w=b.X.duration||0;v={Ub:function(){return Promise.resolve(Oi(m,w,y))}}}}catch(G){if((p||n)&&4002==G.code)return null;
626
- throw G;}r=Dn(l,"ContentProtection");r=Zn(r,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);r=new Set(r?[r]:[]);var x=!1;Dn(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;p&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var D;if(n&&((l=Dn(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
626
+ function Np(a,b,c,d,e,f,g,h,k,l){b.L=Jp(l,b.Ca,null);a.A=Math.min(a.A,b.L.Sb);if(!Pp(b.L))return null;var m=b.X.start;b.bandwidth=Ln(l,"bandwidth",Qn)||0;var n=b.L.contentType,p=n==Lb||"application"==n;n="image"==n;try{var r=function(G,I,N){return Qp(a,G,I,N)};if(b.L.Ec)var v=xo(b,r);else if(b.L.vb)v=Do(b,a.B);else if(b.L.Fc)v=Io(b,r,a.B,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.L.Oa,x=b.X.duration||0;v={Ub:function(){return Promise.resolve(Oi(m,x,y))}}}}catch(G){if((p||n)&&4002==G.code)return null;
627
+ throw G;}r=Dn(l,"ContentProtection");r=Zn(r,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);r=new Set(r?[r]:[]);var w=!1;Dn(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(w=!0);var C=!1;p&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var D;if(n&&((l=Dn(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
627
628
  (D=l.getAttribute("value")),!D))return null;var B;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"))&&(B="PQ");var E={id:a.H++,originalId:b.L.id,createSegmentIndex:function(){var G;return H(function(I){if(1==I.g){if(E.segmentIndex)return I.C(0);G=E;return u(I,v.Ub(),3)}G.segmentIndex=I.h;z(I)})},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,
628
- bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:r,language:e,label:f,type:b.Ca.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.L.Ud,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:B,tilesLayout:D};return E}
629
+ bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:r,language:e,label:f,type:b.Ca.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.L.Ud,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:B,tilesLayout:D};return E}
629
630
  function Bp(a){var b,c;H(function(d){switch(d.g){case 1:return b=0,A(d,2),u(d,Cp(a),4);case 4:b=d.h;ua(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();Dp(a,b);z(d)}})}function Dp(a,b){0>a.G||a.F.P(Math.max(3,a.G-b,bc(a.I)))}
630
631
  function Jp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Ud:null,audioSamplingRate:null,Sb:0};c=c||b.Oa;var d=Dn(a,"BaseURL"),e=d.map(Jn),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Ln(a,"frameRate",Tn)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Dn(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
631
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Dn(a,"AudioChannelConfiguration");m=Rp(m)||b.Ud;p=Ln(a,"audioSamplingRate",Rn)||b.audioSamplingRate;f||(f=Op(g,h));var r=Cn(a,"SegmentBase"),v=Cn(a,"SegmentTemplate"),y=r?Ln(r,"availabilityTimeOffset",Sn)||0:0,w=v?Ln(v,"availabilityTimeOffset",Sn)||0:0;d=d&&d.length?Ln(d[0],"availabilityTimeOffset",Sn)||0:0;d=b.Sb+d+y+w;return{Oa:Gb(c,e),Ec:r||b.Ec,vb:Cn(a,"SegmentList")||b.vb,Fc:v||b.Fc,width:Ln(a,"width",Rn)||b.width,height:Ln(a,
632
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Dn(a,"AudioChannelConfiguration");m=Rp(m)||b.Ud;p=Ln(a,"audioSamplingRate",Rn)||b.audioSamplingRate;f||(f=Op(g,h));var r=Cn(a,"SegmentBase"),v=Cn(a,"SegmentTemplate"),y=r?Ln(r,"availabilityTimeOffset",Sn)||0:0,x=v?Ln(v,"availabilityTimeOffset",Sn)||0:0;d=d&&d.length?Ln(d[0],"availabilityTimeOffset",Sn)||0:0;d=b.Sb+d+y+x;return{Oa:Gb(c,e),Ec:r||b.Ec,vb:Cn(a,"SegmentList")||b.vb,Fc:v||b.Fc,width:Ln(a,"width",Rn)||b.width,height:Ln(a,
632
633
  "height",Rn)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Ud:m,audioSamplingRate:p,Sb:d}}
633
634
  function Rp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
634
635
  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 Pp(a){var b=a.Ec?1:0;b+=a.vb?1:0;b+=a.Fc?1:0;if(0==b)return a.contentType==Lb||"application"==a.contentType?!0:!1;1!=b&&(a.Ec&&(a.vb=null),a.Fc=null);return!0}
@@ -648,56 +649,56 @@ q.start=function(a,b){var c=this,d,e;return H(function(f){if(1==f.g)return c.j=b
648
649
  q.update=function(){var a=this,b,c,d;return H(function(e){if(1==e.g){if(a.m==pq)return e["return"]();b=[];a.R=null;c=Array.from(a.h.values());return c.length?u(e,sq(a,c[0]),2):e.C(2)}for(d=1;d<c.length;d++)b.push(sq(a,c[d]));return u(e,Promise.all(b),0)})};
649
650
  function sq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v;return H(function(y){if(1==y.g)return c=tq,d=b.wf,e=new jb(d),a.l&&b.Bf&&nb(e,new pb("_HLS_skip=YES")),u(y,qq(a,af([e.toString()],a.g.retryParameters),0),2);if(3!=y.g){f=y.h;g=gq(a.ua,f.data,f.uri);if(1!=g.type)throw new M(2,4,4017);h=Yp(g.g,"EXT-X-DEFINE");k=uq(a,h);l=b.stream;return u(y,vq(a,b.pd,g,l.type,l.mimeType,b.Pd,k,b.Gf),3)}m=y.h;l.segmentIndex.Yb(m,a.i.jb());m.length&&(n=aq(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.Pd.get(n),l.segmentIndex.zb(p));
650
651
  r=m[m.length-1];if(v=$p(g.g,"EXT-X-ENDLIST"))wq(a,c.vf),a.i.Ya(r.endTime);z(y)})}q.onExpirationUpdated=function(){};
651
- function rq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,w,x,C,D,B,E,G,I,N,K,O,V,Z,W,ma,ya,Ta,Qa,Ea,Ua,Pc,Ad;return H(function(Ya){switch(Ya.g){case 1:c=gq(a.ua,b,a.M);if(0!=c.type)throw new M(2,4,4022);d=Yp(c.g,"EXT-X-DEFINE");xq(a,d);e=Yp(c.g,"EXT-X-MEDIA");f=Yp(c.g,"EXT-X-STREAM-INF");g=Yp(c.g,"EXT-X-IMAGE-STREAM-INF");yq(a,f);h=Yp(c.g,"EXT-X-SESSION-DATA");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=U(m,"DATA-ID"),p=U(m,"URI"),r=U(m,"LANGUAGE"),v=U(m,"VALUE"),y=(new Map).set("id",n),p&&y.set("uri",
652
- Gb([a.M],[p])[0]),r&&y.set("language",r),v&&y.set("value",v),w=new L("sessiondata",y),a.j)a.j.onEvent(w);return u(Ya,zq(a,e),2);case 2:return Aq(a,e),u(Ya,Bq(a,f),3);case 3:return x=Ya.h,u(Ya,Cq(a,e),4);case 4:return C=Ya.h,u(Ya,Dq(a,g),5);case 5:D=Ya.h;if(!a.j)throw new M(2,7,7001);if(a.Ba&&0==x.length)throw new M(2,4,4034);E=B=Infinity;G=t(a.h.values());for(I=G.next();!I.done;I=G.next())N=I.value,B=Math.min(B,N.Ye),"text"!=N.stream.type&&(E=Math.min(E,N.vg-N.Ye));a.m!=pq?(a.i=new Q(0,a.g.defaultPresentationDelay?
653
- a.g.defaultPresentationDelay:a.Y?a.Y:3*a.$),a.i.Gc(!1)):(a.i=new Q(null,0),a.i.Gc(!0));Eq(a);if(a.m!=pq)a.qa=a.H,K=tq,a.m==K.Be&&(O=a.i.kd,isNaN(a.g.availabilityWindowOverride)||(O=a.g.availabilityWindowOverride),a.i.pe(O));else for(a.i.Ya(E),a.i.offset(-B),V=t(a.h.values()),I=V.next();!I.done;I=V.next())Z=I.value,Z.stream.segmentIndex.offset(-B),Z.stream.segmentIndex.sb(0,E);a.W=[];W=[];ma=t(x);for(ya=ma.next();!ya.done;ya=ma.next())for(Ta=ya.value,Qa=t([Ta.video,Ta.audio]),Ea=Qa.next();!Ea.done;Ea=
654
- Qa.next())(Ua=Ea.value)&&W.push(Ua);return u(Ya,Promise.all(W.map(function(Ae){return H(function(Yf){return u(Yf,Ae.createSegmentIndex(),0)})})),6);case 6:Pc=t(W);for(Ea=Pc.next();!Ea.done;Ea=Pc.next())Ad=Ea.value,a.W.push(Ad.segmentIndex.N);Eq(a);a.F={presentationTimeline:a.i,variants:x,textStreams:C,imageStreams:D,offlineSessionIds:[],minBufferTime:0};a.j.makeTextStreamsForClosedCaptions(a.F);z(Ya)}})}
652
+ function rq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,E,G,I,N,K,O,V,Z,W,ma,ya,Ta,Qa,Fa,Ua,Pc,Ad;return H(function(Ya){switch(Ya.g){case 1:c=gq(a.ua,b,a.M);if(0!=c.type)throw new M(2,4,4022);d=Yp(c.g,"EXT-X-DEFINE");xq(a,d);e=Yp(c.g,"EXT-X-MEDIA");f=Yp(c.g,"EXT-X-STREAM-INF");g=Yp(c.g,"EXT-X-IMAGE-STREAM-INF");yq(a,f);h=Yp(c.g,"EXT-X-SESSION-DATA");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=U(m,"DATA-ID"),p=U(m,"URI"),r=U(m,"LANGUAGE"),v=U(m,"VALUE"),y=(new Map).set("id",n),p&&y.set("uri",
653
+ Gb([a.M],[p])[0]),r&&y.set("language",r),v&&y.set("value",v),x=new L("sessiondata",y),a.j)a.j.onEvent(x);return u(Ya,zq(a,e),2);case 2:return Aq(a,e),u(Ya,Bq(a,f),3);case 3:return w=Ya.h,u(Ya,Cq(a,e),4);case 4:return C=Ya.h,u(Ya,Dq(a,g),5);case 5:D=Ya.h;if(!a.j)throw new M(2,7,7001);if(a.Ba&&0==w.length)throw new M(2,4,4034);E=B=Infinity;G=t(a.h.values());for(I=G.next();!I.done;I=G.next())N=I.value,B=Math.min(B,N.Ye),"text"!=N.stream.type&&(E=Math.min(E,N.vg-N.Ye));a.m!=pq?(a.i=new Q(0,a.g.defaultPresentationDelay?
654
+ a.g.defaultPresentationDelay:a.Y?a.Y:3*a.$),a.i.Gc(!1)):(a.i=new Q(null,0),a.i.Gc(!0));Eq(a);if(a.m!=pq)a.qa=a.H,K=tq,a.m==K.Be&&(O=a.i.kd,isNaN(a.g.availabilityWindowOverride)||(O=a.g.availabilityWindowOverride),a.i.pe(O));else for(a.i.Ya(E),a.i.offset(-B),V=t(a.h.values()),I=V.next();!I.done;I=V.next())Z=I.value,Z.stream.segmentIndex.offset(-B),Z.stream.segmentIndex.sb(0,E);a.W=[];W=[];ma=t(w);for(ya=ma.next();!ya.done;ya=ma.next())for(Ta=ya.value,Qa=t([Ta.video,Ta.audio]),Fa=Qa.next();!Fa.done;Fa=
655
+ Qa.next())(Ua=Fa.value)&&W.push(Ua);return u(Ya,Promise.all(W.map(function(Ae){return H(function(Yf){return u(Yf,Ae.createSegmentIndex(),0)})})),6);case 6:Pc=t(W);for(Fa=Pc.next();!Fa.done;Fa=Pc.next())Ad=Fa.value,a.W.push(Ad.segmentIndex.N);Eq(a);a.F={presentationTimeline:a.i,variants:w,textStreams:C,imageStreams:D,offlineSessionIds:[],minBufferTime:0};a.j.makeTextStreamsForClosedCaptions(a.F);z(Ya)}})}
655
656
  function xq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=U(e,"NAME");e=U(e,"VALUE");d&&e&&(a.v.has(d)||a.v.set(d,e))}}function uq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=U(f,"NAME");var g=U(f,"VALUE");f=U(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.v.get(f))&&c.set(f,e)}return c}
656
657
  function yq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=U(e,"AUDIO");d=U(e,"VIDEO");var g=U(e,"SUBTITLES");e=Fq(a,e);if(g){var h=Jb(Lb,e);a.A.set(g,h);ec(e,h)}f&&(g=Ib("audio",e),a.A.set(f,g));d&&(f=Ib("video",e),a.A.set(d,f))}}
657
- function Cq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r;return H(function(v){if(1==v.g)return c=Zp(b,"SUBTITLES"),d=c.map(function(y){var w,x,C;return H(function(D){if(1==D.g){if(w=a.g.disableText)return D["return"](null);A(D,2);return u(D,Gq(a,y),4)}if(2!=D.g)return x=D.h,D["return"](x.stream);C=F(D);if(a.g.hls.ignoreTextStreamFailures)return D["return"](null);throw C;})}),u(v,Promise.all(d),2);e=v.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Vp(h,"GROUP-ID"),l=a.A.get(k))if(m=a.B.get(k))for(n=
658
+ function Cq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r;return H(function(v){if(1==v.g)return c=Zp(b,"SUBTITLES"),d=c.map(function(y){var x,w,C;return H(function(D){if(1==D.g){if(x=a.g.disableText)return D["return"](null);A(D,2);return u(D,Gq(a,y),4)}if(2!=D.g)return w=D.h,D["return"](w.stream);C=F(D);if(a.g.hls.ignoreTextStreamFailures)return D["return"](null);throw C;})}),u(v,Promise.all(d),2);e=v.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Vp(h,"GROUP-ID"),l=a.A.get(k))if(m=a.B.get(k))for(n=
658
659
  t(m),p=n.next();!p.done;p=n.next())r=p.value,r.stream.codecs=l;return v["return"](e.filter(function(y){return y}))})}
659
660
  function Dq(a,b){var c,d;return H(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return H(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);A(l,2);return u(l,Hq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=F(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}))})}
660
661
  function zq(a,b){var c;return H(function(d){if(1==d.g)return b=b.filter(function(e){var f=U(e,"URI")||"";return"SUBTITLES"!=U(e,"TYPE")&&""!=f}),b.length?u(d,Gq(a,b[0]),2):d.C(2);c=b.slice(1).map(function(e){return Gq(a,e)});return u(d,Promise.all(c),0)})}
661
- function Bq(a,b){var c,d,e;return H(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,r,v;return H(function(y){if(1==y.g)return h=U(g,"FRAME-RATE"),k=Number(U(g,"AVERAGE-BANDWIDTH"))||Number(Vp(g,"BANDWIDTH")),l=U(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,r=U(g,"VIDEO-RANGE"),u(y,Iq(a,g),2);if(v=y.h){for(var w=y["return"],x=v.audio,C=v.video,D=t(C),B=D.next();!B.done;B=D.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
662
- void 0,B.frameRate=Number(h)||void 0,B.hdr=r||void 0;D=a.g.disableAudio;if(!x.length||D)x=[null];D=a.g.disableVideo;if(!C.length||D)C=[null];D=[];x=t(x);for(B=x.next();!B.done;B=x.next()){B=B.value;for(var E=t(C),G=E.next();!G.done;G=E.next()){var I=G.value;G=B?B.stream:null;var N=I?I.stream:null,K=B?B.stream.drmInfos:null,O=I?I.stream.drmInfos:null;I=(I?I.pd:"")+" - "+(B?B.pd:"");G&&N&&K.length&&O.length&&!(0<fg(K,O).length)||a.va.has(I)||(G={id:a.Aa++,language:G?G.language:"und",primary:!!G&&G.primary||
663
- !!N&&N.primary,audio:G,video:N,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},D.push(G),a.va.add(I))}}y=w.call(y,D)}else y=y["return"]([]);return y})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Cb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
664
- function Iq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return H(function(w){if(1==w.g)return c=Mb,d=Fq(a,b),e=U(b,"AUDIO"),f=U(b,"VIDEO"),h=(g=e||f)&&a.B.has(g)?a.B.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=Vp(b,"URI"),p=k.audio.find(function(x){return x&&x.pd==n}),r=Jb(c.bb,d),(v=Jb(c.wb,d))&&!r?l=c.wb:!h.length&&v&&r?(l=c.bb,d=[[r,v].join()]):k.audio.length&&p?(l=c.wb,m=!0):l=k.video.length?c.wb:c.bb,m?w.C(2):u(w,Jq(a,b,d,l),3);2!=w.g&&(y=w.h);if(y)k[y.stream.type]=[y];else if(null===y)return w["return"](null);
665
- Kq(k);return w["return"](k)})}function Fq(a,b){var c=[];a.g.disableVideo||c.push("avc1.42E01E");a.g.disableAudio||c.push("mp4a.40.2");var d=U(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=jd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function Lq(a){a=U(a,"LANGUAGE")||"und";return Ob(a)}
662
+ function Bq(a,b){var c,d,e;return H(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,r,v;return H(function(y){if(1==y.g)return h=U(g,"FRAME-RATE"),k=Number(U(g,"AVERAGE-BANDWIDTH"))||Number(Vp(g,"BANDWIDTH")),l=U(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,r=U(g,"VIDEO-RANGE"),u(y,Iq(a,g),2);if(v=y.h){for(var x=y["return"],w=v.audio,C=v.video,D=t(C),B=D.next();!B.done;B=D.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
663
+ void 0,B.frameRate=Number(h)||void 0,B.hdr=r||void 0;D=a.g.disableAudio;if(!w.length||D)w=[null];D=a.g.disableVideo;if(!C.length||D)C=[null];D=[];w=t(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var E=t(C),G=E.next();!G.done;G=E.next()){var I=G.value;G=B?B.stream:null;var N=I?I.stream:null,K=B?B.stream.drmInfos:null,O=I?I.stream.drmInfos:null;I=(I?I.pd:"")+" - "+(B?B.pd:"");G&&N&&K.length&&O.length&&!(0<fg(K,O).length)||a.va.has(I)||(G={id:a.Aa++,language:G?G.language:"und",primary:!!G&&G.primary||
664
+ !!N&&N.primary,audio:G,video:N,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},D.push(G),a.va.add(I))}}y=x.call(y,D)}else y=y["return"]([]);return y})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Cb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
665
+ function Iq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return H(function(x){if(1==x.g)return c=Mb,d=Fq(a,b),e=U(b,"AUDIO"),f=U(b,"VIDEO"),h=(g=e||f)&&a.B.has(g)?a.B.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=Vp(b,"URI"),p=k.audio.find(function(w){return w&&w.pd==n}),r=Jb(c.bb,d),(v=Jb(c.wb,d))&&!r?l=c.wb:!h.length&&v&&r?(l=c.bb,d=[[r,v].join()]):k.audio.length&&p?(l=c.wb,m=!0):l=k.video.length?c.wb:c.bb,m?x.C(2):u(x,Jq(a,b,d,l),3);2!=x.g&&(y=x.h);if(y)k[y.stream.type]=[y];else if(null===y)return x["return"](null);
666
+ Kq(k);return x["return"](k)})}function Fq(a,b){var c=[];a.g.disableVideo||c.push("avc1.42E01E");a.g.disableAudio||c.push("mp4a.40.2");var d=U(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=jd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function Lq(a){a=U(a,"LANGUAGE")||"und";return Ob(a)}
666
667
  function Kq(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function Aq(a,b){var c=Zp(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Lq(e);var f=Vp(e,"GROUP-ID");e=Vp(e,"INSTREAM-ID");a.J.get(f)||a.J.set(f,new Map);a.J.get(f).set(e,d)}}
667
- function Gq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return H(function(w){if(1==w.g){c=Vp(b,"GROUP-ID");d="";var x=Vp(b,"TYPE").toLowerCase();"subtitles"==x&&(x=Lb);e=x;e!=Lb&&c&&a.A.has(c)&&(d=a.A.get(c));f=Mq(Vp(b,"URI"),a.v);if(a.h.has(f))return w["return"](a.h.get(f));g=Lq(b);h=U(b,"NAME");k=U(b,"DEFAULT");l="YES"==k;"audio"==e?x=(x=U(b,"CHANNELS"))?parseInt(x.split("/")[0],10):null:x=null;m=x;"audio"==e?x=(x=U(b,"CHANNELS"))?x.includes("/JOC"):!1:x=!1;n=x;p=U(b,"CHARACTERISTICS");r=U(b,"FORCED");
668
- v="YES"==r;return u(w,Nq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=w.h;a.B.has(c)?a.B.get(c).push(y):a.B.set(c,[y]);if(null==y)return w["return"](null);if(a.h.has(f))return w["return"](a.h.get(f));a.h.set(f,y);return w["return"](y)})}
668
+ function Gq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y;return H(function(x){if(1==x.g){c=Vp(b,"GROUP-ID");d="";var w=Vp(b,"TYPE").toLowerCase();"subtitles"==w&&(w=Lb);e=w;e!=Lb&&c&&a.A.has(c)&&(d=a.A.get(c));f=Mq(Vp(b,"URI"),a.v);if(a.h.has(f))return x["return"](a.h.get(f));g=Lq(b);h=U(b,"NAME");k=U(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=U(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=U(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;n=w;p=U(b,"CHARACTERISTICS");r=U(b,"FORCED");
669
+ v="YES"==r;return u(x,Nq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.B.has(c)?a.B.get(c).push(y):a.B.set(c,[y]);if(null==y)return x["return"](null);if(a.h.has(f))return x["return"](a.h.get(f));a.h.set(f,y);return x["return"](y)})}
669
670
  function Hq(a,b){var c,d,e,f,g,h,k,l,m,n;return H(function(p){if(1==p.g){c=Mq(Vp(b,"URI"),a.v);d=U(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=Lq(b);f=U(b,"NAME");g=U(b,"CHARACTERISTICS");return u(p,Nq(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=U(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
670
671
  Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=U(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
671
672
  function Jq(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g){e=Mq(Vp(b,"URI"),a.v);if(a.h.has(e))return k["return"](a.h.get(e));var l=U(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.J.get(l):null;g=Ib(d,c);return u(k,Nq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.h.has(e))return k["return"](a.h.get(e));a.h.set(e,h);return k["return"](h)})}
672
- function Nq(a,b,c,d,e,f,g,h,k,l,m,n){var p,r,v,y,w,x,C,D,B,E,G,I,N,K,O,V,Z,W,ma,ya,Ta,Qa,Ea,Ua,Pc,Ad,Ya,Ae,Yf,Ko,Lo,Mo,zi,Ai,Zf,No,Oo,Po,Qo;return H(function(kb){switch(kb.g){case 1:return p=Gb([a.M],[b])[0],u(kb,qq(a,af([p],a.g.retryParameters),0),2);case 2:r=kb.h;p=r.uri;v=gq(a.ua,r.data,p);if(1!=v.type)throw new M(2,4,4017);y=[];if(v.segments)for(w=t(v.segments),x=w.next();!x.done;x=w.next())C=x.value,D=Yp(C.g,"EXT-X-KEY"),y.push.apply(y,ha(D));B=!1;E=[];G=new Set;I=t(y);for(N=I.next();!N.done;N=
673
- I.next())if(K=N.value,O=Vp(K,"METHOD"),"NONE"!=O){B=!0;if("AES-128"==O)return a.Ba=!0,kb["return"](null);V=Vp(K,"KEYFORMAT");if(W=(Z=Oq[V])?Z(K):null){if(W.keyIds)for(ma=t(W.keyIds),ya=ma.next();!ya.done;ya=ma.next())Ta=ya.value,G.add(Ta);E.push(W)}}if(B&&!E.length)throw new M(2,4,4026);Qa=Yp(v.g,"EXT-X-DEFINE");Ea=uq(a,Qa);Pq(a,v);return u(kb,Qq(a,d,c,v,Ea),3);case 3:return Ua=kb.h,Rq.includes(Ua)&&(c=""),Pc=new Map,Ad=new Map,A(kb,4),u(kb,vq(a,b,v,d,Ua,Pc,Ea,Ad),6);case 6:Ya=kb.h;ua(kb,5);break;
673
+ function Nq(a,b,c,d,e,f,g,h,k,l,m,n){var p,r,v,y,x,w,C,D,B,E,G,I,N,K,O,V,Z,W,ma,ya,Ta,Qa,Fa,Ua,Pc,Ad,Ya,Ae,Yf,Ko,Lo,Mo,zi,Ai,Zf,No,Oo,Po,Qo;return H(function(kb){switch(kb.g){case 1:return p=Gb([a.M],[b])[0],u(kb,qq(a,af([p],a.g.retryParameters),0),2);case 2:r=kb.h;p=r.uri;v=gq(a.ua,r.data,p);if(1!=v.type)throw new M(2,4,4017);y=[];if(v.segments)for(x=t(v.segments),w=x.next();!w.done;w=x.next())C=w.value,D=Yp(C.g,"EXT-X-KEY"),y.push.apply(y,ha(D));B=!1;E=[];G=new Set;I=t(y);for(N=I.next();!N.done;N=
674
+ I.next())if(K=N.value,O=Vp(K,"METHOD"),"NONE"!=O){B=!0;if("AES-128"==O)return a.Ba=!0,kb["return"](null);V=Vp(K,"KEYFORMAT");if(W=(Z=Oq[V])?Z(K):null){if(W.keyIds)for(ma=t(W.keyIds),ya=ma.next();!ya.done;ya=ma.next())Ta=ya.value,G.add(Ta);E.push(W)}}if(B&&!E.length)throw new M(2,4,4026);Qa=Yp(v.g,"EXT-X-DEFINE");Fa=uq(a,Qa);Pq(a,v);return u(kb,Qq(a,d,c,v,Fa),3);case 3:return Ua=kb.h,Rq.includes(Ua)&&(c=""),Pc=new Map,Ad=new Map,A(kb,4),u(kb,vq(a,b,v,d,Ua,Pc,Fa,Ad),6);case 6:Ya=kb.h;ua(kb,5);break;
674
675
  case 4:Ae=F(kb);if(4035==Ae.code)return Pa("Skipping unsupported HLS stream",Ua,b),kb["return"](null);throw Ae;case 5:Yf=Ya[0].startTime;Ko=Ya[Ya.length-1].endTime;Lo=new Mi(Ya);Mo=d==Lb?"subtitle":void 0;zi=[];if(l)for(Ai=t(l.split(",")),Zf=Ai.next();!Zf.done;Zf=Ai.next())No=Zf.value,zi.push(No);Po=(Oo=$p(v.g,"EXT-X-SERVER-CONTROL"))?null!=Oo.getAttribute("CAN-SKIP-UNTIL"):!1;Qo={id:a.Aa++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Lo,mimeType:Ua,codecs:c,kind:Mo,
675
676
  encrypted:B,drmInfos:E,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:zi,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return kb["return"]({stream:Qo,pd:b,wf:p,Ye:Yf,vg:Ko,Pd:Pc,Gf:Ad,Bf:Po})}})}
676
677
  function Pq(a,b){var c=$p(b.g,"EXT-X-PLAYLIST-TYPE"),d=$p(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)wq(a,pq);else{c?wq(a,Sq):wq(a,Tq);d=$p(b.g,"EXT-X-TARGETDURATION");if(!d)throw new M(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=$p(b.g,"EXT-X-PART-INF");a.l&&c?(a.aa=Number(Vp(c,"PART-TARGET")),a.H=Math.min(a.aa,a.H),c=$p(b.g,"EXT-X-SERVER-CONTROL"),a.Y=c?Number(Vp(c,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.$=Math.max(d,a.$)}}
677
678
  function Uq(a,b,c,d){c=$p(c,"EXT-X-MAP");if(!c)return null;var e=Vp(c,"URI");d=Mq(Gb([b],[e])[0],d);b=[d,U(c,"BYTERANGE","")].join("-");a.Z.has(b)||(c=Vq(d,c),a.Z.set(b,c));return a.Z.get(b)}function Vq(a,b){var c=0,d=null,e=U(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new li(function(){return[a]},c,d)}
678
- function Wq(a,b,c,d,e,f,g,h,k){var l=d.g,m=Mq(d.h,g),n=$p(l,"EXTINF"),p=g=0,r=null;if(!n){if(0==d.i.length)throw new M(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},w=0;w<d.i.length;y={yd:y.yd},w++){var x=d.i[w],C=0==w?c:v[v.length-1],D=0==w?e:C.endTime,B=Number(U(x,"DURATION"))||a.aa;if(B){B=D+B;var E=0,G=null;"EXT-X-PRELOAD-HINT"==x.name?E=(C=U(x,"BYTERANGE-START"))?Number(C):0:(E=U(x,"BYTERANGE"),C=t(Xq(C,E)),E=C.next().value,G=C.next().value);if(x=U(x,"URI"))y.yd=Gb([h],
679
- [x])[0],v.push(new ni(D,B,function(I){return function(){return[I.yd]}}(y),E,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=$p(l,"EXT-X-BYTERANGE"))?(r=t(Xq(c,a.value)),p=r.next().value,r=r.next().value):v.length&&(p=v[0].ya,r=v[v.length-1].ra);c="";a=null;"image"==k&&(c="1x1",k=$p(l,"EXT-X-TILES"))&&(c=Vp(k,"LAYOUT"),(k=U(k,"DURATION"))&&(a=Number(k)));return new ni(e,g,function(){return m.length?[m]:[]},p,r,b,f,0,Infinity,v,c,a)}
679
+ function Wq(a,b,c,d,e,f,g,h,k){var l=d.g,m=Mq(d.h,g),n=$p(l,"EXTINF"),p=g=0,r=null;if(!n){if(0==d.i.length)throw new M(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},x=0;x<d.i.length;y={yd:y.yd},x++){var w=d.i[x],C=0==x?c:v[v.length-1],D=0==x?e:C.endTime,B=Number(U(w,"DURATION"))||a.aa;if(B){B=D+B;var E=0,G=null;"EXT-X-PRELOAD-HINT"==w.name?E=(C=U(w,"BYTERANGE-START"))?Number(C):0:(E=U(w,"BYTERANGE"),C=t(Xq(C,E)),E=C.next().value,G=C.next().value);if(w=U(w,"URI"))y.yd=Gb([h],
680
+ [w])[0],v.push(new ni(D,B,function(I){return function(){return[I.yd]}}(y),E,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=$p(l,"EXT-X-BYTERANGE"))?(r=t(Xq(c,a.value)),p=r.next().value,r=r.next().value):v.length&&(p=v[0].ya,r=v[v.length-1].ra);c="";a=null;"image"==k&&(c="1x1",k=$p(l,"EXT-X-TILES"))&&(c=Vp(k,"LAYOUT"),(k=U(k,"DURATION"))&&(a=Number(k)));return new ni(e,g,function(){return m.length?[m]:[]},p,r,b,f,0,Infinity,v,c,a)}
680
681
  function Xq(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ra+1,d=c+d-1);return[c,d]}function Eq(a){if(a.i){for(var b=t(a.W),c=b.next();!c.done;c=b.next())a.i.Zb(c.value);a.W=[]}}
681
- function vq(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,v,y,w,x,C,D,B,E,G,I,N,K,O,V,Z;return H(function(W){switch(W.g){case 1:k=c.segments;m=aq(c.g,"EXT-X-MEDIA-SEQUENCE",0);p=(n=$p(c.g,"EXT-X-SKIP"))?Number(U(n,"SKIPPED-SEGMENTS")):0;r=m+p;if(a.m!=pq&&f.has(r)){v=f.get(r);W.C(2);break}if(null!=a.R){W.C(3);break}l=Uq(a,c.h,k[0].g,g);y=a;return u(W,Yq(a,b,l,e,r,!1,k[0],g,d),4);case 4:y.R=W.h;case 3:v=a.R;case 2:w=k[0].h;w.split("/").pop();x=aq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(x)||h.set(x,r),
682
- p))for(C=h;C.has(x+1)&&C.get(x+1)<r;)x++;D=a.I.get(x)||0;B=[];E=0;case 5:if(!(E<k.length)){W.C(7);break}G=k[E];I=B[B.length-1];N=0==E?v:I.endTime;r=m+p+E;f.set(r,N);l=Uq(a,c.h,G.g,g);K=$p(G.g,"EXT-X-DISCONTINUITY");if(!K){W.C(8);break}x++;h.set(x,r);return u(W,Zq(a,x,b,l,e,r,G,g,N,d),9);case 9:D=W.h;case 8:!a.l&&(O=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.l=a.j.isLowLatencyMode());V=$p(G.g,"EXTINF");a.l||V?(Z=Wq(a,l,I,G,N,D,g,c.h,d))&&B.push(Z):a.l||Pa("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.");
682
+ function vq(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,v,y,x,w,C,D,B,E,G,I,N,K,O,V,Z;return H(function(W){switch(W.g){case 1:k=c.segments;m=aq(c.g,"EXT-X-MEDIA-SEQUENCE",0);p=(n=$p(c.g,"EXT-X-SKIP"))?Number(U(n,"SKIPPED-SEGMENTS")):0;r=m+p;if(a.m!=pq&&f.has(r)){v=f.get(r);W.C(2);break}if(null!=a.R){W.C(3);break}l=Uq(a,c.h,k[0].g,g);y=a;return u(W,Yq(a,b,l,e,r,!1,k[0],g,d),4);case 4:y.R=W.h;case 3:v=a.R;case 2:x=k[0].h;x.split("/").pop();w=aq(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(w)||h.set(w,r),
683
+ p))for(C=h;C.has(w+1)&&C.get(w+1)<r;)w++;D=a.I.get(w)||0;B=[];E=0;case 5:if(!(E<k.length)){W.C(7);break}G=k[E];I=B[B.length-1];N=0==E?v:I.endTime;r=m+p+E;f.set(r,N);l=Uq(a,c.h,G.g,g);K=$p(G.g,"EXT-X-DISCONTINUITY");if(!K){W.C(8);break}w++;h.set(w,r);return u(W,Zq(a,w,b,l,e,r,G,g,N,d),9);case 9:D=W.h;case 8:!a.l&&(O=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.l=a.j.isLowLatencyMode());V=$p(G.g,"EXTINF");a.l||V?(Z=Wq(a,l,I,G,N,D,g,c.h,d))&&B.push(Z):a.l||Pa("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.");
683
684
  E++;W.C(5);break;case 7:return W["return"](B)}})}function Zq(a,b,c,d,e,f,g,h,k,l){var m,n;return H(function(p){if(1==p.g)return m=0,a.I.has(b)?(m=a.I.get(b),p.C(2)):u(p,Yq(a,c,d,e,f,!0,g,h,l),3);2!=p.g&&(n=p.h,m=k-n,a.I.set(b,m));return p["return"](m)})}
684
685
  function $q(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:c=gf;d=$i(b.Ea(),b.ya,b.ra,a.g.retryParameters);if(a.g.hls.useFullSegmentsForStartTime)return k["return"](qq(a,d,c));e=$i(b.Ea(),b.ya,b.ya+2048-1,a.g.retryParameters);A(k,2);return u(k,qq(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=F(k);if(7001==g.code)throw g;Pa("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",
685
686
  e.uris[0]);return u(k,qq(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
686
- function Yq(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,v,y,w;return H(function(x){switch(x.g){case 1:l=Wq(a,c,null,g,0,0,h,"",k);if(a.F&&!f&&(m=a.h.get(b),n=m.Pd.get(e),void 0!=n))return x["return"](n);d=d.toLowerCase();if(Rq.includes(d))throw Pa("Raw formats are not yet supported. Skipping "+d),new M(1,4,4035);if("video/webm"==d)throw Pa("WebM in HLS is not yet supported. Skipping."),new M(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){x.C(2);break}p=[$q(a,l)];c&&p.push($q(a,c));return u(x,Promise.all(p),
687
- 3);case 3:return r=x.h,v=r[0],y=r[1]||r[0],x["return"](ar(b,v.uri,v.data,y.data));case 2:if("video/mp2t"!=d){x.C(4);break}return u(x,$q(a,l),5);case 5:return w=x.h,x["return"](br(b,w.uri,w.data));case 4:throw new M(2,4,4030,b);}})}
687
+ function Yq(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,v,y,x;return H(function(w){switch(w.g){case 1:l=Wq(a,c,null,g,0,0,h,"",k);if(a.F&&!f&&(m=a.h.get(b),n=m.Pd.get(e),void 0!=n))return w["return"](n);d=d.toLowerCase();if(Rq.includes(d))throw Pa("Raw formats are not yet supported. Skipping "+d),new M(1,4,4035);if("video/webm"==d)throw Pa("WebM in HLS is not yet supported. Skipping."),new M(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.C(2);break}p=[$q(a,l)];c&&p.push($q(a,c));return u(w,Promise.all(p),
688
+ 3);case 3:return r=w.h,v=r[0],y=r[1]||r[0],w["return"](ar(b,v.uri,v.data,y.data));case 2:if("video/mp2t"!=d){w.C(4);break}return u(w,$q(a,l),5);case 5:return x=w.h,w["return"](br(b,x.uri,x.data));case 4:throw new M(2,4,4030,b);}})}
688
689
  function ar(a,b,c,d){var e=0;(new qg).box("moov",ug).box("trak",ug).box("mdia",ug).U("mdhd",function(h){e=Hh(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new M(2,4,4030,a,b);var f=0,g=!1;(new qg).box("moof",ug).box("traf",ug).U("tfdt",function(h){f=Gh(h.reader,h.version).Id/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new M(2,4,4030,a,b);return f}
689
690
  function br(a,b,c){function d(){f.seek(g+188);h=f.ha();71!=h&&(f.seek(g+192),h=f.ha());71!=h&&(f.seek(g+204),h=f.ha());71!=h&&e();f.df(1)}function e(){throw new M(2,4,4030,a,b);}var f=new ng(c,0),g=0,h=0;for(c=Math.min(f.S.byteLength-188,940);;){g=f.ea();h=f.ha();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.bc();if(8191==(k&8191))d();else if(k&16384)if(k=(f.ha()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.ha(),f.skip(k)),1!=f.O()>>8)d();else{f.skip(3);c=f.ha()>>6;0!=c&&1!=c||e();0==f.ha()&&e();c=f.ha();k=
690
691
  f.bc();var l=f.bc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Mq(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new M(2,4,4039,f);}}return c}
691
- function Qq(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,v,y;return H(function(w){if(1==w.g){f=Mb;g=gf;h=Mq(d.segments[0].h,e);k=new jb(h);l=k.Ma.split(".").pop();m=cr[b];if(n=m[l])return w["return"](n);if(b==f.ka)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");if(b==f.nc&&(!c||"jpeg"==c))return w["return"]("image/jpeg");p=af([h],a.g.retryParameters);p.method="HEAD";return u(w,qq(a,p,g),2)}r=w.h;v=r.headers["content-type"];return v?w["return"](v.split(";")[0]):(y=m.mp4,w["return"](y))})}
692
- function oq(a){var b,c;H(function(d){if(1==d.g){if(!a.j)return d["return"]();A(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.qa,a.D.P(b),ua(d,0);c=F(d);if(!a.j)return d["return"]();c.severity=1;a.j.onError(c);a.D.P(.1);z(d)})}function wq(a,b){a.m=b;a.i&&a.i.Gc(a.m==pq);a.m!=pq||a.D.stop()}function qq(a,b,c){if(!a.G)throw new M(2,7,7001);b=a.j.networkingEngine.request(c,b);We(a.G,b);return b.promise}J("shaka.hls.HlsParser",nq);
692
+ function Qq(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,v,y,x;return H(function(w){if(1==w.g){f=Mb;g=gf;h=Math.trunc((d.segments.length-1)/2);k=Mq(d.segments[h].h,e);l=new jb(k);m=l.Ma.split(".").pop();n=cr[b];if(p=n[m])return w["return"](p);if(b==f.ka)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");if(b==f.nc&&(!c||"jpeg"==c))return w["return"]("image/jpeg");r=af([k],a.g.retryParameters);r.method="HEAD";return u(w,qq(a,r,g),2)}v=w.h;y=v.headers["content-type"];return y?
693
+ w["return"](y.split(";")[0]):(x=n.mp4,w["return"](x))})}function oq(a){var b,c;H(function(d){if(1==d.g){if(!a.j)return d["return"]();A(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.qa,a.D.P(b),ua(d,0);c=F(d);if(!a.j)return d["return"]();c.severity=1;a.j.onError(c);a.D.P(.1);z(d)})}function wq(a,b){a.m=b;a.i&&a.i.Gc(a.m==pq);a.m!=pq||a.D.stop()}function qq(a,b,c){if(!a.G)throw new M(2,7,7001);b=a.j.networkingEngine.request(c,b);We(a.G,b);return b.promise}J("shaka.hls.HlsParser",nq);
693
694
  var Rq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],cr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
694
695
  vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Oq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Vp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Vp(a,"URI");b=mq(b);b=Ec(b.data);b=Hb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=U(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
695
696
  Vp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Vp(a,"URI");a=mq(a);a=Ec(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=An(a,b);return Hb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},pq="VOD",Tq="EVENT",Sq="LIVE",tq={vf:pq,ih:Tq,Be:Sq};lg.m3u8=function(){return new nq};jg["application/x-mpegurl"]=function(){return new nq};jg["application/vnd.apple.mpegurl"]=function(){return new nq};function dr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,$e:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Sc(b)}catch(g){}throw new M(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function er(){}function fr(a,b,c,d){var e=new gr;sf(b.headers).forEach(function(k,l){e.append(l,k)});var f=new hr,g={Ee:!1,qf:!1};a=ir(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new Me(a,function(){g.Ee=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new P(function(){g.qf=!0;f.abort()});h.P(b/1E3);a["finally"](function(){h.stop()})}return a}
696
- function ir(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,v,y,w,x,C,D;return H(function(B){switch(B.g){case 1:return g=jr,h=kr,n=m=0,p=Date.now(),A(B,2),u(B,g(a,c),4);case 4:return k=B.h,r=k.clone().body.getReader(),y=(v=k.headers.get("Content-Length"))?parseInt(v,10):0,w=function(E){function G(){var I,N;return H(function(K){switch(K.g){case 1:return A(K,2),u(K,r.read(),4);case 4:I=K.h;ua(K,3);break;case 2:return F(K),K["return"]();case 3:if(I.done){K.C(5);break}m+=I.value.byteLength;if(!f){K.C(5);break}return u(K,
697
- f(I.value),5);case 5:N=Date.now();if(100<N-p||I.done)e(N-p,m-n,y-m),n=m,p=N;I.done?E.close():(E.enqueue(I.value),G());z(K)}})}G()},new h({start:w}),u(B,k.arrayBuffer(),5);case 5:l=B.h;ua(B,3);break;case 2:x=F(B);if(d.Ee)throw new M(1,1,7001,a,b);if(d.qf)throw new M(1,1,1003,a,b);throw new M(1,1,1002,a,x,b);case 3:return C={},D=k.headers,D.forEach(function(E,G){C[G.trim()]=E}),B["return"](dr(C,l,k.status,a,k.url,b))}})}
697
+ function ir(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,v,y,x,w,C,D;return H(function(B){switch(B.g){case 1:return g=jr,h=kr,n=m=0,p=Date.now(),A(B,2),u(B,g(a,c),4);case 4:return k=B.h,r=k.clone().body.getReader(),y=(v=k.headers.get("Content-Length"))?parseInt(v,10):0,x=function(E){function G(){var I,N;return H(function(K){switch(K.g){case 1:return A(K,2),u(K,r.read(),4);case 4:I=K.h;ua(K,3);break;case 2:return F(K),K["return"]();case 3:if(I.done){K.C(5);break}m+=I.value.byteLength;if(!f){K.C(5);break}return u(K,
698
+ f(I.value),5);case 5:N=Date.now();if(100<N-p||I.done)e(N-p,m-n,y-m),n=m,p=N;I.done?E.close():(E.enqueue(I.value),G());z(K)}})}G()},new h({start:x}),u(B,k.arrayBuffer(),5);case 5:l=B.h;ua(B,3);break;case 2:w=F(B);if(d.Ee)throw new M(1,1,7001,a,b);if(d.qf)throw new M(1,1,1003,a,b);throw new M(1,1,1002,a,w,b);case 3:return C={},D=k.headers,D.forEach(function(E,G){C[G.trim()]=E}),B["return"](dr(C,l,k.status,a,k.url,b))}})}
698
699
  function lr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}J("shaka.net.HttpFetchPlugin",er);er.isSupported=lr;er.parse=fr;var jr=window.fetch,hr=window.AbortController,kr=window.ReadableStream,gr=window.Headers;lr()&&(Ye("http",fr,2,!0),Ye("https",fr,2,!0));function mr(){}
699
700
  function nr(a,b,c,d){var e=new or,f=Date.now(),g=0,h=new Promise(function(k,l){e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onabort=function(){l(new M(1,1,7001,a,c))};e.onload=function(n){n=n.target;var p=n.getAllResponseHeaders().trim().split("\r\n"),r={};p=t(p);for(var v=p.next();!v.done;v=p.next())v=v.value.split(": "),r[v[0].toLowerCase()]=v.slice(1).join(": ");try{var y=dr(r,n.response,n.status,a,n.responseURL,
700
- c);k(y)}catch(w){l(w)}};e.onerror=function(n){l(new M(1,1,1002,a,n,c))};e.ontimeout=function(){l(new M(1,1,1003,a,c))};e.onprogress=function(n){var p=Date.now();if(100<p-f||n.lengthComputable&&n.loaded==n.total)d(p-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=p};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new Me(h,function(){e.abort();return Promise.resolve()})}J("shaka.net.HttpXHRPlugin",mr);mr.parse=nr;var or=window.XMLHttpRequest;
701
+ c);k(y)}catch(x){l(x)}};e.onerror=function(n){l(new M(1,1,1002,a,n,c))};e.ontimeout=function(){l(new M(1,1,1003,a,c))};e.onprogress=function(n){var p=Date.now();if(100<p-f||n.lengthComputable&&n.loaded==n.total)d(p-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=p};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new Me(h,function(){e.abort();return Promise.resolve()})}J("shaka.net.HttpXHRPlugin",mr);mr.parse=nr;var or=window.XMLHttpRequest;
701
702
  Ye("http",nr,1,!0);Ye("https",nr,1,!0);function pr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function qr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}pr.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 rr(a){var b=this;this.v=a;this.h=new Map;this.i=new hf(function(){return sr(b)["catch"](function(){})});this.j=[];this.m=function(){};this.l=function(){};this.g=new pr}rr.prototype.destroy=function(){return this.i.destroy()};function tr(a,b,c){a.m=b;a.l=c}function sr(a){var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
702
703
  function ur(a,b,c,d,e,f){jf(a.i);var g=qr(a.g,d);d=(a.h.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return H(function(v){if(1==v.g)return u(v,vr(a,c),2);h=v.h;if(a.i.g)throw new M(2,9,7001);if(e)for(m in k=Ec(h),l=new zn(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.l(p,r);a.g.close(g,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.h.set(b,d);return d}
703
704
  function wr(a,b,c){jf(a.i);var d=(a.h.get(b)||Promise.resolve()).then(function(){return H(function(e){return u(e,c(),0)})});a.h.set(b,d)}function xr(a){return H(function(b){return 1==b.g?u(b,Promise.all(a.h.values()),2):b["return"](a.g.h)})}function vr(a,b){var c,d,e,f;return H(function(g){if(1==g.g)return c=gf,d=a.v.request(c,b),e=function(){return d.abort()},a.j.push(e),u(g,d.promise,2);f=g.h;ec(a.j,e);return g["return"](f.data)})};function yr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Lc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}yr.prototype.abort=function(){var a=this;return H(function(b){if(1==b.g){try{a.i.abort()}catch(c){}A(b,2);return u(b,a.g,4)}if(2!=b.g)return ua(b,0);F(b);z(b)})};
@@ -747,13 +748,13 @@ function qs(a){var b=[],c=oe(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.n
747
748
  q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ak(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(yb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return fk(this.h,a)};q.getConfiguration=function(){var a=dk();fk(a,this.h,dk());return a};q.uc=function(){return this.g};
748
749
  q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new rr(this.g);this.l.push(f);b=xs(this,a,b||{},function(){var h;return H(function(k){if(1==k.g)return u(k,ig(a,d.g,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Fb(h))})},e,f);var g=new Me(b,function(){return sr(f)});g["finally"](function(){ec(d.l,f)});g.then=function(h){yb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
749
750
  return g.promise.then(h)};return ys(this,g)};q.gg=function(){yb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
750
- function xs(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,v,y,w;return H(function(x){switch(x.g){case 1:return zs(),h=g=null,k=new Ir,m=l=null,A(x,2,3),u(x,d(),5);case 5:return g=x.h,u(x,As(a,b,g,e),6);case 6:n=x.h;Bs(a);p=!n.presentationTimeline.V()&&!n.presentationTimeline.Gb();if(!p)throw new M(2,9,9005,b);return u(x,Cs(a,n,function(C){m=m||C},e),7);case 7:h=x.h;Bs(a);if(m)throw m;return u(x,Ds(n,e),8);case 8:return u(x,k.init(),9);case 9:return Bs(a),u(x,Kr(k),10);case 10:return l=x.h,Bs(a),u(x,Es(a,l.Da,
751
- h,n,b,c,e,f),11);case 11:r=x.h;Bs(a);if(m)throw m;return u(x,l.Da.addManifests([r]),12);case 12:return v=x.h,Bs(a),y=new as("manifest",l.path.Wa,l.path.Da,v[0]),x["return"](rs(y,r));case 3:return va(x),a.j=[],u(x,k.destroy(),13);case 13:if(!g){x.C(14);break}return u(x,g.stop(),14);case 14:if(!h){x.C(16);break}return u(x,h.destroy(),16);case 16:wa(x,0);break;case 2:w=F(x);if(!l){x.C(18);break}return u(x,l.Da.removeSegments(a.j,function(){}),18);case 18:throw m||w;}})}
752
- function Ds(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,w,x,C,D,B,E,G,I,N,K,O,V,Z,W,ma;return H(function(ya){switch(ya.g){case 1:return c={width:Infinity,height:Infinity},Td(a,b.restrictions,c),u(ya,Wd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Hd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(fe(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,
753
- d.push(ge(r));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())w=y.value,d.push(he(w));return u(ya,b.offline.trackSelectionCallback(d),3);case 3:x=ya.h;C=a.presentationTimeline.getDuration();D=0;B=t(x);for(E=B.next();!E.done;E=B.next())G=E.value,I=G.bandwidth*C/8,D+=I;A(ya,4);return u(ya,b.offline.downloadSizeCallback(D),6);case 6:N=ya.h;if(!N)throw new M(2,9,9014);ua(ya,5);break;case 4:K=F(ya);if(K instanceof M)throw K;throw new M(2,9,9015);case 5:O=new Set;V=new Set;Z=new Set;W=t(x);for(E=
751
+ function xs(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,v,y,x;return H(function(w){switch(w.g){case 1:return zs(),h=g=null,k=new Ir,m=l=null,A(w,2,3),u(w,d(),5);case 5:return g=w.h,u(w,As(a,b,g,e),6);case 6:n=w.h;Bs(a);p=!n.presentationTimeline.V()&&!n.presentationTimeline.Gb();if(!p)throw new M(2,9,9005,b);return u(w,Cs(a,n,function(C){m=m||C},e),7);case 7:h=w.h;Bs(a);if(m)throw m;return u(w,Ds(n,e),8);case 8:return u(w,k.init(),9);case 9:return Bs(a),u(w,Kr(k),10);case 10:return l=w.h,Bs(a),u(w,Es(a,l.Da,
752
+ h,n,b,c,e,f),11);case 11:r=w.h;Bs(a);if(m)throw m;return u(w,l.Da.addManifests([r]),12);case 12:return v=w.h,Bs(a),y=new as("manifest",l.path.Wa,l.path.Da,v[0]),w["return"](rs(y,r));case 3:return va(w),a.j=[],u(w,k.destroy(),13);case 13:if(!g){w.C(14);break}return u(w,g.stop(),14);case 14:if(!h){w.C(16);break}return u(w,h.destroy(),16);case 16:wa(w,0);break;case 2:x=F(w);if(!l){w.C(18);break}return u(w,l.Da.removeSegments(a.j,function(){}),18);case 18:throw m||x;}})}
753
+ function Ds(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,v,y,x,w,C,D,B,E,G,I,N,K,O,V,Z,W,ma;return H(function(ya){switch(ya.g){case 1:return c={width:Infinity,height:Infinity},Td(a,b.restrictions,c),u(ya,Wd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Hd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(fe(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,
754
+ d.push(ge(r));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())x=y.value,d.push(he(x));return u(ya,b.offline.trackSelectionCallback(d),3);case 3:w=ya.h;C=a.presentationTimeline.getDuration();D=0;B=t(w);for(E=B.next();!E.done;E=B.next())G=E.value,I=G.bandwidth*C/8,D+=I;A(ya,4);return u(ya,b.offline.downloadSizeCallback(D),6);case 6:N=ya.h;if(!N)throw new M(2,9,9014);ua(ya,5);break;case 4:K=F(ya);if(K instanceof M)throw K;throw new M(2,9,9015);case 5:O=new Set;V=new Set;Z=new Set;W=t(w);for(E=
754
755
  W.next();!E.done;E=W.next())ma=E.value,"variant"==ma.type&&O.add(ma.id),"text"==ma.type&&V.add(ma.id),"image"==ma.type&&Z.add(ma.id);a.variants=a.variants.filter(function(Ta){return O.has(Ta.id)});a.textStreams=a.textStreams.filter(function(Ta){return V.has(Ta.id)});a.imageStreams=a.imageStreams.filter(function(Ta){return Z.has(Ta.id)});Fs(a);z(ya)}})}
755
- function Es(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,v,y,w,x,C,D;return H(function(B){switch(B.g){case 1:return k=ps(e,d,f),l=g.offline.progressCallback,m=function(E,G){k.size=G;l(k,E)},n=function(E,G){v&&g.offline.usePersistentLicense&&y==G&&Lf(c,"cenc",E)},tr(h,m,n),p=d.variants.some(function(E){var G=E.audio&&E.audio.encrypted;return E.video&&E.video.encrypted||G}),r=d.variants.some(function(E){return(E.video?E.video.drmInfos:[]).concat(E.audio?E.audio.drmInfos:[]).some(function(G){return G.initData&&
756
- G.initData.length})}),v=p&&!r,y=null,v&&(w=c.g,y=Gs.get(w.keySystem)),ta(B),C=x=Hs(a,h,b,c,d,e,f,g),u(B,xr(h),4);case 4:C.size=B.h;x.expiration=c.tc();D=Rf(c);x.sessionIds=g.offline.usePersistentLicense?D:[];if(p&&g.offline.usePersistentLicense&&!D.length)throw new M(2,9,9007);return B["return"](x);case 2:return va(B),u(B,h.destroy(),5);case 5:wa(B,0)}})}q.remove=function(a){return Is(this,Js(this,a))};
756
+ function Es(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,v,y,x,w,C,D;return H(function(B){switch(B.g){case 1:return k=ps(e,d,f),l=g.offline.progressCallback,m=function(E,G){k.size=G;l(k,E)},n=function(E,G){v&&g.offline.usePersistentLicense&&y==G&&Lf(c,"cenc",E)},tr(h,m,n),p=d.variants.some(function(E){var G=E.audio&&E.audio.encrypted;return E.video&&E.video.encrypted||G}),r=d.variants.some(function(E){return(E.video?E.video.drmInfos:[]).concat(E.audio?E.audio.drmInfos:[]).some(function(G){return G.initData&&
757
+ G.initData.length})}),v=p&&!r,y=null,v&&(x=c.g,y=Gs.get(x.keySystem)),ta(B),C=w=Hs(a,h,b,c,d,e,f,g),u(B,xr(h),4);case 4:C.size=B.h;w.expiration=c.tc();D=Rf(c);w.sessionIds=g.offline.usePersistentLicense?D:[];if(p&&g.offline.usePersistentLicense&&!D.length)throw new M(2,9,9007);return B["return"](w);case 2:return va(B),u(B,h.destroy(),5);case 5:wa(B,0)}})}q.remove=function(a){return Is(this,Js(this,a))};
757
758
  function Js(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:zs();c=bs(b);if(null==c||"manifest"!=c.g)throw new M(2,9,9004,b);d=c;e=new Ir;ta(k);return u(k,e.init(),4);case 4:return u(k,Mr(e,d.Wa(),d.Da()),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([Ks(a,h,e),Ls(f,d,h)]),2);case 2:return va(k),u(k,e.destroy(),8);case 8:wa(k,0)}})}
758
759
  function Ms(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:gd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:gd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Ks(a,b,c){return H(function(d){return u(d,Ns(a.g,a.h.drm,c,b),0)})}
759
760
  function Ls(a,b,c){function d(){}var e=Os(c);rs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Gg=function(){return Is(this,Ps(this))};
@@ -765,7 +766,7 @@ function Hs(a,b,c,d,e,f,g,h){for(var k=new ss,l=t(e.variants),m=l.next();!m.done
765
766
  n.set(null,Promise.resolve(null));m=new Map;p=Rs(e);l=new Map;p=t(p);for(r=p.next();!r.done;r=p.next())r=r.value,v=Ss(a,b,c,k,e,r,h,n,m),l.set(r.id,v);a=t(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.g)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,
766
767
  expiration:d.tc(),streams:a,sessionIds:h?Rf(d):[],drmInfo:b,appMetadata:g}}
767
768
  function Ss(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,closedCaptions:f.closedCaptions,
768
- tilesLayout:f.tilesLayout},m=f.id;Ts(f,e.presentationTimeline.jb(),function(n){var p=Us(a,b,m,f.id,c,d,n.h,g,h),r=Vs(a,b,m,f.id,c,d,n,g,k);wr(b,m,function(){var v,y;return H(function(w){if(1==w.g)return u(w,p,2);if(3!=w.g)return v=w.h,u(w,r,3);y=w.h;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,dataKey:y});z(w)})})});return l}
769
+ tilesLayout:f.tilesLayout},m=f.id;Ts(f,e.presentationTimeline.jb(),function(n){var p=Us(a,b,m,f.id,c,d,n.h,g,h),r=Vs(a,b,m,f.id,c,d,n,g,k);wr(b,m,function(){var v,y;return H(function(x){if(1==x.g)return u(x,p,2);if(3!=x.g)return v=x.h,u(x,r,3);y=x.h;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,dataKey:y});z(x)})})});return l}
769
770
  function Us(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=$i(g.Ea(),g.ya,g.ra,h.streaming.retryParameters);b=ur(b,c,h,.5*us(f,d),!0,function(l){var m;return H(function(n){if(1==n.g)return u(n,e.addSegments([{data:l}]),2);m=n.h;a.j.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
770
771
  function Vs(a,b,c,d,e,f,g,h,k){var l=[g.Ea()[0],g.ya,g.ra].join("-");if(k.has(l))return k.get(l);h=$i(g.Ea(),g.ya,g.ra,h.streaming.retryParameters);b=ur(b,c,h,ts(f,d,g),!1,function(m){var n;return H(function(p){if(1==p.g)return u(p,e.addSegments([{data:m}]),2);n=p.h;a.j.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function Ts(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 Bs(a){if(a.m.g)throw new M(2,9,7001);}
771
772
  function zs(){if(!ws())throw new M(2,9,9E3);}function Is(a,b){return H(function(c){if(1==c.g)return a.i.push(b),ta(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);va(c);ec(a.i,b);return wa(c,0)})}function ys(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){ec(a.i,c)})}
@@ -779,10 +780,10 @@ fm.offline=ws;function Ws(){}function Xs(){for(var a=t(Ys),b=a.next();!b.done;b=
779
780
  function gt(){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}}),
780
781
  Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",ht);document.addEventListener("webkitfullscreenerror",ht);document.addEventListener("mozfullscreenchange",ht);document.addEventListener("mozfullscreenerror",ht);document.addEventListener("MSFullscreenChange",ht);document.addEventListener("MSFullscreenError",ht)}}
781
782
  function ht(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)}Ws.Fullscreen=ft;ft.install=gt;Zs(gt);function it(){}function jt(){}Ws.MathRound=it;it.install=jt;Zs(jt);function kt(){}function lt(){if(Cd()||Dd()||zd("PlayStation 5")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),mt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=nt}
782
- function nt(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,y,w;return H(function(x){switch(x.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return x["return"](b);if("media-source"==a.type){if(!vd()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return x["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=wd(g),!h)||a.audio&&(k=a.audio.contentType,
783
- l=wd(k),!l))return x["return"](b)}else return x["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,x["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(r={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(r));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
784
- n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);A(x,3);return u(x,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:w=x.h;ua(x,4);break;case 3:F(x);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return x["return"](b)}})}Ws.MediaCapabilities=kt;kt.install=lt;var mt=null;kt.originalMcap=mt;Zs(lt,-1);function ot(){}function pt(){var a=Ed();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?qt():a?(rt(),12>=a?(st(),tt()):st()):(zd("Tizen 2")||zd("Tizen 3")||zd("Tizen 4"))&&ut());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&vt()}
785
- function st(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function tt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function rt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
783
+ function nt(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,v,y,x;return H(function(w){switch(w.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return w["return"](b);if("media-source"==a.type){if(!vd()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return w["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=wd(g),!h)||a.audio&&(k=a.audio.contentType,
784
+ l=wd(k),!l))return w["return"](b)}else return w["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,w["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(r={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(r));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
785
+ n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);A(w,3);return u(w,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=w.h;ua(w,4);break;case 3:F(w);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return w["return"](b)}})}Ws.MediaCapabilities=kt;kt.install=lt;var mt=null;kt.originalMcap=mt;Zs(lt,-1);function ot(){}function pt(){var a=Ed();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?qt():a?(rt(),12>=a?(st(),tt()):st()):(zd("Tizen 2")||zd("Tizen 3")||zd("Tizen 4"))&&ut());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&vt()}
786
+ function st(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ea.apply(0,arguments));b.abort=function(){};return b}}function tt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function rt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
786
787
  function ut(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=jd(b)[0]&&a(b)}}function qt(){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)}}
787
788
  function vt(){var a=MediaSource.isTypeSupported;zd("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)})}Ws.MediaSource=ot;ot.install=pt;Zs(pt);function wt(){}function xt(){screen.orientation||void 0!=window.orientation&&yt()}function yt(){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 zt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new L("change");b.dispatchEvent(c)})}Ws.Orientation=wt;
788
789
  wt.install=xt;function zt(){db.call(this);this.type="";this.angle=0}pa(zt,db);
@@ -827,11 +828,11 @@ function tu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webki
827
828
  Ju.prototype.parseInit=Ju.prototype.parseInit;var Ku=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Lu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;nd["application/x-subtitle-lrc"]=function(){return new Ju};function Mu(){}Mu.prototype.parseInit=function(){};
828
829
  Mu.prototype.parseMedia=function(a,b){var c=Oc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(D){throw new M(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new M(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new M(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=In(g,Nu,"frameRate"),k=In(g,Nu,"subFrameRate"),l=In(g,Nu,"frameRateMultiplier"),
829
830
  m=In(g,Nu,"tickRate"),n=In(g,Nu,"cellResolution");c=g.getAttribute("xml:space")||"default";e=In(g,Ou,"extent");if("default"!=c&&"preserve"!=c)throw new M(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Pu(h,k,l,m);n=n?(n=/^(\d+) (\d+)$/.exec(n))?{columns:parseInt(n[1],10),rows:parseInt(n[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?Gn(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=t(g),r=p.next();!r.done;r=
830
- p.next()){var v=r.value;r=new jc;var y=v.getAttribute("xml:id");if(y){r.id=y;var w=null;e&&(w=Qu.exec(e)||Ru.exec(e));y=w?Number(w[1]):null;w=w?Number(w[2]):null;var x,C;if(x=Su(v,l,"extent"))x=(C=Qu.exec(x))||Ru.exec(x),null!=x&&(r.width=Number(x[1]),r.height=Number(x[2]),C||(null!=y&&(r.width=100*r.width/y),null!=w&&(r.height=100*r.height/w)),r.widthUnits=C||null!=y?zc:0,r.heightUnits=C||null!=w?zc:0);if(v=Su(v,l,"origin"))x=(C=Qu.exec(v))||Ru.exec(v),null!=x&&(r.viewportAnchorX=Number(x[1]),r.viewportAnchorY=
831
- Number(x[2]),C||(null!=w&&(r.viewportAnchorY=100*r.viewportAnchorY/w),null!=y&&(r.viewportAnchorX=100*r.viewportAnchorX/y)),r.viewportAnchorUnits=C||null!=y?zc:0)}else r=null;r&&m.push(r)}if(Dn(f,"p").length)throw new M(2,2,2001,"<p> can only be inside <div> in TTML");e=t(Dn(f,"div"));for(p=e.next();!p.done;p=e.next())if(Dn(p.value,"span").length)throw new M(2,2,2001,"<span> can only be inside <p> in TTML");(f=Tu(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
831
+ p.next()){var v=r.value;r=new jc;var y=v.getAttribute("xml:id");if(y){r.id=y;var x=null;e&&(x=Qu.exec(e)||Ru.exec(e));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,C;if(w=Su(v,l,"extent"))w=(C=Qu.exec(w))||Ru.exec(w),null!=w&&(r.width=Number(w[1]),r.height=Number(w[2]),C||(null!=y&&(r.width=100*r.width/y),null!=x&&(r.height=100*r.height/x)),r.widthUnits=C||null!=y?zc:0,r.heightUnits=C||null!=x?zc:0);if(v=Su(v,l,"origin"))w=(C=Qu.exec(v))||Ru.exec(v),null!=w&&(r.viewportAnchorX=Number(w[1]),r.viewportAnchorY=
832
+ Number(w[2]),C||(null!=x&&(r.viewportAnchorY=100*r.viewportAnchorY/x),null!=y&&(r.viewportAnchorX=100*r.viewportAnchorX/y)),r.viewportAnchorUnits=C||null!=y?zc:0)}else r=null;r&&m.push(r)}if(Dn(f,"p").length)throw new M(2,2,2001,"<p> can only be inside <div> in TTML");e=t(Dn(f,"div"));for(p=e.next();!p.done;p=e.next())if(Dn(p.value,"span").length)throw new M(2,2,2001,"<span> can only be inside <p> in TTML");(f=Tu(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
832
833
  function Tu(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var r=null,v=t(Uu),y=v.next();!y.done&&!(r=Vu(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||r)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(p.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
833
- a=[];if(!y)for(var w=t(p.childNodes),x=w.next();!x.done;x=w.next())(x=Tu(x.value,b,c,d,e,f,g,h,k,p,m))&&a.push(x);d=null!=l;w=/\S/.test(p.textContent);var C=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(C||w||"br"==p.tagName||0!=a.length||d&&!h))return null;x=Wu(p,c);w=x.start;for(x=x.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)x=Xu(n,c,w,x),w=x.start,x=x.end,n=n.parentNode;null==w&&(w=0);w+=b;x=null==x?Infinity:x+b;if(!C&&0<a.length)for(w=Infinity,x=0,b=t(a),
834
- c=b.next();!c.done;c=b.next())c=c.value,w=Math.min(w,c.startTime),x=Math.max(x,c.endTime);if("br"==p.tagName)return e=new hc(w,x,""),e.lineBreak=!0,e;b="";y&&(b=p.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=Vu(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var D=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==D})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
834
+ a=[];if(!y)for(var x=t(p.childNodes),w=x.next();!w.done;w=x.next())(w=Tu(w.value,b,c,d,e,f,g,h,k,p,m))&&a.push(w);d=null!=l;x=/\S/.test(p.textContent);var C=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(C||x||"br"==p.tagName||0!=a.length||d&&!h))return null;w=Wu(p,c);x=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=Xu(n,c,x,w),x=w.start,w=w.end,n=n.parentNode;null==x&&(x=0);x+=b;w=null==w?Infinity:w+b;if(!C&&0<a.length)for(x=Infinity,w=0,b=t(a),
835
+ c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),w=Math.max(w,c.endTime);if("br"==p.tagName)return e=new hc(x,w,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new hc(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Vu(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var D=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==D})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
835
836
  (g=Vu(l,"region",f,"")[0]);Yu(b,p,g,r,e,v,0==a.length);return b}
836
837
  function Yu(a,b,c,d,e,f,g){f=f||g;"rtl"==Zu(b,c,e,"direction",f)&&(a.direction="rtl");g=Zu(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=Zu(b,c,e,"textAlign",!0))?(a.positionAlign=$u[g],a.lineAlign=av[g],a.textAlign=tc[g.toUpperCase()]):a.textAlign=lc;if(g=Zu(b,c,e,"displayAlign",!0))a.displayAlign=uc[g.toUpperCase()];if(g=Zu(b,c,e,"color",f))a.color=g;if(g=Zu(b,c,e,"backgroundColor",
837
838
  f))a.backgroundColor=g;if(g=Zu(b,c,e,"border",f))a.border=g;if(g=Zu(b,c,e,"fontFamily",f))a.fontFamily=g;(g=Zu(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=Zu(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Zu(b,c,e,"lineHeight",f))&&g.match(bv)&&(a.lineHeight=g);(g=Zu(b,c,e,"fontSize",f))&&(g.match(bv)||g.match(cv))&&(a.fontSize=g);if(g=Zu(b,c,e,"fontStyle",f))a.fontStyle=yc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
@@ -860,7 +861,7 @@ function tv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exe
860
861
  b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=xv(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=vc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=nc,a.line=Number(c[1]),c[2]&&(a.lineAlign=vc[c[2].toUpperCase()])}function xv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
861
862
  function qv(a){a=dq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}J("shaka.text.VttTextParser",pv);pv.prototype.parseMedia=pv.prototype.parseMedia;pv.prototype.parseInit=pv.prototype.parseInit;nd["text/vtt"]=function(){return new pv};nd['text/vtt; codecs="vtt"']=function(){return new pv};nd['text/vtt; codecs="wvtt"']=function(){return new pv};function yv(){this.g=null}yv.prototype.parseInit=function(a){var b=this,c=!1;(new qg).box("moov",ug).box("trak",ug).box("mdia",ug).U("mdhd",function(d){d=Hh(d.reader,d.version);b.g=d.timescale}).box("minf",ug).box("stbl",ug).U("stsd",wg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new M(2,2,2008);if(!c)throw new M(2,2,2008);};
862
863
  yv.prototype.parseMedia=function(a,b){if(!this.g)throw new M(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new qg).box("moof",ug).box("traf",ug).U("tfdt",function(B){g=!0;c=Gh(B.reader,B.version).Id}).U("tfhd",function(B){l=Fh(B.reader,B.flags).Ke}).U("trun",function(B){h=!0;d=Ih(B.reader,B.version,B.flags).ef}).box("mdat",xg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new M(2,2,2008);for(var m=c,n=new ng(e,0),p=t(d),r=p.next();!r.done;r=p.next()){r=r.value;var v=r.ce||l,y=r.md?
863
- c+r.md:m;m=y+(v||0);var w=0;do{var x=n.O();w+=x;var C=n.O(),D=null;"vttc"==yg(C)?8<x&&(D=n.ub(x-8)):n.skip(x-8);v&&D&&(x=zv(D,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(x))}while(r.sampleSize&&w<r.sampleSize)}return f.filter(Eb)};function zv(a,b,c){var d,e,f;(new qg).box("payl",xg(function(g){d=Oc(g)})).box("iden",xg(function(g){e=Oc(g)})).box("sttg",xg(function(g){f=Oc(g)})).parse(a);return d?Av(d,e,f,b,c):null}
864
+ c+r.md:m;m=y+(v||0);var x=0;do{var w=n.O();x+=w;var C=n.O(),D=null;"vttc"==yg(C)?8<w&&(D=n.ub(w-8)):n.skip(w-8);v&&D&&(w=zv(D,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(r.sampleSize&&x<r.sampleSize)}return f.filter(Eb)};function zv(a,b,c){var d,e,f;(new qg).box("payl",xg(function(g){d=Oc(g)})).box("iden",xg(function(g){e=Oc(g)})).box("sttg",xg(function(g){f=Oc(g)})).parse(a);return d?Av(d,e,f,b,c):null}
864
865
  function Av(a,b,c,d,e){d=new hc(d,e,"");sv(a,d,new Map);b&&(d.id=b);if(c)for(a=new bq(c),b=eq(a);b;)tv(d,b,[]),cq(a),b=eq(a);return d}J("shaka.text.Mp4VttParser",yv);yv.prototype.parseMedia=yv.prototype.parseMedia;yv.prototype.parseInit=yv.prototype.parseInit;nd['application/mp4; codecs="wvtt"']=function(){return new yv};function Bv(){}Bv.prototype.parseInit=function(){};Bv.prototype.parseMedia=function(a){var b=Oc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new bq(c[0]),e=Cv(d),f=dq(d,/,/g);d=Cv(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};
865
866
  function Cv(a){a=dq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}J("shaka.text.SbvTextParser",Bv);Bv.prototype.parseMedia=Bv.prototype.parseMedia;Bv.prototype.parseInit=Bv.prototype.parseInit;nd["text/x-subviewer"]=function(){return new Bv};function Dv(){this.g=new pv}Dv.prototype.parseInit=function(){};Dv.prototype.parseMedia=function(a,b){var c=Oc(a);c=Ev(c);c=Ec(Tc(c));return this.g.parseMedia(c,b)};function Ev(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}J("shaka.text.SrtTextParser",Dv);Dv.srt2webvtt=Ev;Dv.prototype.parseMedia=Dv.prototype.parseMedia;
866
867
  Dv.prototype.parseInit=Dv.prototype.parseInit;nd["text/srt"]=function(){return new Dv};function Fv(){}Fv.prototype.parseInit=function(){};
@@ -881,14 +882,15 @@ a,b))})}
881
882
  function Sv(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return H(function(r){if(1==r.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Tv(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Uv(h.videoCapabilities,d),l=Uv(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
882
883
  n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(r,Ov.call(c,a,e),2)}p=r.h;return r["return"](new Vv(p,d))})}function Uv(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}J("EmeEncryptionSchemePolyfill",Nv);Nv.install=Pv;function Wv(){}var Xv;
883
884
  function Yv(){Xv?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Xv=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Zv):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
884
- function Zv(a){var b=this,c,d;return H(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(e,Xv.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Rv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Xv,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
885
- navigator.mediaCapabilities.decodingInfo=$v;return e["return"]($v.call(b,a))})}
886
- function $v(a){var b=this,c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Tv(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):u(n,Xv.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
887
- new Vv(k.keySystemAccess,c);n.C(3);break}if(!a.keySystemConfiguration){n.C(3);break}var p=a.keySystemConfiguration,r=[],v=[];p.audio&&r.push({robustness:p.audio.robustness||"",contentType:a.audio.contentType});p.video&&v.push({robustness:p.video.robustness||"",contentType:a.video.contentType});p={initDataTypes:p.initDataType?[p.initDataType]:[],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};r.length&&(p.audioCapabilities=r);v.length&&(p.videoCapabilities=
888
- v);l=p;m=k;return u(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}J("McEncryptionSchemePolyfill",Wv);Wv.install=Yv;function Vv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
885
+ function Zv(a){var b=this,c,d,e;return H(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,Xv.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&Rv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Xv,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
886
+ navigator.mediaCapabilities.decodingInfo=$v;if(d){f.C(3);break}e=c;return u(f,aw(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"]($v.call(b,a))}})}
887
+ function $v(a){var b=this,c,d,e,f,g,h,k,l;return H(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=Tv(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):u(m,Xv.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
888
+ new Vv(k.keySystemAccess,c);m.C(3);break}if(!a.keySystemConfiguration){m.C(3);break}l=k;return u(m,aw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
889
+ function aw(a){var b,c;return H(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,
890
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}J("McEncryptionSchemePolyfill",Wv);Wv.install=Yv;function Vv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
889
891
  Vv.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Vv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
890
- function Tv(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Rv(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function aw(){}
891
- function et(){Pv();Yv()}J("EncryptionSchemePolyfills",aw);aw.install=et;"undefined"!==typeof module&&module.exports&&(module.exports=aw);/*
892
+ function Tv(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Rv(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function bw(){}
893
+ function et(){Pv();Yv()}J("EncryptionSchemePolyfills",bw);bw.install=et;"undefined"!==typeof module&&module.exports&&(module.exports=bw);/*
892
894
  @license
893
895
  Copyright 2013 Ali Al Dallal
894
896
 
@@ -912,7 +914,7 @@ function et(){Pv();Yv()}J("EncryptionSchemePolyfills",aw);aw.install=et;"undefin
912
914
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
913
915
  SOFTWARE.
914
916
  */
915
- for(var bw={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
917
+ for(var cw={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
916
918
  "ar-SA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",u:"Arabic (Saudi Arabia)"},"ay-BO":{s:"Aymar aru",u:"Aymara"},az:{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"az-AZ":{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"be-BY":{s:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",u:"Belarusian"},bg:{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",u:"Bulgarian"},"bg-BG":{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
917
919
  u:"Bulgarian"},bn:{s:"\u09ac\u09be\u0982\u09b2\u09be",u:"Bengali"},"bn-IN":{s:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",u:"Bengali (India)"},"bn-BD":{s:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",u:"Bengali (Bangladesh)"},"bs-BA":{s:"Bosanski",u:"Bosnian"},ca:{s:"Catal\u00e0",u:"Catalan"},"ca-ES":{s:"Catal\u00e0",u:"Catalan"},cak:{s:"Maya Kaqchikel",u:"Kaqchikel"},"ck-US":{s:"\u13e3\u13b3\u13a9 (tsalagi)",u:"Cherokee"},cs:{s:"\u010ce\u0161tina",
918
920
  u:"Czech"},"cs-CZ":{s:"\u010ce\u0161tina",u:"Czech"},cy:{s:"Cymraeg",u:"Welsh"},"cy-GB":{s:"Cymraeg",u:"Welsh"},da:{s:"Dansk",u:"Danish"},"da-DK":{s:"Dansk",u:"Danish"},de:{s:"Deutsch",u:"German"},"de-AT":{s:"Deutsch (\u00d6sterreich)",u:"German (Austria)"},"de-DE":{s:"Deutsch (Deutschland)",u:"German (Germany)"},"de-CH":{s:"Deutsch (Schweiz)",u:"German (Switzerland)"},dsb:{s:"Dolnoserb\u0161\u0107ina",u:"Lower Sorbian"},el:{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",u:"Greek"},"el-GR":{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
@@ -933,49 +935,49 @@ u:"Slovak"},"sk-SK":{s:"Sloven\u010dina (Slovakia)",u:"Slovak (Slovakia)"},sl:{s
933
935
  sw:{s:"Kiswahili",u:"Swahili"},"sw-KE":{s:"Kiswahili",u:"Swahili (Kenya)"},ta:{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},"ta-IN":{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},te:{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},"te-IN":{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},tg:{s:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",u:"Tajik"},"tg-TJ":{s:"\u0442\u043e\u04b7\u0438\u043a\u04e3",u:"Tajik"},th:{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
934
936
  u:"Thai"},"th-TH":{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",u:"Thai (Thailand)"},tl:{s:"Filipino",u:"Filipino"},"tl-PH":{s:"Filipino",u:"Filipino"},tlh:{s:"tlhIngan-Hol",u:"Klingon"},tr:{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tr-TR":{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tt-RU":{s:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",u:"Tatar"},uk:{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",u:"Ukrainian"},"uk-UA":{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
935
937
  u:"Ukrainian"},ur:{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},"ur-PK":{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},uz:{s:"O'zbek",u:"Uzbek"},"uz-UZ":{s:"O'zbek",u:"Uzbek"},vi:{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"vi-VN":{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"xh-ZA":{s:"isiXhosa",u:"Xhosa"},yi:{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",u:"Yiddish"},"yi-DE":{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",u:"Yiddish (German)"},zh:{s:"\u4e2d\u6587",u:"Chinese"},"zh-HANS":{s:"\u4e2d\u6587\u7b80\u4f53",
936
- u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},cw=t(Object.keys(bw)),dw=cw.next();!dw.done;dw=
937
- cw.next()){var ew=dw.value;bw[ew.toLowerCase()]=bw[ew]};function fw(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new kf;this.localization=this.controls.Ba;this.player=this.controls.Vb();this.video=this.controls.tb();this.adManager=this.player.Uc();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})}
938
- fw.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};J("shaka.ui.Element",fw);fw.prototype.release=fw.prototype.release;function gw(a){return hw(a,"shaka-back-to-overflow-button")}function hw(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function iw(a){a&&(a=hw(a,"shaka-chosen-item"))&&a.parentElement.focus()}function jw(){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 X(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
939
- function kw(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60),e=Math.floor(a%60);10>e&&(e="0"+e);e=d+":"+e;b&&(10>d&&(e="0"+e),e=c+":"+e);return e};function lw(a,b){fw.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 P(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=kw(e-d,!1)+" / "+kw(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=
940
- ""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.za();c.g.ia(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.za(),this.g.ia(.5))}pa(lw,fw);lw.prototype.release=function(){this.g.stop();this.g=null;fw.prototype.release.call(this)};J("shaka.ui.AdCounter",lw);function mw(a,b){fw.call(this,a,b);var c=this;this.g=R("div");this.g.classList.add("shaka-ad-position");X(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&&nw(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&nw(c)});this.eventManager.o(this.adManager,"ad-started",function(){nw(c)});this.eventManager.o(this.adManager,
941
- "ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&nw(this)}pa(mw,fw);function nw(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));X(a.g,!0)}}J("shaka.ui.AdPosition",mw);function ow(a,b){fw.call(this,a,b);var c=this;this.button=Oj();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();
942
- 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?pw(c.controls):qw(c.controls)});this.ad&&(this.g(),this.h())}pa(ow,fw);ow.prototype.isPaused=function(){if(this.ad)var a=this.ad.isPaused();else a=this.controls,a=a.v.paused&&!a.Y;return a};ow.prototype.g=function(){};ow.prototype.h=function(){};J("shaka.ui.PlayButton",ow);function rw(a,b){ow.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}pa(rw,ow);rw.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};rw.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};J("shaka.ui.BigPlayButton",rw);function sw(a,b,c,d){fw.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 P(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);
943
- this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Hb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Hb()&&(e.g=!0,tw(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(tw(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,tw(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
944
- "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}pa(sw,fw);q=sw.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);fw.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.P(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
945
- q.setValue=function(a){this.g||(this.bar.value=a)};function tw(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect(),e=parseFloat(a.bar.min),f=parseFloat(a.bar.max);c=e+(f-e)/d.width*(c.clientX-d.left);c<e?c=e:c>f&&(c=f);a.bar.value=c}J("shaka.ui.RangeElement",sw);sw.prototype.setValue=sw.prototype.setValue;sw.prototype.getValue=sw.prototype.getValue;sw.prototype.changeTo=sw.prototype.changeTo;sw.prototype.onChangeEnd=sw.prototype.onChangeEnd;sw.prototype.onChange=sw.prototype.onChange;
946
- sw.prototype.onChangeStart=sw.prototype.onChangeStart;sw.prototype.setRange=sw.prototype.setRange;function uw(a,b){sw.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.j;this.h=new P(function(){c.video.currentTime=c.getValue()});this.v=new P(function(){vw(c)});this.A=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return ww(c)});this.eventManager.o(this.localization,
947
- "locale-changed",function(){return ww(c)});this.eventManager.o(this.adManager,"ad-started",function(){X(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){xw(c)&&X(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;yw(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];yw(c)});this.setValue(this.video.currentTime);this.update();ww(this);this.ad&&X(this.container,!1)}pa(uw,sw);q=uw.prototype;
948
- q.release=function(){this.h&&(this.h.stop(),this.h=null,this.v.stop(),this.v=null);sw.prototype.release.call(this)};q.onChangeStart=function(){this.A=!this.video.paused;this.controls.oe(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.P(.125))};q.onChangeEnd=function(){this.h.za();this.controls.oe(!1);this.A&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
949
- 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);xw(this)?(X(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
938
+ u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},dw=t(Object.keys(cw)),ew=dw.next();!ew.done;ew=
939
+ dw.next()){var fw=ew.value;cw[fw.toLowerCase()]=cw[fw]};function gw(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new kf;this.localization=this.controls.Ba;this.player=this.controls.Vb();this.video=this.controls.tb();this.adManager=this.player.Uc();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})}
940
+ gw.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};J("shaka.ui.Element",gw);gw.prototype.release=gw.prototype.release;function hw(a){return iw(a,"shaka-back-to-overflow-button")}function iw(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function jw(a){a&&(a=iw(a,"shaka-chosen-item"))&&a.parentElement.focus()}function kw(){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 X(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
941
+ function lw(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60),e=Math.floor(a%60);10>e&&(e="0"+e);e=d+":"+e;b&&(10>d&&(e="0"+e),e=c+":"+e);return e};function mw(a,b){gw.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 P(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=lw(e-d,!1)+" / "+lw(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=
942
+ ""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.za();c.g.ia(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.za(),this.g.ia(.5))}pa(mw,gw);mw.prototype.release=function(){this.g.stop();this.g=null;gw.prototype.release.call(this)};J("shaka.ui.AdCounter",mw);function nw(a,b){gw.call(this,a,b);var c=this;this.g=R("div");this.g.classList.add("shaka-ad-position");X(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&&ow(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&ow(c)});this.eventManager.o(this.adManager,"ad-started",function(){ow(c)});this.eventManager.o(this.adManager,
943
+ "ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&ow(this)}pa(nw,gw);function ow(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));X(a.g,!0)}}J("shaka.ui.AdPosition",nw);function pw(a,b){gw.call(this,a,b);var c=this;this.button=Oj();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();
944
+ 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?qw(c.controls):rw(c.controls)});this.ad&&(this.g(),this.h())}pa(pw,gw);pw.prototype.isPaused=function(){if(this.ad)var a=this.ad.isPaused();else a=this.controls,a=a.v.paused&&!a.Y;return a};pw.prototype.g=function(){};pw.prototype.h=function(){};J("shaka.ui.PlayButton",pw);function sw(a,b){pw.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}pa(sw,pw);sw.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};sw.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};J("shaka.ui.BigPlayButton",sw);function tw(a,b,c,d){gw.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 P(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);
945
+ this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Hb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Hb()&&(e.g=!0,uw(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(uw(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,uw(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
946
+ "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}pa(tw,gw);q=tw.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);gw.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.P(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
947
+ q.setValue=function(a){this.g||(this.bar.value=a)};function uw(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect(),e=parseFloat(a.bar.min),f=parseFloat(a.bar.max);c=e+(f-e)/d.width*(c.clientX-d.left);c<e?c=e:c>f&&(c=f);a.bar.value=c}J("shaka.ui.RangeElement",tw);tw.prototype.setValue=tw.prototype.setValue;tw.prototype.getValue=tw.prototype.getValue;tw.prototype.changeTo=tw.prototype.changeTo;tw.prototype.onChangeEnd=tw.prototype.onChangeEnd;tw.prototype.onChange=tw.prototype.onChange;
948
+ tw.prototype.onChangeStart=tw.prototype.onChangeStart;tw.prototype.setRange=tw.prototype.setRange;function vw(a,b){tw.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.j;this.h=new P(function(){c.video.currentTime=c.getValue()});this.v=new P(function(){ww(c)});this.A=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return xw(c)});this.eventManager.o(this.localization,
949
+ "locale-changed",function(){return xw(c)});this.eventManager.o(this.adManager,"ad-started",function(){X(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){yw(c)&&X(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;zw(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];zw(c)});this.setValue(this.video.currentTime);this.update();xw(this);this.ad&&X(this.container,!1)}pa(vw,tw);q=vw.prototype;
950
+ q.release=function(){this.h&&(this.h.stop(),this.h=null,this.v.stop(),this.v=null);tw.prototype.release.call(this)};q.onChangeStart=function(){this.A=!this.video.paused;this.controls.oe(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.P(.125))};q.onChangeEnd=function(){this.h.za();this.controls.oe(!1);this.A&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
951
+ 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);yw(this)?(X(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
950
952
  a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):X(this.container,!1)};
951
- function vw(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=t(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=t(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 "+
952
- 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 yw(a){vw(a);var b=a.player.Ja();b=b.end-b.start;a.player.V()&&5<b&&a.v.ia(1)}function xw(a){var b=a.player.Ja();b=b.end-b.start;return a.player.V()&&5>b?!1:null==a.ad}function ww(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}J("shaka.ui.SeekBar",uw);function zw(){}zw.prototype.create=function(a,b){return new uw(a,b)};
953
- uw.Factory=zw;function Y(a,b,c,d){db.call(this);var e=this;this.R=!0;this.j=d;this.A=new Um(c,a,this.j.castReceiverAppId);this.eb=!0;this.v=this.A.tb();this.B=c;this.D=this.A.Vb();this.va=a;this.i=b;this.cb=this.D.Uc();this.l=this.m=null;this.Y=!1;this.F=[];this.xb=[];this.ab=!1;this.Z=new P(function(){e.i.style.cursor="none";e.ab=!1;Aw(e)});this.aa=new P(function(){e.g.removeAttribute("shown");e.G.P(2)});this.G=new P(function(){for(var f=t(e.F),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.Na=new P(function(){e.Hb()&&
954
- Bw(e)});this.H=null;this.M=[];this.Ba=Cw();this.h=new kf;this.configure(this.j);Dw(this);this.qa=new Set;Ew(this);this.Na.ia(.125);this.h.o(this.Ba,"locale-changed",function(f){e.cb.setLocale(f.locales[0])})}pa(Y,db);q=Y.prototype;
955
- q.destroy=function(){var a=this;return H(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.C(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.G&&(a.G.stop(),a.G=null);a.Na&&(a.Na.stop(),a.Na=null);Fw(a);a.g&&(a.i.removeChild(a.g),a.g=null);if(!a.A){b.C(4);break}return u(b,a.A.destroy(),5);case 5:a.A=null;case 4:if(!a.va){b.C(6);break}return u(b,a.va.destroy(),7);case 7:a.va=
956
- null;case 6:a.D=null,a.B=null,a.v=null,a.Ba=null,a.qa.clear(),db.prototype.release.call(a),z(b)}})};function Fw(a){for(var b=t(a.M),c=b.next();!c.done;c=b.next())c.value.release();a.M=[]}function Gw(a,b){Hw.set(a,b)}q.zf=function(a){this.eb=a;Ew(this)};q.sg=function(){Aw(this)};
957
- q.configure=function(a){this.j=a;this.A.Ge(a.castReceiverAppId);this.l&&(this.l=null);this.gb&&(this.gb=null);this.g?(Pj(this.g),Fw(this)):(Iw(this),this.W=R("div"),this.W.classList.add("shaka-client-side-ad-container"),X(this.W,!1),this.i.appendChild(this.W));this.i.classList.add("shaka-video-container");this.B.classList.add("shaka-video");Jw(this);this.j.addBigPlayButton&&Kw(this);this.$||Lw(this);this.fb=R("div");this.fb.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.fb);
958
- Mw(this);this.F=Array.from(this.i.getElementsByClassName("shaka-settings-menu"));this.F.push.apply(this.F,ha(Array.from(this.i.getElementsByClassName("shaka-overflow-menu"))));Nw(this);this.xb=Array.from(this.i.getElementsByClassName("shaka-show-controls-on-mouse-over"));Aw(this);a=t(this.i.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.o(b,"click",c);this.h.o(b,"dblclick",c)}};
959
- q.je=function(a){(this.R=a)?(this.i.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.i.removeAttribute("shaka-controls");Aw(this)};q.kf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.je(!1)};q.getAd=function(){return this.m};q.Lf=function(){return this.A};q.Xf=function(){return this.Ba};q.mg=function(){return this.i};q.tb=function(){return this.v};q.Wf=function(){return this.B};q.Vb=function(){return this.D};q.Vf=function(){return this.va};q.Qf=function(){return this.g};
953
+ function ww(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=t(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=t(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 "+
954
+ 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 zw(a){ww(a);var b=a.player.Ja();b=b.end-b.start;a.player.V()&&5<b&&a.v.ia(1)}function yw(a){var b=a.player.Ja();b=b.end-b.start;return a.player.V()&&5>b?!1:null==a.ad}function xw(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}J("shaka.ui.SeekBar",vw);function Aw(){}Aw.prototype.create=function(a,b){return new vw(a,b)};
955
+ vw.Factory=Aw;function Y(a,b,c,d){db.call(this);var e=this;this.R=!0;this.j=d;this.A=new Um(c,a,this.j.castReceiverAppId);this.eb=!0;this.v=this.A.tb();this.B=c;this.D=this.A.Vb();this.va=a;this.i=b;this.cb=this.D.Uc();this.l=this.m=null;this.Y=!1;this.F=[];this.xb=[];this.ab=!1;this.Z=new P(function(){e.i.style.cursor="none";e.ab=!1;Bw(e)});this.aa=new P(function(){e.g.removeAttribute("shown");e.G.P(2)});this.G=new P(function(){for(var f=t(e.F),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.Na=new P(function(){e.Hb()&&
956
+ Cw(e)});this.H=null;this.M=[];this.Ba=Dw();this.h=new kf;this.configure(this.j);Ew(this);this.qa=new Set;Fw(this);this.Na.ia(.125);this.h.o(this.Ba,"locale-changed",function(f){e.cb.setLocale(f.locales[0])})}pa(Y,db);q=Y.prototype;
957
+ q.destroy=function(){var a=this;return H(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.C(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.G&&(a.G.stop(),a.G=null);a.Na&&(a.Na.stop(),a.Na=null);Gw(a);a.g&&(a.i.removeChild(a.g),a.g=null);if(!a.A){b.C(4);break}return u(b,a.A.destroy(),5);case 5:a.A=null;case 4:if(!a.va){b.C(6);break}return u(b,a.va.destroy(),7);case 7:a.va=
958
+ null;case 6:a.D=null,a.B=null,a.v=null,a.Ba=null,a.qa.clear(),db.prototype.release.call(a),z(b)}})};function Gw(a){for(var b=t(a.M),c=b.next();!c.done;c=b.next())c.value.release();a.M=[]}function Hw(a,b){Iw.set(a,b)}q.zf=function(a){this.eb=a;Fw(this)};q.sg=function(){Bw(this)};
959
+ q.configure=function(a){this.j=a;this.A.Ge(a.castReceiverAppId);this.l&&(this.l=null);this.gb&&(this.gb=null);this.g?(Pj(this.g),Gw(this)):(Jw(this),this.W=R("div"),this.W.classList.add("shaka-client-side-ad-container"),X(this.W,!1),this.i.appendChild(this.W));this.i.classList.add("shaka-video-container");this.B.classList.add("shaka-video");Kw(this);this.j.addBigPlayButton&&Lw(this);this.$||Mw(this);this.fb=R("div");this.fb.classList.add("shaka-server-side-ad-container");this.g.appendChild(this.fb);
960
+ Nw(this);this.F=Array.from(this.i.getElementsByClassName("shaka-settings-menu"));this.F.push.apply(this.F,ha(Array.from(this.i.getElementsByClassName("shaka-overflow-menu"))));Ow(this);this.xb=Array.from(this.i.getElementsByClassName("shaka-show-controls-on-mouse-over"));Bw(this);a=t(this.i.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.o(b,"click",c);this.h.o(b,"dblclick",c)}};
961
+ q.je=function(a){(this.R=a)?(this.i.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.i.removeAttribute("shaka-controls");Bw(this)};q.kf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.je(!1)};q.getAd=function(){return this.m};q.Lf=function(){return this.A};q.Xf=function(){return this.Ba};q.mg=function(){return this.i};q.tb=function(){return this.v};q.Wf=function(){return this.B};q.Vb=function(){return this.D};q.Vf=function(){return this.va};q.Qf=function(){return this.g};
960
962
  q.fg=function(){return this.fb};q.Nf=function(){return this.W};q.Of=function(){return this.j};q.rg=function(){return this.Y};q.oe=function(a){this.Y=a};q.pg=function(){return this.eb};q.Pe=function(){return this.l?this.l.getValue():this.v.currentTime};q.lf=function(a){this.H=a};q.Nc=function(){return this.F.some(function(a){return!a.classList.contains("shaka-hidden")})};q.zc=function(){this.G.za()};
961
963
  q.ue=function(){var a=this,b;return H(function(c){switch(c.g){case 1:if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),u(c,document.exitFullscreen(),0);A(c,4);if(!document.pictureInPictureElement){c.C(6);break}return u(c,document.exitPictureInPicture(),6);case 6:return u(c,a.i.requestFullscreen({navigationUI:"hide"}),8);case 8:if(!a.j.forceLandscapeOnFullscreen||!screen.orientation){c.C(9);break}A(c,10);return u(c,screen.orientation.lock("landscape"),12);case 12:ua(c,
962
- 9,4);break;case 10:F(c,4);case 9:ua(c,0);break;case 4:b=F(c),a.dispatchEvent(new L("error",(new Map).set("detail",b))),c.C(0)}})};q.nf=function(){X(this.I,!0);X(this.W,!0);this.g.setAttribute("ad-active","true")};q.Se=function(){X(this.I,!1);X(this.W,!1);this.g.removeAttribute("ad-active")};function qw(a){a.R&&a.v.duration&&(a.D.De(),a.v.paused&&!a.Y?a.v.play():a.v.pause())}function pw(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
963
- function Iw(a){a.g=R("div");a.g.classList.add("shaka-controls-container");a.i.appendChild(a.g);a.i.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.v.duration&&(a.Hb()?a.H=Date.now():(Ow(a,b),b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){a.R&&(a.Nc()?a.G.za():a.m?pw(a):qw(a))});a.h.o(a.g,"dblclick",function(){a.j.doubleClickForFullscreen&&document.fullscreenEnabled&&a.ue()})}
964
- function Kw(a){var b=R("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.gb=new rw(b,a);a.M.push(a.gb)}function Jw(a){var b=R("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function Pw(a){a.I=R("div");a.I.classList.add("shaka-ad-controls");X(a.I,null!=a.m);a.J.appendChild(a.I);var b=new mw(a.I,a);a.M.push(b);b=new lw(a.I,a);a.M.push(b)}
965
- function Lw(a){a.$=R("div");a.$.classList.add("shaka-spinner-container");a.i.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",
964
+ 9,4);break;case 10:F(c,4);case 9:ua(c,0);break;case 4:b=F(c),a.dispatchEvent(new L("error",(new Map).set("detail",b))),c.C(0)}})};q.nf=function(){X(this.I,!0);X(this.W,!0);this.g.setAttribute("ad-active","true")};q.Se=function(){X(this.I,!1);X(this.W,!1);this.g.removeAttribute("ad-active")};function rw(a){a.R&&a.v.duration&&(a.D.De(),a.v.paused&&!a.Y?a.v.play():a.v.pause())}function qw(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
965
+ function Jw(a){a.g=R("div");a.g.classList.add("shaka-controls-container");a.i.appendChild(a.g);a.i.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.v.duration&&(a.Hb()?a.H=Date.now():(Pw(a,b),b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){a.R&&(a.Nc()?a.G.za():a.m?qw(a):rw(a))});a.h.o(a.g,"dblclick",function(){a.j.doubleClickForFullscreen&&document.fullscreenEnabled&&a.ue()})}
966
+ function Lw(a){var b=R("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.gb=new sw(b,a);a.M.push(a.gb)}function Kw(a){var b=R("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function Qw(a){a.I=R("div");a.I.classList.add("shaka-ad-controls");X(a.I,null!=a.m);a.J.appendChild(a.I);var b=new nw(a.I,a);a.M.push(b);b=new mw(a.I,a);a.M.push(b)}
967
+ function Mw(a){a.$=R("div");a.$.classList.add("shaka-spinner-container");a.i.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",
966
968
  "none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
967
- function Mw(a){a.J=R("div");a.J.classList.add("shaka-bottom-controls");a.J.classList.add("shaka-no-propagation");a.g.appendChild(a.J);a.h.o(a.J,"click",function(){a.zc()});Pw(a);a.Aa=R("div");a.Aa.classList.add("shaka-controls-button-panel");a.Aa.classList.add("shaka-show-controls-on-mouse-over");a.J.appendChild(a.Aa);for(var b={},c=t(a.j.controlPanelElements),d=c.next();!d.done;b={ic:b.ic},d=c.next())d=d.value,Hw.get(d)?(d=Hw.get(d).create(a.Aa,a),"function"!=typeof d.release&&(yb("shaka.extern.IUIElement",
968
- "Please update UI elements to have a release() method."),b.ic=d,b.ic.release=function(e){return function(){e.ic.destroy&&e.ic.destroy()}}(b)),a.M.push(d)):Pa("Unrecognized control panel element requested:",d)}function Nw(a){if(a.j.addSeekBar)a.l=Qw.create(a.J,a),a.M.push(a.l);else{a=t(a.F);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}
969
- function Dw(a){a.h.o(a.D,"buffering",function(){a.R&&X(a.$,a.D.Bc())});a.R&&X(a.$,a.D.Bc());a.h.o(window,"keydown",function(b){Rw(a,b)});a.h.o(window,"click",function(){return a.zc()});a.h.o(a.v,"play",function(){Aw(a)});a.h.o(a.v,"pause",function(){Aw(a)});a.h.o(a.i,"mousemove",function(b){Ow(a,b)});a.h.o(a.i,"touchmove",function(b){Ow(a,b)},{passive:!0});a.h.o(a.i,"touchend",function(b){Ow(a,b)},{passive:!0});a.h.o(a.i,"mouseleave",function(){a.H||a.Z.za()});a.h.o(a.A,"caststatuschanged",function(){Ew(a)});
970
- a.h.o(a.i,"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)&&Ow(a,b);if(a.j.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.l&&!d&&(b.preventDefault(),Sw(a,a.l.getValue()-5));break;case "ArrowRight":a.l&&!d&&(b.preventDefault(),Sw(a,a.l.getValue()+5));break;case "Home":a.l&&Sw(a,a.D.Ja().start);break;case "End":a.l&&Sw(a,a.D.Ja().end);break;case " ":e&&
971
- (a.m?pw(a):qw(a))}});a.h.o(a.i,"keyup",function(b){a.qa["delete"](b.key)});a.h.o(a.cb,"ad-started",function(b){a.m=b.ad;a.nf()});a.h.o(a.cb,"ad-stopped",function(){a.m=null;a.Se()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return H(function(b){return u(b,Tw(a),0)})});a.h.o(document,"fullscreenchange",function(){a.m&&a.m.resize(a.B.offsetWidth,a.B.offsetHeight)})}
972
- function Tw(a){return H(function(b){return a.v&&0!=a.v.readyState&&!a.A.na()&&a.j.enableFullscreenOnRotation?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?u(b,a.i.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?u(b,document.exitFullscreen(),0):b.C(0):b["return"]()})}
973
- function Ow(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Aw(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.H=Date.now():a.H+1E3<Date.now()&&(a.H=null);a.H&&"mousemove"==b.type||(a.i.style.cursor="",a.ab=!0,a.G.stop(),a.Hb()||(Bw(a),Aw(a)),a.Z.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.H||a.Z.P(3))}function Uw(a){return window.matchMedia("hover: hover").matches?a.xb.some(function(b){return b.matches(":hover")}):!1}
974
- function Aw(a){var b=a.m?a.m.isPaused():!1,c=a.v.paused&&!a.Y,d=a.g.classList.contains("shaka-keyboard-navigation");b||!a.m&&c||a.ab||d||Uw(a)?(Bw(a),a.g.setAttribute("shown","true"),a.aa.stop()):a.aa.P(a.j.fadeDelay)}function Ew(a){var b=a.A.na();a.dispatchEvent(new L("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Hb=function(){return this.R?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};
975
- function Sw(a,b){a.l.changeTo(b);a.Hb()&&Bw(a)}function Bw(a){if(a.l)if(a.l.setValue(a.v.currentTime),a.l.update(),a.l.isShowing())for(var b=t(a.F),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=t(a.F),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new L("timeandseekrangeupdated"))}
976
- function Rw(a,b){a.qa.add(b.key);var c=a.Nc();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Aw(a),a.h.o(window,"mousedown",function(){a.h.ec(window,"mousedown")}));"Escape"==b.key&&a.G.za();c&&a.qa.has("Tab")&&Vw(a,b)}
977
- function Vw(a,b){var c=a.F.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.qa.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
978
- function Cw(){var a=new Wb("en");a.ba("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..."],
969
+ function Nw(a){a.J=R("div");a.J.classList.add("shaka-bottom-controls");a.J.classList.add("shaka-no-propagation");a.g.appendChild(a.J);a.h.o(a.J,"click",function(){a.zc()});Qw(a);a.Aa=R("div");a.Aa.classList.add("shaka-controls-button-panel");a.Aa.classList.add("shaka-show-controls-on-mouse-over");a.J.appendChild(a.Aa);for(var b={},c=t(a.j.controlPanelElements),d=c.next();!d.done;b={ic:b.ic},d=c.next())d=d.value,Iw.get(d)?(d=Iw.get(d).create(a.Aa,a),"function"!=typeof d.release&&(yb("shaka.extern.IUIElement",
970
+ "Please update UI elements to have a release() method."),b.ic=d,b.ic.release=function(e){return function(){e.ic.destroy&&e.ic.destroy()}}(b)),a.M.push(d)):Pa("Unrecognized control panel element requested:",d)}function Ow(a){if(a.j.addSeekBar)a.l=Rw.create(a.J,a),a.M.push(a.l);else{a=t(a.F);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}
971
+ function Ew(a){a.h.o(a.D,"buffering",function(){a.R&&X(a.$,a.D.Bc())});a.R&&X(a.$,a.D.Bc());a.h.o(window,"keydown",function(b){Sw(a,b)});a.h.o(window,"click",function(){return a.zc()});a.h.o(a.v,"play",function(){Bw(a)});a.h.o(a.v,"pause",function(){Bw(a)});a.h.o(a.i,"mousemove",function(b){Pw(a,b)});a.h.o(a.i,"touchmove",function(b){Pw(a,b)},{passive:!0});a.h.o(a.i,"touchend",function(b){Pw(a,b)},{passive:!0});a.h.o(a.i,"mouseleave",function(){a.H||a.Z.za()});a.h.o(a.A,"caststatuschanged",function(){Fw(a)});
972
+ a.h.o(a.i,"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)&&Pw(a,b);if(a.j.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.l&&!d&&(b.preventDefault(),Tw(a,a.l.getValue()-5));break;case "ArrowRight":a.l&&!d&&(b.preventDefault(),Tw(a,a.l.getValue()+5));break;case "Home":a.l&&Tw(a,a.D.Ja().start);break;case "End":a.l&&Tw(a,a.D.Ja().end);break;case " ":e&&
973
+ (a.m?qw(a):rw(a))}});a.h.o(a.i,"keyup",function(b){a.qa["delete"](b.key)});a.h.o(a.cb,"ad-started",function(b){a.m=b.ad;a.nf()});a.h.o(a.cb,"ad-stopped",function(){a.m=null;a.Se()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return H(function(b){return u(b,Uw(a),0)})});a.h.o(document,"fullscreenchange",function(){a.m&&a.m.resize(a.B.offsetWidth,a.B.offsetHeight)})}
974
+ function Uw(a){return H(function(b){return a.v&&0!=a.v.readyState&&!a.A.na()&&a.j.enableFullscreenOnRotation?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?u(b,a.i.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?u(b,document.exitFullscreen(),0):b.C(0):b["return"]()})}
975
+ function Pw(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),Bw(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.H=Date.now():a.H+1E3<Date.now()&&(a.H=null);a.H&&"mousemove"==b.type||(a.i.style.cursor="",a.ab=!0,a.G.stop(),a.Hb()||(Cw(a),Bw(a)),a.Z.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.H||a.Z.P(3))}function Vw(a){return window.matchMedia("hover: hover").matches?a.xb.some(function(b){return b.matches(":hover")}):!1}
976
+ function Bw(a){var b=a.m?a.m.isPaused():!1,c=a.v.paused&&!a.Y,d=a.g.classList.contains("shaka-keyboard-navigation");b||!a.m&&c||a.ab||d||Vw(a)?(Cw(a),a.g.setAttribute("shown","true"),a.aa.stop()):a.aa.P(a.j.fadeDelay)}function Fw(a){var b=a.A.na();a.dispatchEvent(new L("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Hb=function(){return this.R?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};
977
+ function Tw(a,b){a.l.changeTo(b);a.Hb()&&Cw(a)}function Cw(a){if(a.l)if(a.l.setValue(a.v.currentTime),a.l.update(),a.l.isShowing())for(var b=t(a.F),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=t(a.F),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new L("timeandseekrangeupdated"))}
978
+ function Sw(a,b){a.qa.add(b.key);var c=a.Nc();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),Bw(a),a.h.o(window,"mousedown",function(){a.h.ec(window,"mousedown")}));"Escape"==b.key&&a.G.za();c&&a.qa.has("Tab")&&Ww(a,b)}
979
+ function Ww(a,b){var c=a.F.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.qa.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
980
+ function Dw(){var a=new Wb("en");a.ba("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..."],
979
981
  ["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"],
980
982
  ["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"],
981
983
  ["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"],
@@ -1036,64 +1038,64 @@ new Map([["AD_DURATION","Duraci\u00f3n del anuncio"],["AD_PROGRESS","Anuncio [AD
1036
1038
  ["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.Fe(navigator.languages||[]);return a}J("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.Hb;Y.prototype.hideAdUI=Y.prototype.Se;Y.prototype.showAdUI=Y.prototype.nf;
1037
1039
  Y.prototype.toggleFullScreen=Y.prototype.ue;Y.prototype.hideSettingsMenus=Y.prototype.zc;Y.prototype.anySettingsMenusAreOpen=Y.prototype.Nc;Y.prototype.setLastTouchEventTime=Y.prototype.lf;Y.prototype.getDisplayTime=Y.prototype.Pe;Y.prototype.isCastAllowed=Y.prototype.pg;Y.prototype.setSeeking=Y.prototype.oe;Y.prototype.isSeeking=Y.prototype.rg;Y.prototype.getConfig=Y.prototype.Of;Y.prototype.getClientSideAdContainer=Y.prototype.Nf;Y.prototype.getServerSideAdContainer=Y.prototype.fg;
1038
1040
  Y.prototype.getControlsContainer=Y.prototype.Qf;Y.prototype.getLocalPlayer=Y.prototype.Vf;Y.prototype.getPlayer=Y.prototype.Vb;Y.prototype.getLocalVideo=Y.prototype.Wf;Y.prototype.getVideo=Y.prototype.tb;Y.prototype.getVideoContainer=Y.prototype.mg;Y.prototype.getLocalization=Y.prototype.Xf;Y.prototype.getCastProxy=Y.prototype.Lf;Y.prototype.getAd=Y.prototype.getAd;Y.prototype.setEnabledNativeControls=Y.prototype.kf;Y.prototype.setEnabledShakaControls=Y.prototype.je;Y.prototype.configure=Y.prototype.configure;
1039
- Y.prototype.loadComplete=Y.prototype.sg;Y.prototype.allowCast=Y.prototype.zf;Y.registerSeekBar=function(a){Qw=a};Y.registerElement=Gw;Y.prototype.destroy=Y.prototype.destroy;var Hw=new Map,Qw=new zw;function Ww(a,b){fw.call(this,a,b);var c=this;this.l=this.controls.j;this.j=this.controls.g;this.i=[];this.h=Oj();this.h.classList.add("shaka-overflow-menu-button");this.h.classList.add("shaka-no-propagation");this.h.classList.add("material-icons-round");this.h.textContent="more_vert";this.parent.appendChild(this.h);this.g=R("div");this.g.classList.add("shaka-overflow-menu");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-hidden");
1040
- this.j.appendChild(this.g);Xw(this);for(var d=t(this.controls.i.getElementsByClassName("shaka-back-to-overflow-button")),e=d.next();!e.done;e=d.next())this.eventManager.o(e.value,"click",function(){c.controls.zc();X(c.g,!0);c.g.childNodes.length&&c.g.childNodes[0].focus();Aw(c.controls)});this.eventManager.o(this.localization,"locale-updated",function(){Yw(c)});this.eventManager.o(this.localization,"locale-changed",function(){Yw(c)});this.eventManager.o(this.adManager,"ad-started",function(){X(c.h,
1041
- !1)});this.eventManager.o(this.adManager,"ad-stopped",function(){X(c.h,!0)});this.eventManager.o(this.controls,"submenuopen",function(){X(c.g,!1)});this.eventManager.o(this.g,"touchstart",function(f){c.controls.lf(Date.now());f.stopPropagation()});this.eventManager.o(this.h,"click",function(){Zw(c)});Yw(this);this.ad&&X(this.h,!1)}pa(Ww,fw);Ww.prototype.release=function(){this.j=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];fw.prototype.release.call(this)};
1042
- function $w(a,b){ax.set(a,b)}function Xw(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,ax.get(c)?(c=ax.get(c),a.i.push(c.create(a.g,a.controls))):Pa("Unrecognized overflow menu element requested:",c)}function Zw(a){if(a.controls.Nc())a.controls.zc();else{X(a.g,!0);Aw(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};gb(a.g.childNodes,b)&&hb(a.g.childNodes,b)[0].focus()}}
1043
- function Yw(a){a.h.ariaLabel=a.localization.resolve("MORE_SETTINGS")}J("shaka.ui.OverflowMenu",Ww);Ww.registerElement=$w;function bx(){}bx.prototype.create=function(a,b){return new Ww(a,b)};Gw("overflow_menu",new bx);var ax=new Map;function cx(a,b){fw.call(this,a,b);var c=this;this.g=Oj();this.g.classList.add("shaka-airplay-button");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");var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=R("span");d.appendChild(this.j);this.i=R("span");this.i.classList.add("shaka-current-selection-span");
1044
- d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);dx(this);ex(this);this.eventManager.o(this.localization,"locale-updated",function(){dx(c)});this.eventManager.o(this.localization,"locale-changed",function(){dx(c)});this.eventManager.o(this.g,"click",function(){c.controls.tb().webkitShowPlaybackTargetPicker()});d=this.controls.tb();this.eventManager.o(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=c.player.Qe()==vl;X(c.g,"available"==e.availability&&f)});this.eventManager.o(d,
1045
- "webkitcurrentplaybacktargetiswirelesschanged",function(){ex(c)})}pa(cx,fw);function ex(a){var b=a.controls.tb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function dx(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}J("shaka.ui.AirPlayButton",cx);function fx(){}fx.prototype.create=function(a,b){return new cx(a,b)};$w("airplay",new fx);Gw("airplay",new fx);function gx(a,b,c){this.i=a;this.h=hx(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Kd()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.re(b);b.ui=this;c.ui=this}q=gx.prototype;q.destroy=function(){var a=this;return H(function(b){if(1==b.g)return a.g?u(b,a.g.destroy(),2):b.C(2);if(4!=b.g)return a.g=null,a.i?u(b,a.i.destroy(),4):b.C(4);a.i=null;z(b)})};q.Kd=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Dd()&&1<navigator.maxTouchPoints};
1046
- q.getConfiguration=function(){var a=hx(this);Zj(a,this.h,hx(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ak(a,b));Zj(this.h,a,hx(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.Pf=function(){return this.g};q.Qg=function(a){this.g.je(a)};
1047
- function hx(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(" "),addSeekBar:!0,addBigPlayButton:!1,castReceiverAppId:"",clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",
1048
- level:"rgb(255, 255, 255)"},trackLabelFormat:ix,fadeDelay:0,doubleClickForFullscreen:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Kd()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1049
- function jx(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return H(function(r){switch(r.g){case 1:Xs();if(!Fk())return kx("shaka-ui-load-failed",lx),r["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){r.C(2);break}if(b.length&&!a.length){c=t(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),mx(f,e));r.C(2);break}h=t(a);k=h.next();
1050
- case 4:if(k.done){r.C(2);break}l=k.value;if(l.ui){r.C(5);break}m=null;n=t(b);for(d=n.next();!d.done;d=n.next())if(p=d.value,p.parentElement==l){m=p;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));A(r,7);return u(r,mx(l,m),9);case 9:ua(r,5);break;case 7:return F(r),kx("shaka-ui-load-failed",nx),r["return"]();case 5:k=h.next();r.C(4);break;case 2:kx("shaka-ui-loaded"),z(r)}})}
1051
- function kx(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1052
- function mx(a,b){var c,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:c=new S(b);d=new gx(c,a,b);e="";a.dataset&&a.dataset.shakaPlayerCastReceiverId?e=a.dataset.shakaPlayerCastReceiverId:b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId);e.length&&d.configure({castReceiverAppId:e});b.controls&&d.g.kf(!0);if(f=b.getAttribute("src"))g=document.createElement("source"),g.setAttribute("src",f),b.appendChild(g),b.removeAttribute("src");h=t(b.querySelectorAll("source"));
1053
- k=h.next();case 2:if(k.done){m.C(0);break}l=k.value;A(m,5);return u(m,d.g.Vb().load(l.getAttribute("src")),7);case 7:m.C(0);break;case 5:F(m);case 3:k=h.next(),m.C(2)}})}J("shaka.ui.Overlay",gx);gx.prototype.setEnabled=gx.prototype.Qg;gx.prototype.getControls=gx.prototype.Pf;gx.prototype.configure=gx.prototype.configure;gx.prototype.getConfiguration=gx.prototype.getConfiguration;gx.prototype.isMobile=gx.prototype.Kd;gx.prototype.destroy=gx.prototype.destroy;var ix=0;
1054
- gx.TrackLabelFormat={LANGUAGE:ix,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var lx=0,nx=1;gx.FailReasonCode={NO_BROWSER_SUPPORT:lx,PLAYER_FAILED_TO_LOAD:nx};"complete"==document.readyState?H(function(a){if(1==a.g)return u(a,Promise.resolve(),2);jx();z(a)}):window.addEventListener("load",jx);function ox(a,b,c,d,e,f,g){function h(D,B){return D+": "+B}function k(D){return"variant"==D.type?D.audioRoles?D.audioRoles.join(", "):void 0:D.roles.join(", ")}var l=a.find(function(D){return 1==D.active}),m=gw(b);Pj(b);b.appendChild(m);m=new Map;for(var n=t(a),p=n.next();!p.done;p=n.next())p=p.value,m.has(p.language)||m.set(p.language,new Set),m.get(p.language).add(k(p));m=new Set;l=l?h(l.language,k(l)):"";n={};a=t(a);for(p=a.next();!p.done;n={Sa:n.Sa},p=a.next()){n.Sa=p.value;p=n.Sa.language;var r=
1055
- n.Sa.forced,v=f.resolve($b.uf),y=k(n.Sa),w=h(p,y);if(!m.has(w)){m.add(w);var x=Oj();x.addEventListener("click",function(D){return function(){c(D.Sa)}}(n));var C=R("span");x.appendChild(C);C.textContent=px(p,f);switch(g){case ix:r&&(C.textContent+=" ("+v+")");break;case 1:y?C.textContent=y:(Pa("Track #"+n.Sa.id+" does not have a role, but the UI is configured to only show role."),C.textContent="?");r&&(C.textContent+=" ("+v+")");break;case 2:y&&(C.textContent+=": "+y);r&&(C.textContent+=" ("+v+")");
1056
- break;case 3:n.Sa.label?C.textContent=n.Sa.label:(Pa("Track #"+n.Sa.id+" does not have a label, but the UI is configured to only show labels."),C.textContent="?")}d&&w==l&&(x.appendChild(jw()),C.classList.add("shaka-chosen-item"),x.ariaSelected="true",e.textContent=C.textContent);b.appendChild(x)}}}
1057
- function px(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=Tb(a);return a in bw?bw[a].s:c in bw?bw[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function qx(a,b,c){fw.call(this,a,b);var d=this;rx(this,c);sx(this);this.eventManager.o(this.button,"click",function(){d.controls.dispatchEvent(new L("submenuopen"));X(d.menu,!0);iw(d.menu)})}pa(qx,fw);
1058
- function rx(a,b){a.button=Oj();a.icon=R("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);var c=R("label");c.classList.add("shaka-overflow-button-label");a.nameSpan=R("span");c.appendChild(a.nameSpan);a.currentSelection=R("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
1059
- function sx(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=Oj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);var b=R("i");b.classList.add("material-icons-round");b.textContent="arrow_back";a.backButton.appendChild(b);a.backSpan=R("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}
1060
- J("shaka.ui.SettingsMenu",qx);function tx(a,b){qx.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){ux(c)});this.eventManager.o(this.localization,"locale-changed",function(){ux(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Db().length;X(c.button,d);vx(c)});this.eventManager.o(this.player,"variantchanged",function(){vx(c)});ux(this);vx(this)}
1061
- pa(tx,qx);function vx(a){var b=a.player.Db();ox(b,a.menu,function(c){a.player.nd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.j.trackLabelFormat);iw(a.menu);a.controls.dispatchEvent(new L("languageselectionupdated"))}function ux(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")}
1062
- J("shaka.ui.AudioLanguageSelection",tx);function wx(){}wx.prototype.create=function(a,b){return new tx(a,b)};$w("language",new wx);function xx(a,b){fw.call(this,a,b);var c=this;this.h=this.controls.A;this.g=Oj();this.g.classList.add("shaka-cast-button");this.g.ariaPressed="false";this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=R("span");d.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");d.appendChild(this.j);
1063
- this.g.appendChild(d);this.parent.appendChild(this.g);yx(this);zx(this);this.eventManager.o(this.localization,"locale-updated",function(){yx(c)});this.eventManager.o(this.localization,"locale-changed",function(){yx(c)});this.eventManager.o(this.g,"click",function(){Ax(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){zx(c)})}pa(xx,fw);
1064
- function Ax(a){var b;H(function(c){if(1==c.g){if(a.h.na())return a.h.pf(),c.C(0);A(c,3);a.g.disabled=!0;return u(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,ua(c,0);b=F(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));z(c)})}function zx(a){var b=a.h.Ce()&&a.controls.eb,c=a.h.na();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Bx(a)}
1065
- function Bx(a){a.j.textContent=a.h.na()?a.h.ld():a.localization.resolve("OFF")}function yx(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Bx(a)}J("shaka.ui.CastButton",xx);function Cx(){}Cx.prototype.create=function(a,b){return new xx(a,b)};$w("cast",new Cx);Gw("cast",new Cx);function Dx(a,b){fw.call(this,a,b);var c=this;this.g=Oj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.textContent="fast_forward";this.parent.appendChild(this.g);Ex(this);this.eventManager.o(this.localization,"locale-updated",function(){Ex(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ex(c)});this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.player.vc();c.player.we(0>d||4<d?1:2*d)}})}pa(Dx,fw);
1066
- function Ex(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}J("shaka.ui.FastForwardButton",Dx);function Fx(){}Fx.prototype.create=function(a,b){return new Dx(a,b)};Gw("fast_forward",new Fx);function Gx(a,b){fw.call(this,a,b);var c=this;this.g=Oj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");document.fullscreenEnabled||this.g.classList.add("shaka-hidden");this.g.textContent="fullscreen";this.parent.appendChild(this.g);Hx(this);this.eventManager.o(this.localization,"locale-updated",function(){Hx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Hx(c)});this.eventManager.o(this.g,"click",function(){return H(function(d){return u(d,
1067
- c.controls.ue(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Hx(c)})}pa(Gx,fw);function Hx(a){a.g.ariaLabel=a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN")}J("shaka.ui.FullscreenButton",Gx);function Ix(){}Ix.prototype.create=function(a,b){return new Gx(a,b)};Gw("fullscreen",new Ix);function Jx(a,b){fw.call(this,a,b);var c=this;this.g=Oj();this.g.classList.add("shaka-loop-button");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=R("span");this.l.textContent=this.localization.resolve("LOOP");d.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");d.appendChild(this.j);
1068
- this.g.appendChild(d);Kx(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){Kx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Kx(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.za();c.h.ia(1)});this.m=this.video.loop;this.h=new P(function(){c.m!=c.video.loop&&(Kx(c),c.m=c.video.loop)});this.h.ia(1)}pa(Jx,fw);Jx.prototype.release=function(){this.h.stop();this.h=null;fw.prototype.release.call(this)};
1069
- function Kx(a){a.l.textContent=a.localization.resolve("LOOP");a.j.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")}J("shaka.ui.LoopButton",Jx);function Lx(){}Lx.prototype.create=function(a,b){return new Jx(a,b)};$w("loop",new Lx);Gw("loop",new Lx);function Mx(a,b){fw.call(this,a,b);var c=this;this.g=Oj();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.parent.appendChild(this.g);Nx(this);Ox(this);this.eventManager.o(this.localization,"locale-updated",function(){Nx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Nx(c)});this.eventManager.o(this.g,"click",function(){c.ad?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});this.eventManager.o(this.video,"volumechange",
1070
- function(){Nx(c);Ox(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){Nx(c);Ox(c)});this.eventManager.o(this.adManager,"ad-muted",function(){Nx(c);Ox(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;Nx(c);Ox(c)})}pa(Mx,fw);function Nx(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1071
- function Ox(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}J("shaka.ui.MuteButton",Mx);function Px(){}Px.prototype.create=function(a,b){return new Mx(a,b)};Gw("mute",new Px);function Qx(a,b){fw.call(this,a,b);var c=this;this.l=this.controls.B;this.g=Oj();this.g.classList.add("shaka-pip-button");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);this.h=R("span");this.h.classList.add("shaka-current-selection-span");
1072
- d.appendChild(this.h);this.g.appendChild(d);Rx(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){Rx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Rx(c)});this.eventManager.o(this.g,"click",function(){Sx(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent="branding_watermark";c.g.ariaLabel=c.localization.resolve("EXIT_PICTURE_IN_PICTURE");
1041
+ Y.prototype.loadComplete=Y.prototype.sg;Y.prototype.allowCast=Y.prototype.zf;Y.registerSeekBar=function(a){Rw=a};Y.registerElement=Hw;Y.prototype.destroy=Y.prototype.destroy;var Iw=new Map,Rw=new Aw;function Xw(a,b){gw.call(this,a,b);var c=this;this.l=this.controls.j;this.j=this.controls.g;this.i=[];this.h=Oj();this.h.classList.add("shaka-overflow-menu-button");this.h.classList.add("shaka-no-propagation");this.h.classList.add("material-icons-round");this.h.textContent="more_vert";this.parent.appendChild(this.h);this.g=R("div");this.g.classList.add("shaka-overflow-menu");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-hidden");
1042
+ this.j.appendChild(this.g);Yw(this);for(var d=t(this.controls.i.getElementsByClassName("shaka-back-to-overflow-button")),e=d.next();!e.done;e=d.next())this.eventManager.o(e.value,"click",function(){c.controls.zc();X(c.g,!0);c.g.childNodes.length&&c.g.childNodes[0].focus();Bw(c.controls)});this.eventManager.o(this.localization,"locale-updated",function(){Zw(c)});this.eventManager.o(this.localization,"locale-changed",function(){Zw(c)});this.eventManager.o(this.adManager,"ad-started",function(){X(c.h,
1043
+ !1)});this.eventManager.o(this.adManager,"ad-stopped",function(){X(c.h,!0)});this.eventManager.o(this.controls,"submenuopen",function(){X(c.g,!1)});this.eventManager.o(this.g,"touchstart",function(f){c.controls.lf(Date.now());f.stopPropagation()});this.eventManager.o(this.h,"click",function(){$w(c)});Zw(this);this.ad&&X(this.h,!1)}pa(Xw,gw);Xw.prototype.release=function(){this.j=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];gw.prototype.release.call(this)};
1044
+ function ax(a,b){bx.set(a,b)}function Yw(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,bx.get(c)?(c=bx.get(c),a.i.push(c.create(a.g,a.controls))):Pa("Unrecognized overflow menu element requested:",c)}function $w(a){if(a.controls.Nc())a.controls.zc();else{X(a.g,!0);Bw(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};gb(a.g.childNodes,b)&&hb(a.g.childNodes,b)[0].focus()}}
1045
+ function Zw(a){a.h.ariaLabel=a.localization.resolve("MORE_SETTINGS")}J("shaka.ui.OverflowMenu",Xw);Xw.registerElement=ax;function cx(){}cx.prototype.create=function(a,b){return new Xw(a,b)};Hw("overflow_menu",new cx);var bx=new Map;function dx(a,b){gw.call(this,a,b);var c=this;this.g=Oj();this.g.classList.add("shaka-airplay-button");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");var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=R("span");d.appendChild(this.j);this.i=R("span");this.i.classList.add("shaka-current-selection-span");
1046
+ d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);ex(this);fx(this);this.eventManager.o(this.localization,"locale-updated",function(){ex(c)});this.eventManager.o(this.localization,"locale-changed",function(){ex(c)});this.eventManager.o(this.g,"click",function(){c.controls.tb().webkitShowPlaybackTargetPicker()});d=this.controls.tb();this.eventManager.o(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=c.player.Qe()==vl;X(c.g,"available"==e.availability&&f)});this.eventManager.o(d,
1047
+ "webkitcurrentplaybacktargetiswirelesschanged",function(){fx(c)})}pa(dx,gw);function fx(a){var b=a.controls.tb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function ex(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}J("shaka.ui.AirPlayButton",dx);function gx(){}gx.prototype.create=function(a,b){return new dx(a,b)};ax("airplay",new gx);Hw("airplay",new gx);function hx(a,b,c){this.i=a;this.h=ix(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Kd()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.h);this.configure({});c.controls||a.re(b);b.ui=this;c.ui=this}q=hx.prototype;q.destroy=function(){var a=this;return H(function(b){if(1==b.g)return a.g?u(b,a.g.destroy(),2):b.C(2);if(4!=b.g)return a.g=null,a.i?u(b,a.i.destroy(),4):b.C(4);a.i=null;z(b)})};q.Kd=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Dd()&&1<navigator.maxTouchPoints};
1048
+ q.getConfiguration=function(){var a=ix(this);Zj(a,this.h,ix(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ak(a,b));Zj(this.h,a,ix(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.Pf=function(){return this.g};q.Qg=function(a){this.g.je(a)};
1049
+ function ix(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(" "),addSeekBar:!0,addBigPlayButton:!1,castReceiverAppId:"",clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",
1050
+ level:"rgb(255, 255, 255)"},trackLabelFormat:jx,fadeDelay:0,doubleClickForFullscreen:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Kd()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1051
+ function kx(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return H(function(r){switch(r.g){case 1:Xs();if(!Fk())return lx("shaka-ui-load-failed",mx),r["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){r.C(2);break}if(b.length&&!a.length){c=t(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),nx(f,e));r.C(2);break}h=t(a);k=h.next();
1052
+ case 4:if(k.done){r.C(2);break}l=k.value;if(l.ui){r.C(5);break}m=null;n=t(b);for(d=n.next();!d.done;d=n.next())if(p=d.value,p.parentElement==l){m=p;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));A(r,7);return u(r,nx(l,m),9);case 9:ua(r,5);break;case 7:return F(r),lx("shaka-ui-load-failed",ox),r["return"]();case 5:k=h.next();r.C(4);break;case 2:lx("shaka-ui-loaded"),z(r)}})}
1053
+ function lx(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1054
+ function nx(a,b){var c,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:c=new S(b);d=new hx(c,a,b);e="";a.dataset&&a.dataset.shakaPlayerCastReceiverId?e=a.dataset.shakaPlayerCastReceiverId:b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId);e.length&&d.configure({castReceiverAppId:e});b.controls&&d.g.kf(!0);if(f=b.getAttribute("src"))g=document.createElement("source"),g.setAttribute("src",f),b.appendChild(g),b.removeAttribute("src");h=t(b.querySelectorAll("source"));
1055
+ k=h.next();case 2:if(k.done){m.C(0);break}l=k.value;A(m,5);return u(m,d.g.Vb().load(l.getAttribute("src")),7);case 7:m.C(0);break;case 5:F(m);case 3:k=h.next(),m.C(2)}})}J("shaka.ui.Overlay",hx);hx.prototype.setEnabled=hx.prototype.Qg;hx.prototype.getControls=hx.prototype.Pf;hx.prototype.configure=hx.prototype.configure;hx.prototype.getConfiguration=hx.prototype.getConfiguration;hx.prototype.isMobile=hx.prototype.Kd;hx.prototype.destroy=hx.prototype.destroy;var jx=0;
1056
+ hx.TrackLabelFormat={LANGUAGE:jx,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var mx=0,ox=1;hx.FailReasonCode={NO_BROWSER_SUPPORT:mx,PLAYER_FAILED_TO_LOAD:ox};"complete"==document.readyState?H(function(a){if(1==a.g)return u(a,Promise.resolve(),2);kx();z(a)}):window.addEventListener("load",kx);function px(a,b,c,d,e,f,g){function h(D,B){return D+": "+B}function k(D){return"variant"==D.type?D.audioRoles?D.audioRoles.join(", "):void 0:D.roles.join(", ")}var l=a.find(function(D){return 1==D.active}),m=hw(b);Pj(b);b.appendChild(m);m=new Map;for(var n=t(a),p=n.next();!p.done;p=n.next())p=p.value,m.has(p.language)||m.set(p.language,new Set),m.get(p.language).add(k(p));m=new Set;l=l?h(l.language,k(l)):"";n={};a=t(a);for(p=a.next();!p.done;n={Sa:n.Sa},p=a.next()){n.Sa=p.value;p=n.Sa.language;var r=
1057
+ n.Sa.forced,v=f.resolve($b.uf),y=k(n.Sa),x=h(p,y);if(!m.has(x)){m.add(x);var w=Oj();w.addEventListener("click",function(D){return function(){c(D.Sa)}}(n));var C=R("span");w.appendChild(C);C.textContent=qx(p,f);switch(g){case jx:r&&(C.textContent+=" ("+v+")");break;case 1:y?C.textContent=y:(Pa("Track #"+n.Sa.id+" does not have a role, but the UI is configured to only show role."),C.textContent="?");r&&(C.textContent+=" ("+v+")");break;case 2:y&&(C.textContent+=": "+y);r&&(C.textContent+=" ("+v+")");
1058
+ break;case 3:n.Sa.label?C.textContent=n.Sa.label:(Pa("Track #"+n.Sa.id+" does not have a label, but the UI is configured to only show labels."),C.textContent="?")}d&&x==l&&(w.appendChild(kw()),C.classList.add("shaka-chosen-item"),w.ariaSelected="true",e.textContent=C.textContent);b.appendChild(w)}}}
1059
+ function qx(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=Tb(a);return a in cw?cw[a].s:c in cw?cw[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function rx(a,b,c){gw.call(this,a,b);var d=this;sx(this,c);tx(this);this.eventManager.o(this.button,"click",function(){d.controls.dispatchEvent(new L("submenuopen"));X(d.menu,!0);jw(d.menu)})}pa(rx,gw);
1060
+ function sx(a,b){a.button=Oj();a.icon=R("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);var c=R("label");c.classList.add("shaka-overflow-button-label");a.nameSpan=R("span");c.appendChild(a.nameSpan);a.currentSelection=R("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
1061
+ function tx(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=Oj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);var b=R("i");b.classList.add("material-icons-round");b.textContent="arrow_back";a.backButton.appendChild(b);a.backSpan=R("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}
1062
+ J("shaka.ui.SettingsMenu",rx);function ux(a,b){rx.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){vx(c)});this.eventManager.o(this.localization,"locale-changed",function(){vx(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Db().length;X(c.button,d);wx(c)});this.eventManager.o(this.player,"variantchanged",function(){wx(c)});vx(this);wx(this)}
1063
+ pa(ux,rx);function wx(a){var b=a.player.Db();px(b,a.menu,function(c){a.player.nd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.j.trackLabelFormat);jw(a.menu);a.controls.dispatchEvent(new L("languageselectionupdated"))}function vx(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")}
1064
+ J("shaka.ui.AudioLanguageSelection",ux);function xx(){}xx.prototype.create=function(a,b){return new ux(a,b)};ax("language",new xx);function yx(a,b){gw.call(this,a,b);var c=this;this.h=this.controls.A;this.g=Oj();this.g.classList.add("shaka-cast-button");this.g.ariaPressed="false";this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=R("span");d.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");d.appendChild(this.j);
1065
+ this.g.appendChild(d);this.parent.appendChild(this.g);zx(this);Ax(this);this.eventManager.o(this.localization,"locale-updated",function(){zx(c)});this.eventManager.o(this.localization,"locale-changed",function(){zx(c)});this.eventManager.o(this.g,"click",function(){Bx(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){Ax(c)})}pa(yx,gw);
1066
+ function Bx(a){var b;H(function(c){if(1==c.g){if(a.h.na())return a.h.pf(),c.C(0);A(c,3);a.g.disabled=!0;return u(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,ua(c,0);b=F(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));z(c)})}function Ax(a){var b=a.h.Ce()&&a.controls.eb,c=a.h.na();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");Cx(a)}
1067
+ function Cx(a){a.j.textContent=a.h.na()?a.h.ld():a.localization.resolve("OFF")}function zx(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");Cx(a)}J("shaka.ui.CastButton",yx);function Dx(){}Dx.prototype.create=function(a,b){return new yx(a,b)};ax("cast",new Dx);Hw("cast",new Dx);function Ex(a,b){gw.call(this,a,b);var c=this;this.g=Oj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.textContent="fast_forward";this.parent.appendChild(this.g);Fx(this);this.eventManager.o(this.localization,"locale-updated",function(){Fx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Fx(c)});this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.player.vc();c.player.we(0>d||4<d?1:2*d)}})}pa(Ex,gw);
1068
+ function Fx(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}J("shaka.ui.FastForwardButton",Ex);function Gx(){}Gx.prototype.create=function(a,b){return new Ex(a,b)};Hw("fast_forward",new Gx);function Hx(a,b){gw.call(this,a,b);var c=this;this.g=Oj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");document.fullscreenEnabled||this.g.classList.add("shaka-hidden");this.g.textContent="fullscreen";this.parent.appendChild(this.g);Ix(this);this.eventManager.o(this.localization,"locale-updated",function(){Ix(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ix(c)});this.eventManager.o(this.g,"click",function(){return H(function(d){return u(d,
1069
+ c.controls.ue(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Ix(c)})}pa(Hx,gw);function Ix(a){a.g.ariaLabel=a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN")}J("shaka.ui.FullscreenButton",Hx);function Jx(){}Jx.prototype.create=function(a,b){return new Hx(a,b)};Hw("fullscreen",new Jx);function Kx(a,b){gw.call(this,a,b);var c=this;this.g=Oj();this.g.classList.add("shaka-loop-button");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=R("span");this.l.textContent=this.localization.resolve("LOOP");d.appendChild(this.l);this.j=R("span");this.j.classList.add("shaka-current-selection-span");d.appendChild(this.j);
1070
+ this.g.appendChild(d);Lx(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){Lx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Lx(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.za();c.h.ia(1)});this.m=this.video.loop;this.h=new P(function(){c.m!=c.video.loop&&(Lx(c),c.m=c.video.loop)});this.h.ia(1)}pa(Kx,gw);Kx.prototype.release=function(){this.h.stop();this.h=null;gw.prototype.release.call(this)};
1071
+ function Lx(a){a.l.textContent=a.localization.resolve("LOOP");a.j.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")}J("shaka.ui.LoopButton",Kx);function Mx(){}Mx.prototype.create=function(a,b){return new Kx(a,b)};ax("loop",new Mx);Hw("loop",new Mx);function Nx(a,b){gw.call(this,a,b);var c=this;this.g=Oj();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.parent.appendChild(this.g);Ox(this);Px(this);this.eventManager.o(this.localization,"locale-updated",function(){Ox(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ox(c)});this.eventManager.o(this.g,"click",function(){c.ad?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});this.eventManager.o(this.video,"volumechange",
1072
+ function(){Ox(c);Px(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){Ox(c);Px(c)});this.eventManager.o(this.adManager,"ad-muted",function(){Ox(c);Px(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;Ox(c);Px(c)})}pa(Nx,gw);function Ox(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1073
+ function Px(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}J("shaka.ui.MuteButton",Nx);function Qx(){}Qx.prototype.create=function(a,b){return new Nx(a,b)};Hw("mute",new Qx);function Rx(a,b){gw.call(this,a,b);var c=this;this.l=this.controls.B;this.g=Oj();this.g.classList.add("shaka-pip-button");this.i=R("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);var d=R("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=R("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);this.h=R("span");this.h.classList.add("shaka-current-selection-span");
1074
+ d.appendChild(this.h);this.g.appendChild(d);Sx(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){Sx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Sx(c)});this.eventManager.o(this.g,"click",function(){Tx(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent="branding_watermark";c.g.ariaLabel=c.localization.resolve("EXIT_PICTURE_IN_PICTURE");
1073
1075
  c.h.textContent=c.localization.resolve("ON")});this.eventManager.o(this.l,"leavepictureinpicture",function(){c.i.textContent="picture_in_picture_alt";c.g.ariaLabel=c.localization.resolve("ENTER_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("OFF")});this.eventManager.o(this.controls,"caststatuschanged",function(e){e.newStatus?document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!1):document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!0)});this.eventManager.o(this.player,
1074
- "trackschanged",function(){Tx(c)})}pa(Qx,fw);function Sx(a){var b;H(function(c){if(1==c.g)return A(c,2),document.pictureInPictureElement?u(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),u(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return ua(c,0);b=F(c);a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));z(c)})}
1075
- function Rx(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")}
1076
- function Tx(a){H(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.C(0);if(!a.player||!a.player.Ve())return X(a.g,!0),b.C(0);X(a.g,!1);return document.pictureInPictureElement?u(b,document.exitPictureInPicture(),0):b.C(0)})}J("shaka.ui.PipButton",Qx);function Ux(){}Ux.prototype.create=function(a,b){return new Qx(a,b)};$w("picture_in_picture",new Ux);Gw("picture_in_picture",new Ux);function Vx(a,b){qx.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.eventManager.o(this.localization,"locale-updated",function(){Wx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Wx(c)});this.eventManager.o(this.player,"ratechange",function(){Xx(c,c.player.vc())});this.g=new Map([["0.5x",.5],["0.75x",.75],["1x",1],["1.25x",1.25],["1.5x",1.5],["1.75x",1.75],["2x",2]]);Wx(this);
1077
- Yx(this);Xx(this,this.player.vc())}pa(Vx,qx);function Wx(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")}
1078
- function Xx(a,b){var c=hw(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(jw()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x"}
1079
- function Yx(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={jc:b.jc},d=c.next()){b.jc=d.value;d=Oj();var e=R("span");e.textContent=b.jc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.jc);a.video.defaultPlaybackRate=a.g.get(f.jc)}}(b));a.menu.appendChild(d)}iw(a.menu)}J("shaka.ui.PlaybackRateSelection",Vx);function Zx(){}Zx.prototype.create=function(a,b){return new Vx(a,b)};$w("playback_rate",new Zx);function $x(a,b){fw.call(this,a,b);var c=this;this.g=Oj();this.g.classList.add("shaka-current-time");ay(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.V()&&(c.video.currentTime=c.player.Ja().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.Y,e=c.controls.Pe(),f=c.video.duration,g=c.player.Ja(),h=g.end-g.start;c.player.V()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(ay(c,"- "+kw(e,f)),c.g.disabled=
1080
- !1):(ay(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=kw(e,d),f&&(e+=" / "+kw(f,d)),ay(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.V()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}pa($x,fw);function ay(a,b){b!=a.g.textContent&&(a.g.textContent=b)}J("shaka.ui.PresentationTimeTracker",$x);function by(){}by.prototype.create=function(a,b){return new $x(a,b)};Gw("time_and_duration",new by);function cy(a,b){qx.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){dy(c)});this.eventManager.o(this.localization,"locale-changed",function(){dy(c)});this.eventManager.o(this.player,"variantchanged",function(){ey(c)});this.eventManager.o(this.player,"trackschanged",function(){ey(c)});this.eventManager.o(this.player,"abrstatuschanged",function(){ey(c)});
1081
- ey(this);dy(this)}pa(cy,qx);
1082
- function ey(a){var b=a.player.Db();if(b.length&&!b[0].height)X(a.menu,!1),X(a.button,!1);else{X(a.button,!0);b.sort(function(k,l){return l.height-k.height});var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height})==l});var d=gw(a.menu);Pj(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=t(b),g=f.next();!g.done;e=
1083
- {mc:e.mc},g=f.next()){e.mc=g.value;g=Oj();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.mc;a.player.configure({abr:{enabled:!1}});a.player.ge(l,a.controls.j.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=e.mc.height+"p";g.appendChild(h);d||e.mc!=c||(g.ariaSelected="true",g.appendChild(jw()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Oj();e.classList.add("shaka-enable-abr-button");
1084
- a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});ey(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(jw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.menu.appendChild(e);iw(a.menu);a.controls.dispatchEvent(new L("resolutionselectionupdated"))}}
1085
- function dy(a){a.button.ariaLabel=a.localization.resolve("RESOLUTION");a.backButton.ariaLabel=a.localization.resolve("RESOLUTION");a.backSpan.textContent=a.localization.resolve("RESOLUTION");a.nameSpan.textContent=a.localization.resolve("RESOLUTION");a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}J("shaka.ui.ResolutionSelection",cy);function fy(){}
1086
- fy.prototype.create=function(a,b){return new cy(a,b)};$w("quality",new fy);function gy(a,b){fw.call(this,a,b);var c=this;this.g=Oj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.textContent="fast_rewind";this.parent.appendChild(this.g);hy(this);this.eventManager.o(this.localization,"locale-updated",function(){hy(c)});this.eventManager.o(this.localization,"locale-changed",function(){hy(c)});this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.player.vc();c.player.we(0<d||-4>d?-1:2*d)}})}pa(gy,fw);
1087
- function hy(a){a.g.ariaLabel=a.localization.resolve("REWIND")}J("shaka.ui.RewindButton",gy);function iy(){}iy.prototype.create=function(a,b){return new gy(a,b)};Gw("rewind",new iy);function jy(a,b){fw.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");X(this.h,!1);this.j.appendChild(this.h);this.g=Oj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;X(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);ky(this);this.i=new P(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1088
- d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){ky(c)});this.eventManager.o(this.localization,"locale-changed",function(){ky(c)});this.eventManager.o(this.adManager,"ad-started",function(){ly(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),X(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;X(c.g,!1);X(c.h,!1)});this.eventManager.o(this.g,
1089
- "click",function(){c.ad.skip()});this.ad&&ly(this)}pa(jy,fw);jy.prototype.release=function(){this.i.stop();this.i=null;fw.prototype.release.call(this)};function ky(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function ly(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.za(),a.i.ia(.5))}J("shaka.ui.SkipAdButton",jy);function my(a,b){ow.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.h();this.g()}pa(my,ow);my.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};my.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)}};
1090
- J("shaka.ui.SmallPlayButton",my);function ny(){}ny.prototype.create=function(a,b){return new my(a,b)};Gw("play_pause",new ny);function oy(a,b){fw.call(this,a,b);var c=R("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}pa(oy,fw);J("shaka.ui.Spacer",oy);function py(){}py.prototype.create=function(a,b){return new oy(a,b)};Gw("spacer",new py);function qy(a,b){qx.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Ib()?this.button.ariaPressed="true":this.button.ariaPressed="false";ry(this);this.eventManager.o(this.localization,"locale-updated",function(){sy(c);ty(c)});this.eventManager.o(this.localization,"locale-changed",function(){sy(c);ty(c)});this.eventManager.o(this.player,"texttrackvisibility",function(){uy(c);ty(c)});
1091
- this.eventManager.o(this.player,"textchanged",function(){ty(c)});this.eventManager.o(this.player,"trackschanged",function(){vy(c)});uy(this);sy(this);ty(this);vy(this)}pa(qy,qx);function ry(a){var b=Oj();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(jw());a.g=R("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1092
- function uy(a){a.player.Ib()?(a.icon.classList.add("shaka-captions-on"),a.icon.classList.remove("shaka-captions-off"),a.button.ariaPressed="true"):(a.icon.classList.add("shaka-captions-off"),a.icon.classList.remove("shaka-captions-on"),a.button.ariaPressed="false");a.controls.dispatchEvent(new L("captionselectionupdated"))}
1093
- function ty(a){var b=a.player.kb();ox(b,a.menu,function(c){return wy(a,c)},a.player.Ib(),a.currentSelection,a.localization,a.controls.j.trackLabelFormat);b=Oj();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.qe(!1);ty(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Ib()||(b.ariaSelected="true",b.appendChild(jw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));iw(a.menu);a.controls.dispatchEvent(new L("captionselectionupdated"))}
1094
- function wy(a,b){return H(function(c){a.player.fe(b);return u(c,a.player.qe(!0),0)})}function sy(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")}function vy(a){var b=0<a.player.kb().length;X(a.button,b);ty(a)}J("shaka.ui.TextSelection",qy);function xy(){}
1095
- xy.prototype.create=function(a,b){return new qy(a,b)};$w("captions",new xy);function yy(a,b){sw.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.j;this.eventManager.o(this.video,"volumechange",function(){return zy(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return Ay(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return Ay(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return zy(c)});this.eventManager.o(this.localization,"locale-updated",function(){return By(c)});
1096
- this.eventManager.o(this.localization,"locale-changed",function(){return By(c)});zy(this);By(this);if(this.ad)this.onChange()}pa(yy,sw);yy.prototype.onChange=function(){this.ad?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function zy(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);Cy(a)}function Ay(a){var b=a.ad.getVolume();a.setValue(b);Cy(a)}
1097
- function Cy(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 By(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}J("shaka.ui.VolumeBar",yy);function Dy(){}Dy.prototype.create=function(a,b){return new yy(a,b)};Gw("volume",new Dy);}).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})();
1076
+ "trackschanged",function(){Ux(c)})}pa(Rx,gw);function Tx(a){var b;H(function(c){if(1==c.g)return A(c,2),document.pictureInPictureElement?u(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),u(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return ua(c,0);b=F(c);a.controls.dispatchEvent(new L("error",(new Map).set("detail",b)));z(c)})}
1077
+ function Sx(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")}
1078
+ function Ux(a){H(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.C(0);if(!a.player||!a.player.Ve())return X(a.g,!0),b.C(0);X(a.g,!1);return document.pictureInPictureElement?u(b,document.exitPictureInPicture(),0):b.C(0)})}J("shaka.ui.PipButton",Rx);function Vx(){}Vx.prototype.create=function(a,b){return new Rx(a,b)};ax("picture_in_picture",new Vx);Hw("picture_in_picture",new Vx);function Wx(a,b){rx.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.eventManager.o(this.localization,"locale-updated",function(){Xx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Xx(c)});this.eventManager.o(this.player,"ratechange",function(){Yx(c,c.player.vc())});this.g=new Map([["0.5x",.5],["0.75x",.75],["1x",1],["1.25x",1.25],["1.5x",1.5],["1.75x",1.75],["2x",2]]);Xx(this);
1079
+ Zx(this);Yx(this,this.player.vc())}pa(Wx,rx);function Xx(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")}
1080
+ function Yx(a,b){var c=iw(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(kw()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x"}
1081
+ function Zx(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={jc:b.jc},d=c.next()){b.jc=d.value;d=Oj();var e=R("span");e.textContent=b.jc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.jc);a.video.defaultPlaybackRate=a.g.get(f.jc)}}(b));a.menu.appendChild(d)}jw(a.menu)}J("shaka.ui.PlaybackRateSelection",Wx);function $x(){}$x.prototype.create=function(a,b){return new Wx(a,b)};ax("playback_rate",new $x);function ay(a,b){gw.call(this,a,b);var c=this;this.g=Oj();this.g.classList.add("shaka-current-time");by(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.V()&&(c.video.currentTime=c.player.Ja().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.Y,e=c.controls.Pe(),f=c.video.duration,g=c.player.Ja(),h=g.end-g.start;c.player.V()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(by(c,"- "+lw(e,f)),c.g.disabled=
1082
+ !1):(by(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=lw(e,d),f&&(e+=" / "+lw(f,d)),by(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.V()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}pa(ay,gw);function by(a,b){b!=a.g.textContent&&(a.g.textContent=b)}J("shaka.ui.PresentationTimeTracker",ay);function cy(){}cy.prototype.create=function(a,b){return new ay(a,b)};Hw("time_and_duration",new cy);function dy(a,b){rx.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){ey(c)});this.eventManager.o(this.localization,"locale-changed",function(){ey(c)});this.eventManager.o(this.player,"variantchanged",function(){fy(c)});this.eventManager.o(this.player,"trackschanged",function(){fy(c)});this.eventManager.o(this.player,"abrstatuschanged",function(){fy(c)});
1083
+ fy(this);ey(this)}pa(dy,rx);
1084
+ function fy(a){var b=a.player.Db();if(b.length&&!b[0].height)X(a.menu,!1),X(a.button,!1);else{X(a.button,!0);b.sort(function(k,l){return l.height-k.height});var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height})==l});var d=hw(a.menu);Pj(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=t(b),g=f.next();!g.done;e=
1085
+ {mc:e.mc},g=f.next()){e.mc=g.value;g=Oj();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.mc;a.player.configure({abr:{enabled:!1}});a.player.ge(l,a.controls.j.clearBufferOnQualityChange)}}(e));var h=R("span");h.textContent=e.mc.height+"p";g.appendChild(h);d||e.mc!=c||(g.ariaSelected="true",g.appendChild(kw()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Oj();e.classList.add("shaka-enable-abr-button");
1086
+ a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});fy(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(kw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.menu.appendChild(e);jw(a.menu);a.controls.dispatchEvent(new L("resolutionselectionupdated"))}}
1087
+ function ey(a){a.button.ariaLabel=a.localization.resolve("RESOLUTION");a.backButton.ariaLabel=a.localization.resolve("RESOLUTION");a.backSpan.textContent=a.localization.resolve("RESOLUTION");a.nameSpan.textContent=a.localization.resolve("RESOLUTION");a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}J("shaka.ui.ResolutionSelection",dy);function gy(){}
1088
+ gy.prototype.create=function(a,b){return new dy(a,b)};ax("quality",new gy);function hy(a,b){gw.call(this,a,b);var c=this;this.g=Oj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.textContent="fast_rewind";this.parent.appendChild(this.g);iy(this);this.eventManager.o(this.localization,"locale-updated",function(){iy(c)});this.eventManager.o(this.localization,"locale-changed",function(){iy(c)});this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.player.vc();c.player.we(0<d||-4>d?-1:2*d)}})}pa(hy,gw);
1089
+ function iy(a){a.g.ariaLabel=a.localization.resolve("REWIND")}J("shaka.ui.RewindButton",hy);function jy(){}jy.prototype.create=function(a,b){return new hy(a,b)};Hw("rewind",new jy);function ky(a,b){gw.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");X(this.h,!1);this.j.appendChild(this.h);this.g=Oj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;X(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);ly(this);this.i=new P(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1090
+ d:(c.i.stop(),X(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){ly(c)});this.eventManager.o(this.localization,"locale-changed",function(){ly(c)});this.eventManager.o(this.adManager,"ad-started",function(){my(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),X(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;X(c.g,!1);X(c.h,!1)});this.eventManager.o(this.g,
1091
+ "click",function(){c.ad.skip()});this.ad&&my(this)}pa(ky,gw);ky.prototype.release=function(){this.i.stop();this.i=null;gw.prototype.release.call(this)};function ly(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function my(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.za(),a.i.ia(.5))}J("shaka.ui.SkipAdButton",ky);function ny(a,b){pw.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.h();this.g()}pa(ny,pw);ny.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};ny.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)}};
1092
+ J("shaka.ui.SmallPlayButton",ny);function oy(){}oy.prototype.create=function(a,b){return new ny(a,b)};Hw("play_pause",new oy);function py(a,b){gw.call(this,a,b);var c=R("div");c.classList.add("shaka-spacer");c.ariaHidden="true";this.parent.appendChild(c)}pa(py,gw);J("shaka.ui.Spacer",py);function qy(){}qy.prototype.create=function(a,b){return new py(a,b)};Hw("spacer",new qy);function ry(a,b){rx.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Ib()?this.button.ariaPressed="true":this.button.ariaPressed="false";sy(this);this.eventManager.o(this.localization,"locale-updated",function(){ty(c);uy(c)});this.eventManager.o(this.localization,"locale-changed",function(){ty(c);uy(c)});this.eventManager.o(this.player,"texttrackvisibility",function(){vy(c);uy(c)});
1093
+ this.eventManager.o(this.player,"textchanged",function(){uy(c)});this.eventManager.o(this.player,"trackschanged",function(){wy(c)});vy(this);ty(this);uy(this);wy(this)}pa(ry,rx);function sy(a){var b=Oj();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(kw());a.g=R("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1094
+ function vy(a){a.player.Ib()?(a.icon.classList.add("shaka-captions-on"),a.icon.classList.remove("shaka-captions-off"),a.button.ariaPressed="true"):(a.icon.classList.add("shaka-captions-off"),a.icon.classList.remove("shaka-captions-on"),a.button.ariaPressed="false");a.controls.dispatchEvent(new L("captionselectionupdated"))}
1095
+ function uy(a){var b=a.player.kb();px(b,a.menu,function(c){return xy(a,c)},a.player.Ib(),a.currentSelection,a.localization,a.controls.j.trackLabelFormat);b=Oj();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.qe(!1);uy(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Ib()||(b.ariaSelected="true",b.appendChild(kw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));jw(a.menu);a.controls.dispatchEvent(new L("captionselectionupdated"))}
1096
+ function xy(a,b){return H(function(c){a.player.fe(b);return u(c,a.player.qe(!0),0)})}function ty(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")}function wy(a){var b=0<a.player.kb().length;X(a.button,b);uy(a)}J("shaka.ui.TextSelection",ry);function yy(){}
1097
+ yy.prototype.create=function(a,b){return new ry(a,b)};ax("captions",new yy);function zy(a,b){tw.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.j;this.eventManager.o(this.video,"volumechange",function(){return Ay(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return By(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return By(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return Ay(c)});this.eventManager.o(this.localization,"locale-updated",function(){return Cy(c)});
1098
+ this.eventManager.o(this.localization,"locale-changed",function(){return Cy(c)});Ay(this);Cy(this);if(this.ad)this.onChange()}pa(zy,tw);zy.prototype.onChange=function(){this.ad?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function Ay(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);Dy(a)}function By(a){var b=a.ad.getVolume();a.setValue(b);Dy(a)}
1099
+ function Dy(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 Cy(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}J("shaka.ui.VolumeBar",zy);function Ey(){}Ey.prototype.create=function(a,b){return new zy(a,b)};Hw("volume",new Ey);}).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})();
1098
1100
 
1099
1101
  //# sourceMappingURL=shaka-player.ui.map