shaka-player 3.2.19 → 3.2.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/.github/workflows/build-and-test.yaml +4 -4
  2. package/.github/workflows/demo-version-index.yaml +6 -0
  3. package/.github/workflows/selenium-lab-tests.yaml +55 -16
  4. package/.github/workflows/update-screenshots.yaml +142 -0
  5. package/CHANGELOG.md +22 -0
  6. package/demo/common/asset.js +15 -0
  7. package/demo/common/assets.js +4 -2
  8. package/demo/common/message_ids.js +1 -0
  9. package/demo/custom.js +19 -0
  10. package/demo/locales/en.json +1 -0
  11. package/demo/locales/source.json +4 -0
  12. package/demo/main.js +14 -0
  13. package/dist/demo.compiled.debug.js +150 -148
  14. package/dist/demo.compiled.debug.map +3 -3
  15. package/dist/demo.compiled.js +150 -148
  16. package/dist/demo.compiled.map +3 -3
  17. package/dist/deps.js +1 -1
  18. package/dist/locales.js +28 -28
  19. package/dist/receiver.compiled.debug.js +19 -19
  20. package/dist/receiver.compiled.debug.map +2 -2
  21. package/dist/receiver.compiled.js +19 -19
  22. package/dist/receiver.compiled.map +2 -2
  23. package/dist/shaka-player.compiled.d.ts +7 -0
  24. package/dist/shaka-player.compiled.debug.d.ts +7 -0
  25. package/dist/shaka-player.compiled.debug.js +31 -31
  26. package/dist/shaka-player.compiled.debug.map +2 -2
  27. package/dist/shaka-player.compiled.js +84 -83
  28. package/dist/shaka-player.compiled.map +3 -3
  29. package/dist/shaka-player.ui.d.ts +7 -0
  30. package/dist/shaka-player.ui.debug.d.ts +7 -0
  31. package/dist/shaka-player.ui.debug.js +33 -33
  32. package/dist/shaka-player.ui.debug.map +2 -2
  33. package/dist/shaka-player.ui.js +56 -55
  34. package/dist/shaka-player.ui.map +3 -3
  35. package/docs/tutorials/errors.md +94 -0
  36. package/docs/tutorials/index.json +2 -0
  37. package/docs/tutorials/widevine-service-certs.md +45 -0
  38. package/externs/ima.js +9 -0
  39. package/lib/ads/client_side_ad_manager.js +6 -3
  40. package/lib/hls/hls_parser.js +2 -0
  41. package/lib/media/transmuxer.js +13 -7
  42. package/lib/media/video_wrapper.js +3 -3
  43. package/lib/offline/indexeddb/storage_mechanism.js +1 -1
  44. package/lib/player.js +3 -1
  45. package/lib/polyfill/media_capabilities.js +2 -8
  46. package/lib/polyfill/mediasource.js +7 -2
  47. package/lib/text/ui_text_displayer.js +1 -0
  48. package/lib/text/vtt_text_parser.js +4 -5
  49. package/lib/util/mime_utils.js +1 -1
  50. package/lib/util/stream_utils.js +26 -14
  51. package/package.json +1 -1
  52. package/test/polyfill/media_capabilities_unit.js +20 -22
  53. package/test/text/vtt_text_parser_unit.js +26 -2
  54. package/test/text/web_vtt_layout_integration.js +0 -3
@@ -32,10 +32,10 @@ while(!k.done)})};return b});function Ga(a,b){return Object.prototype.hasOwnProp
32
32
  fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ga(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
33
33
  m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ga(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ga(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
34
34
  Ga(k,g)&&Ga(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ga(k,g)&&Ga(k[g],this.g)?delete k[g][this.g]:!1};return b});
35
- fa("Map",function(a){function b(){var h={};return h.Qa=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.Qa;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ga(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,ga:p}}return{id:l,
36
- list:m,index:-1,ga:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
37
- "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ga?l.ga.value=k:(l.ga={next:this.g,Qa:this.g.Qa,head:this.g,key:h,value:k},l.list.push(l.ga),this.g.Qa.next=l.ga,this.g.Qa=l.ga,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.ga&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ga.Qa.next=h.ga.next,h.ga.next.Qa=h.ga.Qa,
38
- h.ga.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Qa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ga};e.prototype.get=function(h){return(h=d(this,h).ga)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
35
+ fa("Map",function(a){function b(){var h={};return h.Qa=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.Qa;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ga(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,ha:p}}return{id:l,
36
+ list:m,index:-1,ha:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
37
+ "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ha?l.ha.value=k:(l.ha={next:this.g,Qa:this.g.Qa,head:this.g,key:h,value:k},l.list.push(l.ha),this.g.Qa.next=l.ha,this.g.Qa=l.ha,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.ha&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ha.Qa.next=h.ha.next,h.ha.next.Qa=h.ha.Qa,
38
+ h.ha.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Qa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ha};e.prototype.get=function(h){return(h=d(this,h).ha)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
39
39
  m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
40
40
  fa("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
41
41
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
@@ -97,9 +97,9 @@ function Lc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)r
97
97
  function Mc(a){if(window.TextEncoder&&!Bc()){var b=new TextEncoder;return Gb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Gb(b)}function Nc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}M("shaka.util.StringUtils",Hc);Hc.resetFromCharCode=function(){Kc.g=void 0};Hc.toUTF16=Nc;Hc.toUTF8=Mc;Hc.fromBytesAutoDetect=Lc;Hc.fromUTF16=Jc;
98
98
  Hc.fromUTF8=Ic;var Kc=new qc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ta:65536};0<b.Ta;b={Ta:b.Ta},b.Ta/=2)if(a(b.Ta))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ta)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ta));return e}}(b);return null});function Oc(){}function Pc(a){a=Fb(a);a=Kc.value()(a);return btoa(a)}function Qc(a,b){b=void 0==b?!0:b;var c=Pc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Rc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Sc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
99
99
  function Tc(a){var b=Fb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Uc(){for(var a=Fa.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Fb(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",Oc);Oc.concat=Uc;Oc.toHex=Tc;Oc.fromHex=Sc;Oc.fromBase64=Rc;Oc.toBase64=Qc;Oc.toStandardBase64=Pc;
100
- Oc.equal=function(a,b){Kb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Db(a,b)};function Vc(){var a=this;this.o=Tb.get("muxjs")();this.g=new this.o.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(Uc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:Uc.apply(Oc,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Vc.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
100
+ Oc.equal=function(a,b){Kb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return Db(a,b)};function Vc(){var a=this;this.o=Tb.get("muxjs")();this.h=this.g=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.o&&(this.g=new this.o.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(Uc(b.initSegment,b.data))}),this.g.on("done",function(){var b={data:Uc.apply(Oc,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1}))}Vc.prototype.destroy=function(){this.g&&this.g.dispose();this.g=null;return Promise.resolve()};
101
101
  function Wc(a,b){if(!Tb.get("muxjs")()||!Xc(a))return!1;if(b)return MediaSource.isTypeSupported(Yc(b,a));var c=Yc("audio",a),d=Yc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Xc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
102
- function Yc(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function Zc(a,b){a.l=!0;a.h=new pc;a.m=[];a.j=[];a.i=[];var c=Fb(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function $c(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function ad(a,b,c){a=$c(a,b);if(Xc(a)){if(Tb.get("muxjs")())return Yc(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
102
+ function Yc(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function Zc(a,b){a.l=!0;a.h=new pc;a.m=[];a.j=[];a.i=[];var c=Fb(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function $c(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function ad(a,b,c){b=$c(a,b);if(Xc(b)){if(Tb.get("muxjs")())return Yc(c,b)}else if("video/mp2t"!=a&&"audio"==c)return b.replace("video","audio");return b}
103
103
  function bd(a){var b=cd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
104
104
  case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function dd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function cd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
105
105
  (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function ed(a){this.l=null;this.i=a;this.j=this.u=0;this.m=Infinity;this.h=this.g=null;this.s="";this.o=new Map}function fd(a){return gd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}ed.prototype.destroy=function(){this.i=this.l=null;this.o.clear();return Promise.resolve()};
@@ -129,9 +129,9 @@ function Rd(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return L(function(v){if(d=a.some(fu
129
129
  function Vd(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=kc("video",g);f=Sd(f);g=kc("audio",g);g=ad(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Sd(f);f=ad(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
130
130
  break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Td(d.codecs),f=ad(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
131
131
  f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,q=t(h.initData),v=q.next();!v.done;v=q.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
132
- (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function Td(a){return xc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
133
- function Sd(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function Od(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Wd(d,a.audio)||c&&a&&a.video&&!Wd(c,a.video)?!1:!0})}function Pd(a){a.textStreams=a.textStreams.filter(function(b){return fd($c(b.mimeType,b.codecs))})}
134
- function Qd(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(yc()||xc()||zc())&&c.push("image/webp");return c.includes(b.mimeType)})}function Wd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
132
+ (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(""!=h.audioRobustness?m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness}:m.audio||(m.audio={}));e&&(""!=h.videoRobustness?m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness}:m.video||(m.video={}))}l.keySystemConfiguration=m;a.push(l)}return a}
133
+ function Td(a){return xc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}function Sd(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function Od(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Wd(d,a.audio)||c&&a&&a.video&&!Wd(c,a.video)?!1:!0})}
134
+ function Pd(a){a.textStreams=a.textStreams.filter(function(b){return fd($c(b.mimeType,b.codecs))})}function Qd(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(yc()||xc()||zc())&&c.push("image/webp");return c.includes(b.mimeType)})}function Wd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
135
135
  function Xd(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=t(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=t(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
136
136
  frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||
137
137
  null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles);return a}
@@ -158,8 +158,8 @@ function Ce(a){var b,c;return L(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,
158
158
  function Ie(a){return new De(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}De.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
159
159
  De.prototype.Z=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Je(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new pc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new De(f,function(){return d()})};
160
160
  function Je(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",De);De.prototype.chain=De.prototype.Z;De.prototype["finally"]=De.prototype["finally"];De.all=Ie;De.prototype.abort=De.prototype.abort;De.notAbortable=He;De.completed=Ge;De.aborted=Fe;De.failed=Ee;function P(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
161
- function Ke(a){var b=new P(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}P.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};P.prototype.stopImmediatePropagation=function(){this.g=!0};P.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",P);function Le(){this.da=new wd;this.uc=this}Le.prototype.addEventListener=function(a,b){this.da&&this.da.push(a,b)};Le.prototype.removeEventListener=function(a,b){this.da&&this.da.remove(a,b)};Le.prototype.dispatchEvent=function(a){if(!this.da)return!0;var b=this.da.get(a.type)||[],c=this.da.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.uc;a.currentTarget=this.uc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
162
- Le.prototype.release=function(){this.da=null};function Me(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Ne(a){var b={},c;for(c in a)b[c]=a[c];return b};function Oe(){this.g=[]}function Pe(a,b){a.g.push(b["finally"](function(){fb(a.g,b)}))}Oe.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function Qe(a){Le.call(this);this.i=!1;this.l=new Oe;this.g=new Set;this.h=new Set;this.j=a||null;this.m=!1}pa(Qe,Le);r=Qe.prototype;r.Nd=function(a){this.m=a};function Re(a,b,c,d){c=c||Se;var e=Te[a];if(!e||c>=e.priority)Te[a]={priority:c,Af:b,Bf:void 0===d?!1:d}}r.Cf=function(a){this.g.add(a)};r.Sf=function(a){this.g["delete"](a)};r.Ke=function(){this.g.clear()};r.Df=function(a){this.h.add(a)};r.Tf=function(a){this.h["delete"](a)};r.Le=function(){this.h.clear()};
161
+ function Ke(a){var b=new P(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}P.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};P.prototype.stopImmediatePropagation=function(){this.g=!0};P.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",P);function Le(){this.ea=new wd;this.uc=this}Le.prototype.addEventListener=function(a,b){this.ea&&this.ea.push(a,b)};Le.prototype.removeEventListener=function(a,b){this.ea&&this.ea.remove(a,b)};Le.prototype.dispatchEvent=function(a){if(!this.ea)return!0;var b=this.ea.get(a.type)||[],c=this.ea.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.uc;a.currentTarget=this.uc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
162
+ Le.prototype.release=function(){this.ea=null};function Me(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Ne(a){var b={},c;for(c in a)b[c]=a[c];return b};function Oe(){this.g=[]}function Pe(a,b){a.g.push(b["finally"](function(){fb(a.g,b)}))}Oe.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function Qe(a){Le.call(this);this.i=!1;this.l=new Oe;this.g=new Set;this.h=new Set;this.j=a||null;this.m=!1}pa(Qe,Le);r=Qe.prototype;r.Nd=function(a){this.m=a};function Re(a,b,c,d){c=c||Se;var e=Te[a];if(!e||c>=e.priority)Te[a]={priority:c,Af:b,Bf:void 0===d?!1:d}}r.Cf=function(a){this.g.add(a)};r.Sf=function(a){this.g["delete"](a)};r.Ke=function(){this.g.clear()};r.Df=function(a){this.h.add(a)};r.Tf=function(a){this.h["delete"](a)};r.Le=function(){this.h.clear()};
163
163
  function Ue(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Le.prototype.release.call(this);return this.l.destroy()};
164
164
  r.request=function(a,b){var c=this,d=new Ve;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new We(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Me(b.retryParameters):Be();b.uris=Me(b.uris);e=Xe(this,a,b);var f=e.Z(function(){return Ye(c,a,b,new Ae(b.retryParameters,!1),0,null,d)}),g=f.Z(function(n){return Ze(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
165
165
  var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.Z(function(n){var p=Date.now()-l,q=n.response;q.timeMs+=k;q.timeMs+=p;n.rf||!c.j||q.fromCache||a!=$e||c.j(q.timeMs,q.data.byteLength);return q},function(n){n&&(n.severity=2);throw n;});e=new We(m.promise,function(){return m.abort()},d);Pe(this.l,e);return e};
@@ -177,8 +177,8 @@ function yf(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION
177
177
  function Cf(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
178
178
  function Df(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function Ef(a){a=Number(a);return 0===a%1?a:null}function Ff(a){a=Number(a);return 0===a%1&&0<a?a:null}function Gf(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Hf(a){a=Number(a);return isNaN(a)?null:a}function If(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
179
179
  function Jf(a,b){var c=new DOMParser,d=Kf.value()(a),e=null;try{e=c.parseFromString(d,"text/xml")}catch(f){return null}c=e.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(e=document.createNodeIterator(e,NodeFilter.SHOW_ALL);d=e.nextNode();)if(d instanceof HTMLElement||d instanceof SVGElement)return null;return c}function Lf(a,b){try{var c=Ic(a);return Jf(c,b)}catch(d){return null}}
180
- var Kf=new qc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Mf(a,b){var c=this;b=void 0===b?1:b;this.C=a;this.D=new Set;this.l=this.s=null;this.ja=this.aa=!1;this.F=0;this.g=null;this.o=new cf;this.i=new Map;this.B=[];this.u=new pc;this.h=null;this.m=function(d){c.u.reject(d);a.onError(d)};this.ka=new Map;this.da=new Map;this.T=new O(function(){return Nf(c)});this.J=!1;this.G=[];this.M=!1;this.ea=(new O(function(){Of(c)})).Aa(b);this.u["catch"](function(){});this.j=new af(function(){return Pf(c)});this.V=!1}r=Mf.prototype;r.destroy=function(){return this.j.destroy()};
181
- function Pf(a){return L(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.u.reject(),a.ea.stop(),a.ea=null,a.T.stop(),a.T=null,u(b,Qf(a),2);case 2:if(!a.l){b.A(3);break}A(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.D.clear(),a.s=null,a.B=[],a.h=null,a.m=function(){},a.C=null,a.V=!1,z(b)}})}r.configure=function(a){this.h=a};function Rf(a,b,c){a.ja=!0;a.B=[];a.J=c;return Sf(a,b)}
180
+ var Kf=new qc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Mf(a,b){var c=this;b=void 0===b?1:b;this.C=a;this.D=new Set;this.l=this.s=null;this.fa=this.aa=!1;this.F=0;this.g=null;this.o=new cf;this.i=new Map;this.B=[];this.u=new pc;this.h=null;this.m=function(d){c.u.reject(d);a.onError(d)};this.ka=new Map;this.da=new Map;this.T=new O(function(){return Nf(c)});this.J=!1;this.G=[];this.M=!1;this.ea=(new O(function(){Of(c)})).Aa(b);this.u["catch"](function(){});this.j=new af(function(){return Pf(c)});this.V=!1}r=Mf.prototype;r.destroy=function(){return this.j.destroy()};
181
+ function Pf(a){return L(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.u.reject(),a.ea.stop(),a.ea=null,a.T.stop(),a.T=null,u(b,Qf(a),2);case 2:if(!a.l){b.A(3);break}A(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.D.clear(),a.s=null,a.B=[],a.h=null,a.m=function(){},a.C=null,a.V=!1,z(b)}})}r.configure=function(a){this.h=a};function Rf(a,b,c){a.fa=!0;a.B=[];a.J=c;return Sf(a,b)}
182
182
  function Tf(a,b,c){a.B=c;a.J=0<c.length;return Sf(a,b)}function Uf(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Vf(a,g,[])}
183
183
  function Sf(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return L(function(x){if(1==x.g){if(c=Wf(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=nf(a.h.servers),Xf(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Yf(l),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,Zf(q,nf(a.h.servers),nf(a.h.advanced||{}));return u(x,
184
184
  Rd(b,a.J,a.V),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.aa=!0,x["return"](Promise.resolve());y=Vf(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}
@@ -210,7 +210,7 @@ c.close()["catch"](function(){}));mg(a)&&(a.u.resolve(),a.T.R(qg))}function Nf(a
210
210
  function rg(){var a,b,c,d,e,f,g,h;return L(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
211
211
  c],f=new Map,g=function(l){var m,n,p;return L(function(q){switch(q.g){case 1:return A(q,2),u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,wc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:F(q),f.set(l,null),z(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](of(f))})}
212
212
  function sg(a){var b;return L(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).R(tg)}),A(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);F(c);z(c)})}
213
- function Qf(a){var b;return L(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return L(function(g){if(1==g.g)return A(g,2),a.ja||a.B.includes(e.sessionId)||"persistent-license"!==f.type?u(g,sg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);z(g)})})),0)})}
213
+ function Qf(a){var b;return L(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return L(function(g){if(1==g.g)return A(g,2),a.fa||a.B.includes(e.sessionId)||"persistent-license"!==f.type?u(g,sg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);z(g)})})),0)})}
214
214
  function ug(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={Ba:f.Ba},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ba=[];f.Ba=f.Ba.concat(e.initData||[]);f.Ba=f.Ba.concat(h.initData||[]);f.Ba=f.Ba.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ba.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
215
215
  e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
216
216
  initData:f.Ba,keyIds:g});break}}return c}function Yf(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Of(a){a.i.forEach(function(b,c){var d=b.Ed,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.Ed=e)})}function mg(a){a=a.i.values();return mf(a,function(b){return b.loaded})}
@@ -271,8 +271,8 @@ function xi(a,b){var c;return L(function(d){c=oc;return b==c.Y?a.g?u(d,a.g.remov
271
271
  function yi(a,b,c,d,e){var f;return L(function(g){f=oc;return b==f.Y?(a.g.u=c,id(a.g,d,e),g["return"]()):u(g,Promise.all([ui(a,b,function(){var h=a.h[b].appendWindowStart,k=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=h;a.h[b].appendWindowEnd=k;mi(a,b)}),ui(a,b,function(){var h=c;0>h&&(h+=.001);a.h[b].timestampOffset=h;mi(a,b)}),ui(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;mi(a,b)})]),0)})}
272
272
  r.endOfStream=function(a){var b=this;return L(function(c){return u(c,zi(b,function(){ni(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};r.Ha=function(a){var b=this;return L(function(c){return u(c,zi(b,function(){b.m.duration=a}),0)})};r.getDuration=function(){return this.m.duration};function mi(a,b){var c=a.i[b][0];c&&(c.p.resolve(),Ai(a,b))}function ui(a,b,c){bf(a.B);c={start:c,p:new pc};a.i[b].push(c);1==a.i[b].length&&Bi(a,b);return c.p}
273
273
  function zi(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:bf(a.B);c=[];d={};for(e in a.h)d.Jb=new pc,f={start:function(l){return function(){return l.Jb.resolve()}}(d),p:d.Jb},a.i[e].push(f),c.push(d.Jb),1==a.i[e].length&&f.start(),d={Jb:d.Jb};A(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)Ai(a,h)}z(k)}})}function Ai(a,b){a.i[b].shift();Bi(a,b)}
274
- function Bi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),Ai(a,b)}}function ti(a,b,c,d){var e=a.F[d];null==c&&e&&(xc()||vc())&&"mp4"==a.G[d].split(";")[0].split("/")[1]&&(b=Og(b));return b}var ki=window.URL.createObjectURL;function Ci(a,b,c){this.ma=a;this.ia=b;this.ba=c}Ci.prototype.Xb=function(){return this.ia};Ci.prototype.Tb=function(){return this.ba};function Di(a,b){return a&&b?a.Xb()==b.Xb()&&a.Tb()==b.Tb()&&hb(a.ma(),b.ma()):a==b}M("shaka.media.InitSegmentReference",Ci);Ci.prototype.getEndByte=Ci.prototype.Tb;Ci.prototype.getStartByte=Ci.prototype.Xb;
275
- function Ei(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.ia=d;this.ba=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}r=Ei.prototype;r.ma=function(){return this.j()};r.getStartTime=function(){return this.startTime};r.Ve=function(){return this.endTime};r.Xb=function(){return this.ia};r.Tb=function(){return this.ba};r.nf=function(){return this.tilesLayout};
274
+ function Bi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),Ai(a,b)}}function ti(a,b,c,d){var e=a.F[d];null==c&&e&&(xc()||vc())&&"mp4"==a.G[d].split(";")[0].split("/")[1]&&(b=Og(b));return b}var ki=window.URL.createObjectURL;function Ci(a,b,c){this.ma=a;this.ja=b;this.ba=c}Ci.prototype.Xb=function(){return this.ja};Ci.prototype.Tb=function(){return this.ba};function Di(a,b){return a&&b?a.Xb()==b.Xb()&&a.Tb()==b.Tb()&&hb(a.ma(),b.ma()):a==b}M("shaka.media.InitSegmentReference",Ci);Ci.prototype.getEndByte=Ci.prototype.Tb;Ci.prototype.getStartByte=Ci.prototype.Xb;
275
+ function Ei(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.ja=d;this.ba=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}r=Ei.prototype;r.ma=function(){return this.j()};r.getStartTime=function(){return this.startTime};r.Ve=function(){return this.endTime};r.Xb=function(){return this.ja};r.Tb=function(){return this.ba};r.nf=function(){return this.tilesLayout};
276
276
  r.mf=function(){return this.i};M("shaka.media.SegmentReference",Ei);Ei.prototype.getTileDuration=Ei.prototype.mf;Ei.prototype.getTilesLayout=Ei.prototype.nf;Ei.prototype.getEndByte=Ei.prototype.Tb;Ei.prototype.getStartByte=Ei.prototype.Xb;Ei.prototype.getEndTime=Ei.prototype.Ve;Ei.prototype.getStartTime=Ei.prototype.getStartTime;Ei.prototype.getUris=Ei.prototype.ma;function S(a,b,c){this.l=a;this.Jc=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.B=void 0===c?!0:c;this.C=0;this.D=!1}r=S.prototype;r.getDuration=function(){return this.i};r.af=function(){return this.g};r.Ha=function(a){this.i=a};r.gf=function(){return this.l};r.te=function(a){this.o=a};r.ec=function(a){this.s=a};r.Qd=function(a){this.m=a};r.Of=function(a){this.Jc=a};r.Ue=function(){return this.Jc};
277
277
  r.zb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Cd(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.B&&!this.D&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};r.vd=function(){this.D=!0};r.Cd=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.Bd=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
278
278
  r.U=function(){return Infinity==this.i&&!this.s};r.ib=function(){return Infinity!=this.i&&!this.s};r.Pa=function(){return Math.max(this.u,this.eb()-this.m)};r.ue=function(a){this.u=a};r.eb=function(){return this.U()||this.ib()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.C,this.i):this.h?Math.min(this.h,this.i):this.i};r.Wb=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.eb()-this.m+a,this.Oa()))};r.wb=function(){return this.Wb(0)};
@@ -281,7 +281,7 @@ S.prototype.setUserSeekStart=S.prototype.ue;S.prototype.getSegmentAvailabilitySt
281
281
  S.prototype.setSegmentAvailabilityDuration=S.prototype.Qd;S.prototype.setStatic=S.prototype.ec;S.prototype.setClockOffset=S.prototype.te;S.prototype.getPresentationStartTime=S.prototype.gf;S.prototype.setDuration=S.prototype.Ha;S.prototype.getMaxSegmentDuration=S.prototype.af;S.prototype.getDuration=S.prototype.getDuration;function Fi(a,b){this.j=a;this.m=Gi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=function(){}}Fi.prototype.release=function(){this.j=null;this.i=function(){}};function Hi(a,b){a.i=b}function Ii(a){this.g=a}function Gi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(fi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function Ji(a,b,c,d,e){var f=this;this.g=a;this.B=b;this.l=c;this.u=e;this.i=new cf;this.s=!1;this.C=a.readyState;this.j=!1;this.h=d;this.o=!1;this.i.v(a,"waiting",function(){return Ki(f)});this.m=(new O(function(){Ki(f)})).Aa(.25)}Ji.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.u=null};Ji.prototype.Fd=function(){this.o=!0;Ki(this)};
282
282
  function Ki(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.s)return}else a.s=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.C&&(a.j=!1,a.C=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Gi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.o&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=gi(b,g,a.l.gapDetectionThreshold);if(!(null==
283
283
  c||0==c&&!a.o||(d=b.start(c),d>=a.B.Oa()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new P("largegap",g),g.cancelable=!0,a.u(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Li(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Mi.value().get(b),c.oa(a,b,d))}var Mi=new qc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ni(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new cf;this.i=new Oi(a);Li(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Pi(d,d.j)})}Ni.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Qi(a){return a.m?a.g.currentTime:a.j}function Ri(a,b){0<a.g.readyState?Si(a.i,b):Li(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Pi(a,a.j)})}
284
- function Pi(a,b){.001>Math.abs(a.g.currentTime-b)?Ti(a):(a.h.oa(a.g,"seeking",function(){Ti(a)}),Si(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Ti(a){a.m=!0;a.h.v(a.g,"seeking",function(){return a.l()})}function Oi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Oi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
284
+ function Pi(a,b){.001>Math.abs(a.g.currentTime-b)?Ti(a):(a.h.oa(a.g,"seeking",function(){Ti(a)}),Si(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Ti(a){a.m=!0;a.h.v(a.g,"seeking",function(){return a.l()})}function Oi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Oi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
285
285
  function Si(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Aa(.1)};function Ui(a){this.g=a;this.j=!1;this.h=null;this.i=new cf}r=Ui.prototype;r.dd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.oa(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Li(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.ed=function(a){this.h=this.j?this.h:a};r.nc=function(){return(this.j?this.g.currentTime:this.h)||0};r.je=function(){};
286
286
  function Vi(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.u=b.minBufferTime||0;this.l=c;this.s=e;this.o=null;this.j=new Ji(a,b.presentationTimeline,c,Wi(a,c),f);this.h=new Ni(a,function(){a:{var h=g.j;h.s=!0;h.o=!1;h.j=!1;var k=Qi(g.h);h=Xi(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.o||g.o<k-1)){g.o=k;Ri(g.h,h);h=void 0;break a}g.s();h=void 0}return h},Yi(this,d));this.m=new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Qi(g.h),k=g.g.wb(),l=g.g.Oa();3>l-k&&(k=l-
287
287
  3);h<k&&(h=Xi(g,h),g.i.currentTime=h)}})}r=Vi.prototype;r.dd=function(){this.m.Aa(.25)};r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.s=function(){}};r.ed=function(a){Ri(this.h,a)};r.nc=function(){var a=Qi(this.h);return 0<this.i.readyState&&!this.i.paused?Zi(this,a):a};
@@ -289,7 +289,7 @@ function Yi(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.wb():a.g.Oa():0>b&&(b=
289
289
  function Zi(a,b){var c=a.g.wb();if(b<c)return c;c=a.g.Oa();return b>c?c:b}function Wi(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new Fi(new Ii(a),b.stallThreshold);Hi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function U(a){this.K=a;this.g=null;this.h=0;this.i=!1}r=U.prototype;r.destroy=function(){Kb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};r.release=function(){this.i||(this.K=[],this.g&&this.g.stop(),this.g=null)};r.uf=function(){this.i=!0};
290
290
  r.find=function(a){for(var b=this.K.length-1,c=b;0<=c;--c){var d=this.K[c],e=c<b?this.K[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.K.length&&a<this.K[0].startTime?this.h:null};r.get=function(a){if(0==this.K.length)return null;a-=this.h;return 0>a||a>=this.K.length?null:this.K[a]};r.offset=function(a){if(!this.i)for(var b=t(this.K),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
291
291
  r.Ec=function(a){!this.i&&a.length&&(this.K=this.K.filter(function(b){return b.startTime<a[0].startTime}),this.K.push.apply(this.K,ia(a)))};r.yb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.K.length||d.endTime>c.K[0].startTime)});this.Ec(a);this.ab(b)};r.ab=function(a){if(!this.i){var b=this.K.length;this.K=this.K.filter(function(c){return c.endTime>a});this.h+=b-this.K.length}};
292
- r.Wa=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.K.length;)if(this.K[this.K.length-1].startTime>=b)this.K.pop();else break;for(;this.K.length;)if(this.K[0].endTime<=a)this.K.shift(),c||this.h++;else break;0!=this.K.length&&(a=this.K[this.K.length-1],this.K[this.K.length-1]=new Ei(a.startTime,b,a.j,a.ia,a.ba,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.i))}};
292
+ r.Wa=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.K.length;)if(this.K[this.K.length-1].startTime>=b)this.K.pop();else break;for(;this.K.length;)if(this.K[0].endTime<=a)this.K.shift(),c||this.h++;else break;0!=this.K.length&&(a=this.K[this.K.length-1],this.K[this.K.length-1]=new Ei(a.startTime,b,a.j,a.ja,a.ba,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.i))}};
293
293
  r.Lc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.K.push.apply(c.K,ia(d)):(c.g.stop(),c.g=null)}),this.g.Aa(a))};U.prototype[Symbol.iterator]=function(){return this.cb(0)};U.prototype.cb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new aj(this,b,d)};
294
294
  function bj(a,b,c){return new U([new Ei(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",U);U.forSingleSegment=bj;U.prototype.getIteratorForTime=U.prototype.cb;U.prototype.updateEvery=U.prototype.Lc;U.prototype.fit=U.prototype.Wa;U.prototype.evict=U.prototype.ab;U.prototype.mergeAndEvict=U.prototype.yb;U.prototype.merge=U.prototype.Ec;U.prototype.offset=U.prototype.offset;U.prototype.get=U.prototype.get;U.prototype.find=U.prototype.find;U.prototype.markImmutable=U.prototype.uf;
295
295
  U.prototype.release=U.prototype.release;U.prototype.destroy=U.prototype.destroy;function aj(a,b,c){this.i=a;this.h=b;this.g=c}aj.prototype.seek=function(a){Kb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.cb(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
@@ -303,7 +303,7 @@ oj.prototype.configure=function(a){this.j=a;this.C=new Ae({maxAttempts:Math.max(
303
303
  function tj(a,b){var c,d,e,f,g,h;L(function(k){switch(k.g){case 1:return c=oc,A(k,2),u(k,xi(a.g.P,c.Y),4);case 4:va(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=$c(b.mimeType,b.codecs);li(a.g.P,e);f=a.g.P.l;if(g=f.isTextVisible()||a.j.alwaysStreamText)h=uj(b),a.i.set(c.Y,h),vj(a,h,0);z(k)}})}function wj(a){var b=a.i.get(nc);b&&(qj(b),rj(b)["catch"](function(){}),a.i["delete"](nc));a.o=null}
304
304
  function xj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.mb&&(yj(a,e,!1,0,!1),c.mb=d)}else if(d=c.mb)c.mb=null,yj(a,d,!0,0,!1)}}function zj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.B&&(b.video&&yj(a,b.video,c,d,e),b.audio&&yj(a,b.audio,c,d,e))}function Aj(a,b){a.o=b;a.B&&yj(a,b,!0,0,!1)}
305
305
  function yj(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=nc?f&&(f.mb&&(b.trickModeVideo?(f.mb=b,b=b.trickModeVideo):f.mb=null),f.stream!=b||e)&&(b.type==nc&&li(a.g.P,$c(b.mimeType,b.codecs)),f.stream=b,f.$=null,c&&(f.Rb?f.Oc=!0:f.ra?(f.Za=!0,f.sc=d,f.Oc=!0):(qj(f),Bj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),Cj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):tj(a,b)}
306
- function Cj(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.ua)return e["return"]();c=b.stream;d=b.ua;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.ua!=d||b.stream!=c)return e["return"]();var f=a.g.Ac();var g=qi(a.g.P,b.type),h=b.stream.segmentIndex.find(b.za?b.za.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ba?k.ba-k.ia:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.ba?k.ba-k.ia:null)||0),k=a.g.getBandwidthEstimate(),
306
+ function Cj(a,b){var c,d;return L(function(e){if(1==e.g){if(!b.ua)return e["return"]();c=b.stream;d=b.ua;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.ua!=d||b.stream!=c)return e["return"]();var f=a.g.Ac();var g=qi(a.g.P,b.type),h=b.stream.segmentIndex.find(b.za?b.za.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ba?k.ba-k.ja:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.ba?k.ba-k.ja:null)||0),k=a.g.getBandwidthEstimate(),
307
307
  f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.ua.h.g>h?!0:!1):f=!1;f&&b.ua.abort();z(e)})}function Dj(a,b){b.Rb||b.Za||(b.ra?(b.Za=!0,b.sc=0):null==oi(a.g.P,b.type)?null==b.Ja&&vj(a,b,0):(qj(b),Bj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
308
308
  function sj(a){var b,c,d,e,f,g,h,k,l,m;return L(function(n){if(1==n.g){b=oc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.$a,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Ma,a.l.video),d.add(a.l.video));a.o&&(c.set(b.Y,a.o),d.add(a.o));e=a.g.P;f=a.j.forceTransmuxTS;return u(n,e.init(c,f),2)}bf(a.h);var p=a.m.presentationTimeline.getDuration();Infinity>p?a.g.P.Ha(p):a.g.P.Ha(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.i.has(k)||
309
309
  (m=uj(l),a.i.set(k,m),vj(a,m,0));z(n)})}function uj(a){return{stream:a,type:a.type,$:null,za:null,Dc:null,ud:null,td:null,sd:null,mb:null,endOfStream:!1,ra:!1,Ja:null,Za:!1,sc:0,Oc:!1,Rb:!1,Hd:!1,Yb:!1,ua:null}}
@@ -321,7 +321,7 @@ case 4:return n=v.h,bf(a.h),p=b.stream.closedCaptions&&0<b.stream.closedCaptions
321
321
  function Mj(a,b,c,d,e,f){var g;return L(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new Fg).O("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.$b();var n=k.reader.$b();var p=k.reader.L();var q=k.reader.L();var v=k.reader.L();var y=k.reader.L();var x=e.startTime+q/p}else p=k.reader.L(),x=k.reader.Db()/p+e.timestampOffset,q=x-e.startTime,v=k.reader.L(),y=k.reader.L(),m=k.reader.$b(),n=k.reader.$b();
322
322
  k=k.reader.Xa(k.reader.N.byteLength-k.reader.W());l&&l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.g.yf():(l=(new Map).set("detail",{startTime:x,endTime:x+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:q,eventDuration:v,id:y,messageData:k}),l=new P(Pj,l),a.g.onEvent(l)))}).parse(f),u(h,Qj(a,b,c),2);if(3!=h.g)return bf(a.h),u(h,si(a.g.P,b.type,f,e.startTime,e.endTime,g),3);bf(a.h);z(h)})}
323
323
  function Qj(a,b,c){var d,e,f,g;return L(function(h){if(1==h.g){d=Math.max(a.j.bufferBehind,a.m.presentationTimeline.g);e=oi(a.g.P,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.P.remove(b.type,e,e+g),2)}bf(a.h);z(h)})}function Hj(a){return a&&a.type==nc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
324
- function Nj(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g)return e=$e,f=nj(c.ma(),c.ia,c.ba,a.j.retryParameters,d),g=a.g.jb.request(e,f),b.ua=g,u(k,g.promise,2);h=k.h;b.ua=null;return k["return"](h.data)})}
324
+ function Nj(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g)return e=$e,f=nj(c.ma(),c.ja,c.ba,a.j.retryParameters,d),g=a.g.jb.request(e,f),b.ua=g,u(k,g.promise,2);h=k.h;b.ua=null;return k["return"](h.data)})}
325
325
  function Bj(a,b,c,d){var e,f;return L(function(g){if(1==g.g)return b.Za=!1,b.Oc=!1,b.sc=0,b.Rb=!0,b.za=null,b.Dc=null,b.$=null,d?(e=a.g.Ac(),f=a.g.P.getDuration(),u(g,a.g.P.remove(b.type,e+d,f),3)):u(g,xi(a.g.P,b.type),4);if(3!=g.g)return bf(a.h),c?u(g,a.g.P.flush(b.type),3):g.A(3);bf(a.h);b.Rb=!1;b.endOfStream=!1;b.ra||b.Ja||vj(a,b,0);z(g)})}
326
326
  function vj(a,b,c){var d=b.type;if(d!=nc||a.i.has(d))b.Ja=(new rc(function(){var e;return L(function(f){if(1==f.g)return A(f,2),u(f,Ej(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);z(f)})})).R(c)}function qj(a){null!=a.Ja&&(a.Ja.stop(),a.Ja=null)}function rj(a){return L(function(b){return a.ua?u(b,a.ua.abort(),0):b.A(0)})}function Gj(a,b){return L(function(c){if(1==c.g)return u(c,Ce(a.C),2);bf(a.h);a.g.onError(b);b.handled||a.j.failureCallback(b);z(c)})};function Rj(a,b){var c=Sj(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Tj(d)});this.s=new af(function(){return Uj(d)})}Rj.prototype.destroy=function(){return this.s.destroy()};function Uj(a){var b,c,d;return L(function(e){if(1==e.g)return a.h&&a.h.abort(),Vj(a),u(e,a.u,2);a.g&&a.g.Fa.lb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Fa.lb();a.g=null;a.m=[];a.j=null;z(e)})}
327
327
  function Wj(a,b){var c={Ab:function(){},Fc:function(){},lb:function(){},onError:function(){},Hc:function(){},wg:function(){}};a.m.push({create:b,Fa:c});a.h&&a.h.abort();Vj(a);return c}
@@ -339,7 +339,7 @@ function gk(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.
339
339
  q.startTime?p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.ac?(c.appendChild(d.ac),d.ac.appendChild(d.gd)):c.appendChild(d.gd)}}function ek(a,b){if(a.g){var c=a.B.currentTime;if(!a.j||(void 0===b?0:b)){for(var d=t(a.o.values()),e=d.next();!e.done;e=d.next())ck(e.value);ck(a.g);a.h.clear();a.o.clear()}if(a.j){d=new Map;e=t(a.h.keys());for(var f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));gk(a,a.i,a.g,c,[])}}}
340
340
  function hk(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Kb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&ik(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,e=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==Ab?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Ab?"%":"px"),a.o.has(e))c=a.o.get(e);else{var g=document.createElement("span"),h=c.heightUnits==
341
341
  Ab?"%":"px",k=c.widthUnits==Ab?"%":"px",l=c.viewportAnchorUnits==Ab?"%":"px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");g.style.height=c.height+h;g.style.width=c.width+k;g.style.position="absolute";g.style.top=c.viewportAnchorY+l;g.style.left=c.viewportAnchorX+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.o.set(e,g);c=g}e=f;d&&(e=
342
- document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{gd:f,ze:e,ac:c})}
342
+ document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{gd:f,ze:e,ac:c})}
343
343
  function ik(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.backgroundColor=c.backgroundColor;f.border=c.border;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=jk(c.linePadding,c,a.m);f.paddingRight=jk(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
344
344
  "contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=kk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?
345
345
  "flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=jk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",c.writingMode==nb?(f.width="100%",c.lineAlign==pb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==pb?f.left=c.line+"%":"end"==c.lineAlign&&
@@ -359,10 +359,10 @@ minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLa
359
359
  e.trackSelectionCallback=function(g){return L(function(h){return h["return"](sk(g,f.preferredAudioLanguage))})};return f}function tk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return nk(a,b,c||rk(),d,"")}
360
360
  function sk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=vd(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return pd(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
361
361
  2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=nc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",qk);qk.mergeConfigObjects=tk;function uk(){this.g=null;this.h=[]}function vk(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function wk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
362
- function xk(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 yk(){this.i=this.h=null;this.g=[]}function zk(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 Ak(){this.u=this.B=this.F=this.C=this.s=this.j=this.D=this.m=this.i=this.G=this.J=this.M=this.l=this.o=NaN;this.g=new uk;this.h=new yk};function V(a,b){Le.call(this);var c=this;this.l=Bk;this.pc=this.g=null;this.ja=!1;this.vc=new cf;this.Nb=new cf;this.o=new cf;this.hd=this.u=this.Mb=this.i=this.wc=this.G=this.j=this.ka=this.J=this.qc=this.F=this.rb=this.B=this.M=this.m=this.D=null;this.rd=1E9;this.h=Ck(this);this.qd={width:Infinity,height:Infinity};this.s=null;this.Da=new se(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ka=this.h.preferredTextLanguage;this.Pb=this.h.preferredTextRole;
363
- this.Gb=this.h.preferForcedSubs;this.Ob=[];b&&b(this);this.D=Dk(this);this.D.Nd(this.h.streaming.forceHTTPS);this.C=null;Ek&&(this.C=Rb(Ek));this.vc.v(window,"online",function(){c.Id()});this.T={name:"detach"};this.V={name:"attach"};this.ea={name:"unload"};this.wd={name:"manifest-parser"};this.pd={name:"manifest"};this.La={name:"media-source"};this.kd={name:"drm-engine"};this.aa={name:"load"};this.zd={name:"src-equals-drm-engine"};this.sb={name:"src-equals"};var d=new Map;d.set(this.V,function(e,
364
- f){return He(Fk(c,e,f))});d.set(this.T,function(e){e.H&&(c.Nb.Ra(),e.H=null);c.C&&c.C.release();c.g=null;e=Promise.resolve();return He(e)});d.set(this.ea,function(e){return He(Gk(c,e))});d.set(this.La,function(e){e=Hk(c,e);return He(e)});d.set(this.wd,function(e,f){var g=Ik(c,e,f);return He(g)});d.set(this.pd,function(e){return Jk(c,e)});d.set(this.kd,function(e){e=Kk(c,e);return He(e)});d.set(this.aa,function(e,f){return He(Lk(c,e,f))});d.set(this.zd,function(e,f){var g=Mk(c,e,f);return He(g)});
365
- d.set(this.sb,function(e,f){return Nk(c,e,f)});this.wa=new Rj(this.T,{cf:function(e,f,g,h){var k=null;e==c.T&&(k=g==c.T?c.T:c.V);e==c.V&&(k=g==c.T||f.H!=h.H?c.T:g==c.V?c.V:g==c.La||g==c.aa?c.La:g==c.sb?c.zd:null);e==c.La&&(k=g==c.aa&&f.H==h.H?c.wd:c.ea);e==c.wd&&(k=Ok(c.aa,c.pd,c.ea,g,f,h));e==c.pd&&(k=Ok(c.aa,c.kd,c.ea,g,f,h));e==c.kd&&(k=Ok(c.aa,c.aa,c.ea,g,f,h));e==c.zd&&(k=g==c.sb&&f.H==h.H?c.sb:c.ea);if(e==c.aa||e==c.sb)k=c.ea;e==c.ea&&(k=h.H&&f.H==h.H?c.V:c.T);return k},Pe:function(e,f,g){c.dispatchEvent(Pk(Qk,
362
+ function xk(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 yk(){this.i=this.h=null;this.g=[]}function zk(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 Ak(){this.u=this.B=this.F=this.C=this.s=this.j=this.D=this.m=this.i=this.G=this.J=this.M=this.l=this.o=NaN;this.g=new uk;this.h=new yk};function V(a,b){Le.call(this);var c=this;this.l=Bk;this.pc=this.g=null;this.da=!1;this.vc=new cf;this.Nb=new cf;this.o=new cf;this.hd=this.u=this.Mb=this.i=this.wc=this.G=this.j=this.ka=this.J=this.qc=this.F=this.rb=this.B=this.M=this.m=this.D=null;this.rd=1E9;this.h=Ck(this);this.qd={width:Infinity,height:Infinity};this.s=null;this.Da=new se(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ka=this.h.preferredTextLanguage;this.Pb=this.h.preferredTextRole;
363
+ this.Gb=this.h.preferForcedSubs;this.Ob=[];b&&b(this);this.D=Dk(this);this.D.Nd(this.h.streaming.forceHTTPS);this.C=null;Ek&&(this.C=Rb(Ek));this.vc.v(window,"online",function(){c.Id()});this.T={name:"detach"};this.V={name:"attach"};this.fa={name:"unload"};this.wd={name:"manifest-parser"};this.pd={name:"manifest"};this.La={name:"media-source"};this.kd={name:"drm-engine"};this.aa={name:"load"};this.zd={name:"src-equals-drm-engine"};this.sb={name:"src-equals"};var d=new Map;d.set(this.V,function(e,
364
+ f){return He(Fk(c,e,f))});d.set(this.T,function(e){e.H&&(c.Nb.Ra(),e.H=null);c.C&&c.C.release();c.g=null;e=Promise.resolve();return He(e)});d.set(this.fa,function(e){return He(Gk(c,e))});d.set(this.La,function(e){e=Hk(c,e);return He(e)});d.set(this.wd,function(e,f){var g=Ik(c,e,f);return He(g)});d.set(this.pd,function(e){return Jk(c,e)});d.set(this.kd,function(e){e=Kk(c,e);return He(e)});d.set(this.aa,function(e,f){return He(Lk(c,e,f))});d.set(this.zd,function(e,f){var g=Mk(c,e,f);return He(g)});
365
+ d.set(this.sb,function(e,f){return Nk(c,e,f)});this.wa=new Rj(this.T,{cf:function(e,f,g,h){var k=null;e==c.T&&(k=g==c.T?c.T:c.V);e==c.V&&(k=g==c.T||f.H!=h.H?c.T:g==c.V?c.V:g==c.La||g==c.aa?c.La:g==c.sb?c.zd:null);e==c.La&&(k=g==c.aa&&f.H==h.H?c.wd:c.fa);e==c.wd&&(k=Ok(c.aa,c.pd,c.fa,g,f,h));e==c.pd&&(k=Ok(c.aa,c.kd,c.fa,g,f,h));e==c.kd&&(k=Ok(c.aa,c.aa,c.fa,g,f,h));e==c.zd&&(k=g==c.sb&&f.H==h.H?c.sb:c.fa);if(e==c.aa||e==c.sb)k=c.fa;e==c.fa&&(k=h.H&&f.H==h.H?c.V:c.T);return k},Pe:function(e,f,g){c.dispatchEvent(Pk(Qk,
366
366
  (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return L(function(f){return 1==f.g?u(f,Gk(c,e),2):f["return"](e.H?c.V:c.T)})},xf:function(e){c.dispatchEvent(Pk(Rk,(new Map).set("state",e.name)))}});a&&this.Qb(a,!0)}pa(V,Le);function Pk(a,b){return new P(a,b)}r=V.prototype;
367
367
  r.destroy=function(){var a=this,b;return L(function(c){switch(c.g){case 1:if(a.l==Sk)return c["return"]();a.l=Sk;b=Wj(a.wa,function(){return{node:a.T,payload:Sj(),gb:!1}});return u(c,new Promise(function(d){b.Ab=function(){};b.Fc=function(){d()};b.lb=function(){d()};b.onError=function(){d()};b.Hc=function(){d()}}),2);case 2:return u(c,a.wa.destroy(),3);case 3:a.vc&&(a.vc.release(),a.vc=null);a.Nb&&(a.Nb.release(),a.Nb=null);a.o&&(a.o.release(),a.o=null);a.hd=null;a.u=null;a.h=null;a.s=null;a.pc=null;
368
368
  if(!a.D){c.A(4);break}return u(c,a.D.destroy(),5);case 5:a.D=null;case 4:Le.prototype.release.call(a),z(c)}})};r.Qb=function(a,b){b=void 0===b?!0:b;if(this.l==Sk)return Promise.reject(Tk());var c=Sj();c.H=a;sc()||(b=!1);var d=b?this.La:this.V,e=Wj(this.wa,function(){return{node:d,payload:c,gb:!1}});e.Ab=function(){};return Uk(e)};r.detach=function(){var a=this;if(this.l==Sk)return Promise.reject(Tk());var b=Wj(this.wa,function(){return{node:a.T,payload:Sj(),gb:!1}});b.Ab=function(){};return Uk(b)};
@@ -381,15 +381,15 @@ function Kk(a,b){var c,d;return L(function(e){return 1==e.g?(c=Date.now()/1E3,d=
381
381
  function Lk(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v;return L(function(y){switch(y.g){case 1:b.startTime=c.startTime;d=b.H;e=b.uri;a.Mb=e;a.F=new dj({Bc:function(){return d.playbackRate},yc:function(){return d.defaultPlaybackRate},Pd:function(x){d.playbackRate=x},ie:function(x){d.currentTime+=x}});f=function(){return ol(a)};g=function(){return pl(a)};a.o.v(d,"playing",f);a.o.v(d,"pause",f);a.o.v(d,"ended",f);a.o.v(d,"ratechange",g);h=a.h.abrFactory;a.u&&a.hd==h||(a.hd=h,a.u=Rb(h),"function"!=typeof a.u.playbackRateChanged&&
382
382
  (Kb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.u.playbackRateChanged=function(){}),a.u.configure(a.h.abr));a.Da=new se(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ka=a.h.preferredTextLanguage;a.Pb=a.h.preferredTextRole;a.Gb=a.h.preferForcedSubs;ql(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(x,w,D){a.j&&x!=a.j.l&&rl(a,x,!0,void 0===w?!1:w,void 0===D?0:D)});a.B=sl(a,b.startTime);a.rb=tl(a);
383
383
  k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);ul(a,k);yd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=vl(a);a.j.configure(a.h.streaming);a.l=wl;d.textTracks&&a.o.v(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":xl(a,x)}});a.dispatchEvent(Pk(yl));l=null;if(m=a.Cc().find(function(x){return x.active})){y.A(2);break}l=zl(a)?a.u.chooseVariant():null;rl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.A(3);
384
- break}n=a.B.nc();return u(y,Al(l,n),4);case 4:p=y.h,a.B.ed(p);case 3:Bl(a,null,Xd(l));case 2:return a.B.dd(),q=a.fb().find(function(x){return x.active}),q||((v=ge(a.i.textStreams,a.Ka,a.Pb,a.Gb)[0]||null)&&zk(a.s.h,v,!0),l&&(v?(l.audio&&Cl(a,l.audio,v)&&(a.ja=!0),a.ja&&a.M.l.setTextVisibility(!0),Dl(a)):a.ja=!1),v&&(a.h.streaming.alwaysStreamText||a.od())&&Aj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.u.enable(),El(a)),Od(a.j?a.j.l:null,a.i),Fl(a.i),Gl(a),zl(a),a.i.variants.some(function(x){return x.primary}),
384
+ break}n=a.B.nc();return u(y,Al(l,n),4);case 4:p=y.h,a.B.ed(p);case 3:Bl(a,null,Xd(l));case 2:return a.B.dd(),q=a.fb().find(function(x){return x.active}),q||((v=ge(a.i.textStreams,a.Ka,a.Pb,a.Gb)[0]||null)&&zk(a.s.h,v,!0),l&&(v?(l.audio&&Cl(a,l.audio,v)&&(a.da=!0),a.da&&a.M.l.setTextVisibility(!0),Dl(a)):a.da=!1),v&&(a.h.streaming.alwaysStreamText||a.od())&&Aj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.u.enable(),El(a)),Od(a.j?a.j.l:null,a.i),Fl(a.i),Gl(a),zl(a),a.i.variants.some(function(x){return x.primary}),
385
385
  a.o.oa(d,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Rd}),z(y)}})}
386
386
  function Mk(a,b,c){var d,e,f,g,h,k,l;return L(function(m){return 1==m.g?(d=oc,e=Date.now()/1E3,f=!0,a.m=kl(a,{jb:a.D,onError:function(n){$k(a,n)},Gc:function(n){ll(a,n)},onExpirationUpdated:function(n,p){ml(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==nl&&f&&(f=!1,a.s.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=zg(g),k=Yk[h],"application/x-mpegurl"==k&&Ac()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
387
387
  createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?dd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ma,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.V=!0,u(m,Tf(a.m,[l],[]),2)):u(m,a.m.Qb(b.H),
388
388
  0)})}
389
389
  function Nk(a,b,c){function d(){return ol(a)}b.uri=c.uri;b.startTime=c.startTime;a.Mb=b.uri;var e=b.H;a.B=new Ui(e);var f=!1;a.Ob.push(function(){f=!0});null!=b.startTime&&a.B.ed(b.startTime);a.F=new dj({Bc:function(){return e.playbackRate},yc:function(){return e.defaultPlaybackRate},Pd:function(h){e.playbackRate=h},ie:function(h){e.currentTime+=h}});ul(a,a.h.streaming.rebufferingGoal);a.o.v(e,"playing",d);a.o.v(e,"pause",d);a.o.v(e,"ended",d);a.o.v(e,"ratechange",function(){return pl(a)});"none"!=e.preload&&
390
390
  a.o.oa(e,"loadedmetadata",function(){a.s.m=Date.now()/1E3-c.Rd});e.audioTracks&&(a.o.v(e.audioTracks,"addtrack",function(){return Gl(a)}),a.o.v(e.audioTracks,"removetrack",function(){return Gl(a)}),a.o.v(e.audioTracks,"change",function(){return Gl(a)}));e.textTracks&&(a.o.v(e.textTracks,"addtrack",function(h){if(h.track)switch(h=h.track,h.kind){case "metadata":Hl(a,h);break;case "chapters":xl(a,h);break;default:Gl(a)}}),a.o.v(e.textTracks,"removetrack",function(){return Gl(a)}),a.o.v(e.textTracks,
391
- "change",function(){return Gl(a)}));e.src=b.uri;(xc()||yc())&&e.load();a.l=Il;a.dispatchEvent(Pk(yl));var g=new pc;Li(e,HTMLMediaElement.HAVE_METADATA,a.o,function(){a.B.dd();g.resolve()});Li(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var h;return L(function(k){if(1==k.g)return Jl(a),h=Kl(a),h.find(function(l){return"disabled"!=l.mode})?k.A(2):u(k,new Promise(function(l){a.o.oa(e.textTracks,"change",l);(new O(l)).R(1)}),2);if(f)return k["return"]();Ll(a);z(k)})});e.error?g.reject(Zk(a)):
392
- "none"==e.preload&&(Ua('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),g.resolve());a.o.oa(e,"error",function(){g.reject(Zk(a))});return new De(g,function(){g.reject(new N(2,7,7001));return Promise.resolve()})}
391
+ "change",function(){return Gl(a)}));e.src=b.uri;(xc()||yc())&&e.load();a.l=Il;a.dispatchEvent(Pk(yl));var g=new pc;Li(e,HTMLMediaElement.HAVE_METADATA,a.o,function(){a.B.dd();g.resolve()});Li(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var h;return L(function(k){if(1==k.g)return Jl(a),h=Kl(a),h.find(function(l){return"disabled"!=l.mode})?(0<h.length&&(a.da=!0),k.A(2)):u(k,new Promise(function(l){a.o.oa(e.textTracks,"change",l);(new O(l)).R(1)}),2);if(f)return k["return"]();Ll(a);z(k)})});
392
+ e.error?g.reject(Zk(a)):"none"==e.preload&&(Ua('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),g.resolve());a.o.oa(e,"error",function(){g.reject(Zk(a))});return new De(g,function(){g.reject(new N(2,7,7001));return Promise.resolve()})}
393
393
  function Jl(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Kd(b);var c=a.h.preferredVariantRole;""!=c&&a.Kd(b,c)}}function Ll(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Ld(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Ld(b,d,c)}}
394
394
  function Hl(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.v(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,dl(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value)});var c=(new O(function(){var d=Ml(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Fb().R(.5);a.Ob.push(function(){c.stop()})}}
395
395
  function dl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Pk(Nl,b))}function xl(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Fb().R(.5);a.Ob.push(function(){c.stop()})}}function jl(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function kl(a,b){return new Mf(b,a.h.drm.updateExpirationTime)}
@@ -410,16 +410,16 @@ r.Cc=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.va
410
410
  r.fb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Yd(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Kl(this).map(function(f){return be(f)}):[]};r.We=function(){return this.i?this.i.imageStreams.map(function(a){return Zd(a)}):[]};
411
411
  r.lf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B;return L(function(E){if(1==E.g)return c.i?(d=c.i.imageStreams.find(function(G){return G.id==a}))?d.segmentIndex?E.A(3):u(E,d.createSegmentIndex(),3):E["return"](null):E.A(2);if(2!=E.g){e=d.segmentIndex.find(b);if(null==e)return E["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return E["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;q=l/n;
412
412
  v=m*n;y=f.l-f.startTime;x=f.i||y/v;w=f.startTime;C=D=0;1<v&&(B=Math.floor((b-f.startTime)/x),w=f.startTime+B*x,D=B%m*p,C=Math.floor(B/m)*q);return E["return"]({imageHeight:l,imageWidth:k,height:q,positionX:D,positionY:C,startTime:w,duration:x,uris:f.ma(),width:p})}return E["return"](null)})};
413
- r.qe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(zk(this.s.h,b,!1),Aj(this.j,b),Ul(this),this.Ka=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Kl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,$d(c)==a.id?c.mode=this.ja?"showing":"hidden":c.mode="disabled";Ul(this)}};
413
+ r.qe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(zk(this.s.h,b,!1),Aj(this.j,b),Ul(this),this.Ka=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Kl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,$d(c)==a.id?c.mode=this.da?"showing":"hidden":c.mode="disabled";Ul(this)}};
414
414
  r.re=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ua("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&ee(d)&&(rl(this,d,!1,b,c),this.Da=new re(d),zl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
415
415
  $d(c)==a.id){Vl(this,c);break}};r.Re=function(){return Wl(this.Cc())};r.kf=function(){return Wl(this.fb())};r.Qe=function(){return Array.from(Xl(this.Cc()))};r.jf=function(){return Array.from(Xl(this.fb()))};
416
416
  r.Kd=function(a,b){if(this.i&&this.B){this.Da=new se(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.Da.create(this.i.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=Xd(f),this.re(c,!0)):Tl(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=pd(a);f=d=null;e=
417
417
  t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=de(g);pd(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Vl(this,f):d&&Vl(this,d)}};
418
418
  r.Ld=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.B){if(this.Ka=a,this.Pb=b||"",this.Gb=c,(a=ge(this.i.textStreams,this.Ka,this.Pb,this.Gb)[0]||null)&&a!=this.j.o&&(zk(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.od()))Aj(this.j,a),Ul(this)}else{var d=pd(a);(a=this.fb().find(function(e){return pd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.qe(a)}};
419
- r.Jf=function(a){if(this.i&&this.B){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Da=new se(b.language,"",0,a),Tl(this))}};r.od=function(){var a=this.ja;return this.M?this.M.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Kl(this).some(function(b){return"showing"==b.mode}):a};r.ce=function(){return this.g&&this.g.src&&this.g.textTracks?Yl(this).map(function(a){return be(a)}):[]};
419
+ r.Jf=function(a){if(this.i&&this.B){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Da=new se(b.language,"",0,a),Tl(this))}};r.od=function(){var a=this.da;return this.M?this.M.l.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Kl(this).some(function(b){return"showing"==b.mode}):a};r.ce=function(){return this.g&&this.g.src&&this.g.textTracks?Yl(this).map(function(a){return be(a)}):[]};
420
420
  r.Te=function(a){var b=pd(a),c=Yl(this).filter(function(h){return pd(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
421
421
  function Kl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Ml(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Yl(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
422
- r.Pf=function(a){a=!!a;if(this.ja!=a){this.ja=a;if(this.l==wl)this.M.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=ge(this.i.textStreams,this.Ka,this.Pb,this.Gb),0<a.length&&(Aj(this.j,a[0]),Ul(this))):wj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Kl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Dl(this)}};
422
+ r.Pf=function(a){a=!!a;if(this.da!=a){this.da=a;if(this.l==wl)this.M.l.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=ge(this.i.textStreams,this.Ka,this.Pb,this.Gb),0<a.length&&(Aj(this.j,a[0]),Ul(this))):wj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Kl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Dl(this)}};
423
423
  r.ff=function(){if(!this.U())return null;var a=this.wa.l,b=0;if(this.B)b=this.B.nc();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
424
424
  r.de=function(){if(!this.U())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.xc=function(){if(this.l==wl)return this.M.xc();var a={total:[],audio:[],video:[],text:[]};this.l==Il&&(a.total=fi(this.g.buffered));return a};
425
425
  r.getStats=function(){if(this.l!=wl&&this.l!=Il)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};ol(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?
@@ -467,22 +467,22 @@ for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=sc()?fd(l)?!0:MediaSource.isTyp
467
467
  V.isBrowserSupported=function(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||wc("Trident/"))return!1;var a=Ec();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:sc()?!0:tc("application/x-mpegurl")};V.setAdManagerFactory=function(a){Ek=a};
468
468
  V.registerSupportPlugin=function(a,b){sm[a]=b};V.prototype.destroy=V.prototype.destroy;
469
469
  var om="abrstatuschanged",im="adaptation",fm="buffering",nl="drmsessionupdate",Pj="emsg",pm="error",rm="expirationupdated",Xk="loaded",Vk="loading",il="manifestparsed",Nl="metadata",Qk="onstatechange",Rk="onstateidle",gm="ratechange",yl="streaming",mm="textchanged",nm="texttrackvisibility",fl="timelineregionadded",Pl="timelineregionenter",Ql="timelineregionexit",km="trackschanged",al="unloading",lm="variantchanged",tm={Xf:om,Yf:im,Zf:fm,$f:nl,bg:Pj,Error:pm,cg:rm,dg:"largegap",eg:Xk,fg:Vk,gg:il,Metadata:Nl,
470
- hg:Qk,ig:Rk,jg:gm,kg:"sessiondata",lg:yl,mg:mm,ng:nm,og:fl,pg:Pl,qg:Ql,rg:km,sg:al,tg:lm},Sk=0,Bk=1,wl=2,Il=3;V.LoadMode={DESTROYED:Sk,NOT_LOADED:Bk,MEDIA_SOURCE:wl,SRC_EQUALS:Il};V.version="v3.2.19";var um=["3","2"];Lb=new function(a){this.g=a;this.i=Mb;this.h=Nb}(new Jb(Number(um[0]),Number(um[1])));
470
+ hg:Qk,ig:Rk,jg:gm,kg:"sessiondata",lg:yl,mg:mm,ng:nm,og:fl,pg:Pl,qg:Ql,rg:km,sg:al,tg:lm},Sk=0,Bk=1,wl=2,Il=3;V.LoadMode={DESTROYED:Sk,NOT_LOADED:Bk,MEDIA_SOURCE:wl,SRC_EQUALS:Il};V.version="v3.2.20";var um=["3","2"];Lb=new function(a){this.g=a;this.i=Mb;this.h=Nb}(new Jb(Number(um[0]),Number(um[1])));
471
471
  var qm=["output-restricted","internal-error"],sm={},Ek=null,Yk={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},Zl={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
472
472
  ssa:"text/x-ssa",ass:"text/x-ssa"};function vm(){this.h=[];this.j=this.i=this.g=0};function W(a,b){var c=this;this.h=a;this.g=b;this.i=!1;this.l=this.g.getVolume();this.j=new cf;this.j.v(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.i=!0});this.j.v(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.i=!1})}r=W.prototype;r.getDuration=function(){return this.h.getDuration()};r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.g.getRemainingTime()};r.isPaused=function(){return this.i};
473
473
  r.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.g.getAdSkippableState()};r.skip=function(){return this.g.skip()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.resume()};r.getVolume=function(){return this.g.getVolume()};r.setVolume=function(a){return this.g.setVolume(a)};r.isMuted=function(){return 0==this.g.getVolume()};
474
474
  r.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};r.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=null};M("shaka.ads.ClientSideAd",W);
475
475
  W.prototype.release=W.prototype.release;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;W.prototype.skip=W.prototype.skip;
476
- W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function wm(a,b,c,d){var e=this;this.m=a;this.i=b;this.s=null;this.u=NaN;this.j=d;this.o=null;this.h=new cf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.19");this.g=null;this.h.oa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){xm(e,f)});this.h.v(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
477
- function(f){ym(e,f)});this.i.onended=function(){e.l.contentComplete()}}wm.prototype.stop=function(){this.g&&this.g.stop();this.m&&ck(this.m)};wm.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function ym(a,b){b.getError();zm(a,null);a.j(new P("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
476
+ W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function wm(a,b,c,d){var e=this;this.m=a;this.i=b;this.s=null;this.u=NaN;this.j=d;this.o=null;this.h=new cf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.m,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.2.20");this.g=null;this.h.oa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){xm(e,f)});this.h.v(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
477
+ function(f){ym(e,f)});this.h.v(this.i,"ended",function(){e.l.contentComplete()})}wm.prototype.stop=function(){this.g&&this.g.stop();this.m&&ck(this.m)};wm.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function ym(a,b){b.getError();zm(a,null);a.j(new P("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
478
478
  function xm(a,b){a.j(new P("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.j(new P("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new P("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Am(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
479
479
  a.h.v(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)),a.i.addEventListener("play",function(){a.g.start()},{once:!0})}catch(f){zm(a,null)}}
480
480
  function Am(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new P(d,e))}a.h.v(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){ym(a,c)});a.h.v(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Bm(a,c)});a.h.v(a.g,google.ima.AdEvent.Type.STARTED,function(c){Bm(a,c)});a.h.v(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.v(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.v(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
481
481
  function(c){b(c,"ad-third-quartile")});a.h.v(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.v(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){zm(a,c)});a.h.v(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){zm(a,c)});a.h.v(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.v(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.v(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
482
482
  a.h.v(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.o.i=!0;b(c,"ad-paused")});a.h.v(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.o.i=!1;b(c,"ad-resumed")});a.h.v(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.v(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.v(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.v(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.v(a.g,
483
483
  google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.v(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.v(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.v(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.v(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.v(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.v(a.g,google.ima.AdEvent.Type.AD_METADATA,
484
- function(c){b(c,"ad-metadata")});a.h.v(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.v(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.v(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Bm(a,b){var c=b.getAd();a.o=new W(c,a.g);c=(new Map).set("ad",a.o).set("sdkAdObject",c).set("originalEvent",b);a.j(new P("ad-started",c));a.m.setAttribute("ad-active","true");a.i.pause()}
485
- function zm(a,b){a.j(new P("ad-stopped",(new Map).set("originalEvent",b)));a.m.removeAttribute("ad-active");a.i.play()};function X(a,b){this.i=a;this.h=null;this.g=b}r=X.prototype;r.getDuration=function(){return this.h?this.h.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.i.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
484
+ function(c){b(c,"ad-metadata")});a.h.v(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.v(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.v(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
485
+ function Bm(a,b){var c=b.getAd();a.o=new W(c,a.g);c=(new Map).set("ad",a.o).set("sdkAdObject",c).set("originalEvent",b);a.j(new P("ad-started",c));a.m.setAttribute("ad-active","true");a.i.pause();a.o.setVolume(a.i.muted?0:a.i.volume)}function zm(a,b){a.j(new P("ad-stopped",(new Map).set("originalEvent",b)));a.m.removeAttribute("ad-active");a.i.ended||a.i.play()};function X(a,b){this.i=a;this.h=null;this.g=b}r=X.prototype;r.getDuration=function(){return this.h?this.h.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.i.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
486
486
  r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};r.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};
487
487
  r.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",X);X.prototype.release=X.prototype.release;X.prototype.getPositionInSequence=X.prototype.getPositionInSequence;X.prototype.getSequenceLength=X.prototype.getSequenceLength;X.prototype.setMuted=X.prototype.setMuted;X.prototype.resize=X.prototype.resize;X.prototype.isMuted=X.prototype.isMuted;X.prototype.setVolume=X.prototype.setVolume;
488
488
  X.prototype.getVolume=X.prototype.getVolume;X.prototype.play=X.prototype.play;X.prototype.pause=X.prototype.pause;X.prototype.skip=X.prototype.skip;X.prototype.canSkipNow=X.prototype.canSkipNow;X.prototype.getTimeUntilSkippable=X.prototype.getTimeUntilSkippable;X.prototype.isSkippable=X.prototype.isSkippable;X.prototype.isPaused=X.prototype.isPaused;X.prototype.getRemainingTime=X.prototype.getRemainingTime;X.prototype.getMinSuggestedDuration=X.prototype.getMinSuggestedDuration;
@@ -494,8 +494,8 @@ f;e.i(new P("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Cm.prototyp
494
494
  function Dm(a,b){a.i(new P("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.D||a.h.v(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.o=d,a.l.currentTime=e.start)}})};function Y(){Le.call(this);this.g=this.i=null;this.h=new vm;this.j=navigator.language}pa(Y,Le);r=Y.prototype;r.setLocale=function(a){this.j=a};r.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.i&&this.i.release();this.i=new wm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
495
495
  r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Le.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new P("ad-stopped"));this.h=new vm};r.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.l.requestAds(a)};
496
496
  r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new Cm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
497
- r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.2.19";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
498
- (c.D=!0),c.j=new pc,c.g.requestStream(a),c.B=d||"",c.F=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.2.19";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.C};
497
+ r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v3.2.20";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
498
+ (c.D=!0),c.j=new pc,c.g.requestStream(a),c.B=d||"",c.F=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Ua('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v3.2.20";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.C};
499
499
  r.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};M("shaka.ads.AdManager",Y);
500
500
  Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;
501
501
  Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";
@@ -509,11 +509,11 @@ isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySy
509
509
  Rm=["attach","detach","load","unload"];function Sm(a,b,c,d,e,f){var g=this;this.F=a;this.j=new O(b);this.T=c;this.u=!1;this.s=d;this.D=e;this.J=f;this.h=this.m=!1;this.M="";this.o=null;this.B=function(){return Tm(g)};this.C=function(h,k){var l=Fm(k);switch(l.type){case "event":var m=l.targetName;l=Ke(l.event);g.s(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.u&&(g.T(),g.u=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new N(l.severity,l.category,l.code);
510
510
  for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.G=0;this.i={};this.l=null;Um.add(this)}r=Sm.prototype;r.destroy=function(){Um["delete"](this);Vm(this);Wm&&Xm(this);this.j&&(this.j.stop(),this.j=null);this.D=this.s=null;this.h=this.m=!1;this.C=this.B=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.sa=function(){return this.h};r.Gd=function(){return this.M};
511
511
  r.init=function(){if(this.F.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Fb();var a=new chrome.cast.SessionRequest(this.F);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Um),d=c.next();!d.done;d=c.next())Ym(d.value,b)},function(b){for(var c=t(Um),d=c.next();!d.done;d=c.next())d=d.value,Zm="available"==b,d.j.Fb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Zm&&this.j.R($m);(a=Wm)&&a.status!=chrome.cast.SessionStatus.STOPPED?Ym(this,
512
- a):Wm=null}else window.__onGCastApiAvailable!==an&&(bn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=an)};r.Md=function(a){this.o=a;this.h&&cn(this,{type:"appData",appData:this.o})};r.cast=function(a){var b=this;return L(function(c){if(!b.m)throw new N(1,8,8E3);if(!Zm)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new pc;chrome.cast.requestSession(function(d){return mn(b,a,d)},function(d){return nn(b,d)});return u(c,b.l,0)})};
513
- function on(a){if(a.h){var b=a.J();chrome.cast.requestSession(function(c){return mn(a,b,c)},function(c){return nn(a,c)})}}r.ub=function(){if(this.h){Vm(this);if(Wm){Xm(this);try{Wm.stop(function(){},function(){})}catch(a){}Wm=null}Tm(this)}};
512
+ a):Wm=null}else window.__onGCastApiAvailable!==an&&(bn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=an)};r.Md=function(a){this.o=a;this.h&&cn(this,{type:"appData",appData:this.o})};r.cast=function(a){var b=this;return L(function(c){if(!b.m)throw new N(1,8,8E3);if(!Zm)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new pc;chrome.cast.requestSession(function(d){return dn(b,a,d)},function(d){return nn(b,d)});return u(c,b.l,0)})};
513
+ function on(a){if(a.h){var b=a.J();chrome.cast.requestSession(function(c){return dn(a,b,c)},function(c){return nn(a,c)})}}r.ub=function(){if(this.h){Vm(this);if(Wm){Xm(this);try{Wm.stop(function(){},function(){})}catch(a){}Wm=null}Tm(this)}};
514
514
  r.get=function(a,b){var c=this;if("video"==a){if(Km.includes(b))return function(){return c.me.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))}}else if("player"==a){if(Nm[b]&&!this.get("player","isLive")())return function(){};if(Qm.includes(b))return function(){return c.me.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(Rm.includes(b))return function(){return c.Ff.apply(c,[a,b].concat(ia(Fa.apply(0,arguments))))};if(Lm[b]||Mm[b])return function(){return c.g[a][b]}}return this.g[a][b]};
515
- r.set=function(a,b,c){this.g[a][b]=c;cn(this,{type:"set",targetName:a,property:b,value:c})};function mn(a,b,c){Wm=c;c.addUpdateListener(a.B);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);Tm(a);cn(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function nn(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new N(2,8,c,b))}
516
- r.me=function(a,b){cn(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};r.Ff=function(a,b){var c=Fa.apply(2,arguments),d=new pc,e=this.G.toString();this.G++;this.i[e]=d;try{cn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Ym(a,b){var c=a.J();a.l=new pc;a.u=!0;mn(a,c,b)}function Xm(a){var b=Wm;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
515
+ r.set=function(a,b,c){this.g[a][b]=c;cn(this,{type:"set",targetName:a,property:b,value:c})};function dn(a,b,c){Wm=c;c.addUpdateListener(a.B);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);Tm(a);cn(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function nn(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new N(2,8,c,b))}
516
+ r.me=function(a,b){cn(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};r.Ff=function(a,b){var c=Fa.apply(2,arguments),d=new pc,e=this.G.toString();this.G++;this.i[e]=d;try{cn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Ym(a,b){var c=a.J();a.l=new pc;a.u=!0;dn(a,c,b)}function Xm(a){var b=Wm;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
517
517
  function Tm(a){var b=Wm?"connected"==Wm.status:!1;if(a.h&&!b){a.D();for(var c in a.g)a.g[c]={};Vm(a)}a.h=b;a.M=b?Wm.receiver.friendlyName:"";a.j.Fb()}function Vm(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function cn(a,b){var c=Em(b),d=Wm;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Xa)}catch(e){throw c=new N(2,8,8005,e),d=new P("error",(new Map).set("detail",c)),a.s("player",d),a.ub(),c;}}var $m=.02,Zm=!1,Wm=null,bn=null,Um=new Set;
518
518
  function an(a){bn?window.__onGCastApiAvailable=bn:delete window.__onGCastApiAvailable;bn=null;if(a)for(var b=t(Um),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function pn(a,b,c){Le.call(this);var d=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.B=c;this.u=new Map;this.g=new Sm(c,function(){return qn(d)},function(){return rn(d)},function(e,f){return sn(d,e,f)},function(){return tn(d)},function(){return un(d)});vn(this)}pa(pn,Le);r=pn.prototype;
519
519
  r.destroy=function(a){a&&this.g.ub();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;Le.prototype.release.call(this);return Promise.all(a)};r.pf=function(){return this.l};r.ef=function(){return this.s};r.Ge=function(){return this.g.m&&Zm};r.sa=function(){return this.g.sa()};r.Gd=function(){return this.g.Gd()};
@@ -557,8 +557,8 @@ function go(a){var b=a.getAttribute("schemeIdUri"),c=vf(a,"urn:mpeg:cenc:2013","
557
557
  var eo=1,fo=(new Map).set("com.widevine.alpha",function(a){return(a=sf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",co).set("com.microsoft.playready.recommendation",co).set("com.microsoft.playready.software",co).set("com.microsoft.playready.hardware",co);function ho(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
558
558
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
559
559
  function io(a,b){var c=jo(a,b,"timescale"),d=1;c&&(d=Ff(c)||1);var e=jo(a,b,"duration");c=Ff(e||"");"image"==a.I.contentType&&(c=Hf(e||""));c&&(c/=d);var f=jo(a,b,"startNumber");e=Number(jo(a,b,"presentationTimeOffset"))||0;var g=Gf(f||"");if(null==f||null==g)g=1;var h=ko(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.S.duration||Infinity;h=rf(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],q=h[n+1],v=Af(p,"t",Gf),y=Af(p,"d",Gf);p=Af(p,"r",Ef);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
560
- p||0;if(0>p)if(q){q=Af(q,"t",Gf);if(null==q)break;else if(v>=q)break;p=Math.ceil((q-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=p;++q)m=v+y,l.push({start:v/f,end:m/f,Uf:v}),v=m}f=l}return{timescale:d,ha:c,Eb:g,Sa:e/d||0,Ud:e,timeline:f}}function jo(a,b,c){return[b(a.I),b(a.fa),b(a.ca)].filter(Qb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
561
- function ko(a,b,c){return[b(a.I),b(a.fa),b(a.ca)].filter(Qb).map(function(d){return qf(d,c)}).reduce(function(d,e){return d||e})}
560
+ p||0;if(0>p)if(q){q=Af(q,"t",Gf);if(null==q)break;else if(v>=q)break;p=Math.ceil((q-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=p;++q)m=v+y,l.push({start:v/f,end:m/f,Uf:v}),v=m}f=l}return{timescale:d,ia:c,Eb:g,Sa:e/d||0,Ud:e,timeline:f}}function jo(a,b,c){return[b(a.I),b(a.ga),b(a.ca)].filter(Qb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
561
+ function ko(a,b,c){return[b(a.I),b(a.ga),b(a.ca)].filter(Qb).map(function(d){return qf(d,c)}).reduce(function(d,e){return d||e})}
562
562
  function lo(a,b,c,d,e,f){for(var g=vf(a,"http://www.w3.org/1999/xlink","href"),h=vf(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Ee(new N(2,4,4028));if("onLoad"!=h)return Ee(new N(2,4,4027));var m=ic([d],[g]);return e.request(0,Ue(m,b)).Z(function(n){n=Lf(n.data,a.tagName);if(!n)return Ee(new N(2,4,4001,g));
563
563
  for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return mo(a,b,c,m[0],e,f+1)})}
564
564
  function mo(a,b,c,d,e,f){f=void 0===f?0:f;if(vf(a,"http://www.w3.org/1999/xlink","href")){var g=lo(a,b,c,d,e,f);c&&(g=g.Z(void 0,function(){return mo(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==vf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(mo(k,b,c,d,e,f)));return Ie(g).Z(function(){return a})};function no(a,b,c,d,e,f,g){var h,k=(new Fg).O("sidx",function(l){h=oo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
@@ -568,15 +568,15 @@ function ro(a){var b=a.g.W(),c=a.g.X();if(0==c)throw new N(2,3,3002);c=8-Math.fl
568
568
  function uo(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(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 vo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new po(a.g);for(var n=null,p=null;a.na();){var q=qo(a);if(187==q.id){var v=wo(q);v&&(q=c*v.Vf,v=b+v.Ef,null!=n&&m.push(new Ei(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new Ei(n+g,d+g,l,p,null,f,g,h,k));return m}
569
569
  function wo(a){var b=new po(a.g);a=qo(b);if(179!=a.id)throw new N(2,3,3013);a=uo(a);b=qo(b);if(183!=b.id)throw new N(2,3,3012);b=new po(b.g);for(var c=0;b.na();){var d=qo(b);if(241==d.id){c=uo(d);break}}return{Vf:a,Ef:c}};function xo(a,b){var c=ko(a,b,"Initialization");if(!c)return null;var d=a.I.xa,e=c.getAttribute("sourceURL");e&&(d=ic(a.I.xa,[e]));e=0;var f=null;if(c=Af(c,"range",Df))e=c.start,f=c.end;return new Ci(function(){return d},e,f)}
570
570
  function yo(a,b){var c=Number(jo(a,zo,"presentationTimeOffset"))||0,d=jo(a,zo,"timescale"),e=1;d&&(e=Ff(d)||1);var f=c/e||0,g=xo(a,zo);Ao(a,g);var h=Ne(a);return{vb:function(){var k=ko(h,zo,"RepresentationIndex"),l=h.I.xa;k&&(k=k.getAttribute("sourceURL"))&&(l=ic(h.I.xa,[k]));k=Bo(h);return Co(h,b,g,l,k.start,k.end,f)}}}
571
- function Co(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,x,w,D,C,B,E;return L(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Va||!a.S.nd,l=a.S.start,m=a.S.duration,n=a.I.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.ma(),c.ia,c.ba):null],p=null,u(G,Promise.all(v),2);y=G.h;x=y[0];w=y[1]||null;D=null;C=l-g;B=l;E=m?l+m:Infinity;if("mp4"==n)var H=no(x,e,d,c,C,B,E);else{H=new po(w);if(440786851!=qo(H).id)throw new N(2,3,3008);var J=qo(H);if(408125543!=J.id)throw new N(2,3,3009);H=J.g.byteOffset;
571
+ function Co(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,x,w,D,C,B,E;return L(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Va||!a.S.nd,l=a.S.start,m=a.S.duration,n=a.I.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.ma(),c.ja,c.ba):null],p=null,u(G,Promise.all(v),2);y=G.h;x=y[0];w=y[1]||null;D=null;C=l-g;B=l;E=m?l+m:Infinity;if("mp4"==n)var H=no(x,e,d,c,C,B,E);else{H=new po(w);if(440786851!=qo(H).id)throw new N(2,3,3008);var J=qo(H);if(408125543!=J.id)throw new N(2,3,3009);H=J.g.byteOffset;
572
572
  J=new po(J.g);for(var I=null;J.na();){var K=qo(J);if(357149030==K.id){I=K;break}}if(!I)throw new N(2,3,3010);I=new po(I.g);K=1E6;for(J=null;I.na();){var Q=qo(I);if(2807729==Q.id)K=uo(Q);else if(17545==Q.id)if(4==Q.g.byteLength)J=Q.g.getFloat32(0);else if(8==Q.g.byteLength)J=Q.g.getFloat64(0);else throw new N(2,3,3003);}if(null==J)throw new N(2,3,3011);I=K/1E9;J*=I;K=qo(new po(x));if(475249515!=K.id)throw new N(2,3,3007);H=vo(K,H,I,J,d,c,C,B,E)}D=H;h.zb(D);q=new U(D);k&&q.Wa(B,E,!0);return G["return"](q)})}
573
- function zo(a){return a.cc}function Bo(a){var b=ko(a,zo,"RepresentationIndex");a=jo(a,zo,"indexRange");a=Df(a||"");b&&(a=Af(b,"range",Df,a));return a}function Ao(a,b){Do(a,b);if(!Bo(a))throw new N(2,4,4002);}function Do(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=nc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);};function Eo(a,b){var c=xo(a,Fo),d=Go(a);if(!d.ha&&!d.timeline&&1<d.xb.length)throw new N(2,4,4002);if(!d.ha&&!a.S.duration&&!d.timeline&&1==d.xb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.ca.id&&a.I.id&&(f=a.ca.id+","+a.I.id,e=b[f]);c=Ho(a.S.start,a.S.duration,a.I.xa,d,c);d=!e;e?e.yb(c,a.presentationTimeline.Pa()):(e=new U(c),f&&a.Va&&(b[f]=e));a.presentationTimeline.zb(c);a.Va&&a.S.nd||e.Wa(a.S.start,a.S.duration?a.S.start+a.S.duration:
574
- Infinity,d);return{vb:function(){return Promise.resolve(e)}}}function Fo(a){return a.Ya}function Go(a){var b=Io(a);a=io(a,Fo);var c=a.Eb;0==c&&(c=1);var d=0;a.ha?d=a.ha*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ha:a.ha,startTime:d,Eb:c,Sa:a.Sa,timeline:a.timeline,xb:b}}
575
- function Ho(a,b,c,d,e){var f=d.xb.length;d.timeline&&d.timeline.length!=d.xb.length&&(f=Math.min(d.timeline.length,d.xb.length));for(var g=a-d.Sa,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Uc:m.Uc},n++){var p=d.xb[n];m.Uc=ic(c,[p.wf]);var q=void 0;q=null!=d.ha?l+d.ha:d.timeline?d.timeline[n].end:l+b;k.push(new Ei(a+l,a+q,function(v){return function(){return v.Uc}}(m),p.start,p.end,e,g,a,h));l=q}return k}
576
- function Io(a){return[a.I.Ya,a.fa.Ya,a.ca.Ya].filter(Qb).map(function(b){return rf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.fe&&(a.fe=!0);var c=b.getAttribute("media");b=Af(b,"mediaRange",Df,{start:0,end:null});return{wf:c,start:b.start,end:b.end}})};function Jo(a,b,c,d,e,f){var g=Ko(a),h=Lo(a);Mo(h);var k=Ne(a);if(h.Zb)return Do(a,g),{vb:function(){var v=ho(h.Zb,k.I.id,null,k.bandwidth||null,null);v=ic(k.I.xa,[v]);return Co(k,b,g,v,0,null,h.Sa)}};if(h.ha)return d||"image"===a.fa.contentType||(a.presentationTimeline.Bd(h.ha),a.presentationTimeline.Cd(a.S.start)),{vb:function(){return No(k,h,e,g,f)}};var l=null;d=null;a.ca.id&&a.I.id&&(d=a.ca.id+","+a.I.id,l=c[d]);var m=Oo(k,h,g),n=a.S.start,p=a.S.duration?a.S.start+a.S.duration:Infinity,q=!(a.Va&&
577
- a.S.nd);l?(q&&(new U(m)).Wa(n,p,!0),l.yb(m,a.presentationTimeline.Pa())):(l=new U(m),d&&a.Va&&(c[d]=l));a.presentationTimeline.zb(m);q&&l.Wa(n,p);return{vb:function(){return Promise.resolve(l)}}}function Po(a){return a.dc}function Lo(a){var b=io(a,Po),c=jo(a,Po,"media");a=jo(a,Po,"index");return{ha:b.ha,timescale:b.timescale,Eb:b.Eb,Sa:b.Sa,Ud:b.Ud,timeline:b.timeline,yd:c,Zb:a}}
578
- function Mo(a){var b=a.Zb?1:0;b+=a.timeline?1:0;b+=a.ha?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.Zb&&(a.timeline=null),a.ha=null);if(!a.Zb&&!a.yd)throw new N(2,4,4002);}
579
- function No(a,b,c,d,e){function f(I){var K=(I-q)*p,Q=K+b.Sa,T=K+l;K=T+p;var R=Math.min(K,h());T=new Ei(T,R,function(){var da=ho(y,w,I,x,Q*v);return ic(D,[da])},0,null,d,C,l,h());T.l=K;return T}function g(){var I=[Math.max(k.Pa(),l),Math.min(k.eb(),h())].map(function(K){return K-l});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(K){return K+q})}function h(){var I=null!=m&&e[m]||n;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.S.start,m=a.ca.id,n=a.S.duration,p=b.ha,q=b.Eb,v=b.timescale,
573
+ function zo(a){return a.cc}function Bo(a){var b=ko(a,zo,"RepresentationIndex");a=jo(a,zo,"indexRange");a=Df(a||"");b&&(a=Af(b,"range",Df,a));return a}function Ao(a,b){Do(a,b);if(!Bo(a))throw new N(2,4,4002);}function Do(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=nc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);};function Eo(a,b){var c=xo(a,Fo),d=Go(a);if(!d.ia&&!d.timeline&&1<d.xb.length)throw new N(2,4,4002);if(!d.ia&&!a.S.duration&&!d.timeline&&1==d.xb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.ca.id&&a.I.id&&(f=a.ca.id+","+a.I.id,e=b[f]);c=Ho(a.S.start,a.S.duration,a.I.xa,d,c);d=!e;e?e.yb(c,a.presentationTimeline.Pa()):(e=new U(c),f&&a.Va&&(b[f]=e));a.presentationTimeline.zb(c);a.Va&&a.S.nd||e.Wa(a.S.start,a.S.duration?a.S.start+a.S.duration:
574
+ Infinity,d);return{vb:function(){return Promise.resolve(e)}}}function Fo(a){return a.Ya}function Go(a){var b=Io(a);a=io(a,Fo);var c=a.Eb;0==c&&(c=1);var d=0;a.ia?d=a.ia*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ia:a.ia,startTime:d,Eb:c,Sa:a.Sa,timeline:a.timeline,xb:b}}
575
+ function Ho(a,b,c,d,e){var f=d.xb.length;d.timeline&&d.timeline.length!=d.xb.length&&(f=Math.min(d.timeline.length,d.xb.length));for(var g=a-d.Sa,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={Uc:m.Uc},n++){var p=d.xb[n];m.Uc=ic(c,[p.wf]);var q=void 0;q=null!=d.ia?l+d.ia:d.timeline?d.timeline[n].end:l+b;k.push(new Ei(a+l,a+q,function(v){return function(){return v.Uc}}(m),p.start,p.end,e,g,a,h));l=q}return k}
576
+ function Io(a){return[a.I.Ya,a.ga.Ya,a.ca.Ya].filter(Qb).map(function(b){return rf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.fe&&(a.fe=!0);var c=b.getAttribute("media");b=Af(b,"mediaRange",Df,{start:0,end:null});return{wf:c,start:b.start,end:b.end}})};function Jo(a,b,c,d,e,f){var g=Ko(a),h=Lo(a);Mo(h);var k=Ne(a);if(h.Zb)return Do(a,g),{vb:function(){var v=ho(h.Zb,k.I.id,null,k.bandwidth||null,null);v=ic(k.I.xa,[v]);return Co(k,b,g,v,0,null,h.Sa)}};if(h.ia)return d||"image"===a.ga.contentType||(a.presentationTimeline.Bd(h.ia),a.presentationTimeline.Cd(a.S.start)),{vb:function(){return No(k,h,e,g,f)}};var l=null;d=null;a.ca.id&&a.I.id&&(d=a.ca.id+","+a.I.id,l=c[d]);var m=Oo(k,h,g),n=a.S.start,p=a.S.duration?a.S.start+a.S.duration:Infinity,q=!(a.Va&&
577
+ a.S.nd);l?(q&&(new U(m)).Wa(n,p,!0),l.yb(m,a.presentationTimeline.Pa())):(l=new U(m),d&&a.Va&&(c[d]=l));a.presentationTimeline.zb(m);q&&l.Wa(n,p);return{vb:function(){return Promise.resolve(l)}}}function Po(a){return a.dc}function Lo(a){var b=io(a,Po),c=jo(a,Po,"media");a=jo(a,Po,"index");return{ia:b.ia,timescale:b.timescale,Eb:b.Eb,Sa:b.Sa,Ud:b.Ud,timeline:b.timeline,yd:c,Zb:a}}
578
+ function Mo(a){var b=a.Zb?1:0;b+=a.timeline?1:0;b+=a.ia?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.Zb&&(a.timeline=null),a.ia=null);if(!a.Zb&&!a.yd)throw new N(2,4,4002);}
579
+ function No(a,b,c,d,e){function f(I){var K=(I-q)*p,Q=K+b.Sa,T=K+l;K=T+p;var R=Math.min(K,h());T=new Ei(T,R,function(){var da=ho(y,w,I,x,Q*v);return ic(D,[da])},0,null,d,C,l,h());T.l=K;return T}function g(){var I=[Math.max(k.Pa(),l),Math.min(k.eb(),h())].map(function(K){return K-l});return[Math.ceil(I[0]/p),Math.ceil(I[1]/p)-1].map(function(K){return K+q})}function h(){var I=null!=m&&e[m]||n;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.S.start,m=a.ca.id,n=a.S.duration,p=b.ia,q=b.Eb,v=b.timescale,
580
580
  y=b.yd,x=a.bandwidth||null,w=a.I.id,D=a.I.xa,C=l-b.Sa,B=g();a=a.Va?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var E=a;E<=B;++E){var G=f(E);c.push(G)}var H=new U(c);c=k.eb()<h();E=k.U();if(c||E){var J=Math.max(a,B+1);H.Lc(p,function(){var I=k.Pa();H.ab(I);var K=t(g());K.next();K=K.next().value;for(var Q=[];J<=K;){var T=f(J);Q.push(T);J++}return I>h()&&!Q.length?null:Q})}return Promise.resolve(H)}
581
581
  function Oo(a,b,c){var d=a.S.start,e=a.S.duration,f=d-b.Sa;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Tc:h.Tc,Xc:h.Xc,$c:h.$c,Qc:h.Qc,bd:h.bd,Rc:h.Rc},k++){var l=b.timeline[k],m=l.start,n=l.Uf;l=l.end;h.$c=k+b.Eb;h.bd=n+b.Ud;h.Xc=a.I.id;h.Qc=a.bandwidth||null;h.Tc=b.yd;h.Rc=a.I.xa;g.push(new Ei(d+m,d+l,function(p){return function(){var q=ho(p.Tc,p.Xc,p.$c,p.Qc||null,p.bd);return ic(p.Rc,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
582
582
  function Ko(a){var b=jo(a,Po,"initialization");if(!b)return null;var c=a.I.id,d=a.bandwidth||null,e=a.I.xa;return new Ci(function(){var f=ho(b,c,null,d,null);return ic(e,[f])},0,null)};function Qo(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Qo.prototype.release=function(){for(var a=t(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
@@ -612,7 +612,7 @@ function wp(a){var b,c,d,e,f,g,h;return L(function(k){if(1==k.g)return b=Ue(a.l,
612
612
  function yp(a,b,c){var d,e,f,g,h;return L(function(k){if(1==k.g){d=Lf(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](zp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=mo(d,a.g.retryParameters,f,c,a.h.networkingEngine);Pe(a.m,g);return u(k,g.promise,2)}h=k.h;return k["return"](zp(a,h,c))})}
613
613
  function zp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q,T,R,da,sa,Ma,Ja,Aa;return L(function(Na){switch(Na.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=rf(b,"Location").map(xf).filter(Qb);0<f.length&&(g=ic(e,f),e=a.l=g);h=rf(b,"BaseURL");k=h.map(xf);l=ic(e,k);m=0;h&&h.length&&(m=Af(h[0],"availabilityTimeOffset",Hf)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Af(b,"minBufferTime",Cf)||0);a.D=Af(b,"minimumUpdatePeriod",Cf,-1);q=Af(b,"availabilityStartTime",Bf);v=Af(b,
614
614
  "timeShiftBufferDepth",Cf);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Af(b,"suggestedPresentationDelay",Cf));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=Af(b,"maxSegmentDuration",Cf));C=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,E=t(Object.values(a.u)),G=E.next();!G.done;G=E.next())H=G.value,H.ab(B.Pa());else J=a.g.defaultPresentationDelay||1.5*p,I=null!=x?x:J,B=new S(q,I,a.g.dash.autoCorrectDrift);B.ec("static"==C);(K=B.U())&&!isNaN(a.g.availabilityWindowOverride)&&
615
- (v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.Qd(v);Q=b.getAttribute("profiles")||"";T={Va:"static"!=C,presentationTimeline:B,ca:null,S:null,fa:null,I:null,bandwidth:0,fe:!1,tb:m,profiles:Q.split(",")};R=Ap(a,T,l,b);da=R.duration;sa=R.periods;"static"!=C&&R.Zd||B.Ha(da||Infinity);a.s&&!a.B&&(Ma=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.B=a.h.isLowLatencyMode());a.B?B.se(a.s):a.s&&Ua("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
615
+ (v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.Qd(v);Q=b.getAttribute("profiles")||"";T={Va:"static"!=C,presentationTimeline:B,ca:null,S:null,ga:null,I:null,bandwidth:0,fe:!1,tb:m,profiles:Q.split(",")};R=Ap(a,T,l,b);da=R.duration;sa=R.periods;"static"!=C&&R.Zd||B.Ha(da||Infinity);a.s&&!a.B&&(Ma=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.B=a.h.isLowLatencyMode());a.B?B.se(a.s):a.s&&Ua("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
616
616
  B.Bd(D||1);return u(Na,Ro(a.j,sa,T.Va),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Na.A(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0};if(!B.xe()){Na.A(4);break}Ja=rf(b,"UTCTiming");return u(Na,Bp(a,l,Ja),5);case 5:Aa=Na.h;if(!a.h)return Na["return"]();B.te(Aa);case 4:B.vd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Na)}})}
617
617
  function Ap(a,b,c,d){var e=Af(d,"mediaPresentationDuration",Cf),f=[],g=0;d=rf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Af(k,"start",Cf,g),n=k.id,p=Af(k,"duration",Cf),q=null;if(l){var v=Af(l,"start",Cf);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.o&&null!==n&&null!==m&&m<a.o)||a.J.includes(n)||h+1==d.length){null!==m&&(null===a.o||m>a.o)&&(a.o=m);g=Cp(a,b,c,{start:m,duration:q,node:k,nd:null==q||!l});f.push(g);b.ca.id&&q&&(a.M[b.ca.id]=q);if(null==q){g=
618
618
  null;break}g=m+q}}a.J=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,Zd:!1}:{periods:f,duration:g,Zd:!0}}
@@ -620,16 +620,16 @@ function Cp(a,b,c,d){b.ca=Dp(d.node,null,c);b.S=d;b.ca.tb=b.tb;b.ca.id||(b.ca.id
620
620
  }d=c.filter(function(m){return!m.Sd});c=c.filter(function(m){return m.Sd});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Sd.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={mc:h.mc},l=k.next())h.mc=l.value,h.mc.trickModeVideo=e.streams.find(function(m){return function(n){return bd(m.mc.codecs)==bd(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:Gp(d,"audio");g=a.g.disableVideo?[]:Gp(d,"video");f=a.g.disableText?
621
621
  []:Gp(d,nc);c=a.g.disableThumbnails?[]:Gp(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.ca.id,oc:d,Nc:e,textStreams:g,imageStreams:f}}
622
622
  function Gp(a,b){return a.filter(function(c){return c.contentType==b})}
623
- function Fp(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.fa=Dp(c,b.ca,null);var e=!1,f=rf(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Qb),h=void 0,k=b.fa.contentType==nc;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
623
+ function Fp(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ga=Dp(c,b.ca,null);var e=!1,f=rf(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Qb),h=void 0,k=b.ga.contentType==nc;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
624
624
  l}}var n;m=rf(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var q=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==q?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=rf(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
625
625
  10)));m=rf(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(q=p.value,p=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=q){q=q.split(";");for(var y=t(q),x=y.next();!x.done;x=y.next()){var w=x.value,D=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(x="CC"+p,2==q.length?p+=2:p++,D=w);v.set(x,pd(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
626
626
  1,null!=q)for(q=t(q.split(";")),x=q.next();!x.done;x=q.next())x=x.value,w=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],w=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,w=x),v.set(y,pd(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=rf(c,"ContentProtection");var C=Xn(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=pd(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=rf(c,"Label"))&&l.length&&
627
- (l=l[0],l.textContent&&(E=l.textContent));l=rf(c,"Representation");c=l.map(function(G){if(G=Hp(a,b,C,h,B,E,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.fa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.fa.contentType||"application"==b.fa.contentType)for(b.fa.contentType=Ip(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.fa.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
628
- m.value,p=t(C.drmInfos),q=p.next();!q.done;q=p.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ia(q.keyIds),ia(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Qb);return{id:b.fa.id||"__fake__"+a.F++,contentType:b.fa.contentType,language:B,vg:e,streams:c,drmInfos:C.drmInfos,Sd:f,Hf:k}}
629
- function Hp(a,b,c,d,e,f,g,h,k,l){b.I=Dp(l,b.fa,null);a.s=Math.min(a.s,b.I.tb);if(!Jp(b.I))return null;var m=b.S.start;b.bandwidth=Af(l,"bandwidth",Ff)||0;var n=b.I.contentType,p=n==nc||"application"==n;n="image"==n;try{var q=function(G,H,J){return Kp(a,G,H,J)};if(b.I.cc)var v=yo(b,q);else if(b.I.Ya)v=Eo(b,a.u);else if(b.I.dc)v=Jo(b,q,a.u,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.I.xa,x=b.S.duration||0;v={vb:function(){return Promise.resolve(bj(m,x,y))}}}}catch(G){if((p||n)&&4002==G.code)return null;
627
+ (l=l[0],l.textContent&&(E=l.textContent));l=rf(c,"Representation");c=l.map(function(G){if(G=Hp(a,b,C,h,B,E,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.ga.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.ga.contentType||"application"==b.ga.contentType)for(b.ga.contentType=Ip(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ga.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
628
+ m.value,p=t(C.drmInfos),q=p.next();!q.done;q=p.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ia(q.keyIds),ia(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Qb);return{id:b.ga.id||"__fake__"+a.F++,contentType:b.ga.contentType,language:B,vg:e,streams:c,drmInfos:C.drmInfos,Sd:f,Hf:k}}
629
+ function Hp(a,b,c,d,e,f,g,h,k,l){b.I=Dp(l,b.ga,null);a.s=Math.min(a.s,b.I.tb);if(!Jp(b.I))return null;var m=b.S.start;b.bandwidth=Af(l,"bandwidth",Ff)||0;var n=b.I.contentType,p=n==nc||"application"==n;n="image"==n;try{var q=function(G,H,J){return Kp(a,G,H,J)};if(b.I.cc)var v=yo(b,q);else if(b.I.Ya)v=Eo(b,a.u);else if(b.I.dc)v=Jo(b,q,a.u,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.I.xa,x=b.S.duration||0;v={vb:function(){return Promise.resolve(bj(m,x,y))}}}}catch(G){if((p||n)&&4002==G.code)return null;
630
630
  throw G;}q=rf(l,"ContentProtection");q=$n(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var w=!1;rf(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(w=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var C;if(n&&((l=rf(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
631
631
  (C=l.getAttribute("value")),!C))return null;var B;l=b.I.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(B="PQ");var E={id:a.F++,originalId:b.I.id,createSegmentIndex:function(){var G;return L(function(H){if(1==H.g){if(E.segmentIndex)return H.A(0);G=E;return u(H,v.vb(),3)}G.segmentIndex=H.h;z(H)})},segmentIndex:null,mimeType:b.I.mimeType,codecs:b.I.codecs,frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,
632
- bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.fa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.I.Dd,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:B,tilesLayout:C};return E}
632
+ bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.ga.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.I.Dd,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:B,tilesLayout:C};return E}
633
633
  function vp(a){var b,c;L(function(d){switch(d.g){case 1:return b=0,A(d,2),u(d,wp(a),4);case 4:b=d.h;va(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();xp(a,b);z(d)}})}function xp(a,b){0>a.D||a.C.R(Math.max(3,a.D-b,Qa(a.G)))}
634
634
  function Dp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Dd:null,audioSamplingRate:null,tb:0};c=c||b.xa;var d=rf(a,"BaseURL"),e=d.map(xf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Af(a,"frameRate",If)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=rf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
635
635
  m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=rf(a,"AudioChannelConfiguration");m=Lp(m)||b.Dd;p=Af(a,"audioSamplingRate",Gf)||b.audioSamplingRate;f||(f=Ip(g,h));var q=qf(a,"SegmentBase"),v=qf(a,"SegmentTemplate"),y=q?Af(q,"availabilityTimeOffset",Hf)||0:0,x=v?Af(v,"availabilityTimeOffset",Hf)||0:0;d=d&&d.length?Af(d[0],"availabilityTimeOffset",Hf)||0:0;d=b.tb+d+y+x;return{xa:ic(c,e),cc:q||b.cc,Ya:qf(a,"SegmentList")||b.Ya,dc:v||b.dc,width:Af(a,"width",Gf)||b.width,height:Af(a,
@@ -647,14 +647,14 @@ function aq(a,b,c){b=Ic(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d
647
647
  var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=bq(a,m),cq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=ic([d],[m.trim()])[0],h&&g.push(h),e.push(new Qp(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Qp("",g,k)));return new Np(c,b,f,e)}f.push(h);
648
648
  "EXT-X-STREAM-INF"==h.name&&(h.g.push(new Rp("URI",k)),e=!0)}}return new Np(c,b,f)}function bq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new N(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new Wp(f);var h;(h=Yp(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Yp(f,k);)d.push(new Rp(h[1],h[2]||h[3])),Xp(f)}return new Op(c,e,d,g)}
649
649
  var cq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),dq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function eq(){}function fq(a){try{var b=gq(a);return Ge({uri:a,ke:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ee(c)}}function gq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Rc(a):e=Mc(a);return{data:e,contentType:c}}
650
- M("shaka.net.DataUriPlugin",eq);eq.parse=fq;Re("data",fq);function hq(){var a=this;this.g=this.j=null;this.Ka=1;this.o=new Map;this.u=new Map;this.Da=new Set;this.h=new Map;this.i=null;this.M="";this.da=new $p;this.wa=0;this.B=new O(function(){iq(a)});this.m=jq;this.C=null;this.ja=0;this.F=Infinity;this.aa=this.ka=0;this.D=new Oe;this.V=[];this.J=new Map;this.La=!1;this.s=new Map;this.T=null;this.ea=new Map;this.G=new Map;this.l=!1}r=hq.prototype;r.configure=function(a){this.g=a};
650
+ M("shaka.net.DataUriPlugin",eq);eq.parse=fq;Re("data",fq);function hq(){var a=this;this.g=this.j=null;this.Ka=1;this.o=new Map;this.u=new Map;this.Da=new Set;this.h=new Map;this.i=null;this.M="";this.da=new $p;this.wa=0;this.B=new O(function(){iq(a)});this.m=jq;this.C=null;this.fa=0;this.F=Infinity;this.aa=this.ka=0;this.D=new Oe;this.V=[];this.J=new Map;this.La=!1;this.s=new Map;this.T=null;this.ea=new Map;this.G=new Map;this.l=!1}r=hq.prototype;r.configure=function(a){this.g=a};
651
651
  r.start=function(a,b){var c=this,d,e;return L(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,kq(c,Ue([a],c.g.retryParameters),0),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,lq(c,d.data),3);e=c.wa;0<e&&c.B.R(e);return f["return"](c.C)})};r.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.g=this.j=null;this.Da.clear();this.C=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
652
652
  r.update=function(){var a=this,b,c,d;return L(function(e){if(1==e.g){if(a.m==jq)return e["return"]();b=[];a.T=null;c=Array.from(a.h.values());return c.length?u(e,mq(a,c[0]),2):e.A(2)}for(d=1;d<c.length;d++)b.push(mq(a,c[d]));return u(e,Promise.all(b),0)})};
653
653
  function mq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v;return L(function(y){if(1==y.g)return c=nq,d=b.Ce,e=new Wb(d),a.l&&b.He&&Zb(e,new ac("_HLS_skip=YES")),u(y,kq(a,Ue([e.toString()],a.g.retryParameters),0),2);if(3!=y.g){f=y.h;g=aq(a.da,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=Sp(g.g,"EXT-X-DEFINE");k=oq(a,h);l=b.stream;return u(y,pq(a,b.Mc,g,l.type,l.mimeType,b.xd,k,b.Oe),3)}m=y.h;l.segmentIndex.yb(m,a.i.Pa());m.length&&(n=Vp(g.g,"EXT-X-MEDIA-SEQUENCE",0),p=b.xd.get(n),l.segmentIndex.ab(p));
654
654
  q=m[m.length-1];if(v=Up(g.g,"EXT-X-ENDLIST"))qq(a,c.Be),a.i.Ha(q.endTime);z(y)})}r.onExpirationUpdated=function(){};
655
655
  function lq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q,T,R,da,sa,Ma,Ja,Aa,Na,Cc,md;return L(function(ab){switch(ab.g){case 1:c=aq(a.da,b,a.M);if(0!=c.type)throw new N(2,4,4022);d=Sp(c.g,"EXT-X-DEFINE");rq(a,d);e=Sp(c.g,"EXT-X-MEDIA");f=Sp(c.g,"EXT-X-STREAM-INF");g=Sp(c.g,"EXT-X-IMAGE-STREAM-INF");sq(a,f);h=Sp(c.g,"EXT-X-SESSION-DATA");k=t(h);for(l=k.next();!l.done;l=k.next())if(m=l.value,n=Z(m,"DATA-ID"),p=Z(m,"URI"),q=Z(m,"LANGUAGE"),v=Z(m,"VALUE"),y=(new Map).set("id",n),p&&y.set("uri",
656
656
  ic([a.M],[p])[0]),q&&y.set("language",q),v&&y.set("value",v),x=new P("sessiondata",y),a.j)a.j.onEvent(x);return u(ab,tq(a,e),2);case 2:return uq(a,e),u(ab,vq(a,f),3);case 3:return w=ab.h,u(ab,wq(a,e),4);case 4:return D=ab.h,u(ab,xq(a,g),5);case 5:C=ab.h;if(!a.j)throw new N(2,7,7001);if(a.La&&0==w.length)throw new N(2,4,4034);E=B=Infinity;G=t(a.h.values());for(H=G.next();!H.done;H=G.next())J=H.value,B=Math.min(B,J.he),"text"!=J.stream.type&&(E=Math.min(E,J.vf-J.he));a.m!=jq?(a.i=new S(0,a.g.defaultPresentationDelay?
657
- a.g.defaultPresentationDelay:a.aa?a.aa:3*a.ja),a.i.ec(!1)):(a.i=new S(null,0),a.i.ec(!0));if(a.m!=jq)a.wa=a.F,I=nq,a.m==I.Ae&&(K=a.i.Jc,isNaN(a.g.availabilityWindowOverride)||(K=a.g.availabilityWindowOverride),a.i.Qd(K));else for(a.i.Ha(E),a.i.offset(-B),Q=t(a.h.values()),H=Q.next();!H.done;H=Q.next())T=H.value,T.stream.segmentIndex.offset(-B),T.stream.segmentIndex.Wa(0,E);a.V=[];R=[];da=t(w);for(sa=da.next();!sa.done;sa=da.next())for(Ma=sa.value,Ja=t([Ma.video,Ma.audio]),Aa=Ja.next();!Aa.done;Aa=
657
+ a.g.defaultPresentationDelay:a.aa?a.aa:3*a.fa),a.i.ec(!1)):(a.i=new S(null,0),a.i.ec(!0));if(a.m!=jq)a.wa=a.F,I=nq,a.m==I.Ae&&(K=a.i.Jc,isNaN(a.g.availabilityWindowOverride)||(K=a.g.availabilityWindowOverride),a.i.Qd(K));else for(a.i.Ha(E),a.i.offset(-B),Q=t(a.h.values()),H=Q.next();!H.done;H=Q.next())T=H.value,T.stream.segmentIndex.offset(-B),T.stream.segmentIndex.Wa(0,E);a.V=[];R=[];da=t(w);for(sa=da.next();!sa.done;sa=da.next())for(Ma=sa.value,Ja=t([Ma.video,Ma.audio]),Aa=Ja.next();!Aa.done;Aa=
658
658
  Ja.next())(Na=Aa.value)&&R.push(Na);return u(ab,Promise.all(R.map(function(Dc){return L(function(he){return u(he,Dc.createSegmentIndex(),0)})})),6);case 6:Cc=t(R);for(Aa=Cc.next();!Aa.done;Aa=Cc.next())md=Aa.value,a.V.push(md.segmentIndex.K);yq(a);a.i.vd();a.C={presentationTimeline:a.i,variants:w,textStreams:D,imageStreams:C,offlineSessionIds:[],minBufferTime:0};a.j.makeTextStreamsForClosedCaptions(a.C);z(ab)}})}
659
659
  function rq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Z(e,"NAME");e=Z(e,"VALUE");d&&e&&(a.o.has(d)||a.o.set(d,e))}}function oq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.o.get(f))&&c.set(f,e)}return c}
660
660
  function sq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Z(e,"AUDIO");d=Z(e,"VIDEO");var g=Z(e,"SUBTITLES");e=zq(a,e);if(g){var h=lc(nc,e);a.s.set(g,h);fb(e,h)}f&&(g=kc("audio",e),a.s.set(f,g));d&&(f=kc("video",e),a.s.set(d,f))}}
@@ -673,19 +673,19 @@ v="YES"==q;return u(x,Hq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.u.has(c)?a.u.get
673
673
  function Bq(a,b){var c,d,e,f,g,h,k,l,m,n;return L(function(p){if(1==p.g){c=Gq(Pp(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=Fq(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(p,Hq(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(null==h)return p["return"](null);if(a.h.has(c))return p["return"](a.h.get(c));if(k=Z(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
674
674
  Number(k.split("x")[1])*Number(m.split("x")[1]);if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}
675
675
  function Dq(a,b,c,d){var e,f,g,h;return L(function(k){if(1==k.g){e=Gq(Pp(b,"URI"),a.o);if(a.h.has(e))return k["return"](a.h.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.J.get(l):null;g=kc(d,c);return u(k,Hq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.h.has(e))return k["return"](a.h.get(e));a.h.set(e,h);return k["return"](h)})}
676
- function Hq(a,b,c,d,e,f,g,h,k,l,m,n){var p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q,T,R,da,sa,Ma,Ja,Aa,Na,Cc,md,ab,Dc,he,dn,en,fn,gn,Rh,Sh,zf,hn,jn,kn,ln;return L(function(bb){switch(bb.g){case 1:return p=ic([a.M],[b])[0],u(bb,kq(a,Ue([p],a.g.retryParameters),0),2);case 2:q=bb.h;p=q.uri;v=aq(a.da,q.data,p);if(1!=v.type)throw new N(2,4,4017);y=[];if(v.segments)for(x=t(v.segments),w=x.next();!w.done;w=x.next())D=w.value,C=Sp(D.g,"EXT-X-KEY"),y.push.apply(y,ia(C));B=!1;E=[];G=new Set;H=t(y);for(J=H.next();!J.done;J=
676
+ function Hq(a,b,c,d,e,f,g,h,k,l,m,n){var p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q,T,R,da,sa,Ma,Ja,Aa,Na,Cc,md,ab,Dc,he,en,fn,gn,hn,Rh,Sh,zf,jn,kn,ln,mn;return L(function(bb){switch(bb.g){case 1:return p=ic([a.M],[b])[0],u(bb,kq(a,Ue([p],a.g.retryParameters),0),2);case 2:q=bb.h;p=q.uri;v=aq(a.da,q.data,p);if(1!=v.type)throw new N(2,4,4017);y=[];if(v.segments)for(x=t(v.segments),w=x.next();!w.done;w=x.next())D=w.value,C=Sp(D.g,"EXT-X-KEY"),y.push.apply(y,ia(C));B=!1;E=[];G=new Set;H=t(y);for(J=H.next();!J.done;J=
677
677
  H.next())if(I=J.value,K=Pp(I,"METHOD"),"NONE"!=K){B=!0;if("AES-128"==K)return a.La=!0,bb["return"](null);Q=Pp(I,"KEYFORMAT");if(R=(T=Iq[Q])?T(I):null){if(R.keyIds)for(da=t(R.keyIds),sa=da.next();!sa.done;sa=da.next())Ma=sa.value,G.add(Ma);E.push(R)}}if(B&&!E.length)throw new N(2,4,4026);Ja=Sp(v.g,"EXT-X-DEFINE");Aa=oq(a,Ja);Jq(a,v);return u(bb,Kq(a,d,c,v,Aa),3);case 3:return Na=bb.h,Lq.includes(Na)&&(c=""),Cc=new Map,md=new Map,ab=a.l,A(bb,4),u(bb,pq(a,b,v,d,Na,Cc,Aa,md),6);case 6:Dc=bb.h;va(bb,5);
678
- break;case 4:he=F(bb);if(4035==he.code)return Ua("Skipping unsupported HLS stream",Na,b),bb["return"](null);throw he;case 5:ab!=a.l&&Jq(a,v);dn=Dc[0].startTime;en=Dc[Dc.length-1].endTime;fn=new U(Dc);gn=d==nc?"subtitle":void 0;Rh=[];if(l)for(Sh=t(l.split(",")),zf=Sh.next();!zf.done;zf=Sh.next())hn=zf.value,Rh.push(hn);kn=(jn=Up(v.g,"EXT-X-SERVER-CONTROL"))?null!=jn.getAttribute("CAN-SKIP-UNTIL"):!1;ln={id:a.Ka++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:fn,
679
- mimeType:Na,codecs:c,kind:gn,encrypted:B,drmInfos:E,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Rh,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return bb["return"]({stream:ln,Mc:b,Ce:p,he:dn,vf:en,xd:Cc,Oe:md,He:kn})}})}
680
- function Jq(a,b){var c=Up(b.g,"EXT-X-PLAYLIST-TYPE"),d=Up(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)qq(a,jq);else{c?qq(a,Mq):qq(a,Nq);d=Up(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Up(b.g,"EXT-X-PART-INF");a.l&&c?(a.ka=Number(Pp(c,"PART-TARGET")),a.F=Math.min(a.ka,a.F),c=Up(b.g,"EXT-X-SERVER-CONTROL"),a.aa=c?Number(Pp(c,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.ja=Math.max(d,a.ja)}}
678
+ break;case 4:he=F(bb);if(4035==he.code)return Ua("Skipping unsupported HLS stream",Na,b),bb["return"](null);throw he;case 5:ab!=a.l&&Jq(a,v);en=Dc[0].startTime;fn=Dc[Dc.length-1].endTime;gn=new U(Dc);hn=d==nc?"subtitle":void 0;Rh=[];if(l)for(Sh=t(l.split(",")),zf=Sh.next();!zf.done;zf=Sh.next())jn=zf.value,Rh.push(jn);ln=(kn=Up(v.g,"EXT-X-SERVER-CONTROL"))?null!=kn.getAttribute("CAN-SKIP-UNTIL"):!1;mn={id:a.Ka++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:gn,
679
+ mimeType:Na,codecs:c,kind:hn,encrypted:B,drmInfos:E,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Rh,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return bb["return"]({stream:mn,Mc:b,Ce:p,he:en,vf:fn,xd:Cc,Oe:md,He:ln})}})}
680
+ function Jq(a,b){var c=Up(b.g,"EXT-X-PLAYLIST-TYPE"),d=Up(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)qq(a,jq);else{c?qq(a,Mq):qq(a,Nq);d=Up(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Up(b.g,"EXT-X-PART-INF");a.l&&c?(a.ka=Number(Pp(c,"PART-TARGET")),a.F=Math.min(a.ka,a.F),c=Up(b.g,"EXT-X-SERVER-CONTROL"),a.aa=c?Number(Pp(c,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.fa=Math.max(d,a.fa)}}
681
681
  function Oq(a,b,c,d){c=Up(c,"EXT-X-MAP");if(!c)return null;var e=Pp(c,"URI");d=Gq(ic([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ea.has(b)||(c=Pq(d,c),a.ea.set(b,c));return a.ea.get(b)}function Pq(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new Ci(function(){return[a]},c,d)}
682
682
  function Qq(a,b,c,d,e,f,g,h,k){var l=d.g,m=Gq(d.h,g),n=Up(l,"EXTINF"),p=g=0,q=null;if(!n){if(0==d.i.length)throw new N(2,4,4024,"EXTINF");if(!a.l)return null}var v=[];if(a.l)for(var y={},x=0;x<d.i.length;y={Vc:y.Vc},x++){var w=d.i[x],D=0==x?c:v[v.length-1],C=0==x?e:D.endTime,B=Number(Z(w,"DURATION"))||a.ka;if(B){B=C+B;var E=0,G=null;"EXT-X-PRELOAD-HINT"==w.name?E=(D=Z(w,"BYTERANGE-START"))?Number(D):0:(E=Z(w,"BYTERANGE"),D=t(Rq(D,E)),E=D.next().value,G=D.next().value);if(w=Z(w,"URI"))y.Vc=ic([h],
683
- [w])[0],v.push(new Ei(C,B,function(H){return function(){return[H.Vc]}}(y),E,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=Up(l,"EXT-X-BYTERANGE"))?(q=t(Rq(c,a.value)),p=q.next().value,q=q.next().value):v.length&&(p=v[0].ia,q=v[v.length-1].ba);c="";a=null;"image"==k&&(c="1x1",k=Up(l,"EXT-X-TILES"))&&(c=Pp(k,"LAYOUT"),(k=Z(k,"DURATION"))&&(a=Number(k)));return new Ei(e,g,function(){return m.length?[m]:[]},p,q,b,f,0,Infinity,v,c,a)}
683
+ [w])[0],v.push(new Ei(C,B,function(H){return function(){return[H.Vc]}}(y),E,G,b,f,0,Infinity))}}n?g=e+Number(n.value.split(",")[0]):g=v[v.length-1].endTime;(a=Up(l,"EXT-X-BYTERANGE"))?(q=t(Rq(c,a.value)),p=q.next().value,q=q.next().value):v.length&&(p=v[0].ja,q=v[v.length-1].ba);c="";a=null;"image"==k&&(c="1x1",k=Up(l,"EXT-X-TILES"))&&(c=Pp(k,"LAYOUT"),(k=Z(k,"DURATION"))&&(a=Number(k)));return new Ei(e,g,function(){return m.length?[m]:[]},p,q,b,f,0,Infinity,v,c,a)}
684
684
  function Rq(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ba+1,d=c+d-1);return[c,d]}function yq(a){if(a.i){for(var b=t(a.V),c=b.next();!c.done;c=b.next())a.i.zb(c.value);a.V=[]}}
685
685
  function pq(a,b,c,d,e,f,g,h){var k,l,m,n,p,q,v,y,x,w,D,C,B,E,G,H,J,I,K,Q,T;return L(function(R){switch(R.g){case 1:k=c.segments;m=Vp(c.g,"EXT-X-MEDIA-SEQUENCE",0);p=(n=Up(c.g,"EXT-X-SKIP"))?Number(Z(n,"SKIPPED-SEGMENTS")):0;q=m+p;if(a.m!=jq&&f.has(q)){v=f.get(q);R.A(2);break}if(null!=a.T){R.A(3);break}l=Oq(a,c.h,k[0].g,g);y=a;return u(R,Sq(a,b,l,e,q,!1,k[0],g,d),4);case 4:y.T=R.h;case 3:v=a.T;case 2:x=k[0].h;x.split("/").pop();w=Vp(c.g,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.l&&(h.has(w)||h.set(w,q),
686
686
  p))for(D=h;D.has(w+1)&&D.get(w+1)<q;)w++;C=a.G.get(w)||0;B=[];E=0;case 5:if(!(E<k.length)){R.A(7);break}G=k[E];H=B[B.length-1];J=0==E?v:H.endTime;q=m+p+E;f.set(q,J);l=Oq(a,c.h,G.g,g);I=Up(G.g,"EXT-X-DISCONTINUITY");if(!I){R.A(8);break}w++;h.set(w,q);return u(R,Tq(a,w,b,l,e,q,G,g,J,d),9);case 9:C=R.h;case 8:!a.l&&(K=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.l=a.j.isLowLatencyMode());Q=Up(G.g,"EXTINF");a.l||Q?(T=Qq(a,l,H,G,J,C,g,c.h,d))&&B.push(T):a.l||Ua("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
687
687
  E++;R.A(5);break;case 7:return R["return"](B)}})}function Tq(a,b,c,d,e,f,g,h,k,l){var m,n;return L(function(p){if(1==p.g)return m=0,a.G.has(b)?(m=a.G.get(b),p.A(2)):u(p,Sq(a,c,d,e,f,!0,g,h,l),3);2!=p.g&&(n=p.h,m=k-n,a.G.set(b,m));return p["return"](m)})}
688
- function Uq(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:c=$e;d=nj(b.ma(),b.ia,b.ba,a.g.retryParameters);if(a.g.hls.useFullSegmentsForStartTime)return k["return"](kq(a,d,c));e=nj(b.ma(),b.ia,b.ia+2048-1,a.g.retryParameters);A(k,2);return u(k,kq(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=F(k);if(7001==g.code)throw g;Ua("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",
688
+ function Uq(a,b){var c,d,e,f,g,h;return L(function(k){switch(k.g){case 1:c=$e;d=nj(b.ma(),b.ja,b.ba,a.g.retryParameters);if(a.g.hls.useFullSegmentsForStartTime)return k["return"](kq(a,d,c));e=nj(b.ma(),b.ja,b.ja+2048-1,a.g.retryParameters);A(k,2);return u(k,kq(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=F(k);if(7001==g.code)throw g;Ua("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",
689
689
  e.uris[0]);return u(k,kq(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
690
690
  function Sq(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,y,x;return L(function(w){switch(w.g){case 1:l=Qq(a,c,null,g,0,0,h,"",k);if(a.C&&!f&&(m=a.h.get(b),n=m.xd.get(e),void 0!=n))return w["return"](n);d=d.toLowerCase();if(Lq.includes(d))throw Ua("Raw formats are not yet supported. Skipping "+d),new N(1,4,4035);if("video/webm"==d)throw Ua("WebM in HLS is not yet supported. Skipping."),new N(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.A(2);break}p=[Uq(a,l)];c&&p.push(Uq(a,c));return u(w,Promise.all(p),
691
691
  3);case 3:return q=w.h,v=q[0],y=q[1]||q[0],w["return"](Vq(b,v.uri,v.data,y.data));case 2:if("video/mp2t"!=d){w.A(4);break}return u(w,Uq(a,l),5);case 5:return x=w.h,w["return"](Wq(b,x.uri,x.data));case 4:throw new N(2,4,4030,b);}})}
@@ -694,9 +694,10 @@ function Wq(a,b,c){function d(){f.seek(g+188);h=f.X();71!=h&&(f.seek(g+192),h=f.
694
694
  f.Cb();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Gq(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new N(2,4,4039,f);}}return c}
695
695
  function Kq(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x;return L(function(w){if(1==w.g){f=oc;g=$e;h=Math.trunc((d.segments.length-1)/2);k=Gq(d.segments[h].h,e);l=new Wb(k);m=l.va.split(".").pop();n=Xq[b];if(p=n[m])return w["return"](p);if(b==f.Y)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");if(b==f.Lb&&(!c||"jpeg"==c))return w["return"]("image/jpeg");q=Ue([k],a.g.retryParameters);q.method="HEAD";return u(w,kq(a,q,g),2)}v=w.h;y=v.headers["content-type"];return y?w["return"](y.split(";")[0]):
696
696
  (x=n.mp4,w["return"](x))})}function iq(a){var b,c;L(function(d){if(1==d.g){if(!a.j)return d["return"]();A(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.wa,a.B.R(b),va(d,0);c=F(d);if(!a.j)return d["return"]();c.severity=1;a.j.onError(c);a.B.R(.1);z(d)})}function qq(a,b){a.m=b;a.i&&a.i.ec(a.m==jq);a.m!=jq||a.B.stop()}function kq(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.j.networkingEngine.request(c,b);Pe(a.D,b);return b.promise}M("shaka.hls.HlsParser",hq);
697
- var Lq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Xq={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
698
- vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Iq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Pp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Pp(a,"URI");b=gq(b);b=Fb(b.data);b=jc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=
699
- Pp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Pp(a,"URI");a=gq(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Vn(a,b);return jc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},jq="VOD",Nq="EVENT",Mq="LIVE",nq={Be:jq,ag:Nq,Ae:Mq};Ag.m3u8=function(){return new hq};yg["application/x-mpegurl"]=function(){return new hq};yg["application/vnd.apple.mpegurl"]=function(){return new hq};function Yq(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,ke:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Lc(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Zq(){}function $q(a,b,c,d){var e=new ar;nf(b.headers).forEach(function(k,l){e.append(l,k)});var f=new br,g={Vd:!1,we:!1};a=cr(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new De(a,function(){g.Vd=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new O(function(){g.we=!0;f.abort()});h.R(b/1E3);a["finally"](function(){h.stop()})}return a}
697
+ var Lq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Xq={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",
698
+ m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Iq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Pp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Pp(a,"URI");b=gq(b);b=Fb(b.data);b=jc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);
699
+ return b},"com.microsoft.playready":function(a){var b=Pp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Pp(a,"URI");a=gq(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Vn(a,b);return jc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},jq="VOD",Nq="EVENT",Mq="LIVE",nq={Be:jq,ag:Nq,Ae:Mq};Ag.m3u8=function(){return new hq};yg["application/x-mpegurl"]=function(){return new hq};
700
+ yg["application/vnd.apple.mpegurl"]=function(){return new hq};function Yq(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,ke:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Lc(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Zq(){}function $q(a,b,c,d){var e=new ar;nf(b.headers).forEach(function(k,l){e.append(l,k)});var f=new br,g={Vd:!1,we:!1};a=cr(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new De(a,function(){g.Vd=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new O(function(){g.we=!0;f.abort()});h.R(b/1E3);a["finally"](function(){h.stop()})}return a}
700
701
  function cr(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x,w,D,C;return L(function(B){switch(B.g){case 1:return g=dr,h=er,n=m=0,p=Date.now(),A(B,2),u(B,g(a,c),4);case 4:return k=B.h,q=k.clone().body.getReader(),y=(v=k.headers.get("Content-Length"))?parseInt(v,10):0,x=function(E){function G(){var H,J;return L(function(I){switch(I.g){case 1:return A(I,2),u(I,q.read(),4);case 4:H=I.h;va(I,3);break;case 2:return F(I),I["return"]();case 3:if(H.done){I.A(5);break}m+=H.value.byteLength;if(!f){I.A(5);break}return u(I,
701
702
  f(H.value),5);case 5:J=Date.now();if(100<J-p||H.done)e(J-p,m-n,y-m),n=m,p=J;H.done?E.close():(E.enqueue(H.value),G());z(I)}})}G()},new h({start:x}),u(B,k.arrayBuffer(),5);case 5:l=B.h;va(B,3);break;case 2:w=F(B);if(d.Vd)throw new N(1,1,7001,a,b);if(d.we)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,w,b);case 3:return D={},C=k.headers,C.forEach(function(E,G){D[G.trim()]=E}),B["return"](Yq(D,l,k.status,a,k.url,b))}})}
702
703
  function fr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",Zq);Zq.isSupported=fr;Zq.parse=$q;var dr=window.fetch,br=window.AbortController,er=window.ReadableStream,ar=window.Headers;fr()&&(Re("http",$q,2,!0),Re("https",$q,2,!0));function gr(){}
@@ -725,7 +726,7 @@ Qr.prototype.Sb=function(a){var b,c,d,e,f,g;return L(function(h){if(1==h.g){b=[]
725
726
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
726
727
  function Rr(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
727
728
  dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Sr(){xr.apply(this,arguments)}pa(Sr,xr);Sr.prototype.hasFixedKeySpace=function(){return!1};Sr.prototype.addSegments=function(a){return this.add(this.i,a)};Sr.prototype.addManifests=function(a){return this.add(this.h,a)};Sr.prototype.Sb=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Tr(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=Tr.prototype;
728
- r.init=function(){var a=this,b=new pc,c=!1,d=new O(function(){c=!0;b.reject(new N(2,9,9017))});d.R(2);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Lr(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Qr(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
729
+ r.init=function(){var a=this,b=new pc,c=!1,d=new O(function(){c=!0;b.reject(new N(2,9,9017))});d.R(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Lr(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Qr(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
729
730
  new Qr(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Sr(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Br(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new N(2,
730
731
  9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return L(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
731
732
  r.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};r.getEmeSessionCell=function(){return this.m};
@@ -770,8 +771,8 @@ n.set(null,Promise.resolve(null));m=new Map;p=Ls(e);l=new Map;p=t(p);for(q=p.nex
770
771
  expiration:d.Ub(),streams:a,sessionIds:h?hg(d):[],drmInfo:b,appMetadata:g}}
771
772
  function Ms(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,closedCaptions:f.closedCaptions,
772
773
  tilesLayout:f.tilesLayout},m=f.id;Ns(f,e.presentationTimeline.Pa(),function(n){var p=Os(a,b,m,f.id,c,d,n.h,g,h),q=Ps(a,b,m,f.id,c,d,n,g,k);qr(b,m,function(){var v,y;return L(function(x){if(1==x.g)return u(x,p,2);if(3!=x.g)return v=x.h,u(x,q,3);y=x.h;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,dataKey:y});z(x)})})});return l}
773
- function Os(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=nj(g.ma(),g.ia,g.ba,h.streaming.retryParameters);b=or(b,c,h,.5*os(f,d),!0,function(l){var m;return L(function(n){if(1==n.g)return u(n,e.addSegments([{data:l}]),2);m=n.h;a.j.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
774
- function Ps(a,b,c,d,e,f,g,h,k){var l=[g.ma()[0],g.ia,g.ba].join("-");if(k.has(l))return k.get(l);h=nj(g.ma(),g.ia,g.ba,h.streaming.retryParameters);b=or(b,c,h,ns(f,d,g),!1,function(m){var n;return L(function(p){if(1==p.g)return u(p,e.addSegments([{data:m}]),2);n=p.h;a.j.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function Ns(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function vs(a){if(a.m.g)throw new N(2,9,7001);}
774
+ function Os(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=nj(g.ma(),g.ja,g.ba,h.streaming.retryParameters);b=or(b,c,h,.5*os(f,d),!0,function(l){var m;return L(function(n){if(1==n.g)return u(n,e.addSegments([{data:l}]),2);m=n.h;a.j.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
775
+ function Ps(a,b,c,d,e,f,g,h,k){var l=[g.ma()[0],g.ja,g.ba].join("-");if(k.has(l))return k.get(l);h=nj(g.ma(),g.ja,g.ba,h.streaming.retryParameters);b=or(b,c,h,ns(f,d,g),!1,function(m){var n;return L(function(p){if(1==p.g)return u(p,e.addSegments([{data:m}]),2);n=p.h;a.j.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function Ns(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function vs(a){if(a.m.g)throw new N(2,9,7001);}
775
776
  function ts(){if(!qs())throw new N(2,9,9E3);}function Cs(a,b){return L(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);fb(a.i,b);return xa(c,0)})}function ss(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){fb(a.i,c)})}
776
777
  function Is(a){var b=[];a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.push(d.initSegmentKey),b.push(d.dataKey)}return b}
777
778
  function Hs(a,b,c,d){var e,f,g;return L(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Ir(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Gs(d,!1),videoCapabilities:Gs(d,!0)}});return u(h,gs(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
@@ -783,10 +784,10 @@ sm.offline=qs;function Qs(){}function Rs(a,b){for(var c={priority:b||0,Fe:a},d=0
783
784
  function $s(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
784
785
  Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",at);document.addEventListener("webkitfullscreenerror",at);document.addEventListener("mozfullscreenchange",at);document.addEventListener("mozfullscreenerror",at);document.addEventListener("MSFullscreenChange",at);document.addEventListener("MSFullscreenError",at)}}
785
786
  function at(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Qs.Fullscreen=Zs;Zs.install=$s;Rs($s);function bt(){}function ct(){}Qs.MathRound=bt;bt.install=ct;Rs(ct);function dt(){}function et(){if(zc()||Ac()||Bc()||wc("PlayStation 5")||yc()||xc()||wc("PC=EOS")||wc("Hisense")||wc("VIDAA")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),ft=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=gt}
786
- function gt(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w;return L(function(D){switch(D.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return D["return"](b);c=a.video;d=a.audio;if("media-source"==a.type){if(!sc())return D["return"](b);if(c){if(zc()){if(!window.cast)throw new N(2,8,8E3);if(cast.__platform__&&cast.__platform__.canDisplayType){var C=c.contentType;c.width&&c.height&&(C+="; width="+c.width+"; height="+c.height);c.framerate&&(C+="; framerate="+
787
- c.framerate);"pq"===c.transferFunction&&(C+="; eotf=smpte2084");C=cast.__platform__.canDisplayType(C)}else C=MediaSource.isTypeSupported(c.contentType)}else C=MediaSource.isTypeSupported(c.contentType);e=C;if(!e)return D["return"](b)}if(d&&(f=d.contentType,g=MediaSource.isTypeSupported(f),!g))return D["return"](b)}else if("file"==a.type){if(c&&(h=c.contentType,k=tc(h),!k)||d&&(l=d.contentType,m=tc(l),!m))return D["return"](b)}else return D["return"](b);if(!a.keySystemConfiguration)return b.supported=
788
- !0,D["return"](Promise.resolve(b));n=a.keySystemConfiguration;p=[];q=[];n.audio&&(v={robustness:n.audio.robustness||"",contentType:a.audio.contentType},p.push(v));n.video&&(y={robustness:n.video.robustness||"",contentType:a.video.contentType},q.push(y));x={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes};p.length&&(x.audioCapabilities=p);q.length&&(x.videoCapabilities=q);A(D,3);return u(D,navigator.requestMediaKeySystemAccess(n.keySystem,
789
- [x]),5);case 5:w=D.h;va(D,4);break;case 3:F(D);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return D["return"](b)}})}Qs.MediaCapabilities=dt;dt.install=et;var ft=null;dt.originalMcap=ft;Rs(et,-1);function ht(){}function it(){var a=Ec();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?jt():a?(kt(),12>=a?(lt(),mt()):lt()):(wc("Tizen 2")||wc("Tizen 3")||wc("Tizen 4"))&&nt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&ot()}
787
+ function gt(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w;return L(function(D){switch(D.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return D["return"](b);c=a.video;d=a.audio;if("media-source"==a.type){if(!sc())return D["return"](b);if(c){if(zc())if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var C=c.contentType;c.width&&c.height&&(C+="; width="+c.width+"; height="+c.height);c.framerate&&(C+="; framerate="+c.framerate);"pq"===c.transferFunction&&
788
+ (C+="; eotf=smpte2084");C=cast.__platform__.canDisplayType(C)}else C=MediaSource.isTypeSupported(c.contentType);else C=MediaSource.isTypeSupported(c.contentType);e=C;if(!e)return D["return"](b)}if(d&&(f=d.contentType,g=MediaSource.isTypeSupported(f),!g))return D["return"](b)}else if("file"==a.type){if(c&&(h=c.contentType,k=tc(h),!k)||d&&(l=d.contentType,m=tc(l),!m))return D["return"](b)}else return D["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,D["return"](Promise.resolve(b));n=
789
+ a.keySystemConfiguration;p=[];q=[];n.audio&&(v={robustness:n.audio.robustness||"",contentType:a.audio.contentType},p.push(v));n.video&&(y={robustness:n.video.robustness||"",contentType:a.video.contentType},q.push(y));x={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes};p.length&&(x.audioCapabilities=p);q.length&&(x.videoCapabilities=q);A(D,3);return u(D,navigator.requestMediaKeySystemAccess(n.keySystem,[x]),
790
+ 5);case 5:w=D.h;va(D,4);break;case 3:F(D);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return D["return"](b)}})}Qs.MediaCapabilities=dt;dt.install=et;var ft=null;dt.originalMcap=ft;Rs(et,-1);function ht(){}function it(){var a=Ec();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?jt():a?(kt(),12>=a?(lt(),mt()):15>=a&&lt()):navigator.userAgent.match(/Edge?\//)?kt():(wc("Tizen 2")||wc("Tizen 3")||wc("Tizen 4"))&&nt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&ot()}
790
791
  function lt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function mt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function kt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
791
792
  function nt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=cd(b)[0]&&a(b)}}function jt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
792
793
  function ot(){var a=MediaSource.isTypeSupported;yc()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Qs.MediaSource=ht;ht.install=it;Rs(it);function pt(){}function qt(){screen.orientation||void 0!=window.orientation&&rt()}function rt(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new st;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new P("change");b.dispatchEvent(c)})}Qs.Orientation=pt;
@@ -857,20 +858,20 @@ iv.prototype.parseMedia=function(a,b){var c=Ic(a);c=c.replace(/\r\n|\r(?=[^\n]|$
857
858
  (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Xp(g);k=Zp(g)}f.push(h)}e=new Map;kv(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]){l=[];k=-1;for(m=1;m<h.length;m++)h[m].includes("::cue")&&(l.push([]),k=l.length-1),-1!=k&&(l[k].push(h[m]),h[m].includes("}")&&(k=-1));l=t(l);for(k=l.next();!k.done;k=l.next()){var n=k.value;k="global";(m=n[0].match(/\((.*)\)/))&&
858
859
  (k=m.pop());m=n.slice(1,-1);n[0].includes("}")&&(n=/\{(.*?)\}/.exec(n[0]))&&(m=n[1].split(";"));(n=e.get(k))||(n=new ib(0,0,""));for(var p=!1,q=0;q<m.length;q++){var v=/^\s*([^:]+):\s*(.*)/.exec(m[q]);if(v){var y=v[2].trim().replace(";","");switch(v[1].trim()){case "background-color":case "background":p=!0;n.backgroundColor=y;break;case "color":p=!0;n.color=y;break;case "font-family":p=!0;n.fontFamily=y;break;case "font-size":p=!0;n.fontSize=y;break;case "font-weight":if(700<=parseInt(y,10)||"bold"==
859
860
  y)p=!0,n.fontWeight=700;break;case "font-style":switch(y){case "normal":p=!0;n.fontStyle=sb;break;case "italic":p=!0;n.fontStyle="italic";break;case "oblique":p=!0,n.fontStyle="oblique"}break;case "opacity":p=!0;n.opacity=parseFloat(y);break;case "text-shadow":p=!0;n.textShadow=y;break;case "white-space":p=!0,n.wrapLine="noWrap"!=y}}}p&&e.set(k,n)}}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0]||"REGION"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));
860
- k=new Wp(h[0]);m=jv(k);q=Yp(k,/[ \t]+--\x3e[ \t]+/g);n=jv(k);if(null==m||null==q||null==n)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=lv(h.slice(1).join("\n").trim());e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=""):h=new ib(m,n,"");mv(p,h,e);Xp(k);for(m=Zp(k);m;)nv(h,m,f),Xp(k),m=Zp(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};
861
+ k=new Wp(h[0]);m=jv(k);q=Yp(k,/[ \t]+--\x3e[ \t]+/g);n=jv(k);if(null==m||null==q||null==n)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=""):h=new ib(m,n,"");lv(p,h,e);Xp(k);for(m=Zp(k);m;)mv(h,m,f),Xp(k),m=Zp(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};
861
862
  function kv(a){for(var b=t(Object.entries(xb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new ib(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(yb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new ib(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
862
- function mv(a,b,c){0===c.size&&kv(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",
863
+ function lv(a,b,c){0===c.size&&kv(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",
863
864
  h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){a=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)d+="/"+k+">";else{if(!l.startsWith("v")){d+=e[h];continue}d+="/"+l+">"}h+=k.length+1}else d+=e[h]}else d+=e[h]}else"<"===e[h]?(g=h+1,"v"!=e[g]&&(g=-1)):">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=
864
- Jf("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=a;return}a=t(e);for(e=a.next();!e.done;e=a.next())ov(e.value,b,d,c);b.nestedCues=d}else b.payload=a}function pv(a,b){return a&&0<a.length?a:b}
865
+ Jf("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=nv(a);return}a=t(e);for(e=a.next();!e.done;e=a.next())ov(e.value,b,d,c);b.nestedCues=d}else b.payload=nv(a)}function pv(a,b){return a&&0<a.length?a:b}
865
866
  function ov(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/(?=[ .])+/g)),g=f.next();!g.done;g=f.next()){var h=g=g.value;if(h.startsWith(".voice-")){var k=h.split("-").pop();h='v[voice="'+k+'"]';d.has(h)||(h="v[voice="+k+"]")}d.has(h)&&(h=d.get(h))&&(e.backgroundColor=pv(h.backgroundColor,e.backgroundColor),e.color=pv(h.color,e.color),e.fontFamily=pv(h.fontFamily,e.fontFamily),e.fontSize=pv(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=
866
- h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline")}}if(yf(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())ov(a.value,e,c,d)}
867
- function nv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=mb:a.textAlign=ub[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
867
+ h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline")}}if(yf(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=nv(a),c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())ov(a.value,e,c,d)}
868
+ function mv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=mb:a.textAlign=ub[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
868
869
  b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=qv(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=wb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=ob,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()])}function qv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
869
- function jv(a){a=Yp(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}function lv(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}M("shaka.text.VttTextParser",iv);
870
+ function jv(a){a=Yp(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}function nv(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}M("shaka.text.VttTextParser",iv);
870
871
  iv.prototype.parseMedia=iv.prototype.parseMedia;iv.prototype.parseInit=iv.prototype.parseInit;gd["text/vtt"]=function(){return new iv};gd['text/vtt; codecs="vtt"']=function(){return new iv};gd['text/vtt; codecs="wvtt"']=function(){return new iv};function rv(){this.g=null}rv.prototype.parseInit=function(a){var b=this,c=!1;(new Fg).box("moov",Jg).box("trak",Jg).box("mdia",Jg).O("mdhd",function(d){d=Yh(d.reader,d.version);b.g=d.timescale}).box("minf",Jg).box("stbl",Jg).O("stsd",Lg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};
871
872
  rv.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Fg).box("moof",Jg).box("traf",Jg).O("tfdt",function(B){g=!0;c=Xh(B.reader,B.version).fd}).O("tfhd",function(B){l=Wh(B.reader,B.flags).Yd}).O("trun",function(B){h=!0;d=Zh(B.reader,B.version,B.flags).oe}).box("mdat",Mg(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new Cg(e,0),p=t(d),q=p.next();!q.done;q=p.next()){q=q.value;var v=q.Jd||l,y=q.Kc?
872
873
  c+q.Kc:m;m=y+(v||0);var x=0;do{var w=n.L();x+=w;var D=n.L(),C=null;"vttc"==Ng(D)?8<w&&(C=n.Xa(w-8)):n.skip(w-8);v&&C&&(w=sv(C,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(q.sampleSize&&x<q.sampleSize)}return f.filter(Qb)};function sv(a,b,c){var d,e,f;(new Fg).box("payl",Mg(function(g){d=Ic(g)})).box("iden",Mg(function(g){e=Ic(g)})).box("sttg",Mg(function(g){f=Ic(g)})).parse(a);return d?tv(d,e,f,b,c):null}
873
- function tv(a,b,c,d,e){d=new ib(d,e,"");mv(a,d,new Map);b&&(d.id=b);if(c)for(a=new Wp(c),b=Zp(a);b;)nv(d,b,[]),Xp(a),b=Zp(a);return d}M("shaka.text.Mp4VttParser",rv);rv.prototype.parseMedia=rv.prototype.parseMedia;rv.prototype.parseInit=rv.prototype.parseInit;gd['application/mp4; codecs="wvtt"']=function(){return new rv};function uv(){}uv.prototype.parseInit=function(){};uv.prototype.parseMedia=function(a){var b=Ic(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Wp(c[0]),e=vv(d),f=Yp(d,/,/g);d=vv(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new ib(e,d,c.slice(1).join("\n").trim()))}return a};
874
+ function tv(a,b,c,d,e){d=new ib(d,e,"");lv(a,d,new Map);b&&(d.id=b);if(c)for(a=new Wp(c),b=Zp(a);b;)mv(d,b,[]),Xp(a),b=Zp(a);return d}M("shaka.text.Mp4VttParser",rv);rv.prototype.parseMedia=rv.prototype.parseMedia;rv.prototype.parseInit=rv.prototype.parseInit;gd['application/mp4; codecs="wvtt"']=function(){return new rv};function uv(){}uv.prototype.parseInit=function(){};uv.prototype.parseMedia=function(a){var b=Ic(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Wp(c[0]),e=vv(d),f=Yp(d,/,/g);d=vv(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new ib(e,d,c.slice(1).join("\n").trim()))}return a};
874
875
  function vv(a){a=Yp(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",uv);uv.prototype.parseMedia=uv.prototype.parseMedia;uv.prototype.parseInit=uv.prototype.parseInit;gd["text/x-subviewer"]=function(){return new uv};function wv(){this.g=new iv}wv.prototype.parseInit=function(){};wv.prototype.parseMedia=function(a,b){var c=Ic(a);c=xv(c);c=Fb(Mc(c));return this.g.parseMedia(c,b)};function xv(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}M("shaka.text.SrtTextParser",wv);wv.srt2webvtt=xv;wv.prototype.parseMedia=wv.prototype.parseMedia;
875
876
  wv.prototype.parseInit=wv.prototype.parseInit;gd["text/srt"]=function(){return new wv};function yv(){}yv.prototype.parseInit=function(){};
876
877
  yv.prototype.parseMedia=function(a){var b="",c="";a=Ic(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=zv.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Av.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Bv);else if("Style"==e){e=f.split(Bv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=