shaka-player
Version:
DASH/EME video player library
105 lines (103 loc) • 416 kB
JavaScript
(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global,module){/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
var p;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
function ca(a){a=["object"==typeof globalThis&&globalThis,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global,a];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var da=ca(this);function fa(){fa=function(){};da.Symbol||(da.Symbol=ha)}function ia(a,b){this.a=a;ba(this,"description",{configurable:!0,writable:!0,value:b})}ia.prototype.toString=function(){return this.a};
var ha=function(){function a(c){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new ia("jscomp_symbol_"+(c||"")+"_"+b++,c)}var b=0;return a}();function ja(){fa();var a=da.Symbol.iterator;a||(a=da.Symbol.iterator=da.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[a]&&ba(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ka(aa(this))}});ja=function(){}}
function ka(a){ja();a={next:a};a[da.Symbol.iterator]=function(){return this};return a}function q(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function la(a){if(!(a instanceof Array)){a=q(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ma="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},na;
if("function"==typeof Object.setPrototypeOf)na=Object.setPrototypeOf;else{var oa;a:{var pa={Pe:!0},qa={};try{qa.__proto__=pa;oa=qa.Pe;break a}catch(a){}oa=!1}na=oa?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var sa=na;
function t(a,b){a.prototype=ma(b.prototype);a.prototype.constructor=a;if(sa)sa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c]}function ta(){this.o=!1;this.g=null;this.b=void 0;this.a=1;this.f=this.l=0;this.v=this.c=null}function ua(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ta.prototype.s=function(a){this.b=a};function va(a,b){a.c={fe:b,oe:!0};a.a=a.l||a.f}
ta.prototype["return"]=function(a){this.c={"return":a};this.a=this.f};function w(a,b,c){a.a=c;return{value:b}}ta.prototype.u=function(a){this.a=a};function x(a){a.a=0}function y(a,b,c){a.l=b;void 0!=c&&(a.f=c)}function wa(a){a.l=0;a.f=2}function xa(a,b){a.a=b;a.l=0}function ya(a){a.l=0;var b=a.c.fe;a.c=null;return b}function za(a){a.v=[a.c];a.l=0;a.f=0}function Aa(a,b){var c=a.v.splice(0)[0];(c=a.c=a.c||c)?c.oe?a.a=a.l||a.f:void 0!=c.u&&a.f<c.u?(a.a=c.u,a.c=null):a.a=a.f:a.a=b}
function Ba(a){this.a=new ta;this.b=a}function Ca(a,b){ua(a.a);var c=a.a.g;if(c)return Da(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.a["return"]);a.a["return"](b);return Ea(a)}function Da(a,b,c,d){try{var e=b.call(a.a.g,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.a.o=!1,e;var f=e.value}catch(g){return a.a.g=null,va(a.a,g),Ea(a)}a.a.g=null;d.call(a.a,f);return Ea(a)}
function Ea(a){for(;a.a.a;)try{var b=a.b(a.a);if(b)return a.a.o=!1,{value:b.value,done:!1}}catch(c){a.a.b=void 0,va(a.a,c)}a.a.o=!1;if(a.a.c){b=a.a.c;a.a.c=null;if(b.oe)throw b.fe;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
function Fa(a){this.next=function(b){ua(a.a);a.a.g?b=Da(a,a.a.g.next,b,a.a.s):(a.a.s(b),b=Ea(a));return b};this["throw"]=function(b){ua(a.a);a.a.g?b=Da(a,a.a.g["throw"],b,a.a.s):(va(a.a,b),b=Ea(a));return b};this["return"]=function(b){return Ca(a,b)};ja();this[Symbol.iterator]=function(){return this}}function Ia(a,b){var c=new Fa(new Ba(b));sa&&sa(c,a.prototype);return c}
function Ja(a,b){if(b){for(var c=da,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];f in c||(c[f]={});c=c[f]}d=d[d.length-1];e=c[d];f=b(e);f!=e&&null!=f&&ba(c,d,{configurable:!0,writable:!0,value:f})}}
Ja("Promise",function(a){function b(g){this.b=0;this.g=void 0;this.a=[];var h=this.c();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.a=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.b=function(g){if(null==this.a){this.a=[];var h=this;this.c(function(){h.g()})}this.a.push(g)};var e=da.setTimeout;c.prototype.c=function(g){e(g,0)};c.prototype.g=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
g[h];g[h]=null;try{k()}catch(l){this.f(l)}}}this.a=null};c.prototype.f=function(g){this.c(function(){throw g;})};b.prototype.c=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.B),reject:g(this.f)}};b.prototype.B=function(g){if(g===this)this.f(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.D(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.v(g):this.l(g)}};
b.prototype.v=function(g){var h=void 0;try{h=g.then}catch(k){this.f(k);return}"function"==typeof h?this.G(h,g):this.l(g)};b.prototype.f=function(g){this.o(2,g)};b.prototype.l=function(g){this.o(1,g)};b.prototype.o=function(g,h){if(0!=this.b)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.b);this.b=g;this.g=h;this.s()};b.prototype.s=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.b(this.a[g]);this.a=null}};var f=new c;b.prototype.D=function(g){var h=this.c();
g.Ec(h.resolve,h.reject)};b.prototype.G=function(g,h){var k=this.c();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(r,u){return"function"==typeof r?function(v){try{l(r(v))}catch(z){m(z)}}:u}var l,m,n=new b(function(r,u){l=r;m=u});this.Ec(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Ec=function(g,h){function k(){switch(l.b){case 1:g(l.g);break;case 2:h(l.g);break;default:throw Error("Unexpected state: "+
l.b);}}var l=this;null==this.a?f.b(k):this.a.push(k)};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=q(g),m=l.next();!m.done;m=l.next())d(m.value).Ec(h,k)})};b.all=function(g){var h=q(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(z){r[v]=z;u--;0==u&&l(r)}}var r=[],u=0;do r.push(void 0),u++,d(k.value).Ec(n(r.length-1),m),k=h.next();while(!k.done)})};return b});
function Ka(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function E(a){return Ka(new Fa(new Ba(a)))}function Ma(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
Ja("WeakMap",function(a){function b(k){this.a=(h+=Math.random()+1).toString();if(k){k=q(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(!Ma(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;e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),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(!Ma(k,g))throw Error("WeakMap key fail: "+k);k[g][this.a]=l;return this};b.prototype.get=function(k){return d(k)&&Ma(k,g)?k[g][this.a]:void 0};b.prototype.has=function(k){return d(k)&&Ma(k,g)&&Ma(k[g],
this.a)};b.prototype["delete"]=function(k){return d(k)&&Ma(k,g)&&Ma(k[g],this.a)?delete k[g][this.a]:!1};return b});
Ja("Map",function(a){function b(){var h={};return h.Wa=h.next=h.head=h}function c(h,k){var l=h.a;return ka(function(){if(l){for(;l.head!=h.a;)l=l.Wa;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.b[l];if(m&&Ma(h.b,l))for(var n=0;n<m.length;n++){var r=m[n];if(k!==k&&r.key!==r.key||k===r.key)return{id:l,list:m,index:n,ka:r}}return{id:l,
list:m,index:-1,ka:void 0}}function e(h){this.b={};this.a=b();this.size=0;if(h){h=q(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(q([[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||
"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;ja();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.b[l.id]=[]);l.ka?l.ka.value=k:(l.ka={next:this.a,Wa:this.a.Wa,head:this.a,key:h,value:k},l.list.push(l.ka),this.a.Wa.next=l.ka,this.a.Wa=l.ka,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.ka&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.b[h.id],h.ka.Wa.next=h.ka.next,h.ka.next.Wa=
h.ka.Wa,h.ka.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.b={};this.a=this.a.Wa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ka};e.prototype.get=function(h){return(h=d(this,h).ka)&&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(),
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});
Ja("Set",function(a){function b(c){this.a=new Map;if(c){c=q(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.a.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(q([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||
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;ja();b.prototype.add=function(c){c=0===c?0:c;this.a.set(c,c);this.size=this.a.size;return this};b.prototype["delete"]=function(c){c=this.a["delete"](c);this.size=this.a.size;return c};b.prototype.clear=function(){this.a.clear();this.size=0};b.prototype.has=function(c){return this.a.has(c)};b.prototype.entries=function(){return this.a.entries()};b.prototype.values=function(){return this.a.values()};b.prototype.keys=b.prototype.values;
b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.a.forEach(function(f){return c.call(d,f,f,e)})};return b});function Na(a,b){ja();a instanceof String&&(a+="");var c=0,d={next:function(){if(c<a.length){var e=c++;return{value:b(e,a[e]),done:!1}}d.next=function(){return{done:!0,value:void 0}};return d.next()}};d[Symbol.iterator]=function(){return d};return d}Ja("Array.prototype.keys",function(a){return a?a:function(){return Na(this,function(b){return b})}});
Ja("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});function Oa(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{ma:e,Le:f}}return{ma:-1,Le:void 0}}
Ja("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Oa(this,b,c).ma}});Ja("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});Ja("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
Ja("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});function Pa(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
Ja("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Pa(this,b,"includes").indexOf(b,c||0)}});Ja("Array.prototype.find",function(a){return a?a:function(b,c){return Oa(this,b,c).Le}});Ja("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});var Qa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ma(d,e)&&(a[e]=d[e])}return a};
Ja("Object.assign",function(a){return a||Qa});Ja("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ma(b,d)&&c.push(b[d]);return c}});Ja("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Pa(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});var Sa=this||self;
function G(a,b){var c=a.split("."),d=Sa;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
Copyright 2016 Google LLC
SPDX-License-Identifier: Apache-2.0
*/
function K(a,b){b=void 0===b?{}:b;for(var 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.a=!1}K.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};K.prototype.stopImmediatePropagation=function(){this.a=!0};
K.prototype.stopPropagation=function(){};function Ta(){}function Ua(){}function Va(){}function Wa(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];Xa.has(a)||(Xa.add(a),Va.apply(Ta,la(c)))}function Ya(){}function bb(){}var Xa=new Set;if(window.console&&window.console.log.bind){var cb={},db=(cb[1]=console.error.bind(console),cb[2]=console.warn.bind(console),cb[3]=console.info.bind(console),cb[4]=console.log.bind(console),cb[5]=console.debug.bind(console),cb[6]=console.debug.bind(console),cb);Va=db[2];Ua=db[1]};function eb(){this.a={}}eb.prototype.push=function(a,b){this.a.hasOwnProperty(a)?this.a[a].push(b):this.a[a]=[b]};eb.prototype.get=function(a){return(a=this.a[a])?a.slice():null};eb.prototype.remove=function(a,b){a in this.a&&(this.a[a]=this.a[a].filter(function(c){return c!=b}))};function fb(a,b){for(var c in a.a)b(c,a.a[c])};function gb(){this.jd=new eb;this.Cc=this}gb.prototype.addEventListener=function(a,b){this.jd.push(a,b)};gb.prototype.removeEventListener=function(a,b){this.jd.remove(a,b)};gb.prototype.dispatchEvent=function(a){var b=this.jd.get(a.type)||[];b=q(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Cc;a.currentTarget=this.Cc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.a)break}return a.defaultPrevented};function hb(a,b){for(var c=[],d=q(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function ib(a,b){for(var c=q(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}function jb(a,b){for(var c=q(a),d=c.next();!d.done;d=c.next())if(b(d.value))return!0;return!1}function kb(a,b){for(var c=[],d=q(a),e=d.next();!e.done;e=d.next())e=e.value,b(e)&&c.push(e);return c}
var mb=function lb(a){var c;return Ia(lb,function(d){1==d.a&&(c=0);if(3!=d.a)return c<a?w(d,c,3):d.u(0);c++;return d.u(2)})},ob=function nb(a){var c,d,e,f,g,h;return Ia(nb,function(k){1==k.a&&(c=-1,e=d=void 0,f=q(a),g=f.next());if(5!=k.a){if(g.done)return-1==c?k.u(0):w(k,{ma:c,Lf:d,item:e,next:void 0},0);h=g.value;return 0<=c?w(k,{ma:c,item:e,Lf:d,next:h},5):k.u(5)}c++;d=e;e=h;g=f.next();return k.u(2)})};function pb(a,b){a=qb(a);b=qb(b);return a.split("-")[0]==b.split("-")[0]}function rb(a,b){a=qb(a);b=qb(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function sb(a,b){a=qb(a);b=qb(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function qb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=tb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function ub(a,b){a=qb(a);b=qb(b);return b==a?4:rb(b,a)?3:sb(b,a)?2:rb(a,b)?1:0}
function vb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=tb.get(a)||a}function wb(a){return a.language?qb(a.language):a.audio&&a.audio.language?qb(a.audio.language):a.video&&a.video.language?qb(a.video.language):"und"}
function xb(a,b){for(var c=qb(a),d=new Set,e=q(b),f=e.next();!f.done;f=e.next())d.add(qb(f.value));e=q(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=q(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,rb(f,c))return f;e=q(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,sb(f,c))return f;d=q(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,rb(c,f))return f;return null}
var tb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
"cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function yb(a){this.g=qb(a);this.f=new Map;this.b=new Set;this.c=new Map;this.a=new gb}p=yb.prototype;p.addEventListener=function(a,b,c){this.a.addEventListener(a,b,c)};p.removeEventListener=function(a,b,c){this.a.removeEventListener(a,b,c||void 0)};p.dispatchEvent=function(a){return this.a.dispatchEvent(a)};
p.$d=function(a){var b=this;this.b.clear();a=q(a);for(var c=a.next();!c.done;c=a.next())this.b.add(qb(c.value));zb(this);a=kb(this.b,function(d){return!b.c.has(d)});a.length&&this.a.dispatchEvent(new K("unknown-locales",{locales:a}));a=kb(this.b,function(d){return b.c.has(d)});this.a.dispatchEvent(new K("locale-changed",{locales:a.length?a:[this.g]}))};
p.Y=function(a,b,c){a=qb(a);void 0===c&&(c=Ab);var d=this.c.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Ab||d.set(f,e)});this.c.set(a,d);zb(this);this.a.dispatchEvent(new K("locale-updated"));return this};p.Tf=function(a){for(var b=q(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};p.resolve=function(a){var b=this.f.get(a);if(b)return b;a={locales:Array.from(this.b),missing:a};this.a.dispatchEvent(new K("unknown-localization",a));return""};
function zb(a){for(var b=a.c,c=a.g,d=a.b,e=new Set,f={},g=q(d),h=g.next();!h.done;f={Bb:f.Bb},h=g.next()){f.Bb=h.value;e.add(f.Bb);e.add(vb(f.Bb));h=kb(b.keys(),function(l){return function(m){var n=l.Bb,r=vb(m),u=vb(n);return m!=r&&n!=u&&r==u}}(f));h.sort();var k=q(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=kb(b.keys(),function(l){return function(m){return vb(m)==l.Bb}}(f));h.sort();k=q(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=q(e);for(h=e.next();!h.done;h=e.next())(h=
b.get(h.value))&&c.push(h);c.reverse();a.f.clear();b=q(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.f.set(m,l)});b=a.f.keys();e=new Set;c=q(a.b);for(h=c.next();!h.done;h=c.next())h=a.c.get(h.value)||new Map,Bb(h,b,e);0<e.size&&(d={locales:Array.from(d),missing:Array.from(e)},a.a.dispatchEvent(new K("missing-localizations",d)))}function Bb(a,b,c){b=q(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}G("shaka.ui.Localization",yb);yb.prototype.resolve=yb.prototype.resolve;
yb.prototype.resolveDictionary=yb.prototype.Tf;yb.prototype.insert=yb.prototype.Y;yb.prototype.changeLocale=yb.prototype.$d;yb.prototype.dispatchEvent=yb.prototype.dispatchEvent;yb.prototype.removeEventListener=yb.prototype.removeEventListener;yb.prototype.addEventListener=yb.prototype.addEventListener;var Ab=1;yb.ConflictResolution={USE_OLD:0,USE_NEW:Ab};yb.UNKNOWN_LOCALES="unknown-locales";yb.UNKNOWN_LOCALIZATION="unknown-localization";yb.MISSING_LOCALIZATIONS="missing-localizations";
yb.LOCALE_CHANGED="locale-changed";yb.LOCALE_UPDATED="locale-updated";function Cb(a){this.c=Math.exp(Math.log(.5)/a);this.b=this.a=0}function Db(a,b,c){var d=Math.pow(a.c,b);c=c*(1-d)+d*a.a;isNaN(c)||(a.a=c,a.b+=b)}function Eb(a){return a.a/(1-Math.pow(a.c,a.b))};function Fb(){this.b=new Cb(2);this.c=new Cb(5);this.a=0}Fb.prototype.getBandwidthEstimate=function(a){return 128E3>this.a?a:Math.min(Eb(this.b),Eb(this.c))};var Gb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function Hb(a){var b;a instanceof Hb?(Ib(this,a.Ia),this.wb=a.wb,this.Ha=a.Ha,Jb(this,a.Sb),this.ya=a.ya,Kb(this,a.a.clone()),this.jb=a.jb):a&&(b=String(a).match(Gb))?(Ib(this,b[1]||"",!0),this.wb=Lb(b[2]||""),this.Ha=Lb(b[3]||"",!0),Jb(this,b[4]),this.ya=Lb(b[5]||"",!0),Kb(this,b[6]||"",!0),this.jb=Lb(b[7]||"")):this.a=new Mb(null)}p=Hb.prototype;p.Ia="";p.wb="";p.Ha="";p.Sb=null;p.ya="";p.jb="";
p.toString=function(){var a=[],b=this.Ia;b&&a.push(Nb(b,Ob,!0),":");if(b=this.Ha){a.push("//");var c=this.wb;c&&a.push(Nb(c,Ob,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Sb;null!=b&&a.push(":",String(b))}if(b=this.ya)this.Ha&&"/"!=b.charAt(0)&&a.push("/"),a.push(Nb(b,"/"==b.charAt(0)?Pb:Qb,!0));(b=this.a.toString())&&a.push("?",b);(b=this.jb)&&a.push("#",Nb(b,Rb));return a.join("")};
p.resolve=function(a){var b=this.clone();"data"===b.Ia&&(b=new Hb);var c=!!a.Ia;c?Ib(b,a.Ia):c=!!a.wb;c?b.wb=a.wb:c=!!a.Ha;c?b.Ha=a.Ha:c=null!=a.Sb;var d=a.ya;if(c)Jb(b,a.Sb);else if(c=!!a.ya){if("/"!=d.charAt(0))if(this.Ha&&!this.ya)d="/"+d;else{var e=b.ya.lastIndexOf("/");-1!=e&&(d=b.ya.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.ya=d:c=""!==a.a.toString();c?Kb(b,a.a.clone()):c=!!a.jb;c&&(b.jb=a.jb);return b};p.clone=function(){return new Hb(this)};function Ib(a,b,c){a.Ia=c?Lb(b,!0):b;a.Ia&&(a.Ia=a.Ia.replace(/:$/,""))}function Jb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Sb=b}else a.Sb=null}function Kb(a,b,c){b instanceof Mb?a.a=b:(c||(b=Nb(b,Sb)),a.a=new Mb(b))}
function Lb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Nb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Tb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Tb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ob=/[#\/\?@]/g,Qb=/[#\?:]/g,Pb=/[#\?]/g,Sb=/[#\?@]/g,Rb=/#/g;function Mb(a){this.a=a||null}p=Mb.prototype;p.wa=null;p.Gc=null;
p.add=function(a,b){if(!this.wa&&(this.wa={},this.Gc=0,this.a))for(var c=this.a.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.a=null;(c=this.wa.hasOwnProperty(a)&&this.wa[a])||(this.wa[a]=c=[]);c.push(b);this.Gc++;return this};
p.toString=function(){if(this.a)return this.a;if(!this.wa)return"";var a=[],b;for(b in this.wa)for(var c=encodeURIComponent(b),d=this.wa[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.a=a.join("&")};p.clone=function(){var a=new Mb;a.a=this.a;if(this.wa){var b={},c;for(c in this.wa)b[c]=this.wa[c].concat();a.wa=b;a.Gc=this.Gc}return a};function Ub(a){this.b=a;this.a=null}Ub.prototype.P=function(a){var b=this;this.stop();var c=!0,d=null;this.a=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.b()},1E3*a);return this};Ub.prototype.stop=function(){this.a&&(this.a(),this.a=null)};function M(a){this.b=a;this.a=null}M.prototype.sa=function(){this.stop();this.b();return this};M.prototype.P=function(a){var b=this;this.stop();this.a=(new Ub(function(){b.b()})).P(a);return this};M.prototype.ea=function(a){var b=this;this.stop();this.a=(new Ub(function(){b.a.P(a);b.b()})).P(a);return this};M.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)};G("shaka.util.Timer",M);M.prototype.stop=M.prototype.stop;M.prototype.tickEvery=M.prototype.ea;M.prototype.tickAfter=M.prototype.P;
M.prototype.tickNow=M.prototype.sa;function Vb(a,b){var c=Wb();this.o=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.f=null==a.baseDelay?c.baseDelay:a.baseDelay;this.l=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.g=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.a=0;this.b=this.f;if(this.c=void 0===b?!1:b)this.a=1}
function Xb(a){var b,c;return E(function(d){if(1==d.a){if(a.a>=a.o)if(a.c)a.a=1,a.b=a.f;else throw new N(O,Yb,Zb);b=a.a;a.a++;if(0==b)return d["return"]();c=a.b*(1+(2*Math.random()-1)*a.l);return w(d,new Promise(function(e){(new M(e)).P(c/1E3)}),2)}a.b*=a.g;x(d)})}function Wb(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function N(a,b,c,d){for(var e=[],f=3;f<arguments.length;++f)e[f-3]=arguments[f];this.severity=a;this.category=b;this.code=c;this.data=e;this.handled=!1}N.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};G("shaka.util.Error",N);var O=2;N.Severity={RECOVERABLE:1,CRITICAL:O};var Yb=7;N.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:Yb,CAST:8,STORAGE:9,ADS:10};var Zb=1010;
N.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:Zb,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,
EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,
TRANSMUXING_FAILED:3018,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,
HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,
NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,
OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,
CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function $b(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}$b.prototype.resolve=function(){};$b.prototype.reject=function(){};function ac(a,b){this.promise=a;this.c=b;this.a=!1}function bc(a){return new ac(Promise.reject(a),function(){return Promise.resolve()})}function cc(){var a=Promise.reject(new N(O,Yb,7001));a["catch"](function(){});return new ac(a,function(){return Promise.resolve()})}function ec(a){return new ac(Promise.resolve(a),function(){return Promise.resolve()})}function fc(a){return new ac(a,function(){return a["catch"](function(){})})}ac.prototype.abort=function(){this.a=!0;return this.c()};
function gc(a){return new ac(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}ac.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
ac.prototype.$=function(a,b){function c(){e.reject(new N(O,Yb,7001));return d.abort()}var d=this,e=new $b;this.promise.then(function(f){d.a?e.reject(new N(O,Yb,7001)):a?c=hc(a,f,e):e.resolve(f)},function(f){b?c=hc(b,f,e):e.reject(f)});return new ac(e,function(){return c()})};
function hc(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(){})["catch"](function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}G("shaka.util.AbortableOperation",ac);ac.prototype.chain=ac.prototype.$;ac.prototype["finally"]=ac.prototype["finally"];ac.all=gc;ac.prototype.abort=ac.prototype.abort;ac.notAbortable=fc;ac.completed=ec;ac.aborted=cc;
ac.failed=bc;function ic(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(jc(a)==jc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=kc(a),d=kc(b),e=q(mb(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}function jc(a){return a instanceof ArrayBuffer?a:a.buffer}function lc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
function kc(a,b,c){c=void 0===c?Infinity:c;return mc(a,void 0===b?0:b,c,Uint8Array)}function nc(a,b,c){c=void 0===c?Infinity:c;return mc(a,void 0===b?0:b,c,DataView)}function mc(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(jc(a),b,Math.min(b+Math.max(c,0),e)-b)};function oc(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 pc(a){var b={},c;for(c in a)b[c]=a[c];return b};function qc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function rc(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function sc(a,b,c){c||(c=qc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=q(a);for(var e=a.next();!e.done;d={Zc:d.Zc},e=a.next()){d.Zc=e.value;e=b.findIndex(function(f){return function(g){return c(f.Zc,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length};function tc(){this.a=[]}function uc(a,b){a.a.push(b["finally"](function(){rc(a.a,b)}))}tc.prototype.destroy=function(){for(var a=[],b=q(this.a),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.a=[];return Promise.all(a)};function vc(a){gb.call(this);this.f=!1;this.g=new tc;this.a=new Set;this.b=new Set;this.c=a||null}t(vc,gb);function wc(a,b,c){c=c||xc;var d=yc[a];if(!d||c>=d.priority)yc[a]={priority:c,Kf:b}}p=vc.prototype;p.Mf=function(a){this.a.add(a)};p.dg=function(a){this.a["delete"](a)};p.Te=function(){this.a.clear()};p.Nf=function(a){this.b.add(a)};p.eg=function(a){this.b["delete"](a)};p.Ue=function(){this.b.clear()};
function zc(a,b){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null}}p.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};
p.request=function(a,b){var c=this,d=new Ac;if(this.f){var e=Promise.reject(new N(O,Yb,7001));e["catch"](function(){});return new Bc(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?oc(b.retryParameters):Wb();b.uris=oc(b.uris);e=Cc(this,a,b);var f=e.$(function(){return Dc(c,a,b,new Vb(b.retryParameters,!1),0,null,d)}),g=f.$(function(n){return Ec(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.$(function(n){var r=Date.now()-l,u=n.response;u.timeMs+=k;u.timeMs+=r;n.Af||!c.c||u.fromCache||a!=Fc||c.c(u.timeMs,u.data.byteLength);return u},function(n){n&&(n.severity=O);throw n;});e=new Bc(m.promise,function(){return m.abort()},d);uc(this.g,e);return e};
function Cc(a,b,c){var d=ec(void 0),e={};a=q(a.a);for(var f=a.next();!f.done;e={cd:e.cd},f=a.next())e.cd=f.value,d=d.$(function(g){return function(){c.body&&(c.body=lc(c.body));return g.cd(b,c)}}(e));return d.$(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(O,1,1006,g);})}
function Dc(a,b,c,d,e,f,g){var h=new Hb(c.uris[e]),k=h.Ia,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Ib(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=yc[k])?k.Kf:null;if(!m)return bc(new N(O,1,1E3,h));var n;return fc(Xb(d)).$(function(){if(a.f)return cc();n=Date.now();return m(c.uris[e],c,b,function(r,u,v){a.c&&b==Fc&&(a.c(r,u),l=!0,g.a=v)})}).$(function(r){void 0==r.timeMs&&(r.timeMs=Date.now()-n);return{response:r,Af:l}},function(r){if(a.f)return cc();if(r instanceof N){if(7001==r.code)throw r;
if(r.code==Zb)throw f;if(1==r.severity){var u=new K("retry",{error:r});a.dispatchEvent(u);e=(e+1)%c.uris.length;return Dc(a,b,c,d,e,r,g)}}throw r;})}
function Ec(a,b,c){var d=ec(void 0),e={};a=q(a.b);for(var f=a.next();!f.done;e={dd:e.dd},f=a.next())e.dd=f.value,d=d.$(function(g){return function(){var h=c.response;h.data&&(h.data=lc(h.data));return g.dd(b,h)}}(e));return d.$(function(){return c},function(g){var h=O;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}G("shaka.net.NetworkingEngine",vc);vc.prototype.request=vc.prototype.request;vc.prototype.destroy=vc.prototype.destroy;vc.makeRequest=zc;
vc.defaultRetryParameters=function(){return Wb()};vc.prototype.clearAllResponseFilters=vc.prototype.Ue;vc.prototype.unregisterResponseFilter=vc.prototype.eg;vc.prototype.registerResponseFilter=vc.prototype.Nf;vc.prototype.clearAllRequestFilters=vc.prototype.Te;vc.prototype.unregisterRequestFilter=vc.prototype.dg;vc.prototype.registerRequestFilter=vc.prototype.Mf;vc.unregisterScheme=function(a){delete yc[a]};vc.registerScheme=wc;function Ac(){this.a=0}vc.NumBytesRemainingClass=Ac;
function Bc(a,b,c){ac.call(this,a,b);this.b=c}t(Bc,ac);vc.PendingRequest=Bc;var Fc=1;vc.RequestType={MANIFEST:0,SEGMENT:Fc,LICENSE:2,APP:3,TIMING:4};var xc=3;vc.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:xc};var yc={};function Gc(a){this.a=!1;this.b=new $b;this.c=a}Gc.prototype.destroy=function(){var a=this;if(this.a)return this.b;this.a=!0;return this.c().then(function(){a.b.resolve()},function(){a.b.resolve()})};function Hc(a,b){if(a.a){if(b instanceof N&&7003==b.code)throw b;throw new N(O,Yb,7003,b);}};function Ic(){this.a=new eb}p=Ic.prototype;p.release=function(){this.ub();this.a=null};p.i=function(a,b,c,d){this.a&&(a=new Jc(a,b,c,d),this.a.push(b,a))};p.xa=function(a,b,c,d){function e(g){f.Aa(a,b,e);c(g)}var f=this;this.i(a,b,e,d)};p.Aa=function(a,b,c){if(this.a){var d=this.a.get(b)||[];d=q(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Aa(),this.a.remove(b,e))}};
p.ub=function(){if(this.a){var a=this.a,b=[],c;for(c in a.a)b.push.apply(b,la(a.a[c]));a=q(b);for(b=a.next();!b.done;b=a.next())b.value.Aa();this.a.a={}}};G("shaka.util.EventManager",Ic);Ic.prototype.removeAll=Ic.prototype.ub;Ic.prototype.unlisten=Ic.prototype.Aa;Ic.prototype.listenOnce=Ic.prototype.xa;Ic.prototype.listen=Ic.prototype.i;Ic.prototype.release=Ic.prototype.release;function Jc(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.a=Kc(a,d);this.target.addEventListener(b,c,this.a)}
Jc.prototype.Aa=function(){this.target.removeEventListener(this.type,this.listener,this.a);this.listener=this.target=null;this.a=!1};function Kc(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return Lc(a)?b:b.capture||!1}
function Lc(a){var b=Mc;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}Mc=b}return b||!1}var Mc=void 0;function Nc(a,b,c){function d(h){nc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(kc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(O,6,6015);var e;"string"==typeof b?e=Oc(b,!0):e=b;a=Pc(a);a=Oc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f};function Qc(a){this.b=a;this.a=void 0}Qc.prototype.value=function(){void 0==this.a&&(this.a=this.b());return this.a};function Rc(a,b){this.a=a;this.b=b}Rc.prototype.toString=function(){return"v"+this.a+"."+this.b};function Sc(a,b){var c=new Rc(4,0),d=Tc,e=d.a,f=c.b-e.b;(0<(c.a-e.a||f)?d.c:d.b)(d.a,c,a,b)}function Uc(a,b,c,d){Va([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Vc(a,b,c,d){Ua([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Tc=null;function Wc(a,b){return a.concat(b)}function Xc(){}function Yc(a){return null!=a}function Zc(a){var b=Object.create(a.prototype||Object.prototype);a=a.call(b);a||(Sc("Factories requiring new","Factories should be plain functions"),a=b);return a};function $c(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Hb(d)});return a.map(function(d){return new Hb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Wc,[]).map(function(d){return d.toString()})}function ad(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:b||[],keyIds:new Set}}
var bd={Sa:"video",Db:"audio",oa:"text",pg:"image",hg:"application"};function cd(a){for(var b=new Map,c=q(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function dd(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function ed(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function fd(a){var b=[a.mimeType];gd.forEach(function(c,d){var e=a[d];e&&b.push(c+'="'+e+'"')});return b.join(";")}function hd(a){a=a.split(".");var b=a[0];a.pop();return[b,a.join(".")]}var gd=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function id(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function jd(a){return""!=kd().canPlayType(a)}function ld(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!md("Tizen")}function nd(){if(!ld())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function md(a){return(navigator.userAgent||"").includes(a)}
function kd(){if(od)return od;pd||(pd=new M(function(){od=null}));(od=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(od=document.createElement("video"));pd.P(1);return od}var pd=null,od=null;function qd(){}function rd(a){if(!a)return"";a=kc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=sd(a);a=escape(a);try{return decodeURIComponent(a)}catch(b){throw new N(O,2,2004);}}function td(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(O,2,2004);var d=Math.floor(a.byteLength/2);c=new Uint16Array(d);a=nc(a);d=q(mb(d));for(var e=d.next();!e.done;e=d.next())e=e.value,c[e]=a.getUint16(2*e,b);return sd(c)}
function Pc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=kc(a);if(239==c[0]&&187==c[1]&&191==c[2])return rd(c);if(254==c[0]&&255==c[1])return td(c.subarray(2),!1);if(255==c[0]&&254==c[1])return td(c.subarray(2),!0);if(0==c[0]&&0==c[2])return td(a,!1);if(0==c[1]&&0==c[3])return td(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return rd(a);throw new N(O,2,2003);}
function ud(a){a=encodeURIComponent(a);var b=unescape(a);a=new Uint8Array(b.length);b=q(ob(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.ma]=c.item.charCodeAt(0);return lc(a)}function Oc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=q(ob(a)),f=e.next();!f.done;f=e.next())f=f.value,d.setUint16(2*f.ma,f.item.charCodeAt(0),b);return c}function sd(a){return vd.value()(a)}G("shaka.util.StringUtils",qd);qd.resetFromCharCode=function(){vd.a=void 0};qd.toUTF16=Oc;qd.toUTF8=ud;
qd.fromBytesAutoDetect=Pc;qd.fromUTF16=td;qd.fromUTF8=rd;var vd=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={Za:65536};0<b.Za;b={Za:b.Za},b.Za/=2)if(a(b.Za))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Za)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Za));return e}}(b);return null});function wd(){}function xd(a){a=sd(kc(a));return btoa(a)}function yd(a,b){b=void 0==b?!0:b;var c=xd(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function zd(a){var b=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));a=new Uint8Array(b.length);b=q(ob(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.ma]=c.item.charCodeAt(0);return a}
function Ad(a){var b=a.length/2,c=new Uint8Array(b);b=q(mb(b));for(var d=b.next();!d.done;d=b.next())d=d.value,c[d]=window.parseInt(a.substr(2*d,2),16);return c}function Bd(a){var b=kc(a);a="";b=q(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 Cd(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];var d=0,e=q(b);for(c=e.next();!c.done;c=e.next())d+=c.value.byteLength;d=new Uint8Array(d);e=0;b=q(b);for(c=b.next();!c.done;c=b.next())c=c.value,d.set(kc(c),e),e+=c.byteLength;return d}G("shaka.util.Uint8ArrayUtils",wd);wd.concat=Cd;wd.toHex=Bd;wd.fromHex=Ad;wd.fromBase64=zd;wd.toBase64=yd;wd.toStandardBase64=xd;
wd.equal=function(a,b){Sc("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return ic(a,b)};function Dd(a,b){var c=this;b=void 0===b?1:b;this.A=a;this.v=new Set;this.a=this.l=null;this.L=!1;this.G=0;this.c=null;this.b=new Ic;this.f=new Map;this.s=[];this.o=new $b;this.m=null;this.g=function(d){c.o.reject(d);a.onError(d)};this.X=new Map;this.R=new Map;this.K=new M(function(){return Ed(c)});this.B=!1;this.D=[];this.J=!1;this.V=(new M(function(){Fd(c)})).ea(b);this.o["catch"](function(){});this.H=new Gc(function(){return Gd(c)})}Dd.prototype.destroy=function(){return this.H.destroy()};
function Gd(a){return E(function(b){switch(b.a){case 1:return a.b.release(),a.b=null,a.o.reject(),a.V.stop(),a.V=null,a.K.stop(),a.K=null,w(b,Hd(a),2);case 2:if(!a.a){b.u(3);break}y(b,4);return w(b,a.a.setMediaKeys(null),6);case 6:xa(b,5);break;case 4:ya(b);case 5:a.a=null;case 3:a.c=null,a.v.clear(),a.l=null,a.s=[],a.m=null,a.g=function(){},a.A=null,x(b)}})}Dd.prototype.configure=function(a){this.m=a};function Id(a,b,c){a.s=[];a.B=c;return Jd(a,b)}
function Kd(a,b,c){a.s=c;a.B=0<c.length;return Jd(a,b)}function Ld(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,initData:null,keyIds:null}];g.set(b,e);return Md(a,g)}
function Jd(a,b){var c=Nd(a);if(c)for(var d=q(b),e=d.next();!e.done;e=d.next())e=e.value,e.video&&e.video.encrypted&&(e.video.drmInfos=[c]),e.audio&&e.audio.encrypted&&(e.audio.drmInfos=[c]);c=b.some(function(g){return g.video&&g.video.drmInfos.length||g.audio&&g.audio.drmInfos.length?!0:!1});c||(d=cd(a.m.servers),Od(b,d));d=q(b);for(e=d.next();!e.done;e=d.next()){e=e.value;e=q((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())Pd(f.value,cd(a.m.servers),
cd(a.m.advanced||{}))}d=Qd(a,b);if(!d.size)return a.L=!0,Promise.resolve();d=Md(a,d);return c?d:d["catch"](function(){})}
Dd.prototype.bc=function(a){var b=this,c,d,e;return E(function(f){if(1==f.a){if(!b.l)return b.b.xa(a,"encrypted",function(){b.g(new N(O,6,6010))}),f["return"]();b.a=a;b.b.xa(b.a,"play",function(){for(var g=q(b.D),h=g.next();!h.done;h=g.next())Rd(b,h.value);b.J=!0;b.D=[]});"webkitCurrentPlaybackTargetIsWireless"in b.a&&b.b.i(b.a,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Hd(b)});c=b.a.setMediaKeys(b.l);c=c["catch"](function(g){re