shaka-player 4.9.23 → 4.9.24

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.
@@ -15,7 +15,7 @@ ha("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
15
15
  ha("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=fa[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(aa(this))}})}return a});function ia(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
16
  function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if("number"==typeof a.length)return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function x(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
17
17
  if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},oa={};try{oa.__proto__=ma;la=oa.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var pa=ka;
18
- function qa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(pa)pa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Tj=b.prototype}function ra(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function sa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ra.prototype.s=function(a){this.h=a};
18
+ function qa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(pa)pa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Sj=b.prototype}function ra(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function sa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ra.prototype.s=function(a){this.h=a};
19
19
  function va(a,b){a.i={eg:b,pg:!0};a.g=a.m||a.j}ra.prototype.return=function(a){this.i={return:a};this.g=this.j};function E(a,b,c){a.g=c;return{value:b}}ra.prototype.u=function(a){this.g=a};function H(a){a.g=0}function xa(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ya(a,b){a.m=0;a.j=b||0}function za(a,b,c){a.g=b;a.m=c||0}function Aa(a,b){a.m=b||0;b=a.i.eg;a.i=null;return b}function Ba(a){a.A=[a.i];a.m=0;a.j=0}
20
20
  function Da(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.pg?a.g=a.m||a.j:void 0!=c.u&&a.j<c.u?(a.g=c.u,a.i=null):a.g=a.j:a.g=b}function Ea(a){this.g=new ra;this.h=a}function Fa(a,b){sa(a.g);var c=a.g.l;if(c)return Ga(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ha(a)}
21
21
  function Ga(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,va(a.g,g),Ha(a)}a.g.l=null;d.call(a.g,f);return Ha(a)}function Ha(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,va(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.pg)throw b.eg;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
@@ -79,10 +79,10 @@ var rc=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
79
79
  Copyright 2006 The Closure Library Authors
80
80
  SPDX-License-Identifier: Apache-2.0
81
81
  */
82
- function sc(a){var b;a instanceof sc?(tc(this,a.wb),this.lc=a.lc,uc(this,a.yb),vc(this,a.Dc),this.Oa=a.Oa,wc(this,a.g.clone()),this.Sb=a.Sb):a&&(b=String(a).match(rc))?(tc(this,b[1]||"",!0),this.lc=xc(b[2]||""),uc(this,b[3]||"",!0),vc(this,b[4]),this.Oa=xc(b[5]||"",!0),wc(this,b[6]||"",!0),this.Sb=xc(b[7]||"")):this.g=new yc(null)}r=sc.prototype;r.wb="";r.lc="";r.yb="";r.Dc=null;r.Oa="";r.Sb="";
83
- r.toString=function(){var a=[],b=this.wb;b&&a.push(zc(b,Ac,!0),":");if(b=this.yb){a.push("//");var c=this.lc;c&&a.push(zc(c,Ac,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Dc;null!=b&&a.push(":",String(b))}if(b=this.Oa)this.yb&&"/"!=b.charAt(0)&&a.push("/"),a.push(zc(b,"/"==b.charAt(0)?Bc:Cc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Sb)&&a.push("#",zc(b,Dc));return a.join("")};
84
- r.resolve=function(a){var b=this.clone();"data"===b.wb&&(b=new sc);var c=!!a.wb;c?tc(b,a.wb):c=!!a.lc;c?b.lc=a.lc:c=!!a.yb;c?uc(b,a.yb):c=null!=a.Dc;var d=a.Oa;if(c)vc(b,a.Dc);else if(c=!!a.Oa){if("/"!=d.charAt(0))if(this.yb&&!this.Oa)d="/"+d;else{var e=b.Oa.lastIndexOf("/");-1!=e&&(d=b.Oa.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(""):".."==
85
- 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.Oa=d:c=""!==a.g.toString();c?wc(b,a.g.clone()):c=!!a.Sb;c&&(b.Sb=a.Sb);return b};r.clone=function(){return new sc(this)};function tc(a,b,c){a.wb=c?xc(b,!0):b;a.wb&&(a.wb=a.wb.replace(/:$/,""))}function uc(a,b,c){a.yb=c?xc(b,!0):b}function vc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Dc=b}else a.Dc=null}
82
+ function sc(a){var b;a instanceof sc?(tc(this,a.wb),this.lc=a.lc,uc(this,a.yb),vc(this,a.Dc),this.Na=a.Na,wc(this,a.g.clone()),this.Sb=a.Sb):a&&(b=String(a).match(rc))?(tc(this,b[1]||"",!0),this.lc=xc(b[2]||""),uc(this,b[3]||"",!0),vc(this,b[4]),this.Na=xc(b[5]||"",!0),wc(this,b[6]||"",!0),this.Sb=xc(b[7]||"")):this.g=new yc(null)}r=sc.prototype;r.wb="";r.lc="";r.yb="";r.Dc=null;r.Na="";r.Sb="";
83
+ r.toString=function(){var a=[],b=this.wb;b&&a.push(zc(b,Ac,!0),":");if(b=this.yb){a.push("//");var c=this.lc;c&&a.push(zc(c,Ac,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Dc;null!=b&&a.push(":",String(b))}if(b=this.Na)this.yb&&"/"!=b.charAt(0)&&a.push("/"),a.push(zc(b,"/"==b.charAt(0)?Bc:Cc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Sb)&&a.push("#",zc(b,Dc));return a.join("")};
84
+ r.resolve=function(a){var b=this.clone();"data"===b.wb&&(b=new sc);var c=!!a.wb;c?tc(b,a.wb):c=!!a.lc;c?b.lc=a.lc:c=!!a.yb;c?uc(b,a.yb):c=null!=a.Dc;var d=a.Na;if(c)vc(b,a.Dc);else if(c=!!a.Na){if("/"!=d.charAt(0))if(this.yb&&!this.Na)d="/"+d;else{var e=b.Na.lastIndexOf("/");-1!=e&&(d=b.Na.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(""):".."==
85
+ 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.Na=d:c=""!==a.g.toString();c?wc(b,a.g.clone()):c=!!a.Sb;c&&(b.Sb=a.Sb);return b};r.clone=function(){return new sc(this)};function tc(a,b,c){a.wb=c?xc(b,!0):b;a.wb&&(a.wb=a.wb.replace(/:$/,""))}function uc(a,b,c){a.yb=c?xc(b,!0):b}function vc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Dc=b}else a.Dc=null}
86
86
  function wc(a,b,c){b instanceof yc?a.g=b:(c||(b=zc(b,Ec)),a.g=new yc(b))}function xc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function zc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Fc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Fc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ac=/[#\/\?@]/g,Cc=/[#\?:]/g,Bc=/[#\?]/g,Ec=/[#\?@]/g,Dc=/#/g;function yc(a){this.g=a||null}
87
87
  function Gc(a){if(!a.Ia&&(a.Ia={},a.Nc=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," ")))}}r=yc.prototype;r.Ia=null;r.Nc=null;function Ic(a){Gc(a);return a.Nc}r.add=function(a,b){Gc(this);this.g=null;var c=this.Ia.hasOwnProperty(a)?this.Ia[a]:null;c||(this.Ia[a]=c=[]);c.push(b);this.Nc++;return this};
88
88
  r.set=function(a,b){Gc(this);this.g=null;this.Ia.hasOwnProperty(a)?this.Ia[a]=[b]:this.add(a,b);return this};r.get=function(a){Gc(this);return this.Ia[a]||[]};r.toString=function(){if(this.g)return this.g;if(!this.Ia)return"";var a=[],b;for(b in this.Ia)for(var c=encodeURIComponent(b),d=this.Ia[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
@@ -120,11 +120,11 @@ function Ld(a){var b=Bb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c
120
120
  function Od(a,b,c){return{keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set}}
121
121
  function Pd(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Gd(Kd(h),!1));var l=g;22!=l.length&&(l=Gd(Kd(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Bb(Ad(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
122
122
  audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Qd(a,b){if(1==b.length)return b[0];a=Rd(a,b);if(null!=a)return a;throw new T(2,4,4025,b);}function Rd(a,b){for(var c=t(Sd[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Td?"":null}
123
- function Ud(a,b){var c=[];a=t(Sd[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Td="text",Vd={ea:"video",V:"audio",qa:Td,qe:"image",Ti:"application"},Sd={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Wd(){}function Xd(a,b){var c=a;b&&!Yd.includes(a)&&(c+='; codecs="'+b+'"');return c}function Zd(a,b){b&&(a+='; codecs="'+b+'"');return a}function $d(a,b,c){var d=Xd(a,b);b=Zd(a,b);mc(b)?(a=mc(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
123
+ function Ud(a,b){var c=[];a=t(Sd[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Td="text",Vd={ea:"video",V:"audio",qa:Td,qe:"image",Si:"application"},Sd={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Wd(){}function Xd(a,b){var c=a;b&&!Yd.includes(a)&&(c+='; codecs="'+b+'"');return c}function Zd(a,b){b&&(a+='; codecs="'+b+'"');return a}function $d(a,b,c){var d=Xd(a,b);b=Zd(a,b);mc(b)?(a=mc(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
124
124
  function ae(a,b,c){var d=[b];be.forEach(function(e,f){var g=a[f];"codecs"==f?Yd.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function ce(a){return a.split(";")[0].split("/")[1]}
125
125
  function de(a){var b=je(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
126
- a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1"}return a}function ke(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=je(c.value),b.push(c[0]);return b.sort().join(",")}function le(a){return a.split(";")[0]}
127
- function ne(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function oe(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function je(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}S("shaka.util.MimeUtils",Wd);Wd.getFullTypeWithAllCodecs=Zd;Wd.getFullType=Xd;
126
+ a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "vvc1"===a:case "vvi1"===a:return"vvc";case "dvh1"===a:case "dvhe"===a:return"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1"}return a}function ke(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=je(c.value),b.push(c[0]);return b.sort().join(",")}
127
+ function le(a){return a.split(";")[0]}function ne(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function oe(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function je(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}S("shaka.util.MimeUtils",Wd);Wd.getFullTypeWithAllCodecs=Zd;Wd.getFullType=Xd;
128
128
  var be=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),Yd=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function pe(a){this.i=null;this.j=a;this.B=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.C="";this.A=function(){};this.o=new Map}function qe(a){return re[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Jb:!1}pe.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
129
129
  function se(a,b,c,d,e){var f,g,h,k,l,m,n;return O(function(q){if(1==q.g)return E(q,Promise.resolve(),2);if(!a.i||!a.j)return q.return();if(null==c||null==d)return a.i.parseInit(Bb(b)),q.return();f=a.B?c:a.s;g={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Bb(b),g,e);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(p){return p.startTime>=a.l&&p.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);H(q)})}
130
130
  pe.prototype.remove=function(a,b){var c=this;return O(function(d){if(1==d.g)return E(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));H(d)})};function te(a,b,c){a.l=b;a.m=c}function ue(a,b,c){a.C=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
@@ -189,7 +189,7 @@ r.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(
189
189
  r.playbackRateChanged=function(a){this.B=a};r.setMediaElement=function(a){var b=this;this.o=a;this.h&&(this.h.disconnect(),this.h=null);this.o&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.X(Ef)}),this.h.observe(this.o))};r.setCmsdManager=function(a){this.m=a};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
190
190
  function Df(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0;a.l-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.l<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}function Bf(a,b,c,d,e){if(a.m){var f=a.m.kg();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Qe(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
191
191
  function Cf(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})}S("shaka.abr.SimpleAbrManager",Af);Af.prototype.configure=Af.prototype.configure;Af.prototype.setCmsdManager=Af.prototype.setCmsdManager;Af.prototype.setMediaElement=Af.prototype.setMediaElement;Af.prototype.playbackRateChanged=Af.prototype.playbackRateChanged;Af.prototype.setVariants=Af.prototype.setVariants;
192
- Af.prototype.getBandwidthEstimate=Af.prototype.getBandwidthEstimate;Af.prototype.trySuggestStreams=Af.prototype.trySuggestStreams;Af.prototype.segmentDownloaded=Af.prototype.segmentDownloaded;Af.prototype.disable=Af.prototype.disable;Af.prototype.enable=Af.prototype.enable;Af.prototype.chooseVariant=Af.prototype.chooseVariant;Af.prototype.init=Af.prototype.init;Af.prototype.release=Af.prototype.release;Af.prototype.stop=Af.prototype.stop;var Ef=1;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});S("shaka.config.CodecSwitchingStrategy",{uj:"reload",bh:"smooth"});function Ff(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)}Ff.prototype.add=function(a,b,c){return Gf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
192
+ Af.prototype.getBandwidthEstimate=Af.prototype.getBandwidthEstimate;Af.prototype.trySuggestStreams=Af.prototype.trySuggestStreams;Af.prototype.segmentDownloaded=Af.prototype.segmentDownloaded;Af.prototype.disable=Af.prototype.disable;Af.prototype.enable=Af.prototype.enable;Af.prototype.chooseVariant=Af.prototype.chooseVariant;Af.prototype.init=Af.prototype.init;Af.prototype.release=Af.prototype.release;Af.prototype.stop=Af.prototype.stop;var Ef=1;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});S("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Ff(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)}Ff.prototype.add=function(a,b,c){return Gf(this.h,a,void 0===b?!0:b,void 0===c?!1:c)?(this.g.add(a),!0):!1};
193
193
  function Gf(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||e.spatialAudio!==f.spatialAudio||c&&!Hf(e,f)||!If(e.roles,f.roles)||d&&e.groupId!==f.groupId)}!(d=e)&&(d=a.video&&b.video)&&(a=a.video,b=b.video,d=!((!c||Hf(a,b))&&If(a.roles,b.roles)));return d?!1:!0}Ff.prototype.values=function(){return this.g.values()};
194
194
  function Hf(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return ke(d)});b=b.codecs.split(",").map(function(d){return ke(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 If(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 Jf(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 Kf(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"",!1,"","","",b,c)}Jf.prototype.create=function(a){var b=this,c="smooth"==this.h&&pb(),d=a.filter(function(e){return Gf(b.i,e,!c,b.g)});return d.length?new Ff(d[0],d,!c,this.g):this.j.create(a)};
195
195
  function Kf(a,b,c,d,e,f,g,h,k,l){this.s=a;this.A=b;this.h=c;this.i=d;this.B=e;this.l=f;this.g=void 0===g?"":g;this.j=void 0===h?"":h;this.m=void 0===k?"reload":k;this.o=void 0===l?!1:l}
@@ -201,28 +201,28 @@ function fg(a){return new ag(Promise.all(a.map(function(b){return b.promise})),f
201
201
  ag.prototype.za=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=gg(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new $f,g=new T(2,7,7001);this.promise.then(c(!0),c(!1));return new ag(f,function(){return d()})};
202
202
  function gg(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}S("shaka.util.AbortableOperation",ag);ag.prototype.chain=ag.prototype.za;ag.prototype["finally"]=ag.prototype.finally;ag.all=fg;ag.prototype.abort=ag.prototype.abort;ag.notAbortable=eg;ag.completed=dg;ag.aborted=cg;ag.failed=bg;function U(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
203
203
  function hg(a){var b=new U(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}U.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};U.prototype.stopImmediatePropagation=function(){this.g=!0};U.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",U);
204
- var ig={Vi:"abrstatuschanged",Wi:"adaptation",Xi:"buffering",Yi:"complete",Zi:"downloadfailed",$i:"downloadheadersreceived",aj:"drmsessionupdate",cj:"emsg",tj:"prft",Error:"error",dj:"expirationupdated",ej:"firstquartile",fj:"gapjumped",ij:"keystatuschanged",kj:"loaded",lj:"loading",nj:"manifestparsed",oj:"manifestupdated",pj:"mediaqualitychanged",Metadata:"metadata",qj:"midpoint",rj:"nospatialvideoinfo",sj:"onstatechange",vj:"ratechange",wj:"segmentappended",xj:"sessiondata",yj:"spatialvideoinfo",
205
- zj:"stalldetected",Aj:"started",Bj:"statechanged",Cj:"streaming",Dj:"textchanged",Ej:"texttrackvisibility",Fj:"thirdquartile",Gj:"timelineregionadded",Hj:"timelineregionenter",Ij:"timelineregionexit",Jj:"trackschanged",Lj:"unloading",Nj:"variantchanged"};function jg(){this.wa=new gb;this.Xd=this}jg.prototype.addEventListener=function(a,b){this.wa&&this.wa.push(a,b)};jg.prototype.removeEventListener=function(a,b){this.wa&&this.wa.remove(a,b)};jg.prototype.dispatchEvent=function(a){if(!this.wa)return!0;var b=this.wa.get(a.type)||[],c=this.wa.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Xd;a.currentTarget=this.Xd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
206
- jg.prototype.release=function(){this.wa=null};function kg(){this.g=[]}function lg(a,b){a.g.push(b.finally(function(){Ob(a.g,b)}))}kg.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function mg(a,b,c,d,e,f){jg.call(this);this.i=!1;this.m=new kg;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.A=c||null;this.B=d||null;this.F=e||null;this.C=f||null;this.o=this.s=!1}qa(mg,jg);r=mg.prototype;r.Df=function(a){this.s=a};r.Ef=function(a){this.o=a};function ng(a,b,c,d){c=c||og;var e=pg[a];if(!e||c>=e.priority)pg[a]={priority:c,ce:b,oi:void 0===d?!1:d}}
207
- function qg(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}r.si=function(a){this.g.add(a)};r.Oi=function(a){this.g.delete(a)};r.oh=function(){this.g.clear()};r.ti=function(a){this.h.add(a)};r.Pi=function(a){this.h.delete(a)};r.ph=function(){this.h.clear()};
204
+ var ig={Ui:"abrstatuschanged",Vi:"adaptation",Wi:"buffering",Xi:"complete",Yi:"downloadfailed",Zi:"downloadheadersreceived",$i:"drmsessionupdate",bj:"emsg",sj:"prft",Error:"error",cj:"expirationupdated",dj:"firstquartile",ej:"gapjumped",hj:"keystatuschanged",jj:"loaded",kj:"loading",mj:"manifestparsed",nj:"manifestupdated",oj:"mediaqualitychanged",Metadata:"metadata",pj:"midpoint",qj:"nospatialvideoinfo",rj:"onstatechange",tj:"ratechange",vj:"segmentappended",wj:"sessiondata",xj:"spatialvideoinfo",
205
+ yj:"stalldetected",zj:"started",Aj:"statechanged",Bj:"streaming",Cj:"textchanged",Dj:"texttrackvisibility",Ej:"thirdquartile",Fj:"timelineregionadded",Gj:"timelineregionenter",Hj:"timelineregionexit",Ij:"trackschanged",Kj:"unloading",Mj:"variantchanged"};function jg(){this.wa=new gb;this.Xd=this}jg.prototype.addEventListener=function(a,b){this.wa&&this.wa.push(a,b)};jg.prototype.removeEventListener=function(a,b){this.wa&&this.wa.remove(a,b)};jg.prototype.dispatchEvent=function(a){if(!this.wa)return!0;var b=this.wa.get(a.type)||[],c=this.wa.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Xd;a.currentTarget=this.Xd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
206
+ jg.prototype.release=function(){this.wa=null};function kg(){this.g=[]}function lg(a,b){a.g.push(b.finally(function(){Ob(a.g,b)}))}kg.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function mg(a,b,c,d,e,f){jg.call(this);this.i=!1;this.m=new kg;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.A=c||null;this.B=d||null;this.F=e||null;this.C=f||null;this.o=this.s=!1}qa(mg,jg);r=mg.prototype;r.Df=function(a){this.s=a};r.Ef=function(a){this.o=a};function ng(a,b,c,d){c=c||og;var e=pg[a];if(!e||c>=e.priority)pg[a]={priority:c,ce:b,ni:void 0===d?!1:d}}
207
+ function qg(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}r.ri=function(a){this.g.add(a)};r.Ni=function(a){this.g.delete(a)};r.nh=function(){this.g.clear()};r.si=function(a){this.h.add(a)};r.Oi=function(a){this.h.delete(a)};r.oh=function(){this.h.clear()};
208
208
  function rg(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();jg.prototype.release.call(this);return this.m.destroy()};
209
209
  r.request=function(a,b,c){var d=this,e=new sg;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new tg(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ke(b.retryParameters):Yf();b.uris=Ke(b.uris);f=ug(this,a,b,c);var g=f.za(function(){return vg(d,a,b,c,new Xf(b.retryParameters,!1),0,null,e)}),h=g.za(function(q){return wg(d,a,q,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
210
- var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.za(function(q){var p=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=p;q.Wh||!d.l||u.fromCache||"HEAD"==b.method||a!=zg||d.l(u.timeMs,u.data.byteLength,Ag(c));d.C&&d.C(a,u,c);return u},function(q){q&&(q.severity=2);throw q;});f=new tg(n.promise,function(){return n.abort()},e);lg(this.m,f);return f};
210
+ var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.za(function(q){var p=Date.now()-m,u=q.response;u.timeMs+=l;u.timeMs+=p;q.Vh||!d.l||u.fromCache||"HEAD"==b.method||a!=zg||d.l(u.timeMs,u.data.byteLength,Ag(c));d.C&&d.C(a,u,c);return u},function(q){q&&(q.severity=2);throw q;});f=new tg(n.promise,function(){return n.abort()},e);lg(this.m,f);return f};
211
211
  function ug(a,b,c,d){function e(h){f=f.za(function(){c.body&&(c.body=Cb(c.body));return h(b,c,d)})}var f=dg(void 0);a.B&&e(a.B);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.za(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
212
- function vg(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.F&&a.F(b,d,c.uris[f],c.uris[f-1]);var k=new sc(c.uris[f]),l=k.wb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),tc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=pg[l])?l.ce:null;if(!n)return bg(new T(2,1,1E3,k));var q=l.oi,p=null,u=null,v=!1,w=!1,A;return eg(Zf(e)).za(function(){if(a.i)return cg();A=Date.now();var y=0;c.requestStartTime=Date.now();
212
+ function vg(a,b,c,d,e,f,g,h){a.s&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.o&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.F&&a.F(b,d,c.uris[f],c.uris[f-1]);var k=new sc(c.uris[f]),l=k.wb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),tc(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=pg[l])?l.ce:null;if(!n)return bg(new T(2,1,1E3,k));var q=l.ni,p=null,u=null,v=!1,w=!1,A;return eg(Zf(e)).za(function(){if(a.i)return cg();A=Date.now();var y=0;c.requestStartTime=Date.now();
213
213
  var C=n(c.uris[f],c,b,function(D,I,F){p&&p.stop();u&&u.X(B/1E3);a.l&&b==zg&&(y++,c.packetNumber=y,a.l(D,I,Ag(d),c),m=!0,h.g=F)},function(D){a.j&&a.j(D,c,b);w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime});if(!q)return C;var z=c.retryParameters.connectionTimeout;z&&(p=new Tc(function(){v=!0;C.abort()}),p.X(z/1E3));var B=c.retryParameters.stallTimeout;B&&(u=new Tc(function(){v=!0;C.abort()}));return C}).za(function(y){p&&p.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=Date.now()-A);var C={response:y,
214
- Wh:m};!w&&a.j&&a.j(y.headers,c,b);return C},function(y){p&&p.stop();u&&u.stop();if(a.A){var C=null,z=0;y instanceof T&&(C=y,1001==y.code&&(z=y.data[1]));a.A(c,C,z,v)}if(a.i)return cg();v&&(y=new T(1,1,1003,c.uris[f],b));if(y instanceof T){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return C=(new Map).set("error",y),C=new U("retry",C),a.dispatchEvent(C),f=(f+1)%c.uris.length,vg(a,b,c,d,e,f,y,h)}throw y;})}
214
+ Vh:m};!w&&a.j&&a.j(y.headers,c,b);return C},function(y){p&&p.stop();u&&u.stop();if(a.A){var C=null,z=0;y instanceof T&&(C=y,1001==y.code&&(z=y.data[1]));a.A(c,C,z,v)}if(a.i)return cg();v&&(y=new T(1,1,1003,c.uris[f],b));if(y instanceof T){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return C=(new Map).set("error",y),C=new U("retry",C),a.dispatchEvent(C),f=(f+1)%c.uris.length,vg(a,b,c,d,e,f,y,h)}throw y;})}
215
215
  function wg(a,b,c,d){var e=dg(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Eg:void 0},f=a.next())g.Eg=f.value,e=e.za(function(h){return function(){var k=c.response;k.data&&(k.data=Cb(k.data));return(0,h.Eg)(b,k,d)}}(g));return e.za(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function Ag(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.jd)return!1}return!0}S("shaka.net.NetworkingEngine",mg);
216
- mg.prototype.request=mg.prototype.request;mg.prototype.destroy=mg.prototype.destroy;mg.makeRequest=rg;mg.defaultRetryParameters=function(){return Yf()};mg.prototype.clearAllResponseFilters=mg.prototype.ph;mg.prototype.unregisterResponseFilter=mg.prototype.Pi;mg.prototype.registerResponseFilter=mg.prototype.ti;mg.prototype.clearAllRequestFilters=mg.prototype.oh;mg.prototype.unregisterRequestFilter=mg.prototype.Oi;mg.prototype.registerRequestFilter=mg.prototype.si;mg.unregisterScheme=function(a){delete pg[a]};
216
+ mg.prototype.request=mg.prototype.request;mg.prototype.destroy=mg.prototype.destroy;mg.makeRequest=rg;mg.defaultRetryParameters=function(){return Yf()};mg.prototype.clearAllResponseFilters=mg.prototype.oh;mg.prototype.unregisterResponseFilter=mg.prototype.Oi;mg.prototype.registerResponseFilter=mg.prototype.si;mg.prototype.clearAllRequestFilters=mg.prototype.nh;mg.prototype.unregisterRequestFilter=mg.prototype.Ni;mg.prototype.registerRequestFilter=mg.prototype.ri;mg.unregisterScheme=function(a){delete pg[a]};
217
217
  mg.registerScheme=ng;mg.prototype.setForceHTTPS=mg.prototype.Ef;mg.prototype.setForceHTTP=mg.prototype.Df;function sg(){this.g=0}mg.NumBytesRemainingClass=sg;function tg(a,b,c){ag.call(this,a,b);this.h=c}qa(tg,ag);mg.PendingRequest=tg;var zg=1;mg.RequestType={MANIFEST:0,SEGMENT:zg,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};mg.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var og=3;
218
- mg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:og};var pg={};function Bg(a){this.g=!1;this.h=new $f;this.i=a}Bg.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 Cg(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Dg(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function Eg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Fg(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 Gg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Hg(a,b){this.h=Fb(a);this.i=b==Ig;this.g=0}r=Hg.prototype;r.la=function(){return this.g<this.h.byteLength};r.ra=function(){return this.g};r.getLength=function(){return this.h.byteLength};r.S=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Jg();}};r.ia=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Jg();}};r.O=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Jg();}};
218
+ mg.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:og};var pg={};function Bg(a){this.g=!1;this.h=new $f;this.i=a}Bg.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 Cg(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Dg(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function Eg(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Fg(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 Gg(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Hg(a,b){this.h=Fb(a);this.i=b==Ig;this.g=0}r=Hg.prototype;r.la=function(){return this.g<this.h.byteLength};r.ra=function(){return this.g};r.getLength=function(){return this.h.byteLength};r.R=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Jg();}};r.ia=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Jg();}};r.O=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Jg();}};
219
219
  r.Bg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Jg();}};r.Ec=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 Jg();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.mb=function(a){if(this.g+a>this.h.byteLength)throw Jg();var b=Bb(this.h,this.g,a);this.g+=a;return b};
220
- r.skip=function(a){if(this.g+a>this.h.byteLength)throw Jg();this.g+=a};r.Ai=function(a){if(this.g<a)throw Jg();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw Jg();this.g=a};r.dc=function(){for(var a=this.g;this.la()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Bb(this.h,a,this.g-a);this.g+=1;return wd(a)};function Jg(){return new T(2,3,3E3)}S("shaka.util.DataViewReader",Hg);Hg.prototype.readTerminatedString=Hg.prototype.dc;Hg.prototype.seek=Hg.prototype.seek;Hg.prototype.rewind=Hg.prototype.Ai;
221
- Hg.prototype.skip=Hg.prototype.skip;Hg.prototype.readBytes=Hg.prototype.mb;Hg.prototype.readUint64=Hg.prototype.Ec;Hg.prototype.readInt32=Hg.prototype.Bg;Hg.prototype.readUint32=Hg.prototype.O;Hg.prototype.readUint16=Hg.prototype.ia;Hg.prototype.readUint8=Hg.prototype.S;Hg.prototype.getLength=Hg.prototype.getLength;Hg.prototype.getPosition=Hg.prototype.ra;Hg.prototype.hasMoreData=Hg.prototype.la;var Ig=1;Hg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Ig};function Kg(){this.i=[];this.h=[];this.g=!1}r=Kg.prototype;r.box=function(a,b){a=Ng(a);this.i[a]=Og;this.h[a]=b;return this};r.R=function(a,b){a=Ng(a);this.i[a]=Pg;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Hg(a,0);for(this.g=!1;a.la()&&!this.g;)this.Bc(0,a,b,c)};
220
+ r.skip=function(a){if(this.g+a>this.h.byteLength)throw Jg();this.g+=a};r.zi=function(a){if(this.g<a)throw Jg();this.g-=a};r.seek=function(a){if(0>a||a>this.h.byteLength)throw Jg();this.g=a};r.dc=function(){for(var a=this.g;this.la()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Bb(this.h,a,this.g-a);this.g+=1;return wd(a)};function Jg(){return new T(2,3,3E3)}S("shaka.util.DataViewReader",Hg);Hg.prototype.readTerminatedString=Hg.prototype.dc;Hg.prototype.seek=Hg.prototype.seek;Hg.prototype.rewind=Hg.prototype.zi;
221
+ Hg.prototype.skip=Hg.prototype.skip;Hg.prototype.readBytes=Hg.prototype.mb;Hg.prototype.readUint64=Hg.prototype.Ec;Hg.prototype.readInt32=Hg.prototype.Bg;Hg.prototype.readUint32=Hg.prototype.O;Hg.prototype.readUint16=Hg.prototype.ia;Hg.prototype.readUint8=Hg.prototype.R;Hg.prototype.getLength=Hg.prototype.getLength;Hg.prototype.getPosition=Hg.prototype.ra;Hg.prototype.hasMoreData=Hg.prototype.la;var Ig=1;Hg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Ig};function Kg(){this.i=[];this.h=[];this.g=!1}r=Kg.prototype;r.box=function(a,b){a=Ng(a);this.i[a]=Og;this.h[a]=b;return this};r.P=function(a,b){a=Ng(a);this.i[a]=Pg;this.h[a]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new Hg(a,0);for(this.g=!1;a.la()&&!this.g;)this.Bc(0,a,b,c)};
222
222
  r.Bc=function(a,b,c,d){var e=b.ra();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.O(),g=b.O(),h=Qg(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.ra()+8>b.getLength()){this.g=!0;return}f=b.Ec();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Pg){if(d&&b.ra()+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.ra(),b=0<d?b.mb(d):new Uint8Array(0),b=new Hg(b,0),l({name:h,parser:this,
223
223
  partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.ra(),b.getLength()-b.ra()))}};function Rg(a){for(var b=Sg(a);a.reader.la()&&!a.parser.g;)a.parser.Bc(a.start+b,a.reader,a.partialOkay)}function Tg(a){for(var b=Sg(a),c=a.reader.O(),d=0;d<c&&(a.parser.Bc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Ug(a){var b=Sg(a);for(a.reader.skip(78);a.reader.la()&&!a.parser.g;)a.parser.Bc(a.start+b,a.reader,a.partialOkay)}
224
224
  function Vg(a){var b=Sg(a);a.reader.skip(8);var c=a.reader.ia();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.la()&&!a.parser.g;)a.parser.Bc(a.start+b,a.reader,a.partialOkay)}function Wg(a){return function(b){a(b.reader.mb(b.reader.getLength()-b.reader.ra()))}}function Ng(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 Qg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
225
- function Sg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Kg);Kg.headerSize=Sg;Kg.typeToString=Qg;Kg.allData=Wg;Kg.audioSampleEntry=Vg;Kg.visualSampleEntry=Ug;Kg.sampleDescription=Tg;Kg.children=Rg;Kg.prototype.parseNext=Kg.prototype.Bc;Kg.prototype.parse=Kg.prototype.parse;Kg.prototype.stop=Kg.prototype.stop;Kg.prototype.fullBox=Kg.prototype.R;Kg.prototype.box=Kg.prototype.box;var Og=0,Pg=1;function Xg(a){var b=this;this.g=[];this.h=[];this.data=[];(new Kg).box("moov",Rg).box("moof",Rg).R("pssh",function(c){if(!(1<c.version)){var d=Bb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Ld(c.reader.mb(16)));if(0<c.version){d=c.reader.O();for(var e=0;e<d;e++){var f=Ld(c.reader.mb(16));b.h.push(f)}}}}).parse(a)}
225
+ function Sg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Kg);Kg.headerSize=Sg;Kg.typeToString=Qg;Kg.allData=Wg;Kg.audioSampleEntry=Vg;Kg.visualSampleEntry=Ug;Kg.sampleDescription=Tg;Kg.children=Rg;Kg.prototype.parseNext=Kg.prototype.Bc;Kg.prototype.parse=Kg.prototype.parse;Kg.prototype.stop=Kg.prototype.stop;Kg.prototype.fullBox=Kg.prototype.P;Kg.prototype.box=Kg.prototype.box;var Og=0,Pg=1;function Xg(a){var b=this;this.g=[];this.h=[];this.data=[];(new Kg).box("moov",Rg).box("moof",Rg).P("pssh",function(c){if(!(1<c.version)){var d=Bb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Ld(c.reader.mb(16)));if(0<c.version){d=c.reader.O();for(var e=0;e<d;e++){var f=Ld(c.reader.mb(16));b.h.push(f)}}}}).parse(a)}
226
226
  function Yg(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=Fb(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=Kd(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};/*
227
227
  @license
228
228
  tXml
@@ -244,12 +244,12 @@ function yh(a){var b=[];a=Dd(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/)
244
244
  null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Hb=c.slice(1))}return b}
245
245
  function zh(a,b){var c=yh(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null==c&&(null!==d.t&&(c=Ah(a,"t",d.t)),null!==d.n&&(c=Ah(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.Hb)&&a[c]?Bh(a[c],e,d,hh(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}
246
246
  function Ah(a,b,c){var d=0;a=t(a);for(var e=a.next();!e.done;e=a.next()){if(Number(e.value.attributes[b])===c)return d;d++}return null}function Bh(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
247
- function Ch(a,b,c){b=void 0===b?!0:b;c=void 0===c?!0:c;var d=document.createElement(a.tagName),e;for(e in a.attributes)d.setAttribute(e,a.attributes[e]);b&&a.parent&&"?xml"!=a.parent.tagName&&Ch(a.parent,!0,!1).appendChild(d);if(c)for(a=t(a.children),b=a.next();!b.done;b=a.next())b=b.value,c=void 0,"string"==typeof b?c=new Text(b):c=Ch(b,!1,!0),d.appendChild(c);return d}var ch=new Map([]);function Dh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ga=this.ba=!1;this.J=0;this.g=null;this.B=new hb;this.i=new Map;this.A=new Map;this.l=new $f;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.$=new Map;this.da=new Map;this.L=new Tc(function(){return Eh(b)});this.P=!1;this.N=[];this.W=!1;this.K=new Tc(function(){Fh(b)});this.l.catch(function(){});this.j=new Bg(function(){return Gh(b)});this.aa=!1;this.F=this.G=null}r=Dh.prototype;r.destroy=function(){return this.j.destroy()};
247
+ function Ch(a){var b=document.createElementNS("",a.tagName),c;for(c in a.attributes)b.setAttribute(c,a.attributes[c]);a=t(a.children);for(c=a.next();!c.done;c=a.next()){c=c.value;var d=void 0;"string"==typeof c?d=new Text(c):d=Ch(c);b.appendChild(d)}return b}var ch=new Map([]);function Dh(a){var b=this;this.C=a;this.H=new Set;this.m=this.s=null;this.ga=this.ba=!1;this.J=0;this.g=null;this.B=new hb;this.i=new Map;this.A=new Map;this.l=new $f;this.h=null;this.o=function(c){2==c.severity&&b.l.reject(c);a.onError(c)};this.$=new Map;this.da=new Map;this.L=new Tc(function(){return Eh(b)});this.T=!1;this.N=[];this.W=!1;this.K=new Tc(function(){Fh(b)});this.l.catch(function(){});this.j=new Bg(function(){return Gh(b)});this.aa=!1;this.F=this.G=null}r=Dh.prototype;r.destroy=function(){return this.j.destroy()};
248
248
  function Gh(a){return O(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.l.reject(),a.K.stop(),a.K=null,a.L.stop(),a.L=null,E(b,Hh(a),2);case 2:if(!a.m){b.u(3);break}xa(b,4);return E(b,a.m.setMediaKeys(null),6);case 6:za(b,5);break;case 4:Aa(b);case 5:a.m=null;case 3:a.g=null,a.H.clear(),a.s=null,a.A=new Map,a.h=null,a.o=function(){},a.C=null,a.aa=!1,a.G=null,H(b)}})}r.configure=function(a){this.h=a;this.K&&this.K.Va(this.h.updateExpirationTime)};
249
- function Ih(a,b,c){a.ga=!0;a.A=new Map;a.P=c;return Jh(a,b)}function Kh(a,b,c){a.A=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.A.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.A.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.P=0<a.A.size;return Jh(a,b)}
249
+ function Ih(a,b,c){a.ga=!0;a.A=new Map;a.T=c;return Jh(a,b)}function Kh(a,b,c){a.A=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.A.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.A.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.T=0<a.A.size;return Jh(a,b)}
250
250
  function Lh(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Mh(a,g,[])}
251
251
  function Jh(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z;return O(function(B){if(1==B.g){if(c=Nh(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(D){return D.video&&D.video.drmInfos.length||D.audio&&D.audio.drmInfos.length?!0:!1});g||(h=Fg(a.h.servers),Oh(b,h));k=new Set;l=t(b);for(m=l.next();!m.done;m=l.next())for(n=m.value,q=Ph(n),p=t(q),u=p.next();!u.done;u=p.next())v=u.value,k.add(v);w=t(k);for(A=w.next();!A.done;A=
252
- w.next())y=A.value,Qh(y,Fg(a.h.servers),Fg(a.h.advanced||{}),a.h.keySystemsMapping);return E(B,Xe(b,a.P,a.aa,a.h.preferredKeySystems),2)}Cg(a.j);C=g||Object.keys(a.h.servers).length;if(!C)return a.ba=!0,B.return(Promise.resolve());z=Mh(a,void 0,b);return B.return(g?z:z.catch(function(){}))})}
252
+ w.next())y=A.value,Qh(y,Fg(a.h.servers),Fg(a.h.advanced||{}),a.h.keySystemsMapping);return E(B,Xe(b,a.T,a.aa,a.h.preferredKeySystems),2)}Cg(a.j);C=g||Object.keys(a.h.servers).length;if(!C)return a.ba=!0,B.return(Promise.resolve());z=Mh(a,void 0,b);return B.return(g?z:z.catch(function(){}))})}
253
253
  function Rh(a){var b;return O(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.G){c.u(2);break}return E(c,a.G,3);case 3:return Cg(a.j),c.return();case 2:return xa(c,4),a.G=a.m.setMediaKeys(a.s),E(c,a.G,6);case 6:za(c,5);break;case 4:b=Aa(c),a.o(new T(2,6,6003,b.message));case 5:Cg(a.j),H(c)}})}function Sh(a,b){return O(function(c){if(1==c.g)return E(c,Rh(a),2);Th(a,b.initDataType,Bb(b.initData));H(c)})}
254
254
  r.oc=function(a){var b=this;return O(function(c){if(1==c.g){if(!b.s)return b.B.sa(a,"encrypted",function(){b.o(new T(2,6,6010))}),c.return();b.m=a;b.B.sa(b.m,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())Uh(b,e.value);b.W=!0;b.N=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.B.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Hh(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||
255
255
  b.A.size?E(c,Rh(b),2):c.u(2)}Vh(b).catch(function(){});b.F||b.A.size||b.h.parseInbandPsshEnabled||b.B.D(b.m,"encrypted",function(d){return Sh(b,d)});H(c)})};
@@ -259,7 +259,7 @@ function Vh(a){var b,c,d,e,f;return O(function(g){if(1==g.g){if(!a.A.size)return
259
259
  function Th(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(zb(c,e.value.initData))return}0<a.i.size&&$h(a)&&(a.l.resolve(),a.l=new $f,a.l.catch(function(){}));ai(a,b,c,a.g.sessionType)}}function bi(a){a=a.i.keys();a=Dg(a,function(b){return b.sessionId});return Array.from(a)}
260
260
  r.Qe=function(){var a=this,b=this.i.keys();b=Dg(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};r.Uc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Dd=function(){return Gg(this.da)};
261
261
  function Mh(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y;return O(function(C){switch(C.g){case 1:d=new Map;if(c.length){e=ci(a,c,d);C.u(2);break}return E(C,di(a,b),3);case 3:e=C.h;case 2:f=e;if(!f)throw new T(2,6,6001);Cg(a.j);xa(C,4);a.H.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.H.add(n.contentType.toLowerCase());q=t(k);for(p=q.next();!p.done;p=q.next())u=p.value,a.H.add(u.contentType.toLowerCase());if(c.length){var z=
262
- f.keySystem;var B=d.get(f.keySystem);var D=[],I=[],F=[],K=[],J=[],G=new Set;ei(B,D,I,K,F,J,G);var L=a.P?"persistent-license":"temporary";z={keySystem:z,encryptionScheme:D[0],licenseServerUri:I[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||L,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:K[0],serverCertificateUri:F[0],initData:J,keyIds:G};B=t(B);
262
+ f.keySystem;var B=d.get(f.keySystem);var D=[],I=[],F=[],K=[],J=[],G=new Set;ei(B,D,I,K,F,J,G);var L=a.T?"persistent-license":"temporary";z={keySystem:z,encryptionScheme:D[0],licenseServerUri:I[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||L,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:K[0],serverCertificateUri:F[0],initData:J,keyIds:G};B=t(B);
263
263
  for(D=B.next();!D.done;D=B.next())D=D.value,D.distinctiveIdentifierRequired&&(z.distinctiveIdentifierRequired=D.distinctiveIdentifierRequired),D.persistentStateRequired&&(z.persistentStateRequired=D.persistentStateRequired);B=z}else B=f.keySystem,z=b.get(f.keySystem),D=[],I=[],F=[],K=[],J=[],G=new Set,ei(z.drmInfos,D,I,K,F,J,G),B={keySystem:B,encryptionScheme:D[0],licenseServerUri:I[0],distinctiveIdentifierRequired:"required"==z.distinctiveIdentifier,persistentStateRequired:"required"==z.persistentState,
264
264
  sessionType:z.sessionTypes[0]||"temporary",audioRobustness:(z.audioCapabilities?z.audioCapabilities[0].robustness:"")||"",videoRobustness:(z.videoCapabilities?z.videoCapabilities[0].robustness:"")||"",serverCertificate:K[0],serverCertificateUri:F[0],initData:J,keyIds:G};a.g=B;if(!a.g.licenseServerUri)throw new T(2,6,6012,a.g.keySystem);return E(C,f.createMediaKeys(),6);case 6:v=C.h;Cg(a.j);a.s=v;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.s)){C.u(7);break}xa(C,8);return E(C,a.s.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),
265
265
  10);case 10:w=C.h;if("usable"!=w)throw new T(2,6,6018);Cg(a.j);za(C,7,4);break;case 8:A=Aa(C,4);if(A instanceof T)throw A;throw new T(2,6,6019,A.message);case 7:return a.ba=!0,E(C,Wh(a),11);case 11:Cg(a.j);za(C,0);break;case 4:y=Aa(C);Cg(a.j,y);a.g=null;a.H.clear();if(y instanceof T)throw y;throw new T(2,6,6002,y.message);}})}
@@ -301,18 +301,18 @@ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertif
301
301
  function ni(a,b,c){this.h=a;this.i=b;this.g=c}function oi(a,b){return O(function(c){if(1==c.g)return E(c,Se(a.g,b,a.h.drm.preferredKeySystems),2);Ne(b,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredDecodingAttributes);if(!b.variants.some(wf))throw new T(2,4,4032);return c.return(pi(a,b))})}
302
302
  function pi(a,b){var c=Re(b.variants,a.h.restrictions,a.i);if(b){var d=a.g?a.g.g:null;if(d&&a.g.s)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,qi(a,d.keySystem,f.video),qi(a,d.keySystem,f.audio);ri(a,b)}return c}function qi(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,Th(a.g,e.initDataType,e.initData)}}}
303
303
  function ri(a,b){a=a.g?a.g.Dd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?si.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
304
- missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var si=["output-restricted","internal-error"];function ti(){}function ui(a,b){if(b){var c=vi[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",ti);ti.unregisterParserByMime=function(a){delete vi[a]};ti.registerParserByMime=function(a,b){vi[a]=b};ti.registerParserByExtension=function(){rb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};ti.AccessibilityPurpose={Mj:"visually impaired",gj:"hard of hearing"};var vi={};function wi(a,b){function c(){f=!0}function d(m){h.push(m);Rg(m)}var e=a=Bb(a),f=!1,g,h=[],k=[];(new Kg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).R("stsd",function(m){g=m;h.push(m);Tg(m)}).R("encv",c).R("enca",c).R("dvav",function(m){k.push({box:m,cb:1701733238})}).R("dva1",function(m){k.push({box:m,cb:1701733238})}).R("dvh1",function(m){k.push({box:m,cb:1701733238})}).R("dvhe",function(m){k.push({box:m,cb:1701733238})}).R("hev1",function(m){k.push({box:m,cb:1701733238})}).R("hvc1",
305
- function(m){k.push({box:m,cb:1701733238})}).R("avc1",function(m){k.push({box:m,cb:1701733238})}).R("avc3",function(m){k.push({box:m,cb:1701733238})}).R("ac-3",function(m){k.push({box:m,cb:1701733217})}).R("ec-3",function(m){k.push({box:m,cb:1701733217})}).R("ac-4",function(m){k.push({box:m,cb:1701733217})}).R("mp4a",function(m){k.push({box:m,cb:1701733217})}).parse(a);if(f)return a;if(0==k.length||!g)throw fb(Ld(a)),new T(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,
304
+ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var si=["output-restricted","internal-error"];function ti(){}function ui(a,b){if(b){var c=vi[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",ti);ti.unregisterParserByMime=function(a){delete vi[a]};ti.registerParserByMime=function(a,b){vi[a]=b};ti.registerParserByExtension=function(){rb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};ti.AccessibilityPurpose={Lj:"visually impaired",fj:"hard of hearing"};var vi={};function wi(a,b){function c(){f=!0}function d(m){h.push(m);Rg(m)}var e=a=Bb(a),f=!1,g,h=[],k=[];(new Kg).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).P("stsd",function(m){g=m;h.push(m);Tg(m)}).P("encv",c).P("enca",c).P("dvav",function(m){k.push({box:m,cb:1701733238})}).P("dva1",function(m){k.push({box:m,cb:1701733238})}).P("dvh1",function(m){k.push({box:m,cb:1701733238})}).P("dvhe",function(m){k.push({box:m,cb:1701733238})}).P("hev1",function(m){k.push({box:m,cb:1701733238})}).P("hvc1",
305
+ function(m){k.push({box:m,cb:1701733238})}).P("avc1",function(m){k.push({box:m,cb:1701733238})}).P("avc3",function(m){k.push({box:m,cb:1701733238})}).P("ac-3",function(m){k.push({box:m,cb:1701733217})}).P("ec-3",function(m){k.push({box:m,cb:1701733217})}).P("ac-4",function(m){k.push({box:m,cb:1701733217})}).P("mp4a",function(m){k.push({box:m,cb:1701733217})}).parse(a);if(f)return a;if(0==k.length||!g)throw fb(Ld(a)),new T(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,
306
306
  e=xi(e,g,l.box,h,l.cb);return Xc()&&md()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
307
307
  function xi(a,b,c,d,e){var f=yi.value(),g=a.subarray(c.start,c.start+c.size),h=Fb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Fb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);zi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Yc()||Xc()?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,zi(e,d.start,d.size+k.byteLength);k=Fb(e,b.start);b=Sg(b);
308
308
  a=k.getUint32(b);k.setUint32(b,a+1);return e}function zi(a,b,c){a=Fb(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 yi=new Kc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Ai(a,b,c,d,e,f,g){this.M=a;this.Da=b;this.oa=c;this.gf=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}Ai.prototype.Xb=function(){return this.Da};Ai.prototype.Vb=function(){return this.oa};Ai.prototype.Wc=function(){return this.g};function Ei(a,b){return a===b?!0:a&&b?a.Xb()==b.Xb()&&a.Vb()==b.Vb()&&Qb(a.M().sort(),b.M().sort())&&zb(a.Wc(),b.Wc()):a==b}S("shaka.media.InitSegmentReference",Ai);
309
309
  Ai.prototype.getEndByte=Ai.prototype.Vb;Ai.prototype.getStartByte=Ai.prototype.Xb;
310
310
  function Fi(a,b,c,d,e,f,g,h,k,l,m,n,q,p,u,v){l=void 0===l?[]:l;p=void 0===p?Gi:p;this.startTime=a;this.j=this.endTime=b;this.C=c;this.Da=d;this.oa=e;this.ca=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.A=void 0===n?null:n;this.h=void 0===q?null:q;this.status=p;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.s=null;this.i=0;this.o=void 0===v?!1:v;this.Nd=this.jd=!1;a=t(this.g);for(b=a.next();!b.done;b=
311
- a.next())b.value.ug();this.o&&this.g.length&&this.g[this.g.length-1].tg();this.B=this.mimeType=this.codecs=null}r=Fi.prototype;r.M=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.yh=function(){return this.endTime};r.Xb=function(){return this.Da};r.Vb=function(){return this.oa};r.Rh=function(){return this.tilesLayout};r.Qh=function(){return this.A};r.Yb=function(){return this.status};r.ii=function(){this.status=Hi};r.ff=function(){this.preload=!0};r.ci=function(){return this.preload};
312
- r.Qd=function(){this.l=!1};r.$h=function(){return this.l};r.ug=function(){this.jd=!0};r.bi=function(){return this.jd};r.tg=function(){this.Nd=!0};r.ai=function(){return this.Nd};r.sg=function(){this.m=!0};r.Xh=function(){return this.m};r.Og=function(a){this.s=a};r.Ph=function(){return this.s};r.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=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.j+=a};
313
- r.Jf=function(a){null==this.h?$a("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};r.Li=function(a){this.B=a};r.Wc=function(){return this.B};function Ii(a,b){a.ca=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Ii(c.value,b)}S("shaka.media.SegmentReference",Fi);Fi.prototype.getSegmentData=Fi.prototype.Wc;Fi.prototype.setSegmentData=Fi.prototype.Li;Fi.prototype.syncAgainst=Fi.prototype.Jf;Fi.prototype.offset=Fi.prototype.offset;
314
- Fi.prototype.getThumbnailSprite=Fi.prototype.Ph;Fi.prototype.setThumbnailSprite=Fi.prototype.Og;Fi.prototype.hasByterangeOptimization=Fi.prototype.Xh;Fi.prototype.markAsByterangeOptimization=Fi.prototype.sg;Fi.prototype.isLastPartial=Fi.prototype.ai;Fi.prototype.markAsLastPartial=Fi.prototype.tg;Fi.prototype.isPartial=Fi.prototype.bi;Fi.prototype.markAsPartial=Fi.prototype.ug;Fi.prototype.isIndependent=Fi.prototype.$h;Fi.prototype.markAsNonIndependent=Fi.prototype.Qd;Fi.prototype.isPreload=Fi.prototype.ci;
315
- Fi.prototype.markAsPreload=Fi.prototype.ff;Fi.prototype.markAsUnavailable=Fi.prototype.ii;Fi.prototype.getStatus=Fi.prototype.Yb;Fi.prototype.getTileDuration=Fi.prototype.Qh;Fi.prototype.getTilesLayout=Fi.prototype.Rh;Fi.prototype.getEndByte=Fi.prototype.Vb;Fi.prototype.getStartByte=Fi.prototype.Xb;Fi.prototype.getEndTime=Fi.prototype.yh;Fi.prototype.getStartTime=Fi.prototype.getStartTime;Fi.prototype.getUris=Fi.prototype.M;var Gi=0,Hi=1;Fi.Status={Ui:Gi,Kj:Hi,mj:2};function Ji(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Ki(a){return!a||Ji(a)?null:a.length?a.end(a.length-1):null}function Li(a,b){return!a||!a.length||Ji(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Mi(a,b){if(!a||!a.length||Ji(a))return 0;var c=0;a=t(Ni(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}
311
+ a.next())b.value.ug();this.o&&this.g.length&&this.g[this.g.length-1].tg();this.B=this.mimeType=this.codecs=null}r=Fi.prototype;r.M=function(){return this.C()};r.getStartTime=function(){return this.startTime};r.xh=function(){return this.endTime};r.Xb=function(){return this.Da};r.Vb=function(){return this.oa};r.Qh=function(){return this.tilesLayout};r.Ph=function(){return this.A};r.Yb=function(){return this.status};r.hi=function(){this.status=Hi};r.ff=function(){this.preload=!0};r.bi=function(){return this.preload};
312
+ r.Qd=function(){this.l=!1};r.Zh=function(){return this.l};r.ug=function(){this.jd=!0};r.ai=function(){return this.jd};r.tg=function(){this.Nd=!0};r.$h=function(){return this.Nd};r.sg=function(){this.m=!0};r.Wh=function(){return this.m};r.Og=function(a){this.s=a};r.Oh=function(){return this.s};r.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=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.j+=a};
313
+ r.Jf=function(a){null==this.h?$a("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};r.Ki=function(a){this.B=a};r.Wc=function(){return this.B};function Ii(a,b){a.ca=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Ii(c.value,b)}S("shaka.media.SegmentReference",Fi);Fi.prototype.getSegmentData=Fi.prototype.Wc;Fi.prototype.setSegmentData=Fi.prototype.Ki;Fi.prototype.syncAgainst=Fi.prototype.Jf;Fi.prototype.offset=Fi.prototype.offset;
314
+ Fi.prototype.getThumbnailSprite=Fi.prototype.Oh;Fi.prototype.setThumbnailSprite=Fi.prototype.Og;Fi.prototype.hasByterangeOptimization=Fi.prototype.Wh;Fi.prototype.markAsByterangeOptimization=Fi.prototype.sg;Fi.prototype.isLastPartial=Fi.prototype.$h;Fi.prototype.markAsLastPartial=Fi.prototype.tg;Fi.prototype.isPartial=Fi.prototype.ai;Fi.prototype.markAsPartial=Fi.prototype.ug;Fi.prototype.isIndependent=Fi.prototype.Zh;Fi.prototype.markAsNonIndependent=Fi.prototype.Qd;Fi.prototype.isPreload=Fi.prototype.bi;
315
+ Fi.prototype.markAsPreload=Fi.prototype.ff;Fi.prototype.markAsUnavailable=Fi.prototype.hi;Fi.prototype.getStatus=Fi.prototype.Yb;Fi.prototype.getTileDuration=Fi.prototype.Ph;Fi.prototype.getTilesLayout=Fi.prototype.Qh;Fi.prototype.getEndByte=Fi.prototype.Vb;Fi.prototype.getStartByte=Fi.prototype.Xb;Fi.prototype.getEndTime=Fi.prototype.xh;Fi.prototype.getStartTime=Fi.prototype.getStartTime;Fi.prototype.getUris=Fi.prototype.M;var Gi=0,Hi=1;Fi.Status={Ti:Gi,Jj:Hi,lj:2};function Ji(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function Ki(a){return!a||Ji(a)?null:a.length?a.end(a.length-1):null}function Li(a,b){return!a||!a.length||Ji(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function Mi(a,b){if(!a||!a.length||Ji(a))return 0;var c=0;a=t(Ni(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}
316
316
  function Oi(a,b,c){if(!a||!a.length||Ji(a))return null;a=Ni(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Ni(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};/*
317
317
  @license
318
318
  Shaka Player
@@ -324,8 +324,8 @@ function Ti(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureTyp
324
324
  d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=wd(Bb(a.data,1,d));a=wd(Bb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=wd(Bb(a.data,1,d));a=wd(Bb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=wd(Bb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
325
325
  c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Cb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=wd(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=wd(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Cb(a.data),b):null}
326
326
  function Ui(a){for(var b=0,c=[];Qi(a,b);){var d=Si(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Si(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Ti(e))&&c.push(f);b+=e.size+10}Ri(a,b)&&(b+=10)}return c}function Vi(a,b){for(var c=b=void 0===b?0:b,d=0;Qi(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Si(a,b+6),Ri(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",Pi);Pi.getID3Data=Vi;
327
- Pi.getID3Frames=Ui;function Wi(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Ec());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,Pc:c,yd:d,Oj:e}}function Xi(a,b){return 1==b?(b=a.O(),a=a.O(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.O()}}function Yi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.O();a.skip(4);a=a.ia();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
328
- function Zi(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={xf:null,sampleSize:null,fe:null};c&256&&(h.xf=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.fe=0==b?a.O():a.Bg());e.push(h)}return{Sj:d,Fg:e,sh:f}}function $i(a){a.skip(6);a.skip(2);a.skip(8);var b=a.ia();a.skip(2);a.skip(2);a.skip(2);a=a.ia()+a.ia()/65536;return{channelCount:b,sampleRate:a}}function aj(a){a=a.O();return{codec:Qg(a)}}
327
+ Pi.getID3Frames=Ui;function Wi(a,b){var c=null,d=null,e=null,f=a.O();b&1&&(e=a.Ec());b&2&&a.skip(4);b&8&&(c=a.O());b&16&&(d=a.O());return{trackId:f,Pc:c,yd:d,Nj:e}}function Xi(a,b){return 1==b?(b=a.O(),a=a.O(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.O()}}function Yi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.O();a.skip(4);a=a.ia();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
328
+ function Zi(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={xf:null,sampleSize:null,fe:null};c&256&&(h.xf=a.O());c&512&&(h.sampleSize=a.O());c&1024&&a.skip(4);c&2048&&(h.fe=0==b?a.O():a.Bg());e.push(h)}return{Rj:d,Fg:e,rh:f}}function $i(a){a.skip(6);a.skip(2);a.skip(8);var b=a.ia();a.skip(2);a.skip(2);a.skip(2);a=a.ia()+a.ia()/65536;return{channelCount:b,sampleRate:a}}function aj(a){a=a.O();return{codec:Qg(a)}}
329
329
  function bj(a){var b=null,c=null,d=a.mb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.ia()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.ia();a.ia();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,od:c}}
330
330
  function cj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function dj(a){return(10>a?"0":"")+a};/*
331
331
 
@@ -348,40 +348,40 @@ function hj(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&
348
348
  function tj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=kj(a),d=(c+d+256)%256),c=0===d?c:d}function uj(a){sj(a);V(a);return V(a)}S("shaka.util.ExpGolomb",ej);function vj(){this.G=null;this.H=!1;this.m=this.J=null;this.j=[];this.g=[];this.A=this.B=null;this.i=[];this.h=[];this.C=null;this.l=[];this.F=this.o=this.s=null}r=vj.prototype;r.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
349
349
  r.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,wj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.G=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.G:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Jd:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
350
350
  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(0<m)for(var n=h+5,q=m;2<q;){var p=f[n+1]+2;switch(f[n]){case 5:var u=yd(f.subarray(n+2,n+p));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
351
- null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,nh:u,sampleRate:48E3}))}n+=p;q-=p}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Jd&&(g.Jd=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
351
+ null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,mh:u,sampleRate:48E3}))}n+=p;q-=p}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Jd&&(g.Jd=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
352
352
  break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.J=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.B=f.audio,this.A=f.audioCodec);-1!=f.Jd&&(this.C=f.Jd);d&&!this.H&&(d=!1,e=b-188);this.H=!0;break;case this.J: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.B:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
353
353
  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};
354
354
  function xj(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.s&&(a.s=e);c.pts=yj(e,a.s);a.s=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.o&&(a.o=d),c.dts=yj(d,
355
- a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}r.ni=function(a){rb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.nf(a)};
355
+ a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}r.mi=function(a){rb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.nf(a)};
356
356
  r.nf=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 q=a[n];if(q){if(2<=g&&1==q){b&&!h.length&&-1==k&&(q=n-(3<g?3:g),c&&0!=q&&(q=a.subarray(0,q),b.data=Md(b.data,q),b.fullData=Md(b.fullData,q)));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=Md(b.data,k),b.fullData=Md(b.fullData,k)));if(n>=e-f)return h;
357
357
  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=Md(b.data,a),b.fullData=Md(b.fullData,a));return h};r.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Md.apply(Ed,x(c.value)),(c=xj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Ui(c.data),dts:c.dts,pts:c.pts});return a};
358
358
  r.Ib=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=Md.apply(Ed,x(c.value)),e=xj(this,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=Md(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};
359
359
  r.xc=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=Md.apply(Ed,x(d.value)),f=xj(this,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=Md(d.data,e),this.g.push(d))}if(a){c=[];d=t(this.g);for(e=d.next();!e.done;e=d.next())if(e=e.value,e.nalus=this.nf(e,
360
360
  g,void 0),e.nalus.length){c.push(e);var g=e.nalus[e.nalus.length-1]}this.g=c}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)};r.getStartTime=function(a){if("audio"==a){a=null;var b=this.Ib();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.xc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};r.Tc=function(){return{audio:this.A,video:this.m}};
361
- r.Hd=function(){for(var a=[],b=t(this.xc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};r.Uh=function(){rb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Ue();return{height:a.height,width:a.width}};r.Ue=function(){return"hvc"==this.m?zj(this):Aj(this)};
361
+ r.Hd=function(){for(var a=[],b=t(this.xc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};r.Th=function(){rb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Ue();return{height:a.height,width:a.width}};r.Ue=function(){return"hvc"==this.m?zj(this):Aj(this)};
362
362
  function Aj(a){var b={height:null,width:null,codec:null};a=a.Hd();if(!a.length)return b;a=a.find(function(q){return 7==q.type});if(!a)return b;a=new ej(a.data);var c=sj(a),d=sj(a),e=sj(a);jj(a);if(Bj.includes(c)){var f=V(a);3===f&&gj(a,1);jj(a);jj(a);gj(a,1);if(W(a)){f=3!==f?8:12;for(var g=0;g<f;g++)W(a)&&(6>g?tj(a,16):tj(a,64))}}jj(a);f=V(a);if(0===f)V(a);else if(1===f)for(gj(a,1),jj(a),jj(a),f=V(a),g=0;g<f;g++)jj(a);jj(a);gj(a,1);f=V(a);g=V(a);var h=hj(a,1);0===h&&gj(a,1);gj(a,1);var k=0,l=0,m=
363
363
  0,n=0;W(a)&&(k=V(a),l=V(a),m=V(a),n=V(a));b.height=String((2-h)*(g+1)*16-2*m-2*n);b.width=String(16*(f+1)-2*k-2*l);b.codec="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);return b}
364
364
  function zj(a){var b={height:null,width:null,codec:null};a=a.Hd();if(!a.length)return b;a=a.find(function(z){return 33==z.type});if(!a)return b;var c=new ej(a.fullData,!0);sj(c);sj(c);hj(c,4);var d=hj(c,3);W(c);var e=hj(c,2),f=hj(c,1),g=hj(c,5),h=hj(c,32);a=sj(c);for(var k=sj(c),l=sj(c),m=sj(c),n=sj(c),q=sj(c),p=sj(c),u=[],v=[],w=0;w<d;w++)u.push(W(c)),v.push(W(c));if(0<d)for(w=d;8>w;w++)hj(c,2);for(w=0;w<d;w++)u[w]&&hj(c,88),v[w]&&sj(c);V(c);d=V(c);3==d&&hj(c,1);u=V(c);v=V(c);var A=w=0,y=0,C=0;W(c)&&
365
365
  (w+=V(c),A+=V(c),y+=V(c),C+=V(c));b.width=String(u-(w+A)*(1===d||2===d?2:1));b.height=String(v-(y+C)*(1===d?2:1));c=function(z){for(var B=0,D=0;32>D;D++)B|=(z>>D&1)<<31-D;return B>>>0}(h);f=1==f?"H":"L";e="hvc1"+("."+["","A","B","C"][e]+g);e+="."+c.toString(16).toUpperCase();e+="."+f+p;q&&(e+="."+q.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+="."+
366
- a.toString(16).toUpperCase());b.codec=e;return b}function yj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Cj(a){return 0>wj(a)?!1:!0}function wj(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}S("shaka.util.TsParser",vj);vj.syncOffset=wj;vj.probe=Cj;vj.prototype.getVideoInfo=vj.prototype.Ue;vj.prototype.getVideoResolution=vj.prototype.Uh;vj.prototype.getVideoNalus=vj.prototype.Hd;
367
- vj.prototype.getCodecs=vj.prototype.Tc;vj.prototype.getStartTime=vj.prototype.getStartTime;vj.prototype.getVideoData=vj.prototype.xc;vj.prototype.getAudioData=vj.prototype.Ib;vj.prototype.getMetadata=vj.prototype.getMetadata;vj.prototype.parseNalus=vj.prototype.nf;vj.prototype.parseAvcNalus=vj.prototype.ni;vj.prototype.parse=vj.prototype.parse;vj.prototype.clearData=vj.prototype.clearData;vj.Timescale=9E4;var Bj=[100,110,122,244,44,83,86,118,128,138,139,134];function Dj(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&ab("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,rb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{ab("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(ab("Could not find LCEVC Library on this page"),
366
+ a.toString(16).toUpperCase());b.codec=e;return b}function yj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Cj(a){return 0>wj(a)?!1:!0}function wj(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}S("shaka.util.TsParser",vj);vj.syncOffset=wj;vj.probe=Cj;vj.prototype.getVideoInfo=vj.prototype.Ue;vj.prototype.getVideoResolution=vj.prototype.Th;vj.prototype.getVideoNalus=vj.prototype.Hd;
367
+ vj.prototype.getCodecs=vj.prototype.Tc;vj.prototype.getStartTime=vj.prototype.getStartTime;vj.prototype.getVideoData=vj.prototype.xc;vj.prototype.getAudioData=vj.prototype.Ib;vj.prototype.getMetadata=vj.prototype.getMetadata;vj.prototype.parseNalus=vj.prototype.nf;vj.prototype.parseAvcNalus=vj.prototype.mi;vj.prototype.parse=vj.prototype.parse;vj.prototype.clearData=vj.prototype.clearData;vj.Timescale=9E4;var Bj=[100,110,122,244,44,83,86,118,128,138,139,134];function Dj(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&ab("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,rb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{ab("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(ab("Could not find LCEVC Library on this page"),
368
368
  a=!1):(this.h.SupportObject.SupportStatus||ab(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 Ej(a){a.g&&a.i.classList.add("shaka-hidden")}
369
- Dj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Fj(a,b,c){var d=0,e=-1;switch(b.mimeType){case "video/webm":d=1;break;case "video/mp4":d=2}switch(c){case "DASH":e=1;break;case "HLS":e=0}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",Dj);Dj.prototype.release=Dj.prototype.release;function Gj(a,b,c,d){var e=this;this.i=a;this.ba=c;this.A=null;this.F=b;this.h={};this.G={};this.Ea={};this.g=null;this.ga=!1;this.$=d||null;this.l={};this.s=new hb;this.j={};this.H=null;this.L=new $f;this.N="";this.ua=!1;this.m=Hj(this,this.L);this.C=!1;this.J=new Bg(function(){return Ij(e)});this.B=!1;this.aa="UNKNOWN";this.Fa=this.La=!1;this.ya=new $f;this.o=!1;this.xa=!0;this.ma=this.P=this.na=this.W=this.K=this.da=null;this.wa=new $f}
369
+ Dj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Fj(a,b,c){var d=0,e=-1;switch(b.mimeType){case "video/webm":d=1;break;case "video/mp4":d=2}switch(c){case "DASH":e=1;break;case "HLS":e=0}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",Dj);Dj.prototype.release=Dj.prototype.release;function Gj(a,b,c,d){var e=this;this.i=a;this.ba=c;this.A=null;this.F=b;this.h={};this.G={};this.Ea={};this.g=null;this.ga=!1;this.$=d||null;this.l={};this.s=new hb;this.j={};this.H=null;this.L=new $f;this.N="";this.ua=!1;this.m=Hj(this,this.L);this.C=!1;this.J=new Bg(function(){return Ij(e)});this.B=!1;this.aa="UNKNOWN";this.Fa=this.Ka=!1;this.ya=new $f;this.o=!1;this.xa=!0;this.ma=this.T=this.na=this.W=this.K=this.da=null;this.wa=new $f}
370
370
  function Hj(a,b){if(window.ManagedMediaSource){a.i.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.xa=!0});a.s.D(c,"endstreaming",function(){a.xa=!1});a.s.sa(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.s.sa(a.i,"playing",function(){a.ua=!0});a.N=Jj(c);a.i.src=a.N;return c}c=new MediaSource;a.s.sa(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.s.sa(a.i,"playing",function(){a.ua=!0});a.N=Jj(c);a.i.src=a.N;return c}
371
371
  function Kj(a,b){var c,d,e,f,g,h,k,l,m,n,q;return O(function(p){if(1==p.g)return a.createSegmentIndex?E(p,a.createSegmentIndex(),2):p.u(2);if(!a.segmentIndex)return p.return(!1);if(0==a.segmentIndex.getNumReferences())return p.return(!0);c=Vd;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",l=h+":"+k,!d.has(l))if(d.add(l),b==c.qa){if(m=Xd(h,k),!qe(m))return p.return(!1)}else if(b==c.ea?k=$e(k):b==c.V&&(k=af(k,h)),n=
372
372
  ae(a,h,k),q=Zd(h,k),!mb(n)&&!mc(q))return p.return(!1);return p.return(!0)})}r=Gj.prototype;r.destroy=function(){return this.J.destroy()};
373
373
  function Ij(a){var b,c,d,e,f,g,h,k;return O(function(l){if(1==l.g){b=[];for(c in a.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p.catch(ye)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new T(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.F&&b.push(a.F.destroy());for(k in a.j)b.push(a.j[k].destroy());return E(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.i&&(a.i.removeAttribute("src"),a.i.load(),a.i=null);a.A=null;a.m=null;a.g=null;a.F=null;a.h={};a.j={};a.H=null;
374
- a.l={};a.$=null;a.K=null;a.ba=null;H(l)})}r.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return f=Vd,E(m,e.L,2);case 2:e.B=b,e.aa=c,e.La=d,e.Fa=!e.B&&"HLS"==e.aa&&!e.La,e.K=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return E(m,Lj(e,k,l,l.codecs),6);case 6:e.o?(e.l[f.V]=[],e.l[f.ea]=[]):e.l[k]=[],h=g.next(),m.u(3)}})};
374
+ a.l={};a.$=null;a.K=null;a.ba=null;H(l)})}r.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return f=Vd,E(m,e.L,2);case 2:e.B=b,e.aa=c,e.Ka=d,e.Fa=!e.B&&"HLS"==e.aa&&!e.Ka,e.K=null,g=t(a.keys()),h=g.next();case 3:if(h.done){m.u(0);break}k=h.value;l=a.get(k);return E(m,Lj(e,k,l,l.codecs),6);case 6:e.o?(e.l[f.V]=[],e.l[f.ea]=[]):e.l[k]=[],h=g.next(),m.u(3)}})};
375
375
  function Lj(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v;return O(function(w){switch(w.g){case 1:return e=Vd,f=Ta,g=Va,E(w,Kj(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Xd(c.mimeType,d);if(b==e.qa){Mj(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!mb(h)||!a.B&&Yd.includes(h))k=!0;l=Zd(c.mimeType,d);if(!k){w.u(4);break}m=Rd(e.V,(d||"").split(","));n=Rd(e.ea,(d||"").split(","));if(!m||!n){w.u(5);break}a.o=!0;return E(w,Lj(a,e.V,c,m),6);case 6:return E(w,
376
376
  Lj(a,e.ea,c,n),7);case 7:return w.return();case 5:if(q=mc(l))p=q(),a.j[b]=p,h=p.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Cg(a.J);try{v=a.m.addSourceBuffer(u)}catch(A){throw new T(2,3,3015,A,"The mediaSource_ status was "+a.m.readyState+" expected 'open'",null);}a.B&&(v.mode=Nj);a.s.D(v,"error",function(){var A=a.l[b][0];A.p.reject(new T(2,3,3014,a.i.error?a.i.error.code:0,A.uri))});a.s.D(v,"updateend",function(){return Oj(a,b)});a.h[b]=v;a.G[b]=h;a.Ea[b]=!!c.drmInfos.length;
377
377
  H(w)}})}r.configure=function(a){this.A=a;this.g&&(this.g.A=a.modifyCueCallback)};
378
378
  function Mj(a,b,c,d){a.g||(a.g=new pe(a.F),a.g&&(a.g.A=a.A.modifyCueCallback));var e=a.g;d=d||a.ga;a=a.aa;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,re[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):rb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):rb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
379
379
  function Pj(a){return a.C?!1:a.m?"ended"==a.m.readyState:!0}function Qj(a,b){a.C||!Object.keys(a.h).length?a=null:b==Td?a=a.g.g:(a=Rj(a,b),a=!a||Ji(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null);return a}function Sj(a,b){return a.C?null:b==Td?a.g.h:Ki(Rj(a,b))}function Tj(a,b,c){if(a.C)return 0;if(b==Td)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Rj(a,b);return Mi(a,c)}
380
380
  r.sb=function(){var a={total:this.C?[]:Ni(this.i.buffered),audio:this.C?[]:Ni(Rj(this,"audio")),video:this.C?[]:Ni(Rj(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Rj(a,b){try{return a.h[b].buffered}catch(c){return null}}
381
- function Uj(a,b,c,d,e,f){var g=null,h=Bb(c);if(Yd.includes(e))f=Ui(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.ba.Zd([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.ca&&d.ca.timescale){var k=d.ca.timescale;if(!isNaN(k)){var l=0,m=!1;(new Kg).box("moof",Rg).box("traf",Rg).R("tfdt",function(n){l=Xi(n.reader,
381
+ function Uj(a,b,c,d,e,f){var g=null,h=Bb(c);if(Yd.includes(e))f=Ui(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.ba.Zd([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.ca&&d.ca.timescale){var k=d.ca.timescale;if(!isNaN(k)){var l=0,m=!1;(new Kg).box("moof",Rg).box("traf",Rg).P("tfdt",function(n){l=Xi(n.reader,
382
382
  n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!Cj(h)||(a.K?a.K.clearData():a.K=new vj,h=a.K.parse(h),b=h.getStartTime(b),null!=b&&(g=b),h=h.getMetadata(),h.length&&a.ba.Zd(h,f,d?d.endTime:null));return g}
383
383
  function Vj(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,q,p,u,v,w,A,y,C,z,B,D,I;return O(function(F){switch(F.g){case 1:m=Vd;if(b!=m.qa){F.u(2);break}if(!a.B){F.u(3);break}return E(F,a.ya,4);case 4:n=F.h,a.g.s=n;case 3:return E(F,se(a.g,c,d?d.startTime:null,d?d.endTime:null,d?d.M()[0]:null),5);case 5:return F.return();case 2:if(l||!a.o){F.u(6);break}return E(F,Vj(a,m.V,c,d,e,f,g,h,k,!0),7);case 7:return E(F,Vj(a,m.ea,c,d,e,f,g,h,k,!0),8);case 8:return F.return();
384
- case 6:if(!a.h[b])return F.return();q=a.h[b].timestampOffset;p=a.G[b];a.j[b]&&(p=a.j[b].getOriginalMimeType());d&&(u=Uj(a,b,c,d,p,q),null!=u&&(null==a.W&&b==m.ea&&(a.W=u,a.na=d.startTime,null!=a.P&&(v=0,a.na==a.ma&&(v=a.W-a.P),a.wa.resolve(v))),null==a.P&&b==m.V&&(a.P=u,a.ma=d.startTime,null!=a.W&&(w=0,a.na==a.ma&&(w=a.W-a.P),a.wa.resolve(w))),A=d.startTime-u,y=Math.abs(q-A),(.001<=y||g||h)&&(!k||0<A||!q)&&(q=A,a.Fa&&(Wj(a,b,function(){return Xj(a,b)},null),Wj(a,b,function(){return Yj(a,b,q)},null))),
384
+ case 6:if(!a.h[b])return F.return();q=a.h[b].timestampOffset;p=a.G[b];a.j[b]&&(p=a.j[b].getOriginalMimeType());d&&(u=Uj(a,b,c,d,p,q),null!=u&&(null==a.W&&b==m.ea&&(a.W=u,a.na=d.startTime,null!=a.T&&(v=0,a.na==a.ma&&(v=a.W-a.T),a.wa.resolve(v))),null==a.T&&b==m.V&&(a.T=u,a.ma=d.startTime,null!=a.W&&(w=0,a.na==a.ma&&(w=a.W-a.T),a.wa.resolve(w))),A=d.startTime-u,y=Math.abs(q-A),(.001<=y||g||h)&&(!k||0<A||!q)&&(q=A,a.Fa&&(Wj(a,b,function(){return Xj(a,b)},null),Wj(a,b,function(){return Yj(a,b,q)},null))),
385
385
  C=b==m.ea||!(m.ea in a.h),a.B&&C&&a.ya.resolve(q)));f&&b==m.ea&&(a.g||Mj(a,"application/cea-608",a.B,!1),a.H||(z=p.split(";",1)[0],a.H=new Hb(z)),d?(B=a.H.i(c),B.length&&we(a.g,B,d.startTime,d.endTime,q)):a.H.init(c,h));if(!a.j[b]){F.u(9);break}return E(F,a.j[b].transmux(c,e,d,a.m.duration,b),10);case 10:c=F.h;case 9:c=Zj(a,c,d?d.startTime:null,b,d?d.M()[0]:null);if(!d||!a.B||b==m.qa){F.u(11);break}if(!g&&!h){F.u(11);break}D=d.startTime;if("HLS"!=a.aa||a.o||b!=m.V||!a.h[m.ea]){F.u(13);break}return E(F,
386
386
  a.wa,14);case 14:I=F.h,.1<Math.abs(I)&&(D-=I);case 13:Wj(a,b,function(){return Xj(a,b)},null),Wj(a,b,function(){return Yj(a,b,D)},null);case 11:return E(F,Wj(a,b,function(){var K=c;if("video"==b&&a.$){var J=a.$;J.g&&J.g.appendBuffer(K,"video",J.o,-q)}a.h[b].appendBuffer(K)},d?d.M()[0]:null),15);case 15:H(F)}})}function ak(a,b){var c=Sj(a,"video")||0;ue(a.g,b,c)}function bk(a){a.g&&ue(a.g,"",0)}
387
387
  r.remove=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=Vd,a==e.qa?E(f,d.g.remove(b,c),0):E(f,Wj(d,a,function(){return ck(d,a,b,c)},null),4)):d.o?E(f,Wj(d,e.V,function(){return ck(d,e.V,b,c)},null),0):f.u(0)})};function dk(a,b){var c;return O(function(d){return 1==d.g?(c=Vd,b==c.qa?a.g?E(d,a.g.remove(0,Infinity),0):d.return():E(d,Wj(a,b,function(){return ck(a,b,0,a.m.duration)},null),4)):a.o?E(d,Wj(a,c.V,function(){return ck(a,c.V,0,a.m.duration)},null),0):d.u(0)})}
@@ -392,21 +392,21 @@ function gk(a,b,c){var d;return O(function(e){if(1==e.g){d=Vd;if(b==d.qa)return
392
392
  r.Ua=function(a){var b=this;return O(function(c){return E(c,hk(b,function(){if(a<b.m.duration)for(var d in b.h){var e={start:function(){},p:new $f,uri:null};b.l[d].unshift(e)}b.m.duration=a;b.da=a}),0)})};r.getDuration=function(){return this.m.duration};function ck(a,b,c,d){d<=c?Oj(a,b):a.h[b].remove(c,d)}function Xj(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Oj(a,b)}
393
393
  function Yj(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Oj(a,b)}function Oj(a,b){if(!a.C){var c=a.l[b][0];c&&(c.p.resolve(),ik(a,b))}}function Wj(a,b,c,d){Cg(a.J);c={start:c,p:new $f,uri:d};a.l[b].push(c);1==a.l[b].length&&jk(a,b);return c.p}
394
394
  function hk(a,b){var c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:Cg(a.J);c=[];d={};for(e in a.h)d={ready:void 0},d.ready=new $f,f={start:function(m){return function(){return m.ready.resolve()}}(d),p:d.ready,uri:null},a.l[e].push(f),c.push(d.ready),1==a.l[e].length&&f.start();xa(l,2);return E(l,Promise.all(c),4);case 4:za(l,3);break;case 2:throw g=Aa(l),g;case 3:return xa(l,5,6),E(l,b(),6);case 6:Ba(l);for(h in a.h)ik(a,h);Da(l,0);break;case 5:throw k=Aa(l),new T(2,3,3015,k,a.i.error||"No error in the media element",
395
- null);}})}function ik(a,b){a.l[b].shift();jk(a,b)}function jk(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new T(2,3,3017,b)):c.p.reject(new T(2,3,3015,d,a.i.error||"No error in the media element",c.uri)),ik(a,b)}}function Zj(a,b,c,d,e){var f=null==c,g=a.Ea[d];c=a.ba.Ch();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Nc(c),f=$c()||Yc()||hd()||Xc()&&md()&&c;f&&"mp4"==ce(a.G[d])&&(b=wi(b,e));return b}
395
+ null);}})}function ik(a,b){a.l[b].shift();jk(a,b)}function jk(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new T(2,3,3017,b)):c.p.reject(new T(2,3,3015,d,a.i.error||"No error in the media element",c.uri)),ik(a,b)}}function Zj(a,b,c,d,e){var f=null==c,g=a.Ea[d];c=a.ba.Bh();if(f=a.A.insertFakeEncryptionInInit&&f&&g)c=Nc(c),f=$c()||Yc()||hd()||Xc()&&md()&&c;f&&"mp4"==ce(a.G[d])&&(b=wi(b,e));return b}
396
396
  function kk(a,b,c,d){return Wj(a,b,function(){b!==Td&&(pb()&&(a.j[b]&&(a.j[b].destroy(),delete a.j[b]),d&&(a.j[b]=d),a.h[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.G[b]=c),Oj(a,b))},null)}
397
397
  function lk(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K;return O(function(J){switch(J.g){case 1:c=Vd;a.C=!0;a.o=!1;d=a.i.currentTime;e=a.i.autoplay;f=a.i.paused;a.ua&&(a.i.autoplay=!1);ya(J,2);a.s.nb();g=[];for(h in a.j)g.push(a.j[h].destroy());for(k in a.l)for(l=a.l[k],m=l[0],a.l[k]=l.slice(0,1),m&&g.push(m.p.catch(ye)),n=t(l.slice(1)),q=n.next();!q.done;q=n.next())p=q.value,p.p.reject(new T(2,7,7003,void 0));for(u in a.h){v=a.h[u];try{a.m.removeSourceBuffer(v)}catch(G){}}return E(J,
398
398
  Promise.all(g),4);case 4:return a.j={},a.h={},w=a.m.duration,a.L=new $f,a.m=Hj(a,a.L),E(J,a.L,5);case 5:!isNaN(w)&&w?a.m.duration=w:!isNaN(a.da)&&a.da&&(a.m.duration=a.da),A=new $f,y=a.m.sourceBuffers,C=b.size,z=0,B=function(){z++;z===C&&(A.resolve(),a.s.Gb(y,"addsourcebuffer",B))},a.s.D(y,"addsourcebuffer",B),D=t(b.keys()),I=D.next();case 6:if(I.done)return a.i.currentTime=d,E(J,A,2);F=I.value;K=b.get(F);return E(J,Lj(a,F,K,K.codecs),9);case 9:a.o?(a.l[c.V]=[],a.l[c.ea]=[]):a.l[F]=[];I=D.next();
399
399
  J.u(6);break;case 2:Ba(J),a.C=!1,Cg(a.J),a.s.sa(a.i,"canplaythrough",function(){a.J.g||(a.i.autoplay=e,f||a.i.play())}),Da(J,0)}})}function mk(a,b){return hk(a,function(){return lk(a,b)})}
400
400
  function fk(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,u,v,w,A,y,C;return O(function(z){if(1==z.g){f=Vd;if(b==f.qa)return z.return(!1);g=de(ne(a.G[b]));h=le(a.G[b]);l=!1;m=Xd(c,d);n=a.A.forceTransmux;if(!mb(m)||!a.B&&Yd.includes(m))n=!0;n&&(q=Zd(c,d),p=mc(q))&&(k=p(),u=Rd(f.V,(d||"").split(",")),v=Rd(f.ea,(d||"").split(",")),u&&v?(l=!0,w=v,b==f.V&&(w=u),m=k.convertCodecs(b,Zd(c,w))):m=k.convertCodecs(b,q));A=de(ne(m));y=le(m);if(g===A&&h===y)return a.j[b]&&!k?(a.j[b].destroy(),delete a.j[b]):!a.j[b]&&k?a.j[b]=
401
401
  k:k&&(a.j[b]&&a.j[b].transmux!=k.transmux?(a.j[b].destroy(),delete a.j[b],a.j[b]=k):k.destroy()),z.return(!1);C=!0;if(a.o||l&&k&&!a.j[b])C=!1;if(C&&"smooth"===a.A.codecSwitchingStrategy&&pb())return E(z,kk(a,b,m,k),3);k&&k.destroy();return E(z,mk(a,e),3)}return z.return(!0)})}
402
- function nk(a,b,c,d){if(b==Td)var e=!1;else{e=de(ne(a.G[b]));var f=le(a.G[b]),g=Xd(c,d),h=a.A.forceTransmux;if(!mb(g)||!a.B&&Yd.includes(g))h=!0;c=Zd(c,d);h&&(h=mc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=de(ne(g));g=le(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!pb()||a.o:!1}var Jj=window.URL.createObjectURL,Nj="sequence";function ok(a,b,c){this.i=a;this.s=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.F=!0;this.G=0;this.C=void 0===c?!0:c;this.H=0;this.o=!1;this.B=a}r=ok.prototype;r.getDuration=function(){return this.j};r.Fh=function(){return this.g};r.Mg=function(a){this.i=a};r.Ua=function(a){this.j=a};r.Kh=function(){return this.i};r.Kg=function(a){this.A=a};r.ic=function(a){this.F=a};r.he=function(a){this.m=a};r.Gd=function(){return this.m};r.Cf=function(a){this.s=a};r.xh=function(){return this.s};
402
+ function nk(a,b,c,d){if(b==Td)var e=!1;else{e=de(ne(a.G[b]));var f=le(a.G[b]),g=Xd(c,d),h=a.A.forceTransmux;if(!mb(g)||!a.B&&Yd.includes(g))h=!0;c=Zd(c,d);h&&(h=mc(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=de(ne(g));g=le(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!pb()||a.o:!1}var Jj=window.URL.createObjectURL,Nj="sequence";function ok(a,b,c){this.i=a;this.s=b;this.m=this.j=Infinity;this.g=1;this.h=this.l=null;this.A=0;this.F=!0;this.G=0;this.C=void 0===c?!0:c;this.H=0;this.o=!1;this.B=a}r=ok.prototype;r.getDuration=function(){return this.j};r.Eh=function(){return this.g};r.Mg=function(a){this.i=a};r.Ua=function(a){this.j=a};r.Jh=function(){return this.i};r.Kg=function(a){this.A=a};r.ic=function(a){this.F=a};r.he=function(a){this.m=a};r.Gd=function(){return this.m};r.Cf=function(a){this.s=a};r.wh=function(){return this.s};
403
403
  r.xg=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Wd(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.C&&!this.o&&(this.i=(Date.now()+this.A)/1E3-this.h-this.g)}};
404
- r.hd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/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.Wd(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=d-this.h-this.g)}};r.Od=function(){this.o=!0};r.di=function(){return this.o};r.Lg=function(a){this.B=a};r.Bh=function(){return this.B};
404
+ r.hd=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/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.Wd(b);this.h=Math.max(this.h,c);null!=this.i&&this.C&&!this.o&&(this.i=d-this.h-this.g)}};r.Od=function(){this.o=!0};r.ci=function(){return this.o};r.Lg=function(a){this.B=a};r.Ah=function(){return this.B};
405
405
  r.Wd=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.hf=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.U=function(){return Infinity==this.j&&!this.F};r.ac=function(){return Infinity!=this.j&&!this.F};r.ib=function(){return Math.max(this.G,this.Kb()-this.m)};r.Qg=function(a){this.G=a};
406
406
  r.Kb=function(){return this.U()||this.ac()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.i)+this.H,this.j):this.h?Math.min(this.h,this.j):this.j};r.Vc=function(a){var b=Math.max(this.l,this.G);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Kb()-this.m+a,this.ub()))};r.Jb=function(){return this.Vc(0)};r.ub=function(){return Math.max(0,this.Kb()-(this.U()||this.ac()?this.s:0))};r.Wg=function(){return null==this.i||null!=this.h&&this.C?!1:!0};
407
407
  r.Jg=function(a){this.H=a};S("shaka.media.PresentationTimeline",ok);ok.prototype.setAvailabilityTimeOffset=ok.prototype.Jg;ok.prototype.usingPresentationStartTime=ok.prototype.Wg;ok.prototype.getSeekRangeEnd=ok.prototype.ub;ok.prototype.getSeekRangeStart=ok.prototype.Jb;ok.prototype.getSafeSeekRangeStart=ok.prototype.Vc;ok.prototype.getSegmentAvailabilityEnd=ok.prototype.Kb;ok.prototype.setUserSeekStart=ok.prototype.Qg;ok.prototype.getSegmentAvailabilityStart=ok.prototype.ib;
408
- ok.prototype.isInProgress=ok.prototype.ac;ok.prototype.isLive=ok.prototype.U;ok.prototype.offset=ok.prototype.offset;ok.prototype.notifyMaxSegmentDuration=ok.prototype.hf;ok.prototype.notifyMinSegmentStartTime=ok.prototype.Wd;ok.prototype.getInitialProgramDateTime=ok.prototype.Bh;ok.prototype.setInitialProgramDateTime=ok.prototype.Lg;ok.prototype.isStartTimeLocked=ok.prototype.di;ok.prototype.lockStartTime=ok.prototype.Od;ok.prototype.notifySegments=ok.prototype.hd;ok.prototype.notifyTimeRange=ok.prototype.xg;
409
- ok.prototype.getDelay=ok.prototype.xh;ok.prototype.setDelay=ok.prototype.Cf;ok.prototype.getSegmentAvailabilityDuration=ok.prototype.Gd;ok.prototype.setSegmentAvailabilityDuration=ok.prototype.he;ok.prototype.setStatic=ok.prototype.ic;ok.prototype.setClockOffset=ok.prototype.Kg;ok.prototype.getPresentationStartTime=ok.prototype.Kh;ok.prototype.setDuration=ok.prototype.Ua;ok.prototype.setPresentationStartTime=ok.prototype.Mg;ok.prototype.getMaxSegmentDuration=ok.prototype.Fh;
408
+ ok.prototype.isInProgress=ok.prototype.ac;ok.prototype.isLive=ok.prototype.U;ok.prototype.offset=ok.prototype.offset;ok.prototype.notifyMaxSegmentDuration=ok.prototype.hf;ok.prototype.notifyMinSegmentStartTime=ok.prototype.Wd;ok.prototype.getInitialProgramDateTime=ok.prototype.Ah;ok.prototype.setInitialProgramDateTime=ok.prototype.Lg;ok.prototype.isStartTimeLocked=ok.prototype.ci;ok.prototype.lockStartTime=ok.prototype.Od;ok.prototype.notifySegments=ok.prototype.hd;ok.prototype.notifyTimeRange=ok.prototype.xg;
409
+ ok.prototype.getDelay=ok.prototype.wh;ok.prototype.setDelay=ok.prototype.Cf;ok.prototype.getSegmentAvailabilityDuration=ok.prototype.Gd;ok.prototype.setSegmentAvailabilityDuration=ok.prototype.he;ok.prototype.setStatic=ok.prototype.ic;ok.prototype.setClockOffset=ok.prototype.Kg;ok.prototype.getPresentationStartTime=ok.prototype.Jh;ok.prototype.setDuration=ok.prototype.Ua;ok.prototype.setPresentationStartTime=ok.prototype.Mg;ok.prototype.getMaxSegmentDuration=ok.prototype.Eh;
410
410
  ok.prototype.getDuration=ok.prototype.getDuration;function pk(a,b,c){this.j=c;this.l=a;this.s=qk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}pk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function rk(a,b){a.i=b}function sk(a){this.g=a}function qk(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Ni(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 tk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.s=c;this.l=new hb;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return uk(f)});this.m=(new Tc(function(){uk(f)})).Va(this.s.gapJumpTimerTime)}tk.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.B=this.A=null};tk.prototype.lf=function(){this.o=!0;uk(this)};
411
411
  function uk(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.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=qk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new U("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=Oi(c,b,a.s.gapDetectionThreshold),
412
412
  null!=d&&(0!=d||a.o))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||Yc())e=Math.ceil(100*(e+.01))/100;e>=a.B.ub()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new U("gapjumped")))}}}};function vk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=wk.value().get(b),c.sa(a,b,d))}var wk=new Kc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function xk(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new hb;this.i=new yk(a);vk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){zk(e,e.j())})}xk.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 Ak(a){return a.o?a.g.currentTime:a.j()}
@@ -417,992 +417,991 @@ function Fk(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.
417
417
  function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Jb():g.g.ub():0>h&&(h=g.g.ub()+h);return Ik(g,Jk(g,h))});this.m=new Tc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ak(g.h),k=g.g.Jb(),l=g.g.ub();3>l-k&&(k=l-3);h<k&&(h=Hk(g,h),g.i.currentTime=h)}})}r=Fk.prototype;r.ready=function(){this.m.Va(.25)};r.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.A=function(){}};
418
418
  r.re=function(a){Bk(this.h,a)};r.pd=function(){var a=Ak(this.h);return 0<this.i.readyState&&!this.i.paused?Jk(this,a):a};r.Uf=function(){return this.o?this.o.o:0};r.Tf=function(){return this.j.C};r.wg=function(){this.j.lf()};function Ik(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
419
419
  function Hk(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Jb(),f=a.g.ub(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Vc(c),k=a.g.Vc(d);c=a.g.Vc(c+d);return b>=g?Ik(a,b):b>f?f:b<e?Li(a.i.buffered,k)?k:c:b>=h||Li(a.i.buffered,b)?b:c}function Jk(a,b){var c=a.g.Jb();if(b<c)return c;a=a.g.ub();return b>a?a:b}
420
- function Gk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new pk(new sk(a),b.stallThreshold,c);rk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Kk(a){this.g=a;this.m=null;this.j=0;this.o=!1}r=Kk.prototype;r.getNumReferences=function(){return this.g.length};r.getNumEvicted=function(){return this.j};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.ji=function(){this.o=!0};r.Rb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
420
+ function Gk(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new pk(new sk(a),b.stallThreshold,c);rk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Kk(a){this.g=a;this.m=null;this.j=0;this.o=!1}r=Kk.prototype;r.getNumReferences=function(){return this.g.length};r.getNumEvicted=function(){return this.j};r.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};r.ii=function(){this.o=!0};r.Rb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};
421
421
  r.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};r.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
422
- r.Sd=function(a){if(!this.o&&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,x(a))}};r.gd=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.Sd(a);this.Ma(b)};r.Ma=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
422
+ r.Sd=function(a){if(!this.o&&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,x(a))}};r.gd=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.Sd(a);this.La(b)};r.La=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.j+=b-this.g.length}};
423
423
  r.tc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){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],b=new Fi(a.startTime,b,a.C,a.Da,a.oa,a.ca,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.A,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
424
424
  r.je=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new Tc(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Va(a))};Kk.prototype[Symbol.iterator]=function(){return this.zb(0)};
425
425
  Kk.prototype.zb=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return $a("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new Lk(this,d,f,c)};function Mk(a,b,c){a=new Fi(a,a+b,function(){return c},0,null,null,a,a,a+b);return new Kk([a])}
426
- S("shaka.media.SegmentIndex",Kk);Kk.forSingleSegment=Mk;Kk.prototype.getIteratorForTime=Kk.prototype.zb;Kk.prototype.updateEvery=Kk.prototype.je;Kk.prototype.fit=Kk.prototype.tc;Kk.prototype.evict=Kk.prototype.Ma;Kk.prototype.mergeAndEvict=Kk.prototype.gd;Kk.prototype.offset=Kk.prototype.offset;Kk.prototype.get=Kk.prototype.get;Kk.prototype.find=Kk.prototype.find;Kk.prototype.markImmutable=Kk.prototype.ji;Kk.prototype.release=Kk.prototype.release;Kk.prototype.getNumEvicted=Kk.prototype.getNumEvicted;
427
- Kk.prototype.getNumReferences=Kk.prototype.getNumReferences;function Lk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Lk.prototype.Ic=function(a){this.reverse=a};Lk.prototype.rh=function(){return this.h};Lk.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
428
- Lk.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};S("shaka.media.SegmentIterator",Lk);Lk.prototype.next=Lk.prototype.next;Lk.prototype.current=Lk.prototype.current;Lk.prototype.currentPosition=Lk.prototype.rh;
426
+ S("shaka.media.SegmentIndex",Kk);Kk.forSingleSegment=Mk;Kk.prototype.getIteratorForTime=Kk.prototype.zb;Kk.prototype.updateEvery=Kk.prototype.je;Kk.prototype.fit=Kk.prototype.tc;Kk.prototype.evict=Kk.prototype.La;Kk.prototype.mergeAndEvict=Kk.prototype.gd;Kk.prototype.offset=Kk.prototype.offset;Kk.prototype.get=Kk.prototype.get;Kk.prototype.find=Kk.prototype.find;Kk.prototype.markImmutable=Kk.prototype.ii;Kk.prototype.release=Kk.prototype.release;Kk.prototype.getNumEvicted=Kk.prototype.getNumEvicted;
427
+ Kk.prototype.getNumReferences=Kk.prototype.getNumReferences;function Lk(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}Lk.prototype.Ic=function(a){this.reverse=a};Lk.prototype.qh=function(){return this.h};Lk.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.o&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
428
+ Lk.prototype.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.o&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};S("shaka.media.SegmentIterator",Lk);Lk.prototype.next=Lk.prototype.next;Lk.prototype.current=Lk.prototype.current;Lk.prototype.currentPosition=Lk.prototype.qh;
429
429
  Lk.prototype.setReverse=Lk.prototype.Ic;function Nk(){Kk.call(this,[]);this.h=[]}qa(Nk,Kk);r=Nk.prototype;r.clone=function(){var a=new Nk;a.h=this.h.slice();return a};r.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};r.Rb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Rb(a)};r.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.getNumEvicted()+d.getNumReferences()}return null};
430
- r.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;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};r.offset=function(){};r.Sd=function(){};r.Ma=function(){};r.gd=function(){};r.tc=function(){};r.je=function(){};S("shaka.media.MetaSegmentIndex",Nk);Nk.prototype.updateEvery=Nk.prototype.je;Nk.prototype.fit=Nk.prototype.tc;Nk.prototype.mergeAndEvict=Nk.prototype.gd;Nk.prototype.evict=Nk.prototype.Ma;Nk.prototype.merge=Nk.prototype.Sd;
430
+ r.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;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};r.offset=function(){};r.Sd=function(){};r.La=function(){};r.gd=function(){};r.tc=function(){};r.je=function(){};S("shaka.media.MetaSegmentIndex",Nk);Nk.prototype.updateEvery=Nk.prototype.je;Nk.prototype.fit=Nk.prototype.tc;Nk.prototype.mergeAndEvict=Nk.prototype.gd;Nk.prototype.evict=Nk.prototype.La;Nk.prototype.merge=Nk.prototype.Sd;
431
431
  Nk.prototype.offset=Nk.prototype.offset;Nk.prototype.get=Nk.prototype.get;Nk.prototype.find=Nk.prototype.find;Nk.prototype.forEachTopLevelReference=Nk.prototype.Rb;Nk.prototype.release=Nk.prototype.release;function Ok(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Fd();this.h=new Tc(function(){b.g.vg(.25*b.i)})}Ok.prototype.release=function(){this.set(this.Ub());this.h&&(this.h.stop(),this.h=null);this.g=null};Ok.prototype.set=function(a){this.i=a;Pk(this)};Ok.prototype.Ub=function(){return this.g.Ub()};function Pk(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Fd()!=b&&a.g.Ff(b);return}catch(c){}a.h.Va(.25);0!=a.g.Fd()&&a.g.Ff(0)};function Qk(a){var b=this;this.h=a;this.g=new Set;this.i=(new Tc(function(){Rk(b,!1)})).Va(.25)}Qk.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 Rk(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Sk(){this.g=null;this.h=[]}function Tk(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 Uk(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 Vk(){this.i=this.h=null;this.g=[]}function Wk(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 Xk(){this.sd=this.A=this.B=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.L=this.N=this.H=this.J=this.K=this.l=this.o=NaN;this.g=new Sk;this.h=new Vk};function Yk(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.o=d}function Zk(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
432
432
  function $k(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.zb(b,!0,a.o)),a.g)){for(c&&a.g.next();a.h.size<a.m;){b=a.g.next().value;if(!b)break;c=!0;b.preload&&null!=b.oa&&(c=!1);2==b.Yb()&&(c=!1);c&&b.ca&&al(a,b.ca);c&&!a.h.has(b)&&(c=new bl(a.l),cl(c,b,a.i),a.h.set(b,c));if(a.i.fastSwitching&&b.jd&&b.Nd)break}dl(a)}}function al(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return Ei(d,b)})){var c=new bl(a.l);cl(c,b,a.i);a.j.set(b,c)}}
433
- function el(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&fl(a,c)}function gl(a){el(a,a.h);el(a,a.j);a.g=null}Yk.prototype.Ma=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&fl(this,d);b&&dl(this)};Yk.prototype.Ic=function(a){this.o=a;this.g&&this.g.Ic(a)};
433
+ function el(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&fl(a,c)}function gl(a){el(a,a.h);el(a,a.j);a.g=null}Yk.prototype.La=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&fl(this,d);b&&dl(this)};Yk.prototype.Ic=function(a){this.o=a;this.g&&this.g.Ic(a)};
434
434
  function dl(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={Xe:void 0},d=c.next())e.Xe=d.value,b.some(function(f){return function(g){return Ei(g.ca,f.Xe)}}(e))||fl(a,e.Xe)}function hl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&fl(a,d)}dl(a)}function il(a,b){b&&b!==a.i&&(gl(a),a.i=b)}function fl(a,b){var c=a.h;b instanceof Ai&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function bl(a){this.g=a;this.$d=this.If=null}
435
435
  function cl(a,b,c){var d=new Uint8Array(0);a.$d=a.g(b,c,function(e){return O(function(f){if(1==f.g)return 0<d.byteLength?d=Md(d,e):d=e,a.If?E(f,a.If(d),3):f.u(0);d=new Uint8Array(0);H(f)})})}bl.prototype.abort=function(){this.$d&&this.$d.abort()};function jl(a){jg.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Tc(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 U("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Va(2)}qa(jl,jg);jl.prototype.release=function(){this.g.clear();this.h.stop();jg.prototype.release.call(this)};function kl(a){jg.call(this);this.g=new Map;this.h=a}qa(kl,jg);kl.prototype.release=function(){this.g.clear();jg.prototype.release.call(this)};function ll(a,b){var c=a.g.get(b);c||(c={ld:[],ag:null,contentType:b},a.g.set(b,c));return c}function ml(a,b,c){var d=ll(a,b.contentType);nl(a,d);a={gf:b,position:c};d=d.ld;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
436
436
  kl.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.ld;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.gf;break a}}d=null}if(e=d)e=c.ag,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);
437
- 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.ag=d,JSON.stringify(d),c=new U("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function nl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.ld;b.ld=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.ld=[]};function ol(a,b,c,d,e){a=rg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function pl(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.C=new Map;this.B=1;this.s=this.j=null;this.J=0;this.G=!1;this.i=new Map;this.F=!1;this.K=null;this.A=!1;this.l=new Bg(function(){return ql(c)});this.L=Date.now()/1E3;this.o=new Map;this.H={projection:null,hfov:null};this.P=0;this.N=Infinity}r=pl.prototype;r.destroy=function(){return this.l.destroy()};
438
- function ql(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,rl(e),b.push(sl(e)),e.T&&(gl(e.T),e.T=null),tl(a,e);f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,gl(h);return E(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.C.clear();a.g=null;a.m=null;a.h=null;H(k)})}
439
- r.configure=function(a){this.h=a;this.K=new Xf({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);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.T&&(gl(b.T),b.T=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,gl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Td))&&
440
- b.T&&(gl(b.T),b.T=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.T&&(gl(b.T),b.T=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.T?(hl(c.T,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(gl(c.T),c.T=null)):0<a.segmentPrefetchLimit&&(c.T=ul(this,c.stream));a.disableAudioPrefetch||vl(this)};function wl(a,b,c){a.m.presentationTimeline.U()||(a.P=b,a.N=c)}
441
- r.start=function(a){var b=this;return O(function(c){if(1==c.g)return E(c,xl(b,a||new Map),2);Cg(b.l);b.F=!0;H(c)})};function yl(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Vd,a.J++,d=a.J,xa(l,2),E(l,dk(a.g.Y,c.qa),4);case 4:za(l,3);break;case 2:if(e=Aa(l),a.g)a.g.onError(e);case 3:f=Xd(b.mimeType,b.codecs),Mj(a.g.Y,f,a.m.sequenceMode,b.external),g=a.g.Y.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.J==d&&(k=zl(a,b),a.i.set(c.qa,k),Al(a,k,0)),H(l)}})}
442
- function Bl(a){var b=a.i.get(Td);b&&(rl(b),sl(b).catch(function(){}),a.i.delete(Td));a.s=null}function Cl(a,b){for(var c=0>a.g.Za(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.fa&&e.fa.Ic(c),e.T&&e.T.Ic(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.Ic(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.hc&&(Dl(a,b,!1,0,!1),c.hc=d);else if(b=c.hc)c.hc=null,Dl(a,b,!0,0,!1)}
443
- function El(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.F&&(b.video&&Dl(a,b.video,c,d,e,f),b.audio&&Dl(a,b.audio,c,d,e,f))}function Fl(a,b){O(function(c){if(1==c.g)return a.s=b,a.F?b.segmentIndex?c.u(2):E(c,b.createSegmentIndex(),2):c.return();Dl(a,b,!0,0,!1);H(c)})}
444
- function tl(a,b){for(var c=t(a.C.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(d.includes(b.type)){e=t(e);for(var f=e.next();!f.done;f=e.next())(f=f.value)&&f.release();a.C.delete(d)}}}
445
- function Dl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Td?g&&(g.hc&&(b.trickModeVideo?(g.hc=b,b=b.trickModeVideo):g.hc=null),g.stream!=b||e)&&(a.o.has(b)?g.T=a.o.get(b):g.T&&il(g.T,b),b.type==Td&&(e=Xd(b.mimeType,b.codecs),Mj(a.g.Y,e,a.m.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Ja?(e="("+g.type+":"+g.stream.id+")",a.C.has(e)?a.C.get(e).push(g.stream.segmentIndex):a.C.set(e,[g.stream.segmentIndex])):g.stream.closeSegmentIndex()),g.stream=b,g.fa=null,g.Vf=!!f,
446
- c?g.Lc?g.pe=!0:g.Ja?(g.Pb=!0,g.xd=d,g.pe=!0):(rl(g),Gl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Ja||g.pb||Al(a,g,0),Hl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):yl(a,b)}
447
- function Hl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.eb)return e.return();c=b.stream;d=b.eb;return c.segmentIndex?e.u(2):E(e,c.createSegmentIndex(),2)}if(b.eb!=d||b.stream!=c)return e.return();var f=a.g.Ed();var g=Sj(a.g.Y,b.type),h=b.stream.segmentIndex.find(b.Na?b.Na.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.oa?k.oa-k.Da:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ca)&&(h+=(k.oa?k.oa-k.Da:null)||0),k=a.g.getBandwidthEstimate(),
448
- 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();H(e)})}
449
- r.Gc=function(){if(this.g)for(var a=this.g.Ed(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.Y;e.C?e=!1:d==Td?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Rj(e,d),e=Li(e,a));if(!e){c.T&&(c.T.g=null);if("audio"===c.type){e=t(this.o.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.fa=null;(null!=Sj(this.g.Y,d)||c.Ja)&&Il(this,c);c.eb&&(c.eb.abort(),c.eb=null);d===Td&&(d=this.g.Y,d.H&&d.H.g());c.Gc=!0}}};
450
- function Il(a,b){b.Lc||b.Pb||(b.Ja?(b.Pb=!0,b.xd=0):null==Qj(a.g.Y,b.type)?null==b.pb&&Al(a,b,0):(rl(b),Gl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
451
- function xl(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(q){if(1==q.g){c=Vd;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.V,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ea,a.j.video),e.add(a.j.video));a.s&&(d.set(c.qa,a.s),e.add(a.s));f=a.g.Y;return E(q,f.init(d,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}Cg(a.l);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=zl(a,l),b.has(l.id)&&(n=
452
- b.get(l.id),Zk(n,function(p,u,v){return Jl(p,u,v||null,a.h.retryParameters,a.g.Cb)}),m.T=n),a.i.set(k,m),Al(a,m,0));H(q)})}function zl(a,b){return{stream:b,type:b.type,fa:null,T:ul(a,b),Na:null,bc:null,df:null,bf:null,af:null,hc:null,endOfStream:!1,Ja:!1,pb:null,Pb:!1,xd:0,pe:!1,Lc:!1,Gc:!0,tf:!1,Zc:!1,eb:null}}
453
- function ul(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Td&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Td&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.T)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new Yk(a.h.segmentPrefetchLimit,b,function(d,e,f){return Jl(d,e,f||null,a.h.retryParameters,a.g.Cb)},0>a.g.Za()):null}
454
- function vl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=t(a.m.variants),e=d.next(),f={};!e.done;f={gb:void 0},e=d.next())if(f.gb=e.value,f.gb.audio)if(a.o.has(f.gb.audio)){if(e=a.o.get(f.gb.audio),hl(e,b),!(0<b&&c.some(function(h){return function(k){return Be(h.gb.audio.language,k)}}(f)))){var g=a.i.get(f.gb.audio.type);e!==(g&&g.T)&&gl(e);a.o.delete(f.gb.audio)}}else 0>=b||!c.some(function(h){return function(k){return Be(h.gb.audio.language,k)}}(f))||!(e=ul(a,f.gb.audio))||
455
- (f.gb.audio.segmentIndex||f.gb.audio.createSegmentIndex(),a.o.set(f.gb.audio,e))}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.Y.Ua(a):this.g.Y.Ua(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
456
- function Kl(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:Cg(a.l);if(b.Ja||null==b.pb||b.Lc)return h.return();b.pb=null;if(!b.Pb){h.u(2);break}return E(h,Gl(a,b,b.pe,b.xd),3);case 3:return h.return();case 2:tl(a,b);if(b.stream.segmentIndex){h.u(4);break}c=b.stream;return E(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ja||b.pb||Al(a,b,0),h.return();case 4:xa(h,6);d=Ll(a,b);null!=d&&(Al(a,b,d),b.Zc=!1);za(h,7);break;case 6:return e=
457
- Aa(h),E(h,Ml(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.u(0);break}return E(h,a.g.Y.endOfStream(),10);case 10:Cg(a.l),g=a.g.Y.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ua(g),H(h)}})}
458
- function Ll(a,b){if(Nl(b))return ak(a.g.Y,b.stream.originalId||""),null;b.type==Td&&bk(a.g.Y);if(!a.g.Y.xa&&b.type!=Td)return a.h.updateIntervalSeconds/2;var c=a.g.Ed();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.Ma(c,!0),$k(e,c);d=b.Na?b.Na.endTime:c;var f=Tj(a.g.Y,b.type,c),g=Math.max(1,Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),h=a.m.presentationTimeline.getDuration()-d;e=Sj(a.g.Y,b.type);if(1E-6>h&&e)return b.endOfStream=
459
- !0,"video"==b.type&&(a=a.i.get(Td))&&Nl(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.fa;e=Ol(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.Vf&&(f=!0,b.Vf=!1);g=Infinity;h=Array.from(a.i.values());h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,Nl(k)||k.fa&&!k.fa.current()||(g=Math.min(g,k.Na?k.Na.endTime:c));if(d>=g+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;b.T&&b.fa&&!a.o.has(b.stream)&&(b.T.Ma(e.startTime),$k(b.T,
460
- e.startTime));Pl(a,b,c,e,f).catch(function(){});return null}function Ol(a,b,c,d){if(b.fa)return b.fa.current();if(b.Na||d)return b.fa=b.stream.segmentIndex.zb(b.Na?b.Na.endTime:d,!1,0>a.g.Za()),b.fa&&b.fa.next().value;d=a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Za();var f=null;d&&(b.fa=b.stream.segmentIndex.zb(e,!1,a),f=b.fa&&b.fa.next().value);f||(b.fa=b.stream.segmentIndex.zb(c,!1,a),f=b.fa&&b.fa.next().value);return f}
461
- function Pl(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:f=Vd;g=b.stream;h=b.fa;b.Ja=!0;xa(B,2);if(2==d.Yb())throw new T(1,1,1011);return E(B,Ql(a,b,d,e),4);case 4:Cg(a.l);if(a.A)return B.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if(a.h.lowLatencyMode&&l&&k&&("HLS"!=a.m.type||d.m))return q=new Uint8Array(0),u=p=!1,w=function(D){var I,F,K,J;return O(function(G){switch(G.g){case 1:if(p)return G.return();u=!0;Cg(a.l);
462
- if(a.A)return G.return();xa(G,2);q=Rl(q,D);I=!1;F=0;(new Kg).box("mdat",function(L){F=L.size+L.start;I=!0}).parse(q,!1,!0);if(!I){G.u(4);break}K=q.subarray(0,F);q=q.subarray(F);return E(G,Sl(a,b,c,g,d,K,!0,e),5);case 5:b.T&&b.fa&&$k(b.T,d.startTime,!0);case 4:za(G,0);break;case 2:v=J=Aa(G),H(G)}})},E(B,Tl(a,b,d,w),9);m=Tl(a,b,d);return E(B,m,7);case 7:n=B.h;Cg(a.l);if(a.A)return B.return();Cg(a.l);return b.Pb?(b.Ja=!1,Al(a,b,0),B.return()):E(B,Sl(a,b,c,g,d,n,!1,e),6);case 9:A=B.h;if(v)throw v;if(u){B.u(10);
463
- break}p=!0;Cg(a.l);return a.A?B.return():b.Pb?(b.Ja=!1,Al(a,b,0),B.return()):E(B,Sl(a,b,c,g,d,A,!1,e),10);case 10:b.T&&b.fa&&$k(b.T,d.startTime,!0);case 6:Cg(a.l);if(a.A)return B.return();b.Na=d;h.next();b.Ja=!1;b.tf=!1;y=a.g.Y.sb();C=y[b.type];eb(JSON.stringify(C));b.Pb||a.g.lf(d,b.stream);Al(a,b,0);za(B,0);break;case 2:z=Aa(B);Cg(a.l,z);if(a.A)return B.return();b.Ja=!1;if(7001==z.code)b.Ja=!1,rl(b),Al(a,b,0),B.u(0);else if(b.type==f.qa&&a.h.ignoreTextStreamFailures)a.i.delete(f.qa),B.u(0);else if(3017==
464
- z.code)Ul(a,b,z),B.u(0);else return b.Zc=!0,1==z.category&&b.T&&fl(b.T,d),z.severity=2,E(B,Ml(a,b,z),0)}})}function Vl(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):E(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Bb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})}
465
- function Rl(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Ul(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.tf})){if(a.g.zd(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.Zc=!0;a.A=!0;a.g.onError(c);return}b.tf=!0}Al(a,b,4)}
466
- function Ql(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:e=Vd;f=null==b.Na&&null==b.bc;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.P)-.1);k=Math.min(c.appendWindowEnd,a.N)+.01;l=ke(c.codecs||b.stream.codecs);m=le(c.mimeType||b.stream.mimeType);n=c.timestampOffset;if(n==b.df&&h==b.bf&&k==b.af&&l==b.cf&&m==b.rg){z.u(2);break}q=b.cf&&b.rg&&nk(a.g.Y,b.type,m,l);if(!q){z.u(3);break}p=null;b.type===e.ea?p=a.i.get(e.V):b.type===e.V&&(p=a.i.get(e.ea));if(!p){z.u(3);
467
- break}return E(z,sl(p).catch(function(){}),5);case 5:p.bc=null,Il(a,p);case 3:return u=function(){var B,D,I;return O(function(F){if(1==F.g)return B=new Map,a.j.audio&&B.set(e.V,a.j.audio),a.j.video&&B.set(e.ea,a.j.video),xa(F,2),b.bf=h,b.af=k,b.cf=l,b.rg=m,b.df=n,D=a.m.sequenceMode||"HLS"==a.m.type,E(F,ek(a.g.Y,b.type,n,h,k,D,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,B),4);if(2!=F.g)return za(F,0);I=Aa(F);b.bf=null;b.af=null;b.cf=null;b.df=null;throw I;})},E(z,u(),2);case 2:return Ei(c.ca,
468
- b.bc)||(b.bc=c.ca,c.l&&c.ca&&(v=Tl(a,b,c.ca),w=function(){var B,D,I,F,K,J,G;return O(function(L){switch(L.g){case 1:return xa(L,2),E(L,v,4);case 4:return B=L.h,Cg(a.l),D=null,I=new Map,F={projection:null,hfov:null},K=new Kg,K.box("moov",Rg).box("trak",Rg).box("mdia",Rg).R("mdhd",function(N){D=Yi(N.reader,N.version).timescale}).box("hdlr",function(N){N=N.reader;N.skip(8);switch(N.dc()){case "soun":I.set(e.V,D);break;case "vide":I.set(e.ea,D)}D=null}).box("minf",Rg).box("stbl",Rg).R("stsd",Tg).box("encv",
469
- Ug).box("avc1",Ug).box("avc3",Ug).box("hev1",Ug).box("hvc1",Ug).box("dvav",Ug).box("dva1",Ug).box("dvh1",Ug).box("dvhe",Ug).box("vexu",Rg).box("proj",Rg).R("prji",function(N){N=N.reader.dc();F.projection=N}).box("hfov",function(N){N=N.reader.O()/1E3;F.hfov=N}).parse(B),Wl(a,F),I.has(b.type)?c.ca.timescale=I.get(b.type):null!=D&&(c.ca.timescale=D),J=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,E(L,a.g.Yf(b.type,B),5);case 5:return E(L,Vj(a.g.Y,b.type,B,null,b.stream,J,b.Gc,d),6);case 6:za(L,
470
- 0);break;case 2:throw G=Aa(L),b.bc=null,G;}})},A=c.startTime,f&&(y=Sj(a.g.Y,b.type),null!=y&&(A=y)),a.g.li(A,c.ca),g.push(w()))),a.m.sequenceMode&&(C=b.Na?b.Na.i:null,c.i!=C&&g.push(gk(a.g.Y,b.type,c.startTime))),E(z,Promise.all(g),0)}})}
471
- function Sl(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,q;return O(function(p){switch(p.g){case 1:k=d.closedCaptions&&0<d.closedCaptions.size;m=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;n=a.h.parsePrftBox&&!a.G;if(m||n)l=new Kg;m&&l.R("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.dc();var A=u.reader.dc();var y=u.reader.O();var C=u.reader.O();var z=u.reader.O();var B=u.reader.O();var D=e.startTime+C/y}else y=
472
- u.reader.O(),D=u.reader.Ec()/y+e.timestampOffset,C=D-e.startTime,z=u.reader.O(),B=u.reader.O(),w=u.reader.dc(),A=u.reader.dc();u=u.reader.mb(u.reader.getLength()-u.reader.ra());if(v&&v.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.mi():(v=D+z/y,y=(new Map).set("detail",{startTime:D,endTime:v,schemeIdUri:w,value:A,timescale:y,presentationTimeDelta:C,eventDuration:z,id:B,messageData:u}),y=new U("emsg",y),y.cancelable=!0,a.g.onEvent(y),y.defaultPrevented||"https://aomedia.org/emsg/ID3"!=
473
- w&&"https://developer.apple.com/streaming/emsg-id3"!=w||(w=Ui(u),w.length&&a.g.Zd([{cueTime:D,data:u,frames:w,dts:D,pts:D}],0,v)))});n&&l.R("prft",function(u){if(!a.G&&e.ca.timescale){var v=u.reader,w=u.version;v.O();u=v.O();var A=v.O();u=1E3*u+A/Math.pow(2,32)*1E3;0===w?v=v.O():(w=v.O(),v=v.O(),v=w*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.ca.timescale*1E3)});v=new U("prft",
474
- v);a.g.onEvent(v);a.G=!0}});(m||n)&&l.parse(f);return E(p,Xl(a,b,c),2);case 2:return Cg(a.l),q=b.Gc,b.Gc=!1,E(p,a.g.Yf(b.type,f),3);case 3:return E(p,Vj(a.g.Y,b.type,f,e,d,k,q,h,g),4);case 4:Cg(a.l),H(p)}})}function Xl(a,b,c){var d,e,f,g;return O(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.m.presentationTimeline.g);e=Qj(a.g.Y,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():E(h,a.g.Y.remove(b.type,e,e+g),2)}Cg(a.l);H(h)})}
475
- function Nl(a){return a&&a.type==Td&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
476
- function Tl(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.Wc())return l.return(e);f=null;if(b.T){var m=b.T,n=m.h;c instanceof Ai&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.If=d),f=m.$d):f=null}f||(f=Jl(c,b.stream,d||null,a.h.retryParameters,a.g.Cb));g=0;b.fa&&(g=b.fa.h);b.eb=f;return E(l,f.promise,2);case 2:h=l.h;b.eb=null;k=h.data;if(!c.aesKey){l.u(3);break}return E(l,Vl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
477
- function Jl(a,b,c,d,e){var f=a instanceof Fi?a:void 0,g=f?1:0;a=ol(a.M(),a.Da,a.oa,d,c);a.contentType=b.type;return e.request(zg,a,{type:g,stream:b,segment:f})}
478
- function Gl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.Pb=!1,b.pe=!1,b.xd=0,b.Lc=!0,b.Na=null,b.fa=null,b.T&&!a.o.has(b.stream)&&gl(b.T),d?(e=a.g.Ed(),f=a.g.Y.getDuration(),E(g,a.g.Y.remove(b.type,e+d,f),3)):E(g,dk(a.g.Y,b.type),4);if(3!=g.g)return Cg(a.l),c?E(g,a.g.Y.flush(b.type),3):g.u(3);Cg(a.l);b.Lc=!1;b.endOfStream=!1;b.Ja||b.pb||Al(a,b,0);H(g)})}
479
- function Al(a,b,c){var d=b.type;if(d!=Td||a.i.has(d))b.pb=(new Sc(function(){var e;return O(function(f){if(1==f.g)return xa(f,2),E(f,Kl(a,b),4);if(2!=f.g)return za(f,0);e=Aa(f);if(a.g)a.g.onError(e);H(f)})})).X(c)}function rl(a){null!=a.pb&&(a.pb.stop(),a.pb=null)}function sl(a){return O(function(b){return a.eb?E(b,a.eb.abort(),0):b.u(0)})}
480
- function Ml(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,Zf(a.K),2);Cg(a.l);1===c.category&&(d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime,c.handled=a.g.zd(b.stream,d),c.handled&&(c.severity=1));if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);H(e)})}
481
- function Yl(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.L<c)return h.return(!1);a.L=b;d=Vd;if(e=a.i.get(d.V))e.bc=null,Il(a,e),sl(e).catch(function(){});if(f=a.i.get(d.ea))f.bc=null,Il(a,f),sl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.V,a.j.audio);a.j.video&&g.set(d.ea,a.j.video);return E(h,mk(a.g.Y,g),2)}return h.return(!0)})}
482
- function Wl(a,b){if(a.H.projection!=b.projection||a.H.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new U("spatialvideoinfo",c)}else c=new U("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.H=b}};function Zl(){}
483
- function $l(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=Ke(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Ke(n)),m=$l(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?($a("Invalid config, wrong type for "+m),
484
- k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&ab("Unexpected number of arguments for "+m),a[l]=b[l]):($a("Invalid config, unrecognized key "+m),k=!1)}return k}function am(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function bm(a,b){return a&&b}
485
- function cm(a,b){function c(g){for(var h=t(Object.keys(g)),k=h.next();!k.done;k=h.next())k=k.value,f(g[k])&&0===Object.keys(g[k]).length?delete g[k]:e(g[k])?delete g[k]:"function"==typeof g[k]?delete g[k]:f(g[k])&&(c(g[k]),0===Object.keys(g[k]).length&&delete g[k])}function d(g,h){return Object.keys(g).reduce(function(k,l){var m=g[l];if(h.hasOwnProperty(l))if(f(m)&&f(h[l])){if(m=d(m,h[l]),0<Object.keys(m).length||!f(m))k[l]=m}else e(m)&&e(h[l])||Number.isNaN(m)&&Number.isNaN(h[l])||m!==h[l]&&(k[l]=
486
- m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",Zl);Zl.getDifferenceFromConfigObjects=cm;Zl.convertToConfigObject=am;Zl.mergeConfigObjects=$l;function dm(){}function em(a){a=zd(a);return(new sc(a)).yb}function fm(a,b,c){function d(h){Fb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Bb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new T(2,6,6015);var e;"string"==typeof b?e=Bd(b,!0):e=b;a=zd(a);a=Bd(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function gm(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zd(a).split("skd://").pop();return fm(a,c,b)}
487
- function hm(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.util.FairPlayUtils",dm);dm.commonFairPlayResponse=function(a,b){if(2===a){try{var c=wd(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Cb(Hd(c)))}};dm.expressplayFairPlayRequest=function(a,b){hm(a,b)};
488
- dm.conaxFairPlayRequest=function(a,b){hm(a,b)};dm.ezdrmFairPlayRequest=function(a,b){hm(a,b)};dm.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Bb(b.body),a=Gd(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Ad("spc="+a))};dm.expressplayInitDataTransform=function(a,b,c){return gm(a,b,c)};
489
- dm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zd(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Eb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return fm(a,d,b)};dm.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zd(a).split(";").pop();return fm(a,c,b)};dm.verimatrixInitDataTransform=function(a,b,c){return gm(a,b,c)};dm.initDataTransform=fm;
490
- dm.defaultGetContentId=em;dm.isFairPlaySupported=function(){var a;return O(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},xa(b,2),E(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);Aa(b);return b.return(!1)})};function im(){}
491
- function jm(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Yf(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(m,n,q){sd()&&"skd"==n&&(n=q.serverCertificate,q=em(m),m=fm(m,q,n));return m},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Yc(),minHdcpVersion:"",ignoreDuplicateInitData:!bd()};
437
+ 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.ag=d,JSON.stringify(d),c=new U("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function nl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.ld;b.ld=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.ld=[]};function ol(a,b,c,d,e){a=rg(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function pl(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.B=1;this.s=this.j=null;this.H=0;this.F=!1;this.i=new Map;this.C=!1;this.J=null;this.A=!1;this.m=new Bg(function(){return ql(c)});this.K=Date.now()/1E3;this.o=new Map;this.G={projection:null,hfov:null};this.N=0;this.L=Infinity}r=pl.prototype;r.destroy=function(){return this.m.destroy()};
438
+ function ql(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,rl(e),b.push(sl(e)),e.S&&(gl(e.S),e.S=null);f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,gl(h);return E(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.l=null;a.h=null;H(k)})}
439
+ r.configure=function(a){this.h=a;this.J=new Xf({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);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.S&&(gl(b.S),b.S=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,gl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Td))&&
440
+ b.S&&(gl(b.S),b.S=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.S&&(gl(b.S),b.S=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.S?(hl(c.S,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(gl(c.S),c.S=null)):0<a.segmentPrefetchLimit&&(c.S=tl(this,c.stream));a.disableAudioPrefetch||ul(this)};function vl(a,b,c){a.l.presentationTimeline.U()||(a.N=b,a.L=c)}
441
+ r.start=function(a){var b=this;return O(function(c){if(1==c.g)return E(c,wl(b,a||new Map),2);Cg(b.m);b.C=!0;H(c)})};function xl(a,b){var c,d,e,f,g,h,k;O(function(l){switch(l.g){case 1:return c=Vd,a.H++,d=a.H,xa(l,2),E(l,dk(a.g.Y,c.qa),4);case 4:za(l,3);break;case 2:if(e=Aa(l),a.g)a.g.onError(e);case 3:f=Xd(b.mimeType,b.codecs),Mj(a.g.Y,f,a.l.sequenceMode,b.external),g=a.g.Y.F,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.H==d&&(k=yl(a,b),a.i.set(c.qa,k),zl(a,k,0)),H(l)}})}
442
+ function Al(a){var b=a.i.get(Td);b&&(rl(b),sl(b).catch(function(){}),a.i.delete(Td));a.s=null}function Bl(a,b){for(var c=0>a.g.Za(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.fa&&e.fa.Ic(c),e.S&&e.S.Ic(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.Ic(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.hc&&(Cl(a,b,!1,0,!1),c.hc=d);else if(b=c.hc)c.hc=null,Cl(a,b,!0,0,!1)}
443
+ function Dl(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.C&&(b.video&&Cl(a,b.video,c,d,e,f),b.audio&&Cl(a,b.audio,c,d,e,f))}function El(a,b){O(function(c){if(1==c.g)return a.s=b,a.C?b.segmentIndex?c.u(2):E(c,b.createSegmentIndex(),2):c.return();Cl(a,b,!0,0,!1);H(c)})}
444
+ function Cl(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Td?g&&(g.hc&&(b.trickModeVideo?(g.hc=b,b=b.trickModeVideo):g.hc=null),g.stream!=b||e)&&(a.o.has(b)?g.S=a.o.get(b):g.S&&il(g.S,b),b.type==Td&&(e=Xd(b.mimeType,b.codecs),Mj(a.g.Y,e,a.l.sequenceMode,b.external)),a.o.has(g.stream)||g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.fa=null,g.Vf=!!f,c?g.Lc?g.pe=!0:g.Oa?(g.Pb=!0,g.xd=d,g.pe=!0):(rl(g),Fl(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Oa||g.pb||zl(a,g,0),
445
+ Gl(a,g).catch(function(h){if(a.g)a.g.onError(h)})):xl(a,b)}
446
+ function Gl(a,b){var c,d;return O(function(e){if(1==e.g){if(!b.eb)return e.return();c=b.stream;d=b.eb;return c.segmentIndex?e.u(2):E(e,c.createSegmentIndex(),2)}if(b.eb!=d||b.stream!=c)return e.return();var f=a.g.Ed();var g=Sj(a.g.Y,b.type),h=b.stream.segmentIndex.find(b.Ma?b.Ma.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.oa?k.oa-k.Da:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ca)&&(h+=(k.oa?k.oa-k.Da:null)||0),k=a.g.getBandwidthEstimate(),
447
+ f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.eb.h.g>h?!0:!1):f=!1;f&&b.eb.abort();H(e)})}
448
+ r.Gc=function(){if(this.g)for(var a=this.g.Ed(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.Y;e.C?e=!1:d==Td?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Rj(e,d),e=Li(e,a));if(!e){c.S&&(c.S.g=null);if("audio"===c.type){e=t(this.o.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.fa=null;(null!=Sj(this.g.Y,d)||c.Oa)&&Hl(this,c);c.eb&&(c.eb.abort(),c.eb=null);d===Td&&(d=this.g.Y,d.H&&d.H.g());c.Gc=!0}}};
449
+ function Hl(a,b){b.Lc||b.Pb||(b.Oa?(b.Pb=!0,b.xd=0):null==Qj(a.g.Y,b.type)?null==b.pb&&zl(a,b,0):(rl(b),Fl(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
450
+ function wl(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(q){if(1==q.g){c=Vd;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.V,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ea,a.j.video),e.add(a.j.video));a.s&&(d.set(c.qa,a.s),e.add(a.s));f=a.g.Y;return E(q,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Cg(a.m);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=yl(a,l),b.has(l.id)&&(n=
451
+ b.get(l.id),Zk(n,function(p,u,v){return Il(p,u,v||null,a.h.retryParameters,a.g.Cb)}),m.S=n),a.i.set(k,m),zl(a,m,0));H(q)})}function yl(a,b){return{stream:b,type:b.type,fa:null,S:tl(a,b),Ma:null,bc:null,df:null,bf:null,af:null,hc:null,endOfStream:!1,Oa:!1,pb:null,Pb:!1,xd:0,pe:!1,Lc:!1,Gc:!0,tf:!1,Zc:!1,eb:null}}
452
+ function tl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Td&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Td&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.S)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new Yk(a.h.segmentPrefetchLimit,b,function(d,e,f){return Il(d,e,f||null,a.h.retryParameters,a.g.Cb)},0>a.g.Za()):null}
453
+ function ul(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=t(a.l.variants),e=d.next(),f={};!e.done;f={gb:void 0},e=d.next())if(f.gb=e.value,f.gb.audio)if(a.o.has(f.gb.audio)){if(e=a.o.get(f.gb.audio),hl(e,b),!(0<b&&c.some(function(h){return function(k){return Be(h.gb.audio.language,k)}}(f)))){var g=a.i.get(f.gb.audio.type);e!==(g&&g.S)&&gl(e);a.o.delete(f.gb.audio)}}else 0>=b||!c.some(function(h){return function(k){return Be(h.gb.audio.language,k)}}(f))||!(e=tl(a,f.gb.audio))||
454
+ (f.gb.audio.segmentIndex||f.gb.audio.createSegmentIndex(),a.o.set(f.gb.audio,e))}r.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.Y.Ua(a):this.g.Y.Ua(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
455
+ function Jl(a,b){var c,d,e,f,g;return O(function(h){switch(h.g){case 1:Cg(a.m);if(b.Oa||null==b.pb||b.Lc)return h.return();b.pb=null;if(!b.Pb){h.u(2);break}return E(h,Fl(a,b,b.pe,b.xd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.u(4);break}c=b.stream;return E(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Oa||b.pb||zl(a,b,0),h.return();case 4:xa(h,6);d=Kl(a,b);null!=d&&(zl(a,b,d),b.Zc=!1);za(h,7);break;case 6:return e=
456
+ Aa(h),E(h,Ll(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.u(0);break}return E(h,a.g.Y.endOfStream(),10);case 10:Cg(a.m),g=a.g.Y.getDuration(),0!=g&&g<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.Ua(g),H(h)}})}
457
+ function Kl(a,b){if(Ml(b))return ak(a.g.Y,b.stream.originalId||""),null;b.type==Td&&bk(a.g.Y);if(!a.g.Y.xa&&b.type!=Td)return a.h.updateIntervalSeconds/2;var c=a.g.Ed();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.La(c,!0),$k(e,c);d=b.Ma?b.Ma.endTime:c;var f=Tj(a.g.Y,b.type,c),g=Math.max(1,Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),h=a.l.presentationTimeline.getDuration()-d;e=Sj(a.g.Y,b.type);if(1E-6>h&&e)return b.endOfStream=
458
+ !0,"video"==b.type&&(a=a.i.get(Td))&&Ml(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.fa;e=Nl(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.Vf&&(f=!0,b.Vf=!1);g=Infinity;h=Array.from(a.i.values());h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,Ml(k)||k.fa&&!k.fa.current()||(g=Math.min(g,k.Ma?k.Ma.endTime:c));if(d>=g+a.l.presentationTimeline.g)return a.h.updateIntervalSeconds;b.S&&b.fa&&!a.o.has(b.stream)&&(b.S.La(e.startTime),$k(b.S,
459
+ e.startTime));Ol(a,b,c,e,f).catch(function(){});return null}function Nl(a,b,c,d){var e=b.fa?b.fa.current():null;if(e)return e;if(b.Ma||d)return b.fa=b.stream.segmentIndex.zb(b.Ma?b.Ma.endTime:d,!1,0>a.g.Za()),b.fa&&b.fa.next().value;d=a.l.sequenceMode?0:a.h.inaccurateManifestTolerance;e=Math.max(c-d,0);a=0>a.g.Za();var f=null;d&&(b.fa=b.stream.segmentIndex.zb(e,!1,a),f=b.fa&&b.fa.next().value);f||(b.fa=b.stream.segmentIndex.zb(c,!1,a),f=b.fa&&b.fa.next().value);return f}
460
+ function Ol(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:f=Vd;g=b.stream;h=b.fa;b.Oa=!0;xa(B,2);if(2==d.Yb())throw new T(1,1,1011);return E(B,Pl(a,b,d,e),4);case 4:Cg(a.m);if(a.A)return B.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if(a.h.lowLatencyMode&&l&&k&&("HLS"!=a.l.type||d.m))return q=new Uint8Array(0),u=p=!1,w=function(D){var I,F,K,J;return O(function(G){switch(G.g){case 1:if(p)return G.return();u=!0;Cg(a.m);
461
+ if(a.A)return G.return();xa(G,2);q=Ql(q,D);I=!1;F=0;(new Kg).box("mdat",function(L){F=L.size+L.start;I=!0}).parse(q,!1,!0);if(!I){G.u(4);break}K=q.subarray(0,F);q=q.subarray(F);return E(G,Rl(a,b,c,g,d,K,!0,e),5);case 5:b.S&&b.fa&&$k(b.S,d.startTime,!0);case 4:za(G,0);break;case 2:v=J=Aa(G),H(G)}})},E(B,Sl(a,b,d,w),9);m=Sl(a,b,d);return E(B,m,7);case 7:n=B.h;Cg(a.m);if(a.A)return B.return();Cg(a.m);return b.Pb?(b.Oa=!1,zl(a,b,0),B.return()):E(B,Rl(a,b,c,g,d,n,!1,e),6);case 9:A=B.h;if(v)throw v;if(u){B.u(10);
462
+ break}p=!0;Cg(a.m);return a.A?B.return():b.Pb?(b.Oa=!1,zl(a,b,0),B.return()):E(B,Rl(a,b,c,g,d,A,!1,e),10);case 10:b.S&&b.fa&&$k(b.S,d.startTime,!0);case 6:Cg(a.m);if(a.A)return B.return();b.Ma=d;h.next();b.Oa=!1;b.tf=!1;y=a.g.Y.sb();C=y[b.type];eb(JSON.stringify(C));b.Pb||a.g.lf(d,b.stream);zl(a,b,0);za(B,0);break;case 2:z=Aa(B);Cg(a.m,z);if(a.A)return B.return();b.Oa=!1;if(7001==z.code)b.Oa=!1,rl(b),zl(a,b,0),B.u(0);else if(b.type==f.qa&&a.h.ignoreTextStreamFailures)a.i.delete(f.qa),B.u(0);else if(3017==
463
+ z.code)Tl(a,b,z),B.u(0);else return b.Zc=!0,1==z.category&&b.S&&fl(b.S,d),z.severity=2,E(B,Ll(a,b,z),0)}})}function Ul(a,b,c){var d,e,f,g,h;return O(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):E(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Bb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})}
464
+ function Ql(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}function Tl(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.tf})){if(a.g.zd(b.stream,a.h.maxDisabledTime))return;var d=Math.round(100*a.B);if(20<d)a.B-=.2;else if(4<d)a.B-=.04;else{b.Zc=!0;a.A=!0;a.g.onError(c);return}b.tf=!0}zl(a,b,4)}
465
+ function Pl(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:e=Vd;f=null==b.Ma&&null==b.bc;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.N)-.1);k=Math.min(c.appendWindowEnd,a.L)+.01;l=ke(c.codecs||b.stream.codecs);m=le(c.mimeType||b.stream.mimeType);n=c.timestampOffset;if(n==b.df&&h==b.bf&&k==b.af&&l==b.cf&&m==b.rg){z.u(2);break}q=b.cf&&b.rg&&nk(a.g.Y,b.type,m,l);if(!q){z.u(3);break}p=null;b.type===e.ea?p=a.i.get(e.V):b.type===e.V&&(p=a.i.get(e.ea));if(!p){z.u(3);
466
+ break}return E(z,sl(p).catch(function(){}),5);case 5:p.bc=null,Hl(a,p);case 3:return u=function(){var B,D,I;return O(function(F){if(1==F.g)return B=new Map,a.j.audio&&B.set(e.V,a.j.audio),a.j.video&&B.set(e.ea,a.j.video),xa(F,2),b.bf=h,b.af=k,b.cf=l,b.rg=m,b.df=n,D=a.l.sequenceMode||"HLS"==a.l.type,E(F,ek(a.g.Y,b.type,n,h,k,D,c.mimeType||b.stream.mimeType,c.codecs||b.stream.codecs,B),4);if(2!=F.g)return za(F,0);I=Aa(F);b.bf=null;b.af=null;b.cf=null;b.df=null;throw I;})},E(z,u(),2);case 2:return Ei(c.ca,
467
+ b.bc)||(b.bc=c.ca,c.l&&c.ca&&(v=Sl(a,b,c.ca),w=function(){var B,D,I,F,K,J,G;return O(function(L){switch(L.g){case 1:return xa(L,2),E(L,v,4);case 4:return B=L.h,Cg(a.m),D=null,I=new Map,F={projection:null,hfov:null},K=new Kg,K.box("moov",Rg).box("trak",Rg).box("mdia",Rg).P("mdhd",function(N){D=Yi(N.reader,N.version).timescale}).box("hdlr",function(N){N=N.reader;N.skip(8);switch(N.dc()){case "soun":I.set(e.V,D);break;case "vide":I.set(e.ea,D)}D=null}).box("minf",Rg).box("stbl",Rg).P("stsd",Tg).box("encv",
468
+ Ug).box("avc1",Ug).box("avc3",Ug).box("hev1",Ug).box("hvc1",Ug).box("dvav",Ug).box("dva1",Ug).box("dvh1",Ug).box("dvhe",Ug).box("vexu",Rg).box("proj",Rg).P("prji",function(N){N=N.reader.dc();F.projection=N}).box("hfov",function(N){N=N.reader.O()/1E3;F.hfov=N}).parse(B),Vl(a,F),I.has(b.type)?c.ca.timescale=I.get(b.type):null!=D&&(c.ca.timescale=D),J=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,E(L,a.g.Yf(b.type,B),5);case 5:return E(L,Vj(a.g.Y,b.type,B,null,b.stream,J,b.Gc,d),6);case 6:za(L,
469
+ 0);break;case 2:throw G=Aa(L),b.bc=null,G;}})},A=c.startTime,f&&(y=Sj(a.g.Y,b.type),null!=y&&(A=y)),a.g.ki(A,c.ca),g.push(w()))),a.l.sequenceMode&&(C=b.Ma?b.Ma.i:null,c.i!=C&&g.push(gk(a.g.Y,b.type,c.startTime))),E(z,Promise.all(g),0)}})}
470
+ function Rl(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,q;return O(function(p){switch(p.g){case 1:k=d.closedCaptions&&0<d.closedCaptions.size;m=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;n=a.h.parsePrftBox&&!a.F;if(m||n)l=new Kg;m&&l.P("emsg",function(u){var v=d.emsgSchemeIdUris;if(0===u.version){var w=u.reader.dc();var A=u.reader.dc();var y=u.reader.O();var C=u.reader.O();var z=u.reader.O();var B=u.reader.O();var D=e.startTime+C/y}else y=
471
+ u.reader.O(),D=u.reader.Ec()/y+e.timestampOffset,C=D-e.startTime,z=u.reader.O(),B=u.reader.O(),w=u.reader.dc(),A=u.reader.dc();u=u.reader.mb(u.reader.getLength()-u.reader.ra());if(v&&v.includes(w)||a.h.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.li():(v=D+z/y,y=(new Map).set("detail",{startTime:D,endTime:v,schemeIdUri:w,value:A,timescale:y,presentationTimeDelta:C,eventDuration:z,id:B,messageData:u}),y=new U("emsg",y),y.cancelable=!0,a.g.onEvent(y),y.defaultPrevented||"https://aomedia.org/emsg/ID3"!=
472
+ w&&"https://developer.apple.com/streaming/emsg-id3"!=w||(w=Ui(u),w.length&&a.g.Zd([{cueTime:D,data:u,frames:w,dts:D,pts:D}],0,v)))});n&&l.P("prft",function(u){if(!a.F&&e.ca.timescale){var v=u.reader,w=u.version;v.O();u=v.O();var A=v.O();u=1E3*u+A/Math.pow(2,32)*1E3;0===w?v=v.O():(w=v.O(),v=v.O(),v=w*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.ca.timescale*1E3)});v=new U("prft",
473
+ v);a.g.onEvent(v);a.F=!0}});(m||n)&&l.parse(f);return E(p,Wl(a,b,c),2);case 2:return Cg(a.m),q=b.Gc,b.Gc=!1,E(p,a.g.Yf(b.type,f),3);case 3:return E(p,Vj(a.g.Y,b.type,f,e,d,k,q,h,g),4);case 4:Cg(a.m),H(p)}})}function Wl(a,b,c){var d,e,f,g;return O(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.l.presentationTimeline.g);e=Qj(a.g.Y,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():E(h,a.g.Y.remove(b.type,e,e+g),2)}Cg(a.m);H(h)})}
474
+ function Ml(a){return a&&a.type==Td&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
475
+ function Sl(a,b,c,d){var e,f,g,h,k;return O(function(l){switch(l.g){case 1:if(e=c.Wc())return l.return(e);f=null;if(b.S){var m=b.S,n=m.h;c instanceof Ai&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.If=d),f=m.$d):f=null}f||(f=Il(c,b.stream,d||null,a.h.retryParameters,a.g.Cb));g=0;b.fa&&(g=b.fa.h);b.eb=f;return E(l,f.promise,2);case 2:h=l.h;b.eb=null;k=h.data;if(!c.aesKey){l.u(3);break}return E(l,Ul(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
476
+ function Il(a,b,c,d,e){var f=a instanceof Fi?a:void 0,g=f?1:0;a=ol(a.M(),a.Da,a.oa,d,c);a.contentType=b.type;return e.request(zg,a,{type:g,stream:b,segment:f})}
477
+ function Fl(a,b,c,d){var e,f;return O(function(g){if(1==g.g)return b.Pb=!1,b.pe=!1,b.xd=0,b.Lc=!0,b.Ma=null,b.fa=null,b.S&&!a.o.has(b.stream)&&gl(b.S),d?(e=a.g.Ed(),f=a.g.Y.getDuration(),E(g,a.g.Y.remove(b.type,e+d,f),3)):E(g,dk(a.g.Y,b.type),4);if(3!=g.g)return Cg(a.m),c?E(g,a.g.Y.flush(b.type),3):g.u(3);Cg(a.m);b.Lc=!1;b.endOfStream=!1;b.Oa||b.pb||zl(a,b,0);H(g)})}
478
+ function zl(a,b,c){var d=b.type;if(d!=Td||a.i.has(d))b.pb=(new Sc(function(){var e;return O(function(f){if(1==f.g)return xa(f,2),E(f,Jl(a,b),4);if(2!=f.g)return za(f,0);e=Aa(f);if(a.g)a.g.onError(e);H(f)})})).X(c)}function rl(a){null!=a.pb&&(a.pb.stop(),a.pb=null)}function sl(a){return O(function(b){return a.eb?E(b,a.eb.abort(),0):b.u(0)})}
479
+ function Ll(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,Zf(a.J),2);Cg(a.m);1===c.category&&(d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime,c.handled=a.g.zd(b.stream,d),c.handled&&(c.severity=1));if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);H(e)})}
480
+ function Xl(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.K<c)return h.return(!1);a.K=b;d=Vd;if(e=a.i.get(d.V))e.bc=null,Hl(a,e),sl(e).catch(function(){});if(f=a.i.get(d.ea))f.bc=null,Hl(a,f),sl(f).catch(function(){});g=new Map;a.j.audio&&g.set(d.V,a.j.audio);a.j.video&&g.set(d.ea,a.j.video);return E(h,mk(a.g.Y,g),2)}return h.return(!0)})}
481
+ function Vl(a,b){if(a.G.projection!=b.projection||a.G.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new U("spatialvideoinfo",c)}else c=new U("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.G=b}};function Yl(){}
482
+ function Zl(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=Ke(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Ke(n)),m=Zl(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?($a("Invalid config, wrong type for "+m),
483
+ k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&ab("Unexpected number of arguments for "+m),a[l]=b[l]):($a("Invalid config, unrecognized key "+m),k=!1)}return k}function $l(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function am(a,b){return a&&b}
484
+ function bm(a,b){function c(g){for(var h=t(Object.keys(g)),k=h.next();!k.done;k=h.next())k=k.value,f(g[k])&&0===Object.keys(g[k]).length?delete g[k]:e(g[k])?delete g[k]:"function"==typeof g[k]?delete g[k]:f(g[k])&&(c(g[k]),0===Object.keys(g[k]).length&&delete g[k])}function d(g,h){return Object.keys(g).reduce(function(k,l){var m=g[l];if(h.hasOwnProperty(l))if(f(m)&&f(h[l])){if(m=d(m,h[l]),0<Object.keys(m).length||!f(m))k[l]=m}else e(m)&&e(h[l])||Number.isNaN(m)&&Number.isNaN(h[l])||m!==h[l]&&(k[l]=
485
+ m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",Yl);Yl.getDifferenceFromConfigObjects=bm;Yl.convertToConfigObject=$l;Yl.mergeConfigObjects=Zl;function cm(){}function dm(a){a=zd(a);return(new sc(a)).yb}function em(a,b,c){function d(h){Fb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Bb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new T(2,6,6015);var e;"string"==typeof b?e=Bd(b,!0):e=b;a=zd(a);a=Bd(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function fm(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zd(a).split("skd://").pop();return em(a,c,b)}
486
+ function gm(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.util.FairPlayUtils",cm);cm.commonFairPlayResponse=function(a,b){if(2===a){try{var c=wd(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Cb(Hd(c)))}};cm.expressplayFairPlayRequest=function(a,b){gm(a,b)};
487
+ cm.conaxFairPlayRequest=function(a,b){gm(a,b)};cm.ezdrmFairPlayRequest=function(a,b){gm(a,b)};cm.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Bb(b.body),a=Gd(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Ad("spc="+a))};cm.expressplayInitDataTransform=function(a,b,c){return fm(a,b,c)};
488
+ cm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zd(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Eb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return em(a,d,b)};cm.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zd(a).split(";").pop();return em(a,c,b)};cm.verimatrixInitDataTransform=function(a,b,c){return fm(a,b,c)};cm.initDataTransform=em;
489
+ cm.defaultGetContentId=dm;cm.isFairPlaySupported=function(){var a;return O(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},xa(b,2),E(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);Aa(b);return b.return(!1)})};function hm(){}
490
+ function im(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Yf(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(m,n,q){sd()&&"skd"==n&&(n=q.serverCertificate,q=dm(m),m=em(m,q,n));return m},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Yc(),minHdcpVersion:"",ignoreDuplicateInitData:!bd()};
492
491
  (Yc()||id())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;bd()||ad()||Zc("Tizen 4")||Zc("Tizen 5")||Zc("Tizen 6")||dd()||cd()&&53===ed()||cd()&&68===ed()||!(!fd()||fd()&&nd()||fd()&&Zc("Fuchsia"))||md()&&Xc()||(c="smooth",d=!0);d={retryParameters:Yf(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,dash:{clockSyncUri:"",
493
492
  ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
494
- "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:km,manifestPreprocessorTXml:lm,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',
495
- useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:ad()||bd()||dd()||id()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:km,manifestPreprocessorTXml:lm,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:Yf(),failureCallback:function(m){return bm([m])},
493
+ "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"},manifestPreprocessor:jm,manifestPreprocessorTXml:km,sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,updatePeriod:-1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',
494
+ useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:ad()||bd()||dd()||id()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:jm,manifestPreprocessorTXml:km,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:Yf(),failureCallback:function(m){return am([m])},
496
495
  rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,
497
496
  maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:!1,liveSyncTargetLatencyTolerance:.5,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:.95,liveSyncPanicMode:!1,liveSyncPanicThreshold:60,allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,
498
- infiniteLiveStreamDuration:!1,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:id()||jd()};if(cd()||$c()||fd()||kd())e.stallSkip=0;var f={trackSelectionCallback:function(m){return O(function(n){return n.return(m)})},downloadSizeCallback:function(m){var n;return O(function(q){if(1==q.g)return navigator.storage&&navigator.storage.estimate?E(q,navigator.storage.estimate(),3):q.return(!0);n=q.h;return q.return(n.usage+m<.95*n.quota)})},progressCallback:function(m,n){return bm([m,n])},usePersistentLicense:!0,
497
+ infiniteLiveStreamDuration:!1,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:id()||jd()};if(cd()||$c()||fd()||kd())e.stallSkip=0;var f={trackSelectionCallback:function(m){return O(function(n){return n.return(m)})},downloadSizeCallback:function(m){var n;return O(function(q){if(1==q.g)return navigator.storage&&navigator.storage.estimate?E(q,navigator.storage.estimate(),3):q.return(!0);n=q.h;return q.return(n.usage+m<.95*n.quota)})},progressCallback:function(m,n){return am([m,n])},usePersistentLicense:!0,
499
498
  numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,
500
- ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:gd()?.5:0};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(m){return bm([m],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(m,n){return bm([m,n])}};var g=!1,h=!1,k=!0;if($c()||cd()||Yc()||id()||jd()||Zc("AFT")||Zc("PC=EOS")||Zc("PC=APL")||Zc("VirginMedia")||hd()||Zc("WPE")||fd()||kd()||Zc("DT_STB_BCM"))h=g=!0,k=!1;var l={drm:b,manifest:d,streaming:e,
499
+ ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:gd()?.5:0};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(m){return am([m],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(m,n){return am([m,n])}};var g=!1,h=!1,k=!0;if($c()||cd()||Yc()||id()||jd()||Zc("AFT")||Zc("PC=EOS")||Zc("PC=APL")||Zc("VirginMedia")||hd()||Zc("WPE")||fd()||kd()||Zc("DT_STB_BCM"))h=g=!0,k=!1;var l={drm:b,manifest:d,streaming:e,
501
500
  mediaSource:c,offline:f,abrFactory:function(){return new Af},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,
502
501
  minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,
503
- drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(mm(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
504
- function nm(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:"",headers:{}}};return $l(a,b,c||jm(),d,"")}
505
- function mm(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=Je(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Ce(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-
506
- 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!=Td&&"image"!=c.type||b.push(c);return b}function km(a){return bm([a],a)}function lm(a){return bm([a],a)}S("shaka.util.PlayerConfiguration",im);im.mergeConfigObjects=nm;im.createDefault=jm;function om(a,b,c,d,e){jg.call(this);this.K=a;this.P=b;this.xa=e.networkingEngine;this.W=d;this.o=null;this.qb=c;this.ua=0;this.La=e.qc;this.B=e.gi;this.hb=e.hi;this.g=e.config;this.j=this.C=this.h=null;this.da=!1;this.F=e.ri;this.ma=!1;this.l=null;this.ba=!1;this.i=this.A=null;this.aa=!1;this.J=new Map;this.na=!1;this.ya=e.pi;this.$=new Xk;this.m=new $f;this.L=null;this.s=!1;this.Ea=e.jh;this.ga=null;this.Fa=e.ih;this.N=!1;this.H=[];this.G=[]}qa(om,jg);
507
- function pm(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function qm(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function rm(a,b){a.L=b;a.N=!0;if(a.H){b=t(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}r=om.prototype;r.getStartTime=function(){return this.W};r.vc=function(){return this.K};r.Re=function(){return this.h};function sm(a){a.aa=!0;return a.i}function tm(a){a.da=!0;return a.j}function um(a){a.ma=!0;return a.F}r.getStats=function(){return this.$};
508
- function vm(a){a.ba=!0;return a.l}function wm(a){a.na=!0;return a.J}
509
- r.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return E(c,Promise.resolve(),2);case 2:return xa(c,3),E(c,xm(a),5);case 5:return ym(a),E(c,zm(a),6);case 6:ym(a);a.o||(a.o=new Kf(a.g.preferredAudioLanguage,a.g.preferredVariantRole,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));
510
- if(a.Fa){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.Ea){d=a.h.presentationTimeline.U();var e=xf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.ga=e,e.video&&Am(a,e.video,d),e.audio&&Am(a,e.audio,d)}return E(c,void 0,7);case 7:ym(a);a.m.resolve();za(c,0);break;case 3:b=Aa(c),a.m.reject(b),H(c)}})})()};r.dispatchEvent=function(a){return this.L?this.L.dispatchEvent(a):jg.prototype.dispatchEvent.call(this,a)};
511
- r.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function ym(a){if(a.s)throw new T(2,7,7003);}function Bm(a,b){a.dispatchEvent(new U("onstatechange",(new Map).set("state",b)))}
512
- function xm(a){var b,c,d,e;return O(function(f){if(1==f.g)return Bm(a,"manifest-parser"),a.j||(a.C=ui(a.K,a.P),a.j=a.C(),a.j.configure(a.g.manifest)),b=Date.now()/1E3,Bm(a,"manifest"),a.h?f.u(2):E(f,a.j.start(a.K,a.hb),3);2!=f.g&&(a.h=f.h);c=new U("manifestparsed",void 0);a.dispatchEvent(c);if(0==a.h.variants.length)throw new T(2,4,4036);Cm(a.h);d=Date.now()/1E3;e=d-b;a.$.F=e;H(f)})}
513
- function zm(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Bm(a,"drm-engine");a.ua=Date.now()/1E3;a.l=a.La();a.B.g=a.l;a.l.configure(a.g.drm);var h=a.B;b=Re(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new U("trackschanged",void 0);return E(g,Promise.resolve(),3);case 3:ym(a),a.dispatchEvent(c);case 2:return d=xf(a.h.variants),E(g,Kh(a.l,d,a.h.offlineSessionIds),4);case 4:return ym(a),E(g,oi(a.B,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new U("trackschanged",void 0);return E(g,
514
- Promise.resolve(),7);case 7:a.dispatchEvent(f),H(g)}})}r.configure=function(a,b){a=am(a,b);nm(this.g,a)};r.getConfiguration=function(){return Ke(this.g)};
515
- function Am(a,b,c){var d,e,f,g,h;O(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Yk(d,b,function(l,m,n){return Jl(l,m,n||null,a.g.streaming.retryParameters,a.xa)},!1),a.J.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.W||0;(h=(g=b.segmentIndex.zb(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ca&&al(e,h.ca):$k(e,h.startTime));H(k)})}r.Si=function(){return this.m};
502
+ drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return O(function(n){return n.return(lm(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
503
+ function mm(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:"",headers:{}}};return Zl(a,b,c||im(),d,"")}
504
+ function lm(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=Je(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Ce(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-
505
+ 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!=Td&&"image"!=c.type||b.push(c);return b}function jm(a){return am([a],a)}function km(a){return am([a],a)}S("shaka.util.PlayerConfiguration",hm);hm.mergeConfigObjects=mm;hm.createDefault=im;function nm(a,b,c,d,e){jg.call(this);this.K=a;this.T=b;this.xa=e.networkingEngine;this.W=d;this.o=null;this.qb=c;this.ua=0;this.Ka=e.qc;this.B=e.fi;this.hb=e.gi;this.g=e.config;this.j=this.C=this.h=null;this.da=!1;this.F=e.pi;this.ma=!1;this.l=null;this.ba=!1;this.i=this.A=null;this.aa=!1;this.J=new Map;this.na=!1;this.ya=e.oi;this.$=new Xk;this.m=new $f;this.L=null;this.s=!1;this.Ea=e.ih;this.ga=null;this.Fa=e.hh;this.N=!1;this.H=[];this.G=[]}qa(nm,jg);
506
+ function om(a,b,c){(a=b?a.G:a.H)?a.push(c):c()}function pm(a){if(a.G)for(var b=t(a.G),c=b.next();!c.done;c=b.next())c=c.value,c();a.G=null}function qm(a,b){a.L=b;a.N=!0;if(a.H){b=t(a.H);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.H=null}r=nm.prototype;r.getStartTime=function(){return this.W};r.vc=function(){return this.K};r.Re=function(){return this.h};function rm(a){a.aa=!0;return a.i}function sm(a){a.da=!0;return a.j}function tm(a){a.ma=!0;return a.F}r.getStats=function(){return this.$};
507
+ function um(a){a.ba=!0;return a.l}function vm(a){a.na=!0;return a.J}
508
+ r.start=function(){var a=this;(function(){var b;return O(function(c){switch(c.g){case 1:return E(c,Promise.resolve(),2);case 2:return xa(c,3),E(c,wm(a),5);case 5:return xm(a),E(c,ym(a),6);case 6:xm(a);a.o||(a.o=new Kf(a.g.preferredAudioLanguage,a.g.preferredVariantRole,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));
509
+ if(a.Fa){var d=a.g.abrFactory;a.A=d;a.i=d();a.i.configure(a.g.abr)}if(a.Ea){d=a.h.presentationTimeline.U();var e=xf(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant(!0))a.ga=e,e.video&&zm(a,e.video,d),e.audio&&zm(a,e.audio,d)}return E(c,void 0,7);case 7:xm(a);a.m.resolve();za(c,0);break;case 3:b=Aa(c),a.m.reject(b),H(c)}})})()};r.dispatchEvent=function(a){return this.L?this.L.dispatchEvent(a):jg.prototype.dispatchEvent.call(this,a)};
510
+ r.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new U("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function xm(a){if(a.s)throw new T(2,7,7003);}function Am(a,b){a.dispatchEvent(new U("onstatechange",(new Map).set("state",b)))}
511
+ function wm(a){var b,c,d,e;return O(function(f){if(1==f.g)return Am(a,"manifest-parser"),a.j||(a.C=ui(a.K,a.T),a.j=a.C(),a.j.configure(a.g.manifest)),b=Date.now()/1E3,Am(a,"manifest"),a.h?f.u(2):E(f,a.j.start(a.K,a.hb),3);2!=f.g&&(a.h=f.h);c=new U("manifestparsed",void 0);a.dispatchEvent(c);if(0==a.h.variants.length)throw new T(2,4,4036);Bm(a.h);d=Date.now()/1E3;e=d-b;a.$.F=e;H(f)})}
512
+ function ym(a){var b,c,d,e,f;return O(function(g){switch(g.g){case 1:Am(a,"drm-engine");a.ua=Date.now()/1E3;a.l=a.Ka();a.B.g=a.l;a.l.configure(a.g.drm);var h=a.B;b=Re(a.h.variants,h.h.restrictions,h.i);if(!b){g.u(2);break}c=new U("trackschanged",void 0);return E(g,Promise.resolve(),3);case 3:xm(a),a.dispatchEvent(c);case 2:return d=xf(a.h.variants),E(g,Kh(a.l,d,a.h.offlineSessionIds),4);case 4:return xm(a),E(g,oi(a.B,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new U("trackschanged",void 0);return E(g,
513
+ Promise.resolve(),7);case 7:a.dispatchEvent(f),H(g)}})}r.configure=function(a,b){a=$l(a,b);mm(this.g,a)};r.getConfiguration=function(){return Ke(this.g)};
514
+ function zm(a,b,c){var d,e,f,g,h;O(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new Yk(d,b,function(l,m,n){return Il(l,m,n||null,a.g.streaming.retryParameters,a.xa)},!1),a.J.set(b.id,e),E(k,b.createSegmentIndex(),2);f=a.W||0;(h=(g=b.segmentIndex.zb(f))?g.current():null)||(h=b.segmentIndex.get(0));h&&(c?h.ca&&al(e,h.ca):$k(e,h.startTime));H(k)})}r.Ri=function(){return this.m};
516
515
  r.destroy=function(){var a=this,b,c,d;return O(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.da){e.u(2);break}return E(e,a.j.stop(),2);case 2:if(!a.i||a.aa){e.u(4);break}return E(e,a.i.stop(),4);case 4:a.F&&!a.ma&&a.F.release();if(!a.l||a.ba){e.u(6);break}return E(e,a.l.destroy(),6);case 6:if(0<a.J.size&&!a.na)for(b=t(a.J.values()),c=b.next();!c.done;c=b.next())d=c.value,gl(d);H(e)}})};
517
- function Cm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}S("shaka.media.PreloadManager",om);om.prototype.destroy=om.prototype.destroy;om.prototype.waitForFinish=om.prototype.Si;function Dm(a,b){jg.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{nc:null,mc:Em,$b:function(d,e){return Fm(c,"enter",d,e)}},{nc:Gm,mc:Em,$b:function(d,e){return Fm(c,"enter",d,e)}},{nc:Hm,mc:Em,$b:function(d,e){return Fm(c,"enter",d,e)}},{nc:Em,mc:Gm,$b:function(d,e){return Fm(c,"exit",d,e)}},{nc:Em,mc:Hm,$b:function(d,e){return Fm(c,"exit",d,e)}},{nc:Gm,mc:Hm,$b:function(d,e){return Fm(c,"skip",d,e)}},{nc:Hm,mc:Gm,$b:function(d,e){return Fm(c,"skip",d,e)}}];this.h=new hb;this.h.D(this.i,
518
- "regionremove",function(d){c.g.delete(d.region)})}qa(Dm,jg);Dm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;jg.prototype.release.call(this)};Dm.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?Gm:a>d.endTime?Hm:Em;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.nc==e&&h.mc==f&&h.$b(d,b)}}};
519
- function Fm(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Gm=1,Em=2,Hm=3;function Im(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:var n=(new sc(a)).Oa.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Xm[d])return m.return(e);f=0;g=rg([a],c);xa(m,2);g.method="HEAD";return E(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];za(m,3);break;case 2:k=Aa(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return E(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
516
+ function Bm(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}S("shaka.media.PreloadManager",nm);nm.prototype.destroy=nm.prototype.destroy;nm.prototype.waitForFinish=nm.prototype.Ri;function Cm(a,b){jg.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{nc:null,mc:Dm,$b:function(d,e){return Em(c,"enter",d,e)}},{nc:Fm,mc:Dm,$b:function(d,e){return Em(c,"enter",d,e)}},{nc:Gm,mc:Dm,$b:function(d,e){return Em(c,"enter",d,e)}},{nc:Dm,mc:Fm,$b:function(d,e){return Em(c,"exit",d,e)}},{nc:Dm,mc:Gm,$b:function(d,e){return Em(c,"exit",d,e)}},{nc:Fm,mc:Gm,$b:function(d,e){return Em(c,"skip",d,e)}},{nc:Gm,mc:Fm,$b:function(d,e){return Em(c,"skip",d,e)}}];this.h=new hb;this.h.D(this.i,
517
+ "regionremove",function(d){c.g.delete(d.region)})}qa(Cm,jg);Cm.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;jg.prototype.release.call(this)};Cm.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?Fm:a>d.endTime?Gm:Dm;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.nc==e&&h.mc==f&&h.$b(d,b)}}};
518
+ function Em(a,b,c,d){b=new U(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Fm=1,Dm=2,Gm=3;function Hm(a,b,c){var d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:var n=(new sc(a)).Na.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Wm[d])return m.return(e);f=0;g=rg([a],c);xa(m,2);g.method="HEAD";return E(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];za(m,3);break;case 2:k=Aa(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return E(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
520
519
  e.toLowerCase().split(";").shift():"")}})}
521
- var Xm={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 Ym(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Ym(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=Zm(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Zm(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;
520
+ var Wm={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 Xm(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Xm(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=Ym(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Ym(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;
522
521
  return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
523
- function Zm(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
524
- case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function $m(a,b){var c=[];a=t(an(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x($m(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Ym(d,b);c.push(e)}return c}
525
- function an(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={ye:void 0},c=a.next())d.ye=c.value,b.some(function(e){return function(f){return bc(e.ye,f)}}(d))||b.push(d.ye);return b}
526
- function bn(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&&
527
- (c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c};function cn(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,"metadata"!==d.kind&&"chapters"!==d.kind&&(d.mode="disabled",d.label==b&&(this.g=d));this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}r=cn.prototype;r.configure=function(){};r.remove=function(a,b){if(!this.g)return!1;dn(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
528
- r.append=function(a){var b=$m(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b=t(b);for(var d=b.next(),e={};!d.done;e={ad:void 0},d=b.next())e.ad=d.value,a.some(function(f){return function(g){return g.startTime==f.ad.startTime&&g.endTime==f.ad.endTime&&g.text==f.ad.payload?!0:!1}}(e))||(d=bn(e.ad))&&c.push(d);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
529
- c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)};r.destroy=function(){this.g&&(dn(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
530
- function dn(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}S("shaka.text.SimpleTextDisplayer",cn);cn.prototype.setTextVisibility=cn.prototype.setTextVisibility;cn.prototype.isTextVisible=cn.prototype.isTextVisible;cn.prototype.destroy=cn.prototype.destroy;cn.prototype.append=cn.prototype.append;cn.prototype.remove=cn.prototype.remove;cn.prototype.configure=cn.prototype.configure;function en(){}r=en.prototype;r.configure=function(){};r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};S("shaka.text.StubTextDisplayer",en);en.prototype.setTextVisibility=en.prototype.setTextVisibility;en.prototype.isTextVisible=en.prototype.isTextVisible;en.prototype.destroy=en.prototype.destroy;en.prototype.append=en.prototype.append;en.prototype.remove=en.prototype.remove;en.prototype.configure=en.prototype.configure;function fn(){}function gn(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",fn);fn.removeAllChildren=gn;function hn(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.s=b;this.l=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);c&&c.captionsUpdatePeriod||rb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Tc(function(){d.A.paused||
531
- jn(d)})).Va(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new hb;this.j.D(document,"fullscreenchange",function(){jn(d,!0)});this.j.D(this.A,"seeking",function(){jn(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){jn(d,!0)}),this.o.observe(this.g));this.B=new Map}r=hn.prototype;r.configure=function(a){this.C&&this.C.Va(a.captionsUpdatePeriod)};
532
- r.append=function(a){var b=[].concat(x(this.h));a=t(an(a));for(var c=a.next(),d={};!c.done;d={ze:void 0},c=a.next())d.ze=c.value,b.some(function(e){return function(f){return bc(f,e.ze)}}(d))||this.h.push(d.ze);jn(this)};r.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
533
- r.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});jn(this,c>this.h.length);return!0};r.isTextVisible=function(){return this.m};r.setTextVisibility=function(a){this.m=a};function kn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
534
- function ln(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Zg:null;l&&(g.push(l.Ae),l.fc&&g.push(l.fc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?kn(a,n)||(f=!0):(mn(a,k,e),l=a.i.get(k),n=l.Zg,f=!0));0<k.nestedCues.length&&n&&ln(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(q,p){return q.startTime!=
535
- p.startTime?q.startTime-p.startTime:q.endTime-p.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.i.get(d.value),d.fc?(d.fc.contains(c)&&d.fc.removeChild(c),c.appendChild(d.fc),d.fc.appendChild(d.Ae)):c.appendChild(d.Ae)}}function jn(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.B.values());for(var d=b.next();!d.done;d=b.next())gn(d.value);gn(a.g);a.i.clear();a.B.clear()}a.m&&ln(a,a.h,a.g,c,[])}}
536
- function mn(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&nn(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.l===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Lb?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Lb?"%":"px");if(a.B.has(c))c=a.B.get(c);else{e=document.createElement("span");var k=g.heightUnits==Lb?"%":"px",l=g.widthUnits==
522
+ function Ym(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
523
+ case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function Zm(a,b){var c=[];a=t($m(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(Zm(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Xm(d,b);c.push(e)}return c}
524
+ function $m(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={ye:void 0},c=a.next())d.ye=c.value,b.some(function(e){return function(f){return bc(e.ye,f)}}(d))||b.push(d.ye);return b}
525
+ function an(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&&
526
+ (c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c};function bn(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,"metadata"!==d.kind&&"chapters"!==d.kind&&(d.mode="disabled",d.label==b&&(this.g=d));this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}r=bn.prototype;r.configure=function(){};r.remove=function(a,b){if(!this.g)return!1;cn(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
527
+ r.append=function(a){var b=Zm(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b=t(b);for(var d=b.next(),e={};!d.done;e={ad:void 0},d=b.next())e.ad=d.value,a.some(function(f){return function(g){return g.startTime==f.ad.startTime&&g.endTime==f.ad.endTime&&g.text==f.ad.payload?!0:!1}}(e))||(d=an(e.ad))&&c.push(d);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
528
+ c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)};r.destroy=function(){this.g&&(cn(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
529
+ function cn(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}S("shaka.text.SimpleTextDisplayer",bn);bn.prototype.setTextVisibility=bn.prototype.setTextVisibility;bn.prototype.isTextVisible=bn.prototype.isTextVisible;bn.prototype.destroy=bn.prototype.destroy;bn.prototype.append=bn.prototype.append;bn.prototype.remove=bn.prototype.remove;bn.prototype.configure=bn.prototype.configure;function dn(){}r=dn.prototype;r.configure=function(){};r.remove=function(){};r.append=function(){};r.destroy=function(){};r.isTextVisible=function(){return!1};r.setTextVisibility=function(){};S("shaka.text.StubTextDisplayer",dn);dn.prototype.setTextVisibility=dn.prototype.setTextVisibility;dn.prototype.isTextVisible=dn.prototype.isTextVisible;dn.prototype.destroy=dn.prototype.destroy;dn.prototype.append=dn.prototype.append;dn.prototype.remove=dn.prototype.remove;dn.prototype.configure=dn.prototype.configure;function en(){}function fn(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",en);en.removeAllChildren=fn;function gn(a,b,c){var d=this;this.m=!1;this.h=[];this.A=a;this.s=b;this.l=null;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.s.appendChild(this.g);c&&c.captionsUpdatePeriod||rb("UITextDisplayer w/ config","Please migrate to initializing UITextDisplayer with a config.");this.C=(new Tc(function(){d.A.paused||
530
+ hn(d)})).Va(c&&c.captionsUpdatePeriod?c.captionsUpdatePeriod:.25);this.i=new Map;this.j=new hb;this.j.D(document,"fullscreenchange",function(){hn(d,!0)});this.j.D(this.A,"seeking",function(){hn(d,!0)});this.j.D(this.A,"resize",function(){var e=d.A,f=e.videoWidth;e=e.videoHeight;f&&e?d.l=f/e:d.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){hn(d,!0)}),this.o.observe(this.g));this.B=new Map}r=gn.prototype;r.configure=function(a){this.C&&this.C.Va(a.captionsUpdatePeriod)};
531
+ r.append=function(a){var b=[].concat(x(this.h));a=t($m(a));for(var c=a.next(),d={};!c.done;d={ze:void 0},c=a.next())d.ze=c.value,b.some(function(e){return function(f){return bc(f,e.ze)}}(d))||this.h.push(d.ze);hn(this)};r.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
532
+ r.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});hn(this,c>this.h.length);return!0};r.isTextVisible=function(){return this.m};r.setTextVisibility=function(a){this.m=a};function jn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
533
+ function kn(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Zg:null;l&&(g.push(l.Ae),l.fc&&g.push(l.fc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?jn(a,n)||(f=!0):(ln(a,k,e),l=a.i.get(k),n=l.Zg,f=!0));0<k.nestedCues.length&&n&&kn(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(q,p){return q.startTime!=
534
+ p.startTime?q.startTime-p.startTime:q.endTime-p.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.i.get(d.value),d.fc?(d.fc.contains(c)&&d.fc.removeChild(c),c.appendChild(d.fc),d.fc.appendChild(d.Ae)):c.appendChild(d.Ae)}}function hn(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.B.values());for(var d=b.next();!d.done;d=b.next())fn(d.value);fn(a.g);a.i.clear();a.B.clear()}a.m&&kn(a,a.h,a.g,c,[])}}
535
+ function ln(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&mn(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.l===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==Lb?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==Lb?"%":"px");if(a.B.has(c))c=a.B.get(c);else{e=document.createElement("span");var k=g.heightUnits==Lb?"%":"px",l=g.widthUnits==
537
536
  Lb?"%":"px",m=g.viewportAnchorUnits==Lb?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,q=g.width;2===g.heightUnits&&(n=5.33*g.height,k="%");2===g.widthUnits&&(q=g.width*h,l="%");e.style.height=n+k;e.style.width=q+l;2===g.viewportAnchorUnits?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.l===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*q/100,e.style.top=h+"%",e.style.left=k+"%"):(e.style.top=g.viewportAnchorY-
538
537
  g.regionAnchorY*n/100+m,e.style.left=g.viewportAnchorX-g.regionAnchorX*q/100+m);0!==g.heightUnits&&0!==g.widthUnits&&0!==g.viewportAnchorUnits&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent=
539
538
  "before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.B.set(c,e);c=e}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{Ae:f,Zg:e,fc:c})}
540
- function on(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Sb?c:"left"===a||"start"===a&&b===Ub||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Ub?"line-right":"center"}
541
- function nn(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=pn(c.linePadding,c,a.s);f.paddingRight=pn(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
542
- "url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=qn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=qn(d,function(m){return m.fontFamily}))&&
539
+ function nn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Sb?c:"left"===a||"start"===a&&b===Ub||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Ub?"line-right":"center"}
540
+ function mn(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=on(c.linePadding,c,a.s);f.paddingRight=on(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
541
+ "url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);!e&&((b=pn(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"),b=pn(d,function(m){return m.fontFamily}))&&
543
542
  (l.style.fontFamily=b);k&&(l.textContent=k)}if(h&&!d[d.length-1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if("left"==c.textAlign||"start"==c.textAlign)f.width="100%",f.alignItems="start";else if("right"==c.textAlign||"end"==c.textAlign)f.width="100%",f.alignItems="end";f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();
544
- f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=pn(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Wb&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Vb?(f.width="100%",c.lineAlign==Xb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Xb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Xb?f.right=d+"%":"end"==c.lineAlign&&
545
- (f.left=100-d+"%"))));f.lineHeight=c.lineHeight;a=on(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==Vb?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Vb?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Vb?(f.left=c.position+"%",f.width="auto"):f.top=c.position+
543
+ f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=on(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Wb&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Vb?(f.width="100%",c.lineAlign==Xb?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Xb?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Xb?f.right=d+"%":"end"==c.lineAlign&&
544
+ (f.left=100-d+"%"))));f.lineHeight=c.lineHeight;a=nn(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==Vb?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Vb?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Vb?(f.left=c.position+"%",f.width="auto"):f.top=c.position+
546
545
  "%");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Vb?f.width=c.size+"%":f.height=c.size+"%")}
547
- function pn(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function qn(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}S("shaka.text.UITextDisplayer",hn);hn.prototype.setTextVisibility=hn.prototype.setTextVisibility;
548
- hn.prototype.isTextVisible=hn.prototype.isTextVisible;hn.prototype.remove=hn.prototype.remove;hn.prototype.destroy=hn.prototype.destroy;hn.prototype.append=hn.prototype.append;hn.prototype.configure=hn.prototype.configure;function rn(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=$m(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
549
- break;case "right":g.push("align:right");break;case Tb: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}S("shaka.text.WebVttGenerator",function(){});function sn(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}sn.prototype.configure=function(a){this.g=a};function tn(a){a.i=!1;a.l=!0;a.j=!1}
550
- function un(a,b,c){try{if(!a.g.enabled)return b;var d=vn(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=wn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=xn;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=yn;break a}e=void 0}d.ot=e;d.su=
551
- !0;var f=zn(d);return An(b,f)}catch(g){return bb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function vn(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}}
552
- function Bn(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,vn(a));c.pr=a.h.Za();var e=c.ot===Cn||c.ot===xn;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=Dn(a,c);if(d)d=En(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=zn(a);f&&(b.uris=b.uris.map(function(g){return An(g,f)}))}}}function Dn(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}
553
- function Fn(a){if(0===a.type)return Gn;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?xn:Cn;if("audio"==b)return wn;if("text"==b)return"application/mp4"===a.mimeType?Hn:In}}function Jn(a,b){b=a.h.sb()[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}
554
- function Kn(a,b){b=a.h.sb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function Ln(a,b){var c=a.h.Zb();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 Cn:return a.videoBandwidth||NaN;case wn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
555
- function zn(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"===
556
- l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function En(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=zn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
557
- function An(a,b){if(!b||a.includes("offline:"))return a;a=new sc(a);a.g.set("CMCD",b);return a.toString()}var yn="m",wn="a",Cn="v",xn="av",Gn="i",In="c",Hn="tt";S("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",bh:"s",OTHER:"o"});function Mn(a){this.h=a;this.g=null}r=Mn.prototype;r.configure=function(a){this.h=a};r.kg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Nn)?1E3*this.g.get(Nn):null};r.jg=function(){return this.h.enabled&&this.g&&this.g.has(On)?1E3*this.g.get(On):null};r.Lh=function(){return this.h.enabled&&this.g&&this.g.has(Pn)?this.g.get(Pn):null};r.Mh=function(){return this.h.enabled&&this.g&&this.g.has(Qn)?this.g.get(Qn):null};
558
- r.getBandwidthEstimate=function(a){var b=this.jg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Rn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Mn);Mn.prototype.getBandwidthEstimate=Mn.prototype.getBandwidthEstimate;Mn.prototype.getRoundTripTime=Mn.prototype.Mh;Mn.prototype.getResponseDelay=Mn.prototype.Lh;Mn.prototype.getEstimatedThroughput=Mn.prototype.jg;
559
- Mn.prototype.getMaxBitrate=Mn.prototype.kg;var On="etp",Nn="mb",Pn="rd",Qn="rtt";function Sn(){this.g=null;this.h=[]}function Tn(a,b){return O(function(c){if(1==c.g)return a.g?E(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;H(c)})}Sn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){jg.call(this);var c=this;this.l=Un;this.Md=this.h=null;this.da=!1;this.be=new hb;this.Rc=new hb;this.m=new hb;this.ya=new hb;this.Qc=new hb;this.C=this.F=this.A=this.G=null;this.de=0;this.W=new Sn;this.ga=this.qf=this.$=this.i=this.Fa=this.J=this.j=this.qb=this.K=this.$g=this.aa=this.N=this.Oc=this.L=this.Pd=this.H=this.hb=null;this.La=!1;this.ua=this.o=null;this.Of=1E9;this.ed=[];this.P=NaN;this.g=Vn(this);this.ba={width:Infinity,height:Infinity};this.Kd=new ni(this.g,this.ba,null);
560
- this.wf=[];this.s=null;this.xa=new Kf(this.g.preferredAudioLanguage,this.g.preferredVariantRole,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.Ea=this.g.preferredTextLanguage;this.$c=this.g.preferredTextRole;this.Xc=this.g.preferForcedSubs;this.Sc=[];b&&b(this);this.N=Wn(this);this.aa=new Mn(this.g.cmsd);
561
- this.G=Xn(this);this.G.Df(this.g.streaming.forceHTTP);this.G.Ef(this.g.streaming.forceHTTPS);this.Sf=this.ma=this.B=null;this.Rf=new Tc(function(){return O(function(d){if(1==d.g)return c.ma?E(d,c.oc(c.Sf,!0),3):d.u(0);if(4!=d.g)return E(d,c.load(c.ma),4);c.Sf.play();c.ma=null;H(d)})});Yn&&(this.B=Yn(),this.B.configure(this.g.ads),this.Qc.D(this.B,"ad-started",function(d){var e,f;return O(function(g){if(1==g.g){if(c.g.ads.supportsMultipleMediaElements)return g.return();e=d.originalEvent;if(!e)return g.return();
562
- f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return g.return();c.Rf.stop();if(c.ma)return g.u(0);c.Sf=c.h;return E(g,c.cg(!0),3)}c.ma=g.h;H(g)})}),this.Qc.D(this.B,"ad-stopped",function(d){c.g.ads.supportsMultipleMediaElements||(d=d.originalEvent)&&d.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&c.Rf.X(.1)}));this.be.D(window,"online",function(){Zn(c);c.vf()});this.Vd=new Tc(function(){return $n(c)});this.na=null;a&&(rb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),
563
- this.oc(a,!0))}qa(X,jg);function ao(a){null!=a.K&&(Ej(a.K),a.K.release(),a.K=null)}function bo(a,b){b.lcevc.enabled?(ao(a),null==a.K&&(a.K=new Dj(a.h,a.$g,b.lcevc),a.F&&(a.F.$=a.K))):ao(a)}function co(a,b){return new U(a,b)}r=X.prototype;
564
- r.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==eo)return g.return();ao(a);b=a.detach();a.l=eo;return E(g,b,2);case 2:c=[];d=t(a.wf);for(e=d.next();!e.done;e=d.next())f=e.value,f.s||c.push(f.destroy());a.wf=[];return E(g,Promise.all(c),3);case 3:a.be&&(a.be.release(),a.be=null);a.Rc&&(a.Rc.release(),a.Rc=null);a.m&&(a.m.release(),a.m=null);a.ya&&(a.ya.release(),a.ya=null);a.Qc&&(a.Qc.release(),a.Qc=null);a.ua=null;a.g=null;a.s=null;a.Md=null;a.N=null;a.aa=
565
- null;if(!a.G){g.u(4);break}return E(g,a.G.destroy(),5);case 5:a.G=null;case 4:a.o&&(a.o.release(),a.o=null),jg.prototype.release.call(a),H(g)}})};function fo(a,b){a.dispatchEvent(co("onstatechange",(new Map).set("state",b)))}
566
- r.oc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return O(function(g){switch(g.g){case 1:if(c.l==eo)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return E(g,c.detach(),2);case 2:return E(g,go(c,"attach"),4);case 4:if(g.h)return g.return();xa(g,5,6);d||(fo(c,"attach"),e=function(){var h=ho(c,!1);h&&io(c,h)},c.Rc.D(a,"error",e),c.h=a);if(!b||!Uc()||c.F){g.u(6);break}return E(g,jo(c),6);case 6:Ba(g);c.W.release();Da(g,0);break;case 5:return f=Aa(g),E(g,c.detach(),10);case 10:throw f;
567
- }})};r.kh=function(a){this.$g=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==eo)throw new T(2,7,7E3);return E(c,b.kc(!1,a),2)}if(3!=c.g)return E(c,go(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.Rc.nb(),b.h=null),fo(b,"detach"),b.B&&!a&&b.B.release()}finally{b.W.release()}H(c)})};function go(a,b){var c;return O(function(d){return 1==d.g?(c=++a.de,E(d,Tn(a.W,b),2)):c!=a.de?(a.W.release(),d.return(!0)):d.return(!1)})}
568
- r.kc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,q;return O(function(p){switch(p.g){case 1:return c.l!=eo&&(c.l=Un),E(p,go(c,"unload"),2);case 2:if(p.h)return p.return();ya(p,3);c.La=!1;fo(c,"unload");a&&!Uc()&&(a=!1);ao(c);d=c.Sc.map(function(u){return u()});c.Sc=[];return E(p,Promise.all(d),5);case 5:c.dispatchEvent(co("unloading"));c.Oc&&(c.Oc.release(),c.Oc=null);c.h&&(c.m.nb(),c.ya.nb());c.Vd.stop();c.hb&&(c.hb.release(),c.hb=null);c.Pd&&(c.Pd.stop(),c.Pd=null);
546
+ function on(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function pn(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}S("shaka.text.UITextDisplayer",gn);gn.prototype.setTextVisibility=gn.prototype.setTextVisibility;
547
+ gn.prototype.isTextVisible=gn.prototype.isTextVisible;gn.prototype.remove=gn.prototype.remove;gn.prototype.destroy=gn.prototype.destroy;gn.prototype.append=gn.prototype.append;gn.prototype.configure=gn.prototype.configure;function qn(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Zm(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
548
+ break;case "right":g.push("align:right");break;case Tb: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}S("shaka.text.WebVttGenerator",function(){});function rn(a,b){this.h=a;this.g=b;this.m=void 0;this.i=!1;this.l=!0;this.j=!1}rn.prototype.configure=function(a){this.g=a};function sn(a){a.i=!1;a.l=!0;a.j=!1}
549
+ function tn(a,b,c){try{if(!a.g.enabled)return b;var d=un(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=vn;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=wn;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=xn;break a}e=void 0}d.ot=e;d.su=
550
+ !0;var f=yn(d);return zn(b,f)}catch(g){return bb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function un(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}}
551
+ function An(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,un(a));c.pr=a.h.Za();var e=c.ot===Bn||c.ot===wn;a.j&&e&&(c.bs=!0,c.su=!0,a.j=!1);null==c.su&&(c.su=a.l);a=Cn(a,c);if(d)d=Dn(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=yn(a);f&&(b.uris=b.uris.map(function(g){return zn(g,f)}))}}}function Cn(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}
552
+ function En(a){if(0===a.type)return Fn;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?wn:Bn;if("audio"==b)return vn;if("text"==b)return"application/mp4"===a.mimeType?Gn:Hn}}function In(a,b){b=a.h.sb()[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}
553
+ function Jn(a,b){b=a.h.sb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function Kn(a,b){var c=a.h.Zb();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 Bn:return a.videoBandwidth||NaN;case vn:return a.audioBandwidth||NaN;default:return a.bandwidth}}
554
+ function yn(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"===
555
+ l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Dn(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=yn(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
556
+ function zn(a,b){if(!b||a.includes("offline:"))return a;a=new sc(a);a.g.set("CMCD",b);return a.toString()}var xn="m",vn="a",Bn="v",wn="av",Fn="i",Hn="c",Gn="tt";S("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",uj:"s",OTHER:"o"});function Ln(a){this.h=a;this.g=null}r=Ln.prototype;r.configure=function(a){this.h=a};r.kg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Mn)?1E3*this.g.get(Mn):null};r.jg=function(){return this.h.enabled&&this.g&&this.g.has(Nn)?1E3*this.g.get(Nn):null};r.Kh=function(){return this.h.enabled&&this.g&&this.g.has(On)?this.g.get(On):null};r.Lh=function(){return this.h.enabled&&this.g&&this.g.has(Pn)?this.g.get(Pn):null};
557
+ r.getBandwidthEstimate=function(a){var b=this.jg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Qn(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Ln);Ln.prototype.getBandwidthEstimate=Ln.prototype.getBandwidthEstimate;Ln.prototype.getRoundTripTime=Ln.prototype.Lh;Ln.prototype.getResponseDelay=Ln.prototype.Kh;Ln.prototype.getEstimatedThroughput=Ln.prototype.jg;
558
+ Ln.prototype.getMaxBitrate=Ln.prototype.kg;var Nn="etp",Mn="mb",On="rd",Pn="rtt";function Rn(){this.g=null;this.h=[]}function Sn(a,b){return O(function(c){if(1==c.g)return a.g?E(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;H(c)})}Rn.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function X(a,b){jg.call(this);var c=this;this.l=Tn;this.Md=this.h=null;this.da=!1;this.be=new hb;this.Rc=new hb;this.m=new hb;this.ya=new hb;this.Qc=new hb;this.C=this.F=this.A=this.G=null;this.de=0;this.W=new Rn;this.ga=this.qf=this.$=this.i=this.Fa=this.J=this.j=this.qb=this.K=this.$g=this.aa=this.N=this.Oc=this.L=this.Pd=this.H=this.hb=null;this.Ka=!1;this.ua=this.o=null;this.Of=1E9;this.ed=[];this.T=NaN;this.g=Un(this);this.ba={width:Infinity,height:Infinity};this.Kd=new ni(this.g,this.ba,null);
559
+ this.wf=[];this.s=null;this.xa=new Kf(this.g.preferredAudioLanguage,this.g.preferredVariantRole,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.Ea=this.g.preferredTextLanguage;this.$c=this.g.preferredTextRole;this.Xc=this.g.preferForcedSubs;this.Sc=[];b&&b(this);this.N=Vn(this);this.aa=new Ln(this.g.cmsd);
560
+ this.G=Wn(this);this.G.Df(this.g.streaming.forceHTTP);this.G.Ef(this.g.streaming.forceHTTPS);this.Sf=this.ma=this.B=null;this.Rf=new Tc(function(){return O(function(d){if(1==d.g)return c.ma?E(d,c.oc(c.Sf,!0),3):d.u(0);if(4!=d.g)return E(d,c.load(c.ma),4);c.Sf.play();c.ma=null;H(d)})});Xn&&(this.B=Xn(),this.B.configure(this.g.ads),this.Qc.D(this.B,"ad-started",function(d){var e,f;return O(function(g){if(1==g.g){if(c.g.ads.supportsMultipleMediaElements)return g.return();e=d.originalEvent;if(!e)return g.return();
561
+ f=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED;if(e.type!=f)return g.return();c.Rf.stop();if(c.ma)return g.u(0);c.Sf=c.h;return E(g,c.cg(!0),3)}c.ma=g.h;H(g)})}),this.Qc.D(this.B,"ad-stopped",function(d){c.g.ads.supportsMultipleMediaElements||(d=d.originalEvent)&&d.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&c.Rf.X(.1)}));this.be.D(window,"online",function(){Yn(c);c.vf()});this.Vd=new Tc(function(){return Zn(c)});this.na=null;a&&(rb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),
562
+ this.oc(a,!0))}qa(X,jg);function $n(a){null!=a.K&&(Ej(a.K),a.K.release(),a.K=null)}function ao(a,b){b.lcevc.enabled?($n(a),null==a.K&&(a.K=new Dj(a.h,a.$g,b.lcevc),a.F&&(a.F.$=a.K))):$n(a)}function bo(a,b){return new U(a,b)}r=X.prototype;
563
+ r.destroy=function(){var a=this,b,c,d,e,f;return O(function(g){switch(g.g){case 1:if(a.l==co)return g.return();$n(a);b=a.detach();a.l=co;return E(g,b,2);case 2:c=[];d=t(a.wf);for(e=d.next();!e.done;e=d.next())f=e.value,f.s||c.push(f.destroy());a.wf=[];return E(g,Promise.all(c),3);case 3:a.be&&(a.be.release(),a.be=null);a.Rc&&(a.Rc.release(),a.Rc=null);a.m&&(a.m.release(),a.m=null);a.ya&&(a.ya.release(),a.ya=null);a.Qc&&(a.Qc.release(),a.Qc=null);a.ua=null;a.g=null;a.s=null;a.Md=null;a.N=null;a.aa=
564
+ null;if(!a.G){g.u(4);break}return E(g,a.G.destroy(),5);case 5:a.G=null;case 4:a.o&&(a.o.release(),a.o=null),jg.prototype.release.call(a),H(g)}})};function eo(a,b){a.dispatchEvent(bo("onstatechange",(new Map).set("state",b)))}
565
+ r.oc=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return O(function(g){switch(g.g){case 1:if(c.l==co)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return E(g,c.detach(),2);case 2:return E(g,fo(c,"attach"),4);case 4:if(g.h)return g.return();xa(g,5,6);d||(eo(c,"attach"),e=function(){var h=go(c,!1);h&&ho(c,h)},c.Rc.D(a,"error",e),c.h=a);if(!b||!Uc()||c.F){g.u(6);break}return E(g,io(c),6);case 6:Ba(g);c.W.release();Da(g,0);break;case 5:return f=Aa(g),E(g,c.detach(),10);case 10:throw f;
566
+ }})};r.jh=function(a){this.$g=a};r.detach=function(a){a=void 0===a?!1:a;var b=this;return O(function(c){if(1==c.g){if(b.l==co)throw new T(2,7,7E3);return E(c,b.kc(!1,a),2)}if(3!=c.g)return E(c,fo(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.Rc.nb(),b.h=null),eo(b,"detach"),b.B&&!a&&b.B.release()}finally{b.W.release()}H(c)})};function fo(a,b){var c;return O(function(d){return 1==d.g?(c=++a.de,E(d,Sn(a.W,b),2)):c!=a.de?(a.W.release(),d.return(!0)):d.return(!1)})}
567
+ r.kc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,q;return O(function(p){switch(p.g){case 1:return c.l!=co&&(c.l=Tn),E(p,fo(c,"unload"),2);case 2:if(p.h)return p.return();ya(p,3);c.Ka=!1;eo(c,"unload");a&&!Uc()&&(a=!1);$n(c);d=c.Sc.map(function(u){return u()});c.Sc=[];return E(p,Promise.all(d),5);case 5:c.dispatchEvent(bo("unloading"));c.Oc&&(c.Oc.release(),c.Oc=null);c.h&&(c.m.nb(),c.ya.nb());c.Vd.stop();c.hb&&(c.hb.release(),c.hb=null);c.Pd&&(c.Pd.stop(),c.Pd=null);
569
568
  if(!c.J){p.u(6);break}return E(p,c.J.stop(),7);case 7:c.J=null,c.Fa=null;case 6:if(!c.o){p.u(8);break}return E(p,c.o.stop(),8);case 8:if(!c.j){p.u(10);break}return E(p,c.j.destroy(),11);case 11:c.j=null;case 10:c.H&&(c.H.release(),c.H=null);c.C&&(c.C.release(),c.C=null);if(!sd("webkit")||!c.A){p.u(12);break}return E(p,c.A.destroy(),13);case 13:c.A=null;case 12:if(!c.F){p.u(14);break}return E(p,c.F.destroy(),15);case 15:c.F=null;case 14:if(c.B&&!b)c.B.onAssetUnload();c.ma&&!b&&(c.ma.destroy(),c.ma=
570
- null);b||c.Rf.stop();c.N&&tn(c.N);c.aa&&(c.aa.g=null);c.h&&gn(c.h);if(!c.h||!c.h.src){p.u(16);break}return E(p,new Promise(function(u){return(new Tc(u)).X(.1)}),17);case 17:c.h.removeAttribute("src"),c.h.load();case 16:if(!c.A){p.u(18);break}return E(p,c.A.destroy(),19);case 19:c.A=null;case 18:c.na&&c.$!=c.na.vc()&&(c.na.s||c.na.destroy(),c.na=null);c.$=null;c.qf=null;c.L=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=
571
- k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(n=m.next();!n.done;n=m.next())q=n.value,q.segmentIndex&&q.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(df={},Qc.clear());c.i=null;c.s=new Xk;c.Kf=null;c.ed=[];c.P=NaN;ko(c);case 3:Ba(p);c.W.release();Da(p,4);break;case 4:if(a&&Uc()&&!c.F)return E(p,jo(c),0);p.u(0)}})};r.Ri=function(a){this.ga=a};
572
- r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,q,p,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==eo)throw new T(2,7,7E3);e=null;f="";a instanceof om?(e=a,f=e.vc()||""):f=a||"";return E(A,Tn(d.W,"load"),2);case 2:d.W.release();if(!d.h)throw new T(2,7,7002);if(!d.$){A.u(3);break}d.$=f;return E(A,d.kc(!1),3);case 3:g=++d.de;h=function(){return O(function(y){if(1==y.g)return d.de==g?y.u(0):e?E(y,e.destroy(),3):y.u(3);throw new T(2,7,7E3);})};k=function(y,C){return O(function(z){switch(z.g){case 1:return ya(z,
573
- 2),E(z,Tn(d.W,C),4);case 4:return E(z,h(),5);case 5:return E(z,y(),6);case 6:return E(z,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:Ba(z),d.W.release(),Da(z,0)}})};xa(A,5,6);null==b&&e&&(b=e.getStartTime());d.ga=b;d.La=!1;d.dispatchEvent(co("loading"));if(e){c=e.P;A.u(8);break}if(c){A.u(8);break}return E(A,k(function(){return O(function(y){if(1==y.g)return E(y,lo(d,f),2);c=y.h;H(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){rm(e,d);d.s=e.getStats();A.u(11);break}return E(A,mo(d,f,b,c,!0),12);case 12:(e=
574
- A.h)?(rm(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new Xk;case 11:m=!e;n=e?e.qb:Date.now()/1E3;d.s=e?e.getStats():new Xk;d.$=f;d.qf=c||null;if(m)return E(A,k(function(){return O(function(y){return E(y,no(d,c),0)})},"initializeSrcEqualsDrmInner_"),20);if(d.F){A.u(15);break}return E(A,k(function(){return O(function(y){return E(y,jo(d),0)})},"initializeMediaSourceEngineInner_"),15);case 15:return E(A,k(function(){return O(function(y){return E(y,e.m,0)})},"waitForFinish"),17);case 17:d.g=
575
- e.getConfiguration();d.Kd=e.B;d.Fa=e.C;d.J=tm(e);d.Oc=um(e);d.qb=e.ya;d.i=e.Re();if(q=e.o)d.xa=q;l&&d.h&&"AUDIO"===d.h.nodeName&&(oo(d),d.configure("manifest.disableVideo",!0));d.A=vm(e);return E(A,k(function(){return O(function(y){return E(y,d.A.oc(d.h),0)})},"drmEngine_.attach"),18);case 18:return!(p=e.A)||d.ua&&d.ua==p||(d.o=sm(e),d.ua=e.A,"function"!=typeof d.o.setMediaElement&&(rb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=
576
- function(){}),"function"!=typeof d.o.setCmsdManager&&(rb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(rb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),u=wm(e),v=e.ga,E(A,k(function(){return O(function(y){return E(y,po(d,n,v,u),0)})},"loadInner_"),19);case 19:qm(e);A.u(14);break;case 20:return E(A,
577
- k(function(){return O(function(y){return E(y,qo(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(co("loaded"));case 6:Ba(A);if(!e){A.u(22);break}return E(A,e.destroy(),22);case 22:d.na=null;Da(A,0);break;case 5:w=Aa(A);if(!w||7E3==w.code){A.u(24);break}return E(A,d.kc(!1),24);case 24:throw w;}})};
578
- function oo(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}r.Ni=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?E(e,ro(c),2):3!=e.g?(d=e.h,E(e,c.kc(a,b),3)):e.return(d)})};
579
- r.cg=function(a){a=void 0===a?!1:a;var b=this,c;return O(function(d){return 1==d.g?E(d,ro(b),2):3!=d.g?(c=d.h,E(d,b.detach(a),3)):d.return(c)})};
580
- function ro(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.J&&a.Fa&&a.$))return e.u(2);c=a.h.currentTime;a.U()&&(c=null);d=Date.now()/1E3;return E(e,so(a,a.$,c,a.qf,d,!0,!1,!1),3)}if(2!=e.g){var f=b=e.h,g=a.J,h=a.Fa;f.h=a.i;f.j=g;f.C=h;f=b;g=a.ua;f.i=a.o;f.A=g;b.o=a.xa;b.start();a.i=null;a.J=null;a.Fa=null;a.o=null;a.ua=null}return e.return(b)})}
581
- r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return E(f,mo(d,a,b,c),2);(e=f.h)?e.start():io(d,new T(2,7,7005));return f.return(e)})};function mo(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return O(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.u(2):E(l,lo(a,b),3);2!=l.g&&(d=l.h);if(g=to(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.ua==a.g.abrFactory&&(k=!1),a.h&&"AUDIO"===a.h.nodeName&&(h=!0));return l.return(so(a,b,c,d||null,f,!e,h,k))})}
582
- function so(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,q,p,u,v,w,A,y,C,z,B,D;return O(function(I){if(1==I.g)return k=null,l=Ke(a.g),g&&(l.manifest.disableVideo=!0),m=function(){return k.N&&k.s?null:k},n=function(){return m()?m().getConfiguration():a.g},q=function(F,K){m()?k.configure(F,K):a.configure(F,K)},Infinity!=a.ba.width||Infinity!=a.ba.height?I.u(2):E(I,ud(),3);2!=I.g&&(p=I.h,a.ba.width=p.width,a.ba.height=p.height);u=new ni(l,a.ba,null);v={networkingEngine:a.G,
583
- filter:function(F){var K,J;return O(function(G){if(1==G.g)return E(G,oi(u,F),2);if(4!=G.g){K=G.h;if(!K)return G.u(0);J=co("trackschanged");return E(G,Promise.resolve(),4)}k.dispatchEvent(J);H(G)})},makeTextStreamsForClosedCaptions:function(F){return uo(a,F)},onTimelineRegionAdded:function(F){var K=k.F;a:{var J=t(K.g);for(var G=J.next();!G.done;G=J.next())if(G=G.value,G.schemeIdUri==F.schemeIdUri&&G.id==F.id&&G.startTime==F.startTime&&G.endTime==F.endTime){J=G;break a}J=null}null==J&&(K.g.add(F),F=
569
+ null);b||c.Rf.stop();c.N&&sn(c.N);c.aa&&(c.aa.g=null);c.h&&fn(c.h);if(!c.h||!c.h.src){p.u(16);break}return E(p,new Promise(function(u){return(new Tc(u)).X(.1)}),17);case 17:c.h.removeAttribute("src"),c.h.load();case 16:if(!c.A){p.u(18);break}return E(p,c.A.destroy(),19);case 19:c.A=null;case 18:c.na&&c.$!=c.na.vc()&&(c.na.s||c.na.destroy(),c.na=null);c.$=null;c.qf=null;c.L=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=
570
+ k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(n=m.next();!n.done;n=m.next())q=n.value,q.segmentIndex&&q.segmentIndex.release()}c.g.streaming.clearDecodingCache&&(df={},Qc.clear());c.i=null;c.s=new Xk;c.Kf=null;c.ed=[];c.T=NaN;jo(c);case 3:Ba(p);c.W.release();Da(p,4);break;case 4:if(a&&Uc()&&!c.F)return E(p,io(c),0);p.u(0)}})};r.Qi=function(a){this.ga=a};
571
+ r.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,q,p,u,v,w;return O(function(A){switch(A.g){case 1:if(d.l==co)throw new T(2,7,7E3);e=null;f="";a instanceof nm?(e=a,f=e.vc()||""):f=a||"";return E(A,Sn(d.W,"load"),2);case 2:d.W.release();if(!d.h)throw new T(2,7,7002);if(!d.$){A.u(3);break}d.$=f;return E(A,d.kc(!1),3);case 3:g=++d.de;h=function(){return O(function(y){if(1==y.g)return d.de==g?y.u(0):e?E(y,e.destroy(),3):y.u(3);throw new T(2,7,7E3);})};k=function(y,C){return O(function(z){switch(z.g){case 1:return ya(z,
572
+ 2),E(z,Sn(d.W,C),4);case 4:return E(z,h(),5);case 5:return E(z,y(),6);case 6:return E(z,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:Ba(z),d.W.release(),Da(z,0)}})};xa(A,5,6);null==b&&e&&(b=e.getStartTime());d.ga=b;d.Ka=!1;d.dispatchEvent(bo("loading"));if(e){c=e.T;A.u(8);break}if(c){A.u(8);break}return E(A,k(function(){return O(function(y){if(1==y.g)return E(y,ko(d,f),2);c=y.h;H(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){qm(e,d);d.s=e.getStats();A.u(11);break}return E(A,lo(d,f,b,c,!0),12);case 12:(e=
573
+ A.h)?(qm(e,d),d.s=e.getStats(),e.start(),e.m.catch(function(){})):d.s=new Xk;case 11:m=!e;n=e?e.qb:Date.now()/1E3;d.s=e?e.getStats():new Xk;d.$=f;d.qf=c||null;if(m)return E(A,k(function(){return O(function(y){return E(y,mo(d,c),0)})},"initializeSrcEqualsDrmInner_"),20);if(d.F){A.u(15);break}return E(A,k(function(){return O(function(y){return E(y,io(d),0)})},"initializeMediaSourceEngineInner_"),15);case 15:return E(A,k(function(){return O(function(y){return E(y,e.m,0)})},"waitForFinish"),17);case 17:d.g=
574
+ e.getConfiguration();d.Kd=e.B;d.Fa=e.C;d.J=sm(e);d.Oc=tm(e);d.qb=e.ya;d.i=e.Re();if(q=e.o)d.xa=q;l&&d.h&&"AUDIO"===d.h.nodeName&&(no(d),d.configure("manifest.disableVideo",!0));d.A=um(e);return E(A,k(function(){return O(function(y){return E(y,d.A.oc(d.h),0)})},"drmEngine_.attach"),18);case 18:return!(p=e.A)||d.ua&&d.ua==p||(d.o=rm(e),d.ua=e.A,"function"!=typeof d.o.setMediaElement&&(rb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=
575
+ function(){}),"function"!=typeof d.o.setCmsdManager&&(rb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(rb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.o.trySuggestStreams=function(){})),u=vm(e),v=e.ga,E(A,k(function(){return O(function(y){return E(y,oo(d,n,v,u),0)})},"loadInner_"),19);case 19:pm(e);A.u(14);break;case 20:return E(A,
576
+ k(function(){return O(function(y){return E(y,po(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(bo("loaded"));case 6:Ba(A);if(!e){A.u(22);break}return E(A,e.destroy(),22);case 22:d.na=null;Da(A,0);break;case 5:w=Aa(A);if(!w||7E3==w.code){A.u(24);break}return E(A,d.kc(!1),24);case 24:throw w;}})};
577
+ function no(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}r.Mi=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return O(function(e){return 1==e.g?E(e,qo(c),2):3!=e.g?(d=e.h,E(e,c.kc(a,b),3)):e.return(d)})};
578
+ r.cg=function(a){a=void 0===a?!1:a;var b=this,c;return O(function(d){return 1==d.g?E(d,qo(b),2):3!=d.g?(c=d.h,E(d,b.detach(a),3)):d.return(c)})};
579
+ function qo(a){var b,c,d;return O(function(e){if(1==e.g){b=null;if(!(a.i&&a.J&&a.Fa&&a.$))return e.u(2);c=a.h.currentTime;a.U()&&(c=null);d=Date.now()/1E3;return E(e,ro(a,a.$,c,a.qf,d,!0,!1,!1),3)}if(2!=e.g){var f=b=e.h,g=a.J,h=a.Fa;f.h=a.i;f.j=g;f.C=h;f=b;g=a.ua;f.i=a.o;f.A=g;b.o=a.xa;b.start();a.i=null;a.J=null;a.Fa=null;a.o=null;a.ua=null}return e.return(b)})}
580
+ r.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return O(function(f){if(1==f.g)return E(f,lo(d,a,b,c),2);(e=f.h)?e.start():ho(d,new T(2,7,7005));return f.return(e)})};function lo(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return O(function(l){if(1==l.g)return f=Date.now()/1E3,d?l.u(2):E(l,ko(a,b),3);2!=l.g&&(d=l.h);if(g=so(a,d))return l.return(null);h=!1;k=!0;e&&(a.o&&a.ua==a.g.abrFactory&&(k=!1),a.h&&"AUDIO"===a.h.nodeName&&(h=!0));return l.return(ro(a,b,c,d||null,f,!e,h,k))})}
581
+ function ro(a,b,c,d,e,f,g,h){f=void 0===f?!0:f;g=void 0===g?!1:g;h=void 0===h?!0:h;var k,l,m,n,q,p,u,v,w,A,y,C,z,B,D;return O(function(I){if(1==I.g)return k=null,l=Ke(a.g),g&&(l.manifest.disableVideo=!0),m=function(){return k.N&&k.s?null:k},n=function(){return m()?m().getConfiguration():a.g},q=function(F,K){m()?k.configure(F,K):a.configure(F,K)},Infinity!=a.ba.width||Infinity!=a.ba.height?I.u(2):E(I,ud(),3);2!=I.g&&(p=I.h,a.ba.width=p.width,a.ba.height=p.height);u=new ni(l,a.ba,null);v={networkingEngine:a.G,
582
+ filter:function(F){var K,J;return O(function(G){if(1==G.g)return E(G,oi(u,F),2);if(4!=G.g){K=G.h;if(!K)return G.u(0);J=bo("trackschanged");return E(G,Promise.resolve(),4)}k.dispatchEvent(J);H(G)})},makeTextStreamsForClosedCaptions:function(F){return to(a,F)},onTimelineRegionAdded:function(F){var K=k.F;a:{var J=t(K.g);for(var G=J.next();!G.done;G=J.next())if(G=G.value,G.schemeIdUri==F.schemeIdUri&&G.id==F.id&&G.startTime==F.startTime&&G.endTime==F.endTime){J=G;break a}J=null}null==J&&(K.g.add(F),F=
584
583
  new U("regionadd",new Map([["region",F]])),K.dispatchEvent(F))},onEvent:function(F){return k.dispatchEvent(F)},onError:function(F){return k.onError(F)},isLowLatencyMode:function(){return n().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return n().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){q("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&k.N&&a.j.updateDuration()},newDrmInfo:function(F){var K=k.l,J=K?K.g:null;J&&K.s&&qi(u,J.keySystem,F)},onManifestUpdated:function(){var F=
585
- (new Map).set("isLive",a.U());k.dispatchEvent(co("manifestupdated",F));pm(k,!1,function(){if(a.B)a.B.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new jl(function(){return a.Mb()});w.addEventListener("regionadd",function(F){var K=F.region;vo(a,"timelineregionadded",K,k);pm(k,!1,function(){if(a.B)a.B.onDashTimedMetadata(K)})});A=null;l.streaming.observeQualityChanges&&(A=new kl(function(){return a.sb()}),A.addEventListener("qualitychange",function(F){var K=
586
- F.quality;F=F.position;K=(new Map).set("mediaQuality",{bandwidth:K.bandwidth,audioSamplingRate:K.audioSamplingRate,codecs:K.codecs,contentType:K.contentType,frameRate:K.frameRate,height:K.height,mimeType:K.mimeType,channelsCount:K.channelsCount,pixelAspectRatio:K.pixelAspectRatio,width:K.width}).set("position",F);a.dispatchEvent(co("mediaqualitychanged",K))}));y=!0;C={Cb:a.G,onError:function(F){return k.onError(F)},Yd:function(F){pm(k,!0,function(){a:{var K=F,J=co("keystatuschanged");a.dispatchEvent(J);
584
+ (new Map).set("isLive",a.U());k.dispatchEvent(bo("manifestupdated",F));om(k,!1,function(){if(a.B)a.B.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()}};w=new jl(function(){return a.Mb()});w.addEventListener("regionadd",function(F){var K=F.region;uo(a,"timelineregionadded",K,k);om(k,!1,function(){if(a.B)a.B.onDashTimedMetadata(K)})});A=null;l.streaming.observeQualityChanges&&(A=new kl(function(){return a.sb()}),A.addEventListener("qualitychange",function(F){var K=
585
+ F.quality;F=F.position;K=(new Map).set("mediaQuality",{bandwidth:K.bandwidth,audioSamplingRate:K.audioSamplingRate,codecs:K.codecs,contentType:K.contentType,frameRate:K.frameRate,height:K.height,mimeType:K.mimeType,channelsCount:K.channelsCount,pixelAspectRatio:K.pixelAspectRatio,width:K.width}).set("position",F);a.dispatchEvent(bo("mediaqualitychanged",K))}));y=!0;C={Cb:a.G,onError:function(F){return k.onError(F)},Yd:function(F){om(k,!0,function(){a:{var K=F,J=bo("keystatuschanged");a.dispatchEvent(J);
587
586
  var G=Object.keys(K);1==G.length&&""==G[0]&&(G=["00"],K={"00":K[""]});J=1==G.length&&"00"==G[0];var L=!1;if(G.length){G=t(a.i.variants);for(var N=G.next();!N.done;N=G.next()){N=N.value;var M=[];N.audio&&M.push(N.audio);N.video&&M.push(N.video);M=t(M);for(var P=M.next();!P.done;P=M.next()){var R=P.value;P=N.allowedByKeySystem;if(R.keyIds.size){N.allowedByKeySystem=!0;R=t(R.keyIds);for(var Q=R.next();!Q.done;Q=R.next())if(Q=Q.value,(Q=K[J?"00":Q])||a.A.F)N.allowedByKeySystem=N.allowedByKeySystem&&!!Q&&
588
- !si.includes(Q)}P!=N.allowedByKeySystem&&(L=!0)}}}if(L&&(wo(a),!xo(a)))break a;(K=a.j.j)&&!K.allowedByKeySystem&&yo(a)}})},onExpirationUpdated:function(F,K){var J=co("expirationupdated");k.dispatchEvent(J);if((J=k.j)&&J.onExpirationUpdated)J.onExpirationUpdated(F,K)},onEvent:function(F){k.dispatchEvent(F);"drmsessionupdate"==F.type&&y&&(y=!1,F=Date.now()/1E3-k.ua,(a.s||k.getStats()).j=F,a.K&&Ej(a.K))}};z=Xn(a,m);qg(a.G,z);B=function(){return a.qc(C)};D={config:l,hi:v,ri:w,pi:A,qc:B,gi:u,networkingEngine:z,
589
- jh:f,ih:h};k=new om(b,d,e,c,D);a.wf.push(k);return I.return(k)})}function lo(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,E(e,Im(b,a.G,c),2);d=e.h;"application/x-mpegurl"==d&&gd()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
590
- function to(a,b){if(!Uc())return!0;if(b){if(""==(a.h||Wc()).canPlayType(b))return!1;if(!(Uc()&&b in vi))return!0;if(oe(b)){if(a.g.streaming.preferNativeHls)return!0;if(gd()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"]))return a.g.streaming.useNativeHlsForFairPlay;if(gd())return a.g.streaming.useNativeHlsOnSafari}}return!1}
591
- function jo(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return fo(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Kf=b,d=zo(a.h,c,{Ch:function(){return a.keySystem()},Zd:function(h,k,l){Ao(a,h,k,l)}},a.K),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.ga=f,E(g,d.L,2);a.F=d;H(g)})}
592
- function po(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K;return O(function(J){switch(J.g){case 1:fo(a,"load");e=a.h;a.H=new Ok({Fd:function(){return e.playbackRate},Ub:function(){return e.defaultPlaybackRate},Ff:function(G){e.playbackRate=G},vg:function(G){e.currentTime+=G}});f=function(){return Bo(a)};g=function(){return Co(a)};a.m.D(e,"playing",f);a.m.D(e,"pause",f);a.m.D(e,"ended",f);a.m.D(e,"ratechange",g);bo(a,a.g);a.Ea=a.g.preferredTextLanguage;a.$c=a.g.preferredTextRole;a.Xc=a.g.preferForcedSubs;
593
- Do(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(G,L,N){a.i&&a.j&&G!=a.j.j&&Eo(a,G,!0,void 0===L?!1:L,void 0===N?0:N)});a.o.setMediaElement(e);a.o.setCmsdManager(a.aa);a.j=Fo(a);a.j.configure(a.g.streaming);a.l=Go;e.textTracks&&a.m.D(e.textTracks,"addtrack",function(G){if(G.track)switch(G=G.track,G.kind){case "chapters":Ho(a,G)}});a.dispatchEvent(co("streaming"));h=c;(k=a.j.j)||h||(h=Io(a,!0));l=[];m=k||h;n=t([m.video,m.audio]);for(q=n.next();!q.done;q=n.next())(p=
594
- q.value)&&!p.segmentIndex&&l.push(p.createSegmentIndex());if(!(0<l.length)){J.u(2);break}return E(J,Promise.all(l),2);case 2:if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(m);Do(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);wl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(G){a.C=Jo(a,G);a.hb=Ko(a,G);Lo(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.ga);if(k){J.u(4);break}if(!a.g.streaming.startAtSegmentBoundary){J.u(5);
595
- break}v=a.i.presentationTimeline;w=a.ga||a.h.currentTime;A=v.Jb();y=v.ub();w<A?w=A:w>y&&(w=y);return E(J,Mo(h,w),6);case 6:C=J.h,u(C);case 5:Eo(a,h,!0,!1,0);case 4:return a.C.ready(),z=a.wc().find(function(G){return G.active}),z||((B=yf(a.i.textStreams,a.Ea,a.$c,a.Xc)[0]||null)&&Wk(a.s.h,B,!0),h&&(B?(No(a,h.audio,B)&&(a.da=!0),a.da&&a.F.F.setTextVisibility(!0),Oo(a)):a.da=!1),B&&(a.g.streaming.alwaysStreamText||a.Ze())&&Fl(a.j,B)),E(J,a.j.start(d),7);case 7:a.g.abr.enabled&&(a.o.enable(),Po(a));wo(a);
596
- xo(a);a.i.variants.some(function(G){return G.primary});if((D=a.U())&&(a.g.streaming.liveSync||a.i.serviceDescription||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)I=function(){return Qo(a)},a.m.D(e,"timeupdate",I);D||(F=function(){return Ro(a)},a.m.D(e,"timeupdate",F),Ro(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(K=function(){var G;return O(function(L){if(1==L.g){G=a.h.duration-a.h.currentTime;if(isNaN(G)||!(G<=a.g.streaming.preloadNextUrlWindow))return L.u(0);
597
- a.m.Gb(e,"timeupdate",K);return E(L,a.preload(a.i.nextUrl),4)}a.na=L.h;H(L)})},a.m.D(e,"timeupdate",K)),a.m.D(e,"ended",function(){a.load(a.na||a.i.nextUrl)})));if(a.B)a.B.onManifestUpdated(D);a.La=!0;a.m.sa(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});H(J)}})}
598
- function no(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Vd,d=Date.now()/1E3,e=!0,a.A=a.qc({Cb:a.G,onError:function(k){io(a,k)},Yd:function(){},onExpirationUpdated:function(){var k=co("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.A.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
587
+ !si.includes(Q)}P!=N.allowedByKeySystem&&(L=!0)}}}if(L&&(vo(a),!wo(a)))break a;(K=a.j.j)&&!K.allowedByKeySystem&&xo(a)}})},onExpirationUpdated:function(F,K){var J=bo("expirationupdated");k.dispatchEvent(J);if((J=k.j)&&J.onExpirationUpdated)J.onExpirationUpdated(F,K)},onEvent:function(F){k.dispatchEvent(F);"drmsessionupdate"==F.type&&y&&(y=!1,F=Date.now()/1E3-k.ua,(a.s||k.getStats()).j=F,a.K&&Ej(a.K))}};z=Wn(a,m);qg(a.G,z);B=function(){return a.qc(C)};D={config:l,gi:v,pi:w,oi:A,qc:B,fi:u,networkingEngine:z,
588
+ ih:f,hh:h};k=new nm(b,d,e,c,D);a.wf.push(k);return I.return(k)})}function ko(a,b){var c,d;return O(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,E(e,Hm(b,a.G,c),2);d=e.h;"application/x-mpegurl"==d&&gd()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
589
+ function so(a,b){if(!Uc())return!0;if(b){if(""==(a.h||Wc()).canPlayType(b))return!1;if(!(Uc()&&b in vi))return!0;if(oe(b)){if(a.g.streaming.preferNativeHls)return!0;if(gd()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"]))return a.g.streaming.useNativeHlsForFairPlay;if(gd())return a.g.streaming.useNativeHlsOnSafari}}return!1}
590
+ function io(a){var b,c,d,e,f;return O(function(g){if(1==g.g)return eo(a,"media-source"),b=a.g.textDisplayFactory,c=b(),c.configure?c.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Kf=b,d=yo(a.h,c,{Bh:function(){return a.keySystem()},Zd:function(h,k,l){zo(a,h,k,l)}},a.K),d.configure(a.g.mediaSource),e=a.g.manifest,f=e.segmentRelativeVttTiming,d.ga=f,E(g,d.L,2);a.F=d;H(g)})}
591
+ function oo(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K;return O(function(J){switch(J.g){case 1:eo(a,"load");e=a.h;a.H=new Ok({Fd:function(){return e.playbackRate},Ub:function(){return e.defaultPlaybackRate},Ff:function(G){e.playbackRate=G},vg:function(G){e.currentTime+=G}});f=function(){return Ao(a)};g=function(){return Bo(a)};a.m.D(e,"playing",f);a.m.D(e,"pause",f);a.m.D(e,"ended",f);a.m.D(e,"ratechange",g);ao(a,a.g);a.Ea=a.g.preferredTextLanguage;a.$c=a.g.preferredTextRole;a.Xc=a.g.preferForcedSubs;
592
+ Co(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.o.init(function(G,L,N){a.i&&a.j&&G!=a.j.j&&Do(a,G,!0,void 0===L?!1:L,void 0===N?0:N)});a.o.setMediaElement(e);a.o.setCmsdManager(a.aa);a.j=Eo(a);a.j.configure(a.g.streaming);a.l=Fo;e.textTracks&&a.m.D(e.textTracks,"addtrack",function(G){if(G.track)switch(G=G.track,G.kind){case "chapters":Go(a,G)}});a.dispatchEvent(bo("streaming"));h=c;(k=a.j.j)||h||(h=Ho(a,!0));l=[];m=k||h;n=t([m.video,m.audio]);for(q=n.next();!q.done;q=n.next())(p=
593
+ q.value)&&!p.segmentIndex&&l.push(p.createSegmentIndex());if(!(0<l.length)){J.u(2);break}return E(J,Promise.all(l),2);case 2:if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(m);Co(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);vl(a.j,a.g.playRangeStart,a.g.playRangeEnd);u=function(G){a.C=Io(a,G);a.hb=Jo(a,G);Ko(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};a.g.streaming.startAtSegmentBoundary||u(a.ga);if(k){J.u(4);break}if(!a.g.streaming.startAtSegmentBoundary){J.u(5);
594
+ break}v=a.i.presentationTimeline;w=a.ga||a.h.currentTime;A=v.Jb();y=v.ub();w<A?w=A:w>y&&(w=y);return E(J,Lo(h,w),6);case 6:C=J.h,u(C);case 5:Do(a,h,!0,!1,0);case 4:return a.C.ready(),z=a.wc().find(function(G){return G.active}),z||((B=yf(a.i.textStreams,a.Ea,a.$c,a.Xc)[0]||null)&&Wk(a.s.h,B,!0),h&&(B?(Mo(a,h.audio,B)&&(a.da=!0),a.da&&a.F.F.setTextVisibility(!0),No(a)):a.da=!1),B&&(a.g.streaming.alwaysStreamText||a.Ze())&&El(a.j,B)),E(J,a.j.start(d),7);case 7:a.g.abr.enabled&&(a.o.enable(),Oo(a));vo(a);
595
+ wo(a);a.i.variants.some(function(G){return G.primary});if((D=a.U())&&(a.g.streaming.liveSync||a.i.serviceDescription||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)I=function(){return Po(a)},a.m.D(e,"timeupdate",I);D||(F=function(){return Qo(a)},a.m.D(e,"timeupdate",F),Qo(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(K=function(){var G;return O(function(L){if(1==L.g){G=a.h.duration-a.h.currentTime;if(isNaN(G)||!(G<=a.g.streaming.preloadNextUrlWindow))return L.u(0);
596
+ a.m.Gb(e,"timeupdate",K);return E(L,a.preload(a.i.nextUrl),4)}a.na=L.h;H(L)})},a.m.D(e,"timeupdate",K)),a.m.D(e,"ended",function(){a.load(a.na||a.i.nextUrl)})));if(a.B)a.B.onManifestUpdated(D);a.Ka=!0;a.m.sa(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b});H(J)}})}
597
+ function mo(a,b){var c,d,e,f,g;return O(function(h){return 1==h.g?(c=Vd,d=Date.now()/1E3,e=!0,a.A=a.qc({Cb:a.G,onError:function(k){ho(a,k)},Yd:function(){},onExpirationUpdated:function(){var k=bo("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.s.j=Date.now()/1E3-d)}}),a.A.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
599
598
  g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?le(b):"",codecs:b?ne(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ea,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},g.fullMimeTypes.add(Xd(g.mimeType,
600
599
  g.codecs)),b.startsWith("audio/")?(g.type=c.V,f.audio=g):f.video=g,a.A.aa=!0,E(h,Kh(a.A,[f],[]),2)):E(h,a.A.oc(a.h),0)})}
601
- function qo(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u;return O(function(v){if(1==v.g)return fo(a,"src-equals"),d=a.h,a.C=new Ek(d),e=!1,a.Sc.push(function(){e=!0}),null!=a.ga&&a.C.re(a.ga),a.H=new Ok({Fd:function(){return d.playbackRate},Ub:function(){return d.defaultPlaybackRate},Ff:function(w){d.playbackRate=w},vg:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,Lo(a,d,f),g=function(){return Bo(a)},h=function(){return Co(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
602
- "ratechange",h),"none"!=d.preload&&a.m.sa(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return wo(a)}),a.m.D(d.audioTracks,"removetrack",function(){return wo(a)}),a.m.D(d.audioTracks,"change",function(){return wo(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":So(a,w);break;case "chapters":Ho(a,w);break;default:wo(a)}}),a.m.D(d.textTracks,"removetrack",function(){return wo(a)}),
603
- a.m.D(d.textTracks,"change",function(){return wo(a)})),k=un(a.N,a.$,c),!k.includes("#t=")&&(0<a.g.playRangeStart||isFinite(a.g.playRangeEnd))&&(k+="#t=",0<a.g.playRangeStart&&(k+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(k+=","+a.g.playRangeEnd)),d.src=k,($c()||cd())&&d.load(),"none"!=d.preload&&!d.autoplay&&oe(c)&&ld()&&d.load(),a.l=To,a.dispatchEvent(co("streaming")),l=new $f,vk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.ready();l.resolve()}),vk(d,HTMLMediaElement.HAVE_CURRENT_DATA,
604
- a.m,function(){var w;return O(function(A){if(1==A.g)return Uo(a),w=Vo(a),w.find(function(y){return"disabled"!=y.mode})?(0<w.length&&(a.da=!0),A.u(2)):E(A,new Promise(function(y){a.m.sa(d.textTracks,"change",y);(new Tc(y)).X(1)}),2);if(e)return A.return();Wo(a);H(A)})}),d.error?l.reject(ho(a)):"none"==d.preload&&(ab('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),
605
- l.resolve()),a.m.sa(d,"error",function(){l.reject(ho(a))}),m=new Promise(function(w,A){(new Tc(A)).X(a.g.streaming.loadTimeout)}),E(v,Promise.race([l,m]),2);if((n=a.U())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)q=function(){return Qo(a)},a.m.D(d,"timeupdate",q);n||(p=function(){return Ro(a)},a.m.D(d,"timeupdate",p),Ro(a));a.B&&(a.B.onManifestUpdated(n),n&&(u=a.Mb().end,a.m.D(d,"progress",function(){var w=a.Mb().end;u!=w&&(a.B.onManifestUpdated(a.U()),
606
- u=w)})));a.La=!0;H(v)})}function Uo(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Gg(b,a.g.preferredVariantRole)}function Wo(a){var b=a.g.preferredTextLanguage;""!=b&&a.zf(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
607
- function So(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Xo(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value)});var c=(new Tc(function(){var d=Yo(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).jc().X(.5);a.Sc.push(function(){c.stop()})}}
608
- function Ao(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&"number"==typeof e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())Xo(a,f,g,"org.id3",k.value);if(a.B)a.B.onHlsTimedMetadata(e,f)}}function Xo(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(co("metadata",b))}
609
- function Ho(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Tc(function(){b.mode="hidden"})).jc().X(.5);a.Sc.push(function(){c.stop()})}}r.vi=function(){for(var a=this.W;a.g;)a.release()};r.qc=function(a){return new Dh(a)};
610
- function Xn(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?pm(b(),!0,e):e()}b||(b=function(){return null});return new mg(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(co("downloadheadersreceived",f));d(function(){if(a.aa){var h=a.aa;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
611
- Rn(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var q=new Map,p=l.split(";");for(l=1;l<p.length;l++){var u=p[l].split("=");q.set(u[0],Rn(u[1]))}var v=q}catch(w){v=null}v&&(h.g=v)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(co("downloadfailed",e))},function(e,f,g){d(function(){var h=a.N,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)Bn(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
612
- "d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}Bn(h,f,{ot:yn,su:!h.i})}}catch(M){bb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",M)}break;case zg:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.U()?"l":"v"};n.ot=Fn(k);var q=n.ot===Cn||n.ot===wn||n.ot===xn||n.ot===Hn,p=k.stream;if(p){var u=h.h.Za();if(q&&(n.bl=Jn(h,p.type),n.ot!==Hn)){var v=Kn(h,p.type);n.dl=u?v/Math.abs(u):v}p.bandwidth&&(n.br=p.bandwidth/1E3);
613
- if(p.segmentIndex&&m){var w=p.segmentIndex.zb(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Qb(m.M(),A.M())){var y=A.M()[0],C=f.uris[0],z=new URL(y),B=new URL(C);if(z.origin!==B.origin)var D=y;else{for(var I=z.pathname.split("/").slice(1),F=B.pathname.split("/").slice(1,-1);I[0]===F[0];)I.shift(),F.shift();for(;F.length;)F.shift(),I.unshift("..");D=I.join("/")}n.nor=D}if((A.Da||A.oa)&&(m.Da!=A.Da||m.oa!=A.oa)){var K=A.Da+"-";A.oa&&(K+=A.oa);n.nrr=K}}}var J=h.h.Za()||1,G=Kn(h,p.type)||
614
- 500,L=p.bandwidth;var N=L?L*(m.endTime-m.startTime)/1E3/(G/J/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(N)||(n.rtp=N)}}q&&n.ot!==Hn&&(n.tb=Ln(h,n.ot)/1E3);Bn(h,f,n)}}catch(M){bb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:Bn(h,f,{ot:"k"});break;case 4:Bn(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.J)&&e.banLocation&&e.banLocation(h)},function(e,f){f.data&&(e=f.data.byteLength,f=b()?b().getStats():a.s)&&(f.sd=isNaN(f.sd)?e:f.sd+e)})}
615
- function Jo(a,b){return new Fk(a.h,a.i,a.g.streaming,b,function(){a.hb&&Rk(a.hb,!0);a.j&&a.j.Gc();a.L&&Zo(a)},function(c){return a.dispatchEvent(c)})}
616
- function Ko(a,b){b=new Dm(a.Oc,a.U()||0<b);b.addEventListener("enter",function(d){vo(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){vo(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(vo(a,"timelineregionenter",e),vo(a,"timelineregionexit",e))});var c=new Qk(a.h);c.g.add(b);a.qb&&c.g.add(a.qb);return c}
617
- function Lo(a,b,c){a.L=new Tf;a.L.g=Vf;Wf(a.L,c,Math.min(.5,c/2));ko(a);a.Pd=(new Tc(function(){Zo(a)})).Va(.25);a.m.D(b,"waiting",function(){return Zo(a)});a.m.D(b,"stalled",function(){return Zo(a)});a.m.D(b,"canplaythrough",function(){return Zo(a)});a.m.D(b,"progress",function(){return Zo(a)})}
618
- function Zo(a){switch(a.l){case To:if(a.h.ended)var b=!0;else{var c=Ki(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Go:a:if(a.h.ended||Pj(a.F))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.Kb();var d=Ki(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Mi(a.h.buffered,a.h.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Uf:Vf;c.g=d;(b=b!=d)&&d===Uf&&(c.h=Date.now());b&&ko(a)}function zo(a,b,c,d){return new Gj(a,b,c,d)}
619
- function Wn(a){return new sn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},sb:function(){return a.sb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Za:function(){return a.Za()},Wb:function(){return a.Wb()},Zb:function(){return a.Zb()},U:function(){return a.U()}},a.g.cmcd)}
620
- function Fo(a){return new pl(a.i,{Ed:function(){return a.C?a.C.pd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},Za:function(){return a.Za()},Y:a.F,Cb:a.G,onError:function(b){return io(a,b)},onEvent:function(b){return a.dispatchEvent(b)},mi:function(){a.J&&a.J.update&&a.J.update()},lf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type,g=c.codecs.includes(",");if(a.C){a.C.wg();var h=Qj(a.F,f);!a.U()&&a.h.paused&&null!=h&&0<h&&a.C.pd()<h&&a.C.re(h)}Zo(a);d=(new Map).set("start",
621
- d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(co("segmentappended",d));a.o&&c.fastSwitching&&b.jd&&b.Nd&&a.o.trySuggestStreams()},li:function(b,c){(c=c.gf)&&a.qb&&ml(a.qb,c,b)},Yf:function(b,c){var d=a.A;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){b=new Xg(Bb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(0==c)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,
622
- e),e+=f.length;Th(d,"cenc",c);d=d.l}}else d=Promise.resolve();return d},Zd:function(b,c,d){Ao(a,b,c,d)},zd:function(b,c){return a.zd(b,c)}})}
623
- r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=am(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(rb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(rb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
600
+ function po(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u;return O(function(v){if(1==v.g)return eo(a,"src-equals"),d=a.h,a.C=new Ek(d),e=!1,a.Sc.push(function(){e=!0}),null!=a.ga&&a.C.re(a.ga),a.H=new Ok({Fd:function(){return d.playbackRate},Ub:function(){return d.defaultPlaybackRate},Ff:function(w){d.playbackRate=w},vg:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,Ko(a,d,f),g=function(){return Ao(a)},h=function(){return Bo(a)},a.m.D(d,"playing",g),a.m.D(d,"pause",g),a.m.D(d,"ended",g),a.m.D(d,
601
+ "ratechange",h),"none"!=d.preload&&a.m.sa(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-b}),d.audioTracks&&(a.m.D(d.audioTracks,"addtrack",function(){return vo(a)}),a.m.D(d.audioTracks,"removetrack",function(){return vo(a)}),a.m.D(d.audioTracks,"change",function(){return vo(a)})),d.textTracks&&(a.m.D(d.textTracks,"addtrack",function(w){if(w.track)switch(w=w.track,w.kind){case "metadata":Ro(a,w);break;case "chapters":Go(a,w);break;default:vo(a)}}),a.m.D(d.textTracks,"removetrack",function(){return vo(a)}),
602
+ a.m.D(d.textTracks,"change",function(){return vo(a)})),k=tn(a.N,a.$,c),!k.includes("#t=")&&(0<a.g.playRangeStart||isFinite(a.g.playRangeEnd))&&(k+="#t=",0<a.g.playRangeStart&&(k+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(k+=","+a.g.playRangeEnd)),d.src=k,($c()||cd())&&d.load(),"none"!=d.preload&&!d.autoplay&&oe(c)&&ld()&&d.load(),a.l=So,a.dispatchEvent(bo("streaming")),l=new $f,vk(d,HTMLMediaElement.HAVE_METADATA,a.m,function(){a.C.ready();l.resolve()}),vk(d,HTMLMediaElement.HAVE_CURRENT_DATA,
603
+ a.m,function(){var w;return O(function(A){if(1==A.g)return To(a),w=Uo(a),w.find(function(y){return"disabled"!=y.mode})?(0<w.length&&(a.da=!0),A.u(2)):E(A,new Promise(function(y){a.m.sa(d.textTracks,"change",y);(new Tc(y)).X(1)}),2);if(e)return A.return();Vo(a);H(A)})}),d.error?l.reject(go(a)):"none"==d.preload&&(ab('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),
604
+ l.resolve()),a.m.sa(d,"error",function(){l.reject(go(a))}),m=new Promise(function(w,A){(new Tc(A)).X(a.g.streaming.loadTimeout)}),E(v,Promise.race([l,m]),2);if((n=a.U())&&(a.g.streaming.liveSync||a.g.streaming.liveSyncPanicMode)||a.g.streaming.vodDynamicPlaybackRate)q=function(){return Po(a)},a.m.D(d,"timeupdate",q);n||(p=function(){return Qo(a)},a.m.D(d,"timeupdate",p),Qo(a));a.B&&(a.B.onManifestUpdated(n),n&&(u=a.Mb().end,a.m.D(d,"progress",function(){var w=a.Mb().end;u!=w&&(a.B.onManifestUpdated(a.U()),
605
+ u=w)})));a.Ka=!0;H(v)})}function To(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Gg(b,a.g.preferredVariantRole)}function Vo(a){var b=a.g.preferredTextLanguage;""!=b&&a.zf(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
606
+ function Ro(a,b){if("metadata"==b.kind){b.mode="hidden";a.m.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Wo(a,e.startTime,e.endTime,e.type,e.value),a.B)a.B.onCueMetadataChange(e.value)});var c=(new Tc(function(){var d=Xo(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).jc().X(.5);a.Sc.push(function(){c.stop()})}}
607
+ function zo(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&"number"==typeof e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())Wo(a,f,g,"org.id3",k.value);if(a.B)a.B.onHlsTimedMetadata(e,f)}}function Wo(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(bo("metadata",b))}
608
+ function Go(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Tc(function(){b.mode="hidden"})).jc().X(.5);a.Sc.push(function(){c.stop()})}}r.ui=function(){for(var a=this.W;a.g;)a.release()};r.qc=function(a){return new Dh(a)};
609
+ function Wn(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?om(b(),!0,e):e()}b||(b=function(){return null});return new mg(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(bo("downloadheadersreceived",f));d(function(){if(a.aa){var h=a.aa;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
610
+ Qn(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var q=new Map,p=l.split(";");for(l=1;l<p.length;l++){var u=p[l].split("=");q.set(u[0],Qn(u[1]))}var v=q}catch(w){v=null}v&&(h.g=v)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(bo("downloadfailed",e))},function(e,f,g){d(function(){var h=a.N,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)An(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
611
+ "d";break a;case 3:case 2:l="h";break a;case 5:l="s";break a}l=void 0}h.m=l}An(h,f,{ot:xn,su:!h.i})}}catch(M){bb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",M)}break;case zg:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.U()?"l":"v"};n.ot=En(k);var q=n.ot===Bn||n.ot===vn||n.ot===wn||n.ot===Gn,p=k.stream;if(p){var u=h.h.Za();if(q&&(n.bl=In(h,p.type),n.ot!==Gn)){var v=Jn(h,p.type);n.dl=u?v/Math.abs(u):v}p.bandwidth&&(n.br=p.bandwidth/1E3);
612
+ if(p.segmentIndex&&m){var w=p.segmentIndex.zb(m.endTime,!0,0>u);if(w){var A=w.next().value;if(A&&A!=m){if(!Qb(m.M(),A.M())){var y=A.M()[0],C=f.uris[0],z=new URL(y),B=new URL(C);if(z.origin!==B.origin)var D=y;else{for(var I=z.pathname.split("/").slice(1),F=B.pathname.split("/").slice(1,-1);I[0]===F[0];)I.shift(),F.shift();for(;F.length;)F.shift(),I.unshift("..");D=I.join("/")}n.nor=D}if((A.Da||A.oa)&&(m.Da!=A.Da||m.oa!=A.oa)){var K=A.Da+"-";A.oa&&(K+=A.oa);n.nrr=K}}}var J=h.h.Za()||1,G=Jn(h,p.type)||
613
+ 500,L=p.bandwidth;var N=L?L*(m.endTime-m.startTime)/1E3/(G/J/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(N)||(n.rtp=N)}}q&&n.ot!==Gn&&(n.tb=Kn(h,n.ot)/1E3);An(h,f,n)}}catch(M){bb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:An(h,f,{ot:"k"});break;case 4:An(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.J)&&e.banLocation&&e.banLocation(h)},function(e,f){f.data&&(e=f.data.byteLength,f=b()?b().getStats():a.s)&&(f.sd=isNaN(f.sd)?e:f.sd+e)})}
614
+ function Io(a,b){return new Fk(a.h,a.i,a.g.streaming,b,function(){a.hb&&Rk(a.hb,!0);a.j&&a.j.Gc();a.L&&Yo(a)},function(c){return a.dispatchEvent(c)})}
615
+ function Jo(a,b){b=new Cm(a.Oc,a.U()||0<b);b.addEventListener("enter",function(d){uo(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){uo(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(uo(a,"timelineregionenter",e),uo(a,"timelineregionexit",e))});var c=new Qk(a.h);c.g.add(b);a.qb&&c.g.add(a.qb);return c}
616
+ function Ko(a,b,c){a.L=new Tf;a.L.g=Vf;Wf(a.L,c,Math.min(.5,c/2));jo(a);a.Pd=(new Tc(function(){Yo(a)})).Va(.25);a.m.D(b,"waiting",function(){return Yo(a)});a.m.D(b,"stalled",function(){return Yo(a)});a.m.D(b,"canplaythrough",function(){return Yo(a)});a.m.D(b,"progress",function(){return Yo(a)})}
617
+ function Yo(a){switch(a.l){case So:if(a.h.ended)var b=!0;else{var c=Ki(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Fo:a:if(a.h.ended||Pj(a.F))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.Kb();var d=Ki(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Mi(a.h.buffered,a.h.currentTime);c=a.L;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Uf:Vf;c.g=d;(b=b!=d)&&d===Uf&&(c.h=Date.now());b&&jo(a)}function yo(a,b,c,d){return new Gj(a,b,c,d)}
618
+ function Vn(a){return new rn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},sb:function(){return a.sb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Za:function(){return a.Za()},Wb:function(){return a.Wb()},Zb:function(){return a.Zb()},U:function(){return a.U()}},a.g.cmcd)}
619
+ function Eo(a){return new pl(a.i,{Ed:function(){return a.C?a.C.pd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},Za:function(){return a.Za()},Y:a.F,Cb:a.G,onError:function(b){return ho(a,b)},onEvent:function(b){return a.dispatchEvent(b)},li:function(){a.J&&a.J.update&&a.J.update()},lf:function(b,c){var d=b.startTime,e=b.endTime,f=c.type,g=c.codecs.includes(",");if(a.C){a.C.wg();var h=Qj(a.F,f);!a.U()&&a.h.paused&&null!=h&&0<h&&a.C.pd()<h&&a.C.re(h)}Yo(a);d=(new Map).set("start",
620
+ d).set("end",e).set("contentType",f).set("isMuxed",g);a.dispatchEvent(bo("segmentappended",d));a.o&&c.fastSwitching&&b.jd&&b.Nd&&a.o.trySuggestStreams()},ki:function(b,c){(c=c.gf)&&a.qb&&ml(a.qb,c,b)},Yf:function(b,c){var d=a.A;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){b=new Xg(Bb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(0==c)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,
621
+ e),e+=f.length;Th(d,"cenc",c);d=d.l}}else d=Promise.resolve();return d},Zd:function(b,c,d){zo(a,b,c,d)},zd:function(b,c){return a.zd(b,c)}})}
622
+ r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=$l(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(rb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(rb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
624
623
  a.streaming&&"useNativeHlsOnSafari"in a.streaming&&rb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){rb("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var c=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return c};delete a.mediaSource.sourceBufferExtraFeatures}a.streaming&&
625
624
  a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.maxDisabledTime&&(a.streaming.maxDisabledTime=1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==
626
625
  a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.dash&&(a.manifest.dash={}),void 0==a.manifest.dash.autoCorrectDrift&&(a.manifest.dash.autoCorrectDrift=!1),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&
627
- (a.drm.retryParameters.baseDelay=100));var d=nm(this.g,a,Vn(this));$o(this);return d};
628
- function $o(a){a.Kd=new ni(a.g,a.ba,a.A);if(a.J){var b=Ke(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.A&&a.A.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=eo&&pi(a.Kd,a.i)&&wo(a)}catch(f){io(a,f)}a.o&&xo(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||yo(a)}a.G&&(a.G.Df(a.g.streaming.forceHTTP),a.G.Ef(a.g.streaming.forceHTTPS));if(a.F)if(a.F.configure(a.g.mediaSource),a.F.ga=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
629
- a.Kf!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.F,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Kf=b;a.j&&(b=a.j,(c=b.i.get(Td))&&Dl(b,c.stream,!0,0,!0))}else b=a.F.F,b.configure&&b.configure(a.g.textDisplayer);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?a.o.enable():a.o.disable(),Po(a));a.L&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
630
- Wf(a.L,b,Math.min(.5,b/2)));a.i&&Do(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.B&&a.B.configure(a.g.ads);a.N&&a.N.configure(a.g.cmcd);a.aa&&a.aa.configure(a.g.cmsd)}r.getConfiguration=function(){var a=Vn(this);nm(a,this.g,Vn(this));return a};r.Hh=function(){var a=Vn(this);nm(a,this.g,Vn(this));return cm(this.g,Vn(this))};
631
- r.hg=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.Mb().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};r.zi=function(){for(var a in this.g)delete this.g[a];nm(this.g,Vn(this),Vn(this));$o(this)};r.Dh=function(){return this.l};r.Se=function(){return this.i?this.i.type:null};r.Gh=function(){return this.h};
632
- r.Wb=function(){return this.G};r.vc=function(){return this.$};r.gg=function(){return this.B?this.B:null};r.U=function(){return this.i?this.i.presentationTimeline.U():this.h&&this.h.src?Infinity==this.h.duration:!1};r.ac=function(){return this.i?this.i.presentationTimeline.ac():!1};r.Yh=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};
633
- r.Mb=function(){if(this.i){if(!this.La&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Jb(),end:a.ub()}}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}};r.Vh=function(){this.U()&&(this.h.currentTime=this.Mb().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.A?this.A.g:null};r.Uc=function(){return this.A?this.A.Uc():Infinity};
626
+ (a.drm.retryParameters.baseDelay=100));var d=mm(this.g,a,Un(this));Zo(this);return d};
627
+ function Zo(a){a.Kd=new ni(a.g,a.ba,a.A);if(a.J){var b=Ke(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.A&&a.A.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.l!=co&&pi(a.Kd,a.i)&&vo(a)}catch(f){ho(a,f)}a.o&&wo(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||xo(a)}a.G&&(a.G.Df(a.g.streaming.forceHTTP),a.G.Ef(a.g.streaming.forceHTTPS));if(a.F)if(a.F.configure(a.g.mediaSource),a.F.ga=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,
628
+ a.Kf!=b){var c=b();c.configure?c.configure(a.g.textDisplayer):rb("Text displayer w/ configure",'Text displayer should have a "configure" method!');var d=a.F,e=d.F;d.F=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.j=c);a.Kf=b;a.j&&(b=a.j,(c=b.i.get(Td))&&Cl(b,c.stream,!0,0,!0))}else b=a.F.F,b.configure&&b.configure(a.g.textDisplayer);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?a.o.enable():a.o.disable(),Oo(a));a.L&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),
629
+ Wf(a.L,b,Math.min(.5,b/2)));a.i&&Co(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.B&&a.B.configure(a.g.ads);a.N&&a.N.configure(a.g.cmcd);a.aa&&a.aa.configure(a.g.cmsd)}r.getConfiguration=function(){var a=Un(this);mm(a,this.g,Un(this));return a};r.Gh=function(){var a=Un(this);mm(a,this.g,Un(this));return bm(this.g,Un(this))};
630
+ r.hg=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.Mb().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};r.yi=function(){for(var a in this.g)delete this.g[a];mm(this.g,Un(this),Un(this));Zo(this)};r.Ch=function(){return this.l};r.Se=function(){return this.i?this.i.type:null};r.Fh=function(){return this.h};
631
+ r.Wb=function(){return this.G};r.vc=function(){return this.$};r.gg=function(){return this.B?this.B:null};r.U=function(){return this.i?this.i.presentationTimeline.U():this.h&&this.h.src?Infinity==this.h.duration:!1};r.ac=function(){return this.i?this.i.presentationTimeline.ac():!1};r.Xh=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};
632
+ r.Mb=function(){if(this.i){if(!this.Ka&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Jb(),end:a.ub()}}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}};r.Uh=function(){this.U()&&(this.h.currentTime=this.Mb().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.A?this.A.g:null};r.Uc=function(){return this.A?this.A.Uc():Infinity};
634
633
  r.Qe=function(){return this.A?this.A.Qe():[]};r.Dd=function(){return this.A?this.A.Dd():{}};r.Ye=function(){return this.L?this.L.g==Vf:!1};r.Za=function(){return this.h?this.H?this.H.i:1:0};
635
- r.nd=function(a){var b=this;0==a?ab("A trick play rate of 0 is unsupported!"):(this.ya.nb(),this.h.paused&&this.h.play(),this.H.set(a),this.l==Go&&(this.o.playbackRateChanged(a),Cl(this.j,1<Math.abs(a))),this.U()&&this.ya.D(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Mb(),e=b.g.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.Jc():Math.floor(c)<=Math.floor(d.start+e)&&b.Jc()}))};
636
- r.Jc=function(){var a=this.H.Ub();this.l==To&&this.H.set(a);this.l==Go&&(this.H.set(a),this.o.playbackRateChanged(a),Cl(this.j,!1));this.ya.nb()};
634
+ r.nd=function(a){var b=this;0==a?ab("A trick play rate of 0 is unsupported!"):(this.ya.nb(),this.h.paused&&this.h.play(),this.H.set(a),this.l==Fo&&(this.o.playbackRateChanged(a),Bl(this.j,1<Math.abs(a))),this.U()&&this.ya.D(this.h,"timeupdate",function(){var c=b.h.currentTime,d=b.Mb(),e=b.g.streaming.safeSeekOffset;0<a?Math.floor(c)>=Math.floor(d.end)&&b.Jc():Math.floor(c)<=Math.floor(d.start+e)&&b.Jc()}))};
635
+ r.Jc=function(){var a=this.H.Ub();this.l==So&&this.H.set(a);this.l==Fo&&(this.H.set(a),this.o.playbackRateChanged(a),Bl(this.j,!1));this.ya.nb()};
637
636
  r.Zb=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,wf(e)){var f=kf(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 rf(g)}):[]};
638
- r.wc=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=lf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Vo(this).map(function(f){return pf(f)}):[]};r.Ah=function(){var a=this.ed;this.i&&(a=this.i.imageStreams);return a.map(function(b){return mf(b)})};
639
- r.th=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=Go&&b.l!=To)return g.return(null);c=b.ed;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):E(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Rb(function(h){var k=ap(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Qb;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.mg(a,h.startTime+l*m/k))}}),E(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
640
- function ap(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Qb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
641
- r.mg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z;return O(function(B){if(1==B.g){if(c.l!=Go&&c.l!=To)return B.return(null);d=c.ed;c.i&&(d=c.i.imageStreams);return(e=d.find(function(D){return D.id==a}))?e.segmentIndex?B.u(2):E(B,e.createSegmentIndex(),2):B.return(null)}f=e.segmentIndex.find(b);if(null==f)return B.return(null);g=e.segmentIndex.get(f);h=ap(g.tilesLayout||e.tilesLayout);if(!h)return B.return(null);k=e.width||0;l=e.height||0;m=k/h.Qb;n=l/h.rows;q=h.Qb*h.rows;p=g.j-g.startTime;
637
+ r.wc=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=lf(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Uo(this).map(function(f){return pf(f)}):[]};r.zh=function(){var a=this.ed;this.i&&(a=this.i.imageStreams);return a.map(function(b){return mf(b)})};
638
+ r.sh=function(a){var b=this,c,d,e,f;return O(function(g){if(1==g.g){if(b.l!=Fo&&b.l!=So)return g.return(null);c=b.ed;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):E(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Rb(function(h){var k=$o(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Qb;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.mg(a,h.startTime+l*m/k))}}),E(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
639
+ function $o(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Qb:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
640
+ r.mg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z;return O(function(B){if(1==B.g){if(c.l!=Fo&&c.l!=So)return B.return(null);d=c.ed;c.i&&(d=c.i.imageStreams);return(e=d.find(function(D){return D.id==a}))?e.segmentIndex?B.u(2):E(B,e.createSegmentIndex(),2):B.return(null)}f=e.segmentIndex.find(b);if(null==f)return B.return(null);g=e.segmentIndex.get(f);h=$o(g.tilesLayout||e.tilesLayout);if(!h)return B.return(null);k=e.width||0;l=e.height||0;m=k/h.Qb;n=l/h.rows;q=h.Qb*h.rows;p=g.j-g.startTime;
642
641
  u=g.A||p/q;v=g.startTime;A=w=0;1<q&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,w=y%h.Qb*m,A=Math.floor(y/h.Qb)*n);C=!1;if(z=g.s)C=!0,n=z.height,w=z.positionX,A=z.positionY,m=z.width;return B.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:A,startTime:v,duration:u,uris:g.M(),width:m,sprite:C})})};
643
- r.Hg=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&&(Wk(this.s.h,b,!1),Fl(this.j,b),bp(this),this.Ea=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=Vo(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,nf(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";bp(this)}};
644
- r.Af=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&wf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&ab("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");Eo(this,d,!1,b,c);this.xa=new Jf(d,
645
- this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);xo(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,nf(c)==a.id){cp(this,c);break}};r.vh=function(){return dp(this.Zb())};r.Oh=function(){return dp(this.wc())};r.uh=function(){return Array.from(ep(this.Zb()))};r.Nh=function(){return Array.from(ep(this.wc()))};
642
+ r.Hg=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&&(Wk(this.s.h,b,!1),El(this.j,b),ap(this),this.Ea=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=Uo(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,nf(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";ap(this)}};
643
+ r.Af=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&wf(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&ab("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");Do(this,d,!1,b,c);this.xa=new Jf(d,
644
+ this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);wo(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,nf(c)==a.id){bp(this,c);break}};r.uh=function(){return cp(this.Zb())};r.Nh=function(){return cp(this.wc())};r.th=function(){return Array.from(dp(this.Zb()))};r.Mh=function(){return Array.from(dp(this.wc()))};
646
645
  r.Gg=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.C){this.xa=new Kf(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.xa.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,
647
- b))c=f;c!=b&&(c?(a=kf(c),this.Af(a,!0,d)):yo(this))}else this.h&&this.h.audioTracks&&(d=yf(this.Zb(),a,b||"",!1)[0])&&this.Af(d)};r.zf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Ea=a,this.$c=b||"",this.Xc=c,(a=yf(this.i.textStreams,this.Ea,this.$c,this.Xc)[0]||null)&&a!=this.j.s&&(Wk(this.s.h,a,!1),this.g.streaming.alwaysStreamText||this.Ze()))Fl(this.j,a),bp(this)}else(a=yf(this.wc(),a,b||"",c)[0])&&this.Hg(a)};
648
- r.Fi=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){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.xa=new Kf(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),yo(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&&cp(this,b)}};
649
- r.Ze=function(){var a=this.da;return this.F&&this.l==Go?this.F.F.isTextVisible():this.h&&this.h.src&&this.h.textTracks?Vo(this).some(function(b){return"showing"==b.mode}):a};r.ig=function(){return this.h&&this.h.src&&this.h.textTracks?fp(this).map(function(a){return pf(a)}):[]};
650
- r.wh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Ce(a),c=fp(this).filter(function(h){return Ce(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};
651
- function Vo(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Yo(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function fp(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
652
- r.Ng=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==Go)this.F.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=yf(this.i.textStreams,this.Ea,this.$c,this.Xc),0<a.length&&(Fl(this.j,a[0]),bp(this))):Bl(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=Vo(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")}Oo(this)}};
653
- r.Jh=function(){if(this.C)var a=this.C.pd();else{if(null==this.ga)return new Date;a=this.ga}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.B||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};r.lg=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.B||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
654
- r.Gd=function(){return this.U()?this.i?this.i.presentationTimeline.Gd():null:null};r.sb=function(){if(this.l==Go)return this.F.sb();var a={total:[],audio:[],video:[],text:[]};this.l==To&&(a.total=Ni(this.h.buffered));return a};
655
- r.getStats=function(){if(this.l!=Go&&this.l!=To)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,bytesDownloaded:NaN,switchHistory:[],stateHistory:[]};Bo(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&
656
- !this.U()){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.L=this.C.Tf(),this.s.N=this.C.Uf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.K=Number(c.droppedVideoFrames);b.J=d;this.s.H=Number(c.corruptedVideoFrames)}this.A?(c=this.A,c=c.J?c.J:NaN):c=NaN;this.s.s=c;if(this.l==Go){c=this.j.j;b=this.j.s;if(c){d=this.H?this.H.i:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=
657
- this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.U()&&(c=this.lg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.G=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.s.A=c}this.l==To&&(c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.J;e=f.K;var g=f.H,h=f.N,k=f.L,l=f.A,m=f.i,n=f.m,q=f.F,p=f.j,u=Tk(f.g,"playing"),v=Tk(f.g,"paused"),w=Tk(f.g,"buffering"),A=f.s,y=f.C,C=
646
+ b))c=f;c!=b&&(c?(a=kf(c),this.Af(a,!0,d)):xo(this))}else this.h&&this.h.audioTracks&&(d=yf(this.Zb(),a,b||"",!1)[0])&&this.Af(d)};r.zf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.Ea=a,this.$c=b||"",this.Xc=c,(a=yf(this.i.textStreams,this.Ea,this.$c,this.Xc)[0]||null)&&a!=this.j.s&&(Wk(this.s.h,a,!1),this.g.streaming.alwaysStreamText||this.Ze()))El(this.j,a),ap(this)}else(a=yf(this.wc(),a,b||"",c)[0])&&this.Hg(a)};
647
+ r.Ei=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.C){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.xa=new Kf(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups),xo(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&&bp(this,b)}};
648
+ r.Ze=function(){var a=this.da;return this.F&&this.l==Fo?this.F.F.isTextVisible():this.h&&this.h.src&&this.h.textTracks?Uo(this).some(function(b){return"showing"==b.mode}):a};r.ig=function(){return this.h&&this.h.src&&this.h.textTracks?ep(this).map(function(a){return pf(a)}):[]};
649
+ r.vh=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Ce(a),c=ep(this).filter(function(h){return Ce(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};
650
+ function Uo(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Xo(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function ep(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
651
+ r.Ng=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==Fo)this.F.F.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=yf(this.i.textStreams,this.Ea,this.$c,this.Xc),0<a.length&&(El(this.j,a[0]),ap(this))):Al(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=Uo(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")}No(this)}};
652
+ r.Ih=function(){if(this.C)var a=this.C.pd();else{if(null==this.ga)return new Date;a=this.ga}if(this.i){var b=this.i.presentationTimeline;return new Date(1E3*((b.B||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};r.lg=function(){if(this.i){var a=this.i.presentationTimeline;return new Date(1E3*(a.B||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
653
+ r.Gd=function(){return this.U()?this.i?this.i.presentationTimeline.Gd():null:null};r.sb=function(){if(this.l==Fo)return this.F.sb();var a={total:[],audio:[],video:[],text:[]};this.l==So&&(a.total=Ni(this.h.buffered));return a};
654
+ r.getStats=function(){if(this.l!=Fo&&this.l!=So)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,bytesDownloaded:NaN,switchHistory:[],stateHistory:[]};Ao(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&
655
+ !this.U()){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.s.L=this.C.Tf(),this.s.N=this.C.Uf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.s;var d=Number(c.totalVideoFrames);b.K=Number(c.droppedVideoFrames);b.J=d;this.s.H=Number(c.corruptedVideoFrames)}this.A?(c=this.A,c=c.J?c.J:NaN):c=NaN;this.s.s=c;if(this.l==Fo){c=this.j.j;b=this.j.s;if(c){d=this.H?this.H.i:1;var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.s.B=e}c&&c.video&&(b=
656
+ this.s,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.U()&&(c=this.lg().valueOf()+1E3*a.currentTime,this.s.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.s.G=this.i.presentationTimeline.g);c=this.o.getBandwidthEstimate();this.s.A=c}this.l==So&&(c=this.s,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var f=this.s;a=f.o;c=f.l;b=f.B;d=f.J;e=f.K;var g=f.H,h=f.N,k=f.L,l=f.A,m=f.i,n=f.m,q=f.F,p=f.j,u=Tk(f.g,"playing"),v=Tk(f.g,"paused"),w=Tk(f.g,"buffering"),A=f.s,y=f.C,C=
658
657
  f.G,z=f.sd,B=Uk(f.g),D=[];f=t(f.h.g);for(var I=f.next();!I.done;I=f.next())I=I.value,D.push({timestamp:I.timestamp,id:I.id,type:I.type,fromAdaptation:I.fromAdaptation,bandwidth:I.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:q,drmTimeSeconds:p,playTime:u,pauseTime:v,bufferingTime:w,licenseTime:A,liveLatency:y,maxSegmentDuration:C,bytesDownloaded:z,
659
658
  stateHistory:B,switchHistory:D}};
660
- r.fh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,p,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:if(h.l!=Go&&h.l!=To)throw new T(1,7,7004);"subtitles"!=c&&"captions"!=c&&ab("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){z.u(2);break}return E(z,gp(h,a),3);case 3:d=z.h;case 2:k=[];h.B&&(k=h.B.getCuePoints());if(h.l!=To){z.u(4);break}g&&(c="forced");return E(z,hp(h,a,b,c,d,f||"",k),5);case 5:l=Ce(b);m=h.wc();if(n=m.find(function(B){return Ce(B.language)==
661
- l&&B.label==(f||"")&&B.kind==c}))return wo(h),z.return(n);throw new T(1,2,2012);case 4:q=Vd;p=h.h.duration;h.i&&(p=h.i.presentationTimeline.getDuration());if(Infinity==p)throw new T(1,4,4033);if(!k.length){z.u(6);break}return E(z,ip(h,a,h.G,h.g.streaming.retryParameters),7);case 7:u=z.h,v=jp(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=Jj(w),d="text/vtt";case 6:A={id:h.Of++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Mk(0,p,[a]),mimeType:d||"",
662
- codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.qa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Xd(d||"",e||"")])};y=Xd(A.mimeType,A.codecs);C=qe(y);if(!C)throw new T(2,2,2014,d);h.i.textStreams.push(A);wo(h);return z.return(lf(A))}})};
663
- r.gh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y;return O(function(C){switch(C.g){case 1:if(c.l!=Go&&c.l!=To)throw new T(1,7,7004);if(b){C.u(2);break}return E(C,gp(c,a),3);case 3:b=C.h;case 2:if("text/vtt"!=b)throw new T(1,2,2017,a);d=Vd;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new T(1,4,4045);return E(C,ip(c,a,c.G,c.g.streaming.retryParameters),4);case 4:f=C.h;g=re[b];if(!g)throw new T(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
659
+ r.eh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,q,p,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:if(h.l!=Fo&&h.l!=So)throw new T(1,7,7004);"subtitles"!=c&&"captions"!=c&&ab("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){z.u(2);break}return E(z,fp(h,a),3);case 3:d=z.h;case 2:k=[];h.B&&(k=h.B.getCuePoints());if(h.l!=So){z.u(4);break}g&&(c="forced");return E(z,gp(h,a,b,c,d,f||"",k),5);case 5:l=Ce(b);m=h.wc();if(n=m.find(function(B){return Ce(B.language)==
660
+ l&&B.label==(f||"")&&B.kind==c}))return vo(h),z.return(n);throw new T(1,2,2012);case 4:q=Vd;p=h.h.duration;h.i&&(p=h.i.presentationTimeline.getDuration());if(Infinity==p)throw new T(1,4,4033);if(!k.length){z.u(6);break}return E(z,hp(h,a,h.G,h.g.streaming.retryParameters),7);case 7:u=z.h,v=ip(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=Jj(w),d="text/vtt";case 6:A={id:h.Of++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Mk(0,p,[a]),mimeType:d||"",
661
+ codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.qa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Xd(d||"",e||"")])};y=Xd(A.mimeType,A.codecs);C=qe(y);if(!C)throw new T(2,2,2014,d);h.i.textStreams.push(A);vo(h);return z.return(lf(A))}})};
662
+ r.fh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y;return O(function(C){switch(C.g){case 1:if(c.l!=Fo&&c.l!=So)throw new T(1,7,7004);if(b){C.u(2);break}return E(C,fp(c,a),3);case 3:b=C.h;case 2:if("text/vtt"!=b)throw new T(1,2,2017,a);d=Vd;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new T(1,4,4045);return E(C,hp(c,a,c.G,c.g.streaming.retryParameters),4);case 4:f=C.h;g=re[b];if(!g)throw new T(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
664
663
  vttOffset:0};l=Bb(f);m=h.parseMedia(l,k,a);n=[];q=t(m);p=q.next();for(u={};!p.done;u={ne:void 0,rc:void 0},p=q.next())u.rc=p.value,u.ne=null,v=function(z){return function(){null==z.ne&&(z.ne=Nd([a],[z.rc.payload]));return z.ne||[]}}(u),w=new Fi(u.rc.startTime,u.rc.endTime,v,0,null,null,0,0,Infinity),u.rc.payload.includes("#xywh")&&(A=u.rc.payload.split("#xywh=")[1].split(","),4===A.length&&w.Og({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)})),
665
664
  n.push(w);y={id:c.Of++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Kk(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.qe,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,fullMimeTypes:new Set([Xd(b||
666
- "","")])};c.l==To?c.ed.push(y):c.i.imageStreams.push(y);wo(c);return C.return(mf(y))}})};
667
- r.eh=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=Go&&d.l!=To)throw new T(1,7,7004);if(c){k.u(2);break}return E(k,gp(d,a),3);case 3:c=k.h;case 2:return e=[],d.B&&(e=d.B.getCuePoints()),E(k,hp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.ig();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return E(k,new Promise(function(l,m){d.m.sa(f,"load",l);d.m.sa(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return wo(d),k.return(h);case 5:throw new T(1,
668
- 2,2012);}})};function gp(a,b){var c;return O(function(d){switch(d.g){case 1:return xa(d,2),E(d,Im(b,a.G,a.g.streaming.retryParameters),4);case 4:c=d.h;za(d,3);break;case 2:Aa(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
669
- function hp(a,b,c,d,e,f,g){var h,k,l,m;return O(function(n){if(1==n.g)return"text/vtt"!=e||g.length?E(n,ip(a,b,a.G,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=jp(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Jj(l),e="text/vtt");m=document.createElement("track");var q=a.N,p=b;try{if(q.g.enabled){var u=vn(q);u.ot=In;u.su=!0;var v=zn(u);var w=An(p,v)}else w=p}catch(A){bb("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",A),w=p}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
670
- a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function ip(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=zg;f=rg([b],d);f.method="GET";var k=a.N;try{k.g.enabled&&Bn(k,f,{ot:In,su:!0})}catch(l){bb("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return E(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
671
- function jp(a,b,c,d){var e=re[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Bb(b),b=c.parseMedia(b,a,null),rn(b,d);throw new T(2,2,2014,c);}r.Ki=function(a,b){this.ba.width=a;this.ba.height=b};r.vf=function(a){if(this.l==Go){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Zc||d.Ja||d.pb||(d.Zc=!1,Al(b,d,a));b=!0}}else b=!1;return b};
672
- r.Re=function(){ab("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.Eh=function(){return this.Fa};
673
- function Vn(a){var b=jm();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.vf(d))}};b.textDisplayFactory=function(){if(a.Md){var c=a.getConfiguration();return new hn(a.h,a.Md,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new cn(a.h,"Shaka Player TextTrack"):new en};return b}r.Rg=function(a){this.Md=a};
674
- function uo(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Nk,l=e.closedCaptions.get(g);h={id:a.Of++,originalId:g,groupId:null,
665
+ "","")])};c.l==So?c.ed.push(y):c.i.imageStreams.push(y);vo(c);return C.return(mf(y))}})};
666
+ r.dh=function(a,b,c){var d=this,e,f,g,h;return O(function(k){switch(k.g){case 1:if(d.l!=Fo&&d.l!=So)throw new T(1,7,7004);if(c){k.u(2);break}return E(k,fp(d,a),3);case 3:c=k.h;case 2:return e=[],d.B&&(e=d.B.getCuePoints()),E(k,gp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.ig();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return E(k,new Promise(function(l,m){d.m.sa(f,"load",l);d.m.sa(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return vo(d),k.return(h);case 5:throw new T(1,
667
+ 2,2012);}})};function fp(a,b){var c;return O(function(d){switch(d.g){case 1:return xa(d,2),E(d,Hm(b,a.G,a.g.streaming.retryParameters),4);case 4:c=d.h;za(d,3);break;case 2:Aa(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
668
+ function gp(a,b,c,d,e,f,g){var h,k,l,m;return O(function(n){if(1==n.g)return"text/vtt"!=e||g.length?E(n,hp(a,b,a.G,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=ip(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Jj(l),e="text/vtt");m=document.createElement("track");var q=a.N,p=b;try{if(q.g.enabled){var u=un(q);u.ot=Hn;u.su=!0;var v=yn(u);var w=zn(p,v)}else w=p}catch(A){bb("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",A),w=p}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
669
+ a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function hp(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){e=zg;f=rg([b],d);f.method="GET";var k=a.N;try{k.g.enabled&&An(k,f,{ot:Hn,su:!0})}catch(l){bb("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return E(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
670
+ function ip(a,b,c,d){var e=re[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Bb(b),b=c.parseMedia(b,a,null),qn(b,d);throw new T(2,2,2014,c);}r.Ji=function(a,b){this.ba.width=a;this.ba.height=b};r.vf=function(a){if(this.l==Fo){var b=this.j;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Zc||d.Oa||d.pb||(d.Zc=!1,zl(b,d,a));b=!0}}else b=!1;return b};
671
+ r.Re=function(){ab("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.Dh=function(){return this.Fa};
672
+ function Un(a){var b=im();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.vf(d))}};b.textDisplayFactory=function(){if(a.Md){var c=a.getConfiguration();return new gn(a.h,a.Md,c.textDisplayer)}return HTMLMediaElement.prototype.addTextTrack?new bn(a.h,"Shaka Player TextTrack"):new dn};return b}r.Rg=function(a){this.Md=a};
673
+ function to(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Nk,l=e.closedCaptions.get(g);h={id:a.Of++,originalId:g,groupId:null,
675
674
  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:Td,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,fullMimeTypes:new Set([Xd(h,"")])};b.textStreams.push(h);c.add(g)}}
676
- function Mo(a,b){var c,d,e,f,g;return O(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return O(function(p){if(1==p.g)return k?E(p,k.createSegmentIndex(),2):p.return(null);n=(m=k.segmentIndex.zb(l))?m.next().value:null;if(!n)return p.return(null);q=n.startTime;return p.return(q)})},E(h,e(c,b),2);if(3!=h.g)return f=h.h,E(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)})}
677
- function ko(a){var b=a.Ye();if(a.s&&a.L&&a.C){var c=a.H;c.j=b;Pk(c);a.N&&(c=a.N,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);Bo(a)}b=(new Map).set("buffering",b);a.dispatchEvent(co("buffering",b))}function Co(a){var b=a.h.playbackRate;0!=b&&(a.H&&a.H.set(b),b=co("ratechange"),a.dispatchEvent(b))}
678
- function Bo(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Vf?c="buffering":a.h.ended?c="ended":a.h.paused&&(c="paused");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(co("statechanged",c)))}}
679
- function Qo(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.hg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.nd(d):1==e&&b!==a.H.Ub()&&a.Jc()}if(c&&(e=a.Mb(),Number.isFinite(e.end)&&!(a.h.currentTime<e.start))){if(a.g.streaming.liveSync){var f=a.g.streaming.liveSyncMaxLatency;var g=a.g.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.g.streaming.liveSyncMaxLatency,null!=a.i.serviceDescription.targetLatency?
675
+ function Lo(a,b){var c,d,e,f,g;return O(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,q;return O(function(p){if(1==p.g)return k?E(p,k.createSegmentIndex(),2):p.return(null);n=(m=k.segmentIndex.zb(l))?m.next().value:null;if(!n)return p.return(null);q=n.startTime;return p.return(q)})},E(h,e(c,b),2);if(3!=h.g)return f=h.h,E(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)})}
676
+ function jo(a){var b=a.Ye();if(a.s&&a.L&&a.C){var c=a.H;c.j=b;Pk(c);a.N&&(c=a.N,b||c.i||(c.i=!0),c.i&&b&&(c.j=!0),c.l=b);Ao(a)}b=(new Map).set("buffering",b);a.dispatchEvent(bo("buffering",b))}function Bo(a){var b=a.h.playbackRate;0!=b&&(a.H&&a.H.set(b),b=bo("ratechange"),a.dispatchEvent(b))}
677
+ function Ao(a){if(a.s&&a.L){var b=a.s.g,c="playing";a.L.g==Vf?c="buffering":a.h.ended?c="ended":a.h.paused&&(c="paused");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(bo("statechanged",c)))}}
678
+ function Po(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.hg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.nd(d):1==e&&b!==a.H.Ub()&&a.Jc()}if(c&&(e=a.Mb(),Number.isFinite(e.end)&&!(a.h.currentTime<e.start))){if(a.g.streaming.liveSync){var f=a.g.streaming.liveSyncMaxLatency;var g=a.g.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(f=a.g.streaming.liveSyncMaxLatency,null!=a.i.serviceDescription.targetLatency?
680
679
  f=a.i.serviceDescription.targetLatency+a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.maxLatency&&(f=a.i.serviceDescription.maxLatency),g=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSyncPlaybackRate);if(a.g.streaming.liveSync){var h=a.g.streaming.liveSyncMinLatency;var k=a.g.streaming.liveSyncMinPlaybackRate}else a.i&&a.i.serviceDescription&&(h=a.g.streaming.liveSyncMinLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency-
681
- a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.minLatency&&(h=a.i.serviceDescription.minLatency),k=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSyncMinPlaybackRate);c=e.end-a.h.currentTime;d=0;if(a.l==To){var l=a.h.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.g.streaming.liveSyncPanicMode;l=1E3*a.g.streaming.liveSyncPanicThreshold;var m=Date.now()-a.L.h;e&&!k&&(k=a.g.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.nd(k):f&&g&&c-
682
- d>f?b!=g&&a.nd(g):h&&k&&c-d<h?b!=k&&a.nd(k):b!==a.H.Ub()&&a.Jc()}}function Ro(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.P)?(a.P=c,b=!0):(c=Math.max(a.P,c),a.P!=c&&(a.P=c,b=!0)));if(b){var d;0==a.P?d=co("started"):25==a.P?d=co("firstquartile"):50==a.P?d=co("midpoint"):75==a.P?d=co("thirdquartile"):100==a.P&&(d=co("complete"));d&&a.dispatchEvent(d)}}}
683
- function xo(a){try{ri(a.Kd,a.i)}catch(c){return io(a,c),!1}var b=xf(a.i.variants);b=a.xa.create(b);a.o.setVariants(Array.from(b.values()));return!0}function Io(a,b){b=void 0===b?!1:b;return xo(a)?a.o.chooseVariant(b):null}
684
- function $n(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=t(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,fb("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.Vd.stop();d&&yo(a,!1,void 0,!1,!1)}
685
- function yo(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f=Io(a);f&&Eo(a,f,e,b,c,d)}function Eo(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&El(a.j,b,d,e,!0);else{var h=a.s.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));El(a.j,b,d,e,f,c);d=null;g&&(d=kf(g));b=kf(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&Fj(a.K,b,a.Se()),c=co("adaptation",c),kp(a,c)):lp(a,d,b)}}
686
- function cp(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;c&&(b.id!==c.id&&(c.enabled=!1),c=rf(c),b=rf(b),lp(a,c,b))}function No(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=Ce(a.g.preferredTextLanguage);c=Ce(c.language);if(2==a.g.autoShowText)return Be(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=Ce(b.language);return Be(c,d)&&!Be(a,c)}ab("Invalid autoShowText setting!");return!1}
687
- function wo(a){var b=co("trackschanged");kp(a,b)}function lp(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&Fj(a.K,c,a.Se());c=co("variantchanged",b);kp(a,c)}function bp(a){var b=co("textchanged");kp(a,b)}function Oo(a){var b=co("texttrackvisibility");kp(a,b)}function Po(a){a.g.abr.enabled||Zn(a);var b=(new Map).set("newStatus",a.g.abr.enabled);kp(a,co("abrstatuschanged",b))}
688
- function Zn(a,b){b=void 0===b?!0:b;if(a.l==Go){a.Vd.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&xo(a)}}
689
- r.zd=function(a,b){if(!this.g.abr.enabled||this.l===eo||!navigator.onLine||0==b)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=t(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.Vd.Va(1);b=this.sb().video.reduce(function(f,g){return f+g.end-g.start},0);yo(this,!1,b,!0,!1);return!0}return!1};
690
- function io(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==eo)return f.return();c=!0;if(!(a.La&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}xa(f,3);return E(f,Yl(a.j),5);case 5:d=f.h;c=!d;za(f,2);break;case 3:Aa(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&Zn(a,!1);e=co("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);H(f)}})}
691
- function vo(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(co(b,a))}function ho(a,b){b=void 0===b?!0:b;if(!a.h.error)return b?new T(2,3,3016):null;var c=a.h.error.code;if(!b&&1==c)return null;if(b=a.h.error.msExtendedCode)0>b&&(b+=Math.pow(2,32)),b=b.toString(16);return new T(2,3,3016,c,b,a.h.error.message)}
692
- function Do(a,b,c){0<b&&(a.U()||a.Qg(b));b=a.getDuration();c<b&&(a.U()||a.Ua(c))}function kp(a,b){O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);a.l!=eo&&a.dispatchEvent(b);H(c)})}function ep(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Ce(c.language)):b.add("und");return b}
693
- function dp(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=Ce(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));
694
- h.push({language:l,role:m,label:n})}});return h}S("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.Rg;X.prototype.getManifestParserFactory=X.prototype.Eh;X.prototype.getManifest=X.prototype.Re;X.prototype.retryStreaming=X.prototype.vf;X.prototype.setMaxHardwareResolution=X.prototype.Ki;X.prototype.addChaptersTrack=X.prototype.eh;X.prototype.addThumbnailsTrack=X.prototype.gh;X.prototype.addTextTrackAsync=X.prototype.fh;X.prototype.getStats=X.prototype.getStats;
695
- X.prototype.getBufferedInfo=X.prototype.sb;X.prototype.getSegmentAvailabilityDuration=X.prototype.Gd;X.prototype.getPresentationStartTimeAsDate=X.prototype.lg;X.prototype.getPlayheadTimeAsDate=X.prototype.Jh;X.prototype.setTextTrackVisibility=X.prototype.Ng;X.prototype.getChapters=X.prototype.wh;X.prototype.getChaptersTracks=X.prototype.ig;X.prototype.isTextTrackVisible=X.prototype.Ze;X.prototype.selectVariantsByLabel=X.prototype.Fi;X.prototype.selectTextLanguage=X.prototype.zf;
696
- X.prototype.selectAudioLanguage=X.prototype.Gg;X.prototype.getTextLanguages=X.prototype.Nh;X.prototype.getAudioLanguages=X.prototype.uh;X.prototype.getTextLanguagesAndRoles=X.prototype.Oh;X.prototype.getAudioLanguagesAndRoles=X.prototype.vh;X.prototype.selectVariantTrack=X.prototype.Af;X.prototype.selectTextTrack=X.prototype.Hg;X.prototype.getThumbnails=X.prototype.mg;X.prototype.getAllThumbnails=X.prototype.th;X.prototype.getImageTracks=X.prototype.Ah;X.prototype.getTextTracks=X.prototype.wc;
697
- X.prototype.getVariantTracks=X.prototype.Zb;X.prototype.cancelTrickPlay=X.prototype.Jc;X.prototype.trickPlay=X.prototype.nd;X.prototype.getPlaybackRate=X.prototype.Za;X.prototype.isBuffering=X.prototype.Ye;X.prototype.getKeyStatuses=X.prototype.Dd;X.prototype.getActiveSessionsMetadata=X.prototype.Qe;X.prototype.getExpiration=X.prototype.Uc;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.goToLive=X.prototype.Vh;X.prototype.seekRange=X.prototype.Mb;
698
- X.prototype.isAudioOnly=X.prototype.Yh;X.prototype.isInProgress=X.prototype.ac;X.prototype.isLive=X.prototype.U;X.prototype.getAdManager=X.prototype.gg;X.prototype.getAssetUri=X.prototype.vc;X.prototype.getNetworkingEngine=X.prototype.Wb;X.prototype.getMediaElement=X.prototype.Gh;X.prototype.getManifestType=X.prototype.Se;X.prototype.getLoadMode=X.prototype.Dh;X.prototype.resetConfiguration=X.prototype.zi;X.prototype.getBufferFullness=X.prototype.hg;X.prototype.getNonDefaultConfiguration=X.prototype.Hh;
699
- X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.vi;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.cg;X.prototype.unloadAndSavePreload=X.prototype.Ni;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Ri;X.prototype.unload=X.prototype.kc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.kh;X.prototype.attach=X.prototype.oc;
680
+ a.g.streaming.liveSyncTargetLatencyTolerance:null!=a.i.serviceDescription.minLatency&&(h=a.i.serviceDescription.minLatency),k=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSyncMinPlaybackRate);c=e.end-a.h.currentTime;d=0;if(a.l==So){var l=a.h.buffered;0<l.length&&(d=l.end(l.length-1),d=Math.max(g,d-e.end))}e=a.g.streaming.liveSyncPanicMode;l=1E3*a.g.streaming.liveSyncPanicThreshold;var m=Date.now()-a.L.h;e&&!k&&(k=a.g.streaming.liveSyncMinPlaybackRate);e&&k&&m<=l?b!=k&&a.nd(k):f&&g&&c-
681
+ d>f?b!=g&&a.nd(g):h&&k&&c-d<h?b!=k&&a.nd(k):b!==a.H.Ub()&&a.Jc()}}function Qo(a){if(a.h){var b=!1,c=a.h.currentTime/a.h.duration;isNaN(c)||(c=Math.round(100*c),isNaN(a.T)?(a.T=c,b=!0):(c=Math.max(a.T,c),a.T!=c&&(a.T=c,b=!0)));if(b){var d;0==a.T?d=bo("started"):25==a.T?d=bo("firstquartile"):50==a.T?d=bo("midpoint"):75==a.T?d=bo("thirdquartile"):100==a.T&&(d=bo("complete"));d&&a.dispatchEvent(d)}}}
682
+ function wo(a){try{ri(a.Kd,a.i)}catch(c){return ho(a,c),!1}var b=xf(a.i.variants);b=a.xa.create(b);a.o.setVariants(Array.from(b.values()));return!0}function Ho(a,b){b=void 0===b?!1:b;return wo(a)?a.o.chooseVariant(b):null}
683
+ function Zn(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=t(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,fb("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.Vd.stop();d&&xo(a,!1,void 0,!1,!1)}
684
+ function xo(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f=Ho(a);f&&Do(a,f,e,b,c,d)}function Do(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&Dl(a.j,b,d,e,!0);else{var h=a.s.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Dl(a.j,b,d,e,f,c);d=null;g&&(d=kf(g));b=kf(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.K&&Fj(a.K,b,a.Se()),c=bo("adaptation",c),jp(a,c)):kp(a,d,b)}}
685
+ function bp(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;c&&(b.id!==c.id&&(c.enabled=!1),c=rf(c),b=rf(b),kp(a,c,b))}function Mo(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=Ce(a.g.preferredTextLanguage);c=Ce(c.language);if(2==a.g.autoShowText)return Be(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=Ce(b.language);return Be(c,d)&&!Be(a,c)}ab("Invalid autoShowText setting!");return!1}
686
+ function vo(a){var b=bo("trackschanged");jp(a,b)}function kp(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.K&&Fj(a.K,c,a.Se());c=bo("variantchanged",b);jp(a,c)}function ap(a){var b=bo("textchanged");jp(a,b)}function No(a){var b=bo("texttrackvisibility");jp(a,b)}function Oo(a){a.g.abr.enabled||Yn(a);var b=(new Map).set("newStatus",a.g.abr.enabled);jp(a,bo("abrstatuschanged",b))}
687
+ function Yn(a,b){b=void 0===b?!0:b;if(a.l==Fo){a.Vd.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&wo(a)}}
688
+ r.zd=function(a,b){if(!this.g.abr.enabled||this.l===co||!navigator.onLine||0==b)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=t(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.Vd.Va(1);b=this.sb().video.reduce(function(f,g){return f+g.end-g.start},0);xo(this,!1,b,!0,!1);return!0}return!1};
689
+ function ho(a,b){var c,d,e;return O(function(f){switch(f.g){case 1:if(a.l==co)return f.return();c=!0;if(!(a.Ka&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){f.u(2);break}xa(f,3);return E(f,Xl(a.j),5);case 5:d=f.h;c=!d;za(f,2);break;case 3:Aa(f),c=!0;case 2:if(!c)return f.return();2===b.severity&&Yn(a,!1);e=bo("error",(new Map).set("detail",b));a.dispatchEvent(e);e.defaultPrevented&&(b.handled=!0);H(f)}})}
690
+ function uo(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(bo(b,a))}function go(a,b){b=void 0===b?!0:b;if(!a.h.error)return b?new T(2,3,3016):null;var c=a.h.error.code;if(!b&&1==c)return null;if(b=a.h.error.msExtendedCode)0>b&&(b+=Math.pow(2,32)),b=b.toString(16);return new T(2,3,3016,c,b,a.h.error.message)}
691
+ function Co(a,b,c){0<b&&(a.U()||a.Qg(b));b=a.getDuration();c<b&&(a.U()||a.Ua(c))}function jp(a,b){O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);a.l!=co&&a.dispatchEvent(b);H(c)})}function dp(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Ce(c.language)):b.add("und");return b}
692
+ function cp(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=Ce(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));
693
+ h.push({language:l,role:m,label:n})}});return h}S("shaka.Player",X);X.prototype.setVideoContainer=X.prototype.Rg;X.prototype.getManifestParserFactory=X.prototype.Dh;X.prototype.getManifest=X.prototype.Re;X.prototype.retryStreaming=X.prototype.vf;X.prototype.setMaxHardwareResolution=X.prototype.Ji;X.prototype.addChaptersTrack=X.prototype.dh;X.prototype.addThumbnailsTrack=X.prototype.fh;X.prototype.addTextTrackAsync=X.prototype.eh;X.prototype.getStats=X.prototype.getStats;
694
+ X.prototype.getBufferedInfo=X.prototype.sb;X.prototype.getSegmentAvailabilityDuration=X.prototype.Gd;X.prototype.getPresentationStartTimeAsDate=X.prototype.lg;X.prototype.getPlayheadTimeAsDate=X.prototype.Ih;X.prototype.setTextTrackVisibility=X.prototype.Ng;X.prototype.getChapters=X.prototype.vh;X.prototype.getChaptersTracks=X.prototype.ig;X.prototype.isTextTrackVisible=X.prototype.Ze;X.prototype.selectVariantsByLabel=X.prototype.Ei;X.prototype.selectTextLanguage=X.prototype.zf;
695
+ X.prototype.selectAudioLanguage=X.prototype.Gg;X.prototype.getTextLanguages=X.prototype.Mh;X.prototype.getAudioLanguages=X.prototype.th;X.prototype.getTextLanguagesAndRoles=X.prototype.Nh;X.prototype.getAudioLanguagesAndRoles=X.prototype.uh;X.prototype.selectVariantTrack=X.prototype.Af;X.prototype.selectTextTrack=X.prototype.Hg;X.prototype.getThumbnails=X.prototype.mg;X.prototype.getAllThumbnails=X.prototype.sh;X.prototype.getImageTracks=X.prototype.zh;X.prototype.getTextTracks=X.prototype.wc;
696
+ X.prototype.getVariantTracks=X.prototype.Zb;X.prototype.cancelTrickPlay=X.prototype.Jc;X.prototype.trickPlay=X.prototype.nd;X.prototype.getPlaybackRate=X.prototype.Za;X.prototype.isBuffering=X.prototype.Ye;X.prototype.getKeyStatuses=X.prototype.Dd;X.prototype.getActiveSessionsMetadata=X.prototype.Qe;X.prototype.getExpiration=X.prototype.Uc;X.prototype.drmInfo=X.prototype.drmInfo;X.prototype.keySystem=X.prototype.keySystem;X.prototype.goToLive=X.prototype.Uh;X.prototype.seekRange=X.prototype.Mb;
697
+ X.prototype.isAudioOnly=X.prototype.Xh;X.prototype.isInProgress=X.prototype.ac;X.prototype.isLive=X.prototype.U;X.prototype.getAdManager=X.prototype.gg;X.prototype.getAssetUri=X.prototype.vc;X.prototype.getNetworkingEngine=X.prototype.Wb;X.prototype.getMediaElement=X.prototype.Fh;X.prototype.getManifestType=X.prototype.Se;X.prototype.getLoadMode=X.prototype.Ch;X.prototype.resetConfiguration=X.prototype.yi;X.prototype.getBufferFullness=X.prototype.hg;X.prototype.getNonDefaultConfiguration=X.prototype.Gh;
698
+ X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.configure=X.prototype.configure;X.prototype.releaseAllMutexes=X.prototype.ui;X.prototype.preload=X.prototype.preload;X.prototype.detachAndSavePreload=X.prototype.cg;X.prototype.unloadAndSavePreload=X.prototype.Mi;X.prototype.load=X.prototype.load;X.prototype.updateStartTime=X.prototype.Qi;X.prototype.unload=X.prototype.kc;X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.jh;X.prototype.attach=X.prototype.oc;
700
699
  X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return E(k,ki(),3);case 3:b=k.h;case 2:var l={};if(Uc())for(var m in vi)l[m]=!0;m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=Uc()?!!vi[n]:Vc(n);c=l;m='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.02.01.01",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(x(Yd));
701
- l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=qe(n)?!0:Uc()?mb(n)||(mc(n)?!0:!1):Vc(n);var q=n.split(";")[0];l[q]=l[q]||l[n]}d=l;return E(k,ud(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=mp;for(h in g)f[h]=g[h]();return k.return(f)}})};
702
- X.isBrowserSupported=function(){window.Promise||ab("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Zc("Trident/"))return!1;var a=ld();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Uc()?!0:Vc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Yn=a};
703
- X.registerSupportPlugin=function(a,b){mp[a]=b};X.prototype.destroy=X.prototype.destroy;var eo=0,Un=1,Go=2,To=3;X.LoadMode={DESTROYED:eo,NOT_LOADED:Un,MEDIA_SOURCE:Go,SRC_EQUALS:To};X.version="v4.9.23";var np=["4","9"];sb=new function(a){this.g=a;this.i=tb;this.h=ub}(new qb(Number(np[0]),Number(np[1])));var mp={},Yn=null;function op(){this.h=[];this.j=this.i=this.g=0};function pp(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 hb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=pp.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
700
+ l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=qe(n)?!0:Uc()?mb(n)||(mc(n)?!0:!1):Vc(n);var q=n.split(";")[0];l[q]=l[q]||l[n]}d=l;return E(k,ud(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=lp;for(h in g)f[h]=g[h]();return k.return(f)}})};
701
+ X.isBrowserSupported=function(){window.Promise||ab("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Zc("Trident/"))return!1;var a=ld();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Uc()?!0:Vc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Xn=a};
702
+ X.registerSupportPlugin=function(a,b){lp[a]=b};X.prototype.destroy=X.prototype.destroy;var co=0,Tn=1,Fo=2,So=3;X.LoadMode={DESTROYED:co,NOT_LOADED:Tn,MEDIA_SOURCE:Fo,SRC_EQUALS:So};X.version="v4.9.24";var mp=["4","9"];sb=new function(a){this.g=a;this.i=tb;this.h=ub}(new qb(Number(mp[0]),Number(mp[1])));var lp={},Xn=null;function np(){this.h=[];this.j=this.i=this.g=0};function op(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 hb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=op.prototype;r.getDuration=function(){return this.g.getDuration()};r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.h.getRemainingTime()};r.isPaused=function(){return this.i};
704
703
  r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.h.getAdSkippableState()};r.skip=function(){return this.h.skip()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.resume()};r.getVolume=function(){return this.h.getVolume()};r.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
705
704
  r.isMuted=function(){return 0==this.h.getVolume()};r.isLinear=function(){return this.g.isLinear()};r.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)};r.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
706
705
  r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
707
- r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",pp);pp.prototype.release=pp.prototype.release;
708
- pp.prototype.getPodIndex=pp.prototype.getPodIndex;pp.prototype.getTimeOffset=pp.prototype.getTimeOffset;pp.prototype.getMediaUrl=pp.prototype.getMediaUrl;pp.prototype.getAdvertiserName=pp.prototype.getAdvertiserName;pp.prototype.getCreativeAdId=pp.prototype.getCreativeAdId;pp.prototype.getAdId=pp.prototype.getAdId;pp.prototype.getVastMediaWidth=pp.prototype.getVastMediaWidth;pp.prototype.getVastMediaHeight=pp.prototype.getVastMediaHeight;pp.prototype.getVastMediaBitrate=pp.prototype.getVastMediaBitrate;
709
- pp.prototype.getDescription=pp.prototype.getDescription;pp.prototype.getTitle=pp.prototype.getTitle;pp.prototype.getPositionInSequence=pp.prototype.getPositionInSequence;pp.prototype.getSequenceLength=pp.prototype.getSequenceLength;pp.prototype.setMuted=pp.prototype.setMuted;pp.prototype.resize=pp.prototype.resize;pp.prototype.isLinear=pp.prototype.isLinear;pp.prototype.isMuted=pp.prototype.isMuted;pp.prototype.setVolume=pp.prototype.setVolume;pp.prototype.getVolume=pp.prototype.getVolume;
710
- pp.prototype.play=pp.prototype.play;pp.prototype.pause=pp.prototype.pause;pp.prototype.skip=pp.prototype.skip;pp.prototype.canSkipNow=pp.prototype.canSkipNow;pp.prototype.getTimeUntilSkippable=pp.prototype.getTimeUntilSkippable;pp.prototype.isSkippable=pp.prototype.isSkippable;pp.prototype.isPaused=pp.prototype.isPaused;pp.prototype.getRemainingTime=pp.prototype.getRemainingTime;pp.prototype.getMinSuggestedDuration=pp.prototype.getMinSuggestedDuration;pp.prototype.getDuration=pp.prototype.getDuration;function qp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.F=!1;this.A=this.s=null;this.G=NaN;this.m=e;this.j=null;this.h=new hb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.o,this.i);this.C.initialize();this.l=new google.ima.AdsLoader(this.C);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.23");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
711
- google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){rp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){sp(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.sa(this.i,"play",function(){f.F=!0})}qp.prototype.configure=function(a){this.s=a};qp.prototype.stop=function(){this.g&&this.g.stop();this.o&&gn(this.o)};
712
- qp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.C.destroy()};function sp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new U("ad-error",b));tp(a,null);a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
713
- function rp(a,b){a.m(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(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.B);a.m(new U("ima-ad-manager-loaded",(new Map).set("imaAdManager",
714
- a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}up(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,vp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,vp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
715
- a.i.offsetHeight,vp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,vp(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.F||a.s.skipPlayDetection?a.g.start():a.h.sa(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){tp(a,null)}}
716
- function vp(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
717
- function up(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new U(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){sp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){wp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){wp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
718
- function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){tp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){tp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
706
+ r.getAdId=function(){return this.g.getAdId()};r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return this.g.getMediaUrl()};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",op);op.prototype.release=op.prototype.release;
707
+ op.prototype.getPodIndex=op.prototype.getPodIndex;op.prototype.getTimeOffset=op.prototype.getTimeOffset;op.prototype.getMediaUrl=op.prototype.getMediaUrl;op.prototype.getAdvertiserName=op.prototype.getAdvertiserName;op.prototype.getCreativeAdId=op.prototype.getCreativeAdId;op.prototype.getAdId=op.prototype.getAdId;op.prototype.getVastMediaWidth=op.prototype.getVastMediaWidth;op.prototype.getVastMediaHeight=op.prototype.getVastMediaHeight;op.prototype.getVastMediaBitrate=op.prototype.getVastMediaBitrate;
708
+ op.prototype.getDescription=op.prototype.getDescription;op.prototype.getTitle=op.prototype.getTitle;op.prototype.getPositionInSequence=op.prototype.getPositionInSequence;op.prototype.getSequenceLength=op.prototype.getSequenceLength;op.prototype.setMuted=op.prototype.setMuted;op.prototype.resize=op.prototype.resize;op.prototype.isLinear=op.prototype.isLinear;op.prototype.isMuted=op.prototype.isMuted;op.prototype.setVolume=op.prototype.setVolume;op.prototype.getVolume=op.prototype.getVolume;
709
+ op.prototype.play=op.prototype.play;op.prototype.pause=op.prototype.pause;op.prototype.skip=op.prototype.skip;op.prototype.canSkipNow=op.prototype.canSkipNow;op.prototype.getTimeUntilSkippable=op.prototype.getTimeUntilSkippable;op.prototype.isSkippable=op.prototype.isSkippable;op.prototype.isPaused=op.prototype.isPaused;op.prototype.getRemainingTime=op.prototype.getRemainingTime;op.prototype.getMinSuggestedDuration=op.prototype.getMinSuggestedDuration;op.prototype.getDuration=op.prototype.getDuration;function pp(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.F=!1;this.A=this.s=null;this.G=NaN;this.m=e;this.j=null;this.h=new hb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.o,this.i);this.C.initialize();this.l=new google.ima.AdsLoader(this.C);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.9.24");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,
710
+ google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){qp(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){rp(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.sa(this.i,"play",function(){f.F=!0})}pp.prototype.configure=function(a){this.s=a};pp.prototype.stop=function(){this.g&&this.g.stop();this.o&&fn(this.o)};
711
+ pp.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy();this.C.destroy()};function rp(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new U("ad-error",b));sp(a,null);a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
712
+ function qp(a,b){a.m(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(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.B);a.m(new U("ima-ad-manager-loaded",(new Map).set("imaAdManager",
713
+ a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new U("ad-cue-points-changed",(new Map).set("cuepoints",b)))}tp(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,up(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,up(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
714
+ a.i.offsetHeight,up(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,up(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.F||a.s.skipPlayDetection?a.g.start():a.h.sa(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){sp(a,null)}}
715
+ function up(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
716
+ function tp(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new U(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){rp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){vp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){vp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
717
+ function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){sp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){sp(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
719
718
  a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.D(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.D(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.D(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
720
719
  a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g,
721
720
  google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
722
- function wp(a,b){var c=b.getAd();c?(a.j=new pp(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new U("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.s.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):ab("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
723
- function tp(a,b){a.m(new U("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function xp(a){this.h=a||"";this.g=0}function yp(a){zp(a,/[ \t]+/gm)}function zp(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Ap(a){return a.g==a.h.length?null:(a=zp(a,/[^ \t\n]*/gm))?a[0]:null};function Bp(a,b,c,d,e){this.h=a;if(a=this.h.skipOffset)if(a=zp(new xp(a),Cp),null==a)a=null;else{var f=Number(a[2]),g=Number(a[3]);a=59<f||59<g?null:(Number(a[4])||0)/1E3+g+60*f+3600*(Number(a[1])||0)}else a=null;this.j=a;this.g=e;this.i=b;this.l=c;this.o=d;this.m=!1}r=Bp.prototype;r.getDuration=function(){return this.h.durationInSeconds};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};
721
+ function vp(a,b){var c=b.getAd();c?(a.j=new op(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new U("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.s.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):ab("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
722
+ function sp(a,b){a.m(new U("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function wp(a){this.h=a||"";this.g=0}function xp(a){yp(a,/[ \t]+/gm)}function yp(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function zp(a){return a.g==a.h.length?null:(a=yp(a,/[^ \t\n]*/gm))?a[0]:null};function Ap(a,b,c,d,e){this.h=a;if(a=this.h.skipOffset)if(a=yp(new wp(a),Bp),null==a)a=null;else{var f=Number(a[2]),g=Number(a[3]);a=59<f||59<g?null:(Number(a[4])||0)/1E3+g+60*f+3600*(Number(a[1])||0)}else a=null;this.j=a;this.g=e;this.i=b;this.l=c;this.o=d;this.m=!1}r=Ap.prototype;r.getDuration=function(){return this.h.durationInSeconds};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};
724
723
  r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return"number"==typeof this.j?!0:!1};r.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};
725
724
  r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};r.isLinear=function(){return this.o};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};r.getSequenceLength=function(){return this.l?this.l:1};r.getPositionInSequence=function(){return this.i?this.i:1};r.getTitle=function(){return this.h.adTitle};r.getDescription=function(){return""};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return 0};
726
- r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return this.h.adId};r.getCreativeAdId=function(){return this.h.creativeId};r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",Bp);Bp.prototype.release=Bp.prototype.release;Bp.prototype.getPodIndex=Bp.prototype.getPodIndex;Bp.prototype.getTimeOffset=Bp.prototype.getTimeOffset;
727
- Bp.prototype.getMediaUrl=Bp.prototype.getMediaUrl;Bp.prototype.getAdvertiserName=Bp.prototype.getAdvertiserName;Bp.prototype.getCreativeAdId=Bp.prototype.getCreativeAdId;Bp.prototype.getAdId=Bp.prototype.getAdId;Bp.prototype.getVastMediaWidth=Bp.prototype.getVastMediaWidth;Bp.prototype.getVastMediaHeight=Bp.prototype.getVastMediaHeight;Bp.prototype.getVastMediaBitrate=Bp.prototype.getVastMediaBitrate;Bp.prototype.getDescription=Bp.prototype.getDescription;Bp.prototype.getTitle=Bp.prototype.getTitle;
728
- Bp.prototype.getPositionInSequence=Bp.prototype.getPositionInSequence;Bp.prototype.getSequenceLength=Bp.prototype.getSequenceLength;Bp.prototype.setMuted=Bp.prototype.setMuted;Bp.prototype.resize=Bp.prototype.resize;Bp.prototype.isLinear=Bp.prototype.isLinear;Bp.prototype.isMuted=Bp.prototype.isMuted;Bp.prototype.setVolume=Bp.prototype.setVolume;Bp.prototype.getVolume=Bp.prototype.getVolume;Bp.prototype.play=Bp.prototype.play;Bp.prototype.pause=Bp.prototype.pause;Bp.prototype.skip=Bp.prototype.skip;
729
- Bp.prototype.canSkipNow=Bp.prototype.canSkipNow;Bp.prototype.getTimeUntilSkippable=Bp.prototype.getTimeUntilSkippable;Bp.prototype.isSkippable=Bp.prototype.isSkippable;Bp.prototype.isPaused=Bp.prototype.isPaused;Bp.prototype.getRemainingTime=Bp.prototype.getRemainingTime;Bp.prototype.getMinSuggestedDuration=Bp.prototype.getMinSuggestedDuration;Bp.prototype.getDuration=Bp.prototype.getDuration;var Cp=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Dp(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.W=NaN;this.i=d;this.J=!1;this.A=null;this.j=[];this.N=[];this.L=this.C=this.g=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.P=!0;this.H="";this.o=new hb}Dp.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Gb(b.target,b.type,b.listener);Ep(this);this.m=[];this.s=[];this.G="";this.P=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
730
- Dp.prototype.release=function(){this.stop();this.o&&this.o.release()};Dp.prototype.onManifestUpdated=function(a){this.J=a;""!=this.G&&(Fp(this,this.G,this.P),this.P=!1)};Dp.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};
731
- function Gp(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;O(function(u){if(1==u.g)return d=rg([b],Yf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Ad(e)),f=a.K.request(7,d),xa(u,2),E(u,f.promise,4);if(2!=u.g){g=u.h;h=wd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new sc(b),m=new sc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,q=n-a.W,a.i(new U("ads-loaded",(new Map).set("loadTime",q))),p=new sc(k.manifestUrl),a.l.resolve(l.resolve(p).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
725
+ r.getVastMediaWidth=function(){return 0};r.getAdId=function(){return this.h.adId};r.getCreativeAdId=function(){return this.h.creativeId};r.getAdvertiserName=function(){return""};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){return 0};r.getPodIndex=function(){return 0};r.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",Ap);Ap.prototype.release=Ap.prototype.release;Ap.prototype.getPodIndex=Ap.prototype.getPodIndex;Ap.prototype.getTimeOffset=Ap.prototype.getTimeOffset;
726
+ Ap.prototype.getMediaUrl=Ap.prototype.getMediaUrl;Ap.prototype.getAdvertiserName=Ap.prototype.getAdvertiserName;Ap.prototype.getCreativeAdId=Ap.prototype.getCreativeAdId;Ap.prototype.getAdId=Ap.prototype.getAdId;Ap.prototype.getVastMediaWidth=Ap.prototype.getVastMediaWidth;Ap.prototype.getVastMediaHeight=Ap.prototype.getVastMediaHeight;Ap.prototype.getVastMediaBitrate=Ap.prototype.getVastMediaBitrate;Ap.prototype.getDescription=Ap.prototype.getDescription;Ap.prototype.getTitle=Ap.prototype.getTitle;
727
+ Ap.prototype.getPositionInSequence=Ap.prototype.getPositionInSequence;Ap.prototype.getSequenceLength=Ap.prototype.getSequenceLength;Ap.prototype.setMuted=Ap.prototype.setMuted;Ap.prototype.resize=Ap.prototype.resize;Ap.prototype.isLinear=Ap.prototype.isLinear;Ap.prototype.isMuted=Ap.prototype.isMuted;Ap.prototype.setVolume=Ap.prototype.setVolume;Ap.prototype.getVolume=Ap.prototype.getVolume;Ap.prototype.play=Ap.prototype.play;Ap.prototype.pause=Ap.prototype.pause;Ap.prototype.skip=Ap.prototype.skip;
728
+ Ap.prototype.canSkipNow=Ap.prototype.canSkipNow;Ap.prototype.getTimeUntilSkippable=Ap.prototype.getTimeUntilSkippable;Ap.prototype.isSkippable=Ap.prototype.isSkippable;Ap.prototype.isPaused=Ap.prototype.isPaused;Ap.prototype.getRemainingTime=Ap.prototype.getRemainingTime;Ap.prototype.getMinSuggestedDuration=Ap.prototype.getMinSuggestedDuration;Ap.prototype.getDuration=Ap.prototype.getDuration;var Bp=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Cp(a,b,c,d){this.B=a;this.K=b;this.h=c;this.l=null;this.W=NaN;this.i=d;this.J=!1;this.A=null;this.j=[];this.N=[];this.L=this.C=this.g=null;this.F=new Map;this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.o=new hb}Cp.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.o.Gb(b.target,b.type,b.listener);Dp(this);this.m=[];this.s=[];this.G="";this.T=!0;this.H="";this.A=null;this.j=[];this.N=[];this.F.clear()};
729
+ Cp.prototype.release=function(){this.stop();this.o&&this.o.release()};Cp.prototype.onManifestUpdated=function(a){this.J=a;""!=this.G&&(Ep(this,this.G,this.T),this.T=!1)};Cp.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};
730
+ function Fp(a,b,c){var d,e,f,g,h,k,l,m,n,q,p;O(function(u){if(1==u.g)return d=rg([b],Yf()),d.method="POST",c&&(e=JSON.stringify(c),d.body=Ad(e)),f=a.K.request(7,d),xa(u,2),E(u,f.promise,4);if(2!=u.g){g=u.h;h=wd(g.data);k=JSON.parse(h);if(k.manifestUrl&&k.trackingUrl)l=new sc(b),m=new sc(k.trackingUrl),a.G=l.resolve(m).toString(),n=Date.now()/1E3,q=n-a.W,a.i(new U("ads-loaded",(new Map).set("loadTime",q))),p=new sc(k.manifestUrl),a.l.resolve(l.resolve(p).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
732
731
  return za(u,0)}Aa(u);if(!a.H.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.H);a.l=null;H(u)})}
733
- function Fp(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,w,A;O(function(y){if(1==y.g)return d=rg([b],Yf()),e=a.K.request(7,d),xa(y,2),E(y,e.promise,4);if(2!=y.g){f=y.h;g=[];h=wd(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,q=t(n.nonLinearAdsList),p=q.next();!p.done;p=q.next())for(u=p.value,v=t(u.nonLinearAdList),w=v.next();!w.done;w=v.next())A=w.value,Hp(a,A);g=a.getCuePoints();a.i(new U("ad-cue-points-changed",
734
- (new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",g))),Ep(a),a.j=[];c&&(a.J||0<g.length)&&Ip(a);return za(y,0)}Aa(y);H(y)})}
735
- function Hp(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=Jp(b);if(d=a.F.get(c))return m.return();e=rg([b.staticResource],Yf());f=a.K.request(7,e);xa(m,2);a.F.set(c,[]);return E(m,f.promise,4)}if(2!=m.g)return g=m.h,h=wd(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),za(m,0);Aa(m);a.F.delete(c);H(m)})}
736
- function Jp(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function Ip(a){Kp(a);a.J||(Lp(a),a.o.D(a.h,"seeked",function(){Lp(a)}),a.o.D(a.h,"ended",function(){Ep(a)}));a.o.D(a.h,"timeupdate",function(){Kp(a)})}
737
- function Lp(a){var b=a.h.currentTime;if(0!=b&&null==a.A){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.N.includes(d.adId)&&(a.A=b,a.h.currentTime=c.startTimeInSeconds)}}
738
- function Kp(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),Mp(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),Mp(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),Mp(a,"thirdQuartile"));d=a.g.getRemainingTime();
739
- e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&Mp(a,"skipStateChanged");0<e&&(0>=d||d>e)&&Ep(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.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.N.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}Ep(a);a.L=e;a.g=new Bp(g,f+1,e.ads.length,!0,a.h);a.C=g;0===f&&Mp(a,"breakStart");Np(a);break}}}if(!a.g)for(d=
740
- t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(Jp(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){Ep(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||
741
- 0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.L=e;a.g=new Bp(g,f+1,e.ads.length,!1,a.h);a.C=g;0===f&&Mp(a,"breakStart");Np(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.A&&a.A>b&&(a.h.currentTime=a.A),a.A=null)}}}
742
- function Ep(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.J||a.N.push(a.C.adId);var b=a.g.m;(void 0===b?0:b)?Mp(a,"skip"):Mp(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.Gb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&Mp(a,"breakEnd");a.g=null;a.C=null;a.L=null}}
743
- function Np(a){var b=!1;a.h.paused?b=!0:(Mp(a,"impression"),Mp(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&Mp(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||Mp(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(Mp(a,"impression"),Mp(a,"start"),b=!1):Mp(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){Mp(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target,
732
+ function Ep(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,w,A;O(function(y){if(1==y.g)return d=rg([b],Yf()),e=a.K.request(7,d),xa(y,2),E(y,e.promise,4);if(2!=y.g){f=y.h;g=[];h=wd(f.data);k=JSON.parse(h);if(0<k.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(k.avails)){a.j=k.avails;l=t(a.j);for(m=l.next();!m.done;m=l.next())for(n=m.value,q=t(n.nonLinearAdsList),p=q.next();!p.done;p=q.next())for(u=p.value,v=t(u.nonLinearAdList),w=v.next();!w.done;w=v.next())A=w.value,Gp(a,A);g=a.getCuePoints();a.i(new U("ad-cue-points-changed",
733
+ (new Map).set("cuepoints",g)))}}else a.j.length&&a.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",g))),Dp(a),a.j=[];c&&(a.J||0<g.length)&&Hp(a);return za(y,0)}Aa(y);H(y)})}
734
+ function Gp(a,b){var c,d,e,f,g,h,k,l;O(function(m){if(1==m.g){if(!b.staticResource)return m.return();c=Ip(b);if(d=a.F.get(c))return m.return();e=rg([b.staticResource],Yf());f=a.K.request(7,e);xa(m,2);a.F.set(c,[]);return E(m,f.promise,4)}if(2!=m.g)return g=m.h,h=wd(g.data),k=JSON.parse(h),l=k.apps,a.F.set(c,l),za(m,0);Aa(m);a.F.delete(c);H(m)})}
735
+ function Ip(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function Hp(a){Jp(a);a.J||(Kp(a),a.o.D(a.h,"seeked",function(){Kp(a)}),a.o.D(a.h,"ended",function(){Dp(a)}));a.o.D(a.h,"timeupdate",function(){Jp(a)})}
736
+ function Kp(a){var b=a.h.currentTime;if(0!=b&&null==a.A){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.N.includes(d.adId)&&(a.A=b,a.h.currentTime=c.startTimeInSeconds)}}
737
+ function Jp(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.C,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.s.includes("firstQuartile")?(a.s.push("firstQuartile"),Lp(a,"firstQuartile")):b>=e&&!a.s.includes("midpoint")?(a.s.push("midpoint"),Lp(a,"midpoint")):b>=f&&!a.s.includes("thirdQuartile")&&(a.s.push("thirdQuartile"),Lp(a,"thirdQuartile"));d=a.g.getRemainingTime();
738
+ e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&Lp(a,"skipStateChanged");0<e&&(0>=d||d>e)&&Dp(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.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.N.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}Dp(a);a.L=e;a.g=new Ap(g,f+1,e.ads.length,!0,a.h);a.C=g;0===f&&Lp(a,"breakStart");Mp(a);break}}}if(!a.g)for(d=
739
+ t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.F.get(Ip(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){Dp(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||
740
+ 0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.B.appendChild(m)}a.L=e;a.g=new Ap(g,f+1,e.ads.length,!1,a.h);a.C=g;0===f&&Lp(a,"breakStart");Mp(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.A&&a.A>b&&(a.h.currentTime=a.A),a.A=null)}}}
741
+ function Dp(a){if(a.g){for(;a.B.lastChild;)a.B.removeChild(a.B.firstChild);a.J||a.N.push(a.C.adId);var b=a.g.m;(void 0===b?0:b)?Lp(a,"skip"):Lp(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.o.Gb(c.target,c.type,c.listener);a.m=[];a.s=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&Lp(a,"breakEnd");a.g=null;a.C=null;a.L=null}}
742
+ function Mp(a){var b=!1;a.h.paused?b=!0:(Lp(a,"impression"),Lp(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&Lp(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||Lp(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(Lp(a,"impression"),Lp(a,"start"),b=!1):Lp(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){Lp(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.o.D(d.target,
744
743
  d.type,d.listener)}
745
- function Mp(a,b){var c=a.C.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=rg([d],Yf()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new U("ad-impression"));break;case "start":a.i(new U("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new U("ad-muted"));break;case "unmute":a.i(new U("ad-volume-changed"));break;
744
+ function Lp(a,b){var c=a.C.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=rg([d],Yf()),d.method="POST",a.K.request(7,d))}switch(b){case "impression":a.i(new U("ad-impression"));break;case "start":a.i(new U("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new U("ad-muted"));break;case "unmute":a.i(new U("ad-volume-changed"));break;
746
745
  case "resume":a.i(new U("ad-resumed"));break;case "pause":a.i(new U("ad-paused"));break;case "firstQuartile":a.i(new U("ad-first-quartile"));break;case "midpoint":a.i(new U("ad-midpoint"));break;case "thirdQuartile":a.i(new U("ad-third-quartile"));break;case "complete":a.i(new U("ad-complete"));a.i(new U("ad-stopped"));break;case "skip":a.i(new U("ad-skipped"));a.i(new U("ad-stopped"));break;case "breakStart":a.B.setAttribute("ad-active","true");break;case "breakEnd":a.B.removeAttribute("ad-active");
747
- break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function Op(a,b){this.g=a;this.i=null;this.h=b}r=Op.prototype;r.getDuration=function(){return this.i?this.i.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};r.isPaused=function(){return this.h.paused};r.isSkippable=function(){return this.g.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
746
+ break;case "skipStateChanged":a.i(new U("ad-skip-state-changed"))}};function Np(a,b){this.g=a;this.i=null;this.h=b}r=Np.prototype;r.getDuration=function(){return this.i?this.i.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};r.isPaused=function(){return this.h.paused};r.isSkippable=function(){return this.g.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
748
747
  r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.h.currentTime+=this.getRemainingTime()};r.pause=function(){return this.h.pause()};r.play=function(){return this.h.play()};r.getVolume=function(){return this.h.volume};r.setVolume=function(a){this.h.volume=a};r.isMuted=function(){return this.h.muted};r.isLinear=function(){return!0};r.resize=function(){};r.setMuted=function(a){this.h.muted=a};
749
748
  r.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.g.getTitle()};r.getDescription=function(){return this.g.getDescription()};r.getVastMediaBitrate=function(){return 0};r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};r.getAdId=function(){return this.g.getAdId()};
750
- r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",Op);Op.prototype.release=Op.prototype.release;Op.prototype.getPodIndex=Op.prototype.getPodIndex;
751
- Op.prototype.getTimeOffset=Op.prototype.getTimeOffset;Op.prototype.getMediaUrl=Op.prototype.getMediaUrl;Op.prototype.getAdvertiserName=Op.prototype.getAdvertiserName;Op.prototype.getCreativeAdId=Op.prototype.getCreativeAdId;Op.prototype.getAdId=Op.prototype.getAdId;Op.prototype.getVastMediaWidth=Op.prototype.getVastMediaWidth;Op.prototype.getVastMediaHeight=Op.prototype.getVastMediaHeight;Op.prototype.getVastMediaBitrate=Op.prototype.getVastMediaBitrate;Op.prototype.getDescription=Op.prototype.getDescription;
752
- Op.prototype.getTitle=Op.prototype.getTitle;Op.prototype.getPositionInSequence=Op.prototype.getPositionInSequence;Op.prototype.getSequenceLength=Op.prototype.getSequenceLength;Op.prototype.setMuted=Op.prototype.setMuted;Op.prototype.resize=Op.prototype.resize;Op.prototype.isLinear=Op.prototype.isLinear;Op.prototype.isMuted=Op.prototype.isMuted;Op.prototype.setVolume=Op.prototype.setVolume;Op.prototype.getVolume=Op.prototype.getVolume;Op.prototype.play=Op.prototype.play;Op.prototype.pause=Op.prototype.pause;
753
- Op.prototype.skip=Op.prototype.skip;Op.prototype.canSkipNow=Op.prototype.canSkipNow;Op.prototype.getTimeUntilSkippable=Op.prototype.getTimeUntilSkippable;Op.prototype.isSkippable=Op.prototype.isSkippable;Op.prototype.isPaused=Op.prototype.isPaused;Op.prototype.getRemainingTime=Op.prototype.getRemainingTime;Op.prototype.getMinSuggestedDuration=Op.prototype.getMinSuggestedDuration;Op.prototype.getDuration=Op.prototype.getDuration;function Pp(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new hb;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new U("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Qp(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
754
- e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Op(f,e.l);e.A&&(e.m.i=e.A);e.i(new U("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
749
+ r.getCreativeAdId=function(){return this.g.getCreativeAdId()};r.getAdvertiserName=function(){return this.g.getAdvertiserName()};r.getMediaUrl=function(){return null};r.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};r.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};r.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",Np);Np.prototype.release=Np.prototype.release;Np.prototype.getPodIndex=Np.prototype.getPodIndex;
750
+ Np.prototype.getTimeOffset=Np.prototype.getTimeOffset;Np.prototype.getMediaUrl=Np.prototype.getMediaUrl;Np.prototype.getAdvertiserName=Np.prototype.getAdvertiserName;Np.prototype.getCreativeAdId=Np.prototype.getCreativeAdId;Np.prototype.getAdId=Np.prototype.getAdId;Np.prototype.getVastMediaWidth=Np.prototype.getVastMediaWidth;Np.prototype.getVastMediaHeight=Np.prototype.getVastMediaHeight;Np.prototype.getVastMediaBitrate=Np.prototype.getVastMediaBitrate;Np.prototype.getDescription=Np.prototype.getDescription;
751
+ Np.prototype.getTitle=Np.prototype.getTitle;Np.prototype.getPositionInSequence=Np.prototype.getPositionInSequence;Np.prototype.getSequenceLength=Np.prototype.getSequenceLength;Np.prototype.setMuted=Np.prototype.setMuted;Np.prototype.resize=Np.prototype.resize;Np.prototype.isLinear=Np.prototype.isLinear;Np.prototype.isMuted=Np.prototype.isMuted;Np.prototype.setVolume=Np.prototype.setVolume;Np.prototype.getVolume=Np.prototype.getVolume;Np.prototype.play=Np.prototype.play;Np.prototype.pause=Np.prototype.pause;
752
+ Np.prototype.skip=Np.prototype.skip;Np.prototype.canSkipNow=Np.prototype.canSkipNow;Np.prototype.getTimeUntilSkippable=Np.prototype.getTimeUntilSkippable;Np.prototype.isSkippable=Np.prototype.isSkippable;Np.prototype.isPaused=Np.prototype.isPaused;Np.prototype.getRemainingTime=Np.prototype.getRemainingTime;Np.prototype.getMinSuggestedDuration=Np.prototype.getMinSuggestedDuration;Np.prototype.getDuration=Np.prototype.getDuration;function Op(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.F=NaN;this.i=d;this.G=!1;this.A=this.m=this.o=null;this.B="";this.C=[];this.h=new hb;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new U("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Pp(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
753
+ e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new Np(f,e.l);e.A&&(e.m.i=e.A);e.i(new U("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
755
754
  var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.m&&(e.m.i=e.A)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new U("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new U("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new U("ad-third-quartile"))});
756
755
  this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new U("ad-complete"));e.i(new U("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new U("ad-skipped"));e.i(new U("ad-stopped"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.C=
757
- f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=Pp.prototype;r.configure=function(){};r.stop=function(){this.B="";this.o=null;this.C=[]};r.release=function(){this.stop();this.h&&this.h.release()};r.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};r.getCuePoints=function(){return this.C};
758
- function Qp(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){jg.call(this);this.g=this.h=this.i=null;this.j=new op;this.m=navigator.language;this.l=null}qa(Y,jg);r=Y.prototype;r.setLocale=function(a){this.m=a};r.configure=function(a){this.l=a;this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};r.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new T(2,10,1E4);this.i&&this.i.release();this.i=new qp(a,b,this.m,c,function(e){return Rp(d,e)});this.i.configure(this.l)};
759
- r.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);jg.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.j=new op};r.requestClientSideAds=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.G=Date.now()/1E3;b.l.requestAds(a)};
760
- r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Dp(a,b,c,function(e){return Rp(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new $f,Gp(d,a,b),d.H=c||"",d.W=Date.now()/1E3,a=d.l);return a};
761
- r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new Pp(a,b,this.m,function(d){return Rp(c,d)});this.g.configure(this.l)};
762
- r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&ab('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.9.23";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
763
- (c.G=!0),c.j=new $f,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&ab('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.9.23";this.g.g.replaceAdTagParameters(a)};
756
+ f;e.i(new U("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}r=Op.prototype;r.configure=function(){};r.stop=function(){this.B="";this.o=null;this.C=[]};r.release=function(){this.stop();this.h&&this.h.release()};r.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};r.getCuePoints=function(){return this.C};
757
+ function Pp(a,b){a.i(new U("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.G||a.h.D(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){jg.call(this);this.g=this.h=this.i=null;this.j=new np;this.m=navigator.language;this.l=null}qa(Y,jg);r=Y.prototype;r.setLocale=function(a){this.m=a};r.configure=function(a){this.l=a;this.i&&this.i.configure(this.l);this.g&&this.g.configure(this.l)};r.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new T(2,10,1E4);this.i&&this.i.release();this.i=new pp(a,b,this.m,c,function(e){return Qp(d,e)});this.i.configure(this.l)};
758
+ r.release=function(){this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);jg.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new U("ad-stopped"));this.j=new np};r.requestClientSideAds=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.G=Date.now()/1E3;b.l.requestAds(a)};
759
+ r.updateClientSideAdsRenderingSettings=function(a){if(!this.i)throw new T(1,10,10001);var b=this.i;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};r.initMediaTailor=function(a,b,c){var d=this;this.h&&this.h.release();this.h=new Cp(a,b,c,function(e){return Qp(d,e)})};r.requestMediaTailorStream=function(a,b,c){if(!this.h)throw new T(1,10,10005);var d=this.h;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new $f,Fp(d,a,b),d.H=c||"",d.W=Date.now()/1E3,a=d.l);return a};
760
+ r.addMediaTailorTrackingUrl=function(a){if(!this.h)throw new T(1,10,10005);var b=this.h;b.G=a;b.i(new U("ads-loaded",(new Map).set("loadTime",0)))};r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new Op(a,b,this.m,function(d){return Qp(c,d)});this.g.configure(this.l)};
761
+ r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&ab('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.9.24";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
762
+ (c.G=!0),c.j=new $f,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&ab('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.9.24";this.g.g.replaceAdTagParameters(a)};
764
763
  r.getServerSideCuePoints=function(){rb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};r.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.h&&(a=a.concat(this.h.getCuePoints()));return a};r.getStats=function(){var a=this.j;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onManifestUpdated=function(a){if(this.h)this.h.onManifestUpdated(a)};
765
764
  r.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};
766
- function Rp(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)}S("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
765
+ function Qp(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)}S("shaka.ads.AdManager",Y);Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.onManifestUpdated=Y.prototype.onManifestUpdated;Y.prototype.getStats=Y.prototype.getStats;
767
766
  Y.prototype.getCuePoints=Y.prototype.getCuePoints;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.addMediaTailorTrackingUrl=Y.prototype.addMediaTailorTrackingUrl;Y.prototype.requestMediaTailorStream=Y.prototype.requestMediaTailorStream;
768
767
  Y.prototype.initMediaTailor=Y.prototype.initMediaTailor;Y.prototype.updateClientSideAdsRenderingSettings=Y.prototype.updateClientSideAdsRenderingSettings;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.configure=Y.prototype.configure;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";
769
768
  Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";
770
- Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";Yn=function(){return new Y};function Sp(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof U){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);d=t(Object.getOwnPropertyNames(c));for(b=d.next();!b.done;b=d.next())e.add(b.value);d={};e=t(e);for(b=e.next();!b.done;b=e.next())b=b.value,d[b]=c[b];c={__type__:"Error",contents:d}}else if(c instanceof
769
+ Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_ERROR="ad-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";Xn=function(){return new Y};function Rp(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof U){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);d=t(Object.getOwnPropertyNames(c));for(b=d.next();!b.done;b=d.next())e.add(b.value);d={};e=t(e);for(b=e.next();!b.done;b=e.next())b=b.value,d[b]=c[b];c={__type__:"Error",contents:d}}else if(c instanceof
771
770
  TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(Ni(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
772
- function Tp(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Up(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
773
- function Up(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
774
- var Vp="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Wp="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Xp=["loop","playbackRate"],Yp=["pause","play"],Zp={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
775
- isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},$p={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},aq={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},bq=[["getConfiguration","configure"]],cq=[["isTextTrackVisible","setTextTrackVisibility"]],dq="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
776
- eq=["attach","attachCanvas","detach","load","unload"];function fq(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Tc(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.N=f;this.h=this.m=!1;this.J="";this.o=null;this.B=function(){return gq(h)};this.C=function(k,l){k=Tp(l);switch(k.type){case "event":var m=k.targetName,n=hg(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(n=k.id,q=k.error,k=h.i[n],delete h.i[n],k)if(q){n=new T(q.severity,q.category,
777
- q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;hq.add(this)}r=fq.prototype;r.destroy=function(){hq.delete(this);iq(this);jq&&kq(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};r.$a=function(){return this.h};r.rf=function(){return this.J};
778
- r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.jc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(hq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new $f;d.s=!0;lq(d,e)}},function(b){for(var c=t(hq),d=c.next();!d.done;d=c.next())d=d.value,mq="available"==b,d.l.jc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});mq&&this.l.X(nq);(a=jq)&&
779
- a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new $f,this.s=!0,lq(this,a)):jq=null}else window.__onGCastApiAvailable!==oq&&(pq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=oq)};r.Bf=function(a){this.o=a;this.h&&qq(this,{type:"appData",appData:this.o})};
780
- r.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!mq)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new $f;chrome.cast.requestSession(function(c){return lq(a,c)},function(c){return rq(a,c)});return E(b,a.j,0)})};function sq(a){a.h&&chrome.cast.requestSession(function(b){return lq(a,b)},function(b){return rq(a,b)})}r.uc=function(){if(this.h){iq(this);if(jq){kq(this);try{jq.stop(function(){},function(){})}catch(a){}jq=null}gq(this)}};
781
- r.get=function(a,b){var c=this;if("video"==a){if(Yp.includes(b))return function(){return c.Dg.apply(c,[a,b].concat(x(La.apply(0,arguments))))}}else if("player"==a){if(aq[b]&&!this.get("player","isLive")())return function(){};if(dq.includes(b))return function(){return c.Dg.apply(c,[a,b].concat(x(La.apply(0,arguments))))};if(eq.includes(b))return function(){return c.wi.apply(c,[a,b].concat(x(La.apply(0,arguments))))};if(Zp[b]||$p[b])return function(){return c.g[a][b]}}return this.g[a][b]};
782
- r.set=function(a,b,c){this.g[a][b]=c;qq(this,{type:"set",targetName:a,property:b,value:c})};function lq(a,b){var c=a.N();jq=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);gq(a);qq(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function rq(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new T(2,8,c,b))}
783
- r.Dg=function(a,b){qq(this,{type:"call",targetName:a,methodName:b,args:La.apply(2,arguments)})};r.wi=function(a,b){var c=La.apply(2,arguments),d=new $f,e=this.H.toString();this.H++;this.i[e]=d;try{qq(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function kq(a){var b=jq;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
784
- function gq(a){var b=jq?"connected"==jq.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};iq(a)}a.h=b;a.J=b?jq.receiver.friendlyName:"";a.l.jc()}function iq(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function qq(a,b){b=Sp(b);var c=jq;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},db)}catch(d){throw b=new T(2,8,8005,d),c=new U("error",(new Map).set("detail",b)),a.A("player",c),a.uc(),b;}}var nq=.02,mq=!1,jq=null,pq=null,hq=new Set;
785
- function oq(a){pq?window.__onGCastApiAvailable=pq:delete window.__onGCastApiAvailable;pq=null;if(a)for(var b=t(hq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function tq(a,b,c,d){d=void 0===d?!1:d;jg.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new fq(c,function(){return uq(e)},function(){return vq(e)},function(f,g){return wq(e,f,g)},function(){return xq(e)},function(){return yq(e)},d);zq(this)}qa(tq,jg);r=tq.prototype;
786
- r.destroy=function(a){a&&this.g.uc();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.s=this.l=this.i=null;jg.prototype.release.call(this);return Promise.all(a)};r.Th=function(){return this.l};r.Ih=function(){return this.s};r.lh=function(){return this.g.m&&mq};r.$a=function(){return this.g.$a()};r.rf=function(){return this.g.rf()};
787
- r.cast=function(){var a=this;return O(function(b){return 1==b.g?E(b,a.g.cast(),2):a.h?E(b,a.h.kc(),0):b.return()})};r.Bf=function(a){this.g.Bf(a)};r.Mi=function(){sq(this.g)};r.uc=function(){this.g.uc()};
788
- r.mh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.uc();return E(d,c.g.destroy(),2)}c.g=null;c.g=new fq(a,function(){return uq(c)},function(){return vq(c)},function(e,f){return wq(c,e,f)},function(){return xq(c)},function(){return yq(c)},b);c.g.init();H(d)})};
789
- function zq(a){a.g.init();a.m=new hb;for(var b=t(Vp),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.$a()||(f=hg(f),a.j.dispatchEvent(f))});for(var d in ig)a.m.D(a.h,ig[d],function(f){a.g.$a()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={fd:b.fd},b.fd=e,Object.defineProperty(a.l,b.fd,{configurable:!1,enumerable:!0,get:function(f){return function(){return Aq(a,f.fd)}}(b),set:function(f){return function(g){var h=f.fd;a.g.$a()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.s={};Bq(a,
790
- function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Cq(a,f)}})});Dq(a);a.j=new jg;a.j.Xd=a.l;a.o=new jg;a.o.Xd=a.s}function Dq(a){var b=new Map;Bq(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
791
- function Bq(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
792
- function yq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.vc(),startTime:null};a.i.pause();for(var c=t(Xp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(bq);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(cq);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function uq(a){var b=new U("caststatuschanged");a.dispatchEvent(b)}
793
- function vq(a){var b=new U(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
794
- function xq(a){for(var b=t(bq),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(Xp);for(d=c.next();!d.done;d=c.next())d=
795
- d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Xp),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(cq);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.Ng(h);g&&a.h.zf(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new U("error",l);a.h.dispatchEvent(l)})}
796
- function Aq(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.$a()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.$a()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
797
- function Cq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.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.Wb()};if("getDrmEngine"==b)return function(){return a.h.A};if("getAdManager"==b)return function(){return a.h.gg()};
798
- if("setVideoContainer"==b)return function(c){return a.h.Rg(c)};if(a.g.$a()){if("getManifest"==b||"drmInfo"==b)return function(){ab(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){ab(b+"() does not work while casting!");return Promise.resolve()}}return a.g.$a()&&0==Object.keys(a.g.g.video).length&&(Zp[b]||$p[b])||!a.g.$a()?a.h[b].bind(a.h):a.g.get("player",b)}
799
- function wq(a,b,c){a.g.$a()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",tq);tq.prototype.changeReceiverId=tq.prototype.mh;tq.prototype.forceDisconnect=tq.prototype.uc;tq.prototype.suggestDisconnect=tq.prototype.Mi;tq.prototype.setAppData=tq.prototype.Bf;tq.prototype.cast=tq.prototype.cast;tq.prototype.receiverName=tq.prototype.rf;tq.prototype.isCasting=tq.prototype.$a;tq.prototype.canCast=tq.prototype.lh;tq.prototype.getPlayer=tq.prototype.Ih;
800
- tq.prototype.getVideo=tq.prototype.Th;tq.prototype.destroy=tq.prototype.destroy;function Eq(a,b,c,d){jg.call(this);var e=this;this.g=a;this.h=b;this.j=new hb;this.H={video:a,player:b};this.C=c||function(){};this.J=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.G=new Tc(function(){Fq(e)});Gq(this)}qa(Eq,jg);r=Eq.prototype;r.isConnected=function(){return this.F};r.Zh=function(){return this.o};r.Ii=function(a){this.i=a};r.qh=function(){this.i=null};
801
- r.Ji=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Hi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Gi=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
771
+ function Sp(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Tp(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
772
+ function Tp(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
773
+ var Up="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Vp="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Wp=["loop","playbackRate"],Xp=["pause","play"],Yp={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
774
+ isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},Zp={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},$p={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},aq=[["getConfiguration","configure"]],bq=[["isTextTrackVisible","setTextTrackVisibility"]],cq="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
775
+ dq=["attach","attachCanvas","detach","load","unload"];function eq(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new Tc(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.N=f;this.h=this.m=!1;this.J="";this.o=null;this.B=function(){return fq(h)};this.C=function(k,l){k=Sp(l);switch(k.type){case "event":var m=k.targetName,n=hg(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(n=k.id,q=k.error,k=h.i[n],delete h.i[n],k)if(q){n=new T(q.severity,q.category,
776
+ q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;gq.add(this)}r=eq.prototype;r.destroy=function(){gq.delete(this);hq(this);iq&&jq(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};r.$a=function(){return this.h};r.rf=function(){return this.J};
777
+ r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.jc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(gq),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new $f;d.s=!0;kq(d,e)}},function(b){for(var c=t(gq),d=c.next();!d.done;d=c.next())d=d.value,lq="available"==b,d.l.jc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});lq&&this.l.X(mq);(a=iq)&&
778
+ a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new $f,this.s=!0,kq(this,a)):iq=null}else window.__onGCastApiAvailable!==nq&&(oq=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=nq)};r.Bf=function(a){this.o=a;this.h&&pq(this,{type:"appData",appData:this.o})};
779
+ r.cast=function(){var a=this;return O(function(b){if(!a.m)throw new T(1,8,8E3);if(!lq)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new $f;chrome.cast.requestSession(function(c){return kq(a,c)},function(c){return qq(a,c)});return E(b,a.j,0)})};function rq(a){a.h&&chrome.cast.requestSession(function(b){return kq(a,b)},function(b){return qq(a,b)})}r.uc=function(){if(this.h){hq(this);if(iq){jq(this);try{iq.stop(function(){},function(){})}catch(a){}iq=null}fq(this)}};
780
+ r.get=function(a,b){var c=this;if("video"==a){if(Xp.includes(b))return function(){return c.Dg.apply(c,[a,b].concat(x(La.apply(0,arguments))))}}else if("player"==a){if($p[b]&&!this.get("player","isLive")())return function(){};if(cq.includes(b))return function(){return c.Dg.apply(c,[a,b].concat(x(La.apply(0,arguments))))};if(dq.includes(b))return function(){return c.vi.apply(c,[a,b].concat(x(La.apply(0,arguments))))};if(Yp[b]||Zp[b])return function(){return c.g[a][b]}}return this.g[a][b]};
781
+ r.set=function(a,b,c){this.g[a][b]=c;pq(this,{type:"set",targetName:a,property:b,value:c})};function kq(a,b){var c=a.N();iq=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);fq(a);pq(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function qq(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new T(2,8,c,b))}
782
+ r.Dg=function(a,b){pq(this,{type:"call",targetName:a,methodName:b,args:La.apply(2,arguments)})};r.vi=function(a,b){var c=La.apply(2,arguments),d=new $f,e=this.H.toString();this.H++;this.i[e]=d;try{pq(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function jq(a){var b=iq;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
783
+ function fq(a){var b=iq?"connected"==iq.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};hq(a)}a.h=b;a.J=b?iq.receiver.friendlyName:"";a.l.jc()}function hq(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function pq(a,b){b=Rp(b);var c=iq;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},db)}catch(d){throw b=new T(2,8,8005,d),c=new U("error",(new Map).set("detail",b)),a.A("player",c),a.uc(),b;}}var mq=.02,lq=!1,iq=null,oq=null,gq=new Set;
784
+ function nq(a){oq?window.__onGCastApiAvailable=oq:delete window.__onGCastApiAvailable;oq=null;if(a)for(var b=t(gq),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function sq(a,b,c,d){d=void 0===d?!1:d;jg.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new eq(c,function(){return tq(e)},function(){return uq(e)},function(f,g){return vq(e,f,g)},function(){return wq(e)},function(){return xq(e)},d);yq(this)}qa(sq,jg);r=sq.prototype;
785
+ r.destroy=function(a){a&&this.g.uc();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.s=this.l=this.i=null;jg.prototype.release.call(this);return Promise.all(a)};r.Sh=function(){return this.l};r.Hh=function(){return this.s};r.kh=function(){return this.g.m&&lq};r.$a=function(){return this.g.$a()};r.rf=function(){return this.g.rf()};
786
+ r.cast=function(){var a=this;return O(function(b){return 1==b.g?E(b,a.g.cast(),2):a.h?E(b,a.h.kc(),0):b.return()})};r.Bf=function(a){this.g.Bf(a)};r.Li=function(){rq(this.g)};r.uc=function(){this.g.uc()};
787
+ r.lh=function(a,b){b=void 0===b?!1:b;var c=this;return O(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.uc();return E(d,c.g.destroy(),2)}c.g=null;c.g=new eq(a,function(){return tq(c)},function(){return uq(c)},function(e,f){return vq(c,e,f)},function(){return wq(c)},function(){return xq(c)},b);c.g.init();H(d)})};
788
+ function yq(a){a.g.init();a.m=new hb;for(var b=t(Up),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.$a()||(f=hg(f),a.j.dispatchEvent(f))});for(var d in ig)a.m.D(a.h,ig[d],function(f){a.g.$a()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={fd:b.fd},b.fd=e,Object.defineProperty(a.l,b.fd,{configurable:!1,enumerable:!0,get:function(f){return function(){return zq(a,f.fd)}}(b),set:function(f){return function(g){var h=f.fd;a.g.$a()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.s={};Aq(a,
789
+ function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Bq(a,f)}})});Cq(a);a.j=new jg;a.j.Xd=a.l;a.o=new jg;a.o.Xd=a.s}function Cq(a){var b=new Map;Aq(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
790
+ function Aq(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
791
+ function xq(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.vc(),startTime:null};a.i.pause();for(var c=t(Wp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(aq);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(bq);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function tq(a){var b=new U("caststatuschanged");a.dispatchEvent(b)}
792
+ function uq(a){var b=new U(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
793
+ function wq(a){for(var b=t(aq),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(Wp);for(d=c.next();!d.done;d=c.next())d=
794
+ d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Wp),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(bq);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.Ng(h);g&&a.h.zf(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new U("error",l);a.h.dispatchEvent(l)})}
795
+ function zq(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.$a()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.$a()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
796
+ function Bq(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.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.Wb()};if("getDrmEngine"==b)return function(){return a.h.A};if("getAdManager"==b)return function(){return a.h.gg()};
797
+ if("setVideoContainer"==b)return function(c){return a.h.Rg(c)};if(a.g.$a()){if("getManifest"==b||"drmInfo"==b)return function(){ab(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){ab(b+"() does not work while casting!");return Promise.resolve()}}return a.g.$a()&&0==Object.keys(a.g.g.video).length&&(Yp[b]||Zp[b])||!a.g.$a()?a.h[b].bind(a.h):a.g.get("player",b)}
798
+ function vq(a,b,c){a.g.$a()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",sq);sq.prototype.changeReceiverId=sq.prototype.lh;sq.prototype.forceDisconnect=sq.prototype.uc;sq.prototype.suggestDisconnect=sq.prototype.Li;sq.prototype.setAppData=sq.prototype.Bf;sq.prototype.cast=sq.prototype.cast;sq.prototype.receiverName=sq.prototype.rf;sq.prototype.isCasting=sq.prototype.$a;sq.prototype.canCast=sq.prototype.kh;sq.prototype.getPlayer=sq.prototype.Hh;
799
+ sq.prototype.getVideo=sq.prototype.Sh;sq.prototype.destroy=sq.prototype.destroy;function Dq(a,b,c,d){jg.call(this);var e=this;this.g=a;this.h=b;this.j=new hb;this.H={video:a,player:b};this.C=c||function(){};this.J=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.G=new Tc(function(){Eq(e)});Fq(this)}qa(Dq,jg);r=Dq.prototype;r.isConnected=function(){return this.F};r.Yh=function(){return this.o};r.Hi=function(a){this.i=a};r.ph=function(){this.i=null};
800
+ r.Ii=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Gi=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Fi=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
802
801
  r.destroy=function(){var a=this,b,c;return O(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.G&&(a.G.stop(),a.G=null),a.g=null,a.H=null,a.C=null,a.F=!1,a.o=!0,a.l=null,a.s=null,jg.prototype.release.call(a),E(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();H(d)})};
803
- function Gq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Hq(a)};b.onSenderDisconnected=function(){return Hq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Iq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Iq(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return Jq(a,
804
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Kq(a,e)};b.start();b=t(Vp);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return Lq(a,"video",e)});for(var d in ig)a.j.D(a.h,ig[d],function(e){return Lq(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;Mq(a)});a.j.D(a.g,"playing",function(){a.o=!1;Mq(a)});a.j.D(a.g,"pause",function(){Mq(a)});a.j.D(a.h,"unloading",function(){a.o=!0;Mq(a)});
805
- a.j.D(a.g,"ended",function(){(new Tc(function(){a.g&&a.g.ended&&(a.o=!0,Mq(a))})).X(Nq)})}function Hq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Mq(a)}function Mq(a){var b;O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);if(!a.h)return c.return();b=new U("caststatuschanged");a.dispatchEvent(b);Oq(a)||Pq(a);H(c)})}
806
- function Qq(a,b,c){var d,e,f,g,h,k,l,m,n,q;O(function(p){switch(p.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,xa(p,5),E(p,a.h.load(b.manifest,b.startTime),7)):E(p,Promise.resolve(),3);case 7:za(p,3);break;case 5:return g=Aa(p),h=(new Map).set("detail",g),k=new U("error",h),a.h&&a.h.dispatchEvent(k),p.return();case 3:if(!a.h)return p.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)q=b.playerAfterLoad[n],a.h[n](q);
807
- a.g.autoplay=f;b.manifest&&(a.g.play(),Pq(a));H(p)}})}function Lq(a,b,c){a.h&&(Fq(a),Iq(a,{type:"event",targetName:b,event:c},a.l))}
808
- function Fq(a){a.G.X(Rq);for(var b={video:{},player:{}},c=t(Wp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in aq)0==a.m%aq[e]&&(b.player[e]=a.h[e]());for(var f in Zp)0==a.m%Zp[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Iq(a,{type:"update",update:b},a.l);for(var g in $p)0==a.m%$p[g]&&(b={player:{}},b.player[g]=a.h[g](),Iq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
809
- 1);Oq(a)}function Oq(a){return a.A&&(a.g.duration||a.h.U())?(Sq(a),a.A=!1,!0):!1}function Sq(a,b){var c={contentId:a.h.vc(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Pq(a,void 0===b?0:b,c)}
810
- function Kq(a,b){var c=Tp(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;Qq(a,c.initState,c.appData);Fq(a);break;case "appData":a.C(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
811
- "player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return Tq(a,g,f,null)},function(h){return Tq(a,g,f,h)})}}
812
- function Jq(a,b){var c=Tp(b.data);switch(c.type){case "PLAY":a.g.play();Pq(a);break;case "PAUSE":a.g.pause();Pq(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Pq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Pq(a));break;case "STOP":a.h.kc().then(function(){a.h&&Pq(a)});break;case "GET_STATUS":Sq(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
813
- null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Pq(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.J(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Sq(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Iq(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:Iq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
814
- function Tq(a,b,c,d){a.h&&Iq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Iq(a,b,c,d){a.F&&(a=Sp(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Pq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Uq:a.h.Ye()?Vq:a.g.paused?Wq:Xq,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Iq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
815
- S("shaka.cast.CastReceiver",Eq);Eq.prototype.destroy=Eq.prototype.destroy;Eq.prototype.setContentArtist=Eq.prototype.Gi;Eq.prototype.setContentImage=Eq.prototype.Hi;Eq.prototype.setContentTitle=Eq.prototype.Ji;Eq.prototype.clearContentMetadata=Eq.prototype.qh;Eq.prototype.setContentMetadata=Eq.prototype.Ii;Eq.prototype.isIdle=Eq.prototype.Zh;Eq.prototype.isConnected=Eq.prototype.isConnected;var Rq=.5,Nq=5,Uq="IDLE",Xq="PLAYING",Vq="BUFFERING",Wq="PAUSED";function Yq(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(z){return null!=z&&""!=z.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(z){return null!=z&&""!=z.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Zq(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],p=-1,u=-1,v=0;v<q.length;v++)if(null!=q[v]&&""!==q[v].g.trim()){p=v;break}for(v=q.length-1;0<=v;v--)if(null!=q[v]&&""!==q[v].g.trim()){u=v;break}if(-1===
816
- p||-1===u)q=$q(d,e),a.nestedCues.push(q);else{for(;p<=u;p++)if(v=q[p]){var w=v.l,A=v.i,y=v.j,C=v.h;if(w!=h||A!=k||y!=l||C!=m)n.payload&&a.nestedCues.push(n),n=Zq(d,e,w,A,y,C),h=w,k=A,l=y,m=C;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=$q(d,e),a.nestedCues.push(n));n=Zq(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
817
- function Zq(a,b,c,d,e,f){a=new Rb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function $q(a,b){a=new Rb(a,b,"");a.lineBreak=!0;return a}function ar(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function br(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";cr(this)}function dr(a,b,c){var d="CC"+((a.A<<1|a.s)+1),e=new Rb(b,c,"");e.lineInterpretation=1;var f=er.get(a.g);f&&(e.line=f);(b=Yq(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=er.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function cr(a){fr(a,0,15);a.g=1}
818
- function gr(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case 0:d=hr.has(c)?hr.get(c):String.fromCharCode(c);break;case 1:d=ir.get(c);break;case 2:a.i[a.g].pop();d=jr.get(c);break;case 3:a.i[a.g].pop(),d=kr.get(c)}d&&a.i[a.g].push(new ar(d,a.m,a.j,a.o,a.l))}}function lr(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function fr(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
819
- var hr=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),ir=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),jr=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,"\u00da"],[36,"\u00dc"],
820
- [37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),kr=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],[39,"\u00d5"],[40,"\u00f5"],
821
- [41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),er=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function mr(a,b){this.h=0;this.o=new br(a,b);this.i=new br(a,b);this.g=this.j=new br(a,b);this.l=0;this.m=null}function nr(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=dr(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,fr(c,0,15),c=a.j,c.g=0<c.h?c.h:0,fr(c,0,15),d.g=15);a.h=3;d.h=b;return e}function or(a){a.h=1;a.g=a.j;a.g.h=0}function pr(a){bb("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=4}var qr="black green blue cyan red yellow magenta black".split(" "),rr="white green blue cyan red yellow magenta white_italics".split(" ");function sr(a,b){this.J=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.L=this.H=0;this.F=2;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.s="black";tr(this)}function tr(a){a.i=[];for(var b=0;16>b;b++)a.i.push(ur())}function ur(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function vr(a,b){wr(a)&&(a.i[a.h][a.g]=new ar(b,a.C,a.A,a.s,a.B),a.g++)}function wr(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}sr.prototype.isVisible=function(){return this.l};
822
- function xr(a,b,c){var d=new Rb(a.j,b,"");d.textAlign=0===a.F?"left":1===a.F?"right":Tb;var e=d.region;a.J&&(e.id+="svc"+a.J);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?Lb:2;switch(a.G){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
823
- 50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Yq(d,"svc"+c,a.i,a.j,b))a.j=b;return c};function yr(){this.i=[];this.h=null;this.g=0}function zr(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new Ar(a.h)),a.h=null,a.g=0))}function Ar(a){this.g=0;this.h=a}Ar.prototype.la=function(){return this.g<this.h.length};Ar.prototype.ra=function(){return this.g};function Br(a){if(!a.la())throw new T(2,2,3E3);return a.h[a.g++]}Ar.prototype.skip=function(a){if(this.g+a>this.h.length)throw new T(2,2,3E3);this.g+=a};function Cr(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
824
- function Dr(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Br(b).value;b=null;c=t(Er(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=xr(e,d,a.i)),tr(e);return b}if(137===c)for(b=Br(b).value,b=t(Er(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Br(b).value;b=null;c=t(Er(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=xr(e,d,a.i)),e.l=!1;return b}if(139===c){c=Br(b).value;
825
- b=null;c=t(Er(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=xr(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Br(b).value,Fr(a,b,d);if(143===c)return d=Fr(a,255,d),Gr(a),d;if(144===c)b.skip(1),d=Br(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Br(b).value,c=Br(b).value,b.skip(1),a.g&&(b=Hr((c&48)>>4,(c&12)>>2,c&3),a.g.B=Hr((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=Br(b).value,b=Br(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
826
- b.skip(1),d=Br(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new sr(c,a.i);f.j=d;a.h[c]=f}d=Br(b).value;f=Br(b).value;var g=Br(b).value,h=Br(b).value,k=Br(b).value;b=Br(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
827
- function Er(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function Fr(a,b,c){var d=null;b=t(Er(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=xr(f,c,a.i));a.h[e]=null}return d}function Gr(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Hr(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Ir[a<<2|b<<1|c]}
828
- var Jr=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Ir="black blue green cyan red magenta yellow white".split(" ");function Kr(){this.h=[];this.g=[];this.i=new yr;this.l=0;this.m=new Map([["CC1",new mr(0,0)],["CC2",new mr(0,1)],["CC3",new mr(1,0)],["CC4",new mr(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;Lr(this)}Kr.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Lr(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())Gr(b.value)};
829
- function Lr(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,cr(c.i),cr(c.j),cr(c.o);a.B=!0}
830
- Kr.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Hg(a,0);if(!(8>a.getLength())&&181===a.S()&&49===a.ia()&&1195456820===a.O()&&3===a.S()&&(c=a.S(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.S(),f=(e&4)>>2,g=a.S(),h=a.S();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Xa:g,xb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
831
- Kr.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=Mr(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())zr(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=Nr(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
832
- function Mr(a,b){var c=b.type;if(16===(b.Xa&112)){var d=b.Xa>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.Xa&&255===b.xb||!b.Xa&&!b.xb||!Or(b.Xa)||!Or(b.xb))return 45<=++a.l&&Lr(a),null;a.l=0;b.Xa&=127;b.xb&=127;var e=b.Xa;if(1<=e&&15>=e||!b.Xa&&!b.xb)return null;e=null;if(16===(b.Xa&112))a:{a.A.add(d),d=b.Xa;a=b.xb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var f=(a&30)>>1;d=
833
- "white";e=!1;7>f?d=rr[f]:7===f&&(e=!0);a=1===(a&1);4!==c.h&&(f=c.g,3===c.h&&b!==f.g&&(c=1+b-f.h,lr(f,c,1+f.g-f.h,f.h),fr(f,0,c-1),fr(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",gr(c.g,0,32),d=!1,b=rr[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=qr[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))gr(c.g,
834
- 1,a);else if(18===(d&246)&&32===(a&224))gr(c.g,d&1?3:2,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.xb){case 32:or(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=nr(c,2,a);break;case 38:d=nr(c,3,a);break;case 39:d=nr(c,4,a);break;case 40:gr(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:cr(c.o);pr(c);break;case 43:pr(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=dr(b,c.l,a));fr(b,0,15);break;case 45:b=c.g;3!==c.h?d=null:(d=dr(b,c.l,a),e=b.g-b.h+1,lr(b,e-1,e,
835
- b.h),fr(b,0,e-1),fr(b,b.g,15-b.g),c.l=a);break;case 46:fr(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=dr(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,or(c),c.l=a,d=b}e=d;break a}e=null}else a=b.xb,gr(c.g,0,b.Xa),gr(c.g,0,a);return e}
836
- function Nr(a,b){var c=[];try{for(;b.la();){var d=Br(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Br(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Cr(e));for(var g=a.j.get(e),h=b.ra();b.ra()-h<f;){e=g;var k=b,l=Br(k),m=l.value,n=l.pts;if(16===m){var q=Br(k);m=m<<16|q.value}if(0<=m&&31>=m){k=e;var p=m,u=n;if(k.g){var v=k.g;e=null;switch(p){case 8:!wr(v)||0>=v.g&&0>=v.h||(0>=v.g?(v.g=v.m-1,v.h--):v.g--,v.i[v.h][v.g]=null);break;case 13:v.isVisible()&&(e=xr(v,u,k.i));if(v.h+1>=v.o){k=
837
- v;p=0;for(u=1;16>u;u++,p++)k.i[p]=k.i[u];for(u=0;1>u;u++,p++)k.i[p]=ur()}else v.h++;v.g=0;break;case 14:v.isVisible()&&(e=xr(v,u,k.i));v.i[v.h]=ur();v.g=0;break;case 12:v.isVisible()&&(e=xr(v,u,k.i)),tr(v),k=v,k.h=0,k.g=0}var w=e}else w=null}else if(128<=m&&159>=m)w=Dr(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m&255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&
838
- (127===k?vr(e.g,"\u266a"):vr(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&vr(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(Jr.has(k)){var A=Jr.get(k);vr(e.g,A)}else vr(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?vr(e.g,"_"):vr(e.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(y){if(y instanceof T&&3E3===y.code)bb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw y;}return c}
839
- function Or(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}Kr.prototype.getStreams=function(){return Array.from(this.A)};S("shaka.cea.CeaDecoder",Kr);Jb=function(){return new Kr};function Pr(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function Qr(){this.j=new Map;this.i=this.h=0;this.g=Rr}
840
- Qr.prototype.init=function(a){function b(f){f=f.name;f in Sr&&(c.g=Sr[f])}var c=this,d=[],e=[];(new Kg).box("moov",Rg).box("mvex",Rg).R("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.O();g=g.O();c.h=f;c.i=g}).box("trak",Rg).R("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.O();1==f?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.ia();g.ia();g.ia();g.ia();d.push(h)}).box("mdia",Rg).R("mdhd",
841
- function(f){f=Yi(f.reader,f.version);e.push(f.timescale)}).box("minf",Rg).box("stbl",Rg).R("stsd",Tg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",b).box("dvh1",b).box("dvhe",b).box("encv",Ug).box("sinf",Rg).box("frma",function(f){f=aj(f.reader).codec;f in Sr&&(c.g=Sr[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==Rr&&ab("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
842
- Qr.prototype.parse=function(a){var b=this;if(this.g==Rr)return[];var c=[],d=0,e=[];(new Kg).box("moof",function(f){d=f.start;e=[];Rg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Pc:b.h,yd:b.i,yg:[],timescale:9E4});Rg(f)}).R("trun",function(f){var g=e[e.length-1];f=Zi(f.reader,f.version,f.flags);g.yg.push(f)}).R("tfhd",function(f){var g=e[e.length-1];f=Wi(f.reader,f.flags);g.Pc=f.Pc||b.h;g.yd=f.yd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).R("tfdt",function(f){var g=e[e.length-
843
- 1];f=Xi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.ra(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw ab("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);Tr(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.Pc,l.yd,g,l.yg,c)}}).parse(a,!1);return c};
844
- function Tr(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Fg});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].sh);b.la();){g=b.O();var q=b.S(),p=null;p=!1;h=1;switch(a.g){case Ur:p=q&31;p=6==p;break;case Vr:h=2;b.skip(1);p=q>>1&63;p=39==p||40==p;break;default:return}if(p)for(q=0,l<n.length&&(q=n[l].fe||0),q=(c+q)/d,h=t(Pr(b.mb(g-h))),p=h.next();!p.done;p=h.next())k.push({packet:p.value,pts:q});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
845
- c+(n[l].xf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",Qr);var Rr=0,Ur=1,Vr=2,Sr={avc1:Ur,avc3:Ur,hev1:Vr,hvc1:Vr,dvav:Ur,dva1:Ur,dvh1:Vr,dvhe:Vr};Ib["video/mp4"]=function(){return new Qr};function Wr(){this.g=null}Wr.prototype.init=function(){};Wr.prototype.parse=function(a){this.g?this.g.clearData():this.g=new vj;var b=[];a=Bb(a);if(!Cj(a))return b;a=this.g.parse(a);var c=a.Tc(),d=a.Hd();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(Pr(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
846
- S("shaka.cea.TsCeaParser",Wr);Ib["video/mp2t"]=function(){return new Wr};function Xr(a,b,c){var d=Yr(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new T(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Fc});if(1<f.length)throw new T(2,4,4050);f.length&&(g=Zr(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Fc}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Fc?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
847
- l.Fc});f.length&&(a=$r(e,k,f,c,h),0==a.length&&(a=[Od("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Od(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{bg:h,Pj:e,drmInfos:a,se:g,fg:!0}}
848
- function as(a,b,c,d){var e=Xr(a,c,d);if(b.fg){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.fg=!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 T(2,4,4008);return e.bg||b.bg}
849
- function bs(a){var b=0,c=Fb(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=Bb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function cs(a){a=t(ih(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=t(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return gh(c)}return""}
850
- function ds(a){var b=kh(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=gh(b)))return b;a=kh(a.node,"urn:microsoft:playready","pro");if(!a||!gh(a))return"";a=gh(a);a=Hd(a);a=bs(a).filter(function(c){return c.type===es})[0];if(!a)return"";a=xd(a.value,!0);return(a=$g(a,"WRMHEADER"))?cs(a):""}
851
- function $r(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Fc];if(h){var k;if((k=kh(g.node,"urn:microsoft:playready","pro"))&&gh(k)){k=gh(k);k=Hd(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Yg(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Fc){l=g;var m=e;if(0==m.size)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2,
852
- 172,227,60,30,82,226,251,75]),q=new Uint8Array([]);l=[{initData:Yg(q,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=Od(h,b,g.init||a||k||l);if(h=fs.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Yr(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=gs(c.value))&&b.push(c);return b}
853
- function gs(a){var b=a.attributes.schemeIdUri,c=nh(a,"urn:mpeg:cenc:2013","default_KID"),d=lh(a,"urn:mpeg:cenc:2013","pssh").map(hh),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new T(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Hd(g),keyId:null}})}catch(g){throw new T(2,4,4007);}return{node:a,Fc:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
854
- function Zr(a){if(!window.crypto||!window.crypto.subtle)throw ab("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var b=kh(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new T(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new T(2,4,4051);b=kh(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new T(2,4,4051);a=b.attributes.IV;b=Dd(b.attributes.keyUriTemplate);
855
- if(!a||!b)throw new T(2,4,4051);a=Kd(a.substr(2));if(16!=a.byteLength)throw new T(2,4,4048);return{ei:b,iv:a}}
856
- var es=1,fs=(new Map).set("com.widevine.alpha",function(a){var b=kh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=gh(b))?b:(a=kh(a.node,"urn:microsoft","laurl"))?Dd(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",ds).set("com.microsoft.playready.recommendation",ds).set("com.microsoft.playready.software",ds).set("com.microsoft.playready.hardware",ds).set("org.w3.clearkey",function(a){var b=kh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=gh(b))?b:(a=kh(a.node,"http://dashif.org/guidelines/clearKey",
857
- "Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=gh(a))?a:""});function hs(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))&&ab("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();
802
+ function Fq(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Gq(a)};b.onSenderDisconnected=function(){return Gq(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Hq(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Hq(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return Iq(a,
803
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Jq(a,e)};b.start();b=t(Up);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return Kq(a,"video",e)});for(var d in ig)a.j.D(a.h,ig[d],function(e){return Kq(a,"player",e)});a.j.D(a.g,"loadeddata",function(){a.B=!0});a.j.D(a.h,"loading",function(){a.o=!1;Lq(a)});a.j.D(a.g,"playing",function(){a.o=!1;Lq(a)});a.j.D(a.g,"pause",function(){Lq(a)});a.j.D(a.h,"unloading",function(){a.o=!0;Lq(a)});
804
+ a.j.D(a.g,"ended",function(){(new Tc(function(){a.g&&a.g.ended&&(a.o=!0,Lq(a))})).X(Mq)})}function Gq(a){a.m=0;a.A=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Lq(a)}function Lq(a){var b;O(function(c){if(1==c.g)return E(c,Promise.resolve(),2);if(!a.h)return c.return();b=new U("caststatuschanged");a.dispatchEvent(b);Nq(a)||Oq(a);H(c)})}
805
+ function Pq(a,b,c){var d,e,f,g,h,k,l,m,n,q;O(function(p){switch(p.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,xa(p,5),E(p,a.h.load(b.manifest,b.startTime),7)):E(p,Promise.resolve(),3);case 7:za(p,3);break;case 5:return g=Aa(p),h=(new Map).set("detail",g),k=new U("error",h),a.h&&a.h.dispatchEvent(k),p.return();case 3:if(!a.h)return p.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)q=b.playerAfterLoad[n],a.h[n](q);
806
+ a.g.autoplay=f;b.manifest&&(a.g.play(),Oq(a));H(p)}})}function Kq(a,b,c){a.h&&(Eq(a),Hq(a,{type:"event",targetName:b,event:c},a.l))}
807
+ function Eq(a){a.G.X(Qq);for(var b={video:{},player:{}},c=t(Vp),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in $p)0==a.m%$p[e]&&(b.player[e]=a.h[e]());for(var f in Yp)0==a.m%Yp[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Hq(a,{type:"update",update:b},a.l);for(var g in Zp)0==a.m%Zp[g]&&(b={player:{}},b.player[g]=a.h[g](),Hq(a,{type:"update",update:b},a.l));a.B&&(a.m+=
808
+ 1);Nq(a)}function Nq(a){return a.A&&(a.g.duration||a.h.U())?(Rq(a),a.A=!1,!0):!1}function Rq(a,b){var c={contentId:a.h.vc(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Oq(a,void 0===b?0:b,c)}
809
+ function Jq(a,b){var c=Sp(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.A=!0;Pq(a,c.initState,c.appData);Eq(a);break;case "appData":a.C(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
810
+ "player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.A=!0}));c.then(function(){return Sq(a,g,f,null)},function(h){return Sq(a,g,f,h)})}}
811
+ function Iq(a,b){var c=Sp(b.data);switch(c.type){case "PLAY":a.g.play();Oq(a);break;case "PAUSE":a.g.pause();Oq(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Oq(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Oq(a));break;case "STOP":a.h.kc().then(function(){a.h&&Oq(a)});break;case "GET_STATUS":Rq(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
812
+ null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Oq(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.J(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Rq(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Hq(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:Hq(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
813
+ function Sq(a,b,c,d){a.h&&Hq(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Hq(a,b,c,d){a.F&&(a=Rp(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Oq(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Tq:a.h.Ye()?Uq:a.g.paused?Vq:Wq,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Hq(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
814
+ S("shaka.cast.CastReceiver",Dq);Dq.prototype.destroy=Dq.prototype.destroy;Dq.prototype.setContentArtist=Dq.prototype.Fi;Dq.prototype.setContentImage=Dq.prototype.Gi;Dq.prototype.setContentTitle=Dq.prototype.Ii;Dq.prototype.clearContentMetadata=Dq.prototype.ph;Dq.prototype.setContentMetadata=Dq.prototype.Hi;Dq.prototype.isIdle=Dq.prototype.Yh;Dq.prototype.isConnected=Dq.prototype.isConnected;var Qq=.5,Mq=5,Tq="IDLE",Wq="PLAYING",Uq="BUFFERING",Vq="PAUSED";function Xq(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(z){return null!=z&&""!=z.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(z){return null!=z&&""!=z.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Yq(d,e,h,k,l,m);f<=g;f++){for(var q=c[f],p=-1,u=-1,v=0;v<q.length;v++)if(null!=q[v]&&""!==q[v].g.trim()){p=v;break}for(v=q.length-1;0<=v;v--)if(null!=q[v]&&""!==q[v].g.trim()){u=v;break}if(-1===
815
+ p||-1===u)q=Zq(d,e),a.nestedCues.push(q);else{for(;p<=u;p++)if(v=q[p]){var w=v.l,A=v.i,y=v.j,C=v.h;if(w!=h||A!=k||y!=l||C!=m)n.payload&&a.nestedCues.push(n),n=Yq(d,e,w,A,y,C),h=w,k=A,l=y,m=C;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Zq(d,e),a.nestedCues.push(n));n=Yq(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
816
+ function Yq(a,b,c,d,e,f){a=new Rb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Zq(a,b){a=new Rb(a,b,"");a.lineBreak=!0;return a}function $q(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function ar(a,b){this.i=[];this.g=1;this.h=0;this.A=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";br(this)}function cr(a,b,c){var d="CC"+((a.A<<1|a.s)+1),e=new Rb(b,c,"");e.lineInterpretation=1;var f=dr.get(a.g);f&&(e.line=f);(b=Xq(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=dr.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function br(a){er(a,0,15);a.g=1}
817
+ function fr(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case 0:d=gr.has(c)?gr.get(c):String.fromCharCode(c);break;case 1:d=hr.get(c);break;case 2:a.i[a.g].pop();d=ir.get(c);break;case 3:a.i[a.g].pop(),d=jr.get(c)}d&&a.i[a.g].push(new $q(d,a.m,a.j,a.o,a.l))}}function kr(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function er(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
818
+ var gr=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),hr=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),ir=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,"\u00da"],[36,"\u00dc"],
819
+ [37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),jr=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],[39,"\u00d5"],[40,"\u00f5"],
820
+ [41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),dr=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function lr(a,b){this.h=0;this.o=new ar(a,b);this.i=new ar(a,b);this.g=this.j=new ar(a,b);this.l=0;this.m=null}function mr(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=cr(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,er(c,0,15),c=a.j,c.g=0<c.h?c.h:0,er(c,0,15),d.g=15);a.h=3;d.h=b;return e}function nr(a){a.h=1;a.g=a.j;a.g.h=0}function or(a){bb("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=4}var pr="black green blue cyan red yellow magenta black".split(" "),qr="white green blue cyan red yellow magenta white_italics".split(" ");function rr(a,b){this.J=b;this.N=a;this.K=this.l=!1;this.m=this.o=this.G=this.L=this.H=0;this.F=2;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.s="black";sr(this)}function sr(a){a.i=[];for(var b=0;16>b;b++)a.i.push(tr())}function tr(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function ur(a,b){vr(a)&&(a.i[a.h][a.g]=new $q(b,a.C,a.A,a.s,a.B),a.g++)}function vr(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}rr.prototype.isVisible=function(){return this.l};
821
+ function wr(a,b,c){var d=new Rb(a.j,b,"");d.textAlign=0===a.F?"left":1===a.F?"right":Tb;var e=d.region;a.J&&(e.id+="svc"+a.J);e.id+="win"+a.N;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?Lb:2;switch(a.G){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
822
+ 50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Xq(d,"svc"+c,a.i,a.j,b))a.j=b;return c};function xr(){this.i=[];this.h=null;this.g=0}function yr(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new zr(a.h)),a.h=null,a.g=0))}function zr(a){this.g=0;this.h=a}zr.prototype.la=function(){return this.g<this.h.length};zr.prototype.ra=function(){return this.g};function Ar(a){if(!a.la())throw new T(2,2,3E3);return a.h[a.g++]}zr.prototype.skip=function(a){if(this.g+a>this.h.length)throw new T(2,2,3E3);this.g+=a};function Br(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
823
+ function Cr(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=Ar(b).value;b=null;c=t(Dr(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=wr(e,d,a.i)),sr(e);return b}if(137===c)for(b=Ar(b).value,b=t(Dr(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=Ar(b).value;b=null;c=t(Dr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=wr(e,d,a.i)),e.l=!1;return b}if(139===c){c=Ar(b).value;
824
+ b=null;c=t(Dr(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=wr(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Ar(b).value,Er(a,b,d);if(143===c)return d=Er(a,255,d),Fr(a),d;if(144===c)b.skip(1),d=Ar(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=Ar(b).value,c=Ar(b).value,b.skip(1),a.g&&(b=Gr((c&48)>>4,(c&12)>>2,c&3),a.g.B=Gr((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=Ar(b).value,b=Ar(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
825
+ b.skip(1),d=Ar(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new rr(c,a.i);f.j=d;a.h[c]=f}d=Ar(b).value;f=Ar(b).value;var g=Ar(b).value,h=Ar(b).value,k=Ar(b).value;b=Ar(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
826
+ function Dr(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function Er(a,b,c){var d=null;b=t(Dr(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=wr(f,c,a.i));a.h[e]=null}return d}function Fr(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Gr(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Hr[a<<2|b<<1|c]}
827
+ var Ir=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Hr="black blue green cyan red magenta yellow white".split(" ");function Jr(){this.h=[];this.g=[];this.i=new xr;this.l=0;this.m=new Map([["CC1",new lr(0,0)],["CC2",new lr(0,1)],["CC3",new lr(1,0)],["CC4",new lr(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;Kr(this)}Jr.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Kr(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())Fr(b.value)};
828
+ function Kr(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,br(c.i),br(c.j),br(c.o);a.B=!0}
829
+ Jr.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Hg(a,0);if(!(8>a.getLength())&&181===a.R()&&49===a.ia()&&1195456820===a.O()&&3===a.R()&&(c=a.R(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.R(),f=(e&4)>>2,g=a.R(),h=a.R();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Xa:g,xb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
830
+ Jr.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=Lr(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())yr(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=Mr(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
831
+ function Lr(a,b){var c=b.type;if(16===(b.Xa&112)){var d=b.Xa>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.Xa&&255===b.xb||!b.Xa&&!b.xb||!Nr(b.Xa)||!Nr(b.xb))return 45<=++a.l&&Kr(a),null;a.l=0;b.Xa&=127;b.xb&=127;var e=b.Xa;if(1<=e&&15>=e||!b.Xa&&!b.xb)return null;e=null;if(16===(b.Xa&112))a:{a.A.add(d),d=b.Xa;a=b.xb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var f=(a&30)>>1;d=
832
+ "white";e=!1;7>f?d=qr[f]:7===f&&(e=!0);a=1===(a&1);4!==c.h&&(f=c.g,3===c.h&&b!==f.g&&(c=1+b-f.h,kr(f,c,1+f.g-f.h,f.h),er(f,0,c-1),er(f,b+1,15-b)),f.g=b,f.m=a,f.j=e,f.l=d,f.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",fr(c.g,0,32),d=!1,b=qr[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=pr[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))fr(c.g,
833
+ 1,a);else if(18===(d&246)&&32===(a&224))fr(c.g,d&1?3:2,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.xb){case 32:nr(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=mr(c,2,a);break;case 38:d=mr(c,3,a);break;case 39:d=mr(c,4,a);break;case 40:fr(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:br(c.o);or(c);break;case 43:or(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=cr(b,c.l,a));er(b,0,15);break;case 45:b=c.g;3!==c.h?d=null:(d=cr(b,c.l,a),e=b.g-b.h+1,kr(b,e-1,e,
834
+ b.h),er(b,0,e-1),er(b,b.g,15-b.g),c.l=a);break;case 46:er(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=cr(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,nr(c),c.l=a,d=b}e=d;break a}e=null}else a=b.xb,fr(c.g,0,b.Xa),fr(c.g,0,a);return e}
835
+ function Mr(a,b){var c=[];try{for(;b.la();){var d=Ar(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Ar(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new Br(e));for(var g=a.j.get(e),h=b.ra();b.ra()-h<f;){e=g;var k=b,l=Ar(k),m=l.value,n=l.pts;if(16===m){var q=Ar(k);m=m<<16|q.value}if(0<=m&&31>=m){k=e;var p=m,u=n;if(k.g){var v=k.g;e=null;switch(p){case 8:!vr(v)||0>=v.g&&0>=v.h||(0>=v.g?(v.g=v.m-1,v.h--):v.g--,v.i[v.h][v.g]=null);break;case 13:v.isVisible()&&(e=wr(v,u,k.i));if(v.h+1>=v.o){k=
836
+ v;p=0;for(u=1;16>u;u++,p++)k.i[p]=k.i[u];for(u=0;1>u;u++,p++)k.i[p]=tr()}else v.h++;v.g=0;break;case 14:v.isVisible()&&(e=wr(v,u,k.i));v.i[v.h]=tr();v.g=0;break;case 12:v.isVisible()&&(e=wr(v,u,k.i)),sr(v),k=v,k.h=0,k.g=0}var w=e}else w=null}else if(128<=m&&159>=m)w=Cr(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m&255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&
837
+ (127===k?ur(e.g,"\u266a"):ur(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&ur(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(Ir.has(k)){var A=Ir.get(k);ur(e.g,A)}else ur(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?ur(e.g,"_"):ur(e.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(y){if(y instanceof T&&3E3===y.code)bb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw y;}return c}
838
+ function Nr(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}Jr.prototype.getStreams=function(){return Array.from(this.A)};S("shaka.cea.CeaDecoder",Jr);Jb=function(){return new Jr};function Or(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function Pr(){this.j=new Map;this.i=this.h=0;this.g=Qr}
839
+ Pr.prototype.init=function(a){function b(f){f=f.name;f in Rr&&(c.g=Rr[f])}var c=this,d=[],e=[];(new Kg).box("moov",Rg).box("mvex",Rg).P("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.O();g=g.O();c.h=f;c.i=g}).box("trak",Rg).P("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.O();1==f?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.ia();g.ia();g.ia();g.ia();d.push(h)}).box("mdia",Rg).P("mdhd",
840
+ function(f){f=Yi(f.reader,f.version);e.push(f.timescale)}).box("minf",Rg).box("stbl",Rg).P("stsd",Tg).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvav",b).box("dva1",b).box("dvh1",b).box("dvhe",b).box("encv",Ug).box("sinf",Rg).box("frma",function(f){f=aj(f.reader).codec;f in Rr&&(c.g=Rr[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==Qr&&ab("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
841
+ Pr.prototype.parse=function(a){var b=this;if(this.g==Qr)return[];var c=[],d=0,e=[];(new Kg).box("moof",function(f){d=f.start;e=[];Rg(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Pc:b.h,yd:b.i,yg:[],timescale:9E4});Rg(f)}).P("trun",function(f){var g=e[e.length-1];f=Zi(f.reader,f.version,f.flags);g.yg.push(f)}).P("tfhd",function(f){var g=e[e.length-1];f=Wi(f.reader,f.flags);g.Pc=f.Pc||b.h;g.yd=f.yd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).P("tfdt",function(f){var g=e[e.length-
842
+ 1];f=Xi(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.ra(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw ab("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);Sr(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.Pc,l.yd,g,l.yg,c)}}).parse(a,!1);return c};
843
+ function Sr(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Fg});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].rh);b.la();){g=b.O();var q=b.R(),p=null;p=!1;h=1;switch(a.g){case Tr:p=q&31;p=6==p;break;case Ur:h=2;b.skip(1);p=q>>1&63;p=39==p||40==p;break;default:return}if(p)for(q=0,l<n.length&&(q=n[l].fe||0),q=(c+q)/d,h=t(Or(b.mb(g-h))),p=h.next();!p.done;p=h.next())k.push({packet:p.value,pts:q});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
844
+ c+(n[l].xf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",Pr);var Qr=0,Tr=1,Ur=2,Rr={avc1:Tr,avc3:Tr,hev1:Ur,hvc1:Ur,dvav:Tr,dva1:Tr,dvh1:Ur,dvhe:Ur};Ib["video/mp4"]=function(){return new Pr};function Vr(){this.g=null}Vr.prototype.init=function(){};Vr.prototype.parse=function(a){this.g?this.g.clearData():this.g=new vj;var b=[];a=Bb(a);if(!Cj(a))return b;a=this.g.parse(a);var c=a.Tc(),d=a.Hd();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(Or(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
845
+ S("shaka.cea.TsCeaParser",Vr);Ib["video/mp2t"]=function(){return new Vr};function Wr(a,b,c){var d=Xr(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new T(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Fc});if(1<f.length)throw new T(2,4,4050);f.length&&(g=Yr(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Fc}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Fc?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
846
+ l.Fc});f.length&&(a=Zr(e,k,f,c,h),0==a.length&&(a=[Od("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Od(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{bg:h,Oj:e,drmInfos:a,se:g,fg:!0}}
847
+ function $r(a,b,c,d){var e=Wr(a,c,d);if(b.fg){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.fg=!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 T(2,4,4008);return e.bg||b.bg}
848
+ function as(a){var b=0,c=Fb(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=Bb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function bs(a){a=t(ih(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=t(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return gh(c)}return""}
849
+ function cs(a){var b=kh(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=gh(b)))return b;a=kh(a.node,"urn:microsoft:playready","pro");if(!a||!gh(a))return"";a=gh(a);a=Hd(a);a=as(a).filter(function(c){return c.type===ds})[0];if(!a)return"";a=xd(a.value,!0);return(a=$g(a,"WRMHEADER"))?bs(a):""}
850
+ function Zr(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Fc];if(h){var k;if((k=kh(g.node,"urn:microsoft:playready","pro"))&&gh(k)){k=gh(k);k=Hd(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Yg(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Fc){l=g;var m=e;if(0==m.size)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2,
851
+ 172,227,60,30,82,226,251,75]),q=new Uint8Array([]);l=[{initData:Yg(q,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=Od(h,b,g.init||a||k||l);if(h=es.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Xr(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=fs(c.value))&&b.push(c);return b}
852
+ function fs(a){var b=a.attributes.schemeIdUri,c=nh(a,"urn:mpeg:cenc:2013","default_KID"),d=lh(a,"urn:mpeg:cenc:2013","pssh").map(hh),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new T(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Hd(g),keyId:null}})}catch(g){throw new T(2,4,4007);}return{node:a,Fc:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
853
+ function Yr(a){if(!window.crypto||!window.crypto.subtle)throw ab("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var b=kh(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new T(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new T(2,4,4051);b=kh(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new T(2,4,4051);a=b.attributes.IV;b=Dd(b.attributes.keyUriTemplate);
854
+ if(!a||!b)throw new T(2,4,4051);a=Kd(a.substr(2));if(16!=a.byteLength)throw new T(2,4,4048);return{di:b,iv:a}}
855
+ var ds=1,es=(new Map).set("com.widevine.alpha",function(a){var b=kh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=gh(b))?b:(a=kh(a.node,"urn:microsoft","laurl"))?Dd(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",cs).set("com.microsoft.playready.recommendation",cs).set("com.microsoft.playready.software",cs).set("com.microsoft.playready.hardware",cs).set("org.w3.clearkey",function(a){var b=kh(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=gh(b))?b:(a=kh(a.node,"http://dashif.org/guidelines/clearKey",
856
+ "Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=gh(a))?a:""});function gs(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))&&ab("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();
858
857
  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})}
859
- function is(a,b){var c=js(a,b,"timescale"),d=1;c&&(d=th(c)||1);c=js(a,b,"duration");(c=th(c||""))&&(c/=d);var e=js(a,b,"startNumber"),f=Number(js(a,b,"presentationTimeOffset"))||0,g=uh(e||"");if(null==e||null==g)g=1;e=null;if(b=ks(a,b,"SegmentTimeline")){b=fh(b,"S");e=d;a=a.ha.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],q=b[m+1],p=mh(n,"t",uh),u=mh(n,"d",uh),v=mh(n,"r",sh);n=mh(n,"k",sh)||0;null!=p&&(p-=f);if(u){p=null!=p?p:l;v=v||0;if(0>v)if(q){q=mh(q,"t",uh);if(null==
860
- q)break;else if(p>=q)break;v=Math.ceil((q-p)/u)-1}else{if(Infinity==a)break;else if(p/e>=a)break;v=Math.ceil((a*e-p)/u)-1}0<k.length&&p!=l&&(k[k.length-1].end=p/e);for(q=0;q<=v;++q)l=p+u,k.push({start:p/e,end:l/e,Qf:p,vb:n,Ei:k.length+h}),p=l}}e=k}return{timescale:d,Ka:c,md:g,Eb:f/d||0,Pf:f,timeline:e}}function ls(a,b){return[b(a.I),b(a.ka),b(a.pa)].filter(ze)}function js(a,b,c){b=ls(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
861
- function ks(a,b,c){b=ls(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=jh(d.value,c));d=b.next());return a}
862
- function ms(a,b,c,d,e,f){for(var g=nh(a,"http://www.w3.org/1999/xlink","href"),h=nh(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=bh("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return bg(new T(2,4,4028));if("onLoad"!=h)return bg(new T(2,4,4027));var q=Nd([d],[g]);return e.request(0,rg(q,b)).za(function(p){p=Zg(p.data,a.tagName);if(!p)return bg(new T(2,4,4001,g));for(a.children=
863
- [];p.children.length;){var u=p.children.shift();u.tagName&&(u.parent=a);a.children.push(u)}u=t(Object.keys(p.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=p.attributes[v];return ns(a,b,c,q[0],e,f+1)})}
864
- function ns(a,b,c,d,e,f){f=void 0===f?0:f;if(nh(a,"http://www.w3.org/1999/xlink","href")){var g=ms(a,b,c,d,e,f);c&&(g=g.za(void 0,function(){return ns(a,b,c,d,e,f)}));return g}g=[];for(var h=t(eh(a)),k=h.next(),l={};!k.done;l={Kc:void 0},k=h.next())l.Kc=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==nh(l.Kc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Kc}}(l)):"SegmentTimeline"!=l.Kc.tagName&&g.push(ns(l.Kc,b,c,d,e,f));return fg(g).za(function(){return a})}
865
- ;function os(a,b,c,d,e,f,g){var h,k=(new Kg).R("sidx",function(l){h=ps(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
866
- function ps(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.Ec(),m=g.reader.Ec();g.reader.skip(2);var n=g.reader.ia();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.O(),p=(q&2147483648)>>>31;q&=2147483647;var u=g.reader.O();g.reader.skip(4);if(1==p)throw new T(2,3,3006);h.push(new Fi(l/k+c,(l+u)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=u;a+=q}g.parser.stop();return h};function qs(a){this.h=Fb(a);this.g=new Hg(this.h,0)}qs.prototype.la=function(){return this.g.la()};
867
- function rs(a){var b=ss(a);if(7<b.length)throw new T(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=ss(a);a:{d=t(ts);for(var e=d.next();!e.done;e=d.next())if(zb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ra();else{if(8==b.length&&b[1]&224)throw new T(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.ra()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ra();d=Fb(a.h,a.g.ra(),b);a.g.skip(b);return new us(c,
868
- d)}function ss(a){var b=a.g.ra(),c=a.g.S();if(0==c)throw new T(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Bb(a.h,b,c)}var ts=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function us(a,b){this.id=a;this.g=b}
869
- function vs(a){if(8<a.g.byteLength)throw new T(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new T(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 ws(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new qs(a.g);for(var n=null,q=null;a.la();){var p=rs(a);if(187==p.id){var u=xs(p);u&&(p=c*u.Qi,u=b+u.ui,null!=n&&m.push(new Fi(n+g,p+g,l,q,u-1,f,g,h,k)),n=p,q=u)}}null!=n&&m.push(new Fi(n+g,d+g,l,q,null,f,g,h,k));return m}
870
- function xs(a){var b=new qs(a.g);a=rs(b);if(179!=a.id)throw new T(2,3,3013);a=vs(a);b=rs(b);if(183!=b.id)throw new T(2,3,3012);b=new qs(b.g);for(var c=0;b.la();){var d=rs(b);if(241==d.id){c=vs(d);break}}return{Qi:a,ui:c}};function ys(a,b,c){b=ks(a,b,"Initialization");if(!b)return null;var d=a.I.Ca(),e=b.attributes.sourceURL;e&&(d=Nd(d,[Dd(e)]));e=0;var f=null;if(b=mh(b,"range",rh))e=b.start,f=b.end;c=new Ai(function(){return d},e,f,zs(a),null,null,c);c.codecs=a.I.codecs;c.mimeType=a.I.mimeType;return c}
871
- function As(a,b,c){var d=Number(js(a,Bs,"presentationTimeOffset"))||0,e=js(a,Bs,"timescale"),f=1;e&&(f=th(e)||1);var g=d/f||0,h=ys(a,Bs,c);Cs(a,h);var k=Le(a);return{Tb:function(){var l=ks(k,Bs,"RepresentationIndex");var m=k.I.Ca();l&&(l=Dd(l.attributes.sourceURL))&&(m=Nd(m,[l]));l=Ds(k);return Es(k,b,h,m,l.start,l.end,g)}}}
872
- function Es(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F;return O(function(K){if(1==K.g)return h=a.presentationTimeline,k=!a.rb||!a.ha.dd,l=a.ha.start,m=a.ha.duration,n=a.I.mimeType.split("/")[1],q=b,p=null,u=[q(d,e,f,!1),"webm"==n?q(c.M(),c.Da,c.oa,!0):null],q=null,E(K,Promise.all(u),2);v=K.h;w=v[0];A=v[1]||null;y=null;C=l-g;z=l;B=m?l+m:Infinity;if("mp4"==n)var J=os(w,e,d,c,C,z,B);else{J=w;var G=new qs(A);if(440786851!=rs(G).id)throw new T(2,3,3008);var L=rs(G);if(408125543!=L.id)throw new T(2,
873
- 3,3009);G=L.g.byteOffset;L=new qs(L.g);for(var N=null;L.la();){var M=rs(L);if(357149030==M.id){N=M;break}}if(!N)throw new T(2,3,3010);N=new qs(N.g);M=1E6;for(L=null;N.la();){var P=rs(N);if(2807729==P.id)M=vs(P);else if(17545==P.id)if(4==P.g.byteLength)L=P.g.getFloat32(0);else if(8==P.g.byteLength)L=P.g.getFloat64(0);else throw new T(2,3,3003);}if(null==L)throw new T(2,3,3011);N=M/1E9;L*=N;J=rs(new qs(J));if(475249515!=J.id)throw new T(2,3,3007);J=ws(J,G,N,L,d,c,C,z,B)}y=J;D=t(y);for(I=D.next();!I.done;I=
874
- D.next())F=I.value,F.codecs=a.I.codecs,F.mimeType=a.I.mimeType;h.hd(y);p=new Kk(y);k&&p.tc(z,B,!0);return K.return(p)})}function Bs(a){return a.Hc}function Ds(a){var b=ks(a,Bs,"RepresentationIndex");a=js(a,Bs,"indexRange");a=rh(a||"");b&&(a=mh(b,"range",rh,a));return a}function Cs(a,b){Fs(a,b);if(!Ds(a))throw new T(2,4,4002);}function Fs(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=Td&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
875
- function zs(a){var b=a.I;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.Ac,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Gs(a,b,c){var d=ys(a,Hs,c),e=Is(a);if(!e.Ka&&!e.timeline&&1<e.zc.length)throw new T(2,4,4002);if(!e.Ka&&!a.ha.duration&&!e.timeline&&1==e.zc.length)throw new T(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new T(2,4,4002);var f=null,g=null;a.pa.id&&a.I.id&&(g=b[a.pa.id+","+a.I.id])&&(f=g.segmentIndex);var h=Js(a.ha.start,a.ha.duration,a.I.Ca,e,d,c,a.I.mimeType,a.I.codecs);b=!f;f?f.gd(h,a.presentationTimeline.ib()):f=new Kk(h);a.presentationTimeline.hd(h);a.rb&&a.ha.dd||f.tc(a.ha.start,
876
- a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{Tb:function(){f&&0!=f.getNumReferences()||f.Sd(h);return Promise.resolve(f)}}}function Hs(a){return a.Fb}function Is(a){var b=Ks(a);a=is(a,Hs);var c=a.md;0==c&&(c=1);var d=0;a.Ka?d=a.Ka*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Ka:a.Ka,startTime:d,md:c,Eb:a.Eb,timeline:a.timeline,zc:b}}
877
- function Js(a,b,c,d,e,f,g,h){var k=d.zc.length;d.timeline&&d.timeline.length!=d.zc.length&&(k=Math.min(d.timeline.length,d.zc.length));for(var l=a-d.Eb,m=b?a+b:Infinity,n=[],q=d.startTime,p={},u=0;u<k;p={ke:void 0,ge:void 0},u++){p.ge=d.zc[u];var v=q;q=void 0;q=null!=d.Ka?v+d.Ka:d.timeline?d.timeline[u].end:v+b;p.ke=null;p=new Fi(a+v,a+q,function(w){return function(){null==w.ke&&(w.ke=Nd(c(),[w.ge.ki]));return w.ke}}(p),p.ge.start,p.ge.end,e,l,a,m,[],"",null,null,Gi,f);p.codecs=h;p.mimeType=g;n.push(p)}return n}
878
- function Ks(a){return[a.I.Fb,a.ka.Fb,a.pa.Fb].filter(ze).map(function(b){return fh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.Ve&&(a.Ve=!0);var c=Dd(b.attributes.media);b=mh(b,"mediaRange",rh,{start:0,end:null});return{ki:c,start:b.start,end:b.end}})};function Ls(a,b,c,d,e,f,g,h,k){k||a.I.yc||(a.I.yc=js(a,Ms,"initialization"));var l=a.I.yc?Ns(a,g):null,m=Os(a);Ps(m);var n=Le(a);if(m.bd)return Fs(a,l),{Tb:function(){var w=hs(m.bd,n.I.id,null,null,n.bandwidth||null,null);w=Nd(n.I.Ca(),[w]);return Es(n,b,l,w,0,null,m.Eb)}};if(m.Ka)return d||"image"===a.ka.contentType||(a.presentationTimeline.hf(m.Ka),a.presentationTimeline.Wd(a.ha.start)),{Tb:function(){return Qs(n,m,e,l,f,g,h)}};var q=null;d=d=null;a.pa.id&&a.I.id&&(d=a.pa.id+","+a.I.id,d=c[d])&&
879
- (q=d.segmentIndex);var p=a.ha.start,u=a.ha.duration?p+a.ha.duration:Infinity,v=!(a.rb&&a.ha.dd);q?(c=q,Rs(c,m,p,u,v,l),c.Ma(a.presentationTimeline.ib())):q=new Ss(m,a.I.id,a.bandwidth,a.I.Ca,p,u,l,v,g,a.I.yf);m.timeline&&"image"!==a.ka.contentType&&a.presentationTimeline.xg(m.timeline,p);d&&a.rb&&(d.segmentIndex=q);return{Tb:function(){q instanceof Ss&&0==q.getNumReferences()&&Rs(q,m,p,u,v,l);return Promise.resolve(q)}}}function Ms(a){return a.Nb}
880
- function Os(a){var b=is(a,Ms),c=js(a,Ms,"media"),d=js(a,Ms,"index");return{Ka:b.Ka,timescale:b.timescale,md:b.md,Eb:b.Eb,Pf:b.Pf,timeline:b.timeline,Lb:c&&Dd(c),bd:d,mimeType:a.I.mimeType,codecs:a.I.codecs}}function Ps(a){var b=a.bd?1:0;b+=a.timeline?1:0;b+=a.Ka?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.bd&&(a.timeline=null),a.Ka=null);if(!a.bd&&!a.Lb)throw new T(2,4,4002);}
881
- function Qs(a,b,c,d,e,f,g){function h(G){var L=(G-v)*u,N=L+b.Eb,M=L+n;L=M+u;var P=Math.min(L,l());M=new Fi(M,P,function(){var R=N*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(N)*BigInt(w));R=hs(A,C,G,null,y,R);return Nd(z(),[R])},0,null,d,B,n,l(),[],"",null,null,Gi,f);M.codecs=a.I.codecs;M.mimeType=a.I.mimeType;M.j=L;return M}function k(){var G=[Math.max(m.ib(),n),Math.min(m.Kb(),l())].map(function(L){return L-n});G=[Math.ceil(G[0]/u),Math.ceil(G[1]/u)-1];a.I.Ga&&G[1]++;return G.map(function(L){return L+
882
- v})}function l(){var G=null!=q&&e[q]||p;return G?n+G:Infinity}var m=a.presentationTimeline,n=a.ha.start,q=a.pa.id,p=a.ha.duration,u=b.Ka,v=b.md,w=b.timescale,A=b.Lb,y=a.bandwidth||null,C=a.I.id,z=a.I.Ca,B=n-b.Eb,D=k();c=a.rb?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var I=c;I<=g;++I){var F=h(I);D.push(F)}var K=new Kk(D);D=m.Kb()<l();I=m.U();if(D||I){var J=Math.max(c,g+1);c=u;a.I.Ga&&(c=.1);K.je(c,function(){var G=m.ib();K.Ma(G);var L=t(k());L.next();L=L.next().value;for(var N=[];J<=L;){var M=
883
- h(J);N.push(M);J++}return G>l()&&!N.length?null:N})}return Promise.resolve(K)}function Ns(a,b){var c=a.I.yc;c||(c=js(a,Ms,"initialization"));if(!c)return null;c=Dd(c);var d=a.I.id,e=a.bandwidth||null,f=a.I.Ca;b=new Ai(function(){var g=hs(c,d,null,null,e,null);return Nd(f(),[g])},0,null,zs(a),null,null,b);b.codecs=a.I.codecs;b.mimeType=a.I.mimeType;return b}
884
- function Ss(a,b,c,d,e,f,g,h,k,l){Kk.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.i=e;this.l=f;this.s=g;this.A=k;this.G=l;h&&Ts(this)}qa(Ss,Kk);r=Ss.prototype;r.getNumReferences=function(){return this.h?this.h.timeline.length:0};r.release=function(){Kk.prototype.release.call(this);this.h=null};
885
- r.Ma=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.getNumReferences()&&this.release())}};
886
- function Rs(a,b,c,d,e,f){Us(a,f);if(a.h){c=a.h.timeline;a.h.Lb!==b.Lb&&(a.h.Lb=b.Lb);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&Ts(a)}function Us(a,b){if(a.s!==b){a.s=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Ii(c,b)}}
887
- function Ts(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.Ma(a.i)}}r.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};
888
- r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.Ei,f=this.h.Pf+d.Qf;c=this.i-this.h.Eb;var g=this.i+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=[],n=(d.end-d.start)/d.vb,q={},p=0;p<d.vb;q={le:void 0,Tg:void 0},p++){var u=d.start+n*p,v=u+n;q.Tg=p+1;q.le=null;q=new Fi(this.i+u,this.i+v,function(w){return function(){if(!b.h)return[];
889
- null==w.le&&(w.le=Vs(b.h.Lb,b.F,e,b.B,f,w.Tg,b.C));return w.le}}(q),0,null,this.s,c,this.i,this.l,[],"",null,null,Gi,this.A);q.codecs=k;q.mimeType=l;0==this.G?0<p&&q.Qd():0!=p%this.G&&q.Qd();m.push(q)}c=new Fi(this.i+d.start,h,function(){return 0<d.vb||!b.h?[]:Vs(b.h.Lb,b.F,e,b.B,f,null,b.C)},0,null,this.s,c,this.i,this.l,m,"",null,null,Gi,this.A,0<d.vb);c.codecs=k;c.mimeType=l;c.j=g;this.g[a]=c}return c};
890
- function Vs(a,b,c,d,e,f,g){a=hs(a,b,c,f,d||null,e);return Nd(g(),[a]).map(function(h){return h.toString()})};function Ws(a){var b=le(a),c=b.split("/")[0];a=ne(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,od:null,colorGamut:null}}
891
- function Xs(a,b){function c(z){w=z.name;var B=z.reader;B.skip(24);var D=B.ia(),I=B.ia();B.skip(50);n=String(D);m=String(I);z.reader.la()&&Rg(z)}function d(z){var B=$i(z.reader);q=B.channelCount;p=B.sampleRate;e(z.name)}function e(z){z=z.toLowerCase();switch(z){case "avc1":case "avc3":g.push(z+".42E01E");k=!0;break;case "hev1":case "hvc1":g.push(z+".1.6.L93.90");k=!0;break;case "dvh1":case "dvhe":g.push(z+".05.04");k=!0;break;case "vp09":g.push(z+".00.10.08");k=!0;break;case "av01":g.push(z+".0.01M.08");
892
- k=!0;break;case "mp4a":f.push("mp4a.40.2");h=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":f.push(z),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,q=null,p=null,u=null,v=null,w;(new Kg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).R("mdhd",function(z){l=Yi(z.reader,z.version).language}).box("minf",Rg).box("stbl",Rg).R("stsd",Tg).box("mp4a",function(z){var B=$i(z.reader);q=B.channelCount;p=B.sampleRate;z.reader.la()?Rg(z):e(z.name)}).box("esds",function(z){z=z.reader;for(var B=
893
- "mp4a",D,I;z.la();){D=z.S();for(var F=z.S();F&128;)F=z.S();if(3==D)z.ia(),F=z.S(),F&128&&z.ia(),F&64&&z.skip(z.S()),F&32&&z.ia();else if(4==D)I=z.S(),z.skip(12);else if(5==D)break}I&&(B+="."+cj(I),5==D&&z.la()&&(D=z.S(),I=(D&248)>>3,31===I&&z.la()&&(I=32+((D&7)<<3)+((z.S()&224)>>5)),B+="."+I));f.push(B);h=!0}).box("ac-3",d).box("ec-3",d).box("ac-4",d).box("Opus",d).box("fLaC",d).box("avc1",c).box("avc3",c).box("hev1",c).box("hvc1",c).box("dva1",c).box("dvav",c).box("dvh1",c).box("dvhe",c).box("vp09",
894
- c).box("av01",c).box("avcC",function(z){var B=w||"";switch(w){case "dvav":B="avc3";break;case "dva1":B="avc1"}z=z.reader;z.skip(1);z=B+"."+cj(z.S())+cj(z.S())+cj(z.S());g.push(z);k=!0}).box("hvcC",function(z){var B=w||"";switch(w){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var D=z.reader;D.skip(1);z=D.S();var I=["","A","B","C"][z>>6],F=z&31,K=D.O(),J=(z&32)>>5?"H":"L";z=[D.S(),D.S(),D.S(),D.S(),D.S(),D.S()];D=D.S();for(var G=0,L=0;32>L;L++){G|=K&1;if(31==L)break;G<<=1;K>>=1}B=B+("."+I+F)+("."+
895
- cj(G,!0));B+="."+J+D;I="";for(F=z.length;F--;)if((J=z[F])||I)I="."+J.toString(16).toUpperCase()+I;B+=I;g.push(B);k=!0}).box("dvcC",function(z){var B=w||"";switch(w){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav"}var D=z.reader;D.skip(2);z=D.S();D=D.S();g.push(B+"."+dj(z>>1&127)+"."+dj(z<<5&32|D>>3&31));k=!0}).R("vpcC",function(z){var B=w||"",D=z.reader;z=D.S();var I=D.S();D=D.S()>>4&15;g.push(B+"."+dj(z)+"."+dj(I)+"."+dj(D));k=!0}).box("av1C",
896
- function(z){var B=w||"",D=z.reader;D.skip(1);z=D.S();D=D.S();var I=z>>>5,F=(D&64)>>6;g.push(B+"."+I+"."+dj(z&31)+(D>>>7?"H":"M")+"."+dj(2===I&&F?(D&32)>>5?12:10:F?10:8)+"."+((D&16)>>4)+"."+((D&8)>>3)+((D&4)>>2)+(D&3)+"."+dj(1)+"."+dj(1)+"."+dj(1)+".0");k=!0}).box("enca",Vg).box("encv",Ug).box("sinf",Rg).box("frma",function(z){z=aj(z.reader).codec;e(z)}).box("colr",function(z){g=g.map(function(I){if(I.startsWith("av01.")){var F=z.reader,K=F.ra(),J=F.mb(4);var G=String.fromCharCode(J[0]);G+=String.fromCharCode(J[1]);
897
- G+=String.fromCharCode(J[2]);G+=String.fromCharCode(J[3]);if("nclx"===G){J=F.ia();G=F.ia();var L=F.ia(),N=F.S()>>7,M=I.split(".");10==M.length&&(M[6]=dj(J),M[7]=dj(G),M[8]=dj(L),M[9]=String(N),I=M.join("."))}F.seek(K)}return I});var B=bj(z.reader),D=B.colorGamut;u=B.od;v=D}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,y=new Map;if(k){var C=new Hb("video/mp4");a&&C.init(a);C.i(b);a=t(C.j());for(b=a.next();!b.done;b=a.next())b=b.value,y.set(b,b);C.g()}return{type:A?"audio":"video",
898
- mimeType:A?"audio/mp4":"video/mp4",codecs:Ys(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:q,sampleRate:p,closedCaptions:y,od:u,colorGamut:v}}function Ys(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=ke(d);b.has(e)||(c.push(d),b.add(e))}b=Ud("audio",c);d=Ud("video",c);a=Ud(Td,c);d=Zs(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
899
- function Zs(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")});return b?mb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}function $s(a){var b=null;(new Kg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).box("minf",Rg).box("stbl",Rg).R("stsd",Tg).box("encv",Ug).box("enca",Vg).box("sinf",Rg).box("schi",Rg).R("tenc",function(c){c=c.reader;c.S();c.S();c.S();c.S();b=Ld(c.mb(16))}).parse(a,!0);return b};function at(a){this.o=null;this.A=a;this.G=new kg;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}at.prototype.configure=function(a){this.o=a};at.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};at.prototype.setManifestType=function(a){this.s=a};
900
- function bt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Nd(a.i,[ct(a,b)]),d=rg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),lg(a.G,e),xa(l,2),E(l,e.promise,4);if(2!=l.g)return f=l.h,g=wd(f.data),h=JSON.parse(g),1==h.VERSION&&dt(a,h,f.uri),za(l,0);if((k=Aa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Tc(function(){bt(a,b)});a.g.X(a.C);H(l)})}
901
- function ct(a,b){if(!a.m.length)return b;b=new sc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Ic(e)&&wc(b,e);return b.toString()}function dt(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Tc(function(){bt(a,d)});if(c=b.TTL)a.C=c;a.g.X(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
902
- function et(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}at.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
903
- function ft(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Cc:void 0},f=e.next())if(g.Cc=f.value,f=b.get(g.Cc))d.push({pf:g.Cc,location:f});else if(f=a.F.find(function(k){return function(l){return l.hj==k.Cc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].ah?(h=new sc(h),uc(h,f["URI-REPLACEMENT"].ah),d.push({pf:g.Cc,location:h.toString()})):d.push({pf:g.Cc,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
904
- h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new sc(k.location)).yb))return!1;return!0});d.length&&(a.B=d[0].pf);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(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Nd(a.i,d)};function gt(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.s=this.o=!1;this.m=new Set}r=gt.prototype;r.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=[]};r.Sh=function(){return this.j};r.Te=function(){return this.l.slice()};r.zh=function(){return this.i};
905
- function ht(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[it(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[jt(n),n]})),l=new Map(h.textStreams.map(function(n){return[kt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[lt(n),n]}));if(b){var m=mt(Td);l.set(kt(m),m);m=mt("image");h.set(lt(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Xf:c,Yg:d,Ug:e,og:f}}
906
- r.we=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L,N,M,P,R,Q;return O(function(ea){if(1==ea.g){e=Vd;if(!b&&1==a.length)return f=ht(a,!1),g=f.Xf,h=f.Yg,k=f.Ug,l=f.og,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.l=Array.from(k[0].values()),d.i=Array.from(l[0].values()),ea.u(2);m=c?d.m.size:0;n=-1;for(q=0;q<a.length;q++)p=a[q],d.m.has(p.id)||(d.m.add(p.id),-1==n&&(n=q));if(-1==n)return ea.return();u=ht(a,!0);v=u.Xf;w=u.Yg;A=u.Ug;y=u.og;
907
- return E(ea,Promise.all([nt(d,d.h,v,n,ot,pt,m),nt(d,d.g,w,n,ot,pt,m),nt(d,d.l,A,n,ot,pt,m),nt(d,d.i,y,n,ot,pt,m)]),2)}C=0;z=[];if(d.g.length&&d.h.length)for(J=t(d.h),G=J.next();!G.done;G=J.next())for(L=G.value,N=t(d.g),M=N.next();!M.done;M=N.next())P=M.value,R=Mc(L.drmInfos,P.drmInfos),L.drmInfos.length&&P.drmInfos.length&&!R.length||(Q=C++,z.push({id:Q,language:L.language,disabledUntilTime:0,primary:L.primary,audio:L,video:P,bandwidth:(L.bandwidth||0)+(P.bandwidth||0),drmInfos:R,allowedByApplication:!0,
858
+ function hs(a,b){var c=is(a,b,"timescale"),d=1;c&&(d=th(c)||1);c=is(a,b,"duration");(c=th(c||""))&&(c/=d);var e=is(a,b,"startNumber"),f=Number(is(a,b,"presentationTimeOffset"))||0,g=uh(e||"");if(null==e||null==g)g=1;e=null;if(b=js(a,b,"SegmentTimeline")){b=fh(b,"S");e=d;a=a.ha.duration||Infinity;for(var h=g,k=[],l=-f,m=0;m<b.length;++m){var n=b[m],q=b[m+1],p=mh(n,"t",uh),u=mh(n,"d",uh),v=mh(n,"r",sh);n=mh(n,"k",sh)||0;null!=p&&(p-=f);if(u){p=null!=p?p:l;v=v||0;if(0>v)if(q){q=mh(q,"t",uh);if(null==
859
+ q)break;else if(p>=q)break;v=Math.ceil((q-p)/u)-1}else{if(Infinity==a)break;else if(p/e>=a)break;v=Math.ceil((a*e-p)/u)-1}0<k.length&&p!=l&&(k[k.length-1].end=p/e);for(q=0;q<=v;++q)l=p+u,k.push({start:p/e,end:l/e,Qf:p,vb:n,Di:k.length+h}),p=l}}e=k}return{timescale:d,Ja:c,md:g,Eb:f/d||0,Pf:f,timeline:e}}function ks(a,b){return[b(a.I),b(a.ka),b(a.pa)].filter(ze)}function is(a,b,c){b=ks(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
860
+ function js(a,b,c){b=ks(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=jh(d.value,c));d=b.next());return a}
861
+ function ls(a,b,c,d,e,f){for(var g=nh(a,"http://www.w3.org/1999/xlink","href"),h=nh(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=bh("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return bg(new T(2,4,4028));if("onLoad"!=h)return bg(new T(2,4,4027));var q=Nd([d],[g]);return e.request(0,rg(q,b)).za(function(p){p=Zg(p.data,a.tagName);if(!p)return bg(new T(2,4,4001,g));for(a.children=
862
+ [];p.children.length;){var u=p.children.shift();u.tagName&&(u.parent=a);a.children.push(u)}u=t(Object.keys(p.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=p.attributes[v];return ms(a,b,c,q[0],e,f+1)})}
863
+ function ms(a,b,c,d,e,f){f=void 0===f?0:f;if(nh(a,"http://www.w3.org/1999/xlink","href")){var g=ls(a,b,c,d,e,f);c&&(g=g.za(void 0,function(){return ms(a,b,c,d,e,f)}));return g}g=[];for(var h=t(eh(a)),k=h.next(),l={};!k.done;l={Kc:void 0},k=h.next())l.Kc=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==nh(l.Kc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Kc}}(l)):"SegmentTimeline"!=l.Kc.tagName&&g.push(ms(l.Kc,b,c,d,e,f));return fg(g).za(function(){return a})}
864
+ ;function ns(a,b,c,d,e,f,g){var h,k=(new Kg).P("sidx",function(l){h=os(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
865
+ function os(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.O();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.O();var m=g.reader.O()}else l=g.reader.Ec(),m=g.reader.Ec();g.reader.skip(2);var n=g.reader.ia();a=a+g.size+m;for(m=0;m<n;m++){var q=g.reader.O(),p=(q&2147483648)>>>31;q&=2147483647;var u=g.reader.O();g.reader.skip(4);if(1==p)throw new T(2,3,3006);h.push(new Fi(l/k+c,(l+u)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=u;a+=q}g.parser.stop();return h};function ps(a){this.h=Fb(a);this.g=new Hg(this.h,0)}ps.prototype.la=function(){return this.g.la()};
866
+ function qs(a){var b=rs(a);if(7<b.length)throw new T(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=rs(a);a:{d=t(ss);for(var e=d.next();!e.done;e=d.next())if(zb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ra();else{if(8==b.length&&b[1]&224)throw new T(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.ra()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ra();d=Fb(a.h,a.g.ra(),b);a.g.skip(b);return new ts(c,
867
+ d)}function rs(a){var b=a.g.ra(),c=a.g.R();if(0==c)throw new T(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Bb(a.h,b,c)}var ss=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function ts(a,b){this.id=a;this.g=b}
868
+ function us(a){if(8<a.g.byteLength)throw new T(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new T(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 vs(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new ps(a.g);for(var n=null,q=null;a.la();){var p=qs(a);if(187==p.id){var u=ws(p);u&&(p=c*u.Pi,u=b+u.ti,null!=n&&m.push(new Fi(n+g,p+g,l,q,u-1,f,g,h,k)),n=p,q=u)}}null!=n&&m.push(new Fi(n+g,d+g,l,q,null,f,g,h,k));return m}
869
+ function ws(a){var b=new ps(a.g);a=qs(b);if(179!=a.id)throw new T(2,3,3013);a=us(a);b=qs(b);if(183!=b.id)throw new T(2,3,3012);b=new ps(b.g);for(var c=0;b.la();){var d=qs(b);if(241==d.id){c=us(d);break}}return{Pi:a,ti:c}};function xs(a,b,c){b=js(a,b,"Initialization");if(!b)return null;var d=a.I.Ca(),e=b.attributes.sourceURL;e&&(d=Nd(d,[Dd(e)]));e=0;var f=null;if(b=mh(b,"range",rh))e=b.start,f=b.end;c=new Ai(function(){return d},e,f,ys(a),null,null,c);c.codecs=a.I.codecs;c.mimeType=a.I.mimeType;return c}
870
+ function zs(a,b,c){var d=Number(is(a,As,"presentationTimeOffset"))||0,e=is(a,As,"timescale"),f=1;e&&(f=th(e)||1);var g=d/f||0,h=xs(a,As,c);Bs(a,h);var k=Le(a);return{Tb:function(){var l=js(k,As,"RepresentationIndex");var m=k.I.Ca();l&&(l=Dd(l.attributes.sourceURL))&&(m=Nd(m,[l]));l=Cs(k);return Ds(k,b,h,m,l.start,l.end,g)}}}
871
+ function Ds(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F;return O(function(K){if(1==K.g)return h=a.presentationTimeline,k=!a.rb||!a.ha.dd,l=a.ha.start,m=a.ha.duration,n=a.I.mimeType.split("/")[1],q=b,p=null,u=[q(d,e,f,!1),"webm"==n?q(c.M(),c.Da,c.oa,!0):null],q=null,E(K,Promise.all(u),2);v=K.h;w=v[0];A=v[1]||null;y=null;C=l-g;z=l;B=m?l+m:Infinity;if("mp4"==n)var J=ns(w,e,d,c,C,z,B);else{J=w;var G=new ps(A);if(440786851!=qs(G).id)throw new T(2,3,3008);var L=qs(G);if(408125543!=L.id)throw new T(2,
872
+ 3,3009);G=L.g.byteOffset;L=new ps(L.g);for(var N=null;L.la();){var M=qs(L);if(357149030==M.id){N=M;break}}if(!N)throw new T(2,3,3010);N=new ps(N.g);M=1E6;for(L=null;N.la();){var P=qs(N);if(2807729==P.id)M=us(P);else if(17545==P.id)if(4==P.g.byteLength)L=P.g.getFloat32(0);else if(8==P.g.byteLength)L=P.g.getFloat64(0);else throw new T(2,3,3003);}if(null==L)throw new T(2,3,3011);N=M/1E9;L*=N;J=qs(new ps(J));if(475249515!=J.id)throw new T(2,3,3007);J=vs(J,G,N,L,d,c,C,z,B)}y=J;D=t(y);for(I=D.next();!I.done;I=
873
+ D.next())F=I.value,F.codecs=a.I.codecs,F.mimeType=a.I.mimeType;h.hd(y);p=new Kk(y);k&&p.tc(z,B,!0);return K.return(p)})}function As(a){return a.Hc}function Cs(a){var b=js(a,As,"RepresentationIndex");a=is(a,As,"indexRange");a=rh(a||"");b&&(a=mh(b,"range",rh,a));return a}function Bs(a,b){Es(a,b);if(!Cs(a))throw new T(2,4,4002);}function Es(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=Td&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
874
+ function ys(a){var b=a.I;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.Ac,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Fs(a,b,c){var d=xs(a,Gs,c),e=Hs(a);if(!e.Ja&&!e.timeline&&1<e.zc.length)throw new T(2,4,4002);if(!e.Ja&&!a.ha.duration&&!e.timeline&&1==e.zc.length)throw new T(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new T(2,4,4002);var f=null,g=null;a.pa.id&&a.I.id&&(g=b[a.pa.id+","+a.I.id])&&(f=g.segmentIndex);var h=Is(a.ha.start,a.ha.duration,a.I.Ca,e,d,c,a.I.mimeType,a.I.codecs);b=!f;f?f.gd(h,a.presentationTimeline.ib()):f=new Kk(h);a.presentationTimeline.hd(h);a.rb&&a.ha.dd||f.tc(a.ha.start,
875
+ a.ha.duration?a.ha.start+a.ha.duration:Infinity,b);g&&(g.segmentIndex=f);return{Tb:function(){f&&0!=f.getNumReferences()||f.Sd(h);return Promise.resolve(f)}}}function Gs(a){return a.Fb}function Hs(a){var b=Js(a);a=hs(a,Gs);var c=a.md;0==c&&(c=1);var d=0;a.Ja?d=a.Ja*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Ja:a.Ja,startTime:d,md:c,Eb:a.Eb,timeline:a.timeline,zc:b}}
876
+ function Is(a,b,c,d,e,f,g,h){var k=d.zc.length;d.timeline&&d.timeline.length!=d.zc.length&&(k=Math.min(d.timeline.length,d.zc.length));for(var l=a-d.Eb,m=b?a+b:Infinity,n=[],q=d.startTime,p={},u=0;u<k;p={ke:void 0,ge:void 0},u++){p.ge=d.zc[u];var v=q;q=void 0;q=null!=d.Ja?v+d.Ja:d.timeline?d.timeline[u].end:v+b;p.ke=null;p=new Fi(a+v,a+q,function(w){return function(){null==w.ke&&(w.ke=Nd(c(),[w.ge.ji]));return w.ke}}(p),p.ge.start,p.ge.end,e,l,a,m,[],"",null,null,Gi,f);p.codecs=h;p.mimeType=g;n.push(p)}return n}
877
+ function Js(a){return[a.I.Fb,a.ka.Fb,a.pa.Fb].filter(ze).map(function(b){return fh(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.Ve&&(a.Ve=!0);var c=Dd(b.attributes.media);b=mh(b,"mediaRange",rh,{start:0,end:null});return{ji:c,start:b.start,end:b.end}})};function Ks(a,b,c,d,e,f,g,h,k){k||a.I.yc||(a.I.yc=is(a,Ls,"initialization"));var l=a.I.yc?Ms(a,g):null,m=Ns(a);Os(m);var n=Le(a);if(m.bd)return Es(a,l),{Tb:function(){var w=gs(m.bd,n.I.id,null,null,n.bandwidth||null,null);w=Nd(n.I.Ca(),[w]);return Ds(n,b,l,w,0,null,m.Eb)}};if(m.Ja)return d||"image"===a.ka.contentType||(a.presentationTimeline.hf(m.Ja),a.presentationTimeline.Wd(a.ha.start)),{Tb:function(){return Ps(n,m,e,l,f,g,h)}};var q=null;d=d=null;a.pa.id&&a.I.id&&(d=a.pa.id+","+a.I.id,d=c[d])&&
878
+ (q=d.segmentIndex);var p=a.ha.start,u=a.ha.duration?p+a.ha.duration:Infinity,v=!(a.rb&&a.ha.dd);q?(c=q,Qs(c,m,p,u,v,l),c.La(a.presentationTimeline.ib())):q=new Rs(m,a.I.id,a.bandwidth,a.I.Ca,p,u,l,v,g,a.I.yf);m.timeline&&"image"!==a.ka.contentType&&a.presentationTimeline.xg(m.timeline,p);d&&a.rb&&(d.segmentIndex=q);return{Tb:function(){q instanceof Rs&&0==q.getNumReferences()&&Qs(q,m,p,u,v,l);return Promise.resolve(q)}}}function Ls(a){return a.Nb}
879
+ function Ns(a){var b=hs(a,Ls),c=is(a,Ls,"media"),d=is(a,Ls,"index");return{Ja:b.Ja,timescale:b.timescale,md:b.md,Eb:b.Eb,Pf:b.Pf,timeline:b.timeline,Lb:c&&Dd(c),bd:d,mimeType:a.I.mimeType,codecs:a.I.codecs}}function Os(a){var b=a.bd?1:0;b+=a.timeline?1:0;b+=a.Ja?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.bd&&(a.timeline=null),a.Ja=null);if(!a.bd&&!a.Lb)throw new T(2,4,4002);}
880
+ function Ps(a,b,c,d,e,f,g){function h(G){var L=(G-v)*u,N=L+b.Eb,M=L+n;L=M+u;var P=Math.min(L,l());M=new Fi(M,P,function(){var R=N*w;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(N)*BigInt(w));R=gs(A,C,G,null,y,R);return Nd(z(),[R])},0,null,d,B,n,l(),[],"",null,null,Gi,f);M.codecs=a.I.codecs;M.mimeType=a.I.mimeType;M.j=L;return M}function k(){var G=[Math.max(m.ib(),n),Math.min(m.Kb(),l())].map(function(L){return L-n});G=[Math.ceil(G[0]/u),Math.ceil(G[1]/u)-1];a.I.Ga&&G[1]++;return G.map(function(L){return L+
881
+ v})}function l(){var G=null!=q&&e[q]||p;return G?n+G:Infinity}var m=a.presentationTimeline,n=a.ha.start,q=a.pa.id,p=a.ha.duration,u=b.Ja,v=b.md,w=b.timescale,A=b.Lb,y=a.bandwidth||null,C=a.I.id,z=a.I.Ca,B=n-b.Eb,D=k();c=a.rb?Math.max(D[0],D[1]-c+1):D[0];g=g||D[1];D=[];for(var I=c;I<=g;++I){var F=h(I);D.push(F)}var K=new Kk(D);D=m.Kb()<l();I=m.U();if(D||I){var J=Math.max(c,g+1);c=u;a.I.Ga&&(c=.1);K.je(c,function(){var G=m.ib();K.La(G);var L=t(k());L.next();L=L.next().value;for(var N=[];J<=L;){var M=
882
+ h(J);N.push(M);J++}return G>l()&&!N.length?null:N})}return Promise.resolve(K)}function Ms(a,b){var c=a.I.yc;c||(c=is(a,Ls,"initialization"));if(!c)return null;c=Dd(c);var d=a.I.id,e=a.bandwidth||null,f=a.I.Ca;b=new Ai(function(){var g=gs(c,d,null,null,e,null);return Nd(f(),[g])},0,null,ys(a),null,null,b);b.codecs=a.I.codecs;b.mimeType=a.I.mimeType;return b}
883
+ function Rs(a,b,c,d,e,f,g,h,k,l){Kk.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.i=e;this.l=f;this.s=g;this.A=k;this.G=l;h&&Ss(this)}qa(Rs,Kk);r=Rs.prototype;r.getNumReferences=function(){return this.h?this.h.timeline.length:0};r.release=function(){Kk.prototype.release.call(this);this.h=null};
884
+ r.La=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.getNumReferences()&&this.release())}};
885
+ function Qs(a,b,c,d,e,f){Ts(a,f);if(a.h){c=a.h.timeline;a.h.Lb!==b.Lb&&(a.h.Lb=b.Lb);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.start>=g.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.i=c,a.l=d;e&&Ss(a)}function Ts(a,b){if(a.s!==b){a.s=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Ii(c,b)}}
886
+ function Ss(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.La(a.i)}}r.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};
887
+ r.get=function(a){var b=this;a-=this.j;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.Di,f=this.h.Pf+d.Qf;c=this.i-this.h.Eb;var g=this.i+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=[],n=(d.end-d.start)/d.vb,q={},p=0;p<d.vb;q={le:void 0,Tg:void 0},p++){var u=d.start+n*p,v=u+n;q.Tg=p+1;q.le=null;q=new Fi(this.i+u,this.i+v,function(w){return function(){if(!b.h)return[];
888
+ null==w.le&&(w.le=Us(b.h.Lb,b.F,e,b.B,f,w.Tg,b.C));return w.le}}(q),0,null,this.s,c,this.i,this.l,[],"",null,null,Gi,this.A);q.codecs=k;q.mimeType=l;0==this.G?0<p&&q.Qd():0!=p%this.G&&q.Qd();m.push(q)}c=new Fi(this.i+d.start,h,function(){return 0<d.vb||!b.h?[]:Us(b.h.Lb,b.F,e,b.B,f,null,b.C)},0,null,this.s,c,this.i,this.l,m,"",null,null,Gi,this.A,0<d.vb);c.codecs=k;c.mimeType=l;c.j=g;this.g[a]=c}return c};
889
+ function Us(a,b,c,d,e,f,g){a=gs(a,b,c,f,d||null,e);return Nd(g(),[a]).map(function(h){return h.toString()})};function Vs(a){var b=le(a),c=b.split("/")[0];a=ne(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,od:null,colorGamut:null}}
890
+ function Ws(a,b){function c(z){w=z.name;var B=z.reader;B.skip(24);var D=B.ia(),I=B.ia();B.skip(50);n=String(D);m=String(I);z.reader.la()&&Rg(z)}function d(z){var B=$i(z.reader);q=B.channelCount;p=B.sampleRate;e(z.name)}function e(z){z=z.toLowerCase();switch(z){case "avc1":case "avc3":g.push(z+".42E01E");k=!0;break;case "hev1":case "hvc1":g.push(z+".1.6.L93.90");k=!0;break;case "dvh1":case "dvhe":g.push(z+".05.04");k=!0;break;case "vp09":g.push(z+".00.10.08");k=!0;break;case "av01":g.push(z+".0.01M.08");
891
+ k=!0;break;case "mp4a":f.push("mp4a.40.2");h=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":f.push(z),h=!0}}var f=[],g=[],h=!1,k=!1,l=null,m=null,n=null,q=null,p=null,u=null,v=null,w;(new Kg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).P("mdhd",function(z){l=Yi(z.reader,z.version).language}).box("minf",Rg).box("stbl",Rg).P("stsd",Tg).box("mp4a",function(z){var B=$i(z.reader);q=B.channelCount;p=B.sampleRate;z.reader.la()?Rg(z):e(z.name)}).box("esds",function(z){z=z.reader;for(var B=
892
+ "mp4a",D,I;z.la();){D=z.R();for(var F=z.R();F&128;)F=z.R();if(3==D)z.ia(),F=z.R(),F&128&&z.ia(),F&64&&z.skip(z.R()),F&32&&z.ia();else if(4==D)I=z.R(),z.skip(12);else if(5==D)break}I&&(B+="."+cj(I),5==D&&z.la()&&(D=z.R(),I=(D&248)>>3,31===I&&z.la()&&(I=32+((D&7)<<3)+((z.R()&224)>>5)),B+="."+I));f.push(B);h=!0}).box("ac-3",d).box("ec-3",d).box("ac-4",d).box("Opus",d).box("fLaC",d).box("avc1",c).box("avc3",c).box("hev1",c).box("hvc1",c).box("dva1",c).box("dvav",c).box("dvh1",c).box("dvhe",c).box("vp09",
893
+ c).box("av01",c).box("avcC",function(z){var B=w||"";switch(w){case "dvav":B="avc3";break;case "dva1":B="avc1"}z=z.reader;z.skip(1);z=B+"."+cj(z.R())+cj(z.R())+cj(z.R());g.push(z);k=!0}).box("hvcC",function(z){var B=w||"";switch(w){case "dvh1":B="hvc1";break;case "dvhe":B="hev1"}var D=z.reader;D.skip(1);z=D.R();var I=["","A","B","C"][z>>6],F=z&31,K=D.O(),J=(z&32)>>5?"H":"L";z=[D.R(),D.R(),D.R(),D.R(),D.R(),D.R()];D=D.R();for(var G=0,L=0;32>L;L++){G|=K&1;if(31==L)break;G<<=1;K>>=1}B=B+("."+I+F)+("."+
894
+ cj(G,!0));B+="."+J+D;I="";for(F=z.length;F--;)if((J=z[F])||I)I="."+J.toString(16).toUpperCase()+I;B+=I;g.push(B);k=!0}).box("dvcC",function(z){var B=w||"";switch(w){case "hvc1":B="dvh1";break;case "hev1":B="dvhe";break;case "avc1":B="dva1";break;case "avc3":B="dvav"}var D=z.reader;D.skip(2);z=D.R();D=D.R();g.push(B+"."+dj(z>>1&127)+"."+dj(z<<5&32|D>>3&31));k=!0}).P("vpcC",function(z){var B=w||"",D=z.reader;z=D.R();var I=D.R();D=D.R()>>4&15;g.push(B+"."+dj(z)+"."+dj(I)+"."+dj(D));k=!0}).box("av1C",
895
+ function(z){var B=w||"",D=z.reader;D.skip(1);z=D.R();D=D.R();var I=z>>>5,F=(D&64)>>6;g.push(B+"."+I+"."+dj(z&31)+(D>>>7?"H":"M")+"."+dj(2===I&&F?(D&32)>>5?12:10:F?10:8)+"."+((D&16)>>4)+"."+((D&8)>>3)+((D&4)>>2)+(D&3)+"."+dj(1)+"."+dj(1)+"."+dj(1)+".0");k=!0}).box("enca",Vg).box("encv",Ug).box("sinf",Rg).box("frma",function(z){z=aj(z.reader).codec;e(z)}).box("colr",function(z){g=g.map(function(I){if(I.startsWith("av01.")){var F=z.reader,K=F.ra(),J=F.mb(4);var G=String.fromCharCode(J[0]);G+=String.fromCharCode(J[1]);
896
+ G+=String.fromCharCode(J[2]);G+=String.fromCharCode(J[3]);if("nclx"===G){J=F.ia();G=F.ia();var L=F.ia(),N=F.R()>>7,M=I.split(".");10==M.length&&(M[6]=dj(J),M[7]=dj(G),M[8]=dj(L),M[9]=String(N),I=M.join("."))}F.seek(K)}return I});var B=bj(z.reader),D=B.colorGamut;u=B.od;v=D}).parse(a||b,!0);if(!f.length&&!g.length)return null;var A=h&&!k,y=new Map;if(k){var C=new Hb("video/mp4");a&&C.init(a);C.i(b);a=t(C.j());for(b=a.next();!b.done;b=a.next())b=b.value,y.set(b,b);C.g()}return{type:A?"audio":"video",
897
+ mimeType:A?"audio/mp4":"video/mp4",codecs:Xs(f.concat(g)).join(", "),language:l,height:m,width:n,channelCount:q,sampleRate:p,closedCaptions:y,od:u,colorGamut:v}}function Xs(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=ke(d);b.has(e)||(c.push(d),b.add(e))}b=Ud("audio",c);d=Ud("video",c);a=Ud(Td,c);d=Ys(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
898
+ function Ys(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")});return b?mb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}function Zs(a){var b=null;(new Kg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).box("minf",Rg).box("stbl",Rg).P("stsd",Tg).box("encv",Ug).box("enca",Vg).box("sinf",Rg).box("schi",Rg).P("tenc",function(c){c=c.reader;c.R();c.R();c.R();c.R();b=Ld(c.mb(16))}).parse(a,!0);return b};function $s(a){this.o=null;this.A=a;this.G=new kg;this.i=[];this.h=null;this.m=[];this.B=null;this.F=[];this.C=300;this.l=new Map;this.j=new Map;this.g=null;this.s="UNKNOWN"}$s.prototype.configure=function(a){this.o=a};$s.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};$s.prototype.setManifestType=function(a){this.s=a};
899
+ function at(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g)return c=Nd(a.i,[bt(a,b)]),d=rg(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),lg(a.G,e),xa(l,2),E(l,e.promise,4);if(2!=l.g)return f=l.h,g=wd(f.data),h=JSON.parse(g),1==h.VERSION&&ct(a,h,f.uri),za(l,0);if((k=Aa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new Tc(function(){at(a,b)});a.g.X(a.C);H(l)})}
900
+ function bt(a,b){if(!a.m.length)return b;b=new sc(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Ic(e)&&wc(b,e);return b.toString()}function ct(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new Tc(function(){at(a,d)});if(c=b.TTL)a.C=c;a.g.X(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
901
+ function dt(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}$s.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
902
+ function et(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Cc:void 0},f=e.next())if(g.Cc=f.value,f=b.get(g.Cc))d.push({pf:g.Cc,location:f});else if(f=a.F.find(function(k){return function(l){return l.gj==k.Cc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].ah?(h=new sc(h),uc(h,f["URI-REPLACEMENT"].ah),d.push({pf:g.Cc,location:h.toString()})):d.push({pf:g.Cc,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
903
+ h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new sc(k.location)).yb))return!1;return!0});d.length&&(a.B=d[0].pf);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(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Nd(a.i,d)};function ft(){this.j=[];this.h=[];this.g=[];this.l=[];this.i=[];this.s=this.o=!1;this.m=new Set}r=ft.prototype;r.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=[]};r.Rh=function(){return this.j};r.Te=function(){return this.l.slice()};r.yh=function(){return this.i};
904
+ function gt(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[ht(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[it(n),n]})),l=new Map(h.textStreams.map(function(n){return[jt(n),n]}));h=new Map(h.imageStreams.map(function(n){return[kt(n),n]}));if(b){var m=lt(Td);l.set(jt(m),m);m=lt("image");h.set(kt(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Xf:c,Yg:d,Ug:e,og:f}}
905
+ r.we=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L,N,M,P,R,Q;return O(function(ea){if(1==ea.g){e=Vd;if(!b&&1==a.length)return f=gt(a,!1),g=f.Xf,h=f.Yg,k=f.Ug,l=f.og,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.l=Array.from(k[0].values()),d.i=Array.from(l[0].values()),ea.u(2);m=c?d.m.size:0;n=-1;for(q=0;q<a.length;q++)p=a[q],d.m.has(p.id)||(d.m.add(p.id),-1==n&&(n=q));if(-1==n)return ea.return();u=gt(a,!0);v=u.Xf;w=u.Yg;A=u.Ug;y=u.og;
906
+ return E(ea,Promise.all([mt(d,d.h,v,n,nt,ot,m),mt(d,d.g,w,n,nt,ot,m),mt(d,d.l,A,n,nt,ot,m),mt(d,d.i,y,n,nt,ot,m)]),2)}C=0;z=[];if(d.g.length&&d.h.length)for(J=t(d.h),G=J.next();!G.done;G=J.next())for(L=G.value,N=t(d.g),M=N.next();!M.done;M=N.next())P=M.value,R=Mc(L.drmInfos,P.drmInfos),L.drmInfos.length&&P.drmInfos.length&&!R.length||(Q=C++,z.push({id:Q,language:L.language,disabledUntilTime:0,primary:L.primary,audio:L,video:P,bandwidth:(L.bandwidth||0)+(P.bandwidth||0),drmInfos:R,allowedByApplication:!0,
908
907
  allowedByKeySystem:!0,decodingInfos:[]}));else for(B=d.g.length?d.g:d.h,D=t(B),I=D.next();!I.done;I=D.next())F=I.value,K=C++,z.push({id:K,language:F.language,disabledUntilTime:0,primary:F.primary,audio:F.type==e.V?F:null,video:F.type==e.ea?F:null,bandwidth:F.bandwidth||0,drmInfos:F.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.j=z;H(ea)})};
909
- function qt(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L,N,M;return O(function(P){switch(P.g){case 1:b=Vd;if(1==a.length)return P.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.V}).map(function(Q){return[it(Q),Q]}))});d=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ea}).map(function(Q){return[jt(Q),Q]}))});e=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.qa}).map(function(Q){return[kt(Q),Q]}))});
910
- f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.qe}).map(function(Q){return[lt(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=rt(b.qa),k.set(kt(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())q=n.value,p=rt(b.qe),q.set(lt(p),p);u=new gt;return E(P,nt(u,[],c,0,st,tt,0),2);case 2:return v=P.h,E(P,nt(u,[],d,0,st,tt,0),3);case 3:return w=P.h,E(P,nt(u,[],e,0,st,tt,0),4);case 4:return A=P.h,E(P,nt(u,[],f,0,st,tt,0),5);case 5:y=P.h;C=0;if(w.length&&v.length)for(F=
908
+ function pt(a){var b,c,d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L,N,M;return O(function(P){switch(P.g){case 1:b=Vd;if(1==a.length)return P.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.V}).map(function(Q){return[ht(Q),Q]}))});d=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ea}).map(function(Q){return[it(Q),Q]}))});e=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.qa}).map(function(Q){return[jt(Q),Q]}))});
909
+ f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.qe}).map(function(Q){return[kt(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=qt(b.qa),k.set(jt(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())q=n.value,p=qt(b.qe),q.set(kt(p),p);u=new ft;return E(P,mt(u,[],c,0,rt,st,0),2);case 2:return v=P.h,E(P,mt(u,[],d,0,rt,st,0),3);case 3:return w=P.h,E(P,mt(u,[],e,0,rt,st,0),4);case 4:return A=P.h,E(P,mt(u,[],f,0,rt,st,0),5);case 5:y=P.h;C=0;if(w.length&&v.length)for(F=
911
910
  t(v),K=F.next();!K.done;K=F.next())for(J=K.value,G=t(w),L=G.next();!L.done;L=G.next())N=L.value,M=C++,N.variantIds.push(M),J.variantIds.push(M);else for(z=w.concat(v),B=t(z),D=B.next();!D.done;D=B.next())I=D.value,I.variantIds=[C++];return P.return(w.concat(v).concat(A).concat(y))}})}
912
- function nt(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J;return O(function(G){switch(G.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){G.u(4);break}n=m.value;return E(G,ut(a,n,c,d,f,h,g),5);case 5:q=G.h;if(!q)throw new T(2,4,4037);m=l.next();G.u(2);break;case 4:p=t(h);for(u=p.next();!u.done;u=p.next())for(v=u.value,w=t(v),A=w.next();!A.done;A=w.next())y=A.value,(C=vt(a,y,c,e,f,h))&&b.push(C);z=t(h);for(B=z.next();!B.done;B=
913
- z.next())for(D=B.value,I=t(D),F=I.next(),K={};!F.done;K={Gf:void 0},F=I.next())if(K.Gf=F.value,!wt(K.Gf)&&(J=b.some(function(L){return function(N){return xt(a,L.Gf,N)}}(K))))throw new T(2,4,4037);return G.return(b)}})}function ut(a,b,c,d,e,f,g){return O(function(h){if(1==h.g)return yt(a,c,b,0<g),b.matchedStreams?b.segmentIndex?E(h,zt(b,d+g),2):h.u(2):h.return(!1);At(b,d,e,f,g);return h.return(!0)})}
914
- function zt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return E(l,Promise.all(c),2)}if(a.segmentIndex instanceof Nk)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);H(l)})}
915
- function vt(a,b,c,d,e,f){if(wt(b))return null;var g=d(b);yt(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return O(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new Nk;return E(h,zt(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;At(g,0,e,f,0);return g}
916
- function At(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;"audio"==a.type&&0==Ge(a.language,g.language)&&(h=!1);if(h&&(d[b-e].delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
917
- function ot(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
918
- function st(a){a=Object.assign({},a);a.roles=a.roles.slice();a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
919
- function pt(a,b){function c(g,h){g||(g=[]);h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=t(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");d=Mc(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new T(2,4,4038);a.drmInfos=
920
- d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=ot(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),
921
- pt(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&pt(a.trickModeVideo,b)}
922
- function tt(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
923
- function yt(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=Bt(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
924
- function Bt(a,b,c){var d={audio:it,video:jt,text:kt,image:lt}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return xt(a,l,m)},video:function(l,m){return xt(a,l,m)},text:Ct,image:Dt}[c.type];for(var g={audio:Et,video:Ft,text:Gt,image:Ht}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.s&&!wt(e)&&b.delete(d(e));return e}
925
- function It(a,b){return a.mimeType!=b.mimeType?!1:Jt(a.codecs)===Jt(b.codecs)}r.Ig=function(a){this.o=a};r.Pg=function(a){this.s=a};function xt(a,b,c){return!It(b,c)&&!a.o||b.drmInfos&&!Lc(b.drmInfos,c.drmInfos)?!1:!0}function Ct(a,b){return b.language?a.forced!==b.forced||0==Ge(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function Dt(){return!0}
926
- function Et(a,b,c){var d=It(a,b),e=It(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Ge(a.language,b.language);e=Ge(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){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;if(c.roles.length!==b.roles.length)return c.roles.length<
927
- b.roles.length}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=Kt(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Lt)return!0;if(d==Mt)return!1;d=Kt(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Lt?!0:d==Mt?!1:a.bandwidth&&Nt(a.bandwidth,b.bandwidth,c.bandwidth)==Lt?!0:!1}
928
- function Ft(a,b,c){var d=It(a,b),e=It(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Kt(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Lt)return!0;if(d==Mt)return!1;if(a.frameRate){d=Kt(a.frameRate,b.frameRate,c.frameRate);if(d==Lt)return!0;if(d==Mt)return!1}return a.bandwidth&&Nt(a.bandwidth,b.bandwidth,c.bandwidth)==Lt?!0:!1}
929
- function Gt(a,b,c){var d=Ge(a.language,b.language),e=Ge(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;
930
- 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 Ht(a,b,c){return Kt(a.width*a.height,b.width*b.height,c.width*c.height)==Lt?!0:!1}
931
- function rt(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}}
932
- function mt(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Kk([]),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,fullMimeTypes:new Set}}
933
- function Kt(a,b,c){if(b==a&&a!=c)return Mt;if(c==a&&a!=b)return Lt;if(b>a){if(c<=a||c-a<b-a)return Lt;if(c-a>b-a)return Mt}else{if(c>a)return Mt;if(a-c<a-b)return Lt;if(a-c>a-b)return Mt}return Ot}function Nt(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Lt:b<a?Mt:Ot}function wt(a){switch(a.type){case Td:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
934
- function jt(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,Jt(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function it(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,Jt(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function kt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
935
- function lt(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function Jt(a){if(!Pt.has(a)){var b=de(a);Pt.set(a,b)}return Pt.get(a)}S("shaka.util.PeriodCombiner",gt);gt.prototype.setUseStreamOnce=gt.prototype.Pg;gt.prototype.setAllowMultiTypeVariants=gt.prototype.Ig;gt.prototype.combinePeriods=gt.prototype.we;gt.prototype.getImageStreams=gt.prototype.zh;gt.prototype.getTextStreams=gt.prototype.Te;gt.prototype.getVariants=gt.prototype.Sh;var Lt=1,Ot=0,Mt=-1,Pt=new Map;function Qt(a,b){var c=new DOMParser,d=Rt.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function St(a,b){try{var c=zd(a);return Qt(c,b)}catch(d){return null}}
936
- var Rt=new Kc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Tt(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.W=1;this.B=[];this.l={Ud:"",type:"",profiles:[],Bb:null,Ga:0,Ca:null,kd:0};this.o=new Map;this.s={};this.N={};this.m=new gt;this.F=0;this.P=new Wa(5);this.G=new Tc(function(){Ut(a)});this.K=new kg;this.H=null;this.$=[];this.J=Infinity;this.C=!1;this.h=null;this.L=!1}r=Tt.prototype;
937
- r.configure=function(a){var b=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.i&&this.i.presentationTimeline.U()&&this.G.jc();this.h&&this.h.configure(this.g);this.m&&(this.m.Ig(this.g.dash.multiTypeVariantsAllowed&&pb()),this.m.Pg(this.g.dash.useStreamOnceInPeriodFlattening))};r.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.C=b.isLowLatencyMode(),c.A=[a],c.j=b,E(e,Vt(c),2);d=e.h;c.j&&Wt(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
911
+ function mt(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J;return O(function(G){switch(G.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){G.u(4);break}n=m.value;return E(G,tt(a,n,c,d,f,h,g),5);case 5:q=G.h;if(!q)throw new T(2,4,4037);m=l.next();G.u(2);break;case 4:p=t(h);for(u=p.next();!u.done;u=p.next())for(v=u.value,w=t(v),A=w.next();!A.done;A=w.next())y=A.value,(C=ut(a,y,c,e,f,h))&&b.push(C);z=t(h);for(B=z.next();!B.done;B=
912
+ z.next())for(D=B.value,I=t(D),F=I.next(),K={};!F.done;K={Gf:void 0},F=I.next())if(K.Gf=F.value,!vt(K.Gf)&&(J=b.some(function(L){return function(N){return wt(a,L.Gf,N)}}(K))))throw new T(2,4,4037);return G.return(b)}})}function tt(a,b,c,d,e,f,g){return O(function(h){if(1==h.g)return xt(a,c,b,0<g),b.matchedStreams?b.segmentIndex?E(h,yt(b,d+g),2):h.u(2):h.return(!1);zt(b,d,e,f,g);return h.return(!0)})}
913
+ function yt(a,b){var c,d,e,f,g,h,k;return O(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return E(l,Promise.all(c),2)}if(a.segmentIndex instanceof Nk)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);H(l)})}
914
+ function ut(a,b,c,d,e,f){if(vt(b))return null;var g=d(b);xt(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return O(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new Nk;return E(h,yt(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;zt(g,0,e,f,0);return g}
915
+ function zt(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;"audio"==a.type&&0==Ge(a.language,g.language)&&(h=!1);if(h&&(d[b-e].delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
916
+ function nt(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
917
+ function rt(a){a=Object.assign({},a);a.roles=a.roles.slice();a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
918
+ function ot(a,b){function c(g,h){g||(g=[]);h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=t(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");d=Mc(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new T(2,4,4038);a.drmInfos=
919
+ d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=nt(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),
920
+ ot(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&ot(a.trickModeVideo,b)}
921
+ function st(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,x(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
922
+ function xt(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=At(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
923
+ function At(a,b,c){var d={audio:ht,video:it,text:jt,image:kt}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return wt(a,l,m)},video:function(l,m){return wt(a,l,m)},text:Bt,image:Ct}[c.type];for(var g={audio:Dt,video:Et,text:Ft,image:Gt}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.s&&!vt(e)&&b.delete(d(e));return e}
924
+ function Ht(a,b){return a.mimeType!=b.mimeType?!1:It(a.codecs)===It(b.codecs)}r.Ig=function(a){this.o=a};r.Pg=function(a){this.s=a};function wt(a,b,c){return!Ht(b,c)&&!a.o||b.drmInfos&&!Lc(b.drmInfos,c.drmInfos)?!1:!0}function Bt(a,b){return b.language?a.forced!==b.forced||0==Ge(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function Ct(){return!0}
925
+ function Dt(a,b,c){var d=Ht(a,b),e=Ht(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Ge(a.language,b.language);e=Ge(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){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;if(c.roles.length!==b.roles.length)return c.roles.length<
926
+ b.roles.length}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=Jt(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Kt)return!0;if(d==Lt)return!1;d=Jt(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Kt?!0:d==Lt?!1:a.bandwidth&&Mt(a.bandwidth,b.bandwidth,c.bandwidth)==Kt?!0:!1}
927
+ function Et(a,b,c){var d=Ht(a,b),e=Ht(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=Jt(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Kt)return!0;if(d==Lt)return!1;if(a.frameRate){d=Jt(a.frameRate,b.frameRate,c.frameRate);if(d==Kt)return!0;if(d==Lt)return!1}return a.bandwidth&&Mt(a.bandwidth,b.bandwidth,c.bandwidth)==Kt?!0:!1}
928
+ function Ft(a,b,c){var d=Ge(a.language,b.language),e=Ge(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;
929
+ 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 Gt(a,b,c){return Jt(a.width*a.height,b.width*b.height,c.width*c.height)==Kt?!0:!1}
930
+ function qt(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}}
931
+ function lt(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Kk([]),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,fullMimeTypes:new Set}}
932
+ function Jt(a,b,c){if(b==a&&a!=c)return Lt;if(c==a&&a!=b)return Kt;if(b>a){if(c<=a||c-a<b-a)return Kt;if(c-a>b-a)return Lt}else{if(c>a)return Lt;if(a-c<a-b)return Kt;if(a-c>a-b)return Lt}return Nt}function Mt(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Kt:b<a?Lt:Nt}function vt(a){switch(a.type){case Td:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
933
+ function it(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,It(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function ht(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,It(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function jt(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
934
+ function kt(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function It(a){if(!Ot.has(a)){var b=de(a);Ot.set(a,b)}return Ot.get(a)}S("shaka.util.PeriodCombiner",ft);ft.prototype.setUseStreamOnce=ft.prototype.Pg;ft.prototype.setAllowMultiTypeVariants=ft.prototype.Ig;ft.prototype.combinePeriods=ft.prototype.we;ft.prototype.getImageStreams=ft.prototype.yh;ft.prototype.getTextStreams=ft.prototype.Te;ft.prototype.getVariants=ft.prototype.Rh;var Kt=1,Nt=0,Lt=-1,Ot=new Map;function Pt(a,b){var c=new DOMParser,d=Qt.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Rt(a,b){try{var c=zd(a);return Pt(c,b)}catch(d){return null}}
935
+ var Qt=new Kc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function St(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.W=1;this.B=[];this.l={Ud:"",type:"",profiles:[],Bb:null,Ga:0,Ca:null,kd:0};this.o=new Map;this.s={};this.N={};this.m=new ft;this.F=0;this.T=new Wa(5);this.G=new Tc(function(){Tt(a)});this.K=new kg;this.H=null;this.$=[];this.J=Infinity;this.C=!1;this.h=null;this.L=!1}r=St.prototype;
936
+ r.configure=function(a){var b=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&this.i&&this.i.presentationTimeline.U()&&this.G.jc();this.h&&this.h.configure(this.g);this.m&&(this.m.Ig(this.g.dash.multiTypeVariantsAllowed&&pb()),this.m.Pg(this.g.dash.useStreamOnceInPeriodFlattening))};r.start=function(a,b){var c=this,d;return O(function(e){if(1==e.g)return c.C=b.isLowLatencyMode(),c.A=[a],c.j=b,E(e,Ut(c),2);d=e.h;c.j&&Vt(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
938
937
  r.stop=function(){for(var a=t(Object.values(this.s)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.s={};this.o.clear();this.l={Ud:"",type:"",profiles:[],Bb:null,Ga:0,Ca:null,kd:0};this.m=null;null!=this.G&&(this.G.stop(),this.G=null);this.h&&this.h.destroy();return this.K.destroy()};
939
- r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return xa(c,2),E(c,Vt(a),4);if(2!=c.g)return za(c,0);b=Aa(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Kb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.F=b.endTime-a,Wt(this,0))}}};
938
+ r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return xa(c,2),E(c,Ut(a),4);if(2!=c.g)return za(c,0);b=Aa(c);if(!a.j||!b)return c.return();a.j.onError(b);H(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Kb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.F=b.endTime-a,Vt(this,0))}}};
940
939
  r.banLocation=function(a){this.h&&this.h.banLocation(a)};
941
- function Vt(a){var b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)return b="MPD",c=Xt(a),d=a.A,c.length?(d=c,b="Patch"):1<a.A.length&&a.h&&(e=ft(a.h,"Location",!0),e.length&&(d=e)),f=rg(d,a.g.retryParameters),g=Date.now(),E(m,Yt(a,f,0,{type:4}),2);if(3!=m.g){h=m.h;if(!a.j)return m.return(0);h.uri&&h.uri!=h.originalUri&&!a.A.includes(h.uri)&&a.A.unshift(h.uri);return E(m,Zt(a,h.data,h.uri,b),3)}k=Date.now();l=(k-g)/1E3;a.P.sample(1,l);return m.return(l)})}
942
- function Zt(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u;return O(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=km;if(f!=g){rb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=St(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Ad(h.outerHTML)}k=Zg(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=lm;l!=m&&l(k);if("Patch"===d)return v.return($t(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(au(a,k,c));
943
- q=a.g.dash.xlinkFailGracefully;p=ns(k,a.g.retryParameters,q,c,a.j.networkingEngine);lg(a.K,p);return E(v,p.promise,2)}u=v.h;return v.return(au(a,u,c))})}
944
- function au(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L,N,M,P,R,Q,ea,ba,na,Ka,wa,ta,Na,Ua,ua,Ca,ob,Pc,ee,qd,Hc,fe,ge,he,rd,Bi,xg,Ci,Di,yg,ie;return O(function(jc){switch(jc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=fh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=hh(l))q=Nd(d,[n])[0],m&&(a.h?et(a.h,"Location",m,q):f.set(m,q)),e.push(q);a.h?(p=ft(a.h,"Location",!0),0<p.length&&(d=a.A=p)):e.length&&(d=a.A=e);a.l.Ud=
945
- b.attributes.id||"";a.l.kd=mh(b,"publishTime",ph)||0;a.B=fh(b,"PatchLocation");u=Promise.resolve();if((v=jh(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new at(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=hh(v))(y=mh(v,"queryBeforeStart",wh,!1))?u=bt(a.h,A):bt(a.h,A);C=t(f.keys());for(z=C.next();!z.done;z=C.next())B=z.value,D=f.get(B),et(a.h,"Location",B,D)}I=fh(b,"BaseURL");K=!1;if(a.h)for(J=t(I),G=J.next();!G.done;G=
946
- J.next())L=G.value,N=L.attributes.serviceLocation,M=hh(L),N&&M&&(et(a.h,"BaseURL",N,M),K=!0);K&&a.h||(P=I.map(hh),F=Nd(d,P));R=function(){return a.h&&K?ft(a.h,"BaseURL"):F?F:[]};a.l.Ca=R;Q=0;I&&I.length&&(Q=mh(I[0],"availabilityTimeOffset",vh)||0);a.l.Ga=Q;ea=a.g.dash.ignoreMinBufferTime;ba=0;ea||(ba=mh(b,"minBufferTime",qh)||0);a.F=mh(b,"minimumUpdatePeriod",qh,-1);na=mh(b,"availabilityStartTime",ph);Ka=mh(b,"timeShiftBufferDepth",qh);wa=a.g.dash.ignoreSuggestedPresentationDelay;ta=null;wa||(ta=
947
- mh(b,"suggestedPresentationDelay",qh));Na=a.g.dash.ignoreMaxSegmentDuration;Ua=null;Na||(Ua=mh(b,"maxSegmentDuration",qh));ua=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.L=a.i.presentationTimeline.U()&&"static"==ua);a.l.type=ua;if(a.i)for(Ca=a.i.presentationTimeline,ob=t(Object.values(a.s)),Pc=ob.next();!Pc.done;Pc=ob.next())ee=Pc.value,ee.segmentIndex&&ee.segmentIndex.Ma(Ca.ib());else qd=a.g.defaultPresentationDelay||1.5*ba,Hc=null!=ta?ta:qd,Ca=new ok(na,Hc,a.g.dash.autoCorrectDrift);
948
- Ca.ic("static"==ua);(fe=Ca.U())&&!isNaN(a.g.availabilityWindowOverride)&&(Ka=a.g.availabilityWindowOverride);null==Ka&&(Ka=Infinity);Ca.he(Ka);ge=b.attributes.profiles||"";a.l.profiles=ge.split(",");he={rb:"static"!=ua,presentationTimeline:Ca,pa:null,ha:null,ka:null,I:null,bandwidth:0,Ve:!1,Ga:Q,Bb:null,profiles:ge.split(",")};rd=bu(a,he,R,b);Bi=rd.duration;xg=rd.periods;("static"!=ua||a.L)&&rd.dg||Ca.Ua(Bi||Infinity);a.J&&!a.C&&(Ci=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.C=a.j.isLowLatencyMode());
949
- a.C?Ca.Jg(a.J):a.J&&ab("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.");Ca.hf(Ua||1);return E(jc,u,2);case 2:return a.C&&(ba=0,Di=null!=ta?ta:a.g.defaultPresentationDelay,Ca.Cf(Di)),a.i?E(jc,cu(a,rd.periods,!1),4):E(jc,a.m.we(xg,he.rb),6);case 6:a.i={presentationTimeline:Ca,variants:a.m.j,textStreams:a.m.Te(),imageStreams:a.m.i,offlineSessionIds:[],
950
- minBufferTime:ba||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:du(b),nextUrl:eu(b)};if(!Ca.Wg()){jc.u(7);break}yg=fh(b,"UTCTiming");return E(jc,fu(a,R,yg),8);case 8:ie=jc.h;if(!a.j)return jc.return();Ca.Kg(ie);case 7:Ca.Od();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),H(jc)}})}
951
- function cu(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,a.m.we(b,!0,c),2);a.i.variants=a.m.j;d=a.m.Te();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);H(e)})}
952
- function $t(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L;return O(function(N){if(1==N.g){c=b.attributes.mpdId;d=mh(b,"originalPublishTime",ph);if(!c||c!==a.l.Ud||d!==a.l.kd)throw a.B=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(eh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=yh(l.attributes.sel||""),n=m[m.length-1],q=hh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Hb){p=hh(l)||"";var M=qh(p);if(null!=M){a.l.Bb=M;for(var P=t(a.o.values()),R=P.next();!R.done;R=P.next())R.value.Bb=
940
+ function Ut(a){var b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g)return b="MPD",c=Wt(a),d=a.A,c.length?(d=c,b="Patch"):1<a.A.length&&a.h&&(e=et(a.h,"Location",!0),e.length&&(d=e)),f=rg(d,a.g.retryParameters),g=Date.now(),E(m,Xt(a,f,0,{type:4}),2);if(3!=m.g){h=m.h;if(!a.j)return m.return(0);h.uri&&h.uri!=h.originalUri&&!a.A.includes(h.uri)&&a.A.unshift(h.uri);return E(m,Yt(a,h.data,h.uri,b),3)}k=Date.now();l=(k-g)/1E3;a.T.sample(1,l);return m.return(l)})}
941
+ function Yt(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u;return O(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=jm;if(f!=g){rb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Rt(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Ad(h.outerHTML)}k=Zg(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=km;l!=m&&l(k);if("Patch"===d)return v.return(Zt(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return($t(a,k,c));
942
+ q=a.g.dash.xlinkFailGracefully;p=ms(k,a.g.retryParameters,q,c,a.j.networkingEngine);lg(a.K,p);return E(v,p.promise,2)}u=v.h;return v.return($t(a,u,c))})}
943
+ function $t(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L,N,M,P,R,Q,ea,ba,na,Ka,wa,ta,Na,Ua,ua,Ca,ob,Pc,ee,qd,Hc,fe,ge,he,rd,Bi,xg,Ci,Di,yg,ie;return O(function(jc){switch(jc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=fh(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=hh(l))q=Nd(d,[n])[0],m&&(a.h?dt(a.h,"Location",m,q):f.set(m,q)),e.push(q);a.h?(p=et(a.h,"Location",!0),0<p.length&&(d=a.A=p)):e.length&&(d=a.A=e);a.l.Ud=
944
+ b.attributes.id||"";a.l.kd=mh(b,"publishTime",ph)||0;a.B=fh(b,"PatchLocation");u=Promise.resolve();if((v=jh(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new $s(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,A=hh(v))(y=mh(v,"queryBeforeStart",wh,!1))?u=at(a.h,A):at(a.h,A);C=t(f.keys());for(z=C.next();!z.done;z=C.next())B=z.value,D=f.get(B),dt(a.h,"Location",B,D)}I=fh(b,"BaseURL");K=!1;if(a.h)for(J=t(I),G=J.next();!G.done;G=
945
+ J.next())L=G.value,N=L.attributes.serviceLocation,M=hh(L),N&&M&&(dt(a.h,"BaseURL",N,M),K=!0);K&&a.h||(P=I.map(hh),F=Nd(d,P));R=function(){return a.h&&K?et(a.h,"BaseURL"):F?F:[]};a.l.Ca=R;Q=0;I&&I.length&&(Q=mh(I[0],"availabilityTimeOffset",vh)||0);a.l.Ga=Q;ea=a.g.dash.ignoreMinBufferTime;ba=0;ea||(ba=mh(b,"minBufferTime",qh)||0);a.F=mh(b,"minimumUpdatePeriod",qh,-1);na=mh(b,"availabilityStartTime",ph);Ka=mh(b,"timeShiftBufferDepth",qh);wa=a.g.dash.ignoreSuggestedPresentationDelay;ta=null;wa||(ta=
946
+ mh(b,"suggestedPresentationDelay",qh));Na=a.g.dash.ignoreMaxSegmentDuration;Ua=null;Na||(Ua=mh(b,"maxSegmentDuration",qh));ua=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.L=a.i.presentationTimeline.U()&&"static"==ua);a.l.type=ua;if(a.i)for(Ca=a.i.presentationTimeline,ob=t(Object.values(a.s)),Pc=ob.next();!Pc.done;Pc=ob.next())ee=Pc.value,ee.segmentIndex&&ee.segmentIndex.La(Ca.ib());else qd=a.g.defaultPresentationDelay||1.5*ba,Hc=null!=ta?ta:qd,Ca=new ok(na,Hc,a.g.dash.autoCorrectDrift);
947
+ Ca.ic("static"==ua);(fe=Ca.U())&&!isNaN(a.g.availabilityWindowOverride)&&(Ka=a.g.availabilityWindowOverride);null==Ka&&(Ka=Infinity);Ca.he(Ka);ge=b.attributes.profiles||"";a.l.profiles=ge.split(",");he={rb:"static"!=ua,presentationTimeline:Ca,pa:null,ha:null,ka:null,I:null,bandwidth:0,Ve:!1,Ga:Q,Bb:null,profiles:ge.split(",")};rd=au(a,he,R,b);Bi=rd.duration;xg=rd.periods;("static"!=ua||a.L)&&rd.dg||Ca.Ua(Bi||Infinity);a.J&&!a.C&&(Ci=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.C=a.j.isLowLatencyMode());
948
+ a.C?Ca.Jg(a.J):a.J&&ab("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.");Ca.hf(Ua||1);return E(jc,u,2);case 2:return a.C&&(ba=0,Di=null!=ta?ta:a.g.defaultPresentationDelay,Ca.Cf(Di)),a.i?E(jc,bu(a,rd.periods,!1),4):E(jc,a.m.we(xg,he.rb),6);case 6:a.i={presentationTimeline:Ca,variants:a.m.j,textStreams:a.m.Te(),imageStreams:a.m.i,offlineSessionIds:[],
949
+ minBufferTime:ba||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:cu(b),nextUrl:du(b)};if(!Ca.Wg()){jc.u(7);break}yg=fh(b,"UTCTiming");return E(jc,eu(a,R,yg),8);case 8:ie=jc.h;if(!a.j)return jc.return();Ca.Kg(ie);case 7:Ca.Od();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),H(jc)}})}
950
+ function bu(a,b,c){var d;return O(function(e){if(1==e.g)return E(e,a.m.we(b,!0,c),2);a.i.variants=a.m.j;d=a.m.Te();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);H(e)})}
951
+ function Zt(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L;return O(function(N){if(1==N.g){c=b.attributes.mpdId;d=mh(b,"originalPublishTime",ph);if(!c||c!==a.l.Ud||d!==a.l.kd)throw a.B=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(eh(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=yh(l.attributes.sel||""),n=m[m.length-1],q=hh(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Hb){p=hh(l)||"";var M=qh(p);if(null!=M){a.l.Bb=M;for(var P=t(a.o.values()),R=P.next();!R.done;R=P.next())R.value.Bb=
953
952
  M}}else if("type"===n.Hb){a.i.presentationTimeline.ic("static"==q);a.l.type=q;M=t(a.o.values());for(P=M.next();!P.done;P=M.next())P.value.rb="dynamic"==q;"static"==q&&(a.F=-1)}else"publishTime"===n.Hb?a.l.kd=ph(q)||0:null===n.Hb&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)zh(a.B,l);else if("Period"===n.name)if("add"===l.tagName)f.push(l);else{if("remove"===l.tagName&&n.id){M=a;P=n.id;R=t(M.o.keys());for(var Q=R.next();!Q.done;Q=R.next())if(Q=Q.value,Q.startsWith(P)){var ea=M.o.get(Q);
954
- ks(ea,Ms,"SegmentTimeline").children=[];gu(M,Q);M.o.delete(Q)}}}else if("SegmentTemplate"===n.name){P=yh(l.attributes.sel||"");M=P[P.length-1];if(M.Hb){P=hu(a,P);R=hh(l)||"";Q=t(P);for(ea=Q.next();!ea.done;ea=Q.next())ea=a.o.get(ea.value),Bh(ea.I.Nb,l.tagName,M.Hb,R);M=P}else M=[];u=M;v=t(u);for(w=v.next();!w.done;w=v.next())A=w.value,g.add(A)}else if("SegmentTimeline"===n.name||"S"===n.name){M=yh(l.attributes.sel||"");M=hu(a,M);P=t(M);for(R=P.next();!R.done;R=P.next())R=a.o.get(R.value),R=ks(R,Ms,
955
- "SegmentTimeline"),Q=fh(R,"S"),zh(Q,l),R.children=Q;y=M;C=t(y);for(z=C.next();!z.done;z=C.next())B=z.value,g.add(B)}D=t(g);for(I=D.next();!I.done;I=D.next())F=I.value,gu(a,F);K=t(f);for(J=K.next();!J.done;J=K.next())G=J.value,e.push.apply(e,x(bu(a,{rb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,pa:null,ha:null,ka:null,I:null,bandwidth:0,Ve:!1,Ga:a.l.Ga,profiles:a.l.profiles,Bb:a.l.Bb},a.l.Ca,G).periods));return e.length?E(N,cu(a,e,!0),2):N.u(2)}"static"==a.l.type&&(L=a.l.Bb,
953
+ js(ea,Ls,"SegmentTimeline").children=[];fu(M,Q);M.o.delete(Q)}}}else if("SegmentTemplate"===n.name){P=yh(l.attributes.sel||"");M=P[P.length-1];if(M.Hb){P=gu(a,P);R=hh(l)||"";Q=t(P);for(ea=Q.next();!ea.done;ea=Q.next())ea=a.o.get(ea.value),Bh(ea.I.Nb,l.tagName,M.Hb,R);M=P}else M=[];u=M;v=t(u);for(w=v.next();!w.done;w=v.next())A=w.value,g.add(A)}else if("SegmentTimeline"===n.name||"S"===n.name){M=yh(l.attributes.sel||"");M=gu(a,M);P=t(M);for(R=P.next();!R.done;R=P.next())R=a.o.get(R.value),R=js(R,Ls,
954
+ "SegmentTimeline"),Q=fh(R,"S"),zh(Q,l),R.children=Q;y=M;C=t(y);for(z=C.next();!z.done;z=C.next())B=z.value,g.add(B)}D=t(g);for(I=D.next();!I.done;I=D.next())F=I.value,fu(a,F);K=t(f);for(J=K.next();!J.done;J=K.next())G=J.value,e.push.apply(e,x(au(a,{rb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,pa:null,ha:null,ka:null,I:null,bandwidth:0,Ve:!1,Ga:a.l.Ga,profiles:a.l.profiles,Bb:a.l.Bb},a.l.Ca,G).periods));return e.length?E(N,bu(a,e,!0),2):N.u(2)}"static"==a.l.type&&(L=a.l.Bb,
956
955
  a.i.presentationTimeline.Ua(L||Infinity));H(N)})}
957
- function hu(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.o.values()),a=e.next();!a.done;a=e.next())a=a.value,a.pa.id===c&&a.ka.id===d&&a.I.id&&b.push(c+","+a.I.id);else if(-1<e)for(d=t(a.o.values()),a=d.next();!a.done;a=d.next())a=a.value,a.pa.id===c&&a.ka.position===e&&a.I.id&&b.push(c+
958
- ","+a.I.id);return b}function gu(a,b){var c=a.o.get(b),d=a.s[b];d.segmentIndex&&d.segmentIndex.Ma(a.i.presentationTimeline.ib());try{var e=Ls(c,function(f,g,h,k){return iu(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.N,c.I.aesKey,null,!0);d.createSegmentIndex=function(){return O(function(f){if(1==f.g)return d.segmentIndex?f.u(0):E(f,e.Tb(),3);d.segmentIndex=f.h;H(f)})}}catch(f){if(b=c.I.contentType,b!=Td&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
959
- function du(a){var b=jh(a,"ServiceDescription");if(!b)return null;a=jh(b,"Latency");b=jh(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
960
- return c}function eu(a){a=fh(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
961
- function bu(a,b,c,d){var e=b.Bb;e||(e=mh(d,"mediaPresentationDuration",qh),a.l.Bb=e);var f=0;a.i&&a.i.presentationTimeline&&a.L&&(f=a.i.presentationTimeline.Jb());var g=[],h=f;d=fh(d,"Period");for(var k=0;k<d.length;k++){var l=d[k],m=d[k+1],n=mh(l,"start",qh,h),q=l.attributes.id,p=mh(l,"duration",qh),u=null;if(m){var v=mh(m,"start",qh);null!=v&&(u=v-n)}else null!=e&&(u=e-n+f);null==u&&(u=p);if(!(null!==a.H&&null!==q&&null!==n&&n<a.H)||a.$.includes(q)||k+1==d.length){null!==n&&(null===a.H||n>a.H)&&
962
- (a.H=n);h=ju(a,b,c,{start:n,duration:u,node:l,dd:null==u||!m});g.push(h);b.pa.id&&u&&(a.N[b.pa.id]=u);if(null==u){h=null;break}h=n+u}}a.$=g.map(function(w){return w.id});return null!=e?{periods:g,duration:e+f,dg:!1}:{periods:g,duration:h,dg:!0}}
963
- function ju(a,b,c,d){b.pa=ku(a,d.node,null,c);b.ha=d;b.pa.Ga=b.Ga;b.pa.id||(b.pa.id="__shaka_period_"+d.start);var e=fh(d.node,"EventStream");c=b.presentationTimeline.ib();e=t(e);for(var f=e.next();!f.done;f=e.next())lu(a,d.start,d.duration,f.value,c);c=fh(d.node,"AdaptationSet").map(function(m,n){return mu(a,b,n,m)}).filter(ze);if(b.rb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.yi);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new T(2,
964
- 4,4018);}d=c.filter(function(m){return!m.Nf});c=c.filter(function(m){return m.Nf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Nf.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id)){h=t(h.streams);for(var k=h.next(),l={};!k.done;l={Hf:void 0},k=h.next())l.Hf=k.value,l.Hf.trickModeVideo=e.streams.find(function(m){return function(n){return de(m.Hf.codecs)==de(n.codecs)}}(l))}}c=nu(a.g.disableAudio,d,"audio");e=nu(a.g.disableVideo,d,"video");f=nu(a.g.disableText,
965
- d,Td);d=nu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.pa.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function nu(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
966
- function mu(a,b,c,d){function e(G){switch(G){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function f(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ka=ku(a,d,b.pa,null);b.ka.position=c;var g=!1;c=fh(d,"Role");var h=c.map(function(G){return G.attributes.value}).filter(ze),k=void 0,l=b.ka.contentType==Td;l&&(k="subtitle");c=t(c);for(var m=c.next();!m.done;m=c.next()){m=m.value;var n=m.attributes.schemeIdUri;
956
+ function gu(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.o.values()),a=e.next();!a.done;a=e.next())a=a.value,a.pa.id===c&&a.ka.id===d&&a.I.id&&b.push(c+","+a.I.id);else if(-1<e)for(d=t(a.o.values()),a=d.next();!a.done;a=d.next())a=a.value,a.pa.id===c&&a.ka.position===e&&a.I.id&&b.push(c+
957
+ ","+a.I.id);return b}function fu(a,b){var c=a.o.get(b),d=a.s[b];d.segmentIndex&&d.segmentIndex.La(a.i.presentationTimeline.ib());try{var e=Ks(c,function(f,g,h,k){return hu(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.N,c.I.aesKey,null,!0);d.createSegmentIndex=function(){return O(function(f){if(1==f.g)return d.segmentIndex?f.u(0):E(f,e.Tb(),3);d.segmentIndex=f.h;H(f)})}}catch(f){if(b=c.I.contentType,b!=Td&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
958
+ function cu(a){var b=jh(a,"ServiceDescription");if(!b)return null;a=jh(b,"Latency");b=jh(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
959
+ return c}function du(a){a=fh(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
960
+ function au(a,b,c,d){var e=b.Bb;e||(e=mh(d,"mediaPresentationDuration",qh),a.l.Bb=e);var f=0;a.i&&a.i.presentationTimeline&&a.L&&(f=a.i.presentationTimeline.Jb());var g=[],h=f;d=fh(d,"Period");for(var k=0;k<d.length;k++){var l=d[k],m=d[k+1],n=mh(l,"start",qh,h),q=l.attributes.id,p=mh(l,"duration",qh),u=null;if(m){var v=mh(m,"start",qh);null!=v&&(u=v-n)}else null!=e&&(u=e-n+f);null==u&&(u=p);if(!(null!==a.H&&null!==q&&null!==n&&n<a.H)||a.$.includes(q)||k+1==d.length){null!==n&&(null===a.H||n>a.H)&&
961
+ (a.H=n);h=iu(a,b,c,{start:n,duration:u,node:l,dd:null==u||!m});g.push(h);b.pa.id&&u&&(a.N[b.pa.id]=u);if(null==u){h=null;break}h=n+u}}a.$=g.map(function(w){return w.id});return null!=e?{periods:g,duration:e+f,dg:!1}:{periods:g,duration:h,dg:!0}}
962
+ function iu(a,b,c,d){b.pa=ju(a,d.node,null,c);b.ha=d;b.pa.Ga=b.Ga;b.pa.id||(b.pa.id="__shaka_period_"+d.start);var e=fh(d.node,"EventStream");c=b.presentationTimeline.ib();e=t(e);for(var f=e.next();!f.done;f=e.next())ku(a,d.start,d.duration,f.value,c);c=fh(d.node,"AdaptationSet").map(function(m,n){return lu(a,b,n,m)}).filter(ze);if(b.rb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.xi);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new T(2,
963
+ 4,4018);}d=c.filter(function(m){return!m.Nf});c=c.filter(function(m){return m.Nf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Nf.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id)){h=t(h.streams);for(var k=h.next(),l={};!k.done;l={Hf:void 0},k=h.next())l.Hf=k.value,l.Hf.trickModeVideo=e.streams.find(function(m){return function(n){return de(m.Hf.codecs)==de(n.codecs)}}(l))}}c=mu(a.g.disableAudio,d,"audio");e=mu(a.g.disableVideo,d,"video");f=mu(a.g.disableText,
964
+ d,Td);d=mu(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.pa.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function mu(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
965
+ function lu(a,b,c,d){function e(G){switch(G){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function f(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ka=ju(a,d,b.pa,null);b.ka.position=c;var g=!1;c=fh(d,"Role");var h=c.map(function(G){return G.attributes.value}).filter(ze),k=void 0,l=b.ka.contentType==Td;l&&(k="subtitle");c=t(c);for(var m=c.next();!m.done;m=c.next()){m=m.value;var n=m.attributes.schemeIdUri;
967
966
  if(null==n||"urn:mpeg:dash:role:2011"==n)switch(m=m.attributes.value,m){case "main":g=!0;break;case "caption":case "subtitle":k=m}}var q,p;n=fh(d,"EssentialProperty");c=null;var u=!1;m=!1;n=t(n);for(var v=n.next();!v.done;v=n.next()){v=v.value;var w=v.attributes.schemeIdUri;"http://dashif.org/guidelines/trickmode"==w?c=v.attributes.value:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?q=f(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?p=e(parseInt(v.attributes.value,10)):
968
967
  "urn:mpeg:mpegB:cicp:MatrixCoefficients"!=w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:m=!0)}var A=null;n=fh(d,"SupplementalProperty");n=t(n);for(v=n.next();!v.done;v=n.next())v=v.value,w=v.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==w?A=parseInt(v.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?q=f(parseInt(v.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w&&(p=e(parseInt(v.attributes.value,10)));n=fh(d,"Accessibility");
969
968
  var y=new Map,C;n=t(n);for(v=n.next();!v.done;v=n.next())if(w=v.value,v=w.attributes.schemeIdUri,w=w.attributes.value,"urn:scte:dash:cc:cea-608:2015"==v)if(v=1,null!=w){w=w.split(";");for(var z=t(w),B=z.next();!B.done;B=z.next()){var D=B.value,I=B=void 0;D.includes("=")?(D=D.split("="),B=D[0].startsWith("CC")?D[0]:"CC"+D[0],I=D[1]||"und"):(B="CC"+v,2==w.length?v+=2:v++,I=D);y.set(B,Ce(I))}}else y.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==v)if(v=1,null!=w)for(w=t(w.split(";")),z=w.next();!z.done;z=
970
- w.next())B=z.value,D=z=void 0,B.includes("=")?(B=B.split("="),z="svc"+B[0],D=B[1].split(",")[0].split(":").pop()):(z="svc"+v,v++,D=B),y.set(z,Ce(D));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==v?null!=w&&(h.push(w),"captions"==w&&(k="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==v&&("1"==w?C="visually impaired":"2"==w&&(C="hard of hearing"));if(m)return null;m=fh(d,"ContentProtection");var F=Xr(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),K=Ce(b.ka.language||"und"),J=d.attributes.label;
971
- (m=fh(d,"Label"))&&m.length&&(m=gh(m[0]))&&(J=m);m=fh(d,"Representation");d=m.map(function(G){if(G=ou(a,b,F,k,K,J,g,h,y,G,C,A))G.hdr=G.hdr||q,G.colorGamut=G.colorGamut||p,G.fastSwitching=u;return G}).filter(function(G){return!!G});if(0==d.length){c="image"==b.ka.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||c)return null;throw new T(2,4,4003);}if(!b.ka.contentType||"application"==b.ka.contentType)for(b.ka.contentType=pu(d[0].mimeType,d[0].codecs),l=t(d),n=l.next();!n.done;n=l.next())n.value.type=
972
- b.ka.contentType;l=b.ka.id||"__fake__"+a.W++;n=t(d);for(v=n.next();!v.done;v=n.next()){v=v.value;w=t(F.drmInfos);for(z=w.next();!z.done;z=w.next())z=z.value,z.keyIds=z.keyIds&&v.keyIds?new Set([].concat(x(z.keyIds),x(v.keyIds))):z.keyIds||v.keyIds;a.g.dash.enableAudioGroups&&(v.groupId=l)}m=m.map(function(G){return G.attributes.id}).filter(ze);return{id:l,contentType:b.ka.contentType,language:K,Qj:g,streams:d,drmInfos:F.drmInfos,Nf:c,yi:m}}
973
- function ou(a,b,c,d,e,f,g,h,k,l,m,n){b.I=ku(a,l,b.ka,null);var q=b.I.id;a.J=Math.min(a.J,b.I.Ga);if(!qu(b.I))return null;var p=b.ha.start;b.bandwidth=mh(l,"bandwidth",th)||0;var u=b.I.contentType,v=u==Td||"application"==u;u="image"==u;try{var w=void 0;if(c.se){var A=b.I.Ca,y=Nd(A(),[c.se.ei]),C=rg(y,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.se.iv,firstMediaSequenceNumber:0,fetchKey:function(){var L,N,M;return O(function(P){if(1==P.g)return E(P,Yt(a,C,6),2);if(3!=P.g){L=P.h;if(!L.data||
974
- 16!=L.data.byteLength)throw new T(2,4,4049);N={name:"AES-CBC"};M=w;return E(P,window.crypto.subtle.importKey("raw",L.data,N,!0,["decrypt"]),3)}M.cryptoKey=P.h;w.fetchKey=void 0;H(P)})}}}b.I.aesKey=w;A=function(L,N,M,P){return iu(a,L,N,M,P)};if(b.I.Hc)var z=As(b,A,w);else if(b.I.Fb)z=Gs(b,a.s,w);else if(b.I.Nb)z=Ls(b,A,a.s,!!a.i,a.g.dash.initialSegmentLimit,a.N,w,n,!1);else{var B=b.ha.duration||0,D=b.I.Ca,I=b.I.mimeType,F=b.I.codecs;z={Tb:function(){var L=Mk(p,B,D());L.Rb(function(N){N.mimeType=I;
975
- N.codecs=F});return Promise.resolve(L)}}}}catch(L){if((v||u)&&4002==L.code)return null;throw L;}n=fh(l,"ContentProtection");n=as(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;fh(l,"SupplementalProperty").some(function(L){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==L.attributes.schemeIdUri&&"JOC"==L.attributes.value})&&(A=!0);y=!1;v&&(y=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var K;if(u&&((l=fh(l,"EssentialProperty").find(function(L){return["http://dashif.org/thumbnail_tile",
976
- "http://dashif.org/guidelines/thumbnail_tile"].includes(L.attributes.schemeIdUri)}))&&(K=l.attributes.value),!K))return null;var J;l=b.I.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"))&&(J="PQ");v=b.I.id?b.pa.id+","+b.I.id:"";a.B.length&&q&&a.o.set(b.pa.id+","+q,ru(b));var G=v&&a.s[v]?a.s[v]:{id:a.W++,originalId:b.I.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&
969
+ w.next())B=z.value,D=z=void 0,B.includes("=")?(B=B.split("="),z="svc"+B[0],D=B[1].split(",")[0].split(":").pop()):(z="svc"+v,v++,D=B),y.set(z,Ce(D));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==v?null!=w&&(h.push(w),"captions"==w&&(k="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==v&&("1"==w?C="visually impaired":"2"==w&&(C="hard of hearing"));if(m)return null;m=fh(d,"ContentProtection");var F=Wr(m,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),K=Ce(b.ka.language||"und"),J=d.attributes.label;
970
+ (m=fh(d,"Label"))&&m.length&&(m=gh(m[0]))&&(J=m);m=fh(d,"Representation");d=m.map(function(G){if(G=nu(a,b,F,k,K,J,g,h,y,G,C,A))G.hdr=G.hdr||q,G.colorGamut=G.colorGamut||p,G.fastSwitching=u;return G}).filter(function(G){return!!G});if(0==d.length){c="image"==b.ka.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||l||c)return null;throw new T(2,4,4003);}if(!b.ka.contentType||"application"==b.ka.contentType)for(b.ka.contentType=ou(d[0].mimeType,d[0].codecs),l=t(d),n=l.next();!n.done;n=l.next())n.value.type=
971
+ b.ka.contentType;l=b.ka.id||"__fake__"+a.W++;n=t(d);for(v=n.next();!v.done;v=n.next()){v=v.value;w=t(F.drmInfos);for(z=w.next();!z.done;z=w.next())z=z.value,z.keyIds=z.keyIds&&v.keyIds?new Set([].concat(x(z.keyIds),x(v.keyIds))):z.keyIds||v.keyIds;a.g.dash.enableAudioGroups&&(v.groupId=l)}m=m.map(function(G){return G.attributes.id}).filter(ze);return{id:l,contentType:b.ka.contentType,language:K,Pj:g,streams:d,drmInfos:F.drmInfos,Nf:c,xi:m}}
972
+ function nu(a,b,c,d,e,f,g,h,k,l,m,n){b.I=ju(a,l,b.ka,null);var q=b.I.id;a.J=Math.min(a.J,b.I.Ga);if(!pu(b.I))return null;var p=b.ha.start;b.bandwidth=mh(l,"bandwidth",th)||0;var u=b.I.contentType,v=u==Td||"application"==u;u="image"==u;try{var w=void 0;if(c.se){var A=b.I.Ca,y=Nd(A(),[c.se.di]),C=rg(y,a.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:c.se.iv,firstMediaSequenceNumber:0,fetchKey:function(){var L,N,M;return O(function(P){if(1==P.g)return E(P,Xt(a,C,6),2);if(3!=P.g){L=P.h;if(!L.data||
973
+ 16!=L.data.byteLength)throw new T(2,4,4049);N={name:"AES-CBC"};M=w;return E(P,window.crypto.subtle.importKey("raw",L.data,N,!0,["decrypt"]),3)}M.cryptoKey=P.h;w.fetchKey=void 0;H(P)})}}}b.I.aesKey=w;A=function(L,N,M,P){return hu(a,L,N,M,P)};if(b.I.Hc)var z=zs(b,A,w);else if(b.I.Fb)z=Fs(b,a.s,w);else if(b.I.Nb)z=Ks(b,A,a.s,!!a.i,a.g.dash.initialSegmentLimit,a.N,w,n,!1);else{var B=b.ha.duration||0,D=b.I.Ca,I=b.I.mimeType,F=b.I.codecs;z={Tb:function(){var L=Mk(p,B,D());L.Rb(function(N){N.mimeType=I;
974
+ N.codecs=F});return Promise.resolve(L)}}}}catch(L){if((v||u)&&4002==L.code)return null;throw L;}n=fh(l,"ContentProtection");n=$r(n,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);A=!1;fh(l,"SupplementalProperty").some(function(L){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==L.attributes.schemeIdUri&&"JOC"==L.attributes.value})&&(A=!0);y=!1;v&&(y=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var K;if(u&&((l=fh(l,"EssentialProperty").find(function(L){return["http://dashif.org/thumbnail_tile",
975
+ "http://dashif.org/guidelines/thumbnail_tile"].includes(L.attributes.schemeIdUri)}))&&(K=l.attributes.value),!K))return null;var J;l=b.I.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"))&&(J="PQ");v=b.I.id?b.pa.id+","+b.I.id:"";a.B.length&&q&&a.o.set(b.pa.id+","+q,qu(b));var G=v&&a.s[v]?a.s[v]:{id:a.W++,originalId:b.I.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&
977
976
  (G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:l,frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.ka.language,label:f,type:b.ka.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:y,channelsCount:b.I.Ac,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:A,
978
977
  closedCaptions:k,hdr:J,colorGamut:void 0,videoLayout:void 0,tilesLayout:K,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Xd(b.I.mimeType,b.I.codecs)])};G.createSegmentIndex=function(){var L;return O(function(N){if(1==N.g){if(G.segmentIndex)return N.u(0);L=G;return E(N,z.Tb(),3)}L.segmentIndex=N.h;H(N)})};v&&b.rb&&!a.s[v]&&(a.s[v]=G);return G}
979
- function ru(a){for(var b={},c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())if(d=d.value,["period","adaptationSet","representation"].includes(d)){var e=a[d];b[d]={Hc:null,Fb:null,Nb:e.Nb,Ca:e.Ca,width:e.width,height:e.height,contentType:e.contentType,mimeType:e.mimeType,language:e.language,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,emsgSchemeIdUris:e.emsgSchemeIdUris,id:e.id,position:e.position,Ac:e.Ac,audioSamplingRate:e.audioSamplingRate,Ga:e.Ga,yc:e.yc}}else"periodInfo"==
980
- d?(e=a[d],b[d]={start:e.start,duration:e.duration,node:null,dd:e.dd}):b[d]=a[d];return b}function Ut(a){var b,c;O(function(d){switch(d.g){case 1:return b=0,xa(d,2),E(d,Vt(a),4);case 4:b=d.h;za(d,3);break;case 2:if(c=Aa(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();Wt(a,b);H(d)}})}
981
- function Wt(a,b){if(!(0>a.F)){var c=a.F;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.G.X(Math.max(c-b,Xa(a.P)))}}
982
- function ku(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Ac:null,audioSamplingRate:null,Ga:0,yf:0};d=d||c.Ca;var e=b.attributes.id,f=fh(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=hh(m);l&&m&&(et(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(hh));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=nh(b,
983
- "urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=Ys(m).join(",");n=mh(b,"frameRate",xh)||c.frameRate;var q=b.attributes.sar||c.pixelAspectRatio,p=su(fh(b,"InbandEventStream"),c.emsgSchemeIdUris),u=fh(b,"AudioChannelConfiguration");u=tu(u)||c.Ac;var v=mh(b,"audioSamplingRate",uh)||c.audioSamplingRate;k||(k=pu(l,m));var w=jh(b,"SegmentBase"),A=jh(b,"SegmentTemplate"),y=w?mh(w,"availabilityTimeOffset",vh)||0:0,C=A?mh(A,"availabilityTimeOffset",vh)||0:0,z=f&&f.length?mh(f[0],"availabilityTimeOffset",
984
- vh)||0:0;y=c.Ga+z+y+C;C=null;(z=jh(b,"SegmentSequenceProperties"))&&(z=jh(z,"SAP"))&&(C=mh(z,"cadence",sh));return{Ca:function(){return Nd(d(),f.length?a.h&&h?ft(a.h,e):g?g:[]:[])},Hc:w||c.Hc,Fb:jh(b,"SegmentList")||c.Fb,Nb:A||c.Nb,width:mh(b,"width",uh)||c.width,height:mh(b,"height",uh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:p,id:e,language:b.attributes.lang,Ac:u,audioSamplingRate:v,Ga:y,yc:null,yf:C||c.yf}}
985
- function su(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
986
- function tu(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.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=
987
- 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 qu(a){var b=a.Hc?1:0;b+=a.Fb?1:0;b+=a.Nb?1:0;if(0==b)return a.contentType==Td||"application"==a.contentType?!0:!1;1!=b&&(a.Hc&&(a.Fb=null),a.Nb=null);return!0}
988
- function uu(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[Dd(c)],f=Nd(b(),e),g=rg(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g),lg(a.K,h),E(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=wd(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
989
- function fu(a,b,c){var d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:d=c.map(function(q){return{scheme:q.attributes.schemeIdUri,value:q.attributes.value}}),e=a.g.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.u(4);break}h=g.value;xa(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.u(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.u(8);
990
- 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":ab("NTP UTCTiming scheme is not supported");break;default:ab("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return E(n,uu(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return E(n,uu(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:za(n,
978
+ function qu(a){for(var b={},c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())if(d=d.value,["period","adaptationSet","representation"].includes(d)){var e=a[d];b[d]={Hc:null,Fb:null,Nb:e.Nb,Ca:e.Ca,width:e.width,height:e.height,contentType:e.contentType,mimeType:e.mimeType,language:e.language,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,emsgSchemeIdUris:e.emsgSchemeIdUris,id:e.id,position:e.position,Ac:e.Ac,audioSamplingRate:e.audioSamplingRate,Ga:e.Ga,yc:e.yc}}else"periodInfo"==
979
+ d?(e=a[d],b[d]={start:e.start,duration:e.duration,node:null,dd:e.dd}):b[d]=a[d];return b}function Tt(a){var b,c;O(function(d){switch(d.g){case 1:return b=0,xa(d,2),E(d,Ut(a),4);case 4:b=d.h;za(d,3);break;case 2:if(c=Aa(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();Vt(a,b);H(d)}})}
980
+ function Vt(a,b){if(!(0>a.F)){var c=a.F;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.G.X(Math.max(c-b,Xa(a.T)))}}
981
+ function ju(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Ac:null,audioSamplingRate:null,Ga:0,yf:0};d=d||c.Ca;var e=b.attributes.id,f=fh(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=hh(m);l&&m&&(dt(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(hh));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=nh(b,
982
+ "urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=Xs(m).join(",");n=mh(b,"frameRate",xh)||c.frameRate;var q=b.attributes.sar||c.pixelAspectRatio,p=ru(fh(b,"InbandEventStream"),c.emsgSchemeIdUris),u=fh(b,"AudioChannelConfiguration");u=su(u)||c.Ac;var v=mh(b,"audioSamplingRate",uh)||c.audioSamplingRate;k||(k=ou(l,m));var w=jh(b,"SegmentBase"),A=jh(b,"SegmentTemplate"),y=w?mh(w,"availabilityTimeOffset",vh)||0:0,C=A?mh(A,"availabilityTimeOffset",vh)||0:0,z=f&&f.length?mh(f[0],"availabilityTimeOffset",
983
+ vh)||0:0;y=c.Ga+z+y+C;C=null;(z=jh(b,"SegmentSequenceProperties"))&&(z=jh(z,"SAP"))&&(C=mh(z,"cadence",sh));return{Ca:function(){return Nd(d(),f.length?a.h&&h?et(a.h,e):g?g:[]:[])},Hc:w||c.Hc,Fb:jh(b,"SegmentList")||c.Fb,Nb:A||c.Nb,width:mh(b,"width",uh)||c.width,height:mh(b,"height",uh)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:p,id:e,language:b.attributes.lang,Ac:u,audioSamplingRate:v,Ga:y,yc:null,yf:C||c.yf}}
984
+ function ru(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
985
+ function su(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.attributes.schemeIdUri)if(c=c.attributes.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=
986
+ 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 pu(a){var b=a.Hc?1:0;b+=a.Fb?1:0;b+=a.Nb?1:0;if(0==b)return a.contentType==Td||"application"==a.contentType?!0:!1;1!=b&&(a.Hc&&(a.Fb=null),a.Nb=null);return!0}
987
+ function tu(a,b,c,d){var e,f,g,h,k,l,m;return O(function(n){if(1==n.g)return e=[Dd(c)],f=Nd(b(),e),g=rg(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g),lg(a.K,h),E(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=wd(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
988
+ function eu(a,b,c){var d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:d=c.map(function(q){return{scheme:q.attributes.schemeIdUri,value:q.attributes.value}}),e=a.g.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.u(4);break}h=g.value;xa(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.u(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.u(8);
989
+ 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":ab("NTP UTCTiming scheme is not supported");break;default:ab("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return E(n,tu(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return E(n,tu(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:za(n,
991
990
  3);break;case 5:Aa(n);case 3:g=f.next();n.u(2);break;case 4:return ab("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
992
- function lu(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=mh(d,"timescale",uh)||1;d=t(fh(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=mh(k,"presentationTime",uh)||0,m=mh(k,"duration",uh)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.attributes.id||"",eventElement:Ch(k),eventNode:k},a.j.onTimelineRegionAdded(k))}}
993
- function iu(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=zg,g=e?0:1,h=ol(b,c,d,a.g.retryParameters),E(l,Yt(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function pu(a,b){b=Xd(a,b);return qe(b)?Td:a.split("/")[0]}function Yt(a,b,c,d){b=a.j.networkingEngine.request(c,b,d);lg(a.K,b);return b.promise}
994
- function Xt(a){var b=a.l.kd;if(!a.l.Ud||!b||!a.B.length)return[];var c=Date.now()/1E3,d=a.B.filter(function(e){e=uh(e.attributes.ttl);return!e||b+e>c}).map(hh).filter(ze);return d.length?Nd(a.A,d):[]}S("shaka.dash.DashParser",Tt);vi["application/dash+xml"]=function(){return new Tt};vi["video/vnd.mpeg.dash.mpd"]=function(){return new Tt};function Hu(){}S("shaka.dependencies",Hu);Hu.has=function(a){return Iu.has(a)};Hu.add=function(a,b){if(!Ju[a])throw Error(a+" is not supported");a==Ku?rb("mux.js","mux.js is no longer used in Shaka Player."):Iu.set(a,function(){return b})};var Ku="muxjs",Ju={Rj:Ku,ISOBoxer:"ISOBoxer"};Hu.Allowed=Ju;var Iu=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Lu(a,b,c){this.type=a;this.g=b;this.segments=c||null}function Mu(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Mu.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
995
- function Nu(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Ou(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Z(a,b,c){return(a=Ou(a,b))?a.value:c||null}function Pu(a,b){a=Ou(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function Qu(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.vb=c}function Ru(a,b){this.name=a;this.value=b};function Su(a,b){return a.filter(function(c){return c.name==b})}function Tu(a,b){return a.filter(function(c){return Pu(c,"TYPE")==b})}function Uu(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Vu(a,b,c){c=void 0===c?0:c;return(a=Uu(a,b))?Number(a.value):c}function Wu(a,b,c){return b?Xu(a,[b],c):[]}
996
- function Xu(a,b,c){if(!b.length)return[];b=Nd(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new T(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function Yu(){this.g=0}
997
- function Zu(a,b){b=wd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new T(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=$u(a,f),--a.g,av.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=$u(a,g);if(bv.includes(g.name)){if(1!=b)throw new T(2,4,4017);g=
998
- c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=$u(a,k),av.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Z(k,"TYPE")?f.push(k):"MAP"==Z(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new Qu(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Qu("",d,f)));return new Lu(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
999
- g.name&&(g.attributes.push(new Ru("URI",h)),d=!0)}}return new Lu(b,e)}function $u(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new T(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new xp(d);var f;(f=zp(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=zp(d,g);)c.push(new Ru(f[1],f[2]||f[3])),yp(d)}return new Mu(a,b,c,e)}
1000
- var av="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(" "),bv="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function cv(){}function dv(a){try{var b=ev(a);return dg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return bg(c)}}
1001
- function ev(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(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=Hd(a):e=Ad(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",cv);cv.parse=dv;ng("data",dv);function fv(){var a=this;this.g=this.h=null;this.B=1;this.s=new Map;this.H=new Map;this.N=new Map;this.N.set("video",new Map);this.N.set("audio",new Map);this.N.set(Td,new Map);this.N.set("image",new Map);this.Ea=new Set;this.i=new Map;this.l=null;this.L="";this.ya=new Yu;this.J=-1;this.aa=Infinity;this.$=this.qb=!1;this.A=new Tc(function(){gv(a)});this.na=hv;this.o=null;this.Fa=0;this.m=Infinity;this.xa=this.ua=this.P=0;this.W=new kg;this.F=new Map;this.G=new Map;this.ba=new Map;this.ga=new Map;
1002
- this.K=new Map;this.wa=new Map;this.ma=new Map;this.hb=this.C=!1;this.La=new Wa(5);this.j=null;this.da=!0}r=fv.prototype;r.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};r.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.C=b.isLowLatencyMode(),E(e,iv(c,[a]),2)):3!=e.g?(d=e.h,c.L=d.uri,E(e,jv(c,d.data,a),3)):e.return(c.o)})};
991
+ function ku(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=mh(d,"timescale",uh)||1;d=t(fh(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=mh(k,"presentationTime",uh)||0,m=mh(k,"duration",uh)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.attributes.id||"",eventElement:Ch(k),eventNode:k},a.j.onTimelineRegionAdded(k))}}
992
+ function hu(a,b,c,d,e){var f,g,h,k;return O(function(l){if(1==l.g)return f=zg,g=e?0:1,h=ol(b,c,d,a.g.retryParameters),E(l,Xt(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function ou(a,b){b=Xd(a,b);return qe(b)?Td:a.split("/")[0]}function Xt(a,b,c,d){b=a.j.networkingEngine.request(c,b,d);lg(a.K,b);return b.promise}
993
+ function Wt(a){var b=a.l.kd;if(!a.l.Ud||!b||!a.B.length)return[];var c=Date.now()/1E3,d=a.B.filter(function(e){e=uh(e.attributes.ttl);return!e||b+e>c}).map(hh).filter(ze);return d.length?Nd(a.A,d):[]}S("shaka.dash.DashParser",St);vi["application/dash+xml"]=function(){return new St};vi["video/vnd.mpeg.dash.mpd"]=function(){return new St};function Gu(){}S("shaka.dependencies",Gu);Gu.has=function(a){return Hu.has(a)};Gu.add=function(a,b){if(!Iu[a])throw Error(a+" is not supported");a==Ju?rb("mux.js","mux.js is no longer used in Shaka Player."):Hu.set(a,function(){return b})};var Ju="muxjs",Iu={Qj:Ju,ISOBoxer:"ISOBoxer"};Gu.Allowed=Iu;var Hu=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Ku(a,b,c){this.type=a;this.g=b;this.segments=c||null}function Lu(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Lu.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
994
+ function Mu(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Nu(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Z(a,b,c){return(a=Nu(a,b))?a.value:c||null}function Ou(a,b){a=Nu(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function Pu(a,b,c){c=void 0===c?[]:c;this.g=b;this.h=a;this.vb=c}function Qu(a,b){this.name=a;this.value=b};function Ru(a,b){return a.filter(function(c){return c.name==b})}function Su(a,b){return a.filter(function(c){return Ou(c,"TYPE")==b})}function Tu(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Uu(a,b,c){c=void 0===c?0:c;return(a=Tu(a,b))?Number(a.value):c}function Vu(a,b,c){return b?Wu(a,[b],c):[]}
995
+ function Wu(a,b,c){if(!b.length)return[];b=Nd(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=a,f=e.push;var g=d.value;if((d=c)&&d.size){g=String(g).replace(/%7B/g,"{").replace(/%7D/g,"}");var h=g.match(/{\$\w*}/g);if(h){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=k.value;var l=k.slice(2,k.length-1),m=d.get(l);if(m)g=g.replace(k,m);else throw new T(2,4,4039,l);}}d=g}else d=g;f.call(e,d)}return a};function Xu(){this.g=0}
996
+ function Yu(a,b){b=wd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new T(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=Zu(a,f),--a.g,$u.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=Zu(a,g);if(av.includes(g.name)){if(1!=b)throw new T(2,4,4017);g=
997
+ c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=Zu(a,k),$u.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Z(k,"TYPE")?f.push(k):"MAP"==Z(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new Pu(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Pu("",d,f)));return new Ku(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
998
+ g.name&&(g.attributes.push(new Qu("URI",h)),d=!0)}}return new Ku(b,e)}function Zu(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new T(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new wp(d);var f;(f=yp(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=yp(d,g);)c.push(new Qu(f[1],f[2]||f[3])),xp(d)}return new Lu(a,b,c,e)}
999
+ var $u="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(" "),av="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function bv(){}function cv(a){try{var b=dv(a);return dg({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return bg(c)}}
1000
+ function dv(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(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=Hd(a):e=Ad(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",bv);bv.parse=cv;ng("data",cv);function ev(){var a=this;this.g=this.h=null;this.B=1;this.s=new Map;this.H=new Map;this.N=new Map;this.N.set("video",new Map);this.N.set("audio",new Map);this.N.set(Td,new Map);this.N.set("image",new Map);this.Ea=new Set;this.i=new Map;this.l=null;this.L="";this.ya=new Xu;this.J=-1;this.aa=Infinity;this.$=this.qb=!1;this.A=new Tc(function(){fv(a)});this.na=gv;this.o=null;this.Fa=0;this.m=Infinity;this.xa=this.ua=this.T=0;this.W=new kg;this.F=new Map;this.G=new Map;this.ba=new Map;this.ga=new Map;
1001
+ this.K=new Map;this.wa=new Map;this.ma=new Map;this.hb=this.C=!1;this.Ka=new Wa(5);this.j=null;this.da=!0}r=ev.prototype;r.configure=function(a){this.g=a;this.j&&this.j.configure(this.g)};r.start=function(a,b){var c=this,d;return O(function(e){return 1==e.g?(c.h=b,c.C=b.isLowLatencyMode(),E(e,hv(c,[a]),2)):3!=e.g?(d=e.h,c.L=d.uri,E(e,iv(c,d.data,a),3)):e.return(c.o)})};
1003
1002
  r.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.W&&(a.push(this.W.destroy()),this.W=null);this.g=this.h=null;this.Ea.clear();this.o=null;this.i.clear();this.H.clear();this.G.clear();this.s.clear();this.ba.clear();this.ga.clear();this.K.clear();this.wa.clear();this.ma.clear();this.j&&this.j.destroy();return Promise.all(a)};
1004
- r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!kv(a))return m.return();b=[];c=Array.from(a.i.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(lv(a,g));return E(m,Promise.all(b),2)}mv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.Yc});d.length&&!h&&(k=nv,ov(a,k.dh),l=d.map(function(n){return n.Ab}),a.l.Ua(Math.min.apply(Math,x(l))),a.h.updateDuration());
1005
- h&&pv(a);H(m)})};function qv(a,b){return kv(a)?a.N.get(b.type):b.Rd}
1006
- function lv(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L,N,M,P;return O(function(R){if(1==R.g){c=[];d=t(b.M());for(e=d.next();!e.done;e=d.next())f=e.value,g=new sc(f),h=g.g,b.vd&&(0<=b.kb&&h.add("_HLS_msn",String(b.kb)),0<=b.lb&&h.add("_HLS_part",String(b.lb))),b.wd&&h.add("_HLS_skip","YES"),Ic(h)&&wc(g,h),c.push(g.toString());return E(R,iv(a,c,!0),2)}if(3!=R.g){k=R.h;if(!b.stream.segmentIndex)return R.return();l=Zu(a.ya,k.data);if(1!=l.type)throw new T(2,4,4017);m=k.uri;m==k.originalUri||
1007
- b.M().includes(m)||b.Cg.push(m);n=Su(l.g,"EXT-X-DEFINE");q=rv(a,n,m);p=b.stream;u=qv(a,b);return E(R,sv(a,l,p.mimeType,b.M,q),3)}v=R.h;w=v.keyIds;A=v.drmInfos;y=function(Q,ea){return Q.size===ea.size&&[].concat(x(Q)).every(function(ba){return ea.has(ba)})};y(p.keyIds,w)||(p.keyIds=w,p.drmInfos=A,a.h.newDrmInfo(p));C=tv(a,l,u,q,b.M,b.type);z=C.segments;if(B=C.bandwidth)p.bandwidth=B;p.segmentIndex.gd(z,a.l.ib());z.length&&(D=Vu(l.g,"EXT-X-MEDIA-SEQUENCE",0),F=(I=Uu(l.g,"EXT-X-SKIP"))?Number(Z(I,"SKIPPED-SEGMENTS")):
1008
- 0,K=uv(D,z),J=K.kb,G=K.lb,b.kb=J+F,b.lb=G,L=u.get(D),p.segmentIndex.Ma(L));N=p.segmentIndex.g[0]||null;b.cc=N.startTime;M=z[z.length-1];b.Ab=M.endTime;if(P=Uu(l.g,"EXT-X-ENDLIST"))b.Yc=!0;vv(a,l);H(R)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
1009
- function wv(a,b){for(var c=-1==a.J,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=qv(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.J=Math.max(a.J,k));e.Be=k;break}}}}if(!(0>a.J))for(b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,xv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.J-c.Be,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),yv(a,
1003
+ r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){if(!jv(a))return m.return();b=[];c=Array.from(a.i.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(kv(a,g));return E(m,Promise.all(b),2)}lv(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.Yc});d.length&&!h&&(k=mv,nv(a,k.bh),l=d.map(function(n){return n.Ab}),a.l.Ua(Math.min.apply(Math,x(l))),a.h.updateDuration());
1004
+ h&&ov(a);H(m)})};function pv(a,b){return jv(a)?a.N.get(b.type):b.Rd}
1005
+ function kv(a,b){var c,d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L,N,M,P;return O(function(R){if(1==R.g){c=[];d=t(b.M());for(e=d.next();!e.done;e=d.next())f=e.value,g=new sc(f),h=g.g,b.vd&&(0<=b.kb&&h.add("_HLS_msn",String(b.kb)),0<=b.lb&&h.add("_HLS_part",String(b.lb))),b.wd&&h.add("_HLS_skip","YES"),Ic(h)&&wc(g,h),c.push(g.toString());return E(R,hv(a,c,!0),2)}if(3!=R.g){k=R.h;if(!b.stream.segmentIndex)return R.return();l=Yu(a.ya,k.data);if(1!=l.type)throw new T(2,4,4017);m=k.uri;m==k.originalUri||
1006
+ b.M().includes(m)||b.Cg.push(m);n=Ru(l.g,"EXT-X-DEFINE");q=qv(a,n,m);p=b.stream;u=pv(a,b);return E(R,rv(a,l,p.mimeType,b.M,q),3)}v=R.h;w=v.keyIds;A=v.drmInfos;y=function(Q,ea){return Q.size===ea.size&&[].concat(x(Q)).every(function(ba){return ea.has(ba)})};y(p.keyIds,w)||(p.keyIds=w,p.drmInfos=A,a.h.newDrmInfo(p));C=sv(a,l,u,q,b.M,b.type);z=C.segments;if(B=C.bandwidth)p.bandwidth=B;p.segmentIndex.gd(z,a.l.ib());z.length&&(D=Uu(l.g,"EXT-X-MEDIA-SEQUENCE",0),F=(I=Tu(l.g,"EXT-X-SKIP"))?Number(Z(I,"SKIPPED-SEGMENTS")):
1007
+ 0,K=tv(D,z),J=K.kb,G=K.lb,b.kb=J+F,b.lb=G,L=u.get(D),p.segmentIndex.La(L));N=p.segmentIndex.g[0]||null;b.cc=N.startTime;M=z[z.length-1];b.Ab=M.endTime;if(P=Tu(l.g,"EXT-X-ENDLIST"))b.Yc=!0;uv(a,l);H(R)})}r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(a){this.j&&this.j.banLocation(a)};
1008
+ function vv(a,b){for(var c=-1==a.J,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=pv(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.J=Math.max(a.J,k));e.Be=k;break}}}}if(!(0>a.J))for(b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,wv(a,c.type)&&(d=c.stream.segmentIndex))if(e=a.J-c.Be,0<e&&(d.g.splice(0,e),d=d.g[0]||null))d=-d.startTime,c.stream.segmentIndex.offset(d),xv(a,
1010
1009
  c,d)}
1011
- function zv(a,b){if(Infinity==a.aa){b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.stream.segmentIndex.g[0]||null,null!=c&&null!=c.h&&(a.aa=Math.min(a.aa,c.h))}b=a.aa;if(Infinity!=b){c=t(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!xv(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.h)$a("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.M(),"Expect AV sync issues!");else for(yv(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.Jf(b)}}}}
1012
- function yv(a,b,c){b.cc+=c;b.Ab+=c;a=qv(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.M()}
1013
- function jv(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L,N,M,P,R,Q,ea,ba,na,Ka,wa,ta,Na,Ua;return O(function(ua){switch(ua.g){case 1:d=Zu(a.ya,b);e=Su(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new ok(null,0);a.l.ic(!0);k=function(){return[c]};if(1==d.type)return a.da=!1,w=Su(d.g,"EXT-X-DEFINE"),A=rv(a,w,a.L),E(ua,Av(a,d,k,A),7);Bv(a,e);l=Su(d.g,"EXT-X-MEDIA");m=Su(d.g,"EXT-X-STREAM-INF");n=Su(d.g,"EXT-X-IMAGE-STREAM-INF");q=Su(d.g,"EXT-X-I-FRAME-STREAM-INF");p=Su(d.g,"EXT-X-SESSION-KEY");
1014
- u=Su(d.g,"EXT-X-SESSION-DATA");v=Su(d.g,"EXT-X-CONTENT-STEERING");Cv(a,u);return E(ua,Dv(a,v),4);case 4:return Ev(a,m),Fv(a,l),E(ua,Gv(a,m,p,l,k,a.s),5);case 5:return f=ua.h,g=Hv(a,l),E(ua,Iv(a,n,q),6);case 6:h=ua.h;ua.u(3);break;case 7:return y=ua.h,C=y.type,z=y.mimeType,B=y.codecs,D=y.language,I=y.height,F=y.width,K=y.channelCount,J=y.sampleRate,G=y.closedCaptions,L=y.od,N=y.colorGamut,E(ua,Jv(a,a.B++,A,d,k,B,C,D,!0,"Media Playlist",K,G,null,!1,J,!1,z),8);case 8:M=ua.h,a.i.set(c,M),"video"==C&&
1015
- Kv(M.stream,F,I,null,L,null,N),f.push({id:0,language:Ce(D||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==C?M.stream:null,video:"video"==C?M.stream:null,bandwidth:M.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);1==d.type&&(kv(a)&&(Lv(a,d),P=a.m,a.A.X(P)),R=Array.from(a.i.values()),Mv(a,R),pv(a));a.o={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,
1010
+ function yv(a,b){if(Infinity==a.aa){b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.stream.segmentIndex.g[0]||null,null!=c&&null!=c.h&&(a.aa=Math.min(a.aa,c.h))}b=a.aa;if(Infinity!=b){c=t(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!wv(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(f)if(null==f.h)$a("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.M(),"Expect AV sync issues!");else for(xv(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.Jf(b)}}}}
1011
+ function xv(a,b,c){b.cc+=c;b.Ab+=c;a=pv(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.M()}
1012
+ function iv(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L,N,M,P,R,Q,ea,ba,na,Ka,wa,ta,Na,Ua;return O(function(ua){switch(ua.g){case 1:d=Yu(a.ya,b);e=Ru(d.g,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new ok(null,0);a.l.ic(!0);k=function(){return[c]};if(1==d.type)return a.da=!1,w=Ru(d.g,"EXT-X-DEFINE"),A=qv(a,w,a.L),E(ua,zv(a,d,k,A),7);Av(a,e);l=Ru(d.g,"EXT-X-MEDIA");m=Ru(d.g,"EXT-X-STREAM-INF");n=Ru(d.g,"EXT-X-IMAGE-STREAM-INF");q=Ru(d.g,"EXT-X-I-FRAME-STREAM-INF");p=Ru(d.g,"EXT-X-SESSION-KEY");
1013
+ u=Ru(d.g,"EXT-X-SESSION-DATA");v=Ru(d.g,"EXT-X-CONTENT-STEERING");Bv(a,u);return E(ua,Cv(a,v),4);case 4:return Dv(a,m),Ev(a,l),E(ua,Fv(a,m,p,l,k,a.s),5);case 5:return f=ua.h,g=Gv(a,l),E(ua,Hv(a,n,q),6);case 6:h=ua.h;ua.u(3);break;case 7:return y=ua.h,C=y.type,z=y.mimeType,B=y.codecs,D=y.language,I=y.height,F=y.width,K=y.channelCount,J=y.sampleRate,G=y.closedCaptions,L=y.od,N=y.colorGamut,E(ua,Iv(a,a.B++,A,d,k,B,C,D,!0,"Media Playlist",K,G,null,!1,J,!1,z),8);case 8:M=ua.h,a.i.set(c,M),"video"==C&&
1014
+ Jv(M.stream,F,I,null,L,null,N),f.push({id:0,language:Ce(D||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==C?M.stream:null,video:"video"==C?M.stream:null,bandwidth:M.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);1==d.type&&(jv(a)&&(Kv(a,d),P=a.m,a.A.X(P)),R=Array.from(a.i.values()),Lv(a,R),ov(a));a.o={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,
1016
1015
  ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null};if(a.$||!a.g.hls.disableCodecGuessing){ua.u(9);break}Q=[];ea=t(a.o.variants);for(ba=ea.next();!ba.done;ba=ea.next())na=ba.value,na.audio&&""===na.audio.codecs&&Q.push(na.audio.createSegmentIndex()),na.video&&""===na.video.codecs&&Q.push(na.video.createSegmentIndex());return E(ua,Promise.all(Q),9);case 9:a.h.makeTextStreamsForClosedCaptions(a.o);if(1==f.length){Ka=
1017
1016
  [];wa=f[0];ta=t([wa.video,wa.audio]);for(Na=ta.next();!Na.done;Na=ta.next())(Ua=Na.value)&&!Ua.segmentIndex&&Ka.push(Ua.createSegmentIndex());if(0<Ka.length)return E(ua,Promise.all(Ka),0)}ua.u(0)}})}
1018
- function Av(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F;return O(function(K){switch(K.g){case 1:e=Ws(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return K.return(e);f=b.segments[0];g=Wu(c(),f.h,d);h=g[0];k=new sc(h);l=k.Oa.split(".").pop();if(m=Nv[l])return K.return(Ws(m));n=zg;q=null;p=Ov(a,b,f.g,c,d);a.ba.clear();if(!p){K.u(2);break}u=ol(p.M(),p.Xb(),p.Vb(),a.g.retryParameters);return E(K,Pv(a,u,n,{type:0}),3);case 3:v=K.h,q=v.data;case 2:w=0;A=null;if(y=Uu(f.g,"EXT-X-BYTERANGE"))C=
1019
- t(Qv(null,y.value)),w=C.next().value,A=C.next().value;z=ol(g,w,A,a.g.retryParameters);return E(K,Pv(a,z,n,{type:1}),4);case 4:B=K.h;(D=B.headers["content-type"])&&(D=D.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==D){var J=B.data;var G=Bb(J);G=(new vj).parse(G);var L=G.Tc();G=G.Ue();var N=[],M=!1,P=!1;switch(L.audio){case "aac":case "aac-loas":N.push("mp4a.40.2");M=!0;break;case "mp3":N.push("mp4a.40.34");M=!0;break;case "ac3":N.push("ac-3");M=!0;break;case "ec3":N.push("ec-3");M=!0;break;
1017
+ function zv(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F;return O(function(K){switch(K.g){case 1:e=Vs(a.g.hls.mediaPlaylistFullMimeType);if(!b.segments.length)return K.return(e);f=b.segments[0];g=Vu(c(),f.h,d);h=g[0];k=new sc(h);l=k.Na.split(".").pop();if(m=Mv[l])return K.return(Vs(m));n=zg;q=null;p=Nv(a,b,f.g,c,d);a.ba.clear();if(!p){K.u(2);break}u=ol(p.M(),p.Xb(),p.Vb(),a.g.retryParameters);return E(K,Ov(a,u,n,{type:0}),3);case 3:v=K.h,q=v.data;case 2:w=0;A=null;if(y=Tu(f.g,"EXT-X-BYTERANGE"))C=
1018
+ t(Pv(null,y.value)),w=C.next().value,A=C.next().value;z=ol(g,w,A,a.g.retryParameters);return E(K,Ov(a,z,n,{type:1}),4);case 4:B=K.h;(D=B.headers["content-type"])&&(D=D.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==D){var J=B.data;var G=Bb(J);G=(new vj).parse(G);var L=G.Tc();G=G.Ue();var N=[],M=!1,P=!1;switch(L.audio){case "aac":case "aac-loas":N.push("mp4a.40.2");M=!0;break;case "mp3":N.push("mp4a.40.34");M=!0;break;case "ac3":N.push("ac-3");M=!0;break;case "ec3":N.push("ec-3");M=!0;break;
1020
1019
  case "opus":N.push("opus"),M=!0}switch(L.video){case "avc":G.codec?N.push(G.codec):N.push("avc1.42E01E");P=!0;break;case "hvc":G.codec?N.push(G.codec):N.push("hvc1.1.6.L93.90");P=!0;break;case "av1":N.push("av01.0.01M.08"),P=!0}if(N.length){L=M&&!P;M=new Map;if(P){P=new Hb("video/mp2t");P.i(J);J=t(P.j());for(var R=J.next();!R.done;R=J.next())R=R.value,M.set(R,R);P.g()}G={type:L?"audio":"video",mimeType:"video/mp2t",codecs:N.join(", "),language:null,height:G.height,width:G.width,channelCount:null,
1021
- sampleRate:null,closedCaptions:M,od:null,colorGamut:null}}else G=null;if(I=G)return K.return(I)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"fmp4"==l||"video/mp4"==D||"audio/mp4"==D||"video/iso.segment"==D)if(F=Xs(q,B.data))return K.return(F);return K.return(e)}})}
1022
- function pv(a){if(kv(a)){if(a.na==Rv){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Ab),c=Math.min(c,e.cc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.s);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.he(b)}}else a.l.Ua(Sv(a));if(!a.l.o)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
1023
- c.h&&a.l.Lg(c.h);a.l.Od()}function Bv(a,b){var c=(new sc(a.L)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.s.has(d)||a.s.set(d,f));e&&(d=c.get(e)[0])&&!a.s.has(d)&&a.s.set(e,d)}}
1024
- function rv(a,b,c){c=(new sc(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.s.get(f))&&d.set(f,e)}return d}
1025
- function Ev(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=Tv(a,d);if(f){var g=Rd(Td,d);a.G.set(f,g);Ob(d,g)}e&&(f=Rd("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Rd("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
1026
- function Cv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Wu([a.L],c,a.s)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new U("sessiondata",e);if(a.h)a.h.onEvent(c)}}
1027
- function Dv(a,b){var c,d,e,f,g,h;return O(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new at(a.h);a.j.configure(a.g);a.j.i=[a.L];a.j.setManifestType("HLS");a.j.h=g;c=bt(a.j,h);break}return E(k,c,0)})}
1028
- function Hv(a,b){var c=Tu(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Uv(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Pu(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Vv(Td,d)||Wv(Td),Xv(f.stream)}}return b.filter(function(g){return g})}
1029
- function Xv(a){var b=new Set([Xd(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Rb(function(c){c.mimeType&&b.add(Xd(c.mimeType,a.codecs))});a.fullMimeTypes=b}
1030
- function Iv(a,b,c){var d,e;return O(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return O(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);xa(m,2);return E(m,Yv(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=Aa(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Pu(g,"URI"),k=Z(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
1031
- q=Z(g,"CHARACTERISTICS"),p=Zv(a,a.B++,[h],k,"image",m,!1,n,null,null,q,!1,null,!1),u=Z(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),w=v.next().value,A=v.next().value;p.stream.width=Number(w)||void 0;p.stream.height=Number(A)||void 0;var y=Z(g,"BANDWIDTH");y&&(p.stream.bandwidth=Number(y));a.i.set(h,p);l=p}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(C){if(a.g.hls.ignoreImageStreamFailures)return null;throw C;}})),E(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
1032
- function $v(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Nu(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Uv(a,d[g],c)}
1033
- function Gv(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L,N,M,P,R,Q,ea,ba,na,Ka,wa,ta,Na;return O(function(Ua){switch(Ua.g){case 1:g=[];h=new Set;if(!(0<c.length)){Ua.u(2);break}k=t(c);l=k.next();case 3:if(l.done){Ua.u(2);break}m=l.value;n=Pu(m,"METHOD");q=Z(m,"KEYFORMAT")||"identity";p=null;if("NONE"==n){Ua.u(4);break}if(aw(n)){u=Wu(e(),Pu(m,"URI"),f);v=u.sort().join("");a.K.has(v)||(w=rg(u,a.g.retryParameters),A=Pv(a,w,6),a.K.set(v,A));Ua.u(4);break}if("identity"!=q){p=(y=bw[q])?
1034
- y(m,""):null;Ua.u(6);break}return E(Ua,cw(a,m,"",e,null,f),9);case 9:p=Ua.h;case 6:if(p){if(p.keyIds)for(C=t(p.keyIds),z=C.next();!z.done;z=C.next())B=z.value,h.add(B);g.push(p)}case 4:l=k.next();Ua.u(3);break;case 2:D={};I=t(b);for(F=I.next();!F.done;F=I.next())K=F.value,J=Nu(K,!a.j),D[J]?D[J].push(K):D[J]=[K];G=[];for(L in D)N=D[L],M=N[0],P=Z(M,"FRAME-RATE"),R=Number(Z(M,"AVERAGE-BANDWIDTH"))||Number(Pu(M,"BANDWIDTH")),Q=Z(M,"RESOLUTION"),ea=t(Q?Q.split("x"):[null,null]),ba=ea.next().value,na=ea.next().value,
1035
- Ka=Z(M,"VIDEO-RANGE"),(wa=Z(M,"REQ-VIDEO-LAYOUT"))&&wa.includes(",")&&(ta=wa.split(",").filter(function(ua){return"CH-STEREO"==ua||"CH-MONO"==ua}),wa=ta[0]),wa=wa||"CH-MONO",Na=dw(a,N,d),G.push.apply(G,x(ew(a,Na.audio,Na.video,R,ba,na,P,Ka,wa,g,h)));return Ua.return(G.filter(function(ua){return null!=ua}))}})}
1036
- function dw(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Z(m,"AUDIO");var n=Z(m,"VIDEO"),q=l||n;q&&(f.includes(q)||f.push(q),(m=Z(m,"PATHWAY-ID"))&&e.set(q,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(v){return f.includes(Pu(v,"GROUP-ID"))}),$v(a,k,e));k=(e=f.sort().join(","))&&a.H.has(e)?a.H.get(e):[];g?d.audio.push.apply(d.audio,x(k)):h&&d.video.push.apply(d.video,x(k));l=!1;var p=b.map(function(v){return Pu(v,
1037
- "URI")});h=d.audio.find(function(v){return v&&v.M().find(function(w){return p.includes(w)})});g=Tv(a,b[0]);n=Rd("video",g);(q=Rd("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&q&&n?(h="video",g=[[n,q].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=q=n=l=null;!k.length&&(c=c.find(function(v){var w=Z(v,"URI")||"",A=Z(v,"TYPE");v=Pu(v,"GROUP-ID");return"SUBTITLES"!=A&&""==w&&f.includes(v)}))&&(l=Z(c,"LANGUAGE"),
1038
- n=Z(c,"NAME"),q=fw(c),gw(c),m=Z(c,"CHARACTERISTICS"),u=hw(c));a=iw(a,b,g,h,l,n,q,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
1039
- function Tv(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.$=0<c.length;a.$||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,x(b)));return Ys(a)}function fw(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
1040
- function hw(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function gw(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
1041
- function ew(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),q=n.next();!q.done;q=n.next())Kv(q.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var p=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=p?p.stream:null)k.drmInfos=l,k.keyIds=m;k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);n=f?f.stream.drmInfos:null;q=p?p.stream.drmInfos:null;
1020
+ sampleRate:null,closedCaptions:M,od:null,colorGamut:null}}else G=null;if(I=G)return K.return(I)}else if("mp4"==l||"cmfv"==l||"m4s"==l||"fmp4"==l||"video/mp4"==D||"audio/mp4"==D||"video/iso.segment"==D)if(F=Ws(q,B.data))return K.return(F);return K.return(e)}})}
1021
+ function ov(a){if(jv(a)){if(a.na==Qv){for(var b,c=b=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Ab),c=Math.min(c,e.cc));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.l.s);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.he(b)}}else a.l.Ua(Rv(a));if(!a.l.o)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=c.stream.segmentIndex.get(0))&&
1022
+ c.h&&a.l.Lg(c.h);a.l.Od()}function Av(a,b){var c=(new sc(a.L)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"QUERYPARAM");d&&f&&(a.s.has(d)||a.s.set(d,f));e&&(d=c.get(e)[0])&&!a.s.has(d)&&a.s.set(e,d)}}
1023
+ function qv(a,b,c){c=(new sc(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Z(f,"NAME"),h=Z(f,"VALUE");e=Z(f,"QUERYPARAM");f=Z(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.s.get(f))&&d.set(f,e)}return d}
1024
+ function Dv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=Sv(a,d);if(f){var g=Rd(Td,d);a.G.set(f,g);Ob(d,g)}e&&(f=Rd("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Rd("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
1025
+ function Bv(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"DATA-ID");c=Z(d,"URI");var f=Z(d,"LANGUAGE");d=Z(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Vu([a.L],c,a.s)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new U("sessiondata",e);if(a.h)a.h.onEvent(c)}}
1026
+ function Cv(a,b){var c,d,e,f,g,h;return O(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Z(f,"PATHWAY-ID"),h=Z(f,"SERVER-URI"),g&&h){a.j=new $s(a.h);a.j.configure(a.g);a.j.i=[a.L];a.j.setManifestType("HLS");a.j.h=g;c=at(a.j,h);break}return E(k,c,0)})}
1027
+ function Gv(a,b){var c=Su(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Tv(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Ou(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Uv(Td,d)||Vv(Td),Wv(f.stream)}}return b.filter(function(g){return g})}
1028
+ function Wv(a){var b=new Set([Xd(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Rb(function(c){c.mimeType&&b.add(Xd(c.mimeType,a.codecs))});a.fullMimeTypes=b}
1029
+ function Hv(a,b,c){var d,e;return O(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return O(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);xa(m,2);return E(m,Xv(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=Aa(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Ou(g,"URI"),k=Z(g,"CODECS")||"";if(a.i.has(h))var l=a.i.get(h);else{var m=Z(g,"LANGUAGE"),n=Z(g,"NAME"),
1030
+ q=Z(g,"CHARACTERISTICS"),p=Yv(a,a.B++,[h],k,"image",m,!1,n,null,null,q,!1,null,!1),u=Z(g,"RESOLUTION"),v=t(u?u.split("x"):[null,null]),w=v.next().value,A=v.next().value;p.stream.width=Number(w)||void 0;p.stream.height=Number(A)||void 0;var y=Z(g,"BANDWIDTH");y&&(p.stream.bandwidth=Number(y));a.i.set(h,p);l=p}g=l;return"mjpg"!==g.stream.codecs?null:g.stream}catch(C){if(a.g.hls.ignoreImageStreamFailures)return null;throw C;}})),E(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}
1031
+ function Zv(a,b,c){b=b.filter(function(h){var k=Z(h,"URI")||"";return"SUBTITLES"!=Z(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Mu(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Tv(a,d[g],c)}
1032
+ function Fv(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L,N,M,P,R,Q,ea,ba,na,Ka,wa,ta,Na;return O(function(Ua){switch(Ua.g){case 1:g=[];h=new Set;if(!(0<c.length)){Ua.u(2);break}k=t(c);l=k.next();case 3:if(l.done){Ua.u(2);break}m=l.value;n=Ou(m,"METHOD");q=Z(m,"KEYFORMAT")||"identity";p=null;if("NONE"==n){Ua.u(4);break}if($v(n)){u=Vu(e(),Ou(m,"URI"),f);v=u.sort().join("");a.K.has(v)||(w=rg(u,a.g.retryParameters),A=Ov(a,w,6),a.K.set(v,A));Ua.u(4);break}if("identity"!=q){p=(y=aw[q])?
1033
+ y(m,""):null;Ua.u(6);break}return E(Ua,bw(a,m,"",e,null,f),9);case 9:p=Ua.h;case 6:if(p){if(p.keyIds)for(C=t(p.keyIds),z=C.next();!z.done;z=C.next())B=z.value,h.add(B);g.push(p)}case 4:l=k.next();Ua.u(3);break;case 2:D={};I=t(b);for(F=I.next();!F.done;F=I.next())K=F.value,J=Mu(K,!a.j),D[J]?D[J].push(K):D[J]=[K];G=[];for(L in D)N=D[L],M=N[0],P=Z(M,"FRAME-RATE"),R=Number(Z(M,"AVERAGE-BANDWIDTH"))||Number(Ou(M,"BANDWIDTH")),Q=Z(M,"RESOLUTION"),ea=t(Q?Q.split("x"):[null,null]),ba=ea.next().value,na=ea.next().value,
1034
+ Ka=Z(M,"VIDEO-RANGE"),(wa=Z(M,"REQ-VIDEO-LAYOUT"))&&wa.includes(",")&&(ta=wa.split(",").filter(function(ua){return"CH-STEREO"==ua||"CH-MONO"==ua}),wa=ta[0]),wa=wa||"CH-MONO",Na=cw(a,N,d),G.push.apply(G,x(dw(a,Na.audio,Na.video,R,ba,na,P,Ka,wa,g,h)));return Ua.return(G.filter(function(ua){return null!=ua}))}})}
1035
+ function cw(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Z(m,"AUDIO");var n=Z(m,"VIDEO"),q=l||n;q&&(f.includes(q)||f.push(q),(m=Z(m,"PATHWAY-ID"))&&e.set(q,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(v){return f.includes(Ou(v,"GROUP-ID"))}),Zv(a,k,e));k=(e=f.sort().join(","))&&a.H.has(e)?a.H.get(e):[];g?d.audio.push.apply(d.audio,x(k)):h&&d.video.push.apply(d.video,x(k));l=!1;var p=b.map(function(v){return Ou(v,
1036
+ "URI")});h=d.audio.find(function(v){return v&&v.M().find(function(w){return p.includes(w)})});g=Sv(a,b[0]);n=Rd("video",g);(q=Rd("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&q&&n?(h="video",g=[[n,q].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=q=n=l=null;!k.length&&(c=c.find(function(v){var w=Z(v,"URI")||"",A=Z(v,"TYPE");v=Ou(v,"GROUP-ID");return"SUBTITLES"!=A&&""==w&&f.includes(v)}))&&(l=Z(c,"LANGUAGE"),
1037
+ n=Z(c,"NAME"),q=ew(c),fw(c),m=Z(c,"CHARACTERISTICS"),u=gw(c));a=hw(a,b,g,h,l,n,q,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
1038
+ function Sv(a,b){var c=Z(b,"CODECS")||"";b=Z(b,"SUPPLEMENTAL-CODECS");a.$=0<c.length;a.$||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,x(b)));return Xs(a)}function ew(a){return(a=Z(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
1039
+ function gw(a){return(a=Z(a,"SAMPLE-RATE"))?parseInt(a,10):null}function fw(a){return(a=Z(a,"CHANNELS"))?a.includes("/JOC"):!1}
1040
+ function dw(a,b,c,d,e,f,g,h,k,l,m){for(var n=t(c),q=n.next();!q.done;q=n.next())Jv(q.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var p=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=p?p.stream:null)k.drmInfos=l,k.keyIds=m;k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);n=f?f.stream.drmInfos:null;q=p?p.stream.drmInfos:null;
1042
1041
  p=p?p.M().sort().join(","):"";var u=f?f.M().sort().join(","):"";p=p+" - "+u;h&&k&&!Lc(n,q)||a.Ea.has(p)||(h={id:a.B++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Ea.add(p))}return e}
1043
- function Fv(a,b){b=Tu(b,"CLOSED-CAPTIONS");a.da=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=Ce(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=Pu(d,"GROUP-ID");d=Pu(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
1044
- function Uv(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Pu(k,"URI");k=Pu(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=Pu(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Td);if(k==Td)b=Z(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.G.has(l)){b=a.G.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.B++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
1045
- m=n.next().value;n=n.next().value;(m=c.get(m))&&et(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?fw(h):null;var q="audio"==k?gw(h):!1,p=Z(h,"CHARACTERISTICS"),u="YES"==Z(h,"FORCED");h="audio"==k?hw(h):null;d=Zv(a,l,d,b,k,c,m,f,n,null,p,u,h,q);d.stream&&(d.stream.groupId=g);a.H.has(g)?a.H.get(g).push(d):a.H.set(g,[d]);a.i.set(e,d);return d}
1046
- function Yv(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(q){if(1==q.g){c=Pu(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.i.has(c))return q.return(a.i.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=Zv(a,a.B++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?E(q,h.stream.createSegmentIndex(),3):q.u(2)}2!=q.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
1042
+ function Ev(a,b){b=Su(b,"CLOSED-CAPTIONS");a.da=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"LANGUAGE");c=Ce(e||"und");e||(e=Z(d,"NAME"))&&(c=e);e=Ou(d,"GROUP-ID");d=Ou(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
1043
+ function Tv(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Ou(k,"URI");k=Ou(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=Ou(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Td);if(k==Td)b=Z(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.G.has(l)){b=a.G.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.B++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
1044
+ m=n.next().value;n=n.next().value;(m=c.get(m))&&dt(a.j,l,m,n)}}c=Z(h,"LANGUAGE");f=Z(h,"NAME");m="YES"==Z(h,"DEFAULT");n="audio"==k?ew(h):null;var q="audio"==k?fw(h):!1,p=Z(h,"CHARACTERISTICS"),u="YES"==Z(h,"FORCED");h="audio"==k?gw(h):null;d=Yv(a,l,d,b,k,c,m,f,n,null,p,u,h,q);d.stream&&(d.stream.groupId=g);a.H.has(g)?a.H.get(g).push(d):a.H.set(g,[d]);a.i.set(e,d);return d}
1045
+ function Xv(a,b){var c,d,e,f,g,h,k,l,m,n;return O(function(q){if(1==q.g){c=Ou(b,"URI");d=Z(b,"CODECS","jpeg")||"";if(a.i.has(c))return q.return(a.i.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=Yv(a,a.B++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=Z(b,"RESOLUTION"))?E(q,h.stream.createSegmentIndex(),3):q.u(2)}2!=q.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
1047
1046
  Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return q.return(h)})}
1048
- function iw(a,b,c,d,e,f,g,h,k){for(var l=a.B++,m=[],n=t(b),q=n.next();!q.done;q=n.next()){var p=q.value;q=Pu(p,"URI");p=Z(p,"PATHWAY-ID");a.j&&p&&et(a.j,l,p,q);m.push(q)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d)if(b){if("NONE"!=b){b=a.F.get(b);break a}a.da=!1}else if(!b&&a.F.size)for(b=t(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}b=null}c=Qd(d,c);d=Zv(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
1049
- function Zv(a,b,c,d,e,f,g,h,k,l,m,n,q,p){function u(B){var D,I,F,K,J,G,L,N,M,P,R,Q,ea,ba,na,Ka,wa,ta,Na,Ua,ua,Ca;return O(function(ob){switch(ob.g){case 1:return D=Vd,I=y.M(),E(ob,iv(a,y.M(),!0),2);case 2:F=ob.h;if(B.aborted)return ob.return();K=F.uri;K==F.originalUri||I.includes(K)||A.push(K);J=Zu(a.ya,F.data);if(1!=J.type)throw new T(2,4,4017);G=Su(J.g,"EXT-X-DEFINE");L=rv(a,G,K);N=void 0;M=!1;if(!(!a.$&&a.g.hls.disableCodecGuessing||a.da&&e==D.ea&&!a.g.hls.disableClosedCaptionsDetection)){ob.u(3);
1050
- break}if(P=0<J.segments.length)R=J.segments[0],Uu(R.g,"EXT-X-GAP")&&(P=!1);if(!P){ob.u(3);break}a.da=!1;return E(ob,Av(a,J,v,L),5);case 5:Q=ob.h,!Q.closedCaptions.size||l&&l.size==Q.closedCaptions.size||(l=Q.closedCaptions,M=!0),!a.$&&a.g.hls.disableCodecGuessing&&(N=Q.mimeType,d=Q.codecs);case 3:return ea=kv(a),E(ob,Jv(a,0,L,J,v,d,e,f,g,h,k,l,m,n,q,p,N),6);case 6:ba=ob.h;if(B.aborted)return ob.return();na=ba.stream;kv(a)&&!ea&&Lv(a,J);y.cc=ba.cc;y.Ab=ba.Ab;y.wd=ba.wd;y.vd=ba.vd;y.Yc=ba.Yc;y.Rd=ba.Rd;
1051
- y.kb=ba.kb;y.lb=ba.lb;y.ef=!0;w.segmentIndex=na.segmentIndex;w.encrypted=na.encrypted;w.drmInfos=na.drmInfos;w.keyIds=na.keyIds;w.mimeType=na.mimeType;w.bandwidth=w.bandwidth||na.bandwidth;w.codecs=w.codecs||na.codecs;w.closedCaptions=w.closedCaptions||na.closedCaptions;Xv(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.o&&M&&a.h.makeTextStreamsForClosedCaptions(a.o);if(e==D.ea||e==D.V)for(Ka=t(a.i.values()),wa=Ka.next();!wa.done;wa=Ka.next())ta=wa.value,ta.ef||ta.type!=e||(ta.stream.mimeType=na.mimeType,
1052
- Xv(ta.stream));e==D.qa&&(Na=na.segmentIndex.get(0))&&Na.ca&&(w.mimeType="application/mp4",Xv(w));jw(a)&&(a.qb?Mv(a,[y]):(a.qb=!0,Ua=Array.from(a.i.values()),ua=Ua.filter(function(Pc){return Pc.stream.segmentIndex}),Mv(a,ua),pv(a),Ca=a.m,0<Ca&&a.A.X(Ca)));H(ob)}})}function v(){return a.j&&1<c.length?ft(a.j,b):A.concat(Xu([a.L],c,a.s))}var w=kw(a,d,e,f,g,h,k,l,m,n,q,p),A=[],y={stream:w,type:e,Cg:A,M:v,cc:0,Ab:0,Rd:new Map,wd:!1,vd:!1,Yc:!1,Be:-1,kb:-1,lb:-1,ef:!1},C=null,z=new AbortController;w.createSegmentIndex=
1053
- function(){if(C)return C;z=new AbortController;return C=new Promise(function(B){B(u(z.signal))})};w.closeSegmentIndex=function(){C&&!w.segmentIndex&&z.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);C=null};return y}function Sv(a){var b=Infinity;a=t(a.i.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.Ab));return b}
1054
- function mv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Rb(function(e){c.push(e)});a.l.hd(c)}function Mv(a,b){if(!kv(a))for(var c=Sv(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.tc(0,c);mv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?wv(a,b):(zv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&wv(a,b))}
1055
- function xv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function jw(a){if(!a.o)return!1;var b=[],c=[];a=t(a.o.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}
1056
- function Jv(a,b,c,d,e,f,g,h,k,l,m,n,q,p,u,v,w){var A,y,C,z,B,D,I,F,K,J,G,L,N,M,P,R,Q,ea,ba,na,Ka;return O(function(wa){switch(wa.g){case 1:var ta=Uu(d.g,"EXT-X-PLAYLIST-TYPE"),Na=Uu(d.g,"EXT-X-ENDLIST");Na=ta&&"VOD"==ta.value||Na;ta=ta&&"EVENT"==ta.value&&!Na;ta=!Na&&!ta;Na?ov(a,hv):ta?ov(a,Rv):ov(a,lw);kv(a)&&vv(a,d);A=kv(a)?a.N.get(g):new Map;y=tv(a,d,A,c,e,g);C=y.segments;z=y.bandwidth;if(w){wa.u(2);break}return E(wa,mw(a,g,f,C),3);case 3:w=wa.h;case 2:return E(wa,sv(a,d,w,e,c),4);case 4:B=wa.h;
1057
- D=B.drmInfos;I=B.keyIds;F=B.encrypted;K=B.hh;if(F&&!D.length&&!K)throw new T(2,4,4026);J=kw(a,f,g,h,k,l,m,n,q,p,u,v);J.encrypted=F;J.drmInfos=D;J.keyIds=I;J.mimeType=w;z&&(J.bandwidth=z);Xv(J);kv(a)&&vv(a,d);G=C[0].startTime;L=C[C.length-1];N=L.endTime;M=new Kk(C);J.segmentIndex=M;R=(P=Uu(d.g,"EXT-X-SERVER-CONTROL"))?null!=Ou(P,"CAN-SKIP-UNTIL"):!1;Q=P?null!=Ou(P,"CAN-BLOCK-RELOAD"):!1;ea=Vu(d.g,"EXT-X-MEDIA-SEQUENCE",0);ba=uv(ea,C);na=ba.kb;Ka=ba.lb;return wa.return({stream:J,type:g,Cg:[],M:e,cc:G,
1058
- Ab:N,wd:R,vd:Q,Yc:!1,Be:-1,kb:na,lb:Ka,Rd:A,ef:!1})}})}function uv(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{kb:a,lb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{kb:a,lb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{kb:a,lb:c}}
1059
- function kw(a,b,c,d,e,f,g,h,k,l,m,n){var q=Vv(c,b)||Wv(c),p=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())p.push(u.value)}k=void 0;u=null;c==Td?k=p.includes("public.accessibility.transcribes-spoken-dialog")&&p.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":p.includes("public.accessibility.describes-video")&&(u="visually impaired");p.length||"subtitle"!==k||p.push("subtitle");a={id:a.B++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1047
+ function hw(a,b,c,d,e,f,g,h,k){for(var l=a.B++,m=[],n=t(b),q=n.next();!q.done;q=n.next()){var p=q.value;q=Ou(p,"URI");p=Z(p,"PATHWAY-ID");a.j&&p&&dt(a.j,l,p,q);m.push(q)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Z(b[0],"CLOSED-CAPTIONS");if("video"==d)if(b){if("NONE"!=b){b=a.F.get(b);break a}a.da=!1}else if(!b&&a.F.size)for(b=t(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}b=null}c=Qd(d,c);d=Yv(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);a.i.set(n,d);return d}
1048
+ function Yv(a,b,c,d,e,f,g,h,k,l,m,n,q,p){function u(B){var D,I,F,K,J,G,L,N,M,P,R,Q,ea,ba,na,Ka,wa,ta,Na,Ua,ua,Ca;return O(function(ob){switch(ob.g){case 1:return D=Vd,I=y.M(),E(ob,hv(a,y.M(),!0),2);case 2:F=ob.h;if(B.aborted)return ob.return();K=F.uri;K==F.originalUri||I.includes(K)||A.push(K);J=Yu(a.ya,F.data);if(1!=J.type)throw new T(2,4,4017);G=Ru(J.g,"EXT-X-DEFINE");L=qv(a,G,K);N=void 0;M=!1;if(!(!a.$&&a.g.hls.disableCodecGuessing||a.da&&e==D.ea&&!a.g.hls.disableClosedCaptionsDetection)){ob.u(3);
1049
+ break}if(P=0<J.segments.length)R=J.segments[0],Tu(R.g,"EXT-X-GAP")&&(P=!1);if(!P){ob.u(3);break}a.da=!1;return E(ob,zv(a,J,v,L),5);case 5:Q=ob.h,!Q.closedCaptions.size||l&&l.size==Q.closedCaptions.size||(l=Q.closedCaptions,M=!0),!a.$&&a.g.hls.disableCodecGuessing&&(N=Q.mimeType,d=Q.codecs);case 3:return ea=jv(a),E(ob,Iv(a,0,L,J,v,d,e,f,g,h,k,l,m,n,q,p,N),6);case 6:ba=ob.h;if(B.aborted)return ob.return();na=ba.stream;jv(a)&&!ea&&Kv(a,J);y.cc=ba.cc;y.Ab=ba.Ab;y.wd=ba.wd;y.vd=ba.vd;y.Yc=ba.Yc;y.Rd=ba.Rd;
1050
+ y.kb=ba.kb;y.lb=ba.lb;y.ef=!0;w.segmentIndex=na.segmentIndex;w.encrypted=na.encrypted;w.drmInfos=na.drmInfos;w.keyIds=na.keyIds;w.mimeType=na.mimeType;w.bandwidth=w.bandwidth||na.bandwidth;w.codecs=w.codecs||na.codecs;w.closedCaptions=w.closedCaptions||na.closedCaptions;Wv(w);w.drmInfos.length&&a.h.newDrmInfo(w);a.o&&M&&a.h.makeTextStreamsForClosedCaptions(a.o);if(e==D.ea||e==D.V)for(Ka=t(a.i.values()),wa=Ka.next();!wa.done;wa=Ka.next())ta=wa.value,ta.ef||ta.type!=e||(ta.stream.mimeType=na.mimeType,
1051
+ Wv(ta.stream));e==D.qa&&(Na=na.segmentIndex.get(0))&&Na.ca&&(w.mimeType="application/mp4",Wv(w));iw(a)&&(a.qb?Lv(a,[y]):(a.qb=!0,Ua=Array.from(a.i.values()),ua=Ua.filter(function(Pc){return Pc.stream.segmentIndex}),Lv(a,ua),ov(a),Ca=a.m,0<Ca&&a.A.X(Ca)));H(ob)}})}function v(){return a.j&&1<c.length?et(a.j,b):A.concat(Wu([a.L],c,a.s))}var w=jw(a,d,e,f,g,h,k,l,m,n,q,p),A=[],y={stream:w,type:e,Cg:A,M:v,cc:0,Ab:0,Rd:new Map,wd:!1,vd:!1,Yc:!1,Be:-1,kb:-1,lb:-1,ef:!1},C=null,z=new AbortController;w.createSegmentIndex=
1052
+ function(){if(C)return C;z=new AbortController;return C=new Promise(function(B){B(u(z.signal))})};w.closeSegmentIndex=function(){C&&!w.segmentIndex&&z.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);C=null};return y}function Rv(a){var b=Infinity;a=t(a.i.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.Ab));return b}
1053
+ function lv(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Rb(function(e){c.push(e)});a.l.hd(c)}function Lv(a,b){if(!jv(a))for(var c=Rv(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.tc(0,c);lv(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?vv(a,b):(yv(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&vv(a,b))}
1054
+ function wv(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function iw(a){if(!a.o)return!1;var b=[],c=[];a=t(a.o.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}
1055
+ function Iv(a,b,c,d,e,f,g,h,k,l,m,n,q,p,u,v,w){var A,y,C,z,B,D,I,F,K,J,G,L,N,M,P,R,Q,ea,ba,na,Ka;return O(function(wa){switch(wa.g){case 1:var ta=Tu(d.g,"EXT-X-PLAYLIST-TYPE"),Na=Tu(d.g,"EXT-X-ENDLIST");Na=ta&&"VOD"==ta.value||Na;ta=ta&&"EVENT"==ta.value&&!Na;ta=!Na&&!ta;Na?nv(a,gv):ta?nv(a,Qv):nv(a,kw);jv(a)&&uv(a,d);A=jv(a)?a.N.get(g):new Map;y=sv(a,d,A,c,e,g);C=y.segments;z=y.bandwidth;if(w){wa.u(2);break}return E(wa,lw(a,g,f,C),3);case 3:w=wa.h;case 2:return E(wa,rv(a,d,w,e,c),4);case 4:B=wa.h;
1056
+ D=B.drmInfos;I=B.keyIds;F=B.encrypted;K=B.gh;if(F&&!D.length&&!K)throw new T(2,4,4026);J=jw(a,f,g,h,k,l,m,n,q,p,u,v);J.encrypted=F;J.drmInfos=D;J.keyIds=I;J.mimeType=w;z&&(J.bandwidth=z);Wv(J);jv(a)&&uv(a,d);G=C[0].startTime;L=C[C.length-1];N=L.endTime;M=new Kk(C);J.segmentIndex=M;R=(P=Tu(d.g,"EXT-X-SERVER-CONTROL"))?null!=Nu(P,"CAN-SKIP-UNTIL"):!1;Q=P?null!=Nu(P,"CAN-BLOCK-RELOAD"):!1;ea=Uu(d.g,"EXT-X-MEDIA-SEQUENCE",0);ba=tv(ea,C);na=ba.kb;Ka=ba.lb;return wa.return({stream:J,type:g,Cg:[],M:e,cc:G,
1057
+ Ab:N,wd:R,vd:Q,Yc:!1,Be:-1,kb:na,lb:Ka,Rd:A,ef:!1})}})}function tv(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{kb:a,lb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{kb:a,lb:c};c=d.length-1;d[d.length-1].preload||(a++,c=0);return{kb:a,lb:c}}
1058
+ function jw(a,b,c,d,e,f,g,h,k,l,m,n){var q=Uv(c,b)||Vv(c),p=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())p.push(u.value)}k=void 0;u=null;c==Td?k=p.includes("public.accessibility.transcribes-spoken-dialog")&&p.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":p.includes("public.accessibility.describes-video")&&(u="visually impaired");p.length||"subtitle"!==k||p.push("subtitle");a={id:a.B++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1060
1059
  segmentIndex:null,mimeType:q,codecs:b,kind:c==Td?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Ce(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:p,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,
1061
- fullMimeTypes:new Set};Xv(a);return a}
1062
- function sv(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L,N,M,P,R;return O(function(Q){switch(Q.g){case 1:f=new Map;if(b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Su(k.g,"EXT-X-KEY"),m=null,l.length)for(m=Ov(a,b,k.g,d,e),n=t(l),q=n.next();!q.done;q=n.next())p=q.value,f.set(p,m);v=u=!1;w=[];A=new Set;y=t(f);C=y.next();case 2:if(C.done){Q.u(4);break}z=C.value;B=t(z);D=B.next().value;I=B.next().value;F=D;K=I;J=Pu(F,"METHOD");if("NONE"==J){Q.u(3);break}u=
1063
- !0;G=Z(F,"KEYFORMAT")||"identity";L=null;if(aw(J)){v=!0;Q.u(3);break}if("identity"!=G){L=(N=bw[G])?N(F,c):null;Q.u(6);break}return E(Q,cw(a,F,c,d,K,e),8);case 8:L=Q.h;case 6:if(L){if(L.keyIds)for(M=t(L.keyIds),P=M.next();!P.done;P=M.next())R=P.value,A.add(R);w.push(L)}case 3:C=y.next();Q.u(2);break;case 4:return Q.return({drmInfos:w,keyIds:A,encrypted:u,hh:v})}})}
1064
- function nw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw ab("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=Kd(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=Vu(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ga.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Pu(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
1065
- 256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,q,p,u;return O(function(v){if(1==v.g)return l=Wu(d(),Pu(b,"URI"),e),m=l.sort().join(""),a.K.has(m)||(n=rg(l,a.g.retryParameters),q=Pv(a,n,6),a.K.set(m,q)),E(v,a.K.get(m),2);if(3!=v.g){p=v.h;if(!p.data||p.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};return E(v,window.crypto.subtle.importKey("raw",p.data,u,!0,["decrypt"]),3)}k.cryptoKey=v.h;k.fetchKey=void 0;H(v)})};
1060
+ fullMimeTypes:new Set};Wv(a);return a}
1061
+ function rv(a,b,c,d,e){var f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L,N,M,P,R;return O(function(Q){switch(Q.g){case 1:f=new Map;if(b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=Ru(k.g,"EXT-X-KEY"),m=null,l.length)for(m=Nv(a,b,k.g,d,e),n=t(l),q=n.next();!q.done;q=n.next())p=q.value,f.set(p,m);v=u=!1;w=[];A=new Set;y=t(f);C=y.next();case 2:if(C.done){Q.u(4);break}z=C.value;B=t(z);D=B.next().value;I=B.next().value;F=D;K=I;J=Ou(F,"METHOD");if("NONE"==J){Q.u(3);break}u=
1062
+ !0;G=Z(F,"KEYFORMAT")||"identity";L=null;if($v(J)){v=!0;Q.u(3);break}if("identity"!=G){L=(N=aw[G])?N(F,c):null;Q.u(6);break}return E(Q,bw(a,F,c,d,K,e),8);case 8:L=Q.h;case 6:if(L){if(L.keyIds)for(M=t(L.keyIds),P=M.next();!P.done;P=M.next())R=P.value,A.add(R);w.push(L)}case 3:C=y.next();Q.u(2);break;case 4:return Q.return({drmInfos:w,keyIds:A,encrypted:u,gh:v})}})}
1063
+ function mw(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw ab("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new T(2,4,4042);var f=0,g=Z(b,"IV","");if(g){var h=Kd(g.substr(2));if(16!=h.byteLength)throw new T(2,4,4048);}else f=Uu(c.g,"EXT-X-MEDIA-SEQUENCE",0);c=b.toString()+"-"+f;if(!a.ga.has(c)){var k={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(Ou(b,"METHOD")){case "AES-256":k.bitsKey=256;break;case "AES-256-CTR":k.bitsKey=
1064
+ 256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,q,p,u;return O(function(v){if(1==v.g)return l=Vu(d(),Ou(b,"URI"),e),m=l.sort().join(""),a.K.has(m)||(n=rg(l,a.g.retryParameters),q=Ov(a,n,6),a.K.set(m,q)),E(v,a.K.get(m),2);if(3!=v.g){p=v.h;if(!p.data||p.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};return E(v,window.crypto.subtle.importKey("raw",p.data,u,!0,["decrypt"]),3)}k.cryptoKey=v.h;k.fetchKey=void 0;H(v)})};
1066
1065
  a.ga.set(c,k)}return a.ga.get(c)}
1067
- function vv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Uu(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Uu(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Uu(b.g,"EXT-X-PART-INF"))a.P=Number(Pu(e,"PART-TARGET"));b=Uu(b.g,"EXT-X-SERVER-CONTROL");a.C&&a.P?(a.m=a.hb?5*a.P<=c?Math.min(a.P,a.m):Math.min(c,a.m):Math.min(a.P,a.m),a.xa=b?Number(Pu(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
1068
- Ou(b,"HOLD-BACK"):null,a.ua=c?Number(c.value):0);a.Fa=Math.max(d,a.Fa)}function Lv(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.xa)b=a.xa;else if(a.ua)b=a.ua;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Fa*c}a.l.Mg(0);a.l.Cf(b);a.l.ic(!1)}
1069
- function Ov(a,b,c,d,e){var f=Uu(c,"EXT-X-MAP");if(!f)return null;var g=Pu(f,"URI"),h=Wu(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.ba.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?aw(Pu(m,"METHOD"))&&m.id<f.id&&(k=nw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=ow(h,f,l,k);a.ba.set(g,b)}return a.ba.get(g)}
1070
- function ow(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new Ai(function(){return a},e,f,null,null,null,d)}
1071
- function pw(a,b,c,d,e,f,g,h,k){function l(ea){ea=(new sc(ea)).Oa.split(".").pop();var ba=qw[g][ea];ba||(ba=Nv[ea]);return ba}var m=d.g,n=Uu(m,"EXTINF"),q=0,p=0,u=null;d.vb.length&&!a.C&&ab("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Uu(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=ph(w.value))}var A=
1072
- Gi;Uu(m,"EXT-X-GAP")&&(A=2);if(!n){if(0==d.vb.length)throw new T(2,4,4024,"EXTINF");if(!a.C)return null}var y=[];w=!1;var C=null,z=!1,B=!1;if(a.C&&d.vb.length){q=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=v,I={},F=0;F<d.vb.length;I={me:void 0,ae:void 0},F++){var K=d.vb[F],J=0==F?c:y[y.length-1],G=0==F?e:J.endTime,L=Number(Z(K,"DURATION"))||a.P;if(L){var N=G+L,M=0,P=null;"EXT-X-PRELOAD-HINT"==K.name?(M=(M=Z(K,"BYTERANGE-START"))?Number(M):0,(J=Z(K,"BYTERANGE-LENGTH"))?
1073
- P=M+Number(J)-1:M&&(P=Number.MAX_SAFE_INTEGER)):(M=Z(K,"BYTERANGE"),P=t(Qv(J,M)),M=P.next().value,P=P.next().value);I.ae=Z(K,"URI");if(I.ae){J=Gi;"YES"==Z(K,"GAP")&&(J=2,z=!0);I.me=null;var R=function(ea){return function(){null==ea.me&&(ea.me=Wu(h(),ea.ae,f));return ea.me}}(I);q&&0<=M&&null!=P&&(C=R,w=!0);G=new Fi(G,N,R,M,P,b,0,0,Infinity,[],"",null,D,J,k);"EXT-X-PRELOAD-HINT"==K.name&&(G.ff(),B=!0);"YES"!=Z(K,"INDEPENDENT")&&0<F&&G.Qd();if(I=l(I.ae))G.mimeType=I,rw.has(I)&&(G.ca=null);y.push(G);
1074
- D&&(D+=L)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;q=e+n}else if(y.length)q=y[y.length-1].endTime;else return null;w&&(z||0!=y[0].Da?(w=!1,C=null):y=[]);(n=Uu(m,"EXT-X-BYTERANGE"))?(u=t(Qv(c,n.value)),p=u.next().value,u=u.next().value):y.length&&(p=y[0].Da,u=y[y.length-1].oa);c="";n=null;"image"==g&&(c="1x1",m=Uu(m,"EXT-X-TILES"))&&(c=Pu(m,"LAYOUT"),(m=Z(m,"DURATION"))&&(n=Number(m)));var Q=null;b=new Fi(e,q,function(){if(C)return C();null==Q&&(Q=Wu(h(),d.h,f));return Q||[]},p,
1075
- u,b,0,0,Infinity,y,c,n,v,A,k,0<y.length&&!!d.h);if(e=l(d.h))b.mimeType=e,rw.has(e)&&(b.ca=null);w&&(a.hb=!0,b.sg(),B&&b.ff());return b}function Qv(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.oa+1,d=c+b-1);return[c,d]}
1076
- function tv(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Vu(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Vu(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Uu(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,q=l+n,p=0;kv(a)&&c.has(q)&&(p=c.get(q));0===p&&a.na==Rv&&0<c.size&&!c.has(q)&&(p=a.l.ib());var u=[],v=null;m=[];for(var w=0;w<g.length;w++){var A=g[w],y=0==w?p:v.endTime;q=l+n+w;Uu(A.g,"EXT-X-DISCONTINUITY")&&k++;var C=t(A.g);for(var z=C.next();!z.done;z=C.next())z=z.value,"EXT-X-KEY"==z.name&&(aw(Pu(z,"METHOD"))?
1077
- h=nw(a,z,b,e,d):h=void 0);c.set(q,y);C=Ov(a,b,A.g,e,d);!a.C&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());if(y=pw(a,C,v,A,y,d,f,e,h))(v=Vu(A.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,xv(a,f)&&null!=a.J&&q<a.J||u.push(y)}b=void 0;m.length&&(b=m.reduce(function(B,D){return B+D.duration},0),b=Math.round(m.reduce(function(B,D){return B+D.bitrate*D.duration},0)/
1066
+ function uv(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Tu(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Tu(b.g,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Tu(b.g,"EXT-X-PART-INF"))a.T=Number(Ou(e,"PART-TARGET"));b=Tu(b.g,"EXT-X-SERVER-CONTROL");a.C&&a.T?(a.m=a.hb?5*a.T<=c?Math.min(a.T,a.m):Math.min(c,a.m):Math.min(a.T,a.m),a.xa=b?Number(Ou(b,"PART-HOLD-BACK")):0):(a.m=Math.min(c,a.m),c=b?
1067
+ Nu(b,"HOLD-BACK"):null,a.ua=c?Number(c.value):0);a.Fa=Math.max(d,a.Fa)}function Kv(a,b){if(a.g.defaultPresentationDelay)b=a.g.defaultPresentationDelay;else if(a.xa)b=a.xa;else if(a.ua)b=a.ua;else{b=b.segments.length;var c=a.g.hls.liveSegmentsDelay;c>b-2&&(c=Math.max(1,b-2));b=a.Fa*c}a.l.Mg(0);a.l.Cf(b);a.l.ic(!1)}
1068
+ function Nv(a,b,c,d,e){var f=Tu(c,"EXT-X-MAP");if(!f)return null;var g=Ou(f,"URI"),h=Vu(d(),g,e);g=[h.toString(),Z(f,"BYTERANGE","")].join("-");if(!a.ba.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?$v(Ou(m,"METHOD"))&&m.id<f.id&&(k=mw(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=nw(h,f,l,k);a.ba.set(g,b)}return a.ba.get(g)}
1069
+ function nw(a,b,c,d){var e=0,f=null;b=Z(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new Ai(function(){return a},e,f,null,null,null,d)}
1070
+ function ow(a,b,c,d,e,f,g,h,k){function l(ea){ea=(new sc(ea)).Na.split(".").pop();var ba=pw[g][ea];ba||(ba=Mv[ea]);return ba}var m=d.g,n=Tu(m,"EXTINF"),q=0,p=0,u=null;d.vb.length&&!a.C&&ab("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Tu(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=ph(w.value))}var A=
1071
+ Gi;Tu(m,"EXT-X-GAP")&&(A=2);if(!n){if(0==d.vb.length)throw new T(2,4,4024,"EXTINF");if(!a.C)return null}var y=[];w=!1;var C=null,z=!1,B=!1;if(a.C&&d.vb.length){q=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=v,I={},F=0;F<d.vb.length;I={me:void 0,ae:void 0},F++){var K=d.vb[F],J=0==F?c:y[y.length-1],G=0==F?e:J.endTime,L=Number(Z(K,"DURATION"))||a.T;if(L){var N=G+L,M=0,P=null;"EXT-X-PRELOAD-HINT"==K.name?(M=(M=Z(K,"BYTERANGE-START"))?Number(M):0,(J=Z(K,"BYTERANGE-LENGTH"))?
1072
+ P=M+Number(J)-1:M&&(P=Number.MAX_SAFE_INTEGER)):(M=Z(K,"BYTERANGE"),P=t(Pv(J,M)),M=P.next().value,P=P.next().value);I.ae=Z(K,"URI");if(I.ae){J=Gi;"YES"==Z(K,"GAP")&&(J=2,z=!0);I.me=null;var R=function(ea){return function(){null==ea.me&&(ea.me=Vu(h(),ea.ae,f));return ea.me}}(I);q&&0<=M&&null!=P&&(C=R,w=!0);G=new Fi(G,N,R,M,P,b,0,0,Infinity,[],"",null,D,J,k);"EXT-X-PRELOAD-HINT"==K.name&&(G.ff(),B=!0);"YES"!=Z(K,"INDEPENDENT")&&0<F&&G.Qd();if(I=l(I.ae))G.mimeType=I,qw.has(I)&&(G.ca=null);y.push(G);
1073
+ D&&(D+=L)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;q=e+n}else if(y.length)q=y[y.length-1].endTime;else return null;w&&(z||0!=y[0].Da?(w=!1,C=null):y=[]);(n=Tu(m,"EXT-X-BYTERANGE"))?(u=t(Pv(c,n.value)),p=u.next().value,u=u.next().value):y.length&&(p=y[0].Da,u=y[y.length-1].oa);c="";n=null;"image"==g&&(c="1x1",m=Tu(m,"EXT-X-TILES"))&&(c=Ou(m,"LAYOUT"),(m=Z(m,"DURATION"))&&(n=Number(m)));var Q=null;b=new Fi(e,q,function(){if(C)return C();null==Q&&(Q=Vu(h(),d.h,f));return Q||[]},p,
1074
+ u,b,0,0,Infinity,y,c,n,v,A,k,0<y.length&&!!d.h);if(e=l(d.h))b.mimeType=e,qw.has(e)&&(b.ca=null);w&&(a.hb=!0,b.sg(),B&&b.ff());return b}function Pv(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.oa+1,d=c+b-1);return[c,d]}
1075
+ function sv(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Uu(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Uu(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Tu(b.g,"EXT-X-SKIP"),n=m?Number(Z(m,"SKIPPED-SEGMENTS")):0,q=l+n,p=0;jv(a)&&c.has(q)&&(p=c.get(q));0===p&&a.na==Qv&&0<c.size&&!c.has(q)&&(p=a.l.ib());var u=[],v=null;m=[];for(var w=0;w<g.length;w++){var A=g[w],y=0==w?p:v.endTime;q=l+n+w;Tu(A.g,"EXT-X-DISCONTINUITY")&&k++;var C=t(A.g);for(var z=C.next();!z.done;z=C.next())z=z.value,"EXT-X-KEY"==z.name&&($v(Ou(z,"METHOD"))?
1076
+ h=mw(a,z,b,e,d):h=void 0);c.set(q,y);C=Nv(a,b,A.g,e,d);!a.C&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());if(y=ow(a,C,v,A,y,d,f,e,h))(v=Uu(A.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,wv(a,f)&&null!=a.J&&q<a.J||u.push(y)}b=void 0;m.length&&(b=m.reduce(function(B,D){return B+D.duration},0),b=Math.round(m.reduce(function(B,D){return B+D.bitrate*D.duration},0)/
1078
1077
  b*1E3));if(m=u.some(function(B){return null!=B.h}))for(c={},d=0;d<u.length;c={Cd:void 0,Bd:void 0,rd:void 0,ec:void 0,qd:void 0},d++)if(c.ec=u[d],null==c.ec.h)for(c.Bd=0,c.Cd=d,e=function(B){return function(){var D=u[B.Cd];if(D){if(null!=D.h)return D.h+B.Bd;B.Bd-=D.endTime-D.startTime;B.Cd+=1}return null}}(c),c.qd=0,c.rd=d,g=function(B){return function(){var D=u[B.rd];if(D){D!=B.ec&&(B.qd+=D.endTime-D.startTime);if(null!=D.h)return D.h+B.qd;--B.rd}return null}}(c);null==c.ec.h;)c.ec.h=g(),null==c.ec.h&&
1079
- (c.ec.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.aa;if(m&&Infinity!=c&&!xv(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.Jf(c);return{segments:u,bandwidth:b}}
1080
- function Vv(a,b){if(a==Td){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 Wv(a){return a==Td?"text/vtt":qw[a].mp4}
1081
- function mw(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,w,A;return O(function(y){switch(y.g){case 1:e=zg;f=Math.trunc((d.length-1)/2);for(g=d[f];2==g.status&&f<d.length;)f++,g=d[f];if(2==g.status)return y.return(Wv(b));h=g.M();k=new sc(h[0]);l=k.Oa.split(".").pop();m=qw[b];if((n=m[l])||(n=Nv[l])||(n=Vv(b,c)))return y.return(n);p=1;u=rg(h,a.g.retryParameters);xa(y,2);u.method="HEAD";return E(y,Pv(a,u,e,{type:p}),4);case 4:v=y.h;q=v.headers["content-type"];za(y,3);break;case 2:w=Aa(y);if(!w||1002!=w.code&&
1082
- 1001!=w.code){y.u(3);break}u.method="GET";return E(y,Pv(a,u,e,{type:p}),6);case 6:A=y.h,q=A.headers["content-type"];case 3:return q?y.return(q.toLowerCase().split(";")[0]):y.return(Wv(b))}})}function Kv(a,b,c,d,e,f,g){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,a.colorGamut=g||void 0)}function iv(a,b,c){return Pv(a,rg(b,a.g.retryParameters),0,{type:c?2:3})}
1083
- function gv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();xa(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();kv(a)&&(d=(c-b)/1E3,a.La.sample(1,d),e=a.m,f=Math.max(0,e-Xa(a.La)),a.A.X(f));za(h,3);break;case 2:g=Aa(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.A.X(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();H(h)}})}
1084
- function kv(a){return a.na!=hv}function ov(a,b){a.na=b;a.l&&a.l.ic(!kv(a));kv(a)||a.A.stop()}function Pv(a,b,c,d){if(!a.W)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);lg(a.W,b);return b.promise}function aw(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
1085
- function cw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(sd())throw new T(2,4,4041);g=Pu(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return B.return(null);k=Wu(d(),Pu(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Ld(Hd(k[0].split("data:text/plain;base64,").pop()));B.u(2);break}m=k.sort().join("");a.wa.has(m)||(n=rg(k,a.g.retryParameters),q=Pv(a,n,6),a.wa.set(m,q));return E(B,a.wa.get(m),
1086
- 3);case 3:p=B.h,l=Ld(p.data);case 2:u="00000000000000000000000000000000";if(!e){B.u(4);break}if(a.ma.has(e)){v=a.ma.get(e);B.u(5);break}w=ol(e.M(),e.Xb(),e.Vb(),a.g.retryParameters);A=zg;return E(B,Pv(a,w,A,{type:0}),6);case 6:y=B.h,v=$s(y.data),a.ma.set(e,v);case 5:v&&(u=v);case 4:return C=new Map,C.set(u,l),z="cenc","SAMPLE-AES"==g&&(z="cbcs"),B.return(Pd(C,z))}})}S("shaka.hls.HlsParser",fv);
1087
- var Nv={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},qw={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",
1088
- 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"}},rw=new Set(["video/mp2t"].concat(x(Yd))),bw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(sd())throw new T(2,4,4041);a=Pu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Od("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),
1089
- keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Pu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Pu(a,"URI");b=ev(b.split("?")[0]);b=Bb(b.data);c=Od("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Pu(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
1090
- var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=Pu(a,"URI");a=ev(a.split("?")[0]);a=Bb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Yg(a,b,new Set,0);return Od("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},hv="VOD",lw="EVENT",Rv="LIVE",nv={dh:hv,bj:lw,jj:Rv};vi["application/x-mpegurl"]=function(){return new fv};vi["application/vnd.apple.mpegurl"]=function(){return new fv};function sw(a){var b=0,c=Fb(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=Bb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function tw(a){if(a=uw(a))a:{a=t(ih(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=jh(b.value,"LA_URL")){a=gh(b);break a}a=""}else a="";return a}
1091
- function uw(a){a=Hd(gh(a));a=sw(a).filter(function(b){return b.type===vw})[0];if(!a)return null;a=xd(a.value,!0);return(a=$g(a,"WRMHEADER"))?a:null}var vw=1,ww=(new Map).set("com.microsoft.playready",tw).set("com.microsoft.playready.recommendation",tw).set("com.microsoft.playready.software",tw).set("com.microsoft.playready.hardware",tw);function xw(a){if(!yw){yw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);zw=Aw("ftyp",b,d,b,c);b=Aw("dref",Bw);Cw=Aw("dinf",b)}this.g=a}
1092
- function Dw(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=Aw;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/(Ew+1));m=Math.floor(m%(Ew+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(x(Fw(h,4)),[0,0,0,0],x(Fw(n,4)),x(Fw(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],x(Fw(k,2)),[0,0],x(Fw(l,
1093
- 2)),[0,0]));h=Aw("tkhd",h);k=Aw;n=g.duration*g.timescale;l=Math.floor(n/(Ew+1));n=Math.floor(n%(Ew+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(x(Fw(g.timescale,4)),x(Fw(l,4)),x(Fw(n,4)),x(Fw(m,2)),[0,0]));l=Aw("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Gw;break;case "audio":m=Hw}n=Aw("hdlr",m);a:{switch(g.type){case "video":g=Aw("minf",Aw("vmhd",Iw),Cw,Jw(g));break a;
1094
- case "audio":g=Aw("minf",Aw("smhd",Kw),Cw,Jw(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Md.apply(Ed,x(b));f=a.g[0];c=Aw;d=f.duration*f.timescale;e=Math.floor(d/(Ew+1));d=Math.floor(d%(Ew+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(x(Fw(f.timescale,4)),x(Fw(e,4)),x(Fw(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,
1095
- 255]));e=Aw("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(x(Fw(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=Aw("trex",k),h.call(g,k);a=Md.apply(Ed,x(d));a=Aw("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=Md.apply(Ed,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(zw.byteLength+
1096
- a.byteLength);b.set(zw);b.set(a,zw.byteLength);return b}
1097
- function Jw(a){var b=Aw,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.ta.byteLength)var e=Aw("avcC",a.ta);else{e=Aw;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Wa.length;n++){var q=Lw(a.Wa[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),f+=q.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=
1098
- 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(x(Fw(c,2)),x(Fw(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=Mw(a);g=new Uint8Array([]);
1099
- a.encrypted&&(g=Nw(a),d="encv");c=Aw(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.ta.byteLength&&(c=Aw("hvcC",a.ta)),d=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(x(Fw(d,2)),x(Fw(e,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])),e="hvc1",h=Mw(a),g=new Uint8Array([]),a.encrypted&&(g=Nw(a),e="encv"),c=Aw(e,d,
1100
- c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=Aw(".mp3",Ow(a));else if(a.codecs.includes("ac-3"))c=Aw("dac3",a.ja),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Nw(a),d="enca"),a=Aw(d,Ow(a),c,e);else if(a.codecs.includes("ec-3"))c=Aw("dec3",a.ja),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Nw(a),d="enca"),a=Aw(d,Ow(a),c,e);else if(a.codecs.includes("opus"))c=Aw("dOps",a.ja),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=Nw(a),d="enca"),a=Aw(d,Ow(a),c,e);else{if(0<a.ja.byteLength)c=Aw("esds",
1101
- a.ja);else{c=Aw;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Qd("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(x(Fw(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=Nw(a),d="enca");
1102
- a=Aw(d,Ow(a),c,e)}c=a}a=Aw("stsd",Pw,c);return b("stbl",a,Aw("stts",Qw),Aw("stsc",Rw),Aw("stsz",Sw),Aw("stco",Tw))}function Mw(a){if(!a.Aa&&!a.Ba)return new Uint8Array([]);var b=a.Ba;a=new Uint8Array([].concat(x(Fw(a.Aa,4)),x(Fw(b,4))));return Aw("pasp",a)}function Ow(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(x(Fw(a.stream.audioSamplingRate||44100,2)),[0,0]))}
1103
- function Nw(a){var b=Aw;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(x(Fw(d,4))));c=Aw("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=Aw("schm",d);e=Aw;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=Lw(h.value)}a=new Uint8Array([0,
1104
- 0,0,0,0,0,1,8]);f=Aw("tenc",a,f);return b("sinf",c,d,e("schi",f))}
1105
- function Uw(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=Aw;var g=new Uint8Array([0,0,0,0].concat(x(Fw(c.data?c.data.ob:0,4))));g=Aw("mfhd",g);var h;var k=c.data?c.data.Ta:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Qa<<4|m.Sa<<2|m.Ra}k=Aw("sdtp",l);var n=k.length+92;l=Aw;h=new Uint8Array([0,0,0,58].concat(x(Fw(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=Aw("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
1106
- 0;var q=Math.floor(m%(Ew+1));m=new Uint8Array([1,0,0,0].concat(x(Fw(Math.floor(m/(Ew+1)),4)),x(Fw(q,4))));m=Aw("tfdt",m);var p=n;n=c.data?c.data.Ta:[];q=n.length;var u=12+16*q,v=new Uint8Array(u);p+=8+u;v.set(["video"===c.type?1:0,0,15,1].concat(x(Fw(q,4)),x(Fw(p,4))),0);for(p=0;p<q;p++){var w=n[p];u=Fw(w.duration,4);var A=Fw(w.size,4),y=w.flags;w=Fw(w.Ya,4);v.set([].concat(x(u),x(A),[y.ab<<2|y.Qa,y.Sa<<6|y.Ra<<4|y.bb,y.Pa&61440,y.Pa&15],x(w)),12+16*p)}n=Aw("trun",v);k=l("traf",h,m,n,k);f=f("moof",
1107
- g,k);e.call(d,b,[f,Vw(c)])}return Md.apply(Ed,x(b))}function Vw(a){a=(a.data?a.data.Ta:[]).map(function(b){return b.data});a=Md.apply(Ed,x(a));return Aw("mdat",a)}function Fw(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Lw(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}
1108
- function Aw(a){var b=La.apply(1,arguments),c=Ww[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Ww[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}
1109
- var yw=!1,Ew=Math.pow(2,32)-1,Ww={},Gw=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]),Hw=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]),Qw=new Uint8Array([0,0,0,0,0,0,0,0]),Rw=new Uint8Array([0,0,0,0,0,0,0,0]),Tw=new Uint8Array([0,0,0,0,0,0,0,0]),Sw=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Iw=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Kw=new Uint8Array([0,
1110
- 0,0,0,0,0,0,0]),Pw=new Uint8Array([0,0,0,0,0,0,0,1]),zw=new Uint8Array([]),Bw=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Cw=new Uint8Array([]);function Xw(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.B=new Wa(5);this.o=new Tc(function(){Yw(a)});this.A=new kg;this.m=new Map}r=Xw.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this;return O(function(d){if(1==d.g)return c.l=[a],c.h=b,E(d,Zw(c),2);if(!c.h)throw new T(2,7,7001);return d.return(c.j)})};
1111
- function Yw(a){var b;O(function(c){switch(c.g){case 1:return xa(c,2),E(c,Zw(a),4);case 4:za(c,3);break;case 2:b=Aa(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();H(c)}})}r.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.A.destroy()};
1112
- r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return xa(c,2),E(c,Zw(a),4);if(2!=c.g)return za(c,0);b=Aa(c);if(!a.h||!b)return c.return();a.h.onError(b);H(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(){};
1113
- function Zw(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=rg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),lg(a.A,e),E(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=km){rb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=St(m,"SmoothStreamingMedia");if(!m)throw new T(2,4,4046,
1114
- l);n(m);m=Ad(m.outerHTML)}var q=Zg(m,"SmoothStreamingMedia");if(!q)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=lm&&l(q);a.i||(a.i=new ok(null,0));if(l=mh(q,"IsLive",wh,!1))throw new T(2,4,4047);a.i.ic(!l);n=mh(q,"TimeScale",uh,1E7);m=mh(q,"DVRWindowLength",uh);l&&(0===m||isNaN(m))&&(m=Infinity);var p=mh(q,"CanSeek",wh,!1);0===m&&p&&(m=Infinity);p=null;m&&0<m&&(p=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(p=a.g.availabilityWindowOverride);null==p&&(p=Infinity);a.i.he(p);m=mh(q,
1115
- "Duration",uh,Infinity);l||a.i.Ua(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var u;p=fh(q,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];p=t(p);for(u=p.next();!u.done;u=p.next())m=m.concat(fh(u.value,"ProtectionHeader"));if(m.length){p=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),A=n[w];if(A){var y=uw(v);if(y)a:{y=t(ih(y,"DATA"));for(var C=y.next();!C.done;C=y.next())if(C=jh(C.value,"KID")){y=Hd(gh(C));y=new Uint8Array([y[3],y[2],y[1],y[0],y[5],
1116
- y[4],y[7],y[6]].concat(x(y.slice(8))));y=Ld(y);break a}y=null}else y=null;C=Hd(gh(v));w=Kd(w.replace(/-/g,""));w=[{initData:Yg(C,w,new Set,0),initDataType:"cenc",keyId:y}];w=Od(A,"cenc",w);y&&w.keyIds.add(y);if(A=ww.get(A))w.licenseServerUri=A(v);p.push(w)}}n=p}else n=[];u=n;p=[];n=[];m=[];q=fh(q,"StreamIndex");q=t(q);for(v=q.next();!v.done;v=q.next()){v=v.value;A=fh(v,"QualityLevel");w=l.timescale;y=l.duration;C=fh(v,"c");for(var z=[],B=0,D=0;D<C.length;++D){var I=C[D],F=C[D+1],K=mh(I,"t",uh),J=
1117
- mh(I,"d",uh);I=mh(I,"r",sh);if(!J)break;K=null!=K?K:B;I=I||0;if(0>I)if(F){F=mh(F,"t",uh);if(null==F)break;else if(K>=F)break;I=Math.ceil((F-K)/J)-1}else{if(Infinity==y)break;else if(K/w>=y)break;I=Math.ceil((y*w-K)/J)-1}for(F=0;F<=I;++F)B=K+J,z.push({start:K/w,end:B/w,Qf:K}),K=B}w=z;A=t(A);for(y=A.next();!y.done;y=A.next())(y=$w(a,v,y.value,w,u,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Td||a.g.disableText||m.push(y):n.push(y):p.push(y))}q=[];p=t(0<p.length?
1078
+ (c.ec.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.aa;if(m&&Infinity!=c&&!wv(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.Jf(c);return{segments:u,bandwidth:b}}
1079
+ function Uv(a,b){if(a==Td){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 Vv(a){return a==Td?"text/vtt":pw[a].mp4}
1080
+ function lw(a,b,c,d){var e,f,g,h,k,l,m,n,q,p,u,v,w,A;return O(function(y){switch(y.g){case 1:e=zg;f=Math.trunc((d.length-1)/2);for(g=d[f];2==g.status&&f<d.length;)f++,g=d[f];if(2==g.status)return y.return(Vv(b));h=g.M();k=new sc(h[0]);l=k.Na.split(".").pop();m=pw[b];if((n=m[l])||(n=Mv[l])||(n=Uv(b,c)))return y.return(n);p=1;u=rg(h,a.g.retryParameters);xa(y,2);u.method="HEAD";return E(y,Ov(a,u,e,{type:p}),4);case 4:v=y.h;q=v.headers["content-type"];za(y,3);break;case 2:w=Aa(y);if(!w||1002!=w.code&&
1081
+ 1001!=w.code){y.u(3);break}u.method="GET";return E(y,Ov(a,u,e,{type:p}),6);case 6:A=y.h,q=A.headers["content-type"];case 3:return q?y.return(q.toLowerCase().split(";")[0]):y.return(Vv(b))}})}function Jv(a,b,c,d,e,f,g){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,a.colorGamut=g||void 0)}function hv(a,b,c){return Ov(a,rg(b,a.g.retryParameters),0,{type:c?2:3})}
1082
+ function fv(a){var b,c,d,e,f,g;O(function(h){switch(h.g){case 1:if(!a.h)return h.return();xa(h,2);b=Date.now();return E(h,a.update(),4);case 4:c=Date.now();jv(a)&&(d=(c-b)/1E3,a.Ka.sample(1,d),e=a.m,f=Math.max(0,e-Xa(a.Ka)),a.A.X(f));za(h,3);break;case 2:g=Aa(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.A.X(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();H(h)}})}
1083
+ function jv(a){return a.na!=gv}function nv(a,b){a.na=b;a.l&&a.l.ic(!jv(a));jv(a)||a.A.stop()}function Ov(a,b,c,d){if(!a.W)throw new T(2,7,7001);b=a.h.networkingEngine.request(c,b,d);lg(a.W,b);return b.promise}function $v(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
1084
+ function bw(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,w,A,y,C,z;return O(function(B){switch(B.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(sd())throw new T(2,4,4041);g=Ou(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return B.return(null);k=Vu(d(),Ou(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Ld(Hd(k[0].split("data:text/plain;base64,").pop()));B.u(2);break}m=k.sort().join("");a.wa.has(m)||(n=rg(k,a.g.retryParameters),q=Ov(a,n,6),a.wa.set(m,q));return E(B,a.wa.get(m),
1085
+ 3);case 3:p=B.h,l=Ld(p.data);case 2:u="00000000000000000000000000000000";if(!e){B.u(4);break}if(a.ma.has(e)){v=a.ma.get(e);B.u(5);break}w=ol(e.M(),e.Xb(),e.Vb(),a.g.retryParameters);A=zg;return E(B,Ov(a,w,A,{type:0}),6);case 6:y=B.h,v=Zs(y.data),a.ma.set(e,v);case 5:v&&(u=v);case 4:return C=new Map,C.set(u,l),z="cenc","SAMPLE-AES"==g&&(z="cbcs"),B.return(Pd(C,z))}})}S("shaka.hls.HlsParser",ev);
1086
+ var Mv={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},pw={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",
1087
+ 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"}},qw=new Set(["video/mp2t"].concat(x(Yd))),aw={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(sd())throw new T(2,4,4041);a=Ou(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a))return null;b="cenc";"SAMPLE-AES"==a&&(b="cbcs");return Od("com.apple.fps",b,[{initDataType:"sinf",initData:new Uint8Array(0),
1088
+ keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Ou(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Ou(a,"URI");b=dv(b.split("?")[0]);b=Bb(b.data);c=Od("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Ou(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
1089
+ var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=Ou(a,"URI");a=dv(a.split("?")[0]);a=Bb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Yg(a,b,new Set,0);return Od("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},gv="VOD",kw="EVENT",Qv="LIVE",mv={bh:gv,aj:kw,ij:Qv};vi["application/x-mpegurl"]=function(){return new ev};vi["application/vnd.apple.mpegurl"]=function(){return new ev};function rw(a){var b=0,c=Fb(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=Bb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function sw(a){if(a=tw(a))a:{a=t(ih(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=jh(b.value,"LA_URL")){a=gh(b);break a}a=""}else a="";return a}
1090
+ function tw(a){a=Hd(gh(a));a=rw(a).filter(function(b){return b.type===uw})[0];if(!a)return null;a=xd(a.value,!0);return(a=$g(a,"WRMHEADER"))?a:null}var uw=1,vw=(new Map).set("com.microsoft.playready",sw).set("com.microsoft.playready.recommendation",sw).set("com.microsoft.playready.software",sw).set("com.microsoft.playready.hardware",sw);function ww(a){if(!xw){xw=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);yw=zw("ftyp",b,d,b,c);b=zw("dref",Aw);Bw=zw("dinf",b)}this.g=a}
1091
+ function Cw(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=zw;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/(Dw+1));m=Math.floor(m%(Dw+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(x(Ew(h,4)),[0,0,0,0],x(Ew(n,4)),x(Ew(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],x(Ew(k,2)),[0,0],x(Ew(l,
1092
+ 2)),[0,0]));h=zw("tkhd",h);k=zw;n=g.duration*g.timescale;l=Math.floor(n/(Dw+1));n=Math.floor(n%(Dw+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(x(Ew(g.timescale,4)),x(Ew(l,4)),x(Ew(n,4)),x(Ew(m,2)),[0,0]));l=zw("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Fw;break;case "audio":m=Gw}n=zw("hdlr",m);a:{switch(g.type){case "video":g=zw("minf",zw("vmhd",Hw),Bw,Iw(g));break a;
1093
+ case "audio":g=zw("minf",zw("smhd",Jw),Bw,Iw(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Md.apply(Ed,x(b));f=a.g[0];c=zw;d=f.duration*f.timescale;e=Math.floor(d/(Dw+1));d=Math.floor(d%(Dw+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(x(Ew(f.timescale,4)),x(Ew(e,4)),x(Ew(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,
1094
+ 255]));e=zw("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(x(Ew(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),k=zw("trex",k),h.call(g,k);a=Md.apply(Ed,x(d));a=zw("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=Md.apply(Ed,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(yw.byteLength+
1095
+ a.byteLength);b.set(yw);b.set(a,yw.byteLength);return b}
1096
+ function Iw(a){var b=zw,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.ta.byteLength)var e=zw("avcC",a.ta);else{e=zw;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Wa.length;n++){var q=Kw(a.Wa[n]);switch(q[0]&31){case 7:g.push(q);f+=q.length+2;break;case 8:h.push(q),f+=q.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=
1097
+ 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(x(Ew(c,2)),x(Ew(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=Lw(a);g=new Uint8Array([]);
1098
+ a.encrypted&&(g=Mw(a),d="encv");c=zw(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.ta.byteLength&&(c=zw("hvcC",a.ta)),d=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(x(Ew(d,2)),x(Ew(e,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])),e="hvc1",h=Lw(a),g=new Uint8Array([]),a.encrypted&&(g=Mw(a),e="encv"),c=zw(e,d,
1099
+ c,h,g));break;case "audio":if(a.codecs.includes("mp3"))a=zw(".mp3",Nw(a));else if(a.codecs.includes("ac-3"))c=zw("dac3",a.ja),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Mw(a),d="enca"),a=zw(d,Nw(a),c,e);else if(a.codecs.includes("ec-3"))c=zw("dec3",a.ja),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Mw(a),d="enca"),a=zw(d,Nw(a),c,e);else if(a.codecs.includes("opus"))c=zw("dOps",a.ja),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=Mw(a),d="enca"),a=zw(d,Nw(a),c,e);else{if(0<a.ja.byteLength)c=zw("esds",
1100
+ a.ja);else{c=zw;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Qd("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(x(Ew(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=Mw(a),d="enca");
1101
+ a=zw(d,Nw(a),c,e)}c=a}a=zw("stsd",Ow,c);return b("stbl",a,zw("stts",Pw),zw("stsc",Qw),zw("stsz",Rw),zw("stco",Sw))}function Lw(a){if(!a.Aa&&!a.Ba)return new Uint8Array([]);var b=a.Ba;a=new Uint8Array([].concat(x(Ew(a.Aa,4)),x(Ew(b,4))));return zw("pasp",a)}function Nw(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(x(Ew(a.stream.audioSamplingRate||44100,2)),[0,0]))}
1102
+ function Mw(a){var b=zw;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(x(Ew(d,4))));c=zw("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=zw("schm",d);e=zw;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=Kw(h.value)}a=new Uint8Array([0,
1103
+ 0,0,0,0,0,1,8]);f=zw("tenc",a,f);return b("sinf",c,d,e("schi",f))}
1104
+ function Tw(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=zw;var g=new Uint8Array([0,0,0,0].concat(x(Ew(c.data?c.data.ob:0,4))));g=zw("mfhd",g);var h;var k=c.data?c.data.Ta:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.Qa<<4|m.Sa<<2|m.Ra}k=zw("sdtp",l);var n=k.length+92;l=zw;h=new Uint8Array([0,0,0,58].concat(x(Ew(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=zw("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
1105
+ 0;var q=Math.floor(m%(Dw+1));m=new Uint8Array([1,0,0,0].concat(x(Ew(Math.floor(m/(Dw+1)),4)),x(Ew(q,4))));m=zw("tfdt",m);var p=n;n=c.data?c.data.Ta:[];q=n.length;var u=12+16*q,v=new Uint8Array(u);p+=8+u;v.set(["video"===c.type?1:0,0,15,1].concat(x(Ew(q,4)),x(Ew(p,4))),0);for(p=0;p<q;p++){var w=n[p];u=Ew(w.duration,4);var A=Ew(w.size,4),y=w.flags;w=Ew(w.Ya,4);v.set([].concat(x(u),x(A),[y.ab<<2|y.Qa,y.Sa<<6|y.Ra<<4|y.bb,y.Pa&61440,y.Pa&15],x(w)),12+16*p)}n=zw("trun",v);k=l("traf",h,m,n,k);f=f("moof",
1106
+ g,k);e.call(d,b,[f,Uw(c)])}return Md.apply(Ed,x(b))}function Uw(a){a=(a.data?a.data.Ta:[]).map(function(b){return b.data});a=Md.apply(Ed,x(a));return zw("mdat",a)}function Ew(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Kw(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}
1107
+ function zw(a){var b=La.apply(1,arguments),c=Vw[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Vw[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}
1108
+ var xw=!1,Dw=Math.pow(2,32)-1,Vw={},Fw=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]),Gw=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]),Pw=new Uint8Array([0,0,0,0,0,0,0,0]),Qw=new Uint8Array([0,0,0,0,0,0,0,0]),Sw=new Uint8Array([0,0,0,0,0,0,0,0]),Rw=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Hw=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Jw=new Uint8Array([0,
1109
+ 0,0,0,0,0,0,0]),Ow=new Uint8Array([0,0,0,0,0,0,0,1]),yw=new Uint8Array([]),Aw=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Bw=new Uint8Array([]);function Ww(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.B=new Wa(5);this.o=new Tc(function(){Xw(a)});this.A=new kg;this.m=new Map}r=Ww.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this;return O(function(d){if(1==d.g)return c.l=[a],c.h=b,E(d,Yw(c),2);if(!c.h)throw new T(2,7,7001);return d.return(c.j)})};
1110
+ function Xw(a){var b;O(function(c){switch(c.g){case 1:return xa(c,2),E(c,Yw(a),4);case 4:za(c,3);break;case 2:b=Aa(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();H(c)}})}r.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.A.destroy()};
1111
+ r.update=function(){var a=this,b;return O(function(c){if(1==c.g)return xa(c,2),E(c,Yw(a),4);if(2!=c.g)return za(c,0);b=Aa(c);if(!a.h||!b)return c.return();a.h.onError(b);H(c)})};r.onExpirationUpdated=function(){};r.onInitialVariantChosen=function(){};r.banLocation=function(){};
1112
+ function Yw(a){var b,c,d,e,f,g,h;return O(function(k){if(1==k.g)return b=rg(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),lg(a.A,e),E(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=jm){rb("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=Rt(m,"SmoothStreamingMedia");if(!m)throw new T(2,4,4046,
1113
+ l);n(m);m=Ad(m.outerHTML)}var q=Zg(m,"SmoothStreamingMedia");if(!q)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=km&&l(q);a.i||(a.i=new ok(null,0));if(l=mh(q,"IsLive",wh,!1))throw new T(2,4,4047);a.i.ic(!l);n=mh(q,"TimeScale",uh,1E7);m=mh(q,"DVRWindowLength",uh);l&&(0===m||isNaN(m))&&(m=Infinity);var p=mh(q,"CanSeek",wh,!1);0===m&&p&&(m=Infinity);p=null;m&&0<m&&(p=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(p=a.g.availabilityWindowOverride);null==p&&(p=Infinity);a.i.he(p);m=mh(q,
1114
+ "Duration",uh,Infinity);l||a.i.Ua(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var u;p=fh(q,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];p=t(p);for(u=p.next();!u.done;u=p.next())m=m.concat(fh(u.value,"ProtectionHeader"));if(m.length){p=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),A=n[w];if(A){var y=tw(v);if(y)a:{y=t(ih(y,"DATA"));for(var C=y.next();!C.done;C=y.next())if(C=jh(C.value,"KID")){y=Hd(gh(C));y=new Uint8Array([y[3],y[2],y[1],y[0],y[5],
1115
+ y[4],y[7],y[6]].concat(x(y.slice(8))));y=Ld(y);break a}y=null}else y=null;C=Hd(gh(v));w=Kd(w.replace(/-/g,""));w=[{initData:Yg(C,w,new Set,0),initDataType:"cenc",keyId:y}];w=Od(A,"cenc",w);y&&w.keyIds.add(y);if(A=vw.get(A))w.licenseServerUri=A(v);p.push(w)}}n=p}else n=[];u=n;p=[];n=[];m=[];q=fh(q,"StreamIndex");q=t(q);for(v=q.next();!v.done;v=q.next()){v=v.value;A=fh(v,"QualityLevel");w=l.timescale;y=l.duration;C=fh(v,"c");for(var z=[],B=0,D=0;D<C.length;++D){var I=C[D],F=C[D+1],K=mh(I,"t",uh),J=
1116
+ mh(I,"d",uh);I=mh(I,"r",sh);if(!J)break;K=null!=K?K:B;I=I||0;if(0>I)if(F){F=mh(F,"t",uh);if(null==F)break;else if(K>=F)break;I=Math.ceil((F-K)/J)-1}else{if(Infinity==y)break;else if(K/w>=y)break;I=Math.ceil((y*w-K)/J)-1}for(F=0;F<=I;++F)B=K+J,z.push({start:K/w,end:B/w,Qf:K}),K=B}w=z;A=t(A);for(y=A.next();!y.done;y=A.next())(y=Zw(a,v,y.value,w,u,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Td||a.g.disableText||m.push(y):n.push(y):p.push(y))}q=[];p=t(0<p.length?
1118
1117
  p:[null]);for(u=p.next();!u.done;u=p.next())for(u=u.value,v=t(0<n.length?n:[null]),z=v.next();!z.done;z=v.next())A=q,w=A.push,y=a,C=u,z=z.value,D=0,C&&C.bandwidth&&0<C.bandwidth&&(D+=C.bandwidth),z&&z.bandwidth&&0<z.bandwidth&&(D+=z.bandwidth),y={id:y.s++,language:C?C.language:"und",disabledUntilTime:0,primary:!!C&&C.primary||!!z&&z.primary,audio:C,video:z,bandwidth:D,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(A,y);l.variants=q;l.textStreams=m;a.j?(a.j.variants=l.variants,
1119
1118
  a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null},a.i.Od());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.B.sample(1,h);H(k)})}
1120
- function $w(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return ab("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=mh(c,"Bitrate",th),m=mh(c,"MaxWidth",th),n=mh(c,"MaxHeight",th),q=mh(c,"Channels",th),p=mh(c,"SamplingRate",th),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.Ua(Math.min(u,v));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1119
+ function Zw(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return ab("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=mh(c,"Bitrate",th),m=mh(c,"MaxWidth",th),n=mh(c,"MaxHeight",th),q=mh(c,"Channels",th),p=mh(c,"SamplingRate",th),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.Ua(Math.min(u,v));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1121
1120
  closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:Ce(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:q,audioSamplingRate:p,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,
1122
- matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=ax[e])&&w.roles.push(e),"main"===e&&(w.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return ab('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!bx.includes(e.toUpperCase()))return ab("Codec not supported:",
1123
- e),null;c=cx(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return ab("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=dx(e,c);break;case "video":if(!c)return ab("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=ex(c);break;case "text":if(w.type=Td,w.mimeType="application/mp4","TTML"===e||"DFXP"===e)w.codecs="stpp"}w.fullMimeTypes.add(Xd(w.mimeType,w.codecs));
1124
- w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var A=a.m.get(w.id);else A=[],"video"==w.type&&(A=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,Wa:A,ja:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:null,stream:w},A=Dw(new xw([A])),a.m.set(w.id,A);A=fx(a,new Ai(function(){return[]},0,null,null,void 0,
1121
+ matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set};if(e=b.attributes.Subtype)(e=$w[e])&&w.roles.push(e),"main"===e&&(w.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return ab('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!ax.includes(e.toUpperCase()))return ab("Codec not supported:",
1122
+ e),null;c=bx(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return ab("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=cx(e,c);break;case "video":if(!c)return ab("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=dx(c);break;case "text":if(w.type=Td,w.mimeType="application/mp4","TTML"===e||"DFXP"===e)w.codecs="stpp"}w.fullMimeTypes.add(Xd(w.mimeType,w.codecs));
1123
+ w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var A=a.m.get(w.id);else A=[],"video"==w.type&&(A=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),A={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,Wa:A,ja:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:null,stream:w},A=Cw(new ww([A])),a.m.set(w.id,A);A=ex(a,new Ai(function(){return[]},0,null,null,void 0,
1125
1124
  A),w,b,d);w.segmentIndex=new Kk(A);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
1126
- function cx(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
1127
- b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function dx(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function ex(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
1128
- function fx(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={ie:void 0},g=e.next())h.ie=g.value,d.push(new Fi(h.ie.start,h.ie.end,function(k){return function(){return Nd(a.l,[f.replace("{start time}",String(k.ie.Qf))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",Xw);var bx="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),ax={CAPT:"main",SUBT:"alternate",DESC:"main"};
1129
- vi["application/vnd.ms-sstr+xml"]=function(){return new Xw};function gx(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};var g=null;try{g=zd(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function hx(){}function ix(a,b,c,d,e){var f=new jx;Fg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new kx,h={Zf:!1,Vg:!1};a=lx(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new ag(a,function(){h.Zf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Tc(function(){h.Vg=!0;g.abort()});k.X(b/1E3);a.finally(function(){k.stop()})}return a}
1130
- function lx(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:return h=mx,k=nx,q=n=0,p=Date.now(),xa(z,2),E(z,h(a,c),4);case 4:l=z.h;f(ox(l.headers));if("HEAD"==c.method){z.u(5);break}u=l.clone().body.getReader();w=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;A=function(B){function D(){var I,F,K;return O(function(J){switch(J.g){case 1:return xa(J,2),E(J,u.read(),4);case 4:I=J.h;za(J,3);break;case 2:return Aa(J),J.return();case 3:if(I.done){J.u(5);break}n+=
1131
- I.value.byteLength;if(!g){J.u(5);break}return E(J,g(I.value),5);case 5:F=Date.now();if(100<F-p||I.done)K=I.done?0:w-n,e(F-p,n-q,K),q=n,p=F;I.done?B.close():(B.enqueue(I.value),D());H(J)}})}D()};new k({start:A});return E(z,l.arrayBuffer(),6);case 6:m=z.h;case 5:za(z,3);break;case 2:y=Aa(z);if(d.Zf)throw new T(1,1,7001,a,b);if(d.Vg)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,y,b);case 3:return C=ox(l.headers),z.return(gx(C,m,l.status,a,l.url,b))}})}
1132
- function ox(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function px(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",hx);hx.isSupported=px;hx.parse=ix;var mx=window.fetch,kx=window.AbortController,nx=window.ReadableStream,jx=window.Headers;
1133
- px()&&(ng("http",ix,2,!0),ng("https",ix,2,!0),ng("blob",ix,2,!0));function qx(){}
1134
- function rx(a,b,c,d,e){var f=new sx,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new T(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var p=tx(f);e(p);n=!0}};f.onload=function(p){var u=tx(f),v=f.response;try{d(Date.now()-g,p.loaded-h,0);var w=gx(u,v,f.status,a,f.responseURL,c);l(w)}catch(A){m(A)}};f.onerror=function(p){m(new T(1,
1125
+ function bx(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
1126
+ b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function cx(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function dx(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
1127
+ function ex(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={ie:void 0},g=e.next())h.ie=g.value,d.push(new Fi(h.ie.start,h.ie.end,function(k){return function(){return Nd(a.l,[f.replace("{start time}",String(k.ie.Qf))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",Ww);var ax="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),$w={CAPT:"main",SUBT:"alternate",DESC:"main"};
1128
+ vi["application/vnd.ms-sstr+xml"]=function(){return new Ww};function fx(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};var g=null;try{g=zd(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function gx(){}function hx(a,b,c,d,e){var f=new ix;Fg(b.headers).forEach(function(l,m){f.append(m,l)});var g=new jx,h={Zf:!1,Vg:!1};a=kx(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new ag(a,function(){h.Zf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Tc(function(){h.Vg=!0;g.abort()});k.X(b/1E3);a.finally(function(){k.stop()})}return a}
1129
+ function kx(a,b,c,d,e,f,g){var h,k,l,m,n,q,p,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:return h=lx,k=mx,q=n=0,p=Date.now(),xa(z,2),E(z,h(a,c),4);case 4:l=z.h;f(nx(l.headers));if("HEAD"==c.method){z.u(5);break}u=l.clone().body.getReader();w=(v=l.headers.get("Content-Length"))?parseInt(v,10):0;A=function(B){function D(){var I,F,K;return O(function(J){switch(J.g){case 1:return xa(J,2),E(J,u.read(),4);case 4:I=J.h;za(J,3);break;case 2:return Aa(J),J.return();case 3:if(I.done){J.u(5);break}n+=
1130
+ I.value.byteLength;if(!g){J.u(5);break}return E(J,g(I.value),5);case 5:F=Date.now();if(100<F-p||I.done)K=I.done?0:w-n,e(F-p,n-q,K),q=n,p=F;I.done?B.close():(B.enqueue(I.value),D());H(J)}})}D()};new k({start:A});return E(z,l.arrayBuffer(),6);case 6:m=z.h;case 5:za(z,3);break;case 2:y=Aa(z);if(d.Zf)throw new T(1,1,7001,a,b);if(d.Vg)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,y,b);case 3:return C=nx(l.headers),z.return(fx(C,m,l.status,a,l.url,b))}})}
1131
+ function nx(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function ox(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",gx);gx.isSupported=ox;gx.parse=hx;var lx=window.fetch,jx=window.AbortController,mx=window.ReadableStream,ix=window.Headers;
1132
+ ox()&&(ng("http",hx,2,!0),ng("https",hx,2,!0),ng("blob",hx,2,!0));function px(){}
1133
+ function qx(a,b,c,d,e){var f=new rx,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new T(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var p=sx(f);e(p);n=!0}};f.onload=function(p){var u=sx(f),v=f.response;try{d(Date.now()-g,p.loaded-h,0);var w=fx(u,v,f.status,a,f.responseURL,c);l(w)}catch(A){m(A)}};f.onerror=function(p){m(new T(1,
1135
1134
  1,1002,a,p,c))};f.ontimeout=function(){m(new T(1,1,1003,a,c))};f.onprogress=function(p){var u=Date.now();if(100<u-g||p.lengthComputable&&p.loaded==p.total)d(u-g,p.loaded-h,4==f.readyState?0:p.total-p.loaded),h=p.loaded,g=u};for(var q in b.headers)f.setRequestHeader(q.toLowerCase(),b.headers[q]);f.send(b.body)});return new ag(k,function(){f.abort();return Promise.resolve()})}
1136
- function tx(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",qx);qx.parse=rx;var sx=window.XMLHttpRequest;ng("http",rx,1,!0);ng("https",rx,1,!0);ng("blob",rx,1,!0);function ux(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function vx(a){return a.M().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Da+":"+a.oa}function wx(a,b){return ol(a.g.M(),a.g.Da,a.g.oa,b.streaming.retryParameters)};function xx(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function yx(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}xx.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function zx(a){var b=this;this.o=a;this.j=new Map;this.i=new Bg(function(){return Ax(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new xx}zx.prototype.destroy=function(){return this.i.destroy()};function Bx(a,b,c){a.m=b;a.l=c}function Ax(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
1137
- function Cx(a,b,c,d,e,f){Cg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,q,p;return O(function(u){if(1==u.g)return E(u,Dx(a,c),2);h=u.h;if(a.i.g)throw new T(2,9,7001);if(e)for(m in k=Bb(h),l=new Xg(k),l.data)n=Number(m),q=l.data[n],p=l.g[n],a.l(q,p);a.g.close(d,h.byteLength);var v=a.g;a.m(0==v.i?0:v.j/v.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function Ex(a){return O(function(b){return 1==b.g?E(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
1138
- function Dx(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=zg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),E(g,d.promise,2);f=g.h;Ob(a.h,e);return g.return(f.data)})};function Fx(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new $f;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Fx.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}xa(b,2);return E(b,a.g,4)}if(2!=b.g)return za(b,0);Aa(b);H(b)})};
1139
- function Gx(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return O(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return E(g,b(f.key,f.value,f),2)}f.continue();H(g)})}})}Fx.prototype.store=function(){return this.h};Fx.prototype.promise=function(){return this.g};function Hx(a){this.h=a;this.g=[]}Hx.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Ix(a,b){return Jx(a,b,"readwrite")}function Jx(a,b,c){c=a.h.transaction([b],c);var d=new Fx(c,b);a.g.push(d);d.promise().then(function(){Ob(a.g,d)},function(){Ob(a.g,d)});return d};function Kx(a,b,c){this.h=new Hx(a);this.i=b;this.g=c}r=Kx.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Lx(this.i)};r.removeSegments=function(a,b){return Mx(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,Nx(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.$f(e)}))})};r.addManifests=function(){return Lx(this.g)};
1140
- r.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function Ox(a,b,c){a=Ix(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Ix(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return Mx(this,this.g,a,b)};
1141
- r.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,Nx(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Mc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=Jx(a.h,a.g,"readonly"),c=new Map,E(d,Gx(b,function(e,f){var g;return O(function(h){if(1==h.g)return E(h,a.Mc(f),2);g=h.h;c.set(e,g);H(h)})}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};r.$f=function(a){return a};r.Mc=function(a){return Promise.resolve(a)};
1142
- function Lx(a){return Promise.reject(new T(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=Ix(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={uf:void 0},h=g.next())l=h.value,k.uf=e.add(l),k.uf.onsuccess=function(n){return function(){f.push(n.uf.result)}}(k);return E(m,d.promise(),2)}return m.return(f)})};
1143
- function Mx(a,b,c,d){a=Ix(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={$e:void 0},e=c.next())f.$e=e.value,b.delete(f.$e).onsuccess=function(g){return function(){return d(g.$e)}}(f);return a.promise()}
1144
- function Nx(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=Jx(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={ee:void 0,Ld:void 0},k=h.next())l.Ld=k.value,l.ee=e.get(l.Ld),l.ee.onsuccess=function(n){return function(){void 0==n.ee.result&&g.push(n.Ld);f[n.Ld]=n.ee.result}}(l);return E(m,d.promise(),2)}if(g.length)throw new T(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Px(a){this.g=new Hx(a)}Px.prototype.destroy=function(){return this.g.destroy()};Px.prototype.getAll=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=Jx(a.g,"session-ids","readonly"),c=[],E(d,Gx(b,function(e,f){c.push(f)}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};Px.prototype.add=function(a){var b=Ix(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
1145
- Px.prototype.remove=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Ix(b.g,"session-ids"),E(d,Gx(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):E(d,c.promise(),0)})};function Qx(){this.g=new Map}Qx.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Qx.prototype.init=function(){var a=this;Rx.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
1146
- function Sx(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{jb:d,Ha:f},Ha:e})})});if(b)return b;throw new T(2,9,9013,"Could not find a cell that supports add-operations");}function Tx(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({jb:d,Ha:f},e)})})}
1147
- function Ux(a,b,c){a=a.g.get(b);if(!a)throw new T(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new T(2,9,9013,"Could not find cell with name "+c);return b}function Vx(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Wx(a){var b=Array.from(a.g.keys());if(!b.length)throw new T(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
1148
- function Xx(a){var b,c,d;return O(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Rx,d.forEach(function(f){(f=f())&&b.push(f)})),E(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):E(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Yx(a,b){Rx.set(a,b)}S("shaka.offline.StorageMuxer",Qx);Qx.unregister=function(a){Rx.delete(a)};Qx.register=Yx;Qx.prototype.destroy=Qx.prototype.destroy;var Rx=new Map;function Zx(){Kx.apply(this,arguments)}qa(Zx,Kx);Zx.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return O(function(g){d=Ix(c.h,c.g);e=d.store();f=new $f;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new T(2,9,9012,"Could not find values for "+a))};return E(g,Promise.all([d.promise(),f]),0)})};
1149
- Zx.prototype.Mc=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=$x(a.periods[c],e),b.push(f);return E(h,qt(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
1150
- function $x(a,b){ay(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return by(e,a.startTime,b)})}
1151
- function by(a,b,c){var d=a.initSegmentUri?cy(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
1152
- cy(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}Zx.prototype.$f=function(a){return{data:a.data}};
1153
- function cy(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new T(2,9,9004,"Could not parse uri "+a);}
1154
- function ay(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){d=c++;for(var e=t(a),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d)}if(!a.length&&b.length)for(d=c++,
1155
- e=t(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function dy(){Kx.apply(this,arguments)}qa(dy,Kx);
1156
- dy.prototype.Mc=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(ey(n,k.startTime,k.startTime+e));f=l;b.push(f)}return E(h,qt(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
1135
+ function sx(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",px);px.parse=qx;var rx=window.XMLHttpRequest;ng("http",qx,1,!0);ng("https",qx,1,!0);ng("blob",qx,1,!0);function tx(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function ux(a){return a.M().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Da+":"+a.oa}function vx(a,b){return ol(a.g.M(),a.g.Da,a.g.oa,b.streaming.retryParameters)};function wx(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function xx(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}wx.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function yx(a){var b=this;this.o=a;this.j=new Map;this.i=new Bg(function(){return zx(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new wx}yx.prototype.destroy=function(){return this.i.destroy()};function Ax(a,b,c){a.m=b;a.l=c}function zx(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
1136
+ function Bx(a,b,c,d,e,f){Cg(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,q,p;return O(function(u){if(1==u.g)return E(u,Cx(a,c),2);h=u.h;if(a.i.g)throw new T(2,9,7001);if(e)for(m in k=Bb(h),l=new Xg(k),l.data)n=Number(m),q=l.data[n],p=l.g[n],a.l(q,p);a.g.close(d,h.byteLength);var v=a.g;a.m(0==v.i?0:v.j/v.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function Dx(a){return O(function(b){return 1==b.g?E(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
1137
+ function Cx(a,b){var c,d,e,f;return O(function(g){if(1==g.g)return c=zg,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),E(g,d.promise,2);f=g.h;Ob(a.h,e);return g.return(f.data)})};function Ex(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new $f;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Ex.prototype.abort=function(){var a=this;return O(function(b){if(1==b.g){try{a.i.abort()}catch(c){}xa(b,2);return E(b,a.g,4)}if(2!=b.g)return za(b,0);Aa(b);H(b)})};
1138
+ function Fx(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return O(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return E(g,b(f.key,f.value,f),2)}f.continue();H(g)})}})}Ex.prototype.store=function(){return this.h};Ex.prototype.promise=function(){return this.g};function Gx(a){this.h=a;this.g=[]}Gx.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Hx(a,b){return Ix(a,b,"readwrite")}function Ix(a,b,c){c=a.h.transaction([b],c);var d=new Ex(c,b);a.g.push(d);d.promise().then(function(){Ob(a.g,d)},function(){Ob(a.g,d)});return d};function Jx(a,b,c){this.h=new Gx(a);this.i=b;this.g=c}r=Jx.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Kx(this.i)};r.removeSegments=function(a,b){return Lx(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,Mx(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.$f(e)}))})};r.addManifests=function(){return Kx(this.g)};
1139
+ r.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function Nx(a,b,c){a=Hx(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Hx(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return Lx(this,this.g,a,b)};
1140
+ r.getManifests=function(a){var b=this,c;return O(function(d){if(1==d.g)return E(d,Mx(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Mc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=Ix(a.h,a.g,"readonly"),c=new Map,E(d,Fx(b,function(e,f){var g;return O(function(h){if(1==h.g)return E(h,a.Mc(f),2);g=h.h;c.set(e,g);H(h)})}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};r.$f=function(a){return a};r.Mc=function(a){return Promise.resolve(a)};
1141
+ function Kx(a){return Promise.reject(new T(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=Hx(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={uf:void 0},h=g.next())l=h.value,k.uf=e.add(l),k.uf.onsuccess=function(n){return function(){f.push(n.uf.result)}}(k);return E(m,d.promise(),2)}return m.return(f)})};
1142
+ function Lx(a,b,c,d){a=Hx(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={$e:void 0},e=c.next())f.$e=e.value,b.delete(f.$e).onsuccess=function(g){return function(){return d(g.$e)}}(f);return a.promise()}
1143
+ function Mx(a,b,c){var d,e,f,g,h,k,l;return O(function(m){if(1==m.g){d=Ix(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={ee:void 0,Ld:void 0},k=h.next())l.Ld=k.value,l.ee=e.get(l.Ld),l.ee.onsuccess=function(n){return function(){void 0==n.ee.result&&g.push(n.Ld);f[n.Ld]=n.ee.result}}(l);return E(m,d.promise(),2)}if(g.length)throw new T(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Ox(a){this.g=new Gx(a)}Ox.prototype.destroy=function(){return this.g.destroy()};Ox.prototype.getAll=function(){var a=this,b,c;return O(function(d){return 1==d.g?(b=Ix(a.g,"session-ids","readonly"),c=[],E(d,Fx(b,function(e,f){c.push(f)}),2)):3!=d.g?E(d,b.promise(),3):d.return(c)})};Ox.prototype.add=function(a){var b=Hx(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
1144
+ Ox.prototype.remove=function(a){var b=this,c;return O(function(d){return 1==d.g?(c=Hx(b.g,"session-ids"),E(d,Fx(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):E(d,c.promise(),0)})};function Px(){this.g=new Map}Px.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Px.prototype.init=function(){var a=this;Qx.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
1145
+ function Rx(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{jb:d,Ha:f},Ha:e})})});if(b)return b;throw new T(2,9,9013,"Could not find a cell that supports add-operations");}function Sx(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({jb:d,Ha:f},e)})})}
1146
+ function Tx(a,b,c){a=a.g.get(b);if(!a)throw new T(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new T(2,9,9013,"Could not find cell with name "+c);return b}function Ux(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Vx(a){var b=Array.from(a.g.keys());if(!b.length)throw new T(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
1147
+ function Wx(a){var b,c,d;return O(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Qx,d.forEach(function(f){(f=f())&&b.push(f)})),E(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.u(0):E(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Xx(a,b){Qx.set(a,b)}S("shaka.offline.StorageMuxer",Px);Px.unregister=function(a){Qx.delete(a)};Px.register=Xx;Px.prototype.destroy=Px.prototype.destroy;var Qx=new Map;function Yx(){Jx.apply(this,arguments)}qa(Yx,Jx);Yx.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return O(function(g){d=Hx(c.h,c.g);e=d.store();f=new $f;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new T(2,9,9012,"Could not find values for "+a))};return E(g,Promise.all([d.promise(),f]),0)})};
1148
+ Yx.prototype.Mc=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Zx(a.periods[c],e),b.push(f);return E(h,pt(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
1149
+ function Zx(a,b){$x(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return ay(e,a.startTime,b)})}
1150
+ function ay(a,b,c){var d=a.initSegmentUri?by(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
1151
+ by(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}Yx.prototype.$f=function(a){return{data:a.data}};
1152
+ function by(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new T(2,9,9004,"Could not parse uri "+a);}
1153
+ function $x(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){d=c++;for(var e=t(a),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d)}if(!a.length&&b.length)for(d=c++,
1154
+ e=t(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function cy(){Jx.apply(this,arguments)}qa(cy,Jx);
1155
+ cy.prototype.Mc=function(a){var b,c,d,e,f,g;return O(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(dy(n,k.startTime,k.startTime+e));f=l;b.push(f)}return E(h,pt(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
1157
1156
  Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
1158
- function ey(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
1159
- appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function fy(){Kx.apply(this,arguments)}qa(fy,Kx);r=fy.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Ox(this,a,b)};r.Mc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function gy(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=gy.prototype;
1160
- r.init=function(){var a=this,b=new $f,c=!1,d=new Tc(function(){c=!0;b.reject(new T(2,9,9017))});d.X(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Zx(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new dy(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
1161
- new dy(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new fy(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Px(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new T(2,
1157
+ function dy(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,
1158
+ appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}};function ey(){Jx.apply(this,arguments)}qa(ey,Jx);r=ey.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Nx(this,a,b)};r.Mc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function fy(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=fy.prototype;
1159
+ r.init=function(){var a=this,b=new $f,c=!1,d=new Tc(function(){c=!0;b.reject(new T(2,9,9017))});d.X(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Yx(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new cy(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
1160
+ new cy(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new ey(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Ox(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new T(2,
1162
1161
  9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return E(b,a.j.destroy(),8);case 8:if(!a.m){b.u(10);break}return E(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),H(b)}})};
1163
1162
  r.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};r.getEmeSessionCell=function(){return this.m};
1164
- r.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return E(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),E(b,hy(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,E(b,a.init(),0)}})};
1165
- function hy(){var a=new $f,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new T(2,9,9001,b.error));c.preventDefault()};return a}Yx("idb",function(){return fd()||Yc()||!window.indexedDB?null:new gy});function iy(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}iy.prototype.jb=function(){return this.i};iy.prototype.Ha=function(){return this.h};iy.prototype.key=function(){return this.l};iy.prototype.toString=function(){return this.j};
1166
- function jy(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new iy(b,c,d,Number(a[4])):null};function ky(a,b){this.h=a;this.g=b}
1167
- function ly(a,b){var c=new ok(null,0);c.Ua(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=my(a,d,e,c);e=b.streams.filter(function(l){return l.type==Td}).map(function(l){return ny(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return ny(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
1163
+ r.erase=function(){var a=this;return O(function(b){switch(b.g){case 1:if(!a.g){b.u(2);break}return E(b,a.g.destroy(),2);case 2:if(!a.h){b.u(4);break}return E(b,a.h.destroy(),4);case 4:if(!a.i){b.u(6);break}return E(b,a.i.destroy(),6);case 6:if(!a.j){b.u(8);break}return E(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),E(b,gy(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,E(b,a.init(),0)}})};
1164
+ function gy(){var a=new $f,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new T(2,9,9001,b.error));c.preventDefault()};return a}Xx("idb",function(){return fd()||Yc()||!window.indexedDB?null:new fy});function hy(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}hy.prototype.jb=function(){return this.i};hy.prototype.Ha=function(){return this.h};hy.prototype.key=function(){return this.l};hy.prototype.toString=function(){return this.j};
1165
+ function iy(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new hy(b,c,d,Number(a[4])):null};function jy(a,b){this.h=a;this.g=b}
1166
+ function ky(a,b){var c=new ok(null,0);c.Ua(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=ly(a,d,e,c);e=b.streams.filter(function(l){return l.type==Td}).map(function(l){return my(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return my(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
1168
1167
  g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null,nextUrl:null}}
1169
- function my(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){g=t(g.value.variantIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.variantIds),h=g.next();!h.done;h=g.next())e.add(h.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
1170
- b.next())for(g=e.value,e=ny(a,g,d),g=t(g.variantIds),h=g.next();!h.done;h=g.next())h=f.get(h.value),h.language=e.language,h.primary=h.primary||e.primary,h.audio=e;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=ny(a,e,d),e=t(e.variantIds),g=e.next();!g.done;g=e.next())g=f.get(g.value),g.primary=g.primary||b.primary,g.video=b;return f}
1171
- function ny(a,b,c){var d=b.segments.map(function(e){return oy(a,e,b)});c.hd(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Kk(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
1168
+ function ly(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){g=t(g.value.variantIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.variantIds),h=g.next();!h.done;h=g.next())e.add(h.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
1169
+ b.next())for(g=e.value,e=my(a,g,d),g=t(g.variantIds),h=g.next();!h.done;h=g.next())h=f.get(h.value),h.language=e.language,h.primary=h.primary||e.primary,h.audio=e;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=my(a,e,d),e=t(e.variantIds),g=e.next();!g.done;g=e.next())g=f.get(g.value),g.primary=g.primary||b.primary,g.video=b;return f}
1170
+ function my(a,b,c){var d=b.segments.map(function(e){return ny(a,e,b)});c.hd(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Kk(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
1172
1171
  null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([Xd(b.mimeType,b.codecs)])}}
1173
- function oy(a,b,c){var d=new iy("segment",a.h,a.g,b.dataKey);a=new Fi(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?py(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function py(a,b){var c=new iy("segment",a.h,a.g,b);return new Ai(function(){return[c.toString()]},0,null)};function qy(){this.g=null}r=qy.prototype;r.configure=function(){};
1174
- r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=jy(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new Qx;ya(m,2);return E(m,e.init(),4);case 4:return E(m,Ux(e,d.jb(),d.Ha()),5);case 5:return f=m.h,E(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new ky(d.jb(),d.Ha()),l=ly(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Ba(m),E(m,e.destroy(),7);case 7:Da(m,0)}})};r.stop=function(){return Promise.resolve()};
1172
+ function ny(a,b,c){var d=new hy("segment",a.h,a.g,b.dataKey);a=new Fi(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?oy(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";return a}function oy(a,b){var c=new hy("segment",a.h,a.g,b);return new Ai(function(){return[c.toString()]},0,null)};function py(){this.g=null}r=py.prototype;r.configure=function(){};
1173
+ r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:d=iy(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new Px;ya(m,2);return E(m,e.init(),4);case 4:return E(m,Tx(e,d.jb(),d.Ha()),5);case 5:return f=m.h,E(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new jy(d.jb(),d.Ha()),l=ky(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Ba(m),E(m,e.destroy(),7);case 7:Da(m,0)}})};r.stop=function(){return Promise.resolve()};
1175
1174
  r.update=function(){};
1176
- r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new Qx,xa(m,2,3),E(m,e.init(),5);case 5:return E(m,Ux(e,d.jb(),d.Ha()),6);case 6:return f=m.h,E(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return E(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Ba(m),E(m,e.destroy(),10);case 10:Da(m,0);break;case 2:Aa(m),m.u(3)}})};
1177
- r.onInitialVariantChosen=function(){};r.banLocation=function(){};vi["application/x-offline-manifest"]=function(){return new qy};function ry(){}function sy(a){var b=jy(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=dg(a)):a=b&&"segment"==b.g?ty(b.key(),b):bg(new T(2,1,9004,a));return a}
1178
- function ty(a,b){var c=new Qx;return dg(void 0).za(function(){return c.init()}).za(function(){return Ux(c,b.jb(),b.Ha())}).za(function(d){return d.getSegments([b.key()])}).za(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}S("shaka.offline.OfflineScheme",ry);ry.plugin=sy;ng("offline",sy);function uy(a,b,c){var d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var p=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,vy(v.info,q)){v.sessionIds.push(q.sessionId);p=!0;break}p||m.push({info:q,sessionIds:[q.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=wy(a,b,g);return E(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
1179
- function wy(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Dh({Cb:b,onError:function(){},Yd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),xa(f,2),d.configure(a),E(f,Lh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:za(f,3);break;case 2:return Aa(f),E(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],E(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(1==
1180
- h.g)return xa(h,2),E(h,Xh(d,g),4);if(2!=h.g)return e.push(g),za(h,0);Aa(h);H(h)})})),6);case 6:return E(f,d.destroy(),7);case 7:return f.return(e)}})}function vy(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Pb(a.audioCapabilities,b.audioCapabilities,c)&&Pb(a.videoCapabilities,b.videoCapabilities,c)};function xy(a,b,c){var d=b.presentationTimeline.getDuration();b=yy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function zy(a,b){var c=ly(new ky(a.jb(),a.Ha()),b),d=b.appMetadata||{};c=yy(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}}
1181
- function yy(a){var b=[],c=xf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(kf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(lf(c.value));return b};function Ay(){this.g={}}function By(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 Cy(a,b){a.g[b.id]=b.bandwidth||2048}function Dy(a,b){a=a.g[b];null==a&&(a=0);return a};function Ey(a){var b=this;if(a&&a.constructor!=X)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Wb()):(this.h=jm(),this.g=new mg);this.i=[];this.j=[];var c=!a;this.l=new Bg(function(){var d,e,f,g,h;return O(function(k){switch(k.g){case 1:return E(k,Promise.all(b.j.map(function(l){return Ax(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 E(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return E(k,b.g.destroy(),4);
1182
- case 4:b.h=null,b.g=null,H(k)}})})}function Fy(){if(Uc())a:{var a=t(Rx.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}r=Ey.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=am(a,b));return nm(this.h,a)};r.getConfiguration=function(){var a=jm();nm(a,this.h,jm());return a};r.Wb=function(){return this.g};
1183
- r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new zx(this.g);this.j.push(f);b=Gy(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.u(2):E(h,Im(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=ui(a,c||null);return h.return(g())})},e,f);b=new ag(b,function(){return Ax(f)});b.finally(function(){Ob(d.j,f)});return Hy(this,b)};
1184
- function Gy(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:return Iy(),h=g=null,k=new Qx,n=m=l=null,xa(z,2,3),E(z,d(),5);case 5:return g=z.h,E(z,Jy(a,b,g,e),6);case 6:q=z.h;Ky(a);p=!q.presentationTimeline.U()&&!q.presentationTimeline.ac();if(!p)throw new T(2,9,9005,b);return E(z,a.qc(q,function(B){n=n||B},e),7);case 7:h=z.h;Ky(a);if(n)throw n;return E(z,Ly(q,h,e),8);case 8:return E(z,k.init(),9);case 9:return Ky(a),E(z,Sx(k),10);case 10:return l=z.h,Ky(a),u=My(h,
1185
- q,b,c,e,f),v=u.fi,w=u.Mf,E(z,l.Ha.addManifests([v]),11);case 11:A=z.h;Ky(a);m=A[0];Ky(a);if(n)throw n;return E(z,Ny(a,w,m,v,f,e,l.Ha,q,h),12);case 12:return Ky(a),Oy(q,v,h,e),E(z,l.Ha.updateManifest(m,v),13);case 13:return Ky(a),y=new iy("manifest",l.path.jb,l.path.Ha,m),z.return(zy(y,v));case 3:return Ba(z),E(z,k.destroy(),14);case 14:if(!g){z.u(15);break}return E(z,g.stop(),15);case 15:if(!h){z.u(17);break}return E(z,h.destroy(),17);case 17:Da(z,0);break;case 2:C=Aa(z);if(null==m){z.u(19);break}return E(z,
1186
- Py(m),19);case 19:throw n||C;}})}
1187
- function Ny(a,b,c,d,e,f,g,h,k){var l,m,n,q,p,u,v,w,A,y;return O(function(C){switch(C.g){case 1:l={};m=0;n=function(z,B){var D,I,F,K,J,G,L;return O(function(N){if(1==N.g){D=t(z);I=D.next();for(F={};!I.done;F={sc:void 0},I=D.next())F.sc=I.value,K=wx(F.sc,f),J=F.sc.i,G=F.sc.h,L=function(M){return function(P){var R,Q,ea;return O(function(ba){if(1==ba.g)return E(ba,g.addSegments([{data:P}]),2);R=ba.h;Ky(a);Q=M.sc.g;ea=vx(Q);l[ea]=R[0];m+=P.byteLength;H(ba)})}}(F),Cx(e,F.sc.groupId,K,J,G,L);return E(N,
1188
- Ex(e),2)}if(!B)return N.u(0);Ky(a);Oy(h,d,k,f);return E(N,g.updateManifest(c,d),0)})};q=!1;xa(C,2);if(!Qy(h)||!q||Ry(h)){C.u(4);break}return E(C,n(b.filter(function(z){return z.h}),!0),5);case 5:return Ky(a),b=b.filter(function(z){return!z.h}),p=l,u=m,l={},m=0,E(C,Sy(g,c,d,p,u,function(){return Ky(a)}),6);case 6:Ky(a);case 4:if(q){C.u(7);break}return E(C,n(b,!1),8);case 8:return Ky(a),v=l,w=m,l={},m=0,E(C,Sy(g,c,d,v,w,function(){return Ky(a)}),9);case 9:Ky(a);case 7:za(C,0);break;case 2:return A=
1189
- Aa(C),y=Object.values(l),E(C,g.removeSegments(y,function(){}),10);case 10:throw A;}})}function Py(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new Qx,E(f,b.init(),2);case 2:return E(f,Sx(b),3);case 3:return c=f.h,d=new iy("manifest",c.path.jb,c.path.Ha,a),E(f,b.destroy(),4);case 4:return e=new Ey,E(f,e.remove(d.toString()),0)}})}
1190
- function Sy(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,w;return O(function(A){switch(A.g){case 1:g=!1;xa(A,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),q=n.next();!q.done;q=n.next())p=q.value,u=p.pendingSegmentRefId?d[p.pendingSegmentRefId]:null,null!=u&&(p.dataKey=u,p.pendingSegmentRefId=void 0),u=p.pendingInitSegmentRefId?d[p.pendingInitSegmentRefId]:null,null!=u&&(p.initSegmentKey=u,p.pendingInitSegmentRefId=void 0),p.pendingSegmentRefId&&(h=!1),p.pendingInitSegmentRefId&&
1191
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(A,a.updateManifest(b,c),4);case 4:g=!0;f();za(A,0);break;case 2:return v=Aa(A),E(A,Py(b),5);case 5:if(g){A.u(6);break}w=Object.values(d);return E(A,a.removeSegments(w,function(){}),6);case 6:throw v;}})}
1192
- function Ly(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L,N,M,P;return O(function(R){switch(R.g){case 1:return d={width:Infinity,height:Infinity},Pe(a,c.restrictions,d),E(R,Te(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Ne(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(kf(m));n=t(a.textStreams);for(q=n.next();!q.done;q=n.next())p=q.value,
1175
+ r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return O(function(m){switch(m.g){case 1:return d=c.g,e=new Px,xa(m,2,3),E(m,e.init(),5);case 5:return E(m,Tx(e,d.jb(),d.Ha()),6);case 6:return f=m.h,E(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return E(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Ba(m),E(m,e.destroy(),10);case 10:Da(m,0);break;case 2:Aa(m),m.u(3)}})};
1176
+ r.onInitialVariantChosen=function(){};r.banLocation=function(){};vi["application/x-offline-manifest"]=function(){return new py};function qy(){}function ry(a){var b=iy(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=dg(a)):a=b&&"segment"==b.g?sy(b.key(),b):bg(new T(2,1,9004,a));return a}
1177
+ function sy(a,b){var c=new Px;return dg(void 0).za(function(){return c.init()}).za(function(){return Tx(c,b.jb(),b.Ha())}).za(function(d){return d.getSegments([b.key()])}).za(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}S("shaka.offline.OfflineScheme",qy);qy.plugin=ry;ng("offline",ry);function ty(a,b,c){var d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var p=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,uy(v.info,q)){v.sessionIds.push(q.sessionId);p=!0;break}p||m.push({info:q,sessionIds:[q.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=vy(a,b,g);return E(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
1178
+ function vy(a,b,c){var d,e;return O(function(f){switch(f.g){case 1:return d=new Dh({Cb:b,onError:function(){},Yd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),xa(f,2),d.configure(a),E(f,Lh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:za(f,3);break;case 2:return Aa(f),E(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],E(f,Promise.all(c.sessionIds.map(function(g){return O(function(h){if(1==
1179
+ h.g)return xa(h,2),E(h,Xh(d,g),4);if(2!=h.g)return e.push(g),za(h,0);Aa(h);H(h)})})),6);case 6:return E(f,d.destroy(),7);case 7:return f.return(e)}})}function uy(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Pb(a.audioCapabilities,b.audioCapabilities,c)&&Pb(a.videoCapabilities,b.videoCapabilities,c)};function wy(a,b,c){var d=b.presentationTimeline.getDuration();b=xy(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function yy(a,b){var c=ky(new jy(a.jb(),a.Ha()),b),d=b.appMetadata||{};c=xy(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}}
1180
+ function xy(a){var b=[],c=xf(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(kf(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(lf(c.value));return b};function zy(){this.g={}}function Ay(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 By(a,b){a.g[b.id]=b.bandwidth||2048}function Cy(a,b){a=a.g[b];null==a&&(a=0);return a};function Dy(a){var b=this;if(a&&a.constructor!=X)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Wb()):(this.h=im(),this.g=new mg);this.i=[];this.j=[];var c=!a;this.l=new Bg(function(){var d,e,f,g,h;return O(function(k){switch(k.g){case 1:return E(k,Promise.all(b.j.map(function(l){return zx(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 E(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return E(k,b.g.destroy(),4);
1181
+ case 4:b.h=null,b.g=null,H(k)}})})}function Ey(){if(Uc())a:{var a=t(Qx.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}r=Dy.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=$l(a,b));return mm(this.h,a)};r.getConfiguration=function(){var a=im();mm(a,this.h,im());return a};r.Wb=function(){return this.g};
1182
+ r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new yx(this.g);this.j.push(f);b=Fy(this,a,b||{},function(){var g;return O(function(h){if(1==h.g)return c?h.u(2):E(h,Hm(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=ui(a,c||null);return h.return(g())})},e,f);b=new ag(b,function(){return zx(f)});b.finally(function(){Ob(d.j,f)});return Gy(this,b)};
1183
+ function Fy(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,w,A,y,C;return O(function(z){switch(z.g){case 1:return Hy(),h=g=null,k=new Px,n=m=l=null,xa(z,2,3),E(z,d(),5);case 5:return g=z.h,E(z,Iy(a,b,g,e),6);case 6:q=z.h;Jy(a);p=!q.presentationTimeline.U()&&!q.presentationTimeline.ac();if(!p)throw new T(2,9,9005,b);return E(z,a.qc(q,function(B){n=n||B},e),7);case 7:h=z.h;Jy(a);if(n)throw n;return E(z,Ky(q,h,e),8);case 8:return E(z,k.init(),9);case 9:return Jy(a),E(z,Rx(k),10);case 10:return l=z.h,Jy(a),u=Ly(h,
1184
+ q,b,c,e,f),v=u.ei,w=u.Mf,E(z,l.Ha.addManifests([v]),11);case 11:A=z.h;Jy(a);m=A[0];Jy(a);if(n)throw n;return E(z,My(a,w,m,v,f,e,l.Ha,q,h),12);case 12:return Jy(a),Ny(q,v,h,e),E(z,l.Ha.updateManifest(m,v),13);case 13:return Jy(a),y=new hy("manifest",l.path.jb,l.path.Ha,m),z.return(yy(y,v));case 3:return Ba(z),E(z,k.destroy(),14);case 14:if(!g){z.u(15);break}return E(z,g.stop(),15);case 15:if(!h){z.u(17);break}return E(z,h.destroy(),17);case 17:Da(z,0);break;case 2:C=Aa(z);if(null==m){z.u(19);break}return E(z,
1185
+ Oy(m),19);case 19:throw n||C;}})}
1186
+ function My(a,b,c,d,e,f,g,h,k){var l,m,n,q,p,u,v,w,A,y;return O(function(C){switch(C.g){case 1:l={};m=0;n=function(z,B){var D,I,F,K,J,G,L;return O(function(N){if(1==N.g){D=t(z);I=D.next();for(F={};!I.done;F={sc:void 0},I=D.next())F.sc=I.value,K=vx(F.sc,f),J=F.sc.i,G=F.sc.h,L=function(M){return function(P){var R,Q,ea;return O(function(ba){if(1==ba.g)return E(ba,g.addSegments([{data:P}]),2);R=ba.h;Jy(a);Q=M.sc.g;ea=ux(Q);l[ea]=R[0];m+=P.byteLength;H(ba)})}}(F),Bx(e,F.sc.groupId,K,J,G,L);return E(N,
1187
+ Dx(e),2)}if(!B)return N.u(0);Jy(a);Ny(h,d,k,f);return E(N,g.updateManifest(c,d),0)})};q=!1;xa(C,2);if(!Py(h)||!q||Qy(h)){C.u(4);break}return E(C,n(b.filter(function(z){return z.h}),!0),5);case 5:return Jy(a),b=b.filter(function(z){return!z.h}),p=l,u=m,l={},m=0,E(C,Ry(g,c,d,p,u,function(){return Jy(a)}),6);case 6:Jy(a);case 4:if(q){C.u(7);break}return E(C,n(b,!1),8);case 8:return Jy(a),v=l,w=m,l={},m=0,E(C,Ry(g,c,d,v,w,function(){return Jy(a)}),9);case 9:Jy(a);case 7:za(C,0);break;case 2:return A=
1188
+ Aa(C),y=Object.values(l),E(C,g.removeSegments(y,function(){}),10);case 10:throw A;}})}function Oy(a){var b,c,d,e;return O(function(f){switch(f.g){case 1:return b=new Px,E(f,b.init(),2);case 2:return E(f,Rx(b),3);case 3:return c=f.h,d=new hy("manifest",c.path.jb,c.path.Ha,a),E(f,b.destroy(),4);case 4:return e=new Dy,E(f,e.remove(d.toString()),0)}})}
1189
+ function Ry(a,b,c,d,e,f){var g,h,k,l,m,n,q,p,u,v,w;return O(function(A){switch(A.g){case 1:g=!1;xa(A,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),q=n.next();!q.done;q=n.next())p=q.value,u=p.pendingSegmentRefId?d[p.pendingSegmentRefId]:null,null!=u&&(p.dataKey=u,p.pendingSegmentRefId=void 0),u=p.pendingInitSegmentRefId?d[p.pendingInitSegmentRefId]:null,null!=u&&(p.initSegmentKey=u,p.pendingInitSegmentRefId=void 0),p.pendingSegmentRefId&&(h=!1),p.pendingInitSegmentRefId&&
1190
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return E(A,a.updateManifest(b,c),4);case 4:g=!0;f();za(A,0);break;case 2:return v=Aa(A),E(A,Oy(b),5);case 5:if(g){A.u(6);break}w=Object.values(d);return E(A,a.removeSegments(w,function(){}),6);case 6:throw v;}})}
1191
+ function Ky(a,b,c){var d,e,f,g,h,k,l,m,n,q,p,u,v,w,A,y,C,z,B,D,I,F,K,J,G,L,N,M,P;return O(function(R){switch(R.g){case 1:return d={width:Infinity,height:Infinity},Pe(a,c.restrictions,d),E(R,Te(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Ne(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(kf(m));n=t(a.textStreams);for(q=n.next();!q.done;q=n.next())p=q.value,
1193
1192
  e.push(lf(p));u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(mf(w));return E(R,c.offline.trackSelectionCallback(e),3);case 3:A=R.h;y=a.presentationTimeline.getDuration();C=0;z=t(A);for(B=z.next();!B.done;B=z.next())D=B.value,I=D.bandwidth*y/8,C+=I;xa(R,4);return E(R,c.offline.downloadSizeCallback(C),6);case 6:F=R.h;if(!F)throw new T(2,9,9014);za(R,5);break;case 4:K=Aa(R);if(K instanceof T)throw K;throw new T(2,9,9015);case 5:J=new Set;G=new Set;L=new Set;N=t(A);for(M=N.next();!M.done;M=
1194
- N.next())P=M.value,"variant"==P.type&&J.add(P.id),"text"==P.type&&G.add(P.id),"image"==P.type&&L.add(P.id);a.variants=a.variants.filter(function(Q){return J.has(Q.id)});a.textStreams=a.textStreams.filter(function(Q){return G.has(Q.id)});a.imageStreams=a.imageStreams.filter(function(Q){return L.has(Q.id)});Ty(a);H(R)}})}
1195
- function My(a,b,c,d,e,f){var g=xy(c,b,d),h=e.offline.progressCallback;Bx(f,function(p,u){g.size=u;h(g,p)},function(p,u){k&&e.offline.usePersistentLicense&&l==u&&Th(a,"cenc",p)});var k=Qy(b)&&!Ry(b),l=null;k&&(l=Uy.get(a.g.keySystem));for(var m=new Ay,n=t(b.textStreams),q=n.next();!q.done;q=n.next())m.g[q.value.id]=52;n=t(b.imageStreams);for(q=n.next();!q.done;q=n.next())Cy(m,q.value);n=t(b.variants);for(q=n.next();!q.done;q=n.next())By(m,q.value);m=Vy(f,m,b,e);f=m.streams;m=m.Mf;n=a.g;q=e.offline.usePersistentLicense;
1196
- n&&q&&(n.initData=[]);return{fi:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Uc(),streams:f,sessionIds:q?bi(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Mf:m}}function Qy(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
1197
- function Ry(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Oy(a,b,c,d){b.expiration=c.Uc();c=bi(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Qy(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}r.remove=function(a){return Wy(this,Xy(this,a))};
1198
- function Xy(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:Iy();c=jy(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new Qx;ya(k,2);return E(k,e.init(),4);case 4:return E(k,Ux(e,d.jb(),d.Ha()),5);case 5:return f=k.h,E(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],E(k,Promise.all([Yy(a,h,e),Zy(f,d,h)]),2);case 2:return Ba(k),E(k,e.destroy(),8);case 8:Da(k,0)}})}
1199
- function $y(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Xd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Xd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Yy(a,b,c){return O(function(d){return E(d,az(a.g,a.h.drm,c,b),0)})}
1200
- function Zy(a,b,c){function d(){}var e=bz(c);zy(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.xi=function(){return Wy(this,cz(this))};
1201
- function cz(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:return Iy(),b=a.g,c=a.h.drm,d=new Qx,e=!1,ya(n,2),E(n,d.init(),4);case 4:f=[],Vx(d,function(q){return f.push(q)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return E(n,k.getAll(),8);case 8:return l=n.h,E(n,uy(c,b,l),9);case 9:return m=n.h,E(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return Ba(n),E(n,d.destroy(),11);case 11:Da(n,3);break;case 3:return n.return(!e)}})}
1202
- r.list=function(){return Wy(this,dz())};function dz(){var a,b,c;return O(function(d){switch(d.g){case 1:return Iy(),a=[],b=new Qx,ya(d,2),E(d,b.init(),4);case 4:return c=Promise.resolve(),Tx(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(1==h.g)return E(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=zy(new iy("manifest",e.jb,e.Ha,l),k);a.push(k)});H(h)})})}),E(d,c,2);case 2:return Ba(d),E(d,b.destroy(),6);case 6:Da(d,3);break;case 3:return d.return(a)}})}
1203
- function Jy(a,b,c,d){var e,f,g,h,k;return O(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate}},
1204
- c.configure(d.manifest),Ky(a),E(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Ky(a),k=ez(h),E(l,Promise.all(Dg(k,function(m){return m.createSegmentIndex()})),3);Ky(a);if(e)throw e;return l.return(h)})}r.qc=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Dh({Cb:d.g,onError:b,Yd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),E(f,Ih(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?E(f,Vh(e),3):f.return(e)})};
1205
- function Vy(a,b,c,d){var e=new Map,f=ez(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=fz(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Mf:Array.from(e.values())}}
1206
- function fz(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
1207
- audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;gz(d,c.presentationTimeline.ib(),function(l){var m=vx(l),n=void 0;if(!f.has(m)){var q=l.endTime-l.startTime;q=Dy(b,d.id)*q;q=yx(a.g,q);f.set(m,new ux(l,q,k,!1))}l.ca&&(n=vx(l.ca),f.has(n)||(q=.5*Dy(b,d.id),q=yx(a.g,q),f.set(n,new ux(l.ca,q,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
1208
- initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});k=(k+1)%h});return g}function gz(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Ky(a){if(a.l.g)throw new T(2,9,7001);}function Iy(){if(!Fy())throw new T(2,9,9E3);}
1209
- function Wy(a,b){return O(function(c){if(1==c.g)return a.i.push(b),ya(c,2),E(c,b,4);if(2!=c.g)return c.return(c.h);Ba(c);Ob(a.i,b);return Da(c,0)})}function Hy(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Ob(a.i,c)})}function bz(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
1210
- function az(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Wx(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:$y(d,!1),videoCapabilities:$y(d,!0)}});return E(h,uy(b,a,f),2)}return 3!=h.g?(g=h.h,E(h,e.remove(g),3)):E(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
1211
- function ez(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}
1212
- function Ty(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());}S("shaka.offline.Storage",Ey);Ey.deleteAll=function(){var a;return O(function(b){return 1==b.g?(a=new Qx,ya(b,2),E(b,Xx(a),2)):5!=b.g?(Ba(b),E(b,a.destroy(),5)):Da(b,0)})};
1213
- Ey.prototype.list=Ey.prototype.list;Ey.prototype.removeEmeSessions=Ey.prototype.xi;Ey.prototype.remove=Ey.prototype.remove;Ey.prototype.store=Ey.prototype.store;Ey.prototype.getNetworkingEngine=Ey.prototype.Wb;Ey.prototype.getConfiguration=Ey.prototype.getConfiguration;Ey.prototype.configure=Ey.prototype.configure;Ey.prototype.destroy=Ey.prototype.destroy;Ey.support=Fy;
1214
- var Uy=(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");mp.offline=Fy;function hz(){}function iz(a,b){a={priority:b||0,callback:a};for(b=0;b<jz.length;b++)if(jz[b].priority<a.priority){jz.splice(b,0,a);return}jz.push(a)}S("shaka.polyfill",hz);hz.register=iz;hz.installAll=function(){for(var a=t(jz),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){ab("Error installing polyfill!",c)}}};var jz=[];function kz(){this.g=new lz}function mz(){window.AbortController||(window.AbortController=kz,window.AbortSignal=lz)}kz.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 U("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};fa.Object.defineProperties(kz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});hz.AbortController=kz;kz.install=mz;
1215
- function lz(){this.h=!1;this.g=void 0;this.onabort=null;this.i=new jg}lz.prototype.addEventListener=function(a,b,c){return this.i.addEventListener(a,b,c)};lz.prototype.removeEventListener=function(a,b,c){return this.i.removeEventListener(a,b,c)};lz.prototype.dispatchEvent=function(a){return this.i.dispatchEvent(a)};lz.prototype.throwIfAborted=function(){if(this.h)throw this.g;};
1216
- fa.Object.defineProperties(lz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});iz(mz);function nz(){}function oz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())pz(b.value)}function pz(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)}})}hz.Aria=nz;nz.install=oz;iz(oz);function qz(){}function rz(){sz()}hz.EncryptionScheme=qz;qz.install=rz;iz(rz,-2);function tz(){}
1217
- function uz(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
1218
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",vz);document.addEventListener("webkitfullscreenerror",vz);document.addEventListener("mozfullscreenchange",vz);document.addEventListener("mozfullscreenerror",vz);document.addEventListener("MSFullscreenChange",vz);document.addEventListener("MSFullscreenError",vz)}}
1219
- function vz(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}hz.Fullscreen=tz;tz.install=uz;iz(uz);function wz(){}function xz(){var a=!0;!fd()||fd()&&nd()||fd()&&Zc("Fuchsia")||(a=!1);if(gd()||jd()||id()||cd()||$c()||Zc("PC=EOS")||kd())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),yz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=zz)}
1220
- function zz(a){var b,c,d,e,f,g,h,k,l,m,n;return O(function(q){switch(q.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=Vc(e),!f)||d&&(g=d.contentType,h=Vc(g),!h))return q.return(b)}else return q.return(b);q.u(2);break}if(!Uc())return q.return(b);if(!c){q.u(3);break}return E(q,Az(c),4);case 4:if(k=q.h,!k)return q.return(b);case 3:if(d){var p=d.contentType;fd()&&d.spatialRendering&&
1221
- (p+="; spatialRendering=true");l=mb(p);if(!l)return q.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return E(q,Bz(c,d,m),6);case 6:if(n=q.h)b.supported=!0,b.keySystemAccess=n;case 5:return q.return(b)}})}
1222
- function Az(a){var b,c;return O(function(d){return 1==d.g?fd()?E(d,Cz(a),3):$c()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(mb(b))):d.u(2):2!=d.g?(c=d.h,d.return(c)):d.return(mb(a.contentType))})}
1223
- function Bz(a,b,c){var d,e,f,g,h,k,l,m,n;return O(function(q){switch(q.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},$c()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));h={initDataTypes:[c.initDataType],
1193
+ N.next())P=M.value,"variant"==P.type&&J.add(P.id),"text"==P.type&&G.add(P.id),"image"==P.type&&L.add(P.id);a.variants=a.variants.filter(function(Q){return J.has(Q.id)});a.textStreams=a.textStreams.filter(function(Q){return G.has(Q.id)});a.imageStreams=a.imageStreams.filter(function(Q){return L.has(Q.id)});Sy(a);H(R)}})}
1194
+ function Ly(a,b,c,d,e,f){var g=wy(c,b,d),h=e.offline.progressCallback;Ax(f,function(p,u){g.size=u;h(g,p)},function(p,u){k&&e.offline.usePersistentLicense&&l==u&&Th(a,"cenc",p)});var k=Py(b)&&!Qy(b),l=null;k&&(l=Ty.get(a.g.keySystem));for(var m=new zy,n=t(b.textStreams),q=n.next();!q.done;q=n.next())m.g[q.value.id]=52;n=t(b.imageStreams);for(q=n.next();!q.done;q=n.next())By(m,q.value);n=t(b.variants);for(q=n.next();!q.done;q=n.next())Ay(m,q.value);m=Uy(f,m,b,e);f=m.streams;m=m.Mf;n=a.g;q=e.offline.usePersistentLicense;
1195
+ n&&q&&(n.initData=[]);return{ei:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Uc(),streams:f,sessionIds:q?bi(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Mf:m}}function Py(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
1196
+ function Qy(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Ny(a,b,c,d){b.expiration=c.Uc();c=bi(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Py(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}r.remove=function(a){return Vy(this,Wy(this,a))};
1197
+ function Wy(a,b){var c,d,e,f,g,h;return O(function(k){switch(k.g){case 1:Hy();c=iy(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new Px;ya(k,2);return E(k,e.init(),4);case 4:return E(k,Tx(e,d.jb(),d.Ha()),5);case 5:return f=k.h,E(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],E(k,Promise.all([Xy(a,h,e),Yy(f,d,h)]),2);case 2:return Ba(k),E(k,e.destroy(),8);case 8:Da(k,0)}})}
1198
+ function Zy(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Xd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Xd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Xy(a,b,c){return O(function(d){return E(d,$y(a.g,a.h.drm,c,b),0)})}
1199
+ function Yy(a,b,c){function d(){}var e=az(c);yy(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.wi=function(){return Vy(this,bz(this))};
1200
+ function bz(a){var b,c,d,e,f,g,h,k,l,m;return O(function(n){switch(n.g){case 1:return Hy(),b=a.g,c=a.h.drm,d=new Px,e=!1,ya(n,2),E(n,d.init(),4);case 4:f=[],Ux(d,function(q){return f.push(q)}),g=t(f),h=g.next();case 5:if(h.done){n.u(2);break}k=h.value;return E(n,k.getAll(),8);case 8:return l=n.h,E(n,ty(c,b,l),9);case 9:return m=n.h,E(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.u(5);break;case 2:return Ba(n),E(n,d.destroy(),11);case 11:Da(n,3);break;case 3:return n.return(!e)}})}
1201
+ r.list=function(){return Vy(this,cz())};function cz(){var a,b,c;return O(function(d){switch(d.g){case 1:return Hy(),a=[],b=new Px,ya(d,2),E(d,b.init(),4);case 4:return c=Promise.resolve(),Sx(b,function(e,f){c=c.then(function(){var g;return O(function(h){if(1==h.g)return E(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=yy(new hy("manifest",e.jb,e.Ha,l),k);a.push(k)});H(h)})})}),E(d,c,2);case 2:return Ba(d),E(d,b.destroy(),6);case 6:Da(d,3);break;case 3:return d.return(a)}})}
1202
+ function Iy(a,b,c,d){var e,f,g,h,k;return O(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate}},
1203
+ c.configure(d.manifest),Jy(a),E(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Jy(a),k=dz(h),E(l,Promise.all(Dg(k,function(m){return m.createSegmentIndex()})),3);Jy(a);if(e)throw e;return l.return(h)})}r.qc=function(a,b,c){var d=this,e;return O(function(f){return 1==f.g?(e=new Dh({Cb:d.g,onError:b,Yd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),E(f,Ih(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?E(f,Vh(e),3):f.return(e)})};
1204
+ function Uy(a,b,c,d){var e=new Map,f=dz(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=ez(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Mf:Array.from(e.values())}}
1205
+ function ez(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
1206
+ audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0;fz(d,c.presentationTimeline.ib(),function(l){var m=ux(l),n=void 0;if(!f.has(m)){var q=l.endTime-l.startTime;q=Cy(b,d.id)*q;q=xx(a.g,q);f.set(m,new tx(l,q,k,!1))}l.ca&&(n=ux(l.ca),f.has(n)||(q=.5*Cy(b,d.id),q=xx(a.g,q),f.set(n,new tx(l.ca,q,k,!0))));g.segments.push({pendingInitSegmentRefId:n,
1207
+ initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});k=(k+1)%h});return g}function fz(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Jy(a){if(a.l.g)throw new T(2,9,7001);}function Hy(){if(!Ey())throw new T(2,9,9E3);}
1208
+ function Vy(a,b){return O(function(c){if(1==c.g)return a.i.push(b),ya(c,2),E(c,b,4);if(2!=c.g)return c.return(c.h);Ba(c);Ob(a.i,b);return Da(c,0)})}function Gy(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Ob(a.i,c)})}function az(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
1209
+ function $y(a,b,c,d){var e,f,g;return O(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Vx(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Zy(d,!1),videoCapabilities:Zy(d,!0)}});return E(h,ty(b,a,f),2)}return 3!=h.g?(g=h.h,E(h,e.remove(g),3)):E(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
1210
+ function dz(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}
1211
+ function Sy(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());}S("shaka.offline.Storage",Dy);Dy.deleteAll=function(){var a;return O(function(b){return 1==b.g?(a=new Px,ya(b,2),E(b,Wx(a),2)):5!=b.g?(Ba(b),E(b,a.destroy(),5)):Da(b,0)})};
1212
+ Dy.prototype.list=Dy.prototype.list;Dy.prototype.removeEmeSessions=Dy.prototype.wi;Dy.prototype.remove=Dy.prototype.remove;Dy.prototype.store=Dy.prototype.store;Dy.prototype.getNetworkingEngine=Dy.prototype.Wb;Dy.prototype.getConfiguration=Dy.prototype.getConfiguration;Dy.prototype.configure=Dy.prototype.configure;Dy.prototype.destroy=Dy.prototype.destroy;Dy.support=Ey;
1213
+ var Ty=(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");lp.offline=Ey;function gz(){}function hz(a,b){a={priority:b||0,callback:a};for(b=0;b<iz.length;b++)if(iz[b].priority<a.priority){iz.splice(b,0,a);return}iz.push(a)}S("shaka.polyfill",gz);gz.register=hz;gz.installAll=function(){for(var a=t(iz),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){ab("Error installing polyfill!",c)}}};var iz=[];function jz(){this.g=new kz}function lz(){window.AbortController||(window.AbortController=jz,window.AbortSignal=kz)}jz.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 U("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};fa.Object.defineProperties(jz.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});gz.AbortController=jz;jz.install=lz;
1214
+ function kz(){this.h=!1;this.g=void 0;this.onabort=null;this.i=new jg}kz.prototype.addEventListener=function(a,b,c){return this.i.addEventListener(a,b,c)};kz.prototype.removeEventListener=function(a,b,c){return this.i.removeEventListener(a,b,c)};kz.prototype.dispatchEvent=function(a){return this.i.dispatchEvent(a)};kz.prototype.throwIfAborted=function(){if(this.h)throw this.g;};
1215
+ fa.Object.defineProperties(kz.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});hz(lz);function mz(){}function nz(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())oz(b.value)}function oz(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)}})}gz.Aria=mz;mz.install=nz;hz(nz);function pz(){}function qz(){rz()}gz.EncryptionScheme=pz;pz.install=qz;hz(qz,-2);function sz(){}
1216
+ function tz(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
1217
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",uz);document.addEventListener("webkitfullscreenerror",uz);document.addEventListener("mozfullscreenchange",uz);document.addEventListener("mozfullscreenerror",uz);document.addEventListener("MSFullscreenChange",uz);document.addEventListener("MSFullscreenError",uz)}}
1218
+ function uz(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}gz.Fullscreen=sz;sz.install=tz;hz(tz);function vz(){}function wz(){var a=!0;!fd()||fd()&&nd()||fd()&&Zc("Fuchsia")||(a=!1);if(gd()||jd()||id()||cd()||$c()||Zc("PC=EOS")||kd())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),xz=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=yz)}
1219
+ function yz(a){var b,c,d,e,f,g,h,k,l,m,n;return O(function(q){switch(q.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=Vc(e),!f)||d&&(g=d.contentType,h=Vc(g),!h))return q.return(b)}else return q.return(b);q.u(2);break}if(!Uc())return q.return(b);if(!c){q.u(3);break}return E(q,zz(c),4);case 4:if(k=q.h,!k)return q.return(b);case 3:if(d){var p=d.contentType;fd()&&d.spatialRendering&&
1220
+ (p+="; spatialRendering=true");l=mb(p);if(!l)return q.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,q.return(b);m=a.keySystemConfiguration;return E(q,Az(c,d,m),6);case 6:if(n=q.h)b.supported=!0,b.keySystemAccess=n;case 5:return q.return(b)}})}
1221
+ function zz(a){var b,c;return O(function(d){return 1==d.g?fd()?E(d,Bz(a),3):$c()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(mb(b))):d.u(2):2!=d.g?(c=d.h,d.return(c)):d.return(mb(a.contentType))})}
1222
+ function Az(a,b,c){var d,e,f,g,h,k,l,m,n;return O(function(q){switch(q.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},$c()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));h={initDataTypes:[c.initDataType],
1224
1223
  distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=c.keySystem;n=null;xa(q,2);if(Qc.has(k+"#"+l+"#"+m)){n=Qc.get(k+"#"+l+"#"+m)||null;q.u(4);break}return E(q,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:n=q.h,Qc.set(k+"#"+l+"#"+m,n);case 4:za(q,3);break;case 2:Aa(q);case 3:return q.return(n)}})}
1225
- function Cz(a){var b,c;return O(function(d){if(1==d.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return d.return(mb(a.contentType));b=a.contentType;a.width&&a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(b+="; framerate="+a.framerate);"pq"===a.transferFunction&&(b+="; eotf=smpte2084");c=!1;return b in Dz?(c=Dz[b],d.u(2)):E(d,cast.__platform__.canDisplayType(b),3)}2!=d.g&&(c=d.h,Dz[b]=c);return d.return(c)})}hz.MediaCapabilities=wz;wz.install=xz;
1226
- var yz=null;wz.originalMcap=yz;var Dz={};wz.memoizedCanDisplayTypeRequests_=Dz;iz(xz,-1);function Ez(){}function Fz(){var a=ld();if(window.MediaSource||window.ManagedMediaSource)a&&window.MediaSource?10>=a?window.MediaSource=null:12>=a?(Gz(),Hz()):15>=a&&Gz():Zc("DT_STB_BCM")?(Gz(),Hz()):(bd()||ad()||Zc("Tizen 4"))&&Iz();(window.MediaSource||window.ManagedMediaSource)&&Jz();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Kz()}
1227
- function Gz(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,La.apply(0,arguments));b.abort=function(){};return b}}function Hz(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
1228
- function Jz(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=ce(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=ce(c)&&b(c)}}}
1229
- function Iz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=ke(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=ke(c)&&b(c)}}}
1230
- function Kz(){var a=MediaSource.isTypeSupported;cd()||(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)})}hz.MediaSource=Ez;Ez.install=Fz;iz(Fz);function Lz(){}function Mz(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?Nz():void 0!=window.orientation&&Oz())}function Nz(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
1231
- function Oz(){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 Pz;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new U("change");b.dispatchEvent(c)})}hz.Orientation=Lz;Lz.install=Mz;function Pz(){jg.call(this);this.type="";this.angle=0}qa(Pz,jg);
1232
- Pz.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)};
1233
- Pz.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};iz(Mz);function Qz(){}var Rz,Sz,Tz,Uz,Vz,Wz;function Xz(a,b){try{var c=new Yz(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Zz(a){var b=this.mediaKeys;b&&b!=a&&$z(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?$z(a,this):Promise.resolve()}
1234
- function aA(a){a=Bb(a.initData);if(Fb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=xd(a.subarray(4),!0);a=Ad(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Cb(a);this.dispatchEvent(b)}hz.PatchedMediaKeysApple=Qz;
1235
- Qz.uninstall=function(){Rz&&(Rz=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Sz),HTMLMediaElement.prototype.setMediaKeys=Tz,window.MediaKeys=Uz,window.MediaKeySystemAccess=Vz,navigator.requestMediaKeySystemAccess=Wz,Sz=Wz=Tz=Vz=Uz=null,window.shakaMediaKeysPolyfill="")};
1236
- Qz.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Rz=!0,Sz=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Tz=HTMLMediaElement.prototype.setMediaKeys,Uz=window.MediaKeys,Vz=window.MediaKeySystemAccess,Wz=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Zz;window.MediaKeys=bA;window.MediaKeySystemAccess=Yz;navigator.requestMediaKeySystemAccess=
1237
- Xz;window.shakaMediaKeysPolyfill=cA}};
1238
- function Yz(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,
1224
+ function Bz(a){var b,c;return O(function(d){if(1==d.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return d.return(mb(a.contentType));b=a.contentType;a.width&&a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(b+="; framerate="+a.framerate);"pq"===a.transferFunction&&(b+="; eotf=smpte2084");c=!1;return b in Cz?(c=Cz[b],d.u(2)):E(d,cast.__platform__.canDisplayType(b),3)}2!=d.g&&(c=d.h,Cz[b]=c);return d.return(c)})}gz.MediaCapabilities=vz;vz.install=wz;
1225
+ var xz=null;vz.originalMcap=xz;var Cz={};vz.memoizedCanDisplayTypeRequests_=Cz;hz(wz,-1);function Dz(){}function Ez(){var a=ld();if(window.MediaSource||window.ManagedMediaSource)a&&window.MediaSource?10>=a?window.MediaSource=null:12>=a?(Fz(),Gz()):15>=a&&Fz():Zc("DT_STB_BCM")?(Fz(),Gz()):(bd()||ad()||Zc("Tizen 4"))&&Hz();(window.MediaSource||window.ManagedMediaSource)&&Iz();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Jz()}
1226
+ function Fz(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,La.apply(0,arguments));b.abort=function(){};return b}}function Gz(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
1227
+ function Iz(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=ce(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=ce(c)&&b(c)}}}
1228
+ function Hz(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=ke(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=ke(c)&&b(c)}}}
1229
+ function Jz(){var a=MediaSource.isTypeSupported;cd()||(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)})}gz.MediaSource=Dz;Dz.install=Ez;hz(Ez);function Kz(){}function Lz(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?Mz():void 0!=window.orientation&&Nz())}function Mz(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
1230
+ function Nz(){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 Oz;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new U("change");b.dispatchEvent(c)})}gz.Orientation=Kz;Kz.install=Lz;function Oz(){jg.call(this);this.type="";this.angle=0}qa(Oz,jg);
1231
+ Oz.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)};
1232
+ Oz.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};hz(Lz);function Pz(){}var Qz,Rz,Sz,Tz,Uz,Vz;function Wz(a,b){try{var c=new Xz(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Yz(a){var b=this.mediaKeys;b&&b!=a&&Zz(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Zz(a,this):Promise.resolve()}
1233
+ function $z(a){a=Bb(a.initData);if(Fb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=xd(a.subarray(4),!0);a=Ad(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Cb(a);this.dispatchEvent(b)}gz.PatchedMediaKeysApple=Pz;
1234
+ Pz.uninstall=function(){Qz&&(Qz=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Rz),HTMLMediaElement.prototype.setMediaKeys=Sz,window.MediaKeys=Tz,window.MediaKeySystemAccess=Uz,navigator.requestMediaKeySystemAccess=Vz,Rz=Vz=Sz=Uz=Tz=null,window.shakaMediaKeysPolyfill="")};
1235
+ Pz.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Qz=!0,Rz=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Sz=HTMLMediaElement.prototype.setMediaKeys,Tz=window.MediaKeys,Uz=window.MediaKeySystemAccess,Vz=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Yz;window.MediaKeys=aA;window.MediaKeySystemAccess=Xz;navigator.requestMediaKeySystemAccess=
1236
+ Wz;window.shakaMediaKeysPolyfill=bA}};
1237
+ function Xz(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,
1239
1238
  g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.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;}
1240
- Yz.prototype.createMediaKeys=function(){var a=new bA(this.keySystem);return Promise.resolve(a)};Yz.prototype.getConfiguration=function(){return this.g};function bA(a){this.h=new WebKitMediaKeys(a);this.g=new hb}bA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new dA(this.h,a)};bA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1241
- function $z(a,b){a.g.nb();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",aA);try{return vk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}bA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function dA(a){jg.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new hb;this.sessionId="";this.expiration=NaN;this.closed=new $f;this.keyStatuses=new eA}qa(dA,jg);r=dA.prototype;
1242
- r.generateRequest=function(a,b){var c=this;this.h=new $f;try{var d=this.l.createSession("video/mp4",Bb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Yb()?"license-request":"license-renewal").set("message",Cb(e.message));e=new U("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(fA(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
1243
- 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:fA(c,"output-not-allowed");break;default:fA(c,"internal-error")}});fA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1244
- r.update=function(a){this.g=new $f;try{this.i.update(Bb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.nb()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function fA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}
1245
- function eA(){this.size=0;this.g=void 0}r=eA.prototype;r.Yb=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,Oc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Oc.value();return this.g&&zb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var cA="apple";function gA(){}function hA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||ad()||Zc("Tizen 4")||Zc("Tizen 5.0")||dd())&&(MediaKeys.prototype.setServerCertificate=iA)}function iA(){return Promise.resolve(!1)}hz.PatchedMediaKeysCert=gA;gA.install=hA;iz(hA);function jA(){}function kA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=lA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=mA,window.MediaKeys=nA,window.MediaKeySystemAccess=oA,window.shakaMediaKeysPolyfill=pA)}function lA(){return Promise.reject(Error("The key system specified is not supported."))}
1246
- function mA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}hz.PatchedMediaKeysNop=jA;jA.install=kA;function nA(){throw new TypeError("Illegal constructor.");}nA.prototype.createSession=function(){};nA.prototype.setServerCertificate=function(){};nA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function oA(){this.keySystem="";throw new TypeError("Illegal constructor.");}oA.prototype.getConfiguration=function(){};
1247
- oA.prototype.createMediaKeys=function(){};var pA="nop";iz(kA,-10);function qA(){}
1248
- function rA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)sA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=tA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=uA;window.MediaKeys=vA;window.MediaKeySystemAccess=wA;window.shakaMediaKeysPolyfill=xA}}
1249
- function yA(a){var b=sA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function tA(a,b){try{var c=new wA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function uA(a){var b=this.mediaKeys;b&&b!=a&&zA(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&zA(a,this);return Promise.resolve()}hz.PatchedMediaKeysWebkit=qA;qA.install=rA;
1250
- function wA(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),
1239
+ Xz.prototype.createMediaKeys=function(){var a=new aA(this.keySystem);return Promise.resolve(a)};Xz.prototype.getConfiguration=function(){return this.g};function aA(a){this.h=new WebKitMediaKeys(a);this.g=new hb}aA.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new cA(this.h,a)};aA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1240
+ function Zz(a,b){a.g.nb();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",$z);try{return vk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}aA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function cA(a){jg.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new hb;this.sessionId="";this.expiration=NaN;this.closed=new $f;this.keyStatuses=new dA}qa(cA,jg);r=cA.prototype;
1241
+ r.generateRequest=function(a,b){var c=this;this.h=new $f;try{var d=this.l.createSession("video/mp4",Bb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Yb()?"license-request":"license-renewal").set("message",Cb(e.message));e=new U("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(eA(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
1242
+ 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:eA(c,"output-not-allowed");break;default:eA(c,"internal-error")}});eA(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1243
+ r.update=function(a){this.g=new $f;try{this.i.update(Bb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.nb()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function eA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}
1244
+ function dA(){this.size=0;this.g=void 0}r=dA.prototype;r.Yb=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,Oc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Oc.value();return this.g&&zb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var bA="apple";function fA(){}function gA(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||ad()||Zc("Tizen 4")||Zc("Tizen 5.0")||dd())&&(MediaKeys.prototype.setServerCertificate=hA)}function hA(){return Promise.resolve(!1)}gz.PatchedMediaKeysCert=fA;fA.install=gA;hz(gA);function iA(){}function jA(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=kA,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=lA,window.MediaKeys=mA,window.MediaKeySystemAccess=nA,window.shakaMediaKeysPolyfill=oA)}function kA(){return Promise.reject(Error("The key system specified is not supported."))}
1245
+ function lA(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}gz.PatchedMediaKeysNop=iA;iA.install=jA;function mA(){throw new TypeError("Illegal constructor.");}mA.prototype.createSession=function(){};mA.prototype.setServerCertificate=function(){};mA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function nA(){this.keySystem="";throw new TypeError("Illegal constructor.");}nA.prototype.getConfiguration=function(){};
1246
+ nA.prototype.createMediaKeys=function(){};var oA="nop";hz(jA,-10);function pA(){}
1247
+ function qA(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)rA="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=sA;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=tA;window.MediaKeys=uA;window.MediaKeySystemAccess=vA;window.shakaMediaKeysPolyfill=wA}}
1248
+ function xA(a){var b=rA;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function sA(a,b){try{var c=new vA(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function tA(a){var b=this.mediaKeys;b&&b!=a&&yA(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&yA(a,this);return Promise.resolve()}gz.PatchedMediaKeysWebkit=pA;pA.install=qA;
1249
+ function vA(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),
1251
1250
  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"]):
1252
- 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;}wA.prototype.createMediaKeys=function(){var a=new vA(this.g);return Promise.resolve(a)};wA.prototype.getConfiguration=function(){return this.h};function vA(a){this.l=a;this.h=null;this.g=new hb;this.i=[];this.j=new Map}
1253
- function zA(a,b){a.h=b;a.g.nb();var c=sA;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Cb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=AA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Yb()?"licenserequest":"licenserenewal").set("message",d.message),d=new U("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){(d=AA(a,d.sessionId))&&d.ready()}),
1254
- a.g.D(b,c+"keyerror",function(d){var e=AA(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?BA(e,"output-restricted"):1==f?BA(e,"expired"):BA(e,"internal-error"))}}))}
1255
- vA.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 CA(b,this.l,a);this.i.push(a);return a};vA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};vA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
1256
- function AA(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 CA(a,b,c){jg.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 $f;this.keyStatuses=new DA}qa(CA,jg);r=CA.prototype;r.ready=function(){BA(this,"usable");this.g&&this.g.resolve();this.g=null};
1257
- function EA(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=Bb(Ad("LOAD_SESSION|"+c));else{var e=Ad("PERSISTENT|");d=Md(e,b)}else d=Bb(b)}catch(g){return Promise.reject(g)}a.h=new $f;var f=yA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Tc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).X(.01)}return a.h}
1258
- function FA(a,b,c){if(a.g)a.g.then(function(){return FA(a,b,c)}).catch(function(){return FA(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=wd(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=Hd(e.keys[0].k);e=Hd(e.keys[0].kid)}else d=Bb(c),e=null;var f=yA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1259
- function BA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}r.generateRequest=function(a,b){return EA(this,b,null)};r.load=function(a){return"persistent-license"==this.l?EA(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new $f;FA(this,b,a);return b};
1260
- r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=yA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function DA(){this.size=0;this.g=void 0}r=DA.prototype;r.Yb=function(){return this.g};
1261
- r.forEach=function(a){this.g&&a(this.g,Oc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Oc.value();return this.g&&zb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var sA="",xA="webkit";iz(rA);function GA(){}function HA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=IA,Object.defineProperty(a,"disablePictureInPicture",{get:JA,set:KA,enumerable:!0,configurable:!0}),document.exitPictureInPicture=LA,document.addEventListener("webkitpresentationmodechanged",MA,!0))}}
1262
- function MA(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)}
1263
- function IA(){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 LA(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1264
- function JA(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function KA(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}hz.PiPWebkit=GA;GA.install=HA;iz(HA);function NA(){}function OA(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=PA))}function PA(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}hz.RandomUUID=NA;NA.install=OA;iz(OA);function QA(){}function RA(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:SA})}function SA(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}hz.Symbol=QA;QA.install=RA;iz(RA);function TA(){}function UA(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}hz.VideoPlayPromise=TA;TA.install=UA;iz(UA);function VA(){}function WA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||dd())&&(a.getVideoPlaybackQuality=XA)}}function XA(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}hz.VideoPlaybackQuality=VA;VA.install=WA;iz(WA);function YA(){}function ZA(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=$A;else if(6==b)a=aB;else{try{var c=!!$A(1,2,"")}catch(d){c=!1}c&&(a=$A)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function $A(a,b,c){return new window.TextTrackCue(a,b,c)}function aB(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}hz.VTTCue=YA;YA.install=ZA;iz(ZA);function bB(){}bB.prototype.parseInit=function(){};bB.prototype.setSequenceMode=function(){};bB.prototype.setManifestType=function(){};bB.prototype.parseMedia=function(a,b){var c=null,d=[];a=wd(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=cB.exec(e))){var f=dB.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Rb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1265
- S("shaka.text.LrcTextParser",bB);bB.prototype.parseMedia=bB.prototype.parseMedia;bB.prototype.setManifestType=bB.prototype.setManifestType;bB.prototype.setSequenceMode=bB.prototype.setSequenceMode;bB.prototype.parseInit=bB.prototype.parseInit;var cB=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,dB=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;re["application/x-subtitle-lrc"]=function(){return new bB};function eB(){}eB.prototype.parseInit=function(){};eB.prototype.setSequenceMode=function(){};eB.prototype.setManifestType=function(){};
1266
- eB.prototype.parseMedia=function(a,b,c){var d=wd(a);a=[];if(""==d)return a;var e=$g(d,"tt");if(!e)throw new T(2,2,2005,"Failed to parse TTML.");d=ih(e,"body")[0];if(!d)return[];var f=oh(e,fB,"frameRate"),g=oh(e,fB,"subFrameRate"),h=oh(e,fB,"frameRateMultiplier"),k=oh(e,fB,"tickRate"),l=oh(e,fB,"cellResolution"),m=e.attributes["xml:space"]||"default",n=oh(e,gB,"extent");if("default"!=m&&"preserve"!=m)throw new T(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new hB(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
1267
- {Qb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=ih(e,"metadata")[0])?g.children:[];h=ih(e,"style");e=ih(e,"region");k=[];for(var q=t(e),p=q.next();!p.done;p=q.next()){var u=p.value;p=new Kb;var v=u.attributes["xml:id"];if(v){p.id=v;var w=null;n&&(w=iB.exec(n)||jB.exec(n));v=w?Number(w[1]):null;w=w?Number(w[2]):null;var A,y=kB(u,h,"extent");if(y){var C=(A=iB.exec(y))||jB.exec(y);null!=C&&(p.width=Number(C[1]),p.height=Number(C[2]),A||(null!=v&&(p.width=100*p.width/v),null!=w&&(p.height=
1268
- 100*p.height/w)),p.widthUnits=A||null!=v?Lb:0,p.heightUnits=A||null!=w?Lb:0)}if(u=kB(u,h,"origin"))if(C=(A=iB.exec(u))||jB.exec(u),null!=C)p.viewportAnchorX=Number(C[1]),p.viewportAnchorY=Number(C[2]),A?y||(p.width=100-p.viewportAnchorX,p.widthUnits=Lb,p.height=100-p.viewportAnchorY,p.heightUnits=Lb):(null!=w&&(p.viewportAnchorY=100*p.viewportAnchorY/w),null!=v&&(p.viewportAnchorX=100*p.viewportAnchorX/v)),p.viewportAnchorUnits=A||null!=v?Lb:0}else p=null;p&&k.push(p)}if(fh(d,"p").length)throw new T(2,
1269
- 2,2001,"<p> can only be inside <div> in TTML");n=t(fh(d,"div"));for(q=n.next();!q.done;q=n.next())if(fh(q.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=lB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
1270
- function lB(a,b,c,d,e,f,g,h,k,l,m,n){var q=l;if(dh(a)){if(!m)return null;var p={tagName:"span",children:[gh(a)],attributes:{},parent:null}}else p=a;for(var u=null,v=t(mB),w=v.next();!w.done&&!(u=nB(p,"backgroundImage",d,"#",w.value)[0]);w=v.next());v=null;var A=oh(p,mB,"backgroundImage");n&&A&&!A.startsWith("#")&&(w=new sc(n),A=new sc(A),(w=w.resolve(A).toString())&&(v=w));if("p"==a.tagName||u||v)m=!0;a=m;w="default"==(p.attributes["xml:space"]||(h?"default":"preserve"));A=p.children.every(dh);h=
1271
- [];if(!A)for(var y=t(p.children),C=y.next();!C.done;C=y.next())(C=lB(C.value,b,c,d,e,f,g,w,k,p,m,n))&&h.push(C);d=null!=l;n=gh(p);n=p.children.length&&n&&/\S/.test(n);C=p.attributes.begin||p.attributes.end||p.attributes.dur;if(!(C||n||"br"==p.tagName||0!=h.length||d&&!w))return null;y=oB(p,c);n=y.start;for(y=y.end;q&&q.tagName&&"tt"!=q.tagName;)y=pB(q,c,n,y),n=y.start,y=y.end,q=q.parent;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);
1272
- if(!C&&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"==p.tagName)return e=new Rb(n,y,""),e.lineBreak=!0,e;b="";A&&(b=Dd(gh(p)||""),w&&(b=b.replace(/\s+/g," ")));b=new Rb(n,y,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=nB(p,"region",f,"")[0];if(p.attributes.region&&k&&k.attributes["xml:id"]){var z=k.attributes["xml:id"];b.region=g.filter(function(B){return B.id==z})[0]}g=k;l&&d&&!p.attributes.region&&
1273
- !p.attributes.style&&(g=nB(l,"region",f,"")[0]);qB(b,p,g,u,v,e,a,0==h.length);return b}
1274
- function qB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==rB(b,c,f,"direction",g)&&(a.direction="rtl");h=rB(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=Ub);(h=rB(b,c,f,"textAlign",!0))?(a.positionAlign=sB[h],a.lineAlign=tB[h],a.textAlign=cc[h.toUpperCase()]):a.textAlign=Tb;if(h=rB(b,c,f,"displayAlign",!0))a.displayAlign=dc[h.toUpperCase()];if(h=rB(b,c,f,"color",g))a.color=h;if(h=rB(b,c,f,"backgroundColor",
1275
- g))a.backgroundColor=h;if(h=rB(b,c,f,"border",g))a.border=h;if(h=rB(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.split(",").filter(function(k){return"default"!=
1276
- k}).join(",")}(h=rB(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=700);h=rB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=rB(b,c,f,"lineHeight",g))&&h.match(uB)&&(a.lineHeight=h);(h=rB(b,c,f,"fontSize",g))&&(h.match(uB)||h.match(vB))&&(a.fontSize=h);if(h=rB(b,c,f,"fontStyle",g))a.fontStyle=hc[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=gh(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
1277
- e);if(d=rB(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(uB)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(uB)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=rB(b,c,f,"letterSpacing",g))&&d.match(uB)&&(a.letterSpacing=d);(d=rB(b,c,f,"linePadding",g))&&d.match(uB)&&(a.linePadding=d);if(d=rB(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=kB(c,f,"textDecoration"))&&wB(a,d);(d=xB(b,f,"textDecoration"))&&wB(a,d);if(d=rB(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(rB(b,
1251
+ 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;}vA.prototype.createMediaKeys=function(){var a=new uA(this.g);return Promise.resolve(a)};vA.prototype.getConfiguration=function(){return this.h};function uA(a){this.l=a;this.h=null;this.g=new hb;this.i=[];this.j=new Map}
1252
+ function yA(a,b){a.h=b;a.g.nb();var c=rA;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Cb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=zA(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Yb()?"licenserequest":"licenserenewal").set("message",d.message),d=new U("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){(d=zA(a,d.sessionId))&&d.ready()}),
1253
+ a.g.D(b,c+"keyerror",function(d){var e=zA(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?AA(e,"output-restricted"):1==f?AA(e,"expired"):AA(e,"internal-error"))}}))}
1254
+ uA.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 BA(b,this.l,a);this.i.push(a);return a};uA.prototype.setServerCertificate=function(){return Promise.resolve(!1)};uA.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
1255
+ function zA(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 BA(a,b,c){jg.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 $f;this.keyStatuses=new CA}qa(BA,jg);r=BA.prototype;r.ready=function(){AA(this,"usable");this.g&&this.g.resolve();this.g=null};
1256
+ function DA(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=Bb(Ad("LOAD_SESSION|"+c));else{var e=Ad("PERSISTENT|");d=Md(e,b)}else d=Bb(b)}catch(g){return Promise.reject(g)}a.h=new $f;var f=xA("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Tc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).X(.01)}return a.h}
1257
+ function EA(a,b,c){if(a.g)a.g.then(function(){return EA(a,b,c)}).catch(function(){return EA(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=wd(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=Hd(e.keys[0].k);e=Hd(e.keys[0].kid)}else d=Bb(c),e=null;var f=xA("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1258
+ function AA(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new U("keystatuseschange");a.dispatchEvent(b)}r.generateRequest=function(a,b){return DA(this,b,null)};r.load=function(a){return"persistent-license"==this.l?DA(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new $f;EA(this,b,a);return b};
1259
+ r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=xA("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function CA(){this.size=0;this.g=void 0}r=CA.prototype;r.Yb=function(){return this.g};
1260
+ r.forEach=function(a){this.g&&a(this.g,Oc.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Oc.value();return this.g&&zb(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var rA="",wA="webkit";hz(qA);function FA(){}function GA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=HA,Object.defineProperty(a,"disablePictureInPicture",{get:IA,set:JA,enumerable:!0,configurable:!0}),document.exitPictureInPicture=KA,document.addEventListener("webkitpresentationmodechanged",LA,!0))}}
1261
+ function LA(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)}
1262
+ function HA(){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 KA(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1263
+ function IA(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function JA(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}gz.PiPWebkit=FA;FA.install=GA;hz(GA);function MA(){}function NA(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=OA))}function OA(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}gz.RandomUUID=MA;MA.install=NA;hz(NA);function PA(){}function QA(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:RA})}function RA(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}gz.Symbol=PA;PA.install=QA;hz(QA);function SA(){}function TA(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}gz.VideoPlayPromise=SA;SA.install=TA;hz(TA);function UA(){}function VA(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||dd())&&(a.getVideoPlaybackQuality=WA)}}function WA(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}gz.VideoPlaybackQuality=UA;UA.install=VA;hz(VA);function XA(){}function YA(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=ZA;else if(6==b)a=$A;else{try{var c=!!ZA(1,2,"")}catch(d){c=!1}c&&(a=ZA)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function ZA(a,b,c){return new window.TextTrackCue(a,b,c)}function $A(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}gz.VTTCue=XA;XA.install=YA;hz(YA);function aB(){}aB.prototype.parseInit=function(){};aB.prototype.setSequenceMode=function(){};aB.prototype.setManifestType=function(){};aB.prototype.parseMedia=function(a,b){var c=null,d=[];a=wd(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=bB.exec(e))){var f=cB.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Rb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1264
+ S("shaka.text.LrcTextParser",aB);aB.prototype.parseMedia=aB.prototype.parseMedia;aB.prototype.setManifestType=aB.prototype.setManifestType;aB.prototype.setSequenceMode=aB.prototype.setSequenceMode;aB.prototype.parseInit=aB.prototype.parseInit;var bB=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,cB=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;re["application/x-subtitle-lrc"]=function(){return new aB};function dB(){}dB.prototype.parseInit=function(){};dB.prototype.setSequenceMode=function(){};dB.prototype.setManifestType=function(){};
1265
+ dB.prototype.parseMedia=function(a,b,c){var d=wd(a);a=[];if(""==d)return a;var e=$g(d,"tt");if(!e)throw new T(2,2,2005,"Failed to parse TTML.");d=ih(e,"body")[0];if(!d)return[];var f=oh(e,eB,"frameRate"),g=oh(e,eB,"subFrameRate"),h=oh(e,eB,"frameRateMultiplier"),k=oh(e,eB,"tickRate"),l=oh(e,eB,"cellResolution"),m=e.attributes["xml:space"]||"default",n=oh(e,fB,"extent");if("default"!=m&&"preserve"!=m)throw new T(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new gB(f,g,h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?
1266
+ {Qb:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=ih(e,"metadata")[0])?g.children:[];h=ih(e,"style");e=ih(e,"region");k=[];for(var q=t(e),p=q.next();!p.done;p=q.next()){var u=p.value;p=new Kb;var v=u.attributes["xml:id"];if(v){p.id=v;var w=null;n&&(w=hB.exec(n)||iB.exec(n));v=w?Number(w[1]):null;w=w?Number(w[2]):null;var A,y=jB(u,h,"extent");if(y){var C=(A=hB.exec(y))||iB.exec(y);null!=C&&(p.width=Number(C[1]),p.height=Number(C[2]),A||(null!=v&&(p.width=100*p.width/v),null!=w&&(p.height=
1267
+ 100*p.height/w)),p.widthUnits=A||null!=v?Lb:0,p.heightUnits=A||null!=w?Lb:0)}if(u=jB(u,h,"origin"))if(C=(A=hB.exec(u))||iB.exec(u),null!=C)p.viewportAnchorX=Number(C[1]),p.viewportAnchorY=Number(C[2]),A?y||(p.width=100-p.viewportAnchorX,p.widthUnits=Lb,p.height=100-p.viewportAnchorY,p.heightUnits=Lb):(null!=w&&(p.viewportAnchorY=100*p.viewportAnchorY/w),null!=v&&(p.viewportAnchorX=100*p.viewportAnchorX/v)),p.viewportAnchorUnits=A||null!=v?Lb:0}else p=null;p&&k.push(p)}if(fh(d,"p").length)throw new T(2,
1268
+ 2,2001,"<p> can only be inside <div> in TTML");n=t(fh(d,"div"));for(q=n.next();!q.done;q=n.next())if(fh(q.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=kB(d,b,f,g,h,e,k,m,l,null,!1,c))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
1269
+ function kB(a,b,c,d,e,f,g,h,k,l,m,n){var q=l;if(dh(a)){if(!m)return null;var p={tagName:"span",children:[gh(a)],attributes:{},parent:null}}else p=a;for(var u=null,v=t(lB),w=v.next();!w.done&&!(u=mB(p,"backgroundImage",d,"#",w.value)[0]);w=v.next());v=null;var A=oh(p,lB,"backgroundImage");n&&A&&!A.startsWith("#")&&(w=new sc(n),A=new sc(A),(w=w.resolve(A).toString())&&(v=w));if("p"==a.tagName||u||v)m=!0;a=m;w="default"==(p.attributes["xml:space"]||(h?"default":"preserve"));A=p.children.every(dh);h=
1270
+ [];if(!A)for(var y=t(p.children),C=y.next();!C.done;C=y.next())(C=kB(C.value,b,c,d,e,f,g,w,k,p,m,n))&&h.push(C);d=null!=l;n=gh(p);n=p.children.length&&n&&/\S/.test(n);C=p.attributes.begin||p.attributes.end||p.attributes.dur;if(!(C||n||"br"==p.tagName||0!=h.length||d&&!w))return null;y=nB(p,c);n=y.start;for(y=y.end;q&&q.tagName&&"tt"!=q.tagName;)y=oB(q,c,n,y),n=y.start,y=y.end,q=q.parent;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);
1271
+ if(!C&&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"==p.tagName)return e=new Rb(n,y,""),e.lineBreak=!0,e;b="";A&&(b=Dd(gh(p)||""),w&&(b=b.replace(/\s+/g," ")));b=new Rb(n,y,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=mB(p,"region",f,"")[0];if(p.attributes.region&&k&&k.attributes["xml:id"]){var z=k.attributes["xml:id"];b.region=g.filter(function(B){return B.id==z})[0]}g=k;l&&d&&!p.attributes.region&&
1272
+ !p.attributes.style&&(g=mB(l,"region",f,"")[0]);pB(b,p,g,u,v,e,a,0==h.length);return b}
1273
+ function pB(a,b,c,d,e,f,g,h){g=g||h;"rtl"==qB(b,c,f,"direction",g)&&(a.direction="rtl");h=qB(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=Ub);(h=qB(b,c,f,"textAlign",!0))?(a.positionAlign=rB[h],a.lineAlign=sB[h],a.textAlign=cc[h.toUpperCase()]):a.textAlign=Tb;if(h=qB(b,c,f,"displayAlign",!0))a.displayAlign=dc[h.toUpperCase()];if(h=qB(b,c,f,"color",g))a.color=h;if(h=qB(b,c,f,"backgroundColor",
1274
+ g))a.backgroundColor=h;if(h=qB(b,c,f,"border",g))a.border=h;if(h=qB(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.split(",").filter(function(k){return"default"!=
1275
+ k}).join(",")}(h=qB(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=700);h=qB(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=qB(b,c,f,"lineHeight",g))&&h.match(tB)&&(a.lineHeight=h);(h=qB(b,c,f,"fontSize",g))&&(h.match(tB)||h.match(uB))&&(a.fontSize=h);if(h=qB(b,c,f,"fontStyle",g))a.fontStyle=hc[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=gh(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
1276
+ e);if(d=qB(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(tB)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(tB)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=qB(b,c,f,"letterSpacing",g))&&d.match(tB)&&(a.letterSpacing=d);(d=qB(b,c,f,"linePadding",g))&&d.match(tB)&&(a.linePadding=d);if(d=qB(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=jB(c,f,"textDecoration"))&&vB(a,d);(d=wB(b,f,"textDecoration"))&&vB(a,d);if(d=qB(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(qB(b,
1278
1277
  c,f,"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
1279
- function wB(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")&&Ob(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Ob(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
1280
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Ob(a.textDecoration,"overline")}}function rB(a,b,c,d,e){e=void 0===e?!0:e;return(a=xB(a,c,d))?a:e?kB(b,c,d):null}function kB(a,b,c){if(!a)return null;var d=oh(a,gB,c);return d?d:yB(a,b,c)}function xB(a,b,c){var d=oh(a,gB,c);return d?d:yB(a,b,c)}
1281
- function yB(a,b,c){a=nB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=nh(a[e],"urn:ebu:tt:style",c);f||(f=oh(a[e],gB,c));f||(f=xB(a[e],b,c));f&&(d=f)}return d}function nB(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?nh(g,e,b):g.attributes[b])&&(g=g.parent,g););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.attributes["xml:id"]==e){f.push(g);break}return f}
1282
- function pB(a,b,c,d){a=oB(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}}function oB(a,b){var c=zB(a.attributes.begin,b),d=zB(a.attributes.end,b);a=zB(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1283
- function zB(a,b){var c=null;if(AB.test(a)){a=AB.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(BB.test(a))c=CB(BB,a);else if(DB.test(a))c=CB(DB,a);else if(EB.test(a))a=EB.exec(a),c=Number(a[1])/b.frameRate;else if(FB.test(a))a=FB.exec(a),c=Number(a[1])/b.g;else if(GB.test(a))c=CB(GB,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c}
1284
- function CB(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)}S("shaka.text.TtmlTextParser",eB);eB.prototype.parseMedia=eB.prototype.parseMedia;eB.prototype.setManifestType=eB.prototype.setManifestType;eB.prototype.setSequenceMode=eB.prototype.setSequenceMode;eB.prototype.parseInit=eB.prototype.parseInit;
1285
- function hB(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]))}
1286
- var iB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,vB=/^(\d{1,4}(?:\.\d+)?|100)%$/,uB=/^(\d+px|\d+em|\d*\.?\d+c)$/,jB=/^(\d+)px (\d+)px$/,AB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,BB=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,DB=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,EB=/^(\d*(?:\.\d*)?)f$/,FB=/^(\d*(?:\.\d*)?)t$/,GB=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),tB={left:Xb,center:"center",right:"end",start:Xb,
1287
- end:"end"},sB={left:"line-left",center:"center",right:"line-right"},fB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],gB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],mB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];re["application/ttml+xml"]=function(){return new eB};function HB(){this.g=new eB}HB.prototype.parseInit=function(a){var b=!1;(new Kg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).box("minf",Rg).box("stbl",Rg).R("stsd",Tg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};HB.prototype.setSequenceMode=function(){};HB.prototype.setManifestType=function(){};
1288
- HB.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Kg).box("mdat",Wg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new T(2,2,2007);return f};S("shaka.text.Mp4TtmlParser",HB);HB.prototype.parseMedia=HB.prototype.parseMedia;HB.prototype.setManifestType=HB.prototype.setManifestType;HB.prototype.setSequenceMode=HB.prototype.setSequenceMode;HB.prototype.parseInit=HB.prototype.parseInit;re['application/mp4; codecs="stpp"']=function(){return new HB};
1289
- re['application/mp4; codecs="stpp.ttml"']=function(){return new HB};re['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new HB};re['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new HB};re['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new HB};re['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new HB};re['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new HB};re['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new HB};function IB(){this.h=!1;this.g="UNKNOWN"}IB.prototype.parseInit=function(){};IB.prototype.setSequenceMode=function(a){this.h=a};IB.prototype.setManifestType=function(a){this.g=a};
1290
- IB.prototype.parseMedia=function(a,b){a=wd(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 T(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new T(2,2,2E3);a=JB(new xp(a[1]));if(null==a)throw new T(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=
1291
- 95443.7176888889,d+=8589934592;a=b.periodStart+d/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new xp(e);var f=new Kb;Ap(e);yp(e);for(var g=Ap(e);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=
1292
- 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");yp(e);g=Ap(e)}b.push(f)}d=new Map;KB(d);e=[];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=
1278
+ function vB(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")&&Ob(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Ob(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
1279
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Ob(a.textDecoration,"overline")}}function qB(a,b,c,d,e){e=void 0===e?!0:e;return(a=wB(a,c,d))?a:e?jB(b,c,d):null}function jB(a,b,c){if(!a)return null;var d=oh(a,fB,c);return d?d:xB(a,b,c)}function wB(a,b,c){var d=oh(a,fB,c);return d?d:xB(a,b,c)}
1280
+ function xB(a,b,c){a=mB(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=nh(a[e],"urn:ebu:tt:style",c);f||(f=oh(a[e],fB,c));f||(f=wB(a[e],b,c));f&&(d=f)}return d}function mB(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?nh(g,e,b):g.attributes[b])&&(g=g.parent,g););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.attributes["xml:id"]==e){f.push(g);break}return f}
1281
+ function oB(a,b,c,d){a=nB(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}}function nB(a,b){var c=yB(a.attributes.begin,b),d=yB(a.attributes.end,b);a=yB(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1282
+ function yB(a,b){var c=null;if(zB.test(a)){a=zB.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(AB.test(a))c=BB(AB,a);else if(CB.test(a))c=BB(CB,a);else if(DB.test(a))a=DB.exec(a),c=Number(a[1])/b.frameRate;else if(EB.test(a))a=EB.exec(a),c=Number(a[1])/b.g;else if(FB.test(a))c=BB(FB,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c}
1283
+ function BB(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)}S("shaka.text.TtmlTextParser",dB);dB.prototype.parseMedia=dB.prototype.parseMedia;dB.prototype.setManifestType=dB.prototype.setManifestType;dB.prototype.setSequenceMode=dB.prototype.setSequenceMode;dB.prototype.parseInit=dB.prototype.parseInit;
1284
+ function gB(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]))}
1285
+ var hB=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,uB=/^(\d{1,4}(?:\.\d+)?|100)%$/,tB=/^(\d+px|\d+em|\d*\.?\d+c)$/,iB=/^(\d+)px (\d+)px$/,zB=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,AB=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,CB=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,DB=/^(\d*(?:\.\d*)?)f$/,EB=/^(\d*(?:\.\d*)?)t$/,FB=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),sB={left:Xb,center:"center",right:"end",start:Xb,
1286
+ end:"end"},rB={left:"line-left",center:"center",right:"line-right"},eB=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],fB=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],lB=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];re["application/ttml+xml"]=function(){return new dB};function GB(){this.g=new dB}GB.prototype.parseInit=function(a){var b=!1;(new Kg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).box("minf",Rg).box("stbl",Rg).P("stsd",Tg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};GB.prototype.setSequenceMode=function(){};GB.prototype.setManifestType=function(){};
1287
+ GB.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[];(new Kg).box("mdat",Wg(function(g){e=!0;f=f.concat(d.g.parseMedia(g,b,c))})).parse(a,!1);if(!e)throw new T(2,2,2007);return f};S("shaka.text.Mp4TtmlParser",GB);GB.prototype.parseMedia=GB.prototype.parseMedia;GB.prototype.setManifestType=GB.prototype.setManifestType;GB.prototype.setSequenceMode=GB.prototype.setSequenceMode;GB.prototype.parseInit=GB.prototype.parseInit;re['application/mp4; codecs="stpp"']=function(){return new GB};
1288
+ re['application/mp4; codecs="stpp.ttml"']=function(){return new GB};re['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new GB};re['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new GB};re['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new GB};re['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new GB};re['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new GB};re['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new GB};function HB(){this.h=!1;this.g="UNKNOWN"}HB.prototype.parseInit=function(){};HB.prototype.setSequenceMode=function(a){this.h=a};HB.prototype.setManifestType=function(a){this.g=a};
1289
+ HB.prototype.parseMedia=function(a,b){a=wd(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 T(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g)if(this.h){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new T(2,2,2E3);a=IB(new wp(a[1]));if(null==a)throw new T(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=
1290
+ 95443.7176888889,d+=8589934592;a=b.periodStart+d/9E4-a}else a=b.segmentStart;b=[];d=t(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new wp(e);var f=new Kb;zp(e);xp(e);for(var g=zp(e);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=
1291
+ 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");xp(e);g=zp(e)}b.push(f)}d=new Map;JB(d);e=[];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=
1293
1292
  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=d.get(g))||(l=new Rb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var q=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var p=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=p;break;case "color":m=!0;l.color=p;break;case "font-family":m=!0;l.fontFamily=p;break;
1294
1293
  case "font-size":m=!0;l.fontSize=p;break;case "font-weight":if(700<=parseInt(p,10)||"bold"==p)m=!0,l.fontWeight=700;break;case "font-style":switch(p){case "normal":m=!0;l.fontStyle=$b;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(p);break;case "text-combine-upright":m=!0;l.textCombineUpright=p;break;case "text-shadow":m=!0;l.textShadow=p;break;case "white-space":m=!0,l.wrapLine="noWrap"!=p}}}m&&d.set(g,
1295
- l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new xp(l[0]),g=JB(h),n=zp(h,/[ \t]+--\x3e[ \t]+/g),k=JB(h),null==g||null==n||null==k)ab("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;l=l.slice(1).join("\n").trim();d.has("global")?(m=d.get("global").clone(),m.startTime=g,m.endTime=k,m.payload=""):m=new Rb(g,k,"");yp(h);for(g=Ap(h);g;)LB(m,g,b),yp(h),g=Ap(h);
1296
- MB(l,m,d);null!=f&&(m.id=f);f=m}f&&e.push(f)}return e};function KB(a){for(var b=t(Object.entries(fc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Rb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(gc));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Rb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1297
- function MB(a,b,c){if(a.includes("<")){0===c.size&&KB(c);var d=a;a=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(NB)&&a.push(e),e=-1);a=t(a);for(f=a.next();!f.done;f=a.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a=d;a:{f=a;e=[];var g=-1;a="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){a=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&(l=e[e.length-1]);if(l){if(l===
1298
- k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=OB(a);try{var m=$g("<span>"+a+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=m.length||m[0].tagName)for(m=t(m),a=m.next();!a.done;a=
1299
- m.next())PB(a.value,b,c);else b.payload=Dd(a);else b.payload=Dd(a)}else b.payload=Dd(a)}function OB(a){var b={"< ":""," >":" &gt;"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}function QB(a,b){return a&&0<a.length?a:b}
1300
- function PB(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Kb;d.position=null;d.size=0;if(a.tagName)for(var e=t(a.tagName.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)&&(h=d,g=c.get(g))&&(h.backgroundColor=QB(g.backgroundColor,h.backgroundColor),h.color=QB(g.color,h.color),h.fontFamily=QB(g.fontFamily,h.fontFamily),h.fontSize=
1301
- QB(g.fontSize,h.fontSize),h.textShadow=QB(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=ac(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.attributes.color)d.color=f;break;case "div":f=a.attributes.time;
1302
- if(!f)break;if(f=JB(new xp(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(dh(a)||1==e.length&&dh(e[0]))for(c=gh(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=ac(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Dd(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())PB(a.value,d,c)}
1303
- function LB(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Tb:a.textAlign=cc[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"==
1304
- b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Sb);else if(d=/^region:(.*)$/.exec(b)){if(b=RB(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=ec[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Wb,a.line=Number(c[1]),c[2]&&(a.lineAlign=ec[c[2].toUpperCase()])}
1305
- function RB(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function JB(a){a=zp(a,NB);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)}S("shaka.text.VttTextParser",IB);IB.prototype.parseMedia=IB.prototype.parseMedia;IB.prototype.setManifestType=IB.prototype.setManifestType;IB.prototype.setSequenceMode=IB.prototype.setSequenceMode;IB.prototype.parseInit=IB.prototype.parseInit;var NB=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
1306
- re["text/vtt"]=function(){return new IB};re['text/vtt; codecs="vtt"']=function(){return new IB};re['text/vtt; codecs="wvtt"']=function(){return new IB};function SB(){this.g=null}SB.prototype.parseInit=function(a){var b=this,c=!1;(new Kg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).R("mdhd",function(d){d=Yi(d.reader,d.version);b.g=d.timescale}).box("minf",Rg).box("stbl",Rg).R("stsd",Tg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};SB.prototype.setSequenceMode=function(){};SB.prototype.setManifestType=function(){};
1307
- SB.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new T(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Kg).box("moof",Rg).box("traf",Rg).R("tfdt",function(C){g=!0;c=Xi(C.reader,C.version).baseMediaDecodeTime}).R("tfhd",function(C){l=Wi(C.reader,C.flags).Pc}).R("trun",function(C){h=!0;d=Zi(C.reader,C.version,C.flags).Fg}).box("mdat",Wg(function(C){k=!0;e=C})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Hg(e,0),n=t(d),q=n.next();!q.done;q=n.next()){q=
1308
- q.value;var p=q.xf||l,u=q.fe?c+q.fe:a;a=u+(p||0);var v=0;do{var w=m.O();v+=w;var A=m.O(),y=null;"vttc"==Qg(A)?8<w&&(y=m.mb(w-8)):m.skip(w-8);p&&y&&(w=TB(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(q.sampleSize&&v<q.sampleSize)}return f.filter(ze)};function TB(a,b,c){var d,e,f;(new Kg).box("payl",Wg(function(g){d=wd(g)})).box("iden",Wg(function(g){e=wd(g)})).box("sttg",Wg(function(g){f=wd(g)})).parse(a);return d?UB(d,e,f,b,c):null}
1309
- function UB(a,b,c,d,e){d=new Rb(d,e,"");MB(a,d,new Map);b&&(d.id=b);if(c)for(a=new xp(c),b=Ap(a);b;)LB(d,b,[]),yp(a),b=Ap(a);return d}S("shaka.text.Mp4VttParser",SB);SB.prototype.parseMedia=SB.prototype.parseMedia;SB.prototype.setManifestType=SB.prototype.setManifestType;SB.prototype.setSequenceMode=SB.prototype.setSequenceMode;SB.prototype.parseInit=SB.prototype.parseInit;re['application/mp4; codecs="wvtt"']=function(){return new SB};function VB(){}VB.prototype.parseInit=function(){};VB.prototype.setSequenceMode=function(){};VB.prototype.setManifestType=function(){};VB.prototype.parseMedia=function(a){var b=wd(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 xp(c[0]),e=WB(d),f=zp(d,/,/g);d=WB(d);if(null==e||null==f||null==d)throw new T(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Rb(e,d,c.slice(1).join("\n").trim()))}return a};
1310
- function WB(a){a=zp(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)}S("shaka.text.SbvTextParser",VB);VB.prototype.parseMedia=VB.prototype.parseMedia;VB.prototype.setManifestType=VB.prototype.setManifestType;VB.prototype.setSequenceMode=VB.prototype.setSequenceMode;VB.prototype.parseInit=VB.prototype.parseInit;re["text/x-subviewer"]=function(){return new VB};function XB(){this.g=new IB}XB.prototype.parseInit=function(){};XB.prototype.setSequenceMode=function(){};XB.prototype.setManifestType=function(){};XB.prototype.parseMedia=function(a,b,c){a=wd(a);a=YB(a);a=Bb(Ad(a));return this.g.parseMedia(a,b,c)};
1311
- function YB(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}S("shaka.text.SrtTextParser",XB);XB.srt2webvtt=YB;XB.prototype.parseMedia=XB.prototype.parseMedia;
1312
- XB.prototype.setManifestType=XB.prototype.setManifestType;XB.prototype.setSequenceMode=XB.prototype.setSequenceMode;XB.prototype.parseInit=XB.prototype.parseInit;re["text/srt"]=function(){return new XB};function ZB(){}ZB.prototype.parseInit=function(){};ZB.prototype.setSequenceMode=function(){};ZB.prototype.setManifestType=function(){};
1313
- ZB.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=wd(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=$B.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=aC.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(bC);else if("Style"==a){a=f.split(bC);f={};for(var g=0;g<e.length&&
1314
- g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;c=t(c.split(/\r?\n/));f=c.next();for(a={};!f.done;a={Sg:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=aC.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(bC);else if("Dialogue"==f){g=g.split(bC);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=cC(f.Start);var k=cC(f.End);g=new Rb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Sg=f.Style;(a=d.find(function(l){return function(m){return m.Name==
1315
- l.Sg}}(a)))&&dC(g,a);e.push(g)}return e};
1316
- function dC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=eC(c))a.color=c;if(c=b.BackColour)if(c=eC(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=Yb;a.textAlign="start";break;case 2:a.displayAlign=Yb;a.textAlign=Tb;break;case 3:a.displayAlign=Yb;a.textAlign="end";
1294
+ l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new wp(l[0]),g=IB(h),n=yp(h,/[ \t]+--\x3e[ \t]+/g),k=IB(h),null==g||null==n||null==k)ab("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;l=l.slice(1).join("\n").trim();d.has("global")?(m=d.get("global").clone(),m.startTime=g,m.endTime=k,m.payload=""):m=new Rb(g,k,"");xp(h);for(g=zp(h);g;)KB(m,g,b),xp(h),g=zp(h);
1295
+ LB(l,m,d);null!=f&&(m.id=f);f=m}f&&e.push(f)}return e};function JB(a){for(var b=t(Object.entries(fc)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Rb(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(gc));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Rb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1296
+ function LB(a,b,c){if(a.includes("<")){0===c.size&&JB(c);var d=a;a=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(MB)&&a.push(e),e=-1);a=t(a);for(f=a.next();!f.done;f=a.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a=d;a:{f=a;e=[];var g=-1;a="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){a=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&(l=e[e.length-1]);if(l){if(l===
1297
+ k)a+="/"+k+">";else{if(!l.startsWith("v")){a+=f[h];continue}a+="/"+l+">"}h+=k.length+1}else a+=f[h]}else a+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),a+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),a=a.replace("<"+e+">","<"+g+">"),a=a.replace("</"+e+">","</"+g+">"),d||(a+="</"+g+">")}a=NB(a);try{var m=$g("<span>"+a+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=m.length||m[0].tagName)for(m=t(m),a=m.next();!a.done;a=
1298
+ m.next())OB(a.value,b,c);else b.payload=Dd(a);else b.payload=Dd(a)}else b.payload=Dd(a)}function NB(a){var b={"< ":""," >":" &gt;"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}function PB(a,b){return a&&0<a.length?a:b}
1299
+ function OB(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Kb;d.position=null;d.size=0;if(a.tagName)for(var e=t(a.tagName.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)&&(h=d,g=c.get(g))&&(h.backgroundColor=PB(g.backgroundColor,h.backgroundColor),h.color=PB(g.color,h.color),h.fontFamily=PB(g.fontFamily,h.fontFamily),h.fontSize=
1300
+ PB(g.fontSize,h.fontSize),h.textShadow=PB(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=ac(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.attributes.color)d.color=f;break;case "div":f=a.attributes.time;
1301
+ if(!f)break;if(f=IB(new wp(f)))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(dh(a)||1==e.length&&dh(e[0]))for(c=gh(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=ac(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Dd(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())OB(a.value,d,c)}
1302
+ function KB(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Tb:a.textAlign=cc[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"==
1303
+ b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Sb);else if(d=/^region:(.*)$/.exec(b)){if(b=QB(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=ec[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Wb,a.line=Number(c[1]),c[2]&&(a.lineAlign=ec[c[2].toUpperCase()])}
1304
+ function QB(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}function IB(a){a=yp(a,MB);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)}S("shaka.text.VttTextParser",HB);HB.prototype.parseMedia=HB.prototype.parseMedia;HB.prototype.setManifestType=HB.prototype.setManifestType;HB.prototype.setSequenceMode=HB.prototype.setSequenceMode;HB.prototype.parseInit=HB.prototype.parseInit;var MB=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;
1305
+ re["text/vtt"]=function(){return new HB};re['text/vtt; codecs="vtt"']=function(){return new HB};re['text/vtt; codecs="wvtt"']=function(){return new HB};function RB(){this.g=null}RB.prototype.parseInit=function(a){var b=this,c=!1;(new Kg).box("moov",Rg).box("trak",Rg).box("mdia",Rg).P("mdhd",function(d){d=Yi(d.reader,d.version);b.g=d.timescale}).box("minf",Rg).box("stbl",Rg).P("stsd",Tg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};RB.prototype.setSequenceMode=function(){};RB.prototype.setManifestType=function(){};
1306
+ RB.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new T(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Kg).box("moof",Rg).box("traf",Rg).P("tfdt",function(C){g=!0;c=Xi(C.reader,C.version).baseMediaDecodeTime}).P("tfhd",function(C){l=Wi(C.reader,C.flags).Pc}).P("trun",function(C){h=!0;d=Zi(C.reader,C.version,C.flags).Fg}).box("mdat",Wg(function(C){k=!0;e=C})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Hg(e,0),n=t(d),q=n.next();!q.done;q=n.next()){q=
1307
+ q.value;var p=q.xf||l,u=q.fe?c+q.fe:a;a=u+(p||0);var v=0;do{var w=m.O();v+=w;var A=m.O(),y=null;"vttc"==Qg(A)?8<w&&(y=m.mb(w-8)):m.skip(w-8);p&&y&&(w=SB(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(q.sampleSize&&v<q.sampleSize)}return f.filter(ze)};function SB(a,b,c){var d,e,f;(new Kg).box("payl",Wg(function(g){d=wd(g)})).box("iden",Wg(function(g){e=wd(g)})).box("sttg",Wg(function(g){f=wd(g)})).parse(a);return d?TB(d,e,f,b,c):null}
1308
+ function TB(a,b,c,d,e){d=new Rb(d,e,"");LB(a,d,new Map);b&&(d.id=b);if(c)for(a=new wp(c),b=zp(a);b;)KB(d,b,[]),xp(a),b=zp(a);return d}S("shaka.text.Mp4VttParser",RB);RB.prototype.parseMedia=RB.prototype.parseMedia;RB.prototype.setManifestType=RB.prototype.setManifestType;RB.prototype.setSequenceMode=RB.prototype.setSequenceMode;RB.prototype.parseInit=RB.prototype.parseInit;re['application/mp4; codecs="wvtt"']=function(){return new RB};function UB(){}UB.prototype.parseInit=function(){};UB.prototype.setSequenceMode=function(){};UB.prototype.setManifestType=function(){};UB.prototype.parseMedia=function(a){var b=wd(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 wp(c[0]),e=VB(d),f=yp(d,/,/g);d=VB(d);if(null==e||null==f||null==d)throw new T(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Rb(e,d,c.slice(1).join("\n").trim()))}return a};
1309
+ function VB(a){a=yp(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)}S("shaka.text.SbvTextParser",UB);UB.prototype.parseMedia=UB.prototype.parseMedia;UB.prototype.setManifestType=UB.prototype.setManifestType;UB.prototype.setSequenceMode=UB.prototype.setSequenceMode;UB.prototype.parseInit=UB.prototype.parseInit;re["text/x-subviewer"]=function(){return new UB};function WB(){this.g=new HB}WB.prototype.parseInit=function(){};WB.prototype.setSequenceMode=function(){};WB.prototype.setManifestType=function(){};WB.prototype.parseMedia=function(a,b,c){a=wd(a);a=XB(a);a=Bb(Ad(a));return this.g.parseMedia(a,b,c)};
1310
+ function XB(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}S("shaka.text.SrtTextParser",WB);WB.srt2webvtt=XB;WB.prototype.parseMedia=WB.prototype.parseMedia;
1311
+ WB.prototype.setManifestType=WB.prototype.setManifestType;WB.prototype.setSequenceMode=WB.prototype.setSequenceMode;WB.prototype.parseInit=WB.prototype.parseInit;re["text/srt"]=function(){return new WB};function YB(){}YB.prototype.parseInit=function(){};YB.prototype.setSequenceMode=function(){};YB.prototype.setManifestType=function(){};
1312
+ YB.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=wd(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=ZB.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=$B.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(aC);else if("Style"==a){a=f.split(aC);f={};for(var g=0;g<e.length&&
1313
+ g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;c=t(c.split(/\r?\n/));f=c.next();for(a={};!f.done;a={Sg:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=$B.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(aC);else if("Dialogue"==f){g=g.split(aC);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=bC(f.Start);var k=bC(f.End);g=new Rb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Sg=f.Style;(a=d.find(function(l){return function(m){return m.Name==
1314
+ l.Sg}}(a)))&&cC(g,a);e.push(g)}return e};
1315
+ function cC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=dC(c))a.color=c;if(c=b.BackColour)if(c=dC(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=Yb;a.textAlign="start";break;case 2:a.displayAlign=Yb;a.textAlign=Tb;break;case 3:a.displayAlign=Yb;a.textAlign="end";
1317
1316
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Tb;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=Tb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
1318
- function eC(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 cC(a){a=fC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",ZB);ZB.prototype.parseMedia=ZB.prototype.parseMedia;ZB.prototype.setManifestType=ZB.prototype.setManifestType;ZB.prototype.setSequenceMode=ZB.prototype.setSequenceMode;ZB.prototype.parseInit=ZB.prototype.parseInit;
1319
- var $B=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,aC=/^\s*([^:]+):\s*(.*)/,bC=/\s*,\s*/,fC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;re["text/x-ssa"]=function(){return new ZB};function gC(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)?{Id:c,Z:a}:null}function hC(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,codec:"mp4a.40."+e}}
1320
- function iC(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}
1321
- function jC(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,
1322
- 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 kC(a){this.i=a;this.h=0;this.g=new Map}r=kC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(ne(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
1323
- r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Vi(e),g=f.length;g<e.length&&!iC(e,g);g++);a=1E3*c.endTime;f=Ui(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=hC(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=gC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var l=k.Id+k.Z;g+l<=e.length&&h.push({data:e.subarray(g+
1324
- k.Id,g+l),size:k.Z,duration:1024,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Wa:[],ja:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.h,baseMediaDecodeTime:a,Ta:h},stream:b};d=new xw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Dw(d),this.g.set(c,b));c=Uw(d);this.h++;b=Md(b,c);return Promise.resolve(b)};
1325
- S("shaka.transmuxer.AacTransmuxer",kC);kC.prototype.transmux=kC.prototype.transmux;kC.prototype.getOriginalMimeType=kC.prototype.getOriginalMimeType;kC.prototype.convertCodecs=kC.prototype.convertCodecs;kC.prototype.isSupported=kC.prototype.isSupported;kC.prototype.destroy=kC.prototype.destroy;kc("audio/aac",function(){return new kC("audio/aac")},qc);function lC(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,
1317
+ function dC(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 bC(a){a=eC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",YB);YB.prototype.parseMedia=YB.prototype.parseMedia;YB.prototype.setManifestType=YB.prototype.setManifestType;YB.prototype.setSequenceMode=YB.prototype.setSequenceMode;YB.prototype.parseInit=YB.prototype.parseInit;
1318
+ var ZB=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,$B=/^\s*([^:]+):\s*(.*)/,aC=/\s*,\s*/,eC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;re["text/x-ssa"]=function(){return new YB};function fC(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)?{Id:c,Z:a}:null}function gC(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,codec:"mp4a.40."+e}}
1319
+ function hC(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}
1320
+ function iC(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,
1321
+ 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 jC(a){this.i=a;this.h=0;this.g=new Map}r=jC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(ne(b)||"mp4a.40.2")+'"':b};r.getOriginalMimeType=function(){return this.i};
1322
+ r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Vi(e),g=f.length;g<e.length&&!hC(e,g);g++);a=1E3*c.endTime;f=Ui(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=gC(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=fC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var l=k.Id+k.Z;g+l<=e.length&&h.push({data:e.subarray(g+
1323
+ k.Id,g+l),size:k.Z,duration:1024,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Wa:[],ja:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.h,baseMediaDecodeTime:a,Ta:h},stream:b};d=new ww([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Cw(d),this.g.set(c,b));c=Tw(d);this.h++;b=Md(b,c);return Promise.resolve(b)};
1324
+ S("shaka.transmuxer.AacTransmuxer",jC);jC.prototype.transmux=jC.prototype.transmux;jC.prototype.getOriginalMimeType=jC.prototype.getOriginalMimeType;jC.prototype.convertCodecs=jC.prototype.convertCodecs;jC.prototype.isSupported=jC.prototype.isSupported;jC.prototype.destroy=jC.prototype.destroy;kc("audio/aac",function(){return new jC("audio/aac")},qc);function kC(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,
1326
1325
  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,ja:a,Z:e}}
1327
- function mC(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 nC(a){this.i=a;this.h=0;this.g=new Map}r=nC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i};
1328
- r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Vi(a),f=e.length;f<a.length&&!mC(a,f);f++);var g=1E3*c.endTime;e=Ui(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=lC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ja;k.push({data:a.subarray(f,f+l.Z),size:l.Z,duration:1536,
1329
- Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=l.Z}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Wa:[],ja:h,ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.h,baseMediaDecodeTime:a,Ta:k},stream:b};d=new xw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Dw(d),this.g.set(c,b));c=Uw(d);this.h++;b=Md(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",nC);nC.prototype.transmux=nC.prototype.transmux;
1330
- nC.prototype.getOriginalMimeType=nC.prototype.getOriginalMimeType;nC.prototype.convertCodecs=nC.prototype.convertCodecs;nC.prototype.isSupported=nC.prototype.isSupported;nC.prototype.destroy=nC.prototype.destroy;kc("audio/ac3",function(){return new nC("audio/ac3")},qc);function oC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new ej(a.subarray(b+2));gj(c,2);gj(c,3);var d=hj(c,11)+1<<1,e=hj(c,2);if(3==e){e=hj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=hj(c,2);var g=hj(c,3),h=hj(c,1);c=hj(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,ja:a,Z:d}};function pC(a){this.i=a;this.h=0;this.g=new Map}r=pC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i};
1331
- r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Vi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Ui(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=oC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ja;k.push({data:a.subarray(f,f+l.Z),size:l.Z,
1332
- duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=l.Z}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Wa:[],ja:h,ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.h,baseMediaDecodeTime:a,Ta:k},stream:b};d=new xw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Dw(d),this.g.set(c,b));c=Uw(d);this.h++;b=Md(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",pC);pC.prototype.transmux=pC.prototype.transmux;
1333
- pC.prototype.getOriginalMimeType=pC.prototype.getOriginalMimeType;pC.prototype.convertCodecs=pC.prototype.convertCodecs;pC.prototype.isSupported=pC.prototype.isSupported;pC.prototype.destroy=pC.prototype.destroy;kc("audio/ec3",function(){return new pC("audio/ec3")},qc);function qC(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 ej(b.data),d=sj(c);sj(c);sj(c);jj(c);if(rC.includes(d)&&(d=V(c),3===d&&gj(c,1),jj(c),jj(c),gj(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?tj(c,16):tj(c,64))}jj(c);d=V(c);if(0===d)V(c);else if(1===d)for(gj(c,1),jj(c),jj(c),d=V(c),e=0;e<d;e++)jj(c);jj(c);gj(c,1);var f=V(c),g=V(c),h=hj(c,1);0===h&&gj(c,1);gj(c,1);var k=0,l=0,m=0,n=0;W(c)&&
1326
+ function lC(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 mC(a){this.i=a;this.h=0;this.g=new Map}r=mC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};r.getOriginalMimeType=function(){return this.i};
1327
+ r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Vi(a),f=e.length;f<a.length&&!lC(a,f);f++);var g=1E3*c.endTime;e=Ui(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=kC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ja;k.push({data:a.subarray(f,f+l.Z),size:l.Z,duration:1536,
1328
+ Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=l.Z}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Wa:[],ja:h,ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.h,baseMediaDecodeTime:a,Ta:k},stream:b};d=new ww([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Cw(d),this.g.set(c,b));c=Tw(d);this.h++;b=Md(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",mC);mC.prototype.transmux=mC.prototype.transmux;
1329
+ mC.prototype.getOriginalMimeType=mC.prototype.getOriginalMimeType;mC.prototype.convertCodecs=mC.prototype.convertCodecs;mC.prototype.isSupported=mC.prototype.isSupported;mC.prototype.destroy=mC.prototype.destroy;kc("audio/ac3",function(){return new mC("audio/ac3")},qc);function nC(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new ej(a.subarray(b+2));gj(c,2);gj(c,3);var d=hj(c,11)+1<<1,e=hj(c,2);if(3==e){e=hj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=hj(c,2);var g=hj(c,3),h=hj(c,1);c=hj(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,ja:a,Z:d}};function oC(a){this.i=a;this.h=0;this.g=new Map}r=oC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};r.getOriginalMimeType=function(){return this.i};
1330
+ r.transmux=function(a,b,c,d){a=Bb(a);for(var e=Vi(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Ui(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=nC(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.ja;k.push({data:a.subarray(f,f+l.Z),size:l.Z,
1331
+ duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=l.Z}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Wa:[],ja:h,ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.h,baseMediaDecodeTime:a,Ta:k},stream:b};d=new ww([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Cw(d),this.g.set(c,b));c=Tw(d);this.h++;b=Md(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",oC);oC.prototype.transmux=oC.prototype.transmux;
1332
+ oC.prototype.getOriginalMimeType=oC.prototype.getOriginalMimeType;oC.prototype.convertCodecs=oC.prototype.convertCodecs;oC.prototype.isSupported=oC.prototype.isSupported;oC.prototype.destroy=oC.prototype.destroy;kc("audio/ec3",function(){return new oC("audio/ec3")},qc);function pC(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 ej(b.data),d=sj(c);sj(c);sj(c);jj(c);if(qC.includes(d)&&(d=V(c),3===d&&gj(c,1),jj(c),jj(c),gj(c,1),W(c))){d=3!==d?8:12;for(var e=0;e<d;e++)W(c)&&(6>e?tj(c,16):tj(c,64))}jj(c);d=V(c);if(0===d)V(c);else if(1===d)for(gj(c,1),jj(c),jj(c),d=V(c),e=0;e<d;e++)jj(c);jj(c);gj(c,1);var f=V(c),g=V(c),h=hj(c,1);0===h&&gj(c,1);gj(c,1);var k=0,l=0,m=0,n=0;W(c)&&
1334
1333
  (k=V(c),l=V(c),m=V(c),n=V(c));e=d=1;if(W(c)&&W(c)){var q=sj(c),p=[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<q&&16>=q?(d=p[q-1],e=u[q-1]):255===q&&(d=hj(c,16),e=hj(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,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4],k[5],255,
1335
1334
  225].concat(k,[1],b));return{height:c,width:f,ta:a,Aa:d,Ba:e}}
1336
- function sC(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=uj(new ej(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(h),c.push(f.fullData))}return c.length?
1337
- {data:Md.apply(Ed,x(c)),cd:b}:null}var rC=[100,110,122,244,44,83,86,118,128,138,139,134];function tC(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=uC(b.fullData);a=vC(c.fullData);var f=wC(d.fullData);b=xC(b.fullData,c.fullData,d.fullData,{jf:e.jf,Lf:e.Lf,Oe:a.Oe,Pe:a.Pe,Ie:a.Ie,Ne:a.Ne,Je:a.Je,Ke:a.Ke,Le:a.Le,Me:a.Me,Ce:a.Ce,De:a.De,Ee:a.Ee,Fe:a.Fe,Ge:a.Ge,He:a.He,xe:a.xe,Td:a.Td,ve:a.ve,ue:a.ue,te:a.te,mf:f.mf});return{height:a.height,width:a.width,
1338
- ta:b,Aa:a.Di,Ba:a.Ci}}function uC(a){var b=new ej(a,!0);sj(b);sj(b);hj(b,4);hj(b,2);hj(b,6);a=hj(b,3);b=W(b);return{jf:a+1,Lf:b}}
1339
- function vC(a){a=new ej(a,!0);sj(a);sj(a);var b=0,c=0,d=0,e=0;hj(a,4);var f=hj(a,3);W(a);for(var g=hj(a,2),h=hj(a,1),k=hj(a,5),l=sj(a),m=sj(a),n=sj(a),q=sj(a),p=sj(a),u=sj(a),v=sj(a),w=sj(a),A=sj(a),y=sj(a),C=sj(a),z=[],B=[],D=0;D<f;D++)z.push(W(a)),B.push(W(a));if(0<f)for(D=f;8>D;D++)hj(a,2);for(D=0;D<f;D++)z[D]&&hj(a,88),B[D]&&sj(a);V(a);z=V(a);3==z&&hj(a,1);B=V(a);D=V(a);W(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var I=V(a),F=V(a),K=V(a);if(W(a))for(var J=0;J<=f;J++)V(a),V(a),V(a);else V(a),V(a),
1335
+ function rC(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=uj(new ej(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(h),c.push(f.fullData))}return c.length?
1336
+ {data:Md.apply(Ed,x(c)),cd:b}:null}var qC=[100,110,122,244,44,83,86,118,128,138,139,134];function sC(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=tC(b.fullData);a=uC(c.fullData);var f=vC(d.fullData);b=wC(b.fullData,c.fullData,d.fullData,{jf:e.jf,Lf:e.Lf,Oe:a.Oe,Pe:a.Pe,Ie:a.Ie,Ne:a.Ne,Je:a.Je,Ke:a.Ke,Le:a.Le,Me:a.Me,Ce:a.Ce,De:a.De,Ee:a.Ee,Fe:a.Fe,Ge:a.Ge,He:a.He,xe:a.xe,Td:a.Td,ve:a.ve,ue:a.ue,te:a.te,mf:f.mf});return{height:a.height,width:a.width,
1337
+ ta:b,Aa:a.Ci,Ba:a.Bi}}function tC(a){var b=new ej(a,!0);sj(b);sj(b);hj(b,4);hj(b,2);hj(b,6);a=hj(b,3);b=W(b);return{jf:a+1,Lf:b}}
1338
+ function uC(a){a=new ej(a,!0);sj(a);sj(a);var b=0,c=0,d=0,e=0;hj(a,4);var f=hj(a,3);W(a);for(var g=hj(a,2),h=hj(a,1),k=hj(a,5),l=sj(a),m=sj(a),n=sj(a),q=sj(a),p=sj(a),u=sj(a),v=sj(a),w=sj(a),A=sj(a),y=sj(a),C=sj(a),z=[],B=[],D=0;D<f;D++)z.push(W(a)),B.push(W(a));if(0<f)for(D=f;8>D;D++)hj(a,2);for(D=0;D<f;D++)z[D]&&hj(a,88),B[D]&&sj(a);V(a);z=V(a);3==z&&hj(a,1);B=V(a);D=V(a);W(a)&&(b+=V(a),c+=V(a),d+=V(a),e+=V(a));var I=V(a),F=V(a),K=V(a);if(W(a))for(var J=0;J<=f;J++)V(a),V(a),V(a);else V(a),V(a),
1340
1339
  V(a);V(a);V(a);V(a);V(a);V(a);V(a);if(W(a)&&W(a))for(J=0;4>J;J++)for(var G=0;G<(3===J?2:6);G++)if(W(a)){var L=Math.min(64,1<<4+(J<<1));1<J&&kj(a);for(var N=0;N<L;N++)kj(a)}else V(a);W(a);W(a);W(a)&&(sj(a),V(a),V(a),W(a));J=V(a);for(L=G=0;L<J;L++)if(N=!1,0!==L&&(N=W(a)),N){L===J&&V(a);W(a);V(a);for(var M=N=0;M<=G;M++){var P=W(a),R=!1;P||(R=W(a));(P||R)&&N++}G=N}else{M=V(a);N=V(a);G=M+N;for(P=0;P<M;P++)V(a),W(a);for(M=0;M<N;M++)V(a),W(a)}if(W(a))for(J=V(a),G=0;G<J;G++){for(L=0;L<K+4;L++)hj(a,1);hj(a,
1341
1340
  1)}J=K=1;G=0;W(a);W(a);if(W(a)){W(a)&&(L=sj(a),N=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],M=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<L&&16>=L?(K=N[L-1],J=M[L-1]):255===L&&(K=hj(a,16),J=hj(a,16)));W(a)&&W(a);W(a)&&(hj(a,3),W(a),W(a)&&(sj(a),sj(a),sj(a)));W(a)&&(V(a),V(a));W(a);W(a);W(a);if(L=W(a))V(a),V(a),V(a),V(a);if(W(a)&&(hj(a,32),hj(a,32),W(a)&&V(a),W(a))){M=!1;L=W(a);N=W(a);if(L||N){if(M=W(a))sj(a),hj(a,5),W(a),hj(a,5);hj(a,4);hj(a,4);M&&hj(a,4);hj(a,5);hj(a,5);hj(a,5)}for(P=0;P<=
1342
- f;P++){var Q=!0;R=1;W(a)||(Q=W(a));var ea=!1;Q?V(a):ea=W(a);ea||(R=V(a)+1);if(L){for(Q=0;Q<R;Q++)V(a),V(a),M&&(V(a),V(a));W(a)}if(N){for(Q=0;Q<R;Q++)V(a),V(a),M&&(V(a),V(a));W(a)}}}W(a)&&(W(a),W(a),W(a),G=V(a),V(a),V(a),V(a),V(a))}return{Ie:C,Oe:g,Pe:h,Ne:k,Je:l,Ke:m,Le:n,Me:q,Ce:p,De:u,Ee:v,Fe:w,Ge:A,He:y,Td:G,xe:0,ve:z,ue:I,te:F,width:B-(b+c)*(1===z||2===z?2:1),height:D-(d+e)*(1===z?2:1),Di:K,Ci:J}}
1343
- function wC(a){var b=new ej(a,!0);sj(b);sj(b);V(b);V(b);W(b);W(b);hj(b,3);W(b);W(b);V(b);V(b);kj(b);W(b);W(b);W(b)&&V(b);kj(b);kj(b);W(b);W(b);W(b);W(b);a=W(b);b=W(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{mf:c}}
1344
- function xC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Oe&3)<<6|(d.Pe?1:0)<<5|d.Ne&31;e[2]=d.Je;e[3]=d.Ke;e[4]=d.Le;e[5]=d.Me;e[6]=d.Ce;e[7]=d.De;e[8]=d.Ee;e[9]=d.Fe;e[10]=d.Ge;e[11]=d.He;e[12]=d.Ie;e[13]=240|(d.Td&3840)>>8;e[14]=d.Td&255;e[15]=252|d.mf&3;e[16]=252|d.ve&3;e[17]=248|d.ue&7;e[18]=248|d.te&7;e[19]=0;e[20]=0;e[21]=(d.xe&3)<<6|(d.jf&7)<<3|(d.Lf?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&
1345
- 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 yC(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*zC[14*(3===c?3-d:3===d?3:4)+e-1];f=AC[3*(3===c?0:2===c?1:2)+f];c=BC[c][d];var h=CC[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,Z:k,Bi:8*c*h}}return null}
1346
- function DC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function EC(a,b){if(b+1<a.length&&DC(a,b)){var c=yC(a,b),d=4;c&&c.Z&&(d=c.Z);b+=d;return b===a.length||b+1<a.length&&DC(a,b)}return!1}
1347
- var zC=[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],AC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],BC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],CC=[0,1,1,4];function FC(a){this.i=a;this.h=0;this.g=new Map}r=FC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.i};
1348
- r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Vi(e).length;f<e.length&&!EC(e,f);f++);var g;for(a=[];f<e.length;){var h=yC(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));g||(g=h);f+h.Z<=e.length&&a.push({data:e.subarray(f,f+h.Z),size:h.Z,duration:1152,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=h.Z}if(!g)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));e=9E4*g.Bi/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
1349
- duration:d,Wa:[],ja:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.h,baseMediaDecodeTime:e,Ta:a},stream:b};d=new xw([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Dw(d),this.g.set(c,b));c=Uw(d);this.h++;b=Md(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",FC);FC.prototype.transmux=FC.prototype.transmux;FC.prototype.getOriginalMimeType=FC.prototype.getOriginalMimeType;FC.prototype.convertCodecs=FC.prototype.convertCodecs;FC.prototype.isSupported=FC.prototype.isSupported;
1350
- FC.prototype.destroy=FC.prototype.destroy;kc("audio/mpeg",function(){return new FC("audio/mpeg")},qc);function GC(a){this.h=a;this.g=null}r=GC.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=ne(a).split(","),c=Rd("audio",b);b=Rd("video",b);return!c||b||"mp3"!=de(c)?!1:mb(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.h};
1351
- r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new vj;a=Bb(a);a=this.g.parse(a);if("mp3"!=a.Tc().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=new Uint8Array([]);e=t(a.Ib());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=yC(a,b))?(b+d.Z<=a.length&&(c=Md(c,a.subarray(b,b+d.Z))),b+=d.Z):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",GC);GC.prototype.transmux=GC.prototype.transmux;
1352
- GC.prototype.getOriginalMimeType=GC.prototype.getOriginalMimeType;GC.prototype.convertCodecs=GC.prototype.convertCodecs;GC.prototype.isSupported=GC.prototype.isSupported;GC.prototype.destroy=GC.prototype.destroy;kc("video/mp2t",function(){return new GC("video/mp2t")},pc);/*
1341
+ f;P++){var Q=!0;R=1;W(a)||(Q=W(a));var ea=!1;Q?V(a):ea=W(a);ea||(R=V(a)+1);if(L){for(Q=0;Q<R;Q++)V(a),V(a),M&&(V(a),V(a));W(a)}if(N){for(Q=0;Q<R;Q++)V(a),V(a),M&&(V(a),V(a));W(a)}}}W(a)&&(W(a),W(a),W(a),G=V(a),V(a),V(a),V(a),V(a))}return{Ie:C,Oe:g,Pe:h,Ne:k,Je:l,Ke:m,Le:n,Me:q,Ce:p,De:u,Ee:v,Fe:w,Ge:A,He:y,Td:G,xe:0,ve:z,ue:I,te:F,width:B-(b+c)*(1===z||2===z?2:1),height:D-(d+e)*(1===z?2:1),Ci:K,Bi:J}}
1342
+ function vC(a){var b=new ej(a,!0);sj(b);sj(b);V(b);V(b);W(b);W(b);hj(b,3);W(b);W(b);V(b);V(b);kj(b);W(b);W(b);W(b)&&V(b);kj(b);kj(b);W(b);W(b);W(b);W(b);a=W(b);b=W(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{mf:c}}
1343
+ function wC(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Oe&3)<<6|(d.Pe?1:0)<<5|d.Ne&31;e[2]=d.Je;e[3]=d.Ke;e[4]=d.Le;e[5]=d.Me;e[6]=d.Ce;e[7]=d.De;e[8]=d.Ee;e[9]=d.Fe;e[10]=d.Ge;e[11]=d.He;e[12]=d.Ie;e[13]=240|(d.Td&3840)>>8;e[14]=d.Td&255;e[15]=252|d.mf&3;e[16]=252|d.ve&3;e[17]=248|d.ue&7;e[18]=248|d.te&7;e[19]=0;e[20]=0;e[21]=(d.xe&3)<<6|(d.jf&7)<<3|(d.Lf?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&
1344
+ 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 xC(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*yC[14*(3===c?3-d:3===d?3:4)+e-1];f=zC[3*(3===c?0:2===c?1:2)+f];c=AC[c][d];var h=BC[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,Z:k,Ai:8*c*h}}return null}
1345
+ function CC(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function DC(a,b){if(b+1<a.length&&CC(a,b)){var c=xC(a,b),d=4;c&&c.Z&&(d=c.Z);b+=d;return b===a.length||b+1<a.length&&CC(a,b)}return!1}
1346
+ var yC=[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],zC=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],AC=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BC=[0,1,1,4];function EC(a){this.i=a;this.h=0;this.g=new Map}r=EC.prototype;r.destroy=function(){this.g.clear()};r.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?mb(this.convertCodecs("audio",a)):!1};r.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};r.getOriginalMimeType=function(){return this.i};
1347
+ r.transmux=function(a,b,c,d){for(var e=Bb(a),f=Vi(e).length;f<e.length&&!DC(e,f);f++);var g;for(a=[];f<e.length;){var h=xC(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));g||(g=h);f+h.Z<=e.length&&a.push({data:e.subarray(f,f+h.Z),size:h.Z,duration:1152,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=h.Z}if(!g)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));e=9E4*g.Ai/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
1348
+ duration:d,Wa:[],ja:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.h,baseMediaDecodeTime:e,Ta:a},stream:b};d=new ww([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Cw(d),this.g.set(c,b));c=Tw(d);this.h++;b=Md(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",EC);EC.prototype.transmux=EC.prototype.transmux;EC.prototype.getOriginalMimeType=EC.prototype.getOriginalMimeType;EC.prototype.convertCodecs=EC.prototype.convertCodecs;EC.prototype.isSupported=EC.prototype.isSupported;
1349
+ EC.prototype.destroy=EC.prototype.destroy;kc("audio/mpeg",function(){return new EC("audio/mpeg")},qc);function FC(a){this.h=a;this.g=null}r=FC.prototype;r.destroy=function(){};r.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=ne(a).split(","),c=Rd("audio",b);b=Rd("video",b);return!c||b||"mp3"!=de(c)?!1:mb(this.convertCodecs("audio",a))};r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};r.getOriginalMimeType=function(){return this.h};
1350
+ r.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new vj;a=Bb(a);a=this.g.parse(a);if("mp3"!=a.Tc().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=new Uint8Array([]);e=t(a.Ib());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=xC(a,b))?(b+d.Z<=a.length&&(c=Md(c,a.subarray(b,b+d.Z))),b+=d.Z):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",FC);FC.prototype.transmux=FC.prototype.transmux;
1351
+ FC.prototype.getOriginalMimeType=FC.prototype.getOriginalMimeType;FC.prototype.convertCodecs=FC.prototype.convertCodecs;FC.prototype.isSupported=FC.prototype.isSupported;FC.prototype.destroy=FC.prototype.destroy;kc("video/mp2t",function(){return new FC("video/mp2t")},pc);/*
1353
1352
  @license
1354
1353
  MSS Transmuxer
1355
1354
  Copyright 2015 Dash Industry Forum
1356
1355
  SPDX-License-Identifier: BSD-3-Clause
1357
1356
  */
1358
- function HC(a){this.h=a;(this.g=Iu.get("ISOBoxer")())&&IC(this)}
1359
- function IC(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",
1357
+ function GC(a){this.h=a;(this.g=Hu.get("ISOBoxer")())&&HC(this)}
1358
+ function HC(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",
1360
1359
  "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",
1361
- "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]!==JC[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=HC.prototype;r.destroy=function(){};
1360
+ "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]!==IC[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}r=GC.prototype;r.destroy=function(){};
1362
1361
  r.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return mb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return mb(b)||mb(a)};r.convertCodecs=function(a,b){return b.replace("mss/","")};r.getOriginalMimeType=function(){return this.h};
1363
1362
  r.transmux=function(a,b,c){if(!c)return Promise.resolve(Bb(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.M()[0]:null));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");
1364
1363
  m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var q=e.fetch("saio");if(null===q){q=this.g.createFullBox("saio",h);q.version=0;q.flags=0;q.entry_count=1;q.offset=[0];var p=this.g.createFullBox("saiz",h);p.version=0;p.flags=0;p.sample_count=n.sample_count;p.default_sample_info_size=0;p.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)p.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else p.default_sample_info_size=
1365
- 8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=KC(u,"traf")+KC(h,"senc")+16);var w=Bb(e.write());return Promise.resolve(w)}catch(A){return A instanceof T?Promise.reject(A):Promise.reject(new T(2,3,3022,c?c.M()[0]:null))}};function KC(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}S("shaka.transmuxer.MssTransmuxer",HC);HC.prototype.transmux=HC.prototype.transmux;
1366
- HC.prototype.getOriginalMimeType=HC.prototype.getOriginalMimeType;HC.prototype.convertCodecs=HC.prototype.convertCodecs;HC.prototype.isSupported=HC.prototype.isSupported;HC.prototype.destroy=HC.prototype.destroy;var JC=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);kc("mss/audio/mp4",function(){return new HC("mss/audio/mp4")},qc);kc("mss/video/mp4",function(){return new HC("mss/video/mp4")},qc);function LC(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}r=LC.prototype;r.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
1367
- r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=ne(c).split(",");c=Rd("audio",d);d=Rd("video",d);if(c&&(c=de(c),!MC.includes(c))||d&&(c=de(d),!NC.includes(c)))return!1;if(b)return mb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return mb(b)||mb(a)};
1364
+ 8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=JC(u,"traf")+JC(h,"senc")+16);var w=Bb(e.write());return Promise.resolve(w)}catch(A){return A instanceof T?Promise.reject(A):Promise.reject(new T(2,3,3022,c?c.M()[0]:null))}};function JC(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}S("shaka.transmuxer.MssTransmuxer",GC);GC.prototype.transmux=GC.prototype.transmux;
1365
+ GC.prototype.getOriginalMimeType=GC.prototype.getOriginalMimeType;GC.prototype.convertCodecs=GC.prototype.convertCodecs;GC.prototype.isSupported=GC.prototype.isSupported;GC.prototype.destroy=GC.prototype.destroy;var IC=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);kc("mss/audio/mp4",function(){return new GC("mss/audio/mp4")},qc);kc("mss/video/mp4",function(){return new GC("mss/video/mp4")},qc);function KC(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}r=KC.prototype;r.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
1366
+ r.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=ne(c).split(",");c=Rd("audio",d);d=Rd("video",d);if(c&&(c=de(c),!LC.includes(c))||d&&(c=de(d),!MC.includes(c)))return!1;if(b)return mb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return mb(b)||mb(a)};
1368
1367
  r.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=ne(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return af(c,"audio/mp4")}).map($e).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};r.getOriginalMimeType=function(){return this.l};
1369
- r.transmux=function(a,b,c,d,e){var f=Bb(a);if("audio"==e&&!Cj(f)){for(var g=Vi(f),h=g.length;h<f.length;h++)if(EC(f,h))return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));for(h=g.length;h<f.length;h++)if(iC(f,h))return this.h||(this.h=new kC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.M()[0]:null))}this.j?this.j.clearData():this.j=new vj;var k=this.j.parse(f),l=[],m=k.Tc();try{var n=null;if("video"==e){switch(m.video){case "avc":var q=[],p=null,u=[],v=k.xc();
1370
- if(!v.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],y=A.nalus;u.push.apply(u,x(y));var C=sC(y);if(C){null==p&&(p=A.dts);var z=void 0;z=w+1<v.length?(v[w+1].dts||0)-(A.dts||0):1<v.length?(A.dts||0)-(v[w-1].dts||0):9E4*(c.endTime-c.startTime);q.push({data:C.data,size:C.data.byteLength,duration:z,Ya:Math.round((A.pts||0)-(A.dts||0)),flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:C.cd?2:1,bb:C.cd?0:1}})}}var B=qC(u);if(!B||null==p)throw new T(2,3,3018,c?c.M()[0]:null);b.height=B.height;
1368
+ r.transmux=function(a,b,c,d,e){var f=Bb(a);if("audio"==e&&!Cj(f)){for(var g=Vi(f),h=g.length;h<f.length;h++)if(DC(f,h))return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));for(h=g.length;h<f.length;h++)if(hC(f,h))return this.h||(this.h=new jC("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.M()[0]:null))}this.j?this.j.clearData():this.j=new vj;var k=this.j.parse(f),l=[],m=k.Tc();try{var n=null;if("video"==e){switch(m.video){case "avc":var q=[],p=null,u=[],v=k.xc();
1369
+ if(!v.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var w=0;w<v.length;w++){var A=v[w],y=A.nalus;u.push.apply(u,x(y));var C=rC(y);if(C){null==p&&(p=A.dts);var z=void 0;z=w+1<v.length?(v[w+1].dts||0)-(A.dts||0):1<v.length?(A.dts||0)-(v[w-1].dts||0):9E4*(c.endTime-c.startTime);q.push({data:C.data,size:C.data.byteLength,duration:z,Ya:Math.round((A.pts||0)-(A.dts||0)),flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:C.cd?2:1,bb:C.cd?0:1}})}}var B=pC(u);if(!B||null==p)throw new T(2,3,3018,c?c.M()[0]:null);b.height=B.height;
1371
1370
  b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Wa:[],ja:new Uint8Array([]),ta:B.ta,Aa:B.Aa,Ba:B.Ba,data:{ob:this.g,baseMediaDecodeTime:p,Ta:q},stream:b};break;case "hvc":var D=[],I=null,F=[],K=k.xc();if(!K.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var J=0;J<K.length;J++){var G=K[J],L=G.nalus;F.push.apply(F,x(L));for(var N=!1,M=[],P=!1,R=t(L),Q=R.next();!Q.done;Q=R.next()){var ea=Q.value;switch(ea.type){case 1:case 0:var ba=
1372
1371
  P=!0;break;case 19:case 20:case 21:N=ba=P=!0;break;case 32:ba=!0;break;case 33:ba=!0;break;case 34:ba=!0;break;case 35:P=ba=!0;break;case 39:case 40:ba=!0;break;default:ba=!1}if(P&&ba){var na=ea.fullData.byteLength,Ka=new Uint8Array(4);Ka[0]=na>>24&255;Ka[1]=na>>16&255;Ka[2]=na>>8&255;Ka[3]=na&255;M.push(Ka);M.push(ea.fullData)}}var wa=M.length?{data:Md.apply(Ed,x(M)),cd:N}:null;if(wa){null==I&&null!=G.dts&&(I=G.dts);var ta=void 0;ta=J+1<K.length?(K[J+1].dts||0)-(G.dts||0):1<K.length?(G.dts||0)-(K[J-
1373
- 1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:wa.data,size:wa.data.byteLength,duration:ta,Ya:Math.round((G.pts||0)-(G.dts||0)),flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:wa.cd?2:1,bb:wa.cd?0:1}})}}var Na=tC(F);if(!Na||null==I)throw new T(2,3,3018,c?c.M()[0]:null);b.height=Na.height;b.width=Na.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Wa:[],ja:new Uint8Array([]),ta:Na.ta,Aa:Na.Aa,Ba:Na.Ba,data:{ob:this.g,baseMediaDecodeTime:I,Ta:D},stream:b}}n&&
1374
- (l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Ua=[],ua,Ca=null,ob=t(k.Ib()),Pc=ob.next();!Pc.done;Pc=ob.next()){var ee=Pc.value,qd=ee.data;if(qd){var Hc=0;ua=hC(qd,Hc);if(!ua)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=ua.sampleRate;b.channelsCount=ua.channelCount;null==Ca&&null!==ee.pts&&(Ca=ee.pts);for(;Hc<qd.length;){var fe=gC(qd,Hc);if(fe){var ge=fe.Id+fe.Z;Hc+ge<=qd.length&&Ua.push({data:qd.subarray(Hc+fe.Id,Hc+ge),size:fe.Z,duration:1024,Ya:0,flags:{ab:0,
1375
- Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});Hc+=ge}else Hc++}}}if(!ua||null==Ca){if(!k.xc().length)throw new T(2,3,3018,c?c.M()[0]:null);Ca=9E4*c.startTime;var he=Rd("audio",b.codecs.split(","));if(!he||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);ua={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:he};var rd=jC(he,b.channelsCount);if(!rd)throw new T(2,3,3018,c?c.M()[0]:null);for(var Bi=Ca+9E4*(c.endTime-c.startTime),xg=Ca;xg<Bi;)Ua.push({data:rd,size:rd.byteLength,
1376
- duration:1024,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),xg+=1024/ua.sampleRate*9E4}var Ci=ua.sampleRate,Di=Ca/9E4*Ci;n={id:b.id,type:"audio",codecs:ua.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ci,duration:d,Wa:[],ja:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.g,baseMediaDecodeTime:Di,Ta:Ua},stream:b};break;case "ac3":for(var yg=[],ie=0,jc=new Uint8Array([]),lj=null,vu=t(k.Ib()),Jm=vu.next();!Jm.done;Jm=vu.next()){var Km=Jm.value,Lm=Km.data;null==lj&&null!==
1377
- Km.pts&&(lj=Km.pts);for(var sf=0;sf<Lm.length;){var Id=lC(Lm,sf);Id?(b.audioSamplingRate=Id.sampleRate,b.channelsCount=Id.channelCount,ie=Id.sampleRate,jc=Id.ja,yg.push({data:Lm.subarray(sf,sf+Id.Z),size:Id.Z,duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),sf+=Id.Z):sf++}}if(0==ie||0==jc.byteLength||null==lj)throw new T(2,3,3018,c?c.M()[0]:null);var cD=lj/9E4*ie;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ie,duration:d,Wa:[],ja:jc,ta:new Uint8Array([]),
1378
- Aa:0,Ba:0,data:{ob:this.g,baseMediaDecodeTime:cD,Ta:yg},stream:b};break;case "ec3":for(var wu=[],mj=0,Mm=new Uint8Array([]),nj=null,xu=t(k.Ib()),Nm=xu.next();!Nm.done;Nm=xu.next()){var Om=Nm.value,Pm=Om.data;null==nj&&null!==Om.pts&&(nj=Om.pts);for(var tf=0;tf<Pm.length;){var Jd=oC(Pm,tf);Jd?(b.audioSamplingRate=Jd.sampleRate,b.channelsCount=Jd.channelCount,mj=Jd.sampleRate,Mm=Jd.ja,wu.push({data:Pm.subarray(tf,tf+Jd.Z),size:Jd.Z,duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),tf+=Jd.Z):
1379
- tf++}}if(0==mj||0==Mm.byteLength||null==nj)throw new T(2,3,3018,c?c.M()[0]:null);var dD=nj/9E4*mj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:mj,duration:d,Wa:[],ja:Mm,ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.g,baseMediaDecodeTime:dD,Ta:wu},stream:b};break;case "mp3":for(var yu=[],oj,pj=null,zu=t(k.Ib()),Qm=zu.next();!Qm.done;Qm=zu.next()){var Rm=Qm.value,Lg=Rm.data;if(Lg){null==pj&&null!==Rm.pts&&(pj=Rm.pts);for(var me=0;me<Lg.length;){var uf=yC(Lg,
1380
- me);uf?(oj||(oj=uf),me+uf.Z<=Lg.length&&yu.push({data:Lg.subarray(me,me+uf.Z),size:uf.Z,duration:1152,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),me+=uf.Z):me++}}}if(!oj||null==pj)throw new T(2,3,3018,c?c.M()[0]:null);var Au=oj.sampleRate,eD=pj/9E4*Au;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Au,duration:d,Wa:[],ja:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.g,baseMediaDecodeTime:eD,Ta:yu},stream:b};break;case "opus":var Bu=[],
1381
- qj=null,Rc=k.F;if(!Rc)throw new T(2,3,3018,c?c.M()[0]:null);var yb=[];switch(Rc.nh){case 1:case 2:yb=[0];break;case 0:yb=[255,1,1,0,1];break;case 128:yb=[255,2,0,0,1];break;case 3:yb=[1,2,1,0,2,1];break;case 4:yb=[1,2,2,0,1,2,3];break;case 5:yb=[1,3,2,0,4,1,2,3];break;case 6:yb=[1,4,2,0,4,1,2,3,5];break;case 7:yb=[1,4,2,0,4,1,2,3,5,6];break;case 8:yb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:yb=[1,1,2,0,1];break;case 131:yb=[1,1,3,0,1,2];break;case 132:yb=[1,1,4,0,1,2,3];break;case 133:yb=[1,1,5,0,1,
1382
- 2,3,4];break;case 134:yb=[1,1,6,0,1,2,3,4,5];break;case 135:yb=[1,1,7,0,1,2,3,4,5,6];break;case 136:yb=[1,1,8,0,1,2,3,4,5,6,7]}var Cu=new Uint8Array([0,Rc.channelCount,0,0,Rc.sampleRate>>>24&255,Rc.sampleRate>>>17&255,Rc.sampleRate>>>8&255,Rc.sampleRate>>>0&255,0,0].concat(x(yb)));for(var Du=Rc.sampleRate,Eu=t(k.Ib()),Sm=Eu.next();!Sm.done;Sm=Eu.next()){var Tm=Sm.value,vf=Tm.data;null==qj&&null!==Tm.pts&&(qj=Tm.pts);for(var Mg=0;Mg<vf.length;){for(var fD=0!==(vf[Mg+1]&16),gD=0!==(vf[Mg+1]&8),td=Mg+
1383
- 2,rj=0;255===vf[td];)rj+=255,td+=1;rj+=vf[td];td+=1;td+=fD?2:0;td+=gD?2:0;var Fu=vf.slice(td,td+rj);Bu.push({data:Fu,size:Fu.byteLength,duration:960,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});Mg=td+rj}}if(0==Cu.byteLength||null==qj)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Rc.sampleRate;b.channelsCount=Rc.channelCount;var hD=qj/9E4*Du;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Du,duration:d,Wa:[],ja:Cu,ta:new Uint8Array([]),Aa:0,Ba:0,
1384
- data:{ob:this.g,baseMediaDecodeTime:hD,Ta:Bu},stream:b}}n&&(l.push(n),n=null)}}catch(Um){return Um&&3023==Um.code?Promise.resolve(new Uint8Array([])):Promise.reject(Um)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var Gu=new xw(l),Vm=b.id+"_"+c.i;if(this.i.has(Vm))var Wm=this.i.get(Vm);else Wm=Dw(Gu),this.i.set(Vm,Wm);var iD=Uw(Gu);this.g++;var jD=Md(Wm,iD);return Promise.resolve(jD)};S("shaka.transmuxer.TsTransmuxer",LC);LC.prototype.transmux=LC.prototype.transmux;
1385
- LC.prototype.getOriginalMimeType=LC.prototype.getOriginalMimeType;LC.prototype.convertCodecs=LC.prototype.convertCodecs;LC.prototype.isSupported=LC.prototype.isSupported;LC.prototype.destroy=LC.prototype.destroy;var MC=["aac","ac-3","ec-3","mp3","opus"],NC=["avc","hevc"];kc("video/mp2t",function(){return new LC("video/mp2t")},oc);/*
1372
+ 1].dts||0):9E4*(c.endTime-c.startTime);D.push({data:wa.data,size:wa.data.byteLength,duration:ta,Ya:Math.round((G.pts||0)-(G.dts||0)),flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:wa.cd?2:1,bb:wa.cd?0:1}})}}var Na=sC(F);if(!Na||null==I)throw new T(2,3,3018,c?c.M()[0]:null);b.height=Na.height;b.width=Na.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Wa:[],ja:new Uint8Array([]),ta:Na.ta,Aa:Na.Aa,Ba:Na.Ba,data:{ob:this.g,baseMediaDecodeTime:I,Ta:D},stream:b}}n&&
1373
+ (l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Ua=[],ua,Ca=null,ob=t(k.Ib()),Pc=ob.next();!Pc.done;Pc=ob.next()){var ee=Pc.value,qd=ee.data;if(qd){var Hc=0;ua=gC(qd,Hc);if(!ua)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=ua.sampleRate;b.channelsCount=ua.channelCount;null==Ca&&null!==ee.pts&&(Ca=ee.pts);for(;Hc<qd.length;){var fe=fC(qd,Hc);if(fe){var ge=fe.Id+fe.Z;Hc+ge<=qd.length&&Ua.push({data:qd.subarray(Hc+fe.Id,Hc+ge),size:fe.Z,duration:1024,Ya:0,flags:{ab:0,
1374
+ Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});Hc+=ge}else Hc++}}}if(!ua||null==Ca){if(!k.xc().length)throw new T(2,3,3018,c?c.M()[0]:null);Ca=9E4*c.startTime;var he=Rd("audio",b.codecs.split(","));if(!he||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);ua={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:he};var rd=iC(he,b.channelsCount);if(!rd)throw new T(2,3,3018,c?c.M()[0]:null);for(var Bi=Ca+9E4*(c.endTime-c.startTime),xg=Ca;xg<Bi;)Ua.push({data:rd,size:rd.byteLength,
1375
+ duration:1024,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),xg+=1024/ua.sampleRate*9E4}var Ci=ua.sampleRate,Di=Ca/9E4*Ci;n={id:b.id,type:"audio",codecs:ua.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ci,duration:d,Wa:[],ja:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.g,baseMediaDecodeTime:Di,Ta:Ua},stream:b};break;case "ac3":for(var yg=[],ie=0,jc=new Uint8Array([]),lj=null,uu=t(k.Ib()),Im=uu.next();!Im.done;Im=uu.next()){var Jm=Im.value,Km=Jm.data;null==lj&&null!==
1376
+ Jm.pts&&(lj=Jm.pts);for(var sf=0;sf<Km.length;){var Id=kC(Km,sf);Id?(b.audioSamplingRate=Id.sampleRate,b.channelsCount=Id.channelCount,ie=Id.sampleRate,jc=Id.ja,yg.push({data:Km.subarray(sf,sf+Id.Z),size:Id.Z,duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),sf+=Id.Z):sf++}}if(0==ie||0==jc.byteLength||null==lj)throw new T(2,3,3018,c?c.M()[0]:null);var bD=lj/9E4*ie;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ie,duration:d,Wa:[],ja:jc,ta:new Uint8Array([]),
1377
+ Aa:0,Ba:0,data:{ob:this.g,baseMediaDecodeTime:bD,Ta:yg},stream:b};break;case "ec3":for(var vu=[],mj=0,Lm=new Uint8Array([]),nj=null,wu=t(k.Ib()),Mm=wu.next();!Mm.done;Mm=wu.next()){var Nm=Mm.value,Om=Nm.data;null==nj&&null!==Nm.pts&&(nj=Nm.pts);for(var tf=0;tf<Om.length;){var Jd=nC(Om,tf);Jd?(b.audioSamplingRate=Jd.sampleRate,b.channelsCount=Jd.channelCount,mj=Jd.sampleRate,Lm=Jd.ja,vu.push({data:Om.subarray(tf,tf+Jd.Z),size:Jd.Z,duration:1536,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),tf+=Jd.Z):
1378
+ tf++}}if(0==mj||0==Lm.byteLength||null==nj)throw new T(2,3,3018,c?c.M()[0]:null);var cD=nj/9E4*mj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:mj,duration:d,Wa:[],ja:Lm,ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.g,baseMediaDecodeTime:cD,Ta:vu},stream:b};break;case "mp3":for(var xu=[],oj,pj=null,yu=t(k.Ib()),Pm=yu.next();!Pm.done;Pm=yu.next()){var Qm=Pm.value,Lg=Qm.data;if(Lg){null==pj&&null!==Qm.pts&&(pj=Qm.pts);for(var me=0;me<Lg.length;){var uf=xC(Lg,
1379
+ me);uf?(oj||(oj=uf),me+uf.Z<=Lg.length&&xu.push({data:Lg.subarray(me,me+uf.Z),size:uf.Z,duration:1152,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),me+=uf.Z):me++}}}if(!oj||null==pj)throw new T(2,3,3018,c?c.M()[0]:null);var zu=oj.sampleRate,dD=pj/9E4*zu;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:zu,duration:d,Wa:[],ja:new Uint8Array([]),ta:new Uint8Array([]),Aa:0,Ba:0,data:{ob:this.g,baseMediaDecodeTime:dD,Ta:xu},stream:b};break;case "opus":var Au=[],
1380
+ qj=null,Rc=k.F;if(!Rc)throw new T(2,3,3018,c?c.M()[0]:null);var yb=[];switch(Rc.mh){case 1:case 2:yb=[0];break;case 0:yb=[255,1,1,0,1];break;case 128:yb=[255,2,0,0,1];break;case 3:yb=[1,2,1,0,2,1];break;case 4:yb=[1,2,2,0,1,2,3];break;case 5:yb=[1,3,2,0,4,1,2,3];break;case 6:yb=[1,4,2,0,4,1,2,3,5];break;case 7:yb=[1,4,2,0,4,1,2,3,5,6];break;case 8:yb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:yb=[1,1,2,0,1];break;case 131:yb=[1,1,3,0,1,2];break;case 132:yb=[1,1,4,0,1,2,3];break;case 133:yb=[1,1,5,0,1,
1381
+ 2,3,4];break;case 134:yb=[1,1,6,0,1,2,3,4,5];break;case 135:yb=[1,1,7,0,1,2,3,4,5,6];break;case 136:yb=[1,1,8,0,1,2,3,4,5,6,7]}var Bu=new Uint8Array([0,Rc.channelCount,0,0,Rc.sampleRate>>>24&255,Rc.sampleRate>>>17&255,Rc.sampleRate>>>8&255,Rc.sampleRate>>>0&255,0,0].concat(x(yb)));for(var Cu=Rc.sampleRate,Du=t(k.Ib()),Rm=Du.next();!Rm.done;Rm=Du.next()){var Sm=Rm.value,vf=Sm.data;null==qj&&null!==Sm.pts&&(qj=Sm.pts);for(var Mg=0;Mg<vf.length;){for(var eD=0!==(vf[Mg+1]&16),fD=0!==(vf[Mg+1]&8),td=Mg+
1382
+ 2,rj=0;255===vf[td];)rj+=255,td+=1;rj+=vf[td];td+=1;td+=eD?2:0;td+=fD?2:0;var Eu=vf.slice(td,td+rj);Au.push({data:Eu,size:Eu.byteLength,duration:960,Ya:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});Mg=td+rj}}if(0==Bu.byteLength||null==qj)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Rc.sampleRate;b.channelsCount=Rc.channelCount;var gD=qj/9E4*Cu;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Cu,duration:d,Wa:[],ja:Bu,ta:new Uint8Array([]),Aa:0,Ba:0,
1383
+ data:{ob:this.g,baseMediaDecodeTime:gD,Ta:Au},stream:b}}n&&(l.push(n),n=null)}}catch(Tm){return Tm&&3023==Tm.code?Promise.resolve(new Uint8Array([])):Promise.reject(Tm)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var Fu=new ww(l),Um=b.id+"_"+c.i;if(this.i.has(Um))var Vm=this.i.get(Um);else Vm=Cw(Fu),this.i.set(Um,Vm);var hD=Tw(Fu);this.g++;var iD=Md(Vm,hD);return Promise.resolve(iD)};S("shaka.transmuxer.TsTransmuxer",KC);KC.prototype.transmux=KC.prototype.transmux;
1384
+ KC.prototype.getOriginalMimeType=KC.prototype.getOriginalMimeType;KC.prototype.convertCodecs=KC.prototype.convertCodecs;KC.prototype.isSupported=KC.prototype.isSupported;KC.prototype.destroy=KC.prototype.destroy;var LC=["aac","ac-3","ec-3","mp3","opus"],MC=["avc","hevc"];kc("video/mp2t",function(){return new KC("video/mp2t")},oc);/*
1386
1385
  @license
1387
1386
  EME Encryption Scheme Polyfill
1388
1387
  Copyright 2019 Google LLC
1389
1388
  SPDX-License-Identifier: Apache-2.0
1390
1389
  */
1391
- function OC(){}var PC;
1392
- function QC(){PC||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(PC=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=RC,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1393
- function RC(a,b){var c=this,d;return O(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),E(e,PC.call(c,a,b),2);d=e.h;if(SC(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=PC,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=TC;return e.return(TC.call(c,
1390
+ function NC(){}var OC;
1391
+ function PC(){OC||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(OC=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=QC,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1392
+ function QC(a,b){var c=this,d;return O(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),E(e,OC.call(c,a,b),2);d=e.h;if(RC(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=OC,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=SC;return e.return(SC.call(c,
1394
1393
  a,b))})}
1395
- function TC(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u;return O(function(v){if(1==v.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=UC(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=VC(h.videoCapabilities,d),l=VC(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."),
1396
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return E(v,PC.call(c,a,e),2)}q=v.h;u=p=null;e[0]&&(e[0].videoCapabilities&&(p=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new WC(q,p,u))})}function VC(a,b){return a?a.filter(function(c){return XC(c.encryptionScheme,b)}):a}S("EmeEncryptionSchemePolyfill",OC);OC.install=QC;function YC(){}var ZC;
1397
- function $C(){ZC||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(ZC=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=aD,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1398
- function aD(a){var b=this,c,d;return O(function(e){switch(e.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),E(e,ZC.call(b,a),2);case 2:c=e.h;if(!a.keySystemConfiguration)return e.return(c);if((d=c.keySystemAccess)&&SC(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=ZC,e.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1399
- navigator.mediaCapabilities.decodingInfo=bD;if(d){e.u(3);break}return E(e,kD(a),4);case 4:return c.keySystemAccess=e.h,e.return(c);case 3:return e.return(bD.call(b,a))}})}
1400
- function bD(a){var b=this,c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=UC(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},XC(d,g)&&XC(c,g))?E(l,ZC.call(b,a),2):l.return(h);case 2:k=l.h;if(k.keySystemAccess){k.keySystemAccess=
1401
- new WC(k.keySystemAccess,c,d);l.u(3);break}if(!a.keySystemConfiguration){l.u(3);break}return E(l,kD(a),5);case 5:k.keySystemAccess=l.h;case 3:return l.return(k)}})}
1402
- function kD(a){var b,c;return O(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
1403
- f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return E(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}S("McEncryptionSchemePolyfill",YC);YC.install=$C;function WC(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
1404
- WC.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};WC.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
1405
- function UC(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";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function SC(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}
1406
- function XC(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(lD||mD)return!0;return!1}function nD(){}function sz(){QC();$C()}S("EncryptionSchemePolyfills",nD);nD.install=sz;var mD=navigator.userAgent.includes("CrKey"),lD=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10);"undefined"!==typeof module&&module.exports&&(module.exports=nD);}).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})();
1394
+ function SC(a,b){var c=this,d,e,f,g,h,k,l,m,n,q,p,u;return O(function(v){if(1==v.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=TC(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=UC(h.videoCapabilities,d),l=UC(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."),
1395
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return E(v,OC.call(c,a,e),2)}q=v.h;u=p=null;e[0]&&(e[0].videoCapabilities&&(p=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new VC(q,p,u))})}function UC(a,b){return a?a.filter(function(c){return WC(c.encryptionScheme,b)}):a}S("EmeEncryptionSchemePolyfill",NC);NC.install=PC;function XC(){}var YC;
1396
+ function ZC(){YC||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(YC=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=$C,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1397
+ function $C(a){var b=this,c,d;return O(function(e){switch(e.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),E(e,YC.call(b,a),2);case 2:c=e.h;if(!a.keySystemConfiguration)return e.return(c);if((d=c.keySystemAccess)&&RC(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=YC,e.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1398
+ navigator.mediaCapabilities.decodingInfo=aD;if(d){e.u(3);break}return E(e,jD(a),4);case 4:return c.keySystemAccess=e.h,e.return(c);case 3:return e.return(aD.call(b,a))}})}
1399
+ function aD(a){var b=this,c,d,e,f,g,h,k;return O(function(l){switch(l.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=TC(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},WC(d,g)&&WC(c,g))?E(l,YC.call(b,a),2):l.return(h);case 2:k=l.h;if(k.keySystemAccess){k.keySystemAccess=
1400
+ new VC(k.keySystemAccess,c,d);l.u(3);break}if(!a.keySystemConfiguration){l.u(3);break}return E(l,jD(a),5);case 5:k.keySystemAccess=l.h;case 3:return l.return(k)}})}
1401
+ function jD(a){var b,c;return O(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
1402
+ f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return E(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}S("McEncryptionSchemePolyfill",XC);XC.install=ZC;function VC(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
1403
+ VC.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};VC.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
1404
+ function TC(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";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function RC(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}
1405
+ function WC(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(kD||lD)return!0;return!1}function mD(){}function rz(){PC();ZC()}S("EncryptionSchemePolyfills",mD);mD.install=rz;var lD=navigator.userAgent.includes("CrKey"),kD=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10);"undefined"!==typeof module&&module.exports&&(module.exports=mD);}).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})();
1407
1406
 
1408
1407
  //# sourceMappingURL=shaka-player.compiled.map