shaka-player 4.7.9 → 4.7.11

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.
@@ -31,10 +31,10 @@ while(!k.done)})};return b});function Ha(a,b){return Object.prototype.hasOwnProp
31
31
  ha("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ha(k,g)){var l=new c;ca(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
32
32
  m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ha(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ha(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ha(k,
33
33
  g)&&Ha(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ha(k,g)&&Ha(k[g],this.g)?delete k[g][this.g]:!1};return b});
34
- ha("Map",function(a){function b(){var h={};return h.Pb=h.next=h.head=h}function c(h,k){var l=h.g;return ia(function(){if(l){for(;l.head!=h.g;)l=l.Pb;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ha(h.h,l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
34
+ ha("Map",function(a){function b(){var h={};return h.Rb=h.next=h.head=h}function c(h,k){var l=h.g;return ia(function(){if(l){for(;l.head!=h.g;)l=l.Rb;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ha(h.h,l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
35
35
  list:m,index:-1,entry:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
36
- "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this.g,Pb:this.g.Pb,head:this.g,key:h,value:k},l.list.push(l.entry),this.g.Pb.next=l.entry,this.g.Pb=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.entry.Pb.next=h.entry.next,
37
- h.entry.next.Pb=h.entry.Pb,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Pb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=
36
+ "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this.g,Rb:this.g.Rb,head:this.g,key:h,value:k},l.list.push(l.entry),this.g.Rb.next=l.entry,this.g.Rb=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.entry.Rb.next=h.entry.next,
37
+ h.entry.next.Rb=h.entry.Rb,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Rb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=
38
38
  function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});function Ia(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ha("Array.prototype.keys",function(a){return a?a:function(){return Ia(this,function(b){return b})}});
39
39
  ha("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
40
40
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
@@ -67,10 +67,10 @@ var eb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
67
67
  Copyright 2006 The Closure Library Authors
68
68
  SPDX-License-Identifier: Apache-2.0
69
69
  */
70
- function fb(a){var b;a instanceof fb?(gb(this,a.wb),this.Bc=a.Bc,hb(this,a.Kb),jb(this,a.Tc),this.Ya=a.Ya,kb(this,a.g.clone()),this.nc=a.nc):a&&(b=String(a).match(eb))?(gb(this,b[1]||"",!0),this.Bc=lb(b[2]||""),hb(this,b[3]||"",!0),jb(this,b[4]),this.Ya=lb(b[5]||"",!0),kb(this,b[6]||"",!0),this.nc=lb(b[7]||"")):this.g=new mb(null)}p=fb.prototype;p.wb="";p.Bc="";p.Kb="";p.Tc=null;p.Ya="";p.nc="";
71
- p.toString=function(){var a=[],b=this.wb;b&&a.push(nb(b,ob,!0),":");if(b=this.Kb){a.push("//");var c=this.Bc;c&&a.push(nb(c,ob,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Tc;null!=b&&a.push(":",String(b))}if(b=this.Ya)this.Kb&&"/"!=b.charAt(0)&&a.push("/"),a.push(nb(b,"/"==b.charAt(0)?pb:qb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.nc)&&a.push("#",nb(b,tb));return a.join("")};
70
+ function fb(a){var b;a instanceof fb?(gb(this,a.wb),this.Bc=a.Bc,hb(this,a.Kb),jb(this,a.Tc),this.Ya=a.Ya,kb(this,a.g.clone()),this.pc=a.pc):a&&(b=String(a).match(eb))?(gb(this,b[1]||"",!0),this.Bc=lb(b[2]||""),hb(this,b[3]||"",!0),jb(this,b[4]),this.Ya=lb(b[5]||"",!0),kb(this,b[6]||"",!0),this.pc=lb(b[7]||"")):this.g=new mb(null)}p=fb.prototype;p.wb="";p.Bc="";p.Kb="";p.Tc=null;p.Ya="";p.pc="";
71
+ p.toString=function(){var a=[],b=this.wb;b&&a.push(nb(b,ob,!0),":");if(b=this.Kb){a.push("//");var c=this.Bc;c&&a.push(nb(c,ob,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Tc;null!=b&&a.push(":",String(b))}if(b=this.Ya)this.Kb&&"/"!=b.charAt(0)&&a.push("/"),a.push(nb(b,"/"==b.charAt(0)?pb:qb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.pc)&&a.push("#",nb(b,tb));return a.join("")};
72
72
  p.resolve=function(a){var b=this.clone();"data"===b.wb&&(b=new fb);var c=!!a.wb;c?gb(b,a.wb):c=!!a.Bc;c?b.Bc=a.Bc:c=!!a.Kb;c?hb(b,a.Kb):c=null!=a.Tc;var d=a.Ya;if(c)jb(b,a.Tc);else if(c=!!a.Ya){if("/"!=d.charAt(0))if(this.Kb&&!this.Ya)d="/"+d;else{var e=b.Ya.lastIndexOf("/");-1!=e&&(d=b.Ya.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
73
- 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.Ya=d:c=""!==a.g.toString();c?kb(b,a.g.clone()):c=!!a.nc;c&&(b.nc=a.nc);return b};p.clone=function(){return new fb(this)};function gb(a,b,c){a.wb=c?lb(b,!0):b;a.wb&&(a.wb=a.wb.replace(/:$/,""))}function hb(a,b,c){a.Kb=c?lb(b,!0):b}function jb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Tc=b}else a.Tc=null}
73
+ 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.Ya=d:c=""!==a.g.toString();c?kb(b,a.g.clone()):c=!!a.pc;c&&(b.pc=a.pc);return b};p.clone=function(){return new fb(this)};function gb(a,b,c){a.wb=c?lb(b,!0):b;a.wb&&(a.wb=a.wb.replace(/:$/,""))}function hb(a,b,c){a.Kb=c?lb(b,!0):b}function jb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Tc=b}else a.Tc=null}
74
74
  function kb(a,b,c){b instanceof mb?a.g=b:(c||(b=nb(b,ub)),a.g=new mb(b))}function lb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function nb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,vb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function vb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var ob=/[#\/\?@]/g,qb=/[#\?:]/g,pb=/[#\?]/g,ub=/[#\?@]/g,tb=/#/g;function mb(a){this.g=a||null}
75
75
  function wb(a){if(!a.Oa&&(a.Oa={},a.rd=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}p=mb.prototype;p.Oa=null;p.rd=null;function xb(a){wb(a);return a.rd}p.add=function(a,b){wb(this);this.g=null;var c=this.Oa.hasOwnProperty(a)?this.Oa[a]:null;c||(this.Oa[a]=c=[]);c.push(b);this.rd++;return this};
76
76
  p.set=function(a,b){wb(this);this.g=null;this.Oa.hasOwnProperty(a)?this.Oa[a]=[b]:this.add(a,b);return this};p.get=function(a){wb(this);return this.Oa[a]||[]};p.toString=function(){if(this.g)return this.g;if(!this.Oa)return"";var a=[],b;for(b in this.Oa)for(var c=encodeURIComponent(b),d=this.Oa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
@@ -106,7 +106,7 @@ function lc(a,b,c){c=void 0===c?Infinity:c;return nc(a,void 0===b?0:b,c,Uint8Arr
106
106
  L("shaka.util.BufferUtils",ic);ic.toDataView=pc;ic.toUint16=oc;ic.toUint8=lc;ic.toArrayBuffer=mc;ic.equal=jc;function qc(){}qc.prototype.init=function(){};qc.prototype.i=function(){};qc.prototype.h=function(){};qc.prototype.j=function(){};L("shaka.media.IClosedCaptionParser",qc);function rc(a){this.l=new hc;if(a=sc[a.toLowerCase()])this.l=a();this.g=new gc;if(a=tc)this.g=a()}rc.prototype.init=function(a){this.l.init(a)};rc.prototype.i=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=lc(b.packet);0<c.length&&this.g.extract(c,b.pts)}return this.g.decode()};
107
107
  rc.prototype.h=function(){this.g.clear()};rc.prototype.j=function(){return this.g.getStreams()};L("shaka.media.ClosedCaptionParser",rc);rc.findDecoder=function(){return tc};rc.unregisterDecoder=function(){tc=null};rc.registerDecoder=function(a){tc=a};rc.findParser=function(a){return sc[a]};rc.unregisterParser=function(a){delete sc[a]};rc.registerParser=function(a,b){sc[a]=b};var sc={},tc=null;function uc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function vc(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function wc(a,b,c){c||(c=uc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Ue:d.Ue},e=a.next()){d.Ue=e.value;e=b.findIndex(function(f){return function(g){return c(f.Ue,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
108
108
  function xc(a,b,c){c||(c=uc);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 yc(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new zc;this.position=null;this.positionAlign=Ac;this.size=0;this.textAlign=Bc;this.direction=Cc;this.writingMode=Ec;this.lineInterpretation=Fc;this.line=null;this.lineHeight="";this.lineAlign=Gc;this.displayAlign=Hc;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Ic;this.fontStyle=Jc;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
109
- "";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={lc:32,rows:15}}function Kc(a,b){a=new yc(a,b,"");a.lineBreak=!0;return a}yc.prototype.clone=function(){var a=new yc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
109
+ "";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={mc:32,rows:15}}function Kc(a,b){a=new yc(a,b,"");a.lineBreak=!0;return a}yc.prototype.clone=function(){var a=new yc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
110
110
  function Mc(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(!xc(a.nestedCues,b.nestedCues,Mc))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(!xc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}L("shaka.text.Cue",yc);yc.equal=Mc;yc.prototype.clone=yc.prototype.clone;var Ac="auto";
111
111
  yc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Ac};var Bc="center",Nc={LEFT:"left",RIGHT:"right",CENTER:Bc,START:"start",END:"end"};yc.textAlign=Nc;var Hc="after",Oc={BEFORE:"before",CENTER:"center",AFTER:Hc};yc.displayAlign=Oc;var Cc="ltr";yc.direction={HORIZONTAL_LEFT_TO_RIGHT:Cc,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Ec="horizontal-tb";yc.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Ec,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Fc=0;
112
112
  yc.lineInterpretation={LINE_NUMBER:Fc,PERCENTAGE:1};var Gc="start",Pc={CENTER:"center",START:Gc,END:"end"};yc.lineAlign=Pc;var Qc={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};yc.defaultTextColor=Qc;var Rc={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};yc.defaultTextBackgroundColor=Rc;var Ic=400;yc.fontWeight={NORMAL:Ic,BOLD:700};
@@ -135,15 +135,15 @@ function ee(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g)return D(k,he(b.
135
135
  r,f.U);if(!ac(q))return!1;n=[n,r].join()}r=gd(m.mimeType,n,f.ia);if(!ac(r))return!1;m.codecs=n}m=l.audio;if(h&&m&&m.encrypted&&m.codecs.toLowerCase().includes("opus"))return Wa(ie(l)),!1;if(m){n=ke(m.codecs);r=gd(m.mimeType,n,f.U);if(!ac(r))return!1;m.codecs=n}(m=l.decodingInfos.some(function(u){return!u.supported||d&&(u=u.keySystemAccess)&&u.keySystem!=d?!1:!0}))||Wa(ie(l));return m});F(k)})}
136
136
  function le(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=le(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
137
137
  function me(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g)return c=le(b),d=ne,d[c]?(a.decodingInfos.push(d[c]),l.F(0)):D(l,oe(b),3);if((e=l.h)&&e.length){f=null;g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,f?(f.supported=f.supported&&k.supported,f.powerEfficient=f.powerEfficient&&k.powerEfficient,f.smooth=f.smooth&&k.smooth,k.keySystemAccess||(f.keySystemAccess=null)):f=k;f&&(d[c]=f,a.decodingInfos.push(f))}F(l)})}
138
- function oe(a){var b=[""];a.video&&(b=nd(a.video.contentType).split(","));var c=[""];a.audio&&(c=nd(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f={},g=t(c),h=g.next();!h.done;f={hc:f.hc},h=g.next())h=h.value,f.hc=Ad(a),a.video&&(f.hc.video.contentType=dd(md(f.hc.video.contentType),e)),a.audio&&(f.hc.audio.contentType=dd(md(f.hc.audio.contentType),h)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.hc).then(function(n){l(n)}).catch(m)}}(f)))}return Promise.all(d).catch(function(){JSON.stringify(a);
138
+ function oe(a){var b=[""];a.video&&(b=nd(a.video.contentType).split(","));var c=[""];a.audio&&(c=nd(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f={},g=t(c),h=g.next();!h.done;f={ic:f.ic},h=g.next())h=h.value,f.ic=Ad(a),a.video&&(f.ic.video.contentType=dd(md(f.ic.video.contentType),e)),a.audio&&(f.ic.audio.contentType=dd(md(f.ic.audio.contentType),h)),d.push(new Promise(function(k){return function(l,m){navigator.mediaCapabilities.decodingInfo(k.ic).then(function(n){l(n)}).catch(m)}}(f)))}return Promise.all(d).catch(function(){JSON.stringify(a);
139
139
  return null})}
140
140
  function he(a,b,c,d){var e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A;return K(function(C){switch(C.g){case 1:if(e=a.some(function(E){return E.decodingInfos.length}))return C.return();f={};g=t(d);h=g.next();case 2:if(h.done){C.F(4);break}f.We=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){C.F(7);break}n=m.value;r=pe(n,b,c).filter(function(E){return function(I){return(I.keySystemConfiguration&&I.keySystemConfiguration.keySystem)===E.We}}(f));q=t(r);u=q.next();case 8:if(u.done){C.F(10);break}v=u.value;return D(C,
141
141
  me(n,v),9);case 9:u=q.next();C.F(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();C.F(5);break;case 7:if(k)return C.return();f={We:f.We};h=g.next();C.F(2);break;case 4:x=t(a),m=x.next();case 12:if(m.done){C.F(0);break}z=m.value;y=pe(z,b,c).filter(function(E){E=E.keySystemConfiguration&&E.keySystemConfiguration.keySystem;return!E||!d.includes(E)});B=t(y);u=B.next();case 15:if(u.done){m=x.next();C.F(12);break}A=u.value;return D(C,me(z,A),16);case 16:u=B.next(),C.F(15)}})}
142
142
  function pe(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=Bb("video",g);f=je(f);g=Bb("audio",g);g=ke(g);g=gd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=je(f);f=gd(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction=
143
- "srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=gd(d.mimeType,ke(d.codecs),"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,
143
+ "srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=ke(d.codecs),f=gd(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,
144
144
  []);f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var r=new Set,q=t(h.initData),u=q.next();!u.done;u=q.next())r.add(u.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
145
145
  (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(""!=h.audioRobustness?m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness}:m.audio||(m.audio={}));e&&(""!=h.videoRobustness?m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness}:m.video||(m.video={}))}l.keySystemConfiguration=m;a.push(l)}return a}
146
- function ke(a){return"fLaC"===a?"flac":"Opus"===a?"opus":a}function je(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function fe(a){a.textStreams=a.textStreams.filter(function(b){b=dd(b.mimeType,b.codecs);return pd(b)})}
146
+ function ke(a){return"fLaC"!==a||Rd()?"Opus"===a?"opus":a:"flac"}function je(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function fe(a){a.textStreams=a.textStreams.filter(function(b){b=dd(b.mimeType,b.codecs);return pd(b)})}
147
147
  function ge(a){var b,c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.F(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(qe.has(f)){l.F(5);break}g=re.get(f);if(!g){qe.set(f,!1);l.F(5);break}return D(l,se(g),7);case 7:h=l.h,qe.set(f,h);case 5:(k=qe.get(f))&&b.push(e);d=c.next();l.F(2);break;case 4:a.imageStreams=b,F(l)}})}
148
148
  function se(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}
149
149
  function te(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),r=n.next();!r.done;r=n.next())m.add(r.value);if(c)for(n=t(c.roles),r=n.next();!r.done;r=n.next())m.add(r.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
@@ -169,13 +169,13 @@ p.trySuggestStreams=function(){null!=this.C&&this.l&&Je(this)};p.getBandwidthEst
169
169
  p.setMediaElement=function(a){var b=this;this.m=a;this.h&&(this.h.disconnect(),this.h=null);this.m&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.H.S(Ke)}),this.h.observe(this.m))};p.setCmsdManager=function(a){this.j=a};p.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
170
170
  function Je(a){if(!a.I){var b=a.i;if(!(b.g>=b.i))return;a.I=!0}else if(Date.now()-a.C<1E3*a.g.switchInterval)return;b=a.chooseVariant();a.getBandwidthEstimate();b&&a.u(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}function He(a,b,c,d,e){if(a.j){var f=a.j.Ug();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return be(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
171
171
  function Ie(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}L("shaka.abr.SimpleAbrManager",Ge);Ge.prototype.configure=Ge.prototype.configure;Ge.prototype.setCmsdManager=Ge.prototype.setCmsdManager;Ge.prototype.setMediaElement=Ge.prototype.setMediaElement;Ge.prototype.playbackRateChanged=Ge.prototype.playbackRateChanged;Ge.prototype.setVariants=Ge.prototype.setVariants;
172
- Ge.prototype.getBandwidthEstimate=Ge.prototype.getBandwidthEstimate;Ge.prototype.trySuggestStreams=Ge.prototype.trySuggestStreams;Ge.prototype.segmentDownloaded=Ge.prototype.segmentDownloaded;Ge.prototype.disable=Ge.prototype.disable;Ge.prototype.enable=Ge.prototype.enable;Ge.prototype.chooseVariant=Ge.prototype.chooseVariant;Ge.prototype.init=Ge.prototype.init;Ge.prototype.release=Ge.prototype.release;Ge.prototype.stop=Ge.prototype.stop;var Ke=1;function Le(a,b){this.g=a;this.h=b}Le.prototype.toString=function(){return"v"+this.g+"."+this.h};function Me(a,b){var c=new Le(5,0),d=Ne,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Oe(a,b,c,d){Ra([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Pe(a,b,c,d){Qa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Ne=null;L("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});L("shaka.config.CodecSwitchingStrategy",{Zj:"reload",Eh:"smooth"});function Qe(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}Qe.prototype.add=function(a,b,c){return Re(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
172
+ Ge.prototype.getBandwidthEstimate=Ge.prototype.getBandwidthEstimate;Ge.prototype.trySuggestStreams=Ge.prototype.trySuggestStreams;Ge.prototype.segmentDownloaded=Ge.prototype.segmentDownloaded;Ge.prototype.disable=Ge.prototype.disable;Ge.prototype.enable=Ge.prototype.enable;Ge.prototype.chooseVariant=Ge.prototype.chooseVariant;Ge.prototype.init=Ge.prototype.init;Ge.prototype.release=Ge.prototype.release;Ge.prototype.stop=Ge.prototype.stop;var Ke=1;function Le(a,b){this.g=a;this.h=b}Le.prototype.toString=function(){return"v"+this.g+"."+this.h};function Me(a,b){var c=new Le(5,0),d=Ne,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Oe(a,b,c,d){Ra([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Pe(a,b,c,d){Qa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var Ne=null;L("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});L("shaka.config.CodecSwitchingStrategy",{Zj:"reload",Eh:"smooth"});function Qe(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}Qe.prototype.add=function(a,b,c){return Re(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
173
173
  function Re(a,b,c,d){var e;if(!(e=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(e=a.audio&&b.audio)){e=a.audio;var f=b.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||c&&!Se(e,f)||!Te(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Se(a,b))&&Te(a.roles,b.roles)));return d?!1:!0}Qe.prototype.values=function(){return this.g.values()};
174
174
  function Se(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return ld(d)});b=b.codecs.split(",").map(function(d){return ld(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function Te(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Ue(a,b,c){b=void 0===b?"reload":b;c=void 0===c?!1:c;this.i=a;this.h=b;this.g=c;this.j=new Ve(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"",!1,"","","",b,c)}Ue.prototype.create=function(a){var b=this,c="smooth"==this.h&&fc(),d=a.filter(function(e){return Re(b.i,e,!c,b.g)});return d.length?new Qe(d[0],d,!c,this.g):this.j.create(a)};
175
175
  function Ve(a,b,c,d,e,f,g,h,k,l){this.u=a;this.C=b;this.h=c;this.i=d;this.D=e;this.l=f;this.g=void 0===g?"":g;this.j=void 0===h?"":h;this.m=void 0===k?"reload":k;this.s=void 0===l?!1:l}
176
- Ve.prototype.create=function(a){var b=[];b=We(a,this.u);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Ye(b,this.C);a.length&&(b=a);this.l&&(a=Ze(b,this.l),a.length&&(b=a));this.i&&(a=$e(b,this.i),a.length&&(b=a));this.h&&(a=af(b,this.h),a.length&&(b=a));this.g&&(a=bf(b,this.g),a.length&&(b=a));this.j&&(a=cf(b,this.j),a.length&&(b=a));a=df(b,this.D);a.length&&(b=a);return new Qe(b[0],b,!("smooth"==this.m&&fc()),this.s)};
177
- function We(a,b){b=Kb(b);var c=Tb(b,a.map(function(d){return Sb(d)}));return c?a.filter(function(d){return c==Sb(d)}):[]}function Ye(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function bf(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function cf(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
178
- function af(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function $e(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Ze(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function df(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})};function ef(){this.g=ff;this.h=(new Map).set(ff,2).set(gf,1)}function hf(a,b,c){a.h.set(ff,c).set(gf,b)}var gf=0,ff=1;function jf(a,b){var c=kf();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
176
+ Ve.prototype.create=function(a){var b=[];b=We(a,this.u);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Xe(b,this.C);a.length&&(b=a);this.l&&(a=Ye(b,this.l),a.length&&(b=a));this.i&&(a=$e(b,this.i),a.length&&(b=a));this.h&&(a=af(b,this.h),a.length&&(b=a));this.g&&(a=bf(b,this.g),a.length&&(b=a));this.j&&(a=cf(b,this.j),a.length&&(b=a));a=df(b,this.D);a.length&&(b=a);return new Qe(b[0],b,!("smooth"==this.m&&fc()),this.s)};
177
+ function We(a,b){b=Kb(b);var c=Tb(b,a.map(function(d){return Sb(d)}));return c?a.filter(function(d){return c==Sb(d)}):[]}function Xe(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function bf(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function cf(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
178
+ function af(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function $e(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Ye(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function df(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})};function ef(){this.g=ff;this.h=(new Map).set(ff,2).set(gf,1)}function hf(a,b,c){a.h.set(ff,c).set(gf,b)}var gf=0,ff=1;function jf(a,b){var c=kf();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
179
179
  function lf(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.s);return D(d,new Promise(function(e){(new Dd(e)).S(c/1E3)}),2)}a.h*=a.m;F(d)})}function kf(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function mf(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}mf.prototype.resolve=function(){};mf.prototype.reject=function(){};function nf(a,b){this.promise=a;this.i=b;this.g=!1}function of(a){return new nf(Promise.reject(a),function(){return Promise.resolve()})}function pf(){var a=Promise.reject(new P(2,7,7001));a.catch(function(){});return new nf(a,function(){return Promise.resolve()})}function qf(a){return new nf(Promise.resolve(a),function(){return Promise.resolve()})}function rf(a){return new nf(a,function(){return a.catch(function(){})})}nf.prototype.abort=function(){this.g=!0;return this.i()};
180
180
  function sf(a){return new nf(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}nf.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
181
181
  nf.prototype.Fa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=tf(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new mf,g=new P(2,7,7001);this.promise.then(c(!0),c(!1));return new nf(f,function(){return d()})};
@@ -189,24 +189,24 @@ m=!0,h.g=I)},function(C){a.j&&a.j(C,c,b);x=!0});if(!r)return y;var B=c.retryPara
189
189
  B,A,v)}if(a.i)return pf();v&&(y=new P(1,1,1003,c.uris[f],b));if(y instanceof P){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return B=(new Map).set("error",y),B=new O("retry",B),a.dispatchEvent(B),f=(f+1)%c.uris.length,Ef(a,b,c,d,e,f,y,h)}throw y;})}
190
190
  function Ff(a,b,c,d){var e=qf(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Ye:f.Ye},g=a.next())f.Ye=g.value,e=e.Fa(function(h){return function(){var k=c.response;k.data&&(k.data=mc(k.data));return h.Ye(b,k,d)}}(f));return e.Fa(function(){return c},function(h){var k=2;if(h instanceof P){if(7001==h.code)throw h;k=h.severity}throw new P(k,1,1007,h);})}function Hf(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.Fd)return!1}return!0}L("shaka.net.NetworkingEngine",wf);
191
191
  wf.prototype.request=wf.prototype.request;wf.prototype.destroy=wf.prototype.destroy;wf.makeRequest=Af;wf.defaultRetryParameters=function(){return kf()};wf.prototype.clearAllResponseFilters=wf.prototype.Mh;wf.prototype.unregisterResponseFilter=wf.prototype.vj;wf.prototype.registerResponseFilter=wf.prototype.bj;wf.prototype.clearAllRequestFilters=wf.prototype.Lh;wf.prototype.unregisterRequestFilter=wf.prototype.uj;wf.prototype.registerRequestFilter=wf.prototype.aj;wf.unregisterScheme=function(a){delete zf[a]};
192
- wf.registerScheme=xf;wf.prototype.setForceHTTPS=wf.prototype.mg;function Bf(){this.g=0}wf.NumBytesRemainingClass=Bf;function Cf(a,b,c){nf.call(this,a,b);this.h=c}pa(Cf,nf);wf.PendingRequest=Cf;var Gf=1;wf.RequestType={MANIFEST:0,SEGMENT:Gf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};wf.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var yf=3;wf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:yf};var zf={};function If(a){this.g=!1;this.h=new mf;this.i=a}If.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 P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function Kf(){this.g=new Za}p=Kf.prototype;p.release=function(){this.ub();this.g=null};p.o=function(a,b,c,d){this.g&&(a=new Lf(a,b,c,d),this.g.push(b,a))};p.na=function(a,b,c,d){function e(g){f.fc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};p.fc=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.fc(),this.g.remove(b,e))}};
193
- p.ub=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,w(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.fc();this.g.g={}}};L("shaka.util.EventManager",Kf);Kf.prototype.removeAll=Kf.prototype.ub;Kf.prototype.unlisten=Kf.prototype.fc;Kf.prototype.listenOnce=Kf.prototype.na;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)}
194
- Lf.prototype.fc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function Mf(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return Nf(a)?b:b.capture||!1}
192
+ wf.registerScheme=xf;wf.prototype.setForceHTTPS=wf.prototype.mg;function Bf(){this.g=0}wf.NumBytesRemainingClass=Bf;function Cf(a,b,c){nf.call(this,a,b);this.h=c}pa(Cf,nf);wf.PendingRequest=Cf;var Gf=1;wf.RequestType={MANIFEST:0,SEGMENT:Gf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};wf.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var yf=3;wf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:yf};var zf={};function If(a){this.g=!1;this.h=new mf;this.i=a}If.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 P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function Kf(){this.g=new Za}p=Kf.prototype;p.release=function(){this.ub();this.g=null};p.o=function(a,b,c,d){this.g&&(a=new Lf(a,b,c,d),this.g.push(b,a))};p.na=function(a,b,c,d){function e(g){f.hc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};p.hc=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.hc(),this.g.remove(b,e))}};
193
+ p.ub=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,w(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.hc();this.g.g={}}};L("shaka.util.EventManager",Kf);Kf.prototype.removeAll=Kf.prototype.ub;Kf.prototype.unlisten=Kf.prototype.hc;Kf.prototype.listenOnce=Kf.prototype.na;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)}
194
+ Lf.prototype.hc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function Mf(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return Nf(a)?b:b.capture||!1}
195
195
  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(a){this.h=a;this.g=void 0}Pf.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Qf(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 Rf(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Sf(){}
196
196
  function Tf(a){if(!a)return"";a=lc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Qd())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Qa('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
197
197
  (a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
198
198
  function Uf(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new P(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=pc(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Vf.value()(d)}
199
199
  function Wf(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=lc(a);if(239==c[0]&&187==c[1]&&191==c[2])return Tf(c);if(254==c[0]&&255==c[1])return Uf(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Uf(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Uf(a,!1);if(0==c[1]&&0==c[3])return Uf(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Tf(a);throw new P(2,2,2003);}
200
200
  function Xf(a){if(window.TextEncoder&&!Qd()){var b=new TextEncoder;return mc(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return mc(b)}function Yf(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}L("shaka.util.StringUtils",Sf);Sf.resetFromCharCode=function(){Vf.g=void 0};Sf.toUTF16=Yf;Sf.toUTF8=Xf;Sf.fromBytesAutoDetect=Wf;Sf.fromUTF16=Uf;
201
- Sf.fromUTF8=Tf;var Vf=new Pf(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ub:65536};0<b.Ub;b={Ub:b.Ub},b.Ub/=2)if(a(b.Ub))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ub)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ub));return e}}(b);return null});function Zf(a,b){this.h=pc(a);this.i=b==$f;this.g=0}p=Zf.prototype;p.xa=function(){return this.g<this.h.byteLength};p.Ga=function(){return this.g};p.getLength=function(){return this.h.byteLength};p.ra=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw ag();}};p.Ua=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw ag();}};p.O=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw ag();}};
202
- p.ih=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw ag();}};p.Uc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw ag();}if(2097151<b)throw new P(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};p.Qb=function(a){if(this.g+a>this.h.byteLength)throw ag();var b=lc(this.h,this.g,a);this.g+=a;return b};
201
+ Sf.fromUTF8=Tf;var Vf=new Pf(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={Wb:65536};0<b.Wb;b={Wb:b.Wb},b.Wb/=2)if(a(b.Wb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Wb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Wb));return e}}(b);return null});function Zf(a,b){this.h=pc(a);this.i=b==$f;this.g=0}p=Zf.prototype;p.xa=function(){return this.g<this.h.byteLength};p.Ga=function(){return this.g};p.getLength=function(){return this.h.byteLength};p.ra=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw ag();}};p.Ua=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw ag();}};p.O=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw ag();}};
202
+ p.ih=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw ag();}};p.Uc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw ag();}if(2097151<b)throw new P(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};p.Sb=function(a){if(this.g+a>this.h.byteLength)throw ag();var b=lc(this.h,this.g,a);this.g+=a;return b};
203
203
  p.skip=function(a){if(this.g+a>this.h.byteLength)throw ag();this.g+=a};p.jj=function(a){if(this.g<a)throw ag();this.g-=a};p.seek=function(a){if(0>a||a>this.h.byteLength)throw ag();this.g=a};p.Hd=function(){for(var a=this.g;this.xa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=lc(this.h,a,this.g-a);this.g+=1;return Tf(a)};function ag(){return new P(2,3,3E3)}L("shaka.util.DataViewReader",Zf);Zf.prototype.readTerminatedString=Zf.prototype.Hd;Zf.prototype.seek=Zf.prototype.seek;Zf.prototype.rewind=Zf.prototype.jj;
204
- Zf.prototype.skip=Zf.prototype.skip;Zf.prototype.readBytes=Zf.prototype.Qb;Zf.prototype.readUint64=Zf.prototype.Uc;Zf.prototype.readInt32=Zf.prototype.ih;Zf.prototype.readUint32=Zf.prototype.O;Zf.prototype.readUint16=Zf.prototype.Ua;Zf.prototype.readUint8=Zf.prototype.ra;Zf.prototype.getLength=Zf.prototype.getLength;Zf.prototype.getPosition=Zf.prototype.Ga;Zf.prototype.hasMoreData=Zf.prototype.xa;var $f=1;Zf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:$f};function bg(){this.i=[];this.h=[];this.g=!1}p=bg.prototype;p.box=function(a,b){a=cg(a);this.i[a]=dg;this.h[a]=b;return this};p.T=function(a,b){a=cg(a);this.i[a]=eg;this.h[a]=b;return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new Zf(a,0);for(this.g=!1;a.xa()&&!this.g;)this.Ed(0,a,b,c)};
205
- p.Ed=function(a,b,c,d){var e=b.Ga();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.O(),g=b.O(),h=fg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Ga()+8>b.getLength()){this.g=!0;return}f=b.Uc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==eg){if(d&&b.Ga()+4>b.getLength()){this.g=!0;return}n=b.O();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.Ga(),b=0<d?b.Qb(d):new Uint8Array(0),b=new Zf(b,0),l({name:h,parser:this,
204
+ Zf.prototype.skip=Zf.prototype.skip;Zf.prototype.readBytes=Zf.prototype.Sb;Zf.prototype.readUint64=Zf.prototype.Uc;Zf.prototype.readInt32=Zf.prototype.ih;Zf.prototype.readUint32=Zf.prototype.O;Zf.prototype.readUint16=Zf.prototype.Ua;Zf.prototype.readUint8=Zf.prototype.ra;Zf.prototype.getLength=Zf.prototype.getLength;Zf.prototype.getPosition=Zf.prototype.Ga;Zf.prototype.hasMoreData=Zf.prototype.xa;var $f=1;Zf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:$f};function bg(){this.i=[];this.h=[];this.g=!1}p=bg.prototype;p.box=function(a,b){a=cg(a);this.i[a]=dg;this.h[a]=b;return this};p.T=function(a,b){a=cg(a);this.i[a]=eg;this.h[a]=b;return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new Zf(a,0);for(this.g=!1;a.xa()&&!this.g;)this.Ed(0,a,b,c)};
205
+ p.Ed=function(a,b,c,d){var e=b.Ga();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.O(),g=b.O(),h=fg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Ga()+8>b.getLength()){this.g=!0;return}f=b.Uc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==eg){if(d&&b.Ga()+4>b.getLength()){this.g=!0;return}n=b.O();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.Ga(),b=0<d?b.Sb(d):new Uint8Array(0),b=new Zf(b,0),l({name:h,parser:this,
206
206
  partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Ga(),b.getLength()-b.Ga()))}};function gg(a){for(var b=hg(a);a.reader.xa()&&!a.parser.g;)a.parser.Ed(a.start+b,a.reader,a.partialOkay)}function ig(a){for(var b=hg(a),c=a.reader.O(),d=0;d<c&&(a.parser.Ed(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function jg(a){var b=hg(a);for(a.reader.skip(78);a.reader.xa()&&!a.parser.g;)a.parser.Ed(a.start+b,a.reader,a.partialOkay)}
207
- function kg(a){return function(b){a(b.reader.Qb(b.reader.getLength()-b.reader.Ga()))}}function cg(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function fg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function hg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}L("shaka.util.Mp4Parser",bg);bg.headerSize=hg;bg.typeToString=fg;bg.allData=kg;bg.visualSampleEntry=jg;bg.sampleDescription=ig;bg.children=gg;bg.prototype.parseNext=bg.prototype.Ed;
208
- bg.prototype.parse=bg.prototype.parse;bg.prototype.stop=bg.prototype.stop;bg.prototype.fullBox=bg.prototype.T;bg.prototype.box=bg.prototype.box;var dg=0,eg=1;function ng(){}function og(a){a=lc(a);a=Vf.value()(a);return btoa(a)}function pg(a,b){b=void 0==b?!0:b;a=og(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function qg(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 rg(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}
209
- function sg(a){var b=lc(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 tg(){for(var a=Ga.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(lc(e),c);c+=e.byteLength}return b}L("shaka.util.Uint8ArrayUtils",ng);ng.concat=tg;ng.toHex=sg;ng.fromHex=rg;ng.fromBase64=qg;ng.toBase64=pg;ng.toStandardBase64=og;function ug(a){var b=this;this.g=[];this.h=[];this.data=[];(new bg).box("moov",gg).box("moof",gg).T("pssh",function(c){if(!(1<c.version)){var d=lc(c.reader.h,-12,c.size);b.data.push(d);b.g.push(sg(c.reader.Qb(16)));if(0<c.version){d=c.reader.O();for(var e=0;e<d;e++){var f=sg(c.reader.Qb(16));b.h.push(f)}}}}).parse(a)}
207
+ function kg(a){return function(b){a(b.reader.Sb(b.reader.getLength()-b.reader.Ga()))}}function cg(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function fg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function hg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}L("shaka.util.Mp4Parser",bg);bg.headerSize=hg;bg.typeToString=fg;bg.allData=kg;bg.visualSampleEntry=jg;bg.sampleDescription=ig;bg.children=gg;bg.prototype.parseNext=bg.prototype.Ed;
208
+ bg.prototype.parse=bg.prototype.parse;bg.prototype.stop=bg.prototype.stop;bg.prototype.fullBox=bg.prototype.T;bg.prototype.box=bg.prototype.box;var dg=0,eg=1;function lg(){}function og(a){a=lc(a);a=Vf.value()(a);return btoa(a)}function pg(a,b){b=void 0==b?!0:b;a=og(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function qg(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 rg(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}
209
+ function sg(a){var b=lc(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 tg(){for(var a=Ga.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];e instanceof Uint8Array?b.set(e,c):b.set(lc(e),c);c+=e.byteLength}return b}L("shaka.util.Uint8ArrayUtils",lg);lg.concat=tg;lg.toHex=sg;lg.fromHex=rg;lg.fromBase64=qg;lg.toBase64=pg;lg.toStandardBase64=og;function ug(a){var b=this;this.g=[];this.h=[];this.data=[];(new bg).box("moov",gg).box("moof",gg).T("pssh",function(c){if(!(1<c.version)){var d=lc(c.reader.h,-12,c.size);b.data.push(d);b.g.push(sg(c.reader.Sb(16)));if(0<c.version){d=c.reader.O();for(var e=0;e<d;e++){var f=sg(c.reader.Sb(16));b.h.push(f)}}}}).parse(a)}
210
210
  function vg(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=pc(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=rg(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function wg(a,b){a=xg(a,b);return 1!=a.length?null:a[0]}function yg(a,b,c){a=zg(a,b,c);return 1!=a.length?null:a[0]}function xg(a,b){var c=[];a=t(a.childNodes);for(var d=a.next();!d.done;d=a.next())d=d.value,d instanceof Element&&d.tagName==b&&c.push(d);return c}function Ag(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
211
211
  function zg(a,b,c){var d=[];a=t(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function Bg(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Cg(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function Dg(a){return Array.from(a.childNodes).every(Eg)?a.textContent.trim():null}
212
212
  function Eg(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Fg(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function Gg(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}
@@ -259,18 +259,18 @@ function ch(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseSer
259
259
  function uh(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={Va:g.Va},h=a.next()){g.Va=h.value;b.includes(g.Va.licenseServerUri)||b.push(g.Va.licenseServerUri);d.includes(g.Va.serverCertificateUri)||d.push(g.Va.serverCertificateUri);g.Va.serverCertificate&&(c.some(function(m){return function(n){return jc(n,m.Va.serverCertificate)}}(g))||c.push(g.Va.serverCertificate));if(g.Va.initData){h={};for(var k=t(g.Va.initData),l=k.next();!l.done;h={Sd:h.Sd},l=k.next())h.Sd=l.value,e.some(function(m){return function(n){var r=
260
260
  m.Sd;return n.keyId&&n.keyId==r.keyId?!0:n.initDataType==r.initDataType&&jc(n.initData,r.initData)}}(h))||e.push(h.Sd)}if(g.Va.keyIds)for(h=t(g.Va.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
261
261
  function eh(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
262
- c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var Ch=1,xh=5,zh=.5,Fh=new Pf(function(){return mc(new Uint8Array([0]))});function Gh(){}function Hh(a,b){if(b&&(b=Ih[b.toLowerCase()]))return b;throw new P(2,4,4E3,a);}L("shaka.media.ManifestParser",Gh);Gh.unregisterParserByMime=function(a){delete Ih[a]};Gh.registerParserByMime=function(a,b){Ih[a]=b};Gh.registerParserByExtension=function(){Me("ManifestParser","Please use an ManifestParser with registerParserByMime function.")};Gh.AccessibilityPurpose={tk:"visually impaired",Mj:"hard of hearing"};var Ih={};function Jh(a){function b(){d=!0}function c(l){f.push(l);gg(l)}a=lc(a);var d=!1,e,f=[],g=[];(new bg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).T("stsd",function(l){e=l;f.push(l);ig(l)}).T("encv",b).T("enca",b).T("dvav",function(l){g.push({box:l,cb:1701733238})}).T("dva1",function(l){g.push({box:l,cb:1701733238})}).T("dvh1",function(l){g.push({box:l,cb:1701733238})}).T("dvhe",function(l){g.push({box:l,cb:1701733238})}).T("hev1",function(l){g.push({box:l,cb:1701733238})}).T("hvc1",
262
+ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var Ch=1,xh=5,zh=.5,Fh=new Pf(function(){return mc(new Uint8Array([0]))});function Gh(){}function Hh(a,b){if(b){var c=Ih[b.toLowerCase()];if(c)return c}throw new P(2,4,4E3,a,b);}L("shaka.media.ManifestParser",Gh);Gh.unregisterParserByMime=function(a){delete Ih[a]};Gh.registerParserByMime=function(a,b){Ih[a]=b};Gh.registerParserByExtension=function(){Me("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Gh.AccessibilityPurpose={tk:"visually impaired",Mj:"hard of hearing"};var Ih={};function Jh(a){function b(){d=!0}function c(l){f.push(l);gg(l)}a=lc(a);var d=!1,e,f=[],g=[];(new bg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).T("stsd",function(l){e=l;f.push(l);ig(l)}).T("encv",b).T("enca",b).T("dvav",function(l){g.push({box:l,cb:1701733238})}).T("dva1",function(l){g.push({box:l,cb:1701733238})}).T("dvh1",function(l){g.push({box:l,cb:1701733238})}).T("dvhe",function(l){g.push({box:l,cb:1701733238})}).T("hev1",function(l){g.push({box:l,cb:1701733238})}).T("hvc1",
263
263
  function(l){g.push({box:l,cb:1701733238})}).T("avc1",function(l){g.push({box:l,cb:1701733238})}).T("avc3",function(l){g.push({box:l,cb:1701733238})}).T("ac-3",function(l){g.push({box:l,cb:1701733217})}).T("ec-3",function(l){g.push({box:l,cb:1701733217})}).T("ac-4",function(l){g.push({box:l,cb:1701733217})}).T("mp4a",function(l){g.push({box:l,cb:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw Ya(sg(a)),new P(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,
264
264
  a=Kh(a,e,k.box,f,k.cb);return a}
265
265
  function Kh(a,b,c,d,e){var f=Lh.value(),g=a.subarray(c.start,c.start+c.size),h=pc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=pc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Mh(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Id()?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,Mh(e,d.start,d.size+k.byteLength);k=pc(e,b.start);b=hg(b);a=k.getUint32(b);
266
- k.setUint32(b,a+1);return e}function Mh(a,b,c){a=pc(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 Lh=new Pf(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 Nh(a,b,c,d,e,f,g){this.ba=a;this.hb=b;this.Na=c;this.Uf=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aes128Key=void 0===g?null:g;this.mimeType=this.codecs=null}Nh.prototype.$b=function(){return this.hb};Nh.prototype.Xb=function(){return this.Na};function Oh(a,b){return a&&b?a.$b()==b.$b()&&a.Xb()==b.Xb()&&xc(a.ba().sort(),b.ba().sort())&&jc(a.g,b.g):a==b}L("shaka.media.InitSegmentReference",Nh);Nh.prototype.getEndByte=Nh.prototype.Xb;
267
- Nh.prototype.getStartByte=Nh.prototype.$b;
266
+ k.setUint32(b,a+1);return e}function Mh(a,b,c){a=pc(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 Lh=new Pf(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 Nh(a,b,c,d,e,f,g){this.ba=a;this.hb=b;this.Na=c;this.Uf=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aes128Key=void 0===g?null:g;this.mimeType=this.codecs=null}Nh.prototype.Pb=function(){return this.hb};Nh.prototype.Mb=function(){return this.Na};function Oh(a,b){return a===b?!0:a&&b?a.Pb()==b.Pb()&&a.Mb()==b.Mb()&&xc(a.ba().sort(),b.ba().sort())&&jc(a.g,b.g):a==b}L("shaka.media.InitSegmentReference",Nh);Nh.prototype.getEndByte=Nh.prototype.Mb;
267
+ Nh.prototype.getStartByte=Nh.prototype.Pb;
268
268
  function Ph(a,b,c,d,e,f,g,h,k,l,m,n,r,q,u,v){l=void 0===l?[]:l;q=void 0===q?Qh:q;this.startTime=a;this.h=this.endTime=b;this.D=c;this.hb=d;this.Na=e;this.ka=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.C=void 0===n?null:n;this.oa=void 0===r?null:r;this.status=q;this.l=!1;this.j=!0;this.m=!1;this.aes128Key=void 0===u?null:u;this.u=null;this.i=0;this.s=void 0===v?!1:v;this.ue=this.Fd=!1;a=t(this.g);for(b=a.next();!b.done;b=a.next())b.value.eh();
269
- this.s&&this.g.length&&this.g[this.g.length-1].dh();this.mimeType=this.codecs=null}p=Ph.prototype;p.ba=function(){return this.D()};p.getStartTime=function(){return this.startTime};p.di=function(){return this.endTime};p.$b=function(){return this.hb};p.Xb=function(){return this.Na};p.Bi=function(){return this.tilesLayout};p.Ai=function(){return this.C};p.sc=function(){return this.status};p.Ti=function(){this.status=Rh};p.Tf=function(){this.l=!0};p.Ni=function(){return this.l};
269
+ this.s&&this.g.length&&this.g[this.g.length-1].dh();this.mimeType=this.codecs=null}p=Ph.prototype;p.ba=function(){return this.D()};p.getStartTime=function(){return this.startTime};p.di=function(){return this.endTime};p.Pb=function(){return this.hb};p.Mb=function(){return this.Na};p.Bi=function(){return this.tilesLayout};p.Ai=function(){return this.C};p.sc=function(){return this.status};p.Ti=function(){this.status=Rh};p.Tf=function(){this.l=!0};p.Ni=function(){return this.l};
270
270
  p.xe=function(){this.j=!1};p.Ki=function(){return this.j};p.eh=function(){this.Fd=!0};p.Mi=function(){return this.Fd};p.dh=function(){this.ue=!0};p.Li=function(){return this.ue};p.bh=function(){this.m=!0};p.Hi=function(){return this.m};p.rh=function(a){this.u=a};p.zi=function(){return this.u};p.offset=function(a){this.startTime+=a;this.endTime+=a;this.h+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.h+=a};
271
271
  p.sg=function(a){null==this.oa?Qa("Sync attempted without sync time!"):(a=this.oa-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};L("shaka.media.SegmentReference",Ph);Ph.prototype.syncAgainst=Ph.prototype.sg;Ph.prototype.offset=Ph.prototype.offset;Ph.prototype.getThumbnailSprite=Ph.prototype.zi;Ph.prototype.setThumbnailSprite=Ph.prototype.rh;Ph.prototype.hasByterangeOptimization=Ph.prototype.Hi;Ph.prototype.markAsByterangeOptimization=Ph.prototype.bh;Ph.prototype.isLastPartial=Ph.prototype.Li;
272
272
  Ph.prototype.markAsLastPartial=Ph.prototype.dh;Ph.prototype.isPartial=Ph.prototype.Mi;Ph.prototype.markAsPartial=Ph.prototype.eh;Ph.prototype.isIndependent=Ph.prototype.Ki;Ph.prototype.markAsNonIndependent=Ph.prototype.xe;Ph.prototype.isPreload=Ph.prototype.Ni;Ph.prototype.markAsPreload=Ph.prototype.Tf;Ph.prototype.markAsUnavailable=Ph.prototype.Ti;Ph.prototype.getStatus=Ph.prototype.sc;Ph.prototype.getTileDuration=Ph.prototype.Ai;Ph.prototype.getTilesLayout=Ph.prototype.Bi;
273
- Ph.prototype.getEndByte=Ph.prototype.Xb;Ph.prototype.getStartByte=Ph.prototype.$b;Ph.prototype.getEndTime=Ph.prototype.di;Ph.prototype.getStartTime=Ph.prototype.getStartTime;Ph.prototype.getUris=Ph.prototype.ba;var Qh=0,Rh=1;Ph.Status={zj:Qh,qk:Rh,Sj:2};function Sh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Th(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Uh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Vh(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
273
+ Ph.prototype.getEndByte=Ph.prototype.Mb;Ph.prototype.getStartByte=Ph.prototype.Pb;Ph.prototype.getEndTime=Ph.prototype.di;Ph.prototype.getStartTime=Ph.prototype.getStartTime;Ph.prototype.getUris=Ph.prototype.ba;var Qh=0,Rh=1;Ph.Status={zj:Qh,qk:Rh,Sj:2};function Sh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Th(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Uh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(Vh(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
274
274
  function Wh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Vh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Vh(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};/*
275
275
  @license
276
276
  Shaka Player
@@ -285,7 +285,7 @@ function bi(a){for(var b=0,c=[];Yh(a,b);){var d=$h(a,b+6);a[b+5]>>6&1&&(b+=10);b
285
285
  Xh.getID3Frames=bi;function di(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Uc());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,Og:c,Qh:d,wk:e}}function ei(a,b){return 1==b?(b=a.O(),a=a.O(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.O()}}function fi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.O();a.skip(4);a=a.Ua();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
286
286
  function gi(a,b,c){var d=a.O(),e=[],f=null;c&1&&(f=a.O());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={gg:null,sampleSize:null,Ke:null};c&256&&(h.gg=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.Ke=0==b?a.O():a.ih());e.push(h)}return{Ak:d,lh:e,Ph:f}}
287
287
  function hi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.O();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.Ua()+a.Ua()/16;a=a.Ua()+a.Ua()/16;return{trackId:c,width:b,height:a}}
288
- function ji(a){for(var b="mp4a",c,d;a.xa();){c=a.ra();for(var e=a.ra();e&128;)e=a.ra();if(3==c)a.Ua(),e=a.ra(),e&128&&a.Ua(),e&64&&a.skip(a.ra()),e&32&&a.Ua();else if(4==c)d=a.ra(),a.skip(12);else if(5==c)break}d&&(b+="."+this.g(d),5==c&&a.xa()&&(c=a.ra(),d=(c&248)>>3,31===d&&a.xa()&&(d=32+((c&7)<<3)+((a.ra()&224)>>5)),b+="."+d));return{wa:b}}function ki(a,b){a.skip(87);return{wa:b+"."+this.g(a.ra())+this.g(a.ra())+this.g(a.ra())}}function li(a){a=a.O();return{wa:fg(a)}};/*
288
+ function ii(a){for(var b="mp4a",c,d;a.xa();){c=a.ra();for(var e=a.ra();e&128;)e=a.ra();if(3==c)a.Ua(),e=a.ra(),e&128&&a.Ua(),e&64&&a.skip(a.ra()),e&32&&a.Ua();else if(4==c)d=a.ra(),a.skip(12);else if(5==c)break}d&&(b+="."+this.g(d),5==c&&a.xa()&&(c=a.ra(),d=(c&248)>>3,31===d&&a.xa()&&(d=32+((c&7)<<3)+((a.ra()&224)>>5)),b+="."+d));return{wa:b}}function ki(a,b){a.skip(87);return{wa:b+"."+this.g(a.ra())+this.g(a.ra())+this.g(a.ra())}}function li(a){a=a.O();return{wa:fg(a)}};/*
289
289
 
290
290
  Copyright Brightcove, Inc.
291
291
 
@@ -309,19 +309,19 @@ k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(-
309
309
  "hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.H=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.u=f.audio,this.s=f.audioCodec);-1!=f.pe&&(this.C=f.pe);d&&!this.G&&(d=!1,e=b-188);this.G=!0;break;case this.H:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.u:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&
310
310
  this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);break;case this.C:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
311
311
  function yi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),packetLength:a[4]<<8|a[5],pts:null,dts:null,nalus:[]};if(b.packetLength&&b.packetLength>a.byteLength-6)return null;var c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));c=a[8]+9;if(a.byteLength<=c)return null;b.data=a.subarray(c);return b}
312
- p.Zi=function(a){Me("TsParser","Please use parseNalus function instead.");return this.ag(a)};
312
+ p.Zi=function(a){Me("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.ag(a)};
313
313
  p.ag=function(a,b,c){var d=a.pts?a.pts/9E4:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.m&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var r=a[n];if(r){if(2<=g&&1==r){b&&!h.length&&-1==k&&(r=n-(3<g?3:g),c&&0!=r&&(r=a.subarray(0,r),b.data=tg(b.data,r),b.fullData=tg(b.fullData,r)));0<=k?(g=n-((3<g?3:g)+1),h.push({data:a.subarray(k+f,g+1),fullData:a.subarray(k,g+1),type:l,time:d})):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=tg(b.data,k),b.fullData=tg(b.fullData,k)));if(n>=e-f)return h;
314
- n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=tg(b.data,a),b.fullData=tg(b.fullData,a));return h};p.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=tg.apply(ng,w(c.value)),(c=yi(c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:bi(c.data),dts:c.dts,pts:c.pts});return a};
315
- p.pc=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=tg.apply(ng,w(c.value)),e=yi(d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=tg(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
316
- p.Oc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=tg.apply(ng,w(d.value)),f=yi(e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=tg(d.data,e),this.g.push(d))}if(a){var g;c=t(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.ag(d,g,void 0),
317
- d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(function(h){return h.nalus.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if("audio"==a){a=null;var b=this.pc();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Oc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.sd=function(){return{audio:this.s,video:this.m}};
318
- p.le=function(){for(var a=[],b=t(this.Oc()),c=b.next();!c.done;c=b.next())a.push.apply(a,w(c.value.nalus));return a};p.Ei=function(){Me("TsParser","Please use getVideoInfo function instead.");var a=this.Lf();return{height:a.height,width:a.width}};p.Lf=function(){return"hvc"==this.m?zi(this):Ai(this)};
314
+ n++;k=n;l="hvc"==this.m?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=tg(b.data,a),b.fullData=tg(b.fullData,a));return h};p.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=tg.apply(lg,w(c.value)),(c=yi(c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:bi(c.data),dts:c.dts,pts:c.pts});return a};
315
+ p.qc=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=tg.apply(lg,w(c.value)),e=yi(d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=tg(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
316
+ p.Oc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=tg.apply(lg,w(d.value)),f=yi(e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=tg(d.data,e),this.g.push(d))}if(a){var g;c=t(this.g);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.ag(d,g,void 0),
317
+ d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.g=this.g.filter(function(h){return h.nalus.length})}b&&(this.g=this.g.sort(function(h,k){var l=(h.pts||0)-(k.pts||0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if("audio"==a){a=null;var b=this.qc();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Oc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.sd=function(){return{audio:this.s,video:this.m}};
318
+ p.le=function(){for(var a=[],b=t(this.Oc()),c=b.next();!c.done;c=b.next())a.push.apply(a,w(c.value.nalus));return a};p.Ei=function(){Me("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Lf();return{height:a.height,width:a.width}};p.Lf=function(){return"hvc"==this.m?zi(this):Ai(this)};
319
319
  function Ai(a){var b={height:null,width:null,wa:null};a=a.le();if(!a.length)return b;a=a.find(function(r){return 7==r.type});if(!a)return b;a=new mi(a.data);var c=ti(a),d=ti(a),e=ti(a);ri(a);if(Bi.includes(c)){var f=R(a);3===f&&oi(a,1);ri(a);ri(a);oi(a,1);if(S(a)){f=3!==f?8:12;for(var g=0;g<f;g++)S(a)&&(6>g?ui(a,16):ui(a,64))}}ri(a);f=R(a);if(0===f)R(a);else if(1===f)for(oi(a,1),ri(a),ri(a),f=R(a),g=0;g<f;g++)ri(a);ri(a);oi(a,1);f=R(a);g=R(a);var h=pi(a,1);0===h&&oi(a,1);oi(a,1);var k=0,l=0,m=0,n=
320
320
  0;S(a)&&(k=R(a),l=R(a),m=R(a),n=R(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.wa="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
321
321
  function zi(a){var b={height:null,width:null,wa:null};a=a.le();if(!a.length)return b;a=a.find(function(A){return 33==A.type});if(!a)return b;var c=new mi(a.fullData,!0);ti(c);ti(c);pi(c,4);var d=pi(c,3);S(c);var e=pi(c,2),f=pi(c,1),g=pi(c,5),h=pi(c,32);a=ti(c);for(var k=ti(c),l=ti(c),m=ti(c),n=ti(c),r=ti(c),q=ti(c),u=[],v=[],x=0;x<d;x++)u.push(S(c)),v.push(S(c));if(0<d)for(x=d;8>x;x++)pi(c,2);for(x=0;x<d;x++)u[x]&&pi(c,88),v[x]&&ti(c);R(c);d=R(c);3==d&&pi(c,1);u=R(c);v=R(c);var z=x=0,y=0,B=0;S(c)&&
322
322
  (x+=R(c),z+=R(c),y+=R(c),B+=R(c));b.width=String(u-(x+z)*(1===d||2===d?2:1));b.height=String(v-(y+B)*(1===d?2:1));c=function(A){for(var C=0,E=0;32>E;E++)C|=(A>>E&1)<<31-E;return C>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+q;r&&(e+="."+r.toString(16).toUpperCase());n&&(e+="."+n.toString(16).toUpperCase());m&&(e+="."+m.toString(16).toUpperCase());l&&(e+="."+l.toString(16).toUpperCase());k&&(e+="."+k.toString(16).toUpperCase());a&&(e+="."+
323
323
  a.toString(16).toUpperCase());b.wa=e;return b}function Ci(a){return 0>xi(a)?!1:!0}function xi(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}L("shaka.util.TsParser",wi);wi.syncOffset=xi;wi.probe=Ci;wi.prototype.getVideoInfo=wi.prototype.Lf;wi.prototype.getVideoResolution=wi.prototype.Ei;wi.prototype.getVideoNalus=wi.prototype.le;wi.prototype.getCodecs=wi.prototype.sd;wi.prototype.getStartTime=wi.prototype.getStartTime;
324
- wi.prototype.getVideoData=wi.prototype.Oc;wi.prototype.getAudioData=wi.prototype.pc;wi.prototype.getMetadata=wi.prototype.getMetadata;wi.prototype.parseNalus=wi.prototype.ag;wi.prototype.parseAvcNalus=wi.prototype.Zi;wi.prototype.parse=wi.prototype.parse;wi.prototype.clearData=wi.prototype.clearData;wi.Timescale=9E4;var Bi=[100,110,122,244,44,83,86,118,128,138,139,134];function Di(a,b,c){this.g=null;this.s=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Ra("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,Me("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Ra("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Ra("Could not find LCEVC Library on this page"),
324
+ wi.prototype.getVideoData=wi.prototype.Oc;wi.prototype.getAudioData=wi.prototype.qc;wi.prototype.getMetadata=wi.prototype.getMetadata;wi.prototype.parseNalus=wi.prototype.ag;wi.prototype.parseAvcNalus=wi.prototype.Zi;wi.prototype.parse=wi.prototype.parse;wi.prototype.clearData=wi.prototype.clearData;wi.Timescale=9E4;var Bi=[100,110,122,244,44,83,86,118,128,138,139,134];function Di(a,b,c){this.g=null;this.s=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Ra("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,Me("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Ra("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Ra("Could not find LCEVC Library on this page"),
325
325
  a=!1):(this.h.SupportObject.SupportStatus||Ra(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function Ei(a){a.g&&a.i.classList.add("shaka-hidden")}
326
326
  Di.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Fi(a,b,c){var d=Gi,e=Hi;switch(b.mimeType){case "video/webm":d=Ii;break;case "video/mp4":d=Ji}switch(c){case "DASH":e=Ki;break;case "HLS":e=Li}a.g&&(a.s=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}L("shaka.lcevc.Dec",Di);Di.prototype.release=Di.prototype.release;var Gi=0,Ii=1,Ji=2,Li=0,Ki=1,Hi=-1;function Mi(a,b,c,d){var e=this;this.i=a;this.G=null;this.H=b;this.g={};this.I={};this.ha={};this.h=null;this.Z=!1;this.ua=c||function(){};this.N=d||null;this.j={};this.u=new Kf;this.m={};this.J=null;this.L=new mf;this.M="";this.$=!1;this.l=Ni(this,this.L);this.D=!1;this.K=new If(function(){return Oi(e)});this.C=!1;this.W="UNKNOWN";this.Aa=this.sa=!1;this.va=new mf;this.s=!1;this.aa=!0;this.V=null}
327
327
  function Ni(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.u.o(c,"startstreaming",function(){a.aa=!0});a.u.o(c,"endstreaming",function(){a.aa=!1});a.u.na(c,"sourceopen",function(){URL.revokeObjectURL(a.M);b.resolve()});a.u.na(a.i,"playing",function(){a.$=!0});a.M=Pi(c);a.i.src=a.M;return c}c=new MediaSource;a.u.na(c,"sourceopen",function(){URL.revokeObjectURL(a.M);b.resolve()});a.u.na(a.i,"playing",function(){a.$=!0});a.M=Pi(c);a.i.src=a.M;return c}
@@ -355,73 +355,73 @@ function jj(a,b,c,d,e){var f,g,h,k,l,m,n,r,q,u,v,x,z,y,B;return K(function(A){if
355
355
  function rj(a,b,c){if(b==Gb)var d=!1;else{d=ld(nd(a.I[b]));var e=md(a.I[b]),f=dd(c.mimeType,c.codecs),g=a.G.forceTransmux;if(!ac(f)||!a.C&&ed.includes(f)||c.codecs.includes(","))g=!0;c=fd(c.mimeType,c.codecs);g&&(g=Yc(c))&&(g=g(),f=g.convertCodecs(b,c),g.destroy());b=ld(nd(f));f=md(f);d=d!==b||e!==f}return d?"smooth"!==a.G.codecSwitchingStrategy||!fc()||a.s:!1}var Pi=window.URL.createObjectURL,Si="sequence";function sj(a,b,c){this.i=a;this.s=b;this.C=this.j=Infinity;this.g=1;this.h=this.l=null;this.u=0;this.G=!0;this.H=0;this.D=void 0===c?!0:c;this.I=0;this.m=!1}p=sj.prototype;p.getDuration=function(){return this.j};p.mi=function(){return this.g};p.og=function(a){this.i=a};p.gb=function(a){this.j=a};p.pi=function(){return this.i};p.nh=function(a){this.u=a};p.Vc=function(a){this.G=a};p.Ne=function(a){this.C=a};p.oh=function(a){this.s=a};p.ci=function(){return this.s};
356
356
  p.hh=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Ce(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.D&&!this.m&&(this.i=(Date.now()+this.u)/1E3-this.h-this.g)}};
357
357
  p.Dd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.u)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.Ce(b);this.h=Math.max(this.h,c);null!=this.i&&this.D&&!this.m&&(this.i=d-this.h-this.g)}};p.ve=function(){this.m=!0};p.Pi=function(){return this.m};p.Ce=function(a){this.l=null==this.l?a:Math.min(this.l,a)};
358
- p.Wf=function(a){this.g=Math.max(this.g,a)};p.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};p.R=function(){return Infinity==this.j&&!this.G};p.wc=function(){return Infinity!=this.j&&!this.G};p.Ab=function(){return Math.max(this.H,this.Zb()-this.C)};p.sh=function(a){this.H=a};p.Zb=function(){return this.R()||this.wc()?Math.min(Math.max(0,(Date.now()+this.u)/1E3-this.g-this.i)+this.I,this.j):this.h?Math.min(this.h,this.j):this.j};
359
- p.ud=function(a){var b=Math.max(this.l,this.H);return Infinity==this.C?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Zb()-this.C+a,this.Nb()))};p.Nc=function(){return this.ud(0)};p.Nb=function(){return Math.max(0,this.Zb()-(this.R()||this.wc()?this.s:0))};p.yh=function(){return null==this.i||null!=this.h&&this.D?!1:!0};p.mh=function(a){this.I=a};L("shaka.media.PresentationTimeline",sj);sj.prototype.setAvailabilityTimeOffset=sj.prototype.mh;sj.prototype.usingPresentationStartTime=sj.prototype.yh;
360
- sj.prototype.getSeekRangeEnd=sj.prototype.Nb;sj.prototype.getSeekRangeStart=sj.prototype.Nc;sj.prototype.getSafeSeekRangeStart=sj.prototype.ud;sj.prototype.getSegmentAvailabilityEnd=sj.prototype.Zb;sj.prototype.setUserSeekStart=sj.prototype.sh;sj.prototype.getSegmentAvailabilityStart=sj.prototype.Ab;sj.prototype.isInProgress=sj.prototype.wc;sj.prototype.isLive=sj.prototype.R;sj.prototype.offset=sj.prototype.offset;sj.prototype.notifyMaxSegmentDuration=sj.prototype.Wf;
358
+ p.Wf=function(a){this.g=Math.max(this.g,a)};p.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};p.R=function(){return Infinity==this.j&&!this.G};p.wc=function(){return Infinity!=this.j&&!this.G};p.Ab=function(){return Math.max(this.H,this.ac()-this.C)};p.sh=function(a){this.H=a};p.ac=function(){return this.R()||this.wc()?Math.min(Math.max(0,(Date.now()+this.u)/1E3-this.g-this.i)+this.I,this.j):this.h?Math.min(this.h,this.j):this.j};
359
+ p.ud=function(a){var b=Math.max(this.l,this.H);return Infinity==this.C?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.ac()-this.C+a,this.Ob()))};p.Nc=function(){return this.ud(0)};p.Ob=function(){return Math.max(0,this.ac()-(this.R()||this.wc()?this.s:0))};p.yh=function(){return null==this.i||null!=this.h&&this.D?!1:!0};p.mh=function(a){this.I=a};L("shaka.media.PresentationTimeline",sj);sj.prototype.setAvailabilityTimeOffset=sj.prototype.mh;sj.prototype.usingPresentationStartTime=sj.prototype.yh;
360
+ sj.prototype.getSeekRangeEnd=sj.prototype.Ob;sj.prototype.getSeekRangeStart=sj.prototype.Nc;sj.prototype.getSafeSeekRangeStart=sj.prototype.ud;sj.prototype.getSegmentAvailabilityEnd=sj.prototype.ac;sj.prototype.setUserSeekStart=sj.prototype.sh;sj.prototype.getSegmentAvailabilityStart=sj.prototype.Ab;sj.prototype.isInProgress=sj.prototype.wc;sj.prototype.isLive=sj.prototype.R;sj.prototype.offset=sj.prototype.offset;sj.prototype.notifyMaxSegmentDuration=sj.prototype.Wf;
361
361
  sj.prototype.notifyMinSegmentStartTime=sj.prototype.Ce;sj.prototype.isStartTimeLocked=sj.prototype.Pi;sj.prototype.lockStartTime=sj.prototype.ve;sj.prototype.notifySegments=sj.prototype.Dd;sj.prototype.notifyTimeRange=sj.prototype.hh;sj.prototype.getDelay=sj.prototype.ci;sj.prototype.setDelay=sj.prototype.oh;sj.prototype.setSegmentAvailabilityDuration=sj.prototype.Ne;sj.prototype.setStatic=sj.prototype.Vc;sj.prototype.setClockOffset=sj.prototype.nh;sj.prototype.getPresentationStartTime=sj.prototype.pi;
362
362
  sj.prototype.setDuration=sj.prototype.gb;sj.prototype.setPresentationStartTime=sj.prototype.og;sj.prototype.getMaxSegmentDuration=sj.prototype.mi;sj.prototype.getDuration=sj.prototype.getDuration;function tj(a,b,c){this.j=c;this.l=a;this.u=uj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.s=0;this.C=b;this.i=function(){}}tj.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function vj(a,b){a.i=b}function wj(a){this.g=a}function uj(a){if(a.g.paused||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Vh(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function xj(a,b,c,d,e){var f=this;this.C=e;this.g=a;this.D=b;this.u=c;this.l=new Kf;this.j=!1;this.H=a.readyState;this.G=this.i=0;this.h=d;this.s=!1;this.l.o(a,"waiting",function(){return yj(f)});this.m=(new Dd(function(){yj(f)})).za(this.u.gapJumpTimerTime)}xj.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.D=this.C=null};xj.prototype.Zf=function(){this.s=!0;yj(this)};
363
363
  function yj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.H&&(a.H=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=uj(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.u!=d)b.m=f,b.g=e,b.u=d,b.h=!1;e=f-b.m;if(d=e>=b.C&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.s++,b.j(new O("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Wh(c,b,a.u.gapDetectionThreshold),null==
364
- d||0==d&&!a.s||(e=c.start(d),e>=a.D.Nb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.G++,a.C(new O("gapjumped")))))}}};function zj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Aj.value().get(b),c.na(a,b,d))}var Aj=new Pf(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Bj(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.s=!1;this.h=new Kf;this.i=new Cj(a);zj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Dj(e,e.j())})}Bj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Ej(a){return a.s?a.g.currentTime:a.j()}
364
+ d||0==d&&!a.s||(e=c.start(d),e>=a.D.Ob()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.G++,a.C(new O("gapjumped")))))}}};function zj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Aj.value().get(b),c.na(a,b,d))}var Aj=new Pf(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Bj(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.s=!1;this.h=new Kf;this.i=new Cj(a);zj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Dj(e,e.j())})}Bj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Ej(a){return a.s?a.g.currentTime:a.j()}
365
365
  function Fj(a,b){0<a.g.readyState?Gj(a.i,b):zj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Dj(a,a.j())})}function Dj(a,b){.001>Math.abs(a.g.currentTime-b)?Hj(a):(a.h.na(a.g,"seeking",function(){Hj(a)}),Gj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Hj(a){a.s=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)}
366
366
  function Cj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Dd(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Cj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function Gj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.za(.1)};function Ij(a){this.g=a;this.j=!1;this.h=null;this.i=new Kf}p=Ij.prototype;p.df=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.na(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;zj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};p.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};p.ef=function(a){this.h=this.j?this.h:a};p.Yd=function(){return(this.j?this.g.currentTime:this.h)||0};p.Cg=function(){return 0};
367
367
  p.Bg=function(){return 0};p.gh=function(){};
368
368
  function Jj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.D=b.minBufferTime||0;this.l=c;this.C=e;this.u=null;this.s=Kj(a,c,f);this.j=new xj(a,b.presentationTimeline,c,this.s,f);this.h=new Bj(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=Ej(g.h);h=Lj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.u||g.u<k-1)){g.u=k;Fj(g.h,h);h=void 0;break a}g.C();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
369
- g.g.Nc():g.g.Nb():0>h&&(h=g.g.Nb()+h);return Mj(g,Nj(g,h))});this.m=new Dd(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ej(g.h),k=g.g.Nc(),l=g.g.Nb();3>l-k&&(k=l-3);h<k&&(h=Lj(g,h),g.i.currentTime=h)}})}p=Jj.prototype;p.df=function(){this.m.za(.25)};p.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.C=function(){}};p.ef=function(a){Fj(this.h,a)};
369
+ g.g.Nc():g.g.Ob():0>h&&(h=g.g.Ob()+h);return Mj(g,Nj(g,h))});this.m=new Dd(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ej(g.h),k=g.g.Nc(),l=g.g.Ob();3>l-k&&(k=l-3);h<k&&(h=Lj(g,h),g.i.currentTime=h)}})}p=Jj.prototype;p.df=function(){this.m.za(.25)};p.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.C=function(){}};p.ef=function(a){Fj(this.h,a)};
370
370
  p.Yd=function(){var a=Ej(this.h);return 0<this.i.readyState&&!this.i.paused?Nj(this,a):a};p.Cg=function(){return this.s?this.s.s:0};p.Bg=function(){return this.j.G};p.gh=function(){this.j.Zf()};function Mj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
371
- function Lj(a,b){var c=Math.max(a.D,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Nc(),f=a.g.Nb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.ud(c),k=a.g.ud(d);c=a.g.ud(c+d);return b>=g?Mj(a,b):b>f?f:b<e?Th(a.i.buffered,k)?k:c:b>=h||Th(a.i.buffered,b)?b:c}function Nj(a,b){var c=a.g.Nc();if(b<c)return c;a=a.g.Nb();return b>a?a:b}
372
- function Kj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new tj(new wj(a),b.stallThreshold,c);vj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Oj(a){this.g=a;this.l=null;this.j=0;this.s=!1}p=Oj.prototype;p.rc=function(){return this.g.length};p.release=function(){this.s||(this.g=[],this.l&&this.l.stop(),this.l=null)};p.Ui=function(){this.s=!0};function Pj(a,b){a=t(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}p.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.j}return this.g.length&&a<this.g[0].startTime?this.j:null};
371
+ function Lj(a,b){var c=Math.max(a.D,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Nc(),f=a.g.Ob(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.ud(c),k=a.g.ud(d);c=a.g.ud(c+d);return b>=g?Mj(a,b):b>f?f:b<e?Th(a.i.buffered,k)?k:c:b>=h||Th(a.i.buffered,b)?b:c}function Nj(a,b){var c=a.g.Nc();if(b<c)return c;a=a.g.Ob();return b>a?a:b}
372
+ function Kj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new tj(new wj(a),b.stallThreshold,c);vj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Oj(a){this.g=a;this.m=null;this.j=0;this.s=!1}p=Oj.prototype;p.$b=function(){return this.g.length};p.release=function(){this.s||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.Ui=function(){this.s=!0};function Pj(a,b){a=t(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}p.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.j}return this.g.length&&a<this.g[0].startTime?this.j:null};
373
373
  p.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};p.offset=function(a){if(!this.s)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};p.ze=function(a){if(!this.s&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,w(a))}};
374
374
  p.Cd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.ze(a);this.yb(b)};p.yb=function(a){if(!this.s){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
375
375
  p.Ic=function(a,b,c){c=void 0===c?!1:c;if(!this.s){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.j++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new Ph(a.startTime,b,a.D,a.hb,a.Na,a.ka,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.C,a.oa,a.status,a.aes128Key),this.g[this.g.length-1].i=a.i)}};
376
- p.Qe=function(a,b){var c=this;this.s||(this.l&&this.l.stop(),this.l=new Dd(function(){var d=b();d?c.g.push.apply(c.g,w(d)):(c.l.stop(),c.l=null)}),this.l.za(a))};Oj.prototype[Symbol.iterator]=function(){return this.qc(0)};
377
- Oj.prototype.qc=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){for(;e&&!f.j;)e--,f=c.g[e];if(!f.j)return Qa("No independent partial segment found!"),null;b++;d=e-1;break}}return new Qj(this,b,d)};function Rj(a,b,c){a=new Ph(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Oj([a])}L("shaka.media.SegmentIndex",Oj);Oj.forSingleSegment=Rj;
378
- Oj.prototype.getIteratorForTime=Oj.prototype.qc;Oj.prototype.updateEvery=Oj.prototype.Qe;Oj.prototype.fit=Oj.prototype.Ic;Oj.prototype.evict=Oj.prototype.yb;Oj.prototype.mergeAndEvict=Oj.prototype.Cd;Oj.prototype.offset=Oj.prototype.offset;Oj.prototype.get=Oj.prototype.get;Oj.prototype.find=Oj.prototype.find;Oj.prototype.markImmutable=Oj.prototype.Ui;Oj.prototype.release=Oj.prototype.release;function Qj(a,b,c){this.i=a;this.g=b;this.h=c}Qj.prototype.Oh=function(){return this.g};
376
+ p.Qe=function(a,b){var c=this;this.s||(this.m&&this.m.stop(),this.m=new Dd(function(){var d=b();d?c.g.push.apply(c.g,w(d)):(c.m.stop(),c.m=null)}),this.m.za(a))};Oj.prototype[Symbol.iterator]=function(){return this.rc(0)};
377
+ Oj.prototype.rc=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){for(;e&&!f.j;)e--,f=c.g[e];if(!f.j)return Qa("No independent partial segment found!"),null;b++;d=e-1;break}}return new Qj(this,b,d)};function Rj(a,b,c){a=new Ph(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Oj([a])}L("shaka.media.SegmentIndex",Oj);Oj.forSingleSegment=Rj;
378
+ Oj.prototype.getIteratorForTime=Oj.prototype.rc;Oj.prototype.updateEvery=Oj.prototype.Qe;Oj.prototype.fit=Oj.prototype.Ic;Oj.prototype.evict=Oj.prototype.yb;Oj.prototype.mergeAndEvict=Oj.prototype.Cd;Oj.prototype.offset=Oj.prototype.offset;Oj.prototype.get=Oj.prototype.get;Oj.prototype.find=Oj.prototype.find;Oj.prototype.markImmutable=Oj.prototype.Ui;Oj.prototype.release=Oj.prototype.release;function Qj(a,b,c){this.i=a;this.g=b;this.h=c}Qj.prototype.Oh=function(){return this.g};
379
379
  Qj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.g.length&&a.s&&this.h>=a.g.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.g.length?a.g[this.h]:a};Qj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.g.length?(this.h++,a.s&&this.h==a.g.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};L("shaka.media.SegmentIterator",Qj);Qj.prototype.next=Qj.prototype.next;Qj.prototype.current=Qj.prototype.current;
380
- Qj.prototype.currentPosition=Qj.prototype.Oh;function Sj(){Oj.call(this,[]);this.h=[]}pa(Sj,Oj);p=Sj.prototype;p.clone=function(){var a=new Sj;a.h=this.h.slice();return a};p.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};p.find=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.j+d.rc()}return null};
381
- p.get=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.j+d.rc()}return null};p.offset=function(){};p.ze=function(){};p.yb=function(){};p.Cd=function(){};p.Ic=function(){};p.Qe=function(){};L("shaka.media.MetaSegmentIndex",Sj);Sj.prototype.updateEvery=Sj.prototype.Qe;Sj.prototype.fit=Sj.prototype.Ic;Sj.prototype.mergeAndEvict=Sj.prototype.Cd;Sj.prototype.evict=Sj.prototype.yb;Sj.prototype.merge=Sj.prototype.ze;Sj.prototype.offset=Sj.prototype.offset;
380
+ Qj.prototype.currentPosition=Qj.prototype.Oh;function Sj(){Oj.call(this,[]);this.h=[]}pa(Sj,Oj);p=Sj.prototype;p.clone=function(){var a=new Sj;a.h=this.h.slice();return a};p.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};p.find=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.j+d.$b()}return null};
381
+ p.get=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.j+d.$b()}return null};p.offset=function(){};p.ze=function(){};p.yb=function(){};p.Cd=function(){};p.Ic=function(){};p.Qe=function(){};L("shaka.media.MetaSegmentIndex",Sj);Sj.prototype.updateEvery=Sj.prototype.Qe;Sj.prototype.fit=Sj.prototype.Ic;Sj.prototype.mergeAndEvict=Sj.prototype.Cd;Sj.prototype.evict=Sj.prototype.yb;Sj.prototype.merge=Sj.prototype.ze;Sj.prototype.offset=Sj.prototype.offset;
382
382
  Sj.prototype.get=Sj.prototype.get;Sj.prototype.find=Sj.prototype.find;Sj.prototype.release=Sj.prototype.release;function Tj(a){var b=this;this.g=a;this.h=this.g.ke();this.i=new Dd(function(){b.g.fh(.25*b.h)})}Tj.prototype.release=function(){this.set(this.Lc());this.i&&(this.i.stop(),this.i=null);this.g=null};Tj.prototype.set=function(a){if(this.h!=a)a:{this.h=a,this.i.stop();if(0<=this.h)try{var b=this.h;this.g.ke()!=b&&this.g.pg(b);break a}catch(c){}this.i.za(.25);0!=this.g.ke()&&this.g.pg(0)}};Tj.prototype.Lc=function(){return this.g.Lc()};function Uj(a){var b=this;this.h=a;this.g=new Set;this.i=(new Dd(function(){Vj(b,!1)})).za(.25)}Uj.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Vj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Wj(a){$a.call(this);this.g=new Map;this.h=a}pa(Wj,$a);Wj.prototype.release=function(){this.g.clear();$a.prototype.release.call(this)};function Xj(a,b){var c=a.g.get(b);c||(c={Gd:[],Mg:null,contentType:b},a.g.set(b,c));return c}function Yj(a,b,c){var d=Xj(a,b.contentType);Zj(a,d);a={Uf:b,position:c};d=d.Gd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
383
383
  Wj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Gd;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Uf;break a}}d=null}if(e=d)e=c.Mg,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
384
384
  if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Mg=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Zj(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Gd;b.Gd=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.Gd=[]};function ak(a){$a.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Dd(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new O("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).za(2)}pa(ak,$a);ak.prototype.release=function(){this.g.clear();this.h.stop();$a.prototype.release.call(this)};function bk(a,b){$a.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Dc:null,Cc:ck,vc:function(d,e){return dk(c,"enter",d,e)}},{Dc:ek,Cc:ck,vc:function(d,e){return dk(c,"enter",d,e)}},{Dc:fk,Cc:ck,vc:function(d,e){return dk(c,"enter",d,e)}},{Dc:ck,Cc:ek,vc:function(d,e){return dk(c,"exit",d,e)}},{Dc:ck,Cc:fk,vc:function(d,e){return dk(c,"exit",d,e)}},{Dc:ek,Cc:fk,vc:function(d,e){return dk(c,"skip",d,e)}},{Dc:fk,Cc:ek,vc:function(d,e){return dk(c,"skip",d,e)}}];this.h=new Kf;this.h.o(this.i,
385
385
  "regionremove",function(d){c.g.delete(d.region)})}pa(bk,$a);bk.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;$a.prototype.release.call(this)};bk.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?ek:a>d.endTime?fk:ck;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Dc==e&&h.Cc==f&&h.vc(d,b)}}};
386
- function dk(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var ek=1,ck=2,fk=3;function gk(a,b,c){this.i=a;this.h=b;this.j=0;this.l=c;this.g=new Map}function hk(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex){var d=a.h.segmentIndex.qc(Math.max(b.startTime,a.j));if(d){var e=b;c&&(e=d.next().value)&&e.startTime==b.startTime&&e.endTime==b.endTime&&(e=null);for(;a.g.size<a.i&&null!=e;){b=!0;e.l&&null!=e.Na&&(b=!1);2==e.sc()&&(b=!1);b&&!a.g.has(e)&&(b=new ik(a.l),jk(b,e,a.h),a.g.set(e,b));a.j=e.startTime;if(a.h.fastSwitching&&e.Fd&&e.ue)break;e=d.next().value}}}}
386
+ function dk(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var ek=1,ck=2,fk=3;function gk(a,b,c){this.i=a;this.h=b;this.j=0;this.l=c;this.g=new Map}function hk(a,b,c){c=void 0===c?!1:c;if(a.h.segmentIndex){var d=a.h.segmentIndex.rc(Math.max(b.startTime,a.j));if(d){var e=b;c&&(e=d.next().value)&&e.startTime==b.startTime&&e.endTime==b.endTime&&(e=null);for(;a.g.size<a.i&&null!=e;){b=!0;e.l&&null!=e.Na&&(b=!1);2==e.sc()&&(b=!1);b&&!a.g.has(e)&&(b=new ik(a.l),jk(b,e,a.h),a.g.set(e,b));a.j=e.startTime;if(a.h.fastSwitching&&e.Fd&&e.ue)break;e=d.next().value}}}}
387
387
  function kk(a,b){if(a.h.segmentIndex&&a.g.size<a.i&&!a.g.has(b)){var c=new ik(a.l);jk(c,b,a.h);a.g.set(b,c)}}function lk(a){if(0!==a.g.size){for(var b=t(a.g.keys()),c=b.next();!c.done;c=b.next())(c=c.value)&&mk(a,c);a.j=0}}function nk(a,b){b&&b!==a.h&&(lk(a),a.h=b)}function mk(a,b){var c=a.g.get(b);a.g.delete(b);c&&c.abort()}function ik(a){this.i=a;this.g=this.h=null}
388
388
  function jk(a,b,c){var d=new Uint8Array(0);a.g=a.i(b,c,function(e){return K(function(f){if(1==f.g)return 0<d.byteLength?d=tg(d,e):d=e,a.h?D(f,a.h(d),3):f.F(0);d=new Uint8Array(0);F(f)})})}ik.prototype.abort=function(){this.g&&this.g.abort()};function ok(a,b,c,d,e){a=Af(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function pk(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.C=1;this.s=this.j=null;this.H=0;this.G=!1;this.i=new Map;this.D=!1;this.I=null;this.u=!1;this.l=new If(function(){return qk(c)});this.J=Date.now()/1E3}p=pk.prototype;p.destroy=function(){return this.l.destroy()};function qk(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,rk(e),b.push(sk(e));return D(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.h=null;F(f)})}
389
389
  p.configure=function(a){this.h=a;this.I=new jf({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);for(var b=t(this.i.keys()),c=b.next();!c.done;c=b.next())if(c=this.i.get(c.value),c.Ia){var d=c.Ia,e=a.segmentPrefetchLimit;d.i=e;for(var f=Array.from(d.g.keys());f.length>e;){var g=f.pop();g&&mk(d,g)}0<a.segmentPrefetchLimit||
390
390
  (c.Ia=null)}else 0<a.segmentPrefetchLimit&&(c.Ia=tk(this,c.stream))};p.start=function(){var a=this;return K(function(b){if(1==b.g)return D(b,uk(a),2);Jf(a.l);a.D=!0;F(b)})};
391
391
  function vk(a,b){var c,d,e,f,g,h,k;K(function(l){switch(l.g){case 1:return c=Hb,a.H++,d=a.H,ta(l,2),D(l,hj(a.g.Y,c.Da),4);case 4:va(l,3);break;case 2:if(e=wa(l),a.g)a.g.onError(e);case 3:f=dd(b.mimeType,b.codecs),Ri(a.g.Y,f,a.m.sequenceMode,b.external),g=a.g.Y.H,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.H==d&&(k=wk(a,b),a.i.set(c.Da,k),xk(a,k,0)),F(l)}})}function yk(a){var b=a.i.get(Gb);b&&(rk(b),sk(b).catch(function(){}),a.i.delete(Gb));a.s=null}
392
392
  function zk(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.Ac&&(Ak(a,b,!1,0,!1),c.Ac=d);else if(d=c.Ac)c.Ac=null,Ak(a,d,!0,0,!1)}}function Bk(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.D&&(b.video&&Ak(a,b.video,c,d,e,f),b.audio&&Ak(a,b.audio,c,d,e,f))}function Ck(a,b){K(function(c){if(1==c.g)return a.s=b,a.D?b.segmentIndex?c.F(2):D(c,b.createSegmentIndex(),2):c.return();Ak(a,b,!0,0,!1);F(c)})}
393
- function Ak(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Gb?g&&(g.Ac&&(b.trickModeVideo?(g.Ac=b,b=b.trickModeVideo):g.Ac=null),g.stream!=b||e)&&(g.Ia&&nk(g.Ia,b),b.type==Gb&&(e=dd(b.mimeType,b.codecs),Ri(a.g.Y,e,a.m.sequenceMode,b.external)),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ea=null,g.Dg=!!f,c&&(g.pd?g.Re=!0:g.Ta?(g.Sb=!0,g.be=d,g.Re=!0):(rk(g),Dk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Ek(a,g).catch(function(h){if(a.g)a.g.onError(h)})):vk(a,b)}
393
+ function Ak(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Gb?g&&(g.Ac&&(b.trickModeVideo?(g.Ac=b,b=b.trickModeVideo):g.Ac=null),g.stream!=b||e)&&(g.Ia&&nk(g.Ia,b),b.type==Gb&&(e=dd(b.mimeType,b.codecs),Ri(a.g.Y,e,a.m.sequenceMode,b.external)),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ea=null,g.Dg=!!f,c&&(g.pd?g.Re=!0:g.Ta?(g.Ub=!0,g.be=d,g.Re=!0):(rk(g),Dk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Ek(a,g).catch(function(h){if(a.g)a.g.onError(h)})):vk(a,b)}
394
394
  function Ek(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.eb)return e.return();c=b.stream;d=b.eb;return c.segmentIndex?e.F(2):D(e,c.createSegmentIndex(),2)}if(b.eb!=d||b.stream!=c)return e.return();var f=a.g.je();var g=Xi(a.g.Y,b.type),h=b.stream.segmentIndex.find(b.Sa?b.Sa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Na?k.Na-k.hb:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ka)&&(h+=(k.Na?k.Na-k.hb:null)||0),k=a.g.getBandwidthEstimate(),
395
395
  f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.eb.h.g>h?!0:!1):f=!1;f&&b.eb.abort();F(e)})}
396
396
  p.Kd=function(){if(this.g)for(var a=this.g.je(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=null;c.ea&&(e=c.ea.current());if(!e||e.startTime>a||e.endTime<a)c.ea=null;e=this.g.Y;e.D?e=!1:d==Gb?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Wi(e,d),e=Th(e,a));e||((null!=Xi(this.g.Y,d)||c.Ta)&&Fk(this,c),c.eb&&(c.eb.abort(),c.eb=null),d===Gb&&(d=this.g.Y,d.J&&d.J.h()),c.Kd=!0)}};
397
- function Fk(a,b){b.pd||b.Sb||(b.Ta?(b.Sb=!0,b.be=0):null==Vi(a.g.Y,b.type)?null==b.Eb&&xk(a,b,0):(rk(b),Dk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
397
+ function Fk(a,b){b.pd||b.Ub||(b.Ta?(b.Ub=!0,b.be=0):null==Vi(a.g.Y,b.type)?null==b.Eb&&xk(a,b,0):(rk(b),Dk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
398
398
  function uk(a){var b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){b=Hb;if(!a.j)throw new P(2,5,5006);c=new Map;d=new Set;a.j.audio&&(c.set(b.U,a.j.audio),d.add(a.j.audio));a.j.video&&(c.set(b.ia,a.j.video),d.add(a.j.video));a.s&&(c.set(b.Da,a.s),d.add(a.s));e=a.g.Y;return D(m,e.init(c,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}Jf(a.l);a.updateDuration();f=t(c.keys());for(g=f.next();!g.done;g=f.next())h=g.value,k=c.get(h),a.i.has(h)||(l=wk(a,k),a.i.set(h,l),xk(a,l,
399
- 0));F(m)})}function wk(a,b){return{stream:b,type:b.type,ea:null,Ia:tk(a,b),Sa:null,dc:null,Rf:null,Pf:null,Of:null,Ac:null,endOfStream:!1,Ta:!1,Eb:null,Sb:!1,be:0,Re:!1,pd:!1,Kd:!0,Vf:!1,dg:!1,wd:!1,eb:null}}function tk(a,b){return"video"!==b.type&&"audio"!==b.type?null:0<a.h.segmentPrefetchLimit?new gk(a.h.segmentPrefetchLimit,b,function(c,d,e){return Gk(a,c,d,e)}):null}p.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.Y.gb(a):this.g.Y.gb(Math.pow(2,32))};
400
- function Hk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:Jf(a.l);if(b.Ta||null==b.Eb||b.pd)return h.return();b.Eb=null;if(!b.Sb){h.F(2);break}return D(h,Dk(a,b,b.Re,b.be),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.F(4);break}c=b.stream;return D(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ta||b.Eb||xk(a,b,0),h.return();case 4:ta(h,6);d=Ik(a,b);null!=d&&(xk(a,b,d),b.wd=!1);va(h,7);break;case 6:return e=
399
+ 0));F(m)})}function wk(a,b){return{stream:b,type:b.type,ea:null,Ia:tk(a,b),Sa:null,ec:null,Rf:null,Pf:null,Of:null,Ac:null,endOfStream:!1,Ta:!1,Eb:null,Ub:!1,be:0,Re:!1,pd:!1,Kd:!0,Vf:!1,dg:!1,wd:!1,eb:null}}function tk(a,b){return"video"!==b.type&&"audio"!==b.type?null:0<a.h.segmentPrefetchLimit?new gk(a.h.segmentPrefetchLimit,b,function(c,d,e){return Gk(a,c,d,e)}):null}p.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.Y.gb(a):this.g.Y.gb(Math.pow(2,32))};
400
+ function Hk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:Jf(a.l);if(b.Ta||null==b.Eb||b.pd)return h.return();b.Eb=null;if(!b.Ub){h.F(2);break}return D(h,Dk(a,b,b.Re,b.be),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.F(4);break}c=b.stream;return D(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ta||b.Eb||xk(a,b,0),h.return();case 4:ta(h,6);d=Ik(a,b);null!=d&&(xk(a,b,d),b.wd=!1);va(h,7);break;case 6:return e=
401
401
  wa(h),D(h,Jk(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.D||!f.every(function(k){return k.endOfStream})){h.F(0);break}return D(h,a.g.Y.endOfStream(),10);case 10:Jf(a.l),g=a.g.Y.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.gb(g),F(h)}})}
402
402
  function Ik(a,b){if(Kk(b))return ej(a.g.Y,b.stream.originalId||""),null;b.type==Gb&&fj(a.g.Y);if(!a.g.Y.aa&&b.type!=Gb)return a.h.updateIntervalSeconds/2;var c=a.g.je(),d=b.Sa?b.Sa.endTime:c,e=Yi(a.g.Y,b.type,c),f=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.C),g=a.m.presentationTimeline.getDuration()-d,h=Xi(a.g.Y,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(Gb))&&Kk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/
403
- 2;e=Lk(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Kk(h)||h.ea&&!h.ea.current()||(f=Math.min(f,h.Sa?h.Sa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.Ia&&b.ea&&(d=e.ka,!d||b.Sa&&Oh(d,b.dc)||kk(b.Ia,d),hk(b.Ia,e));Mk(a,b,c,e).catch(function(){});return null}
404
- function Lk(a,b,c,d){if(b.ea)return b.ea.current();if(b.Sa||d)return c=b.Sa?b.Sa.endTime:d,b.Vf=!0,b.ea=b.stream.segmentIndex.qc(c),b.ea&&b.ea.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ea=b.stream.segmentIndex.qc(d),e=b.ea&&b.ea.next().value);e||(b.ea=b.stream.segmentIndex.qc(c),e=b.ea&&b.ea.next().value);return e}
403
+ 2;e=Lk(a,b,c,h);if(!e)return a.h.updateIntervalSeconds;f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,Kk(h)||h.ea&&!h.ea.current()||(f=Math.min(f,h.Sa?h.Sa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.Ia&&b.ea&&(d=e.ka,!d||b.Sa&&Oh(d,b.ec)||kk(b.Ia,d),hk(b.Ia,e));Mk(a,b,c,e).catch(function(){});return null}
404
+ function Lk(a,b,c,d){if(b.ea)return b.ea.current();if(b.Sa||d)return c=b.Sa?b.Sa.endTime:d,b.Vf=!0,b.ea=b.stream.segmentIndex.rc(c),b.ea&&b.ea.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ea=b.stream.segmentIndex.rc(d),e=b.ea&&b.ea.next().value);e||(b.ea=b.stream.segmentIndex.rc(c),e=b.ea&&b.ea.next().value);return e}
405
405
  function Mk(a,b,c,d){var e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:e=Hb;f=b.stream;g=b.ea;b.Ta=!0;ta(A,2);if(2==d.sc())throw new P(1,1,1011);return D(A,Nk(a,b,d),4);case 4:Jf(a.l);if(a.u)return A.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.m))return n=new Uint8Array(0),q=r=!1,v=function(C){var E,I,G,H;return K(function(J){switch(J.g){case 1:if(r)return J.return();q=!0;Jf(a.l);if(a.u)return J.return();
406
- ta(J,2);n=Ok(n,C);E=!1;I=0;(new bg).box("mdat",function(M){I=M.size+M.start;E=!0}).parse(n,!1,!0);if(!E){J.F(4);break}G=n.subarray(0,I);n=n.subarray(I);return D(J,Pk(a,b,c,f,d,G,!0),5);case 5:b.Ia&&b.ea&&hk(b.Ia,d,!0);case 4:va(J,0);break;case 2:u=H=wa(J),F(J)}})},D(A,Qk(a,b,d,v),9);l=Qk(a,b,d);return D(A,l,7);case 7:m=A.h;Jf(a.l);if(a.u)return A.return();Jf(a.l);return b.Sb?(b.Ta=!1,xk(a,b,0),A.return()):D(A,Pk(a,b,c,f,d,m),6);case 9:x=A.h;if(u)throw u;if(q){A.F(10);break}r=!0;Jf(a.l);return a.u?
407
- A.return():b.Sb?(b.Ta=!1,xk(a,b,0),A.return()):D(A,Pk(a,b,c,f,d,x),10);case 10:b.Ia&&b.ea&&hk(b.Ia,d,!0);case 6:Jf(a.l);if(a.u)return A.return();b.Sa=d;g.next();b.Ta=!1;b.dg=!1;z=a.g.Y.Lb();y=z[b.type];Xa(JSON.stringify(y));b.Sb||a.g.Zf(d,b.stream);xk(a,b,0);va(A,0);break;case 2:B=wa(A);Jf(a.l,B);if(a.u)return A.return();b.Ta=!1;if(7001==B.code)b.Ta=!1,rk(b),xk(a,b,0),A.F(0);else if(b.type==e.Da&&a.h.ignoreTextStreamFailures)a.i.delete(e.Da),A.F(0);else if(3017==B.code)Rk(a,b,B),A.F(0);else return b.wd=
406
+ ta(J,2);n=Ok(n,C);E=!1;I=0;(new bg).box("mdat",function(M){I=M.size+M.start;E=!0}).parse(n,!1,!0);if(!E){J.F(4);break}G=n.subarray(0,I);n=n.subarray(I);return D(J,Pk(a,b,c,f,d,G,!0),5);case 5:b.Ia&&b.ea&&hk(b.Ia,d,!0);case 4:va(J,0);break;case 2:u=H=wa(J),F(J)}})},D(A,Qk(a,b,d,v),9);l=Qk(a,b,d);return D(A,l,7);case 7:m=A.h;Jf(a.l);if(a.u)return A.return();Jf(a.l);return b.Ub?(b.Ta=!1,xk(a,b,0),A.return()):D(A,Pk(a,b,c,f,d,m),6);case 9:x=A.h;if(u)throw u;if(q){A.F(10);break}r=!0;Jf(a.l);return a.u?
407
+ A.return():b.Ub?(b.Ta=!1,xk(a,b,0),A.return()):D(A,Pk(a,b,c,f,d,x),10);case 10:b.Ia&&b.ea&&hk(b.Ia,d,!0);case 6:Jf(a.l);if(a.u)return A.return();b.Sa=d;g.next();b.Ta=!1;b.dg=!1;z=a.g.Y.Lb();y=z[b.type];Xa(JSON.stringify(y));b.Ub||a.g.Zf(d,b.stream);xk(a,b,0);va(A,0);break;case 2:B=wa(A);Jf(a.l,B);if(a.u)return A.return();b.Ta=!1;if(7001==B.code)b.Ta=!1,rk(b),xk(a,b,0),A.F(0);else if(b.type==e.Da&&a.h.ignoreTextStreamFailures)a.i.delete(e.Da),A.F(0);else if(3017==B.code)Rk(a,b,B),A.F(0);else return b.wd=
408
408
  !0,B.severity=2,D(A,Jk(a,b,B),0)}})}function Sk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b,d.cryptoKey?h.F(2):D(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=lc(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function Ok(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
409
409
  function Rk(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.dg})){if(0<a.h.maxDisabledTime&&a.g.ce(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.wd=!0;a.u=!0;a.g.onError(c);return}b.dg=!0}xk(a,b,4)}
410
- function Nk(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v;return K(function(x){if(1==x.g){d=Hb;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=ld(b.stream.codecs);k=md(b.stream.mimeType);l=c.timestampOffset;if(l==b.Rf&&f==b.Pf&&g==b.Of&&h==b.Qf&&k==b.ah)return x.F(2);if(m=b.Qf&&b.ah&&rj(a.g.Y,b.type,b.stream))n=null,b.type===d.ia?n=a.i.get(d.U):b.type===d.U&&(n=a.i.get(d.ia)),n&&(n.dc=null,Fk(a,n),sk(n).catch(function(){}));r=function(){var z,y,B,A;return K(function(C){if(1==C.g)return z=
411
- new Map,a.j.audio&&z.set(d.U,a.j.audio),a.j.video&&z.set(d.ia,a.j.video),ta(C,2),b.Pf=f,b.Of=g,b.Qf=h,b.ah=k,b.Rf=l,y=a.m.sequenceMode||"HLS"==a.m.type,D(C,ij(a.g.Y,b.type,l,f,g,y,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,z),4);if(2!=C.g)return m&&(B=null,b.type===d.ia?B=a.i.get(d.U):b.type===d.U&&(B=a.i.get(d.ia)),B&&(B.Sb=!1,B.Ta=!1,Fk(a,B))),va(C,0);A=wa(C);b.Pf=null;b.Of=null;b.Qf=null;b.Rf=null;throw A;})};return D(x,r(),2)}Oh(c.ka,b.dc)||(b.dc=c.ka,c.j&&c.ka&&(q=Qk(a,b,c.ka),u=
412
- function(){var z,y,B,A,C,E;return K(function(I){switch(I.g){case 1:return ta(I,2),D(I,q,4);case 4:return z=I.h,Jf(a.l),y=null,B=new Map,A=new bg,A.box("moov",gg).box("trak",gg).box("mdia",gg).T("mdhd",function(G){y=fi(G.reader,G.version).timescale}).box("hdlr",function(G){G=G.reader;G.skip(8);G=G.Qb(4);var H=String.fromCharCode(G[0]);H+=String.fromCharCode(G[1]);H+=String.fromCharCode(G[2]);H+=String.fromCharCode(G[3]);switch(H){case "soun":B.set(d.U,y);break;case "vide":B.set(d.ia,y)}y=null}).parse(z),
413
- B.has(b.type)?c.ka.timescale=B.get(b.type):null!=y&&(c.ka.timescale=y),C=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,D(I,a.g.Gg(b.type,z),5);case 5:return D(I,$i(a.g.Y,b.type,z,null,b.stream,C),6);case 6:va(I,0);break;case 2:throw E=wa(I),b.dc=null,E;}})},a.g.Wi(c.startTime,c.ka),e.push(u())));a.m.sequenceMode&&(v=b.Sa?b.Sa.i:null,c.i!=v||b.Vf)&&(b.Vf=!1,e.push(kj(a.g.Y,b.type,c.startTime)));return D(x,Promise.all(e),0)})}
410
+ function Nk(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v;return K(function(x){if(1==x.g){d=Hb;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=ld(b.stream.codecs);k=md(b.stream.mimeType);l=c.timestampOffset;if(l==b.Rf&&f==b.Pf&&g==b.Of&&h==b.Qf&&k==b.ah)return x.F(2);if(m=b.Qf&&b.ah&&rj(a.g.Y,b.type,b.stream))n=null,b.type===d.ia?n=a.i.get(d.U):b.type===d.U&&(n=a.i.get(d.ia)),n&&(n.ec=null,Fk(a,n),sk(n).catch(function(){}));r=function(){var z,y,B,A;return K(function(C){if(1==C.g)return z=
411
+ new Map,a.j.audio&&z.set(d.U,a.j.audio),a.j.video&&z.set(d.ia,a.j.video),ta(C,2),b.Pf=f,b.Of=g,b.Qf=h,b.ah=k,b.Rf=l,y=a.m.sequenceMode||"HLS"==a.m.type,D(C,ij(a.g.Y,b.type,l,f,g,y,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,z),4);if(2!=C.g)return m&&(B=null,b.type===d.ia?B=a.i.get(d.U):b.type===d.U&&(B=a.i.get(d.ia)),B&&(B.Ub=!1,B.Ta=!1,Fk(a,B))),va(C,0);A=wa(C);b.Pf=null;b.Of=null;b.Qf=null;b.Rf=null;throw A;})};return D(x,r(),2)}Oh(c.ka,b.ec)||(b.ec=c.ka,c.j&&c.ka&&(q=Qk(a,b,c.ka),u=
412
+ function(){var z,y,B,A,C,E;return K(function(I){switch(I.g){case 1:return ta(I,2),D(I,q,4);case 4:return z=I.h,Jf(a.l),y=null,B=new Map,A=new bg,A.box("moov",gg).box("trak",gg).box("mdia",gg).T("mdhd",function(G){y=fi(G.reader,G.version).timescale}).box("hdlr",function(G){G=G.reader;G.skip(8);G=G.Sb(4);var H=String.fromCharCode(G[0]);H+=String.fromCharCode(G[1]);H+=String.fromCharCode(G[2]);H+=String.fromCharCode(G[3]);switch(H){case "soun":B.set(d.U,y);break;case "vide":B.set(d.ia,y)}y=null}).parse(z),
413
+ B.has(b.type)?c.ka.timescale=B.get(b.type):null!=y&&(c.ka.timescale=y),C=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,D(I,a.g.Gg(b.type,z),5);case 5:return D(I,$i(a.g.Y,b.type,z,null,b.stream,C),6);case 6:va(I,0);break;case 2:throw E=wa(I),b.ec=null,E;}})},a.g.Wi(c.startTime,c.ka),e.push(u())));a.m.sequenceMode&&(v=b.Sa?b.Sa.i:null,c.i!=v||b.Vf)&&(b.Vf=!1,e.push(kj(a.g.Y,b.type,c.startTime)));return D(x,Promise.all(e),0)})}
414
414
  function Pk(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h,k,l,m,n,r;return K(function(q){switch(q.g){case 1:h=d.closedCaptions&&0<d.closedCaptions.size;l=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;m=a.h.parsePrftBox&&!a.G;if(l||m)k=new bg;l&&k.T("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var x=u.reader.Hd();var z=u.reader.Hd();var y=u.reader.O();var B=u.reader.O();var A=u.reader.O();var C=u.reader.O();var E=e.startTime+B/y}else y=u.reader.O(),E=u.reader.Uc()/
415
- y+e.timestampOffset,B=E-e.startTime,A=u.reader.O(),C=u.reader.O(),x=u.reader.Hd(),z=u.reader.Hd();u=u.reader.Qb(u.reader.getLength()-u.reader.Ga());if(v&&v.includes(x)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==x?a.g.Xi():(v=(new Map).set("detail",{startTime:E,endTime:E+A/y,schemeIdUri:x,value:z,timescale:y,presentationTimeDelta:B,eventDuration:A,id:C,messageData:u}),v=new O("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=x&&"https://developer.apple.com/streaming/emsg-id3"!=
415
+ y+e.timestampOffset,B=E-e.startTime,A=u.reader.O(),C=u.reader.O(),x=u.reader.Hd(),z=u.reader.Hd();u=u.reader.Sb(u.reader.getLength()-u.reader.Ga());if(v&&v.includes(x)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==x?a.g.Xi():(v=(new Map).set("detail",{startTime:E,endTime:E+A/y,schemeIdUri:x,value:z,timescale:y,presentationTimeDelta:B,eventDuration:A,id:C,messageData:u}),v=new O("emsg",v),v.cancelable=!0,a.g.onEvent(v),v.defaultPrevented||"https://aomedia.org/emsg/ID3"!=x&&"https://developer.apple.com/streaming/emsg-id3"!=
416
416
  x||(x=bi(u),x.length&&e&&a.g.Yi([{cueTime:e.startTime,data:u,frames:x,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});m&&k.T("prft",function(u){if(!a.G&&e.ka.timescale){var v=u.reader,x=u.version;v.O();u=v.O();var z=v.O();u=1E3*u+z/Math.pow(2,32)*1E3;0===x?v=v.O():(x=v.O(),v=v.O(),v=x*Math.pow(2,32)+v);u=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+u)).getTime();v=(new Map).set("detail",{wallClockTime:u,programStartDate:new Date(u-v/e.ka.timescale*1E3)});v=new O("prft",v);a.g.onEvent(v);
417
- a.G=!0}});(l||m)&&k.parse(f);return D(q,Tk(a,b,c),2);case 2:return Jf(a.l),n=b.Kd,b.Kd=!1,r=b.Dg,b.Dg=!1,D(q,a.g.Gg(b.type,f),3);case 3:return D(q,$i(a.g.Y,b.type,f,e,d,h,n,r,g),4);case 4:Jf(a.l),F(q)}})}function Tk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Vi(a.g.Y,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():D(h,a.g.Y.remove(b.type,e,e+g),2)}Jf(a.l);F(h)})}
417
+ a.G=!0}});(l||m)&&k.parse(f);return D(q,Tk(a,b,c),2);case 2:return Jf(a.l),n=b.Kd,b.Kd=!1,r=b.Dg,b.Dg=!1,D(q,a.g.Gg(b.type,f),3);case 3:return D(q,$i(a.g.Y,b.type,f,e,d,h,n,r,g),4);case 4:Jf(a.l),F(q)}})}function Tk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Vi(a.g.Y,b.type);if(null==e)return h.return();f=c-e;g=f-d;return 1>=g?h.return():D(h,a.g.Y.remove(b.type,e,e+g),2)}Jf(a.l);F(h)})}
418
418
  function Kk(a){return a&&a.type==Gb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
419
419
  function Qk(a,b,c,d){var e,f,g,h,k;return K(function(l){switch(l.g){case 1:if(c instanceof Nh&&(e=c.g))return l.return(e);f=null;if(b.Ia){var m=b.Ia;if(m.g.has(c)){var n=m.g.get(c);d&&(n.h=d);m.g.delete(c);f=n.g}else f=null}f||(f=Gk(a,c,b.stream,d));g=0;b.ea&&(g=b.ea.g);b.eb=f;return D(l,f.promise,2);case 2:h=l.h;b.eb=null;k=h.data;if(!c.aes128Key){l.F(3);break}return D(l,Sk(k,c.aes128Key,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
420
420
  function Gk(a,b,c,d){var e=b instanceof Ph?b:void 0,f=e?1:0;b=ok(b.ba(),b.hb,b.Na,a.h.retryParameters,d);return a.g.zc.request(Gf,b,{type:f,stream:c,segment:e})}
421
- function Dk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.Sb=!1,b.Re=!1,b.be=0,b.pd=!0,b.Sa=null,b.dc=null,b.ea=null,b.Ia&&lk(b.Ia),d?(e=a.g.je(),f=a.g.Y.getDuration(),D(g,a.g.Y.remove(b.type,e+d,f),3)):D(g,hj(a.g.Y,b.type),4);if(3!=g.g)return Jf(a.l),c?D(g,a.g.Y.flush(b.type),3):g.F(3);Jf(a.l);b.pd=!1;b.endOfStream=!1;b.Ta||b.Eb||xk(a,b,0);F(g)})}
421
+ function Dk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.Ub=!1,b.Re=!1,b.be=0,b.pd=!0,b.Sa=null,b.ec=null,b.ea=null,b.Ia&&lk(b.Ia),d?(e=a.g.je(),f=a.g.Y.getDuration(),D(g,a.g.Y.remove(b.type,e+d,f),3)):D(g,hj(a.g.Y,b.type),4);if(3!=g.g)return Jf(a.l),c?D(g,a.g.Y.flush(b.type),3):g.F(3);Jf(a.l);b.pd=!1;b.endOfStream=!1;b.Ta||b.Eb||xk(a,b,0);F(g)})}
422
422
  function xk(a,b,c){var d=b.type;if(d!=Gb||a.i.has(d))b.Eb=(new Cd(function(){var e;return K(function(f){if(1==f.g)return ta(f,2),D(f,Hk(a,b),4);if(2!=f.g)return va(f,0);e=wa(f);if(a.g)a.g.onError(e);F(f)})})).S(c)}function rk(a){null!=a.Eb&&(a.Eb.stop(),a.Eb=null)}function sk(a){return K(function(b){return a.eb?D(b,a.eb.abort(),0):b.F(0)})}
423
423
  function Jk(a,b,c){var d;return K(function(e){if(1==e.g)return D(e,lf(a.I),2);Jf(a.l);d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.ce(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.h.failureCallback(c);F(e)})}
424
- function Uk(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.J<c)return h.return(!1);a.J=b;d=Hb;if(e=a.i.get(d.U))e.dc=null,Fk(a,e),sk(e).catch(function(){});if(f=a.i.get(d.ia))f.dc=null,Fk(a,f),sk(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.U,a.j.audio);a.j.video&&g.set(d.ia,a.j.video);return D(h,qj(a.g.Y,g),2)}return h.return(!0)})};function Vk(a,b,c){var d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:var n=(new fb(a)).Ya.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Wk[d])return m.return(e);f=0;g=Af([a],c);ta(m,2);g.method="HEAD";return D(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];va(m,3);break;case 2:k=wa(m);if(!k||1002!=k.code&&1001!=k.code){m.F(3);break}g.method="GET";return D(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
424
+ function Uk(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.J<c)return h.return(!1);a.J=b;d=Hb;if(e=a.i.get(d.U))e.ec=null,Fk(a,e),sk(e).catch(function(){});if(f=a.i.get(d.ia))f.ec=null,Fk(a,f),sk(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.U,a.j.audio);a.j.video&&g.set(d.ia,a.j.video);return D(h,qj(a.g.Y,g),2)}return h.return(!0)})};function Vk(a,b,c){var d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:var n=(new fb(a)).Ya.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Wk[d])return m.return(e);f=0;g=Af([a],c);ta(m,2);g.method="HEAD";return D(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];va(m,3);break;case 2:k=wa(m);if(!k||1002!=k.code&&1001!=k.code){m.F(3);break}g.method="GET";return D(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
425
425
  e.toLowerCase().split(";").shift():"")}})}
426
426
  var Wk={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",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function Xk(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Xk(g,a)}).join("");var c=[],d=700<=a.fontWeight,e="italic"==a.fontStyle,f=a.textDecoration.includes("underline");d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Yk(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Yk(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;k=k.next().value;
427
427
  return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
@@ -456,7 +456,7 @@ gl.prototype.isTextVisible=gl.prototype.isTextVisible;gl.prototype.remove=gl.pro
456
456
  break;case "right":g.push("align:right");break;case Bc:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}L("shaka.text.WebVttGenerator",function(){});function ql(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}ql.prototype.configure=function(a){this.g=a};
457
457
  function rl(a,b,c){try{if(!a.g.enabled)return b;var d=sl(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=tl;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=ul;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=vl;break a}e=void 0}d.ot=e;d.su=
458
458
  !0;var f=wl(d);return xl(b,f)}catch(g){return Sa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function sl(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.m,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
459
- function zl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,sl(a));c.pr=a.h.Mb();var e=c.ot===Al||c.ot===ul;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);if(d)a=Bl(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=wl(c);f&&(b.uris=b.uris.map(function(g){return xl(g,f)}))}}}
459
+ function zl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,sl(a));c.pr=a.h.Nb();var e=c.ot===Al||c.ot===ul;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);if(d)a=Bl(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=wl(c);f&&(b.uris=b.uris.map(function(g){return xl(g,f)}))}}}
460
460
  function Cl(a){if(0===a.type)return Dl;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?ul:Al;if("audio"==b)return tl;if("text"==b)return"application/mp4"===a.mimeType?El:Fl}}function Gl(a,b){b=a.h.Lb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
461
461
  function Hl(a,b){var c=a.h.mb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case Al:return a.videoBandwidth||NaN;case tl:return a.audioBandwidth||NaN;default:return a.bandwidth}}
462
462
  function wl(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
@@ -484,8 +484,8 @@ logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1}};f.trackSelectionCallback
484
484
  function bm(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Pl(a,b,c||$l(),d,"")}
485
485
  function am(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Tb(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Kb(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
486
486
  h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Gb&&"image"!=c.type||b.push(c);return b}L("shaka.util.PlayerConfiguration",Zl);Zl.mergeConfigObjects=bm;Zl.createDefault=$l;function cm(){this.g=null;this.h=[]}function dm(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function em(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function fm(){this.i=this.h=null;this.g=[]}function gm(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function hm(){this.C=this.D=this.I=this.G=this.u=this.j=this.H=this.m=this.i=this.M=this.N=this.J=this.K=this.L=this.l=this.s=NaN;this.g=new cm;this.h=new fm};function V(a,b){$a.call(this);var c=this;this.l=im;this.oe=this.h=null;this.$=!1;this.Be=new Kf;this.Fb=new Kf;this.s=new Kf;this.va=new Kf;this.G=this.I=this.m=this.J=null;this.He=0;this.W=new Sl;this.ha=this.aa=this.i=this.Ie=this.H=this.j=this.sa=this.L=this.Bh=this.Z=this.V=this.ua=this.M=this.K=this.xb=null;this.Xa=!1;this.fg=this.u=null;this.Ag=1E9;this.tc=[];this.N=NaN;this.g=jm(this);this.Ee={width:Infinity,height:Infinity};this.C=null;this.Ra=new Ve(this.g.preferredAudioLanguage,this.g.preferredVariantRole,
487
- this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Wa=this.g.preferredTextLanguage;this.mc=this.g.preferredTextRole;this.Vb=this.g.preferForcedSubs;this.Ib=[];b&&b(this);this.V=km(this);this.Z=new Il(this.g.cmsd);this.J=lm(this);this.J.mg(this.g.streaming.forceHTTPS);this.D=null;mm&&(this.D=mm(),
488
- this.D.configure(this.g.ads));this.Be.o(window,"online",function(){nm(c);c.eg()});this.se=new Dd(function(){return om(c)});a&&(Me("Player","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Gc(a,!0))}pa(V,$a);function pm(a){null!=a.L&&(Ei(a.L),a.L.release(),a.L=null)}
487
+ this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);this.Wa=this.g.preferredTextLanguage;this.nc=this.g.preferredTextRole;this.Xb=this.g.preferForcedSubs;this.Ib=[];b&&b(this);this.V=km(this);this.Z=new Il(this.g.cmsd);this.J=lm(this);this.J.mg(this.g.streaming.forceHTTPS);this.D=null;mm&&(this.D=mm(),
488
+ this.D.configure(this.g.ads));this.Be.o(window,"online",function(){nm(c);c.eg()});this.se=new Dd(function(){return om(c)});a&&(Me("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Gc(a,!0))}pa(V,$a);function pm(a){null!=a.L&&(Ei(a.L),a.L.release(),a.L=null)}
489
489
  function qm(a,b){if(b.lcevc.enabled){var c=a.mb();c&&c[0]&&"video/mp2t"==c[0].videoMimeType&&(Hd()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Ra("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));pm(a);null==a.L&&(a.L=new Di(a.h,a.Bh,b.lcevc),a.I&&(a.I.N=a.L))}else pm(a)}function rm(a,b){return new O(a,b)}p=V.prototype;
490
490
  p.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==sm)return c.return();pm(a);b=a.detach();a.l=sm;return D(c,b,2);case 2:a.Be&&(a.Be.release(),a.Be=null);a.Fb&&(a.Fb.release(),a.Fb=null);a.s&&(a.s.release(),a.s=null);a.va&&(a.va.release(),a.va=null);a.fg=null;a.g=null;a.C=null;a.oe=null;a.V=null;a.Z=null;if(!a.J){c.F(3);break}return D(c,a.J.destroy(),4);case 4:a.J=null;case 3:a.u&&(a.u.release(),a.u=null),$a.prototype.release.call(a),F(c)}})};
491
491
  function tm(){window.Promise||Ra("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Jd("Trident/"))return!1;var a=Rd();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Ed()?!0:Fd("application/x-mpegurl")}function um(a,b){a.dispatchEvent(rm("onstatechange",(new Map).set("state",b)))}
@@ -507,12 +507,13 @@ a.ua;a:{var q=t(r.g);for(var u=q.next();!u.done;u=q.next())if(u=u.value,u.scheme
507
507
  Nm(a.i);k=Date.now()/1E3;l=k-f;a.C.H=l;F(m)})}
508
508
  function Em(a){var b,c,d,e;return K(function(f){return 1==f.g?(um(a,"drm-engine"),b=Date.now()/1E3,c=!0,a.m=Om(a,{zc:a.J,onError:function(g){xm(a,g)},Fe:function(g){Pm(a,g)},onExpirationUpdated:function(g,h){Qm(a,g,h)},onEvent:function(g){a.dispatchEvent(g);"drmsessionupdate"==g.type&&c&&(c=!1,a.C.j=Date.now()/1E3-b,a.L&&Ei(a.L))}}),a.m.configure(a.g.drm),(d=ce(a.i.variants,a.g.restrictions,a.Ee))&&a.j&&Rm(a),e=Ce(a.i.variants),D(f,Zg(a.m,e,a.i.offlineSessionIds),2)):3!=f.g?D(f,a.m.Gc(a.h),3):D(f,
509
509
  Km(a,a.i),0)})}
510
- function Fm(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A;return K(function(C){switch(C.g){case 1:um(a,"load");c=a.h;a.K=new Tj({ke:function(){return c.playbackRate},Lc:function(){return c.defaultPlaybackRate},pg:function(E){c.playbackRate=E},fh:function(E){c.currentTime+=E}});d=function(){return Sm(a)};e=function(){return Tm(a)};a.s.o(c,"playing",d);a.s.o(c,"pause",d);a.s.o(c,"ended",d);a.s.o(c,"ratechange",e);qm(a,a.g);f=a.g.abrFactory;a.u&&a.fg==f||(a.fg=f,a.u=f(),"function"!=typeof a.u.setMediaElement&&(Me("AbrManager",
511
- "Please use an AbrManager with setMediaElement function."),a.u.setMediaElement=function(){}),"function"!=typeof a.u.setCmsdManager&&(Me("AbrManager","Please use an AbrManager with setCmsdManager function."),a.u.setCmsdManager=function(){}),"function"!=typeof a.u.trySuggestStreams&&(Me("AbrManager","Please use an AbrManager with trySuggestStreams function."),a.u.trySuggestStreams=function(){}),a.u.configure(a.g.abr));a.Ra=new Ve(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,
512
- a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups);a.Wa=a.g.preferredTextLanguage;a.mc=a.g.preferredTextRole;a.Vb=a.g.preferForcedSubs;Um(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.u.init(function(E,I,G){a.j&&E!=a.j.j&&Vm(a,E,!0,void 0===I?!1:I,void 0===G?0:G)});a.u.setMediaElement(c);a.u.setCmsdManager(a.Z);Zd(a.i,a.g.preferredVideoCodecs,
513
- a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes);a.j=Wm(a);a.j.configure(a.g.streaming);a.l=Xm;c.textTracks&&a.s.o(c.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Ym(a,E)}});a.dispatchEvent(rm("streaming"));g=null;(h=a.j.j)||(g=Zm(a,!0));k=[];l=h||g;m=t([l.video,l.audio]);for(n=m.next();!n.done;n=m.next())(r=n.value)&&!r.segmentIndex&&k.push(r.createSegmentIndex());if(!(0<k.length)){C.F(2);break}return D(C,Promise.all(k),2);case 2:if(a.H&&a.H.onInitialVariantChosen)a.H.onInitialVariantChosen(l);
514
- Um(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.G=$m(a,a.ha);a.xb=an(a,b);q=Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal);bn(a,c,q);if(h){C.F(4);break}Vm(a,g,!0,!1,0);if(!a.g.streaming.startAtSegmentBoundary){C.F(4);break}u=a.G;v=u.ef;return D(C,cn(g,a.G.Yd()),6);case 6:v.call(u,C.h);case 4:return a.G.df(),x=a.ac().find(function(E){return E.active}),x||((z=De(a.i.textStreams,a.Wa,a.mc,a.Vb)[0]||null)&&gm(a.C.h,z,!0),g&&(z?(g.audio&&dn(a,g.audio,z)&&(a.$=!0),a.$&&a.I.H.setTextVisibility(!0),
515
- en(a)):a.$=!1),z&&(a.g.streaming.alwaysStreamText||a.xc())&&Ck(a.j,z)),D(C,a.j.start(),7);case 7:a.g.abr.enabled&&(a.u.enable(),fn(a));Rm(a);gn(a);a.i.variants.some(function(E){return E.primary});(y=a.R())&&(a.g.streaming.liveSync||a.i.serviceDescription)?(B=function(){return hn(a)},a.s.o(c,"timeupdate",B)):y||(A=function(){return jn(a)},a.s.o(c,"timeupdate",A),jn(a));if(a.D)a.D.onManifestUpdated(y);a.Xa=!0;a.s.na(c,"loadedmetadata",function(){a.C.m=Date.now()/1E3-b});F(C)}})}
510
+ function Fm(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A;return K(function(C){switch(C.g){case 1:um(a,"load");c=a.h;a.K=new Tj({ke:function(){return c.playbackRate},Lc:function(){return c.defaultPlaybackRate},pg:function(E){c.playbackRate=E},fh:function(E){c.currentTime+=E}});d=function(){return Sm(a)};e=function(){return Tm(a)};a.s.o(c,"playing",d);a.s.o(c,"pause",d);a.s.o(c,"ended",d);a.s.o(c,"ratechange",e);qm(a,a.g);f=a.g.abrFactory;a.u&&a.fg==f||(a.fg=f,a.u=f(),"function"!=typeof a.u.setMediaElement&&(Me("AbrManager w/o setMediaElement",
511
+ "Please use an AbrManager with setMediaElement function."),a.u.setMediaElement=function(){}),"function"!=typeof a.u.setCmsdManager&&(Me("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),a.u.setCmsdManager=function(){}),"function"!=typeof a.u.trySuggestStreams&&(Me("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),a.u.trySuggestStreams=function(){}),a.u.configure(a.g.abr));a.Ra=new Ve(a.g.preferredAudioLanguage,a.g.preferredVariantRole,
512
+ a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups);a.Wa=a.g.preferredTextLanguage;a.nc=a.g.preferredTextRole;a.Xb=a.g.preferForcedSubs;Um(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.u.init(function(E,I,G){a.j&&E!=a.j.j&&Vm(a,E,!0,void 0===I?!1:I,void 0===G?0:G)});a.u.setMediaElement(c);a.u.setCmsdManager(a.Z);
513
+ Zd(a.i,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes);a.j=Wm(a);a.j.configure(a.g.streaming);a.l=Xm;c.textTracks&&a.s.o(c.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Ym(a,E)}});a.dispatchEvent(rm("streaming"));g=null;(h=a.j.j)||(g=Zm(a,!0));k=[];l=h||g;m=t([l.video,l.audio]);for(n=m.next();!n.done;n=m.next())(r=n.value)&&!r.segmentIndex&&k.push(r.createSegmentIndex());if(!(0<k.length)){C.F(2);break}return D(C,Promise.all(k),
514
+ 2);case 2:if(a.H&&a.H.onInitialVariantChosen)a.H.onInitialVariantChosen(l);Um(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.G=$m(a,a.ha);a.xb=an(a,b);q=Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal);bn(a,c,q);if(h){C.F(4);break}Vm(a,g,!0,!1,0);if(!a.g.streaming.startAtSegmentBoundary){C.F(4);break}u=a.G;v=u.ef;return D(C,cn(g,a.G.Yd()),6);case 6:v.call(u,C.h);case 4:return a.G.df(),x=a.bc().find(function(E){return E.active}),x||((z=De(a.i.textStreams,a.Wa,a.nc,a.Xb)[0]||
515
+ null)&&gm(a.C.h,z,!0),g&&(z?(g.audio&&dn(a,g.audio,z)&&(a.$=!0),a.$&&a.I.H.setTextVisibility(!0),en(a)):a.$=!1),z&&(a.g.streaming.alwaysStreamText||a.xc())&&Ck(a.j,z)),D(C,a.j.start(),7);case 7:a.g.abr.enabled&&(a.u.enable(),fn(a));Rm(a);gn(a);a.i.variants.some(function(E){return E.primary});(y=a.R())&&(a.g.streaming.liveSync||a.i.serviceDescription)?(B=function(){return hn(a)},a.s.o(c,"timeupdate",B)):y||(A=function(){return jn(a)},a.s.o(c,"timeupdate",A),jn(a));if(a.D)a.D.onManifestUpdated(y);a.Xa=
516
+ !0;a.s.na(c,"loadedmetadata",function(){a.C.m=Date.now()/1E3-b});F(C)}})}
516
517
  function Cm(a,b){var c,d,e,f;return K(function(g){return 1==g.g?(c=Hb,d=Date.now()/1E3,e=!0,a.m=Om(a,{zc:a.J,onError:function(h){xm(a,h)},Fe:function(h){Pm(a,h)},onExpirationUpdated:function(h,k){Qm(a,h,k)},onEvent:function(h){a.dispatchEvent(h);"drmsessionupdate"==h.type&&e&&(e=!1,a.C.j=Date.now()/1E3-d)}}),a.m.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:{id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,
517
518
  mimeType:b?md(b):"",codecs:b?nd(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ia,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.Z=!0,D(g,Zg(a.m,[f],[]),2)):D(g,a.m.Gc(a.h),0)})}
518
519
  function Gm(a,b,c){var d,e,f,g,h,k,l,m,n,r;return K(function(q){if(1==q.g)return um(a,"src-equals"),d=a.h,a.G=new Ij(d),e=!1,a.Ib.push(function(){e=!0}),null!=a.ha&&a.G.ef(a.ha),a.K=new Tj({ke:function(){return d.playbackRate},Lc:function(){return d.defaultPlaybackRate},pg:function(u){d.playbackRate=u},fh:function(u){d.currentTime+=u}}),f=a.g.streaming.rebufferingGoal,bn(a,d,f),g=function(){return Sm(a)},h=function(){return Tm(a)},a.s.o(d,"playing",g),a.s.o(d,"pause",g),a.s.o(d,"ended",g),a.s.o(d,
@@ -529,8 +530,8 @@ m)}break;case Gf:b=d;try{if(e.g.enabled){var g=b.segment;f=0;g&&(f=g.endTime-g.s
529
530
  function $m(a,b){return new Jj(a.h,a.i,a.g.streaming,b,function(){a.xb&&Vj(a.xb,!0);a.j&&a.j.Kd();a.M&&rn(a)},function(c){return a.dispatchEvent(c)})}
530
531
  function an(a,b){b=new bk(a.ua,a.R()||0<b);b.addEventListener("enter",function(d){Jm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Jm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Jm(a,"timelineregionenter",e),Jm(a,"timelineregionexit",e))});var c=new Uj(a.h);c.g.add(b);a.sa&&c.g.add(a.sa);return c}
531
532
  function bn(a,b,c){a.M=new ef;a.M.g=gf;hf(a.M,c,Math.min(.5,c/2));zm(a);a.s.o(b,"waiting",function(){return rn(a)});a.s.o(b,"stalled",function(){return rn(a)});a.s.o(b,"canplaythrough",function(){return rn(a)});a.s.o(b,"progress",function(){return rn(a)})}
532
- function rn(a){switch(a.l){case ln:if(a.h.ended)var b=!0;else{var c=Sh(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Xm:a:if(a.h.ended||Ui(a.I))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.Zb();var d=Sh(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Uh(a.h.buffered,a.h.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?ff:gf;c.g=d;b!=d&&zm(a)}function Hm(a,b,c,d){return new Mi(a,b,c,d)}
533
- function km(a){return new ql({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Lb:function(){return a.Lb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Mb:function(){return a.Mb()},Yb:function(){return a.Yb()},mb:function(){return a.mb()},R:function(){return a.R()}},a.g.cmcd)}
533
+ function rn(a){switch(a.l){case ln:if(a.h.ended)var b=!0;else{var c=Sh(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Xm:a:if(a.h.ended||Ui(a.I))b=!0;else{if(a.i.presentationTimeline.R()){c=a.i.presentationTimeline.ac();var d=Sh(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Uh(a.h.buffered,a.h.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?ff:gf;c.g=d;b!=d&&zm(a)}function Hm(a,b,c,d){return new Mi(a,b,c,d)}
534
+ function km(a){return new ql({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Lb:function(){return a.Lb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Nb:function(){return a.Nb()},Zb:function(){return a.Zb()},mb:function(){return a.mb()},R:function(){return a.R()}},a.g.cmcd)}
534
535
  function Wm(a){return new pk(a.i,{je:function(){return a.G?a.G.Yd():0},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},Y:a.I,zc:a.J,onError:function(b){return xm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Xi:function(){a.H&&a.H.update&&a.H.update()},Zf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type;a.G&&a.G.gh();rn(a);d=(new Map).set("start",d).set("end",e).set("contentType",f);a.dispatchEvent(rm("segmentappended",d));a.u&&c.fastSwitching&&b.Fd&&b.ue&&a.u.trySuggestStreams()},
535
536
  Wi:function(b,c){(c=c.Uf)&&a.sa&&Yj(a.sa,c,b)},Gg:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){c=new ug(lc(c));var e=0,f=t(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;hh(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},Yi:function(b,c,d){Im(a,b,c,d)},ce:function(b,c){return a.ce(b,c)}})}
536
537
  p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ql(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(Me("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(Me("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
@@ -539,37 +540,37 @@ a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifest
539
540
  function sn(a){if(a.H){var b=Ad(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.H.configure(b)}a.m&&a.m.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{tn(a,a.i)}catch(f){xm(a,f)}a.u&&gn(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||un(a)}a.J&&a.J.mg(a.g.streaming.forceHTTPS);if(a.I&&(a.I.configure(a.g.mediaSource),a.I.Z=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,a.xg!=b)){var c=b(),d=a.I,e=d.H;d.H=c;e&&(c.setTextVisibility(e.isTextVisible()),
540
541
  e.destroy());d.h&&(d.h.j=c);a.xg=b;a.j&&(b=a.j,(c=b.i.get(Gb))&&Ak(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.g.abr),a.g.abr.enabled?a.u.enable():a.u.disable(),fn(a));a.M&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),hf(a.M,b,Math.min(.5,b/2)));a.i&&Um(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.D&&a.D.configure(a.g.ads);a.V&&a.V.configure(a.g.cmcd);a.Z&&a.Z.configure(a.g.cmsd)}p.getConfiguration=function(){var a=jm(this);bm(a,this.g,jm(this));return a};
541
542
  p.Uh=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Ha().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};p.hj=function(){for(var a in this.g)delete this.g[a];bm(this.g,jm(this),jm(this));sn(this)};p.ie=function(){return this.l};p.If=function(){return this.i?this.i.type:null};p.ni=function(){return this.h};
542
- p.Yb=function(){return this.J};p.Gf=function(){return this.aa};p.ee=function(){return this.D?this.D:null};p.R=function(){return this.i?this.i.presentationTimeline.R():this.h&&this.h.src?Infinity==this.h.duration:!1};p.wc=function(){return this.i?this.i.presentationTimeline.wc():!1};p.Pc=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
543
- p.Ha=function(){if(this.i){if(!this.Xa&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Nc(),end:a.Nb()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};p.Fi=function(){this.R()&&(this.h.currentTime=this.Ha().end)};p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.m?this.m.g:null};p.td=function(){return this.m?this.m.td():Infinity};
544
- p.Ff=function(){return this.m?this.m.Ff():[]};p.ge=function(){return this.m?this.m.ge():{}};p.yd=function(){return this.M?this.M.g==gf:!1};p.Mb=function(){return this.h?this.K?this.K.h:1:0};
543
+ p.Zb=function(){return this.J};p.Gf=function(){return this.aa};p.ee=function(){return this.D?this.D:null};p.R=function(){return this.i?this.i.presentationTimeline.R():this.h&&this.h.src?Infinity==this.h.duration:!1};p.wc=function(){return this.i?this.i.presentationTimeline.wc():!1};p.Pc=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
544
+ p.Ha=function(){if(this.i){if(!this.Xa&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Nc(),end:a.Ob()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};p.Fi=function(){this.R()&&(this.h.currentTime=this.Ha().end)};p.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};p.drmInfo=function(){return this.m?this.m.g:null};p.td=function(){return this.m?this.m.td():Infinity};
545
+ p.Ff=function(){return this.m?this.m.Ff():[]};p.ge=function(){return this.m?this.m.ge():{}};p.yd=function(){return this.M?this.M.g==gf:!1};p.Nb=function(){return this.h?this.K?this.K.h:1:0};
545
546
  p.Pd=function(a){var b=this;0==a?Ra("A trick play rate of 0 is unsupported!"):(this.va.ub(),this.h.paused&&this.h.play(),this.K.set(a),this.l==Xm&&(this.u.playbackRateChanged(a),zk(this.j,1<Math.abs(a))),this.R()&&this.va.o(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Ha(),e=b.g.streaming.safeSeekOffset;0<a?c>=d.end&&b.od():c<=d.start+e&&b.od()}))};p.od=function(){var a=this.K.Lc();this.l==ln&&this.K.set(a);this.l==Xm&&(this.K.set(a),this.u.playbackRateChanged(a),zk(this.j,!1));this.va.ub()};
546
547
  p.mb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Be(e)){var f=te(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.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return Ae(g)}):[]};
547
- p.ac=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ue(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?nn(this).map(function(f){return ye(f)}):[]};p.fe=function(){var a=this.tc;this.i&&(a=this.i.imageStreams);return a.map(function(b){return ve(b)})};
548
- p.Rh=function(a){var b=this,c,d,e,f;return K(function(g){if(1==g.g){if(b.l!=Xm&&b.l!=ln)return g.return(null);c=b.tc;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.F(2):D(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],Pj(d.segmentIndex,function(h){var k=vn(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.lc;for(var l=h.h-h.startTime,m=0;m<k;m++)e.push(b.Kf(a,h.startTime+l*m/k))}}),D(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
549
- function vn(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{lc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
550
- p.Kf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A;return K(function(C){if(1==C.g){if(c.l!=Xm&&c.l!=ln)return C.return(null);d=c.tc;c.i&&(d=c.i.imageStreams);return(e=d.find(function(E){return E.id==a}))?e.segmentIndex?C.F(2):D(C,e.createSegmentIndex(),2):C.return(null)}f=e.segmentIndex.find(b);if(null==f)return C.return(null);g=e.segmentIndex.get(f);h=vn(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.lc;n=l/h.rows;r=h.lc*h.rows;q=g.h-g.startTime;
551
- u=g.C||q/r;v=g.startTime;z=x=0;1<r&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,x=y%h.lc*m,z=Math.floor(y/h.lc)*n);B=!1;if(A=g.u)B=!0,n=A.height,x=A.positionX,z=A.positionY,m=A.width;return C.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:x,positionY:z,startTime:v,duration:u,uris:g.ba(),width:m,sprite:B})})};
548
+ p.bc=function(){if(this.i){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ue(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?nn(this).map(function(f){return ye(f)}):[]};p.fe=function(){var a=this.tc;this.i&&(a=this.i.imageStreams);return a.map(function(b){return ve(b)})};
549
+ p.Rh=function(a){var b=this,c,d,e,f;return K(function(g){if(1==g.g){if(b.l!=Xm&&b.l!=ln)return g.return(null);c=b.tc;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.F(2):D(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],Pj(d.segmentIndex,function(h){var k=vn(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.mc;for(var l=h.h-h.startTime,m=0;m<k;m++)e.push(b.Kf(a,h.startTime+l*m/k))}}),D(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
550
+ function vn(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{mc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
551
+ p.Kf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A;return K(function(C){if(1==C.g){if(c.l!=Xm&&c.l!=ln)return C.return(null);d=c.tc;c.i&&(d=c.i.imageStreams);return(e=d.find(function(E){return E.id==a}))?e.segmentIndex?C.F(2):D(C,e.createSegmentIndex(),2):C.return(null)}f=e.segmentIndex.find(b);if(null==f)return C.return(null);g=e.segmentIndex.get(f);h=vn(g.tilesLayout||e.tilesLayout);if(!h)return C.return(null);k=e.width||0;l=e.height||0;m=k/h.mc;n=l/h.rows;r=h.mc*h.rows;q=g.h-g.startTime;
552
+ u=g.C||q/r;v=g.startTime;z=x=0;1<r&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,x=y%h.mc*m,z=Math.floor(y/h.mc)*n);B=!1;if(A=g.u)B=!0,n=A.height,x=A.positionX,z=A.positionY,m=A.width;return C.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:x,positionY:z,startTime:v,duration:u,uris:g.ba(),width:m,sprite:B})})};
552
553
  p.jg=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(gm(this.C.h,b,!1),Ck(this.j,b),wn(this),this.Wa=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=nn(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,we(c)==a.id?c.mode=this.$?"showing":"hidden":c.mode="disabled";wn(this)}};
553
554
  p.Me=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.g.abr.enabled&&Ra("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&&Be(d)&&(Vm(this,d,!1,b,c),this.Ra=new Ue(d,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),gn(this))}else if(this.h&&this.h.audioTracks)for(b=
554
- Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,we(c)==a.id){xn(this,c);break}};p.Th=function(){return yn(this.mb())};p.xi=function(){return yn(this.ac())};p.Sh=function(){return Array.from(zn(this.mb()))};p.wi=function(){return Array.from(zn(this.ac()))};
555
+ Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,we(c)==a.id){xn(this,c);break}};p.Th=function(){return yn(this.mb())};p.xi=function(){return yn(this.bc())};p.Sh=function(){return Array.from(zn(this.mb()))};p.wi=function(){return Array.from(zn(this.bc()))};
555
556
  p.Le=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.G){this.Ra=new Ve(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;var e=this.Ra.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||a(c,b)>a(f,
556
- b))c=f;c?(a=te(c),this.Me(a,!0,d)):un(this)}else this.h&&this.h.audioTracks&&(d=De(this.mb(),a,b||"",!1)[0])&&this.Me(d)};p.ig=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Wa=a,this.mc=b||"",this.Vb=c,(a=De(this.i.textStreams,this.Wa,this.mc,this.Vb)[0]||null)&&a!=this.j.s&&(gm(this.C.h,a,!1),this.g.streaming.alwaysStreamText||this.xc()))Ck(this.j,a),wn(this)}else(a=De(this.ac(),a,b||"",c)[0])&&this.jg(a)};
557
+ b))c=f;c?(a=te(c),this.Me(a,!0,d)):un(this)}else this.h&&this.h.audioTracks&&(d=De(this.mb(),a,b||"",!1)[0])&&this.Me(d)};p.ig=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G){if(this.Wa=a,this.nc=b||"",this.Xb=c,(a=De(this.i.textStreams,this.Wa,this.nc,this.Xb)[0]||null)&&a!=this.j.s&&(gm(this.C.h,a,!1),this.g.streaming.alwaysStreamText||this.xc()))Ck(this.j,a),wn(this)}else(a=De(this.bc(),a,b||"",c)[0])&&this.jg(a)};
557
558
  p.oj=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.G){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.Ra=new Ve(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),un(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&xn(this,b)}};
558
559
  p.xc=function(){var a=this.$;return this.I&&this.l==Xm?this.I.H.isTextVisible():this.h&&this.h.src&&this.h.textTracks?nn(this).some(function(b){return"showing"==b.mode}):a};p.Sg=function(){return this.h&&this.h.src&&this.h.textTracks?An(this).map(function(a){return ye(a)}):[]};
559
560
  p.Wh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Kb(a),c=An(this).filter(function(h){return Kb(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
560
561
  function nn(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function qn(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function An(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
561
- p.Oe=function(a){a=!!a;if(this.$!=a){this.$=a;if(this.l==Xm)this.I.H.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=De(this.i.textStreams,this.Wa,this.mc,this.Vb),0<a.length&&(Ck(this.j,a[0]),wn(this))):yk(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=nn(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}en(this)}};
562
+ p.Oe=function(a){a=!!a;if(this.$!=a){this.$=a;if(this.l==Xm)this.I.H.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=De(this.i.textStreams,this.Wa,this.nc,this.Xb),0<a.length&&(Ck(this.j,a[0]),wn(this))):yk(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=nn(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}en(this)}};
562
563
  p.oi=function(){if(!this.R())return null;if(this.G)var a=this.G.Yd();else{if(null==this.ha)return new Date;a=this.ha}if(this.i)return new Date(1E3*(this.i.presentationTimeline.i+a));if(this.h&&this.h.getStartDate){var b=this.h.getStartDate();return isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)}return null};
563
564
  p.Vg=function(){if(!this.R())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.h&&this.h.getStartDate){var a=this.h.getStartDate();return isNaN(a.getTime())?null:a}return null};p.Lb=function(){if(this.l==Xm)return this.I.Lb();var a={total:[],audio:[],video:[],text:[]};this.l==ln&&(a.total=Vh(this.h.buffered));return a};
564
565
  p.getStats=function(){if(this.l!=Xm&&this.l!=ln)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Sm(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.C;b=
565
566
  Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.G&&(this.C.M=this.G.Bg(),this.C.N=this.G.Cg());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.C;var d=Number(c.totalVideoFrames);b.L=Number(c.droppedVideoFrames);b.K=d;this.C.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.K?c.K:NaN):c=NaN;this.C.u=c;if(this.l==Xm){c=this.j.j;b=this.j.s;if(c){d=this.K?this.K.h:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.C.D=e}c&&c.video&&(b=this.C,d=c.video.height||
566
567
  NaN,b.s=c.video.width||NaN,b.l=d);this.R()&&(c=this.Vg().valueOf()+1E3*a.currentTime,this.C.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.C.I=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.C.C=c}this.l==ln&&(c=this.C,b=a.videoHeight||NaN,c.s=a.videoWidth||NaN,c.l=b);var f=this.C;a=f.s;c=f.l;b=f.D;d=f.K;e=f.L;var g=f.J,h=f.N,k=f.M,l=f.C,m=f.i,n=f.m,r=f.H,q=f.j,u=dm(f.g,"playing"),v=dm(f.g,"paused"),x=dm(f.g,"buffering"),z=f.u,y=f.G,B=f.I,A=em(f.g),C=[];f=t(f.h.g);
567
568
  for(var E=f.next();!E.done;E=f.next())E=E.value,C.push({timestamp:E.timestamp,id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:r,drmTimeSeconds:q,playTime:u,pauseTime:v,bufferingTime:x,licenseTime:z,liveLatency:y,maxSegmentDuration:B,stateHistory:A,switchHistory:C}};
568
- p.Hh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,r,q,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:if(h.l!=Xm&&h.l!=ln)throw new P(1,7,7004);"subtitles"!=c&&"captions"!=c&&Ra("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){A.F(2);break}return D(A,Bn(h,a),3);case 3:d=A.h;case 2:k=[];h.D&&(k=h.D.getCuePoints());if(h.l!=ln){A.F(4);break}g&&(c="forced");return D(A,Cn(h,a,b,c,d,f||"",k),5);case 5:l=Kb(b);m=h.ac();if(n=m.find(function(C){return Kb(C.language)==
569
+ p.Hh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,r,q,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:if(h.l!=Xm&&h.l!=ln)throw new P(1,7,7004);"subtitles"!=c&&"captions"!=c&&Ra("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){A.F(2);break}return D(A,Bn(h,a),3);case 3:d=A.h;case 2:k=[];h.D&&(k=h.D.getCuePoints());if(h.l!=ln){A.F(4);break}g&&(c="forced");return D(A,Cn(h,a,b,c,d,f||"",k),5);case 5:l=Kb(b);m=h.bc();if(n=m.find(function(C){return Kb(C.language)==
569
570
  l&&C.label==(f||"")&&C.kind==c}))return Rm(h),A.return(n);throw new P(1,2,2012);case 4:r=Hb;q=h.h.duration;h.i&&(q=h.i.presentationTimeline.getDuration());if(Infinity==q)throw new P(1,4,4033);if(!k.length){A.F(6);break}return D(A,Dn(h,a,h.J,h.g.streaming.retryParameters),7);case 7:u=A.h,v=En(h,u,d,k),x=new Blob([v],{type:"text/vtt"}),a=Pi(x),d="text/vtt";case 6:z={id:h.Ag++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Rj(0,q,[a]),mimeType:d||"",
570
571
  codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:r.Da,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1};y=dd(z.mimeType,z.codecs);B=pd(y);if(!B)throw new P(2,2,2014,d);h.i.textStreams.push(z);Rm(h);return A.return(ue(z))}})};
571
572
  p.Ih=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y;return K(function(B){switch(B.g){case 1:if(c.l!=Xm&&c.l!=ln)throw new P(1,7,7004);if(b){B.F(2);break}return D(B,Bn(c,a),3);case 3:b=B.h;case 2:if("text/vtt"!=b)throw new P(1,2,2017,a);d=Hb;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new P(1,4,4045);return D(B,Dn(c,a,c.J,c.g.streaming.retryParameters),4);case 4:f=B.h;g=qd[b];if(!g)throw new P(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
572
- vttOffset:0};l=lc(f);m=h.parseMedia(l,k,a);n=[];r={};q=t(m);for(u=q.next();!u.done;r={jd:r.jd,ic:r.ic},u=q.next())r.ic=u.value,r.jd=null,v=function(A){return function(){null==A.jd&&(A.jd=zb([a],[A.ic.payload]));return A.jd||[]}}(r),x=new Ph(r.ic.startTime,r.ic.endTime,v,0,null,null,0,0,Infinity),r.ic.payload.includes("#xywh")&&(z=r.ic.payload.split("#xywh=")[1].split(","),4===z.length&&x.rh({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),
573
+ vttOffset:0};l=lc(f);m=h.parseMedia(l,k,a);n=[];r={};q=t(m);for(u=q.next();!u.done;r={jd:r.jd,jc:r.jc},u=q.next())r.jc=u.value,r.jd=null,v=function(A){return function(){null==A.jd&&(A.jd=zb([a],[A.jc.payload]));return A.jd||[]}}(r),x=new Ph(r.jc.startTime,r.jc.endTime,v,0,null,null,0,0,Infinity),r.jc.payload.includes("#xywh")&&(z=r.jc.payload.split("#xywh=")[1].split(","),4===z.length&&x.rh({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],10)})),
573
574
  n.push(x);y={id:c.Ag++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Oj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.cf,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1};c.l==ln?c.tc.push(y):
574
575
  c.i.imageStreams.push(y);Rm(c);return B.return(ve(y))}})};
575
576
  p.Gh=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=Xm&&d.l!=ln)throw new P(1,7,7004);if(c){k.F(2);break}return D(k,Bn(d,a),3);case 3:c=k.h;case 2:return e=[],d.D&&(e=d.D.getCuePoints()),D(k,Cn(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Sg();h=g.find(function(l){return l.language==b});if(!h){k.F(5);break}return D(k,new Promise(function(l,m){d.s.na(f,"load",l);d.s.na(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return Rm(d),k.return(h);case 5:throw new P(1,
@@ -583,7 +584,7 @@ function Lm(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.nex
583
584
  createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Gb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1};b.textStreams.push(h);c.add(g)}}
584
585
  function Km(a,b){return K(function(c){if(1==c.g)return D(c,Fn(a,b),2);tn(a,b);F(c)})}function Fn(a,b){return K(function(c){if(1==c.g)return D(c,de(a.m,b),2);if(!b.variants.some(Be))throw new P(2,4,4032);F(c)})}function tn(a,b){if(a.l!=sm){ce(b.variants,a.g.restrictions,a.Ee)&&a.j&&Rm(a);var c=a.m?a.m.g:null;if(c&&a.m.u)for(var d=t(b.variants),e=d.next();!e.done;e=d.next())e=e.value,Mm(a,c.keySystem,e.video),Mm(a,c.keySystem,e.audio);Gn(a,b)}}
585
586
  function Mm(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,hh(a.m,e.initDataType,e.initData)}}}
586
- function cn(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,r;return K(function(q){if(1==q.g)return k?D(q,k.createSegmentIndex(),2):q.return(null);n=(m=k.segmentIndex.qc(l))?m.next().value:null;if(!n)return q.return(null);r=n.startTime;return q.return(r)})},D(h,e(c,b),2);if(3!=h.g)return f=h.h,D(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
587
+ function cn(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,r;return K(function(q){if(1==q.g)return k?D(q,k.createSegmentIndex(),2):q.return(null);n=(m=k.segmentIndex.rc(l))?m.next().value:null;if(!n)return q.return(null);r=n.startTime;return q.return(r)})},D(h,e(c,b),2);if(3!=h.g)return f=h.h,D(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
587
588
  function zm(a){var b=a.yd();if(a.C&&a.M&&a.G){if(a.V){var c=a.V;b||c.i||(c.i=!0);c.i&&b&&(c.j=!0);c.l=b}Sm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(rm("buffering",b))}function Tm(a){var b=a.h.playbackRate;0!=b&&(a.K&&a.K.set(b),b=rm("ratechange"),a.dispatchEvent(b))}
588
589
  function Sm(a){if(a.C&&a.M){var b=a.C.g,c="playing";a.M.g==gf?c="buffering":a.h.paused?c="paused":a.h.ended&&(c="ended");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(rm("statechanged",c)))}}
589
590
  function hn(a){if(a.R()){var b=a.Ha();if(Number.isFinite(b.end)&&!(a.h.currentTime<b.start)){if(a.g.streaming.liveSync){var c=a.g.streaming.liveSyncMaxLatency;var d=a.g.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(c=a.i.serviceDescription.maxLatency||a.g.streaming.liveSyncMaxLatency,d=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSyncPlaybackRate);if(a.g.streaming.liveSync){var e=a.g.streaming.liveSyncMinLatency;var f=a.g.streaming.liveSyncMinPlaybackRate}else a.i&&
@@ -604,20 +605,20 @@ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new P(2,4,4012,a)
604
605
  function yn(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Kb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
605
606
  h.push({language:l,role:m,label:n})}});return h}L("shaka.Player",V);V.prototype.setVideoContainer=V.prototype.rg;V.prototype.getManifestParserFactory=V.prototype.li;V.prototype.getManifest=V.prototype.ki;V.prototype.retryStreaming=V.prototype.eg;V.prototype.setMaxHardwareResolution=V.prototype.ng;V.prototype.addChaptersTrack=V.prototype.Gh;V.prototype.addThumbnailsTrack=V.prototype.Ih;V.prototype.addTextTrackAsync=V.prototype.Hh;V.prototype.getStats=V.prototype.getStats;
606
607
  V.prototype.getBufferedInfo=V.prototype.Lb;V.prototype.getPresentationStartTimeAsDate=V.prototype.Vg;V.prototype.getPlayheadTimeAsDate=V.prototype.oi;V.prototype.setTextTrackVisibility=V.prototype.Oe;V.prototype.getChapters=V.prototype.Wh;V.prototype.getChaptersTracks=V.prototype.Sg;V.prototype.isTextTrackVisible=V.prototype.xc;V.prototype.selectVariantsByLabel=V.prototype.oj;V.prototype.selectTextLanguage=V.prototype.ig;V.prototype.selectAudioLanguage=V.prototype.Le;
607
- V.prototype.getTextLanguages=V.prototype.wi;V.prototype.getAudioLanguages=V.prototype.Sh;V.prototype.getTextLanguagesAndRoles=V.prototype.xi;V.prototype.getAudioLanguagesAndRoles=V.prototype.Th;V.prototype.selectVariantTrack=V.prototype.Me;V.prototype.selectTextTrack=V.prototype.jg;V.prototype.getThumbnails=V.prototype.Kf;V.prototype.getAllThumbnails=V.prototype.Rh;V.prototype.getImageTracks=V.prototype.fe;V.prototype.getTextTracks=V.prototype.ac;V.prototype.getVariantTracks=V.prototype.mb;
608
- V.prototype.cancelTrickPlay=V.prototype.od;V.prototype.trickPlay=V.prototype.Pd;V.prototype.getPlaybackRate=V.prototype.Mb;V.prototype.isBuffering=V.prototype.yd;V.prototype.getKeyStatuses=V.prototype.ge;V.prototype.getActiveSessionsMetadata=V.prototype.Ff;V.prototype.getExpiration=V.prototype.td;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.Fi;V.prototype.seekRange=V.prototype.Ha;V.prototype.isAudioOnly=V.prototype.Pc;
609
- V.prototype.isInProgress=V.prototype.wc;V.prototype.isLive=V.prototype.R;V.prototype.getAdManager=V.prototype.ee;V.prototype.getAssetUri=V.prototype.Gf;V.prototype.getNetworkingEngine=V.prototype.Yb;V.prototype.getMediaElement=V.prototype.ni;V.prototype.getManifestType=V.prototype.If;V.prototype.getLoadMode=V.prototype.ie;V.prototype.resetConfiguration=V.prototype.hj;V.prototype.getBufferFullness=V.prototype.Uh;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;
608
+ V.prototype.getTextLanguages=V.prototype.wi;V.prototype.getAudioLanguages=V.prototype.Sh;V.prototype.getTextLanguagesAndRoles=V.prototype.xi;V.prototype.getAudioLanguagesAndRoles=V.prototype.Th;V.prototype.selectVariantTrack=V.prototype.Me;V.prototype.selectTextTrack=V.prototype.jg;V.prototype.getThumbnails=V.prototype.Kf;V.prototype.getAllThumbnails=V.prototype.Rh;V.prototype.getImageTracks=V.prototype.fe;V.prototype.getTextTracks=V.prototype.bc;V.prototype.getVariantTracks=V.prototype.mb;
609
+ V.prototype.cancelTrickPlay=V.prototype.od;V.prototype.trickPlay=V.prototype.Pd;V.prototype.getPlaybackRate=V.prototype.Nb;V.prototype.isBuffering=V.prototype.yd;V.prototype.getKeyStatuses=V.prototype.ge;V.prototype.getActiveSessionsMetadata=V.prototype.Ff;V.prototype.getExpiration=V.prototype.td;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.Fi;V.prototype.seekRange=V.prototype.Ha;V.prototype.isAudioOnly=V.prototype.Pc;
610
+ V.prototype.isInProgress=V.prototype.wc;V.prototype.isLive=V.prototype.R;V.prototype.getAdManager=V.prototype.ee;V.prototype.getAssetUri=V.prototype.Gf;V.prototype.getNetworkingEngine=V.prototype.Zb;V.prototype.getMediaElement=V.prototype.ni;V.prototype.getManifestType=V.prototype.If;V.prototype.getLoadMode=V.prototype.ie;V.prototype.resetConfiguration=V.prototype.hj;V.prototype.getBufferFullness=V.prototype.Uh;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;
610
611
  V.prototype.releaseAllMutexes=V.prototype.dj;V.prototype.load=V.prototype.load;V.prototype.updateStartTime=V.prototype.xj;V.prototype.unload=V.prototype.Wc;V.prototype.detach=V.prototype.detach;V.prototype.attachCanvas=V.prototype.Eg;V.prototype.attach=V.prototype.Gc;
611
612
  V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?D(h,Ah(),3):h.F(2);2!=h.g&&(b=h.h);var k={};if(Ed())for(var l in Ih)k[l]=!0;l=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var m=l.next();!m.done;m=l.next())m=m.value,k[m]=Ed()?!!Ih[m]:Fd(m);c=k;l='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",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(w(ed));
612
- k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=Ed()?pd(m)?!0:ac(m)||(Yc(m)?!0:!1):Fd(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=Kn;for(g in f)e[g]=f[g]();return h.return(e)})};V.isBrowserSupported=tm;V.setAdManagerFactory=function(a){mm=a};V.registerSupportPlugin=function(a,b){Kn[a]=b};V.prototype.destroy=V.prototype.destroy;var sm=0,im=1,Xm=2,ln=3;V.LoadMode={DESTROYED:sm,NOT_LOADED:im,MEDIA_SOURCE:Xm,SRC_EQUALS:ln};V.version="v4.7.9";var Ln=["4","7"];
613
- Ne=new function(a){this.g=a;this.i=Oe;this.h=Pe}(new Le(Number(Ln[0]),Number(Ln[1])));var Jn=["output-restricted","internal-error"],Kn={},mm=null;function Mn(){this.h=[];this.j=this.i=this.g=0};function Nn(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new Kf;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=Nn.prototype;p.getDuration=function(){return this.g.getDuration()};p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};
613
+ k={};l=t(l);for(m=l.next();!m.done;m=l.next()){m=m.value;k[m]=Ed()?pd(m)?!0:ac(m)||(Yc(m)?!0:!1):Fd(m);var n=m.split(";")[0];k[n]=k[n]||k[m]}d=k;e={manifest:c,media:d,drm:b};f=Kn;for(g in f)e[g]=f[g]();return h.return(e)})};V.isBrowserSupported=tm;V.setAdManagerFactory=function(a){mm=a};V.registerSupportPlugin=function(a,b){Kn[a]=b};V.prototype.destroy=V.prototype.destroy;var sm=0,im=1,Xm=2,ln=3;V.LoadMode={DESTROYED:sm,NOT_LOADED:im,MEDIA_SOURCE:Xm,SRC_EQUALS:ln};V.version="v4.7.11";
614
+ var Ln=["4","7"];Ne=new function(a){this.g=a;this.i=Oe;this.h=Pe}(new Le(Number(Ln[0]),Number(Ln[1])));var Jn=["output-restricted","internal-error"],Kn={},mm=null;function Mn(){this.h=[];this.j=this.i=this.g=0};function Nn(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new Kf;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=Nn.prototype;p.getDuration=function(){return this.g.getDuration()};p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};
614
615
  p.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.h.getAdSkippableState()};p.skip=function(){return this.h.skip()};p.pause=function(){return this.h.pause()};p.play=function(){return this.h.resume()};p.getVolume=function(){return this.h.getVolume()};p.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
615
616
  p.isMuted=function(){return 0==this.h.getVolume()};p.isLinear=function(){return this.g.isLinear()};p.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};p.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
616
617
  p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
617
618
  p.getAdId=function(){return this.g.getAdId()};p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return this.g.getMediaUrl()};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.g=null};L("shaka.ads.ClientSideAd",Nn);Nn.prototype.release=Nn.prototype.release;
618
619
  Nn.prototype.getPodIndex=Nn.prototype.getPodIndex;Nn.prototype.getTimeOffset=Nn.prototype.getTimeOffset;Nn.prototype.getMediaUrl=Nn.prototype.getMediaUrl;Nn.prototype.getAdvertiserName=Nn.prototype.getAdvertiserName;Nn.prototype.getCreativeAdId=Nn.prototype.getCreativeAdId;Nn.prototype.getAdId=Nn.prototype.getAdId;Nn.prototype.getVastMediaWidth=Nn.prototype.getVastMediaWidth;Nn.prototype.getVastMediaHeight=Nn.prototype.getVastMediaHeight;Nn.prototype.getVastMediaBitrate=Nn.prototype.getVastMediaBitrate;
619
620
  Nn.prototype.getDescription=Nn.prototype.getDescription;Nn.prototype.getTitle=Nn.prototype.getTitle;Nn.prototype.getPositionInSequence=Nn.prototype.getPositionInSequence;Nn.prototype.getSequenceLength=Nn.prototype.getSequenceLength;Nn.prototype.setMuted=Nn.prototype.setMuted;Nn.prototype.resize=Nn.prototype.resize;Nn.prototype.isLinear=Nn.prototype.isLinear;Nn.prototype.isMuted=Nn.prototype.isMuted;Nn.prototype.setVolume=Nn.prototype.setVolume;Nn.prototype.getVolume=Nn.prototype.getVolume;
620
- Nn.prototype.play=Nn.prototype.play;Nn.prototype.pause=Nn.prototype.pause;Nn.prototype.skip=Nn.prototype.skip;Nn.prototype.canSkipNow=Nn.prototype.canSkipNow;Nn.prototype.getTimeUntilSkippable=Nn.prototype.getTimeUntilSkippable;Nn.prototype.isSkippable=Nn.prototype.isSkippable;Nn.prototype.isPaused=Nn.prototype.isPaused;Nn.prototype.getRemainingTime=Nn.prototype.getRemainingTime;Nn.prototype.getMinSuggestedDuration=Nn.prototype.getMinSuggestedDuration;Nn.prototype.getDuration=Nn.prototype.getDuration;function On(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.D=!1;this.u=this.G=null;this.H=NaN;this.m=e;this.j=null;this.h=new Kf;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.7.9");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
621
+ Nn.prototype.play=Nn.prototype.play;Nn.prototype.pause=Nn.prototype.pause;Nn.prototype.skip=Nn.prototype.skip;Nn.prototype.canSkipNow=Nn.prototype.canSkipNow;Nn.prototype.getTimeUntilSkippable=Nn.prototype.getTimeUntilSkippable;Nn.prototype.isSkippable=Nn.prototype.isSkippable;Nn.prototype.isPaused=Nn.prototype.isPaused;Nn.prototype.getRemainingTime=Nn.prototype.getRemainingTime;Nn.prototype.getMinSuggestedDuration=Nn.prototype.getMinSuggestedDuration;Nn.prototype.getDuration=Nn.prototype.getDuration;function On(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.D=!1;this.u=this.G=null;this.H=NaN;this.m=e;this.j=null;this.h=new Kf;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.s,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.7.11");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
621
622
  function(g){Pn(f,g)});this.h.o(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Qn(f,g)});this.h.o(this.i,"ended",function(){f.l.contentComplete()});this.h.na(this.i,"play",function(){f.D=!0})}On.prototype.configure=function(a){this.G=a};On.prototype.stop=function(){this.g&&this.g.stop();this.s&&fl(this.s)};On.prototype.release=function(){this.stop();this.u&&this.u.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
622
623
  function Qn(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new O("ad-error",b));Rn(a,null);a.m(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
623
624
  function Pn(a,b){a.m(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));if(a.G.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.C);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.C);a.m(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",
@@ -635,7 +636,7 @@ p.isLinear=function(){return this.l};p.resize=function(){};p.setMuted=function(a
635
636
  p.getAdvertiserName=function(){return""};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){return 0};p.getPodIndex=function(){return 0};p.release=function(){this.j=this.i=this.g=this.h=null};L("shaka.ads.MediaTailorAd",Vn);Vn.prototype.release=Vn.prototype.release;Vn.prototype.getPodIndex=Vn.prototype.getPodIndex;Vn.prototype.getTimeOffset=Vn.prototype.getTimeOffset;Vn.prototype.getMediaUrl=Vn.prototype.getMediaUrl;Vn.prototype.getAdvertiserName=Vn.prototype.getAdvertiserName;
636
637
  Vn.prototype.getCreativeAdId=Vn.prototype.getCreativeAdId;Vn.prototype.getAdId=Vn.prototype.getAdId;Vn.prototype.getVastMediaWidth=Vn.prototype.getVastMediaWidth;Vn.prototype.getVastMediaHeight=Vn.prototype.getVastMediaHeight;Vn.prototype.getVastMediaBitrate=Vn.prototype.getVastMediaBitrate;Vn.prototype.getDescription=Vn.prototype.getDescription;Vn.prototype.getTitle=Vn.prototype.getTitle;Vn.prototype.getPositionInSequence=Vn.prototype.getPositionInSequence;Vn.prototype.getSequenceLength=Vn.prototype.getSequenceLength;
637
638
  Vn.prototype.setMuted=Vn.prototype.setMuted;Vn.prototype.resize=Vn.prototype.resize;Vn.prototype.isLinear=Vn.prototype.isLinear;Vn.prototype.isMuted=Vn.prototype.isMuted;Vn.prototype.setVolume=Vn.prototype.setVolume;Vn.prototype.getVolume=Vn.prototype.getVolume;Vn.prototype.play=Vn.prototype.play;Vn.prototype.pause=Vn.prototype.pause;Vn.prototype.skip=Vn.prototype.skip;Vn.prototype.canSkipNow=Vn.prototype.canSkipNow;Vn.prototype.getTimeUntilSkippable=Vn.prototype.getTimeUntilSkippable;
638
- Vn.prototype.isSkippable=Vn.prototype.isSkippable;Vn.prototype.isPaused=Vn.prototype.isPaused;Vn.prototype.getRemainingTime=Vn.prototype.getRemainingTime;Vn.prototype.getMinSuggestedDuration=Vn.prototype.getMinSuggestedDuration;Vn.prototype.getDuration=Vn.prototype.getDuration;function Wn(a,b,c,d){this.D=a;this.K=b;this.g=c;this.l=null;this.W=NaN;this.i=d;this.J=!1;this.C=null;this.j=[];this.M=[];this.L=this.G=this.h=null;this.H=new Map;this.m=[];this.u=[];this.N="";this.V=!0;this.I="";this.s=new Kf}Wn.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.s.fc(b.target,b.type,b.listener);Xn(this);this.m=[];this.u=[];this.N="";this.V=!0;this.I="";this.C=null;this.j=[];this.M=[];this.H.clear()};
639
+ Vn.prototype.isSkippable=Vn.prototype.isSkippable;Vn.prototype.isPaused=Vn.prototype.isPaused;Vn.prototype.getRemainingTime=Vn.prototype.getRemainingTime;Vn.prototype.getMinSuggestedDuration=Vn.prototype.getMinSuggestedDuration;Vn.prototype.getDuration=Vn.prototype.getDuration;function Wn(a,b,c,d){this.D=a;this.K=b;this.g=c;this.l=null;this.W=NaN;this.i=d;this.J=!1;this.C=null;this.j=[];this.M=[];this.L=this.G=this.h=null;this.H=new Map;this.m=[];this.u=[];this.N="";this.V=!0;this.I="";this.s=new Kf}Wn.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.s.hc(b.target,b.type,b.listener);Xn(this);this.m=[];this.u=[];this.N="";this.V=!0;this.I="";this.C=null;this.j=[];this.M=[];this.H.clear()};
639
640
  Wn.prototype.release=function(){this.stop();this.s&&this.s.release()};Wn.prototype.onManifestUpdated=function(a){this.J=a;""!=this.N&&(Yn(this,this.N,this.V),this.V=!1)};Wn.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
640
641
  function Zn(a,b,c){var d,e,f,g,h,k,l,m,n,r,q;K(function(u){if(1==u.g)return d=Af([b],kf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Xf(e)),f=a.K.request(7,d),ta(u,2),D(u,f.promise,4);if(2!=u.g){g=u.h;h=Tf(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new fb(b),m=new fb(k.trackingUrl),a.N=l.resolve(m).toString(),n=Date.now()/1E3,r=n-a.W,a.i(new O("ads-loaded",(new Map).set("loadTime",r))),q=new fb(k.manifestUrl),a.l.resolve(l.resolve(q).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
641
642
  return va(u,0)}wa(u);if(!a.I.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,u.return();a.l.resolve(a.I);a.l=null;F(u)})}
@@ -648,7 +649,7 @@ function co(a){if(a.g.duration&&(a.h||a.j.length)){var b=a.g.currentTime,c=!1;if
648
649
  e=a.h.getDuration();0<e&&(0>=d||d>e)&&Xn(a)}if(!a.h||!a.h.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.h&&a.h.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.M.includes(g.adId)){if(a.g.ended)continue;a.g.currentTime=h;break a}Xn(a);a.L=e;a.h=new Vn(g,f+1,e.ads.length,!0,a.g);a.G=g;0===f&&fo(a,"breakStart");go(a);break}}}if(!a.h)for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;
649
650
  if(a.h)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.H.get(bo(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){Xn(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||0)+"%";m.style.maxWidth=100-(l.placeholder.left||
650
651
  0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.D.appendChild(m)}a.L=e;a.h=new Vn(g,f+1,e.ads.length,!1,a.g);a.G=g;0===f&&fo(a,"breakStart");go(a);break}}}c&&!a.h&&(b=a.g.currentTime,a.C&&a.C>b&&(a.g.currentTime=a.C),a.C=null)}}}
651
- function Xn(a){if(a.h){for(;a.D.lastChild;)a.D.removeChild(a.D.firstChild);a.J||a.M.push(a.G.adId);fo(a,"complete");for(var b=t(a.m),c=b.next();!c.done;c=b.next())c=c.value,a.s.fc(c.target,c.type,c.listener);a.m=[];a.u=[];b=a.h.getPositionInSequence();c=a.h.getSequenceLength();b===c&&fo(a,"breakEnd");a.h=null;a.G=null;a.L=null}}
652
+ function Xn(a){if(a.h){for(;a.D.lastChild;)a.D.removeChild(a.D.firstChild);a.J||a.M.push(a.G.adId);fo(a,"complete");for(var b=t(a.m),c=b.next();!c.done;c=b.next())c=c.value,a.s.hc(c.target,c.type,c.listener);a.m=[];a.u=[];b=a.h.getPositionInSequence();c=a.h.getSequenceLength();b===c&&fo(a,"breakEnd");a.h=null;a.G=null;a.L=null}}
652
653
  function go(a){var b=!1;a.g.paused?b=!0:(fo(a,"impression"),fo(a,"start"));a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted&&fo(a,"mute")}});a.m.push({target:a.g,type:"volumechange",listener:function(){a.g.muted||fo(a,"unmute")}});a.m.push({target:a.g,type:"play",listener:function(){b?(fo(a,"impression"),fo(a,"start"),b=!1):fo(a,"resume")}});a.m.push({target:a.g,type:"pause",listener:function(){fo(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.s.o(d.target,
653
654
  d.type,d.listener)}
654
655
  function fo(a,b){var c=a.G.trackingEvents.find(function(e){return e.eventType==b});c||(c=a.L.adBreakTrackingEvents.find(function(e){return e.eventType==b}));if(c){c=t(c.beaconUrls);for(var d=c.next();!d.done;d=c.next())(d=d.value)&&""!=d&&(d=Af([d],kf()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new O("ad-impression"));break;case "start":a.i(new O("ad-started",(new Map).set("ad",a.h)));break;case "mute":a.i(new O("ad-muted"));break;case "unmute":a.i(new O("ad-volume-changed"));break;
@@ -667,9 +668,9 @@ function jo(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-
667
668
  p.release=function(){this.h&&(this.h.release(),this.h=null);this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);$a.prototype.release.call(this)};p.onAssetUnload=function(){this.h&&this.h.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.j=new Mn};p.requestClientSideAds=function(a){if(!this.h)throw new P(1,10,10001);var b=this.h;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.H=Date.now()/1E3;b.l.requestAds(a)};
668
669
  p.updateClientSideAdsRenderingSettings=function(a){if(!this.h)throw new P(1,10,10001);var b=this.h;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new Wn(a,b,c,function(e){return ko(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new P(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new P(1,10,10004)):(d.l=new mf,Zn(d,a,b),d.I=c||"",d.W=Date.now()/1E3,a=d.l);return a};
669
670
  p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new io(a,b,this.m,function(d){return ko(c,d)});this.g.configure(this.l)};
670
- p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ra('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.7.9";c=this.g;c.j?a=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
671
- (c.I=!0),c.j=new mf,c.g.requestStream(a),c.D=b||"",c.H=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Ra('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.7.9";this.g.g.replaceAdTagParameters(a)};
672
- p.getServerSideCuePoints=function(){Me("AdManager","Please use getCuePoints function.");return this.getCuePoints()};p.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};p.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};p.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
671
+ p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ra('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.7.11";c=this.g;c.j?a=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
672
+ (c.I=!0),c.j=new mf,c.g.requestStream(a),c.D=b||"",c.H=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Ra('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.7.11";this.g.g.replaceAdTagParameters(a)};
673
+ p.getServerSideCuePoints=function(){Me("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};p.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};p.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};p.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
673
674
  p.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)}};p.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
674
675
  function ko(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.j.h.push(b.loadTime);break;case "ad-started":a.j.g++;break;case "ad-complete":a.j.i++;break;case "ad-skipped":a.j.j++}a.dispatchEvent(b)}L("shaka.ads.AdManager",W);W.prototype.onCueMetadataChange=W.prototype.onCueMetadataChange;W.prototype.onHlsTimedMetadata=W.prototype.onHlsTimedMetadata;W.prototype.onDashTimedMetadata=W.prototype.onDashTimedMetadata;W.prototype.onManifestUpdated=W.prototype.onManifestUpdated;W.prototype.getStats=W.prototype.getStats;
675
676
  W.prototype.getCuePoints=W.prototype.getCuePoints;W.prototype.getServerSideCuePoints=W.prototype.getServerSideCuePoints;W.prototype.replaceServerSideAdTagParameters=W.prototype.replaceServerSideAdTagParameters;W.prototype.requestServerSideStream=W.prototype.requestServerSideStream;W.prototype.initServerSide=W.prototype.initServerSide;W.prototype.requestMediaTailorStream=W.prototype.requestMediaTailorStream;W.prototype.initMediaTailor=W.prototype.initMediaTailor;
@@ -691,7 +692,7 @@ p.set=function(a,b,c){this.g[a][b]=c;Ko(this,{type:"set",targetName:a,property:b
691
692
  p.kh=function(a,b){Ko(this,{type:"call",targetName:a,methodName:b,args:Ga.apply(2,arguments)})};p.ej=function(a,b){var c=Ga.apply(2,arguments),d=new mf,e=this.J.toString();this.J++;this.i[e]=d;try{Ko(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Fo(a,b){var c=a.K();a.l=new mf;a.C=!0;Lo(a,c,b)}function Eo(a){var b=Do;b.removeUpdateListener(a.D);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
692
693
  function Ao(a){var b=Do?"connected"==Do.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};Co(a)}a.h=b;a.L=b?Do.receiver.friendlyName:"";a.j.Qa()}function Co(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function Ko(a,b){b=lo(b);var c=Do;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Va)}catch(d){throw b=new P(2,8,8005,d),c=new O("error",(new Map).set("detail",b)),a.u("player",c),a.Jc(),b;}}var Ho=.02,Go=!1,Do=null,Jo=null,Bo=new Set;
693
694
  function Io(a){Jo?window.__onGCastApiAvailable=Jo:delete window.__onGCastApiAvailable;Jo=null;if(a)for(var b=t(Bo),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Oo(a,b,c,d){d=void 0===d?!1:d;$a.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.j=this.u=this.l=null;this.G=c;this.D=d;this.C=new Map;this.g=new zo(c,function(){return Po(e)},function(){return Qo(e)},function(f,g){return Ro(e,f,g)},function(){return So(e)},function(){return To(e)},d);Uo(this)}pa(Oo,$a);p=Oo.prototype;
694
- p.destroy=function(a){a&&this.g.Jc();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.u=this.l=this.i=null;$a.prototype.release.call(this);return Promise.all(a)};p.bc=function(){return this.l};p.Mc=function(){return this.u};p.kf=function(){return this.g.m&&Go};p.Ba=function(){return this.g.Ba()};p.Je=function(){return this.g.Je()};
695
+ p.destroy=function(a){a&&this.g.Jc();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.u=this.l=this.i=null;$a.prototype.release.call(this);return Promise.all(a)};p.cc=function(){return this.l};p.Mc=function(){return this.u};p.kf=function(){return this.g.m&&Go};p.Ba=function(){return this.g.Ba()};p.Je=function(){return this.g.Je()};
695
696
  p.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=To(a),D(c,a.g.cast(b),2)):a.h?D(c,a.h.Wc(),0):c.return()})};p.kg=function(a){this.g.kg(a)};p.vh=function(){No(this.g)};p.Jc=function(){this.g.Jc()};
696
697
  p.Jg=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.G&&b==c.D)return d.return();c.G=a;c.D=b;c.g.Jc();return D(d,c.g.destroy(),2)}c.g=null;c.g=new zo(a,function(){return Po(c)},function(){return Qo(c)},function(e,f){return Ro(c,e,f)},function(){return So(c)},function(){return To(c)},b);c.g.init();F(d)})};
697
698
  function Uo(a){a.g.init();a.m=new Kf;for(var b=t(oo),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.Ba()||(f=Na(f),a.j.dispatchEvent(f))});for(var d in Oa)a.m.o(a.h,Oa[d],function(f){a.g.Ba()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.$c=e,Object.defineProperty(a.l,b.$c,{configurable:!1,enumerable:!0,get:function(f){return function(){return Vo(a,f.$c)}}(b),set:function(f){return function(g){var h=f.$c;a.g.Ba()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={$c:b.$c};a.u={};Wo(a,
@@ -702,10 +703,10 @@ function Qo(a){var b=new O(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
702
703
  function So(a){for(var b=t(vo),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(qo);for(d=c.next();!d.done;d=c.next())d=
703
704
  d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(qo),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(wo);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.Oe(h);g&&a.h.ig(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new O("error",l);a.h.dispatchEvent(l)})}
704
705
  function Vo(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.Ba()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Ba()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
705
- function Xo(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Yb()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.ee()};
706
+ function Xo(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Zb()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.ee()};
706
707
  if("setVideoContainer"==b)return function(c){return a.h.rg(c)};if(a.g.Ba()){if("getManifest"==b||"drmInfo"==b)return function(){Ra(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ra(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Ba()&&0==Object.keys(a.g.g.video).length&&(so[b]||to[b])||!a.g.Ba()?a.h[b].bind(a.h):a.g.get("player",b)}
707
708
  function Ro(a,b,c){a.g.Ba()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}L("shaka.cast.CastProxy",Oo);Oo.prototype.changeReceiverId=Oo.prototype.Jg;Oo.prototype.forceDisconnect=Oo.prototype.Jc;Oo.prototype.suggestDisconnect=Oo.prototype.vh;Oo.prototype.setAppData=Oo.prototype.kg;Oo.prototype.cast=Oo.prototype.cast;Oo.prototype.receiverName=Oo.prototype.Je;Oo.prototype.isCasting=Oo.prototype.Ba;Oo.prototype.canCast=Oo.prototype.kf;Oo.prototype.getPlayer=Oo.prototype.Mc;
708
- Oo.prototype.getVideo=Oo.prototype.bc;Oo.prototype.destroy=Oo.prototype.destroy;function Zo(a,b,c,d){$a.call(this);var e=this;this.g=a;this.h=b;this.j=new Kf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.s=!0;this.m=0;this.D=!1;this.C=!0;this.u=this.l=null;this.I=new Dd(function(){$o(e)});ap(this)}pa(Zo,$a);p=Zo.prototype;p.isConnected=function(){return this.H};p.Ji=function(){return this.s};p.rj=function(a){this.i=a};p.Nh=function(){this.i=null};
709
+ Oo.prototype.getVideo=Oo.prototype.cc;Oo.prototype.destroy=Oo.prototype.destroy;function Zo(a,b,c,d){$a.call(this);var e=this;this.g=a;this.h=b;this.j=new Kf;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.s=!0;this.m=0;this.D=!1;this.C=!0;this.u=this.l=null;this.I=new Dd(function(){$o(e)});ap(this)}pa(Zo,$a);p=Zo.prototype;p.isConnected=function(){return this.H};p.Ji=function(){return this.s};p.rj=function(a){this.i=a};p.Nh=function(){this.i=null};
709
710
  p.sj=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};p.qj=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};p.pj=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
710
711
  p.destroy=function(){var a=this,b,c;return K(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.s=!0,a.l=null,a.u=null,$a.prototype.release.call(a),D(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();F(d)})};
711
712
  function ap(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return bp(a)};b.onSenderDisconnected=function(){return bp(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&cp(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);cp(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return dp(a,
@@ -751,7 +752,7 @@ Eq.prototype.init=function(a){function b(f){f=f.name;f in Gq&&(c.g=Gq[f])}var c=
751
752
  b).box("encv",jg).box("sinf",gg).box("frma",function(f){f=li(f.reader).wa;f in Gq&&(c.g=Gq[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new P(2,2,2010);this.g==Fq&&Ra("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
752
753
  Eq.prototype.parse=function(a){var b=this;if(this.g==Fq)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new bg).box("moof",function(l){f=l.start;g=[];gg(l)}).box("traf",gg).T("trun",function(l){l=gi(l.reader,l.version,l.flags);g.push(l)}).T("tfhd",function(l){l=di(l.reader,l.flags);d=l.Og||b.h;e=l.Qh||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).T("tfdt",function(l){h=ei(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw Ra("Unable to find base media decode time for CEA captions!"),
753
754
  new P(2,2,2010);Hq(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
754
- function Hq(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.lh});n=[].concat.apply([],w(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Ph);b.xa();){g=b.O();var r=b.ra(),q=null;q=!1;h=1;switch(a.g){case Iq:q=r&31;q=6==q;break;case Jq:h=2;b.skip(1);q=r>>1&63;q=39==q||40==q;break;default:return}if(q)for(r=0,l<n.length&&(r=n[l].Ke||0),r=(c+r)/d,h=t(Dq(b.Qb(g-h))),q=h.next();!q.done;q=h.next())k.push({packet:q.value,pts:r});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
755
+ function Hq(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.lh});n=[].concat.apply([],w(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Ph);b.xa();){g=b.O();var r=b.ra(),q=null;q=!1;h=1;switch(a.g){case Iq:q=r&31;q=6==q;break;case Jq:h=2;b.skip(1);q=r>>1&63;q=39==q||40==q;break;default:return}if(q)for(r=0,l<n.length&&(r=n[l].Ke||0),r=(c+r)/d,h=t(Dq(b.Sb(g-h))),q=h.next();!q.done;q=h.next())k.push({packet:q.value,pts:r});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
755
756
  c+(n[l].gg||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}L("shaka.cea.Mp4CeaParser",Eq);var Fq=0,Iq=1,Jq=2,Gq={avc1:Iq,avc3:Iq,hev1:Jq,hvc1:Jq,dvh1:Jq,dvhe:Jq};sc["video/mp4"]=function(){return new Eq};function Kq(){}Kq.prototype.init=function(){};Kq.prototype.parse=function(a){var b=[];a=lc(a);if(!Ci(a))return b;a=(new wi).parse(a);var c=a.sd(),d=a.le();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(Dq(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};L("shaka.cea.TsCeaParser",Kq);sc["video/mp2t"]=function(){return new Kq};function Lq(a,b,c){var d=Mq(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(k){return k.keyId}));h.delete(null);if(1<h.size)throw new P(2,4,4010);if(!b){f=d.filter(function(k){return"urn:mpeg:dash:sea:2012"==k.Jd});if(1<f.length)throw new P(2,4,4050);f.length&&(g=Nq(f[0]));f=d.filter(function(k){return"urn:mpeg:dash:mp4protection:2011"==k.Jd?(e=k.init||e,!1):"urn:mpeg:dash:sea:2012"!=k.Jd});f.length&&(a=Oq(e,f,c,h),0==a.length&&(a=[Ab("",e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),
756
757
  c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Ab(c,e));if(h=Array.from(h)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=h;return{Ng:h,xk:e,drmInfos:a,gf:g,Rg:!0}}
757
758
  function Pq(a,b,c,d){var e=Lq(a,c,d);if(b.Rg){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.Rg=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new P(2,4,4008);return e.Ng||b.Ng}
@@ -767,7 +768,7 @@ var Tq=1,Uq=(new Map).set("com.widevine.alpha",function(a){var b=yg(a.node,"http
767
768
  b.textContent:(a=yg(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Wq(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&Ra("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
768
769
  break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
769
770
  function Xq(a,b){var c=Yq(a,b,"timescale"),d=1;c&&(d=Kg(c)||1);var e=Yq(a,b,"duration");c=Kg(e||"");"image"==a.P.contentType&&(c=Mg(e||""));c&&(c/=d);var f=Yq(a,b,"startNumber");e=Number(Yq(a,b,"presentationTimeOffset"))||0;var g=Lg(f||"");if(null==f||null==g)g=1;var h=Zq(a,b,"SegmentTimeline");b=null;if(h){b=d;a=a.ma.duration||Infinity;f=g;h=xg(h,"S");for(var k=[],l=-e,m=0;m<h.length;++m){var n=h[m],r=h[m+1],q=Fg(n,"t",Lg),u=Fg(n,"d",Lg),v=Fg(n,"r",Jg);n=Fg(n,"k",Jg)||0;null!=q&&(q-=e);if(!u)break;
770
- q=null!=q?q:l;v=v||0;if(0>v)if(r){r=Fg(r,"t",Lg);if(null==r)break;else if(q>=r)break;v=Math.ceil((r-q)/u)-1}else{if(Infinity==a)break;else if(q/b>=a)break;v=Math.ceil((a*b-q)/u)-1}0<k.length&&q!=l&&(k[k.length-1].end=q/b);for(r=0;r<=v;++r)l=q+u,k.push({start:q/b,end:l/b,zg:q,Bb:n,nj:k.length+f}),q=l}b=k}return{timescale:d,Pa:c,Nd:g,Rb:e/d||0,yg:e,timeline:b}}function $q(a,b){return[b(a.P),b(a.Ea),b(a.Ka)].filter(zd)}
771
+ q=null!=q?q:l;v=v||0;if(0>v)if(r){r=Fg(r,"t",Lg);if(null==r)break;else if(q>=r)break;v=Math.ceil((r-q)/u)-1}else{if(Infinity==a)break;else if(q/b>=a)break;v=Math.ceil((a*b-q)/u)-1}0<k.length&&q!=l&&(k[k.length-1].end=q/b);for(r=0;r<=v;++r)l=q+u,k.push({start:q/b,end:l/b,zg:q,Bb:n,nj:k.length+f}),q=l}b=k}return{timescale:d,Pa:c,Nd:g,Tb:e/d||0,yg:e,timeline:b}}function $q(a,b){return[b(a.P),b(a.Ea),b(a.Ka)].filter(zd)}
771
772
  function Yq(a,b,c){b=$q(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.getAttribute(c));d=b.next());return a}function Zq(a,b,c){b=$q(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=wg(d.value,c));d=b.next());return a}
772
773
  function ar(a,b,c,d,e,f){for(var g=Bg(a,"http://www.w3.org/1999/xlink","href"),h=Bg(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return of(new P(2,4,4028));if("onLoad"!=h)return of(new P(2,4,4027));var m=zb([d],[g]);return e.request(0,Af(m,b)).Fa(function(n){n=Rg(n.data,a.tagName);if(!n)return of(new P(2,4,4001,g));
773
774
  for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var r=n.childNodes[0];n.removeChild(r);a.appendChild(r)}n=t(Array.from(n.attributes));for(r=n.next();!r.done;r=n.next())a.setAttributeNode(r.value.cloneNode(!1));return br(a,b,c,m[0],e,f+1)})}
@@ -778,27 +779,26 @@ d)}function gr(a){var b=a.g.Ga(),c=a.g.ra();if(0==c)throw new P(2,3,3002);c=8-Ma
778
779
  function jr(a){if(8<a.g.byteLength)throw new P(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new P(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function kr(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new er(a.g);for(var n=null,r=null;a.xa();){var q=fr(a);if(187==q.id){var u=lr(q);u&&(q=c*u.wj,u=b+u.cj,null!=n&&m.push(new Ph(n+g,q+g,l,r,u-1,f,g,h,k)),n=q,r=u)}}null!=n&&m.push(new Ph(n+g,d+g,l,r,null,f,g,h,k));return m}
779
780
  function lr(a){var b=new er(a.g);a=fr(b);if(179!=a.id)throw new P(2,3,3013);a=jr(a);b=fr(b);if(183!=b.id)throw new P(2,3,3012);b=new er(b.g);for(var c=0;b.xa();){var d=fr(b);if(241==d.id){c=jr(d);break}}return{wj:a,cj:c}};function mr(a,b,c){b=Zq(a,b,"Initialization");if(!b)return null;var d=a.P.zb(),e=b.getAttribute("sourceURL");e&&(d=zb(d,[e]));e=0;var f=null;if(b=Fg(b,"range",Ig))e=b.start,f=b.end;return new Nh(function(){return d},e,f,nr(a),null,null,c)}
780
781
  function or(a,b,c){var d=Number(Yq(a,pr,"presentationTimeOffset"))||0,e=Yq(a,pr,"timescale"),f=1;e&&(f=Kg(e)||1);var g=d/f||0,h=mr(a,pr,c);qr(a,h);var k=Bd(a);return{Kc:function(){var l=Zq(k,pr,"RepresentationIndex");var m=k.P.zb();l&&(l=l.getAttribute("sourceURL"))&&(m=zb(m,[l]));l=rr(k);return sr(k,b,h,m,l.start,l.end,g)}}}
781
- function sr(a,b,c,d,e,f,g){var h,k,l,m,n,r,q,u,v,x,z,y,B,A,C;return K(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Wb||!a.ma.Mf,l=a.ma.start,m=a.ma.duration,n=a.P.mimeType.split("/")[1],r=b,q=null,u=[r(d,e,f,!1),"webm"==n?r(c.ba(),c.hb,c.Na,!0):null],r=null,D(E,Promise.all(u),2);v=E.h;x=v[0];z=v[1]||null;y=null;B=l-g;A=l;C=m?l+m:Infinity;if("mp4"==n)var I=cr(x,e,d,c,B,A,C);else{I=new er(z);if(440786851!=fr(I).id)throw new P(2,3,3008);var G=fr(I);if(408125543!=G.id)throw new P(2,3,3009);
782
+ function sr(a,b,c,d,e,f,g){var h,k,l,m,n,r,q,u,v,x,z,y,B,A,C;return K(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Yb||!a.ma.Mf,l=a.ma.start,m=a.ma.duration,n=a.P.mimeType.split("/")[1],r=b,q=null,u=[r(d,e,f,!1),"webm"==n?r(c.ba(),c.hb,c.Na,!0):null],r=null,D(E,Promise.all(u),2);v=E.h;x=v[0];z=v[1]||null;y=null;B=l-g;A=l;C=m?l+m:Infinity;if("mp4"==n)var I=cr(x,e,d,c,B,A,C);else{I=new er(z);if(440786851!=fr(I).id)throw new P(2,3,3008);var G=fr(I);if(408125543!=G.id)throw new P(2,3,3009);
782
783
  I=G.g.byteOffset;G=new er(G.g);for(var H=null;G.xa();){var J=fr(G);if(357149030==J.id){H=J;break}}if(!H)throw new P(2,3,3010);H=new er(H.g);J=1E6;for(G=null;H.xa();){var M=fr(H);if(2807729==M.id)J=jr(M);else if(17545==M.id)if(4==M.g.byteLength)G=M.g.getFloat32(0);else if(8==M.g.byteLength)G=M.g.getFloat64(0);else throw new P(2,3,3003);}if(null==G)throw new P(2,3,3011);H=J/1E9;G*=H;J=fr(new er(x));if(475249515!=J.id)throw new P(2,3,3007);I=kr(J,I,H,G,d,c,B,A,C)}y=I;h.Dd(y);q=new Oj(y);k&&q.Ic(A,C,
783
784
  !0);return E.return(q)})}function pr(a){return a.Ld}function rr(a){var b=Zq(a,pr,"RepresentationIndex");a=Yq(a,pr,"indexRange");a=Ig(a||"");b&&(a=Fg(b,"range",Ig,a));return a}function qr(a,b){tr(a,b);if(!rr(a))throw new P(2,4,4002);}function tr(a,b){var c=a.P.mimeType.split("/")[1];if(a.P.contentType!=Gb&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
784
- function nr(a){var b=a.P;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.De,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function ur(a,b,c){var d=mr(a,vr,c),e=wr(a);if(!e.Pa&&!e.timeline&&1<e.Rc.length)throw new P(2,4,4002);if(!e.Pa&&!a.ma.duration&&!e.timeline&&1==e.Rc.length)throw new P(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new P(2,4,4002);var f=null,g=null;a.Ka.id&&a.P.id&&(g=b[a.Ka.id+","+a.P.id])&&(f=g.segmentIndex);var h=xr(a.ma.start,a.ma.duration,a.P.zb,e,d,c);b=!f;f?f.Cd(h,a.presentationTimeline.Ab()):f=new Oj(h);a.presentationTimeline.Dd(h);a.Wb&&a.ma.Mf||f.Ic(a.ma.start,a.ma.duration?a.ma.start+
785
- a.ma.duration:Infinity,b);g&&(g.segmentIndex=f);return{Kc:function(){f&&0!=f.rc()||f.ze(h);return Promise.resolve(f)}}}function vr(a){return a.ec}function wr(a){var b=yr(a);a=Xq(a,vr);var c=a.Nd;0==c&&(c=1);var d=0;a.Pa?d=a.Pa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Pa:a.Pa,startTime:d,Nd:c,Rb:a.Rb,timeline:a.timeline,Rc:b}}
786
- function xr(a,b,c,d,e,f){var g=d.Rc.length;d.timeline&&d.timeline.length!=d.Rc.length&&(g=Math.min(d.timeline.length,d.Rc.length));for(var h=a-d.Rb,k=b?a+b:Infinity,l=[],m=d.startTime,n={},r=0;r<g;n={kd:n.kd,fd:n.fd},r++){n.fd=d.Rc[r];var q=void 0;q=null!=d.Pa?m+d.Pa:d.timeline?d.timeline[r].end:m+b;n.kd=null;l.push(new Ph(a+m,a+q,function(u){return function(){null==u.kd&&(u.kd=zb(c(),[u.fd.Vi]));return u.kd}}(n),n.fd.start,n.fd.end,e,h,a,k,[],"",null,null,Qh,f));m=q}return l}
787
- function yr(a){return[a.P.ec,a.Ea.ec,a.Ka.ec].filter(zd).map(function(b){return xg(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Zg&&(a.Zg=!0);var c=b.getAttribute("media");b=Fg(b,"mediaRange",Ig,{start:0,end:null});return{Vi:c,start:b.start,end:b.end}})};function zr(a,b,c,d,e,f,g){var h=Ar(a,g),k=Br(a);Cr(k);var l=Bd(a);if(k.xd)return tr(a,h),{Kc:function(){var u=Wq(k.xd,l.P.id,null,null,l.bandwidth||null,null);u=zb(l.P.zb(),[u]);return sr(l,b,h,u,0,null,k.Rb)}};if(k.Pa)return d||"image"===a.Ea.contentType||(a.presentationTimeline.Wf(k.Pa),a.presentationTimeline.Ce(a.ma.start)),{Kc:function(){return Dr(l,k,e,h,f,g)}};var m=null;d=d=null;a.Ka.id&&a.P.id&&(d=a.Ka.id+","+a.P.id,d=c[d])&&(m=d.segmentIndex);var n=a.ma.start,r=a.ma.duration?n+a.ma.duration:
788
- Infinity,q=!(a.Wb&&a.ma.Mf);m?(c=m,Er(c,k,n,r,q,h),c.yb(a.presentationTimeline.Ab())):m=new Fr(k,a.P.id,a.bandwidth,a.P.zb,n,r,h,q,g,a.P.hg);k.timeline&&"image"!==a.Ea.contentType&&a.presentationTimeline.hh(k.timeline,n);d&&a.Wb&&(d.segmentIndex=m);return{Kc:function(){m instanceof Fr&&0==m.rc()&&Er(m,k,n,r,q,h);return Promise.resolve(m)}}}function Gr(a){return a.Md}
789
- function Br(a){var b=Xq(a,Gr),c=Yq(a,Gr,"media");a=Yq(a,Gr,"index");return{Pa:b.Pa,timescale:b.timescale,Nd:b.Nd,Rb:b.Rb,yg:b.yg,timeline:b.timeline,Sc:c,xd:a}}function Cr(a){var b=a.xd?1:0;b+=a.timeline?1:0;b+=a.Pa?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.xd&&(a.timeline=null),a.Pa=null);if(!a.xd&&!a.Sc)throw new P(2,4,4002);}
790
- function Dr(a,b,c,d,e,f){function g(J){var M=(J-u)*q,N=M+b.Rb,Q=M+m;M=Q+q;var Y=Math.min(M,k());Q=new Ph(Q,Y,function(){var aa=N*v;"BigInt"in window&&aa>Number.MAX_SAFE_INTEGER&&(aa=BigInt(N)*BigInt(v));aa=Wq(x,y,J,null,z,aa);return zb(B(),[aa])},0,null,d,A,m,k(),[],"",null,null,Qh,f);Q.h=M;return Q}function h(){var J=[Math.max(l.Ab(),m),Math.min(l.Zb(),k())].map(function(M){return M-m});return[Math.ceil(J[0]/q),Math.ceil(J[1]/q)-1].map(function(M){return M+u})}function k(){var J=null!=n&&e[n]||r;
791
- return J?m+J:Infinity}var l=a.presentationTimeline,m=a.ma.start,n=a.Ka.id,r=a.ma.duration,q=b.Pa,u=b.Nd,v=b.timescale,x=b.Sc,z=a.bandwidth||null,y=a.P.id,B=a.P.zb,A=m-b.Rb,C=h();a=a.Wb?Math.max(C[0],C[1]-c+1):C[0];C=C[1];c=[];for(var E=a;E<=C;++E){var I=g(E);c.push(I)}var G=new Oj(c);c=l.Zb()<k();E=l.R();if(c||E){var H=Math.max(a,C+1);G.Qe(q,function(){var J=l.Ab();G.yb(J);var M=t(h());M.next();M=M.next().value;for(var N=[];H<=M;){var Q=g(H);N.push(Q);H++}return J>k()&&!N.length?null:N})}return Promise.resolve(G)}
792
- function Ar(a,b){var c=Yq(a,Gr,"initialization");if(!c)return null;var d=a.P.id,e=a.bandwidth||null,f=a.P.zb;return new Nh(function(){var g=Wq(c,d,null,null,e,null);return zb(f(),[g])},0,null,nr(a),null,null,b)}function Fr(a,b,c,d,e,f,g,h,k,l){Oj.call(this,[]);this.h=a;this.H=b;this.D=c;this.G=d;this.i=e;this.m=f;this.u=g;this.C=k;this.I=l;h&&Hr(this)}pa(Fr,Oj);p=Fr.prototype;p.rc=function(){return this.h?this.h.timeline.length:0};p.release=function(){Oj.prototype.release.call(this);this.h=null};
793
- p.yb=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.rc()&&this.release())}};function Er(a,b,c,d,e,f){a.u=f;if(a.h){c=a.h.timeline;a.h.Sc=b.Sc;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,w(b));a.m!==d&&(a.m=d)}else a.h=b,a.i=c,a.m=d;e&&Hr(a)}
794
- function Hr(a){if(!a.s){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.m)b.pop();else break;a.yb(a.i);0!==b.length&&Infinity!==a.m&&(b[b.length-1].end=a.m-a.i)}}
795
- p.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.i)return this.j;if(!this.h)return null;var b=this.h.timeline;if(a<this.i||a>this.m)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=e.end+this.i;d<c&&(e=b[d+1].start+this.i);if(a>=f&&a<e)return d+this.j}return null};
796
- p.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.rc()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.Sc,e=this.h.timeline[a],f=e.nj,g=this.h.yg+e.zg;c=this.i-this.h.Rb;for(var h=[],k=(e.end-e.start)/e.Bb,l={},m=0;m<e.Bb;l={ld:l.ld,$e:l.$e},m++){var n=e.start+k*m,r=n+k;l.$e=m+1;l.ld=null;n=new Ph(this.i+n,this.i+r,function(q){return function(){if(!b.h)return[];null==q.ld&&(q.ld=Ir(b.h.Sc,b.H,f,b.D,g,q.$e,b.G));return q.ld}}(l),0,null,this.u,c,this.i,this.m,[],"",null,null,Qh,this.C);
797
- 0==this.I?0<m&&n.xe():0!=m%this.I&&n.xe();h.push(n)}c=new Ph(this.i+e.start,this.i+e.end,function(){return 0<e.Bb?[]:Ir(d,b.H,f,b.D,g,null,b.G)},0,null,this.u,c,this.i,this.m,h,"",null,null,Qh,this.C,0<e.Bb);this.g[a]=c}return c};function Ir(a,b,c,d,e,f,g){a=Wq(a,b,c,f,d||null,e);return zb(g(),[a]).map(function(h){return h.toString()})};function Jr(a){this.s=null;this.C=a;this.I=new uf;this.j=[];this.h=null;this.m=[];this.D=null;this.H=[];this.G=300;this.l=new Map;this.i=new Map;this.g=null;this.u="UNKNOWN"}Jr.prototype.configure=function(a){this.s=a};Jr.prototype.destroy=function(){this.C=this.s=null;this.j=[];this.h=null;this.m=[];this.H=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.I.destroy()};Jr.prototype.setManifestType=function(a){this.u=a};
785
+ function nr(a){var b=a.P;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.De,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function ur(a,b,c){var d=mr(a,vr,c),e=wr(a);if(!e.Pa&&!e.timeline&&1<e.Rc.length)throw new P(2,4,4002);if(!e.Pa&&!a.ma.duration&&!e.timeline&&1==e.Rc.length)throw new P(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new P(2,4,4002);var f=null,g=null;a.Ka.id&&a.P.id&&(g=b[a.Ka.id+","+a.P.id])&&(f=g.segmentIndex);var h=xr(a.ma.start,a.ma.duration,a.P.zb,e,d,c);b=!f;f?f.Cd(h,a.presentationTimeline.Ab()):f=new Oj(h);a.presentationTimeline.Dd(h);a.Yb&&a.ma.Mf||f.Ic(a.ma.start,a.ma.duration?a.ma.start+
786
+ a.ma.duration:Infinity,b);g&&(g.segmentIndex=f);return{Kc:function(){f&&0!=f.$b()||f.ze(h);return Promise.resolve(f)}}}function vr(a){return a.fc}function wr(a){var b=yr(a);a=Xq(a,vr);var c=a.Nd;0==c&&(c=1);var d=0;a.Pa?d=a.Pa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Pa:a.Pa,startTime:d,Nd:c,Tb:a.Tb,timeline:a.timeline,Rc:b}}
787
+ function xr(a,b,c,d,e,f){var g=d.Rc.length;d.timeline&&d.timeline.length!=d.Rc.length&&(g=Math.min(d.timeline.length,d.Rc.length));for(var h=a-d.Tb,k=b?a+b:Infinity,l=[],m=d.startTime,n={},r=0;r<g;n={kd:n.kd,fd:n.fd},r++){n.fd=d.Rc[r];var q=void 0;q=null!=d.Pa?m+d.Pa:d.timeline?d.timeline[r].end:m+b;n.kd=null;l.push(new Ph(a+m,a+q,function(u){return function(){null==u.kd&&(u.kd=zb(c(),[u.fd.Vi]));return u.kd}}(n),n.fd.start,n.fd.end,e,h,a,k,[],"",null,null,Qh,f));m=q}return l}
788
+ function yr(a){return[a.P.fc,a.Ea.fc,a.Ka.fc].filter(zd).map(function(b){return xg(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Zg&&(a.Zg=!0);var c=b.getAttribute("media");b=Fg(b,"mediaRange",Ig,{start:0,end:null});return{Vi:c,start:b.start,end:b.end}})};function zr(a,b,c,d,e,f,g){var h=Ar(a,g),k=Br(a);Cr(k);var l=Bd(a);if(k.xd)return tr(a,h),{Kc:function(){var u=Wq(k.xd,l.P.id,null,null,l.bandwidth||null,null);u=zb(l.P.zb(),[u]);return sr(l,b,h,u,0,null,k.Tb)}};if(k.Pa)return d||"image"===a.Ea.contentType||(a.presentationTimeline.Wf(k.Pa),a.presentationTimeline.Ce(a.ma.start)),{Kc:function(){return Dr(l,k,e,h,f,g)}};var m=null;d=d=null;a.Ka.id&&a.P.id&&(d=a.Ka.id+","+a.P.id,d=c[d])&&(m=d.segmentIndex);var n=a.ma.start,r=a.ma.duration?n+a.ma.duration:
789
+ Infinity,q=!(a.Yb&&a.ma.Mf);m?(c=m,Er(c,k,n,r,q,h),c.yb(a.presentationTimeline.Ab())):m=new Fr(k,a.P.id,a.bandwidth,a.P.zb,n,r,h,q,g,a.P.hg);k.timeline&&"image"!==a.Ea.contentType&&a.presentationTimeline.hh(k.timeline,n);d&&a.Yb&&(d.segmentIndex=m);return{Kc:function(){m instanceof Fr&&0==m.$b()&&Er(m,k,n,r,q,h);return Promise.resolve(m)}}}function Gr(a){return a.Md}
790
+ function Br(a){var b=Xq(a,Gr),c=Yq(a,Gr,"media");a=Yq(a,Gr,"index");return{Pa:b.Pa,timescale:b.timescale,Nd:b.Nd,Tb:b.Tb,yg:b.yg,timeline:b.timeline,Sc:c,xd:a}}function Cr(a){var b=a.xd?1:0;b+=a.timeline?1:0;b+=a.Pa?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.xd&&(a.timeline=null),a.Pa=null);if(!a.xd&&!a.Sc)throw new P(2,4,4002);}
791
+ function Dr(a,b,c,d,e,f){function g(J){var M=(J-u)*q,N=M+b.Tb,Q=M+m;M=Q+q;var Y=Math.min(M,k());Q=new Ph(Q,Y,function(){var aa=N*v;"BigInt"in window&&aa>Number.MAX_SAFE_INTEGER&&(aa=BigInt(N)*BigInt(v));aa=Wq(x,y,J,null,z,aa);return zb(B(),[aa])},0,null,d,A,m,k(),[],"",null,null,Qh,f);Q.h=M;return Q}function h(){var J=[Math.max(l.Ab(),m),Math.min(l.ac(),k())].map(function(M){return M-m});return[Math.ceil(J[0]/q),Math.ceil(J[1]/q)-1].map(function(M){return M+u})}function k(){var J=null!=n&&e[n]||r;
792
+ return J?m+J:Infinity}var l=a.presentationTimeline,m=a.ma.start,n=a.Ka.id,r=a.ma.duration,q=b.Pa,u=b.Nd,v=b.timescale,x=b.Sc,z=a.bandwidth||null,y=a.P.id,B=a.P.zb,A=m-b.Tb,C=h();a=a.Yb?Math.max(C[0],C[1]-c+1):C[0];C=C[1];c=[];for(var E=a;E<=C;++E){var I=g(E);c.push(I)}var G=new Oj(c);c=l.ac()<k();E=l.R();if(c||E){var H=Math.max(a,C+1);G.Qe(q,function(){var J=l.Ab();G.yb(J);var M=t(h());M.next();M=M.next().value;for(var N=[];H<=M;){var Q=g(H);N.push(Q);H++}return J>k()&&!N.length?null:N})}return Promise.resolve(G)}
793
+ function Ar(a,b){var c=Yq(a,Gr,"initialization");if(!c)return null;var d=a.P.id,e=a.bandwidth||null,f=a.P.zb;return new Nh(function(){var g=Wq(c,d,null,null,e,null);return zb(f(),[g])},0,null,nr(a),null,null,b)}function Fr(a,b,c,d,e,f,g,h,k,l){Oj.call(this,[]);this.h=a;this.H=b;this.D=c;this.G=d;this.i=e;this.l=f;this.u=g;this.C=k;this.I=l;h&&Hr(this)}pa(Fr,Oj);p=Fr.prototype;p.$b=function(){return this.h?this.h.timeline.length:0};p.release=function(){Oj.prototype.release.call(this);this.h=null};
794
+ p.yb=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.i<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.j+=b,0===this.$b()&&this.release())}};function Er(a,b,c,d,e,f){a.u=f;if(a.h){c=a.h.timeline;a.h.Sc=b.Sc;var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,w(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&Hr(a)}
795
+ function Hr(a){if(!a.s){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.yb(a.i)}}p.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.i)return this.j;if(!this.h)return null;var b=this.h.timeline;if(a<this.i||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.i;e=d<c?b[d+1].start+this.i:Infinity===this.l?e.end+this.i:this.l;if(a>=f&&a<e)return d+this.j}return null};
796
+ p.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.$b()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.Sc,e=this.h.timeline[a],f=e.nj,g=this.h.yg+e.zg;c=this.i-this.h.Tb;var h=this.i+e.end,k=h;a===this.$b()-1&&Infinity!==this.l&&(k=this.l);for(var l=[],m=(e.end-e.start)/e.Bb,n={},r=0;r<e.Bb;n={ld:n.ld,$e:n.$e},r++){var q=e.start+m*r,u=q+m;n.$e=r+1;n.ld=null;q=new Ph(this.i+q,this.i+u,function(v){return function(){if(!b.h)return[];null==v.ld&&(v.ld=Ir(b.h.Sc,b.H,f,b.D,g,v.$e,b.G));return v.ld}}(n),
797
+ 0,null,this.u,c,this.i,this.l,[],"",null,null,Qh,this.C);0==this.I?0<r&&q.xe():0!=r%this.I&&q.xe();l.push(q)}c=new Ph(this.i+e.start,k,function(){return 0<e.Bb?[]:Ir(d,b.H,f,b.D,g,null,b.G)},0,null,this.u,c,this.i,this.l,l,"",null,null,Qh,this.C,0<e.Bb);c.h=h;this.g[a]=c}return c};function Ir(a,b,c,d,e,f,g){a=Wq(a,b,c,f,d||null,e);return zb(g(),[a]).map(function(h){return h.toString()})};function Jr(a){this.s=null;this.C=a;this.I=new uf;this.j=[];this.h=null;this.m=[];this.D=null;this.H=[];this.G=300;this.l=new Map;this.i=new Map;this.g=null;this.u="UNKNOWN"}Jr.prototype.configure=function(a){this.s=a};Jr.prototype.destroy=function(){this.C=this.s=null;this.j=[];this.h=null;this.m=[];this.H=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.I.destroy()};Jr.prototype.setManifestType=function(a){this.u=a};
798
798
  function Kr(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g)return c=zb(a.j,[Lr(a,b)]),d=Af(c,a.s.retryParameters),e=a.C.networkingEngine.request(8,d),vf(a.I,e),ta(l,2),D(l,e.promise,4);if(2!=l.g)return f=l.h,g=Tf(f.data),h=JSON.parse(g),1==h.VERSION&&Mr(a,h,f.uri),va(l,0);if((k=wa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Dd(function(){Kr(a,b)});a.g.S(a.G);F(l)})}
799
799
  function Lr(a,b){if(!a.m.length)return b;b=new fb(b);var c=a.D||a.m[0],d=Math.round(a.C.getBandwidthEstimate()),e=b.g;"DASH"==a.u?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.u&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));xb(e)&&kb(b,e);return b.toString()}function Mr(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Dd(function(){Kr(a,d)});if(c=b.TTL)a.G=c;a.g.S(a.G);a.m=b["PATHWAY-PRIORITY"]||[];a.H=b["PATHWAY-CLONES"]||[]}
800
800
  function Nr(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}
801
- function Or(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={kc:e.kc},g=f.next())if(e.kc=g.value,g=b.get(e.kc))d.push({cg:e.kc,location:g});else if(g=a.H.find(function(k){return function(l){return l.Nj==k.kc}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].Dh?(h=new fb(h),hb(h,g["URI-REPLACEMENT"].Dh),d.push({cg:e.kc,location:h.toString()})):d.push({cg:e.kc,location:h}))}e=Date.now();f=t(a.i.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
801
+ function Or(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e={},f=t(a.m),g=f.next();!g.done;e={lc:e.lc},g=f.next())if(e.lc=g.value,g=b.get(e.lc))d.push({cg:e.lc,location:g});else if(g=a.H.find(function(k){return function(l){return l.Nj==k.lc}}(e))){var h=b.get(g["BASE-ID"]);h&&(g["URI-REPLACEMENT"].Dh?(h=new fb(h),hb(h,g["URI-REPLACEMENT"].Dh),d.push({cg:e.lc,location:h.toString()})):d.push({cg:e.lc,location:h}))}e=Date.now();f=t(a.i.keys());for(g=f.next();!g.done;g=f.next())g=g.value,
802
802
  h=a.i.get(g),e>h&&a.i.delete(g);d=d.filter(function(k){for(var l=t(a.i.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new fb(k.location)).Kb))return!1;return!0});d.length&&(a.D=d[0].cg);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(f=b.get(g.value))a.D=a.h,d.push(f);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:zb(a.j,d)};function Pr(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.m=!1;this.s=new Set}p=Pr.prototype;p.release=function(){for(var a=t(this.h.concat(this.g,this.l,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.l=[];this.i=[];this.j=[]};p.Ci=function(){return this.j};p.Jf=function(){return this.l.slice()};p.ei=function(){return this.i};
803
803
  function Qr(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Rr(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Sr(n),n]})),l=new Map(h.textStreams.map(function(n){return[Tr(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Ur(n),n]}));if(b){var m=Vr(Gb);l.set(Tr(m),m);m=Vr("image");h.set(Ur(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Fg:c,Ah:d,wh:e,Yg:f}}
804
804
  p.Kg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A,C,E,I,G,H,J,M,N,Q,Y,aa;return K(function(da){if(1==da.g){d=Hb;if(!b&&1==a.length)return e=Qr(a,!1),f=e.Fg,g=e.Ah,h=e.wh,k=e.Yg,c.h=Array.from(f[0].values()),c.g=Array.from(g[0].values()),c.l=Array.from(h[0].values()),c.i=Array.from(k[0].values()),da.F(2);l=-1;for(m=0;m<a.length;m++)n=a[m],c.s.has(n.id)||(c.s.add(n.id),-1==l&&(l=m));if(-1==l)return da.return();r=Qr(a,!0);q=r.Fg;u=r.Ah;v=r.wh;x=r.Yg;return D(da,Promise.all([Wr(c,c.h,
@@ -820,30 +820,31 @@ b)}function ds(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.d
820
820
  function is(a,b,c){var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=ls(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
821
821
  function ls(a,b,c){var d=null,e=(0,{audio:Rr,video:Sr,text:Tr,image:Ur}[c.type])(c);if(b.has(e))d=b.get(e);else{e={audio:function(h,k){return hs(a,h,k)},video:function(h,k){return hs(a,h,k)},text:ms,image:ns}[c.type];var f={audio:os,video:ps,text:qs,image:rs}[c.type];b=t(b.values());for(var g=b.next();!g.done;g=b.next())g=g.value,!e(c,g)||c.fastSwitching!=g.fastSwitching||d&&!f(c,d,g)||(d=g)}return d}
822
822
  function ss(a,b){function c(d){if(!ts.has(d)){var e=hd(d);ts.set(d,e)}return ts.get(d)}return a.mimeType!=b.mimeType?!1:c(a.codecs)==c(b.codecs)}function hs(a,b,c){return!ss(b,c)&&!a.m||b.drmInfos&&!Dh(b.drmInfos,c.drmInfos)?!1:!0}function ms(a,b){return b.language?a.forced!==b.forced||0==Rb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function ns(){return!0}
823
- function os(a,b,c){var d=ss(a,b),e=ss(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Rb(a.language,b.language);e=Rb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;
824
- if(b.primary&&!c.primary)return!1;d=us(a.channelsCount,b.channelsCount,c.channelsCount);if(d==vs)return!0;if(d==ws)return!1;d=us(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==vs?!0:d==ws?!1:a.bandwidth&&xs(a.bandwidth,b.bandwidth,c.bandwidth)==vs?!0:!1}
823
+ function os(a,b,c){var d=ss(a,b),e=ss(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Rb(a.language,b.language);e=Rb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;
824
+ if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=us(a.channelsCount,b.channelsCount,c.channelsCount);if(d==vs)return!0;if(d==ws)return!1;d=us(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==vs?!0:d==ws?!1:a.bandwidth&&xs(a.bandwidth,b.bandwidth,c.bandwidth)==vs?!0:!1}
825
825
  function ps(a,b,c){var d=ss(a,b),e=ss(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=us(a.width*a.height,b.width*b.height,c.width*c.height);if(d==vs)return!0;if(d==ws)return!1;if(a.frameRate){d=us(a.frameRate,b.frameRate,c.frameRate);if(d==vs)return!0;if(d==ws)return!1}return a.bandwidth&&xs(a.bandwidth,b.bandwidth,c.bandwidth)==vs?!0:!1}
826
- function qs(a,b,c){var d=Rb(a.language,b.language),e=Rb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=
827
- a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function rs(a,b,c){return us(a.width*a.height,b.width*b.height,c.width*c.height)==vs?!0:!1}function bs(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1}}
826
+ function qs(a,b,c){var d=Rb(a.language,b.language),e=Rb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;
827
+ if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function rs(a,b,c){return us(a.width*a.height,b.width*b.height,c.width*c.height)==vs?!0:!1}
828
+ function bs(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1}}
828
829
  function Vr(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Oj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1}}
829
830
  function us(a,b,c){if(b==a&&a!=c)return ws;if(c==a&&a!=b)return vs;if(b>a){if(c<=a||c-a<b-a)return vs;if(c-a>b-a)return ws}else{if(c>a)return ws;if(a-c<a-b)return vs;if(a-c>a-b)return ws}return ys}function xs(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?vs:b<a?ws:ys}function gs(a){switch(a.type){case Gb:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
830
831
  function Sr(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,a.codecs,a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function Rr(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,a.codecs,a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function Tr(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
831
832
  function Ur(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}L("shaka.util.PeriodCombiner",Pr);Pr.prototype.combinePeriods=Pr.prototype.Kg;Pr.prototype.getImageStreams=Pr.prototype.ei;Pr.prototype.getTextStreams=Pr.prototype.Jf;Pr.prototype.getVariants=Pr.prototype.Ci;var vs=1,ys=0,ws=-1,ts=new Map;function zs(){var a=this;this.i=this.h=null;this.s=[];this.j=null;this.K=1;this.m={};this.M={};this.l=new Pr;this.H=0;this.J=new Yb(5);this.I=new Dd(function(){As(a)});this.G=new uf;this.C=null;this.L=[];this.D=Infinity;this.u=!1;this.g=null}p=zs.prototype;p.configure=function(a){this.h=a;this.g&&this.g.configure(this.h);this.l&&(this.l.m=this.h.dash.multiTypeVariantsAllowed&&fc())};
832
833
  p.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.u=b.isLowLatencyMode(),c.s=[a],c.i=b,D(e,Bs(c),2);d=e.h;c.i&&Cs(c,d);if(!c.i)throw new P(2,7,7001);return e.return(c.j)})};p.stop=function(){for(var a=t(Object.values(this.m)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.l&&this.l.release();this.h=this.i=null;this.s=[];this.j=null;this.m={};this.l=null;null!=this.I&&(this.I.stop(),this.I=null);this.g&&this.g.destroy();return this.G.destroy()};
833
- p.update=function(){var a=this,b;return K(function(c){if(1==c.g)return ta(c,2),D(c,Bs(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.i||!b)return c.return();a.i.onError(b);F(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.Zb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.H=b.endTime-a,Cs(this,0))}}};
834
+ p.update=function(){var a=this,b;return K(function(c){if(1==c.g)return ta(c,2),D(c,Bs(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.i||!b)return c.return();a.i.onError(b);F(c)})};p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(a){if(this.j&&this.j.presentationTimeline.R()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.j.presentationTimeline.ac();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.H=b.endTime-a,Cs(this,0))}}};
834
835
  p.banLocation=function(a){this.g&&this.g.i.set(a,Date.now()+6E4)};function Bs(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=a.s,1<a.s.length&&a.g&&(c=Or(a.g,"Location",!0),c.length&&(b=c)),d=Af(b,a.h.retryParameters),e=Date.now(),D(k,Ds(a,d,0,{type:4}),2);if(3!=k.g){f=k.h;if(!a.i)return k.return(0);f.uri&&f.uri!=f.originalUri&&!a.s.includes(f.uri)&&a.s.unshift(f.uri);return D(k,Es(a,f.data,f.uri),3)}g=Date.now();h=(g-e)/1E3;a.J.sample(1,h);return k.return(h)})}
835
836
  function Es(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=Rg(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.h.dash.disableXlinkProcessing)return k.return(Fs(a,d,c));f=a.h.dash.xlinkFailGracefully;g=br(d,a.h.retryParameters,f,c,a.i.networkingEngine);vf(a.G,g);return D(k,g.promise,2)}h=k.h;return k.return(Fs(a,h,c))})}
836
- function Fs(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A,C,E,I,G,H,J,M,N,Q,Y,aa,da,T,Ua,ib,Eb,bc,Lb,Ca,rb,Fb,cc,dc,sb,Td,vd,Ud,Dc,Vd,ii,Xe,Wd,Lc,id,lg,mg,yl,Xr,Yr;return K(function(jd){switch(jd.g){case 1:(d=a.h.dash.manifestPreprocessor)&&d(b);a.g&&a.g.l.clear();e=[c];f=[];g=new Map;h=xg(b,"Location");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=m.getAttribute("serviceLocation"),r=Dg(m))q=zb(e,[r])[0],n&&(a.g?Nr(a.g,"Location",n,q):g.set(n,q)),f.push(q);a.g?(u=Or(a.g,"Location",!0),
837
+ function Fs(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A,C,E,I,G,H,J,M,N,Q,Y,aa,da,T,Ua,ib,Eb,bc,Lb,Ca,rb,Fb,cc,dc,sb,Td,vd,Ud,Dc,Vd,ji,Ze,Wd,Lc,id,mg,ng,yl,Xr,Yr;return K(function(jd){switch(jd.g){case 1:(d=a.h.dash.manifestPreprocessor)&&d(b);a.g&&a.g.l.clear();e=[c];f=[];g=new Map;h=xg(b,"Location");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=m.getAttribute("serviceLocation"),r=Dg(m))q=zb(e,[r])[0],n&&(a.g?Nr(a.g,"Location",n,q):g.set(n,q)),f.push(q);a.g?(u=Or(a.g,"Location",!0),
837
838
  0<u.length&&(e=a.s=u)):f.length&&(e=a.s=f);v=Promise.resolve();if((x=wg(b,"ContentSteering"))&&a.i){z=x.getAttribute("defaultServiceLocation");if(a.g)a.g.j=e,a.g.h=z;else if(a.g=new Jr(a.i),a.g.configure(a.h),a.g.setManifestType("DASH"),a.g.j=e,a.g.h=z,y=Dg(x))(B=Fg(x,"queryBeforeStart",Ng,!1))?v=Kr(a.g,y):Kr(a.g,y);A=t(g.keys());for(C=A.next();!C.done;C=A.next())E=C.value,I=g.get(E),Nr(a.g,"Location",E,I)}G=xg(b,"BaseURL");J=!1;if(a.g)for(M=t(G),N=M.next();!N.done;N=M.next())Q=N.value,Y=Q.getAttribute("serviceLocation"),
838
839
  aa=Dg(Q),Y&&aa&&(Nr(a.g,"BaseURL",Y,aa),J=!0);J&&a.g||(da=G.map(Dg),H=zb(e,da));T=function(){return a.g&&J?Or(a.g,"BaseURL"):H?H:[]};Ua=0;G&&G.length&&(Ua=Fg(G[0],"availabilityTimeOffset",Mg)||0);ib=a.h.dash.ignoreMinBufferTime;Eb=0;ib||(Eb=Fg(b,"minBufferTime",Hg)||0);a.H=Fg(b,"minimumUpdatePeriod",Hg,-1);bc=Fg(b,"availabilityStartTime",Gg);Lb=Fg(b,"timeShiftBufferDepth",Hg);Ca=a.h.dash.ignoreSuggestedPresentationDelay;rb=null;Ca||(rb=Fg(b,"suggestedPresentationDelay",Hg));Fb=a.h.dash.ignoreMaxSegmentDuration;
839
- cc=null;Fb||(cc=Fg(b,"maxSegmentDuration",Hg));dc=b.getAttribute("type")||"static";if(a.j)for(sb=a.j.presentationTimeline,Td=t(Object.values(a.m)),vd=Td.next();!vd.done;vd=Td.next())Ud=vd.value,Ud.segmentIndex&&Ud.segmentIndex.yb(sb.Ab());else Dc=a.h.defaultPresentationDelay||1.5*Eb,Vd=null!=rb?rb:Dc,sb=new sj(bc,Vd,a.h.dash.autoCorrectDrift);sb.Vc("static"==dc);(ii=sb.R())&&!isNaN(a.h.availabilityWindowOverride)&&(Lb=a.h.availabilityWindowOverride);null==Lb&&(Lb=Infinity);sb.Ne(Lb);Xe=b.getAttribute("profiles")||
840
- "";Wd={Wb:"static"!=dc,presentationTimeline:sb,Ka:null,ma:null,Ea:null,P:null,bandwidth:0,Zg:!1,Hc:Ua,profiles:Xe.split(",")};Lc=Gs(a,Wd,T,b);id=Lc.duration;lg=Lc.periods;"static"!=dc&&Lc.Pg||sb.gb(id||Infinity);a.D&&!a.u&&(mg=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.u=a.i.isLowLatencyMode());a.u?sb.mh(a.D):a.D&&Ra("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.");
841
- sb.Wf(cc||1);return D(jd,a.l.Kg(lg,Wd.Wb),2);case 2:return D(jd,v,3);case 3:a.u&&(Eb=0);if(a.j){a.j.variants=a.l.j;yl=a.l.Jf();0<yl.length&&(a.j.textStreams=yl);a.j.imageStreams=a.l.i;a.i.filter(a.j);jd.F(4);break}a.j={presentationTimeline:sb,variants:a.l.j,textStreams:a.l.Jf(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:Eb||0,sequenceMode:a.h.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Hs(b)};if(!sb.yh()){jd.F(5);break}Xr=xg(b,"UTCTiming");
840
+ cc=null;Fb||(cc=Fg(b,"maxSegmentDuration",Hg));dc=b.getAttribute("type")||"static";if(a.j)for(sb=a.j.presentationTimeline,Td=t(Object.values(a.m)),vd=Td.next();!vd.done;vd=Td.next())Ud=vd.value,Ud.segmentIndex&&Ud.segmentIndex.yb(sb.Ab());else Dc=a.h.defaultPresentationDelay||1.5*Eb,Vd=null!=rb?rb:Dc,sb=new sj(bc,Vd,a.h.dash.autoCorrectDrift);sb.Vc("static"==dc);(ji=sb.R())&&!isNaN(a.h.availabilityWindowOverride)&&(Lb=a.h.availabilityWindowOverride);null==Lb&&(Lb=Infinity);sb.Ne(Lb);Ze=b.getAttribute("profiles")||
841
+ "";Wd={Yb:"static"!=dc,presentationTimeline:sb,Ka:null,ma:null,Ea:null,P:null,bandwidth:0,Zg:!1,Hc:Ua,profiles:Ze.split(",")};Lc=Gs(a,Wd,T,b);id=Lc.duration;mg=Lc.periods;"static"!=dc&&Lc.Pg||sb.gb(id||Infinity);a.D&&!a.u&&(ng=a.i.isAutoLowLatencyMode())&&(a.i.enableLowLatencyMode(),a.u=a.i.isLowLatencyMode());a.u?sb.mh(a.D):a.D&&Ra("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.");
842
+ sb.Wf(cc||1);return D(jd,a.l.Kg(mg,Wd.Yb),2);case 2:return D(jd,v,3);case 3:a.u&&(Eb=0);if(a.j){a.j.variants=a.l.j;yl=a.l.Jf();0<yl.length&&(a.j.textStreams=yl);a.j.imageStreams=a.l.i;a.i.filter(a.j);jd.F(4);break}a.j={presentationTimeline:sb,variants:a.l.j,textStreams:a.l.Jf(),imageStreams:a.l.i,offlineSessionIds:[],minBufferTime:Eb||0,sequenceMode:a.h.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Hs(b)};if(!sb.yh()){jd.F(5);break}Xr=xg(b,"UTCTiming");
842
843
  return D(jd,Is(a,T,Xr),6);case 6:Yr=jd.h;if(!a.i)return jd.return();sb.nh(Yr);case 5:sb.ve();case 4:a.i.makeTextStreamsForClosedCaptions(a.j),F(jd)}})}
843
844
  function Hs(a){a=wg(a,"ServiceDescription");if(!a)return null;var b=wg(a,"Latency"),c=wg(a,"PlaybackRate");if(b&&b.getAttribute("max")||c){a=b&&b.getAttribute("max")?parseInt(b.getAttribute("max"),10)/1E3:null;var d=c?parseFloat(c.getAttribute("max")):null;b=b&&b.getAttribute("min")?parseInt(b.getAttribute("min"),10)/1E3:null;c=c?parseFloat(c.getAttribute("min")):null;return{maxLatency:a,maxPlaybackRate:d,minLatency:b,minPlaybackRate:c}}return null}
844
845
  function Gs(a,b,c,d){var e=Fg(d,"mediaPresentationDuration",Hg),f=[],g=0;d=xg(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Fg(k,"start",Hg,g),n=k.id,r=Fg(k,"duration",Hg),q=null;if(l){var u=Fg(l,"start",Hg);null!=u&&(q=u-m)}else null!=e&&(q=e-m);null==q&&(q=r);if(!(null!==a.C&&null!==n&&null!==m&&m<a.C)||a.L.includes(n)||h+1==d.length){null!==m&&(null===a.C||m>a.C)&&(a.C=m);g=Js(a,b,c,{start:m,duration:q,node:k,Mf:null==q||!l});f.push(g);b.Ka.id&&q&&(a.M[b.Ka.id]=q);if(null==q){g=
845
846
  null;break}g=m+q}}a.L=f.map(function(v){return v.id});return null!=e?{periods:f,duration:e,Pg:!1}:{periods:f,duration:g,Pg:!0}}
846
- function Js(a,b,c,d){b.Ka=Ks(a,d.node,null,c);b.ma=d;b.Ka.Hc=b.Hc;b.Ka.id||(b.Ka.id="__shaka_period_"+d.start);var e=xg(d.node,"EventStream");c=b.presentationTimeline.Ab();e=t(e);for(var f=e.next();!f.done;f=e.next())Ls(a,d.start,d.duration,f.value,c);c=xg(d.node,"AdaptationSet").map(function(m){return Ms(a,b,m)}).filter(zd);if(b.Wb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.gj);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
847
+ function Js(a,b,c,d){b.Ka=Ks(a,d.node,null,c);b.ma=d;b.Ka.Hc=b.Hc;b.Ka.id||(b.Ka.id="__shaka_period_"+d.start);var e=xg(d.node,"EventStream");c=b.presentationTimeline.Ab();e=t(e);for(var f=e.next();!f.done;f=e.next())Ls(a,d.start,d.duration,f.value,c);c=xg(d.node,"AdaptationSet").map(function(m){return Ms(a,b,m)}).filter(zd);if(b.Yb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.gj);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
847
848
  }d=c.filter(function(m){return!m.wg});c=c.filter(function(m){return m.wg});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.wg.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Xd:h.Xd},l=k.next())h.Xd=l.value,h.Xd.trickModeVideo=e.streams.find(function(m){return function(n){return hd(m.Xd.codecs)==hd(n.codecs)}}(h))}}}c=Ns(a.h.disableAudio,d,"audio");e=Ns(a.h.disableVideo,d,"video");f=Ns(a.h.disableText,
848
849
  d,Gb);d=Ns(a.h.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new P(2,4,4004);return{id:b.Ka.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function Ns(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,w(e.streams));return d},[])}
849
850
  function Ms(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.Ea=Ks(a,c,b.Ka,null);var e=!1,f=xg(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(zd),h=void 0,k=b.Ea.contentType==Gb;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=
@@ -854,18 +855,18 @@ u?x="visually impaired":"2"==u&&(x="hard of hearing"));if(l)return null;l=xg(c,"
854
855
  k||f)return null;throw new P(2,4,4003);}if(!b.Ea.contentType||"application"==b.Ea.contentType)for(b.Ea.contentType=Ps(c[0].mimeType,c[0].codecs),k=t(c),q=k.next();!q.done;q=k.next())q.value.type=b.Ea.contentType;k=b.Ea.id||"__fake__"+a.K++;m=t(c);for(q=m.next();!q.done;q=m.next()){q=q.value;u=t(C.drmInfos);for(z=u.next();!z.done;z=u.next())z=z.value,z.keyIds=z.keyIds&&q.keyIds?new Set([].concat(w(z.keyIds),w(q.keyIds))):z.keyIds||q.keyIds;a.h.dash.enableAudioGroups&&(q.groupId=k)}l=l.map(function(G){return G.getAttribute("id")}).filter(zd);
855
856
  return{id:k,contentType:b.Ea.contentType,language:E,yk:e,streams:c,drmInfos:C.drmInfos,wg:f,gj:l}}
856
857
  function Os(a,b,c,d,e,f,g,h,k,l,m){b.P=Ks(a,l,b.Ea,null);a.D=Math.min(a.D,b.P.Hc);if(!Qs(b.P))return null;var n=b.ma.start;b.bandwidth=Fg(l,"bandwidth",Kg)||0;var r=b.P.contentType,q=r==Gb||"application"==r;r="image"==r;try{var u=void 0;if(c.gf){var v=b.P.zb,x=zb(v(),[c.gf.Qi]),z=Af(x,a.h.retryParameters);u={method:"AES-128",iv:c.gf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var H,J,M;return K(function(N){if(1==N.g)return D(N,Ds(a,z,6),2);if(3!=N.g){H=N.h;if(!H.data||16!=H.data.byteLength)throw new P(2,
857
- 4,4049);J={name:"AES-CBC"};M=u;return D(N,window.crypto.subtle.importKey("raw",H.data,J,!0,["decrypt"]),3)}M.cryptoKey=N.h;u.fetchKey=void 0;F(N)})}}}v=function(H,J,M,N){return Rs(a,H,J,M,N)};if(b.P.Ld)var y=or(b,v,u);else if(b.P.ec)y=ur(b,a.m,u);else if(b.P.Md)y=zr(b,v,a.m,!!a.j,a.h.dash.initialSegmentLimit,a.M,u);else{var B=b.ma.duration||0,A=b.P.zb;y={Kc:function(){return Promise.resolve(Rj(n,B,A()))}}}}catch(H){if((q||r)&&4002==H.code)return null;throw H;}v=xg(l,"ContentProtection");v=Pq(v,c,
858
+ 4,4049);J={name:"AES-CBC"};M=u;return D(N,window.crypto.subtle.importKey("raw",H.data,J,!0,["decrypt"]),3)}M.cryptoKey=N.h;u.fetchKey=void 0;F(N)})}}}v=function(H,J,M,N){return Rs(a,H,J,M,N)};if(b.P.Ld)var y=or(b,v,u);else if(b.P.fc)y=ur(b,a.m,u);else if(b.P.Md)y=zr(b,v,a.m,!!a.j,a.h.dash.initialSegmentLimit,a.M,u);else{var B=b.ma.duration||0,A=b.P.zb;y={Kc:function(){return Promise.resolve(Rj(n,B,A()))}}}}catch(H){if((q||r)&&4002==H.code)return null;throw H;}v=xg(l,"ContentProtection");v=Pq(v,c,
858
859
  a.h.dash.ignoreDrmInfo,a.h.dash.keySystemsByURI);v=new Set(v?[v]:[]);x=!1;xg(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(x=!0);var C=!1;q&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var E;if(r&&((l=xg(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
859
860
  (E=l.getAttribute("value")),!E))return null;var I;l=b.P.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"))&&(I="PQ");l=b.P.id?b.Ka.id+","+b.P.id:"";var G=l&&a.m[l]?a.m[l]:{id:a.K++,originalId:b.P.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.P.mimeType,
860
861
  codecs:b.P.codecs,frameRate:b.P.frameRate,pixelAspectRatio:b.P.pixelAspectRatio,bandwidth:b.bandwidth,width:b.P.width,height:b.P.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:v,language:e,originalLanguage:b.Ea.language,label:f,type:b.Ea.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.P.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.P.De,audioSamplingRate:b.P.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:I,videoLayout:void 0,tilesLayout:E,accessibilityPurpose:m,
861
- external:!1,fastSwitching:!1};G.createSegmentIndex=function(){var H;return K(function(J){if(1==J.g){if(G.segmentIndex)return J.F(0);H=G;return D(J,y.Kc(),3)}H.segmentIndex=J.h;F(J)})};l&&b.Wb&&!a.m[l]&&(a.m[l]=G);return G}
862
+ external:!1,fastSwitching:!1};G.createSegmentIndex=function(){var H;return K(function(J){if(1==J.g){if(G.segmentIndex)return J.F(0);H=G;return D(J,y.Kc(),3)}H.segmentIndex=J.h;F(J)})};l&&b.Yb&&!a.m[l]&&(a.m[l]=G);return G}
862
863
  function As(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,ta(d,2),D(d,Bs(a),4);case 4:b=d.h;va(d,3);break;case 2:if(c=wa(d),a.i){if(a.h.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c)}case 3:if(!a.i)return d.return();a.i.onManifestUpdated();Cs(a,b);F(d)}})}function Cs(a,b){0>a.H||a.I.S(Math.max(a.H-b,Zb(a.J)))}
863
864
  function Ks(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,De:null,audioSamplingRate:null,Hc:0,hg:0};d=d||c.zb;var e=b.getAttribute("id"),f=xg(b,"BaseURL"),g,h=!1;if(a.g)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.getAttribute("serviceLocation");m=Dg(m);l&&m&&(Nr(a.g,e,l,m),h=!0)}h&&a.g||(g=f.map(Dg));k=b.getAttribute("contentType")||c.contentType;l=b.getAttribute("mimeType")||c.mimeType;m=b.getAttribute("codecs")||
864
865
  c.codecs;var n=Fg(b,"frameRate",Og)||c.frameRate,r=b.getAttribute("sar")||c.pixelAspectRatio,q=Ss(xg(b,"InbandEventStream"),c.emsgSchemeIdUris),u=xg(b,"AudioChannelConfiguration");u=Ts(u)||c.De;var v=Fg(b,"audioSamplingRate",Lg)||c.audioSamplingRate;k||(k=Ps(l,m));var x=wg(b,"SegmentBase"),z=wg(b,"SegmentTemplate"),y=x?Fg(x,"availabilityTimeOffset",Mg)||0:0,B=z?Fg(z,"availabilityTimeOffset",Mg)||0:0,A=f&&f.length?Fg(f[0],"availabilityTimeOffset",Mg)||0:0;y=c.Hc+A+y+B;B=null;(A=wg(b,"SegmentSequenceProperties"))&&
865
- (A=wg(A,"SAP"))&&(B=Fg(A,"cadence",Jg));return{zb:function(){return zb(d(),f.length?a.g&&h?Or(a.g,e):g?g:[]:[])},Ld:x||c.Ld,ec:wg(b,"SegmentList")||c.ec,Md:z||c.Md,width:Fg(b,"width",Lg)||c.width,height:Fg(b,"height",Lg)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:r,emsgSchemeIdUris:q,id:e,language:b.getAttribute("lang"),De:u,audioSamplingRate:v,Hc:y,hg:B||c.hg}}
866
+ (A=wg(A,"SAP"))&&(B=Fg(A,"cadence",Jg));return{zb:function(){return zb(d(),f.length?a.g&&h?Or(a.g,e):g?g:[]:[])},Ld:x||c.Ld,fc:wg(b,"SegmentList")||c.fc,Md:z||c.Md,width:Fg(b,"width",Lg)||c.width,height:Fg(b,"height",Lg)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:r,emsgSchemeIdUris:q,id:e,language:b.getAttribute("lang"),De:u,audioSamplingRate:v,Hc:y,hg:B||c.hg}}
866
867
  function Ss(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.getAttribute("schemeIdUri"),b.includes(c)||b.push(c);return b}
867
868
  function Ts(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=
868
- 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 Qs(a){var b=a.Ld?1:0;b+=a.ec?1:0;b+=a.Md?1:0;if(0==b)return a.contentType==Gb||"application"==a.contentType?!0:!1;1!=b&&(a.Ld&&(a.ec=null),a.Md=null);return!0}
869
+ 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 Qs(a){var b=a.Ld?1:0;b+=a.fc?1:0;b+=a.Md?1:0;if(0==b)return a.contentType==Gb||"application"==a.contentType?!0:!1;1!=b&&(a.Ld&&(a.fc=null),a.Md=null);return!0}
869
870
  function Us(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=zb(b(),[c]),f=Af(e,a.h.retryParameters),f.method=d,g=a.i.networkingEngine.request(4,f),vf(a.G,g),D(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m.return(0);k=h.headers.date}else k=Tf(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
870
871
  function Is(a,b,c){var d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:d=c.map(function(r){return{scheme:r.getAttribute("schemeIdUri"),value:r.getAttribute("value")}}),e=a.h.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.F(4);break}h=g.value;ta(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.F(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.F(8);
871
872
  case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Ra("NTP UTCTiming scheme is not supported");break;default:Ra("Unrecognized scheme in UTCTiming element",k)}n.F(9);break;case 7:return D(n,Us(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return D(n,Us(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:va(n,
@@ -881,24 +882,24 @@ g.name&&(g.g.push(new dt("URI",h)),d=!0)}}return new Zs(b,e)}function qt(a,b){a=
881
882
  var rt="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),st="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function tt(){}function ut(a){try{var b=vt(a);return qf({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return of(c)}}
882
883
  function vt(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new P(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new P(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=qg(a):e=Xf(a);return{data:e,contentType:c}}L("shaka.net.DataUriPlugin",tt);tt.parse=ut;xf("data",ut);function wt(a){var b=md(a),c=b.split("/")[0];a=nd(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map}}
883
884
  function xt(a,b){function c(v){return d(v.name)}function d(v){v=v.toLowerCase();switch(v){case "avc1":case "avc3":e.push(v+".42E01E");g=!0;break;case "hev1":case "hvc1":e.push(v+".1.6.L93.90");g=!0;break;case "dvh1":case "dvhe":e.push(v+".05.04");g=!0;break;case "vp09":e.push(v+".00.10.08");g=!0;break;case "av01":e.push(v+".0.01M.08");g=!0;break;case "mp4a":e.push("mp4a.40.2");f=!0;break;case "ac-3":case "ec-3":case "opus":case "flac":e.push(v),f=!0}}var e=[],f=!1,g=!1,h=null,k=null,l=null,m=null,
884
- n=null;(new bg).box("moov",gg).box("trak",gg).T("tkhd",function(v){v=hi(v.reader,v.version);k=String(v.height);l=String(v.width)}).box("mdia",gg).T("mdhd",function(v){h=fi(v.reader,v.version).language}).box("minf",gg).box("stbl",gg).T("stsd",ig).box("mp4a",function(v){var x=v.reader;x.skip(6);x.skip(2);x.skip(8);var z=x.Ua();x.skip(2);x.skip(2);x.skip(2);x=x.Ua()+x.Ua()/65536;m=z;n=x;v.reader.xa()?gg(v):c(v)}).box("esds",function(v){v=ji(v.reader);e.push(v.wa);f=!0}).box("ac-3",c).box("ec-3",c).box("opus",
885
+ n=null;(new bg).box("moov",gg).box("trak",gg).T("tkhd",function(v){v=hi(v.reader,v.version);k=String(v.height);l=String(v.width)}).box("mdia",gg).T("mdhd",function(v){h=fi(v.reader,v.version).language}).box("minf",gg).box("stbl",gg).T("stsd",ig).box("mp4a",function(v){var x=v.reader;x.skip(6);x.skip(2);x.skip(8);var z=x.Ua();x.skip(2);x.skip(2);x.skip(2);x=x.Ua()+x.Ua()/65536;m=z;n=x;v.reader.xa()?gg(v):c(v)}).box("esds",function(v){v=ii(v.reader);e.push(v.wa);f=!0}).box("ac-3",c).box("ec-3",c).box("opus",
885
886
  c).box("Opus",c).box("fLaC",c).box("avc1",function(v){v=ki(v.reader,v.name);e.push(v.wa);g=!0}).box("avc3",function(v){v=ki(v.reader,v.name);e.push(v.wa);g=!0}).box("hev1",c).box("hvc1",c).box("dvh1",c).box("dvhe",c).box("vp09",c).box("av01",c).box("enca",jg).box("encv",jg).box("sinf",gg).box("frma",function(v){v=li(v.reader).wa;d(v)}).parse(a||b,!0);if(!e.length)return null;var r=f&&!g,q=new Map;if(g){var u=new rc("video/mp4");a&&u.init(a);u.i(b);a=t(u.j());for(b=a.next();!b.done;b=a.next())b=b.value,
886
887
  q.set(b,b);u.h()}return{type:r?"audio":"video",mimeType:r?"audio/mp4":"video/mp4",codecs:yt(e).join(", "),language:h,height:k,width:l,channelCount:m,sampleRate:n,closedCaptions:q}}function yt(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=ld(d);b.has(e)||(c.push(d),b.add(e))}return c};function zt(){var a=this;this.g=this.i=null;this.C=1;this.s=new Map;this.J=new Map;this.L=new Map;this.L.set("video",new Map);this.L.set("audio",new Map);this.L.set(Gb,new Map);this.L.set("image",new Map);this.va=new Set;this.h=new Map;this.l=null;this.Z="";this.sa=new ot;this.K=-1;this.V=Infinity;this.$=this.Xa=!1;this.u=new Dd(function(){At(a)});this.aa=Bt;this.G=null;this.ua=0;this.m=Infinity;this.ha=this.Aa=this.M=0;this.N=new uf;this.H=new Map;this.I=new Map;this.W=new Map;this.Wa=this.D=!1;
887
888
  this.Ra=new Yb(5);this.j=null}p=zt.prototype;p.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};p.start=function(a,b){var c=this,d;return K(function(e){return 1==e.g?(c.i=b,c.D=b.isLowLatencyMode(),D(e,Ct(c,[a]),2)):3!=e.g?(d=e.h,c.Z=d.uri,D(e,Dt(c,d.data,a),3)):e.return(c.G)})};
888
889
  p.stop=function(){this.u&&(this.u.stop(),this.u=null);var a=[];this.N&&(a.push(this.N.destroy()),this.N=null);this.g=this.i=null;this.va.clear();this.G=null;this.h.clear();this.J.clear();this.I.clear();this.s.clear();this.W.clear();this.j&&this.j.destroy();return Promise.all(a)};
889
- p.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){if(!Et(a))return m.return();b=[];c=Array.from(a.h.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Ft(a,g));return D(m,Promise.all(b),2)}Gt(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.vd});d.length&&!h&&(k=Ht,It(a,k.Fh),l=d.map(function(n){return n.Ob}),a.l.gb(Math.min.apply(Math,w(l))),a.i.updateDuration());
890
+ p.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){if(!Et(a))return m.return();b=[];c=Array.from(a.h.values());a.m=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Ft(a,g));return D(m,Promise.all(b),2)}Gt(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.vd});d.length&&!h&&(k=Ht,It(a,k.Fh),l=d.map(function(n){return n.Qb}),a.l.gb(Math.min.apply(Math,w(l))),a.i.updateDuration());
890
891
  h&&Jt(a);F(m)})};function Kt(a,b){return Et(a)?a.L.get(b.type):b.ye}
891
892
  function Ft(a,b){var c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A,C,E,I,G,H,J,M,N,Q,Y,aa;return K(function(da){if(1==da.g){c=[];d=t(b.ba());for(e=d.next();!e.done;e=d.next())f=e.value,g=new fb(f),h=g.g,b.$d&&(0<=b.rb&&h.add("_HLS_msn",String(b.rb)),0<=b.sb&&h.add("_HLS_part",String(b.sb))),b.ae&&h.add("_HLS_skip","YES"),xb(h)&&kb(g,h),c.push(g.toString());return D(da,Ct(a,c,!0),2)}k=da.h;if(!b.stream.segmentIndex)return da.return();l=pt(a.sa,k.data);if(1!=l.type)throw new P(2,4,4017);m=k.uri;m==k.originalUri||
892
893
  b.ba().includes(m)||b.jh.push(m);n=et(l.g,"EXT-X-DEFINE");r=Lt(a,n,m);q=b.stream;u=Kt(a,b);v=Mt(l,q.mimeType);x=v.keyIds;z=v.drmInfos;y=function(T,Ua){return T.size===Ua.size&&[].concat(w(T)).every(function(ib){return Ua.has(ib)})};y(q.keyIds,x)||(q.keyIds=x,q.drmInfos=z,a.i.newDrmInfo(q));B=Nt(a,l,q,u,r,b.ba);A=B.segments;if(C=B.bandwidth)q.bandwidth=C;q.segmentIndex.Cd(A,a.l.Ab());A.length&&(E=ht(l.g,"EXT-X-MEDIA-SEQUENCE",0),G=(I=gt(l.g,"EXT-X-SKIP"))?Number(X(I,"SKIPPED-SEGMENTS")):0,H=Ot(E,A),
893
- J=H.rb,M=H.sb,b.rb=J+G,b.sb=M,N=u.get(E),q.segmentIndex.yb(N));Q=A[0];b.yc=Q.startTime;Y=A[A.length-1];b.Ob=Y.endTime;if(aa=gt(l.g,"EXT-X-ENDLIST"))b.vd=!0;Pt(a,l);F(da)})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.j&&this.j.i.set(a,Date.now()+6E4)};
894
+ J=H.rb,M=H.sb,b.rb=J+G,b.sb=M,N=u.get(E),q.segmentIndex.yb(N));Q=A[0];b.yc=Q.startTime;Y=A[A.length-1];b.Qb=Y.endTime;if(aa=gt(l.g,"EXT-X-ENDLIST"))b.vd=!0;Pt(a,l);F(da)})}p.onExpirationUpdated=function(){};p.onInitialVariantChosen=function(){};p.banLocation=function(a){this.j&&this.j.i.set(a,Date.now()+6E4)};
894
895
  function Qt(a,b){for(var c=-1==a.K,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=Kt(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.K=Math.max(a.K,k));e.pf=k;break}}}}if(!(0>a.K))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(d.g.splice(0,a.K-c.pf),d=d.g[0]||null)d=-d.startTime,c.stream.segmentIndex.offset(d),Rt(a,c,d)}
895
896
  function St(a,b){if(Infinity==a.V){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.oa&&(a.V=Math.min(a.V,d.oa))}}b=a.V;if(Infinity!=b)for(d=t(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.oa)Qa("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.ba(),"Expect AV sync issues!");else for(Rt(a,c,f.oa-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.sg(b)}}}
896
- function Rt(a,b,c){b.yc+=c;b.Ob+=c;a=Kt(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.ba()}
897
+ function Rt(a,b,c){b.yc+=c;b.Qb+=c;a=Kt(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.ba()}
897
898
  function Dt(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A,C,E,I,G,H,J,M,N,Q,Y,aa,da;return K(function(T){switch(T.g){case 1:d=pt(a.sa,b);e=et(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];if(1==d.type)return v=function(){return[c]},D(T,Tt(a,d,v),6);Ut(a,e);k=et(d.g,"EXT-X-MEDIA");l=et(d.g,"EXT-X-STREAM-INF");m=et(d.g,"EXT-X-IMAGE-STREAM-INF");n=et(d.g,"EXT-X-I-FRAME-STREAM-INF");r=et(d.g,"EXT-X-SESSION-KEY");q=et(d.g,"EXT-X-SESSION-DATA");u=et(d.g,"EXT-X-CONTENT-STEERING");Vt(a,q);return D(T,Wt(a,u),4);case 4:return Xt(a,
898
899
  l),Yt(a,k),f=Zt(a,l,r,k),g=$t(a,k),D(T,au(a,m,n),5);case 5:h=T.h;T.F(3);break;case 6:return x=T.h,z=x.type,y=x.mimeType,B=x.codecs,A=x.language,C=x.height,E=x.width,I=x.channelCount,G=x.sampleRate,H=x.closedCaptions,D(T,bu(a,a.C++,d,v,c,B,z,A,!0,"Media Playlist",I,H,null,!1,G,!1,y),7);case 7:J=T.h,a.h.set(c,J),"video"==z&&cu(J.stream,E,C,null,null,null),f.push({id:0,language:Kb(A||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==z?J.stream:null,video:"video"==z?J.stream:null,bandwidth:J.stream.bandwidth||
899
900
  0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new P(2,7,7001);a.l=new sj(null,0);a.l.Vc(!0);1==d.type&&(Et(a)&&(du(a,d),M=a.m,a.u.S(M)),N=Array.from(a.h.values()),eu(a,N),Jt(a));a.G={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null};if(a.$||!a.g.hls.disableCodecGuessing){T.F(8);
900
901
  break}Q=[];Y=t(a.G.variants);for(aa=Y.next();!aa.done;aa=Y.next())da=aa.value,da.audio&&""===da.audio.codecs&&Q.push(da.audio.createSegmentIndex()),da.video&&""===da.video.codecs&&Q.push(da.video.createSegmentIndex());return D(T,Promise.all(Q),8);case 8:a.i.makeTextStreamsForClosedCaptions(a.G),F(T)}})}
901
- function Tt(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A;return K(function(C){switch(C.g){case 1:d=wt(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return C.return(d);e=Math.trunc((b.segments.length-1)/2);f=b.segments[e];g=it(c(),b.segments[0].h);h=g[0];k=new fb(h);l=k.Ya.split(".").pop();if(m=fu[l])return C.return(wt(m));n=Gf;r=null;q=gu(a,b,f.g,c);a.W.clear();if(!q){C.F(2);break}u=Af(q.ba(),a.g.retryParameters);return D(C,hu(a,u,n,{type:0}),3);case 3:v=C.h,r=v.data;case 2:return x=
902
+ function Tt(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A;return K(function(C){switch(C.g){case 1:d=wt(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return C.return(d);e=Math.trunc((b.segments.length-1)/2);f=b.segments[e];g=it(c(),b.segments[0].h);h=g[0];k=new fb(h);l=k.Ya.split(".").pop();if(m=fu[l])return C.return(wt(m));n=Gf;r=null;q=gu(a,b,f.g,c);a.W.clear();if(!q){C.F(2);break}u=ok(q.ba(),q.Pb(),q.Mb(),a.g.retryParameters);return D(C,hu(a,u,n,{type:0}),3);case 3:v=C.h,r=v.data;case 2:return x=
902
903
  Af(g,a.g.retryParameters),D(C,hu(a,x,n,{type:1}),4);case 4:z=C.h;(y=z.headers["content-type"])&&(y=y.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==y){var E=z.data;var I=lc(E);I=(new wi).parse(I);var G=I.sd();I=I.Lf();var H=[],J=!1,M=!1;switch(G.audio){case "aac":H.push("mp4a.40.2");J=!0;break;case "mp3":H.push("mp4a.40.34");J=!0;break;case "ac3":H.push("ac-3");J=!0;break;case "ec3":H.push("ec-3"),J=!0}switch(G.video){case "avc":I.wa?H.push(I.wa):H.push("avc1.42E01E");M=!0;break;case "hvc":I.wa?
903
904
  H.push(I.wa):H.push("hvc1.1.6.L93.90"),M=!0}if(H.length){G=J&&!M;J=new Map;if(M){M=new rc("video/mp2t");M.i(E);E=t(M.j());for(var N=E.next();!N.done;N=E.next())N=N.value,J.set(N,N);M.h()}I={type:G?"audio":"video",mimeType:"video/mp2t",codecs:H.join(", "),language:null,height:I.height,width:I.width,channelCount:null,sampleRate:null,closedCaptions:J}}else I=null;if(B=I)return C.return(B)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"video/mp4"==y||"audio/mp4"==y||"video/iso.segment"==y)if(A=xt(r,z.data))return C.return(A);
904
905
  return C.return(d)}})}function Jt(a){if(Et(a)){if(a.aa==iu){var b=ju(a);a.g.hls.useSafariBehaviorForLive&&(b=a.l.s);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.Ne(b)}if(!a.l.m){b=Array.from(a.h.values()).filter(function(d){return d.stream.segmentIndex});b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,("audio"==c.type||"video"==c.type)&&(c=c.stream.segmentIndex.get(0))&&c.oa&&a.l.og(c.oa)}}else a.l.gb(ku(a));a.l.ve()}
@@ -927,18 +928,18 @@ function pu(a,b){var c,d,e,f,g,h,k,l,m,n;return K(function(r){if(1==r.g){c=bt(b,
927
928
  Number(m.split("x")[1]));if(n=X(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return r.return(h)})}
928
929
  function yu(a,b,c,d,e,f,g,h,k){for(var l=a.C++,m=[],n=t(b),r=n.next();!r.done;r=n.next()){var q=r.value;r=bt(q,"URI");q=X(q,"PATHWAY-ID");a.j&&q&&Nr(a.j,l,q,r);m.push(r)}n=m.sort().join(",");if(a.h.has(n))return a.h.get(n);a:{b=X(b[0],"CLOSED-CAPTIONS");if("video"==d){if(b&&"NONE"!=b){b=a.H.get(b);break a}if(!b&&a.H.size)for(b=t(a.H.keys()).next();!b.done;){b=a.H.get(b.value);break a}}b=null}c=Bb(d,c);d=qu(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.h.set(n,d);return d}
929
930
  function qu(a,b,c,d,e,f,g,h,k,l,m,n,r,q){function u(C){var E,I,G,H,J,M,N,Q,Y,aa,da,T,Ua,ib,Eb,bc,Lb;return K(function(Ca){switch(Ca.g){case 1:return E=y.ba(),D(Ca,Ct(a,y.ba(),!0),2);case 2:I=Ca.h;if(C.aborted)return Ca.return();G=I.uri;G==I.originalUri||E.includes(G)||z.push(G);H=pt(a.sa,I.data);J=void 0;if(a.$||!a.g.hls.disableCodecGuessing){Ca.F(3);break}return D(Ca,Tt(a,H,v),4);case 4:M=Ca.h,J=M.mimeType,d=M.codecs;case 3:return N=Et(a),D(Ca,bu(a,0,H,v,G,d,e,f,g,h,k,l,m,n,r,q,J),5);case 5:Q=Ca.h;
930
- if(C.aborted)return Ca.return();Y=Q.stream;Et(a)&&!N&&du(a,H);y.yc=Q.yc;y.Ob=Q.Ob;y.ae=Q.ae;y.$d=Q.$d;y.vd=Q.vd;y.ye=Q.ye;y.rb=Q.rb;y.sb=Q.sb;y.Sf=!0;x.segmentIndex=Y.segmentIndex;x.encrypted=Y.encrypted;x.drmInfos=Y.drmInfos;x.keyIds=Y.keyIds;x.mimeType=Y.mimeType;x.bandwidth=x.bandwidth||Y.bandwidth;x.codecs=x.codecs||Y.codecs;x.drmInfos.length&&a.i.newDrmInfo(x);aa=Hb;if(e==aa.ia||e==aa.U)for(da=t(a.h.values()),T=da.next();!T.done;T=da.next())Ua=T.value,Ua.Sf||Ua.type!=e||(Ua.stream.mimeType=Y.mimeType);
931
- e==aa.Da&&(ib=Y.segmentIndex.get(0))&&ib.ka&&(x.mimeType="application/mp4");zu(a)&&(a.Xa?eu(a,[y]):(a.Xa=!0,Eb=Array.from(a.h.values()),bc=Eb.filter(function(rb){return rb.stream.segmentIndex}),eu(a,bc),Jt(a),Lb=a.m,0<Lb&&a.u.S(Lb)));F(Ca)}})}function v(){return a.j&&1<c.length?Or(a.j,b):z.concat(jt([a.Z],c,a.s))}var x=Au(a,d,e,f,g,h,k,l,m,n,r,q),z=[],y={stream:x,type:e,jh:z,ba:v,yc:0,Ob:0,ye:new Map,ae:!1,$d:!1,vd:!1,pf:-1,rb:-1,sb:-1,Sf:!1},B=null,A=new AbortController;x.createSegmentIndex=function(){if(B)return B;
932
- A=new AbortController;return B=new Promise(function(C){C(u(A.signal))})};x.closeSegmentIndex=function(){B&&!x.segmentIndex&&A.abort();x.segmentIndex&&(x.segmentIndex.release(),x.segmentIndex=null);B=null};return y}function ku(a){var b=Infinity;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Ob));return b}
933
- function ju(a){var b=Infinity,c=Infinity;a=t(a.h.values());for(var d=a.next();!d.done;d=a.next())d=d.value,d.stream.segmentIndex&&"text"!=d.stream.type&&(b=Math.min(b,d.Ob),c=Math.min(c,d.yc));return b-c}function Gt(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&Pj(d.segmentIndex,function(e){c.push(e)});a.l.Dd(c)}
931
+ if(C.aborted)return Ca.return();Y=Q.stream;Et(a)&&!N&&du(a,H);y.yc=Q.yc;y.Qb=Q.Qb;y.ae=Q.ae;y.$d=Q.$d;y.vd=Q.vd;y.ye=Q.ye;y.rb=Q.rb;y.sb=Q.sb;y.Sf=!0;x.segmentIndex=Y.segmentIndex;x.encrypted=Y.encrypted;x.drmInfos=Y.drmInfos;x.keyIds=Y.keyIds;x.mimeType=Y.mimeType;x.bandwidth=x.bandwidth||Y.bandwidth;x.codecs=x.codecs||Y.codecs;x.drmInfos.length&&a.i.newDrmInfo(x);aa=Hb;if(e==aa.ia||e==aa.U)for(da=t(a.h.values()),T=da.next();!T.done;T=da.next())Ua=T.value,Ua.Sf||Ua.type!=e||(Ua.stream.mimeType=Y.mimeType);
932
+ e==aa.Da&&(ib=Y.segmentIndex.get(0))&&ib.ka&&(x.mimeType="application/mp4");zu(a)&&(a.Xa?eu(a,[y]):(a.Xa=!0,Eb=Array.from(a.h.values()),bc=Eb.filter(function(rb){return rb.stream.segmentIndex}),eu(a,bc),Jt(a),Lb=a.m,0<Lb&&a.u.S(Lb)));F(Ca)}})}function v(){return a.j&&1<c.length?Or(a.j,b):z.concat(jt([a.Z],c,a.s))}var x=Au(a,d,e,f,g,h,k,l,m,n,r,q),z=[],y={stream:x,type:e,jh:z,ba:v,yc:0,Qb:0,ye:new Map,ae:!1,$d:!1,vd:!1,pf:-1,rb:-1,sb:-1,Sf:!1},B=null,A=new AbortController;x.createSegmentIndex=function(){if(B)return B;
933
+ A=new AbortController;return B=new Promise(function(C){C(u(A.signal))})};x.closeSegmentIndex=function(){B&&!x.segmentIndex&&A.abort();x.segmentIndex&&(x.segmentIndex.release(),x.segmentIndex=null);B=null};return y}function ku(a){var b=Infinity;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Qb));return b}
934
+ function ju(a){var b=Infinity,c=Infinity;a=t(a.h.values());for(var d=a.next();!d.done;d=a.next())d=d.value,d.stream.segmentIndex&&"text"!=d.stream.type&&(b=Math.min(b,d.Qb),c=Math.min(c,d.yc));return b-c}function Gt(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&Pj(d.segmentIndex,function(e){c.push(e)});a.l.Dd(c)}
934
935
  function eu(a,b){if(!Et(a))for(var c=ku(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Ic(0,c);Gt(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?Qt(a,b):St(a,b)}function zu(a){if(!a.G)return!1;var b=[],c=[];a=t(a.G.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
935
936
  function bu(a,b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x){var z,y,B,A,C,E,I,G,H,J,M,N,Q,Y,aa,da,T,Ua,ib,Eb,bc,Lb,Ca;return K(function(rb){if(1==rb.g){if(1!=c.type)throw new P(2,4,4017);z=et(c.g,"EXT-X-DEFINE");y=Lt(a,z,e);var Fb=gt(c.g,"EXT-X-PLAYLIST-TYPE"),cc=gt(c.g,"EXT-X-ENDLIST");cc=Fb&&"VOD"==Fb.value||cc;Fb=Fb&&"EVENT"==Fb.value&&!cc;Fb=!cc&&!Fb;cc?It(a,Bt):Fb?It(a,iu):It(a,Bu);Et(a)&&Pt(a,c);return x?rb.F(2):D(rb,Cu(a,g,f,c,y,d),3)}2!=rb.g&&(x=rb.h);B=Mt(c,x);A=B.drmInfos;C=B.keyIds;E=B.encrypted;I=
936
937
  B.Jh;if(E&&!A.length&&!I)throw new P(2,4,4026);G=Au(a,f,g,h,k,l,m,n,r,q,u,v);G.encrypted=E;G.drmInfos=A;G.keyIds=C;G.mimeType=x;H=Et(a)?a.L.get(g):new Map;J=Nt(a,c,G,H,y,d);M=J.segments;if(N=J.bandwidth)G.bandwidth=N;Et(a)&&Pt(a,c);Q=M[0].startTime;Y=M[M.length-1];aa=Y.endTime;da=new Oj(M);G.segmentIndex=da;Ua=(T=gt(c.g,"EXT-X-SERVER-CONTROL"))?null!=T.getAttribute("CAN-SKIP-UNTIL"):!1;ib=T?null!=T.getAttribute("CAN-BLOCK-RELOAD"):!1;Eb=ht(c.g,"EXT-X-MEDIA-SEQUENCE",0);bc=Ot(Eb,M);Lb=bc.rb;Ca=bc.sb;
937
- return rb.return({stream:G,type:g,jh:[],ba:d,yc:Q,Ob:aa,ae:Ua,$d:ib,vd:!1,pf:-1,rb:Lb,sb:Ca,ye:H,Sf:!1})})}function Ot(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{rb:a,sb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{rb:a,sb:c};c=d.length-1;d[d.length-1].l||(a++,c=0);return{rb:a,sb:c}}
938
+ return rb.return({stream:G,type:g,jh:[],ba:d,yc:Q,Qb:aa,ae:Ua,$d:ib,vd:!1,pf:-1,rb:Lb,sb:Ca,ye:H,Sf:!1})})}function Ot(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{rb:a,sb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{rb:a,sb:c};c=d.length-1;d[d.length-1].l||(a++,c=0);return{rb:a,sb:c}}
938
939
  function Au(a,b,c,d,e,f,g,h,k,l,m,n){var r=nu(c,b)||ou(c),q=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())q.push(u.value)}k=void 0;u=null;c==Gb?k=q.includes("public.accessibility.transcribes-spoken-dialog")&&q.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":q.includes("public.accessibility.describes-video")&&(u="visually impaired");q.length||"subtitle"!==k||q.push("subtitle");return{id:a.C++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
939
940
  segmentIndex:null,mimeType:r,codecs:b,kind:c==Gb?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Kb(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:q,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1}}
940
941
  function Mt(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.done;d=a.next())d=et(d.value.g,"EXT-X-KEY"),c.push.apply(c,w(d))}d=a=!1;var e=[],f=new Set;c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=bt(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=X(g,"KEYFORMAT")||"identity",g=(h=su[h])?h(g,b):null){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,Jh:d}}
941
- function Du(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Ra("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new P(2,4,4042);var f=0,g=X(b,"IV","");if(g){var h=rg(g.substr(2));if(16!=h.byteLength)throw new P(2,4,4048);}else f=ht(c.g,"EXT-X-MEDIA-SEQUENCE",0);var k={method:"AES-128",iv:h,firstMediaSequenceNumber:f,fetchKey:function(){var l,m,n,r,q;return K(function(u){if(1==u.g)return l=it(d(),bt(b,"URI"),e),m=Af([l],a.g.retryParameters),
942
+ function Du(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Ra("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new P(2,4,4042);var f=0,g=X(b,"IV","");if(g){var h=rg(g.substr(2));if(16!=h.byteLength)throw new P(2,4,4048);}else f=ht(c.g,"EXT-X-MEDIA-SEQUENCE",0);var k={method:"AES-128",iv:h,firstMediaSequenceNumber:f,fetchKey:function(){var l,m,n,r,q;return K(function(u){if(1==u.g)return l=it(d(),bt(b,"URI"),e),m=Af(l,a.g.retryParameters),
942
943
  D(u,hu(a,m,6),2);if(3!=u.g){n=u.h;if(!n.data||16!=n.data.byteLength)throw new P(2,4,4049);r={name:"AES-CBC"};q=k;return D(u,window.crypto.subtle.importKey("raw",n.data,r,!0,["decrypt"]),3)}q.cryptoKey=u.h;k.fetchKey=void 0;F(u)})}};return k}
943
944
  function Pt(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=gt(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=gt(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=gt(b.g,"EXT-X-PART-INF"))a.M=Number(bt(e,"PART-TARGET"));b=gt(b.g,"EXT-X-SERVER-CONTROL");a.D&&a.M?(a.m=a.Wa?5*a.M<=c?Math.min(a.M,a.m):Math.min(c,a.m):Math.min(a.M,a.m),a.ha=b?Number(bt(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
944
945
  b.getAttribute("HOLD-BACK"):null,a.Aa=c?Number(c.value):0);a.ua=Math.max(d,a.ua)}function du(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.ha)b=a.ha;else if(a.Aa)b=a.Aa;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.ua*c}a.l.og(0);a.l.oh(b);a.l.Vc(!1)}
@@ -951,8 +952,8 @@ if(!a.D)return null}var z=[];v=!1;var y=null,B=!1,A=!1;if(a.D&&d.Bb.length){n=("
951
952
  function Gu(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Na+1,d=c+b-1);return[c,d]}
952
953
  function Nt(a,b,c,d,e,f){var g=b.segments,h=void 0,k=ht(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=ht(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=gt(b.g,"EXT-X-SKIP"),n=m?Number(X(m,"SKIPPED-SEGMENTS")):0,r=l+n,q=0;Et(a)&&d.has(r)&&(q=d.get(r));0===q&&a.aa==iu&&0<d.size&&!d.has(r)&&(q=a.l.Ab());var u=[],v=null;m=[];for(var x=0;x<g.length;x++){var z=g[x],y=0==x?q:v.endTime;r=l+n+x;gt(z.g,"EXT-X-DISCONTINUITY")&&k++;var B=t(z.g);for(var A=B.next();!A.done;A=B.next())A=A.value,"EXT-X-KEY"==A.name&&("AES-128"==bt(A,
953
954
  "METHOD")?h=Du(a,A,b,f,e):h=void 0);d.set(r,y);B=gu(a,b,z.g,f,e);!a.D&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.D=a.i.isLowLatencyMode());if(y=Fu(a,B,v,z,y,e,c,f,h))(v=ht(z.g,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:y.endTime-y.startTime}):m.length&&(v=m.pop(),v.duration+=y.endTime-y.startTime,m.push(v)),v=y,y.i=k,a.g.hls.ignoreManifestProgramDateTime&&null!=a.K&&r<a.K||u.push(y)}b=void 0;m.length&&(b=m.reduce(function(C,E){return C+E.duration},0),b=Math.round(m.reduce(function(C,
954
- E){return C+E.bitrate*E.duration},0)/b*1E3));if(m=u.some(function(C){return null!=C.oa}))for(c={},d=0;d<u.length;c={Zc:c.Zc,Yc:c.Yc,Qd:c.Qd,Tb:c.Tb,Xc:c.Xc},d++)if(c.Tb=u[d],null==c.Tb.oa)for(c.Yc=0,c.Zc=d,e=function(C){return function(){var E=u[C.Zc];if(E){if(null!=E.oa)return E.oa+C.Yc;C.Yc-=E.endTime-E.startTime;C.Zc+=1}return null}}(c),c.Xc=0,c.Qd=d,f=function(C){return function(){var E=u[C.Qd];if(E){E!=C.Tb&&(C.Xc+=E.endTime-E.startTime);if(null!=E.oa)return E.oa+C.Xc;--C.Qd}return null}}(c);null==
955
- c.Tb.oa;)c.Tb.oa=f(),null==c.Tb.oa&&(c.Tb.oa=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.oa,e=t(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.oa=d,d+=f.endTime-f.startTime;a=a.V;if(m&&Infinity!=a)for(m=t(u),d=m.next();!d.done;d=m.next())d.value.sg(a);return{segments:u,bandwidth:b}}
955
+ E){return C+E.bitrate*E.duration},0)/b*1E3));if(m=u.some(function(C){return null!=C.oa}))for(c={},d=0;d<u.length;c={Zc:c.Zc,Yc:c.Yc,Qd:c.Qd,Vb:c.Vb,Xc:c.Xc},d++)if(c.Vb=u[d],null==c.Vb.oa)for(c.Yc=0,c.Zc=d,e=function(C){return function(){var E=u[C.Zc];if(E){if(null!=E.oa)return E.oa+C.Yc;C.Yc-=E.endTime-E.startTime;C.Zc+=1}return null}}(c),c.Xc=0,c.Qd=d,f=function(C){return function(){var E=u[C.Qd];if(E){E!=C.Vb&&(C.Xc+=E.endTime-E.startTime);if(null!=E.oa)return E.oa+C.Xc;--C.Qd}return null}}(c);null==
956
+ c.Vb.oa;)c.Vb.oa=f(),null==c.Vb.oa&&(c.Vb.oa=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.oa,e=t(e.g),f=e.next();!f.done;f=e.next())f=f.value,f.oa=d,d+=f.endTime-f.startTime;a=a.V;if(m&&Infinity!=a)for(m=t(u),d=m.next();!d.done;d=m.next())d.value.sg(a);return{segments:u,bandwidth:b}}
956
957
  function nu(a,b){if(a==Gb){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}function ou(a){return a==Gb?"text/vtt":Hu[a].mp4}
957
958
  function Cu(a,b,c,d,e,f){var g,h,k,l,m,n,r,q,u,v,x,z,y;return K(function(B){switch(B.g){case 1:g=Gf;h=Math.trunc((d.segments.length-1)/2);k=it(f(),d.segments[h].h,e);l=new fb(k[0]);m=l.Ya.split(".").pop();n=Hu[b];if((r=n[m])||(r=fu[m])||(r=nu(b,c)))return B.return(r);u=1;v=Af(k,a.g.retryParameters);ta(B,2);v.method="HEAD";return D(B,hu(a,v,g,{type:u}),4);case 4:x=B.h;q=x.headers["content-type"];va(B,3);break;case 2:z=wa(B);if(!z||1002!=z.code&&1001!=z.code){B.F(3);break}v.method="GET";return D(B,
958
959
  hu(a,v,g,{type:u}),6);case 6:y=B.h,q=y.headers["content-type"];case 3:return q?B.return(q.split(";")[0]):B.return(ou(b))}})}function cu(a,b,c,d,e,f){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0)}function Ct(a,b,c){return hu(a,Af(b,a.g.retryParameters),0,{type:c?2:3})}
@@ -960,13 +961,13 @@ function At(a){var b,c,d,e,f,g;K(function(h){switch(h.g){case 1:if(!a.i)return h
960
961
  function Et(a){return a.aa!=Bt}function It(a,b){a.aa=b;a.l&&a.l.Vc(!Et(a));Et(a)||a.u.stop()}function hu(a,b,c,d){if(!a.N)throw new P(2,7,7001);b=a.i.networkingEngine.request(c,b,d);vf(a.N,b);return b.promise}L("shaka.hls.HlsParser",zt);
961
962
  var fu={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Hu={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",tsa:"video/mp2t"},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",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
962
963
  vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},su={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new P(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new P(2,4,4041);return Ab("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=bt(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
963
- b=bt(a,"URI");b=vt(b);b=lc(b.data);b=Ab("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=X(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=bt(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=bt(a,"URI");a=vt(a);a=lc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=vg(a,b,new Set,0);return Ab("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
964
- bt(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?Ab("org.w3.clearkey",null):null}},Bt="VOD",Bu="EVENT",iu="LIVE",Ht={Fh:Bt,Hj:Bu,Pj:iu};Ih["application/x-mpegurl"]=function(){return new zt};Ih["application/vnd.apple.mpegurl"]=function(){return new zt};function Iu(a){var b=0,c=pc(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=lc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Ju(a){if(a=Ku(a))a:{a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next())if(b=wg(b.value,"LA_URL")){a=b.textContent;break a}a=""}else a="";return a}
964
+ b=bt(a,"URI");b=vt(b);b=lc(b.data);b=Ab("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=X(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=bt(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=bt(a,"URI");a=vt(a);a=lc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=vg(a,b,new Set,0);return Ab("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a,
965
+ b){if("video/mp2t"==b)throw new P(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new P(2,4,4041);a=bt(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?Ab("org.w3.clearkey",null):null}},Bt="VOD",Bu="EVENT",iu="LIVE",Ht={Fh:Bt,Hj:Bu,Pj:iu};Ih["application/x-mpegurl"]=function(){return new zt};Ih["application/vnd.apple.mpegurl"]=function(){return new zt};function Iu(a){var b=0,c=pc(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=lc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Ju(a){if(a=Ku(a))a:{a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next())if(b=wg(b.value,"LA_URL")){a=b.textContent;break a}a=""}else a="";return a}
965
966
  function Ku(a){a=qg(a.textContent);a=Iu(a).filter(function(b){return b.type===Lu})[0];if(!a)return null;a=Uf(a.value,!0);return(a=Pg(a,"WRMHEADER"))?a:null}var Lu=1,Mu=(new Map).set("com.microsoft.playready",Ju).set("com.microsoft.playready.recommendation",Ju).set("com.microsoft.playready.software",Ju).set("com.microsoft.playready.hardware",Ju);function Nu(a){if(!Ou){Ou=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Pu=Qu("ftyp",b,d,b,c);b=Qu("dref",Ru);Su=Qu("dinf",b)}this.g=a}
966
967
  function Tu(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Qu;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Uu+1));m=Math.floor(m%(Uu+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(Vu(h,4)),[0,0,0,0],w(Vu(n,4)),w(Vu(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],w(Vu(k,2)),[0,0],w(Vu(l,
967
968
  2)),[0,0]));h=Qu("tkhd",h);k=Qu;n=g.duration*g.timescale;l=Math.floor(n/(Uu+1));n=Math.floor(n%(Uu+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(Vu(g.timescale,4)),w(Vu(l,4)),w(Vu(n,4)),w(Vu(m,2)),[0,0]));l=Qu("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Wu;break;case "audio":m=Xu}n=Qu("hdlr",m);a:{switch(g.type){case "video":g=Qu("minf",Qu("vmhd",Yu),Su,Zu(g));break a;
968
- case "audio":g=Qu("minf",Qu("smhd",$u),Su,Zu(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=tg.apply(ng,w(b));f=a.g[0];c=Qu;d=f.duration*f.timescale;e=Math.floor(d/(Uu+1));d=Math.floor(d%(Uu+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(Vu(f.timescale,4)),w(Vu(e,4)),w(Vu(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
969
- 255]));e=Qu("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(w(Vu(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=Qu("trex",k),h.call(g,k);a=tg.apply(ng,w(d));a=Qu("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=tg.apply(ng,w(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Pu.byteLength+
969
+ case "audio":g=Qu("minf",Qu("smhd",$u),Su,Zu(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=tg.apply(lg,w(b));f=a.g[0];c=Qu;d=f.duration*f.timescale;e=Math.floor(d/(Uu+1));d=Math.floor(d%(Uu+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(w(Vu(f.timescale,4)),w(Vu(e,4)),w(Vu(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
970
+ 255]));e=Qu("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(w(Vu(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=Qu("trex",k),h.call(g,k);a=tg.apply(lg,w(d));a=Qu("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=tg.apply(lg,w(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Pu.byteLength+
970
971
  a.byteLength);b.set(Pu);b.set(a,Pu.byteLength);return b}
971
972
  function Zu(a){var b=Qu,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.Ca.byteLength)var e=Qu("avcC",a.Ca);else{e=Qu;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.ib.length;n++){var r=av(a.ib[n]);switch(r[0]&31){case 7:g.push(r);f+=r.length+2;break;case 8:h.push(r),f+=r.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
972
973
  0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(w(Vu(c,2)),w(Vu(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=bv(a);g=new Uint8Array([]);
@@ -978,7 +979,7 @@ function cv(a){var b=Qu;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(va
978
979
  0,0,0,0,0,1,8]);f=Qu("tenc",a,f);return b("sinf",c,d,e("schi",f))}
979
980
  function jv(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=Qu;var g=new Uint8Array([0,0,0,0].concat(w(Vu(c.data?c.data.Cb:0,4))));g=Qu("mfhd",g);var h;var k=c.data?c.data.fb:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.$a<<4|m.bb<<2|m.ab}k=Qu("sdtp",l);var n=k.length+92;l=Qu;h=new Uint8Array([0,0,0,58].concat(w(Vu(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Qu("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
980
981
  0;var r=Math.floor(m%(Uu+1));m=new Uint8Array([1,0,0,0].concat(w(Vu(Math.floor(m/(Uu+1)),4)),w(Vu(r,4))));m=Qu("tfdt",m);var q=n;n=c.data?c.data.fb:[];r=n.length;var u=12+16*r,v=new Uint8Array(u);q+=8+u;v.set(["video"===c.type?1:0,0,15,1].concat(w(Vu(r,4)),w(Vu(q,4))),0);for(q=0;q<r;q++){var x=n[q];u=Vu(x.duration,4);var z=Vu(x.size,4),y=x.flags;x=Vu(x.kb,4);v.set([].concat(w(u),w(z),[y.ob<<2|y.$a,y.bb<<6|y.ab<<4|y.pb,y.Za&61440,y.Za&15],w(x)),12+16*q)}n=Qu("trun",v);k=l("traf",h,m,n,k);f=f("moof",
981
- g,k);e.call(d,b,[f,kv(c)])}return tg.apply(ng,w(b))}function kv(a){a=(a.data?a.data.fb:[]).map(function(b){return b.data});a=tg.apply(ng,w(a));return Qu("mdat",a)}function Vu(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function av(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
982
+ g,k);e.call(d,b,[f,kv(c)])}return tg.apply(lg,w(b))}function kv(a){a=(a.data?a.data.fb:[]).map(function(b){return b.data});a=tg.apply(lg,w(a));return Qu("mdat",a)}function Vu(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function av(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
982
983
  function Qu(a){var b=Ga.apply(1,arguments),c=lv[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],lv[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
983
984
  var Ou=!1,Uu=Math.pow(2,32)-1,lv={},Wu=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Xu=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),fv=new Uint8Array([0,0,0,0,0,0,0,0]),gv=new Uint8Array([0,0,0,0,0,0,0,0]),iv=new Uint8Array([0,0,0,0,0,0,0,0]),hv=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Yu=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),$u=new Uint8Array([0,
984
985
  0,0,0,0,0,0,0]),ev=new Uint8Array([0,0,0,0,0,0,0,1]),Pu=new Uint8Array([]),Ru=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Su=new Uint8Array([]);function mv(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.u=1;this.i=null;this.D=new Yb(5);this.s=new Dd(function(){nv(a)});this.C=new uf;this.m=new Map}p=mv.prototype;p.configure=function(a){this.g=a};p.start=function(a,b){var c=this;return K(function(d){if(1==d.g)return c.l=[a],c.h=b,D(d,ov(c),2);if(!c.h)throw new P(2,7,7001);return d.return(c.j)})};
@@ -1052,13 +1053,13 @@ p.onInitialVariantChosen=function(){};p.banLocation=function(){};Ih["application
1052
1053
  function Jw(a,b){var c=new fw;return qf(void 0).Fa(function(){return c.init()}).Fa(function(){return jw(c,b.qb(),b.Ma())}).Fa(function(d){return d.getSegments([b.key()])}).Fa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}L("shaka.offline.OfflineScheme",Hw);Hw.plugin=Iw;xf("offline",Iw);function Kw(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),r=n.next();!r.done;r=n.next()){r=r.value;for(var q=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,Lw(v.info,r)){v.sessionIds.push(r.sessionId);q=!0;break}q||m.push({info:r,sessionIds:[r.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.F(4);break}g=f.value;h=Mw(a,b,g);return D(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.F(2);break;case 4:return l.return(d)}})}
1053
1054
  function Mw(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new Sg({zc:b,onError:function(){},Fe:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),D(f,$g(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return wa(f),D(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],D(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==
1054
1055
  h.g)return ta(h,2),D(h,lh(d,g),4);if(2!=h.g)return e.push(g),va(h,0);wa(h);F(h)})})),6);case 6:return D(f,d.destroy(),7);case 7:return f.return(e)}})}function Lw(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&wc(a.audioCapabilities,b.audioCapabilities,c)&&wc(a.videoCapabilities,b.videoCapabilities,c)};function Nw(a,b,c){var d=b.presentationTimeline.getDuration();b=Ow(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Pw(a,b){var c=Bw(new Aw(a.qb(),a.Ma()),b),d=b.appMetadata||{};c=Ow(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
1055
- function Ow(a){var b=[],c=Ce(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(te(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ue(c.value));return b};function Qw(){this.g={}}function Rw(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Sw(a,b){a.g[b.id]=b.bandwidth||2048}function Tw(a,b){a=a.g[b];null==a&&(a=0);return a};function Uw(a){var b=this;if(a&&a.constructor!=V)throw new P(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Yb()):(this.h=$l(),this.g=new wf);this.i=[];this.j=[];var c=!a;this.l=new If(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return D(k,Promise.all(b.j.map(function(l){return Qv(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return D(k,Promise.all(e),3);case 3:if(!c){k.F(4);break}return D(k,b.g.destroy(),4);
1056
- case 4:b.h=null,b.g=null,F(k)}})})}function Vw(){if(Ed())a:{var a=t(gw.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}p=Uw.prototype;p.destroy=function(){return this.l.destroy()};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ql(a,b));return bm(this.h,a)};p.getConfiguration=function(){var a=$l();bm(a,this.h,$l());return a};p.Yb=function(){return this.g};
1056
+ function Ow(a){var b=[],c=Ce(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(te(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ue(c.value));return b};function Qw(){this.g={}}function Rw(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Sw(a,b){a.g[b.id]=b.bandwidth||2048}function Tw(a,b){a=a.g[b];null==a&&(a=0);return a};function Uw(a){var b=this;if(a&&a.constructor!=V)throw new P(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Zb()):(this.h=$l(),this.g=new wf);this.i=[];this.j=[];var c=!a;this.l=new If(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return D(k,Promise.all(b.j.map(function(l){return Qv(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return D(k,Promise.all(e),3);case 3:if(!c){k.F(4);break}return D(k,b.g.destroy(),4);
1057
+ case 4:b.h=null,b.g=null,F(k)}})})}function Vw(){if(Ed())a:{var a=t(gw.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}p=Uw.prototype;p.destroy=function(){return this.l.destroy()};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ql(a,b));return bm(this.h,a)};p.getConfiguration=function(){var a=$l();bm(a,this.h,$l());return a};p.Zb=function(){return this.g};
1057
1058
  p.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Pv(this.g);this.j.push(f);b=Ww(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return c?h.F(2):D(h,Vk(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=Hh(a,c||null);return h.return(g())})},e,f);b=new nf(b,function(){return Qv(f)});b.finally(function(){vc(d.j,f)});return Xw(this,b)};
1058
1059
  function Ww(a,b,c,d,e,f){var g,h,k,l,m,n,r,q,u,v,x,z,y,B;return K(function(A){switch(A.g){case 1:return Yw(),h=g=null,k=new fw,n=m=l=null,ta(A,2,3),D(A,d(),5);case 5:return g=A.h,D(A,Zw(a,b,g,e),6);case 6:r=A.h;$w(a);q=!r.presentationTimeline.R()&&!r.presentationTimeline.wc();if(!q)throw new P(2,9,9005,b);return D(A,ax(a,r,function(C){n=n||C},e),7);case 7:h=A.h;$w(a);if(n)throw n;return D(A,bx(r,h,e),8);case 8:return D(A,k.init(),9);case 9:return $w(a),D(A,hw(k),10);case 10:return l=A.h,$w(a),u=cx(h,
1059
1060
  r,b,c,e,f),v=u.Si,x=u.vg,D(A,l.Ma.addManifests([v]),11);case 11:z=A.h;$w(a);m=z[0];$w(a);if(n)throw n;return D(A,dx(a,x,m,v,f,e,l.Ma,r,h),12);case 12:return $w(a),ex(r,v,h,e),D(A,l.Ma.updateManifest(m,v),13);case 13:return $w(a),y=new yw("manifest",l.path.qb,l.path.Ma,m),A.return(Pw(y,v));case 3:return xa(A),D(A,k.destroy(),14);case 14:if(!g){A.F(15);break}return D(A,g.stop(),15);case 15:if(!h){A.F(17);break}return D(A,h.destroy(),17);case 17:ya(A,0);break;case 2:B=wa(A);if(null==m){A.F(19);break}return D(A,
1060
1061
  fx(m),19);case 19:throw n||B;}})}
1061
- function dx(a,b,c,d,e,f,g,h,k){var l,m,n,r,q,u,v,x,z,y;return K(function(B){switch(B.g){case 1:l={};m=0;n=function(A,C){var E,I,G,H,J,M,N;return K(function(Q){if(1==Q.g){E={};I=t(A);for(G=I.next();!G.done;E={jc:E.jc},G=I.next())E.jc=G.value,H=Mv(E.jc,f),J=E.jc.i,M=E.jc.h,N=function(Y){return function(aa){var da,T,Ua;return K(function(ib){if(1==ib.g)return D(ib,g.addSegments([{data:aa}]),2);da=ib.h;$w(a);T=Y.jc.g;Ua=Lv(T);l[Ua]=da[0];m+=aa.byteLength;F(ib)})}}(E),Sv(e,E.jc.groupId,H,J,M,N);return D(Q,
1062
+ function dx(a,b,c,d,e,f,g,h,k){var l,m,n,r,q,u,v,x,z,y;return K(function(B){switch(B.g){case 1:l={};m=0;n=function(A,C){var E,I,G,H,J,M,N;return K(function(Q){if(1==Q.g){E={};I=t(A);for(G=I.next();!G.done;E={kc:E.kc},G=I.next())E.kc=G.value,H=Mv(E.kc,f),J=E.kc.i,M=E.kc.h,N=function(Y){return function(aa){var da,T,Ua;return K(function(ib){if(1==ib.g)return D(ib,g.addSegments([{data:aa}]),2);da=ib.h;$w(a);T=Y.kc.g;Ua=Lv(T);l[Ua]=da[0];m+=aa.byteLength;F(ib)})}}(E),Sv(e,E.kc.groupId,H,J,M,N);return D(Q,
1062
1063
  Uv(e),2)}if(!C)return Q.F(0);$w(a);ex(h,d,k,f);return D(Q,g.updateManifest(c,d),0)})};r=!1;ta(B,2);if(!gx(h)||!r||hx(h)){B.F(4);break}return D(B,n(b.filter(function(A){return A.h}),!0),5);case 5:return $w(a),b=b.filter(function(A){return!A.h}),q=l,u=m,l={},m=0,D(B,ix(g,c,d,q,u,function(){return $w(a)}),6);case 6:$w(a);case 4:if(r){B.F(7);break}return D(B,n(b,!1),8);case 8:return $w(a),v=l,x=m,l={},m=0,D(B,ix(g,c,d,v,x,function(){return $w(a)}),9);case 9:$w(a);case 7:va(B,0);break;case 2:return z=
1063
1064
  wa(B),y=Object.values(l),D(B,g.removeSegments(y,function(){}),10);case 10:throw z;}})}function fx(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new fw,D(f,b.init(),2);case 2:return D(f,hw(b),3);case 3:return c=f.h,d=new yw("manifest",c.path.qb,c.path.Ma,a),D(f,b.destroy(),4);case 4:return e=new Uw,D(f,e.remove(d.toString()),0)}})}
1064
1065
  function ix(a,b,c,d,e,f){var g,h,k,l,m,n,r,q,u,v,x;return K(function(z){switch(z.g){case 1:g=!1;ta(z,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),r=n.next();!r.done;r=n.next())q=r.value,u=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=u&&(q.dataKey=u,q.pendingSegmentRefId=void 0),u=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=u&&(q.initSegmentKey=u,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
@@ -1084,7 +1085,7 @@ function mx(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ua(c,2),D(c,b
1084
1085
  function rx(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=lw(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:qx(d,!1),videoCapabilities:qx(d,!0)}});return D(h,Kw(b,a,f),2)}return 3!=h.g?(g=h.h,D(h,e.remove(g),3)):D(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
1085
1086
  function vx(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
1086
1087
  function jx(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}L("shaka.offline.Storage",Uw);Uw.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new fw,ua(b,2),D(b,mw(a),2)):5!=b.g?(xa(b),D(b,a.destroy(),5)):ya(b,0)})};
1087
- Uw.prototype.list=Uw.prototype.list;Uw.prototype.removeEmeSessions=Uw.prototype.fj;Uw.prototype.remove=Uw.prototype.remove;Uw.prototype.store=Uw.prototype.store;Uw.prototype.getNetworkingEngine=Uw.prototype.Yb;Uw.prototype.getConfiguration=Uw.prototype.getConfiguration;Uw.prototype.configure=Uw.prototype.configure;Uw.prototype.destroy=Uw.prototype.destroy;Uw.support=Vw;
1088
+ Uw.prototype.list=Uw.prototype.list;Uw.prototype.removeEmeSessions=Uw.prototype.fj;Uw.prototype.remove=Uw.prototype.remove;Uw.prototype.store=Uw.prototype.store;Uw.prototype.getNetworkingEngine=Uw.prototype.Zb;Uw.prototype.getConfiguration=Uw.prototype.getConfiguration;Uw.prototype.configure=Uw.prototype.configure;Uw.prototype.destroy=Uw.prototype.destroy;Uw.support=Vw;
1088
1089
  var kx=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
1089
1090
  Kn.offline=Vw;function yx(){}function zx(){for(var a=t(Ax),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Ra("Error installing polyfill!",c)}}}function Bx(a,b){a={priority:b||0,callback:a};for(b=0;b<Ax.length;b++)if(Ax[b].priority<a.priority){Ax.splice(b,0,a);return}Ax.push(a)}L("shaka.polyfill",yx);yx.register=Bx;yx.installAll=zx;var Ax=[];function Cx(){this.g=new Dx}function Ex(){window.AbortController||(window.AbortController=Cx,window.AbortSignal=Dx)}Cx.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new O("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};fa.Object.defineProperties(Cx.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});yx.AbortController=Cx;Cx.install=Ex;
1090
1091
  function Dx(){$a.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(Dx,$a);fa.Object.defineProperties(Dx.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Bx(Ex);function Fx(){}function Gx(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Hx(b.value)}function Hx(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}yx.Aria=Fx;Fx.install=Gx;Bx(Gx);function Ix(){}function Jx(){Kx()}yx.EncryptionScheme=Ix;Ix.install=Jx;Bx(Jx,-2);function Lx(){}
@@ -1095,180 +1096,180 @@ function Rx(a){var b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B;return K(function(A){sw
1095
1096
  (C+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(C)}else e=ac(c.contentType);else Kd()?(f=c.contentType,c.width&&c.height&&(f+="; width="+c.width,f+="; height="+c.height),c.framerate&&(f+="; framerate="+c.framerate),c.bitrate&&(f+="; bitrate="+c.bitrate),e=ac(f)):e=ac(c.contentType);if(!e)return A.return(b)}if(d&&(Od()&&d.spatialRendering?(h=d.contentType+"; spatialRendering=true",g=ac(h)):g=ac(d.contentType),!g))return A.return(b)}else if("file"==a.type){if(c&&(k=c.contentType,l=Fd(k),
1096
1097
  !l)||d&&(m=d.contentType,n=Fd(m),!n))return A.return(b)}else return A.return(b);if(!a.keySystemConfiguration)return b.supported=!0,A.return(Promise.resolve(b));r=a.keySystemConfiguration;q=[];u=[];r.audio&&(v={robustness:r.audio.robustness||"",contentType:a.audio.contentType},Kd()&&a.audio.contentType.includes('codecs="ac-3"')&&(v={robustness:v.robustness,contentType:'audio/mp4; codecs="ec-3"'}),q.push(v));r.video&&(x={robustness:r.video.robustness||"",contentType:a.video.contentType},u.push(x));
1097
1098
  z={initDataTypes:[r.initDataType],distinctiveIdentifier:r.distinctiveIdentifier,persistentState:r.persistentState,sessionTypes:r.sessionTypes};q.length&&(z.audioCapabilities=q);u.length&&(z.videoCapabilities=u);y=(a.video?a.video.contentType:"")+"#"+(a.audio?a.audio.contentType:"")+"#"+a.keySystemConfiguration.keySystem;ta(A,3);if(y in Sx){B=Sx[y];A.F(5);break}return D(A,navigator.requestMediaKeySystemAccess(r.keySystem,[z]),6);case 6:B=A.h,Sx[y]=B;case 5:va(A,4);break;case 3:wa(A);case 4:B&&(b.supported=
1098
- !0,b.keySystemAccess=B);case 2:return A.return(b)}})}yx.MediaCapabilities=Ox;Ox.install=Px;var Qx=null;Ox.originalMcap=Qx;var Sx={};Ox.memoizedMediaKeySystemAccessRequests_=Sx;Bx(Px,-1);function Tx(){}function Ux(){var a=Rd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Vx():a?10>=a?window.MediaSource=null:12>=a?(Wx(),Xx()):15>=a&&Wx():Hd()?Yx():(Md()||Ld()||Jd("Tizen 4"))&&Zx());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&$x()}
1099
- function Wx(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function Xx(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Yx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
1100
- function Zx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=ld(b)&&a(b)}}function Vx(){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)}}
1101
- function $x(){var a=MediaSource.isTypeSupported;Jd("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)})}yx.MediaSource=Tx;Tx.install=Ux;Bx(Ux);function ay(){}function by(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?cy():void 0!=window.orientation&&dy())}function cy(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
1102
- function dy(){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 ey;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new O("change");b.dispatchEvent(c)})}yx.Orientation=ay;ay.install=by;function ey(){$a.call(this);this.type="";this.angle=0}pa(ey,$a);
1103
- ey.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
1104
- ey.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Bx(by);function fy(){}var gy,hy,iy,jy,ky,ly;function my(a,b){try{var c=new ny(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function oy(a){var b=this.mediaKeys;b&&b!=a&&py(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?py(a,this):Promise.resolve()}
1105
- function qy(a){a=lc(a.initData);if(pc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Uf(a.subarray(4),!0);a=Xf(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=mc(a);this.dispatchEvent(b)}yx.PatchedMediaKeysApple=fy;
1106
- fy.uninstall=function(){gy&&(gy=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",hy),HTMLMediaElement.prototype.setMediaKeys=iy,window.MediaKeys=jy,window.MediaKeySystemAccess=ky,navigator.requestMediaKeySystemAccess=ly,hy=ly=iy=ky=jy=null,window.shakaMediaKeysPolyfill=!1)};
1107
- fy.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)gy=!0,hy=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),iy=HTMLMediaElement.prototype.setMediaKeys,jy=window.MediaKeys,ky=window.MediaKeySystemAccess,ly=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=oy;window.MediaKeys=ry;window.MediaKeySystemAccess=ny;navigator.requestMediaKeySystemAccess=
1108
- my;window.shakaMediaKeysPolyfill=!0}};
1109
- function ny(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
1099
+ !0,b.keySystemAccess=B);case 2:return A.return(b)}})}yx.MediaCapabilities=Ox;Ox.install=Px;var Qx=null;Ox.originalMcap=Qx;var Sx={};Ox.memoizedMediaKeySystemAccessRequests_=Sx;Bx(Px,-1);function Tx(){}function Ux(){var a=Rd();window.MediaSource&&(Od()?Vx():a?10>=a?window.MediaSource=null:12>=a?(Wx(),Xx()):15>=a&&Wx():Hd()?Vx():(Md()||Ld()||Jd("Tizen 4"))&&Yx());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Zx()}
1100
+ function Wx(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ga.apply(0,arguments));b.abort=function(){};return b}}function Xx(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Vx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
1101
+ function Yx(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=ld(b)&&a(b)}}
1102
+ function Zx(){var a=MediaSource.isTypeSupported;Jd("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)})}yx.MediaSource=Tx;Tx.install=Ux;Bx(Ux);function $x(){}function ay(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?by():void 0!=window.orientation&&cy())}function by(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
1103
+ function cy(){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 dy;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new O("change");b.dispatchEvent(c)})}yx.Orientation=$x;$x.install=ay;function dy(){$a.call(this);this.type="";this.angle=0}pa(dy,$a);
1104
+ dy.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
1105
+ dy.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Bx(ay);function ey(){}var fy,gy,hy,iy,jy,ky;function ly(a,b){try{var c=new my(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function ny(a){var b=this.mediaKeys;b&&b!=a&&oy(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?oy(a,this):Promise.resolve()}
1106
+ function py(a){a=lc(a.initData);if(pc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Uf(a.subarray(4),!0);a=Xf(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=mc(a);this.dispatchEvent(b)}yx.PatchedMediaKeysApple=ey;
1107
+ ey.uninstall=function(){fy&&(fy=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",gy),HTMLMediaElement.prototype.setMediaKeys=hy,window.MediaKeys=iy,window.MediaKeySystemAccess=jy,navigator.requestMediaKeySystemAccess=ky,gy=ky=hy=jy=iy=null,window.shakaMediaKeysPolyfill=!1)};
1108
+ ey.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)fy=!0,gy=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),hy=HTMLMediaElement.prototype.setMediaKeys,iy=window.MediaKeys,jy=window.MediaKeySystemAccess,ky=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=ny;window.MediaKeys=qy;window.MediaKeySystemAccess=my;navigator.requestMediaKeySystemAccess=
1109
+ ly;window.shakaMediaKeysPolyfill=!0}};
1110
+ function my(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
1110
1111
  g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
1111
- ny.prototype.createMediaKeys=function(){var a=new ry(this.keySystem);return Promise.resolve(a)};ny.prototype.getConfiguration=function(){return this.g};function ry(a){this.h=new WebKitMediaKeys(a);this.g=new Kf}ry.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new sy(this.h,a)};ry.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1112
- function py(a,b){a.g.ub();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",qy);try{return zj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}ry.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function sy(a){$a.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new Kf;this.sessionId="";this.expiration=NaN;this.closed=new mf;this.keyStatuses=new ty}pa(sy,$a);p=sy.prototype;
1113
- p.generateRequest=function(a,b){var c=this;this.h=new mf;try{var d=this.l.createSession("video/mp4",lc(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.sc()?"license-request":"license-renewal").set("message",mc(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(uy(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
1114
- function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:uy(c,"output-not-allowed");break;default:uy(c,"internal-error")}});uy(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1115
- p.update=function(a){this.g=new mf;try{this.i.update(lc(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ub()}catch(a){this.closed.reject(a)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function uy(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new O("keystatuseschange");a.dispatchEvent(b)}
1116
- function ty(){this.size=0;this.g=void 0}p=ty.prototype;p.sc=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,Fh.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=Fh.value();return this.g&&jc(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};function vy(){}function wy(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=xy,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=yy,window.MediaKeys=zy,window.MediaKeySystemAccess=Ay,window.shakaMediaKeysPolyfill=!0)}function xy(){return Promise.reject(Error("The key system specified is not supported."))}
1117
- function yy(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}yx.PatchedMediaKeysNop=vy;vy.install=wy;function zy(){throw new TypeError("Illegal constructor.");}zy.prototype.createSession=function(){};zy.prototype.setServerCertificate=function(){};zy.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Ay(){this.keySystem="";throw new TypeError("Illegal constructor.");}Ay.prototype.getConfiguration=function(){};
1118
- Ay.prototype.createMediaKeys=function(){};Bx(wy,-10);function By(){}
1119
- function Cy(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Dy="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Ey;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Fy;window.MediaKeys=Gy;window.MediaKeySystemAccess=Hy;window.shakaMediaKeysPolyfill=!0}}
1120
- function Iy(a){var b=Dy;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Ey(a,b){try{var c=new Hy(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Fy(a){var b=this.mediaKeys;b&&b!=a&&Jy(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Jy(a,this);return Promise.resolve()}yx.PatchedMediaKeysWebkit=By;By.install=Cy;
1121
- function Hy(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
1112
+ my.prototype.createMediaKeys=function(){var a=new qy(this.keySystem);return Promise.resolve(a)};my.prototype.getConfiguration=function(){return this.g};function qy(a){this.h=new WebKitMediaKeys(a);this.g=new Kf}qy.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new ry(this.h,a)};qy.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1113
+ function oy(a,b){a.g.ub();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",py);try{return zj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}qy.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function ry(a){$a.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new Kf;this.sessionId="";this.expiration=NaN;this.closed=new mf;this.keyStatuses=new sy}pa(ry,$a);p=ry.prototype;
1114
+ p.generateRequest=function(a,b){var c=this;this.h=new mf;try{var d=this.l.createSession("video/mp4",lc(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.sc()?"license-request":"license-renewal").set("message",mc(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(ty(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
1115
+ function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:ty(c,"output-not-allowed");break;default:ty(c,"internal-error")}});ty(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1116
+ p.update=function(a){this.g=new mf;try{this.i.update(lc(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ub()}catch(a){this.closed.reject(a)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function ty(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new O("keystatuseschange");a.dispatchEvent(b)}
1117
+ function sy(){this.size=0;this.g=void 0}p=sy.prototype;p.sc=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,Fh.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=Fh.value();return this.g&&jc(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};function uy(){}function vy(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=wy,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=xy,window.MediaKeys=yy,window.MediaKeySystemAccess=zy,window.shakaMediaKeysPolyfill=!0)}function wy(){return Promise.reject(Error("The key system specified is not supported."))}
1118
+ function xy(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}yx.PatchedMediaKeysNop=uy;uy.install=vy;function yy(){throw new TypeError("Illegal constructor.");}yy.prototype.createSession=function(){};yy.prototype.setServerCertificate=function(){};yy.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function zy(){this.keySystem="";throw new TypeError("Illegal constructor.");}zy.prototype.getConfiguration=function(){};
1119
+ zy.prototype.createMediaKeys=function(){};Bx(vy,-10);function Ay(){}
1120
+ function By(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Cy="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Dy;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Ey;window.MediaKeys=Fy;window.MediaKeySystemAccess=Gy;window.shakaMediaKeysPolyfill=!0}}
1121
+ function Hy(a){var b=Cy;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Dy(a,b){try{var c=new Gy(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Ey(a){var b=this.mediaKeys;b&&b!=a&&Iy(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Iy(a,this);return Promise.resolve()}yx.PatchedMediaKeysWebkit=Ay;Ay.install=By;
1122
+ function Gy(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
1122
1123
  l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
1123
- d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}Hy.prototype.createMediaKeys=function(){var a=new Gy(this.g);return Promise.resolve(a)};Hy.prototype.getConfiguration=function(){return this.h};function Gy(a){this.l=a;this.h=null;this.g=new Kf;this.i=[];this.j=new Map}
1124
- function Jy(a,b){a.h=b;a.g.ub();var c=Dy;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=mc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=Ky(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.sc()?"licenserequest":"licenserenewal").set("message",d.message),d=new O("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=Ky(a,d.sessionId))Ly(d,"usable"),
1125
- d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=Ky(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Ly(e,"output-restricted"):1==f?Ly(e,"expired"):Ly(e,"internal-error"))}}))}
1126
- Gy.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new My(b,this.l,a);this.i.push(a);return a};Gy.prototype.setServerCertificate=function(){return Promise.resolve(!1)};Gy.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
1127
- function Ky(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function My(a,b,c){$a.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new mf;this.keyStatuses=new Ny}pa(My,$a);
1128
- function Oy(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=lc(Xf("LOAD_SESSION|"+c));else{var e=Xf("PERSISTENT|");d=tg(e,b)}else d=lc(b)}catch(g){return Promise.reject(g)}a.h=new mf;var f=Iy("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Dd(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
1129
- function Py(a,b,c){if(a.g)a.g.then(function(){return Py(a,b,c)}).catch(function(){return Py(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Tf(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=qg(e.keys[0].k);e=qg(e.keys[0].kid)}else d=lc(c),e=null;var f=Iy("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1130
- function Ly(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new O("keystatuseschange");a.dispatchEvent(b)}p=My.prototype;p.generateRequest=function(a,b){return Oy(this,b,null)};p.load=function(a){return"persistent-license"==this.l?Oy(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new mf;Py(this,b,a);return b};
1131
- p.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Iy("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function Ny(){this.size=0;this.g=void 0}p=Ny.prototype;p.sc=function(){return this.g};
1132
- p.forEach=function(a){this.g&&a(this.g,Fh.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=Fh.value();return this.g&&jc(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var Dy="";Bx(Cy);function Qy(){}function Ry(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Sy,Object.defineProperty(a,"disablePictureInPicture",{get:Ty,set:Uy,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Vy,document.addEventListener("webkitpresentationmodechanged",Wy,!0))}}
1133
- function Wy(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
1134
- function Sy(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function Vy(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1135
- function Ty(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Uy(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}yx.PiPWebkit=Qy;Qy.install=Ry;Bx(Ry);function Xy(){}function Yy(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Zy))}function Zy(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}yx.RandomUUID=Xy;Xy.install=Yy;Bx(Yy);function $y(){}function az(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=bz)}function bz(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}yx.StorageEstimate=$y;$y.install=az;Bx(az);function cz(){}function dz(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:ez})}function ez(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}yx.Symbol=cz;cz.install=dz;Bx(dz);function fz(){}function gz(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}yx.VideoPlayPromise=fz;fz.install=gz;Bx(gz);function hz(){}function iz(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Nd())&&(a.getVideoPlaybackQuality=jz)}}function jz(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}yx.VideoPlaybackQuality=hz;hz.install=iz;Bx(iz);function kz(){}function lz(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=mz;else if(6==b)a=nz;else{try{var c=!!mz(1,2,"")}catch(d){c=!1}c&&(a=mz)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function mz(a,b,c){return new window.TextTrackCue(a,b,c)}function nz(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}yx.VTTCue=kz;kz.install=lz;Bx(lz);function oz(){}oz.prototype.parseInit=function(){};oz.prototype.setSequenceMode=function(){};oz.prototype.setManifestType=function(){};oz.prototype.parseMedia=function(a,b){var c=null,d=[];a=Tf(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=pz.exec(e))){var f=qz.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new yc(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1136
- L("shaka.text.LrcTextParser",oz);oz.prototype.parseMedia=oz.prototype.parseMedia;oz.prototype.setManifestType=oz.prototype.setManifestType;oz.prototype.setSequenceMode=oz.prototype.setSequenceMode;oz.prototype.parseInit=oz.prototype.parseInit;var pz=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,qz=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;qd["application/x-subtitle-lrc"]=function(){return new oz};function rz(){}rz.prototype.parseInit=function(){};rz.prototype.setSequenceMode=function(){};rz.prototype.setManifestType=function(){};
1137
- rz.prototype.parseMedia=function(a,b,c){var d=Tf(a);a=[];if(""==d)return a;var e=Pg(d,"tt");if(!e)throw new P(2,2,2005,"Failed to parse TTML.");d=e.getElementsByTagName("body")[0];if(!d)return[];var f=Cg(e,sz,"frameRate"),g=Cg(e,sz,"subFrameRate"),h=Cg(e,sz,"frameRateMultiplier"),k=Cg(e,sz,"tickRate"),l=Cg(e,sz,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=Cg(e,tz,"extent");if("default"!=m&&"preserve"!=m)throw new P(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new uz(f,
1138
- g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{lc:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?Ag(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var r=t(e),q=r.next();!q.done;q=r.next()){var u=q.value;q=new zc;var v=u.getAttribute("xml:id");if(v){q.id=v;var x=null;n&&(x=vz.exec(n)||wz.exec(n));v=x?Number(x[1]):null;x=x?Number(x[2]):null;var z,y=xz(u,h,"extent");if(y){var B=(z=vz.exec(y))||wz.exec(y);
1139
- null!=B&&(q.width=Number(B[1]),q.height=Number(B[2]),z||(null!=v&&(q.width=100*q.width/v),null!=x&&(q.height=100*q.height/x)),q.widthUnits=z||null!=v?Tc:0,q.heightUnits=z||null!=x?Tc:0)}if(u=xz(u,h,"origin"))if(B=(z=vz.exec(u))||wz.exec(u),null!=B)q.viewportAnchorX=Number(B[1]),q.viewportAnchorY=Number(B[2]),z?y||(q.width=100-q.viewportAnchorX,q.widthUnits=Tc,q.height=100-q.viewportAnchorY,q.heightUnits=Tc):(null!=x&&(q.viewportAnchorY=100*q.viewportAnchorY/x),null!=v&&(q.viewportAnchorX=100*q.viewportAnchorX/
1140
- v)),q.viewportAnchorUnits=z||null!=v?Tc:0}else q=null;q&&k.push(q)}if(xg(d,"p").length)throw new P(2,2,2001,"<p> can only be inside <div> in TTML");n=t(xg(d,"div"));for(r=n.next();!r.done;r=n.next())if(xg(r.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");if(b=yz(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
1141
- function yz(a,b,c,d,e,f,g,h,k,l,m,n){var r=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var q=document.createElement("span");q.textContent=a.textContent}else q=a;for(var u=null,v=t(zz),x=v.next();!x.done&&!(u=Az(q,"backgroundImage",d,"#",x.value)[0]);x=v.next());v=null;var z=Cg(q,zz,"backgroundImage");n&&z&&!z.startsWith("#")&&(x=new fb(n),z=new fb(z),(x=x.resolve(z).toString())&&(v=x));if("p"==a.nodeName||u||v)m=!0;a=m;x="default"==(q.getAttribute("xml:space")||
1142
- (h?"default":"preserve"));z=Array.from(q.childNodes).every(function(C){return C.nodeType==Node.TEXT_NODE});h=[];if(!z)for(var y=t(q.childNodes),B=y.next();!B.done;B=y.next())(B=yz(B.value,b,c,d,e,f,g,x,k,q,m,n))&&h.push(B);d=null!=l;n=/\S/.test(q.textContent);B=q.hasAttribute("begin")||q.hasAttribute("end")||q.hasAttribute("dur");if(!(B||n||"br"==q.tagName||0!=h.length||d&&!x))return null;y=Bz(q,c);n=y.start;for(y=y.end;r&&r.nodeType==Node.ELEMENT_NODE&&"tt"!=r.tagName;)y=Cz(r,c,n,y),n=y.start,y=
1143
- y.end,r=r.parentNode;null==n&&(n=0);n+=b.periodStart;y=null==y?Infinity:y+b.periodStart;n=Math.max(n,b.segmentStart);y=Math.min(y,b.segmentEnd);if(!B&&0<h.length)for(n=Infinity,y=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),y=Math.max(y,c.endTime);if("br"==q.tagName)return e=new yc(n,y,""),e.lineBreak=!0,e;b="";z&&(b=q.textContent,x&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new yc(n,y,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Az(q,"region",f,"")[0];
1144
- if(q.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var A=k.getAttribute("xml:id");b.region=g.filter(function(C){return C.id==A})[0]}g=k;l&&d&&!q.getAttribute("region")&&!q.getAttribute("style")&&(g=Az(l,"region",f,"")[0]);Dz(b,q,g,u,v,e,a,0==h.length);return b}
1145
- function Dz(a,b,c,d,e,f,g,h){g=g||h;"rtl"==Ez(b,c,f,"direction",g)&&(a.direction="rtl");h=Ez(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Cc);(h=Ez(b,c,f,"textAlign",!0))?(a.positionAlign=Fz[h],a.lineAlign=Gz[h],a.textAlign=Nc[h.toUpperCase()]):a.textAlign=Bc;if(h=Ez(b,c,f,"displayAlign",!0))a.displayAlign=Oc[h.toUpperCase()];if(h=Ez(b,c,f,"color",g))a.color=h;if(h=Ez(b,c,f,"backgroundColor",
1146
- g))a.backgroundColor=h;if(h=Ez(b,c,f,"border",g))a.border=h;if(h=Ez(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=Ez(b,c,f,"fontWeight",g))&&
1147
- "bold"==h&&(a.fontWeight=700);h=Ez(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=Ez(b,c,f,"lineHeight",g))&&h.match(Hz)&&(a.lineHeight=h);(h=Ez(b,c,f,"fontSize",g))&&(h.match(Hz)||h.match(Iz))&&(a.fontSize=h);if(h=Ez(b,c,f,"fontStyle",g))a.fontStyle=Sc[h.toUpperCase()];d?(e=d.getAttribute("imageType")||d.getAttribute("imagetype"),h=d.getAttribute("encoding"),d=d.textContent.trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=Ez(b,
1148
- c,f,"textOutline",g))d=d.split(" "),d[0].match(Hz)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(Hz)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=Ez(b,c,f,"letterSpacing",g))&&d.match(Hz)&&(a.letterSpacing=d);(d=Ez(b,c,f,"linePadding",g))&&d.match(Hz)&&(a.linePadding=d);if(d=Ez(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=xz(c,f,"textDecoration"))&&Jz(a,d);(d=Kz(b,f,"textDecoration"))&&Jz(a,d);if(d=Ez(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(Ez(b,c,f,
1124
+ d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}Gy.prototype.createMediaKeys=function(){var a=new Fy(this.g);return Promise.resolve(a)};Gy.prototype.getConfiguration=function(){return this.h};function Fy(a){this.l=a;this.h=null;this.g=new Kf;this.i=[];this.j=new Map}
1125
+ function Iy(a,b){a.h=b;a.g.ub();var c=Cy;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=mc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=Jy(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.sc()?"licenserequest":"licenserenewal").set("message",d.message),d=new O("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=Jy(a,d.sessionId))Ky(d,"usable"),
1126
+ d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=Jy(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Ky(e,"output-restricted"):1==f?Ky(e,"expired"):Ky(e,"internal-error"))}}))}
1127
+ Fy.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new Ly(b,this.l,a);this.i.push(a);return a};Fy.prototype.setServerCertificate=function(){return Promise.resolve(!1)};Fy.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
1128
+ function Jy(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function Ly(a,b,c){$a.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new mf;this.keyStatuses=new My}pa(Ly,$a);
1129
+ function Ny(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=lc(Xf("LOAD_SESSION|"+c));else{var e=Xf("PERSISTENT|");d=tg(e,b)}else d=lc(b)}catch(g){return Promise.reject(g)}a.h=new mf;var f=Hy("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Dd(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
1130
+ function Oy(a,b,c){if(a.g)a.g.then(function(){return Oy(a,b,c)}).catch(function(){return Oy(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Tf(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=qg(e.keys[0].k);e=qg(e.keys[0].kid)}else d=lc(c),e=null;var f=Hy("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1131
+ function Ky(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new O("keystatuseschange");a.dispatchEvent(b)}p=Ly.prototype;p.generateRequest=function(a,b){return Ny(this,b,null)};p.load=function(a){return"persistent-license"==this.l?Ny(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new mf;Oy(this,b,a);return b};
1132
+ p.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Hy("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function My(){this.size=0;this.g=void 0}p=My.prototype;p.sc=function(){return this.g};
1133
+ p.forEach=function(a){this.g&&a(this.g,Fh.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=Fh.value();return this.g&&jc(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var Cy="";Bx(By);function Py(){}function Qy(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Ry,Object.defineProperty(a,"disablePictureInPicture",{get:Sy,set:Ty,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Uy,document.addEventListener("webkitpresentationmodechanged",Vy,!0))}}
1134
+ function Vy(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
1135
+ function Ry(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function Uy(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1136
+ function Sy(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Ty(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}yx.PiPWebkit=Py;Py.install=Qy;Bx(Qy);function Wy(){}function Xy(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Yy))}function Yy(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}yx.RandomUUID=Wy;Wy.install=Xy;Bx(Xy);function Zy(){}function $y(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=az)}function az(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}yx.StorageEstimate=Zy;Zy.install=$y;Bx($y);function bz(){}function cz(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:dz})}function dz(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}yx.Symbol=bz;bz.install=cz;Bx(cz);function ez(){}function fz(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}yx.VideoPlayPromise=ez;ez.install=fz;Bx(fz);function gz(){}function hz(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Nd())&&(a.getVideoPlaybackQuality=iz)}}function iz(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}yx.VideoPlaybackQuality=gz;gz.install=hz;Bx(hz);function jz(){}function kz(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=lz;else if(6==b)a=mz;else{try{var c=!!lz(1,2,"")}catch(d){c=!1}c&&(a=lz)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function lz(a,b,c){return new window.TextTrackCue(a,b,c)}function mz(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}yx.VTTCue=jz;jz.install=kz;Bx(kz);function nz(){}nz.prototype.parseInit=function(){};nz.prototype.setSequenceMode=function(){};nz.prototype.setManifestType=function(){};nz.prototype.parseMedia=function(a,b){var c=null,d=[];a=Tf(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=oz.exec(e))){var f=pz.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new yc(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1137
+ L("shaka.text.LrcTextParser",nz);nz.prototype.parseMedia=nz.prototype.parseMedia;nz.prototype.setManifestType=nz.prototype.setManifestType;nz.prototype.setSequenceMode=nz.prototype.setSequenceMode;nz.prototype.parseInit=nz.prototype.parseInit;var oz=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,pz=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;qd["application/x-subtitle-lrc"]=function(){return new nz};function qz(){}qz.prototype.parseInit=function(){};qz.prototype.setSequenceMode=function(){};qz.prototype.setManifestType=function(){};
1138
+ qz.prototype.parseMedia=function(a,b,c){var d=Tf(a);a=[];if(""==d)return a;var e=Pg(d,"tt");if(!e)throw new P(2,2,2005,"Failed to parse TTML.");d=e.getElementsByTagName("body")[0];if(!d)return[];var f=Cg(e,rz,"frameRate"),g=Cg(e,rz,"subFrameRate"),h=Cg(e,rz,"frameRateMultiplier"),k=Cg(e,rz,"tickRate"),l=Cg(e,rz,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=Cg(e,sz,"extent");if("default"!=m&&"preserve"!=m)throw new P(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new tz(f,
1139
+ g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{mc:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?Ag(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var r=t(e),q=r.next();!q.done;q=r.next()){var u=q.value;q=new zc;var v=u.getAttribute("xml:id");if(v){q.id=v;var x=null;n&&(x=uz.exec(n)||vz.exec(n));v=x?Number(x[1]):null;x=x?Number(x[2]):null;var z,y=wz(u,h,"extent");if(y){var B=(z=uz.exec(y))||vz.exec(y);
1140
+ null!=B&&(q.width=Number(B[1]),q.height=Number(B[2]),z||(null!=v&&(q.width=100*q.width/v),null!=x&&(q.height=100*q.height/x)),q.widthUnits=z||null!=v?Tc:0,q.heightUnits=z||null!=x?Tc:0)}if(u=wz(u,h,"origin"))if(B=(z=uz.exec(u))||vz.exec(u),null!=B)q.viewportAnchorX=Number(B[1]),q.viewportAnchorY=Number(B[2]),z?y||(q.width=100-q.viewportAnchorX,q.widthUnits=Tc,q.height=100-q.viewportAnchorY,q.heightUnits=Tc):(null!=x&&(q.viewportAnchorY=100*q.viewportAnchorY/x),null!=v&&(q.viewportAnchorX=100*q.viewportAnchorX/
1141
+ v)),q.viewportAnchorUnits=z||null!=v?Tc:0}else q=null;q&&k.push(q)}if(xg(d,"p").length)throw new P(2,2,2001,"<p> can only be inside <div> in TTML");n=t(xg(d,"div"));for(r=n.next();!r.done;r=n.next())if(xg(r.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");if(b=xz(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
1142
+ function xz(a,b,c,d,e,f,g,h,k,l,m,n){var r=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var q=document.createElement("span");q.textContent=a.textContent}else q=a;for(var u=null,v=t(yz),x=v.next();!x.done&&!(u=zz(q,"backgroundImage",d,"#",x.value)[0]);x=v.next());v=null;var z=Cg(q,yz,"backgroundImage");n&&z&&!z.startsWith("#")&&(x=new fb(n),z=new fb(z),(x=x.resolve(z).toString())&&(v=x));if("p"==a.nodeName||u||v)m=!0;a=m;x="default"==(q.getAttribute("xml:space")||
1143
+ (h?"default":"preserve"));z=Array.from(q.childNodes).every(function(C){return C.nodeType==Node.TEXT_NODE});h=[];if(!z)for(var y=t(q.childNodes),B=y.next();!B.done;B=y.next())(B=xz(B.value,b,c,d,e,f,g,x,k,q,m,n))&&h.push(B);d=null!=l;n=/\S/.test(q.textContent);B=q.hasAttribute("begin")||q.hasAttribute("end")||q.hasAttribute("dur");if(!(B||n||"br"==q.tagName||0!=h.length||d&&!x))return null;y=Az(q,c);n=y.start;for(y=y.end;r&&r.nodeType==Node.ELEMENT_NODE&&"tt"!=r.tagName;)y=Bz(r,c,n,y),n=y.start,y=
1144
+ y.end,r=r.parentNode;null==n&&(n=0);n+=b.periodStart;y=null==y?Infinity:y+b.periodStart;n=Math.max(n,b.segmentStart);y=Math.min(y,b.segmentEnd);if(!B&&0<h.length)for(n=Infinity,y=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),y=Math.max(y,c.endTime);if("br"==q.tagName)return e=new yc(n,y,""),e.lineBreak=!0,e;b="";z&&(b=q.textContent,x&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new yc(n,y,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=zz(q,"region",f,"")[0];
1145
+ if(q.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var A=k.getAttribute("xml:id");b.region=g.filter(function(C){return C.id==A})[0]}g=k;l&&d&&!q.getAttribute("region")&&!q.getAttribute("style")&&(g=zz(l,"region",f,"")[0]);Cz(b,q,g,u,v,e,a,0==h.length);return b}
1146
+ function Cz(a,b,c,d,e,f,g,h){g=g||h;"rtl"==Dz(b,c,f,"direction",g)&&(a.direction="rtl");h=Dz(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Cc);(h=Dz(b,c,f,"textAlign",!0))?(a.positionAlign=Ez[h],a.lineAlign=Fz[h],a.textAlign=Nc[h.toUpperCase()]):a.textAlign=Bc;if(h=Dz(b,c,f,"displayAlign",!0))a.displayAlign=Oc[h.toUpperCase()];if(h=Dz(b,c,f,"color",g))a.color=h;if(h=Dz(b,c,f,"backgroundColor",
1147
+ g))a.backgroundColor=h;if(h=Dz(b,c,f,"border",g))a.border=h;if(h=Dz(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h}(h=Dz(b,c,f,"fontWeight",g))&&
1148
+ "bold"==h&&(a.fontWeight=700);h=Dz(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=Dz(b,c,f,"lineHeight",g))&&h.match(Gz)&&(a.lineHeight=h);(h=Dz(b,c,f,"fontSize",g))&&(h.match(Gz)||h.match(Hz))&&(a.fontSize=h);if(h=Dz(b,c,f,"fontStyle",g))a.fontStyle=Sc[h.toUpperCase()];d?(e=d.getAttribute("imageType")||d.getAttribute("imagetype"),h=d.getAttribute("encoding"),d=d.textContent.trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=e);if(d=Dz(b,
1149
+ c,f,"textOutline",g))d=d.split(" "),d[0].match(Gz)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(Gz)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=Dz(b,c,f,"letterSpacing",g))&&d.match(Gz)&&(a.letterSpacing=d);(d=Dz(b,c,f,"linePadding",g))&&d.match(Gz)&&(a.linePadding=d);if(d=Dz(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=wz(c,f,"textDecoration"))&&Iz(a,d);(d=Jz(b,f,"textDecoration"))&&Iz(a,d);if(d=Dz(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(Dz(b,c,f,
1149
1150
  "ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
1150
- function Jz(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&vc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&vc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
1151
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&vc(a.textDecoration,"overline")}}function Ez(a,b,c,d,e){e=void 0===e?!0:e;return(a=Kz(a,c,d))?a:e?xz(b,c,d):null}function xz(a,b,c){if(!a)return null;var d=Cg(a,tz,c);return d?d:Lz(a,b,c)}function Kz(a,b,c){var d=Cg(a,tz,c);return d?d:Lz(a,b,c)}
1152
- function Lz(a,b,c){a=Az(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Bg(a[e],"urn:ebu:tt:style",c);f||(f=Cg(a[e],tz,c));f||(f=Kz(a[e],b,c));f&&(d=f)}return d}
1153
- function Az(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Bg(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Cz(a,b,c,d){a=Bz(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
1154
- function Bz(a,b){var c=Mz(a.getAttribute("begin"),b),d=Mz(a.getAttribute("end"),b);a=Mz(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1155
- function Mz(a,b){var c=null;if(Nz.test(a)){a=Nz.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(Oz.test(a))c=Pz(Oz,a);else if(Qz.test(a))c=Pz(Qz,a);else if(Rz.test(a))a=Rz.exec(a),c=Number(a[1])/b.frameRate;else if(Sz.test(a))a=Sz.exec(a),c=Number(a[1])/b.g;else if(Tz.test(a))c=Pz(Tz,a);else if(a)throw new P(2,2,2001,"Could not parse cue time range in TTML");return c}
1156
- function Pz(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}L("shaka.text.TtmlTextParser",rz);rz.prototype.parseMedia=rz.prototype.parseMedia;rz.prototype.setManifestType=rz.prototype.setManifestType;rz.prototype.setSequenceMode=rz.prototype.setSequenceMode;rz.prototype.parseInit=rz.prototype.parseInit;
1157
- function uz(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
1158
- var vz=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Iz=/^(\d{1,2}(?:\.\d+)?|100)%$/,Hz=/^(\d+px|\d+em|\d*\.?\d+c)$/,wz=/^(\d+)px (\d+)px$/,Nz=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Oz=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Qz=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Rz=/^(\d*(?:\.\d*)?)f$/,Sz=/^(\d*(?:\.\d*)?)t$/,Tz=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Gz={left:Gc,center:"center",right:"end",start:Gc,
1159
- end:"end"},Fz={left:"line-left",center:"center",right:"line-right"},sz=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],tz=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],zz=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];qd["application/ttml+xml"]=function(){return new rz};function Uz(){this.g=new rz}Uz.prototype.parseInit=function(a){var b=!1;(new bg).box("moov",gg).box("trak",gg).box("mdia",gg).box("minf",gg).box("stbl",gg).T("stsd",ig).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new P(2,2,2007);};Uz.prototype.setSequenceMode=function(){};Uz.prototype.setManifestType=function(){};
1160
- Uz.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new bg).box("mdat",kg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new P(2,2,2007);return f};L("shaka.text.Mp4TtmlParser",Uz);Uz.prototype.parseMedia=Uz.prototype.parseMedia;Uz.prototype.setManifestType=Uz.prototype.setManifestType;Uz.prototype.setSequenceMode=Uz.prototype.setSequenceMode;Uz.prototype.parseInit=Uz.prototype.parseInit;qd['application/mp4; codecs="stpp"']=function(){return new Uz};
1161
- qd['application/mp4; codecs="stpp.ttml"']=function(){return new Uz};qd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Uz};qd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Uz};function Vz(){this.h=!1;this.g="UNKNOWN"}Vz.prototype.parseInit=function(){};Vz.prototype.setSequenceMode=function(a){this.h=a};Vz.prototype.setManifestType=function(a){this.g=a};
1162
- Vz.prototype.parseMedia=function(a,b){a=Tf(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new P(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.h){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=Wz(new kt(d[1]));if(null==a)throw new P(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
1151
+ function Iz(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&vc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&vc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
1152
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&vc(a.textDecoration,"overline")}}function Dz(a,b,c,d,e){e=void 0===e?!0:e;return(a=Jz(a,c,d))?a:e?wz(b,c,d):null}function wz(a,b,c){if(!a)return null;var d=Cg(a,sz,c);return d?d:Kz(a,b,c)}function Jz(a,b,c){var d=Cg(a,sz,c);return d?d:Kz(a,b,c)}
1153
+ function Kz(a,b,c){a=zz(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Bg(a[e],"urn:ebu:tt:style",c);f||(f=Cg(a[e],sz,c));f||(f=Jz(a[e],b,c));f&&(d=f)}return d}
1154
+ function zz(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Bg(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Bz(a,b,c,d){a=Az(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
1155
+ function Az(a,b){var c=Lz(a.getAttribute("begin"),b),d=Lz(a.getAttribute("end"),b);a=Lz(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1156
+ function Lz(a,b){var c=null;if(Mz.test(a)){a=Mz.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(Nz.test(a))c=Oz(Nz,a);else if(Pz.test(a))c=Oz(Pz,a);else if(Qz.test(a))a=Qz.exec(a),c=Number(a[1])/b.frameRate;else if(Rz.test(a))a=Rz.exec(a),c=Number(a[1])/b.g;else if(Sz.test(a))c=Oz(Sz,a);else if(a)throw new P(2,2,2001,"Could not parse cue time range in TTML");return c}
1157
+ function Oz(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}L("shaka.text.TtmlTextParser",qz);qz.prototype.parseMedia=qz.prototype.parseMedia;qz.prototype.setManifestType=qz.prototype.setManifestType;qz.prototype.setSequenceMode=qz.prototype.setSequenceMode;qz.prototype.parseInit=qz.prototype.parseInit;
1158
+ function tz(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
1159
+ var uz=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Hz=/^(\d{1,2}(?:\.\d+)?|100)%$/,Gz=/^(\d+px|\d+em|\d*\.?\d+c)$/,vz=/^(\d+)px (\d+)px$/,Mz=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Nz=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Pz=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Qz=/^(\d*(?:\.\d*)?)f$/,Rz=/^(\d*(?:\.\d*)?)t$/,Sz=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Fz={left:Gc,center:"center",right:"end",start:Gc,
1160
+ end:"end"},Ez={left:"line-left",center:"center",right:"line-right"},rz=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],sz=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],yz=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];qd["application/ttml+xml"]=function(){return new qz};function Tz(){this.g=new qz}Tz.prototype.parseInit=function(a){var b=!1;(new bg).box("moov",gg).box("trak",gg).box("mdia",gg).box("minf",gg).box("stbl",gg).T("stsd",ig).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new P(2,2,2007);};Tz.prototype.setSequenceMode=function(){};Tz.prototype.setManifestType=function(){};
1161
+ Tz.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new bg).box("mdat",kg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new P(2,2,2007);return f};L("shaka.text.Mp4TtmlParser",Tz);Tz.prototype.parseMedia=Tz.prototype.parseMedia;Tz.prototype.setManifestType=Tz.prototype.setManifestType;Tz.prototype.setSequenceMode=Tz.prototype.setSequenceMode;Tz.prototype.parseInit=Tz.prototype.parseInit;qd['application/mp4; codecs="stpp"']=function(){return new Tz};
1162
+ qd['application/mp4; codecs="stpp.ttml"']=function(){return new Tz};qd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Tz};qd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Tz};function Uz(){this.h=!1;this.g="UNKNOWN"}Uz.prototype.parseInit=function(){};Uz.prototype.setSequenceMode=function(a){this.h=a};Uz.prototype.setManifestType=function(a){this.g=a};
1163
+ Uz.prototype.parseMedia=function(a,b){a=Tf(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new P(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.h){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=Vz(new kt(d[1]));if(null==a)throw new P(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
1163
1164
  e/9E4-a}}else c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g&&(a=b.segmentStart);b=[];e=t(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new kt(d);var f=new zc;nt(d);lt(d);for(var g=nt(d);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=
1164
- Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");lt(d);g=nt(d)}b.push(f)}e=new Map;Xz(e);d=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=
1165
+ Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");lt(d);g=nt(d)}b.push(f)}e=new Map;Wz(e);d=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=
1165
1166
  t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new yc(0,0,""));for(var m=!1,n=0;n<k.length;n++){var r=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(r){var q=r[2].trim().replace(";","");switch(r[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=q;break;case "color":m=!0;l.color=q;break;case "font-family":m=!0;l.fontFamily=q;break;
1166
1167
  case "font-size":m=!0;l.fontSize=q;break;case "font-weight":if(700<=parseInt(q,10)||"bold"==q)m=!0,l.fontWeight=700;break;case "font-style":switch(q){case "normal":m=!0;l.fontStyle=Jc;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(q);break;case "text-combine-upright":m=!0;l.textCombineUpright=q;break;case "text-shadow":m=!0;l.textShadow=q;break;case "white-space":m=!0,l.wrapLine="noWrap"!=q}}}m&&e.set(g,
1167
- l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new kt(f[0]),k=Wz(g),n=mt(g,/[ \t]+--\x3e[ \t]+/g),l=Wz(g),null==k||null==n||null==l)Ra("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();e.has("global")?(m=e.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new yc(k,l,"");lt(g);for(k=nt(g);k;)Yz(m,k,b),lt(g),k=nt(g);Zz(f,
1168
- m,e);null!=h&&(m.id=h);f=m}f&&d.push(f)}return d};function Xz(a){for(var b=t(Object.entries(Qc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new yc(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Rc));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new yc(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1169
- function Zz(a,b,c){if(a.includes("<")){0===c.size&&Xz(c);a:{for(var d=[],e=-1,f="",g=0;g<a.length;g++)if("/"===a[g]&&0<g&&"<"===a[g-1]){var h=a.indexOf(">",g);if(h<=g)break a;if((h=a.substring(g+1,h))&&"c"===h){var k=d.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=a[g]:f+=a[g]}else f+=a[g]}else"<"===a[g]?(e=g+1,"c"!=a[e]&&(e=-1)):">"===a[g]&&0<e&&(d.push(a.substr(e,g-e)),e=-1),f+=a[g];a=f}d=a;a=[];f=-1;for(e=0;e<d.length;e++)"<"===d[e]?f=e+1:">"===d[e]&&
1170
- 0<f&&(f=d.substr(f,e-f),f.match($z)&&a.push(f),f=-1);a=t(a);for(e=a.next();!e.done;e=a.next())e=e.value,d=d.replace("<"+e+">",'<div time="'+e+'">'),d+="</div>";a=d;a:{e=a;f=[];g=-1;a="";d=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){d=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=e[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=e[h]}else a+=e[h]}else"<"===e[h]?(g=h+1,"v"!=
1171
- e[g]&&(g=-1)):">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),a+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),a=a.replace("<"+f+">","<"+g+">"),a=a.replace("</"+f+">","</"+g+">"),d||(a+="</"+g+">")}if(d=Pg("<span>"+a+"</span>","span")){d=d.childNodes;if(1==d.length&&(e=d[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=aA(a);return}a=t(d);for(d=a.next();!d.done;d=a.next())bA(d.value,b,c)}else b.payload=aA(a)}else b.payload=aA(a)}
1172
- function cA(a,b){return a&&0<a.length?a:b}
1173
- function bA(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new zc;d.position=null;d.size=0;if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var e=t(a.nodeName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(g=c.get(g))&&(d.backgroundColor=cA(g.backgroundColor,d.backgroundColor),d.color=cA(g.color,d.color),d.fontFamily=cA(g.fontFamily,
1174
- d.fontFamily),d.fontSize=cA(g.fontSize,d.fontSize),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.textShadow=g.textShadow,d.wrapLine=g.wrapLine);switch(f){case "br":d=Kc(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.getAttribute("color"))d.color=f;break;case "div":f=a.getAttribute("time");
1175
- if(!f)break;if(f=Wz(new kt(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.childNodes;if(Eg(a)||1==e.length&&Eg(e[0]))for(e=!0,c=t(a.textContent.split("\n")),a=c.next();!a.done;a=c.next())a=a.value,e||(e=Kc(d.startTime,d.endTime),b.nestedCues.push(e)),0<a.length&&(e=d.clone(),e.payload=aA(a),b.nestedCues.push(e)),e=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())bA(a.value,d,c)}
1176
- function Yz(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Bc:a.textAlign=Nc[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
1177
- b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Ac);else if(d=/^region:(.*)$/.exec(b)){if(b=dA(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=Pc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Fc,a.line=Number(c[1]),c[2]&&(a.lineAlign=Pc[c[2].toUpperCase()])}
1178
- function dA(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function Wz(a){a=mt(a,$z);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)}
1179
- function aA(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}L("shaka.text.VttTextParser",Vz);Vz.prototype.parseMedia=Vz.prototype.parseMedia;Vz.prototype.setManifestType=Vz.prototype.setManifestType;Vz.prototype.setSequenceMode=Vz.prototype.setSequenceMode;Vz.prototype.parseInit=Vz.prototype.parseInit;
1180
- var $z=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;qd["text/vtt"]=function(){return new Vz};qd['text/vtt; codecs="vtt"']=function(){return new Vz};qd['text/vtt; codecs="wvtt"']=function(){return new Vz};function eA(){this.g=null}eA.prototype.parseInit=function(a){var b=this,c=!1;(new bg).box("moov",gg).box("trak",gg).box("mdia",gg).T("mdhd",function(d){d=fi(d.reader,d.version);b.g=d.timescale}).box("minf",gg).box("stbl",gg).T("stsd",ig).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};eA.prototype.setSequenceMode=function(){};eA.prototype.setManifestType=function(){};
1181
- eA.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new bg).box("moof",gg).box("traf",gg).T("tfdt",function(B){g=!0;c=ei(B.reader,B.version).baseMediaDecodeTime}).T("tfhd",function(B){l=di(B.reader,B.flags).Og}).T("trun",function(B){h=!0;d=gi(B.reader,B.version,B.flags).lh}).box("mdat",kg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);a=c;for(var m=new Zf(e,0),n=t(d),r=n.next();!r.done;r=n.next()){r=
1182
- r.value;var q=r.gg||l,u=r.Ke?c+r.Ke:a;a=u+(q||0);var v=0;do{var x=m.O();v+=x;var z=m.O(),y=null;"vttc"==fg(z)?8<x&&(y=m.Qb(x-8)):m.skip(x-8);q&&y&&(x=fA(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(x))}while(r.sampleSize&&v<r.sampleSize)}return f.filter(zd)};function fA(a,b,c){var d,e,f;(new bg).box("payl",kg(function(g){d=Tf(g)})).box("iden",kg(function(g){e=Tf(g)})).box("sttg",kg(function(g){f=Tf(g)})).parse(a);return d?gA(d,e,f,b,c):null}
1183
- function gA(a,b,c,d,e){d=new yc(d,e,"");Zz(a,d,new Map);b&&(d.id=b);if(c)for(a=new kt(c),b=nt(a);b;)Yz(d,b,[]),lt(a),b=nt(a);return d}L("shaka.text.Mp4VttParser",eA);eA.prototype.parseMedia=eA.prototype.parseMedia;eA.prototype.setManifestType=eA.prototype.setManifestType;eA.prototype.setSequenceMode=eA.prototype.setSequenceMode;eA.prototype.parseInit=eA.prototype.parseInit;qd['application/mp4; codecs="wvtt"']=function(){return new eA};function hA(){}hA.prototype.parseInit=function(){};hA.prototype.setSequenceMode=function(){};hA.prototype.setManifestType=function(){};hA.prototype.parseMedia=function(a){var b=Tf(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 kt(c[0]),e=iA(d),f=mt(d,/,/g);d=iA(d);if(null==e||null==f||null==d)throw new P(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new yc(e,d,c.slice(1).join("\n").trim()))}return a};
1184
- function iA(a){a=mt(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}L("shaka.text.SbvTextParser",hA);hA.prototype.parseMedia=hA.prototype.parseMedia;hA.prototype.setManifestType=hA.prototype.setManifestType;hA.prototype.setSequenceMode=hA.prototype.setSequenceMode;hA.prototype.parseInit=hA.prototype.parseInit;qd["text/x-subviewer"]=function(){return new hA};function jA(){this.g=new Vz}jA.prototype.parseInit=function(){};jA.prototype.setSequenceMode=function(){};jA.prototype.setManifestType=function(){};jA.prototype.parseMedia=function(a,b,c){a=Tf(a);a=kA(a);a=lc(Xf(a));return this.g.parseMedia(a,b,c)};
1185
- function kA(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").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}L("shaka.text.SrtTextParser",jA);jA.srt2webvtt=kA;jA.prototype.parseMedia=jA.prototype.parseMedia;
1186
- jA.prototype.setManifestType=jA.prototype.setManifestType;jA.prototype.setSequenceMode=jA.prototype.setSequenceMode;jA.prototype.parseInit=jA.prototype.parseInit;qd["text/srt"]=function(){return new jA};function lA(){}lA.prototype.parseInit=function(){};lA.prototype.setSequenceMode=function(){};lA.prototype.setManifestType=function(){};
1187
- lA.prototype.parseMedia=function(a){var b="",c="";a=Tf(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=mA.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=nA.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(oA);else if("Style"==e){e=f.split(oA);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
1188
- [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Ze:e.Ze},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=nA.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(oA);else if("Dialogue"==f){g=g.split(oA);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=pA(f.Start);var k=pA(f.End);g=new yc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Ze=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Ze}}(e)))&&qA(g,f);d.push(g)}return d};
1189
- function qA(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=rA(c))a.color=c;if(c=b.BackColour)if(c=rA(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Hc;a.textAlign="start";break;case 2:a.displayAlign=Hc;a.textAlign=Bc;break;case 3:a.displayAlign=Hc;a.textAlign="end";
1168
+ l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new kt(f[0]),k=Vz(g),n=mt(g,/[ \t]+--\x3e[ \t]+/g),l=Vz(g),null==k||null==n||null==l)Ra("Failed to parse VTT time code. Cue skipped:",h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();e.has("global")?(m=e.get("global").clone(),m.startTime=k,m.endTime=l,m.payload=""):m=new yc(k,l,"");lt(g);for(k=nt(g);k;)Xz(m,k,b),lt(g),k=nt(g);Yz(f,
1169
+ m,e);null!=h&&(m.id=h);f=m}f&&d.push(f)}return d};function Wz(a){for(var b=t(Object.entries(Qc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new yc(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Rc));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new yc(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1170
+ function Yz(a,b,c){if(a.includes("<")){0===c.size&&Wz(c);a:{for(var d=[],e=-1,f="",g=0;g<a.length;g++)if("/"===a[g]&&0<g&&"<"===a[g-1]){var h=a.indexOf(">",g);if(h<=g)break a;if((h=a.substring(g+1,h))&&"c"===h){var k=d.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=a[g]:f+=a[g]}else f+=a[g]}else"<"===a[g]?(e=g+1,"c"!=a[e]&&(e=-1)):">"===a[g]&&0<e&&(d.push(a.substr(e,g-e)),e=-1),f+=a[g];a=f}d=a;a=[];f=-1;for(e=0;e<d.length;e++)"<"===d[e]?f=e+1:">"===d[e]&&
1171
+ 0<f&&(f=d.substr(f,e-f),f.match(Zz)&&a.push(f),f=-1);a=t(a);for(e=a.next();!e.done;e=a.next())e=e.value,d=d.replace("<"+e+">",'<div time="'+e+'">'),d+="</div>";a=d;a:{e=a;f=[];g=-1;a="";d=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){d=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=e[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=e[h]}else a+=e[h]}else"<"===e[h]?(g=h+1,"v"!=
1172
+ e[g]&&(g=-1)):">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),a+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),a=a.replace("<"+f+">","<"+g+">"),a=a.replace("</"+f+">","</"+g+">"),d||(a+="</"+g+">")}if(d=Pg("<span>"+a+"</span>","span")){d=d.childNodes;if(1==d.length&&(e=d[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=$z(a);return}a=t(d);for(d=a.next();!d.done;d=a.next())aA(d.value,b,c)}else b.payload=$z(a)}else b.payload=$z(a)}
1173
+ function bA(a,b){return a&&0<a.length?a:b}
1174
+ function aA(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new zc;d.position=null;d.size=0;if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var e=t(a.nodeName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(g=c.get(g))&&(d.backgroundColor=bA(g.backgroundColor,d.backgroundColor),d.color=bA(g.color,d.color),d.fontFamily=bA(g.fontFamily,
1175
+ d.fontFamily),d.fontSize=bA(g.fontSize,d.fontSize),d.textShadow=bA(g.textShadow,d.textShadow),d.fontWeight=g.fontWeight,d.fontStyle=g.fontStyle,d.opacity=g.opacity,d.rubyTag=g.rubyTag,d.textCombineUpright=g.textCombineUpright,d.wrapLine=g.wrapLine);switch(f){case "br":d=Kc(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=700;break;case "i":d.fontStyle="italic";break;case "u":d.textDecoration.push("underline");break;case "font":if(f=a.getAttribute("color"))d.color=f;break;case "div":f=
1176
+ a.getAttribute("time");if(!f)break;if(f=Vz(new kt(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.childNodes;if(Eg(a)||1==e.length&&Eg(e[0]))for(e=!0,c=t(a.textContent.split("\n")),a=c.next();!a.done;a=c.next())a=a.value,e||(e=Kc(d.startTime,d.endTime),b.nestedCues.push(e)),0<a.length&&(e=d.clone(),e.payload=$z(a),b.nestedCues.push(e)),e=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())aA(a.value,d,c)}
1177
+ function Xz(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Bc:a.textAlign=Nc[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
1178
+ b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Ac);else if(d=/^region:(.*)$/.exec(b)){if(b=cA(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=Pc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Fc,a.line=Number(c[1]),c[2]&&(a.lineAlign=Pc[c[2].toUpperCase()])}
1179
+ function cA(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function Vz(a){a=mt(a,Zz);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)}
1180
+ function $z(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}L("shaka.text.VttTextParser",Uz);Uz.prototype.parseMedia=Uz.prototype.parseMedia;Uz.prototype.setManifestType=Uz.prototype.setManifestType;Uz.prototype.setSequenceMode=Uz.prototype.setSequenceMode;Uz.prototype.parseInit=Uz.prototype.parseInit;
1181
+ var Zz=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;qd["text/vtt"]=function(){return new Uz};qd['text/vtt; codecs="vtt"']=function(){return new Uz};qd['text/vtt; codecs="wvtt"']=function(){return new Uz};function dA(){this.g=null}dA.prototype.parseInit=function(a){var b=this,c=!1;(new bg).box("moov",gg).box("trak",gg).box("mdia",gg).T("mdhd",function(d){d=fi(d.reader,d.version);b.g=d.timescale}).box("minf",gg).box("stbl",gg).T("stsd",ig).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};dA.prototype.setSequenceMode=function(){};dA.prototype.setManifestType=function(){};
1182
+ dA.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new bg).box("moof",gg).box("traf",gg).T("tfdt",function(B){g=!0;c=ei(B.reader,B.version).baseMediaDecodeTime}).T("tfhd",function(B){l=di(B.reader,B.flags).Og}).T("trun",function(B){h=!0;d=gi(B.reader,B.version,B.flags).lh}).box("mdat",kg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);a=c;for(var m=new Zf(e,0),n=t(d),r=n.next();!r.done;r=n.next()){r=
1183
+ r.value;var q=r.gg||l,u=r.Ke?c+r.Ke:a;a=u+(q||0);var v=0;do{var x=m.O();v+=x;var z=m.O(),y=null;"vttc"==fg(z)?8<x&&(y=m.Sb(x-8)):m.skip(x-8);q&&y&&(x=eA(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(x))}while(r.sampleSize&&v<r.sampleSize)}return f.filter(zd)};function eA(a,b,c){var d,e,f;(new bg).box("payl",kg(function(g){d=Tf(g)})).box("iden",kg(function(g){e=Tf(g)})).box("sttg",kg(function(g){f=Tf(g)})).parse(a);return d?fA(d,e,f,b,c):null}
1184
+ function fA(a,b,c,d,e){d=new yc(d,e,"");Yz(a,d,new Map);b&&(d.id=b);if(c)for(a=new kt(c),b=nt(a);b;)Xz(d,b,[]),lt(a),b=nt(a);return d}L("shaka.text.Mp4VttParser",dA);dA.prototype.parseMedia=dA.prototype.parseMedia;dA.prototype.setManifestType=dA.prototype.setManifestType;dA.prototype.setSequenceMode=dA.prototype.setSequenceMode;dA.prototype.parseInit=dA.prototype.parseInit;qd['application/mp4; codecs="wvtt"']=function(){return new dA};function gA(){}gA.prototype.parseInit=function(){};gA.prototype.setSequenceMode=function(){};gA.prototype.setManifestType=function(){};gA.prototype.parseMedia=function(a){var b=Tf(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 kt(c[0]),e=hA(d),f=mt(d,/,/g);d=hA(d);if(null==e||null==f||null==d)throw new P(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new yc(e,d,c.slice(1).join("\n").trim()))}return a};
1185
+ function hA(a){a=mt(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}L("shaka.text.SbvTextParser",gA);gA.prototype.parseMedia=gA.prototype.parseMedia;gA.prototype.setManifestType=gA.prototype.setManifestType;gA.prototype.setSequenceMode=gA.prototype.setSequenceMode;gA.prototype.parseInit=gA.prototype.parseInit;qd["text/x-subviewer"]=function(){return new gA};function iA(){this.g=new Uz}iA.prototype.parseInit=function(){};iA.prototype.setSequenceMode=function(){};iA.prototype.setManifestType=function(){};iA.prototype.parseMedia=function(a,b,c){a=Tf(a);a=jA(a);a=lc(Xf(a));return this.g.parseMedia(a,b,c)};
1186
+ function jA(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").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}L("shaka.text.SrtTextParser",iA);iA.srt2webvtt=jA;iA.prototype.parseMedia=iA.prototype.parseMedia;
1187
+ iA.prototype.setManifestType=iA.prototype.setManifestType;iA.prototype.setSequenceMode=iA.prototype.setSequenceMode;iA.prototype.parseInit=iA.prototype.parseInit;qd["text/srt"]=function(){return new iA};function kA(){}kA.prototype.parseInit=function(){};kA.prototype.setSequenceMode=function(){};kA.prototype.setManifestType=function(){};
1188
+ kA.prototype.parseMedia=function(a){var b="",c="";a=Tf(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=lA.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=mA.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(nA);else if("Style"==e){e=f.split(nA);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
1189
+ [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Ze:e.Ze},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=mA.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(nA);else if("Dialogue"==f){g=g.split(nA);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=oA(f.Start);var k=oA(f.End);g=new yc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Ze=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Ze}}(e)))&&pA(g,f);d.push(g)}return d};
1190
+ function pA(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=qA(c))a.color=c;if(c=b.BackColour)if(c=qA(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Hc;a.textAlign="start";break;case 2:a.displayAlign=Hc;a.textAlign=Bc;break;case 3:a.displayAlign=Hc;a.textAlign="end";
1190
1191
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Bc;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=Bc;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
1191
- function rA(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function pA(a){a=sA.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}L("shaka.text.SsaTextParser",lA);lA.prototype.parseMedia=lA.prototype.parseMedia;lA.prototype.setManifestType=lA.prototype.setManifestType;lA.prototype.setSequenceMode=lA.prototype.setSequenceMode;lA.prototype.parseInit=lA.prototype.parseInit;
1192
- var mA=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,nA=/^\s*([^:]+):\s*(.*)/,oA=/\s*,\s*/,sA=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;qd["text/x-ssa"]=function(){return new lA};function tA(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{me:c,X:a}:null}function uA(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,wa:"mp4a.40."+e}}
1193
- function vA(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
1194
- function wA(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
1195
- 2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function xA(a){this.i=a;this.h=0;this.g=new Map}p=xA.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?ac(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(nd(b)||"mp4a.40.2")+'"':b};p.getOriginalMimeType=function(){return this.i};
1196
- p.transmux=function(a,b,c,d){for(var e=lc(a),f=ci(e),g=f.length;g<e.length&&!vA(e,g);g++);a=1E3*c.endTime;f=bi(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=uA(e,g);if(!c)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=tA(e,g);if(!h)return Promise.reject(new P(2,3,3018));var k=h.me+h.X;g+k<=e.length&&f.push({data:e.subarray(g+h.me,g+k),size:h.X,
1197
- duration:1024,kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.wa,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,ib:[],qa:new Uint8Array([]),Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.h,baseMediaDecodeTime:a,fb:f},stream:b};a=new Nu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Tu(a),this.g.set(b.id,d));b=jv(a);this.h++;b=tg(d,b);return Promise.resolve(b)};L("shaka.transmuxer.AacTransmuxer",xA);
1198
- xA.prototype.transmux=xA.prototype.transmux;xA.prototype.getOriginalMimeType=xA.prototype.getOriginalMimeType;xA.prototype.convertCodecs=xA.prototype.convertCodecs;xA.prototype.isSupported=xA.prototype.isSupported;xA.prototype.destroy=xA.prototype.destroy;Wc("audio/aac",function(){return new xA("audio/aac")},bd);function yA(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
1192
+ function qA(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function oA(a){a=rA.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}L("shaka.text.SsaTextParser",kA);kA.prototype.parseMedia=kA.prototype.parseMedia;kA.prototype.setManifestType=kA.prototype.setManifestType;kA.prototype.setSequenceMode=kA.prototype.setSequenceMode;kA.prototype.parseInit=kA.prototype.parseInit;
1193
+ var lA=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,mA=/^\s*([^:]+):\s*(.*)/,nA=/\s*,\s*/,rA=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;qd["text/x-ssa"]=function(){return new kA};function sA(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{me:c,X:a}:null}function tA(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,wa:"mp4a.40."+e}}
1194
+ function uA(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
1195
+ function vA(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
1196
+ 2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function wA(a){this.i=a;this.h=0;this.g=new Map}p=wA.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?ac(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(nd(b)||"mp4a.40.2")+'"':b};p.getOriginalMimeType=function(){return this.i};
1197
+ p.transmux=function(a,b,c,d){for(var e=lc(a),f=ci(e),g=f.length;g<e.length&&!uA(e,g);g++);a=1E3*c.endTime;f=bi(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=tA(e,g);if(!c)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=sA(e,g);if(!h)return Promise.reject(new P(2,3,3018));var k=h.me+h.X;g+k<=e.length&&f.push({data:e.subarray(g+h.me,g+k),size:h.X,
1198
+ duration:1024,kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.wa,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,ib:[],qa:new Uint8Array([]),Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.h,baseMediaDecodeTime:a,fb:f},stream:b};a=new Nu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Tu(a),this.g.set(b.id,d));b=jv(a);this.h++;b=tg(d,b);return Promise.resolve(b)};L("shaka.transmuxer.AacTransmuxer",wA);
1199
+ wA.prototype.transmux=wA.prototype.transmux;wA.prototype.getOriginalMimeType=wA.prototype.getOriginalMimeType;wA.prototype.convertCodecs=wA.prototype.convertCodecs;wA.prototype.isSupported=wA.prototype.isSupported;wA.prototype.destroy=wA.prototype.destroy;Wc("audio/aac",function(){return new wA("audio/aac")},bd);function xA(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
1199
1200
  1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,qa:a,X:e}}
1200
- function zA(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function AA(a){this.i=a;this.h=0;this.g=new Map}p=AA.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?ac(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};p.getOriginalMimeType=function(){return this.i};
1201
- p.transmux=function(a,b,c,d){a=lc(a);for(var e=ci(a),f=e.length;f<a.length&&!zA(a,f);f++);var g=1E3*c.endTime;e=bi(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=yA(a,f);if(!k)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.qa;h.push({data:a.subarray(f,f+k.X),size:k.X,duration:1536,kb:0,flags:{ob:0,
1202
- bb:0,ab:0,Za:0,$a:2,pb:0}});f+=k.X}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,ib:[],qa:e,Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.h,baseMediaDecodeTime:a,fb:h},stream:b};a=new Nu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Tu(a),this.g.set(b.id,d));b=jv(a);this.h++;b=tg(d,b);return Promise.resolve(b)};L("shaka.transmuxer.Ac3Transmuxer",AA);AA.prototype.transmux=AA.prototype.transmux;
1203
- AA.prototype.getOriginalMimeType=AA.prototype.getOriginalMimeType;AA.prototype.convertCodecs=AA.prototype.convertCodecs;AA.prototype.isSupported=AA.prototype.isSupported;AA.prototype.destroy=AA.prototype.destroy;Wc("audio/ac3",function(){return new AA("audio/ac3")},bd);function BA(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new mi(a.subarray(b+2));oi(c,2);oi(c,3);var d=pi(c,11)+1<<1,e=pi(c,2);if(3==e){e=pi(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=pi(c,2);var g=pi(c,3),h=pi(c,1);c=pi(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,qa:a,X:d}};function CA(a){this.i=a;this.h=0;this.g=new Map}p=CA.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?ac(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};p.getOriginalMimeType=function(){return this.i};
1204
- p.transmux=function(a,b,c,d){a=lc(a);for(var e=ci(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=bi(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=BA(a,f);if(!k)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.qa;h.push({data:a.subarray(f,f+k.X),size:k.X,duration:1536,
1205
- kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}});f+=k.X}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,ib:[],qa:e,Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.h,baseMediaDecodeTime:a,fb:h},stream:b};a=new Nu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Tu(a),this.g.set(b.id,d));b=jv(a);this.h++;b=tg(d,b);return Promise.resolve(b)};L("shaka.transmuxer.Ec3Transmuxer",CA);CA.prototype.transmux=CA.prototype.transmux;
1206
- CA.prototype.getOriginalMimeType=CA.prototype.getOriginalMimeType;CA.prototype.convertCodecs=CA.prototype.convertCodecs;CA.prototype.isSupported=CA.prototype.isSupported;CA.prototype.destroy=CA.prototype.destroy;Wc("audio/ec3",function(){return new CA("audio/ec3")},bd);function DA(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new mi(b.data),d=ti(c);ti(c);ti(c);ri(c);if(EA.includes(d)&&(d=R(c),3===d&&oi(c,1),ri(c),ri(c),oi(c,1),S(c))){d=3!==d?8:12;for(var e=0;e<d;e++)S(c)&&(6>e?ui(c,16):ui(c,64))}ri(c);d=R(c);if(0===d)R(c);else if(1===d)for(oi(c,1),ri(c),ri(c),d=R(c),e=0;e<d;e++)ri(c);ri(c);oi(c,1);var f=R(c),g=R(c),h=pi(c,1);0===h&&oi(c,1);oi(c,1);var k=0,l=0,m=0,n=0;S(c)&&
1201
+ function yA(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function zA(a){this.i=a;this.h=0;this.g=new Map}p=zA.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?ac(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};p.getOriginalMimeType=function(){return this.i};
1202
+ p.transmux=function(a,b,c,d){a=lc(a);for(var e=ci(a),f=e.length;f<a.length&&!yA(a,f);f++);var g=1E3*c.endTime;e=bi(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=xA(a,f);if(!k)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.qa;h.push({data:a.subarray(f,f+k.X),size:k.X,duration:1536,kb:0,flags:{ob:0,
1203
+ bb:0,ab:0,Za:0,$a:2,pb:0}});f+=k.X}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,ib:[],qa:e,Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.h,baseMediaDecodeTime:a,fb:h},stream:b};a=new Nu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Tu(a),this.g.set(b.id,d));b=jv(a);this.h++;b=tg(d,b);return Promise.resolve(b)};L("shaka.transmuxer.Ac3Transmuxer",zA);zA.prototype.transmux=zA.prototype.transmux;
1204
+ zA.prototype.getOriginalMimeType=zA.prototype.getOriginalMimeType;zA.prototype.convertCodecs=zA.prototype.convertCodecs;zA.prototype.isSupported=zA.prototype.isSupported;zA.prototype.destroy=zA.prototype.destroy;Wc("audio/ac3",function(){return new zA("audio/ac3")},bd);function AA(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new mi(a.subarray(b+2));oi(c,2);oi(c,3);var d=pi(c,11)+1<<1,e=pi(c,2);if(3==e){e=pi(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=pi(c,2);var g=pi(c,3),h=pi(c,1);c=pi(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,qa:a,X:d}};function BA(a){this.i=a;this.h=0;this.g=new Map}p=BA.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?ac(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};p.getOriginalMimeType=function(){return this.i};
1205
+ p.transmux=function(a,b,c,d){a=lc(a);for(var e=ci(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=bi(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=AA(a,f);if(!k)return Promise.reject(new P(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.qa;h.push({data:a.subarray(f,f+k.X),size:k.X,duration:1536,
1206
+ kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}});f+=k.X}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,ib:[],qa:e,Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.h,baseMediaDecodeTime:a,fb:h},stream:b};a=new Nu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Tu(a),this.g.set(b.id,d));b=jv(a);this.h++;b=tg(d,b);return Promise.resolve(b)};L("shaka.transmuxer.Ec3Transmuxer",BA);BA.prototype.transmux=BA.prototype.transmux;
1207
+ BA.prototype.getOriginalMimeType=BA.prototype.getOriginalMimeType;BA.prototype.convertCodecs=BA.prototype.convertCodecs;BA.prototype.isSupported=BA.prototype.isSupported;BA.prototype.destroy=BA.prototype.destroy;Wc("audio/ec3",function(){return new BA("audio/ec3")},bd);function CA(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new mi(b.data),d=ti(c);ti(c);ti(c);ri(c);if(DA.includes(d)&&(d=R(c),3===d&&oi(c,1),ri(c),ri(c),oi(c,1),S(c))){d=3!==d?8:12;for(var e=0;e<d;e++)S(c)&&(6>e?ui(c,16):ui(c,64))}ri(c);d=R(c);if(0===d)R(c);else if(1===d)for(oi(c,1),ri(c),ri(c),d=R(c),e=0;e<d;e++)ri(c);ri(c);oi(c,1);var f=R(c),g=R(c),h=pi(c,1);0===h&&oi(c,1);oi(c,1);var k=0,l=0,m=0,n=0;S(c)&&
1207
1208
  (k=R(c),l=R(c),m=R(c),n=R(c));e=d=1;if(S(c)&&S(c)){var r=ti(c),q=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<r&&16>r?(d=q[r-1],e=u[r-1]):255===r&&(d=pi(c,16),e=pi(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,w(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,w(a));a=new Uint8Array([1,k[3],k[4],k[5],255,225].concat(k,
1208
1209
  [1],b));return{height:c,width:f,Ca:a,Ja:d,La:e}}
1209
- function FA(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=vi(new mi(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(tg(h,
1210
- f.fullData)))}return c.length?{data:tg.apply(ng,w(c)),Bd:b}:null}var EA=[100,110,122,244,44,83,86,118,128,138,139,134];function GA(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=HA(b.fullData);a=IA(c.fullData);var f=JA(d.fullData);b=KA(b.fullData,c.fullData,d.fullData,{Xf:e.Xf,ug:e.ug,Df:a.Df,Ef:a.Ef,xf:a.xf,Cf:a.Cf,yf:a.yf,zf:a.zf,Af:a.Af,Bf:a.Bf,qf:a.qf,rf:a.rf,tf:a.tf,uf:a.uf,vf:a.vf,wf:a.wf,mf:a.mf,Ae:a.Ae,lf:a.lf,jf:a.jf,hf:a.hf,$f:f.$f});return{height:a.height,width:a.width,
1211
- Ca:b,Ja:a.mj,La:a.lj}}function HA(a){var b=new mi(a,!0);ti(b);ti(b);pi(b,4);pi(b,2);pi(b,6);a=pi(b,3);b=S(b);return{Xf:a+1,ug:b}}
1212
- function IA(a){a=new mi(a,!0);ti(a);ti(a);var b=0,c=0,d=0,e=0;pi(a,4);var f=pi(a,3);S(a);for(var g=pi(a,2),h=pi(a,1),k=pi(a,5),l=ti(a),m=ti(a),n=ti(a),r=ti(a),q=ti(a),u=ti(a),v=ti(a),x=ti(a),z=ti(a),y=ti(a),B=ti(a),A=[],C=[],E=0;E<f;E++)A.push(S(a)),C.push(S(a));if(0<f)for(E=f;8>E;E++)pi(a,2);for(E=0;E<f;E++)A[E]&&pi(a,88),C[E]&&ti(a);R(a);A=R(a);3==A&&pi(a,1);C=R(a);E=R(a);S(a)&&(b+=R(a),c+=R(a),d+=R(a),e+=R(a));var I=R(a),G=R(a),H=R(a);if(S(a))for(var J=0;J<=f;J++)R(a),R(a),R(a);else R(a),R(a),
1210
+ function EA(a){var b=!1,c=[],d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=vi(new mi(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.fullData.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c.push(tg(h,
1211
+ f.fullData)))}return c.length?{data:tg.apply(lg,w(c)),Bd:b}:null}var DA=[100,110,122,244,44,83,86,118,128,138,139,134];function FA(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=GA(b.fullData);a=HA(c.fullData);var f=IA(d.fullData);b=JA(b.fullData,c.fullData,d.fullData,{Xf:e.Xf,ug:e.ug,Df:a.Df,Ef:a.Ef,xf:a.xf,Cf:a.Cf,yf:a.yf,zf:a.zf,Af:a.Af,Bf:a.Bf,qf:a.qf,rf:a.rf,tf:a.tf,uf:a.uf,vf:a.vf,wf:a.wf,mf:a.mf,Ae:a.Ae,lf:a.lf,jf:a.jf,hf:a.hf,$f:f.$f});return{height:a.height,width:a.width,
1212
+ Ca:b,Ja:a.mj,La:a.lj}}function GA(a){var b=new mi(a,!0);ti(b);ti(b);pi(b,4);pi(b,2);pi(b,6);a=pi(b,3);b=S(b);return{Xf:a+1,ug:b}}
1213
+ function HA(a){a=new mi(a,!0);ti(a);ti(a);var b=0,c=0,d=0,e=0;pi(a,4);var f=pi(a,3);S(a);for(var g=pi(a,2),h=pi(a,1),k=pi(a,5),l=ti(a),m=ti(a),n=ti(a),r=ti(a),q=ti(a),u=ti(a),v=ti(a),x=ti(a),z=ti(a),y=ti(a),B=ti(a),A=[],C=[],E=0;E<f;E++)A.push(S(a)),C.push(S(a));if(0<f)for(E=f;8>E;E++)pi(a,2);for(E=0;E<f;E++)A[E]&&pi(a,88),C[E]&&ti(a);R(a);A=R(a);3==A&&pi(a,1);C=R(a);E=R(a);S(a)&&(b+=R(a),c+=R(a),d+=R(a),e+=R(a));var I=R(a),G=R(a),H=R(a);if(S(a))for(var J=0;J<=f;J++)R(a),R(a),R(a);else R(a),R(a),
1213
1214
  R(a);R(a);R(a);R(a);R(a);R(a);R(a);if(S(a)&&S(a))for(J=0;4>J;J++)for(var M=0;M<(3===J?2:6);M++)if(S(a)){var N=Math.min(64,1<<4+(J<<1));1<J&&si(a);for(var Q=0;Q<N;Q++)si(a)}else R(a);S(a);S(a);S(a)&&(ti(a),R(a),R(a),S(a));J=R(a);for(N=M=0;N<J;N++)if(Q=!1,0!==N&&(Q=S(a)),Q){N===J&&R(a);S(a);R(a);for(var Y=Q=0;Y<=M;Y++){var aa=S(a),da=!1;aa||(da=S(a));(aa||da)&&Q++}M=Q}else{Y=R(a);Q=R(a);M=Y+Q;for(aa=0;aa<Y;aa++)R(a),S(a);for(Y=0;Y<Q;Y++)R(a),S(a)}if(S(a))for(J=R(a),M=0;M<J;M++){for(N=0;N<H+4;N++)pi(a,
1214
1215
  1);pi(a,1)}J=H=1;M=0;S(a);S(a);if(S(a)){S(a)&&(N=ti(a),Q=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Y=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<N&&16>N?(H=Q[N-1],J=Y[N-1]):255===N&&(H=pi(a,16),J=pi(a,16)));S(a)&&S(a);S(a)&&(pi(a,3),S(a),S(a)&&(ti(a),ti(a),ti(a)));S(a)&&(R(a),R(a));S(a);S(a);S(a);if(N=S(a))R(a),R(a),R(a),R(a);if(S(a)&&(pi(a,32),pi(a,32),S(a)&&R(a),S(a))){Y=!1;N=S(a);Q=S(a);if(N||Q){if(Y=S(a))ti(a),pi(a,5),S(a),pi(a,5);pi(a,4);pi(a,4);Y&&pi(a,4);pi(a,5);pi(a,5);pi(a,5)}for(aa=
1215
1216
  0;aa<=f;aa++){var T=!0;da=1;S(a)||(T=S(a));var Ua=!1;T?R(a):Ua=S(a);Ua||(da=R(a)+1);if(N){for(T=0;T<da;T++)R(a),R(a),Y&&(R(a),R(a));S(a)}if(Q){for(T=0;T<da;T++)R(a),R(a),Y&&(R(a),R(a));S(a)}}}S(a)&&(S(a),S(a),S(a),M=R(a),R(a),R(a),R(a),R(a))}return{xf:B,Df:g,Ef:h,Cf:k,yf:l,zf:m,Af:n,Bf:r,qf:q,rf:u,tf:v,uf:x,vf:z,wf:y,Ae:M,mf:0,lf:A,jf:I,hf:G,width:C-(b+c)*(1===A||2===A?2:1),height:E-(d+e)*(1===A?2:1),mj:H,lj:J}}
1216
- function JA(a){var b=new mi(a,!0);ti(b);ti(b);R(b);R(b);S(b);S(b);pi(b,3);S(b);S(b);R(b);R(b);si(b);S(b);S(b);S(b)&&R(b);si(b);si(b);S(b);S(b);S(b);S(b);a=S(b);b=S(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{$f:c}}
1217
- function KA(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Df&3)<<6|(d.Ef?1:0)<<5|d.Cf&31;e[2]=d.yf;e[3]=d.zf;e[4]=d.Af;e[5]=d.Bf;e[6]=d.qf;e[7]=d.rf;e[8]=d.tf;e[9]=d.uf;e[10]=d.vf;e[11]=d.wf;e[12]=d.xf;e[13]=240|(d.Ae&3840)>>8;e[14]=d.Ae&255;e[15]=252|d.$f&3;e[16]=252|d.lf&3;e[17]=248|d.jf&7;e[18]=248|d.hf&7;e[19]=0;e[20]=0;e[21]=(d.mf&3)<<6|(d.Xf&7)<<3|(d.ug?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
1218
- 255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function LA(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*MA[14*(3===c?3-d:3===d?3:4)+e-1];f=NA[3*(3===c?0:2===c?1:2)+f];c=OA[c][d];var h=PA[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,X:k,kj:8*c*h}}return null}
1219
- function QA(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var MA=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],NA=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],OA=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],PA=[0,1,1,4];function RA(a){this.i=a;this.h=0;this.g=new Map}p=RA.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?ac(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};p.getOriginalMimeType=function(){return this.i};
1220
- p.transmux=function(a,b,c,d){a=lc(a);for(c=ci(a).length;c<a.length;c++){var e=c;if(e+1<a.length&&QA(a,e)){var f=LA(a,e),g=4;f&&f.X&&(g=f.X);e+=g;e=e===a.length||e+1<a.length&&QA(a,e)}else e=!1;if(e)break}var h;for(e=[];c<a.length;){f=LA(a,c);if(!f)return Promise.reject(new P(2,3,3018));h||(h=f);c+f.X<=a.length&&e.push({data:a.subarray(c,c+f.X),size:f.X,duration:1152,kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}});c+=f.X}if(!h)return Promise.reject(new P(2,3,3018));a=9E4*h.kj/h.sampleRate*this.h;d={id:b.id,
1221
- type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,ib:[],qa:new Uint8Array([]),Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.h,baseMediaDecodeTime:a,fb:e},stream:b};h=new Nu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Tu(h),this.g.set(b.id,d));b=jv(h);this.h++;b=tg(d,b);return Promise.resolve(b)};L("shaka.transmuxer.Mp3Transmuxer",RA);RA.prototype.transmux=RA.prototype.transmux;RA.prototype.getOriginalMimeType=RA.prototype.getOriginalMimeType;
1222
- RA.prototype.convertCodecs=RA.prototype.convertCodecs;RA.prototype.isSupported=RA.prototype.isSupported;RA.prototype.destroy=RA.prototype.destroy;Wc("audio/mpeg",function(){return new RA("audio/mpeg")},bd);function SA(a){this.h=a;this.g=null}p=SA.prototype;p.destroy=function(){};p.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=nd(a).split(","),c=Cb("audio",b);b=Cb("video",b);return!c||b||"mp3"!=hd(c)?!1:ac(this.convertCodecs("audio",a))};p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};p.getOriginalMimeType=function(){return this.h};
1223
- p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new wi;a=lc(a);a=this.g.parse(a);if("mp3"!=a.sd().audio||"audio"!=e)return Promise.reject(new P(2,3,3018));e=new Uint8Array([]);a=t(a.pc());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=LA(b,c))?(c+d.X<=b.length&&(e=tg(e,b.subarray(c,c+d.X))),c+=d.X):c++;return Promise.resolve(e)};L("shaka.transmuxer.MpegTsTransmuxer",SA);SA.prototype.transmux=SA.prototype.transmux;SA.prototype.getOriginalMimeType=SA.prototype.getOriginalMimeType;
1224
- SA.prototype.convertCodecs=SA.prototype.convertCodecs;SA.prototype.isSupported=SA.prototype.isSupported;SA.prototype.destroy=SA.prototype.destroy;Wc("video/mp2t",function(){return new SA("video/mp2t")},ad);/*
1217
+ function IA(a){var b=new mi(a,!0);ti(b);ti(b);R(b);R(b);S(b);S(b);pi(b,3);S(b);S(b);R(b);R(b);si(b);S(b);S(b);S(b)&&R(b);si(b);si(b);S(b);S(b);S(b);S(b);a=S(b);b=S(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{$f:c}}
1218
+ function JA(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Df&3)<<6|(d.Ef?1:0)<<5|d.Cf&31;e[2]=d.yf;e[3]=d.zf;e[4]=d.Af;e[5]=d.Bf;e[6]=d.qf;e[7]=d.rf;e[8]=d.tf;e[9]=d.uf;e[10]=d.vf;e[11]=d.wf;e[12]=d.xf;e[13]=240|(d.Ae&3840)>>8;e[14]=d.Ae&255;e[15]=252|d.$f&3;e[16]=252|d.lf&3;e[17]=248|d.jf&7;e[18]=248|d.hf&7;e[19]=0;e[20]=0;e[21]=(d.mf&3)<<6|(d.Xf&7)<<3|(d.ug?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
1219
+ 255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function KA(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*LA[14*(3===c?3-d:3===d?3:4)+e-1];f=MA[3*(3===c?0:2===c?1:2)+f];c=NA[c][d];var h=OA[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,X:k,kj:8*c*h}}return null}
1220
+ function PA(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var LA=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],MA=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],NA=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],OA=[0,1,1,4];function QA(a){this.i=a;this.h=0;this.g=new Map}p=QA.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?ac(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};p.getOriginalMimeType=function(){return this.i};
1221
+ p.transmux=function(a,b,c,d){a=lc(a);for(c=ci(a).length;c<a.length;c++){var e=c;if(e+1<a.length&&PA(a,e)){var f=KA(a,e),g=4;f&&f.X&&(g=f.X);e+=g;e=e===a.length||e+1<a.length&&PA(a,e)}else e=!1;if(e)break}var h;for(e=[];c<a.length;){f=KA(a,c);if(!f)return Promise.reject(new P(2,3,3018));h||(h=f);c+f.X<=a.length&&e.push({data:a.subarray(c,c+f.X),size:f.X,duration:1152,kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}});c+=f.X}if(!h)return Promise.reject(new P(2,3,3018));a=9E4*h.kj/h.sampleRate*this.h;d={id:b.id,
1222
+ type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,ib:[],qa:new Uint8Array([]),Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.h,baseMediaDecodeTime:a,fb:e},stream:b};h=new Nu([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=Tu(h),this.g.set(b.id,d));b=jv(h);this.h++;b=tg(d,b);return Promise.resolve(b)};L("shaka.transmuxer.Mp3Transmuxer",QA);QA.prototype.transmux=QA.prototype.transmux;QA.prototype.getOriginalMimeType=QA.prototype.getOriginalMimeType;
1223
+ QA.prototype.convertCodecs=QA.prototype.convertCodecs;QA.prototype.isSupported=QA.prototype.isSupported;QA.prototype.destroy=QA.prototype.destroy;Wc("audio/mpeg",function(){return new QA("audio/mpeg")},bd);function RA(a){this.h=a;this.g=null}p=RA.prototype;p.destroy=function(){};p.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=nd(a).split(","),c=Cb("audio",b);b=Cb("video",b);return!c||b||"mp3"!=hd(c)?!1:ac(this.convertCodecs("audio",a))};p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};p.getOriginalMimeType=function(){return this.h};
1224
+ p.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new wi;a=lc(a);a=this.g.parse(a);if("mp3"!=a.sd().audio||"audio"!=e)return Promise.reject(new P(2,3,3018));e=new Uint8Array([]);a=t(a.qc());for(b=a.next();!b.done;b=a.next())if(b=b.value.data)for(c=0;c<b.length;)(d=KA(b,c))?(c+d.X<=b.length&&(e=tg(e,b.subarray(c,c+d.X))),c+=d.X):c++;return Promise.resolve(e)};L("shaka.transmuxer.MpegTsTransmuxer",RA);RA.prototype.transmux=RA.prototype.transmux;RA.prototype.getOriginalMimeType=RA.prototype.getOriginalMimeType;
1225
+ RA.prototype.convertCodecs=RA.prototype.convertCodecs;RA.prototype.isSupported=RA.prototype.isSupported;RA.prototype.destroy=RA.prototype.destroy;Wc("video/mp2t",function(){return new RA("video/mp2t")},ad);/*
1225
1226
  @license
1226
1227
  MSS Transmuxer
1227
1228
  Copyright 2015 Dash Industry Forum
1228
1229
  SPDX-License-Identifier: BSD-3-Clause
1229
1230
  */
1230
- function TA(a){this.h=a;(this.g=Ws.get("ISOBoxer")())&&UA(this)}
1231
- function UA(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
1231
+ function SA(a){this.h=a;(this.g=Ws.get("ISOBoxer")())&&TA(this)}
1232
+ function TA(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
1232
1233
  "uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
1233
- "uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==VA[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}p=TA.prototype;p.destroy=function(){};
1234
+ "uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==UA[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}p=SA.prototype;p.destroy=function(){};
1234
1235
  p.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return ac(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return ac(b)||ac(a)};p.convertCodecs=function(a,b){return b.replace("mss/","")};p.getOriginalMimeType=function(){return this.h};
1235
1236
  p.transmux=function(a,b,c){if(!c)return Promise.resolve(lc(a));if(!b.mssPrivateData)return Promise.reject(new P(2,3,3020));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),
1236
1237
  1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var r=e.fetch("saio");if(null===r){r=this.g.createFullBox("saio",h);r.version=0;r.flags=0;r.entry_count=1;r.offset=[0];var q=this.g.createFullBox("saiz",h);q.version=0;q.flags=0;q.sample_count=n.sample_count;q.default_sample_info_size=0;q.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)q.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else q.default_sample_info_size=8}}f.flags&=16777214;f.flags|=131072;k.flags|=
1237
- 1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=WA(u,"traf")+WA(h,"senc")+16);var x=lc(e.write());return Promise.resolve(x)}catch(z){return z instanceof P?Promise.reject(z):Promise.reject(new P(2,3,3022))}};function WA(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}L("shaka.transmuxer.MssTransmuxer",TA);TA.prototype.transmux=TA.prototype.transmux;TA.prototype.getOriginalMimeType=TA.prototype.getOriginalMimeType;
1238
- TA.prototype.convertCodecs=TA.prototype.convertCodecs;TA.prototype.isSupported=TA.prototype.isSupported;TA.prototype.destroy=TA.prototype.destroy;var VA=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Wc("mss/audio/mp4",function(){return new TA("mss/audio/mp4")},bd);Wc("mss/video/mp4",function(){return new TA("mss/video/mp4")},bd);function XA(a){this.j=a;this.g=0;this.h=new Map;this.i=null}p=XA.prototype;p.destroy=function(){this.h.clear()};p.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=nd(c).split(",");c=Cb("audio",d);d=Cb("video",d);if(c&&(c=hd(c),!YA.includes(c))||d&&(c=hd(d),!ZA.includes(c)))return!1;if(b)return ac(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return ac(b)||ac(a)};
1238
+ 1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=VA(u,"traf")+VA(h,"senc")+16);var x=lc(e.write());return Promise.resolve(x)}catch(z){return z instanceof P?Promise.reject(z):Promise.reject(new P(2,3,3022))}};function VA(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}L("shaka.transmuxer.MssTransmuxer",SA);SA.prototype.transmux=SA.prototype.transmux;SA.prototype.getOriginalMimeType=SA.prototype.getOriginalMimeType;
1239
+ SA.prototype.convertCodecs=SA.prototype.convertCodecs;SA.prototype.isSupported=SA.prototype.isSupported;SA.prototype.destroy=SA.prototype.destroy;var UA=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Wc("mss/audio/mp4",function(){return new SA("mss/audio/mp4")},bd);Wc("mss/video/mp4",function(){return new SA("mss/video/mp4")},bd);function WA(a){this.j=a;this.g=0;this.h=new Map;this.i=null}p=WA.prototype;p.destroy=function(){this.h.clear()};p.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=nd(c).split(",");c=Cb("audio",d);d=Cb("video",d);if(c&&(c=hd(c),!XA.includes(c))||d&&(c=hd(d),!YA.includes(c)))return!1;if(b)return ac(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return ac(b)||ac(a)};
1239
1240
  p.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=nd(b).replace("mp4a.40.34","mp3").split(",").map(this.ai).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};p.ai=function(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}return a};p.getOriginalMimeType=function(){return this.j};
1240
- p.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new wi;a=lc(a);var f=this.i.parse(a);a=[];var g=f.sd();try{var h=null;if("video"==e){switch(g.video){case "avc":var k=[],l=null,m=[],n=f.Oc();if(!n.length)throw new P(2,3,3023);for(var r=0;r<n.length;r++){var q=n[r],u=q.nalus;m.push.apply(m,w(u));var v=FA(u);if(v){null==l&&(l=q.dts);var x=void 0;x=r+1<n.length?(n[r+1].dts||0)-(q.dts||0):1<n.length?(q.dts||0)-(n[r-1].dts||0):9E4*(c.endTime-c.startTime);k.push({data:v.data,size:v.data.byteLength,
1241
- duration:x,kb:Math.round((q.pts||0)-(q.dts||0)),flags:{ob:0,bb:0,ab:0,Za:0,$a:v.Bd?2:1,pb:v.Bd?0:1}})}}var z=DA(m);if(!z||null==l)throw new P(2,3,3018);b.height=z.height;b.width=z.width;h={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ib:[],qa:new Uint8Array([]),Ca:z.Ca,Ja:z.Ja,La:z.La,data:{Cb:this.g,baseMediaDecodeTime:l,fb:k},stream:b};break;case "hvc":n=[];q=null;u=[];k=f.Oc();if(!k.length)throw new P(2,3,3023);for(v=0;v<k.length;v++){l=
1242
- k[v];m=l.nalus;u.push.apply(u,w(m));z=!1;var y=[],B=!1;r=t(m);for(x=r.next();!x.done;x=r.next()){var A=x.value;switch(A.type){case 1:case 0:var C=B=!0;break;case 19:case 20:case 21:z=C=B=!0;break;case 32:C=!0;break;case 33:C=!0;break;case 34:C=!0;break;case 35:B=C=!0;break;case 39:case 40:C=!0;break;default:C=!1}if(B&&C){var E=A.fullData.byteLength,I=new Uint8Array(4);I[0]=E>>24&255;I[1]=E>>16&255;I[2]=E>>8&255;I[3]=E&255;y.push(tg(I,A.fullData))}}var G=y.length?{data:tg.apply(ng,w(y)),Bd:z}:null;
1243
- G&&(null==q&&null!=l.dts&&(q=l.dts),z=void 0,z=v+1<k.length?(k[v+1].dts||0)-(l.dts||0):1<k.length?(l.dts||0)-(k[v-1].dts||0):9E4*(c.endTime-c.startTime),n.push({data:G.data,size:G.data.byteLength,duration:z,kb:Math.round((l.pts||0)-(l.dts||0)),flags:{ob:0,bb:0,ab:0,Za:0,$a:G.Bd?2:1,pb:G.Bd?0:1}}))}var H=GA(u);if(!H||null==q)throw new P(2,3,3018);b.height=H.height;b.width=H.width;h={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ib:[],qa:new Uint8Array([]),
1244
- Ca:H.Ca,Ja:H.Ja,La:H.La,data:{Cb:this.g,baseMediaDecodeTime:q,fb:n},stream:b}}h&&(a.push(h),h=null)}if("audio"==e){switch(g.audio){case "aac":for(var J=[],M,N=null,Q=t(f.pc()),Y=Q.next();!Y.done;Y=Q.next()){var aa=Y.value,da=aa.data;if(da){var T=0;M=uA(da,T);if(!M)throw new P(2,3,3018);b.audioSamplingRate=M.sampleRate;b.channelsCount=M.channelCount;null==N&&null!==aa.pts&&(N=aa.pts);for(;T<da.length;){var Ua=tA(da,T);if(Ua){var ib=Ua.me+Ua.X;T+ib<=da.length&&J.push({data:da.subarray(T+Ua.me,T+ib),
1245
- size:Ua.X,duration:1024,kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}});T+=ib}else T++}}}if(!M||null==N){if(!f.Oc().length)throw new P(2,3,3018);N=9E4*c.startTime;var Eb=Cb("audio",b.codecs.split(","));if(!Eb||!b.channelsCount||!b.audioSamplingRate)throw new P(2,3,3018);M={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,wa:Eb};var bc=wA(Eb,b.channelsCount);if(!bc)throw new P(2,3,3018);var Lb=N+9E4*(c.endTime-c.startTime);for(f=N;f<Lb;)J.push({data:bc,size:bc.byteLength,duration:1024,kb:0,
1246
- flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}}),f+=1024/M.sampleRate*9E4}var Ca=M.sampleRate;f=N/9E4*Ca;h={id:b.id,type:"audio",codecs:M.wa,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ca,duration:d,ib:[],qa:new Uint8Array([]),Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.g,baseMediaDecodeTime:f,fb:J},stream:b};break;case "ac3":M=[];Ca=0;J=new Uint8Array([]);N=null;T=t(f.pc());for(var rb=T.next();!rb.done;rb=T.next()){var Fb=rb.value,cc=Fb.data;null==N&&null!==Fb.pts&&(N=Fb.pts);for(f=0;f<cc.length;){var dc=
1247
- yA(cc,f);dc?(b.audioSamplingRate=dc.sampleRate,b.channelsCount=dc.channelCount,Ca=dc.sampleRate,J=dc.qa,M.push({data:cc.subarray(f,f+dc.X),size:dc.X,duration:1536,kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}}),f+=dc.X):f++}}if(0==Ca||0==J.byteLength||null==N)throw new P(2,3,3018);f=N/9E4*Ca;h={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ca,duration:d,ib:[],qa:J,Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.g,baseMediaDecodeTime:f,fb:M},stream:b};break;case "ec3":M=
1248
- [];Ca=0;N=new Uint8Array([]);J=null;for(var sb=t(f.pc()),Td=sb.next();!Td.done;Td=sb.next()){var vd=Td.value,Ud=vd.data;null==J&&null!==vd.pts&&(J=vd.pts);for(f=0;f<Ud.length;){var Dc=BA(Ud,f);Dc?(b.audioSamplingRate=Dc.sampleRate,b.channelsCount=Dc.channelCount,Ca=Dc.sampleRate,N=Dc.qa,M.push({data:Ud.subarray(f,f+Dc.X),size:Dc.X,duration:1536,kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}}),f+=Dc.X):f++}}if(0==Ca||0==N.byteLength||null==J)throw new P(2,3,3018);f=J/9E4*Ca;h={id:b.id,type:"audio",codecs:"ec-3",
1249
- encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ca,duration:d,ib:[],qa:N,Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.g,baseMediaDecodeTime:f,fb:M},stream:b};break;case "mp3":M=[];var Vd;Ca=null;for(var ii=t(f.pc()),Xe=ii.next();!Xe.done;Xe=ii.next()){var Wd=Xe.value,Lc=Wd.data;if(Lc)for(null==Ca&&null!==Wd.pts&&(Ca=Wd.pts),f=0;f<Lc.length;){var id=LA(Lc,f);id?(Vd||(Vd=id),f+id.X<=Lc.length&&M.push({data:Lc.subarray(f,f+id.X),size:id.X,duration:1152,kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}}),
1250
- f+=id.X):f++}}if(!Vd||null==Ca)throw new P(2,3,3018);var lg=Vd.sampleRate;f=Ca/9E4*lg;h={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:lg,duration:d,ib:[],qa:new Uint8Array([]),Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.g,baseMediaDecodeTime:f,fb:M},stream:b}}h&&a.push(h)}}catch(mg){return mg&&3023==mg.code?Promise.resolve(new Uint8Array([])):Promise.reject(mg)}if(!a.length)return Promise.reject(new P(2,3,3018));a=new Nu(a);this.h.has(b.id)?d=this.h.get(b.id):
1251
- (d=Tu(a),this.h.set(b.id,d));b=jv(a);this.g++;b=tg(d,b);return Promise.resolve(b)};L("shaka.transmuxer.TsTransmuxer",XA);XA.prototype.transmux=XA.prototype.transmux;XA.prototype.getOriginalMimeType=XA.prototype.getOriginalMimeType;XA.prototype.convertCodecs=XA.prototype.convertCodecs;XA.prototype.isSupported=XA.prototype.isSupported;XA.prototype.destroy=XA.prototype.destroy;var YA=["aac","ac-3","ec-3","mp3"],ZA=["avc","hevc"];Wc("video/mp2t",function(){return new XA("video/mp2t")},$c);/*
1241
+ p.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new wi;a=lc(a);var f=this.i.parse(a);a=[];var g=f.sd();try{var h=null;if("video"==e){switch(g.video){case "avc":var k=[],l=null,m=[],n=f.Oc();if(!n.length)throw new P(2,3,3023);for(var r=0;r<n.length;r++){var q=n[r],u=q.nalus;m.push.apply(m,w(u));var v=EA(u);if(v){null==l&&(l=q.dts);var x=void 0;x=r+1<n.length?(n[r+1].dts||0)-(q.dts||0):1<n.length?(q.dts||0)-(n[r-1].dts||0):9E4*(c.endTime-c.startTime);k.push({data:v.data,size:v.data.byteLength,
1242
+ duration:x,kb:Math.round((q.pts||0)-(q.dts||0)),flags:{ob:0,bb:0,ab:0,Za:0,$a:v.Bd?2:1,pb:v.Bd?0:1}})}}var z=CA(m);if(!z||null==l)throw new P(2,3,3018);b.height=z.height;b.width=z.width;h={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ib:[],qa:new Uint8Array([]),Ca:z.Ca,Ja:z.Ja,La:z.La,data:{Cb:this.g,baseMediaDecodeTime:l,fb:k},stream:b};break;case "hvc":n=[];q=null;u=[];k=f.Oc();if(!k.length)throw new P(2,3,3023);for(v=0;v<k.length;v++){l=
1243
+ k[v];m=l.nalus;u.push.apply(u,w(m));z=!1;var y=[],B=!1;r=t(m);for(x=r.next();!x.done;x=r.next()){var A=x.value;switch(A.type){case 1:case 0:var C=B=!0;break;case 19:case 20:case 21:z=C=B=!0;break;case 32:C=!0;break;case 33:C=!0;break;case 34:C=!0;break;case 35:B=C=!0;break;case 39:case 40:C=!0;break;default:C=!1}if(B&&C){var E=A.fullData.byteLength,I=new Uint8Array(4);I[0]=E>>24&255;I[1]=E>>16&255;I[2]=E>>8&255;I[3]=E&255;y.push(tg(I,A.fullData))}}var G=y.length?{data:tg.apply(lg,w(y)),Bd:z}:null;
1244
+ G&&(null==q&&null!=l.dts&&(q=l.dts),z=void 0,z=v+1<k.length?(k[v+1].dts||0)-(l.dts||0):1<k.length?(l.dts||0)-(k[v-1].dts||0):9E4*(c.endTime-c.startTime),n.push({data:G.data,size:G.data.byteLength,duration:z,kb:Math.round((l.pts||0)-(l.dts||0)),flags:{ob:0,bb:0,ab:0,Za:0,$a:G.Bd?2:1,pb:G.Bd?0:1}}))}var H=FA(u);if(!H||null==q)throw new P(2,3,3018);b.height=H.height;b.width=H.width;h={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ib:[],qa:new Uint8Array([]),
1245
+ Ca:H.Ca,Ja:H.Ja,La:H.La,data:{Cb:this.g,baseMediaDecodeTime:q,fb:n},stream:b}}h&&(a.push(h),h=null)}if("audio"==e){switch(g.audio){case "aac":for(var J=[],M,N=null,Q=t(f.qc()),Y=Q.next();!Y.done;Y=Q.next()){var aa=Y.value,da=aa.data;if(da){var T=0;M=tA(da,T);if(!M)throw new P(2,3,3018);b.audioSamplingRate=M.sampleRate;b.channelsCount=M.channelCount;null==N&&null!==aa.pts&&(N=aa.pts);for(;T<da.length;){var Ua=sA(da,T);if(Ua){var ib=Ua.me+Ua.X;T+ib<=da.length&&J.push({data:da.subarray(T+Ua.me,T+ib),
1246
+ size:Ua.X,duration:1024,kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}});T+=ib}else T++}}}if(!M||null==N){if(!f.Oc().length)throw new P(2,3,3018);N=9E4*c.startTime;var Eb=Cb("audio",b.codecs.split(","));if(!Eb||!b.channelsCount||!b.audioSamplingRate)throw new P(2,3,3018);M={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,wa:Eb};var bc=vA(Eb,b.channelsCount);if(!bc)throw new P(2,3,3018);var Lb=N+9E4*(c.endTime-c.startTime);for(f=N;f<Lb;)J.push({data:bc,size:bc.byteLength,duration:1024,kb:0,
1247
+ flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}}),f+=1024/M.sampleRate*9E4}var Ca=M.sampleRate;f=N/9E4*Ca;h={id:b.id,type:"audio",codecs:M.wa,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ca,duration:d,ib:[],qa:new Uint8Array([]),Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.g,baseMediaDecodeTime:f,fb:J},stream:b};break;case "ac3":M=[];Ca=0;J=new Uint8Array([]);N=null;T=t(f.qc());for(var rb=T.next();!rb.done;rb=T.next()){var Fb=rb.value,cc=Fb.data;null==N&&null!==Fb.pts&&(N=Fb.pts);for(f=0;f<cc.length;){var dc=
1248
+ xA(cc,f);dc?(b.audioSamplingRate=dc.sampleRate,b.channelsCount=dc.channelCount,Ca=dc.sampleRate,J=dc.qa,M.push({data:cc.subarray(f,f+dc.X),size:dc.X,duration:1536,kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}}),f+=dc.X):f++}}if(0==Ca||0==J.byteLength||null==N)throw new P(2,3,3018);f=N/9E4*Ca;h={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ca,duration:d,ib:[],qa:J,Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.g,baseMediaDecodeTime:f,fb:M},stream:b};break;case "ec3":M=
1249
+ [];Ca=0;N=new Uint8Array([]);J=null;for(var sb=t(f.qc()),Td=sb.next();!Td.done;Td=sb.next()){var vd=Td.value,Ud=vd.data;null==J&&null!==vd.pts&&(J=vd.pts);for(f=0;f<Ud.length;){var Dc=AA(Ud,f);Dc?(b.audioSamplingRate=Dc.sampleRate,b.channelsCount=Dc.channelCount,Ca=Dc.sampleRate,N=Dc.qa,M.push({data:Ud.subarray(f,f+Dc.X),size:Dc.X,duration:1536,kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}}),f+=Dc.X):f++}}if(0==Ca||0==N.byteLength||null==J)throw new P(2,3,3018);f=J/9E4*Ca;h={id:b.id,type:"audio",codecs:"ec-3",
1250
+ encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ca,duration:d,ib:[],qa:N,Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.g,baseMediaDecodeTime:f,fb:M},stream:b};break;case "mp3":M=[];var Vd;Ca=null;for(var ji=t(f.qc()),Ze=ji.next();!Ze.done;Ze=ji.next()){var Wd=Ze.value,Lc=Wd.data;if(Lc)for(null==Ca&&null!==Wd.pts&&(Ca=Wd.pts),f=0;f<Lc.length;){var id=KA(Lc,f);id?(Vd||(Vd=id),f+id.X<=Lc.length&&M.push({data:Lc.subarray(f,f+id.X),size:id.X,duration:1152,kb:0,flags:{ob:0,bb:0,ab:0,Za:0,$a:2,pb:0}}),
1251
+ f+=id.X):f++}}if(!Vd||null==Ca)throw new P(2,3,3018);var mg=Vd.sampleRate;f=Ca/9E4*mg;h={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:mg,duration:d,ib:[],qa:new Uint8Array([]),Ca:new Uint8Array([]),Ja:0,La:0,data:{Cb:this.g,baseMediaDecodeTime:f,fb:M},stream:b}}h&&a.push(h)}}catch(ng){return ng&&3023==ng.code?Promise.resolve(new Uint8Array([])):Promise.reject(ng)}if(!a.length)return Promise.reject(new P(2,3,3018));a=new Nu(a);this.h.has(b.id)?d=this.h.get(b.id):
1252
+ (d=Tu(a),this.h.set(b.id,d));b=jv(a);this.g++;b=tg(d,b);return Promise.resolve(b)};L("shaka.transmuxer.TsTransmuxer",WA);WA.prototype.transmux=WA.prototype.transmux;WA.prototype.getOriginalMimeType=WA.prototype.getOriginalMimeType;WA.prototype.convertCodecs=WA.prototype.convertCodecs;WA.prototype.isSupported=WA.prototype.isSupported;WA.prototype.destroy=WA.prototype.destroy;var XA=["aac","ac-3","ec-3","mp3"],YA=["avc","hevc"];Wc("video/mp2t",function(){return new WA("video/mp2t")},$c);/*
1252
1253
  @license
1253
1254
  EME Encryption Scheme Polyfill
1254
1255
  Copyright 2019 Google LLC
1255
1256
  SPDX-License-Identifier: Apache-2.0
1256
1257
  */
1257
- function $A(){}var aB;function bB(){aB?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(aB=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=cB):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1258
- function cB(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),D(e,aB.call(c,a,b),2);d=e.h;if(dB(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=aB,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=eB;return e.return(eB.call(c,
1258
+ function ZA(){}var $A;function aB(){$A?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?($A=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=bB):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1259
+ function bB(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),D(e,$A.call(c,a,b),2);d=e.h;if(cB(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=$A,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=dB;return e.return(dB.call(c,
1259
1260
  a,b))})}
1260
- function eB(a,b){var c=this,d,e,f,g,h,k,l,m,n,r;return K(function(q){if(1==q.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=fB(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=gB(h.videoCapabilities,d),l=gB(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."),
1261
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return D(q,aB.call(c,a,e),2)}r=q.h;return q.return(new hB(r,d))})}function gB(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}L("EmeEncryptionSchemePolyfill",$A);$A.install=bB;function iB(){}var jB;
1262
- function kB(){jB?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(jB=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=lB):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1263
- function lB(a){var b=this,c,d,e;return K(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),D(f,jB.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&dB(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=jB,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1264
- navigator.mediaCapabilities.decodingInfo=mB;if(d){f.F(3);break}e=c;return D(f,nB(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(mB.call(b,a))}})}
1265
- function mB(a){var b=this,c,d,e,f,g,h,k,l;return K(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=fB(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):D(m,jB.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
1266
- new hB(k.keySystemAccess,c);m.F(3);break}if(!a.keySystemConfiguration){m.F(3);break}l=k;return D(m,nB(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
1267
- function nB(a){var b,c;return K(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 D(d,
1268
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}L("McEncryptionSchemePolyfill",iB);iB.install=kB;function hB(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
1269
- hB.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};hB.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
1270
- function fB(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function dB(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}
1271
- function oB(){}function Kx(){bB();kB()}L("EncryptionSchemePolyfills",oB);oB.install=Kx;"undefined"!==typeof module&&module.exports&&(module.exports=oB);/*
1261
+ function dB(a,b){var c=this,d,e,f,g,h,k,l,m,n,r;return K(function(q){if(1==q.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=eB(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=fB(h.videoCapabilities,d),l=fB(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."),
1262
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return D(q,$A.call(c,a,e),2)}r=q.h;return q.return(new gB(r,d))})}function fB(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}L("EmeEncryptionSchemePolyfill",ZA);ZA.install=aB;function hB(){}var iB;
1263
+ function jB(){iB?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(iB=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=kB):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1264
+ function kB(a){var b=this,c,d,e;return K(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),D(f,iB.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&cB(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=iB,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1265
+ navigator.mediaCapabilities.decodingInfo=lB;if(d){f.F(3);break}e=c;return D(f,mB(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(lB.call(b,a))}})}
1266
+ function lB(a){var b=this,c,d,e,f,g,h,k,l;return K(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=eB(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):D(m,iB.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
1267
+ new gB(k.keySystemAccess,c);m.F(3);break}if(!a.keySystemConfiguration){m.F(3);break}l=k;return D(m,mB(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
1268
+ function mB(a){var b,c;return K(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 D(d,
1269
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}L("McEncryptionSchemePolyfill",hB);hB.install=jB;function gB(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
1270
+ gB.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};gB.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
1271
+ function eB(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function cB(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}
1272
+ function nB(){}function Kx(){aB();jB()}L("EncryptionSchemePolyfills",nB);nB.install=Kx;"undefined"!==typeof module&&module.exports&&(module.exports=nB);/*
1272
1273
  @license
1273
1274
  Copyright 2013 Ali Al Dallal
1274
1275
 
@@ -1292,7 +1293,7 @@ function oB(){}function Kx(){bB();kB()}L("EncryptionSchemePolyfills",oB);oB.inst
1292
1293
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1293
1294
  SOFTWARE.
1294
1295
  */
1295
- for(var pB={ach:{A:"Lwo",B:"Acholi"},ady:{A:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",B:"Adyghe"},af:{A:"Afrikaans",B:"Afrikaans"},"af-NA":{A:"Afrikaans (Namibia)",B:"Afrikaans (Namibia)"},"af-ZA":{A:"Afrikaans (South Africa)",B:"Afrikaans (South Africa)"},ak:{A:"T\u0255\u0265i",B:"Akan"},ar:{A:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",B:"Arabic"},"ar-AR":{A:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",B:"Arabic"},"ar-MA":{A:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",B:"Arabic (Morocco)"},
1296
+ for(var oB={ach:{A:"Lwo",B:"Acholi"},ady:{A:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",B:"Adyghe"},af:{A:"Afrikaans",B:"Afrikaans"},"af-NA":{A:"Afrikaans (Namibia)",B:"Afrikaans (Namibia)"},"af-ZA":{A:"Afrikaans (South Africa)",B:"Afrikaans (South Africa)"},ak:{A:"T\u0255\u0265i",B:"Akan"},ar:{A:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",B:"Arabic"},"ar-AR":{A:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",B:"Arabic"},"ar-MA":{A:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",B:"Arabic (Morocco)"},
1296
1297
  "ar-SA":{A:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",B:"Arabic (Saudi Arabia)"},"ay-BO":{A:"Aymar aru",B:"Aymara"},az:{A:"Az\u0259rbaycan dili",B:"Azerbaijani"},"az-AZ":{A:"Az\u0259rbaycan dili",B:"Azerbaijani"},"be-BY":{A:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",B:"Belarusian"},bg:{A:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",B:"Bulgarian"},"bg-BG":{A:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
1297
1298
  B:"Bulgarian"},bn:{A:"\u09ac\u09be\u0982\u09b2\u09be",B:"Bengali"},"bn-IN":{A:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",B:"Bengali (India)"},"bn-BD":{A:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",B:"Bengali (Bangladesh)"},"bs-BA":{A:"Bosanski",B:"Bosnian"},ca:{A:"Catal\u00e0",B:"Catalan"},"ca-ES":{A:"Catal\u00e0",B:"Catalan"},cak:{A:"Maya Kaqchikel",B:"Kaqchikel"},"ck-US":{A:"\u13e3\u13b3\u13a9 (tsalagi)",B:"Cherokee"},cs:{A:"\u010ce\u0161tina",
1298
1299
  B:"Czech"},"cs-CZ":{A:"\u010ce\u0161tina",B:"Czech"},cy:{A:"Cymraeg",B:"Welsh"},"cy-GB":{A:"Cymraeg",B:"Welsh"},da:{A:"Dansk",B:"Danish"},"da-DK":{A:"Dansk",B:"Danish"},de:{A:"Deutsch",B:"German"},"de-AT":{A:"Deutsch (\u00d6sterreich)",B:"German (Austria)"},"de-DE":{A:"Deutsch (Deutschland)",B:"German (Germany)"},"de-CH":{A:"Deutsch (Schweiz)",B:"German (Switzerland)"},dsb:{A:"Dolnoserb\u0161\u0107ina",B:"Lower Sorbian"},el:{A:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",B:"Greek"},"el-GR":{A:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
@@ -1313,70 +1314,70 @@ B:"Slovak"},"sk-SK":{A:"Sloven\u010dina (Slovakia)",B:"Slovak (Slovakia)"},sl:{A
1313
1314
  sw:{A:"Kiswahili",B:"Swahili"},"sw-KE":{A:"Kiswahili",B:"Swahili (Kenya)"},ta:{A:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",B:"Tamil"},"ta-IN":{A:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",B:"Tamil"},te:{A:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",B:"Telugu"},"te-IN":{A:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",B:"Telugu"},tg:{A:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",B:"Tajik"},"tg-TJ":{A:"\u0442\u043e\u04b7\u0438\u043a\u04e3",B:"Tajik"},th:{A:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
1314
1315
  B:"Thai"},"th-TH":{A:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",B:"Thai (Thailand)"},tl:{A:"Filipino",B:"Filipino"},"tl-PH":{A:"Filipino",B:"Filipino"},tlh:{A:"tlhIngan-Hol",B:"Klingon"},tr:{A:"T\u00fcrk\u00e7e",B:"Turkish"},"tr-TR":{A:"T\u00fcrk\u00e7e",B:"Turkish"},"tt-RU":{A:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",B:"Tatar"},uk:{A:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",B:"Ukrainian"},"uk-UA":{A:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
1315
1316
  B:"Ukrainian"},ur:{A:"\u0627\u0631\u062f\u0648",B:"Urdu"},"ur-PK":{A:"\u0627\u0631\u062f\u0648",B:"Urdu"},uz:{A:"O'zbek",B:"Uzbek"},"uz-UZ":{A:"O'zbek",B:"Uzbek"},vi:{A:"Ti\u1ebfng Vi\u1ec7t",B:"Vietnamese"},"vi-VN":{A:"Ti\u1ebfng Vi\u1ec7t",B:"Vietnamese"},"xh-ZA":{A:"isiXhosa",B:"Xhosa"},yi:{A:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",B:"Yiddish"},"yi-DE":{A:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",B:"Yiddish (German)"},zh:{A:"\u4e2d\u6587",B:"Chinese"},"zh-HANS":{A:"\u4e2d\u6587\u7b80\u4f53",
1316
- B:"Chinese Simplified"},"zh-HANT":{A:"\u4e2d\u6587\u7e41\u9ad4",B:"Chinese Traditional"},"zh-CN":{A:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",B:"Chinese Simplified (China)"},"zh-HK":{A:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",B:"Chinese Traditional (Hong Kong)"},"zh-SG":{A:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",B:"Chinese Simplified (Singapore)"},"zh-TW":{A:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",B:"Chinese Traditional (Taiwan)"},"zu-ZA":{A:"isiZulu",B:"Zulu"}},qB=t(Object.keys(pB)),rB=qB.next();!rB.done;rB=
1317
- qB.next()){var sB=rB.value;pB[sB.toLowerCase()]=pB[sB]};function tB(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new Kf;this.localization=this.controls.va;this.player=this.controls.Mc();this.video=this.controls.bc();this.adManager=this.player.ee();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})}
1318
- tB.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};L("shaka.ui.Element",tB);tB.prototype.release=tB.prototype.release;function uB(a){return vB(a,"shaka-back-to-overflow-button")}function vB(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function wB(a){a&&(a=vB(a,"shaka-chosen-item"))&&a.parentElement.focus()}function xB(){var a=U("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function yB(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
1319
- function zB(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function AB(a,b){tB.call(this,a,b);var c=this;this.i=U("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=U("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Dd(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=zB(e-d,!1)+" / "+zB(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=
1320
- ""))});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.Qa();c.g.za(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Qa(),this.g.za(.5))}pa(AB,tB);AB.prototype.release=function(){this.g.stop();this.g=null;tB.prototype.release.call(this)};L("shaka.ui.AdCounter",AB);function BB(a,b){tB.call(this,a,b);var c=this;this.g=U("div");this.g.classList.add("shaka-ad-position");yB(this.g,!1);this.parent.appendChild(this.g);this.h=U("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&CB(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&CB(c)});this.eventManager.o(this.adManager,"ad-started",function(){CB(c)});this.eventManager.o(this.adManager,
1321
- "ad-stopped",function(){c.h.textContent="";yB(c.g,!1)});this.ad&&CB(this)}pa(BB,tB);function CB(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));yB(a.g,!0)}}L("shaka.ui.AdPosition",BB);function DB(a,b){tB.call(this,a,b);var c=this;this.button=el();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();
1322
- 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.adManager,"ad-stopped",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?EB(c.controls):FB(c.controls)});this.ad&&(this.g(),this.h())}pa(DB,tB);DB.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.u.paused&&!a.W;return a};
1323
- DB.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.video.ended};DB.prototype.g=function(){};DB.prototype.h=function(){};L("shaka.ui.PlayButton",DB);function GB(a,b){DB.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}pa(GB,DB);GB.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};GB.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};L("shaka.ui.BigPlayButton",GB);function HB(a,b){tB.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.h;this.i=[];this.g=U("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";yB(c.g,!0)}else yB(c.g,
1324
- !1)});this.eventManager.o(window,"click",function(){yB(c.g,!1)});IB(this)}pa(HB,tB);HB.prototype.release=function(){this.h=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];tB.prototype.release.call(this)};function JB(a,b){KB.set(a,b)}function IB(a){for(var b=t(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=KB.get(c);d?a.i.push(d.create(a.g,a.controls)):Ra("Unrecognized context menu element:",c)}}L("shaka.ui.ContextMenu",HB);
1325
- HB.registerElement=JB;var KB=new Map;function LB(a,b){tB.call(this,a,b);var c=this;this.m=null;this.s=!1;this.j=new Dd(function(){0!=parseInt(c.h.textContent,10)&&(c.video.currentTime=c.controls.Hf()+parseInt(c.h.textContent,10));c.g.style.opacity="0";c.s=!1;c.h.textContent="0s"});this.g=U("div");this.parent.appendChild(this.g);this.eventManager.o(this.g,"touchend",function(d){c.controls.cc()&&(c.controls.nd()?(d.preventDefault(),c.controls.uc()):0<c.controls.g.tapSeekDistance&&((d.preventDefault(),d=c.controls.g.tapSeekDistance,c.s)?
1326
- c.m+1E3>Date.now()&&(c.j.stop(),c.m=Date.now(),c.h.textContent=(c.l?parseInt(c.h.textContent,10)-d:parseInt(c.h.textContent,10)+d).toString()+"s",c.g.style.opacity="1",c.j.S(1)):(c.s=!0,c.m=Date.now(),c.j.S(1))))});this.h=U("span");this.h.textContent="0s";this.g.appendChild(this.h);this.i=U("span");this.i.classList.add("shaka-forward-rewind-container-icon");this.g.appendChild(this.i);this.l=!1}pa(LB,tB);L("shaka.ui.HiddenSeekButton",LB);function MB(a,b){LB.call(this,a,b);this.g.classList.add("shaka-fast-foward-container");this.i.textContent="fast_forward";this.l=!1}pa(MB,LB);L("shaka.ui.HiddenFastForwardButton",MB);function NB(a,b){LB.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.l=!0}pa(NB,LB);L("shaka.ui.HiddenRewindButton",NB);function OB(a,b,c,d){tB.call(this,a,b);var e=this;this.container=U("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,w(c));this.h=!1;this.bar=document.createElement("input");this.G=new Dd(function(){e.onChangeEnd();e.h=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,w(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);
1327
- this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.cc()&&(e.h=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.cc()&&(e.h=!0,PB(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.h&&(PB(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.h&&(e.h=!1,PB(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
1328
- "touchcancel",function(f){e.h&&(e.h=!1,PB(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,"mouseup",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"blur",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}pa(OB,tB);p=OB.prototype;p.release=function(){this.G&&(this.G.stop(),this.G=null);tB.prototype.release.call(this)};p.setRange=function(a,b){this.bar.min=a;this.bar.max=b};
1317
+ B:"Chinese Simplified"},"zh-HANT":{A:"\u4e2d\u6587\u7e41\u9ad4",B:"Chinese Traditional"},"zh-CN":{A:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",B:"Chinese Simplified (China)"},"zh-HK":{A:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",B:"Chinese Traditional (Hong Kong)"},"zh-SG":{A:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",B:"Chinese Simplified (Singapore)"},"zh-TW":{A:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",B:"Chinese Traditional (Taiwan)"},"zu-ZA":{A:"isiZulu",B:"Zulu"}},pB=t(Object.keys(oB)),qB=pB.next();!qB.done;qB=
1318
+ pB.next()){var rB=qB.value;oB[rB.toLowerCase()]=oB[rB]};function sB(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new Kf;this.localization=this.controls.va;this.player=this.controls.Mc();this.video=this.controls.cc();this.adManager=this.player.ee();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})}
1319
+ sB.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};L("shaka.ui.Element",sB);sB.prototype.release=sB.prototype.release;function tB(a){return uB(a,"shaka-back-to-overflow-button")}function uB(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function vB(a){a&&(a=uB(a,"shaka-chosen-item"))&&a.parentElement.focus()}function wB(){var a=U("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function xB(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
1320
+ function yB(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function zB(a,b){sB.call(this,a,b);var c=this;this.i=U("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=U("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Dd(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=yB(e-d,!1)+" / "+yB(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=
1321
+ ""))});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.Qa();c.g.za(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Qa(),this.g.za(.5))}pa(zB,sB);zB.prototype.release=function(){this.g.stop();this.g=null;sB.prototype.release.call(this)};L("shaka.ui.AdCounter",zB);function AB(a,b){sB.call(this,a,b);var c=this;this.g=U("div");this.g.classList.add("shaka-ad-position");xB(this.g,!1);this.parent.appendChild(this.g);this.h=U("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&BB(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&BB(c)});this.eventManager.o(this.adManager,"ad-started",function(){BB(c)});this.eventManager.o(this.adManager,
1322
+ "ad-stopped",function(){c.h.textContent="";xB(c.g,!1)});this.ad&&BB(this)}pa(AB,sB);function BB(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));xB(a.g,!0)}}L("shaka.ui.AdPosition",AB);function CB(a,b){sB.call(this,a,b);var c=this;this.button=el();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();
1323
+ 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.adManager,"ad-stopped",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?DB(c.controls):EB(c.controls)});this.ad&&(this.g(),this.h())}pa(CB,sB);CB.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.u.paused&&!a.W;return a};
1324
+ CB.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.video.ended};CB.prototype.g=function(){};CB.prototype.h=function(){};L("shaka.ui.PlayButton",CB);function FB(a,b){CB.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}pa(FB,CB);FB.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};FB.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};L("shaka.ui.BigPlayButton",FB);function GB(a,b){sB.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.h;this.i=[];this.g=U("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";xB(c.g,!0)}else xB(c.g,
1325
+ !1)});this.eventManager.o(window,"click",function(){xB(c.g,!1)});HB(this)}pa(GB,sB);GB.prototype.release=function(){this.h=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];sB.prototype.release.call(this)};function IB(a,b){JB.set(a,b)}function HB(a){for(var b=t(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=JB.get(c);d?a.i.push(d.create(a.g,a.controls)):Ra("Unrecognized context menu element:",c)}}L("shaka.ui.ContextMenu",GB);
1326
+ GB.registerElement=IB;var JB=new Map;function KB(a,b){sB.call(this,a,b);var c=this;this.m=null;this.s=!1;this.j=new Dd(function(){0!=parseInt(c.h.textContent,10)&&(c.video.currentTime=c.controls.Hf()+parseInt(c.h.textContent,10));c.g.style.opacity="0";c.s=!1;c.h.textContent="0s"});this.g=U("div");this.parent.appendChild(this.g);this.eventManager.o(this.g,"touchend",function(d){c.controls.dc()&&(c.controls.nd()?(d.preventDefault(),c.controls.uc()):0<c.controls.g.tapSeekDistance&&((d.preventDefault(),d=c.controls.g.tapSeekDistance,c.s)?
1327
+ c.m+1E3>Date.now()&&(c.j.stop(),c.m=Date.now(),c.h.textContent=(c.l?parseInt(c.h.textContent,10)-d:parseInt(c.h.textContent,10)+d).toString()+"s",c.g.style.opacity="1",c.j.S(1)):(c.s=!0,c.m=Date.now(),c.j.S(1))))});this.h=U("span");this.h.textContent="0s";this.g.appendChild(this.h);this.i=U("span");this.i.classList.add("shaka-forward-rewind-container-icon");this.g.appendChild(this.i);this.l=!1}pa(KB,sB);L("shaka.ui.HiddenSeekButton",KB);function LB(a,b){KB.call(this,a,b);this.g.classList.add("shaka-fast-foward-container");this.i.textContent="fast_forward";this.l=!1}pa(LB,KB);L("shaka.ui.HiddenFastForwardButton",LB);function MB(a,b){KB.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.l=!0}pa(MB,KB);L("shaka.ui.HiddenRewindButton",MB);function NB(a,b,c,d){sB.call(this,a,b);var e=this;this.container=U("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,w(c));this.h=!1;this.bar=document.createElement("input");this.G=new Dd(function(){e.onChangeEnd();e.h=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,w(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);
1328
+ this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.dc()&&(e.h=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.dc()&&(e.h=!0,OB(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.h&&(OB(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.h&&(e.h=!1,OB(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
1329
+ "touchcancel",function(f){e.h&&(e.h=!1,OB(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,"mouseup",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"blur",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}pa(NB,sB);p=NB.prototype;p.release=function(){this.G&&(this.G.stop(),this.G=null);sB.prototype.release.call(this)};p.setRange=function(a,b){this.bar.min=a;this.bar.max=b};
1329
1330
  p.onChangeStart=function(){};p.onChange=function(){};p.onChangeEnd=function(){};p.changeTo=function(a){this.h||(this.h=!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.G.S(.5)};p.getValue=function(){return parseFloat(this.bar.value)};p.setValue=function(a){this.h||(this.bar.value=a)};
1330
- function PB(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}L("shaka.ui.RangeElement",OB);OB.prototype.setValue=OB.prototype.setValue;OB.prototype.getValue=OB.prototype.getValue;OB.prototype.changeTo=OB.prototype.changeTo;OB.prototype.onChangeEnd=OB.prototype.onChangeEnd;OB.prototype.onChange=OB.prototype.onChange;OB.prototype.onChangeStart=OB.prototype.onChangeStart;
1331
- OB.prototype.setRange=OB.prototype.setRange;function QB(a,b){OB.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.D=U("div");this.D.classList.add("shaka-ad-markers");this.container.insertBefore(this.D,this.container.childNodes[0]);this.H=this.controls.g;this.s=new Dd(function(){var d=c.getValue();c.player.R()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.I=new Dd(function(){RB(c)});this.K=!1;this.i=U("div");this.i.id="shaka-player-ui-thumbnail-container";
1332
- this.g=U("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.u=U("div");this.u.id="shaka-player-ui-thumbnail-time";this.i.appendChild(this.g);this.i.appendChild(this.u);this.container.appendChild(this.i);this.j=this.l=null;this.J=!1;this.m=new Dd(function(){SB(c)});this.C=[];this.eventManager.o(this.localization,"locale-updated",function(){return TB(c)});this.eventManager.o(this.localization,"locale-changed",function(){return TB(c)});this.eventManager.o(this.adManager,"ad-started",
1333
- function(){UB(c)||yB(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){UB(c)&&yB(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.C=d.cuepoints;VB(c)});this.eventManager.o(this.player,"unloading",function(){c.C=[];VB(c);c.j&&(c.j.abort(),c.j=null);c.l=null;SB(c)});this.eventManager.o(this.bar,"mousemove",function(d){if(c.player.fe().length){var e=c.bar.getBoundingClientRect(),f=parseFloat(c.bar.min);d=d.clientX-e.left;WB(c,d,Math.round(f+
1334
- (parseFloat(c.bar.max)-f)/e.width*d))}else SB(c)});this.eventManager.o(this.container,"mouseleave",function(){c.m.stop();c.m.S(.25)});this.setValue(this.video.currentTime);this.update();TB(this);this.ad&&yB(this.container,!1)}pa(QB,OB);p=QB.prototype;p.release=function(){this.s&&(this.s.stop(),this.s=null,this.I.stop(),this.I=null);OB.prototype.release.call(this)};p.onChangeStart=function(){this.K=!this.video.paused;this.controls.qg(!0);this.video.pause();this.m.stop();this.J=!0};
1335
- p.onChange=function(){if(this.video.duration)if(this.update(),this.s.S(.125),this.player.fe().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());WB(this,(d-a)/((b-a)/c.width),d)}else SB(this)};p.onChangeEnd=function(){this.s.Qa();this.controls.qg(!1);this.K&&this.video.play();this.J&&(this.J=!1,this.m.stop(),this.m.S(.25))};p.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
1336
- p.update=function(){var a=this.H.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.Ha(),g=f.end-f.start;this.setRange(f.start,f.end);UB(this)?(yB(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.H.showUnbufferedStart?
1337
- 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()+")")):yB(this.container,!1)};
1338
- function RB(a){if(a.C.length){for(var b=a.player.Ha(),c=b.end-b.start,d=["to right"],e=[],f=a.H.seekBarColors.adBreaks,g=!1,h=t(a.C),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 "+
1339
- 100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.D.style.background="linear-gradient("+d.join(",")+")"}else a.D.style.background="transparent"}function VB(a){RB(a);var b=a.player.Ha();b=b.end-b.start;a.player.R()&&5<b&&a.I.za(1)}function UB(a){var b=a.player.Ha();b=b.end-b.start;return a.player.R()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function TB(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
1340
- function WB(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A;K(function(C){switch(C.g){case 1:d=XB(a);if(!d)return SB(a),C.return();0>c&&(c=0);e=a.player.Ha();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return D(C,a.player.Kf(d.id,f),2);case 2:g=C.h;if(!g||!g.uris.length)return SB(a),C.return();a.player.R()?(h=e.end-c,a.u.textContent=1>h?a.localization.resolve("LIVE"):"-"+YB(h)):a.u.textContent=YB(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top=
1341
- -(m-k)+"px";n=Math.min(a.bar.offsetWidth-l,Math.max(0,b-l/2));a.i.style.left=n+"px";a.i.style.visibility="visible";r=g.uris[0].split("#xywh=")[0];if(a.l&&r===a.l.uris[0].split("#xywh=")[0]&&g.segment.$b()==a.l.segment.$b()&&g.segment.Xb()==a.l.segment.Xb()){C.F(3);break}a.l=g;a.j&&(a.j.abort(),a.j=null);if("mjpg"!=d.codecs&&!r.startsWith("offline:")){C.F(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';ta(C,5);q=Gf;u=ok(g.segment.ba(),g.segment.$b(),g.segment.Xb(),a.player.getConfiguration().streaming.retryParameters);
1342
- a.j=a.player.Yb().request(q,u,{type:1});return D(C,a.j.promise,7);case 7:v=C.h;a.j=null;"mjpg"==d.codecs?(x=(new bg).box("mdat",kg(function(E){r=URL.createObjectURL(new Blob([E],{type:"image/jpeg"}))})),x.parse(v.data,!1)):(z=d.mimeType||"image/jpeg",y=new Blob([v.data],{type:z}),r=URL.createObjectURL(y));va(C,4);break;case 5:B=wa(C);if(7001==B.code)return C.return();throw B;case 4:try{a.i.removeChild(a.g)}catch(E){}a.g=U("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=r;
1331
+ function OB(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}L("shaka.ui.RangeElement",NB);NB.prototype.setValue=NB.prototype.setValue;NB.prototype.getValue=NB.prototype.getValue;NB.prototype.changeTo=NB.prototype.changeTo;NB.prototype.onChangeEnd=NB.prototype.onChangeEnd;NB.prototype.onChange=NB.prototype.onChange;NB.prototype.onChangeStart=NB.prototype.onChangeStart;
1332
+ NB.prototype.setRange=NB.prototype.setRange;function PB(a,b){NB.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.D=U("div");this.D.classList.add("shaka-ad-markers");this.container.insertBefore(this.D,this.container.childNodes[0]);this.H=this.controls.g;this.s=new Dd(function(){var d=c.getValue();c.player.R()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.I=new Dd(function(){QB(c)});this.K=!1;this.i=U("div");this.i.id="shaka-player-ui-thumbnail-container";
1333
+ this.g=U("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.u=U("div");this.u.id="shaka-player-ui-thumbnail-time";this.i.appendChild(this.g);this.i.appendChild(this.u);this.container.appendChild(this.i);this.j=this.l=null;this.J=!1;this.m=new Dd(function(){RB(c)});this.C=[];this.eventManager.o(this.localization,"locale-updated",function(){return SB(c)});this.eventManager.o(this.localization,"locale-changed",function(){return SB(c)});this.eventManager.o(this.adManager,"ad-started",
1334
+ function(){TB(c)||xB(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){TB(c)&&xB(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.C=d.cuepoints;UB(c)});this.eventManager.o(this.player,"unloading",function(){c.C=[];UB(c);c.j&&(c.j.abort(),c.j=null);c.l=null;RB(c)});this.eventManager.o(this.bar,"mousemove",function(d){if(c.player.fe().length){var e=c.bar.getBoundingClientRect(),f=parseFloat(c.bar.min);d=d.clientX-e.left;VB(c,d,Math.round(f+
1335
+ (parseFloat(c.bar.max)-f)/e.width*d))}else RB(c)});this.eventManager.o(this.container,"mouseleave",function(){c.m.stop();c.m.S(.25)});this.setValue(this.video.currentTime);this.update();SB(this);this.ad&&xB(this.container,!1)}pa(PB,NB);p=PB.prototype;p.release=function(){this.s&&(this.s.stop(),this.s=null,this.I.stop(),this.I=null);NB.prototype.release.call(this)};p.onChangeStart=function(){this.K=!this.video.paused;this.controls.qg(!0);this.video.pause();this.m.stop();this.J=!0};
1336
+ p.onChange=function(){if(this.video.duration)if(this.update(),this.s.S(.125),this.player.fe().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());VB(this,(d-a)/((b-a)/c.width),d)}else RB(this)};p.onChangeEnd=function(){this.s.Qa();this.controls.qg(!1);this.K&&this.video.play();this.J&&(this.J=!1,this.m.stop(),this.m.S(.25))};p.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
1337
+ p.update=function(){var a=this.H.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.Ha(),g=f.end-f.start;this.setRange(f.start,f.end);TB(this)?(xB(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.H.showUnbufferedStart?
1338
+ 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()+")")):xB(this.container,!1)};
1339
+ function QB(a){if(a.C.length){for(var b=a.player.Ha(),c=b.end-b.start,d=["to right"],e=[],f=a.H.seekBarColors.adBreaks,g=!1,h=t(a.C),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 "+
1340
+ 100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.D.style.background="linear-gradient("+d.join(",")+")"}else a.D.style.background="transparent"}function UB(a){QB(a);var b=a.player.Ha();b=b.end-b.start;a.player.R()&&5<b&&a.I.za(1)}function TB(a){var b=a.player.Ha();b=b.end-b.start;return a.player.R()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function SB(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
1341
+ function VB(a,b,c){var d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A;K(function(C){switch(C.g){case 1:d=WB(a);if(!d)return RB(a),C.return();0>c&&(c=0);e=a.player.Ha();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return D(C,a.player.Kf(d.id,f),2);case 2:g=C.h;if(!g||!g.uris.length)return RB(a),C.return();a.player.R()?(h=e.end-c,a.u.textContent=1>h?a.localization.resolve("LIVE"):"-"+XB(h)):a.u.textContent=XB(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top=
1342
+ -(m-k)+"px";n=Math.min(a.bar.offsetWidth-l,Math.max(0,b-l/2));a.i.style.left=n+"px";a.i.style.visibility="visible";r=g.uris[0].split("#xywh=")[0];if(a.l&&r===a.l.uris[0].split("#xywh=")[0]&&g.segment.Pb()==a.l.segment.Pb()&&g.segment.Mb()==a.l.segment.Mb()){C.F(3);break}a.l=g;a.j&&(a.j.abort(),a.j=null);if("mjpg"!=d.codecs&&!r.startsWith("offline:")){C.F(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';ta(C,5);q=Gf;u=ok(g.segment.ba(),g.segment.Pb(),g.segment.Mb(),a.player.getConfiguration().streaming.retryParameters);
1343
+ a.j=a.player.Zb().request(q,u,{type:1});return D(C,a.j.promise,7);case 7:v=C.h;a.j=null;"mjpg"==d.codecs?(x=(new bg).box("mdat",kg(function(E){r=URL.createObjectURL(new Blob([E],{type:"image/jpeg"}))})),x.parse(v.data,!1)):(z=d.mimeType||"image/jpeg",y=new Blob([v.data],{type:z}),r=URL.createObjectURL(y));va(C,4);break;case 5:B=wa(C);if(7001==B.code)return C.return();throw B;case 4:try{a.i.removeChild(a.g)}catch(E){}a.g=U("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=r;
1343
1344
  a.g.onload=function(){r.startsWith("blob:")&&URL.revokeObjectURL(r)};a.i.insertBefore(a.g,a.i.firstChild);case 3:A=l/g.width,g.imageHeight?a.g.height=g.imageHeight:g.sprite||(a.g.style.height="100%",a.g.style.objectFit="contain"),g.imageWidth?a.g.width=g.imageWidth:g.sprite||(a.g.style.width="100%",a.g.style.objectFit="contain"),a.g.style.left="-"+A*g.positionX+"px",a.g.style.top="-"+A*g.positionY+"px",a.g.style.transform="scale("+A+")",a.g.style.transformOrigin="left top",m=Math.floor(l*g.height/
1344
1345
  g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",F(C)}})}
1345
- function XB(a){var b=a.player.fe();if(!b.length)return null;for(var c={},d=t(["image/avif","image/webp","image/jpeg","image/png","image/svg+xml"]),e=d.next();!e.done;c={Ve:c.Ve,Te:c.Te},e=d.next())if(c.Ve=e.value,c.Te=a.player.getStats().estimatedBandwidth,(e=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.Ve&&g.bandwidth<.01*f.Te}}(c)).sort(function(f,g){return g.bandwidth-f.bandwidth}))&&e.length)return e[0];return b.find(function(f){return"application/mp4"==f.mimeType&&
1346
- "mjpg"==f.codecs})||b[0]}function SB(a){a.i.style.visibility="hidden";a.u.textContent=""}function YB(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}L("shaka.ui.SeekBar",QB);function ZB(){}ZB.prototype.create=function(a,b){return new QB(a,b)};QB.Factory=ZB;function Z(a,b,c,d){$a.call(this);var e=this;this.N=!0;this.g=d;this.C=new Oo(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.ua=!0;this.u=this.C.bc();this.s=c;this.G=this.C.Mc();this.sa=a;this.j=b;this.Wa=this.G.ee();this.l=this.m=null;this.W=!1;this.H=[];this.Vb=[];this.Ib=!1;this.Z=new Dd(function(){e.j.style.cursor="none";e.Ib=!1;$B(e)});this.aa=new Dd(function(){e.h.removeAttribute("shown");e.I.S(2)});this.I=new Dd(function(){for(var f=t(e.H),g=f.next();!g.done;g=f.next())yB(g.value,
1347
- !1)});this.Ra=new Dd(function(){e.cc()&&aC(e)});this.J=null;this.D=[];this.va=bC();this.i=new Kf;this.configure(this.g);cC(this);this.ha=new Set;dC(this);this.Ra.za(.125);this.i.o(this.va,"locale-changed",function(f){e.Wa.setLocale(f.locales[0])})}pa(Z,$a);p=Z.prototype;
1348
- p.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.s){b.F(2);break}return D(b,document.exitPictureInPicture(),2);case 2:a.i&&(a.i.release(),a.i=null);a.Z&&(a.Z.stop(),a.Z=null);a.aa&&(a.aa.stop(),a.aa=null);a.I&&(a.I.stop(),a.I=null);a.Ra&&(a.Ra.stop(),a.Ra=null);eC(a);a.h&&(a.j.removeChild(a.h),a.h=null);if(!a.C){b.F(4);break}return D(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.sa){b.F(6);break}return D(b,a.sa.destroy(),7);case 7:a.sa=
1349
- null;case 6:a.G=null,a.s=null,a.u=null,a.va=null,a.ha.clear(),$a.prototype.release.call(a),F(b)}})};function eC(a){for(var b=t(a.D),c=b.next();!c.done;c=b.next())c.value.release();a.D=[]}function fC(a,b){gC.set(a,b)}p.Kh=function(a){this.ua=a;dC(this)};p.Ri=function(){$B(this)};
1350
- p.configure=function(a){this.g=a;this.C.Jg(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.Fb&&(this.Fb=null);this.Xa&&(this.Xa=null);this.h?(fl(this.h),eC(this)):(hC(this),iC(this));this.j.classList.add("shaka-video-container");this.s.classList.add("shaka-video");jC(this);this.g.addBigPlayButton&&kC(this);this.g.customContextMenu&&(this.Xa=new HB(this.V,this),this.D.push(this.Xa));this.$||lC(this);this.g.seekOnTaps&&(mC(this),nC(this));this.xb=U("div");this.xb.classList.add("shaka-server-side-ad-container");
1351
- this.h.appendChild(this.xb);oC(this);this.H=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.H.push.apply(this.H,w(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));pC(this);this.Vb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));$B(this);a=t(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.i.o(b,"click",c);this.i.o(b,"dblclick",
1352
- c)}};p.lg=function(a){(this.N=a)?(this.j.setAttribute("shaka-controls","true"),this.s.tabIndex=-1,this.s.controls=!1):this.j.removeAttribute("shaka-controls");$B(this)};p.ph=function(a){this.s.controls=a;this.s.tabIndex=a?0:-1;a&&this.lg(!1)};p.getAd=function(){return this.m};p.Vh=function(){return this.C};p.ji=function(){return this.va};p.Di=function(){return this.j};p.bc=function(){return this.u};p.ii=function(){return this.s};p.Mc=function(){return this.G};p.gi=function(){return this.sa};
1346
+ function WB(a){var b=a.player.fe();if(!b.length)return null;for(var c={},d=t(["image/avif","image/webp","image/jpeg","image/png","image/svg+xml"]),e=d.next();!e.done;c={Ve:c.Ve,Te:c.Te},e=d.next())if(c.Ve=e.value,c.Te=a.player.getStats().estimatedBandwidth,(e=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.Ve&&g.bandwidth<.01*f.Te}}(c)).sort(function(f,g){return g.bandwidth-f.bandwidth}))&&e.length)return e[0];return b.find(function(f){return"application/mp4"==f.mimeType&&
1347
+ "mjpg"==f.codecs})||b[0]}function RB(a){a.i.style.visibility="hidden";a.u.textContent=""}function XB(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}L("shaka.ui.SeekBar",PB);function YB(){}YB.prototype.create=function(a,b){return new PB(a,b)};PB.Factory=YB;function Z(a,b,c,d){$a.call(this);var e=this;this.N=!0;this.g=d;this.C=new Oo(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.ua=!0;this.u=this.C.cc();this.s=c;this.G=this.C.Mc();this.sa=a;this.j=b;this.Wa=this.G.ee();this.l=this.m=null;this.W=!1;this.H=[];this.Xb=[];this.Ib=!1;this.Z=new Dd(function(){e.j.style.cursor="none";e.Ib=!1;ZB(e)});this.aa=new Dd(function(){e.h.removeAttribute("shown");e.I.S(2)});this.I=new Dd(function(){for(var f=t(e.H),g=f.next();!g.done;g=f.next())xB(g.value,
1348
+ !1)});this.Ra=new Dd(function(){e.dc()&&$B(e)});this.J=null;this.D=[];this.va=aC();this.i=new Kf;this.configure(this.g);bC(this);this.ha=new Set;cC(this);this.Ra.za(.125);this.i.o(this.va,"locale-changed",function(f){e.Wa.setLocale(f.locales[0])})}pa(Z,$a);p=Z.prototype;
1349
+ p.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.s){b.F(2);break}return D(b,document.exitPictureInPicture(),2);case 2:a.i&&(a.i.release(),a.i=null);a.Z&&(a.Z.stop(),a.Z=null);a.aa&&(a.aa.stop(),a.aa=null);a.I&&(a.I.stop(),a.I=null);a.Ra&&(a.Ra.stop(),a.Ra=null);dC(a);a.h&&(a.j.removeChild(a.h),a.h=null);if(!a.C){b.F(4);break}return D(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.sa){b.F(6);break}return D(b,a.sa.destroy(),7);case 7:a.sa=
1350
+ null;case 6:a.G=null,a.s=null,a.u=null,a.va=null,a.ha.clear(),$a.prototype.release.call(a),F(b)}})};function dC(a){for(var b=t(a.D),c=b.next();!c.done;c=b.next())c.value.release();a.D=[]}function eC(a,b){fC.set(a,b)}p.Kh=function(a){this.ua=a;cC(this)};p.Ri=function(){ZB(this)};
1351
+ p.configure=function(a){this.g=a;this.C.Jg(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.Fb&&(this.Fb=null);this.Xa&&(this.Xa=null);this.h?(fl(this.h),dC(this)):(gC(this),hC(this));this.j.classList.add("shaka-video-container");this.s.classList.add("shaka-video");iC(this);this.g.addBigPlayButton&&jC(this);this.g.customContextMenu&&(this.Xa=new GB(this.V,this),this.D.push(this.Xa));this.$||kC(this);this.g.seekOnTaps&&(lC(this),mC(this));this.xb=U("div");this.xb.classList.add("shaka-server-side-ad-container");
1352
+ this.h.appendChild(this.xb);nC(this);this.H=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.H.push.apply(this.H,w(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));oC(this);this.Xb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));ZB(this);a=t(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.i.o(b,"click",c);this.i.o(b,"dblclick",
1353
+ c)}};p.lg=function(a){(this.N=a)?(this.j.setAttribute("shaka-controls","true"),this.s.tabIndex=-1,this.s.controls=!1):this.j.removeAttribute("shaka-controls");ZB(this)};p.ph=function(a){this.s.controls=a;this.s.tabIndex=a?0:-1;a&&this.lg(!1)};p.getAd=function(){return this.m};p.Vh=function(){return this.C};p.ji=function(){return this.va};p.Di=function(){return this.j};p.cc=function(){return this.u};p.ii=function(){return this.s};p.Mc=function(){return this.G};p.gi=function(){return this.sa};
1353
1354
  p.$h=function(){return this.h};p.ti=function(){return this.xb};p.Xh=function(){return this.M};p.Yh=function(){return this.g};p.Oi=function(){return this.W};p.qg=function(a){this.W=a};p.Ii=function(){return this.ua};p.Hf=function(){return this.l?this.l.getValue():this.u.currentTime};p.qh=function(a){this.J=a};p.nd=function(){return this.H.some(function(a){return!a.classList.contains("shaka-hidden")})};p.uc=function(){this.I.Qa()};
1354
1355
  p.zd=function(){return document.fullscreenEnabled||this.s.webkitSupportsFullscreen?!0:!1};p.Qc=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.s;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
1355
- function qC(a){var b,c,d;return K(function(e){switch(e.g){case 1:ta(e,2);if(!document.fullscreenEnabled){b=a.s;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.F(4);break}if(!document.pictureInPictureElement){e.F(5);break}return D(e,document.exitPictureInPicture(),5);case 5:return c=a.g.fullScreenElement,D(e,c.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.g.forceLandscapeOnFullscreen||!screen.orientation){e.F(4);break}ta(e,9);return D(e,screen.orientation.lock("landscape"),11);case 11:va(e,
1356
- 4,2);break;case 9:wa(e,2);case 4:va(e,0);break;case 2:d=wa(e),a.dispatchEvent(new O("error",(new Map).set("detail",d))),F(e)}})}function rC(a){var b;return K(function(c){if(!document.fullscreenEnabled)return b=a.s,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.F(0);screen.orientation&&screen.orientation.unlock();return D(c,document.exitFullscreen(),0)})}p.Pe=function(){var a=this;return K(function(b){return a.Qc()?D(b,rC(a),0):D(b,qC(a),0)})};
1356
+ function pC(a){var b,c,d;return K(function(e){switch(e.g){case 1:ta(e,2);if(!document.fullscreenEnabled){b=a.s;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.F(4);break}if(!document.pictureInPictureElement){e.F(5);break}return D(e,document.exitPictureInPicture(),5);case 5:return c=a.g.fullScreenElement,D(e,c.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.g.forceLandscapeOnFullscreen||!screen.orientation){e.F(4);break}ta(e,9);return D(e,screen.orientation.lock("landscape"),11);case 11:va(e,
1357
+ 4,2);break;case 9:wa(e,2);case 4:va(e,0);break;case 2:d=wa(e),a.dispatchEvent(new O("error",(new Map).set("detail",d))),F(e)}})}function qC(a){var b;return K(function(c){if(!document.fullscreenEnabled)return b=a.s,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.F(0);screen.orientation&&screen.orientation.unlock();return D(c,document.exitFullscreen(),0)})}p.Pe=function(){var a=this;return K(function(b){return a.Qc()?D(b,qC(a),0):D(b,pC(a),0)})};
1357
1358
  p.qe=function(){return this.C.Ba()?!1:"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture||document.pictureInPictureEnabled?!this.s.disablePictureInPicture:!1};p.re=function(){return"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture?!!window.documentPictureInPicture.window:!!document.pictureInPictureElement};
1358
- p.Od=function(){var a=this,b,c;return K(function(d){if(1==d.g)return ta(d,2),"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture?D(d,sC(a),5):document.pictureInPictureElement?D(d,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),b=a.s,D(d,b.requestPictureInPicture(),5));if(2!=d.g)return va(d,0);c=wa(d);a.dispatchEvent(new O("error",(new Map).set("detail",c)));F(d)})};
1359
- function sC(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){if(window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),h.return();b=a.j;c=b.getBoundingClientRect();return D(h,window.documentPictureInPicture.requestWindow({width:c.width,height:c.height}),2)}d=h.h;tC(d);e=b.parentNode||document.body;f=a.j.cloneNode(!0);f.style.visibility="hidden";f.style.height=getComputedStyle(b).height;e.appendChild(f);g=document.createElement("style");g.append("[data-shaka-player-container] {\n width: 100% !important; max-height: 100%}");
1359
+ p.Od=function(){var a=this,b,c;return K(function(d){if(1==d.g)return ta(d,2),"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture?D(d,rC(a),5):document.pictureInPictureElement?D(d,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),b=a.s,D(d,b.requestPictureInPicture(),5));if(2!=d.g)return va(d,0);c=wa(d);a.dispatchEvent(new O("error",(new Map).set("detail",c)));F(d)})};
1360
+ function rC(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){if(window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),h.return();b=a.j;c=b.getBoundingClientRect();return D(h,window.documentPictureInPicture.requestWindow({width:c.width,height:c.height}),2)}d=h.h;sC(d);e=b.parentNode||document.body;f=a.j.cloneNode(!0);f.style.visibility="hidden";f.style.height=getComputedStyle(b).height;e.appendChild(f);g=document.createElement("style");g.append("[data-shaka-player-container] {\n width: 100% !important; max-height: 100%}");
1360
1361
  d.document.head.append(g);d.document.body.append(b);a.i.na(d,"pagehide",function(){f.replaceWith(b)});F(h)})}
1361
- function tC(a){var b=[].concat(w(document.styleSheets)).map(function(d){try{return[].concat(w(d.cssRules)).map(function(f){return f.cssText}).join("")}catch(f){var e=document.createElement("link");e.rel="stylesheet";e.type=d.type;e.media=d.media;e.href=d.href;a.document.head.appendChild(e)}return""}).filter(Boolean).join("\n"),c=document.createElement("style");c.textContent=b;a.document.head.appendChild(c)}p.uh=function(){yB(this.K,!0);yB(this.M,!0);this.h.setAttribute("ad-active","true")};
1362
- p.Wg=function(){yB(this.K,!1);yB(this.M,!1);this.h.removeAttribute("ad-active")};function FB(a){a.N&&a.u.duration&&(a.G.od(),a.u.paused&&!a.W?a.u.play():a.u.pause())}function EB(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
1363
- function hC(a){a.h=U("div");a.h.classList.add("shaka-controls-container");a.j.appendChild(a.h);a.j.setAttribute("shaka-controls","true");a.i.o(a.h,"touchstart",function(b){a.u.duration&&(a.cc()?a.J=Date.now():(uC(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.i.o(a.h,"click",function(){vC(a)});a.i.o(a.h,"dblclick",function(){a.g.doubleClickForFullscreen&&a.zd()&&a.Pe()})}
1364
- function kC(a){var b=U("div");b.classList.add("shaka-play-button-container");a.h.appendChild(b);a.Fb=new GB(b,a);a.D.push(a.Fb)}function jC(a){var b=U("div");b.classList.add("shaka-scrim-container");a.h.appendChild(b)}function wC(a){a.K=U("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();yB(a.K,b);a.L.appendChild(a.K);b=new BB(a.K,a);a.D.push(b);b=new AB(a.K,a);a.D.push(b)}
1365
- function lC(a){a.$=U("div");a.$.classList.add("shaka-spinner-container");a.j.appendChild(a.$);var b=U("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",
1366
- "none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}function mC(a){var b=U("div");b.classList.add("shaka-hidden-fast-forward-container");a.h.appendChild(b);a.mc=new MB(b,a);a.D.push(a.mc)}function nC(a){var b=U("div");b.classList.add("shaka-hidden-rewind-container");a.h.appendChild(b);a.tc=new NB(b,a);a.D.push(a.tc)}
1367
- function oC(a){a.L=U("div");a.L.classList.add("shaka-bottom-controls");a.L.classList.add("shaka-no-propagation");a.h.appendChild(a.L);a.i.o(a.L,"click",function(d){d.target.closest(".shaka-overflow-button")||a.uc()});wC(a);a.V=U("div");a.V.classList.add("shaka-controls-button-panel");a.V.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.V.classList.add("shaka-tooltips-on");a.L.appendChild(a.V);for(var b=t(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,gC.get(c)?
1368
- (c=gC.get(c).create(a.V,a),a.D.push(c)):Ra("Unrecognized control panel element requested:",c)}function pC(a){if(a.g.addSeekBar)a.l=xC.create(a.L,a),a.D.push(a.l);else{a=t(a.H);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function iC(a){a.M=U("div");a.M.classList.add("shaka-client-side-ad-container");yB(a.M,!1);a.i.o(a.M,"click",function(){vC(a)});a.j.appendChild(a.M)}
1369
- function cC(a){a.i.o(a.G,"buffering",function(){a.N&&yB(a.$,a.G.yd())});a.N&&yB(a.$,a.G.yd());a.i.o(window,"keydown",function(b){yC(a,b)});a.i.o(window,"click",function(){return a.uc()});a.i.o(a,"submenuopen",function(){a.uc()});a.i.o(a.u,"play",function(){$B(a)});a.i.o(a.u,"pause",function(){$B(a)});a.i.o(a.j,"mousemove",function(b){uC(a,b)});a.i.o(a.j,"touchmove",function(b){uC(a,b)},{passive:!0});a.i.o(a.j,"touchend",function(b){uC(a,b)},{passive:!0});a.i.o(a.j,"mouseleave",function(){a.J||a.Z.Qa()});
1370
- a.i.o(a.C,"caststatuschanged",function(){dC(a)});a.i.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.h.contains(c)&&uC(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.l&&!d&&0<c&&(b.preventDefault(),zC(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&!d&&0<c&&(b.preventDefault(),
1371
- zC(a,a.l.getValue()+c));break;case "PageDown":a.l&&e&&0<c&&(b.preventDefault(),zC(a,a.l.getValue()-f));break;case "PageUp":a.l&&e&&0<c&&(b.preventDefault(),zC(a,a.l.getValue()+f));break;case "Home":a.l&&zC(a,a.G.Ha().start);break;case "End":a.l&&zC(a,a.G.Ha().end);break;case "f":a.zd()&&a.Pe();break;case "m":a.m&&a.m.isLinear()?a.m.setMuted(!a.m.isMuted()):a.s.muted=!a.s.muted;break;case "p":a.qe()&&a.Od();break;case " ":e&&AC(a)}}});a.i.o(a.j,"keyup",function(b){a.ha.delete(b.key)});a.i.o(a.Wa,"ad-started",
1372
- function(b){a.m=b.ad;a.uh()});a.i.o(a.Wa,"ad-stopped",function(){a.m=null;a.Wg()});screen.orientation&&a.i.o(screen.orientation,"change",function(){return K(function(b){return D(b,BC(a),0)})})}function BC(a){return K(function(b){return a.u&&0!=a.u.readyState&&!a.C.Ba()&&a.g.enableFullscreenOnRotation&&a.zd()?screen.orientation.type.includes("landscape")&&!a.Qc()?D(b,qC(a),0):screen.orientation.type.includes("portrait")&&a.Qc()?D(b,rC(a),0):b.F(0):b.return()})}
1373
- function uC(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),$B(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.Ib=!0,a.I.stop(),a.cc()||(aC(a),$B(a)),a.Z.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.Z.S(3))}function CC(a){return window.matchMedia("hover: hover").matches?a.Vb.some(function(b){return b.matches(":hover")}):!1}
1374
- function $B(a){var b=a.m?a.m.isPaused():!1,c=a.u.paused&&!a.W,d=a.h.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.Ib||d||CC(a)?(aC(a),a.h.setAttribute("shown","true"),a.aa.stop()):a.aa.S(a.g.fadeDelay)}function vC(a){a.N&&(a.nd()?a.I.Qa():a.g.singleClickForPlayAndPause&&AC(a))}function AC(a){a.m&&a.m.isLinear()?EB(a):FB(a)}
1375
- function dC(a){var b=a.C.Ba();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.h.setAttribute("casting","true"):a.h.removeAttribute("casting")}p.cc=function(){return this.N?null!=this.h.getAttribute("shown")||null!=this.h.getAttribute("casting"):!1};function zC(a,b){a.l.changeTo(b);a.cc()&&aC(a)}
1376
- function aC(a){if(a.l)if(a.l.setValue(a.u.currentTime),a.l.update(),a.l.isShowing())for(var b=t(a.H),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=t(a.H),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new O("timeandseekrangeupdated"))}
1377
- function yC(a,b){a.ha.add(b.key);var c=a.nd();"Tab"==b.key&&(a.h.classList.add("shaka-keyboard-navigation"),$B(a),a.i.o(window,"mousedown",function(){a.i.fc(window,"mousedown")}));"Escape"==b.key&&a.I.Qa();c&&a.ha.has("Tab")&&DC(a,b)}
1378
- function DC(a,b){var c=a.H.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.ha.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
1379
- function bC(){var a=new Ub("en");a.ya("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..."],
1362
+ function sC(a){var b=[].concat(w(document.styleSheets)).map(function(d){try{return[].concat(w(d.cssRules)).map(function(f){return f.cssText}).join("")}catch(f){var e=document.createElement("link");e.rel="stylesheet";e.type=d.type;e.media=d.media;e.href=d.href;a.document.head.appendChild(e)}return""}).filter(Boolean).join("\n"),c=document.createElement("style");c.textContent=b;a.document.head.appendChild(c)}p.uh=function(){xB(this.K,!0);xB(this.M,!0);this.h.setAttribute("ad-active","true")};
1363
+ p.Wg=function(){xB(this.K,!1);xB(this.M,!1);this.h.removeAttribute("ad-active")};function EB(a){a.N&&a.u.duration&&(a.G.od(),a.u.paused&&!a.W?a.u.play():a.u.pause())}function DB(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
1364
+ function gC(a){a.h=U("div");a.h.classList.add("shaka-controls-container");a.j.appendChild(a.h);a.j.setAttribute("shaka-controls","true");a.i.o(a.h,"touchstart",function(b){a.u.duration&&(a.dc()?a.J=Date.now():(tC(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.i.o(a.h,"click",function(){uC(a)});a.i.o(a.h,"dblclick",function(){a.g.doubleClickForFullscreen&&a.zd()&&a.Pe()})}
1365
+ function jC(a){var b=U("div");b.classList.add("shaka-play-button-container");a.h.appendChild(b);a.Fb=new FB(b,a);a.D.push(a.Fb)}function iC(a){var b=U("div");b.classList.add("shaka-scrim-container");a.h.appendChild(b)}function vC(a){a.K=U("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();xB(a.K,b);a.L.appendChild(a.K);b=new AB(a.K,a);a.D.push(b);b=new zB(a.K,a);a.D.push(b)}
1366
+ function kC(a){a.$=U("div");a.$.classList.add("shaka-spinner-container");a.j.appendChild(a.$);var b=U("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",
1367
+ "none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}function lC(a){var b=U("div");b.classList.add("shaka-hidden-fast-forward-container");a.h.appendChild(b);a.nc=new LB(b,a);a.D.push(a.nc)}function mC(a){var b=U("div");b.classList.add("shaka-hidden-rewind-container");a.h.appendChild(b);a.tc=new MB(b,a);a.D.push(a.tc)}
1368
+ function nC(a){a.L=U("div");a.L.classList.add("shaka-bottom-controls");a.L.classList.add("shaka-no-propagation");a.h.appendChild(a.L);a.i.o(a.L,"click",function(d){d.target.closest(".shaka-overflow-button")||a.uc()});vC(a);a.V=U("div");a.V.classList.add("shaka-controls-button-panel");a.V.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.V.classList.add("shaka-tooltips-on");a.L.appendChild(a.V);for(var b=t(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,fC.get(c)?
1369
+ (c=fC.get(c).create(a.V,a),a.D.push(c)):Ra("Unrecognized control panel element requested:",c)}function oC(a){if(a.g.addSeekBar)a.l=wC.create(a.L,a),a.D.push(a.l);else{a=t(a.H);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function hC(a){a.M=U("div");a.M.classList.add("shaka-client-side-ad-container");xB(a.M,!1);a.i.o(a.M,"click",function(){uC(a)});a.j.appendChild(a.M)}
1370
+ function bC(a){a.i.o(a.G,"buffering",function(){a.N&&xB(a.$,a.G.yd())});a.N&&xB(a.$,a.G.yd());a.i.o(window,"keydown",function(b){xC(a,b)});a.i.o(window,"click",function(){return a.uc()});a.i.o(a,"submenuopen",function(){a.uc()});a.i.o(a.u,"play",function(){ZB(a)});a.i.o(a.u,"pause",function(){ZB(a)});a.i.o(a.j,"mousemove",function(b){tC(a,b)});a.i.o(a.j,"touchmove",function(b){tC(a,b)},{passive:!0});a.i.o(a.j,"touchend",function(b){tC(a,b)},{passive:!0});a.i.o(a.j,"mouseleave",function(){a.J||a.Z.Qa()});
1371
+ a.i.o(a.C,"caststatuschanged",function(){cC(a)});a.i.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.h.contains(c)&&tC(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.l&&!d&&0<c&&(b.preventDefault(),yC(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&!d&&0<c&&(b.preventDefault(),
1372
+ yC(a,a.l.getValue()+c));break;case "PageDown":a.l&&e&&0<c&&(b.preventDefault(),yC(a,a.l.getValue()-f));break;case "PageUp":a.l&&e&&0<c&&(b.preventDefault(),yC(a,a.l.getValue()+f));break;case "Home":a.l&&yC(a,a.G.Ha().start);break;case "End":a.l&&yC(a,a.G.Ha().end);break;case "f":a.zd()&&a.Pe();break;case "m":a.m&&a.m.isLinear()?a.m.setMuted(!a.m.isMuted()):a.s.muted=!a.s.muted;break;case "p":a.qe()&&a.Od();break;case " ":e&&zC(a)}}});a.i.o(a.j,"keyup",function(b){a.ha.delete(b.key)});a.i.o(a.Wa,"ad-started",
1373
+ function(b){a.m=b.ad;a.uh()});a.i.o(a.Wa,"ad-stopped",function(){a.m=null;a.Wg()});screen.orientation&&a.i.o(screen.orientation,"change",function(){return K(function(b){return D(b,AC(a),0)})})}function AC(a){return K(function(b){return a.u&&0!=a.u.readyState&&!a.C.Ba()&&a.g.enableFullscreenOnRotation&&a.zd()?screen.orientation.type.includes("landscape")&&!a.Qc()?D(b,pC(a),0):screen.orientation.type.includes("portrait")&&a.Qc()?D(b,qC(a),0):b.F(0):b.return()})}
1374
+ function tC(a,b){"mousemove"==b.type&&(a.h.classList.remove("shaka-keyboard-navigation"),ZB(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.Ib=!0,a.I.stop(),a.dc()||($B(a),ZB(a)),a.Z.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.Z.S(3))}function BC(a){return window.matchMedia("hover: hover").matches?a.Xb.some(function(b){return b.matches(":hover")}):!1}
1375
+ function ZB(a){var b=a.m?a.m.isPaused():!1,c=a.u.paused&&!a.W,d=a.h.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.Ib||d||BC(a)?($B(a),a.h.setAttribute("shown","true"),a.aa.stop()):a.aa.S(a.g.fadeDelay)}function uC(a){a.N&&(a.nd()?a.I.Qa():a.g.singleClickForPlayAndPause&&zC(a))}function zC(a){a.m&&a.m.isLinear()?DB(a):EB(a)}
1376
+ function cC(a){var b=a.C.Ba();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.h.setAttribute("casting","true"):a.h.removeAttribute("casting")}p.dc=function(){return this.N?null!=this.h.getAttribute("shown")||null!=this.h.getAttribute("casting"):!1};function yC(a,b){a.l.changeTo(b);a.dc()&&$B(a)}
1377
+ function $B(a){if(a.l)if(a.l.setValue(a.u.currentTime),a.l.update(),a.l.isShowing())for(var b=t(a.H),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=t(a.H),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new O("timeandseekrangeupdated"))}
1378
+ function xC(a,b){a.ha.add(b.key);var c=a.nd();"Tab"==b.key&&(a.h.classList.add("shaka-keyboard-navigation"),ZB(a),a.i.o(window,"mousedown",function(){a.i.hc(window,"mousedown")}));"Escape"==b.key&&a.I.Qa();c&&a.ha.has("Tab")&&CC(a,b)}
1379
+ function CC(a,b){var c=a.H.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.ha.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
1380
+ function aC(){var a=new Ub("en");a.ya("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..."],
1380
1381
  ["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"],
1381
1382
  ["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"],
1382
1383
  ["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"],
@@ -1434,85 +1435,85 @@ a.ya("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
1434
1435
  ["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\u5206\u8fa8\u7387"],["REWIND","\u5feb\u9000"],["SEEK","\u8fdb\u5ea6"],["SKIP_AD","\u8df3\u8fc7\u5e7f\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u672a\u786e\u5b9a"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],["UNRECOGNIZED_LANGUAGE","\u65e0\u6cd5\u8bc6\u522b"],["VOLUME","\u97f3\u91cf"]]));a.ya("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],
1435
1436
  ["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],
1436
1437
  ["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],
1437
- ["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Ig(navigator.languages||[]);return a}L("shaka.ui.Controls",Z);Z.prototype.isOpaque=Z.prototype.cc;Z.prototype.hideAdUI=Z.prototype.Wg;Z.prototype.showAdUI=Z.prototype.uh;
1438
+ ["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Ig(navigator.languages||[]);return a}L("shaka.ui.Controls",Z);Z.prototype.isOpaque=Z.prototype.dc;Z.prototype.hideAdUI=Z.prototype.Wg;Z.prototype.showAdUI=Z.prototype.uh;
1438
1439
  Z.prototype.togglePiP=Z.prototype.Od;Z.prototype.isPiPEnabled=Z.prototype.re;Z.prototype.isPiPAllowed=Z.prototype.qe;Z.prototype.toggleFullScreen=Z.prototype.Pe;Z.prototype.isFullScreenEnabled=Z.prototype.Qc;Z.prototype.isFullScreenSupported=Z.prototype.zd;Z.prototype.hideSettingsMenus=Z.prototype.uc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.nd;Z.prototype.setLastTouchEventTime=Z.prototype.qh;Z.prototype.getDisplayTime=Z.prototype.Hf;Z.prototype.isCastAllowed=Z.prototype.Ii;
1439
- Z.prototype.setSeeking=Z.prototype.qg;Z.prototype.isSeeking=Z.prototype.Oi;Z.prototype.getConfig=Z.prototype.Yh;Z.prototype.getClientSideAdContainer=Z.prototype.Xh;Z.prototype.getServerSideAdContainer=Z.prototype.ti;Z.prototype.getControlsContainer=Z.prototype.$h;Z.prototype.getLocalPlayer=Z.prototype.gi;Z.prototype.getPlayer=Z.prototype.Mc;Z.prototype.getLocalVideo=Z.prototype.ii;Z.prototype.getVideo=Z.prototype.bc;Z.prototype.getVideoContainer=Z.prototype.Di;Z.prototype.getLocalization=Z.prototype.ji;
1440
- Z.prototype.getCastProxy=Z.prototype.Vh;Z.prototype.getAd=Z.prototype.getAd;Z.prototype.setEnabledNativeControls=Z.prototype.ph;Z.prototype.setEnabledShakaControls=Z.prototype.lg;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Ri;Z.prototype.allowCast=Z.prototype.Kh;Z.registerSeekBar=function(a){xC=a};Z.registerElement=fC;Z.prototype.destroy=Z.prototype.destroy;var gC=new Map,xC=new ZB;function EC(a,b){tB.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.h;this.i=[];this.g=el();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=U("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
1441
- this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);FC(this);this.eventManager.o(this.localization,"locale-updated",function(){GC(c)});this.eventManager.o(this.localization,"locale-changed",function(){GC(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&yB(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){yB(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){yB(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.qh(Date.now());
1442
- d.stopPropagation()});this.eventManager.o(this.g,"click",function(){HC(c)});GC(this);this.ad&&this.ad.isLinear()&&yB(this.g,!1)}pa(EC,tB);EC.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=[];tB.prototype.release.call(this)};function IC(a,b){JC.set(a,b)}
1443
- function FC(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,JC.get(c)?(c=JC.get(c),a.i.push(c.create(a.h,a.controls))):Ra("Unrecognized overflow menu element requested:",c)}function HC(a){if(a.controls.nd())a.controls.uc();else{yB(a.h,!0);$B(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};cb(a.h.childNodes,b)&&db(a.h.childNodes,b)[0].focus()}}function GC(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1444
- L("shaka.ui.OverflowMenu",EC);EC.registerElement=IC;function KC(){}KC.prototype.create=function(a,b){return new EC(a,b)};fC("overflow_menu",new KC);var JC=new Map;function LC(a,b){tB.call(this,a,b);var c=this;this.g=el();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=U("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=U("span");a.appendChild(this.j);
1445
- this.i=U("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);MC(this);NC(this);this.eventManager.o(this.localization,"locale-updated",function(){MC(c)});this.eventManager.o(this.localization,"locale-changed",function(){MC(c)});this.eventManager.o(this.g,"click",function(){c.controls.bc().webkitShowPlaybackTargetPicker()});a=this.controls.bc();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
1446
- c.player.ie()==ln;yB(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){NC(c)})}pa(LC,tB);function NC(a){var b=a.controls.bc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function MC(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}L("shaka.ui.AirPlayButton",LC);function OC(){}OC.prototype.create=function(a,b){return new LC(a,b)};IC("airplay",new OC);
1447
- fC("airplay",new OC);function PC(a,b,c){this.i=a;this.j=b;this.h=QC(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Nf()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,this.h);this.configure({});c.controls||a.rg(b);b.ui=this;c.ui=this}p=PC.prototype;p.destroy=function(){var a=this;return K(function(b){if(1==b.g)return a.g?D(b,a.g.destroy(),2):b.F(2);if(4!=b.g)return a.g=null,a.i?D(b,a.i.destroy(),4):b.F(4);a.i=null;F(b)})};
1448
- p.Nf=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Pd()&&1<navigator.maxTouchPoints};p.getConfiguration=function(){var a=QC(this);Pl(a,this.h,QC(this),{},"");return a};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ql(a,b));Pl(this.h,a,QC(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new O("uiupdated"))};p.Zh=function(){return this.g};
1440
+ Z.prototype.setSeeking=Z.prototype.qg;Z.prototype.isSeeking=Z.prototype.Oi;Z.prototype.getConfig=Z.prototype.Yh;Z.prototype.getClientSideAdContainer=Z.prototype.Xh;Z.prototype.getServerSideAdContainer=Z.prototype.ti;Z.prototype.getControlsContainer=Z.prototype.$h;Z.prototype.getLocalPlayer=Z.prototype.gi;Z.prototype.getPlayer=Z.prototype.Mc;Z.prototype.getLocalVideo=Z.prototype.ii;Z.prototype.getVideo=Z.prototype.cc;Z.prototype.getVideoContainer=Z.prototype.Di;Z.prototype.getLocalization=Z.prototype.ji;
1441
+ Z.prototype.getCastProxy=Z.prototype.Vh;Z.prototype.getAd=Z.prototype.getAd;Z.prototype.setEnabledNativeControls=Z.prototype.ph;Z.prototype.setEnabledShakaControls=Z.prototype.lg;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Ri;Z.prototype.allowCast=Z.prototype.Kh;Z.registerSeekBar=function(a){wC=a};Z.registerElement=eC;Z.prototype.destroy=Z.prototype.destroy;var fC=new Map,wC=new YB;function DC(a,b){sB.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.h;this.i=[];this.g=el();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=U("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
1442
+ this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);EC(this);this.eventManager.o(this.localization,"locale-updated",function(){FC(c)});this.eventManager.o(this.localization,"locale-changed",function(){FC(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&xB(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){xB(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){xB(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.qh(Date.now());
1443
+ d.stopPropagation()});this.eventManager.o(this.g,"click",function(){GC(c)});FC(this);this.ad&&this.ad.isLinear()&&xB(this.g,!1)}pa(DC,sB);DC.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=[];sB.prototype.release.call(this)};function HC(a,b){IC.set(a,b)}
1444
+ function EC(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,IC.get(c)?(c=IC.get(c),a.i.push(c.create(a.h,a.controls))):Ra("Unrecognized overflow menu element requested:",c)}function GC(a){if(a.controls.nd())a.controls.uc();else{xB(a.h,!0);ZB(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};cb(a.h.childNodes,b)&&db(a.h.childNodes,b)[0].focus()}}function FC(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1445
+ L("shaka.ui.OverflowMenu",DC);DC.registerElement=HC;function JC(){}JC.prototype.create=function(a,b){return new DC(a,b)};eC("overflow_menu",new JC);var IC=new Map;function KC(a,b){sB.call(this,a,b);var c=this;this.g=el();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=U("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=U("span");a.appendChild(this.j);
1446
+ this.i=U("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);LC(this);MC(this);this.eventManager.o(this.localization,"locale-updated",function(){LC(c)});this.eventManager.o(this.localization,"locale-changed",function(){LC(c)});this.eventManager.o(this.g,"click",function(){c.controls.cc().webkitShowPlaybackTargetPicker()});a=this.controls.cc();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
1447
+ c.player.ie()==ln;xB(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){MC(c)})}pa(KC,sB);function MC(a){var b=a.controls.cc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function LC(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}L("shaka.ui.AirPlayButton",KC);function NC(){}NC.prototype.create=function(a,b){return new KC(a,b)};HC("airplay",new NC);
1448
+ eC("airplay",new NC);function OC(a,b,c){this.i=a;this.j=b;this.h=PC(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Nf()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,this.h);this.configure({});c.controls||a.rg(b);b.ui=this;c.ui=this}p=OC.prototype;p.destroy=function(){var a=this;return K(function(b){if(1==b.g)return a.g?D(b,a.g.destroy(),2):b.F(2);if(4!=b.g)return a.g=null,a.i?D(b,a.i.destroy(),4):b.F(4);a.i=null;F(b)})};
1449
+ p.Nf=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Pd()&&1<navigator.maxTouchPoints};p.getConfiguration=function(){var a=PC(this);Pl(a,this.h,PC(this),{},"");return a};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Ql(a,b));Pl(this.h,a,PC(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new O("uiupdated"))};p.Zh=function(){return this.g};
1449
1450
  p.tj=function(a){this.g.lg(a)};
1450
- function QC(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
1451
+ function PC(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
1451
1452
  "picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},
1452
- trackLabelFormat:RC,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5,keyboardLargeSeekDistance:60,fullScreenElement:a.j,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0,seekOnTaps:!0,tapSeekDistance:10};"remote"in HTMLMediaElement.prototype?b.overflowMenuButtons.push("remote"):window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");
1453
+ trackLabelFormat:QC,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5,keyboardLargeSeekDistance:60,fullScreenElement:a.j,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0,seekOnTaps:!0,tapSeekDistance:10};"remote"in HTMLMediaElement.prototype?b.overflowMenuButtons.push("remote"):window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");
1453
1454
  a.Nf()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1454
- function SC(){var a,b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A;return K(function(C){switch(C.g){case 1:zx();if(!tm())return TC("shaka-ui-load-failed",UC),C.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");if(!b.length&&!a.length){C.F(2);break}if(b.length&&!a.length){d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,!f.ui){g=document.createElement("div");h=f.parentElement;
1455
- h.replaceChild(g,f);g.appendChild(f);k=null;l=t(c);for(m=l.next();!m.done;m=l.next())if(n=m.value,n.parentElement==g){k=n;break}k||(k=document.createElement("canvas"),k.classList.add("shaka-canvas-container"),g.appendChild(k));VC(g,f,k)}C.F(2);break}r=t(a);q=r.next();case 4:if(q.done){C.F(2);break}u=q.value;if(u.ui){C.F(5);break}v=null;x=t(b);for(e=x.next();!e.done;e=x.next())if(z=e.value,z.parentElement==u){v=z;break}v||(v=document.createElement("video"),v.setAttribute("playsinline",""),u.appendChild(v));
1456
- y=null;B=t(c);for(m=B.next();!m.done;m=B.next())if(A=m.value,A.parentElement==u){y=A;break}y||(y=document.createElement("canvas"),y.classList.add("shaka-canvas-container"),u.appendChild(y));ta(C,7);return D(C,VC(u,v,y),9);case 9:va(C,5);break;case 7:return wa(C),TC("shaka-ui-load-failed",WC),C.return();case 5:q=r.next();C.F(4);break;case 2:TC("shaka-ui-loaded"),F(C)}})}function TC(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
1457
- function VC(a,b,c){var d,e,f,g,h,k,l,m,n;return K(function(r){switch(r.g){case 1:d=new V;e=new PC(d,a,b);d.Eg(c);f="";g=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(f=a.dataset.shakaPlayerCastReceiverId,g="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(f=b.dataset.shakaPlayerCastReceiverId,g="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);f.length&&e.configure({castReceiverAppId:f,castAndroidReceiverCompatible:g});b.controls&&
1458
- e.g.ph(!0);if(h=b.getAttribute("src"))k=document.createElement("source"),k.setAttribute("src",h),b.appendChild(k),b.removeAttribute("src");l=t(b.querySelectorAll("source"));m=l.next();case 2:if(m.done){r.F(4);break}n=m.value;ta(r,5);return D(r,e.g.Mc().load(n.getAttribute("src")),7);case 7:r.F(4);break;case 5:wa(r);case 3:m=l.next();r.F(2);break;case 4:return D(r,d.Gc(b),0)}})}L("shaka.ui.Overlay",PC);PC.prototype.setEnabled=PC.prototype.tj;PC.prototype.getControls=PC.prototype.Zh;
1459
- PC.prototype.configure=PC.prototype.configure;PC.prototype.getConfiguration=PC.prototype.getConfiguration;PC.prototype.isMobile=PC.prototype.Nf;PC.prototype.destroy=PC.prototype.destroy;var RC=0;PC.TrackLabelFormat={LANGUAGE:RC,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var UC=0,WC=1;PC.FailReasonCode={NO_BROWSER_SUPPORT:UC,PLAYER_FAILED_TO_LOAD:WC};"complete"==document.readyState?K(function(a){if(1==a.g)return D(a,Promise.resolve(),2);SC();F(a)}):window.addEventListener("load",SC);function XC(a,b,c,d,e,f,g,h){function k(I){var G="";5<=I&&(G=" "+f.resolve("SURROUND"));return G}function l(I,G,H,J){I=[I,G];h&&null!=J&&I.push(J);H&&3==g&&I.push(H);return I.join(": ")}function m(I){return"variant"==I.type?I.audioRoles?I.audioRoles.join(", "):void 0:I.roles.join(", ")}var n=a.find(function(I){return 1==I.active}),r=uB(b);fl(b);b.appendChild(r);r=new Map;for(var q=t(a),u=q.next();!u.done;u=q.next())u=u.value,r.has(u.language)||r.set(u.language,new Set),r.get(u.language).add(m(u));
1460
- r=new Set;n=n?l(n.language,m(n),n.label,n.channelsCount):"";q={};a=t(a);for(u=a.next();!u.done;q={vb:q.vb},u=a.next()){q.vb=u.value;u=q.vb.language;var v=q.vb.forced,x=f.resolve("SUBTITLE_FORCED"),z=m(q.vb),y=q.vb.label,B=q.vb.channelsCount,A=l(u,z,y,B);if(!r.has(A)){r.add(A);var C=el();C.addEventListener("click",function(I){return function(){c(I.vb)}}(q));var E=U("span");C.appendChild(E);E.textContent=YC(u,f);switch(g){case RC:h&&(E.textContent+=k(B));v&&(E.textContent+=" ("+x+")");break;case 1:h&&
1461
- (E.textContent+=k(B));z?E.textContent=z:(Ra("Track #"+q.vb.id+" does not have a role, but the UI is configured to only show role."),E.textContent="?");v&&(E.textContent+=" ("+x+")");break;case 2:h&&(E.textContent+=k(B));z&&(E.textContent+=": "+z);v&&(E.textContent+=" ("+x+")");break;case 3:y?E.textContent=y:(Ra("Track #"+q.vb.id+" does not have a label, but the UI is configured to only show labels."),E.textContent="?")}d&&A==n&&(C.appendChild(xB()),E.classList.add("shaka-chosen-item"),C.ariaSelected=
1462
- "true",e.textContent=E.textContent);b.appendChild(C)}}}function YC(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=Qb(a);return a in pB?pB[a].A:c in pB?pB[c].A+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function ZC(a,b,c){tB.call(this,a,b);var d=this;$C(this,c);aD(this);bD(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new O("submenuopen")),yB(d.menu,!0),wB(d.menu)):yB(d.menu,!1)})}pa(ZC,tB);
1463
- function $C(a,b){a.button=el();a.button.classList.add("shaka-overflow-button");a.icon=U("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=U("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=U("span");b.appendChild(a.nameSpan);a.currentSelection=U("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
1464
- function aD(a){a.menu=U("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=el();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.uc()});var b=U("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1465
- U("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function bD(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}yB(a.parent,!0);cb(a.parent.childNodes,b)&&db(a.parent.childNodes,b)[0].focus();$B(a.controls)}))}L("shaka.ui.SettingsMenu",ZC);function cD(a,b){ZC.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){dD(c)});this.eventManager.o(this.localization,"locale-changed",function(){dD(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.mb().length;yB(c.button,d);eD(c)});this.eventManager.o(this.player,"variantchanged",
1466
- function(){eD(c)});dD(this);eD(this)}pa(cD,ZC);
1467
- function eD(a){var b=a.player.mb();XC(b,a.menu,function(c){c.channelsCount&&a.controls.g.showAudioChannelCountVariants?a.player.Le(c.language,c.roles[0],c.channelsCount):a.player.Le(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);wB(a.menu);a.controls.dispatchEvent(new O("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText);yB(a.button,2<a.menu.getElementsByTagName("button").length)}
1468
- function dD(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")}L("shaka.ui.AudioLanguageSelection",cD);function fD(){}fD.prototype.create=function(a,b){return new cD(a,b)};IC("language",new fD);fC("language",new fD);function gD(a,b){tB.call(this,a,b);var c=this;this.h=this.controls.C;this.g=el();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=U("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=U("span");a.appendChild(this.l);this.j=U("span");this.j.classList.add("shaka-current-selection-span");
1469
- a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);hD(this);iD(this);this.eventManager.o(this.localization,"locale-updated",function(){hD(c)});this.eventManager.o(this.localization,"locale-changed",function(){hD(c)});this.eventManager.o(this.g,"click",function(){jD(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){iD(c)})}pa(gD,tB);
1470
- function jD(a){var b;K(function(c){if(1==c.g){if(a.h.Ba())return a.h.vh(),c.F(0);ta(c,3);a.g.disabled=!0;return D(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=wa(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));F(c)})}function iD(a){var b=a.h.kf()&&a.controls.ua,c=a.h.Ba();yB(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");kD(a)}
1471
- function kD(a){a.j.textContent=a.h.Ba()?a.h.Je():a.localization.resolve("OFF")}function hD(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");kD(a)}L("shaka.ui.CastButton",gD);function lD(){}lD.prototype.create=function(a,b){return new gD(a,b)};IC("cast",new lD);fC("cast",new lD);function mD(a,b){tB.call(this,a,b);var c=this;this.g=el();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);nD(this);this.h=this.controls.g.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){nD(c)});this.eventManager.o(this.localization,"locale-changed",function(){nD(c)});
1472
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Mb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Pd(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(mD,tB);function nD(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}L("shaka.ui.FastForwardButton",mD);function oD(){}oD.prototype.create=function(a,b){return new mD(a,b)};fC("fast_forward",new oD);function pD(a,b){tB.call(this,a,b);var c=this;this.h=this.controls.s;this.g=el();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");qD(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);rD(this);this.eventManager.o(this.localization,"locale-updated",function(){rD(c)});this.eventManager.o(this.localization,"locale-changed",function(){rD(c)});this.eventManager.o(this.g,"click",function(){return K(function(d){return D(d,
1473
- c.controls.Pe(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.Qc()?"fullscreen_exit":"fullscreen";rD(c)});this.eventManager.o(this.h,"loadedmetadata",function(){qD(c)});this.eventManager.o(this.h,"loadeddata",function(){qD(c)})}pa(pD,tB);function qD(a){a.controls.zd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function rD(a){a.g.ariaLabel=a.localization.resolve(a.controls.Qc()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
1474
- L("shaka.ui.FullscreenButton",pD);function sD(){}sD.prototype.create=function(a,b){return new pD(a,b)};fC("fullscreen",new sD);function tD(a,b){tB.call(this,a,b);var c=this;this.g=el();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=U("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=U("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=U("span");this.l.classList.add("shaka-current-selection-span");
1475
- a.appendChild(this.l);this.g.appendChild(a);uD(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){uD(c)});this.eventManager.o(this.localization,"locale-changed",function(){uD(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Qa();c.h.za(1)});this.m=this.video.loop;this.h=new Dd(function(){c.m!=c.video.loop&&(uD(c),c.m=c.video.loop)});this.h.za(1)}pa(tD,tB);
1476
- tD.prototype.release=function(){this.h.stop();this.h=null;tB.prototype.release.call(this)};function uD(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}L("shaka.ui.LoopButton",tD);function vD(){}vD.prototype.create=function(a,b){return new tD(a,b)};IC("loop",new vD);fC("loop",new vD);JB("loop",new vD);function wD(a,b){tB.call(this,a,b);var c=this;this.g=el();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);xD(this);yD(this);this.eventManager.o(this.localization,"locale-updated",function(){xD(c)});this.eventManager.o(this.localization,"locale-changed",function(){xD(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
1477
- this.eventManager.o(this.video,"volumechange",function(){xD(c);yD(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){xD(c);yD(c)});this.eventManager.o(this.adManager,"ad-muted",function(){xD(c);yD(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;xD(c);yD(c)})}pa(wD,tB);function xD(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1478
- function yD(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}L("shaka.ui.MuteButton",wD);function zD(){}zD.prototype.create=function(a,b){return new wD(a,b)};fC("mute",new zD);function AD(a,b){tB.call(this,a,b);var c=this;this.l=this.controls.s;this.g=el();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=U("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=U("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
1479
- U("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);BD(this);this.parent.appendChild(this.g);this.controls.qe()||yB(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){BD(c)});this.eventManager.o(this.localization,"locale-changed",function(){BD(c)});this.eventManager.o(this.g,"click",function(){c.controls.Od()});this.eventManager.o(this.l,"enterpictureinpicture",function(){CD(c)});this.eventManager.o(this.l,"leavepictureinpicture",
1480
- function(){DD(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){ED(c)});this.eventManager.o(this.player,"trackschanged",function(){ED(c)});"documentPictureInPicture"in window&&this.eventManager.o(window.documentPictureInPicture,"enter",function(d){CD(c);c.eventManager.na(d.window,"pagehide",function(){DD(c)})})}pa(AD,tB);
1481
- function CD(a){a.i.textContent="branding_watermark";a.g.ariaLabel=a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}function DD(a){a.i.textContent="picture_in_picture_alt";a.g.ariaLabel=a.localization.resolve("ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("OFF")}
1482
- function BD(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.re();a.g.ariaLabel=a.localization.resolve(b?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(b?"ON":"OFF")}function ED(a){K(function(b){if(!a.controls.qe())return yB(a.g,!1),a.controls.re()?D(b,a.controls.Od(),0):b.F(0);if(!a.player||!a.player.Pc())return yB(a.g,!0),b.F(0);yB(a.g,!1);return a.controls.re()?D(b,a.controls.Od(),0):b.F(0)})}L("shaka.ui.PipButton",AD);
1483
- function FD(){}FD.prototype.create=function(a,b){return new AD(a,b)};IC("picture_in_picture",new FD);fC("picture_in_picture",new FD);JB("picture_in_picture",new FD);function GD(a,b){ZC.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){HD(c)});this.eventManager.o(this.localization,"locale-changed",function(){HD(c)});this.eventManager.o(this.player,"loaded",function(){ID(c,c.player.Mb())});this.eventManager.o(this.player,"ratechange",function(){ID(c,
1484
- c.player.Mb())});this.g=new Map(this.controls.g.playbackRates.map(function(d){return[d+"x",d]}));HD(this);JD(this);ID(this,this.player.Mb())}pa(GD,ZC);function HD(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")}
1485
- function ID(a,b){var c=vB(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(xB()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1486
- "x")}function JD(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={cd:b.cd},d=c.next()){b.cd=d.value;d=el();var e=U("span");e.textContent=b.cd;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.cd);a.video.defaultPlaybackRate=a.g.get(f.cd)}}(b));a.menu.appendChild(d)}wB(a.menu)}L("shaka.ui.PlaybackRateSelection",GD);function KD(){}KD.prototype.create=function(a,b){return new GD(a,b)};IC("playback_rate",new KD);fC("playback_rate",new KD);function LD(a,b){tB.call(this,a,b);var c=this;this.g=el();this.g.classList.add("shaka-current-time");MD(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.R()&&(c.video.currentTime=c.player.Ha().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.W,e=c.controls.Hf(),f=c.player.Ha(),g=f.end-f.start;c.player.R()?(e=Math.max(0,Math.floor(f.end-e)),g=3600<=g,1<=e||d?(MD(c,"- "+zB(e,g)),c.g.disabled=!1):(MD(c,c.localization.resolve("LIVE")),
1487
- c.g.disabled=!0)):(d=3600<=g,e=zB(Math.max(0,e-f.start),d),g&&(e+=" / "+zB(g,d)),MD(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.R()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}pa(LD,tB);function MD(a,b){b!=a.g.textContent&&(a.g.textContent=b)}L("shaka.ui.PresentationTimeTracker",LD);function ND(){}ND.prototype.create=function(a,b){return new LD(a,b)};fC("time_and_duration",new ND);function OD(a,b){tB.call(this,a,b);var c=this;this.g=el();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=U("i");this.i.classList.add("material-icons-round");a="cast";(b=Rd())&&13<=b&&(a="airplay");this.i.textContent=a;this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=U("span");a.appendChild(this.l);this.j=U("span");this.j.classList.add("shaka-current-selection-span");
1488
- a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;PD(this);yB(this.g,!1);!this.video.remote||this.video.disableRemotePlayback?this.g.classList.add("shaka-hidden"):(this.eventManager.o(this.localization,"locale-updated",function(){PD(c)}),this.eventManager.o(this.localization,"locale-changed",function(){PD(c)}),this.eventManager.o(this.controls,"caststatuschanged",function(){QD(c)}),this.eventManager.o(this.g,"click",function(){c.video.remote.prompt()}),this.eventManager.o(this.video.remote,
1489
- "connect",function(){QD(c)}),this.eventManager.o(this.video.remote,"connecting",function(){QD(c)}),this.eventManager.o(this.video.remote,"disconnect",function(){QD(c)}),this.eventManager.o(this.player,"loaded",function(){QD(c)}),QD(this))}pa(OD,tB);OD.prototype.release=function(){this.video.remote&&-1!=this.h&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});tB.prototype.release.call(this)};
1490
- function QD(a){var b,c;K(function(d){switch(d.g){case 1:if(a.controls.C.kf()&&a.controls.ua){yB(a.g,!1);-1!=a.h&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);d.F(0);break}if("disconnected"==a.video.remote.state){b=function(e){a.player?yB(a.g,a.player.ie()==ln&&e):yB(a.g,!1)};ta(d,7);if(-1==a.h){d.F(9);break}return D(d,a.video.remote.cancelWatchAvailability(a.h),10)}if(-1==a.h){d.F(0);break}return D(d,a.video.remote.cancelWatchAvailability(a.h),6);case 6:a.h=-1;d.F(0);break;case 10:a.h=-1;
1491
- case 9:va(d,8);break;case 7:wa(d);case 8:return ta(d,11),D(d,a.video.remote.watchAvailability(b),13);case 13:c=d.h;a.h=c;va(d,0);break;case 11:wa(d),b(!0),F(d)}})}function PD(a){var b=a.localization.resolve("CAST"),c=Rd();c&&13<=c&&(b=a.localization.resolve("AIRPLAY"));a.g.ariaLabel=b;a.l.textContent=b}L("shaka.ui.RemoteButton",OD);function RD(){}RD.prototype.create=function(a,b){return new OD(a,b)};IC("remote",new RD);fC("remote",new RD);function SD(a,b){ZC.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){TD(c)});this.eventManager.o(this.localization,"locale-changed",function(){TD(c)});this.eventManager.o(this.player,"variantchanged",function(){UD(c)});this.eventManager.o(this.player,"trackschanged",function(){UD(c)});this.eventManager.o(this.player,
1492
- "abrstatuschanged",function(){UD(c)});UD(this)}pa(SD,ZC);
1493
- function UD(a){var b=[];a.player.ie()!=ln&&(b=a.player.mb());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){var m=-1;m=a.player.Pc()?b.findIndex(function(n){return n.bandwidth==k.bandwidth}):b.findIndex(function(n){return n.height==k.height&&n.frameRate==k.frameRate&&n.hdr==k.hdr&&n.videoLayout==k.videoLayout});return m==l});a.player.Pc()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):
1494
- b.sort(function(k,l){return l.height-k.height});var d=uB(a.menu);fl(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=t(b),g=f.next();!g.done;e={Hb:e.Hb},g=f.next()){e.Hb=g.value;g=el();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.Hb;a.player.configure({abr:{enabled:!1}});a.player.Me(l,a.controls.g.clearBufferOnQualityChange)}}(e));var h=U("span");h.textContent=a.player.Pc()&&e.Hb.bandwidth?Math.round(e.Hb.bandwidth/
1495
- 1E3)+" kbits/s":e.Hb.height&&e.Hb.width?VD(e.Hb):"Unknown";g.appendChild(h);d||e.Hb!=c||(g.ariaSelected="true",g.appendChild(xB()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=el();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});UD(a)});a.g=U("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected=
1496
- "true",e.appendChild(xB()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);wB(a.menu);a.controls.dispatchEvent(new O("resolutionselectionupdated"));TD(a);yB(a.button,0<b.length)}
1497
- function VD(a){var b=a.height||0,c=a.width||0,d=b;c/b>16/9&&(d=Math.round(9*c/16));b=d+"p";2160==d&&(b="4K");(d=a.frameRate)&&(50<=d||20>=d)&&(b+=Math.round(a.frameRate));if("PQ"==a.hdr||"HLG"==a.hdr)b+=" (HDR)";"CH-STEREO"==a.videoLayout&&(b+=" (3D)");return b}
1498
- function TD(a){var b=a.player.Pc()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}L("shaka.ui.ResolutionSelection",SD);function WD(){}
1499
- WD.prototype.create=function(a,b){return new SD(a,b)};IC("quality",new WD);fC("quality",new WD);function XD(a,b){tB.call(this,a,b);var c=this;this.g=el();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);YD(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){YD(c)});this.eventManager.o(this.localization,"locale-changed",function(){YD(c)});
1500
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Mb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Pd(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(XD,tB);function YD(a){a.g.ariaLabel=a.localization.resolve("REWIND")}L("shaka.ui.RewindButton",XD);function ZD(){}ZD.prototype.create=function(a,b){return new XD(a,b)};fC("rewind",new ZD);function $D(a,b){tB.call(this,a,b);var c=this;this.j=U("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=U("div");this.h.classList.add("shaka-skip-ad-counter");yB(this.h,!1);this.j.appendChild(this.h);this.g=el();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;yB(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);aE(this);this.i=new Dd(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1501
- d:(c.i.stop(),yB(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){aE(c)});this.eventManager.o(this.localization,"locale-changed",function(){aE(c)});this.eventManager.o(this.adManager,"ad-started",function(){bE(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),yB(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;yB(c.g,!1);yB(c.h,!1)});this.eventManager.o(this.g,
1502
- "click",function(){c.ad.skip()});this.ad&&bE(this)}pa($D,tB);$D.prototype.release=function(){this.i.stop();this.i=null;tB.prototype.release.call(this)};function aE(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function bE(a){a.ad.isSkippable()&&(yB(a.g,!0),yB(a.h,!0),a.h.textContent="",a.i.Qa(),a.i.za(.5))}L("shaka.ui.SkipAdButton",$D);function cE(a,b){DB.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}pa(cE,DB);cE.prototype.h=function(){this.isEnded()?this.button.textContent="replay":this.button.textContent=this.isPaused()?"play_arrow":"pause"};
1503
- cE.prototype.g=function(){if(this.isEnded())this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};L("shaka.ui.SmallPlayButton",cE);function dE(){}dE.prototype.create=function(a,b){return new cE(a,b)};fC("play_pause",new dE);function eE(a,b){tB.call(this,a,b);a=U("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}pa(eE,tB);L("shaka.ui.Spacer",eE);function fE(){}fE.prototype.create=function(a,b){return new eE(a,b)};fC("spacer",new fE);function gE(a,b){function c(k){return zB(h.h[k],!1)+" (m)"}function d(k){return Math.round(h.h[k]/1E3)+" (kbits/s)"}function e(k){return h.h[k].toFixed(2)+" (s)"}function f(k){return h.h[k]+" (frames)"}function g(k){return h.h[k]+" (px)"}tB.call(this,a,b);var h=this;this.i=el();this.i.classList.add("shaka-statistics-button");this.j=U("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=U("label");a.classList.add("shaka-overflow-button-label");
1455
+ function RC(){var a,b,c,d,e,f,g,h,k,l,m,n,r,q,u,v,x,z,y,B,A;return K(function(C){switch(C.g){case 1:zx();if(!tm())return SC("shaka-ui-load-failed",TC),C.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");if(!b.length&&!a.length){C.F(2);break}if(b.length&&!a.length){d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,!f.ui){g=document.createElement("div");h=f.parentElement;
1456
+ h.replaceChild(g,f);g.appendChild(f);k=null;l=t(c);for(m=l.next();!m.done;m=l.next())if(n=m.value,n.parentElement==g){k=n;break}k||(k=document.createElement("canvas"),k.classList.add("shaka-canvas-container"),g.appendChild(k));UC(g,f,k)}C.F(2);break}r=t(a);q=r.next();case 4:if(q.done){C.F(2);break}u=q.value;if(u.ui){C.F(5);break}v=null;x=t(b);for(e=x.next();!e.done;e=x.next())if(z=e.value,z.parentElement==u){v=z;break}v||(v=document.createElement("video"),v.setAttribute("playsinline",""),u.appendChild(v));
1457
+ y=null;B=t(c);for(m=B.next();!m.done;m=B.next())if(A=m.value,A.parentElement==u){y=A;break}y||(y=document.createElement("canvas"),y.classList.add("shaka-canvas-container"),u.appendChild(y));ta(C,7);return D(C,UC(u,v,y),9);case 9:va(C,5);break;case 7:return wa(C),SC("shaka-ui-load-failed",VC),C.return();case 5:q=r.next();C.F(4);break;case 2:SC("shaka-ui-loaded"),F(C)}})}function SC(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
1458
+ function UC(a,b,c){var d,e,f,g,h,k,l,m,n;return K(function(r){switch(r.g){case 1:d=new V;e=new OC(d,a,b);d.Eg(c);f="";g=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(f=a.dataset.shakaPlayerCastReceiverId,g="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(f=b.dataset.shakaPlayerCastReceiverId,g="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);f.length&&e.configure({castReceiverAppId:f,castAndroidReceiverCompatible:g});b.controls&&
1459
+ e.g.ph(!0);if(h=b.getAttribute("src"))k=document.createElement("source"),k.setAttribute("src",h),b.appendChild(k),b.removeAttribute("src");l=t(b.querySelectorAll("source"));m=l.next();case 2:if(m.done){r.F(4);break}n=m.value;ta(r,5);return D(r,e.g.Mc().load(n.getAttribute("src")),7);case 7:r.F(4);break;case 5:wa(r);case 3:m=l.next();r.F(2);break;case 4:return D(r,d.Gc(b),0)}})}L("shaka.ui.Overlay",OC);OC.prototype.setEnabled=OC.prototype.tj;OC.prototype.getControls=OC.prototype.Zh;
1460
+ OC.prototype.configure=OC.prototype.configure;OC.prototype.getConfiguration=OC.prototype.getConfiguration;OC.prototype.isMobile=OC.prototype.Nf;OC.prototype.destroy=OC.prototype.destroy;var QC=0;OC.TrackLabelFormat={LANGUAGE:QC,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var TC=0,VC=1;OC.FailReasonCode={NO_BROWSER_SUPPORT:TC,PLAYER_FAILED_TO_LOAD:VC};"complete"==document.readyState?K(function(a){if(1==a.g)return D(a,Promise.resolve(),2);RC();F(a)}):window.addEventListener("load",RC);function WC(a,b,c,d,e,f,g,h){function k(I){var G="";5<=I&&(G=" "+f.resolve("SURROUND"));return G}function l(I,G,H,J){I=[I,G];h&&null!=J&&I.push(J);H&&3==g&&I.push(H);return I.join(": ")}function m(I){return"variant"==I.type?I.audioRoles?I.audioRoles.join(", "):void 0:I.roles.join(", ")}var n=a.find(function(I){return 1==I.active}),r=tB(b);fl(b);b.appendChild(r);r=new Map;for(var q=t(a),u=q.next();!u.done;u=q.next())u=u.value,r.has(u.language)||r.set(u.language,new Set),r.get(u.language).add(m(u));
1461
+ r=new Set;n=n?l(n.language,m(n),n.label,n.channelsCount):"";q={};a=t(a);for(u=a.next();!u.done;q={vb:q.vb},u=a.next()){q.vb=u.value;u=q.vb.language;var v=q.vb.forced,x=f.resolve("SUBTITLE_FORCED"),z=m(q.vb),y=q.vb.label,B=q.vb.channelsCount,A=l(u,z,y,B);if(!r.has(A)){r.add(A);var C=el();C.addEventListener("click",function(I){return function(){c(I.vb)}}(q));var E=U("span");C.appendChild(E);E.textContent=XC(u,f);switch(g){case QC:h&&(E.textContent+=k(B));v&&(E.textContent+=" ("+x+")");break;case 1:h&&
1462
+ (E.textContent+=k(B));z?E.textContent=z:(Ra("Track #"+q.vb.id+" does not have a role, but the UI is configured to only show role."),E.textContent="?");v&&(E.textContent+=" ("+x+")");break;case 2:h&&(E.textContent+=k(B));z&&(E.textContent+=": "+z);v&&(E.textContent+=" ("+x+")");break;case 3:y?E.textContent=y:(Ra("Track #"+q.vb.id+" does not have a label, but the UI is configured to only show labels."),E.textContent="?")}d&&A==n&&(C.appendChild(wB()),E.classList.add("shaka-chosen-item"),C.ariaSelected=
1463
+ "true",e.textContent=E.textContent);b.appendChild(C)}}}function XC(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=Qb(a);return a in oB?oB[a].A:c in oB?oB[c].A+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function YC(a,b,c){sB.call(this,a,b);var d=this;ZC(this,c);$C(this);aD(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new O("submenuopen")),xB(d.menu,!0),vB(d.menu)):xB(d.menu,!1)})}pa(YC,sB);
1464
+ function ZC(a,b){a.button=el();a.button.classList.add("shaka-overflow-button");a.icon=U("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=U("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=U("span");b.appendChild(a.nameSpan);a.currentSelection=U("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
1465
+ function $C(a){a.menu=U("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=el();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.uc()});var b=U("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1466
+ U("span");a.backButton.appendChild(a.backSpan);a.controls.h.appendChild(a.menu)}function aD(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}xB(a.parent,!0);cb(a.parent.childNodes,b)&&db(a.parent.childNodes,b)[0].focus();ZB(a.controls)}))}L("shaka.ui.SettingsMenu",YC);function bD(a,b){YC.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){cD(c)});this.eventManager.o(this.localization,"locale-changed",function(){cD(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.mb().length;xB(c.button,d);dD(c)});this.eventManager.o(this.player,"variantchanged",
1467
+ function(){dD(c)});cD(this);dD(this)}pa(bD,YC);
1468
+ function dD(a){var b=a.player.mb();WC(b,a.menu,function(c){c.channelsCount&&a.controls.g.showAudioChannelCountVariants?a.player.Le(c.language,c.roles[0],c.channelsCount):a.player.Le(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);vB(a.menu);a.controls.dispatchEvent(new O("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText);xB(a.button,2<a.menu.getElementsByTagName("button").length)}
1469
+ function cD(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")}L("shaka.ui.AudioLanguageSelection",bD);function eD(){}eD.prototype.create=function(a,b){return new bD(a,b)};HC("language",new eD);eC("language",new eD);function fD(a,b){sB.call(this,a,b);var c=this;this.h=this.controls.C;this.g=el();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=U("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=U("span");a.appendChild(this.l);this.j=U("span");this.j.classList.add("shaka-current-selection-span");
1470
+ a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);gD(this);hD(this);this.eventManager.o(this.localization,"locale-updated",function(){gD(c)});this.eventManager.o(this.localization,"locale-changed",function(){gD(c)});this.eventManager.o(this.g,"click",function(){iD(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){hD(c)})}pa(fD,sB);
1471
+ function iD(a){var b;K(function(c){if(1==c.g){if(a.h.Ba())return a.h.vh(),c.F(0);ta(c,3);a.g.disabled=!0;return D(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=wa(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));F(c)})}function hD(a){var b=a.h.kf()&&a.controls.ua,c=a.h.Ba();xB(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");jD(a)}
1472
+ function jD(a){a.j.textContent=a.h.Ba()?a.h.Je():a.localization.resolve("OFF")}function gD(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");jD(a)}L("shaka.ui.CastButton",fD);function kD(){}kD.prototype.create=function(a,b){return new fD(a,b)};HC("cast",new kD);eC("cast",new kD);function lD(a,b){sB.call(this,a,b);var c=this;this.g=el();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);mD(this);this.h=this.controls.g.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){mD(c)});this.eventManager.o(this.localization,"locale-changed",function(){mD(c)});
1473
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Nb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Pd(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(lD,sB);function mD(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}L("shaka.ui.FastForwardButton",lD);function nD(){}nD.prototype.create=function(a,b){return new lD(a,b)};eC("fast_forward",new nD);function oD(a,b){sB.call(this,a,b);var c=this;this.h=this.controls.s;this.g=el();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");pD(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);qD(this);this.eventManager.o(this.localization,"locale-updated",function(){qD(c)});this.eventManager.o(this.localization,"locale-changed",function(){qD(c)});this.eventManager.o(this.g,"click",function(){return K(function(d){return D(d,
1474
+ c.controls.Pe(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.Qc()?"fullscreen_exit":"fullscreen";qD(c)});this.eventManager.o(this.h,"loadedmetadata",function(){pD(c)});this.eventManager.o(this.h,"loadeddata",function(){pD(c)})}pa(oD,sB);function pD(a){a.controls.zd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function qD(a){a.g.ariaLabel=a.localization.resolve(a.controls.Qc()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
1475
+ L("shaka.ui.FullscreenButton",oD);function rD(){}rD.prototype.create=function(a,b){return new oD(a,b)};eC("fullscreen",new rD);function sD(a,b){sB.call(this,a,b);var c=this;this.g=el();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=U("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=U("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=U("span");this.l.classList.add("shaka-current-selection-span");
1476
+ a.appendChild(this.l);this.g.appendChild(a);tD(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){tD(c)});this.eventManager.o(this.localization,"locale-changed",function(){tD(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Qa();c.h.za(1)});this.m=this.video.loop;this.h=new Dd(function(){c.m!=c.video.loop&&(tD(c),c.m=c.video.loop)});this.h.za(1)}pa(sD,sB);
1477
+ sD.prototype.release=function(){this.h.stop();this.h=null;sB.prototype.release.call(this)};function tD(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}L("shaka.ui.LoopButton",sD);function uD(){}uD.prototype.create=function(a,b){return new sD(a,b)};HC("loop",new uD);eC("loop",new uD);IB("loop",new uD);function vD(a,b){sB.call(this,a,b);var c=this;this.g=el();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);wD(this);xD(this);this.eventManager.o(this.localization,"locale-updated",function(){wD(c)});this.eventManager.o(this.localization,"locale-changed",function(){wD(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
1478
+ this.eventManager.o(this.video,"volumechange",function(){wD(c);xD(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){wD(c);xD(c)});this.eventManager.o(this.adManager,"ad-muted",function(){wD(c);xD(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;wD(c);xD(c)})}pa(vD,sB);function wD(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1479
+ function xD(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}L("shaka.ui.MuteButton",vD);function yD(){}yD.prototype.create=function(a,b){return new vD(a,b)};eC("mute",new yD);function zD(a,b){sB.call(this,a,b);var c=this;this.l=this.controls.s;this.g=el();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=U("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=U("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
1480
+ U("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);AD(this);this.parent.appendChild(this.g);this.controls.qe()||xB(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){AD(c)});this.eventManager.o(this.localization,"locale-changed",function(){AD(c)});this.eventManager.o(this.g,"click",function(){c.controls.Od()});this.eventManager.o(this.l,"enterpictureinpicture",function(){BD(c)});this.eventManager.o(this.l,"leavepictureinpicture",
1481
+ function(){CD(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){DD(c)});this.eventManager.o(this.player,"trackschanged",function(){DD(c)});"documentPictureInPicture"in window&&this.eventManager.o(window.documentPictureInPicture,"enter",function(d){BD(c);c.eventManager.na(d.window,"pagehide",function(){CD(c)})})}pa(zD,sB);
1482
+ function BD(a){a.i.textContent="branding_watermark";a.g.ariaLabel=a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}function CD(a){a.i.textContent="picture_in_picture_alt";a.g.ariaLabel=a.localization.resolve("ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("OFF")}
1483
+ function AD(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.re();a.g.ariaLabel=a.localization.resolve(b?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(b?"ON":"OFF")}function DD(a){K(function(b){if(!a.controls.qe())return xB(a.g,!1),a.controls.re()?D(b,a.controls.Od(),0):b.F(0);if(!a.player||!a.player.Pc())return xB(a.g,!0),b.F(0);xB(a.g,!1);return a.controls.re()?D(b,a.controls.Od(),0):b.F(0)})}L("shaka.ui.PipButton",zD);
1484
+ function ED(){}ED.prototype.create=function(a,b){return new zD(a,b)};HC("picture_in_picture",new ED);eC("picture_in_picture",new ED);IB("picture_in_picture",new ED);function FD(a,b){YC.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){GD(c)});this.eventManager.o(this.localization,"locale-changed",function(){GD(c)});this.eventManager.o(this.player,"loaded",function(){HD(c,c.player.Nb())});this.eventManager.o(this.player,"ratechange",function(){HD(c,
1485
+ c.player.Nb())});this.g=new Map(this.controls.g.playbackRates.map(function(d){return[d+"x",d]}));GD(this);ID(this);HD(this,this.player.Nb())}pa(FD,YC);function GD(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")}
1486
+ function HD(a,b){var c=uB(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(wB()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1487
+ "x")}function ID(a){for(var b={},c=t(a.g.keys()),d=c.next();!d.done;b={cd:b.cd},d=c.next()){b.cd=d.value;d=el();var e=U("span");e.textContent=b.cd;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.cd);a.video.defaultPlaybackRate=a.g.get(f.cd)}}(b));a.menu.appendChild(d)}vB(a.menu)}L("shaka.ui.PlaybackRateSelection",FD);function JD(){}JD.prototype.create=function(a,b){return new FD(a,b)};HC("playback_rate",new JD);eC("playback_rate",new JD);function KD(a,b){sB.call(this,a,b);var c=this;this.g=el();this.g.classList.add("shaka-current-time");LD(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.R()&&(c.video.currentTime=c.player.Ha().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.W,e=c.controls.Hf(),f=c.player.Ha(),g=f.end-f.start;c.player.R()?(e=Math.max(0,Math.floor(f.end-e)),g=3600<=g,1<=e||d?(LD(c,"- "+yB(e,g)),c.g.disabled=!1):(LD(c,c.localization.resolve("LIVE")),
1488
+ c.g.disabled=!0)):(d=3600<=g,e=yB(Math.max(0,e-f.start),d),g&&(e+=" / "+yB(g,d)),LD(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.R()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}pa(KD,sB);function LD(a,b){b!=a.g.textContent&&(a.g.textContent=b)}L("shaka.ui.PresentationTimeTracker",KD);function MD(){}MD.prototype.create=function(a,b){return new KD(a,b)};eC("time_and_duration",new MD);function ND(a,b){sB.call(this,a,b);var c=this;this.g=el();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=U("i");this.i.classList.add("material-icons-round");a="cast";(b=Rd())&&13<=b&&(a="airplay");this.i.textContent=a;this.g.appendChild(this.i);a=U("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=U("span");a.appendChild(this.l);this.j=U("span");this.j.classList.add("shaka-current-selection-span");
1489
+ a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;OD(this);xB(this.g,!1);!this.video.remote||this.video.disableRemotePlayback?this.g.classList.add("shaka-hidden"):(this.eventManager.o(this.localization,"locale-updated",function(){OD(c)}),this.eventManager.o(this.localization,"locale-changed",function(){OD(c)}),this.eventManager.o(this.controls,"caststatuschanged",function(){PD(c)}),this.eventManager.o(this.g,"click",function(){c.video.remote.prompt()}),this.eventManager.o(this.video.remote,
1490
+ "connect",function(){PD(c)}),this.eventManager.o(this.video.remote,"connecting",function(){PD(c)}),this.eventManager.o(this.video.remote,"disconnect",function(){PD(c)}),this.eventManager.o(this.player,"loaded",function(){PD(c)}),PD(this))}pa(ND,sB);ND.prototype.release=function(){this.video.remote&&-1!=this.h&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});sB.prototype.release.call(this)};
1491
+ function PD(a){var b,c;K(function(d){switch(d.g){case 1:if(a.controls.C.kf()&&a.controls.ua){xB(a.g,!1);-1!=a.h&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);d.F(0);break}if("disconnected"==a.video.remote.state){b=function(e){a.player?xB(a.g,a.player.ie()==ln&&e):xB(a.g,!1)};ta(d,7);if(-1==a.h){d.F(9);break}return D(d,a.video.remote.cancelWatchAvailability(a.h),10)}if(-1==a.h){d.F(0);break}return D(d,a.video.remote.cancelWatchAvailability(a.h),6);case 6:a.h=-1;d.F(0);break;case 10:a.h=-1;
1492
+ case 9:va(d,8);break;case 7:wa(d);case 8:return ta(d,11),D(d,a.video.remote.watchAvailability(b),13);case 13:c=d.h;a.h=c;va(d,0);break;case 11:wa(d),b(!0),F(d)}})}function OD(a){var b=a.localization.resolve("CAST"),c=Rd();c&&13<=c&&(b=a.localization.resolve("AIRPLAY"));a.g.ariaLabel=b;a.l.textContent=b}L("shaka.ui.RemoteButton",ND);function QD(){}QD.prototype.create=function(a,b){return new ND(a,b)};HC("remote",new QD);eC("remote",new QD);function RD(a,b){YC.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){SD(c)});this.eventManager.o(this.localization,"locale-changed",function(){SD(c)});this.eventManager.o(this.player,"variantchanged",function(){TD(c)});this.eventManager.o(this.player,"trackschanged",function(){TD(c)});this.eventManager.o(this.player,
1493
+ "abrstatuschanged",function(){TD(c)});TD(this)}pa(RD,YC);
1494
+ function TD(a){var b=[];a.player.ie()!=ln&&(b=a.player.mb());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){var m=-1;m=a.player.Pc()?b.findIndex(function(n){return n.bandwidth==k.bandwidth}):b.findIndex(function(n){return n.height==k.height&&n.frameRate==k.frameRate&&n.hdr==k.hdr&&n.videoLayout==k.videoLayout});return m==l});a.player.Pc()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):
1495
+ b.sort(function(k,l){return l.height-k.height});var d=tB(a.menu);fl(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=t(b),g=f.next();!g.done;e={Hb:e.Hb},g=f.next()){e.Hb=g.value;g=el();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.Hb;a.player.configure({abr:{enabled:!1}});a.player.Me(l,a.controls.g.clearBufferOnQualityChange)}}(e));var h=U("span");h.textContent=a.player.Pc()&&e.Hb.bandwidth?Math.round(e.Hb.bandwidth/
1496
+ 1E3)+" kbits/s":e.Hb.height&&e.Hb.width?UD(e.Hb):"Unknown";g.appendChild(h);d||e.Hb!=c||(g.ariaSelected="true",g.appendChild(wB()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=el();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});TD(a)});a.g=U("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected=
1497
+ "true",e.appendChild(wB()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",a.currentSelection.textContent);a.menu.appendChild(e);vB(a.menu);a.controls.dispatchEvent(new O("resolutionselectionupdated"));SD(a);xB(a.button,0<b.length)}
1498
+ function UD(a){var b=a.height||0,c=a.width||0,d=b;c/b>16/9&&(d=Math.round(9*c/16));b=d+"p";2160==d&&(b="4K");(d=a.frameRate)&&(50<=d||20>=d)&&(b+=Math.round(a.frameRate));if("PQ"==a.hdr||"HLG"==a.hdr)b+=" (HDR)";"CH-STEREO"==a.videoLayout&&(b+=" (3D)");return b}
1499
+ function SD(a){var b=a.player.Pc()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}L("shaka.ui.ResolutionSelection",RD);function VD(){}
1500
+ VD.prototype.create=function(a,b){return new RD(a,b)};HC("quality",new VD);eC("quality",new VD);function WD(a,b){sB.call(this,a,b);var c=this;this.g=el();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);XD(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){XD(c)});this.eventManager.o(this.localization,"locale-changed",function(){XD(c)});
1501
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Nb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Pd(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(WD,sB);function XD(a){a.g.ariaLabel=a.localization.resolve("REWIND")}L("shaka.ui.RewindButton",WD);function YD(){}YD.prototype.create=function(a,b){return new WD(a,b)};eC("rewind",new YD);function ZD(a,b){sB.call(this,a,b);var c=this;this.j=U("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=U("div");this.h.classList.add("shaka-skip-ad-counter");xB(this.h,!1);this.j.appendChild(this.h);this.g=el();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;xB(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);$D(this);this.i=new Dd(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1502
+ d:(c.i.stop(),xB(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){$D(c)});this.eventManager.o(this.localization,"locale-changed",function(){$D(c)});this.eventManager.o(this.adManager,"ad-started",function(){aE(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),xB(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;xB(c.g,!1);xB(c.h,!1)});this.eventManager.o(this.g,
1503
+ "click",function(){c.ad.skip()});this.ad&&aE(this)}pa(ZD,sB);ZD.prototype.release=function(){this.i.stop();this.i=null;sB.prototype.release.call(this)};function $D(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function aE(a){a.ad.isSkippable()&&(xB(a.g,!0),xB(a.h,!0),a.h.textContent="",a.i.Qa(),a.i.za(.5))}L("shaka.ui.SkipAdButton",ZD);function bE(a,b){CB.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}pa(bE,CB);bE.prototype.h=function(){this.isEnded()?this.button.textContent="replay":this.button.textContent=this.isPaused()?"play_arrow":"pause"};
1504
+ bE.prototype.g=function(){if(this.isEnded())this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};L("shaka.ui.SmallPlayButton",bE);function cE(){}cE.prototype.create=function(a,b){return new bE(a,b)};eC("play_pause",new cE);function dE(a,b){sB.call(this,a,b);a=U("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}pa(dE,sB);L("shaka.ui.Spacer",dE);function eE(){}eE.prototype.create=function(a,b){return new dE(a,b)};eC("spacer",new eE);function fE(a,b){function c(k){return yB(h.h[k],!1)+" (m)"}function d(k){return Math.round(h.h[k]/1E3)+" (kbits/s)"}function e(k){return h.h[k].toFixed(2)+" (s)"}function f(k){return h.h[k]+" (frames)"}function g(k){return h.h[k]+" (px)"}sB.call(this,a,b);var h=this;this.i=el();this.i.classList.add("shaka-statistics-button");this.j=U("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=U("label");a.classList.add("shaka-overflow-button-label");
1504
1505
  this.s=U("span");a.appendChild(this.s);this.m=U("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.i.appendChild(a);this.parent.appendChild(this.i);this.g=U("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-statistics-container");this.g.classList.add("shaka-hidden");this.controls.h.appendChild(this.g);this.D=[];this.G=["stateHistory","switchHistory"];this.h=this.player.getStats();
1505
1506
  this.u={};this.C={width:g,height:g,completionPercent:function(k){return h.h[k]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f,stallsDetected:function(k){return h.h[k]+" (stalls)"},gapsJumped:function(k){return h.h[k]+" (gaps)"}};this.l=new Dd(function(){h.h=h.player.getStats();for(var k=t(h.D),l=k.next();!l.done;l=
1506
- k.next())l=l.value,h.u[l].textContent=h.C[l](l)});hE(this);iE(this);this.eventManager.o(this.localization,"locale-updated",function(){hE(h)});this.eventManager.o(this.localization,"locale-changed",function(){hE(h)});this.eventManager.o(this.i,"click",function(){yB(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.za(.1),yB(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),yB(h.g,!1));hE(h)})}pa(gE,tB);
1507
- function hE(a){a.s.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
1508
- function iE(a){for(var b=t(a.controls.g.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=U("div"),h=U("label");h.textContent=c+":";g.appendChild(h);h=U("span");h.textContent=f.C[c](c);g.appendChild(h);f.u[c]=h;e.call(d,g);a.D.push(c)}else Ra("Unrecognized statistic element:",c)}gE.prototype.release=function(){this.l.stop();this.l=null;tB.prototype.release.call(this)};L("shaka.ui.StatisticsButton",gE);function jE(){}
1509
- jE.prototype.create=function(a,b){return new gE(a,b)};IC("statistics",new jE);JB("statistics",new jE);function kE(a,b){ZC.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.xc()?this.button.ariaPressed="true":this.button.ariaPressed="false";lE(this);this.eventManager.o(this.localization,"locale-updated",function(){mE(c);nE(c)});this.eventManager.o(this.localization,"locale-changed",function(){mE(c);nE(c)});this.eventManager.o(this.player,
1510
- "texttrackvisibility",function(){oE(c);nE(c)});this.eventManager.o(this.player,"textchanged",function(){nE(c)});this.eventManager.o(this.player,"trackschanged",function(){pE(c)});oE(this);mE(this);nE(this);pE(this)}pa(kE,ZC);function lE(a){var b=el();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(xB());a.g=U("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1511
- function oE(a){a.player.xc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new O("captionselectionupdated"))}
1512
- function nE(a){var b=a.player.ac();XC(b,a.menu,function(c){return qE(a,c)},a.player.xc(),a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);b=el();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Oe(!1);nE(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.xc()||(b.ariaSelected="true",b.appendChild(xB()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
1513
- a.button.setAttribute("shaka-status",a.currentSelection.textContent);wB(a.menu);a.controls.dispatchEvent(new O("captionselectionupdated"))}function qE(a,b){return K(function(c){a.player.jg(b);return D(c,a.player.Oe(!0),0)})}
1514
- function mE(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 pE(a){var b=0<a.player.ac().length;yB(a.button,b);nE(a)}L("shaka.ui.TextSelection",kE);function rE(){}rE.prototype.create=function(a,b){return new kE(a,b)};IC("captions",new rE);fC("captions",new rE);function sE(a,b){OB.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.setRange(0,100);this.eventManager.o(this.video,"volumechange",function(){return tE(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return uE(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return uE(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return tE(c)});this.eventManager.o(this.localization,"locale-updated",function(){return vE(c)});
1515
- this.eventManager.o(this.localization,"locale-changed",function(){return vE(c)});tE(this);vE(this);if(this.ad)this.onChange()}pa(sE,OB);sE.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()/100):(this.video.volume=this.getValue()/100,this.video.muted=0==this.video.volume?!0:!1)};function tE(a){a.video.muted?a.setValue(0):a.setValue(100*a.video.volume);wE(a)}function uE(a){var b=a.ad.getVolume();a.setValue(100*b);wE(a)}
1516
- function wE(a){var b=a.g.volumeBarColors,c=["to right"];c.push(b.level+a.getValue()+"%");c.push(b.base+a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function vE(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}L("shaka.ui.VolumeBar",sE);function xE(){}xE.prototype.create=function(a,b){return new sE(a,b)};fC("volume",new xE);}).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})();
1507
+ k.next())l=l.value,h.u[l].textContent=h.C[l](l)});gE(this);hE(this);this.eventManager.o(this.localization,"locale-updated",function(){gE(h)});this.eventManager.o(this.localization,"locale-changed",function(){gE(h)});this.eventManager.o(this.i,"click",function(){xB(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.za(.1),xB(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),xB(h.g,!1));gE(h)})}pa(fE,sB);
1508
+ function gE(a){a.s.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
1509
+ function hE(a){for(var b=t(a.controls.g.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=U("div"),h=U("label");h.textContent=c+":";g.appendChild(h);h=U("span");h.textContent=f.C[c](c);g.appendChild(h);f.u[c]=h;e.call(d,g);a.D.push(c)}else Ra("Unrecognized statistic element:",c)}fE.prototype.release=function(){this.l.stop();this.l=null;sB.prototype.release.call(this)};L("shaka.ui.StatisticsButton",fE);function iE(){}
1510
+ iE.prototype.create=function(a,b){return new fE(a,b)};HC("statistics",new iE);IB("statistics",new iE);function jE(a,b){YC.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.xc()?this.button.ariaPressed="true":this.button.ariaPressed="false";kE(this);this.eventManager.o(this.localization,"locale-updated",function(){lE(c);mE(c)});this.eventManager.o(this.localization,"locale-changed",function(){lE(c);mE(c)});this.eventManager.o(this.player,
1511
+ "texttrackvisibility",function(){nE(c);mE(c)});this.eventManager.o(this.player,"textchanged",function(){mE(c)});this.eventManager.o(this.player,"trackschanged",function(){oE(c)});nE(this);lE(this);mE(this);oE(this)}pa(jE,YC);function kE(a){var b=el();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(wB());a.g=U("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1512
+ function nE(a){a.player.xc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new O("captionselectionupdated"))}
1513
+ function mE(a){var b=a.player.bc();WC(b,a.menu,function(c){return pE(a,c)},a.player.xc(),a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants);b=el();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Oe(!1);mE(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.xc()||(b.ariaSelected="true",b.appendChild(wB()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));
1514
+ a.button.setAttribute("shaka-status",a.currentSelection.textContent);vB(a.menu);a.controls.dispatchEvent(new O("captionselectionupdated"))}function pE(a,b){return K(function(c){a.player.jg(b);return D(c,a.player.Oe(!0),0)})}
1515
+ function lE(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 oE(a){var b=0<a.player.bc().length;xB(a.button,b);mE(a)}L("shaka.ui.TextSelection",jE);function qE(){}qE.prototype.create=function(a,b){return new jE(a,b)};HC("captions",new qE);eC("captions",new qE);function rE(a,b){NB.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.setRange(0,100);this.eventManager.o(this.video,"volumechange",function(){return sE(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return tE(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return tE(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return sE(c)});this.eventManager.o(this.localization,"locale-updated",function(){return uE(c)});
1516
+ this.eventManager.o(this.localization,"locale-changed",function(){return uE(c)});sE(this);uE(this);if(this.ad)this.onChange()}pa(rE,NB);rE.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()/100):(this.video.volume=this.getValue()/100,this.video.muted=0==this.video.volume?!0:!1)};function sE(a){a.video.muted?a.setValue(0):a.setValue(100*a.video.volume);vE(a)}function tE(a){var b=a.ad.getVolume();a.setValue(100*b);vE(a)}
1517
+ function vE(a){var b=a.g.volumeBarColors,c=["to right"];c.push(b.level+a.getValue()+"%");c.push(b.base+a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function uE(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}L("shaka.ui.VolumeBar",rE);function wE(){}wE.prototype.create=function(a,b){return new rE(a,b)};eC("volume",new wE);}).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})();
1517
1518
 
1518
1519
  //# sourceMappingURL=shaka-player.ui.map