shaka-player 4.11.1 → 4.11.2

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.
@@ -49,7 +49,8 @@ fa("Array.prototype.find",function(a){return a?a:function(b,c){return Na(this,b,
49
49
  var Pa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)La(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||Pa});fa("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});
50
50
  fa("Array.prototype.entries",function(a){return a?a:function(){return Ma(this,function(b,c){return[b,c]})}});fa("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Oa(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});
51
51
  fa("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)La(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});
52
- fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});var Qa=this||self;function S(a,b){a=a.split(".");var c=Qa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
52
+ fa("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Oa(this,b,"endsWith");void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0<e&&0<c;)if(d[--c]!=b[--e])return!1;return 0>=e}});fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});var Qa=this||self;
53
+ function S(a,b){a=a.split(".");var c=Qa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
53
54
  @license
54
55
  Shaka Player
55
56
  Copyright 2016 Google LLC
@@ -320,12 +321,12 @@ function(m){k.push({box:m,Oa:1701733238})}).R("hev1",function(m){k.push({box:m,O
320
321
  function Ti(a,b,c,d,e){var f=Ui.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);Vi(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=ec()||dc()?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,Vi(e,d.start,d.size+k.byteLength);k=Fb(e,b.start);b=Rh(b);
321
322
  a=k.getUint32(b);k.setUint32(b,a+1);return e}function Vi(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 Ui=new Sb(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 Wi(a,b,c,d,e,f,g){this.M=a;this.Ga=b;this.ua=c;this.Kc=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}Wi.prototype.Yb=function(){return this.Ga};Wi.prototype.Vb=function(){return this.ua};Wi.prototype.cd=function(){return this.g};function Xi(a,b){return a===b?!0:a&&b?a.Yb()==b.Yb()&&a.Vb()==b.Vb()&&Qb(a.M().sort(),b.M().sort())&&yb(a.cd(),b.cd()):a==b}S("shaka.media.InitSegmentReference",Wi);
322
323
  Wi.prototype.getEndByte=Wi.prototype.Vb;Wi.prototype.getStartByte=Wi.prototype.Yb;
323
- function aj(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?bj:r;this.startTime=a;this.j=this.endTime=b;this.F=c;this.Ga=d;this.ua=e;this.$=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.B=void 0===n?null:n;this.h=void 0===p?null:p;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.A=null;this.i=0;this.o=void 0===v?!1:v;this.G=this.s=!1;a=t(this.g);for(b=a.next();!b.done;b=a.next())b.value.Gg();
324
- this.o&&this.g.length&&this.g[this.g.length-1].Fg();this.C=this.bandwidth=this.mimeType=this.codecs=null}q=aj.prototype;q.M=function(){return this.F()};q.getStartTime=function(){return this.startTime};q.Ih=function(){return this.endTime};q.Yb=function(){return this.Ga};q.Vb=function(){return this.ua};q.$h=function(){return this.tilesLayout};q.Zh=function(){return this.B};q.Zb=function(){return this.status};q.si=function(){this.status=cj};q.xf=function(){this.preload=!0};q.isPreload=function(){return this.preload};
324
+ function Yi(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?bj:r;this.startTime=a;this.j=this.endTime=b;this.F=c;this.Ga=d;this.ua=e;this.$=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.B=void 0===n?null:n;this.h=void 0===p?null:p;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.A=null;this.i=0;this.o=void 0===v?!1:v;this.G=this.s=!1;a=t(this.g);for(b=a.next();!b.done;b=a.next())b.value.Gg();
325
+ this.o&&this.g.length&&this.g[this.g.length-1].Fg();this.C=this.bandwidth=this.mimeType=this.codecs=null}q=Yi.prototype;q.M=function(){return this.F()};q.getStartTime=function(){return this.startTime};q.Ih=function(){return this.endTime};q.Yb=function(){return this.Ga};q.Vb=function(){return this.ua};q.$h=function(){return this.tilesLayout};q.Zh=function(){return this.B};q.Zb=function(){return this.status};q.si=function(){this.status=cj};q.xf=function(){this.preload=!0};q.isPreload=function(){return this.preload};
325
326
  q.Jc=function(){this.l=!1};q.ji=function(){return this.l};q.Gg=function(){this.s=!0};q.li=function(){return this.s};q.Fg=function(){this.G=!0};q.ki=function(){return this.G};q.Eg=function(){this.m=!0};q.fi=function(){return this.m};q.$g=function(a){this.A=a};q.Yh=function(){return this.A};q.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};
326
- q.Uf=function(a){null==this.h?Ya("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.Vi=function(a){this.C=a};q.cd=function(){return this.C};function dj(a,b){a.$=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())dj(c.value,b)}S("shaka.media.SegmentReference",aj);aj.prototype.getSegmentData=aj.prototype.cd;aj.prototype.setSegmentData=aj.prototype.Vi;aj.prototype.syncAgainst=aj.prototype.Uf;aj.prototype.offset=aj.prototype.offset;
327
- aj.prototype.getThumbnailSprite=aj.prototype.Yh;aj.prototype.setThumbnailSprite=aj.prototype.$g;aj.prototype.hasByterangeOptimization=aj.prototype.fi;aj.prototype.markAsByterangeOptimization=aj.prototype.Eg;aj.prototype.isLastPartial=aj.prototype.ki;aj.prototype.markAsLastPartial=aj.prototype.Fg;aj.prototype.isPartial=aj.prototype.li;aj.prototype.markAsPartial=aj.prototype.Gg;aj.prototype.isIndependent=aj.prototype.ji;aj.prototype.markAsNonIndependent=aj.prototype.Jc;aj.prototype.isPreload=aj.prototype.isPreload;
328
- aj.prototype.markAsPreload=aj.prototype.xf;aj.prototype.markAsUnavailable=aj.prototype.si;aj.prototype.getStatus=aj.prototype.Zb;aj.prototype.getTileDuration=aj.prototype.Zh;aj.prototype.getTilesLayout=aj.prototype.$h;aj.prototype.getEndByte=aj.prototype.Vb;aj.prototype.getStartByte=aj.prototype.Yb;aj.prototype.getEndTime=aj.prototype.Ih;aj.prototype.getStartTime=aj.prototype.getStartTime;aj.prototype.getUris=aj.prototype.M;var bj=0,cj=1;aj.Status={dj:bj,Yj:cj,zj:2};function ej(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function fj(a){return!a||ej(a)?null:a.length?a.end(a.length-1):null}function gj(a,b){return!a||!a.length||ej(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function hj(a,b){if(!a||!a.length||ej(a))return 0;var c=0;a=t(ij(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}
327
+ q.Uf=function(a){null==this.h?Ya("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.Vi=function(a){this.C=a};q.cd=function(){return this.C};function dj(a,b){a.$=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())dj(c.value,b)}S("shaka.media.SegmentReference",Yi);Yi.prototype.getSegmentData=Yi.prototype.cd;Yi.prototype.setSegmentData=Yi.prototype.Vi;Yi.prototype.syncAgainst=Yi.prototype.Uf;Yi.prototype.offset=Yi.prototype.offset;
328
+ Yi.prototype.getThumbnailSprite=Yi.prototype.Yh;Yi.prototype.setThumbnailSprite=Yi.prototype.$g;Yi.prototype.hasByterangeOptimization=Yi.prototype.fi;Yi.prototype.markAsByterangeOptimization=Yi.prototype.Eg;Yi.prototype.isLastPartial=Yi.prototype.ki;Yi.prototype.markAsLastPartial=Yi.prototype.Fg;Yi.prototype.isPartial=Yi.prototype.li;Yi.prototype.markAsPartial=Yi.prototype.Gg;Yi.prototype.isIndependent=Yi.prototype.ji;Yi.prototype.markAsNonIndependent=Yi.prototype.Jc;Yi.prototype.isPreload=Yi.prototype.isPreload;
329
+ Yi.prototype.markAsPreload=Yi.prototype.xf;Yi.prototype.markAsUnavailable=Yi.prototype.si;Yi.prototype.getStatus=Yi.prototype.Zb;Yi.prototype.getTileDuration=Yi.prototype.Zh;Yi.prototype.getTilesLayout=Yi.prototype.$h;Yi.prototype.getEndByte=Yi.prototype.Vb;Yi.prototype.getStartByte=Yi.prototype.Yb;Yi.prototype.getEndTime=Yi.prototype.Ih;Yi.prototype.getStartTime=Yi.prototype.getStartTime;Yi.prototype.getUris=Yi.prototype.M;var bj=0,cj=1;Yi.Status={dj:bj,Yj:cj,zj:2};function ej(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function fj(a){return!a||ej(a)?null:a.length?a.end(a.length-1):null}function gj(a,b){return!a||!a.length||ej(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function hj(a,b){if(!a||!a.length||ej(a))return 0;var c=0;a=t(ij(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}
329
330
  function jj(a,b,c){if(!a||!a.length||ej(a))return null;a=ij(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function ij(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};/*
330
331
  @license
331
332
  Shaka Player
@@ -357,8 +358,8 @@ function yj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0
357
358
  limitations under the License.
358
359
  */
359
360
  function Aj(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Ab(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function Bj(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Ih(c,0)).P(),a.g=8*d,a.i-=d)}function Cj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;Bj(a)}a.h<<=b;a.g-=b}
360
- function Dj(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&&Bj(a);c=b-c;return 0<c?d<<c|Dj(a,c):d}function Ej(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;Bj(a);return b+Ej(a)}function Fj(a){Cj(a,1+Ej(a))}function W(a){var b=Ej(a);return Dj(a,b+1)-1}function Nj(a){a=W(a);return 1&a?1+a>>>1:-1*(a>>>1)}function Oj(a){return 1===Dj(a,1)}function Pj(a){return Dj(a,8)}
361
- function Qj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Nj(a),d=(c+d+256)%256),c=0===d?c:d}function Rj(a){Pj(a);W(a);return W(a)}S("shaka.util.ExpGolomb",Aj);function Sj(){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}q=Sj.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
361
+ function Dj(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&&Bj(a);c=b-c;return 0<c?d<<c|Dj(a,c):d}function Ej(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;Bj(a);return b+Ej(a)}function Fj(a){Cj(a,1+Ej(a))}function W(a){var b=Ej(a);return Dj(a,b+1)-1}function Gj(a){a=W(a);return 1&a?1+a>>>1:-1*(a>>>1)}function Oj(a){return 1===Dj(a,1)}function Pj(a){return Dj(a,8)}
362
+ function Qj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Gj(a),d=(c+d+256)%256),c=0===d?c:d}function Rj(a){Pj(a);W(a);return W(a)}S("shaka.util.ExpGolomb",Aj);function Sj(){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}q=Sj.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
362
363
  q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,Tj(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,Od:-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<
363
364
  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,p=m;2<p;){var r=f[n+1]+2;switch(f[n]){case 5:var u=Gc(f.subarray(n+2,n+r));-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=
364
365
  null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,yh:u,sampleRate:48E3}))}n+=r;p-=r}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.Od&&(g.Od=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");
@@ -431,18 +432,18 @@ function cl(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.
431
432
  function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Wb():g.g.zb():0>h&&(h=g.g.zb()+h);return fl(g,gl(g,h))});this.m=new $b(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Yk(g.h),k=g.g.Wb(),l=g.g.zb();3>l-k&&(k=l-3);h<k&&(h=el(g,h),g.i.currentTime=h)}})}q=cl.prototype;q.ready=function(){this.m.Ra(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.A=function(){}};
432
433
  q.Ee=function(a){Zk(this.h,a)};q.wd=function(){var a=Yk(this.h);return 0<this.i.readyState&&!this.i.paused?gl(this,a):a};q.dg=function(){return this.o?this.o.o:0};q.cg=function(){return this.j.C};q.Ig=function(){this.j.Bf()};function fl(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
433
434
  function el(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Wb(),f=a.g.zb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.bd(c),k=a.g.bd(d);c=a.g.bd(c+d);return b>=g?fl(a,b):b>f?f:b<e?gj(a.i.buffered,k)?k:c:b>=h||gj(a.i.buffered,b)?b:c}function gl(a,b){var c=a.g.Wb();if(b<c)return c;a=a.g.zb();return b>a?a:b}
434
- function dl(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Nk(new Qk(a),b.stallThreshold,c);Pk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function hl(a){this.g=a;this.m=null;this.j=0;this.o=!1}q=hl.prototype;q.getNumReferences=function(){return this.g.length};q.getNumEvicted=function(){return this.j};q.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};q.ti=function(){this.o=!0};q.Gb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function og(a){return a.g[0]||null}
435
- q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.j}return this.g.length&&a<this.g[0].startTime?this.j:null};q.get=function(a){if(0==this.g.length)return null;a-=this.j;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
436
- q.Wd=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))}};q.od=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.Wd(a);this.Ma(b)};q.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}};
437
- q.Ec=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 aj(a.startTime,b,a.F,a.Ga,a.ua,a.$,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.B,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)}};
435
+ function dl(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Nk(new Qk(a),b.stallThreshold,c);Pk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function hl(a){this.g=a;this.m=null;this.i=0;this.o=!1}q=hl.prototype;q.getNumReferences=function(){return this.g.length};q.getNumEvicted=function(){return this.i};q.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};q.ti=function(){this.o=!0};q.Gb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function og(a){return a.g[0]||null}
436
+ q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};q.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
437
+ q.Wd=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))}};q.od=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.Wd(a);this.Ma(b)};q.Ma=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
438
+ q.Ec=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.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new Yi(a.startTime,b,a.F,a.Ga,a.ua,a.$,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.B,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)}};
438
439
  q.re=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new $b(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Ra(a))};hl.prototype[Symbol.iterator]=function(){return this.Ib(0)};
439
- hl.prototype.Ib=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 Ya("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new il(this,d,f,c)};function jl(a,b,c){a=new aj(a,a+b,function(){return c},0,null,null,a,a,a+b);return new hl([a])}
440
+ hl.prototype.Ib=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 Ya("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new il(this,d,f,c)};function jl(a,b,c){a=new Yi(a,a+b,function(){return c},0,null,null,a,a,a+b);return new hl([a])}
440
441
  S("shaka.media.SegmentIndex",hl);hl.forSingleSegment=jl;hl.prototype.getIteratorForTime=hl.prototype.Ib;hl.prototype.updateEvery=hl.prototype.re;hl.prototype.fit=hl.prototype.Ec;hl.prototype.evict=hl.prototype.Ma;hl.prototype.mergeAndEvict=hl.prototype.od;hl.prototype.offset=hl.prototype.offset;hl.prototype.get=hl.prototype.get;hl.prototype.find=hl.prototype.find;hl.prototype.markImmutable=hl.prototype.ti;hl.prototype.release=hl.prototype.release;hl.prototype.getNumEvicted=hl.prototype.getNumEvicted;
441
442
  hl.prototype.getNumReferences=hl.prototype.getNumReferences;function il(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}il.prototype.Tc=function(a){this.reverse=a};il.prototype.Ah=function(){return this.h};il.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};
442
443
  il.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",il);il.prototype.next=il.prototype.next;il.prototype.current=il.prototype.current;il.prototype.currentPosition=il.prototype.Ah;
443
- il.prototype.setReverse=il.prototype.Tc;function kl(){hl.call(this,[]);this.h=[]}qa(kl,hl);q=kl.prototype;q.clone=function(){var a=new kl;a.h=this.h.slice();return a};q.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};q.Gb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Gb(a)};q.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};
444
- q.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};q.offset=function(){};q.Wd=function(){};q.Ma=function(){};q.od=function(){};q.Ec=function(){};q.re=function(){};S("shaka.media.MetaSegmentIndex",kl);kl.prototype.updateEvery=kl.prototype.re;kl.prototype.fit=kl.prototype.Ec;kl.prototype.mergeAndEvict=kl.prototype.od;kl.prototype.evict=kl.prototype.Ma;kl.prototype.merge=kl.prototype.Wd;
445
- kl.prototype.offset=kl.prototype.offset;kl.prototype.get=kl.prototype.get;kl.prototype.find=kl.prototype.find;kl.prototype.forEachTopLevelReference=kl.prototype.Gb;kl.prototype.release=kl.prototype.release;function ll(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Kd();this.h=new $b(function(){b.g.Hg(.25*b.i)})}ll.prototype.release=function(){this.set(this.lc());this.h&&(this.h.stop(),this.h=null);this.g=null};ll.prototype.set=function(a){this.i=a;ml(this)};ll.prototype.lc=function(){return this.g.lc()};function ml(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Kd()!=b&&a.g.Rf(b);return}catch(c){}a.h.Ra(.25);0!=a.g.Kd()&&a.g.Rf(0)};function nl(a){var b=this;this.h=a;this.g=new Set;this.i=(new $b(function(){ol(b,!1)})).Ra(.25)}nl.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 ol(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function pl(){this.g=null;this.h=[]}function ql(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 rl(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 sl(){this.i=this.h=null;this.g=[]}function tl(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 ul(){this.hc=this.Dg=this.A=this.B=this.J=this.C=this.s=this.j=this.H=this.m=this.i=this.T=this.X=this.L=this.N=this.O=this.l=this.o=NaN;this.K=0;this.F=this.G=NaN;this.g=new pl;this.h=new sl};function vl(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 wl(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}function xl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Ib(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.isPreload()&&null!=b.ua&&(c=!1);2==b.Zb()&&(c=!1);c&&b.$&&yl(a,b.$);c&&!a.h.has(b)&&(c=new zl(a.l),Al(c,b,a.i),a.h.set(b,c))}Bl(a)}}
444
+ il.prototype.setReverse=il.prototype.Tc;function kl(){hl.call(this,[]);this.h=[]}qa(kl,hl);q=kl.prototype;q.clone=function(){var a=new kl;a.h=this.h.slice();a.i=this.i;return a};q.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};q.Gb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Gb(a)};
445
+ q.find=function(a){for(var b=this.i,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};q.get=function(a){for(var b=this.i,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};q.offset=function(){};q.Wd=function(){};q.Ma=function(){};q.od=function(){};q.Ec=function(){};q.re=function(){};
446
+ S("shaka.media.MetaSegmentIndex",kl);kl.prototype.updateEvery=kl.prototype.re;kl.prototype.fit=kl.prototype.Ec;kl.prototype.mergeAndEvict=kl.prototype.od;kl.prototype.evict=kl.prototype.Ma;kl.prototype.merge=kl.prototype.Wd;kl.prototype.offset=kl.prototype.offset;kl.prototype.get=kl.prototype.get;kl.prototype.find=kl.prototype.find;kl.prototype.forEachTopLevelReference=kl.prototype.Gb;kl.prototype.release=kl.prototype.release;function ll(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Kd();this.h=new $b(function(){b.g.Hg(.25*b.i)})}ll.prototype.release=function(){this.set(this.lc());this.h&&(this.h.stop(),this.h=null);this.g=null};ll.prototype.set=function(a){this.i=a;ml(this)};ll.prototype.lc=function(){return this.g.lc()};function ml(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Kd()!=b&&a.g.Rf(b);return}catch(c){}a.h.Ra(.25);0!=a.g.Kd()&&a.g.Rf(0)};function nl(a){var b=this;this.h=a;this.g=new Set;this.i=(new $b(function(){ol(b,!1)})).Ra(.25)}nl.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 ol(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function pl(){this.g=null;this.h=[]}function ql(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 rl(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 sl(){this.i=this.h=null;this.g=[]}function tl(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 ul(){this.hc=this.Dg=this.A=this.B=this.J=this.C=this.s=this.j=this.H=this.m=this.i=this.T=this.X=this.L=this.N=this.O=this.l=this.o=NaN;this.K=0;this.F=this.G=NaN;this.g=new pl;this.h=new sl};function vl(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 wl(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}function xl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Ib(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.isPreload()&&null!=b.ua&&(c=!1);2==b.Zb()&&(c=!1);c&&b.$&&yl(a,b.$);c&&!a.h.has(b)&&(c=new zl(a.l),Al(c,b,a.i),a.h.set(b,c))}Bl(a)}}
446
447
  function yl(a,b){if(a.i.segmentIndex&&!Array.from(a.j.keys()).some(function(d){return Xi(d,b)})){var c=new zl(a.l);Al(c,b,a.i);a.j.set(b,c)}}function Cl(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Dl(a,c)}function El(a){Cl(a,a.h);Cl(a,a.j);a.g=null}vl.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&&Dl(this,d);b&&Bl(this)};vl.prototype.Tc=function(a){this.o=a;this.g&&this.g.Tc(a)};
447
448
  function Bl(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={nf:void 0},d=c.next())e.nf=d.value,b.some(function(f){return function(g){return Xi(g.$,f.nf)}}(e))||Dl(a,e.nf)}function Fl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&Dl(a,d)}Bl(a)}function Gl(a,b){b&&b!==a.i&&(El(a),a.i=b)}function Dl(a,b){var c=a.h;b instanceof Wi&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function zl(a){this.g=a;this.ce=this.Tf=null}
448
449
  function Al(a,b,c){var d=new Uint8Array(0);a.ce=a.g(b,c,function(e){return P(function(f){if(1==f.g)return 0<d.byteLength?d=Re(d,e):d=e,a.Tf?G(f,a.Tf(d),3):f.u(0);d=new Uint8Array(0);H(f)})})}zl.prototype.abort=function(){this.ce&&this.ce.abort()};function Hl(a){mh.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new $b(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 V("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ra(2)}qa(Hl,mh);Hl.prototype.release=function(){this.g.clear();this.h.stop();mh.prototype.release.call(this)};function Il(a){mh.call(this);this.g=new Map;this.h=a}qa(Il,mh);Il.prototype.release=function(){this.g.clear();mh.prototype.release.call(this)};function Jl(a,b){var c=a.g.get(b);c||(c={sd:[],Oe:null,contentType:b},a.g.set(b,c));return c}function Kl(a,b,c){var d=Jl(a,b.contentType);Ll(a,d);a={Kc:b,position:c};d=d.sd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
@@ -498,10 +499,11 @@ function xm(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,p,r
498
499
  if(0===y.version){var D=y.reader.sc();var A=y.reader.sc();var B=y.reader.P();var C=y.reader.P();var E=y.reader.P();var F=y.reader.P();var J=e.startTime+C/B}else B=y.reader.P(),J=y.reader.Pc()/B+e.timestampOffset,C=J-e.startTime,E=y.reader.P(),F=y.reader.P(),D=y.reader.sc(),A=y.reader.sc();y=y.reader.rb(y.reader.getLength()-y.reader.wa());if(z&&z.includes(D)||a.h.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==D)a.g.xi();else if(z=J+E/B,B=(new Map).set("detail",{startTime:J,endTime:z,schemeIdUri:D,
499
500
  value:A,timescale:B,presentationTimeDelta:C,eventDuration:E,id:F,messageData:y}),B=new V("emsg",B),B.cancelable=!0,a.g.onEvent(B),!B.defaultPrevented&&("https://aomedia.org/emsg/ID3"==D||"https://developer.apple.com/streaming/emsg-id3"==D)&&(D=pj(y),D.length))a.g.onMetadata([{cueTime:J,data:y,frames:D,dts:J,pts:J}],0,z)});n&&l.R("prft",function(y){if(!a.G&&e.$.timescale){var z=y.reader,D=y.version;z.P();y=z.P();var A=z.P();y=1E3*y+A/Math.pow(2,32)*1E3;0===D?z=z.P():(D=z.P(),z=z.P(),z=D*Math.pow(2,
500
501
  32)+z);y=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+y)).getTime();z=(new Map).set("detail",{wallClockTime:y,programStartDate:new Date(y-z/e.$.timescale*1E3)});z=new V("prft",z);a.g.onEvent(z);a.G=!0}});u&&l.box("moof",Qh).box("traf",Qh).R("tfdt",function(y){var z,D,A,B,C,E;return P(function(F){z=sj(y.reader,y.version);D=z.baseMediaDecodeTime;if(!D)return F.return();A=-D/r;B=Number(b.Td)||0;if(!(B<A))return F.u(0);C=b.Sd;E=b.Rd;return G(F,Am(a,b,A,C,E,e),0)})});(m||n||u)&&l.parse(f,!1,
501
- g);return G(w,Cm(a,b,c),2);case 2:return Dh(a.m),v=b.Rc,b.Rc=!1,G(w,a.g.hg(b.type,f),3);case 3:return G(w,tk(a.g.ba,b.type,f,e,d,k,v,h,g),4);case 4:Dh(a.m),H(w)}})}function Cm(a,b,c){var d,e,f,g;return P(function(h){if(1==h.g){d=Math.max(a.h.bufferBehind,a.l.presentationTimeline.g);e=ok(a.g.ba,b.type);if(null==e)return h.return();f=c-e;g=f-d;return g<=a.h.evictionGoal?h.return():G(h,a.g.ba.remove(b.type,e,e+g),2)}Dh(a.m);H(h)})}
502
+ g);return G(w,Cm(a,b,c),2);case 2:return Dh(a.m),v=b.Rc,b.Rc=!1,G(w,a.g.hg(b.type,f),3);case 3:return G(w,tk(a.g.ba,b.type,f,e,d,k,v,h,g),4);case 4:Dh(a.m),H(w)}})}
503
+ function Cm(a,b,c){var d,e,f,g,h;return P(function(k){if(1==k.g){d=b.stream.segmentIndex;if(d instanceof kl)for(;1<d.h.length&&0==d.h[0].getNumReferences();){var l=d.h.shift();d.i+=l.getNumEvicted();l.release()}e=Math.max(a.h.bufferBehind,a.l.presentationTimeline.g);f=ok(a.g.ba,b.type);if(null==f)return k.return();g=c-f;h=g-e;return h<=a.h.evictionGoal?k.return():G(k,a.g.ba.remove(b.type,f,f+h),2)}Dh(a.m);H(k)})}
502
504
  function sm(a){return a&&a.type==Ye&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
503
505
  function ym(a,b,c,d){var e,f,g,h,k;return P(function(l){switch(l.g){case 1:if(e=c.cd())return l.return(e);f=null;if(b.V){var m=b.V,n=m.h;c instanceof Wi&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.Tf=d),f=m.ce):f=null}f||(f=om(c,b.stream,d||null,a.h.retryParameters,a.g.Lb));g=0;b.la&&(g=b.la.h);b.jb=f;return G(l,f.promise,2);case 2:h=l.h;b.jb=null;k=h.data;if(!c.aesKey){l.u(3);break}return G(l,Tl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
504
- function om(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a instanceof aj?a:void 0,h=g?1:0;a=Ul(a.M(),a.Ga,a.ua,d,c);a.contentType=b.type;return e.request(Ah,a,{type:h,stream:b,segment:g,isPreload:f})}
506
+ function om(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a instanceof Yi?a:void 0,h=g?1:0;a=Ul(a.M(),a.Ga,a.ua,d,c);a.contentType=b.type;return e.request(Ah,a,{type:h,stream:b,segment:g,isPreload:f})}
505
507
  function lm(a,b,c,d){var e,f;return P(function(g){if(1==g.g)return b.fc=!1,b.ze=!1,b.Ed=0,b.Wc=!0,b.Na=null,b.la=null,b.V&&!a.o.has(b.stream)&&El(b.V),d?(e=a.g.Jd(),f=a.g.ba.getDuration(),G(g,a.g.ba.remove(b.type,e+d,f),3)):G(g,Bk(a.g.ba,b.type),4);if(3!=g.g)return Dh(a.m),c?G(g,a.g.ba.flush(b.type),3):g.u(3);Dh(a.m);b.Wc=!1;b.endOfStream=!1;b.Ka||b.ub||em(a,b,0);H(g)})}
506
508
  function em(a,b,c){var d=b.type;if(d!=Ye||a.i.has(d))b.ub=(new Zb(function(){var e;return P(function(f){if(1==f.g)return ua(f,2),G(f,pm(a,b),4);if(2!=f.g)return ya(f,0);e=za(f);if(a.g)a.g.onError(e);H(f)})})).Z(c)}function Xl(a){null!=a.ub&&(a.ub.stop(),a.ub=null)}function Yl(a){return P(function(b){return a.jb?G(b,a.jb.abort(),0):b.u(0)})}
507
509
  function qm(a,b,c){var d;return P(function(e){if(1==e.g)return G(e,$g(a.K),2);Dh(a.m);if(1===c.category){if(b.bc)return gm(a,!1),e.return();d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;c.handled=a.g.disableStream(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)})}
@@ -535,13 +537,13 @@ function Vm(a,b,c){(a=b?a.J:a.K)?a.push(c):c()}function Wm(a){if(a.J)for(var b=t
535
537
  function an(a){a.ea=!0;return a.l}function bn(a){a.na=!0;return a.L}
536
538
  q.start=function(){var a=this;(function(){var b;return P(function(c){switch(c.g){case 1:return G(c,Promise.resolve(),2);case 2:return ua(c,3),G(c,cn(a),5);case 5:return dn(a),G(c,en(a),6);case 6:dn(a);a.o||(a.o=new Jg(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));
537
539
  if(a.Da){var d=a.g.abrFactory;a.C=d;a.i=d();a.i.configure(a.g.abr)}if(a.Fa){d=a.h.presentationTimeline.U();var e=vg(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())a.ga=e,e.video&&fn(a,e.video,d),e.audio&&fn(a,e.audio,d)}return G(c,void 0,7);case 7:dn(a);a.m.resolve();ya(c,0);break;case 3:b=za(c),a.m.reject(b),H(c)}})})()};q.dispatchEvent=function(a){return this.O?this.O.dispatchEvent(a):mh.prototype.dispatchEvent.call(this,a)};
538
- q.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new V("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function dn(a){if(a.s)throw new T(2,7,7003);}function vn(a,b){a.dispatchEvent(new V("onstatechange",(new Map).set("state",b)))}
539
- function cn(a){var b,c,d,e;return P(function(f){if(1==f.g)return vn(a,"manifest-parser"),a.j||(a.G=Qi(a.N,a.X),a.j=a.G(),a.j.configure(a.g.manifest,function(){return a.A})),b=Date.now()/1E3,vn(a,"manifest"),a.h?f.u(2):G(f,a.j.start(a.N,a.bb),3);2!=f.g&&(a.h=f.h);c=new V("manifestparsed",void 0);a.dispatchEvent(c);if(0==a.h.variants.length)throw new T(2,4,4036);wn(a.h);d=Date.now()/1E3;e=d-b;a.aa.H=e;H(f)})}
540
- function en(a){var b,c,d,e,f;return P(function(g){switch(g.g){case 1:vn(a,"drm-engine");a.sa=Date.now()/1E3;a.l=a.Ta();a.F.g=a.l;a.l.configure(a.g.drm,function(){return a.A});b=Li(a.F,a.h);if(!b){g.u(2);break}c=new V("trackschanged",void 0);return G(g,Promise.resolve(),3);case 3:dn(a),a.dispatchEvent(c);case 2:return d=vg(a.h.variants),G(g,ei(a.l,d,a.h.offlineSessionIds),4);case 4:return dn(a),G(g,Ji(a.F,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new V("trackschanged",void 0);return G(g,Promise.resolve(),
540
+ q.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new V("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function dn(a){if(a.s)throw new T(2,7,7003);}function gn(a,b){a.dispatchEvent(new V("onstatechange",(new Map).set("state",b)))}
541
+ function cn(a){var b,c,d,e;return P(function(f){if(1==f.g)return gn(a,"manifest-parser"),a.j||(a.G=Qi(a.N,a.X),a.j=a.G(),a.j.configure(a.g.manifest,function(){return a.A})),b=Date.now()/1E3,gn(a,"manifest"),a.h?f.u(2):G(f,a.j.start(a.N,a.bb),3);2!=f.g&&(a.h=f.h);c=new V("manifestparsed",void 0);a.dispatchEvent(c);if(0==a.h.variants.length)throw new T(2,4,4036);hn(a.h);d=Date.now()/1E3;e=d-b;a.aa.H=e;H(f)})}
542
+ function en(a){var b,c,d,e,f;return P(function(g){switch(g.g){case 1:gn(a,"drm-engine");a.sa=Date.now()/1E3;a.l=a.Ta();a.F.g=a.l;a.l.configure(a.g.drm,function(){return a.A});b=Li(a.F,a.h);if(!b){g.u(2);break}c=new V("trackschanged",void 0);return G(g,Promise.resolve(),3);case 3:dn(a),a.dispatchEvent(c);case 2:return d=vg(a.h.variants),G(g,ei(a.l,d,a.h.offlineSessionIds),4);case 4:return dn(a),G(g,Ji(a.F,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new V("trackschanged",void 0);return G(g,Promise.resolve(),
541
543
  7);case 7:a.dispatchEvent(f),H(g)}})}q.configure=function(a,b){a=Gm(a,b);Tm(this.g,a)};q.getConfiguration=function(){return Tc(this.g)};
542
544
  function fn(a,b,c){var d,e,f,g,h;P(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new vl(d,b,function(l,m,n){return om(l,m,n||null,a.g.streaming.retryParameters,a.ya,a.A)},!1),a.L.set(b.id,e),G(k,b.createSegmentIndex(),2);f=a.B||0;(h=(g=b.segmentIndex.Ib(f))?g.current():null)||(h=og(b.segmentIndex));h&&(c?h.$&&yl(e,h.$):xl(e,h.startTime));H(k)})}q.bj=function(){return this.m};
543
545
  q.destroy=function(){var a=this,b,c,d;return P(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.fa){e.u(2);break}return G(e,a.j.stop(),2);case 2:if(!a.i||a.ca){e.u(4);break}return G(e,a.i.stop(),4);case 4:a.H&&!a.ma&&a.H.release();if(!a.l||a.ea){e.u(6);break}return G(e,a.l.destroy(),6);case 6:if(0<a.L.size&&!a.na)for(b=t(a.L.values()),c=b.next();!c.done;c=b.next())d=c.value,El(d);H(e)}})};
544
- function wn(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",Um);Um.prototype.destroy=Um.prototype.destroy;Um.prototype.waitForFinish=Um.prototype.bj;function xn(a,b){mh.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{zc:null,yc:yn,oc:function(d,e){return zn(c,"enter",d,e)}},{zc:An,yc:yn,oc:function(d,e){return zn(c,"enter",d,e)}},{zc:Bn,yc:yn,oc:function(d,e){return zn(c,"enter",d,e)}},{zc:yn,yc:An,oc:function(d,e){return zn(c,"exit",d,e)}},{zc:yn,yc:Bn,oc:function(d,e){return zn(c,"exit",d,e)}},{zc:An,yc:Bn,oc:function(d,e){return zn(c,"skip",d,e)}},{zc:Bn,yc:An,oc:function(d,e){return zn(c,"skip",d,e)}}];this.h=new hb;this.h.D(this.i,
546
+ function hn(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",Um);Um.prototype.destroy=Um.prototype.destroy;Um.prototype.waitForFinish=Um.prototype.bj;function xn(a,b){mh.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{zc:null,yc:yn,oc:function(d,e){return zn(c,"enter",d,e)}},{zc:An,yc:yn,oc:function(d,e){return zn(c,"enter",d,e)}},{zc:Bn,yc:yn,oc:function(d,e){return zn(c,"enter",d,e)}},{zc:yn,yc:An,oc:function(d,e){return zn(c,"exit",d,e)}},{zc:yn,yc:Bn,oc:function(d,e){return zn(c,"exit",d,e)}},{zc:An,yc:Bn,oc:function(d,e){return zn(c,"skip",d,e)}},{zc:Bn,yc:An,oc:function(d,e){return zn(c,"skip",d,e)}}];this.h=new hb;this.h.D(this.i,
545
547
  "regionremove",function(d){c.g.delete(d.region)})}qa(xn,mh);xn.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;mh.prototype.release.call(this)};xn.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?An:a>d.endTime?Bn:yn;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.zc==e&&h.yc==f&&h.oc(d,b)}}};
546
548
  function zn(a,b,c,d){b=new V(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var An=1,yn=2,Bn=3;function Cn(a,b,c){var d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:var n=(new ve(a)).Pa.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Dn[d])return m.return(e);f=0;g=uh([a],c);ua(m,2);g.method="HEAD";return G(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];ya(m,3);break;case 2:k=za(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return G(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
547
549
  e.toLowerCase().split(";").shift():"")}})}
@@ -703,7 +705,7 @@ q.qh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,v,w,y,z,
703
705
  l&&B.label==(f||"")&&B.kind==c}))return jp(h),A.return(n);throw new T(1,2,2012);case 4:p=$e;r=h.h.duration;h.i&&(r=h.i.presentationTimeline.getDuration());if(Infinity==r)throw new T(1,4,4033);if(!k.length){A.u(6);break}return G(A,Vp(h,a,h.G,h.g.streaming.retryParameters),7);case 7:u=A.h,v=Wp(h,u,d,k),w=new Blob([v],{type:"text/vtt"}),a=hk(w),d="text/vtt";case 6:y={id:h.ag++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:jl(0,r,[a]),mimeType:d||"",
704
706
  codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.va,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([cf(d||"",e||"")])};z=cf(y.mimeType,y.codecs);D=rf(z);if(!D)throw new T(2,2,2014,d);h.i.textStreams.push(y);jp(h);return A.return(mg(y))}})};
705
707
  q.rh=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z;return P(function(D){switch(D.g){case 1:if(c.m!=tp&&c.m!=Gp)throw new T(1,7,7004);if(b){D.u(2);break}return G(D,Tp(c,a),3);case 3:b=D.h;case 2:if("text/vtt"!=b)throw new T(1,2,2017,a);d=$e;e=c.h.duration;c.i&&(e=c.i.presentationTimeline.getDuration());if(Infinity==e)throw new T(1,4,4045);return G(D,Vp(c,a,c.G,c.g.streaming.retryParameters),4);case 4:f=D.h;g=sf[b];if(!g)throw new T(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,
706
- vttOffset:0};l=Ab(f);m=h.parseMedia(l,k,a,[]);n=[];p=t(m);r=p.next();for(u={};!r.done;u={ve:void 0,Cc:void 0},r=p.next())u.Cc=r.value,u.ve=null,v=function(A){return function(){null==A.ve&&(A.ve=Se([a],[A.Cc.payload]));return A.ve||[]}}(u),w=new aj(u.Cc.startTime,u.Cc.endTime,v,0,null,null,0,0,Infinity),u.Cc.payload.includes("#xywh")&&(y=u.Cc.payload.split("#xywh=")[1].split(","),4===y.length&&w.$g({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],
708
+ vttOffset:0};l=Ab(f);m=h.parseMedia(l,k,a,[]);n=[];p=t(m);r=p.next();for(u={};!r.done;u={ve:void 0,Cc:void 0},r=p.next())u.Cc=r.value,u.ve=null,v=function(A){return function(){null==A.ve&&(A.ve=Se([a],[A.Cc.payload]));return A.ve||[]}}(u),w=new Yi(u.Cc.startTime,u.Cc.endTime,v,0,null,null,0,0,Infinity),u.Cc.payload.includes("#xywh")&&(y=u.Cc.payload.split("#xywh=")[1].split(","),4===y.length&&w.$g({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],
707
709
  10)})),n.push(w);z={id:c.ag++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new hl(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.De,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([cf(b||
708
710
  "","")])};c.m==Gp?c.pd.push(z):c.i.imageStreams.push(z);jp(c);return D.return(ng(z))}})};
709
711
  q.ph=function(a,b,c){var d=this,e,f,g,h;return P(function(k){switch(k.g){case 1:if(d.m!=tp&&d.m!=Gp)throw new T(1,7,7004);if(c){k.u(2);break}return G(k,Tp(d,a),3);case 3:c=k.h;case 2:return e=[],d.A&&(e=d.A.getCuePoints()),G(k,Up(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.tg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return G(k,new Promise(function(l,m){d.l.oa(f,"load",l);d.l.oa(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return jp(d),k.return(h);case 5:throw new T(1,
@@ -748,7 +750,7 @@ X.prototype.detach=X.prototype.detach;X.prototype.attachCanvas=X.prototype.vh;X.
748
750
  X.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return G(k,Fi(),3);case 3:b=k.h;case 2:var l={};if(ac())for(var m in Ri)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]=ac()?!!Ri[n]:bc(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(df));
749
751
  l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=rf(n)?!0:ac()?nb(n)||(le(n)?!0:!1):bc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return G(k,Ac(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=Zp;for(h in g)f[h]=g[h]();return k.return(f)}})};
750
752
  X.isBrowserSupported=function(){window.Promise||Za("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||fc("Trident/"))return!1;var a=tc();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:ac()?!0:bc("application/x-mpegurl")};X.setAdManagerFactory=function(a){Ko=a};
751
- X.registerSupportPlugin=function(a,b){Zp[a]=b};X.prototype.destroy=X.prototype.destroy;var Qo=0,Go=1,tp=2,Gp=3;X.LoadMode={DESTROYED:Qo,NOT_LOADED:Go,MEDIA_SOURCE:tp,SRC_EQUALS:Gp};X.version="v4.11.1";var $p=["4","11"];sb=new function(a){this.g=a;this.i=tb;this.h=ub}(new qb(Number($p[0]),Number($p[1])));var Zp={},Ko=null;function aq(){this.g=[];this.i=this.l=this.j=this.h=0}function bq(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function cq(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})}q=cq.prototype;q.needsSkipUI=function(){return!1};q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
753
+ X.registerSupportPlugin=function(a,b){Zp[a]=b};X.prototype.destroy=X.prototype.destroy;var Qo=0,Go=1,tp=2,Gp=3;X.LoadMode={DESTROYED:Qo,NOT_LOADED:Go,MEDIA_SOURCE:tp,SRC_EQUALS:Gp};X.version="v4.11.2";var $p=["4","11"];sb=new function(a){this.g=a;this.i=tb;this.h=ub}(new qb(Number($p[0]),Number($p[1])));var Zp={},Ko=null;function aq(){this.g=[];this.i=this.l=this.j=this.h=0}function bq(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function cq(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})}q=cq.prototype;q.needsSkipUI=function(){return!1};q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
752
754
  q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
753
755
  q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.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)};q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
754
756
  q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
@@ -761,7 +763,7 @@ function eq(a,b){var c=[],d=0;null!=b&&(d=b);a=t(dd(a,"Ad"));for(var e=a.next();
761
763
  0)-(parseInt(k.attributes.height,10)||0)});g=t(g);for(h=g.next();!h.done;h=g.next())if(h=ed(h.value)){c.push({id:null,startTime:d,endTime:null,uri:h,isSkippable:null!=f,skipOffset:f,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==b,post:Infinity==b,timelineRange:!1});break}}}}return c}S("shaka.ads.Utils",dq);dq.ADS_LOADED="ads-loaded";dq.AD_STARTED="ad-started";dq.AD_FIRST_QUARTILE="ad-first-quartile";dq.AD_MIDPOINT="ad-midpoint";dq.AD_THIRD_QUARTILE="ad-third-quartile";
762
764
  dq.AD_COMPLETE="ad-complete";dq.AD_STOPPED="ad-stopped";dq.AD_SKIPPED="ad-skipped";dq.AD_VOLUME_CHANGED="ad-volume-changed";dq.AD_MUTED="ad-muted";dq.AD_PAUSED="ad-paused";dq.AD_RESUMED="ad-resumed";dq.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";dq.CUEPOINTS_CHANGED="ad-cue-points-changed";dq.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";dq.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";dq.AD_CLICKED="ad-clicked";dq.AD_PROGRESS="ad-progress";dq.AD_BUFFERING="ad-buffering";
763
765
  dq.AD_IMPRESSION="ad-impression";dq.AD_DURATION_CHANGED="ad-duration-changed";dq.AD_CLOSED="ad-closed";dq.AD_LOADED="ad-loaded";dq.ALL_ADS_COMPLETED="all-ads-completed";dq.AD_LINEAR_CHANGED="ad-linear-changed";dq.AD_METADATA="ad-metadata";dq.AD_RECOVERABLE_ERROR="ad-recoverable-error";dq.AD_ERROR="ad-error";dq.AD_BREAK_READY="ad-break-ready";dq.AD_INTERACTION="ad-interaction";dq.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";dq.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";
764
- dq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function fq(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.F=!1;this.A=this.o=null;this.G=NaN;this.l=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.s,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.11.1");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.m,
766
+ dq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function fq(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.F=!1;this.A=this.o=null;this.G=NaN;this.l=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.s,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.11.2");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.m,
765
767
  google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){gq(f,g)});this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){hq(f,g)});this.h.D(this.i,"ended",function(){f.m.contentComplete()});this.h.oa(this.i,"play",function(){f.F=!0})}fq.prototype.configure=function(a){this.o=a};fq.prototype.stop=function(){this.g&&this.g.stop();this.s&&On(this.s)};
766
768
  fq.prototype.release=function(){this.stop();this.A&&this.A.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.C.destroy()};function hq(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new V("ad-error",b));iq(a,null);a.l(new V("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
767
769
  function gq(a,b){a.l(new V("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.o.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.l(new V("ima-ad-manager-loaded",(new Map).set("imaAdManager",
@@ -842,8 +844,8 @@ q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!goo
842
844
  q.onAssetUnload=function(){this.h&&this.h.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new V("ad-stopped"));this.dispatchEvent(new V("ad-content-attach-requested"));this.m=new aq};q.requestClientSideAds=function(a){if(!this.j)throw new T(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.G=Date.now()/1E3;b.m.requestAds(a)};
843
845
  q.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new T(1,10,10001);var b=this.j;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};q.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new xq(a,b,c,function(e){return Lq(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new T(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new ah,Aq(d,a,b),d.H=c||"",d.T=Date.now()/1E3,a=d.l);return a};
844
846
  q.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new T(1,10,10005);var b=this.i;b.G=a;b.i(new V("ads-loaded",(new Map).set("loadTime",0)))};q.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 Jq(a,b,this.o,function(d){return Lq(c,d)});this.g.configure(this.l)};
845
- q.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)&&Za('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.11.1";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
846
- (c.G=!0),c.j=new ah,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&Za('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.11.1";this.g.g.replaceAdTagParameters(a)};
847
+ q.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)&&Za('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.11.2";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
848
+ (c.G=!0),c.j=new ah,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&Za('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.11.2";this.g.g.replaceAdTagParameters(a)};
847
849
  q.getServerSideCuePoints=function(){rb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};q.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:bq(a),started:a.h,playedCompletely:a.j,skipped:a.l,errors:a.i}};q.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
848
850
  q.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)};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};q.onHLSInterstitialMetadata=function(a,b,c){this.h||this.initInterstitial(null,a,b);this.h&&sq(this.h,c)};
849
851
  q.onDASHInterstitialMetadata=function(a,b,c){if("urn:mpeg:dash:event:alternativeMPD:2022"==c.schemeIdUri&&(this.h||this.initInterstitial(null,a,b),this.h)){a=this.h;b=t(c.eventNode.children);for(var d=b.next();!d.done;d=b.next()){var e=d.value;if("AlternativeMPD"==e.tagName&&(d=e.attributes.uri,e=e.attributes.mode,d)){var f=d;var g=e;break}}f?(b="replace"==g,g="insert"==g,(b||g)&&uq(a,[{id:null,startTime:c.startTime,endTime:b?c.endTime:null,uri:f,isSkippable:!1,skipOffset:null,canJump:!0,resumeOffset:g?
@@ -951,10 +953,10 @@ function ht(a,b,c,d,e,f){for(var g=ld(a,"http://www.w3.org/1999/xlink","href"),h
951
953
  [];r.children.length;){var u=r.children.shift();u.tagName&&(u.parent=a);a.children.push(u)}u=t(Object.keys(r.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=r.attributes[v];return it(a,b,c,p[0],e,f+1)})}
952
954
  function it(a,b,c,d,e,f){f=void 0===f?0:f;if(ld(a,"http://www.w3.org/1999/xlink","href")){var g=ht(a,b,c,d,e,f);c&&(g=g.Aa(void 0,function(){return it(a,b,c,d,e,f)}));return g}g=[];for(var h=t(cd(a)),k=h.next(),l={};!k.done;l={Vc:void 0},k=h.next())l.Vc=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==ld(l.Vc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Vc}}(l)):"SegmentTimeline"!=l.Vc.tagName&&g.push(it(l.Vc,b,c,d,e,f));return ih(g).Aa(function(){return a})}
953
955
  ;function jt(a,b,c,d,e,f,g){var h,k=(new Lh).R("sidx",function(l){h=kt(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
954
- function kt(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.P();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.P();var m=g.reader.P()}else l=g.reader.Pc(),m=g.reader.Pc();g.reader.skip(2);var n=g.reader.ka();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.P(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.P();g.reader.skip(4);if(1==r)throw new T(2,3,3006);h.push(new aj(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function lt(a){this.h=Fb(a);this.g=new Ih(this.h,0)}lt.prototype.ra=function(){return this.g.ra()};
956
+ function kt(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.P();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.P();var m=g.reader.P()}else l=g.reader.Pc(),m=g.reader.Pc();g.reader.skip(2);var n=g.reader.ka();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.P(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.P();g.reader.skip(4);if(1==r)throw new T(2,3,3006);h.push(new Yi(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function lt(a){this.h=Fb(a);this.g=new Ih(this.h,0)}lt.prototype.ra=function(){return this.g.ra()};
955
957
  function mt(a){var b=nt(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=nt(a);a:{d=t(ot);for(var e=d.next();!e.done;e=d.next())if(yb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.wa();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.wa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.wa();d=Fb(a.h,a.g.wa(),b);a.g.skip(b);return new pt(c,
956
958
  d)}function nt(a){var b=a.g.wa(),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 Ab(a.h,b,c)}var ot=[[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 pt(a,b){this.id=a;this.g=b}
957
- function qt(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 rt(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new lt(a.g);for(var n=null,p=null;a.ra();){var r=mt(a);if(187==r.id){var u=st(r);u&&(r=c*u.$i,u=b+u.Ei,null!=n&&m.push(new aj(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new aj(n+g,d+g,l,p,null,f,g,h,k));return m}
959
+ function qt(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 rt(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new lt(a.g);for(var n=null,p=null;a.ra();){var r=mt(a);if(187==r.id){var u=st(r);u&&(r=c*u.$i,u=b+u.Ei,null!=n&&m.push(new Yi(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new Yi(n+g,d+g,l,p,null,f,g,h,k));return m}
958
960
  function st(a){var b=new lt(a.g);a=mt(b);if(179!=a.id)throw new T(2,3,3013);a=qt(a);b=mt(b);if(183!=b.id)throw new T(2,3,3012);b=new lt(b.g);for(var c=0;b.ra();){var d=mt(b);if(241==d.id){c=qt(d);break}}return{$i:a,Ei:c}};function tt(a,b,c){b=ft(a,b,"Initialization");if(!b)return null;var d=a.I.Ia(),e=b.attributes.sourceURL;e&&(d=Se(d,[Lc(e)],a.lb()));e=0;var f=null;if(b=kd(b,"range",pd))e=b.start,f=b.end;c=new Wi(function(){return d},e,f,ut(a),null,null,c);c.codecs=a.I.codecs;c.mimeType=a.I.mimeType;return c}
959
961
  function vt(a,b,c){var d=Number(et(a,wt,"presentationTimeOffset"))||0,e=et(a,wt,"timescale"),f=1;e&&(f=rd(e)||1);var g=d/f||0,h=tt(a,wt,c);xt(a,h);var k=Uc(a);return{kc:function(){var l=ft(k,wt,"RepresentationIndex");var m=k.I.Ia();l&&(l=Lc(l.attributes.sourceURL))&&(m=Se(m,[l],k.lb()));l=yt(k);return zt(k,b,h,m,l.start,l.end,g)}}}
960
962
  function zt(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F;return P(function(J){if(1==J.g)return h=a.presentationTimeline,k=!a.wb||!a.ia.qf,l=a.ia.start,m=a.ia.duration,n=a.I.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.M(),c.Ga,c.ua,!0):null],p=null,G(J,Promise.all(u),2);v=J.h;w=v[0];y=v[1]||null;z=null;D=l-g;A=l;B=m?l+m:Infinity;if("mp4"==n)var K=jt(w,e,d,c,D,A,B);else{K=w;var L=new lt(y);if(440786851!=mt(L).id)throw new T(2,3,3008);var I=mt(L);if(408125543!=I.id)throw new T(2,
@@ -963,20 +965,20 @@ C.next())F=E.value,F.codecs=a.I.codecs,F.mimeType=a.I.mimeType,F.bandwidth=a.ban
963
965
  function At(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=Ye&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
964
966
  function ut(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.$d,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.ha.label||null,roles:a.roles||null,language:a.ha.language||null}};function Bt(a,b,c){var d=tt(a,Ct,c),e=Dt(a);if(!e.La&&!e.timeline&&1<e.Lc.length)throw new T(2,4,4002);if(!e.La&&!a.ia.duration&&!e.timeline&&1==e.Lc.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=Et(a.ia.start,a.ia.duration,a.I.Ia,e,d,c,a.I.mimeType,a.I.codecs,a.bandwidth,a.lb);b=!f;f?f.od(h,a.presentationTimeline.nb()):f=new hl(h);a.presentationTimeline.qd(h);a.wb&&a.ia.qf||
965
967
  f.Ec(a.ia.start,a.ia.duration?a.ia.start+a.ia.duration:Infinity,b);g&&(g.segmentIndex=f);return{kc:function(){f&&0!=f.getNumReferences()||f.Wd(h);return Promise.resolve(f)}}}function Ct(a){return a.Pb}function Dt(a){var b=Ft(a);a=dt(a,Ct);var c=a.td;0==c&&(c=1);var d=0;a.La?d=a.La*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{La:a.La,startTime:d,td:c,Nb:a.Nb,timeline:a.timeline,Lc:b}}
966
- function Et(a,b,c,d,e,f,g,h,k,l){var m=d.Lc.length;d.timeline&&d.timeline.length!=d.Lc.length&&(m=Math.min(d.timeline.length,d.Lc.length));for(var n=a-d.Nb,p=b?a+b:Infinity,r=[],u=d.startTime,v={},w=0;w<m;v={se:void 0,le:void 0},w++){v.le=d.Lc[w];var y=u;u=void 0;u=null!=d.La?y+d.La:d.timeline?d.timeline[w].end:y+b;v.se=null;v=new aj(a+y,a+u,function(z){return function(){null==z.se&&(z.se=Se(c(),[z.le.ui],l()));return z.se}}(v),v.le.start,v.le.end,e,n,a,p,[],"",null,null,bj,f);v.codecs=h;v.mimeType=
968
+ function Et(a,b,c,d,e,f,g,h,k,l){var m=d.Lc.length;d.timeline&&d.timeline.length!=d.Lc.length&&(m=Math.min(d.timeline.length,d.Lc.length));for(var n=a-d.Nb,p=b?a+b:Infinity,r=[],u=d.startTime,v={},w=0;w<m;v={se:void 0,le:void 0},w++){v.le=d.Lc[w];var y=u;u=void 0;u=null!=d.La?y+d.La:d.timeline?d.timeline[w].end:y+b;v.se=null;v=new Yi(a+y,a+u,function(z){return function(){null==z.se&&(z.se=Se(c(),[z.le.ui],l()));return z.se}}(v),v.le.start,v.le.end,e,n,a,p,[],"",null,null,bj,f);v.codecs=h;v.mimeType=
967
969
  g;v.bandwidth=k;r.push(v)}return r}function Ft(a){return[a.I.Pb,a.ha.Pb,a.pa.Pb].filter(Af).map(function(b){return dd(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.lf&&(a.lf=!0);var c=Lc(b.attributes.media);b=kd(b,"mediaRange",pd,{start:0,end:null});return{ui:c,start:b.start,end:b.end}})};function Gt(a,b,c,d,e,f,g,h,k){k||a.I.Pd||(a.I.Pd=et(a,Ht,"initialization"));var l=a.I.Pd?It(a,g):null,m=Jt(a);Kt(m);var n=Uc(a);if(m.gd)return At(a,l),{kc:function(){var w=ct(m.gd,n.I.id,null,null,n.bandwidth||null,null);w=Se(n.I.Ia(),[w]);return zt(n,b,l,w,0,null,m.Nb)}};if(m.La)return d||"image"===a.ha.contentType||(a.presentationTimeline.yf(m.La),a.presentationTimeline.Zd(a.ia.start)),{kc:function(){return Lt(n,m,e,l,f,g,h,a.I.me)}};var p=null;d=d=null;a.pa.id&&a.I.id&&(d=a.pa.id+","+a.I.id,d=
968
970
  c[d])&&(p=d.segmentIndex);var r=a.ia.start,u=a.ia.duration?r+a.ia.duration:Infinity,v=!(a.wb&&a.ia.qf);p?(c=p,Mt(c,m,r,u,v,l),c.Ma(a.presentationTimeline.nb())):p=new Nt(m,a.I.id,a.bandwidth,a.I.Ia,a.lb,r,u,l,v,g,a.I.me);m.timeline&&"image"!==a.ha.contentType&&a.presentationTimeline.Jg(m.timeline,r);d&&a.wb&&(d.segmentIndex=p);return{kc:function(){p instanceof Nt&&0==p.getNumReferences()&&Mt(p,m,r,u,v,l);return Promise.resolve(p)}}}function Ht(a){return a.cc}
969
971
  function Jt(a){var b=dt(a,Ht),c=et(a,Ht,"media"),d=et(a,Ht,"index"),e=et(a,Ht,"k"),f=0;e&&(f=parseInt(e,10));return{La:b.La,timescale:b.timescale,td:b.td,Nb:b.Nb,Yf:b.Yf,timeline:b.timeline,ac:c&&Lc(c),gd:d,mimeType:a.I.mimeType,codecs:a.I.codecs,bandwidth:a.bandwidth,vi:f}}function Kt(a){var b=a.gd?1:0;b+=a.timeline?1:0;b+=a.La?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.gd&&(a.timeline=null),a.La=null);if(!a.gd&&!a.ac)throw new T(2,4,4002);}
970
- function Lt(a,b,c,d,e,f,g,h){function k(N){var M=(N-w)*v,O=M+b.Nb,Q=M+p;M=Q+v;var R=Math.min(M,m()),U=[],aa=b.vi;if(aa)for(var la=(R-Q)/aa,na={},Ia=0;Ia<aa;na={fh:void 0},Ia++){var Aa=Q+la*Ia,ab=Aa+la;na.fh=Ia+1;na=new aj(Aa,ab,function(Va){return function(){var xa=O*y;"BigInt"in window&&xa>Number.MAX_SAFE_INTEGER&&(xa=BigInt(O)*BigInt(y));xa=ct(z,A,N,Va.fh,D,xa);return Se(B(),[xa],C())}}(na),0,null,d,E,p,m(),[],"",null,null,bj,f);na.codecs=a.I.codecs;na.mimeType=a.I.mimeType;0==h?0<Ia&&na.Jc():0!=
971
- Ia%h&&na.Jc();U.push(na)}Q=new aj(Q,R,function(){if(aa)return[];var Va=O*y;"BigInt"in window&&Va>Number.MAX_SAFE_INTEGER&&(Va=BigInt(O)*BigInt(y));Va=ct(z,A,N,null,D,Va);return Se(B(),[Va],C())},0,null,d,E,p,m(),U,"",null,null,bj,f,0<U.length);Q.codecs=a.I.codecs;Q.mimeType=a.I.mimeType;Q.bandwidth=a.bandwidth;Q.j=M;return Q}function l(){var N=[Math.max(n.nb(),p),Math.min(n.Xb(),m())].map(function(M){return M-p});N=[Math.ceil(N[0]/v),Math.ceil(N[1]/v)-1];a.I.Sa&&N[1]++;return N.map(function(M){return M+
972
+ function Lt(a,b,c,d,e,f,g,h){function k(N){var M=(N-w)*v,O=M+b.Nb,Q=M+p;M=Q+v;var R=Math.min(M,m()),U=[],aa=b.vi;if(aa)for(var la=(R-Q)/aa,na={},Ia=0;Ia<aa;na={fh:void 0},Ia++){var Aa=Q+la*Ia,ab=Aa+la;na.fh=Ia+1;na=new Yi(Aa,ab,function(Va){return function(){var xa=O*y;"BigInt"in window&&xa>Number.MAX_SAFE_INTEGER&&(xa=BigInt(O)*BigInt(y));xa=ct(z,A,N,Va.fh,D,xa);return Se(B(),[xa],C())}}(na),0,null,d,E,p,m(),[],"",null,null,bj,f);na.codecs=a.I.codecs;na.mimeType=a.I.mimeType;0==h?0<Ia&&na.Jc():0!=
973
+ Ia%h&&na.Jc();U.push(na)}Q=new Yi(Q,R,function(){if(aa)return[];var Va=O*y;"BigInt"in window&&Va>Number.MAX_SAFE_INTEGER&&(Va=BigInt(O)*BigInt(y));Va=ct(z,A,N,null,D,Va);return Se(B(),[Va],C())},0,null,d,E,p,m(),U,"",null,null,bj,f,0<U.length);Q.codecs=a.I.codecs;Q.mimeType=a.I.mimeType;Q.bandwidth=a.bandwidth;Q.j=M;return Q}function l(){var N=[Math.max(n.nb(),p),Math.min(n.Xb(),m())].map(function(M){return M-p});N=[Math.ceil(N[0]/v),Math.ceil(N[1]/v)-1];a.I.Sa&&N[1]++;return N.map(function(M){return M+
972
974
  w})}function m(){var N=null!=r&&e[r]||u;return N?p+N:Infinity}var n=a.presentationTimeline,p=a.ia.start,r=a.pa.id,u=a.ia.duration,v=b.La,w=b.td,y=b.timescale,z=b.ac,D=a.bandwidth||null,A=a.I.id,B=a.I.Ia,C=a.lb,E=p-b.Nb,F=l();c=a.wb?Math.max(F[0],F[1]-c+1):F[0];g=g||F[1];F=[];for(var J=c;J<=g;++J){var K=k(J);F.push(K)}var L=new hl(F);F=n.Xb()<m();J=n.U();if(F||J){var I=Math.max(c,g+1);c=v;a.I.Sa&&(c=.1);L.re(c,function(){var N=n.nb();L.Ma(N);var M=t(l());M.next();M=M.next().value;for(var O=[];I<=M;){var Q=
973
975
  k(I);O.push(Q);I++}return N>m()&&!O.length?null:O})}return Promise.resolve(L)}function It(a,b){var c=a.I.Pd;c||(c=et(a,Ht,"initialization"));if(!c)return null;c=Lc(c);var d=a.I.id,e=a.bandwidth||null,f=a.I.Ia,g=a.lb;b=new Wi(function(){var h=ct(c,d,null,null,e,null);return Se(f(),[h],g())},0,null,ut(a),null,null,b);b.codecs=a.I.codecs;b.mimeType=a.I.mimeType;return b}
974
- function Nt(a,b,c,d,e,f,g,h,k,l,m){hl.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.H=e;this.i=f;this.l=g;this.s=h;this.A=l;this.G=m;k&&Ot(this)}qa(Nt,hl);q=Nt.prototype;q.getNumReferences=function(){return this.h?this.h.timeline.length:0};q.release=function(){hl.prototype.release.call(this);this.h=null};
975
- q.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())}};
976
- function Mt(a,b,c,d,e,f){Pt(a,f);if(a.h){c=a.h.timeline;a.h.ac!==b.ac&&(a.h.ac=b.ac);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&&Ot(a)}function Pt(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)&&dj(c,b)}}
977
- function Ot(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)}}q.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};
978
- q.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.Oi,f=this.h.Yf+d.Zf;c=this.i-this.h.Nb;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=this.h.bandwidth,n=[],p=(d.end-d.start)/d.Ab,r={},u=0;u<d.Ab;r={te:void 0,gh:void 0},u++){var v=d.start+p*u,w=v+p;r.gh=u+1;r.te=null;r=new aj(this.i+v,this.i+w,function(y){return function(){if(!b.h)return[];
979
- null==y.te&&(y.te=Qt(b.h.ac,b.F,e,b.B,f,y.gh,b.C,b.H));return y.te}}(r),0,null,this.s,c,this.i,this.l,[],"",null,null,bj,this.A);r.codecs=k;r.mimeType=l;r.bandwidth=m;0==this.G?0<u&&r.Jc():0!=u%this.G&&r.Jc();n.push(r)}c=new aj(this.i+d.start,h,function(){return 0<d.Ab||!b.h?[]:Qt(b.h.ac,b.F,e,b.B,f,null,b.C,b.H)},0,null,this.s,c,this.i,this.l,n,"",null,null,bj,this.A,0<d.Ab);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c};
976
+ function Nt(a,b,c,d,e,f,g,h,k,l,m){hl.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.H=e;this.j=f;this.l=g;this.s=h;this.A=l;this.G=m;k&&Ot(this)}qa(Nt,hl);q=Nt.prototype;q.getNumReferences=function(){return this.h?this.h.timeline.length:0};q.release=function(){hl.prototype.release.call(this);this.h=null};
977
+ q.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.j<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}};
978
+ function Mt(a,b,c,d,e,f){Pt(a,f);if(a.h){c=a.h.timeline;a.h.ac!==b.ac&&(a.h.ac=b.ac);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.j=c,a.l=d;e&&Ot(a)}function Pt(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)&&dj(c,b)}}
979
+ function Ot(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.j)}}q.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||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.j;e=d<c?b[d+1].start+this.j:Infinity===this.l?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
980
+ q.get=function(a){var b=this;a-=this.i;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.Oi,f=this.h.Yf+d.Zf;c=this.j-this.h.Nb;var g=this.j+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=this.h.bandwidth,n=[],p=(d.end-d.start)/d.Ab,r={},u=0;u<d.Ab;r={te:void 0,gh:void 0},u++){var v=d.start+p*u,w=v+p;r.gh=u+1;r.te=null;r=new Yi(this.j+v,this.j+w,function(y){return function(){if(!b.h)return[];
981
+ null==y.te&&(y.te=Qt(b.h.ac,b.F,e,b.B,f,y.gh,b.C,b.H));return y.te}}(r),0,null,this.s,c,this.j,this.l,[],"",null,null,bj,this.A);r.codecs=k;r.mimeType=l;r.bandwidth=m;0==this.G?0<u&&r.Jc():0!=u%this.G&&r.Jc();n.push(r)}c=new Yi(this.j+d.start,h,function(){return 0<d.Ab||!b.h?[]:Qt(b.h.ac,b.F,e,b.B,f,null,b.C,b.H)},0,null,this.s,c,this.j,this.l,n,"",null,null,bj,this.A,0<d.Ab);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c};
980
982
  function Qt(a,b,c,d,e,f,g,h){a=ct(a,b,c,f,d||null,e);return Se(g(),[a],h()).map(function(k){return k.toString()})};function Rt(a){this.o=null;this.A=a;this.G=new nh;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"}Rt.prototype.configure=function(a){this.o=a};Rt.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()};Rt.prototype.setManifestType=function(a){this.s=a};
981
983
  function St(a,b){var c,d,e,f,g,h,k;return P(function(l){if(1==l.g)return c=Se(a.i,[Tt(a,b)]),d=uh(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),oh(a.G,e),ua(l,2),G(l,e.promise,4);if(2!=l.g)return f=l.h,g=Cc(f.data),h=JSON.parse(g),1==h.VERSION&&Ut(a,h,f.uri),ya(l,0);if((k=za(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new $b(function(){St(a,b)});a.g.Z(a.C);H(l)})}
982
984
  function Tt(a,b){if(!a.m.length)return b;b=new ve(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)));Ke(e)&&ze(b,e);return b.toString()}function Ut(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new $b(function(){St(a,d)});if(c=b.TTL)a.C=c;a.g.Z(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
@@ -997,8 +999,8 @@ function lu(a,b,c,d,e,f){if(mu(b))return null;var g=d(b);ou(a,c,g);g.createSegme
997
999
  function qu(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==Lf(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)}}
998
1000
  function eu(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}
999
1001
  function iu(a){a=Object.assign({},a);a.roles=a.roles.slice();a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
1000
- function fu(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=Vb(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new T(2,4,4038);a.drmInfos=
1001
- 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=eu(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
1002
+ function fu(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:(d=b.originalId||"")&&!a.originalId.endsWith(d)&&(a.originalId+=","+d);d=Vb(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new T(2,
1003
+ 4,4038);a.drmInfos=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=eu(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
1002
1004
  for(var g=new kl,h=t(a.trickModeVideo.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.trickModeVideo.segmentIndex=g;return Promise.resolve()}),a.trickModeVideo.matchedStreams.push(b.trickModeVideo),fu(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),fu(a.trickModeVideo,b))}
1003
1005
  function ju(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)}
1004
1006
  function ou(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=ru(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
@@ -1023,20 +1025,20 @@ q.banLocation=function(a){this.h&&this.h.banLocation(a)};q.setMediaElement=funct
1023
1025
  function Lu(a){var b,c,d,e,f,g,h,k,l,m,n;return P(function(p){if(1==p.g)return b=4,c="MPD",d=Nu(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=Wt(a.h,"Location",!0),f.length&&(e=f)),g=uh(e,a.g.retryParameters),h=Date.now(),G(p,Ou(a,g,0,{type:b}),2);if(3!=p.g){k=p.h;if(!a.j)return p.return(0);k.uri&&k.uri!=k.originalUri&&!a.A.includes(k.uri)&&a.A.unshift(k.uri);l=new ve(k.uri);a.X=l.g.toString();return G(p,Pu(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.ma.sample(1,n);return p.return(n)})}
1024
1026
  function Pu(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return P(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=Qm;if(f!=g){rb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Iu(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Ic(h.outerHTML)}k=Vc(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=Rm;l!=m&&l(k);if("Patch"===d)return v.return(Qu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(Ru(a,k,c));
1025
1027
  p=a.g.dash.xlinkFailGracefully;r=it(k,a.g.retryParameters,p,c,a.j.networkingEngine);oh(a.T,r);return G(v,r.promise,2)}u=v.h;return v.return(Ru(a,u,c))})}
1026
- function Ru(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F,J,K,L,I,N,M,O,Q,R,U,aa,la,na,Ia,Aa,ab,Va,xa,wa,Dc,eb,Tb,Ec,lb,wd,oe,pe,Md,Yi,Nd,Zi,$i,Qg,qe;return P(function(oc){switch(oc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=dd(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=fd(l))p=Se(d,[n])[0],m&&(a.h?Vt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=Wt(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.Yd=b.attributes.id||
1028
+ function Ru(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F,J,K,L,I,N,M,O,Q,R,U,aa,la,na,Ia,Aa,ab,Va,xa,wa,Dc,eb,Tb,Ec,lb,wd,oe,pe,Md,Zi,Nd,$i,aj,Qg,qe;return P(function(oc){switch(oc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=dd(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=fd(l))p=Se(d,[n])[0],m&&(a.h?Vt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=Wt(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.Yd=b.attributes.id||
1027
1029
  "";a.l.rd=kd(b,"publishTime",nd)||0;a.F=dd(b,"PatchLocation");u=Promise.resolve();if((v=hd(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new Rt(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,y=fd(v))(z=kd(v,"queryBeforeStart",ud,!1))?u=St(a.h,y):St(a.h,y);D=t(f.keys());for(A=D.next();!A.done;A=D.next())B=A.value,C=f.get(B),Vt(a.h,"Location",B,C)}E=dd(b,"BaseURL");J=!1;if(a.h)for(K=t(E),L=K.next();!L.done;L=K.next())I=L.value,
1028
1030
  N=I.attributes.serviceLocation,M=fd(I),N&&M&&(Vt(a.h,"BaseURL",N,M),J=!0);J&&a.h||(O=E.map(fd),F=Se(d,O));Q=function(){return a.h&&J?Wt(a.h,"BaseURL"):F?F:[]};a.l.Ia=Q;R=0;E&&E.length&&(R=kd(E[0],"availabilityTimeOffset",td)||0);a.l.Sa=R;U=a.g.dash.ignoreMinBufferTime;aa=0;U||(aa=kd(b,"minBufferTime",od)||0);a.K=kd(b,"minimumUpdatePeriod",od,-1);la=kd(b,"availabilityStartTime",nd);na=kd(b,"timeShiftBufferDepth",od);Ia=a.g.dash.ignoreSuggestedPresentationDelay;Aa=null;Ia||(Aa=kd(b,"suggestedPresentationDelay",
1029
1031
  od));ab=a.g.dash.ignoreMaxSegmentDuration;Va=null;ab||(Va=kd(b,"maxSegmentDuration",od));xa=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.fa=a.i.presentationTimeline.U()&&"static"==xa);a.l.type=xa;Su(a);if(a.i)for(wa=a.i.presentationTimeline,Dc=t(Object.values(a.s)),eb=Dc.next();!eb.done;eb=Dc.next())Tb=eb.value,Tb.segmentIndex&&Tb.segmentIndex.Ma(wa.nb());else Ec=a.g.defaultPresentationDelay||1.5*aa,lb=null!=Aa?Aa:Ec,wa=new Mk(la,lb,a.g.dash.autoCorrectDrift);wa.vc("static"==xa);
1030
- (wd=wa.U())&&!isNaN(a.g.availabilityWindowOverride)&&(na=a.g.availabilityWindowOverride);null==na&&(na=Infinity);wa.ne(na);oe=b.attributes.profiles||"";a.l.profiles=oe.split(",");pe={wb:"static"!=xa,presentationTimeline:wa,pa:null,ia:null,ha:null,I:null,bandwidth:0,lf:!1,Sa:R,Kb:null,profiles:oe.split(","),roles:null,lb:function(){return""}};a.N=0;Md=Tu(a,pe,Q,b,!1);Yi=Md.duration;Nd=Md.periods;("static"!=xa||a.fa)&&Md.og||wa.Za(Yi||Infinity);a.ea&&!a.H&&(Zi=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),
1031
- a.H=a.j.isLowLatencyMode());a.H&&wa.Vg(a.aa);wa.yf(Va||1);return G(oc,u,2);case 2:a.H&&(aa=0,$i=null!=Aa?Aa:a.g.defaultPresentationDelay,wa.Of($i));if(!a.i)return G(oc,a.m.Je(Nd,pe.wb),6);a.i.periodCount=Nd.length;a.i.gapCount=a.N;return G(oc,Uu(a,Nd,!1),4);case 6:a.i={presentationTimeline:wa,variants:a.m.j,textStreams:a.m.jf(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:aa||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Vu(b),
1032
+ (wd=wa.U())&&!isNaN(a.g.availabilityWindowOverride)&&(na=a.g.availabilityWindowOverride);null==na&&(na=Infinity);wa.ne(na);oe=b.attributes.profiles||"";a.l.profiles=oe.split(",");pe={wb:"static"!=xa,presentationTimeline:wa,pa:null,ia:null,ha:null,I:null,bandwidth:0,lf:!1,Sa:R,Kb:null,profiles:oe.split(","),roles:null,lb:function(){return""}};a.N=0;Md=Tu(a,pe,Q,b,!1);Zi=Md.duration;Nd=Md.periods;("static"!=xa||a.fa)&&Md.og||wa.Za(Zi||Infinity);a.ea&&!a.H&&($i=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),
1033
+ a.H=a.j.isLowLatencyMode());a.H&&wa.Vg(a.aa);wa.yf(Va||1);return G(oc,u,2);case 2:a.H&&(aa=0,aj=null!=Aa?Aa:a.g.defaultPresentationDelay,wa.Of(aj));if(!a.i)return G(oc,a.m.Je(Nd,pe.wb),6);a.i.periodCount=Nd.length;a.i.gapCount=a.N;return G(oc,Uu(a,Nd,!1),4);case 6:a.i={presentationTimeline:wa,variants:a.m.j,textStreams:a.m.jf(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:aa||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Vu(b),
1032
1034
  nextUrl:Wu(b),periodCount:Nd.length,gapCount:a.N,isLowLatency:a.ea,startTime:null};if(!wa.jh()){oc.u(7);break}Qg=dd(b,"UTCTiming");return G(oc,Xu(a,Q,Qg),8);case 8:qe=oc.h;if(!a.j)return oc.return();wa.Wg(qe);case 7:wa.Ud();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),H(oc)}})}function Uu(a,b,c){var d;return P(function(e){if(1==e.g)return G(e,a.m.Je(b,!0,c),2);a.i.variants=a.m.j;d=a.m.jf();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);H(e)})}
1033
1035
  function Qu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,y,z,D,A,B,C,E,F,J,K,L,I;return P(function(N){if(1==N.g){c=b.attributes.mpdId;d=kd(b,"originalPublishTime",nd);if(!c||c!==a.l.Yd||d!==a.l.rd)throw a.F=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(cd(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=xd(l.attributes.sel||""),n=m[m.length-1],p=fd(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Sb){r=fd(l)||"";var M=od(r);if(null!=M){a.l.Kb=M;for(var O=t(a.o.values()),Q=O.next();!Q.done;Q=O.next())Q.value.Kb=
1034
1036
  M}}else if("type"===n.Sb){a.i.presentationTimeline.vc("static"==p);a.l.type=p;M=t(a.o.values());for(O=M.next();!O.done;O=M.next())O.value.wb="dynamic"==p;"static"==p&&(a.K=-1)}else"publishTime"===n.Sb?a.l.rd=nd(p)||0:null===n.Sb&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)zd(a.F,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&Yu(a,n.id);else if("SegmentTemplate"===n.name){O=xd(l.attributes.sel||"");M=O[O.length-1];if(M.Sb){O=Zu(a,O);Q=fd(l)||
1035
- "";for(var R=t(O),U=R.next();!U.done;U=R.next())U=a.o.get(U.value),Bd(U.I.cc,l.tagName,M.Sb,Q);M=O}else M=[];u=M;v=t(u);for(w=v.next();!w.done;w=v.next())y=w.value,g.add(y)}else if("SegmentTimeline"===n.name||"S"===n.name){M=xd(l.attributes.sel||"");M=Zu(a,M);O=t(M);for(Q=O.next();!Q.done;Q=O.next())Q=a.o.get(Q.value),Q=ft(Q,Ht,"SegmentTimeline"),R=dd(Q,"S"),zd(R,l),Q.children=R;z=M;D=t(z);for(A=D.next();!A.done;A=D.next())B=A.value,g.add(B)}C=t(g);for(E=C.next();!E.done;E=C.next())F=E.value,lv(a,
1037
+ "";for(var R=t(O),U=R.next();!U.done;U=R.next())U=a.o.get(U.value),Bd(U.I.cc,l.tagName,M.Sb,Q);M=O}else M=[];u=M;v=t(u);for(w=v.next();!w.done;w=v.next())y=w.value,g.add(y)}else if("SegmentTimeline"===n.name||"S"===n.name){M=xd(l.attributes.sel||"");M=Zu(a,M);O=t(M);for(Q=O.next();!Q.done;Q=O.next())Q=a.o.get(Q.value),Q=ft(Q,Ht,"SegmentTimeline"),R=dd(Q,"S"),zd(R,l),Q.children=R;z=M;D=t(z);for(A=D.next();!A.done;A=D.next())B=A.value,g.add(B)}C=t(g);for(E=C.next();!E.done;E=C.next())F=E.value,$u(a,
1036
1038
  F);J=t(f);for(K=J.next();!K.done;K=J.next())L=K.value,e.push.apply(e,x(mv(a,L)));if(!e.length)return N.u(2);a.i.periodCount+=e.length;a.i.gapCount=a.N;return G(N,Uu(a,e,!0),2)}"static"==a.l.type&&(I=a.l.Kb,a.i.presentationTimeline.Za(I||Infinity));H(N)})}
1037
- function mv(a,b){return Tu(a,{wb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,pa:null,ia:null,ha:null,I:null,bandwidth:0,lf:!1,Sa:a.l.Sa,profiles:a.l.profiles,Kb:a.l.Kb,roles:null,lb:function(){return""}},a.l.Ia,b,!0).periods}function Yu(a,b){a.i.periodCount--;for(var c=t(a.o.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.o.get(d);ft(e,Ht,"SegmentTimeline").children=[];lv(a,d);a.o.delete(d)}a.B=a.B.filter(function(f){return f!==b})}
1039
+ function mv(a,b){return Tu(a,{wb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,pa:null,ia:null,ha:null,I:null,bandwidth:0,lf:!1,Sa:a.l.Sa,profiles:a.l.profiles,Kb:a.l.Kb,roles:null,lb:function(){return""}},a.l.Ia,b,!0).periods}function Yu(a,b){a.i.periodCount--;for(var c=t(a.o.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.o.get(d);ft(e,Ht,"SegmentTimeline").children=[];$u(a,d);a.o.delete(d)}a.B=a.B.filter(function(f){return f!==b})}
1038
1040
  function Zu(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.ha.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.ha.position===e&&a.I.id&&b.push(c+
1039
- ","+a.I.id);return b}function lv(a,b){var c=a.o.get(b),d=a.s[b];d.segmentIndex&&d.segmentIndex.Ma(a.i.presentationTimeline.nb());try{var e=Gt(c,function(f,g,h,k){return nv(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.ga,c.I.aesKey,null,!0);d.createSegmentIndex=function(){return P(function(f){if(1==f.g)return d.segmentIndex?f.u(0):G(f,e.kc(),3);d.segmentIndex=f.h;H(f)})}}catch(f){if(b=c.I.contentType,b!=Ye&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
1041
+ ","+a.I.id);return b}function $u(a,b){var c=a.o.get(b),d=a.s[b];d.segmentIndex&&d.segmentIndex.Ma(a.i.presentationTimeline.nb());try{var e=Gt(c,function(f,g,h,k){return nv(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.ga,c.I.aesKey,null,!0);d.createSegmentIndex=function(){return P(function(f){if(1==f.g)return d.segmentIndex?f.u(0):G(f,e.kc(),3);d.segmentIndex=f.h;H(f)})}}catch(f){if(b=c.I.contentType,b!=Ye&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
1040
1042
  function Vu(a){var b=hd(a,"ServiceDescription");if(!b)return null;a=hd(b,"Latency");b=hd(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)));
1041
1043
  return c}function Wu(a){a=dd(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}
1042
1044
  function Tu(a,b,c,d,e){var f=b.Kb;f||(f=kd(d,"mediaPresentationDuration",od),a.l.Kb=f);var g=0;a.i&&a.i.presentationTimeline&&a.fa&&(g=a.i.presentationTimeline.Wb());var h=[],k=g;d=dd(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],p=kd(m,"start",od,k),r=m.attributes.id,u=kd(m,"duration",od),v=null;if(n){var w=kd(n,"start",od);null!=w&&(v=w-p)}else null!=f&&(v=f-p+g);w=af;v&&u&&Math.abs(v-u)>w&&v>u&&a.N++;null==v&&(v=u);if(!(null!==a.O&&null!==r&&null!==p&&p<a.O)||a.B.includes(r)||l+1==
@@ -1072,7 +1074,7 @@ function Av(a,b,c,d){var e,f,g,h,k,l,m;return P(function(n){if(1==n.g)return e=[
1072
1074
  function Xu(a,b,c){var d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.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;ua(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);
1073
1075
  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":Za("NTP UTCTiming scheme is not supported");break;default:Za("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return G(n,Av(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return G(n,Av(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ya(n,
1074
1076
  3);break;case 5:za(n);case 3:g=f.next();n.u(2);break;case 4:return Za("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
1075
- function qv(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=kd(d,"timescale",sd)||1;d=t(dd(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=kd(k,"presentationTime",sd)||0,m=kd(k,"duration",sd)||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:Cd(k),eventNode:k},a.j.onTimelineRegionAdded(k))}}
1077
+ function qv(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=kd(d,"timescale",sd)||1,k=kd(d,"presentationTimeOffset",sd)||0;d=t(dd(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=kd(l,"presentationTime",sd)||0,n=kd(l,"duration",sd)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;null!=c&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",eventElement:Cd(l),eventNode:Dd(l)},a.j.onTimelineRegionAdded(l))}}
1076
1078
  function nv(a,b,c,d,e){var f,g,h,k;return P(function(l){if(1==l.g)return f=Ah,g=e?0:1,h=Ul(b,c,d,a.g.retryParameters),G(l,Ou(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function vv(a,b){b=cf(a,b);return rf(b)?Ye:a.split("/")[0]}function Ou(a,b,c,d){d||(d={});d.isPreload=a.ca();b=a.j.networkingEngine.request(c,b,d);oh(a.T,b);return b.promise}
1077
1079
  function Nu(a){var b=a.l.rd;if(!a.l.Yd||!b||!a.F.length)return[];var c=Date.now()/1E3,d=a.F.filter(function(e){e=sd(e.attributes.ttl);return!e||b+e>c}).map(fd).filter(Af);return d.length?Se(a.A,d):[]}S("shaka.dash.DashParser",Ju);Ri["application/dash+xml"]=function(){return new Ju};Ri["video/vnd.mpeg.dash.mpd"]=function(){return new Ju};function Bv(){}S("shaka.dependencies",Bv);Bv.has=function(a){return Cv.has(a)};Bv.add=function(a,b){if(!Dv[a])throw Error(a+" is not supported");a==Ev?rb("mux.js","mux.js is no longer used in Shaka Player."):Cv.set(a,function(){return b})};var Ev="muxjs",Dv={ek:Ev,ISOBoxer:"ISOBoxer"};Bv.Allowed=Dv;var Cv=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Fv(a,b,c){this.type=a;this.W=b;this.segments=c||null}function Gv(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Gv.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};
1078
1080
  function Hv(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 Iv(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=Iv(a,b))?a.value:c||null}function Jv(a,b){a=Iv(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function Kv(a,b,c){c=void 0===c?[]:c;this.W=b;this.g=a;this.Ab=c}function Lv(a,b){this.name=a;this.value=b};function Mv(a,b){return a.filter(function(c){return c.name==b})}function Nv(a,b){return a.filter(function(c){return Jv(c,"TYPE")==b})}function Ov(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 Pv(a,b,c){c=void 0===c?0:c;return(a=Ov(a,b))?Number(a.value):c}function Qv(a,b,c){return b?Rv(a,[b],c):[]}function Rv(a,b,c){if(!b.length)return[];b=Se(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next())a.push(Sv(d.value,c));return a}
@@ -1157,8 +1159,8 @@ function lx(a,b,c,d,e){var f=Ov(c,"EXT-X-MAP");if(!f)return null;var g=Jv(f,"URI
1157
1159
  function ox(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 Wi(function(){return a},e,f,null,null,null,d)}
1158
1160
  function px(a,b,c,d,e,f,g,h,k){function l(U){U=(new ve(U)).Pa.split(".").pop();var aa=qx[g][U];aa||(aa=Lw[U]);return aa}var m=d.W,n=Ov(m,"EXTINF"),p=0,r=0,u=null;d.Ab.length&&(a.m.isLowLatency=!0);var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Ov(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=nd(w.value))}var y=bj;Ov(m,"EXT-X-GAP")&&(a.m.gapCount++,y=2);if(!n){if(0==d.Ab.length)throw new T(2,4,4024,"EXTINF");if(!a.K)return null}var z=[];w=!1;var D=null,A=!1,B=!1;if(a.K&&d.Ab.length){p=b&&
1159
1161
  window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var C=v,E={},F=0;F<d.Ab.length;E={ue:void 0,de:void 0},F++){var J=d.Ab[F],K=0==F?c:z[z.length-1],L=0==F?e:K.endTime,I=Number(Z(J,"DURATION"))||a.X;if(I){var N=L+I,M=0,O=null;"EXT-X-PRELOAD-HINT"==J.name?(M=(M=Z(J,"BYTERANGE-START"))?Number(M):0,(K=Z(J,"BYTERANGE-LENGTH"))?O=M+Number(K)-1:M&&(O=Number.MAX_SAFE_INTEGER)):(M=Z(J,"BYTERANGE"),O=t(rx(K,M)),M=O.next().value,O=O.next().value);E.de=Z(J,"URI");if(E.de){K=bj;"YES"==Z(J,
1160
- "GAP")&&(a.m.gapCount++,K=2,A=!0);E.ue=null;var Q=function(U){return function(){null==U.ue&&(U.ue=Qv(h(),U.de,f));return U.ue}}(E);p&&0<=M&&null!=O&&(D=Q,w=!0);L=new aj(L,N,Q,M,O,b,0,0,Infinity,[],"",null,C,K,k);"EXT-X-PRELOAD-HINT"==J.name&&(L.xf(),B=!0);"YES"!=Z(J,"INDEPENDENT")&&0<F&&L.Jc();if(E=l(E.de))L.mimeType=E,sx.has(E)&&(L.$=null);z.push(L);C&&(C+=I)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(z.length)p=z[z.length-1].endTime;else return null;w&&(A||0!=z[0].Ga?
1161
- (w=!1,D=null):z=[]);(n=Ov(m,"EXT-X-BYTERANGE"))?(u=t(rx(c,n.value)),r=u.next().value,u=u.next().value):z.length&&(r=z[0].Ga,u=z[z.length-1].ua);c="";n=null;"image"==g&&(c="1x1",m=Ov(m,"EXT-X-TILES"))&&(c=Jv(m,"LAYOUT"),(m=Z(m,"DURATION"))&&(n=Number(m)));var R=null;b=new aj(e,p,function(){if(D)return D();null==R&&(R=Qv(h(),d.g,f));return R||[]},r,u,b,0,0,Infinity,z,c,n,v,y,k,0<z.length&&!!d.g);if(e=l(d.g))b.mimeType=e,sx.has(e)&&(b.$=null);w&&(a.Hb=!0,b.Eg(),B&&b.xf());return b}
1162
+ "GAP")&&(a.m.gapCount++,K=2,A=!0);E.ue=null;var Q=function(U){return function(){null==U.ue&&(U.ue=Qv(h(),U.de,f));return U.ue}}(E);p&&0<=M&&null!=O&&(D=Q,w=!0);L=new Yi(L,N,Q,M,O,b,0,0,Infinity,[],"",null,C,K,k);"EXT-X-PRELOAD-HINT"==J.name&&(L.xf(),B=!0);"YES"!=Z(J,"INDEPENDENT")&&0<F&&L.Jc();if(E=l(E.de))L.mimeType=E,sx.has(E)&&(L.$=null);z.push(L);C&&(C+=I)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(z.length)p=z[z.length-1].endTime;else return null;w&&(A||0!=z[0].Ga?
1163
+ (w=!1,D=null):z=[]);(n=Ov(m,"EXT-X-BYTERANGE"))?(u=t(rx(c,n.value)),r=u.next().value,u=u.next().value):z.length&&(r=z[0].Ga,u=z[z.length-1].ua);c="";n=null;"image"==g&&(c="1x1",m=Ov(m,"EXT-X-TILES"))&&(c=Jv(m,"LAYOUT"),(m=Z(m,"DURATION"))&&(n=Number(m)));var R=null;b=new Yi(e,p,function(){if(D)return D();null==R&&(R=Qv(h(),d.g,f));return R||[]},r,u,b,0,0,Infinity,z,c,n,v,y,k,0<z.length&&!!d.g);if(e=l(d.g))b.mimeType=e,sx.has(e)&&(b.$=null);w&&(a.Hb=!0,b.Eg(),B&&b.xf());return b}
1162
1164
  function rx(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ua+1,d=c+b-1);return[c,d]}
1163
1165
  function rw(a,b,c,d,e){if("video"==c||"audio"==c){var f=a.l.m;if(f&&!tw(a,c))for(b=Mv(b,"EXT-X-DATERANGE"),b=b.sort(function(v,w){v=Jv(v,"START-DATE");w=Jv(w,"START-DATE");return v<w?-1:v>w?1:0}),c=0;c<b.length;c++){var g=b[c],h=Jv(g,"ID");if(!a.Da.has(h)){var k=Jv(g,"START-DATE"),l=nd(k);if(!isNaN(l)){k=Math.max(0,l-f);var m=null,n=Z(g,"END-DATE");if(n&&(n=nd(n),!isNaN(n)&&(m=n-f,0>m)))continue;if(null==m&&(n=Z(g,"DURATION")||Z(g,"PLANNED-DURATION"))&&(n=parseFloat(n),isNaN(n)||(m=k+n),0>l-f+n))continue;
1164
1166
  n=Z(g,"CLASS")||"com.apple.quicktime.HLS";var p="YES"==Z(g,"END-ON-NEXT");if(null==m&&p){for(p=c+1;p<b.length;p++){var r=Z(b[p],"CLASS")||"com.apple.quicktime.HLS";if(n==r&&(r=Jv(b[p],"START-DATE"),r=nd(r),!isNaN(r)&&r&&r>l)){m=Math.max(0,r-f);break}}if(null==m)continue}l=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];p=[];g=t(g.attributes);for(r=g.next();!r.done;r=g.next())if(r=r.value,!l.includes(r.name)){var u=Sv(r.value,d);if("X-ASSET-URI"==r.name||"X-ASSET-LIST"==r.name)u=Qv(e(),
@@ -1215,7 +1217,7 @@ w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.
1215
1217
  y),w,b,d);w.segmentIndex=new hl(y);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
1216
1218
  function dy(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;
1217
1219
  b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function ey(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 fy(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
1218
- function gy(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={pe:void 0},g=e.next())h.pe=g.value,d.push(new aj(h.pe.start,h.pe.end,function(k){return function(){return Se(a.l,[f.replace("{start time}",String(k.pe.Zf))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",Yx);var cy="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),by={CAPT:"main",SUBT:"alternate",DESC:"main"};
1220
+ function gy(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={pe:void 0},g=e.next())h.pe=g.value,d.push(new Yi(h.pe.start,h.pe.end,function(k){return function(){return Se(a.l,[f.replace("{start time}",String(k.pe.Zf))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",Yx);var cy="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),by={CAPT:"main",SUBT:"alternate",DESC:"main"};
1219
1221
  Ri["application/vnd.ms-sstr+xml"]=function(){return new Yx};function hy(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=Hc(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function iy(){}
1220
1222
  function jy(a,b,c,d,e,f){var g=new ky;Gh(b.headers).forEach(function(m,n){g.append(n,m)});var h=new ly,k={ig:!1,ih:!1};a=my(a,c,{body:b.body||void 0,headers:g,method:b.method,signal:h.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},k,d,e,b.streamDataCallback,f.minBytesForProgressEvents||0);a=new bh(a,function(){k.ig=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new $b(function(){k.ih=!0;h.abort()});l.Z(b/1E3);a.finally(function(){l.stop()})}return a}
1221
1223
  function my(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,u,v,w,y,z,D,A;return P(function(B){switch(B.g){case 1:return k=ny,l=oy,r=p=0,u=Date.now(),ua(B,2),G(B,k(a,c),4);case 4:m=B.h;f(py(m.headers));if("HEAD"==c.method){B.u(5);break}v=m.clone().body.getReader();y=(w=m.headers.get("Content-Length"))?parseInt(w,10):0;z=function(C){function E(){var F,J,K,L;return P(function(I){switch(I.g){case 1:return ua(I,2),G(I,v.read(),4);case 4:F=I.h;ya(I,3);break;case 2:return za(I),I.return();case 3:if(F.done){I.u(5);break}p+=
@@ -1261,7 +1263,7 @@ function nz(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){g=t
1261
1263
  b.next())for(g=e.value,e=oz(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=oz(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}
1262
1264
  function oz(a,b,c){var d=b.segments.map(function(e){return pz(a,e,b)});c.qd(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new hl(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||
1263
1265
  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([cf(b.mimeType,b.codecs)])}}
1264
- function pz(a,b,c){var d=new jz("segment",a.h,a.g,b.dataKey);a=new aj(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?qz(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 qz(a,b){var c=new jz("segment",a.h,a.g,b);return new Wi(function(){return[c.toString()]},0,null)};function rz(){this.g=null}q=rz.prototype;q.configure=function(){};
1266
+ function pz(a,b,c){var d=new jz("segment",a.h,a.g,b.dataKey);a=new Yi(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?qz(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 qz(a,b){var c=new jz("segment",a.h,a.g,b);return new Wi(function(){return[c.toString()]},0,null)};function rz(){this.g=null}q=rz.prototype;q.configure=function(){};
1265
1267
  q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:d=kz(a);c.g=d;if(null==d||"manifest"!=d.g)throw new T(2,1,9004,a);e=new Ry;va(m,2);return G(m,e.init(),4);case 4:return G(m,Vy(e,d.ob(),d.Ha()),5);case 5:return f=m.h,G(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new lz(d.ob(),d.Ha()),l=mz(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Ba(m),G(m,e.destroy(),7);case 7:Ca(m,0)}})};q.stop=function(){return Promise.resolve()};
1266
1268
  q.update=function(){};
1267
1269
  q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:return d=c.g,e=new Ry,ua(m,2,3),G(m,e.init(),5);case 5:return G(m,Vy(e,d.ob(),d.Ha()),6);case 6:return f=m.h,G(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 G(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Ba(m),G(m,e.destroy(),10);case 10:Ca(m,0);break;case 2:za(m),m.u(3)}})};
@@ -1361,132 +1363,132 @@ function iC(a,b,c,d,e,f,g,h,k,l,m,n,p){var r=l;if(bd(a)){if(!m)return null;var u
1361
1363
  p=p.end,r=r.parent;null==n&&(n=0);n+=b.periodStart;p=null==p?Infinity:p+b.periodStart;n=Math.max(n,b.segmentStart);p=Math.min(p,b.segmentEnd);if(!D&&0<h.length)for(n=Infinity,p=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),p=Math.max(p,c.endTime);if("br"==u.tagName)return e=new Ed(n,p,""),e.lineBreak=!0,e;b="";z&&(b=Lc(ed(u)||""),y&&(b=b.replace(/\s+/g," ")));b=new Ed(n,p,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=kC(u,"region",f,"")[0];if(u.attributes.region&&
1362
1364
  k&&k.attributes["xml:id"]){var B=k.attributes["xml:id"];b.region=g.filter(function(C){return C.id==B})[0]}g=k;l&&d&&!u.attributes.region&&!u.attributes.style&&(g=kC(l,"region",f,"")[0]);nC(b,u,g,v,w,e,a,0==h.length);return b}
1363
1365
  function hC(a,b,c){var d=new Kb,e=a.attributes["xml:id"];if(!e)return null;d.id=e;e=null;c&&(e=oC.exec(c)||pC.exec(c));c=e?Number(e[1]):null;e=e?Number(e[2]):null;var f,g=qC(a,b,"extent");if(g){var h=(f=oC.exec(g))||pC.exec(g);null!=h&&(d.width=Number(h[1]),d.height=Number(h[2]),f||(null!=c&&(d.width=100*d.width/c),null!=e&&(d.height=100*d.height/e)),d.widthUnits=f||null!=c?Lb:0,d.heightUnits=f||null!=e?Lb:0)}if(a=qC(a,b,"origin"))if(h=(f=oC.exec(a))||pC.exec(a),null!=h)d.viewportAnchorX=Number(h[1]),
1364
- d.viewportAnchorY=Number(h[2]),f?g||(d.width=100-d.viewportAnchorX,d.widthUnits=Lb,d.height=100-d.viewportAnchorY,d.heightUnits=Lb):(null!=e&&(d.viewportAnchorY=100*d.viewportAnchorY/e),null!=c&&(d.viewportAnchorX=100*d.viewportAnchorX/c)),d.viewportAnchorUnits=f||null!=c?Lb:0;return d}
1365
- function nC(a,b,c,d,e,f,g,h){g=g||h;"rtl"==rC(b,c,f,"direction",g)&&(a.direction="rtl");h=rC(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=Hd);(h=rC(b,c,f,"textAlign",!0))?(a.positionAlign=sC[h],a.lineAlign=tC[h],a.textAlign=ee[h.toUpperCase()]):a.textAlign=Gd;if(h=rC(b,c,f,"displayAlign",!0))a.displayAlign=fe[h.toUpperCase()];if(h=rC(b,c,f,"color",g))a.color=h;if(h=rC(b,c,f,"backgroundColor",
1366
- g))a.backgroundColor=h;if(h=rC(b,c,f,"border",g))a.border=h;if(h=rC(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"!=
1367
- k}).join(",")}(h=rC(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=be);h=rC(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=rC(b,c,f,"lineHeight",g))&&h.match(uC)&&(a.lineHeight=h);(h=rC(b,c,f,"fontSize",g))&&(h.match(uC)||h.match(vC))&&(a.fontSize=h);if(h=rC(b,c,f,"fontStyle",g))a.fontStyle=he[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=ed(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
1368
- e);if(d=rC(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(uC)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(uC)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=rC(b,c,f,"letterSpacing",g))&&d.match(uC)&&(a.letterSpacing=d);(d=rC(b,c,f,"linePadding",g))&&d.match(uC)&&(a.linePadding=d);if(d=rC(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=qC(c,f,"textDecoration"))&&wC(a,d);(d=xC(b,f,"textDecoration"))&&wC(a,d);if(d=rC(b,c,f,"textCombine",g))a.textCombineUpright=d;switch(rC(b,
1369
- c,f,"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
1370
- function wC(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes(de)||a.textDecoration.push(de);break;case "noUnderline":a.textDecoration.includes(de)&&Ob(a.textDecoration,de);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")||
1371
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Ob(a.textDecoration,"overline")}}function rC(a,b,c,d,e){e=void 0===e?!0:e;return(a=xC(a,c,d))?a:e?qC(b,c,d):null}function qC(a,b,c){if(!a)return null;var d=md(a,eC,c);return d?d:yC(a,b,c)}function xC(a,b,c){var d=md(a,eC,c);return d?d:yC(a,b,c)}
1372
- function yC(a,b,c){a=kC(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=ld(a[e],"urn:ebu:tt:style",c);f||(f=md(a[e],eC,c));f||(f=xC(a[e],b,c));f&&(d=f)}return d}function kC(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?ld(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}
1373
- function mC(a,b,c,d){a=lC(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 lC(a,b){var c=zC(a.attributes.begin,b),d=zC(a.attributes.end,b);a=zC(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1374
- function zC(a,b){var c=null;if(AC.test(a)){a=AC.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(BC.test(a))c=CC(BC,a);else if(DC.test(a))c=CC(DC,a);else if(EC.test(a))a=EC.exec(a),c=Number(a[1])/b.frameRate;else if(FC.test(a))a=FC.exec(a),c=Number(a[1])/b.g;else if(GC.test(a))c=CC(GC,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c}
1375
- function CC(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)}function gC(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{ic:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",cC);cC.prototype.parseMedia=cC.prototype.parseMedia;cC.prototype.setManifestType=cC.prototype.setManifestType;cC.prototype.setSequenceMode=cC.prototype.setSequenceMode;cC.prototype.parseInit=cC.prototype.parseInit;
1366
+ d.viewportAnchorY=Number(h[2]),f?g||(d.width=100-d.viewportAnchorX,d.widthUnits=Lb,d.height=100-d.viewportAnchorY,d.heightUnits=Lb):(null!=e&&(d.viewportAnchorY=100*d.viewportAnchorY/e),null!=c&&(d.viewportAnchorX=100*d.viewportAnchorX/c)),d.viewportAnchorUnits=f||null!=c?Lb:0;return d}function rC(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),4==b.length)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
1367
+ function nC(a,b,c,d,e,f,g,h){g=g||h;"rtl"==sC(b,c,f,"direction",g)&&(a.direction="rtl");h=sC(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=Hd);(h=sC(b,c,f,"textAlign",!0))?(a.positionAlign=tC[h],a.lineAlign=uC[h],a.textAlign=ee[h.toUpperCase()]):a.textAlign=Gd;if(h=sC(b,c,f,"displayAlign",!0))a.displayAlign=fe[h.toUpperCase()];if(h=sC(b,c,f,"color",g))a.color=rC(h);if(h=sC(b,c,f,"backgroundColor",
1368
+ g))a.backgroundColor=rC(h);if(h=sC(b,c,f,"border",g))a.border=h;if(h=sC(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"!=
1369
+ k}).join(",")}(h=sC(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=be);h=sC(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=sC(b,c,f,"lineHeight",g))&&h.match(vC)&&(a.lineHeight=h);(h=sC(b,c,f,"fontSize",g))&&(h.match(vC)||h.match(wC))&&(a.fontSize=h);if(h=sC(b,c,f,"fontStyle",g))a.fontStyle=he[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=ed(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
1370
+ e);if(d=sC(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(vC)?a.textStrokeColor=a.color:(a.textStrokeColor=rC(d[0]),d.shift()),d[0]&&d[0].match(vC)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=sC(b,c,f,"letterSpacing",g))&&d.match(vC)&&(a.letterSpacing=d);(d=sC(b,c,f,"linePadding",g))&&d.match(vC)&&(a.linePadding=d);if(d=sC(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=qC(c,f,"textDecoration"))&&xC(a,d);(d=yC(b,f,"textDecoration"))&&xC(a,d);if(d=sC(b,c,f,"textCombine",g))a.textCombineUpright=
1371
+ d;switch(sC(b,c,f,"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
1372
+ function xC(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes(de)||a.textDecoration.push(de);break;case "noUnderline":a.textDecoration.includes(de)&&Ob(a.textDecoration,de);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")||
1373
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Ob(a.textDecoration,"overline")}}function sC(a,b,c,d,e){e=void 0===e?!0:e;return(a=yC(a,c,d))?a:e?qC(b,c,d):null}function qC(a,b,c){if(!a)return null;var d=md(a,eC,c);return d?d:zC(a,b,c)}function yC(a,b,c){var d=md(a,eC,c);return d?d:zC(a,b,c)}
1374
+ function zC(a,b,c){a=kC(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=ld(a[e],"urn:ebu:tt:style",c);f||(f=md(a[e],eC,c));f||(f=yC(a[e],b,c));f&&(d=f)}return d}function kC(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?ld(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}
1375
+ function mC(a,b,c,d){a=lC(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 lC(a,b){var c=AC(a.attributes.begin,b),d=AC(a.attributes.end,b);a=AC(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1376
+ function AC(a,b){var c=null;if(BC.test(a)){a=BC.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(CC.test(a))c=DC(CC,a);else if(EC.test(a))c=DC(EC,a);else if(FC.test(a))a=FC.exec(a),c=Number(a[1])/b.frameRate;else if(GC.test(a))a=GC.exec(a),c=Number(a[1])/b.g;else if(HC.test(a))c=DC(HC,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c}
1377
+ function DC(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)}function gC(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{ic:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",cC);cC.prototype.parseMedia=cC.prototype.parseMedia;cC.prototype.setManifestType=cC.prototype.setManifestType;cC.prototype.setSequenceMode=cC.prototype.setSequenceMode;cC.prototype.parseInit=cC.prototype.parseInit;
1376
1378
  function fC(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]))}
1377
- var oC=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,vC=/^(\d{1,4}(?:\.\d+)?|100)%$/,uC=/^(\d+px|\d+em|\d*\.?\d+c)$/,pC=/^(\d+)px (\d+)px$/,AC=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,BC=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,DC=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,EC=/^(\d*(?:\.\d*)?)f$/,FC=/^(\d*(?:\.\d*)?)t$/,GC=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),tC={left:Kd,center:"center",right:"end",start:Kd,
1378
- end:"end"},sC={left:"line-left",center:"center",right:"line-right"},dC=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],eC=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],jC=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];sf["application/ttml+xml"]=function(){return new cC};function HC(){this.g=new cC}HC.prototype.parseInit=function(a){var b=!1;(new Lh).box("moov",Qh).box("trak",Qh).box("mdia",Qh).box("minf",Qh).box("stbl",Qh).R("stsd",Sh).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};HC.prototype.setSequenceMode=function(){};HC.prototype.setManifestType=function(){};
1379
- HC.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[],g=[];(new Lh).box("moof",Qh).box("traf",Qh).R("subs",function(h){g=[];for(var k=h.reader,l=k.P(),m=0;m<l;m++){k.P();for(var n=k.ka(),p=0;p<n;p++)1==h.version?g.push(k.P()):g.push(k.ka()),k.S(),k.S(),k.P()}}).box("mdat",Vh(function(h){e=!0;if(g.length){for(var k=Ab(h,0,g[0]),l=[],m=g[0],n=1;n<g.length;n++){var p=Ab(h,m,g[n]);p=Me(p);l.push("data:image/png;base64,"+p);m+=g[n]}f=f.concat(d.g.parseMedia(k,b,c,l))}else f=f.concat(d.g.parseMedia(h,
1380
- b,c,[]))})).parse(a,!1);if(!e)throw new T(2,2,2007);return f};S("shaka.text.Mp4TtmlParser",HC);HC.prototype.parseMedia=HC.prototype.parseMedia;HC.prototype.setManifestType=HC.prototype.setManifestType;HC.prototype.setSequenceMode=HC.prototype.setSequenceMode;HC.prototype.parseInit=HC.prototype.parseInit;sf['application/mp4; codecs="stpp"']=function(){return new HC};sf['application/mp4; codecs="stpp.ttml"']=function(){return new HC};sf['application/mp4; codecs="stpp.ttml.im1i"']=function(){return new HC};
1381
- sf['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new HC};sf['application/mp4; codecs="stpp.ttml.im2i"']=function(){return new HC};sf['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new HC};sf['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new HC};sf['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new HC};sf['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new HC};sf['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new HC};function IC(){this.h=!1;this.g="UNKNOWN"}IC.prototype.parseInit=function(){};IC.prototype.setSequenceMode=function(a){this.h=a};IC.prototype.setManifestType=function(a){this.g=a};
1382
- IC.prototype.parseMedia=function(a,b){a=Cc(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=Sc(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-=95443.7176888889,
1379
+ var oC=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,wC=/^(\d{1,4}(?:\.\d+)?|100)%$/,vC=/^(\d+px|\d+em|\d*\.?\d+c)$/,pC=/^(\d+)px (\d+)px$/,BC=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,CC=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,EC=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,FC=/^(\d*(?:\.\d*)?)f$/,GC=/^(\d*(?:\.\d*)?)t$/,HC=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),uC={left:Kd,center:"center",right:"end",start:Kd,
1380
+ end:"end"},tC={left:"line-left",center:"center",right:"line-right"},dC=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],eC=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],jC=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];sf["application/ttml+xml"]=function(){return new cC};function IC(){this.g=new cC}IC.prototype.parseInit=function(a){var b=!1;(new Lh).box("moov",Qh).box("trak",Qh).box("mdia",Qh).box("minf",Qh).box("stbl",Qh).R("stsd",Sh).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};IC.prototype.setSequenceMode=function(){};IC.prototype.setManifestType=function(){};
1381
+ IC.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[],g=[];(new Lh).box("moof",Qh).box("traf",Qh).R("subs",function(h){g=[];for(var k=h.reader,l=k.P(),m=0;m<l;m++){k.P();for(var n=k.ka(),p=0;p<n;p++)1==h.version?g.push(k.P()):g.push(k.ka()),k.S(),k.S(),k.P()}}).box("mdat",Vh(function(h){e=!0;if(g.length){for(var k=Ab(h,0,g[0]),l=[],m=g[0],n=1;n<g.length;n++){var p=Ab(h,m,g[n]);p=Me(p);l.push("data:image/png;base64,"+p);m+=g[n]}f=f.concat(d.g.parseMedia(k,b,c,l))}else f=f.concat(d.g.parseMedia(h,
1382
+ b,c,[]))})).parse(a,!1);if(!e)throw new T(2,2,2007);return f};S("shaka.text.Mp4TtmlParser",IC);IC.prototype.parseMedia=IC.prototype.parseMedia;IC.prototype.setManifestType=IC.prototype.setManifestType;IC.prototype.setSequenceMode=IC.prototype.setSequenceMode;IC.prototype.parseInit=IC.prototype.parseInit;sf['application/mp4; codecs="stpp"']=function(){return new IC};sf['application/mp4; codecs="stpp.ttml"']=function(){return new IC};sf['application/mp4; codecs="stpp.ttml.im1i"']=function(){return new IC};
1383
+ sf['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new IC};sf['application/mp4; codecs="stpp.ttml.im2i"']=function(){return new IC};sf['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new IC};sf['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new IC};sf['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new IC};sf['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new IC};sf['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new IC};function JC(){this.h=!1;this.g="UNKNOWN"}JC.prototype.parseInit=function(){};JC.prototype.setSequenceMode=function(a){this.h=a};JC.prototype.setManifestType=function(a){this.g=a};
1384
+ JC.prototype.parseMedia=function(a,b){a=Cc(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=Sc(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-=95443.7176888889,
1383
1385
  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 Mc(e);var f=new Kb;Pc(e);Nc(e);for(var g=Pc(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=Number(g[2])):
1384
1386
  (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");Nc(e);g=Pc(e)}b.push(f)}d=new Map;Vd(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=t(h);for(g=h.next();!g.done;g=
1385
1387
  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 Ed(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var r=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=!0;l.fontFamily=r;break;case "font-size":m=!0;l.fontSize=
1386
1388
  r;break;case "font-weight":if(700<=parseInt(r,10)||"bold"==r)m=!0,l.fontWeight=be;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=Pd;break;case "italic":m=!0;l.fontStyle=ce;break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine="noWrap"!=r}}}m&&d.set(g,l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||
1387
- "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 Mc(l[0]),g=Qc(h),n=Oc(h,/[ \t]+--\x3e[ \t]+/g),k=Qc(h),null==g||null==n||null==k)Za("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;m=l.slice(1).join("\n").trim();d.has("global")?(l=d.get("global").clone(),l.startTime=g,l.endTime=k,l.payload=m):l=new Ed(g,k,m);Nc(h);for(g=Pc(h);g;)JC(l,g,b),Nc(h),g=Pc(h);Ud(l,d);null!=f&&(l.id=f);f=l}f&&e.push(f)}return e};
1388
- function JC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Gd:a.textAlign=ee[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"==
1389
- b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Fd);else if(d=/^region:(.*)$/.exec(b)){if(b=KC(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=ge[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Jd,a.line=Number(c[1]),c[2]&&(a.lineAlign=ge[c[2].toUpperCase()])}
1390
- function KC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}S("shaka.text.VttTextParser",IC);IC.prototype.parseMedia=IC.prototype.parseMedia;IC.prototype.setManifestType=IC.prototype.setManifestType;IC.prototype.setSequenceMode=IC.prototype.setSequenceMode;IC.prototype.parseInit=IC.prototype.parseInit;sf["text/vtt"]=function(){return new IC};sf['text/vtt; codecs="vtt"']=function(){return new IC};sf['text/vtt; codecs="wvtt"']=function(){return new IC};function LC(){this.g=null}LC.prototype.parseInit=function(a){var b=this,c=!1;(new Lh).box("moov",Qh).box("trak",Qh).box("mdia",Qh).R("mdhd",function(d){d=tj(d.reader,d.version);b.g=d.timescale}).box("minf",Qh).box("stbl",Qh).R("stsd",Sh).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};LC.prototype.setSequenceMode=function(){};LC.prototype.setManifestType=function(){};
1391
- LC.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 Lh).box("moof",Qh).box("traf",Qh).R("tfdt",function(D){g=!0;c=sj(D.reader,D.version).baseMediaDecodeTime}).R("tfhd",function(D){l=rj(D.reader,D.flags).Zc}).R("trun",function(D){h=!0;d=uj(D.reader,D.version,D.flags).Rg}).box("mdat",Vh(function(D){k=!0;e=D})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Ih(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
1392
- p.value;var r=p.Kf||l,u=p.ke?c+p.ke:a;a=u+(r||0);var v=0;do{var w=m.P();v+=w;var y=m.P(),z=null;"vttc"==Ph(y)?8<w&&(z=m.rb(w-8)):m.skip(w-8);r&&z&&(w=MC(z,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(Af)};function MC(a,b,c){var d,e,f;(new Lh).box("payl",Vh(function(g){d=Cc(g)})).box("iden",Vh(function(g){e=Cc(g)})).box("sttg",Vh(function(g){f=Cc(g)})).parse(a);return d?NC(d,e,f,b,c):null}
1393
- function NC(a,b,c,d,e){a=new Ed(d,e,a);Ud(a);b&&(a.id=b);if(c)for(b=new Mc(c),c=Pc(b);c;)JC(a,c,[]),Nc(b),c=Pc(b);return a}S("shaka.text.Mp4VttParser",LC);LC.prototype.parseMedia=LC.prototype.parseMedia;LC.prototype.setManifestType=LC.prototype.setManifestType;LC.prototype.setSequenceMode=LC.prototype.setSequenceMode;LC.prototype.parseInit=LC.prototype.parseInit;sf['application/mp4; codecs="wvtt"']=function(){return new LC};function OC(){}OC.prototype.parseInit=function(){};OC.prototype.setSequenceMode=function(){};OC.prototype.setManifestType=function(){};OC.prototype.parseMedia=function(a){var b=Cc(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 Mc(c[0]),e=Qc(d),f=Oc(d,/,/g);d=Qc(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 Ed(e,d,c.slice(1).join("\n").trim()))}return a};
1394
- S("shaka.text.SbvTextParser",OC);OC.prototype.parseMedia=OC.prototype.parseMedia;OC.prototype.setManifestType=OC.prototype.setManifestType;OC.prototype.setSequenceMode=OC.prototype.setSequenceMode;OC.prototype.parseInit=OC.prototype.parseInit;sf["text/x-subviewer"]=function(){return new OC};function PC(){this.g=new IC}PC.prototype.parseInit=function(){};PC.prototype.setSequenceMode=function(){};PC.prototype.setManifestType=function(){};PC.prototype.parseMedia=function(a,b,c){a=Cc(a);a=QC(a);a=Ab(Ic(a));return this.g.parseMedia(a,b,c,[])};
1395
- function QC(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",PC);PC.srt2webvtt=QC;PC.prototype.parseMedia=PC.prototype.parseMedia;
1396
- PC.prototype.setManifestType=PC.prototype.setManifestType;PC.prototype.setSequenceMode=PC.prototype.setSequenceMode;PC.prototype.parseInit=PC.prototype.parseInit;sf["text/srt"]=function(){return new PC};function RC(){}RC.prototype.parseInit=function(){};RC.prototype.setSequenceMode=function(){};RC.prototype.setManifestType=function(){};
1397
- RC.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=Cc(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=SC.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=TC.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(UC);else if("Style"==a){a=f.split(UC);f={};for(var g=0;g<e.length&&
1398
- 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={eh:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=TC.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(UC);else if("Dialogue"==f){g=g.split(UC);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=VC(f.Start);var k=VC(f.End);g=new Ed(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.eh=f.Style;(a=d.find(function(l){return function(m){return m.Name==
1399
- l.eh}}(a)))&&WC(g,a);e.push(g)}return e};
1400
- function WC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=XC(c))a.color=c;if(c=b.BackColour)if(c=XC(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=be);b.Italic&&(a.fontStyle=ce);b.Underline&&a.textDecoration.push(de);if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Ld;a.textAlign="start";break;case 2:a.displayAlign=Ld;a.textAlign=Gd;break;case 3:a.displayAlign=Ld;a.textAlign="end";break;case 5:a.displayAlign=
1401
- "before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Gd;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=Gd;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}function XC(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}
1402
- function VC(a){a=YC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",RC);RC.prototype.parseMedia=RC.prototype.parseMedia;RC.prototype.setManifestType=RC.prototype.setManifestType;RC.prototype.setSequenceMode=RC.prototype.setSequenceMode;RC.prototype.parseInit=RC.prototype.parseInit;var SC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,TC=/^\s*([^:]+):\s*(.*)/,UC=/\s*,\s*/,YC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
1403
- sf["text/x-ssa"]=function(){return new RC};function ZC(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)?{Nd:c,da:a}:null}function $C(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}}
1404
- function aD(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}
1405
- function bD(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,
1406
- 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 cD(a){this.i=a;this.h=0;this.g=new Map}q=cD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(of(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
1407
- q.transmux=function(a,b,c,d){for(var e=Ab(a),f=qj(e),g=f.length;g<e.length&&!aD(e,g);g++);a=1E3*c.endTime;f=pj(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=$C(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=ZC(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var l=k.Nd+k.da;g+l<=e.length&&h.push({data:e.subarray(g+
1389
+ "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 Mc(l[0]),g=Qc(h),n=Oc(h,/[ \t]+--\x3e[ \t]+/g),k=Qc(h),null==g||null==n||null==k)Za("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;m=l.slice(1).join("\n").trim();d.has("global")?(l=d.get("global").clone(),l.startTime=g,l.endTime=k,l.payload=m):l=new Ed(g,k,m);Nc(h);for(g=Pc(h);g;)KC(l,g,b),Nc(h),g=Pc(h);Ud(l,d);null!=f&&(l.id=f);f=l}f&&e.push(f)}return e};
1390
+ function KC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Gd:a.textAlign=ee[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"==
1391
+ b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Fd);else if(d=/^region:(.*)$/.exec(b)){if(b=LC(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=ge[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Jd,a.line=Number(c[1]),c[2]&&(a.lineAlign=ge[c[2].toUpperCase()])}
1392
+ function LC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}S("shaka.text.VttTextParser",JC);JC.prototype.parseMedia=JC.prototype.parseMedia;JC.prototype.setManifestType=JC.prototype.setManifestType;JC.prototype.setSequenceMode=JC.prototype.setSequenceMode;JC.prototype.parseInit=JC.prototype.parseInit;sf["text/vtt"]=function(){return new JC};sf['text/vtt; codecs="vtt"']=function(){return new JC};sf['text/vtt; codecs="wvtt"']=function(){return new JC};function MC(){this.g=null}MC.prototype.parseInit=function(a){var b=this,c=!1;(new Lh).box("moov",Qh).box("trak",Qh).box("mdia",Qh).R("mdhd",function(d){d=tj(d.reader,d.version);b.g=d.timescale}).box("minf",Qh).box("stbl",Qh).R("stsd",Sh).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};MC.prototype.setSequenceMode=function(){};MC.prototype.setManifestType=function(){};
1393
+ MC.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 Lh).box("moof",Qh).box("traf",Qh).R("tfdt",function(D){g=!0;c=sj(D.reader,D.version).baseMediaDecodeTime}).R("tfhd",function(D){l=rj(D.reader,D.flags).Zc}).R("trun",function(D){h=!0;d=uj(D.reader,D.version,D.flags).Rg}).box("mdat",Vh(function(D){k=!0;e=D})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Ih(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
1394
+ p.value;var r=p.Kf||l,u=p.ke?c+p.ke:a;a=u+(r||0);var v=0;do{var w=m.P();v+=w;var y=m.P(),z=null;"vttc"==Ph(y)?8<w&&(z=m.rb(w-8)):m.skip(w-8);r&&z&&(w=NC(z,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(Af)};function NC(a,b,c){var d,e,f;(new Lh).box("payl",Vh(function(g){d=Cc(g)})).box("iden",Vh(function(g){e=Cc(g)})).box("sttg",Vh(function(g){f=Cc(g)})).parse(a);return d?OC(d,e,f,b,c):null}
1395
+ function OC(a,b,c,d,e){a=new Ed(d,e,a);Ud(a);b&&(a.id=b);if(c)for(b=new Mc(c),c=Pc(b);c;)KC(a,c,[]),Nc(b),c=Pc(b);return a}S("shaka.text.Mp4VttParser",MC);MC.prototype.parseMedia=MC.prototype.parseMedia;MC.prototype.setManifestType=MC.prototype.setManifestType;MC.prototype.setSequenceMode=MC.prototype.setSequenceMode;MC.prototype.parseInit=MC.prototype.parseInit;sf['application/mp4; codecs="wvtt"']=function(){return new MC};function PC(){}PC.prototype.parseInit=function(){};PC.prototype.setSequenceMode=function(){};PC.prototype.setManifestType=function(){};PC.prototype.parseMedia=function(a){var b=Cc(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 Mc(c[0]),e=Qc(d),f=Oc(d,/,/g);d=Qc(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 Ed(e,d,c.slice(1).join("\n").trim()))}return a};
1396
+ S("shaka.text.SbvTextParser",PC);PC.prototype.parseMedia=PC.prototype.parseMedia;PC.prototype.setManifestType=PC.prototype.setManifestType;PC.prototype.setSequenceMode=PC.prototype.setSequenceMode;PC.prototype.parseInit=PC.prototype.parseInit;sf["text/x-subviewer"]=function(){return new PC};function QC(){this.g=new JC}QC.prototype.parseInit=function(){};QC.prototype.setSequenceMode=function(){};QC.prototype.setManifestType=function(){};QC.prototype.parseMedia=function(a,b,c){a=Cc(a);a=RC(a);a=Ab(Ic(a));return this.g.parseMedia(a,b,c,[])};
1397
+ function RC(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",QC);QC.srt2webvtt=RC;QC.prototype.parseMedia=QC.prototype.parseMedia;
1398
+ QC.prototype.setManifestType=QC.prototype.setManifestType;QC.prototype.setSequenceMode=QC.prototype.setSequenceMode;QC.prototype.parseInit=QC.prototype.parseInit;sf["text/srt"]=function(){return new QC};function SC(){}SC.prototype.parseInit=function(){};SC.prototype.setSequenceMode=function(){};SC.prototype.setManifestType=function(){};
1399
+ SC.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=Cc(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=TC.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=UC.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(VC);else if("Style"==a){a=f.split(VC);f={};for(var g=0;g<e.length&&
1400
+ 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={eh:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=UC.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(VC);else if("Dialogue"==f){g=g.split(VC);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=WC(f.Start);var k=WC(f.End);g=new Ed(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.eh=f.Style;(a=d.find(function(l){return function(m){return m.Name==
1401
+ l.eh}}(a)))&&XC(g,a);e.push(g)}return e};
1402
+ function XC(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=YC(c))a.color=c;if(c=b.BackColour)if(c=YC(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=be);b.Italic&&(a.fontStyle=ce);b.Underline&&a.textDecoration.push(de);if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Ld;a.textAlign="start";break;case 2:a.displayAlign=Ld;a.textAlign=Gd;break;case 3:a.displayAlign=Ld;a.textAlign="end";break;case 5:a.displayAlign=
1403
+ "before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Gd;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=Gd;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}function YC(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}
1404
+ function WC(a){a=ZC.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",SC);SC.prototype.parseMedia=SC.prototype.parseMedia;SC.prototype.setManifestType=SC.prototype.setManifestType;SC.prototype.setSequenceMode=SC.prototype.setSequenceMode;SC.prototype.parseInit=SC.prototype.parseInit;var TC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,UC=/^\s*([^:]+):\s*(.*)/,VC=/\s*,\s*/,ZC=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
1405
+ sf["text/x-ssa"]=function(){return new SC};function $C(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)?{Nd:c,da:a}:null}function aD(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}}
1406
+ function bD(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}
1407
+ function cD(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,
1408
+ 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 dD(a){this.i=a;this.h=0;this.g=new Map}q=dD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(of(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.i};
1409
+ q.transmux=function(a,b,c,d){for(var e=Ab(a),f=qj(e),g=f.length;g<e.length&&!bD(e,g);g++);a=1E3*c.endTime;f=pj(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=aD(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=$C(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var l=k.Nd+k.da;g+l<=e.length&&h.push({data:e.subarray(g+
1408
1410
  k.Nd,g+l),size:k.da,duration:1024,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib: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,ab:[],qa:new Uint8Array([]),xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.h,baseMediaDecodeTime:a,Ya:h},stream:b};d=new yx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Ex(d),this.g.set(c,b));c=Vx(d);this.h++;b=Re(b,c);return Promise.resolve(b)};
1409
- S("shaka.transmuxer.AacTransmuxer",cD);cD.prototype.transmux=cD.prototype.transmux;cD.prototype.getOriginalMimeType=cD.prototype.getOriginalMimeType;cD.prototype.convertCodecs=cD.prototype.convertCodecs;cD.prototype.isSupported=cD.prototype.isSupported;cD.prototype.destroy=cD.prototype.destroy;je("audio/aac",function(){return new cD("audio/aac")},se);function dD(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,
1411
+ S("shaka.transmuxer.AacTransmuxer",dD);dD.prototype.transmux=dD.prototype.transmux;dD.prototype.getOriginalMimeType=dD.prototype.getOriginalMimeType;dD.prototype.convertCodecs=dD.prototype.convertCodecs;dD.prototype.isSupported=dD.prototype.isSupported;dD.prototype.destroy=dD.prototype.destroy;je("audio/aac",function(){return new dD("audio/aac")},se);function eD(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,
1410
1412
  1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,qa:a,da:e}}
1411
- function eD(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 fD(a){this.i=a;this.h=0;this.g=new Map}q=fD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOriginalMimeType=function(){return this.i};
1412
- q.transmux=function(a,b,c,d){a=Ab(a);for(var e=qj(a),f=e.length;f<a.length&&!eD(a,f);f++);var g=1E3*c.endTime;e=pj(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=dD(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.qa;k.push({data:a.subarray(f,f+l.da),size:l.da,duration:1536,
1413
- eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});f+=l.da}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,ab:[],qa:h,xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.h,baseMediaDecodeTime:a,Ya:k},stream:b};d=new yx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Ex(d),this.g.set(c,b));c=Vx(d);this.h++;b=Re(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",fD);fD.prototype.transmux=fD.prototype.transmux;
1414
- fD.prototype.getOriginalMimeType=fD.prototype.getOriginalMimeType;fD.prototype.convertCodecs=fD.prototype.convertCodecs;fD.prototype.isSupported=fD.prototype.isSupported;fD.prototype.destroy=fD.prototype.destroy;je("audio/ac3",function(){return new fD("audio/ac3")},se);function gD(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Aj(a.subarray(b+2));Cj(c,2);Cj(c,3);var d=Dj(c,11)+1<<1,e=Dj(c,2);if(3==e){e=Dj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Dj(c,2);var g=Dj(c,3),h=Dj(c,1);c=Dj(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,qa:a,da:d}};function hD(a){this.i=a;this.h=0;this.g=new Map}q=hD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOriginalMimeType=function(){return this.i};
1415
- q.transmux=function(a,b,c,d){a=Ab(a);for(var e=qj(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=pj(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=gD(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.qa;k.push({data:a.subarray(f,f+l.da),
1416
- size:l.da,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});f+=l.da}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,ab:[],qa:h,xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.h,baseMediaDecodeTime:a,Ya:k},stream:b};d=new yx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Ex(d),this.g.set(c,b));c=Vx(d);this.h++;b=Re(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",hD);hD.prototype.transmux=hD.prototype.transmux;
1417
- hD.prototype.getOriginalMimeType=hD.prototype.getOriginalMimeType;hD.prototype.convertCodecs=hD.prototype.convertCodecs;hD.prototype.isSupported=hD.prototype.isSupported;hD.prototype.destroy=hD.prototype.destroy;je("audio/ec3",function(){return new hD("audio/ec3")},se);function iD(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 Aj(b.data),d=Pj(c);Pj(c);Pj(c);Fj(c);if(jD.includes(d)&&(d=W(c),3===d&&Cj(c,1),Fj(c),Fj(c),Cj(c,1),Oj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)Oj(c)&&(6>e?Qj(c,16):Qj(c,64))}Fj(c);d=W(c);if(0===d)W(c);else if(1===d)for(Cj(c,1),Fj(c),Fj(c),d=W(c),e=0;e<d;e++)Fj(c);Fj(c);Cj(c,1);var f=W(c),g=W(c),h=Dj(c,1);0===h&&Cj(c,1);Cj(c,1);var k=0,l=0,m=0,n=0;
1413
+ function fD(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 gD(a){this.i=a;this.h=0;this.g=new Map}q=gD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOriginalMimeType=function(){return this.i};
1414
+ q.transmux=function(a,b,c,d){a=Ab(a);for(var e=qj(a),f=e.length;f<a.length&&!fD(a,f);f++);var g=1E3*c.endTime;e=pj(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=eD(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.qa;k.push({data:a.subarray(f,f+l.da),size:l.da,duration:1536,
1415
+ eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});f+=l.da}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,ab:[],qa:h,xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.h,baseMediaDecodeTime:a,Ya:k},stream:b};d=new yx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Ex(d),this.g.set(c,b));c=Vx(d);this.h++;b=Re(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ac3Transmuxer",gD);gD.prototype.transmux=gD.prototype.transmux;
1416
+ gD.prototype.getOriginalMimeType=gD.prototype.getOriginalMimeType;gD.prototype.convertCodecs=gD.prototype.convertCodecs;gD.prototype.isSupported=gD.prototype.isSupported;gD.prototype.destroy=gD.prototype.destroy;je("audio/ac3",function(){return new gD("audio/ac3")},se);function hD(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Aj(a.subarray(b+2));Cj(c,2);Cj(c,3);var d=Dj(c,11)+1<<1,e=Dj(c,2);if(3==e){e=Dj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Dj(c,2);var g=Dj(c,3),h=Dj(c,1);c=Dj(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,qa:a,da:d}};function iD(a){this.i=a;this.h=0;this.g=new Map}q=iD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOriginalMimeType=function(){return this.i};
1417
+ q.transmux=function(a,b,c,d){a=Ab(a);for(var e=qj(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=pj(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=hD(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.qa;k.push({data:a.subarray(f,f+l.da),
1418
+ size:l.da,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});f+=l.da}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,ab:[],qa:h,xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.h,baseMediaDecodeTime:a,Ya:k},stream:b};d=new yx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Ex(d),this.g.set(c,b));c=Vx(d);this.h++;b=Re(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Ec3Transmuxer",iD);iD.prototype.transmux=iD.prototype.transmux;
1419
+ iD.prototype.getOriginalMimeType=iD.prototype.getOriginalMimeType;iD.prototype.convertCodecs=iD.prototype.convertCodecs;iD.prototype.isSupported=iD.prototype.isSupported;iD.prototype.destroy=iD.prototype.destroy;je("audio/ec3",function(){return new iD("audio/ec3")},se);function jD(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 Aj(b.data),d=Pj(c);Pj(c);Pj(c);Fj(c);if(kD.includes(d)&&(d=W(c),3===d&&Cj(c,1),Fj(c),Fj(c),Cj(c,1),Oj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)Oj(c)&&(6>e?Qj(c,16):Qj(c,64))}Fj(c);d=W(c);if(0===d)W(c);else if(1===d)for(Cj(c,1),Fj(c),Fj(c),d=W(c),e=0;e<d;e++)Fj(c);Fj(c);Cj(c,1);var f=W(c),g=W(c),h=Dj(c,1);0===h&&Cj(c,1);Cj(c,1);var k=0,l=0,m=0,n=0;
1418
1420
  Oj(c)&&(k=W(c),l=W(c),m=W(c),n=W(c));e=d=1;if(Oj(c)&&Oj(c)){var p=Pj(c),r=[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<p&&16>=p?(d=r[p-1],e=u[p-1]):255===p&&(d=Dj(c,16),e=Dj(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],
1419
1421
  k[5],255,225].concat(k,[1],b));return{height:c,width:f,xa:a,Ba:d,Ca:e}}
1420
- function kD(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=Rj(new Aj(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?
1421
- {data:Re.apply(Le,x(c)),hd:b}:null}var jD=[100,110,122,244,44,83,86,118,128,138,139,134];function lD(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=mD(b.fullData);a=nD(c.fullData);var f=oD(d.fullData);b=pD(b.fullData,c.fullData,d.fullData,{zf:e.zf,Vf:e.Vf,cf:a.cf,df:a.df,Xe:a.Xe,bf:a.bf,Ye:a.Ye,Ze:a.Ze,$e:a.$e,af:a.af,Re:a.Re,Se:a.Se,Te:a.Te,Ue:a.Ue,Ve:a.Ve,We:a.We,Ke:a.Ke,Xd:a.Xd,Ie:a.Ie,He:a.He,Ge:a.Ge,Cf:f.Cf});return{height:a.height,width:a.width,
1422
- xa:b,Ba:a.Ni,Ca:a.Mi}}function mD(a){var b=new Aj(a,!0);Pj(b);Pj(b);Dj(b,4);Dj(b,2);Dj(b,6);a=Dj(b,3);b=Oj(b);return{zf:a+1,Vf:b}}
1423
- function nD(a){a=new Aj(a,!0);Pj(a);Pj(a);var b=0,c=0,d=0,e=0;Dj(a,4);var f=Dj(a,3);Oj(a);for(var g=Dj(a,2),h=Dj(a,1),k=Dj(a,5),l=Pj(a),m=Pj(a),n=Pj(a),p=Pj(a),r=Pj(a),u=Pj(a),v=Pj(a),w=Pj(a),y=Pj(a),z=Pj(a),D=Pj(a),A=[],B=[],C=0;C<f;C++)A.push(Oj(a)),B.push(Oj(a));if(0<f)for(C=f;8>C;C++)Dj(a,2);for(C=0;C<f;C++)A[C]&&Dj(a,88),B[C]&&Pj(a);W(a);A=W(a);3==A&&Dj(a,1);B=W(a);C=W(a);Oj(a)&&(b+=W(a),c+=W(a),d+=W(a),e+=W(a));var E=W(a),F=W(a),J=W(a);if(Oj(a))for(var K=0;K<=f;K++)W(a),W(a),W(a);else W(a),
1424
- W(a),W(a);W(a);W(a);W(a);W(a);W(a);W(a);if(Oj(a)&&Oj(a))for(K=0;4>K;K++)for(var L=0;L<(3===K?2:6);L++)if(Oj(a)){var I=Math.min(64,1<<4+(K<<1));1<K&&Nj(a);for(var N=0;N<I;N++)Nj(a)}else W(a);Oj(a);Oj(a);Oj(a)&&(Pj(a),W(a),W(a),Oj(a));K=W(a);for(I=L=0;I<K;I++)if(N=!1,0!==I&&(N=Oj(a)),N){I===K&&W(a);Oj(a);W(a);for(var M=N=0;M<=L;M++){var O=Oj(a),Q=!1;O||(Q=Oj(a));(O||Q)&&N++}L=N}else{M=W(a);N=W(a);L=M+N;for(O=0;O<M;O++)W(a),Oj(a);for(M=0;M<N;M++)W(a),Oj(a)}if(Oj(a))for(K=W(a),L=0;L<K;L++){for(I=0;I<
1422
+ function lD(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=Rj(new Aj(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?
1423
+ {data:Re.apply(Le,x(c)),hd:b}:null}var kD=[100,110,122,244,44,83,86,118,128,138,139,134];function mD(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=nD(b.fullData);a=oD(c.fullData);var f=pD(d.fullData);b=qD(b.fullData,c.fullData,d.fullData,{zf:e.zf,Vf:e.Vf,cf:a.cf,df:a.df,Xe:a.Xe,bf:a.bf,Ye:a.Ye,Ze:a.Ze,$e:a.$e,af:a.af,Re:a.Re,Se:a.Se,Te:a.Te,Ue:a.Ue,Ve:a.Ve,We:a.We,Ke:a.Ke,Xd:a.Xd,Ie:a.Ie,He:a.He,Ge:a.Ge,Cf:f.Cf});return{height:a.height,width:a.width,
1424
+ xa:b,Ba:a.Ni,Ca:a.Mi}}function nD(a){var b=new Aj(a,!0);Pj(b);Pj(b);Dj(b,4);Dj(b,2);Dj(b,6);a=Dj(b,3);b=Oj(b);return{zf:a+1,Vf:b}}
1425
+ function oD(a){a=new Aj(a,!0);Pj(a);Pj(a);var b=0,c=0,d=0,e=0;Dj(a,4);var f=Dj(a,3);Oj(a);for(var g=Dj(a,2),h=Dj(a,1),k=Dj(a,5),l=Pj(a),m=Pj(a),n=Pj(a),p=Pj(a),r=Pj(a),u=Pj(a),v=Pj(a),w=Pj(a),y=Pj(a),z=Pj(a),D=Pj(a),A=[],B=[],C=0;C<f;C++)A.push(Oj(a)),B.push(Oj(a));if(0<f)for(C=f;8>C;C++)Dj(a,2);for(C=0;C<f;C++)A[C]&&Dj(a,88),B[C]&&Pj(a);W(a);A=W(a);3==A&&Dj(a,1);B=W(a);C=W(a);Oj(a)&&(b+=W(a),c+=W(a),d+=W(a),e+=W(a));var E=W(a),F=W(a),J=W(a);if(Oj(a))for(var K=0;K<=f;K++)W(a),W(a),W(a);else W(a),
1426
+ W(a),W(a);W(a);W(a);W(a);W(a);W(a);W(a);if(Oj(a)&&Oj(a))for(K=0;4>K;K++)for(var L=0;L<(3===K?2:6);L++)if(Oj(a)){var I=Math.min(64,1<<4+(K<<1));1<K&&Gj(a);for(var N=0;N<I;N++)Gj(a)}else W(a);Oj(a);Oj(a);Oj(a)&&(Pj(a),W(a),W(a),Oj(a));K=W(a);for(I=L=0;I<K;I++)if(N=!1,0!==I&&(N=Oj(a)),N){I===K&&W(a);Oj(a);W(a);for(var M=N=0;M<=L;M++){var O=Oj(a),Q=!1;O||(Q=Oj(a));(O||Q)&&N++}L=N}else{M=W(a);N=W(a);L=M+N;for(O=0;O<M;O++)W(a),Oj(a);for(M=0;M<N;M++)W(a),Oj(a)}if(Oj(a))for(K=W(a),L=0;L<K;L++){for(I=0;I<
1425
1427
  J+4;I++)Dj(a,1);Dj(a,1)}K=J=1;L=0;Oj(a);Oj(a);if(Oj(a)){Oj(a)&&(I=Pj(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<I&&16>=I?(J=N[I-1],K=M[I-1]):255===I&&(J=Dj(a,16),K=Dj(a,16)));Oj(a)&&Oj(a);Oj(a)&&(Dj(a,3),Oj(a),Oj(a)&&(Pj(a),Pj(a),Pj(a)));Oj(a)&&(W(a),W(a));Oj(a);Oj(a);Oj(a);if(I=Oj(a))W(a),W(a),W(a),W(a);if(Oj(a)&&(Dj(a,32),Dj(a,32),Oj(a)&&W(a),Oj(a))){M=!1;I=Oj(a);N=Oj(a);if(I||N){if(M=Oj(a))Pj(a),Dj(a,5),Oj(a),Dj(a,5);Dj(a,4);Dj(a,4);M&&
1426
1428
  Dj(a,4);Dj(a,5);Dj(a,5);Dj(a,5)}for(O=0;O<=f;O++){var R=!0;Q=1;Oj(a)||(R=Oj(a));var U=!1;R?W(a):U=Oj(a);U||(Q=W(a)+1);if(I){for(R=0;R<Q;R++)W(a),W(a),M&&(W(a),W(a));Oj(a)}if(N){for(R=0;R<Q;R++)W(a),W(a),M&&(W(a),W(a));Oj(a)}}}Oj(a)&&(Oj(a),Oj(a),Oj(a),L=W(a),W(a),W(a),W(a),W(a))}return{Xe:D,cf:g,df:h,bf:k,Ye:l,Ze:m,$e:n,af:p,Re:r,Se:u,Te:v,Ue:w,Ve:y,We:z,Xd:L,Ke:0,Ie:A,He:E,Ge:F,width:B-(b+c)*(1===A||2===A?2:1),height:C-(d+e)*(1===A?2:1),Ni:J,Mi:K}}
1427
- function oD(a){var b=new Aj(a,!0);Pj(b);Pj(b);W(b);W(b);Oj(b);Oj(b);Dj(b,3);Oj(b);Oj(b);W(b);W(b);Nj(b);Oj(b);Oj(b);Oj(b)&&W(b);Nj(b);Nj(b);Oj(b);Oj(b);Oj(b);Oj(b);a=Oj(b);b=Oj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Cf:c}}
1428
- function pD(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.cf&3)<<6|(d.df?1:0)<<5|d.bf&31;e[2]=d.Ye;e[3]=d.Ze;e[4]=d.$e;e[5]=d.af;e[6]=d.Re;e[7]=d.Se;e[8]=d.Te;e[9]=d.Ue;e[10]=d.Ve;e[11]=d.We;e[12]=d.Xe;e[13]=240|(d.Xd&3840)>>8;e[14]=d.Xd&255;e[15]=252|d.Cf&3;e[16]=252|d.Ie&3;e[17]=248|d.He&7;e[18]=248|d.Ge&7;e[19]=0;e[20]=0;e[21]=(d.Ke&3)<<6|(d.zf&7)<<3|(d.Vf?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&
1429
- 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 qD(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*rD[14*(3===c?3-d:3===d?3:4)+e-1];f=sD[3*(3===c?0:2===c?1:2)+f];c=tD[c][d];var h=uD[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,da:k,Li:8*c*h}}return null}
1430
- function vD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function wD(a,b){if(b+1<a.length&&vD(a,b)){var c=qD(a,b),d=4;c&&c.da&&(d=c.da);b+=d;return b===a.length||b+1<a.length&&vD(a,b)}return!1}
1431
- var rD=[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],sD=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],tD=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],uD=[0,1,1,4];function xD(a){this.i=a;this.h=0;this.g=new Map}q=xD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.i};
1432
- q.transmux=function(a,b,c,d){for(var e=Ab(a),f=qj(e).length;f<e.length&&!wD(e,f);f++);var g;for(a=[];f<e.length;){var h=qD(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));g||(g=h);f+h.da<=e.length&&a.push({data:e.subarray(f,f+h.da),size:h.da,duration:1152,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});f+=h.da}if(!g)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));e=9E4*g.Li/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
1433
- duration:d,ab:[],qa:new Uint8Array([]),xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.h,baseMediaDecodeTime:e,Ya:a},stream:b};d=new yx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Ex(d),this.g.set(c,b));c=Vx(d);this.h++;b=Re(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",xD);xD.prototype.transmux=xD.prototype.transmux;xD.prototype.getOriginalMimeType=xD.prototype.getOriginalMimeType;xD.prototype.convertCodecs=xD.prototype.convertCodecs;xD.prototype.isSupported=xD.prototype.isSupported;
1434
- xD.prototype.destroy=xD.prototype.destroy;je("audio/mpeg",function(){return new xD("audio/mpeg")},se);function yD(a){this.h=a;this.g=null}q=yD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=of(a).split(","),c=We("audio",b);b=We("video",b);return!c||b||"mp3"!=kf(c)?!1:nb(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
1435
- q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new Sj;a=Ab(a);a=this.g.parse(a);if("mp3"!=a.$c().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=new Uint8Array([]);e=t(a.Ub());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=qD(a,b))?(b+d.da<=a.length&&(c=Re(c,a.subarray(b,b+d.da))),b+=d.da):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",yD);yD.prototype.transmux=yD.prototype.transmux;
1436
- yD.prototype.getOriginalMimeType=yD.prototype.getOriginalMimeType;yD.prototype.convertCodecs=yD.prototype.convertCodecs;yD.prototype.isSupported=yD.prototype.isSupported;yD.prototype.destroy=yD.prototype.destroy;je("video/mp2t",function(){return new yD("video/mp2t")},re);/*
1429
+ function pD(a){var b=new Aj(a,!0);Pj(b);Pj(b);W(b);W(b);Oj(b);Oj(b);Dj(b,3);Oj(b);Oj(b);W(b);W(b);Gj(b);Oj(b);Oj(b);Oj(b)&&W(b);Gj(b);Gj(b);Oj(b);Oj(b);Oj(b);Oj(b);a=Oj(b);b=Oj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Cf:c}}
1430
+ function qD(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.cf&3)<<6|(d.df?1:0)<<5|d.bf&31;e[2]=d.Ye;e[3]=d.Ze;e[4]=d.$e;e[5]=d.af;e[6]=d.Re;e[7]=d.Se;e[8]=d.Te;e[9]=d.Ue;e[10]=d.Ve;e[11]=d.We;e[12]=d.Xe;e[13]=240|(d.Xd&3840)>>8;e[14]=d.Xd&255;e[15]=252|d.Cf&3;e[16]=252|d.Ie&3;e[17]=248|d.He&7;e[18]=248|d.Ge&7;e[19]=0;e[20]=0;e[21]=(d.Ke&3)<<6|(d.zf&7)<<3|(d.Vf?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&
1431
+ 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 rD(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*sD[14*(3===c?3-d:3===d?3:4)+e-1];f=tD[3*(3===c?0:2===c?1:2)+f];c=uD[c][d];var h=vD[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,da:k,Li:8*c*h}}return null}
1432
+ function wD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function xD(a,b){if(b+1<a.length&&wD(a,b)){var c=rD(a,b),d=4;c&&c.da&&(d=c.da);b+=d;return b===a.length||b+1<a.length&&wD(a,b)}return!1}
1433
+ var sD=[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],tD=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],uD=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],vD=[0,1,1,4];function yD(a){this.i=a;this.h=0;this.g=new Map}q=yD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?nb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.i};
1434
+ q.transmux=function(a,b,c,d){for(var e=Ab(a),f=qj(e).length;f<e.length&&!xD(e,f);f++);var g;for(a=[];f<e.length;){var h=rD(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));g||(g=h);f+h.da<=e.length&&a.push({data:e.subarray(f,f+h.da),size:h.da,duration:1152,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});f+=h.da}if(!g)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));e=9E4*g.Li/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
1435
+ duration:d,ab:[],qa:new Uint8Array([]),xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.h,baseMediaDecodeTime:e,Ya:a},stream:b};d=new yx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Ex(d),this.g.set(c,b));c=Vx(d);this.h++;b=Re(b,c);return Promise.resolve(b)};S("shaka.transmuxer.Mp3Transmuxer",yD);yD.prototype.transmux=yD.prototype.transmux;yD.prototype.getOriginalMimeType=yD.prototype.getOriginalMimeType;yD.prototype.convertCodecs=yD.prototype.convertCodecs;yD.prototype.isSupported=yD.prototype.isSupported;
1436
+ yD.prototype.destroy=yD.prototype.destroy;je("audio/mpeg",function(){return new yD("audio/mpeg")},se);function zD(a){this.h=a;this.g=null}q=zD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=of(a).split(","),c=We("audio",b);b=We("video",b);return!c||b||"mp3"!=kf(c)?!1:nb(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
1437
+ q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new Sj;a=Ab(a);a=this.g.parse(a);if("mp3"!=a.$c().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));c=new Uint8Array([]);e=t(a.Ub());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=rD(a,b))?(b+d.da<=a.length&&(c=Re(c,a.subarray(b,b+d.da))),b+=d.da):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",zD);zD.prototype.transmux=zD.prototype.transmux;
1438
+ zD.prototype.getOriginalMimeType=zD.prototype.getOriginalMimeType;zD.prototype.convertCodecs=zD.prototype.convertCodecs;zD.prototype.isSupported=zD.prototype.isSupported;zD.prototype.destroy=zD.prototype.destroy;je("video/mp2t",function(){return new zD("video/mp2t")},re);/*
1437
1439
  @license
1438
1440
  MSS Transmuxer
1439
1441
  Copyright 2015 Dash Industry Forum
1440
1442
  SPDX-License-Identifier: BSD-3-Clause
1441
1443
  */
1442
- function zD(a){this.h=a;(this.g=Cv.get("ISOBoxer")())&&AD(this)}
1443
- function AD(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",
1444
+ function AD(a){this.h=a;(this.g=Cv.get("ISOBoxer")())&&BD(this)}
1445
+ function BD(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",
1444
1446
  "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",
1445
- "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]!==BD[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=zD.prototype;q.destroy=function(){};
1447
+ "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]!==CD[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=AD.prototype;q.destroy=function(){};
1446
1448
  q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return nb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return nb(b)||nb(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOriginalMimeType=function(){return this.h};
1447
1449
  q.transmux=function(a,b,c){if(!c)return Promise.resolve(Ab(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");
1448
1450
  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 p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
1449
- 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]=CD(u,"traf")+CD(h,"senc")+16);var w=Ab(e.write());return Promise.resolve(w)}catch(y){return y instanceof T?Promise.reject(y):Promise.reject(new T(2,3,3022,c?c.M()[0]:null))}};function CD(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",zD);zD.prototype.transmux=zD.prototype.transmux;
1450
- zD.prototype.getOriginalMimeType=zD.prototype.getOriginalMimeType;zD.prototype.convertCodecs=zD.prototype.convertCodecs;zD.prototype.isSupported=zD.prototype.isSupported;zD.prototype.destroy=zD.prototype.destroy;var BD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);je("mss/audio/mp4",function(){return new zD("mss/audio/mp4")},se);je("mss/video/mp4",function(){return new zD("mss/video/mp4")},se);function DD(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=DD.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
1451
- q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=of(c).split(",");c=We("audio",d);d=We("video",d);if(c&&(c=kf(c),!ED.includes(c))||d&&(c=kf(d),!FD.includes(c)))return!1;if(b)return nb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return nb(b)||nb(a)};
1451
+ 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]=DD(u,"traf")+DD(h,"senc")+16);var w=Ab(e.write());return Promise.resolve(w)}catch(y){return y instanceof T?Promise.reject(y):Promise.reject(new T(2,3,3022,c?c.M()[0]:null))}};function DD(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",AD);AD.prototype.transmux=AD.prototype.transmux;
1452
+ AD.prototype.getOriginalMimeType=AD.prototype.getOriginalMimeType;AD.prototype.convertCodecs=AD.prototype.convertCodecs;AD.prototype.isSupported=AD.prototype.isSupported;AD.prototype.destroy=AD.prototype.destroy;var CD=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);je("mss/audio/mp4",function(){return new AD("mss/audio/mp4")},se);je("mss/video/mp4",function(){return new AD("mss/video/mp4")},se);function ED(a){this.l=a;this.g=0;this.i=new Map;this.h=this.j=null}q=ED.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
1453
+ q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=of(c).split(",");c=We("audio",d);d=We("video",d);if(c&&(c=kf(c),!FD.includes(c))||d&&(c=kf(d),!GD.includes(c)))return!1;if(b)return nb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return nb(b)||nb(a)};
1452
1454
  q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=of(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return cg(c,"audio/mp4")}).map(bg).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.l};
1453
- q.transmux=function(a,b,c,d,e){var f=Ab(a);if("audio"==e&&!ak(f)){for(var g=qj(f),h=g.length;h<f.length;h++)if(wD(f,h))return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));for(h=g.length;h<f.length;h++)if(aD(f,h))return this.h||(this.h=new cD("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 Sj;var k=this.j.parse(f),l=[],m=k.$c();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],v=k.nc();
1454
- if(!v.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var w=0;w<v.length;w++){var y=v[w],z=y.nalus;u.push.apply(u,x(z));var D=kD(z);if(D){null==r&&(r=y.dts);var A=void 0;A=w+1<v.length?(v[w+1].dts||0)-(y.dts||0):1<v.length?(y.dts||0)-(v[w-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:D.data,size:D.data.byteLength,duration:A,eb:Math.round((y.pts||0)-(y.dts||0)),flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:D.hd?2:1,ib:D.hd?0:1}})}}var B=iD(u);if(!B||null==r)throw new T(2,3,3018,c?c.M()[0]:null);b.height=B.height;
1455
+ q.transmux=function(a,b,c,d,e){var f=Ab(a);if("audio"==e&&!ak(f)){for(var g=qj(f),h=g.length;h<f.length;h++)if(xD(f,h))return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));for(h=g.length;h<f.length;h++)if(bD(f,h))return this.h||(this.h=new dD("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 Sj;var k=this.j.parse(f),l=[],m=k.$c();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=[],v=k.nc();
1456
+ if(!v.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var w=0;w<v.length;w++){var y=v[w],z=y.nalus;u.push.apply(u,x(z));var D=lD(z);if(D){null==r&&(r=y.dts);var A=void 0;A=w+1<v.length?(v[w+1].dts||0)-(y.dts||0):1<v.length?(y.dts||0)-(v[w-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:D.data,size:D.data.byteLength,duration:A,eb:Math.round((y.pts||0)-(y.dts||0)),flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:D.hd?2:1,ib:D.hd?0:1}})}}var B=jD(u);if(!B||null==r)throw new T(2,3,3018,c?c.M()[0]:null);b.height=B.height;
1455
1457
  b.width=B.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ab:[],qa:new Uint8Array([]),xa:B.xa,Ba:B.Ba,Ca:B.Ca,data:{sb:this.g,baseMediaDecodeTime:r,Ya:p},stream:b};break;case "hvc":var C=[],E=null,F=[],J=k.nc();if(!J.length)throw new T(2,3,3023,c?c.M()[0]:null);for(var K=0;K<J.length;K++){var L=J[K],I=L.nalus;F.push.apply(F,x(I));for(var N=!1,M=[],O=!1,Q=t(I),R=Q.next();!R.done;R=Q.next()){var U=R.value;switch(U.type){case 1:case 0:var aa=
1456
1458
  O=!0;break;case 19:case 20:case 21:N=aa=O=!0;break;case 32:aa=!0;break;case 33:aa=!0;break;case 34:aa=!0;break;case 35:O=aa=!0;break;case 39:case 40:aa=!0;break;default:aa=!1}if(O&&aa){var la=U.fullData.byteLength,na=new Uint8Array(4);na[0]=la>>24&255;na[1]=la>>16&255;na[2]=la>>8&255;na[3]=la&255;M.push(na);M.push(U.fullData)}}var Ia=M.length?{data:Re.apply(Le,x(M)),hd:N}:null;if(Ia){null==E&&null!=L.dts&&(E=L.dts);var Aa=void 0;Aa=K+1<J.length?(J[K+1].dts||0)-(L.dts||0):1<J.length?(L.dts||0)-(J[K-
1457
- 1].dts||0):9E4*(c.endTime-c.startTime);C.push({data:Ia.data,size:Ia.data.byteLength,duration:Aa,eb:Math.round((L.pts||0)-(L.dts||0)),flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:Ia.hd?2:1,ib:Ia.hd?0:1}})}}var ab=lD(F);if(!ab||null==E)throw new T(2,3,3018,c?c.M()[0]:null);b.height=ab.height;b.width=ab.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ab:[],qa:new Uint8Array([]),xa:ab.xa,Ba:ab.Ba,Ca:ab.Ca,data:{sb:this.g,baseMediaDecodeTime:E,Ya:C},stream:b}}n&&
1458
- (l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Va=[],xa,wa=null,Dc=t(k.Ub()),eb=Dc.next();!eb.done;eb=Dc.next()){var Tb=eb.value,Ec=Tb.data;if(Ec){var lb=0;xa=$C(Ec,lb);if(!xa)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=xa.sampleRate;b.channelsCount=xa.channelCount;null==wa&&null!==Tb.pts&&(wa=Tb.pts);for(;lb<Ec.length;){var wd=ZC(Ec,lb);if(wd){var oe=wd.Nd+wd.da;lb+oe<=Ec.length&&Va.push({data:Ec.subarray(lb+wd.Nd,lb+oe),size:wd.da,duration:1024,eb:0,flags:{hb:0,
1459
- Xa:0,Wa:0,Ua:0,Va:2,ib:0}});lb+=oe}else lb++}}}if(!xa||null==wa){if(!k.nc().length)throw new T(2,3,3018,c?c.M()[0]:null);wa=9E4*c.startTime;var pe=We("audio",b.codecs.split(","));if(!pe||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);xa={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:pe};var Md=bD(pe,b.channelsCount);if(!Md)throw new T(2,3,3018,c?c.M()[0]:null);for(var Yi=wa+9E4*(c.endTime-c.startTime),Nd=wa;Nd<Yi;)Va.push({data:Md,size:Md.byteLength,
1460
- duration:1024,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),Nd+=1024/xa.sampleRate*9E4}var Zi=xa.sampleRate,$i=wa/9E4*Zi;n={id:b.id,type:"audio",codecs:xa.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Zi,duration:d,ab:[],qa:new Uint8Array([]),xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:$i,Ya:Va},stream:b};break;case "ac3":for(var Qg=[],qe=0,oc=new Uint8Array([]),Gj=null,$u=t(k.Ub()),gn=$u.next();!gn.done;gn=$u.next()){var hn=gn.value,jn=hn.data;null==Gj&&null!==
1461
- hn.pts&&(Gj=hn.pts);for(var Df=0;Df<jn.length;){var Qd=dD(jn,Df);Qd?(b.audioSamplingRate=Qd.sampleRate,b.channelsCount=Qd.channelCount,qe=Qd.sampleRate,oc=Qd.qa,Qg.push({data:jn.subarray(Df,Df+Qd.da),size:Qd.da,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),Df+=Qd.da):Df++}}if(0==qe||0==oc.byteLength||null==Gj)throw new T(2,3,3018,c?c.M()[0]:null);var VD=Gj/9E4*qe;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:qe,duration:d,ab:[],qa:oc,xa:new Uint8Array([]),
1462
- Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:VD,Ya:Qg},stream:b};break;case "ec3":for(var av=[],Hj=0,kn=new Uint8Array([]),Ij=null,bv=t(k.Ub()),ln=bv.next();!ln.done;ln=bv.next()){var mn=ln.value,nn=mn.data;null==Ij&&null!==mn.pts&&(Ij=mn.pts);for(var Ef=0;Ef<nn.length;){var Rd=gD(nn,Ef);Rd?(b.audioSamplingRate=Rd.sampleRate,b.channelsCount=Rd.channelCount,Hj=Rd.sampleRate,kn=Rd.qa,av.push({data:nn.subarray(Ef,Ef+Rd.da),size:Rd.da,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),Ef+=Rd.da):
1463
- Ef++}}if(0==Hj||0==kn.byteLength||null==Ij)throw new T(2,3,3018,c?c.M()[0]:null);var WD=Ij/9E4*Hj;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Hj,duration:d,ab:[],qa:kn,xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:WD,Ya:av},stream:b};break;case "mp3":for(var cv=[],Jj,Kj=null,dv=t(k.Ub()),on=dv.next();!on.done;on=dv.next()){var pn=on.value,ch=pn.data;if(ch){null==Kj&&null!==pn.pts&&(Kj=pn.pts);for(var te=0;te<ch.length;){var Ff=qD(ch,
1464
- te);Ff?(Jj||(Jj=Ff),te+Ff.da<=ch.length&&cv.push({data:ch.subarray(te,te+Ff.da),size:Ff.da,duration:1152,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),te+=Ff.da):te++}}}if(!Jj||null==Kj)throw new T(2,3,3018,c?c.M()[0]:null);var ev=Jj.sampleRate,XD=Kj/9E4*ev;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:ev,duration:d,ab:[],qa:new Uint8Array([]),xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:XD,Ya:cv},stream:b};break;case "opus":var fv=
1465
- [],Lj=null,Yc=k.F;if(!Yc)throw new T(2,3,3018,c?c.M()[0]:null);var Cb=[];switch(Yc.yh){case 1:case 2:Cb=[0];break;case 0:Cb=[255,1,1,0,1];break;case 128:Cb=[255,2,0,0,1];break;case 3:Cb=[1,2,1,0,2,1];break;case 4:Cb=[1,2,2,0,1,2,3];break;case 5:Cb=[1,3,2,0,4,1,2,3];break;case 6:Cb=[1,4,2,0,4,1,2,3,5];break;case 7:Cb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Cb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Cb=[1,1,2,0,1];break;case 131:Cb=[1,1,3,0,1,2];break;case 132:Cb=[1,1,4,0,1,2,3];break;case 133:Cb=[1,1,5,
1466
- 0,1,2,3,4];break;case 134:Cb=[1,1,6,0,1,2,3,4,5];break;case 135:Cb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Cb=[1,1,8,0,1,2,3,4,5,6,7]}var gv=new Uint8Array([0,Yc.channelCount,0,0,Yc.sampleRate>>>24&255,Yc.sampleRate>>>17&255,Yc.sampleRate>>>8&255,Yc.sampleRate>>>0&255,0,0].concat(x(Cb)));for(var hv=Yc.sampleRate,iv=t(k.Ub()),qn=iv.next();!qn.done;qn=iv.next()){var rn=qn.value,Gf=rn.data;null==Lj&&null!==rn.pts&&(Lj=rn.pts);for(var dh=0;dh<Gf.length;){for(var YD=0!==(Gf[dh+1]&16),ZD=0!==(Gf[dh+1]&8),
1467
- yd=dh+2,Mj=0;255===Gf[yd];)Mj+=255,yd+=1;Mj+=Gf[yd];yd+=1;yd+=YD?2:0;yd+=ZD?2:0;var jv=Gf.slice(yd,yd+Mj);fv.push({data:jv,size:jv.byteLength,duration:960,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});dh=yd+Mj}}if(0==gv.byteLength||null==Lj)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Yc.sampleRate;b.channelsCount=Yc.channelCount;var $D=Lj/9E4*hv;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:hv,duration:d,ab:[],qa:gv,xa:new Uint8Array([]),Ba:0,
1468
- Ca:0,data:{sb:this.g,baseMediaDecodeTime:$D,Ya:fv},stream:b}}n&&(l.push(n),n=null)}}catch(sn){return sn&&3023==sn.code?Promise.resolve(new Uint8Array([])):Promise.reject(sn)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var kv=new yx(l),tn=b.id+"_"+c.i;if(this.i.has(tn))var un=this.i.get(tn);else un=Ex(kv),this.i.set(tn,un);var aE=Vx(kv);this.g++;var bE=Re(un,aE);return Promise.resolve(bE)};S("shaka.transmuxer.TsTransmuxer",DD);DD.prototype.transmux=DD.prototype.transmux;
1469
- DD.prototype.getOriginalMimeType=DD.prototype.getOriginalMimeType;DD.prototype.convertCodecs=DD.prototype.convertCodecs;DD.prototype.isSupported=DD.prototype.isSupported;DD.prototype.destroy=DD.prototype.destroy;var ED=["aac","ac-3","ec-3","mp3","opus"],FD=["avc","hevc"];je("video/mp2t",function(){return new DD("video/mp2t")},ne);/*
1459
+ 1].dts||0):9E4*(c.endTime-c.startTime);C.push({data:Ia.data,size:Ia.data.byteLength,duration:Aa,eb:Math.round((L.pts||0)-(L.dts||0)),flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:Ia.hd?2:1,ib:Ia.hd?0:1}})}}var ab=mD(F);if(!ab||null==E)throw new T(2,3,3018,c?c.M()[0]:null);b.height=ab.height;b.width=ab.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,ab:[],qa:new Uint8Array([]),xa:ab.xa,Ba:ab.Ba,Ca:ab.Ca,data:{sb:this.g,baseMediaDecodeTime:E,Ya:C},stream:b}}n&&
1460
+ (l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var Va=[],xa,wa=null,Dc=t(k.Ub()),eb=Dc.next();!eb.done;eb=Dc.next()){var Tb=eb.value,Ec=Tb.data;if(Ec){var lb=0;xa=aD(Ec,lb);if(!xa)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=xa.sampleRate;b.channelsCount=xa.channelCount;null==wa&&null!==Tb.pts&&(wa=Tb.pts);for(;lb<Ec.length;){var wd=$C(Ec,lb);if(wd){var oe=wd.Nd+wd.da;lb+oe<=Ec.length&&Va.push({data:Ec.subarray(lb+wd.Nd,lb+oe),size:wd.da,duration:1024,eb:0,flags:{hb:0,
1461
+ Xa:0,Wa:0,Ua:0,Va:2,ib:0}});lb+=oe}else lb++}}}if(!xa||null==wa){if(!k.nc().length)throw new T(2,3,3018,c?c.M()[0]:null);wa=9E4*c.startTime;var pe=We("audio",b.codecs.split(","));if(!pe||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.M()[0]:null);xa={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:pe};var Md=cD(pe,b.channelsCount);if(!Md)throw new T(2,3,3018,c?c.M()[0]:null);for(var Zi=wa+9E4*(c.endTime-c.startTime),Nd=wa;Nd<Zi;)Va.push({data:Md,size:Md.byteLength,
1462
+ duration:1024,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),Nd+=1024/xa.sampleRate*9E4}var $i=xa.sampleRate,aj=wa/9E4*$i;n={id:b.id,type:"audio",codecs:xa.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:$i,duration:d,ab:[],qa:new Uint8Array([]),xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:aj,Ya:Va},stream:b};break;case "ac3":for(var Qg=[],qe=0,oc=new Uint8Array([]),Hj=null,av=t(k.Ub()),jn=av.next();!jn.done;jn=av.next()){var kn=jn.value,ln=kn.data;null==Hj&&null!==
1463
+ kn.pts&&(Hj=kn.pts);for(var Df=0;Df<ln.length;){var Qd=eD(ln,Df);Qd?(b.audioSamplingRate=Qd.sampleRate,b.channelsCount=Qd.channelCount,qe=Qd.sampleRate,oc=Qd.qa,Qg.push({data:ln.subarray(Df,Df+Qd.da),size:Qd.da,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),Df+=Qd.da):Df++}}if(0==qe||0==oc.byteLength||null==Hj)throw new T(2,3,3018,c?c.M()[0]:null);var WD=Hj/9E4*qe;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:qe,duration:d,ab:[],qa:oc,xa:new Uint8Array([]),
1464
+ Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:WD,Ya:Qg},stream:b};break;case "ec3":for(var bv=[],Ij=0,mn=new Uint8Array([]),Jj=null,cv=t(k.Ub()),nn=cv.next();!nn.done;nn=cv.next()){var on=nn.value,pn=on.data;null==Jj&&null!==on.pts&&(Jj=on.pts);for(var Ef=0;Ef<pn.length;){var Rd=hD(pn,Ef);Rd?(b.audioSamplingRate=Rd.sampleRate,b.channelsCount=Rd.channelCount,Ij=Rd.sampleRate,mn=Rd.qa,bv.push({data:pn.subarray(Ef,Ef+Rd.da),size:Rd.da,duration:1536,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),Ef+=Rd.da):
1465
+ Ef++}}if(0==Ij||0==mn.byteLength||null==Jj)throw new T(2,3,3018,c?c.M()[0]:null);var XD=Jj/9E4*Ij;n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ij,duration:d,ab:[],qa:mn,xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:XD,Ya:bv},stream:b};break;case "mp3":for(var dv=[],Kj,Lj=null,ev=t(k.Ub()),qn=ev.next();!qn.done;qn=ev.next()){var rn=qn.value,ch=rn.data;if(ch){null==Lj&&null!==rn.pts&&(Lj=rn.pts);for(var te=0;te<ch.length;){var Ff=rD(ch,
1466
+ te);Ff?(Kj||(Kj=Ff),te+Ff.da<=ch.length&&dv.push({data:ch.subarray(te,te+Ff.da),size:Ff.da,duration:1152,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}}),te+=Ff.da):te++}}}if(!Kj||null==Lj)throw new T(2,3,3018,c?c.M()[0]:null);var fv=Kj.sampleRate,YD=Lj/9E4*fv;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:fv,duration:d,ab:[],qa:new Uint8Array([]),xa:new Uint8Array([]),Ba:0,Ca:0,data:{sb:this.g,baseMediaDecodeTime:YD,Ya:dv},stream:b};break;case "opus":var gv=
1467
+ [],Mj=null,Yc=k.F;if(!Yc)throw new T(2,3,3018,c?c.M()[0]:null);var Cb=[];switch(Yc.yh){case 1:case 2:Cb=[0];break;case 0:Cb=[255,1,1,0,1];break;case 128:Cb=[255,2,0,0,1];break;case 3:Cb=[1,2,1,0,2,1];break;case 4:Cb=[1,2,2,0,1,2,3];break;case 5:Cb=[1,3,2,0,4,1,2,3];break;case 6:Cb=[1,4,2,0,4,1,2,3,5];break;case 7:Cb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Cb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Cb=[1,1,2,0,1];break;case 131:Cb=[1,1,3,0,1,2];break;case 132:Cb=[1,1,4,0,1,2,3];break;case 133:Cb=[1,1,5,
1468
+ 0,1,2,3,4];break;case 134:Cb=[1,1,6,0,1,2,3,4,5];break;case 135:Cb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Cb=[1,1,8,0,1,2,3,4,5,6,7]}var hv=new Uint8Array([0,Yc.channelCount,0,0,Yc.sampleRate>>>24&255,Yc.sampleRate>>>17&255,Yc.sampleRate>>>8&255,Yc.sampleRate>>>0&255,0,0].concat(x(Cb)));for(var iv=Yc.sampleRate,jv=t(k.Ub()),sn=jv.next();!sn.done;sn=jv.next()){var tn=sn.value,Gf=tn.data;null==Mj&&null!==tn.pts&&(Mj=tn.pts);for(var dh=0;dh<Gf.length;){for(var ZD=0!==(Gf[dh+1]&16),$D=0!==(Gf[dh+1]&8),
1469
+ yd=dh+2,Nj=0;255===Gf[yd];)Nj+=255,yd+=1;Nj+=Gf[yd];yd+=1;yd+=ZD?2:0;yd+=$D?2:0;var kv=Gf.slice(yd,yd+Nj);gv.push({data:kv,size:kv.byteLength,duration:960,eb:0,flags:{hb:0,Xa:0,Wa:0,Ua:0,Va:2,ib:0}});dh=yd+Nj}}if(0==hv.byteLength||null==Mj)throw new T(2,3,3018,c?c.M()[0]:null);b.audioSamplingRate=Yc.sampleRate;b.channelsCount=Yc.channelCount;var aE=Mj/9E4*iv;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:iv,duration:d,ab:[],qa:hv,xa:new Uint8Array([]),Ba:0,
1470
+ Ca:0,data:{sb:this.g,baseMediaDecodeTime:aE,Ya:gv},stream:b}}n&&(l.push(n),n=null)}}catch(un){return un&&3023==un.code?Promise.resolve(new Uint8Array([])):Promise.reject(un)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.M()[0]:null));var lv=new yx(l),vn=b.id+"_"+c.i;if(this.i.has(vn))var wn=this.i.get(vn);else wn=Ex(lv),this.i.set(vn,wn);var bE=Vx(lv);this.g++;var cE=Re(wn,bE);return Promise.resolve(cE)};S("shaka.transmuxer.TsTransmuxer",ED);ED.prototype.transmux=ED.prototype.transmux;
1471
+ ED.prototype.getOriginalMimeType=ED.prototype.getOriginalMimeType;ED.prototype.convertCodecs=ED.prototype.convertCodecs;ED.prototype.isSupported=ED.prototype.isSupported;ED.prototype.destroy=ED.prototype.destroy;var FD=["aac","ac-3","ec-3","mp3","opus"],GD=["avc","hevc"];je("video/mp2t",function(){return new ED("video/mp2t")},ne);/*
1470
1472
  @license
1471
1473
  EME Encryption Scheme Polyfill
1472
1474
  Copyright 2019 Google LLC
1473
1475
  SPDX-License-Identifier: Apache-2.0
1474
1476
  */
1475
- function GD(){}var HD;
1476
- function ID(){HD||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(HD=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=JD,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1477
- function JD(a,b){var c=this,d;return P(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),G(e,HD.call(c,a,b),2);d=e.h;if(KD(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=HD,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=LD;return e.return(LD.call(c,
1477
+ function HD(){}var ID;
1478
+ function JD(){ID||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(ID=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=KD,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1479
+ function KD(a,b){var c=this,d;return P(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),G(e,ID.call(c,a,b),2);d=e.h;if(LD(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=ID,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=MD;return e.return(MD.call(c,
1478
1480
  a,b))})}
1479
- function LD(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u;return P(function(v){if(1==v.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=MD(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=ND(h.videoCapabilities,d),l=ND(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."),
1480
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return G(v,HD.call(c,a,e),2)}p=v.h;u=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new OD(p,r,u))})}function ND(a,b){return a?a.filter(function(c){return PD(c.encryptionScheme,b)}):a}S("EmeEncryptionSchemePolyfill",GD);GD.install=ID;function QD(){}var RD;
1481
- function SD(){RD||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(RD=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=TD,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1482
- function TD(a){var b=this,c,d;return P(function(e){switch(e.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),G(e,RD.call(b,a),2);case 2:c=e.h;if(!a.keySystemConfiguration)return e.return(c);if((d=c.keySystemAccess)&&KD(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=RD,e.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1483
- navigator.mediaCapabilities.decodingInfo=UD;if(d){e.u(3);break}return G(e,cE(a),4);case 4:return c.keySystemAccess=e.h,e.return(c);case 3:return e.return(UD.call(b,a))}})}
1484
- function UD(a){var b=this,c,d,e,f,g,h,k;return P(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=MD(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},PD(d,g)&&PD(c,g))?G(l,RD.call(b,a),2):l.return(h);case 2:k=l.h;if(k.keySystemAccess){k.keySystemAccess=
1485
- new OD(k.keySystemAccess,c,d);l.u(3);break}if(!a.keySystemConfiguration){l.u(3);break}return G(l,cE(a),5);case 5:k.keySystemAccess=l.h;case 3:return l.return(k)}})}
1486
- function cE(a){var b,c;return P(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};
1487
- f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return G(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}S("McEncryptionSchemePolyfill",QD);QD.install=SD;function OD(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
1488
- OD.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};OD.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
1489
- function MD(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 KD(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}
1490
- function PD(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(dE||eE)return!0;return!1}function fE(){}function qA(){ID();SD()}S("EncryptionSchemePolyfills",fE);fE.install=qA;var eE=navigator.userAgent.includes("CrKey"),dE=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10);"undefined"!==typeof module&&module.exports&&(module.exports=fE);}).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})();
1481
+ function MD(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u;return P(function(v){if(1==v.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=ND(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=OD(h.videoCapabilities,d),l=OD(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."),
1482
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return G(v,ID.call(c,a,e),2)}p=v.h;u=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new PD(p,r,u))})}function OD(a,b){return a?a.filter(function(c){return QD(c.encryptionScheme,b)}):a}S("EmeEncryptionSchemePolyfill",HD);HD.install=JD;function RD(){}var SD;
1483
+ function TD(){SD||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(SD=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=UD,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1484
+ function UD(a){var b=this,c,d;return P(function(e){switch(e.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),G(e,SD.call(b,a),2);case 2:c=e.h;if(!a.keySystemConfiguration)return e.return(c);if((d=c.keySystemAccess)&&LD(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=SD,e.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1485
+ navigator.mediaCapabilities.decodingInfo=VD;if(d){e.u(3);break}return G(e,dE(a),4);case 4:return c.keySystemAccess=e.h,e.return(c);case 3:return e.return(VD.call(b,a))}})}
1486
+ function VD(a){var b=this,c,d,e,f,g,h,k;return P(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=ND(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},QD(d,g)&&QD(c,g))?G(l,SD.call(b,a),2):l.return(h);case 2:k=l.h;if(k.keySystemAccess){k.keySystemAccess=
1487
+ new PD(k.keySystemAccess,c,d);l.u(3);break}if(!a.keySystemConfiguration){l.u(3);break}return G(l,dE(a),5);case 5:k.keySystemAccess=l.h;case 3:return l.return(k)}})}
1488
+ function dE(a){var b,c;return P(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};
1489
+ f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return G(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}S("McEncryptionSchemePolyfill",RD);RD.install=TD;function PD(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
1490
+ PD.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};PD.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
1491
+ function ND(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 LD(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}
1492
+ function QD(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(eE||fE)return!0;return!1}function gE(){}function qA(){JD();TD()}S("EncryptionSchemePolyfills",gE);gE.install=qA;var fE=navigator.userAgent.includes("CrKey"),eE=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10);"undefined"!==typeof module&&module.exports&&(module.exports=gE);}).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})();
1491
1493
 
1492
1494
  //# sourceMappingURL=shaka-player.compiled.map