text: (function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global){var p,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)},da="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function fa(){fa=function(){};da.Symbol||(da.Symbol=ha)}var ha=function(){var b=0;return function(c){return"jscomp_symbol_"+(c||"")+b++}}();
  function ia(){fa();var b=da.Symbol.iterator;b||(b=da.Symbol.iterator=da.Symbol("iterator"));"function"!=typeof Array.prototype[b]&&aa(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return ja(this)}});ia=function(){}}function ja(b){var c=0;return la(function(){return c<b.length?{done:!1,value:b[c++]}:{done:!0}})}function la(b){ia();b={next:b};b[da.Symbol.iterator]=function(){return this};return b}function r(b){ia();var c=b[Symbol.iterator];return c?c.call(b):ja(b)}
  function ma(b,c){if(c){for(var d=da,e=b.split("."),f=0;f<e.length-1;f++){var g=e[f];g in d||(d[g]={});d=d[g]}e=e[e.length-1];f=d[e];g=c(f);g!=f&&null!=g&&aa(d,e,{configurable:!0,writable:!0,value:g})}}
  ma("Promise",function(b){function c(b){this.b=0;this.g=void 0;this.a=[];var c=this.c();try{b(c.resolve,c.reject)}catch(l){c.reject(l)}}function d(){this.a=null}function e(b){return b instanceof c?b:new c(function(c){c(b)})}if(b)return b;d.prototype.b=function(b){null==this.a&&(this.a=[],this.f());this.a.push(b)};d.prototype.f=function(){var b=this;this.c(function(){b.h()})};var f=da.setTimeout;d.prototype.c=function(b){f(b,0)};d.prototype.h=function(){for(;this.a&&this.a.length;){var b=this.a;this.a=
  [];for(var c=0;c<b.length;++c){var d=b[c];b[c]=null;try{d()}catch(m){this.g(m)}}}this.a=null};d.prototype.g=function(b){this.c(function(){throw b;})};c.prototype.c=function(){function b(b){return function(e){d||(d=!0,b.call(c,e))}}var c=this,d=!1;return{resolve:b(this.v),reject:b(this.f)}};c.prototype.v=function(b){if(b===this)this.f(new TypeError("A Promise cannot resolve to itself"));else if(b instanceof c)this.w(b);else{a:switch(typeof b){case "object":var d=null!=b;break a;case "function":d=!0;
  break a;default:d=!1}d?this.m(b):this.h(b)}};c.prototype.m=function(b){var c=void 0;try{c=b.then}catch(l){this.f(l);return}"function"==typeof c?this.D(c,b):this.h(b)};c.prototype.f=function(b){this.j(2,b)};c.prototype.h=function(b){this.j(1,b)};c.prototype.j=function(b,c){if(0!=this.b)throw Error("Cannot settle("+b+", "+c+"): Promise already settled in state"+this.b);this.b=b;this.g=c;this.l()};c.prototype.l=function(){if(null!=this.a){for(var b=0;b<this.a.length;++b)g.b(this.a[b]);this.a=null}};
  var g=new d;c.prototype.w=function(b){var c=this.c();b.Ob(c.resolve,c.reject)};c.prototype.D=function(b,c){var d=this.c();try{b.call(c,d.resolve,d.reject)}catch(m){d.reject(m)}};c.prototype.then=function(b,d){function e(b,c){return"function"==typeof b?function(c){try{f(b(c))}catch(C){g(C)}}:c}var f,g,h=new c(function(b,c){f=b;g=c});this.Ob(e(b,f),e(d,g));return h};c.prototype["catch"]=function(b){return this.then(void 0,b)};c.prototype.Ob=function(b,c){function d(){switch(e.b){case 1:b(e.g);break;
  case 2:c(e.g);break;default:throw Error("Unexpected state: "+e.b);}}var e=this;null==this.a?g.b(d):this.a.push(d)};c.resolve=e;c.reject=function(b){return new c(function(c,d){d(b)})};c.race=function(b){return new c(function(c,d){for(var f=r(b),g=f.next();!g.done;g=f.next())e(g.value).Ob(c,d)})};c.all=function(b){var d=r(b),f=d.next();return f.done?e([]):new c(function(b,c){function g(c){return function(d){h[c]=d;k--;0==k&&b(h)}}var h=[],k=0;do h.push(void 0),k++,e(f.value).Ob(g(h.length-1),c),f=d.next();
  while(!f.done)})};return c});ma("Promise.prototype.finally",function(b){return b?b: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;})})}});function na(b){function c(c){return b.next(c)}function d(c){return b["throw"](c)}return new Promise(function(e,f){function g(b){b.done?e(b.value):Promise.resolve(b.value).then(c,d).then(g,f)}g(b.next())})}function v(b){return na(b())}
  var pa="function"==typeof Object.create?Object.create:function(b){function c(){}c.prototype=b;return new c},qa;if("function"==typeof Object.setPrototypeOf)qa=Object.setPrototypeOf;else{var ta;a:{var ua={Gd:!0},xa={};try{xa.__proto__=ua;ta=xa.Gd;break a}catch(b){}ta=!1}qa=ta?function(b,c){b.__proto__=c;if(b.__proto__!==c)throw new TypeError(b+" is not extensible");return b}:null}var ya=qa;
  function za(b,c){b.prototype=pa(c.prototype);b.prototype.constructor=b;if(ya)ya(b,c);else for(var d in c)if("prototype"!=d)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(c,d);e&&Object.defineProperty(b,d,e)}else b[d]=c[d];b.vf=c.prototype}function Aa(){this.g=!1;this.c=null;this.o=void 0;this.i=1;this.b=this.f=0;this.j=this.a=null}function Ba(b){if(b.g)throw new TypeError("Generator is already running");b.g=!0}Aa.prototype.h=function(b){this.o=b};
  function Ca(b,c){b.a={bd:c,fd:!0};b.i=b.f||b.b}Aa.prototype["return"]=function(b){this.a={"return":b};this.i=this.b};function x(b,c,d){b.i=d;return{value:c}}Aa.prototype.u=function(b){this.i=b};function y(b){b.i=0}function z(b,c,d){b.f=c;void 0!=d&&(b.b=d)}function Da(b,c){b.f=0;b.b=c||0}function Ea(b,c){b.i=c;b.f=0}function A(b){b.f=0;var c=b.a.bd;b.a=null;return c}function Fa(b){b.j=[b.a];b.f=0;b.b=0}
  function Ga(b,c){var d=b.j.splice(0)[0];(d=b.a=b.a||d)?d.fd?b.i=b.f||b.b:void 0!=d.u&&b.b<d.u?(b.i=d.u,b.a=null):b.i=b.b:b.i=c}function Ha(b){this.a=new Aa;this.b=b}function Ia(b,c){Ba(b.a);var d=b.a.c;if(d)return Ja(b,"return"in d?d["return"]:function(b){return{value:b,done:!0}},c,b.a["return"]);b.a["return"](c);return La(b)}
  function Ja(b,c,d,e){try{var f=c.call(b.a.c,d);if(!(f instanceof Object))throw new TypeError("Iterator result "+f+" is not an object");if(!f.done)return b.a.g=!1,f;var g=f.value}catch(h){return b.a.c=null,Ca(b.a,h),La(b)}b.a.c=null;e.call(b.a,g);return La(b)}
  function La(b){for(;b.a.i;)try{var c=b.b(b.a);if(c)return b.a.g=!1,{value:c.value,done:!1}}catch(d){b.a.o=void 0,Ca(b.a,d)}b.a.g=!1;if(b.a.a){c=b.a.a;b.a.a=null;if(c.fd)throw c.bd;return{value:c["return"],done:!0}}return{value:void 0,done:!0}}
  function Na(b){this.next=function(c){Ba(b.a);b.a.c?c=Ja(b,b.a.c.next,c,b.a.h):(b.a.h(c),c=La(b));return c};this["throw"]=function(c){Ba(b.a);b.a.c?c=Ja(b,b.a.c["throw"],c,b.a.h):(Ca(b.a,c),c=La(b));return c};this["return"]=function(c){return Ia(b,c)};ia();this[Symbol.iterator]=function(){return this}}function B(b,c){Na.prototype=b.prototype;return new Na(new Ha(c))}function Oa(b){if(!(b instanceof Array)){b=r(b);for(var c,d=[];!(c=b.next()).done;)d.push(c.value);b=d}return b}
  function Pa(b,c){return Object.prototype.hasOwnProperty.call(b,c)}
  ma("WeakMap",function(b){function c(b){this.a=(g+=Math.random()+1).toString();if(b){fa();ia();b=r(b);for(var c;!(c=b.next()).done;)c=c.value,this.set(c[0],c[1])}}function d(b){Pa(b,f)||aa(b,f,{value:{}})}function e(b){var c=Object[b];c&&(Object[b]=function(b){d(b);return c(b)})}if(function(){if(!b||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new b([[c,2],[d,3]]);if(2!=e.get(c)||3!=e.get(d))return!1;e["delete"](c);e.set(d,4);return!e.has(c)&&4==e.get(d)}catch(m){return!1}}())return b;
  var f="$jscomp_hidden_"+Math.random();e("freeze");e("preventExtensions");e("seal");var g=0;c.prototype.set=function(b,c){d(b);if(!Pa(b,f))throw Error("WeakMap key fail: "+b);b[f][this.a]=c;return this};c.prototype.get=function(b){return Pa(b,f)?b[f][this.a]:void 0};c.prototype.has=function(b){return Pa(b,f)&&Pa(b[f],this.a)};c.prototype["delete"]=function(b){return Pa(b,f)&&Pa(b[f],this.a)?delete b[f][this.a]:!1};return c});
  ma("Map",function(b){function c(){var b={};return b.Aa=b.next=b.head=b}function d(b,c){var d=b.a;return la(function(){if(d){for(;d.head!=b.a;)d=d.Aa;for(;d.next!=d.head;)return d=d.next,{done:!1,value:c(d)};d=null}return{done:!0,value:void 0}})}function e(b,c){var d=c&&typeof c;"object"==d||"function"==d?g.has(c)?d=g.get(c):(d=""+ ++h,g.set(c,d)):d="p_"+c;var e=b.b[d];if(e&&Pa(b.b,d))for(var f=0;f<e.length;f++){var k=e[f];if(c!==c&&k.key!==k.key||c===k.key)return{id:d,list:e,index:f,Y:k}}return{id:d,
  list:e,index:-1,Y:void 0}}function f(b){this.b={};this.a=c();this.size=0;if(b){b=r(b);for(var d;!(d=b.next()).done;)d=d.value,this.set(d[0],d[1])}}if(function(){if(!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new b(r([[c,"s"]]));if("s"!=d.get(c)||1!=d.size||d.get({x:4})||d.set({x:4},"t")!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||"s"!=f.value[1])return!1;f=e.next();return f.done||4!=f.value[0].x||
  "t"!=f.value[1]||!e.next().done?!1:!0}catch(q){return!1}}())return b;fa();ia();var g=new WeakMap;f.prototype.set=function(b,c){var d=e(this,b);d.list||(d.list=this.b[d.id]=[]);d.Y?d.Y.value=c:(d.Y={next:this.a,Aa:this.a.Aa,head:this.a,key:b,value:c},d.list.push(d.Y),this.a.Aa.next=d.Y,this.a.Aa=d.Y,this.size++);return this};f.prototype["delete"]=function(b){b=e(this,b);return b.Y&&b.list?(b.list.splice(b.index,1),b.list.length||delete this.b[b.id],b.Y.Aa.next=b.Y.next,b.Y.next.Aa=b.Y.Aa,b.Y.head=
  null,this.size--,!0):!1};f.prototype.clear=function(){this.b={};this.a=this.a.Aa=c();this.size=0};f.prototype.has=function(b){return!!e(this,b).Y};f.prototype.get=function(b){return(b=e(this,b).Y)&&b.value};f.prototype.entries=function(){return d(this,function(b){return[b.key,b.value]})};f.prototype.keys=function(){return d(this,function(b){return b.key})};f.prototype.values=function(){return d(this,function(b){return b.value})};f.prototype.forEach=function(b,c){for(var d=this.entries(),e;!(e=d.next()).done;)e=
  e.value,b.call(c,e[1],e[0],this)};f.prototype[Symbol.iterator]=f.prototype.entries;var h=0;return f});
  ma("Set",function(b){function c(b){this.a=new Map;if(b){b=r(b);for(var c;!(c=b.next()).done;)this.add(c.value)}this.size=this.a.size}if(function(){if(!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),e=new b(r([c]));if(!e.has(c)||1!=e.size||e.add(c)!=e||1!=e.size||e.add({x:4})!=e||2!=e.size)return!1;var f=e.entries(),g=f.next();if(g.done||g.value[0]!=c||g.value[1]!=c)return!1;g=f.next();return g.done||g.value[0]==c||4!=g.value[0].x||
  g.value[1]!=g.value[0]?!1:f.next().done}catch(h){return!1}}())return b;fa();ia();c.prototype.add=function(b){this.a.set(b,b);this.size=this.a.size;return this};c.prototype["delete"]=function(b){b=this.a["delete"](b);this.size=this.a.size;return b};c.prototype.clear=function(){this.a.clear();this.size=0};c.prototype.has=function(b){return this.a.has(b)};c.prototype.entries=function(){return this.a.entries()};c.prototype.values=function(){return this.a.values()};c.prototype.keys=c.prototype.values;
  c.prototype[Symbol.iterator]=c.prototype.values;c.prototype.forEach=function(b,c){var d=this;this.a.forEach(function(e){return b.call(c,e,e,d)})};return c});function Ra(b,c,d){b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var g=b[f];if(c.call(d,g,f,b))return{fa:f,Cd:g}}return{fa:-1,Cd:void 0}}ma("Array.prototype.findIndex",function(b){return b?b:function(b,d){return Ra(this,b,d).fa}});
  function Sa(b,c){ia();b instanceof String&&(b+="");var d=0,e={next:function(){if(d<b.length){var f=d++;return{value:c(f,b[f]),done:!1}}e.next=function(){return{done:!0,value:void 0}};return e.next()}};e[Symbol.iterator]=function(){return e};return e}ma("Array.prototype.keys",function(b){return b?b:function(){return Sa(this,function(b){return b})}});ma("Object.is",function(b){return b?b:function(b,d){return b===d?0!==b||1/b===1/d:b!==b&&d!==d}});
  ma("Array.prototype.includes",function(b){return b?b:function(b,d){var c=this;c instanceof String&&(c=String(c));var f=c.length,g=d||0;for(0>g&&(g=Math.max(g+f,0));g<f;g++){var h=c[g];if(h===b||Object.is(h,b))return!0}return!1}});function Ta(b,c,d){if(null==b)throw new TypeError("The 'this' value for String.prototype."+d+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+d+" must not be a regular expression");return b+""}
  ma("String.prototype.includes",function(b){return b?b:function(b,d){return-1!==Ta(this,b,"includes").indexOf(b,d||0)}});ma("Array.from",function(b){return b?b:function(b,d,e){ia();d=null!=d?d:function(b){return b};var c=[],g=b[Symbol.iterator];if("function"==typeof g)for(b=g.call(b);!(g=b.next()).done;)c.push(d.call(e,g.value));else{g=b.length;for(var h=0;h<g;h++)c.push(d.call(e,b[h]))}return c}});
  ma("String.prototype.startsWith",function(b){return b?b:function(b,d){for(var c=Ta(this,b,"startsWith"),f=c.length,g=b.length,h=Math.max(0,Math.min(d|0,c.length)),k=0;k<g&&h<f;)if(c[h++]!=b[k++])return!1;return k>=g}});ma("Array.prototype.find",function(b){return b?b:function(b,d){return Ra(this,b,d).Cd}});ma("Math.log2",function(b){return b?b:function(b){return Math.log(b)/Math.LN2}});
  var Ua="function"==typeof Object.assign?Object.assign:function(b,c){for(var d=1;d<arguments.length;d++){var e=arguments[d];if(e)for(var f in e)Pa(e,f)&&(b[f]=e[f])}return b};ma("Object.assign",function(b){return b||Ua});var Va=this;Va.a=!0;function F(b,c){var d=b.split("."),e=Va;d[0]in e||!e.execScript||e.execScript("var "+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c};/*
  
   Copyright 2016 Google LLC
   SPDX-License-Identifier: Apache-2.0
  */
  function Wa(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function Xa(b,c,d){var e=Math.pow(b.c,c);d=d*(1-e)+e*b.a;isNaN(d)||(b.a=d,b.b+=c)}function Ya(b){return b.a/(1-Math.pow(b.c,b.b))};function Za(){this.b=new Wa(2);this.c=new Wa(5);this.a=0}Za.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(Ya(this.b),Ya(this.c))};function $a(){}function ab(){}function bb(){}function cb(){}if(window.console&&window.console.log.bind){var db={},fb=(db[1]=console.error.bind(console),db[2]=console.warn.bind(console),db[3]=console.info.bind(console),db[4]=console.log.bind(console),db[5]=console.debug.bind(console),db[6]=console.debug.bind(console),db);ab=fb[2];$a=fb[1]};function gb(b,c){for(var d=[],e=r(b),f=e.next();!f.done;f=e.next())d.push(c(f.value));return d}function hb(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())if(!c(e.value))return!1;return!0}
  var jb=function ib(b){var d;return B(ib,function(e){switch(e.i){case 1:d=0;case 2:if(!(d<b)){e.u(0);break}return x(e,d,3);case 3:d++,e.u(2)}})},lb=function kb(b){var d,e,f,g,h,k;return B(kb,function(l){switch(l.i){case 1:d=-1,f=e=void 0,g=r(b),h=g.next();case 2:if(h.done){if(-1==d){l.u(0);break}return x(l,{fa:d,ue:e,item:f,next:void 0},0)}k=h.value;if(!(0<=d)){l.u(5);break}return x(l,{fa:d,item:f,ue:e,next:k},5);case 5:d++,e=f,f=k,h=g.next(),l.u(2)}})};var mb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function nb(b){var c;b instanceof nb?(ob(this,b.qa),this.Xa=b.Xa,this.pa=b.pa,pb(this,b.pb),this.ja=b.ja,qb(this,b.a.clone()),this.Na=b.Na):b&&(c=String(b).match(mb))?(ob(this,c[1]||"",!0),this.Xa=rb(c[2]||""),this.pa=rb(c[3]||"",!0),pb(this,c[4]),this.ja=rb(c[5]||"",!0),qb(this,c[6]||"",!0),this.Na=rb(c[7]||"")):this.a=new sb(null)}p=nb.prototype;p.qa="";p.Xa="";p.pa="";p.pb=null;p.ja="";p.Na="";
  p.toString=function(){var b=[],c=this.qa;c&&b.push(tb(c,ub,!0),":");if(c=this.pa){b.push("//");var d=this.Xa;d&&b.push(tb(d,ub,!0),"@");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));c=this.pb;null!=c&&b.push(":",String(c))}if(c=this.ja)this.pa&&"/"!=c.charAt(0)&&b.push("/"),b.push(tb(c,"/"==c.charAt(0)?vb:xb,!0));(c=this.a.toString())&&b.push("?",c);(c=this.Na)&&b.push("#",tb(c,yb));return b.join("")};
  p.resolve=function(b){var c=this.clone();"data"===c.qa&&(c=new nb);var d=!!b.qa;d?ob(c,b.qa):d=!!b.Xa;d?c.Xa=b.Xa:d=!!b.pa;d?c.pa=b.pa:d=null!=b.pb;var e=b.ja;if(d)pb(c,b.pb);else if(d=!!b.ja){if("/"!=e.charAt(0))if(this.pa&&!this.ja)e="/"+e;else{var f=c.ja.lastIndexOf("/");-1!=f&&(e=c.ja.substr(0,f+1)+e)}if(".."==e||"."==e)e="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){f=0==e.lastIndexOf("/",0);e=e.split("/");for(var g=[],h=0;h<e.length;){var k=e[h++];"."==k?f&&h==e.length&&g.push(""):".."==
  k?((1<g.length||1==g.length&&""!=g[0])&&g.pop(),f&&h==e.length&&g.push("")):(g.push(k),f=!0)}e=g.join("/")}}d?c.ja=e:d=""!==b.a.toString();d?qb(c,b.a.clone()):d=!!b.Na;d&&(c.Na=b.Na);return c};p.clone=function(){return new nb(this)};function ob(b,c,d){b.qa=d?rb(c,!0):c;b.qa&&(b.qa=b.qa.replace(/:$/,""))}function pb(b,c){if(c){c=Number(c);if(isNaN(c)||0>c)throw Error("Bad port number "+c);b.pb=c}else b.pb=null}function qb(b,c,d){c instanceof sb?b.a=c:(d||(c=tb(c,zb)),b.a=new sb(c))}
  function rb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):""}function tb(b,c,d){return"string"==typeof b?(b=encodeURI(b).replace(c,Ab),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),b):null}function Ab(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)}var ub=/[#\/\?@]/g,xb=/[#\?:]/g,vb=/[#\?]/g,zb=/[#\?@]/g,yb=/#/g;function sb(b){this.a=b||null}p=sb.prototype;p.ha=null;p.Rb=null;
  p.add=function(b,c){if(!this.ha&&(this.ha={},this.Rb=0,this.a))for(var d=this.a.split("&"),e=0;e<d.length;e++){var f=d[e].indexOf("="),g=null;if(0<=f){var h=d[e].substring(0,f);g=d[e].substring(f+1)}else h=d[e];h=decodeURIComponent(h.replace(/\+/g," "));g=g||"";this.add(h,decodeURIComponent(g.replace(/\+/g," ")))}this.a=null;(d=this.ha.hasOwnProperty(b)&&this.ha[b])||(this.ha[b]=d=[]);d.push(c);this.Rb++;return this};
  p.toString=function(){if(this.a)return this.a;if(!this.ha)return"";var b=[],c;for(c in this.ha)for(var d=encodeURIComponent(c),e=this.ha[c],f=0;f<e.length;f++){var g=d;""!==e[f]&&(g+="="+encodeURIComponent(e[f]));b.push(g)}return this.a=b.join("&")};p.clone=function(){var b=new sb;b.a=this.a;if(this.ha){var c={},d;for(d in this.ha)c[d]=this.ha[d].concat();b.ha=c;b.Rb=this.Rb}return b};function Bb(b){this.b=b;this.a=null}Bb.prototype.O=function(b){var c=this;this.stop();var d=!0,e=null;this.a=function(){window.clearTimeout(e);d=!1};e=window.setTimeout(function(){d&&c.b()},1E3*b);return this};Bb.prototype.stop=function(){this.a&&(this.a(),this.a=null)};function G(b){this.b=b;this.a=null}F("shaka.util.Timer",G);G.prototype.fc=function(){this.stop();this.b();return this};G.prototype.tickNow=G.prototype.fc;G.prototype.O=function(b){var c=this;this.stop();this.a=(new Bb(function(){c.b()})).O(b);return this};G.prototype.tickAfter=G.prototype.O;G.prototype.Ca=function(b){var c=this;this.stop();this.a=(new Bb(function(){c.a.O(b);c.b()})).O(b);return this};G.prototype.tickEvery=G.prototype.Ca;G.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)};
  G.prototype.stop=G.prototype.stop;function Cb(b,c){var d=Db();this.j=null==b.maxAttempts?d.maxAttempts:b.maxAttempts;this.f=null==b.baseDelay?d.baseDelay:b.baseDelay;this.h=null==b.fuzzFactor?d.fuzzFactor:b.fuzzFactor;this.g=null==b.backoffFactor?d.backoffFactor:b.backoffFactor;this.a=0;this.b=this.f;if(this.c=void 0===c?!1:c)this.a=1}
  function Eb(b){return v(function d(){var e,f;return B(d,function(d){switch(d.i){case 1:if(b.a>=b.j)if(b.c)b.a=1,b.b=b.f;else throw new I(J,Fb,Gb);e=b.a;b.a++;if(0==e)return d["return"]();f=b.b*(1+(2*Math.random()-1)*b.h);return x(d,new Promise(function(b){(new G(b)).O(f/1E3)}),2);case 2:b.b*=b.g,y(d)}})})}function Db(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function I(b,c,d,e){for(var f=[],g=3;g<arguments.length;++g)f[g-3]=arguments[g];this.severity=b;this.category=c;this.code=d;this.data=f;this.handled=!1}F("shaka.util.Error",I);I.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")};var J=2;I.Severity={RECOVERABLE:1,CRITICAL:J};var Fb=7;I.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:Fb,CAST:8,STORAGE:9,ADS:10};var Gb=1010;
  I.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:Gb,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,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,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,INVALID_STREAMS_CHOSEN:5005,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,STORE_ALREADY_IN_PROGRESS:9006,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 Hb(){var b,c,d=new Promise(function(d,f){b=d;c=f});d.resolve=b;d.reject=c;return d}Hb.prototype.resolve=function(){};Hb.prototype.reject=function(){};function Ib(b,c){this.promise=b;this.nd=c;this.a=!1}F("shaka.util.AbortableOperation",Ib);function Jb(b){return new Ib(Promise.reject(b),function(){return Promise.resolve()})}Ib.failed=Jb;function Kb(){var b=Promise.reject(new I(J,Fb,7001));b["catch"](function(){});return new Ib(b,function(){return Promise.resolve()})}Ib.aborted=Kb;function Lb(b){return new Ib(Promise.resolve(b),function(){return Promise.resolve()})}Ib.completed=Lb;
  function Mb(b){return new Ib(b,function(){return b["catch"](function(){})})}Ib.notAbortable=Mb;Ib.prototype.abort=function(){this.a=!0;return this.nd()};Ib.prototype.abort=Ib.prototype.abort;function Nb(b){return new Ib(Promise.all(b.map(function(b){return b.promise})),function(){return Promise.all(b.map(function(b){return b.abort()}))})}Ib.all=Nb;Ib.prototype["finally"]=function(b){this.promise.then(function(){return b(!0)},function(){return b(!1)});return this};Ib.prototype["finally"]=Ib.prototype["finally"];
  Ib.prototype.T=function(b,c){function d(){f.reject(new I(J,Fb,7001));return e.abort()}var e=this,f=new Hb;this.promise.then(function(c){e.a?f.reject(new I(J,Fb,7001)):b?d=Ob(b,c,f):f.resolve(c)},function(b){c?d=Ob(c,b,f):f.reject(b)});return new Ib(f,function(){return d()})};Ib.prototype.chain=Ib.prototype.T;
  function Ob(b,c,d){try{var e=b(c);if(e&&e.promise&&e.abort)return d.resolve(e.promise),function(){return e.abort()};d.resolve(e);return function(){return Promise.resolve(e).then(function(){})["catch"](function(){})}}catch(f){return d.reject(f),function(){return Promise.resolve()}}};function Pb(b,c){if(!b&&!c)return!0;if(!b||!c||b.byteLength!=c.byteLength)return!1;if(Qb(b)==Qb(c)&&(b.byteOffset||0)==(c.byteOffset||0))return!0;for(var d=K(b),e=K(c),f=r(jb(b.byteLength)),g=f.next();!g.done;g=f.next())if(g=g.value,d[g]!=e[g])return!1;return!0}F("shaka.util.BufferUtils.equal",Pb);function Qb(b){return b instanceof ArrayBuffer?b:b.buffer}function Sb(b){return b instanceof ArrayBuffer?b:0==b.byteOffset&&b.byteLength==b.buffer.byteLength?b.buffer:(new Uint8Array(b)).buffer}
  F("shaka.util.BufferUtils.toArrayBuffer",Sb);function K(b,c,d){d=void 0===d?Infinity:d;return Tb(b,void 0===c?0:c,d,Uint8Array)}F("shaka.util.BufferUtils.toUint8",K);function Ub(b,c,d){d=void 0===d?Infinity:d;return Tb(b,void 0===c?0:c,d,DataView)}F("shaka.util.BufferUtils.toDataView",Ub);function Tb(b,c,d,e){var f=(b.byteOffset||0)+b.byteLength;c=Math.max(0,Math.min((b.byteOffset||0)+c,f));return new e(Qb(b),c,Math.min(c+Math.max(d,0),f)-c)};function L(b,c){c=void 0===c?{}:c;for(var d in c)Object.defineProperty(this,d,{value:c[d],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=b;this.isTrusted=!1;this.target=this.currentTarget=null;this.a=!1}L.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};L.prototype.stopImmediatePropagation=function(){this.a=!0};
  L.prototype.stopPropagation=function(){};function Vb(){this.a={}}p=Vb.prototype;p.push=function(b,c){this.a.hasOwnProperty(b)?this.a[b].push(c):this.a[b]=[c]};p.get=function(b){return(b=this.a[b])?b.slice():null};p.getAll=function(){var b=[],c;for(c in this.a)b.push.apply(b,Oa(this.a[c]));return b};p.remove=function(b,c){b in this.a&&(this.a[b]=this.a[b].filter(function(b){return b!=c}))};p.forEach=function(b){for(var c in this.a)b(c,this.a[c])};function Wb(){this.lc=new Vb;this.Kb=this}Wb.prototype.addEventListener=function(b,c){this.lc.push(b,c)};Wb.prototype.removeEventListener=function(b,c){this.lc.remove(b,c)};Wb.prototype.dispatchEvent=function(b){var c=this.lc.get(b.type)||[];c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;b.target=this.Kb;b.currentTarget=this.Kb;try{d.handleEvent?d.handleEvent(b):d.call(this,b)}catch(e){}if(b.a)break}return b.defaultPrevented};function Xb(b){function c(b){switch(typeof b){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return b;default:if(!b||b.buffer&&b.buffer.constructor==ArrayBuffer)return b;if(d.has(b))return null;var e=b.constructor==Array;if(b.constructor!=Object&&!e)return null;d.add(b);var g=e?[]:{},h;for(h in b)g[h]=c(b[h]);e&&(g.length=b.length);return g}}var d=new Set;return c(b)}function Yb(b){var c={},d;for(d in b)c[d]=b[d];return c};function Zb(b,c){return"number"===typeof b&&"number"===typeof c&&isNaN(b)&&isNaN(c)?!0:b===c}function $b(b,c){var d=b.indexOf(c);-1<d&&b.splice(d,1)}function ac(b,c){for(var d=0,e=r(b),f=e.next();!f.done;f=e.next())d+=c(f.value)?1:0;return d}
  function bc(b,c,d){d||(d=Zb);if(b.length!=c.length)return!1;c=c.slice();var e={};b=r(b);for(var f=b.next();!f.done;e={item:e.item},f=b.next()){e.item=f.value;f=c.findIndex(function(b){return function(c){return d(b.item,c)}}(e));if(-1==f)return!1;c[f]=c[c.length-1];c.pop()}return 0==c.length};function cc(){this.a=[]}function dc(b,c){b.a.push(c["finally"](function(){$b(b.a,c)}))}cc.prototype.destroy=function(){for(var b=[],c=r(this.a),d=c.next();!d.done;d=c.next())d=d.value,d.promise["catch"](function(){}),b.push(d.abort());this.a=[];return Promise.all(b)};function M(b){Wb.call(this);this.f=!1;this.g=new cc;this.a=new Set;this.b=new Set;this.c=b||null}za(M,Wb);F("shaka.net.NetworkingEngine",M);function ec(b,c,d){d=d||fc;var e=gc[b];if(!e||d>=e.priority)gc[b]={priority:d,te:c}}M.registerScheme=ec;M.unregisterScheme=function(b){delete gc[b]};M.prototype.ve=function(b){this.a.add(b)};M.prototype.registerRequestFilter=M.prototype.ve;M.prototype.Ne=function(b){this.a["delete"](b)};M.prototype.unregisterRequestFilter=M.prototype.Ne;M.prototype.Md=function(){this.a.clear()};
  M.prototype.clearAllRequestFilters=M.prototype.Md;M.prototype.we=function(b){this.b.add(b)};M.prototype.registerResponseFilter=M.prototype.we;M.prototype.Oe=function(b){this.b["delete"](b)};M.prototype.unregisterResponseFilter=M.prototype.Oe;M.prototype.Nd=function(){this.b.clear()};M.prototype.clearAllResponseFilters=M.prototype.Nd;M.defaultRetryParameters=function(){return Db()};
  function hc(b,c){return{uris:b,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null,sessionId:null}}M.makeRequest=hc;M.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};M.prototype.destroy=M.prototype.destroy;
  M.prototype.request=function(b,c){var d=this,e=new ic;if(this.f){var f=Promise.reject(new I(J,Fb,7001));f["catch"](function(){});return new jc(f,function(){return Promise.resolve()},e)}c.method=c.method||"GET";c.headers=c.headers||{};c.retryParameters=c.retryParameters?Xb(c.retryParameters):Db();c.uris=Xb(c.uris);f=kc(this,b,c);var g=f.T(function(){return lc(d,b,c,new Cb(c.retryParameters,!1),0,null,e)}),h=g.T(function(c){return mc(d,b,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-
  k},function(){});var m=0;g.promise.then(function(){m=Date.now()},function(){});f=h.T(function(c){var e=Date.now()-m,f=c.response;f.timeMs+=l;f.timeMs+=e;c.le||!d.c||f.fromCache||b!=nc||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=J);throw b;});f=new jc(f.promise,f.nd,e);dc(this.g,f);return f};M.prototype.request=M.prototype.request;
  function kc(b,c,d){var e=Lb(void 0),f={};b=r(b.a);for(var g=b.next();!g.done;f={Ic:f.Ic},g=b.next())f.Ic=g.value,e=e.T(function(b){return function(){d.body&&(d.body=Sb(d.body));return b.Ic(c,d)}}(f));return e.T(void 0,function(b){if(b&&7001==b.code)throw b;throw new I(J,1,1006,b);})}
  function lc(b,c,d,e,f,g,h){var k=new nb(d.uris[f]),l=k.qa,m=!1;l||(l=location.protocol,l=l.slice(0,-1),ob(k,l),d.uris[f]=k.toString());l=l.toLowerCase();var n=(l=gc[l])?l.te:null;if(!n)return Jb(new I(J,1,1E3,k));var q;return Mb(Eb(e)).T(function(){if(b.f)return Kb();q=Date.now();var e=nc;return n(d.uris[f],d,c,function(d,f,g){b.c&&c==e&&(b.c(d,f),m=!0,h.a=g)})}).T(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-q);return{response:b,le:m}},function(k){if(b.f)return Kb();if(7001==k.code)throw k;
  if(k.code==Gb)throw g;if(1==k.severity){var l=new L("retry",{error:k instanceof I?k:null});b.dispatchEvent(l);f=(f+1)%d.uris.length;return lc(b,c,d,e,f,k,h)}throw k;})}
  function mc(b,c,d){var e=Lb(void 0),f={};b=r(b.b);for(var g=b.next();!g.done;f={Jc:f.Jc},g=b.next())f.Jc=g.value,e=e.T(function(b){return function(){var e=d.response;e.data&&(e.data=Sb(e.data));return b.Jc(c,e)}}(f));return e.T(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=J;b instanceof I&&(c=b.severity);throw new I(c,1,1007,b);})}function ic(){this.a=0}M.NumBytesRemainingClass=ic;function jc(b,c,d){Ib.call(this,b,c);this.b=d}za(jc,Ib);M.PendingRequest=jc;jc.all=Nb;
  jc.notAbortable=Mb;jc.completed=Lb;jc.aborted=Kb;jc.failed=Jb;var nc=1;M.RequestType={MANIFEST:0,SEGMENT:nc,LICENSE:2,APP:3,TIMING:4};var fc=3;M.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:fc};var gc={};function oc(b){this.a=!1;this.b=new Hb;this.c=b}oc.prototype.destroy=function(){var b=this;if(this.a)return this.b;this.a=!0;return this.c().then(function(){b.b.resolve()},function(){b.b.resolve()})};function pc(b,c){if(b.a){if(c&&7003==c.code)throw c;throw new I(J,Fb,7003,c);}};function qc(){}F("shaka.util.IReleasable",qc);qc.prototype.release=function(){};function O(){this.a=new Vb}F("shaka.util.EventManager",O);O.prototype.release=function(){this.Wa();this.a=null};O.prototype.release=O.prototype.release;O.prototype.s=function(b,c,d,e){this.a&&(b=new rc(b,c,d,e),this.a.push(c,b))};O.prototype.listen=O.prototype.s;O.prototype.ca=function(b,c,d,e){function f(e){g.da(b,c,f);d(e)}var g=this;this.s(b,c,f,e)};O.prototype.listenOnce=O.prototype.ca;
  O.prototype.da=function(b,c,d){if(this.a){var e=this.a.get(c)||[];e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.target!=b||d!=f.listener&&d||(f.da(),this.a.remove(c,f))}};O.prototype.unlisten=O.prototype.da;O.prototype.Wa=function(){if(this.a){var b=this.a.getAll();b=r(b);for(var c=b.next();!c.done;c=b.next())c.value.da();this.a.a={}}};O.prototype.removeAll=O.prototype.Wa;
  function rc(b,c,d,e){this.target=b;this.type=c;this.listener=d;this.a=sc(b,e);this.target.addEventListener(c,d,this.a)}rc.prototype.da=function(){this.target.removeEventListener(this.type,this.listener,this.a);this.listener=this.target=null;this.a=!1};rc.prototype.unlisten=rc.prototype.da;function sc(b,c){if(void 0==c)return!1;if("boolean"==typeof c)return c;var d=new Set(["passive","capture"]);Object.keys(c).filter(function(b){return!d.has(b)});return tc(b)?c:c.capture||!1}
  function tc(b){var c=uc;if(void 0==c){c=!1;try{var d={},e={get:function(){c=!0;return!1}};Object.defineProperty(d,"passive",e);Object.defineProperty(d,"capture",e);e=function(){};b.addEventListener("test",e,d);b.removeEventListener("test",e,d)}catch(f){c=!1}uc=c}return c||!1}var uc=void 0;function vc(b){b=K(b);if(Ub(b).getUint32(0,!0)+4!=b.byteLength)throw new RangeError("Malformed FairPlay init data");b=wc(b.subarray(4),!0);return(new nb(b)).pa}F("shaka.util.FairPlayUtils.defaultGetContentId",vc);
  function xc(b,c,d){function e(b){Ub(h).setUint32(k,b.byteLength,!0);k+=4;f(b)}function f(b){h.set(K(b),k);k+=b.byteLength}if(!d||!d.byteLength)throw new I(J,6,6015);var g;"string"==typeof c?g=yc(c,!0):g=c;var h=new Uint8Array(8+b.byteLength+g.byteLength+d.byteLength),k=0;f(b);e(g);e(d);return h}F("shaka.util.FairPlayUtils.initDataTransform",xc);function zc(b){this.b=b;this.a=void 0}F("shaka.util.Lazy",zc);zc.prototype.value=function(){void 0==this.a&&(this.a=this.b());return this.a};zc.prototype.value=zc.prototype.value;function Ac(b){for(var c=new Map,d=r(Object.keys(b)),e=d.next();!e.done;e=d.next())e=e.value,c.set(e,b[e]);return c}function Bc(b){var c={};b.forEach(function(b,e){c[e]=b});return c};function Cc(b,c){var d=b;c&&(d+='; codecs="'+c+'"');return d}function Dc(b){var c=[b.mimeType];Ec.forEach(function(d,e){var f=b[e];f&&c.push(d+'="'+f+'"')});return c.join(";")}function Gc(b){b=b.split(".");var c=b[0];b.pop();return[c,b.join(".")]}var Ec=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Hc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Ic(b){return""!=Jc().canPlayType(b)}function Kc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Lc("Tizen")}function Mc(){if(!Kc())return null;var b=navigator.userAgent.match(/Version\/(\d+)/);return b?parseInt(b[1],10):(b=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(b[1],10):null}function Lc(b){return(navigator.userAgent||"").includes(b)}
  function Jc(){if(Nc)return Nc;Oc||(Oc=new G(function(){Nc=null}));(Nc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Nc=document.createElement("video"));Oc.O(1);return Nc}var Oc=null,Nc=null;function Pc(){}F("shaka.util.StringUtils",Pc);function Qc(b){if(!b)return"";b=K(b);239==b[0]&&187==b[1]&&191==b[2]&&(b=b.subarray(3));b=Rc(b);b=escape(b);try{return decodeURIComponent(b)}catch(c){throw new I(J,2,2004);}}Pc.fromUTF8=Qc;function wc(b,c,d){if(!b)return"";if(!d&&0!=b.byteLength%2)throw new I(J,2,2004);var e=Math.floor(b.byteLength/2);d=new Uint16Array(e);b=Ub(b);e=r(jb(e));for(var f=e.next();!f.done;f=e.next())f=f.value,d[f]=b.getUint16(2*f,c);return Rc(d)}Pc.fromUTF16=wc;
  function Sc(b){function c(b){return d.byteLength<=b||32<=d[b]&&126>=d[b]}if(!b)return"";var d=K(b);if(239==d[0]&&187==d[1]&&191==d[2])return Qc(d);if(254==d[0]&&255==d[1])return wc(d.subarray(2),!1);if(255==d[0]&&254==d[1])return wc(d.subarray(2),!0);if(0==d[0]&&0==d[2])return wc(b,!1);if(0==d[1]&&0==d[3])return wc(b,!0);if(c(0)&&c(1)&&c(2)&&c(3))return Qc(b);throw new I(J,2,2003);}Pc.fromBytesAutoDetect=Sc;
  function Tc(b){b=encodeURIComponent(b);var c=unescape(b);b=new Uint8Array(c.length);c=r(lb(c));for(var d=c.next();!d.done;d=c.next())d=d.value,b[d.fa]=d.item.charCodeAt(0);return Sb(b)}Pc.toUTF8=Tc;function yc(b,c){for(var d=new ArrayBuffer(2*b.length),e=new DataView(d),f=r(lb(b)),g=f.next();!g.done;g=f.next())g=g.value,e.setUint16(2*g.fa,g.item.charCodeAt(0),c);return d}Pc.toUTF16=yc;function Rc(b){return Uc.value()(b)}Pc.resetFromCharCode=function(){Uc.a=void 0};
  var Uc=new zc(function(){function b(b){try{var c=new Uint8Array(b);return 0<String.fromCharCode.apply(null,c).length}catch(f){return!1}}for(var c={size:65536};0<c.size;c={size:c.size},c.size/=2)if(b(c.size))return function(b){return function(c){for(var d="",e=0;e<c.length;e+=b.size)d+=String.fromCharCode.apply(null,c.subarray(e,e+b.size));return d}}(c);return null});function Vc(){}function Wc(b){b=Rc(K(b));return btoa(b)}F("shaka.util.Uint8ArrayUtils.toStandardBase64",Wc);function Xc(b,c){c=void 0==c?!0:c;var d=Wc(b).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/[=]*$/,"")}F("shaka.util.Uint8ArrayUtils.toBase64",Xc);function Yc(b){var c=window.atob(b.replace(/-/g,"+").replace(/_/g,"/"));b=new Uint8Array(c.length);c=r(lb(c));for(var d=c.next();!d.done;d=c.next())d=d.value,b[d.fa]=d.item.charCodeAt(0);return b}
  F("shaka.util.Uint8ArrayUtils.fromBase64",Yc);function Zc(b){var c=b.length/2,d=new Uint8Array(c);c=r(jb(c));for(var e=c.next();!e.done;e=c.next())e=e.value,d[e]=window.parseInt(b.substr(2*e,2),16);return d}F("shaka.util.Uint8ArrayUtils.fromHex",Zc);function $c(b){var c=K(b);b="";c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d=d.toString(16),1==d.length&&(d="0"+d),b+=d;return b}F("shaka.util.Uint8ArrayUtils.toHex",$c);
  function ad(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];var e=0,f=r(c);for(d=f.next();!d.done;d=f.next())e+=d.value.byteLength;e=new Uint8Array(e);f=0;c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,e.set(K(d),f),f+=d.byteLength;return e}F("shaka.util.Uint8ArrayUtils.concat",ad);function bd(b){var c=this;this.D=b;this.w=new Set;this.f=this.l=null;this.S=!1;this.L=0;this.a=null;this.j=new O;this.b=new Map;this.v=[];this.m=new Hb;this.c=null;this.g=function(d){c.m.reject(d);b.onError(d)};this.$=new Map;this.V=new Map;this.P=new G(function(){return cd(c)});this.F=!1;this.H=[];this.N=!1;this.W=(new G(function(){dd(c)})).Ca(1);this.m["catch"](function(){});this.h=new oc(function(){return ed(c)})}bd.prototype.destroy=function(){return this.h.destroy()};
  function ed(b){return v(function d(){return B(d,function(d){switch(d.i){case 1:return b.j.release(),b.j=null,b.m.reject(),b.W.stop(),b.W=null,b.P.stop(),b.P=null,x(d,fd(b),2);case 2:if(!b.f){d.u(3);break}z(d,4);return x(d,b.f.setMediaKeys(null),6);case 6:Ea(d,5);break;case 4:A(d);case 5:b.f=null;case 3:b.a=null,b.w.clear(),b.l=null,b.v=[],b.c=null,b.g=function(){},b.D=null,y(d)}})})}bd.prototype.configure=function(b){this.c=b};function gd(b,c,d){b.v=[];b.F=d;return hd(b,c)}
  function id(b,c,d){b.v=d;b.F=0<d.length;return hd(b,c)}function jd(b,c,d,e,f,g){var h=new Map;h.set(c,{audioCapabilities:f,videoCapabilities:g,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:c,drmInfos:[{keySystem:c,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:e,initData:null,keyIds:null}]});return kd(b,h)}
  function hd(b,c){var d=ld(b);if(d)for(var e=r(c),f=e.next();!f.done;f=e.next())f.value.drmInfos=[d];d=c.some(function(b){return 0<b.drmInfos.length});d||(f=Ac(b.c.servers),md(c,f));e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.drmInfos);for(var g=f.next();!g.done;g=f.next())nd(g.value,Ac(b.c.servers),Ac(b.c.advanced||{}))}f=od(b,c);if(!f.size)return b.S=!0,Promise.resolve();f=kd(b,f);return d?f:f["catch"](function(){})}
  bd.prototype.ub=function(b){var c=this;return v(function e(){var f,g,h;return B(e,function(e){switch(e.i){case 1:if(!c.l)return c.j.ca(b,"encrypted",function(){c.g(new I(J,6,6010))}),e["return"]();c.f=b;c.j.ca(c.f,"play",function(){for(var b=r(c.H),e=b.next();!e.done;e=b.next())pd(c,e.value);c.N=!0;c.H=[]});"webkitCurrentPlaybackTargetIsWireless"in c.f&&c.j.s(c.f,"webkitcurrentplaybacktargetiswirelesschanged",function(){return fd(c)});f=c.f.setMediaKeys(c.l);f=f["catch"](function(b){return Promise.reject(new I(J,
  6,6003,b.message))});g=qd(c);return x(e,Promise.all([f,g]),2);case 2:pc(c.h),rd(c),c.a.initData.length||c.v.length||(h=function(b){return sd(c,b.initDataType,K(b.initData))},c.j.s(c.f,"encrypted",h)),y(e)}})})};
  function qd(b){return v(function d(){var e;return B(d,function(d){switch(d.i){case 1:if(!(b.l&&b.a&&b.a.serverCertificate&&b.a.serverCertificate.length)){d.u(0);break}z(d,3);return x(d,b.l.setServerCertificate(b.a.serverCertificate),5);case 5:Ea(d,0);break;case 3:throw e=A(d),new I(J,6,6004,e.message);}})})}
  function td(b,c){return v(function e(){var f,g,h;return B(e,function(e){switch(e.i){case 1:return x(e,ud(b,c),2);case 2:f=e.o;if(!f)return e["return"]();g=[];if(h=b.b.get(f))h.wa=new Hb,g.push(h.wa);g.push(f.remove());return x(e,Promise.all(g),0)}})})}function rd(b){for(var c=(b.a?b.a.initData:[])||[],d=r(c),e=d.next();!e.done;e=d.next())e=e.value,vd(b,e.initDataType,e.initData);d=r(b.v);for(e=d.next();!e.done;e=d.next())ud(b,e.value);c.length||b.v.length||b.m.resolve();return b.m}
  function sd(b,c,d){var e=b.b.values();e=r(e);for(var f=e.next();!f.done;f=e.next())if(Pb(d,f.value.initData)&&!Lc("Tizen 2"))return;vd(b,c,d)}function wd(b){return b?b.keySystem:""}function xd(b,c){return Lc("Edge/")?!0:b.w.has(c)}function yd(b){b=b.b.keys();b=gb(b,function(b){return b.sessionId});return Array.from(b)}bd.prototype.wb=function(){var b=Infinity,c=this.b.keys();c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,isNaN(d.expiration)||(b=Math.min(b,d.expiration));return b};
  function od(b,c){for(var d=new Set,e=r(c),f=e.next();!f.done;f=e.next()){var g=r(f.value.drmInfos);for(f=g.next();!f.done;f=g.next())d.add(f.value)}e=r(d);for(f=e.next();!f.done;f=e.next())nd(f.value,Ac(b.c.servers),Ac(b.c.advanced||{}));g=b.F?"required":"optional";var h=b.F?["persistent-license"]:["temporary"];e=new Map;d=r(d);for(f=d.next();!f.done;f=d.next())f=f.value,e.set(f.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:g,sessionTypes:h,
  label:f.keySystem,drmInfos:[]});d=r(c);for(f=d.next();!f.done;f=d.next()){f=f.value;g=f.audio;h=f.video;var k=g?Cc(g.mimeType,g.codecs):"",l=h?Cc(h.mimeType,h.codecs):"",m=r(f.drmInfos);for(f=m.next();!f.done;f=m.next()){f=f.value;var n=e.get(f.keySystem);n.drmInfos.push(f);f.distinctiveIdentifierRequired&&(n.distinctiveIdentifier="required");f.persistentStateRequired&&(n.persistentState="required");g&&n.audioCapabilities.push({robustness:f.audioRobustness||"",contentType:k});h&&n.videoCapabilities.push({robustness:f.videoRobustness||
  "",contentType:l})}}return e}
  function kd(b,c){return v(function e(){var f,g,h,k,l,m,n,q,t,u,w,C,E,D,H,N,ba;return B(e,function(e){switch(e.i){case 1:if(1==c.size&&c.has(""))throw new I(J,6,6E3);for(var ea=r(c.values()),ka=ea.next();!ka.done;ka=ea.next())f=ka.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;h=r([!0,!1]);k=h.next();case 2:if(k.done){e.u(4);break}l=k.value;m=r(c.keys());n=m.next();case 5:if(n.done){e.u(7);break}q=n.value;t=c.get(q);u=t.drmInfos.some(function(b){return!!b.licenseServerUri});
  if(u!=l){e.u(6);break}z(e,8);return x(e,navigator.requestMediaKeySystemAccess(q,[t]),10);case 10:g=e.o;e.u(7);break;case 8:A(e);case 9:pc(b.h);case 6:n=m.next();e.u(5);break;case 7:if(g){e.u(4);break}k=h.next();e.u(2);break;case 4:if(!g)throw new I(J,6,6001);pc(b.h);z(e,11);b.w.clear();w=g.getConfiguration();C=w.audioCapabilities||[];E=w.videoCapabilities||[];ka=r(C);for(ea=ka.next();!ea.done;ea=ka.next())D=ea.value,b.w.add(D.contentType);ka=r(E);for(ea=ka.next();!ea.done;ea=ka.next())H=ea.value,
  b.w.add(H.contentType);b.a=zd(g.keySystem,c.get(g.keySystem));if(!b.a.licenseServerUri)throw new I(J,6,6012,b.a.keySystem);return x(e,g.createMediaKeys(),13);case 13:N=e.o;pc(b.h);b.l=N;b.S=!0;Ea(e,0);break;case 11:ba=A(e);pc(b.h,ba);b.a=null;b.w.clear();if(ba instanceof I)throw ba;throw new I(J,6,6002,ba.message);}})})}
  function ld(b){b=Ac(b.c.clearKeys);if(0==b.size)return null;var c=[],d=[];b.forEach(function(b,e){var f=Zc(e),g=Zc(b);f={kty:"oct",kid:Xc(f,!1),k:Xc(g,!1)};c.push(f);d.push(f.kid)});b=JSON.stringify({keys:c});var e=JSON.stringify({kids:d});e=[{initData:K(Tc(e)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(b),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
  initData:e,keyIds:[]}}
  function ud(b,c){return v(function e(){var f,g,h,k,l;return B(e,function(e){switch(e.i){case 1:try{f=b.l.createSession("persistent-license")}catch(n){return g=new I(J,6,6005,n.message),b.g(g),e["return"](Promise.reject(g))}b.j.s(f,"message",function(c){b.f&&b.c.delayLicenseRequestUntilPlayed&&b.f.paused&&!b.N?b.H.push(c):pd(b,c)});b.j.s(f,"keystatuseschange",function(c){return Ad(b,c)});h={initData:null,loaded:!1,Cc:Infinity,wa:null};b.b.set(f,h);z(e,2);return x(e,f.load(c),4);case 4:k=e.o;pc(b.h);
  if(!k)return b.b["delete"](f),b.g(new I(J,6,6013)),e["return"](Promise.resolve());h.loaded=!0;Bd(b)&&b.m.resolve();return e["return"](f);case 2:l=A(e),pc(b.h,l),b.b["delete"](f),b.g(new I(J,6,6005,l.message));case 3:return e["return"](Promise.resolve())}})})}
  function vd(b,c,d){try{var e=b.F?b.l.createSession("persistent-license"):b.l.createSession()}catch(f){b.g(new I(J,6,6005,f.message));return}b.j.s(e,"message",function(c){b.f&&b.c.delayLicenseRequestUntilPlayed&&b.f.paused&&!b.N?b.H.push(c):pd(b,c)});b.j.s(e,"keystatuseschange",function(c){return Ad(b,c)});b.b.set(e,{initData:d,loaded:!1,Cc:Infinity,wa:null});try{d=b.c.initDataTransform(d,b.a)}catch(f){c=f;f instanceof I||(c=new I(J,6,6016,f));b.g(c);return}b.c.logLicenseExchange&&Xc(d);e.generateRequest(c,
  d)["catch"](function(c){if(!b.h.a){b.b["delete"](e);if(c.errorCode&&c.errorCode.systemCode){var d=c.errorCode.systemCode;0>d&&(d+=Math.pow(2,32));d="0x"+d.toString(16)}b.g(new I(J,6,6006,c.message,c,d))}})}function Cd(b,c){if(wd(c).startsWith("com.apple.fps")){var d=c.serverCertificate,e=vc(b);b=xc(b,e,d)}return b}
  function pd(b,c){v(function e(){var f,g,h,k,l,m,n,q,t,u,w,C,E,D;return B(e,function(e){switch(e.i){case 1:return f=c.target,b.c.logLicenseExchange&&Xc(c.message),g=b.b.get(f),h=b.a.licenseServerUri,k=b.c.advanced[b.a.keySystem],"individualization-request"==c.messageType&&k&&k.individualizationServer&&(h=k.individualizationServer),l=hc([h],b.c.retryParameters),l.body=c.message,l.method="POST",l.licenseRequestType=c.messageType,l.sessionId=f.sessionId,"com.microsoft.playready"!=b.a.keySystem&&"com.chromecast.playready"!=
  b.a.keySystem||Dd(l),m=Date.now(),z(e,2),q=b.D.mb.request(2,l),x(e,q.promise,4);case 4:n=e.o;Ea(e,3);break;case 2:return t=A(e),u=new I(J,6,6007,t),b.g(u),g&&g.wa&&g.wa.reject(u),e["return"]();case 3:if(b.h.a)return e["return"]();b.L+=(Date.now()-m)/1E3;b.c.logLicenseExchange&&Xc(n.data);z(e,5);return x(e,f.update(n.data),7);case 7:Ea(e,6);break;case 5:return w=A(e),C=new I(J,6,6008,w.message),b.g(C),g&&g.wa&&g.wa.reject(C),e["return"]();case 6:E=new L("drmsessionupdate"),b.D.onEvent(E),g&&(g.wa&&
  g.wa.resolve(),D=new G(function(){g.loaded=!0;Bd(b)&&b.m.resolve()}),D.O(Ed)),y(e)}})})}
  function Dd(b){var c=wc(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){c=(new DOMParser).parseFromString(c,"application/xml");for(var d=r(c.getElementsByTagName("HttpHeader")),e=d.next();!e.done;e=d.next())e=e.value,b.headers[e.getElementsByTagName("name")[0].textContent]=e.getElementsByTagName("value")[0].textContent;b.body=Yc(c.getElementsByTagName("Challenge")[0].textContent)}else b.headers["Content-Type"]="text/xml; charset=utf-8"}
  function Ad(b,c){var d=c.target,e=b.b.get(d),f=!1;d.keyStatuses.forEach(function(c,d){if("string"==typeof d){var g=d;d=c;c=g}if("com.microsoft.playready"==b.a.keySystem&&16==d.byteLength&&!Lc("Tizen")&&!Lc("VITIS")){g=Ub(d);var h=g.getUint32(0,!0),k=g.getUint16(4,!0),q=g.getUint16(6,!0);g.setUint32(0,h,!1);g.setUint16(4,k,!1);g.setUint16(6,q,!1)}"com.microsoft.playready"==b.a.keySystem&&"status-pending"==c&&(c="usable");"status-pending"!=c&&(e.loaded=!0);"expired"==c&&(f=!0);g=$c(d);b.$.set(g,c)});
  var g=d.expiration-Date.now();(0>g||f&&1E3>g)&&e&&!e.wa&&(b.b["delete"](d),d.close()["catch"](function(){}));Bd(b)&&(b.m.resolve(),b.P.O(Fd))}function cd(b){var c=b.$,d=b.V;d.clear();c.forEach(function(b,c){return d.set(c,b)});c=Array.from(d.values());c.length&&c.every(function(b){return"expired"==b})&&b.g(new I(J,6,6014));b.D.ac(Bc(d))}
  function Gd(){return v(function c(){var d,e,f,g,h,k,l,m;return B(c,function(c){switch(c.i){case 1:return d="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],f={videoCapabilities:e},g={videoCapabilities:e,persistentState:"required",sessionTypes:["persistent-license"]},h=[g,f],k=new Map,l=function(c){return v(function u(){var d,
  e,f;return B(u,function(g){switch(g.i){case 1:return z(g,2),x(g,navigator.requestMediaKeySystemAccess(c,h),4);case 4:return d=g.o,f=(e=d.getConfiguration().sessionTypes)?e.includes("persistent-license"):!1,Lc("Tizen 3")&&(f=!1),k.set(c,{persistentState:f}),x(g,d.createMediaKeys(),5);case 5:Ea(g,0);break;case 2:A(g),k.set(c,null),y(g)}})})},m=d.map(function(c){return l(c)}),x(c,Promise.all(m),2);case 2:return c["return"](Bc(k))}})})}
  function fd(b){return v(function d(){var e;return B(d,function(d){switch(d.i){case 1:return e=Array.from(b.b.keys()),b.b.clear(),x(d,Promise.all(e.map(function(b){return v(function k(){return B(k,function(d){switch(d.i){case 1:return z(d,2),x(d,Promise.all([b.close(),b.closed]),4);case 4:Ea(d,0);break;case 2:A(d),y(d)}})})})),0)}})})}
  function Hd(b,c){var d=c.audio,e=c.video;if(d&&d.encrypted&&!xd(b,Cc(d.mimeType,d.codecs))||e&&e.encrypted&&!xd(b,Cc(e.mimeType,e.codecs)))return!1;var f=wd(b.a);return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==f})}
  function Id(b,c){if(!b.length)return c;if(!c.length)return b;for(var d=[],e=r(b),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=r(c),h=g.next();!h.done;h=g.next())if(h=h.value,f.keySystem==h.keySystem){g=[];g=g.concat(f.initData||[]);g=g.concat(h.initData||[]);var k=[];k=k.concat(f.keyIds);k=k.concat(h.keyIds);d.push({keySystem:f.keySystem,licenseServerUri:f.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:f.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:f.persistentStateRequired||
  h.persistentStateRequired,videoRobustness:f.videoRobustness||h.videoRobustness,audioRobustness:f.audioRobustness||h.audioRobustness,serverCertificate:f.serverCertificate||h.serverCertificate,initData:g,keyIds:k});break}}return d}function dd(b){b.b.forEach(function(c,d){var e=c.Cc,f=d.expiration;isNaN(f)&&(f=Infinity);f!=e&&(b.D.onExpirationUpdated(d.sessionId,f),c.Cc=f)})}function Bd(b){b=b.b.values();return hb(b,function(b){return b.loaded})}
  function md(b,c){var d=[];c.forEach(function(b,c){d.push({keySystem:c,licenseServerUri:b,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(var e=r(b),f=e.next();!f.done;f=e.next())f.value.drmInfos=d}
  function zd(b,c){var d=[],e=[],f=[],g=[];Jd(c.drmInfos,d,e,f,g);return{keySystem:b,licenseServerUri:d[0],distinctiveIdentifierRequired:"required"==c.distinctiveIdentifier,persistentStateRequired:"required"==c.persistentState,audioRobustness:(c.audioCapabilities?c.audioCapabilities[0].robustness:"")||"",videoRobustness:(c.videoCapabilities?c.videoCapabilities[0].robustness:"")||"",serverCertificate:e[0],initData:f,keyIds:g}}
  function Jd(b,c,d,e,f){var g={};b=r(b);for(var h=b.next();!h.done;g={drmInfo:g.drmInfo},h=b.next()){g.drmInfo=h.value;c.includes(g.drmInfo.licenseServerUri)||c.push(g.drmInfo.licenseServerUri);g.drmInfo.serverCertificate&&(d.some(function(b){return function(c){return Pb(c,b.drmInfo.serverCertificate)}}(g))||d.push(g.drmInfo.serverCertificate));if(g.drmInfo.initData){h={};for(var k=r(g.drmInfo.initData),l=k.next();!l.done;h={Xb:h.Xb},l=k.next())h.Xb=l.value,e.some(function(b){return function(c){var d=
  b.Xb;return c.keyId&&c.keyId==d.keyId?!0:c.initDataType==d.initDataType&&Pb(c.initData,d.initData)}}(h))||e.push(h.Xb)}if(g.drmInfo.keyIds)for(h=r(g.drmInfo.keyIds),k=h.next();!k.done;k=h.next())k=k.value,f.includes(k)||f.push(k)}}
  function nd(b,c,d){if(b.keySystem&&("org.w3.clearkey"!=b.keySystem||!b.licenseServerUri)){c.size&&(c=c.get(b.keySystem)||"",b.licenseServerUri=c);b.keyIds||(b.keyIds=[]);if(d=d.get(b.keySystem))b.distinctiveIdentifierRequired||(b.distinctiveIdentifierRequired=d.distinctiveIdentifierRequired),b.persistentStateRequired||(b.persistentStateRequired=d.persistentStateRequired),b.videoRobustness||(b.videoRobustness=d.videoRobustness),b.audioRobustness||(b.audioRobustness=d.audioRobustness),b.serverCertificate||
  (b.serverCertificate=d.serverCertificate);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==b.keySystem&&(b.keySystem="com.chromecast.playready")}}var Ed=5,Fd=.5,Kd=new zc(function(){return Sb(new Uint8Array([0]))});function Ld(){this.a=new muxjs.mp4.CaptionParser;this.g=[];this.f={}}Ld.prototype.init=function(b){var c=muxjs.mp4.probe;b=K(b);this.g=c.videoTrackIds(b);this.f=c.timescale(b);this.a.init()};Ld.prototype.b=function(b,c){var d=K(b);(d=this.a.parse(d,this.g,this.f))&&d.captions&&c(d.captions);this.a.clearParsedCaptions()};Ld.prototype.c=function(){this.a.resetCaptionStream()};function Md(){}Md.prototype.init=function(){};Md.prototype.b=function(){};Md.prototype.c=function(){};function Nd(b){return!b||1==b.length&&1E-6>b.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function Od(b,c,d){d=void 0===d?0:d;return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)||c>b.end(b.length-1)?!1:c+d>=b.start(0)}function Pd(b,c){if(!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0))return 0;for(var d=0,e=r(Qd(b)),f=e.next();!f.done;f=e.next()){var g=f.value;f=g.start;g=g.end;g>c&&(d+=g-Math.max(f,c))}return d}
  function Rd(b,c){if(!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0))return null;var d=Lc("Edge/")||Lc("Trident/")||Lc("Tizen")||Lc("CrKey")?.5:.1,e=Qd(b).findIndex(function(b,e,h){return b.start>c&&(0==e||h[e-1].end-c<=d)});return 0<=e?e:null}function Qd(b){if(!b)return[];for(var c=[],d=r(jb(b.length)),e=d.next();!e.done;e=d.next())e=e.value,c.push({start:b.start(e),end:b.end(e)});return c};function Sd(b,c){this.a=b;this.b=c}Sd.prototype.toString=function(){return"v"+this.a+"."+this.b};function Td(b,c){var d=new Sd(2,7),e=Ud,f=e.a,g=d.b-f.b;(0<(d.a-f.a||g)?e.c:e.b)(e.a,d,b,c)}function Vd(b,c,d,e){ab([d,"has been deprecated and will be removed in",c,". We are currently at version",b,". Additional information:",e].join(" "))}function Wd(b,c,d,e){$a([d,"has been deprecated and has been removed in",c,". We are now at version",b,". Additional information:",e].join(""))}var Ud=null;function Xd(b,c){return b.concat(c)}function Yd(){}function Zd(b){return null!=b}function $d(b){var c=Object.create(b.prototype||Object.prototype);b=b.call(c);b||(Td("Factories requiring new","Factories should be plain functions"),b=c);return b};function ae(b,c){if(0==c.length)return b;var d=c.map(function(b){return new nb(b)});return b.map(function(b){return new nb(b)}).map(function(b){return d.map(function(c){return b.resolve(c)})}).reduce(Xd,[]).map(function(b){return b.toString()})}function be(b,c){return{keySystem:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:c||[],keyIds:[]}}
  var ce={Ka:"video",Ib:"audio",X:"text",Ze:"image",Re:"application"},de=1/15;function ee(){var b=this;this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0});this.b=null;this.g=[];this.c=[];this.f=!1;this.a.on("data",function(c){b.c=c.captions;b.g.push(ad(c.initSegment,c.data))});this.a.on("done",function(){var c={data:ad.apply(Vc,Oa(b.g)),captions:b.c};b.b.resolve(c);b.f=!1})}ee.prototype.destroy=function(){this.a.dispose();this.a=null;return Promise.resolve()};
  function fe(b,c){return window.muxjs&&"mp2t"==b.toLowerCase().split(";")[0].split("/")[1]?c?MediaSource.isTypeSupported(ge(c,b)):MediaSource.isTypeSupported(ge("audio",b))||MediaSource.isTypeSupported(ge("video",b)):!1}
  function ge(b,c){var d=c.replace(/mp2t/i,"mp4");"audio"==b&&(d=d.replace("video","audio"));var e=/avc1\.(66|77|100)\.(\d+)/.exec(d);if(e){var f="avc1.",g=e[1],h=Number(e[2]);f=("66"==g?f+"4200":"77"==g?f+"4d00":f+"6400")+(h>>4).toString(16);f+=(h&15).toString(16);d=d.replace(e[0],f)}return d}function he(b,c){b.f=!0;b.b=new Hb;b.g=[];b.c=[];var d=K(c);b.a.push(d);b.a.flush();b.f&&b.b.reject(new I(J,3,3018));return b.b};function ie(b,c,d){this.startTime=b;this.direction=je;this.endTime=c;this.payload=d;this.region=new ke;this.position=null;this.positionAlign=le;this.size=100;this.textAlign=ne;this.writingMode=oe;this.lineInterpretation=pe;this.line=null;this.lineHeight="";this.lineAlign=qe;this.displayAlign=re;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=se;this.fontStyle=te;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
  [];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=!1;this.cellResolution={columns:32,rows:15}}F("shaka.text.Cue",ie);var le="auto";ie.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:le};var ne="center",ue={LEFT:"left",RIGHT:"right",CENTER:ne,START:"start",END:"end"};ie.textAlign=ue;var re="after",ve={BEFORE:"before",CENTER:"center",AFTER:re};ie.displayAlign=ve;var je="ltr";ie.direction={HORIZONTAL_LEFT_TO_RIGHT:je,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var oe="horizontal-tb";
  ie.writingMode={HORIZONTAL_TOP_TO_BOTTOM:oe,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var pe=0;ie.lineInterpretation={LINE_NUMBER:pe,PERCENTAGE:1};var qe="start",we={CENTER:"center",START:qe,END:"end"};ie.lineAlign=we;var se=400;ie.fontWeight={NORMAL:se,BOLD:700};var te="normal",xe={NORMAL:te,ITALIC:"italic",OBLIQUE:"oblique"};ie.fontStyle=xe;ie.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};
  function ke(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=ye;this.scroll=ze}F("shaka.text.CueRegion",ke);var ye=1;ke.units={PX:0,PERCENTAGE:ye,LINES:2};var ze="";ke.scrollMode={NONE:ze,UP:"up"};function Ae(b){this.j=null;this.c=b;this.f=this.m=0;this.g=Infinity;this.b=this.a=null;this.l="";this.h=new Map}F("shaka.text.TextEngine.registerParser",function(b,c){Be[b]=c});F("shaka.text.TextEngine.unregisterParser",function(b){delete Be[b]});function Ce(b){return Be[b]||window.muxjs&&"application/cea-608"==b?!0:!1}Ae.prototype.destroy=function(){this.c=this.j=null;this.h.clear();return Promise.resolve()};
  function De(b,c,d,e){return v(function g(){var h,k,l;return B(g,function(g){switch(g.i){case 1:return x(g,Promise.resolve(),2);case 2:if(!b.j||!b.c)return g["return"]();if(null==d||null==e)return b.j.parseInit(K(c)),g["return"]();h={periodStart:b.m,segmentStart:d,segmentEnd:e};k=b.j.parseMedia(K(c),h);l=k.filter(function(c){return c.startTime>=b.f&&c.startTime<b.g});b.c.append(l);null==b.a&&(b.a=Math.max(d,b.f));b.b=Math.min(e,b.g);y(g)}})})}
  Ae.prototype.remove=function(b,c){var d=this;return v(function f(){return B(f,function(f){switch(f.i){case 1:return x(f,Promise.resolve(),2);case 2:!d.c||!d.c.remove(b,c)||null==d.a||c<=d.a||b>=d.b||(b<=d.a&&c>=d.b?d.a=d.b=null:b<=d.a&&c<d.b?d.a=c:b>d.a&&c>=d.b&&(d.b=b)),y(f)}})})};function Ee(b,c,d){b.f=c;b.g=d}function Fe(b,c,d){b.l=c;if(c=b.h.get(c))for(var e=r(c.keys()),f=e.next();!f.done;f=e.next())(f=c.get(f.value).filter(function(b){return b.endTime<=d}))&&b.c.append(f)}
  function Ge(b,c,d,e,f){var g=d+" "+e,h=new Map;c=r(c);for(var k=c.next();!k.done;k=c.next()){var l=k.value;k=l.stream;h.has(k)||h.set(k,new Map);h.get(k).has(g)||h.get(k).set(g,[]);l.startTime+=f;l.endTime+=f;l.startTime>=b.f&&l.startTime<b.g&&(l=new ie(l.startTime,l.endTime,l.text),h.get(k).get(g).push(l),k==b.l&&b.c.append([l]))}f=r(h.keys());for(g=f.next();!g.done;g=f.next())for(g=g.value,b.h.has(g)||b.h.set(g,new Map),c=r(h.get(g).keys()),k=c.next();!k.done;k=c.next())k=k.value,l=h.get(g).get(k),
  b.h.get(g).set(k,l);b.a=null==b.a?Math.max(d,b.f):Math.min(b.a,Math.max(d,b.f));b.b=Math.max(b.b,Math.min(e,b.g))}var Be={};function He(b,c,d){var e=this;this.f=b;this.g=d;this.b={};this.a=null;this.c={};this.j=new O;this.l={};this.m=c;this.v=new Hb;this.h=Ie(this,this.v);this.w=new oc(function(){return Je(e)})}function Ie(b,c){var d=new MediaSource;b.j.ca(d,"sourceopen",c.resolve);b.f.src=Ke(d);return d}function Le(b){var c=Cc(b.mimeType,b.codecs),d=Dc(b);return Ce(c)||MediaSource.isTypeSupported(d)||fe(c,b.type)}p=He.prototype;p.destroy=function(){return this.w.destroy()};
  function Je(b){return v(function d(){var e,f,g,h;return B(d,function(d){switch(d.i){case 1:e=[];for(var k in b.c){f=b.c[k];g=f[0];b.c[k]=f.slice(0,1);g&&e.push(g.p["catch"](Yd));for(var m=r(f.slice(1)),n=m.next();!n.done;n=m.next())h=n.value,h.p.reject(new I(J,Fb,7003,void 0))}b.a&&e.push(b.a.destroy());b.g&&e.push(b.g.destroy());for(var q in b.l)e.push(b.l[q].destroy());return x(d,Promise.all(e),2);case 2:b.j&&(b.j.release(),b.j=null),b.f&&(b.f.removeAttribute("src"),b.f.load(),b.f=null),b.h=null,
  b.a=null,b.g=null,b.b={},b.l={},b.m=null,b.c={},y(d)}})})}
  p.init=function(b,c){var d=this;return v(function f(){var g,h,k,l,m,n,q;return B(f,function(f){switch(f.i){case 1:return g=ce,x(f,d.v,2);case 2:h={};k=r(b.keys());for(l=k.next();!l.done;h={contentType:h.contentType},l=k.next())h.contentType=l.value,m=b.get(h.contentType),n=Cc(m.mimeType,m.codecs),h.contentType==g.X?Me(d,n):(!c&&MediaSource.isTypeSupported(n)||!fe(n,h.contentType)||(d.l[h.contentType]=new ee,n=ge(h.contentType,n)),q=d.h.addSourceBuffer(n),d.j.s(q,"error",function(b){return function(){d.c[b.contentType][0].p.reject(new I(J,
  3,3014,d.f.error?d.f.error.code:0))}}(h)),d.j.s(q,"updateend",function(b){return function(){return Ne(d,b.contentType)}}(h)),d.b[h.contentType]=q,d.c[h.contentType]=[]);y(f)}})})};function Me(b,c){b.a||(b.a=new Ae(b.g));"application/cea-608"!=c&&(b.a.j=$d(Be[c]))}function Oe(b){return b.h?"ended"==b.h.readyState:!0}function Pe(b,c){if("text"==c)var d=b.a.a;else d=Qe(b,c),d=!d||1==d.length&&1E-6>d.end(0)-d.start(0)?null:1==d.length&&0>d.start(0)?0:d.length?d.start(0):null;return d}
  function Re(b,c){return"text"==c?b.a.b:Nd(Qe(b,c))}function Se(b,c,d){if("text"==c)return b=b.a,null==b.b||b.b<d?0:b.b-Math.max(d,b.a);b=Qe(b,c);return Pd(b,d)}p.Tb=function(){var b={total:Qd(this.f.buffered),audio:Qd(Qe(this,"audio")),video:Qd(Qe(this,"video")),text:[]};if(this.a){var c=this.a.a,d=this.a.b;null!=c&&null!=d&&b.text.push({start:c,end:d})}return b};function Qe(b,c){try{return b.b[c].buffered}catch(d){return null}}
  function Te(b,c,d,e,f,g){return v(function k(){var l,m,n;return B(k,function(k){switch(k.i){case 1:l=ce;if(c==l.X)return x(k,De(b.a,d,e,f),0);if(b.l[c])return x(k,he(b.l[c],d),10);g&&window.muxjs&&(b.a||Me(b,"text/vtt"),null==e&&null==f?b.m.init(d):b.m.b(d,function(c){c.length&&Ge(b.a,c,e,f,b.b[l.Ka].timestampOffset)}));return x(k,Ue(b,c,function(){b.b[c].appendBuffer(d)}),0);case 10:return m=k.o,b.a||Me(b,"text/vtt"),m.captions&&m.captions.length&&(n=b.b[l.Ka].timestampOffset,Ge(b.a,m.captions,e,
  f,n)),x(k,Ue(b,c,function(){b.b[c].appendBuffer(m.data)}),0)}})})}function Ve(b,c){var d=Re(b,"video")||0;Fe(b.a,c,d)}p.remove=function(b,c,d){var e=this;return v(function g(){var h;return B(g,function(g){switch(g.i){case 1:return h=ce,b==h.X?x(g,e.a.remove(c,d),0):x(g,Ue(e,b,function(){d<=c?Ne(e,b):e.b[b].remove(c,d)}),0)}})})};
  function We(b,c){return v(function e(){var f;return B(e,function(e){switch(e.i){case 1:f=ce;if(c==f.X){if(!b.a)return e["return"]();b.m.c();return x(e,b.a.remove(0,Infinity),0)}return x(e,Ue(b,c,function(){var e=b.h.duration;0>=e?Ne(b,c):b.b[c].remove(0,e)}),0)}})})}p.flush=function(b){var c=this;return v(function e(){var f;return B(e,function(e){switch(e.i){case 1:return f=ce,b==f.X?e["return"]():x(e,Ue(c,b,function(){c.f.currentTime-=.001;Ne(c,b)}),0)}})})};
  function Xe(b,c,d,e,f){return v(function h(){var k;return B(h,function(h){switch(h.i){case 1:return k=ce,c==k.X?(b.a.m=d,Ee(b.a,e,f),h["return"]()):x(h,Promise.all([Ue(b,c,function(){var d=b.b[c].appendWindowStart,e=b.b[c].appendWindowEnd;b.b[c].abort();b.b[c].appendWindowStart=d;b.b[c].appendWindowEnd=e;Ne(b,c)}),Ue(b,c,function(){var e=d;0>e&&(e+=.001);b.b[c].timestampOffset=e;Ne(b,c)}),Ue(b,c,function(){b.b[c].appendWindowStart=0;b.b[c].appendWindowEnd=f;b.b[c].appendWindowStart=e;Ne(b,c)})]),
  0)}})})}p.endOfStream=function(b){var c=this;return v(function e(){return B(e,function(e){switch(e.i){case 1:return x(e,Ye(c,function(){Oe(c)||(b?c.h.endOfStream(b):c.h.endOfStream())}),0)}})})};p.va=function(b){var c=this;return v(function e(){return B(e,function(e){switch(e.i){case 1:return x(e,Ye(c,function(){c.h.duration=b}),0)}})})};p.getDuration=function(){return this.h.duration};function Ne(b,c){var d=b.c[c][0];d&&(d.p.resolve(),Ze(b,c))}
  function Ue(b,c,d){pc(b.w);d={start:d,p:new Hb};b.c[c].push(d);1==b.c[c].length&&$e(b,c);return d.p}
  function Ye(b,c){return v(function e(){var f,g,h,k;return B(e,function(e){switch(e.i){case 1:pc(b.w);f=[];g={};for(var l in b.b)g.ready=new Hb,h={start:function(b){return function(){return b.ready.resolve()}}(g),p:g.ready},b.c[l].push(h),f.push(g.ready),1==b.c[l].length&&h.start(),g={ready:g.ready};z(e,2);return x(e,Promise.all(f),4);case 4:Ea(e,3);break;case 2:throw k=A(e),k;case 3:try{c()}catch(q){throw new I(J,3,3015,q);}finally{for(var n in b.b)Ze(b,n)}y(e)}})})}
  function Ze(b,c){b.c[c].shift();$e(b,c)}function $e(b,c){var d=b.c[c][0];if(d)try{d.start()}catch(e){"QuotaExceededError"==e.name?d.p.reject(new I(J,3,3017,c)):d.p.reject(new I(J,3,3015,e)),Ze(b,c)}}var Ke=window.URL.createObjectURL;function af(b,c){b=bf(b);c=bf(c);return b.split("-")[0]==c.split("-")[0]}function cf(b,c){b=bf(b);c=bf(c);var d=b.split("-"),e=c.split("-");return d[0]==e[0]&&1==d.length&&2==e.length}function bf(b){var c=b.split("-");b=c[0]||"";c=c[1]||"";b=b.toLowerCase();b=df.get(b)||b;return(c=c.toUpperCase())?b+"-"+c:b}function ef(b){return b.language?bf(b.language):b.audio&&b.audio.language?bf(b.audio.language):b.video&&b.video.language?bf(b.video.language):"und"}
  function ff(b,c){for(var d=bf(b),e=new Set,f=r(c),g=f.next();!g.done;g=f.next())e.add(bf(g.value));f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,cf(g,d))return g;f=r(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=bf(h);k=bf(k);h=h.split("-");k=k.split("-");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=r(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,cf(d,f))return f;return null}
  var df=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 gf(b,c,d){function e(b,c,d){return b>=c&&b<=d}var f=b.video;return f&&f.width&&f.height&&(!e(f.width,c.minWidth,Math.min(c.maxWidth,d.width))||!e(f.height,c.minHeight,Math.min(c.maxHeight,d.height))||!e(f.width*f.height,c.minPixels,c.maxPixels))||b&&b.frameRate&&!e(b.frameRate,c.minFrameRate,c.maxFrameRate)||!e(b.bandwidth,c.minBandwidth,c.maxBandwidth)?!1:!0}
  function hf(b,c,d){var e=!1;b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=f.allowedByApplication;f.allowedByApplication=gf(f,c,d);g!=f.allowedByApplication&&(e=!0)}return e}function jf(b,c,d,e){e.variants=e.variants.filter(function(e){if(b&&b.S&&!Hd(b,e))return!1;var f=e.audio;e=e.video;return f&&!Le(f)||e&&!Le(e)||f&&c&&!kf(f,c)||e&&d&&!kf(e,d)?!1:!0});e.textStreams=e.textStreams.filter(function(b){return Ce(Cc(b.mimeType,b.codecs))})}
  function kf(b,c){return b.mimeType!=c.mimeType||b.codecs.split(".")[0]!=c.codecs.split(".")[0]?!1:!0}
  function lf(b){var c=b.audio,d=b.video,e=c?c.codecs:null,f=d?d.codecs:null,g=[];f&&g.push(f);e&&g.push(e);var h=[];d&&h.push(d.mimeType);c&&h.push(c.mimeType);h=h[0]||null;var k=[];c&&k.push(c.kind);d&&k.push(d.kind);k=k[0]||null;var l=new Set;if(c)for(var m=r(c.roles),n=m.next();!n.done;n=m.next())l.add(n.value);if(d)for(m=r(d.roles),n=m.next();!n.done;n=m.next())l.add(n.value);b={id:b.id,active:!1,type:"variant",bandwidth:b.bandwidth,language:b.language,label:null,kind:k,width:null,height:null,
  frameRate:null,pixelAspectRatio:null,mimeType:h,codecs:g.join(", "),audioCodec:e,videoCodec:f,primary:b.primary,roles:Array.from(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null};d&&(b.videoId=d.id,b.originalVideoId=d.originalId,b.width=d.width||null,b.height=d.height||null,b.frameRate=d.frameRate||null,b.pixelAspectRatio=d.pixelAspectRatio||null,b.videoBandwidth=
  d.bandwidth||null);c&&(b.audioId=c.id,b.originalAudioId=c.originalId,b.channelsCount=c.channelsCount,b.audioSamplingRate=c.audioSamplingRate,b.audioBandwidth=c.bandwidth||null,b.label=c.label,b.audioRoles=c.roles);return b}
  function mf(b){return{id:b.id,active:!1,type:"text",bandwidth:0,language:b.language,label:b.label,kind:b.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:b.mimeType,codecs:b.codecs||null,audioCodec:null,videoCodec:null,primary:b.primary,roles:b.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:b.originalId}}
  function nf(b){b.__shaka_id||(b.__shaka_id=of++);return b.__shaka_id}
  function pf(b){return{id:nf(b),active:!1,type:"",bandwidth:0,language:bf(b.language),label:b.label,kind:b.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}
  function qf(b){return b.allowedByApplication&&b.allowedByKeySystem}function rf(b){return b.filter(function(b){return qf(b)})}
  function sf(b,c){var d=b.filter(function(b){return b.audio&&b.audio.channelsCount}),e=new Map;d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f.audio.channelsCount;e.has(g)||e.set(g,[]);e.get(g).push(f)}d=Array.from(e.keys());if(0==d.length)return b;f=d.filter(function(b){return b<=c});return f.length?e.get(Math.max.apply(Math,Oa(f))):e.get(Math.min.apply(Math,Oa(d)))}
  function tf(b,c,d){var e=b,f=b.filter(function(b){return b.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(b){return b.language==g});if(c){var h=ff(bf(c),b.map(function(b){return b.language}));h&&(e=b.filter(function(b){return bf(b.language)==h}))}if(d){if(b=uf(e,d),b.length)return b}else if(b=e.filter(function(b){return 0==b.roles.length}),b.length)return b;b=e.map(function(b){return b.roles}).reduce(Xd,[]);return b.length?uf(e,b[0]):e}
  function uf(b,c){return b.filter(function(b){return b.roles.includes(c)})}function vf(b,c,d){d=r(d);for(var e=d.next();!e.done;e=d.next())if(e=e.value,e.audio==b&&e.video==c)return e;return null}var of=0;function P(){this.j=null;this.f=!1;this.b=new Za;this.c=[];this.h=1;this.l=!1;this.a=this.g=null}F("shaka.abr.SimpleAbrManager",P);P.prototype.stop=function(){this.j=null;this.f=!1;this.c=[];this.h=1;this.g=null};P.prototype.stop=P.prototype.stop;P.prototype.init=function(b){this.j=b};P.prototype.init=P.prototype.init;
  P.prototype.chooseVariant=function(){var b=wf(this.a.restrictions,this.c),c=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!b.length&&(b=wf(null,this.c),b=[b[0]]);var d=b[0]||null;b=r(lb(b));for(var e=b.next();!e.done;e=b.next()){var f=e.value;e=f.item;var g=isNaN(this.h)?1:Math.abs(this.h);f=g*(f.next||{bandwidth:Infinity}).bandwidth/this.a.bandwidthUpgradeTarget;c>=g*e.bandwidth/this.a.bandwidthDowngradeTarget&&c<=f&&(d=e)}this.g=Date.now();return d};
  P.prototype.chooseVariant=P.prototype.chooseVariant;P.prototype.enable=function(){this.f=!0};P.prototype.enable=P.prototype.enable;P.prototype.disable=function(){this.f=!1};P.prototype.disable=P.prototype.disable;
  P.prototype.segmentDownloaded=function(b,c){var d=this.b;if(!(16E3>c)){var e=8E3*c/b,f=b/1E3;d.a+=c;Xa(d.b,f,e);Xa(d.c,f,e)}if(null!=this.g&&this.f)a:{if(!this.l){if(!(128E3<=this.b.a))break a;this.l=!0}else if(Date.now()-this.g<1E3*this.a.switchInterval)break a;d=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.j(d)}};P.prototype.segmentDownloaded=P.prototype.segmentDownloaded;P.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};
  P.prototype.getBandwidthEstimate=P.prototype.getBandwidthEstimate;P.prototype.setVariants=function(b){this.c=b};P.prototype.setVariants=P.prototype.setVariants;P.prototype.playbackRateChanged=function(b){this.h=b};P.prototype.playbackRateChanged=P.prototype.playbackRateChanged;P.prototype.configure=function(b){this.a=b};P.prototype.configure=P.prototype.configure;
  function wf(b,c){b&&(c=c.filter(function(c){return gf(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};function xf(){this.a=new Map}function yf(b,c,d){zf(b,c).text=d}function zf(b,c){b.a.has(c)||b.a.set(c,new Af);return b.a.get(c)}function Af(){this.text=this.variant=null};function Bf(b,c){this.a=b;this.b=new Set([b]);c=c||[];for(var d=r(c),e=d.next();!e.done;e=d.next())this.add(e.value)}Bf.prototype.add=function(b){return Cf(this.a,b)?(this.b.add(b),!0):!1};function Cf(b,c){var d;if(!(d=!!b.audio!=!!c.audio||!!b.video!=!!c.video||b.language!=c.language)&&(d=b.audio&&c.audio)){d=b.audio;var e=c.audio;d=!(d.channelsCount==e.channelsCount&&Df(d,e)&&Ef(d.roles,e.roles))}!d&&(d=b.video&&c.video)&&(d=b.video,e=c.video,d=!(Df(d,e)&&Ef(d.roles,e.roles)));return d?!1:!0}
  Bf.prototype.values=function(){return this.b.values()};function Df(b,c){if(b.mimeType!=c.mimeType)return!1;var d=b.codecs.split(",").map(function(b){return Gc(b)[0]}),e=c.codecs.split(",").map(function(b){return Gc(b)[0]});if(d.length!=e.length)return!1;d.sort();e.sort();for(var f=r(jb(d.length)),g=f.next();!g.done;g=f.next())if(g=g.value,d[g]!=e[g])return!1;return!0}
  function Ef(b,c){var d=new Set(b),e=new Set(c);d["delete"]("main");e["delete"]("main");if(d.size!=e.size)return!1;d=r(d);for(var f=d.next();!f.done;f=d.next())if(!e.has(f.value))return!1;return!0};function Ff(b){this.a=b;this.b=new Gf(b.language,"",b.audio&&b.audio.channelsCount?b.audio.channelsCount:0,"")}Ff.prototype.create=function(b){var c=this,d=b.filter(function(b){return Cf(c.a,b)});return d.length?new Bf(d[0],d):this.b.create(b)};function Gf(b,c,d,e,f){this.f=b;this.c=c;this.a=d;this.b=void 0===e?"":e;this.g=void 0===f?"":f}
  Gf.prototype.create=function(b){var c=[];c=Hf(b,this.f);var d=b.filter(function(b){return b.primary});c=c.length?c:d.length?d:b;this.c&&(b=If(c,this.c,this.g),b.length&&(c=b));this.a&&(b=sf(c,this.a),b.length&&(c=b));this.b&&(b=Jf(c,this.b),b.length&&(c=b));b=new Bf(c[0]);c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,Cf(b.a,d)&&b.add(d);return b};function Hf(b,c){var d=bf(c),e=ff(d,b.map(function(b){return ef(b)}));return e?b.filter(function(b){return e==ef(b)}):[]}
  function If(b,c,d){return b.filter(function(b){if(d){var e=b[d];return e&&e.roles.includes(c)}e=b.audio;b=b.video;return e&&e.roles.includes(c)||b&&b.roles.includes(c)})}function Jf(b,c){return b.filter(function(b){return b.audio?b.audio.label.toLowerCase()==c.toLowerCase():!1})};function Kf(){this.a=Lf;this.b=(new Map).set(Lf,2).set(Mf,1)}function Nf(b,c,d){b.b.set(Lf,d).set(Mf,c)}var Mf=0,Lf=1;F("shaka.media.ManifestParser.registerParserByExtension",function(b,c){Of[b]=c});F("shaka.media.ManifestParser.registerParserByMime",function(b,c){Pf[b]=c});F("shaka.media.ManifestParser.unregisterParserByMime",function(b){delete Pf[b]});
  function Qf(b,c,d,e){return v(function g(){var h,k,l,m;return B(g,function(g){switch(g.i){case 1:if(e&&(h=Pf[e.toLowerCase()]))return g["return"](h);if(k=Rf(b))if(l=Of[k])return g["return"](l);if(e){g.u(2);break}return x(g,Sf(b,c,d),3);case 3:if(e=g.o)if(m=Pf[e])return g["return"](m);case 2:throw new I(J,4,4E3,b);}})})}
  function Sf(b,c,d){return v(function f(){var g,h,k;return B(f,function(f){switch(f.i){case 1:return g=hc([b],d),g.method="HEAD",x(f,c.request(0,g).promise,2);case 2:return h=f.o,k=h.headers["content-type"],f["return"](k?k.toLowerCase().split(";").shift():"")}})})}function Rf(b){b=(new nb(b)).ja.split("/").pop().split(".");return 1==b.length?"":b.pop().toLowerCase()}var Pf={},Of={};function Tf(b){var c=this;this.c=b;this.a=new Set;this.b=(new G(function(){Uf(c,!1)})).Ca(.25)}Tf.prototype.release=function(){this.b.stop();for(var b=r(this.a),c=b.next();!c.done;c=b.next())c.value.release();this.a.clear()};function Uf(b,c){for(var d=r(b.a),e=d.next();!e.done;e=d.next())e.value.g(b.c.currentTime,c)};function Vf(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next()){d=r(d.value.variants);for(var e=d.next();!e.done;e=d.next())c.push(e.value)}return c}function Wf(b,c){for(var d=null,e=r(b),f=e.next();!f.done;f=e.next())f=f.value,c>=f.startTime&&(d=f);return d};function Xf(b){this.c=b;this.a=null;this.b=function(){}}Xf.prototype.release=function(){this.a=this.c=null;this.b=function(){}};Xf.prototype.g=function(b){var c=this.a,d=this.c.periods;b=Wf(d,b)||d[0];c!=b&&this.b(b);this.a=b};function Yf(b,c){b.b=c};function Zf(b){var c=this;this.a=b;this.f=!1;this.b=this.a.Ub();this.c=new G(function(){c.a.md(.25*c.b)})}Zf.prototype.release=function(){this.c&&(this.c.stop(),this.c=null);this.a=null};Zf.prototype.set=function(b){this.b=b;$f(this)};function $f(b){b.c.stop();var c=b.f?0:b.b;if(0<=c)try{b.a.Ub()!=c&&b.a.Oc(c);return}catch(d){}b.c.Ca(.25);0!=b.a.Ub()&&b.a.Oc(0)};function ag(b,c){this.g=b;this.h=bg(b);this.a=b.a.currentTime;this.f=Date.now()/1E3;this.b=!1;this.j=c;this.c=function(){}}ag.prototype.release=function(){this.g=null;this.c=function(){}};function cg(b,c){b.c=c}function dg(b){this.a=b}function bg(b){if(b.a.paused||0==b.a.playbackRate||null==b.a.buffered)var c=!1;else a:{c=b.a.currentTime;b=r(Qd(b.a.buffered));for(var d=b.next();!d.done;d=b.next())if(d=d.value,!(c<d.start||c>d.end-.5)){c=!0;break a}c=!1}return c};function eg(b,c,d,e,f){var g=this;this.a=b;this.w=c;this.m=d;this.v=f;this.f=new O;this.j=!1;this.l=b.readyState;this.c=!1;this.b=e;this.h=!1;this.f.s(b,"waiting",function(){return fg(g)});this.g=(new G(function(){fg(g)})).Ca(.25)}eg.prototype.release=function(){this.f&&(this.f.release(),this.f=null);null!=this.g&&(this.g.stop(),this.g=null);this.b&&(this.b.release(),this.b=null);this.a=this.w=this.v=null};eg.prototype.Dc=function(){this.h=!0;fg(this)};
  function fg(b){if(0!=b.a.readyState){if(b.a.seeking){if(!b.j)return}else b.j=!1;if(!b.a.paused){b.a.readyState!=b.l&&(b.c=!1,b.l=b.a.readyState);var c=b.m.smallGapLimit,d=b.a.currentTime,e=b.a.buffered,f=Rd(e,d);if(null==f){if(b.b){b=b.b;e=b.g;f=bg(e);var g=e.a.currentTime;d=Date.now()/1E3;if(b.a!=g||b.h!=f)b.f=d,b.a=g,b.h=f,b.b=!1;g=d-b.f;g>=b.j&&f&&!b.b&&(b.c(b.a,g),b.b=!0,b.a=e.a.currentTime)}}else if(0!=f||b.h){g=e.start(f);var h=b.w.ya();if(!(g>=h)){h=g-d;c=h<=c;var k=!1;.001>h||(c||b.c||(b.c=
  !0,d=new L("largegap",{currentTime:d,gapSize:h}),d.cancelable=!0,b.v(d),b.m.jumpLargeGaps&&!d.defaultPrevented&&(k=!0)),!c&&!k)||(0!=f&&e.end(f-1),b.a.currentTime=g)}}}}};function gg(b,c,d){this.a=b;this.f=c;this.g=d;this.h=!1;this.b=new O;this.c=new hg(b);0<b.readyState?ig(this,d):jg(this,d)}gg.prototype.release=function(){this.b&&(this.b.release(),this.b=null);null!=this.c&&(this.c.release(),this.c=null);this.f=function(){};this.a=null};function kg(b){return b.h?b.a.currentTime:b.g}function jg(b,c){b.g=c;b.b.da(b.a,"loadedmetadata");b.b.ca(b.a,"loadedmetadata",function(){ig(b,c)})}
  function ig(b,c){.001>Math.abs(b.a.currentTime-c)?lg(b):(b.b.ca(b.a,"seeking",function(){lg(b)}),mg(b.c,0==b.a.currentTime?c:b.a.currentTime))}function lg(b){b.h=!0;b.b.s(b.a,"seeking",function(){return b.f()})}function hg(b){var c=this;this.b=b;this.h=10;this.g=this.f=this.c=0;this.a=new G(function(){0>=c.c?c.a.stop():c.b.currentTime!=c.f?c.a.stop():(c.b.currentTime=c.g,c.c--)})}hg.prototype.release=function(){this.a&&(this.a.stop(),this.a=null);this.b=null};
  function mg(b,c){b.f=b.b.currentTime;b.g=c;b.c=b.h;b.b.currentTime=c;b.a.Ca(.1)};function ng(b){function c(){null==d.c?d.f=!0:(d.b.ca(d.a,"seeking",function(){d.f=!0}),d.a.currentTime=Math.max(0,d.a.currentTime+d.c))}var d=this;this.a=b;this.f=!1;this.c=null;this.b=new O;0==this.a.readyState?this.b.ca(this.a,"loadeddata",c):c()}ng.prototype.release=function(){this.b&&(this.b.release(),this.b=null);this.a=null};ng.prototype.m=function(b){this.c=this.f?this.c:b};ng.prototype.h=function(){return(this.f?this.a.currentTime:this.c)||0};ng.prototype.v=function(){};
  function og(b,c,d,e,f,g){var h=this;this.b=b;this.a=c.presentationTimeline;this.D=c.minBufferTime||0;this.g=d;this.w=f;this.l=null;this.f=new eg(b,c.presentationTimeline,d,pg(b,d),g);this.c=new gg(b,function(){a:{var b=h.f;b.j=!0;b.h=!1;b.c=!1;var c=kg(h.c);b=qg(h,c);if(.001<Math.abs(b-c)&&(c=(new Date).getTime()/1E3,!h.l||h.l<c-1)){h.l=c;c=h.c;0<c.a.readyState?mg(c.c,b):jg(c,b);b=void 0;break a}h.w();b=void 0}return b},rg(this,e));this.j=(new G(function(){if(0!=h.b.readyState&&!h.b.paused){var b=
  h.b.currentTime,c=h.a.kb(),d=h.a.ya();3>d-c&&(c=d-3);b<c&&(b=qg(h,b),h.b.currentTime=b)}})).Ca(.25)}og.prototype.release=function(){this.c&&(this.c.release(),this.c=null);this.f&&(this.f.release(),this.f=null);this.j&&(this.j.stop(),this.j=null);this.b=this.c=this.a=this.g=null;this.w=function(){}};og.prototype.m=function(b){var c=this.c;0<c.a.readyState?mg(c.c,b):jg(c,b)};og.prototype.h=function(){var b=kg(this.c);return 0<this.b.readyState&&!this.b.paused?sg(this,b):b};
  function rg(b,c){null==c?c=Infinity>b.a.getDuration()?b.a.kb():b.a.ya():0>c&&(c=b.a.ya()+c);return tg(b,sg(b,c))}og.prototype.v=function(){this.f.Dc()};function tg(b,c){var d=b.a.getDuration();return c>=d?d-b.g.durationBackoff:c}function qg(b,c){var d=Math.max(b.D,b.g.rebufferingGoal),e=b.g.safeSeekOffset,f=b.a.kb(),g=b.a.ya(),h=b.a.getDuration();3>g-f&&(f=g-3);var k=b.a.yb(d),l=b.a.yb(e);d=b.a.yb(d+e);return c>=h?tg(b,c):c>g?g:c<f?Od(b.b.buffered,l)?l:d:c>=k||Od(b.b.buffered,c)?c:d}
  function sg(b,c){var d=b.a.kb();if(c<d)return d;d=b.a.ya();return c>d?d:c}function pg(b,c){if(!c.stallEnabled)return null;var d=c.stallSkip,e=new ag(new dg(b),c.stallThreshold);cg(e,function(){b.currentTime+=d});return e};function ug(){this.b=function(){};this.a=new Set}ug.prototype.release=function(){this.b=function(){};this.a.clear()};function vg(b,c){b.b=c};function wg(b){var c=this;this.h=b;this.f=new Map;this.a=function(){};this.b=function(){};this.c=function(){};this.j=[{Za:null,Ya:xg,Ra:function(b,e){return c.a(b,e)}},{Za:yg,Ya:xg,Ra:function(b,e){return c.a(b,e)}},{Za:zg,Ya:xg,Ra:function(b,e){return c.a(b,e)}},{Za:xg,Ya:yg,Ra:function(b,e){return c.b(b,e)}},{Za:xg,Ya:zg,Ra:function(b,e){return c.b(b,e)}},{Za:yg,Ya:zg,Ra:function(b,e){return c.c(b,e)}},{Za:zg,Ya:yg,Ra:function(b,e){return c.c(b,e)}}]}
  wg.prototype.release=function(){this.h=null;this.f.clear();this.a=function(){};this.b=function(){};this.c=function(){}};wg.prototype.g=function(b,c){for(var d=r(this.h.a),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.f.get(e),g=b<e.startTime?yg:b>e.endTime?zg:xg;this.f.set(e,g);for(var h=r(this.j),k=h.next();!k.done;k=h.next())k=k.value,k.Za==f&&k.Ya==g&&k.Ra(e,c)}};function Ag(b,c,d,e){b.a=c;b.b=d;b.c=e}var yg=1,xg=2,zg=3;function Bg(b,c,d){this.c=b;this.b=c;this.a=d}F("shaka.media.InitSegmentReference",Bg);Bg.prototype.pc=function(){return this.b};Bg.prototype.getStartByte=Bg.prototype.pc;Bg.prototype.oc=function(){return this.a};Bg.prototype.getEndByte=Bg.prototype.oc;function Cg(b,c,d,e,f,g,h,k,l){this.startTime=b;this.endTime=c;this.c=d;this.b=e;this.a=f;this.f=g;this.g=h;this.j=k;this.h=l}F("shaka.media.SegmentReference",Cg);Cg.prototype.ge=function(){return this.startTime};Cg.prototype.getStartTime=Cg.prototype.ge;
  Cg.prototype.Td=function(){return this.endTime};Cg.prototype.getEndTime=Cg.prototype.Td;Cg.prototype.pc=function(){return this.b};Cg.prototype.getStartByte=Cg.prototype.pc;Cg.prototype.oc=function(){return this.a};Cg.prototype.getEndByte=Cg.prototype.oc;function Q(b){this.a=b;this.b=null;this.c=0}F("shaka.media.SegmentIndex",Q);Q.prototype.release=function(){this.a=[];this.b&&this.b.stop();this.b=null};Q.prototype.release=Q.prototype.release;Q.prototype.find=function(b){for(var c=this.a.length-1;0<=c;--c){var d=this.a[c];if(b>=d.startTime&&b<d.endTime)return c+this.c}return this.a.length&&b<this.a[0].startTime?this.c:null};Q.prototype.find=Q.prototype.find;
  Q.prototype.get=function(b){if(0==this.a.length)return null;b-=this.c;return 0>b||b>=this.a.length?null:this.a[b]};Q.prototype.get=Q.prototype.get;Q.prototype.offset=function(b){for(var c=r(this.a),d=c.next();!d.done;d=c.next())d=d.value,d.startTime+=b,d.endTime+=b,d.g+=b};Q.prototype.offset=Q.prototype.offset;
  Q.prototype.yc=function(b){var c=this.a[this.a.length-1],d=[];d=this.a.length?b.filter(function(b){return b.startTime>=c.startTime}):b;c&&d.length&&d[0].startTime==c.startTime&&this.a.pop();this.a.push.apply(this.a,Oa(d))};Q.prototype.merge=Q.prototype.yc;Q.prototype.replace=function(b){this.a=b};Q.prototype.replace=Q.prototype.replace;Q.prototype.Sb=function(b){var c=this.a.length;this.a=this.a.filter(function(c){return c.endTime>b});this.c+=c-this.a.length};Q.prototype.evict=Q.prototype.Sb;
  Q.prototype.ib=function(b,c){for(;this.a.length;)if(this.a[this.a.length-1].startTime>=c)this.a.pop();else break;for(;this.a.length;)if(this.a[0].endTime<=b)this.a.shift(),this.c++;else break;if(0!=this.a.length){var d=this.a[this.a.length-1];this.a[this.a.length-1]=new Cg(d.startTime,c,d.c,d.b,d.a,d.f,d.g,d.j,d.h)}};Q.prototype.fit=Q.prototype.ib;Q.prototype.zd=function(b,c){var d=this;this.b=new G(function(){var b=c();d.a.push.apply(d.a,Oa(b));0==d.a.length&&(d.b.stop(),d.b=null)});this.b.Ca(b)};
  Q.prototype.updateEvery=Q.prototype.zd;fa();ia();Q.prototype[Symbol.iterator]=function(){return new Dg(this)};function Eg(b,c,d){return new Q([new Cg(b,b+c,function(){return d},0,null,null,b,b,b+c)])}Q.forSingleSegment=Eg;function Dg(b){this.b=b;this.a=0}F("shaka.media.SegmentIterator",Dg);Dg.prototype.seek=function(b){b=this.b.find(b);if(null==b)return this.a=Math.pow(2,31),null;this.a=b;return this.b.get(this.a++)};Dg.prototype.seek=Dg.prototype.seek;
  Dg.prototype.current=function(){return this.b.get(this.a-1)};Dg.prototype.current=Dg.prototype.current;Dg.prototype.next=function(){var b=this.b.get(this.a++);return{value:b,done:!b}};Dg.prototype.next=Dg.prototype.next;function R(b,c){this.M=Ub(b);this.a=c==Fg;this.B=0}F("shaka.util.DataViewReader",R);R.prototype.ra=function(){return this.B<this.M.byteLength};R.prototype.hasMoreData=R.prototype.ra;R.prototype.de=function(){return this.B};R.prototype.getPosition=R.prototype.de;R.prototype.Ud=function(){return this.M.byteLength};R.prototype.getLength=R.prototype.Ud;R.prototype.na=function(){try{var b=this.M.getUint8(this.B);this.B+=1;return b}catch(c){throw Gg();}};R.prototype.readUint8=R.prototype.na;
  R.prototype.Db=function(){try{var b=this.M.getUint16(this.B,this.a);this.B+=2;return b}catch(c){throw Gg();}};R.prototype.readUint16=R.prototype.Db;R.prototype.G=function(){try{var b=this.M.getUint32(this.B,this.a);this.B+=4;return b}catch(c){throw Gg();}};R.prototype.readUint32=R.prototype.G;R.prototype.rd=function(){try{var b=this.M.getInt32(this.B,this.a);this.B+=4;return b}catch(c){throw Gg();}};R.prototype.readInt32=R.prototype.rd;
  R.prototype.qb=function(){try{if(this.a){var b=this.M.getUint32(this.B,!0);var c=this.M.getUint32(this.B+4,!0)}else c=this.M.getUint32(this.B,!1),b=this.M.getUint32(this.B+4,!1)}catch(d){throw Gg();}if(2097151<c)throw new I(J,3,3001);this.B+=8;return c*Math.pow(2,32)+b};R.prototype.readUint64=R.prototype.qb;R.prototype.Va=function(b){if(this.B+b>this.M.byteLength)throw Gg();var c=K(this.M,this.B,b);this.B+=b;return c};R.prototype.readBytes=R.prototype.Va;
  R.prototype.skip=function(b){if(this.B+b>this.M.byteLength)throw Gg();this.B+=b};R.prototype.skip=R.prototype.skip;R.prototype.td=function(b){if(this.B<b)throw Gg();this.B-=b};R.prototype.rewind=R.prototype.td;R.prototype.seek=function(b){if(0>b||b>this.M.byteLength)throw Gg();this.B=b};R.prototype.seek=R.prototype.seek;R.prototype.Ec=function(){for(var b=this.B;this.ra()&&0!=this.M.getUint8(this.B);)this.B+=1;b=K(this.M,b,this.B-b);this.B+=1;return Qc(b)};R.prototype.readTerminatedString=R.prototype.Ec;
  function Gg(){return new I(J,3,3E3)}var Fg=1;R.Endianness={Ue:0,$e:Fg};function S(){this.c=[];this.b=[];this.a=!1}F("shaka.util.Mp4Parser",S);S.prototype.I=function(b,c){var d=Hg(b);this.c[d]=Ig;this.b[d]=c;return this};S.prototype.box=S.prototype.I;S.prototype.ea=function(b,c){var d=Hg(b);this.c[d]=Jg;this.b[d]=c;return this};S.prototype.fullBox=S.prototype.ea;S.prototype.stop=function(){this.a=!0};S.prototype.stop=S.prototype.stop;S.prototype.parse=function(b,c){var d=new R(b,0);for(this.a=!1;d.ra()&&!this.a;)this.cc(0,d,c)};S.prototype.parse=S.prototype.parse;
  S.prototype.cc=function(b,c,d){var e=c.B,f=c.G(),g=c.G();switch(f){case 0:f=c.M.byteLength-e;break;case 1:f=c.qb()}var h=this.b[g];if(h){var k=null,l=null;this.c[g]==Jg&&(l=c.G(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.M.byteLength&&(g=c.M.byteLength);g-=c.B;c=0<g?c.Va(g):new Uint8Array(0);c=new R(c,0);h({parser:this,partialOkay:d||!1,version:k,flags:l,reader:c,size:f,start:e+b})}else c.skip(Math.min(e+f-c.B,c.M.byteLength-c.B))};S.prototype.parseNext=S.prototype.cc;
  function Kg(b){for(var c=null!=b.flags?12:8;b.reader.ra()&&!b.parser.a;)b.parser.cc(b.start+c,b.reader,b.partialOkay)}S.children=Kg;function Lg(b){var c=null!=b.flags?12:8,d=b.reader.G();d=r(jb(d));for(var e=d.next();!e.done&&(b.parser.cc(b.start+c,b.reader,b.partialOkay),!b.parser.a);e=d.next());}S.sampleDescription=Lg;function Mg(b){return function(c){b(c.reader.Va(c.reader.M.byteLength-c.reader.B))}}S.allData=Mg;
  function Hg(b){var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=c<<8|d.value.charCodeAt(0);return c}function Ng(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}S.typeToString=Ng;var Ig=0,Jg=1;function Og(b,c,d,e){b=hc(b,e);if(0!=c||null!=d)b.headers.Range=d?"bytes="+c+"-"+d:"bytes="+c+"-";return b};function Pg(b,c){var d=this;this.a=c;this.f=b;this.g=null;this.h=1;this.b=new Map;this.l=!1;this.w=null;this.v=this.j=!1;this.m=0;this.c=new oc(function(){for(var b=r(d.b.values()),c=b.next();!c.done;c=b.next())Qg(c.value);d.b.clear();d.a=null;d.f=null;d.g=null;return Promise.resolve()})}Pg.prototype.destroy=function(){return this.c.destroy()};
  Pg.prototype.configure=function(b){this.g=b;this.w=new Cb({maxAttempts:Math.max(b.retryParameters.maxAttempts,2),baseDelay:b.retryParameters.baseDelay,backoffFactor:b.retryParameters.backoffFactor,fuzzFactor:b.retryParameters.fuzzFactor,timeout:0},!0)};
  Pg.prototype.start=function(){var b=this;return v(function d(){var e,f,g;return B(d,function(d){switch(d.i){case 1:e=b.a.Oa();f=Rg(b,e);g=b.a.pd(b.f.periods[f]);if(!g.variant&&!g.text)throw new I(J,5,5005);return x(d,Sg(b,g.variant?g.variant.audio:null,g.variant?g.variant.video:null,g.text,e),2);case 2:pc(b.c),b.a&&b.a.qe&&b.a.qe(),y(d)}})})};function Tg(b){return Ug(b,"audio")}function Vg(b){return Ug(b,"video")}function Ug(b,c){var d=b.b.get(c);return d?d.Ga||d.stream:null}
  function Wg(b,c){return v(function e(){var f,g,h,k,l,m,n,q,t,u;return B(e,function(e){switch(e.i){case 1:return f=ce,x(e,We(b.a.J,f.X),2);case 2:return b.m++,b.v=!1,g=b.m,h=b.a.J,k=new Map,l=new Set,k.set(f.X,c),l.add(c),x(e,h.init(k,!1),3);case 3:pc(b.c),m=b.a.J.g,n=m.isTextVisible()||b.g.alwaysStreamText,q=b.a.Oa(),t=Rg(b,q),u=Xg(c,t,0),b.m!=g||b.b.has(f.X)||b.v||!n||(b.b.set(f.X,u),Yg(b,u,0)),y(e)}})})}
  function Zg(b,c){var d=b.b.get("video");if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.Ga&&($g(b,f,!1,0,!1),d.Ga=e)}else if(e=d.Ga)d.Ga=null,$g(b,e,!0,0,!1)}}function ah(b,c,d,e){var f=!1;if(c.video){var g=$g(b,c.video,d,e,!1);f=f||g}c.audio&&(b=$g(b,c.audio,d,e,!1),f=f||b);return f}
  function $g(b,c,d,e,f){var g=b.b.get(c.type);if(!g&&"text"==c.type&&b.g.ignoreTextStreamFailures)return Wg(b,c),!0;if(!g)return!1;var h=bh(b,c),k=Array.from(b.b.values()).every(function(b){return b.ia==g.ia});if(d&&h!=g.ia&&k){c=r(b.b.values());for(d=c.next();!d.done;d=c.next())ch(b,d.value);return!0}g.Ga&&(c.trickModeVideo?(g.Ga=c,c=c.trickModeVideo):g.Ga=null);if(g.stream==c&&!f)return!1;"text"==c.type&&Me(b.a.J,Cc(c.mimeType,c.codecs));g.stream=c;g.Zb=!0;g.stream.segmentIndex?(fa(),ia(),g.ua=g.stream.segmentIndex[Symbol.iterator]()):
  g.ua=null;d&&(g.Ma?g.hc=!0:g.Fa?(g.Ia=!0,g.Pb=e,g.hc=!0):(Qg(g),dh(b,g,!0,e)["catch"](function(c){if(b.a)b.a.onError(c)})));eh(b,g)["catch"](function(c){if(b.a)b.a.onError(c)});return!0}
  function eh(b,c){return v(function e(){var f,g;return B(e,function(e){switch(e.i){case 1:if(!c.Ua)return e["return"]();f=c.stream;g=c.Ua;if(f.segmentIndex){e.u(2);break}return x(e,f.createSegmentIndex(),2);case 2:if(c.Ua!=g||c.stream!=f)return e["return"]();fa();ia();c.ua=c.stream.segmentIndex[Symbol.iterator]();var h=b.a.Oa();var l=Re(b.a.J,c.type),m=fh(b,c,h,l),n=m?m.a?m.a-m.b:null:null;m&&!n&&(n=(m.endTime-m.startTime)*c.stream.bandwidth/8);isNaN(n)?h=!1:((m=m.f)&&(n+=(m.a?m.a-m.b:null)||0),m=
  b.a.getBandwidthEstimate(),h=8*n/m<l-h-Math.max(b.f.minBufferTime||0,b.g.rebufferingGoal)||c.Ua.b.a>n?!0:!1);h&&c.Ua.abort();y(e)}})})}
  function gh(b){function c(c){var f=b.a.J;"text"==c?(c=f.a,c=null==c.a||null==c.b?!1:d>=c.a&&d<c.b):(c=Qe(f,c),c=Od(c,d,e));return c}var d=b.a.Oa(),e=b.g.smallGapLimit,f=Rg(b,d);if(hb(b.b.values(),function(b){return b.ia==f}))for(var g=r(b.b.keys()),h=g.next();!h.done;h=g.next())h=h.value,null==Re(b.a.J,h)||c(h)||ch(b,b.b.get(h));else if(!hb(b.b.keys(),c))for(g=r(b.b.values()),h=g.next();!h.done;h=g.next())ch(b,h.value)}
  function ch(b,c){c.Ma||c.Ia||(c.Fa?(c.Ia=!0,c.Pb=0):null==Pe(b.a.J,c.type)?null==c.xa&&Yg(b,c,0):(Qg(c),dh(b,c,!1,0)["catch"](function(c){if(b.a)b.a.onError(c)})))}
  function Sg(b,c,d,e,f){return v(function h(){var k,l,m,n,q,t,u,w,C,E;return B(h,function(h){switch(h.i){case 1:return k=b.a.Oa(),l=Rg(b,k),m=ce,n=new Map,q=new Set,c&&(n.set(m.Ib,c),q.add(c)),d&&(n.set(m.Ka,d),q.add(d)),e&&(n.set(m.X,e),q.add(e)),t=b.a.J,u=b.g.forceTransmuxTS,x(h,t.init(n,u),2);case 2:pc(b.c);var D=b.f.presentationTimeline.getDuration();Infinity>D?b.a.J.va(D):b.a.J.va(Math.pow(2,32));D=r(n.keys());for(var N=D.next();!N.done;N=D.next())w=N.value,C=n.get(w),b.b.has(w)||(E=Xg(C,l,f),
  b.b.set(w,E),Yg(b,E,0));y(h)}})})}function Xg(b,c,d){fa();ia();var e=b.segmentIndex?b.segmentIndex[Symbol.iterator]():null;return{stream:b,type:b.type,Bb:null,ua:e,za:null,vc:null,Ga:null,Zb:!0,ia:c,endOfStream:!1,Fa:!1,xa:null,Ia:!1,Pb:0,hc:!1,Ma:!1,Gc:!1,zb:!1,ec:d||0,Ua:null}}
  function hh(b,c){return v(function e(){var f,g,h,k;return B(e,function(e){switch(e.i){case 1:pc(b.c);if(c.Fa||null==c.xa||c.Ma)return e["return"]();c.xa=null;if(!c.Ia){e.u(2);break}return x(e,dh(b,c,c.hc,c.Pb),3);case 3:return e["return"]();case 2:if(c.stream.segmentIndex){e.u(4);break}f=c.stream;return x(e,c.stream.createSegmentIndex(),5);case 5:if(f!=c.stream)return null==c.xa&&Yg(b,c,0),e["return"]();fa();ia();c.ua=c.stream.segmentIndex[Symbol.iterator]();case 4:try{g=ih(b,c),null!=g&&(Yg(b,c,
  g),c.zb=!1)}catch(m){return jh(b,m),e["return"]()}h=Array.from(b.b.values());kh(b,c);if(!b.l||!h.every(function(b){return b.endOfStream})){e.u(0);break}return x(e,b.a.J.endOfStream(),7);case 7:pc(b.c),k=b.a.J.getDuration(),0!=k&&k<b.f.presentationTimeline.getDuration()&&b.f.presentationTimeline.va(k),y(e)}})})}
  function ih(b,c){if(lh(c))return Ve(b.a.J,c.stream.originalId||""),null;var d=b.a.Oa(),e=c.Bb&&c.za?c.za.endTime:Math.max(d,c.ec),f=bh(b,c.stream),g=Rg(b,e),h=Se(b.a.J,c.type,d),k=Math.max(b.f.minBufferTime||0,b.g.rebufferingGoal,b.g.bufferingGoal)*b.h;if(e>=b.f.presentationTimeline.getDuration())return c.endOfStream=!0,"video"==c.type&&(d=b.b.get("text"))&&"application/cea-608"==d.stream.mimeType&&(d.endOfStream=!0),null;c.endOfStream=!1;c.ia=g;if(g!=f)return null;if(h>=k)return.5;f=Re(b.a.J,c.type);
  f=fh(b,c,d,f);if(!f||!mh(b,f))return 1;g=Infinity;h=Array.from(b.b.values());h=r(h);for(k=h.next();!k.done;k=h.next())k=k.value,lh(k)||(g=Math.min(g,k.Bb&&k.za?k.za.endTime:Math.max(d,k.ec)));if(e>=g+b.f.presentationTimeline.a)return 1;c.ec=0;nh(b,c,d,f)["catch"](function(){});return null}function fh(b,c,d,e){return c.stream==c.Bb?c.ua.current():c.za?c.ua.seek(c.za.endTime):e?c.ua.seek(e):c.ua.seek(Math.max(d-b.g.inaccurateManifestTolerance,0))||c.ua.seek(d)}
  function mh(b,c){var d=b.f.presentationTimeline,e=d.Pa();d=d.Ea();return c.endTime<e||c.startTime>d?!1:!0}
  function nh(b,c,d,e){return v(function g(){var h,k,l,m,n,q;return B(g,function(g){switch(g.i){case 1:return h=ce,k=c.stream,l=oh(b,c,e),c.Fa=!0,c.Zb=!1,m=ph(b,c,e),z(g,2),x(g,Promise.all([l,m]),4);case 4:return n=g.o,pc(b.c),b.j?g["return"]():x(g,qh(b,c,d,k,e,n[1]),5);case 5:pc(b.c);if(b.j)return g["return"]();c.Fa=!1;c.Gc=!1;b.a.J.Tb();c.Ia||b.a.Dc();Yg(b,c,0);rh(b,k);Ea(g,0);break;case 2:q=A(g);pc(b.c,q);if(b.j)return g["return"]();c.Fa=!1;c.type==h.X&&b.g.ignoreTextStreamFailures?b.b["delete"](h.X):
  7001==q.code?(c.Fa=!1,c.xa=null,Yg(b,c,0)):3017==q.code?sh(b,c,q):(c.zb=!0,q.severity=J,jh(b,q));y(g)}})})}function sh(b,c,d){if(!Array.from(b.b.values()).some(function(b){return b!=c&&b.Gc})){var e=Math.round(100*b.h);if(20<e)b.h-=.2;else if(4<e)b.h-=.04;else{c.zb=!0;b.j=!0;b.a.onError(d);return}c.Gc=!0}Yg(b,c,4)}
  function oh(b,c,d){return v(function f(){var g,h,k,l,m,n;return B(f,function(f){switch(f.i){case 1:g=Math.max(0,d.j-.1);h=d.h+.01;if(!c.Zb)return f["return"]();k=d.g;l=Xe(b.a.J,c.type,k,g,h);if(d.f!=c.vc){f.u(2);break}return x(f,l,3);case 3:return f["return"]();case 2:if(c.vc=d.f){f.u(4);break}return x(f,l,5);case 5:return f["return"]();case 4:return m=ph(b,c,d.f),n=function(){return v(function u(){var d,f,g;return B(u,function(h){switch(h.i){case 1:return z(h,2),x(h,m,4);case 4:return d=h.o,pc(b.c),
  f=c.stream.closedCaptions&&0<c.stream.closedCaptions.size,x(h,Te(b.a.J,c.type,d,null,null,f),5);case 5:Ea(h,0);break;case 2:throw g=A(h),c.Zb=!0,c.vc=null,g;}})})},x(f,Promise.all([l,n()]),0)}})})}
  function qh(b,c,d,e,f,g){return v(function k(){var l;return B(k,function(k){switch(k.i){case 1:return l=e.closedCaptions&&0<e.closedCaptions.size,null!=e.emsgSchemeIdUris&&0<e.emsgSchemeIdUris.length&&(new S).ea("emsg",function(c){var d=e.emsgSchemeIdUris,g=c.reader.Ec(),k=c.reader.Ec(),l=c.reader.G(),m=c.reader.G(),n=c.reader.G(),D=c.reader.G();c=c.reader.Va(c.reader.M.byteLength-c.reader.B);var H=f.startTime+m/l;d.includes(g)&&("urn:mpeg:dash:event:2012"==g?b.a.re():(d=new L(th,{detail:{startTime:H,
  endTime:H+n/l,schemeIdUri:g,value:k,timescale:l,presentationTimeDelta:m,eventDuration:n,id:D,messageData:c}}),b.a.onEvent(d)))}).parse(g),x(k,uh(b,c,d),2);case 2:return pc(b.c),x(k,Te(b.a.J,c.type,g,f.startTime,f.endTime,l),3);case 3:pc(b.c),c.Bb=e,c.za=f,c.ua.next(),y(k)}})})}
  function uh(b,c,d){return v(function f(){var g,h,k,l;return B(f,function(f){switch(f.i){case 1:g=Math.max(b.g.bufferBehind,b.f.presentationTimeline.a);h=Pe(b.a.J,c.type);if(null==h)return f["return"]();k=d-h;l=k-g;return 0>=l?f["return"]():x(f,b.a.J.remove(c.type,h,h+l),2);case 2:pc(b.c),y(f)}})})}
  function rh(b,c){if(!b.l){var d=Array.from(b.b.values());if(1!=d.length||"text"!=d[0].type)b.l=d.every(function(b){return"text"==b.type?!0:!b.Ia&&!b.Ma&&b.za});b.l&&(bh(b,c),b.a.od(),b.a.se&&b.a.se())}}
  function kh(b,c){var d=bh(b,c.stream);if(c.ia!=d){var e=c.ia;d=Array.from(b.b.values());if(d.every(function(b){return b.ia==e||lh(b)})&&d.every(vh))try{if(d.every(function(c){var d=vh(c),f=bh(b,c.stream);return lh(c)?!0:d&&c.ia==e&&f!=e})){var f=b.f.periods[e],g=b.a.pd(f),h=new Map;g.variant&&g.variant.video&&h.set("video",g.variant.video);g.variant&&g.variant.audio&&h.set("audio",g.variant.audio);g.text&&h.set("text",g.text);for(var k=r(b.b.keys()),l=k.next();!l.done;l=k.next()){var m=l.value;if(!h.has(m)&&
  "text"!=m){b.a.onError(new I(J,5,5005));return}}var n=r(Array.from(h.keys()));for(l=n.next();!l.done;l=n.next()){var q=l.value;if(!b.b.has(q))if("text"==q)Sg(b,null,null,h.get("text"),f.startTime),h["delete"](q);else{b.a.onError(new I(J,5,5005));return}}var t=Array.from(b.b.keys()),u=r(t);for(l=u.next();!l.done;l=u.next()){var w=l.value,C=b.b.get(w),E=h.get(w);if(E){var D=lh(C);D&&(C.ia=e,C.ec=f.startTime);$g(b,E,!1,0,!1);if(!D||!lh(C)){var H=b.b.get(w);Yg(b,H,0)}}else b.b["delete"](w)}b.a.od()}}catch(N){}}}
  function lh(b){return b&&"text"==b.type&&"application/cea-608"==b.stream.mimeType}function vh(b){return!b.Fa&&null==b.xa&&!b.Ia&&!b.Ma}function Rg(b,c){var d=Wf(b.f.periods,c+de);return d?b.f.periods.indexOf(d):0}function bh(b,c){return b.f.periods.findIndex(function(b){for(var d=r(b.variants),f=d.next();!f.done;f=d.next())if(f=f.value,f.audio==c||f.video==c||f.video&&f.video.trickModeVideo==c)return!0;return b.textStreams.includes(c)})}
  function ph(b,c,d){return v(function f(){var g,h,k,l;return B(f,function(f){switch(f.i){case 1:return g=nc,h=Og(d.c(),d.b,d.a,b.g.retryParameters),k=b.a.mb.request(g,h),c.Ua=k,x(f,k.promise,2);case 2:return l=f.o,c.Ua=null,f["return"](l.data)}})})}
  function dh(b,c,d,e){return v(function g(){var h,k;return B(g,function(g){switch(g.i){case 1:return c.Ia=!1,c.hc=!1,c.Pb=0,c.Ma=!0,e?(h=b.a.Oa(),k=b.a.J.getDuration(),x(g,b.a.J.remove(c.type,h+e,k),3)):x(g,We(b.a.J,c.type),4);case 4:pc(b.c);if(!d){g.u(3);break}return x(g,b.a.J.flush(c.type),3);case 3:pc(b.c),c.Bb=null,c.za=null,c.Ma=!1,c.endOfStream=!1,Yg(b,c,0),y(g)}})})}
  function Yg(b,c,d){c.xa=(new Bb(function(){return v(function f(){var d;return B(f,function(f){switch(f.i){case 1:return z(f,2),x(f,hh(b,c),4);case 4:Ea(f,0);break;case 2:d=A(f);if(b.a)b.a.onError(d);y(f)}})})})).O(d)}function Qg(b){null!=b.xa&&(b.xa.stop(),b.xa=null)}function jh(b,c){v(function e(){return B(e,function(e){switch(e.i){case 1:return x(e,Eb(b.w),2);case 2:pc(b.c),b.a.onError(c),c.handled||b.g.failureCallback(c),y(e)}})})};function wh(b,c){var d=xh(),e=this;this.g=c;this.c=b;this.j=d;this.h=null;this.f=[];this.b=this.a=null;this.m=Promise.resolve().then(function(){return yh(e)});this.l=new oc(function(){return zh(e)})}wh.prototype.destroy=function(){return this.l.destroy()};
  function zh(b){return v(function d(){var e;return B(d,function(d){switch(d.i){case 1:return b.b&&b.b.abort(),Ah(b),x(d,b.m,2);case 2:b.a&&b.a.sa.Ta();for(var f=r(b.f),h=f.next();!h.done;h=f.next())e=h.value,e.sa.Ta();b.a=null;b.f=[];b.g=null;y(d)}})})}function Bh(b,c){var d={ob:function(){},$b:function(){},Ta:function(){},onError:function(){},bc:function(){},uf:function(){}};b.f.push({create:c,sa:d});b.b&&b.b.abort();Ah(b);return d}
  function yh(b){return v(function d(){return B(d,function(d){switch(d.i){case 1:if(b.l.a)d.u(0);else{if(0==b.f.length||b.a&&!b.a.Qa)var e=!1;else{b.a&&(b.a.sa.Ta(),b.a=null);e=b.f.shift();var g=e.create(b.j);g?(e.sa.ob(),b.a={node:g.node,payload:g.payload,Qa:g.Qa,sa:e.sa}):e.sa.bc();e=!0}e?e=Promise.resolve():b.a?e=Ch(b):(b.g.pe(b.c),b.h=new Hb,e=b.h);return x(d,e,1)}}})})}
  function Ch(b){return v(function d(){var e,f;return B(d,function(d){switch(d.i){case 1:return b.c=b.g.$d(b.c,b.j,b.a.node,b.a.payload),z(d,2),b.b=b.g.Od(b.c,b.j,b.a.payload),x(d,b.b.promise,4);case 4:b.b=null;b.c==b.a.node&&(b.a.sa.$b(),b.a=null);Ea(d,0);break;case 2:e=A(d);if(7001==e.code)b.a.sa.Ta();else b.a.sa.onError(e);b.a=null;b.b=null;f=b;return x(d,b.g.handleError(b.j,e),5);case 5:f.c=d.o,y(d)}})})}function Ah(b){b.h&&(b.h.resolve(),b.h=null)};function Dh(b){this.a=null;for(var c=r(Array.from(b.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,d.mode="disabled","Shaka Player TextTrack"==d.label&&(this.a=d);this.a||(this.a=b.addTextTrack("subtitles","Shaka Player TextTrack"));this.a.mode="hidden"}F("shaka.text.SimpleTextDisplayer",Dh);Dh.prototype.remove=function(b,c){if(!this.a)return!1;Eh(this.a,function(d){return d.startTime<c&&d.endTime>b});return!0};Dh.prototype.remove=Dh.prototype.remove;
  Dh.prototype.append=function(b){var c=Fh,d=[];b=r(b);for(var e=b.next();!e.done;e=b.next())(e=c(e.value))&&d.push(e);c=d.slice().sort(function(b,c){return b.startTime!=c.startTime?b.startTime-c.startTime:b.endTime!=c.endTime?b.endTime-c.startTime:d.indexOf(c)-d.indexOf(b)});c=r(c);for(b=c.next();!b.done;b=c.next())this.a.addCue(b.value)};Dh.prototype.append=Dh.prototype.append;Dh.prototype.destroy=function(){this.a&&Eh(this.a,function(){return!0});this.a=null;return Promise.resolve()};
  Dh.prototype.destroy=Dh.prototype.destroy;Dh.prototype.isTextVisible=function(){return"showing"==this.a.mode};Dh.prototype.isTextVisible=Dh.prototype.isTextVisible;Dh.prototype.setTextVisibility=function(b){this.a.mode=b?"showing":"hidden"};Dh.prototype.setTextVisibility=Dh.prototype.setTextVisibility;
  function Fh(b){if(b.startTime>=b.endTime)return null;var c=new VTTCue(b.startTime,b.endTime,b.payload);c.lineAlign=b.lineAlign;c.positionAlign=b.positionAlign;c.size=b.size;try{c.align=b.textAlign}catch(d){}"center"==b.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==b.writingMode?c.vertical="lr":"vertical-rl"==b.writingMode&&(c.vertical="rl");1==b.lineInterpretation&&(c.snapToLines=!1);null!=b.line&&(c.line=b.line);null!=b.position&&(c.position=b.position);return c}
  function Eh(b,c){var d=b.mode;b.mode="showing"==d?"showing":"hidden";for(var e=r(Array.from(b.cues)),f=e.next();!f.done;f=e.next())(f=f.value)&&c(f)&&b.removeCue(f);b.mode=d};function Gh(){}F("shaka.util.ConfigUtils",Gh);
  function Hh(b,c,d,e,f){var g=f in e,h=!0,k;for(k in c){var l=f+"."+k,m=g?e[f]:d[k];g||k in d?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=Xb(m):m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=Xb(m)),l=Hh(b[k],c[k],m,e,l),h=h&&l):typeof c[k]!=typeof m||null==c[k]||"function"!=typeof c[k]&&c[k].constructor!=m.constructor?($a("Invalid config, wrong type for "+l),h=!1):("function"==typeof d[k]&&d[k].length!=c[k].length&&ab("Unexpected number of arguments for "+l),b[k]=c[k]):($a("Invalid config, unrecognized key "+
  l),h=!1)}return h}Gh.mergeConfigObjects=Hh;function Ih(b,c){for(var d={},e=d,f=0,g=0;;){f=b.indexOf(".",f);if(0>f)break;if(0==f||"\\"!=b[f-1])g=b.substring(g,f).replace(/\\\./g,"."),e[g]={},e=e[g],g=f+1;f+=1}e[b.substring(g).replace(/\\\./g,".")]=c;return d}Gh.convertToConfigObject=Ih;function Jh(){}F("shaka.util.PlayerConfiguration",Jh);
  function Kh(){var b=1E6,c=Infinity;navigator.connection&&(b=1E6*navigator.connection.downlink,navigator.connection.saveData&&(c=360));var d={retryParameters:Db(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Cd,logLicenseExchange:!1},e={retryParameters:Db(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,defaultPresentationDelay:0,dash:{customScheme:function(b){return b&&null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,
  ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1},hls:{ignoreTextStreamFailures:!1}},f={retryParameters:Db(),failureCallback:function(b){return[b]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,
  inaccurateManifestTolerance:2};Lc("Web0S")&&(f.stallEnabled=!1);var g={trackSelectionCallback:function(b){return v(function m(){return B(m,function(c){switch(c.i){case 1:return c["return"](b)}})})},progressCallback:function(b,c){return[b,c]},usePersistentLicense:!0},h={drm:d,manifest:e,streaming:f,offline:g,abrFactory:function(){return new P},abr:{enabled:!0,defaultBandwidthEstimate:b,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,
  minHeight:0,maxHeight:c,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}};
  g.trackSelectionCallback=function(b){return v(function m(){return B(m,function(c){switch(c.i){case 1:return c["return"](Lh(b,h.preferredAudioLanguage))}})})};return h}function Mh(b,c,d){var e={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return Hh(b,c,d||Kh(),e,"")}Jh.mergeConfigObjects=Mh;
  function Lh(b,c){var d=b.filter(function(b){return"variant"==b.type}),e=[],f=ff(c,d.map(function(b){return b.language}));f&&(e=d.filter(function(b){return bf(b.language)==f}));0==e.length&&(e=d.filter(function(b){return b.primary}));0==e.length&&(d.map(function(b){return b.language}),e=d);var g=e.filter(function(b){return b.height&&480>=b.height});g.length&&(g.sort(function(b,c){return c.height-b.height}),e=g.filter(function(b){return b.height==g[0].height}));d=[];if(e.length){var h=Math.floor(e.length/
  2);e.sort(function(b,c){return b.bandwidth-c.bandwidth});d.push(e[h])}e=r(b);for(h=e.next();!h.done;h=e.next())h=h.value,"text"==h.type&&d.push(h);return d};function Nh(){this.a=null;this.b=[]}function Oh(b,c){if(null==b.a)b.a={timestamp:Date.now()/1E3,state:c,duration:0};else{var d=Date.now()/1E3;b.a.duration=d-b.a.timestamp;b.a.state!=c&&(b.b.push(b.a),b.a={timestamp:d,state:c,duration:0})}}function Ph(b,c){var d=0;b.a&&b.a.state==c&&(d+=b.a.duration);for(var e=r(b.b),f=e.next();!f.done;f=e.next())f=f.value,d+=f.state==c?f.duration:0;return d}
  function Qh(b){function c(b){return{timestamp:b.timestamp,state:b.state,duration:b.duration}}for(var d=[],e=r(b.b),f=e.next();!f.done;f=e.next())d.push(c(f.value));b.a&&d.push(c(b.a));return d};function Rh(){this.b=this.c=null;this.a=[]};function Sh(){this.g=this.h=this.m=this.b=this.l=this.c=this.v=this.w=this.D=this.j=this.F=NaN;this.a=new Nh;this.f=new Rh};function T(b,c){Wb.call(this);var d=this;this.j=Th;this.a=null;this.ab=!1;this.g=new O;this.ic=this.l=this.sb=this.b=this.Mb=this.w=this.f=this.Nb=this.D=this.Jb=this.L=this.cb=this.v=this.F=this.h=this.N=null;this.jd=1E9;this.Lb=new Set;this.fb=!0;this.la=null;this.hd=!1;this.gd=0;this.$=null;this.V=new xf;this.c=Uh(this);this.Hb={width:Infinity,height:Infinity};this.m=null;this.tb=new Gf(this.c.preferredAudioLanguage,this.c.preferredVariantRole,this.c.preferredAudioChannelCount);this.W=this.c.preferredTextLanguage;
  this.$a=this.c.preferredTextRole;c&&c(this);this.N=Vh(this);this.Ja=null;Wh&&(this.Ja=$d(Wh));this.g.s(window,"online",function(){d.Kc()});this.H={name:"detach"};this.P={name:"attach"};this.Da={name:"unload"};this.rc={name:"manifest-parser"};this.mc={name:"manifest"};this.bb={name:"media-source"};this.jc={name:"drm-engine"};this.S={name:"load"};this.sc={name:"src-equals-drm-engine"};this.eb={name:"src-equals"};var e=new Map;e.set(this.P,function(b,c){return Mb(Xh(d,b,c))});e.set(this.H,function(b){b.A&&
  (d.g.da(b.A,"error"),b.A=null);d.a=null;b=Promise.resolve();return Mb(b)});e.set(this.Da,function(b){return Mb(Yh(d,b))});e.set(this.bb,function(b){b=Zh(d,b);return Mb(b)});e.set(this.rc,function(b,c){var e=$h(d,b,c);return Mb(e)});e.set(this.mc,function(b){return ai(d,b)});e.set(this.jc,function(){var b=bi(d);return Mb(b)});e.set(this.S,function(b,c){return Mb(ci(d,b,c))});e.set(this.sc,function(b){b=di(d,b);return Mb(b)});e.set(this.eb,function(b,c){return ei(d,b,c)});this.gb=new wh(this.H,{$d:function(b,
  c,e,k){var f=null;b==d.H&&(f=e==d.H?d.H:d.P);b==d.P&&(f=e==d.H||c.A!=k.A?d.H:e==d.P?d.P:e==d.bb||e==d.S?d.bb:e==d.eb?d.sc:null);b==d.bb&&(f=e==d.S&&c.A==k.A?d.rc:d.Da);b==d.rc&&(f=fi(d.S,d.mc,d.Da,e,c,k));b==d.mc&&(f=fi(d.S,d.jc,d.Da,e,c,k));b==d.jc&&(f=fi(d.S,d.S,d.Da,e,c,k));b==d.sc&&(f=e==d.eb&&c.A==k.A?d.eb:d.Da);if(b==d.S||b==d.eb)f=d.Da;b==d.Da&&(f=k.A&&c.A==k.A?d.P:d.H);return f},Od:function(b,c,h){d.dispatchEvent(gi(hi,{state:b.name}));return e.get(b)(c,h)},handleError:function(b){return v(function h(){return B(h,
  function(c){switch(c.i){case 1:return x(c,Yh(d,b),2);case 2:return c["return"](b.A?d.P:d.H)}})})},pe:function(b){d.dispatchEvent(gi(ii,{state:b.name}))}});b&&this.ub(b,!0)}za(T,Wb);F("shaka.Player",T);function gi(b,c){return new L(b,c)}
  T.prototype.destroy=function(){var b=this;return v(function d(){var e;return B(d,function(d){switch(d.i){case 1:if(b.j==ji)return d["return"]();b.j=ji;e=Bh(b.gb,function(){return{node:b.H,payload:xh(),Qa:!1}});return x(d,new Promise(function(b){e.ob=function(){};e.$b=function(){b()};e.Ta=function(){b()};e.onError=function(){b()};e.bc=function(){b()}}),2);case 2:return x(d,b.gb.destroy(),3);case 3:b.g&&(b.g.release(),b.g=null);b.ic=null;b.l=null;b.c=null;b.m=null;if(!b.N){d.u(0);break}return x(d,b.N.destroy(),
  5);case 5:b.N=null,y(d)}})})};T.prototype.destroy=T.prototype.destroy;T.registerSupportPlugin=function(b,c){ki[b]=c};T.setAdManagerFactory=function(b){Wh=b};T.isBrowserSupported=function(){if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach))return!1;var b=Mc();return b&&12>b||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Hc()?!0:Ic("application/x-mpegurl")};
  T.probeSupport=function(){return v(function c(){var d,e,f,g,h;return B(c,function(c){switch(c.i){case 1:return x(c,Gd(),2);case 2:d=c.o;var k={};if(Hc()){for(var m in Pf)k[m]=!0;for(var n in Of)k[n]=!0}m={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};n=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var q=n.next();!q.done;q=n.next())q=q.value,k[q]=Hc()?!!Pf[q]:Ic(q);for(var t in m)k[t]=
  Hc()?!!Of[t]:Ic(m[t]);e=k;k={};t=r('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
  for(m=t.next();!m.done;m=t.next())m=m.value,k[m]=Hc()?Ce(m)?!0:MediaSource.isTypeSupported(m)||fe(m):Ic(m),n=m.split(";")[0],k[n]=k[n]||k[m];f=k;g={manifest:e,media:f,drm:d};h=ki;for(var u in h)g[u]=h[u]();return c["return"](g)}})})};T.prototype.ub=function(b,c){c=void 0===c?!0:c;if(this.j==ji)return Promise.reject(li());var d=xh();d.A=b;Hc()||(c=!1);var e=c?this.bb:this.P,f=Bh(this.gb,function(){return{node:e,payload:d,Qa:!1}});f.ob=function(){};return mi(f)};T.prototype.attach=T.prototype.ub;
  T.prototype.detach=function(){var b=this;if(this.j==ji)return Promise.reject(li());var c=Bh(this.gb,function(){return{node:b.H,payload:xh(),Qa:!1}});c.ob=function(){};return mi(c)};T.prototype.detach=T.prototype.detach;T.prototype.Uc=function(b){var c=this;b=void 0===b?!0:b;if(this.j==ji)return Promise.reject(li());Hc()||(b=!1);var d=xh(),e=Bh(this.gb,function(e){var f=e.A&&b?c.bb:e.A?c.P:c.H;d.A=e.A;return{node:f,payload:d,Qa:!1}});e.ob=function(){};return mi(e)};T.prototype.unload=T.prototype.Uc;
  T.prototype.load=function(b,c,d){var e=this;if(this.j==ji)return Promise.reject(li());this.dispatchEvent(gi(ni));var f=xh();f.uri=b;f.Qc=Date.now()/1E3;d&&(f.mimeType=d);void 0!==c&&(f.startTime=c);var g=oi(this,f)?this.eb:this.S,h=Bh(this.gb,function(b){if(null==b.A)return null;f.A=b.A;return{node:g,payload:f,Qa:!0}});this.m=new Sh;h.ob=function(){};return new Promise(function(b,c){h.bc=function(){return c(new I(J,Fb,7002))};h.$b=function(){b();e.dispatchEvent(gi(pi))};h.Ta=function(){return c(li())};
  h.onError=function(b){return c(b)}})};T.prototype.load=T.prototype.load;
  function oi(b,c){if(!Hc())return!0;var d=c.mimeType,e=c.uri||"";d||(d={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",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[Rf(e)]);return d?""==(c.A||Jc()).canPlayType(d)?!1:Hc()&&(d in Pf||Rf(e)in Of)?Kc()&&b.c.streaming.useNativeHlsOnSafari:!0:!1}
  function Xh(b,c,d){null==c.A&&(c.A=d.A,b.g.s(c.A,"error",function(){var c=qi(b);c&&ri(b,c)}));b.a=c.A;return Promise.resolve()}
  function Yh(b,c){return v(function e(){var f,g,h,k;return B(e,function(e){switch(e.i){case 1:b.j!=ji&&(b.j=Th);b.dispatchEvent(gi(si));c.mimeType=null;c.startTime=null;c.uri=null;c.A&&(b.g.da(c.A,"loadeddata"),b.g.da(c.A,"playing"),b.g.da(c.A,"pause"),b.g.da(c.A,"ended"),b.g.da(c.A,"ratechange"));b.cb&&(b.cb.release(),b.cb=null);b.Jb&&(b.Jb.stop(),b.Jb=null);if(!b.w){e.u(2);break}return x(e,b.w.stop(),3);case 3:b.w=null,b.Mb=null;case 2:if(!b.l){e.u(4);break}return x(e,b.l.stop(),4);case 4:if(!b.f){e.u(6);
  break}return x(e,b.f.destroy(),7);case 7:b.f=null;case 6:b.v&&(b.v.release(),b.v=null);if(!b.F){e.u(8);break}return x(e,b.F.destroy(),9);case 9:b.F=null;case 8:if(b.Ja)b.Ja.onAssetUnload();if(!c.A||!c.A.src){e.u(10);break}return x(e,new Promise(function(b){return(new G(b)).O(.1)}),11);case 11:c.A.removeAttribute("src"),c.A.load();case 10:if(!b.h){e.u(12);break}return x(e,b.h.destroy(),13);case 13:b.h=null;case 12:b.V.a.clear();b.sb=null;b.D=null;b.Lb.clear();if(b.b)for(var l=r(b.b.periods),n=l.next();!n.done;n=
  l.next()){f=n.value;n=r(f.variants);for(var q=n.next();!q.done;q=n.next()){g=q.value;var t=r([g.audio,g.video]);for(q=t.next();!q.done;q=t.next())(h=q.value)&&h.segmentIndex&&h.segmentIndex.release()}n=r(f.textStreams);for(q=n.next();!q.done;q=n.next())k=q.value,k.segmentIndex&&k.segmentIndex.release()}b.b=null;b.m=new Sh;b.kc=null;b.fb=!0;ti(b);y(e)}})})}
  function Zh(b,c){return v(function e(){var f,g,h,k;return B(e,function(e){switch(e.i){case 1:return f=window.muxjs?new Ld:new Md,g=b.c.textDisplayFactory,h=$d(g),b.kc=g,k=new He(c.A,f,h),x(e,k.v,2);case 2:b.F=k,y(e)}})})}
  function $h(b,c,d){return v(function f(){var g,h,k,l;return B(f,function(f){switch(f.i){case 1:return c.mimeType=d.mimeType,c.uri=d.uri,g=c.uri,h=b.N,b.sb=g,k=b,x(f,Qf(g,h,b.c.manifest.retryParameters,c.mimeType),2);case 2:k.Mb=f.o,b.w=$d(b.Mb),l=Xb(b.c.manifest),d.A&&"AUDIO"===d.A.nodeName&&(l.disableVideo=!0),b.w.configure(l),y(f)}})})}
  function ai(b,c){var d=c.uri,e=b.N;b.Nb=new ug;vg(b.Nb,function(c){ui(b,vi,c);if(b.Ja)b.Ja.onTimedMetadata(c)});var f={networkingEngine:e,filterNewPeriod:function(c){return wi(b,c)},filterAllPeriods:function(c){return xi(b,c)},onTimelineRegionAdded:function(c){var d=b.Nb;a:{var e=r(d.a);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.schemeIdUri==c.schemeIdUri&&f.id==c.id&&f.startTime==c.startTime&&f.endTime==c.endTime){e=f;break a}e=null}null==e&&(d.a.add(c),d.b(c))},onEvent:function(c){return b.dispatchEvent(c)},
  onError:function(c){return ri(b,c)}},g=Date.now()/1E3;return new Ib(function(){return v(function k(){var c,e,n,q;return B(k,function(k){switch(k.i){case 1:return c=b,x(k,b.w.start(d,f),2);case 2:c.b=k.o;e=gi(yi);b.dispatchEvent(e);if(0==b.b.periods.length)throw new I(J,4,4014);zi(b.b.periods);n=Date.now()/1E3;q=n-g;b.m.l=q;y(k)}})})}(),function(){return b.w.stop()})}
  function bi(b){return v(function d(){var e,f;return B(d,function(d){switch(d.i){case 1:return e=Date.now()/1E3,f=!0,b.h=new bd({mb:b.N,onError:function(d){ri(b,d)},ac:function(d){Ai(b,d)},onExpirationUpdated:function(d,e){Bi(b,d,e)},onEvent:function(d){b.dispatchEvent(d);d.type==Ci&&f&&(f=!1,b.m.b=Date.now()/1E3-e)}}),b.h.configure(b.c.drm),x(d,id(b.h,Vf(b.b.periods),b.b.offlineSessionIds),2);case 2:xi(b,b.b.periods),y(d)}})})}
  function ci(b,c,d){return v(function f(){var g,h,k,l,m,n,q,t,u,w;return B(f,function(f){switch(f.i){case 1:return c.startTime=d.startTime,g=c.A,h=c.uri,b.sb=h,k=function(){return Di(b)},l=function(){var c=b.a.playbackRate;0!=c&&(b.L.set(c),c=gi(Ei),b.dispatchEvent(c))},b.g.s(g,"playing",k),b.g.s(g,"pause",k),b.g.s(g,"ended",k),b.g.s(g,"ratechange",l),m=b.c.abrFactory,b.l&&b.ic==m||(b.ic=m,b.l=$d(m),"function"!=typeof b.l.playbackRateChanged&&(Td("AbrManager","Please use an AbrManager with playbackRateChanged function."),
  b.l.playbackRateChanged=function(){}),b.l.configure(b.c.abr)),Fi(b,b.b.periods),b.tb=new Gf(b.c.preferredAudioLanguage,b.c.preferredVariantRole,b.c.preferredAudioChannelCount),b.W=b.c.preferredTextLanguage,Gi(b.b.presentationTimeline,b.c.playRangeStart,b.c.playRangeEnd),x(f,b.h.ub(g),2);case 2:return b.l.init(function(c,d,f){d=void 0===d?!1:d;f=void 0===f?0:f;a:{var g=r(b.b.periods);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.variants.includes(c)){g=h;break a}g=null}Hi(b,g,c,!0);b.f&&ah(b.f,
  c,d,f)&&Ii(b)}),b.v=Ji(b,c.startTime),b.cb=Ki(b),b.L=new Zf({Ub:function(){return c.A.playbackRate},Oc:function(b){c.A.playbackRate=b},md:function(b){c.A.currentTime+=b}}),n=Math.max(b.b.minBufferTime,b.c.streaming.rebufferingGoal),Li(b,n),b.f=Mi(b),b.f.configure(b.c.streaming),Ni(b),b.j=Oi,b.dispatchEvent(gi(Pi)),x(f,b.f.start(),3);case 3:b.c.streaming.startAtSegmentBoundary&&(q=b.v.h(),t=Qi(b,q),b.v.m(t));for(var C=r(b.b.periods),D=C.next();!D.done;D=C.next())u=D.value,wi(b,u);Ri(b);Ii(b);w=Si(b)||
  b.b.periods[0];w.variants.some(function(b){return b.primary});Ti(b,w.variants);b.g.ca(g,"loadeddata",function(){b.m.c=Date.now()/1E3-d.Qc});y(f)}})})}
  function di(b,c){return v(function e(){var f,g,h,k;return B(e,function(e){switch(e.i){case 1:return f=ce,g=Date.now()/1E3,h=!0,b.h=new bd({mb:b.N,onError:function(c){ri(b,c)},ac:function(c){Ai(b,c)},onExpirationUpdated:function(c,e){Bi(b,c,e)},onEvent:function(c){b.dispatchEvent(c);c.type==Ci&&h&&(h=!1,b.m.b=Date.now()/1E3-g)}}),b.h.configure(b.c.drm),k={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,
  mimeType:"video/mp4",codecs:"",encrypted:!0,keyId:null,language:"und",label:null,type:f.Ka,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},x(e,id(b.h,[k],[]),2);case 2:return x(e,b.h.ub(c.A),0)}})})}
  function ei(b,c,d){function e(){return Di(b)}c.uri=d.uri;c.startTime=d.startTime;b.sb=c.uri;b.v=new ng(c.A);null!=c.startTime&&b.v.m(c.startTime);b.L=new Zf({Ub:function(){return c.A.playbackRate},Oc:function(b){c.A.playbackRate=b},md:function(b){c.A.currentTime+=b}});Li(b,b.c.streaming.rebufferingGoal);b.g.s(c.A,"playing",e);b.g.s(c.A,"pause",e);b.g.s(c.A,"ended",e);b.g.ca(c.A,"loadeddata",function(){b.m.c=Date.now()/1E3-d.Qc});b.a.audioTracks&&(b.g.s(b.a.audioTracks,"addtrack",function(){return Ri(b)}),
  b.g.s(b.a.audioTracks,"removetrack",function(){return Ri(b)}),b.g.s(b.a.audioTracks,"change",function(){return Ri(b)}));if(b.a.textTracks){var f=b.a.textTracks;b.g.s(f,"addtrack",function(){return Ri(b)});b.g.s(f,"removetrack",function(){return Ri(b)});b.g.s(f,"change",function(){return Ri(b)})}c.A.src=c.uri;b.j=Ui;b.dispatchEvent(gi(Pi));var g=new Hb;b.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?g.resolve():b.a.error?g.reject(qi(b)):(b.g.ca(b.a,"loadeddata",function(){g.resolve()}),b.g.ca(b.a,
  "error",function(){g.reject(qi(b))}));return new Ib(g,function(){g.reject(new I(J,Fb,7001));return Promise.resolve()})}function zi(b){function c(b){return b.video&&b.audio||b.video&&b.video.codecs.includes(",")}if(b.some(function(b){return b.variants.some(c)})){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.variants=d.variants.filter(c)}}
  function Ni(b){function c(b){var c="";b.video&&(c=Gc(b.video.codecs)[0]);var d="";b.audio&&(d=Gc(b.audio.codecs)[0]);return c+"-"+d}var d=b.b.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=sf(d,b.c.preferredAudioChannelCount);var e=new Vb;d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=c(f);e.push(g,f)}var h=null,k=Infinity;e.forEach(function(b,c){for(var d=0,e=0,f=r(c),g=f.next();!g.done;g=f.next())d+=g.value.bandwidth||0,++e;d/=e;d<k&&(h=b,k=d)});b=r(b.b.periods);
  for(e=b.next();!e.done;e=b.next())e=e.value,e.variants=e.variants.filter(function(b){return c(b)==h?!0:!1})}function Vh(b){return new M(function(c,d){b.l&&b.l.segmentDownloaded(c,d)})}function Ji(b,c){return new og(b.a,b.b,b.c.streaming,c,function(){b.cb&&Uf(b.cb,!0);b.f&&gh(b.f);b.D&&Vi(b)},function(c){return b.dispatchEvent(c)})}
  function Ki(b){var c=new Xf(b.b);Yf(c,function(){Ri(b)});var d=new wg(b.Nb);Ag(d,function(c){ui(b,Wi,c)},function(c){ui(b,Xi,c)},function(c,d){d||(ui(b,Wi,c),ui(b,Xi,c))});var e=new Tf(b.a);e.a.add(c);e.a.add(d);return e}function Li(b,c){b.D=new Kf;b.D.a=Mf;Nf(b.D,c,Math.min(.5,c/2));ti(b);b.Jb=(new G(function(){Vi(b)})).Ca(.25)}
  function Vi(b){switch(b.j){case Ui:var c=b.a.ended?!0:Nd(b.a.buffered)>=b.a.duration-1;break;case Oi:a:if(b.a.ended||Oe(b.F))c=!0;else{if(b.b.presentationTimeline.U()){var d=b.b.presentationTimeline.Ea();if(Nd(b.a.buffered)>=d){c=!0;break a}}c=!1}break;default:c=!1}var e=Pd(b.a.buffered,b.a.currentTime);d=b.D;var f=c,g=d.b.get(d.a);c=d.a;e=f||e>=g?Lf:Mf;d.a=e;c!=e&&ti(b)}
  function Mi(b){return new Pg(b.b,{Oa:function(){return b.v.h()},getBandwidthEstimate:function(){return b.l.getBandwidthEstimate()},J:b.F,mb:b.N,pd:function(c){try{b.fb=!0;b.l.disable();Yi(b);var d=Ti(b,c.variants),e=tf(c.textStreams,b.W,b.$a)[0]||null;b.la&&(c.variants.includes(b.la)&&(d=b.la),b.la=null);b.$&&(c.textStreams.includes(b.$)&&(e=b.$),b.$=null);d&&Hi(b,c,d,!0);e&&Zi(b,c,e,!0);var f=b.f,g=f.b.get("video");if(g)var h=f.f.periods[g.ia];else{var k=f.b.get("audio");h=k?f.f.periods[k.ia]:null}var l=
  d?d.audio:null;if(!h&&e){var m;if(m=l){c=e;var n=bf(b.c.preferredTextLanguage),q=bf(l.language),t=bf(c.language);m=af(t,n)&&!af(q,t)}m&&(b.ab=!0);b.ab&&b.F.g.setTextVisibility(!0);var u=gi($i);aj(b,u)}var w=b.c.streaming.alwaysStreamText||b.Yb()?{variant:d,text:e}:{variant:d,text:null}}catch(C){ri(b,C),w={variant:null,text:null}}return w},od:function(){b.fb=!1;b.c.abr.enabled&&(b.l.enable(),Yi(b));b.la&&(ah(b.f,b.la,b.hd,b.gd),bj(b),b.la=null);b.$&&($g(b.f,b.$,!0,0,!1),cj(b),b.$=null)},onError:function(c){return ri(b,
  c)},onEvent:function(c){return b.dispatchEvent(c)},re:function(){b.w&&b.w.update&&b.w.update()},Dc:function(){b.v&&b.v.v();Vi(b)}})}
  T.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=Ih(b,c));b.manifest&&b.manifest.dash&&"defaultPresentationDelay"in b.manifest.dash&&(Td("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),b.manifest.defaultPresentationDelay=b.manifest.dash.defaultPresentationDelay,delete b.manifest.dash.defaultPresentationDelay);var d=Mh(this.c,b,Uh(this));dj(this);return d};T.prototype.configure=T.prototype.configure;
  function dj(b){if(b.w){var c=Xb(b.c.manifest);b.a&&"AUDIO"===b.a.nodeName&&(c.disableVideo=!0);b.w.configure(c)}b.h&&b.h.configure(b.c.drm);if(b.f){b.f.configure(b.c.streaming);try{for(var d=r(b.b.periods),e=d.next();!e.done;e=d.next())wi(b,e.value)}catch(g){ri(b,g)}d=Tg(b.f);e=Vg(b.f);c=Si(b);d=vf(d,e,c.variants);b.l&&d&&d.allowedByApplication&&d.allowedByKeySystem?Ti(b,c.variants):ej(b,c)}if(b.F&&(c=b.c.textDisplayFactory,b.kc!=c)){d=$d(c);e=b.F;var f=e.g;e.g=d;f&&(d.setTextVisibility(f.isTextVisible()),
  f.destroy());e.a&&(e.a.c=d);b.kc=c;b.f&&(c=b.f,(d=c.b.get("text"))&&$g(c,d.stream,!0,0,!0))}b.l&&(b.l.configure(b.c.abr),b.c.abr.enabled&&!b.fb?b.l.enable():b.l.disable(),Yi(b));b.D&&(c=b.c.streaming.rebufferingGoal,b.b&&(c=Math.max(c,b.b.minBufferTime)),Nf(b.D,c,Math.min(.5,c/2)))}T.prototype.getConfiguration=function(){var b=Uh(this);Mh(b,this.c,Uh(this));return b};T.prototype.getConfiguration=T.prototype.getConfiguration;
  T.prototype.Be=function(){for(var b in this.c)delete this.c[b];Mh(this.c,Uh(this),Uh(this));dj(this)};T.prototype.resetConfiguration=T.prototype.Be;T.prototype.Vd=function(){return this.j};T.prototype.getLoadMode=T.prototype.Vd;T.prototype.Zd=function(){return this.a};T.prototype.getMediaElement=T.prototype.Zd;T.prototype.xb=function(){return this.N};T.prototype.getNetworkingEngine=T.prototype.xb;T.prototype.nc=function(){return this.sb};T.prototype.getAssetUri=T.prototype.nc;
  T.prototype.dd=function(){return this.Ja?this.Ja:null};T.prototype.getAdManager=T.prototype.dd;T.prototype.U=function(){return this.b?this.b.presentationTimeline.U():this.a&&this.a.src?Infinity==this.a.duration:!1};T.prototype.isLive=T.prototype.U;T.prototype.Sa=function(){return this.b?this.b.presentationTimeline.Sa():!1};T.prototype.isInProgress=T.prototype.Sa;
  T.prototype.me=function(){if(this.b){if(!this.b.periods.length)return!1;var b=this.b.periods[0].variants;return b.length?!b[0].video:!1}return this.a&&this.a.src?this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight:!1};T.prototype.isAudioOnly=T.prototype.me;T.prototype.De=function(){if(this.b){var b=this.b.presentationTimeline;return{start:b.kb(),end:b.ya()}}return this.a&&this.a.src&&(b=this.a.seekable,b.length)?{start:b.start(0),end:b.end(b.length-1)}:{start:0,end:0}};
  T.prototype.seekRange=T.prototype.De;T.prototype.keySystem=function(){return wd(this.drmInfo())};T.prototype.keySystem=T.prototype.keySystem;T.prototype.drmInfo=function(){return this.h?this.h.a:null};T.prototype.drmInfo=T.prototype.drmInfo;T.prototype.wb=function(){return this.h?this.h.wb():Infinity};T.prototype.getExpiration=T.prototype.wb;T.prototype.tc=function(){return this.D?this.D.a==Mf:!1};T.prototype.isBuffering=T.prototype.tc;
  T.prototype.ae=function(){if(this.L){var b=this.L;b=b.f?0:b.b}else b=0;return b};T.prototype.getPlaybackRate=T.prototype.ae;T.prototype.Me=function(b){0==b?ab("A trick play rate of 0 is unsupported!"):(this.a.paused&&this.a.play(),this.L.set(b),this.j==Oi&&(this.l.playbackRateChanged(b),Zg(this.f,1<Math.abs(b))))};T.prototype.trickPlay=T.prototype.Me;T.prototype.Kd=function(){this.j==Ui&&this.L.set(1);this.j==Oi&&(this.L.set(1),this.l.playbackRateChanged(1),Zg(this.f,!1))};
  T.prototype.cancelTrickPlay=T.prototype.Kd;T.prototype.qc=function(){if(this.b&&this.v){for(var b=fj(this),c=[],d=r(gj(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=lf(e);f.active=e==b;c.push(f)}return c}return this.a&&this.a.audioTracks?Array.from(this.a.audioTracks).map(function(b){var c=pf(b);c.active=b.enabled;c.type="variant";c.originalAudioId=b.id;"main"==b.kind?(c.primary=!0,c.roles=["main"],c.audioRoles=["main"]):c.audioRoles=[];return c}):[]};T.prototype.getVariantTracks=T.prototype.qc;
  T.prototype.Vb=function(){if(this.b&&this.v){for(var b=hj(this),c=[],d=r(ij(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=mf(e);f.active=e==b;c.push(f)}return c}return this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).map(function(b){var c=pf(b);c.active="disabled"!=b.mode;c.type="text";c.originalTextId=b.id;"captions"==b.kind&&(c.mimeType="application/cea-608");return c}):[]};T.prototype.getTextTracks=T.prototype.Vb;
  T.prototype.vd=function(b){if(this.b&&this.f){var c=Si(this),d=c.textStreams.find(function(c){return c.id==b.id});d&&(Zi(this,c,d,!1),jj(this,d),this.W=d.language)}else if(this.a&&this.a.src&&this.a.textTracks){c=Array.from(this.a.textTracks);c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,nf(d)==b.id?d.mode=this.ab?"showing":"hidden":d.mode="disabled";cj(this)}};T.prototype.selectTextTrack=T.prototype.vd;
  T.prototype.Ge=function(b,c,d){d=void 0===d?0:d;if(this.b&&this.f){var e=Si(this);this.c.abr.enabled&&ab("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var f=e.variants.find(function(c){return c.id==b.id});f&&qf(f)&&(Hi(this,e,f,!1),kj(this,f,c,d),this.tb=new Ff(f),Ti(this,e.variants))}else if(this.a&&this.a.audioTracks){c=Array.from(this.a.audioTracks);c=r(c);for(d=c.next();!d.done;d=
  c.next())d=d.value,nf(d)==b.id&&(d.enabled=!0);bj(this)}};T.prototype.selectVariantTrack=T.prototype.Ge;T.prototype.Rd=function(){return lj(this.qc())};T.prototype.getAudioLanguagesAndRoles=T.prototype.Rd;T.prototype.je=function(){return lj(this.Vb())};T.prototype.getTextLanguagesAndRoles=T.prototype.je;T.prototype.Qd=function(){return Array.from(mj(this.qc()))};T.prototype.getAudioLanguages=T.prototype.Qd;T.prototype.ie=function(){return Array.from(mj(this.Vb()))};T.prototype.getTextLanguages=T.prototype.ie;
  T.prototype.Ee=function(b,c){if(this.b&&this.v){var d=Si(this);this.tb=new Gf(b,c||"",0,"","audio");nj(this,d)}else if(this.a&&this.a.audioTracks){d=Array.from(this.a.audioTracks);d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.language==b&&(e.enabled=!0);bj(this)}};T.prototype.selectAudioLanguage=T.prototype.Ee;
  T.prototype.Fe=function(b,c){if(this.b&&this.v){var d=Si(this);this.W=b;this.$a=c||"";var e=tf(d.textStreams,this.W,this.$a)[0]||null;e&&(Zi(this,d,e,!1),(this.c.streaming.alwaysStreamText||this.Yb())&&jj(this,e))}else(d=this.Vb().filter(function(c){return c.language==b})[0])&&this.vd(d)};T.prototype.selectTextLanguage=T.prototype.Fe;
  T.prototype.He=function(b){if(this.b&&this.v){for(var c=Si(this),d=null,e=r(gj(this)),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==b){d=f;break}null!=d&&(this.tb=new Gf(d.language,"",0,b),nj(this,c))}};T.prototype.selectVariantsByLabel=T.prototype.He;T.prototype.Yb=function(){var b=this.ab;return this.F?this.F.g.isTextVisible():this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).some(function(b){return"showing"==b.mode}):b};T.prototype.isTextTrackVisible=T.prototype.Yb;
  T.prototype.Je=function(b){var c=this;return v(function e(){var f,g,h,k,l,m;return B(e,function(e){switch(e.i){case 1:f=c.ab;g=!!b;if(f==g)return e["return"]();c.ab=g;if(c.j!=Oi){if(c.a&&c.a.src&&c.a.textTracks){h=Array.from(c.a.textTracks);for(var n=r(h),t=n.next();!t.done;t=n.next())k=t.value,"disabled"!=k.mode&&(k.mode=g?"showing":"hidden")}e.u(2);break}c.F.g.setTextVisibility(g);if(c.c.streaming.alwaysStreamText){e.u(2);break}if(!g){n=c.f;n.v=!0;if(t=n.b.get("text"))Qg(t),n.b["delete"]("text");
  e.u(2);break}l=Si(c);m=tf(l.textStreams,c.W,c.$a);if(!(0<m.length)){e.u(2);break}return x(e,Wg(c.f,m[0]),2);case 2:n=gi($i),aj(c,n),y(e)}})})};T.prototype.setTextTrackVisibility=T.prototype.Je;T.prototype.ce=function(){if(!this.U())return null;if(this.b)return new Date(1E3*(this.b.presentationTimeline.f+this.a.currentTime));if(this.a&&this.a.getStartDate){var b=this.a.getStartDate();return isNaN(b.getTime())?null:new Date(b.getTime()+1E3*this.a.currentTime)}return null};
  T.prototype.getPlayheadTimeAsDate=T.prototype.ce;T.prototype.fe=function(){if(!this.U())return null;if(this.b)return new Date(1E3*this.b.presentationTimeline.f);if(this.a&&this.a.getStartDate){var b=this.a.getStartDate();return isNaN(b.getTime())?null:b}return null};T.prototype.getPresentationStartTimeAsDate=T.prototype.fe;T.prototype.Tb=function(){if(this.j==Oi)return this.F.Tb();var b={total:[],audio:[],video:[],text:[]};this.j==Ui&&(b.total=Qd(this.a.buffered));return b};
  T.prototype.getBufferedInfo=T.prototype.Tb;
  T.prototype.getStats=function(){if(this.j!=Oi&&this.j!=Ui)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,switchHistory:[],stateHistory:[]};Di(this);var b=this.a;if(b.getVideoPlaybackQuality){b=b.getVideoPlaybackQuality();var c=this.m,d=Number(b.totalVideoFrames);c.D=Number(b.droppedVideoFrames);c.w=d;
  this.m.v=Number(b.corruptedVideoFrames)}this.h?(b=this.h,b=b.L?b.L:NaN):b=NaN;this.m.m=b;if(this.j==Oi){if(b=fj(this))this.m.h=(this.L?this.L.b:1)*b.bandwidth;b&&b.video&&(c=this.m,d=b.video.height||NaN,c.F=b.video.width||NaN,c.j=d);b=this.l.getBandwidthEstimate();this.m.g=b}var e=this.m;b=e.F;c=e.j;d=e.h;var f=e.w,g=e.D,h=e.v,k=e.g,l=e.c,m=e.l,n=e.b,q=Ph(e.a,"playing"),t=Ph(e.a,"paused"),u=Ph(e.a,"buffering"),w=e.m,C=Qh(e.a),E=[];e=r(e.f.a);for(var D=e.next();!D.done;D=e.next())D=D.value,E.push({timestamp:D.timestamp,
  id:D.id,type:D.type,fromAdaptation:D.fromAdaptation,bandwidth:D.bandwidth});return{width:b,height:c,streamBandwidth:d,decodedFrames:f,droppedFrames:g,corruptedFrames:h,estimatedBandwidth:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:q,pauseTime:t,bufferingTime:u,licenseTime:w,stateHistory:C,switchHistory:E}};T.prototype.getStats=T.prototype.getStats;
  T.prototype.addTextTrack=function(b,c,d,e,f,g){var h=this;return v(function l(){var m,n,q,t,u,w,C,E;return B(l,function(l){switch(l.i){case 1:if(h.j==Ui)throw Error("State error!");if(h.j!=Oi)throw Error("State error!");m=Si(h);n=ce;q=h.b.periods.indexOf(m);t=q+1;u=t>=h.b.periods.length?h.b.presentationTimeline.getDuration():h.b.periods[t].startTime;w=u-m.startTime;if(Infinity==w)throw new I(1,4,4033);C={id:h.jd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Eg(m.startTime,
  w,[b]),mimeType:e,codecs:f||"",kind:d,encrypted:!1,keyId:null,language:c,label:g||null,type:n.X,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null};h.Lb.add(C);m.textStreams.push(C);return x(l,Wg(h.f,C),2);case 2:return(E=Ug(h.f,"text"))&&yf(h.V,m,E),h.Lb["delete"](C),ej(h,m),Ri(h),l["return"](mf(C))}})})};T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.Nc=function(b,c){this.Hb.width=b;this.Hb.height=c};
  T.prototype.setMaxHardwareResolution=T.prototype.Nc;T.prototype.Kc=function(){if(this.j==Oi){var b=this.f;if(b.c.a)b=!1;else if(b.j)b=!1;else{for(var c=r(b.b.values()),d=c.next();!d.done;d=c.next())d=d.value,d.zb&&(d.zb=!1,Yg(b,d,.1));b=!0}}else b=!1;return b};T.prototype.retryStreaming=T.prototype.Kc;T.prototype.Wd=function(){return this.b};T.prototype.getManifest=T.prototype.Wd;T.prototype.Xd=function(){return this.Mb};T.prototype.getManifestParserFactory=T.prototype.Xd;
  function Hi(b,c,d,e){zf(b.V,c).variant=d;b=b.m.f;b.c!=d&&(b.c=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"variant",fromAdaptation:e,bandwidth:d.bandwidth}))}function Zi(b,c,d,e){yf(b.V,c,d);b=b.m.f;b.b!=d&&(b.b=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"text",fromAdaptation:e,bandwidth:null}))}
  function Uh(b){var c=Kh();c.streaming.failureCallback=function(c){var d=[1001,1002,1003];b.U()&&d.includes(c.code)&&(c.severity=1,b.Kc())};c.textDisplayFactory=function(){return new Dh(b.a)};return c}
  function Fi(b,c){for(var d=r(c),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=new Map,g=r(e.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.video&&h.video.closedCaptions){h=h.video;for(var k=r(h.closedCaptions.keys()),l=k.next();!l.done;l=k.next())if(l=l.value,!f.has(l)){var m={id:b.jd++,originalId:l,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"application/cea-608",codecs:"",kind:"caption",encrypted:!1,keyId:null,language:h.closedCaptions.get(l),
  label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:h.roles,channelsCount:null,audioSamplingRate:null,closedCaptions:null};f.set(l,m)}}f=r(f.values());for(g=f.next();!g.done;g=f.next())e.textStreams.push(g.value)}}
  function xi(b,c){for(var d=b.f?Tg(b.f):null,e=b.f?Vg(b.f):null,f=r(c),g=f.next();!g.done;g=f.next())jf(b.h,d,e,g.value);g=ac(c,function(b){return b.variants.some(qf)});if(0==g)throw new I(J,4,4032);if(g<c.length)throw new I(J,4,4011);d=r(c);for(g=d.next();!g.done;g=d.next())g=g.value,hf(g.variants,b.c.restrictions,b.Hb)&&b.f&&Si(b)==g&&Ri(b),oj(b,g.variants)}
  function wi(b,c){var d=b.f?Tg(b.f):null,e=b.f?Vg(b.f):null;jf(b.h,d,e,c);e=c.variants;if(!e.some(qf))throw new I(J,4,4011);oj(b,c.variants);hf(e,b.c.restrictions,b.Hb)&&b.f&&Si(b)==c&&Ri(b);if(d=b.h?b.h.a:null){e=r(e);for(var f=e.next();!f.done;f=e.next()){f=r(f.value.drmInfos);for(var g=f.next();!g.done;g=f.next())if(g=g.value,g.keySystem==d.keySystem){g=r(g.initData||[]);for(var h=g.next();!h.done;h=g.next())h=h.value,sd(b.h,h.initDataType,h.initData)}}}}
  function kj(b,c,d,e){d=void 0===d?!1:d;e=void 0===e?0:e;if(b.fb)return b.la=c,b.hd=d,b.gd=e,!0;(c=ah(b.f,c,d,e))&&bj(b);return c}function jj(b,c){if(b.fb)return b.$=c,!0;var d=$g(b.f,c,!0,0,!1);d&&cj(b);return d}function Qi(b,c){function d(b,c){if(!b)return null;fa();ia();var d=b.segmentIndex[Symbol.iterator]().seek(c-g.startTime);return d?d.startTime+g.startTime:null}var e=Tg(b.f),f=Vg(b.f),g=Si(b);e=d(e,c);f=d(f,c);return null!=f&&null!=e?Math.max(f,e):null!=f?f:null!=e?e:c}
  function ti(b){var c=b.tc();if(b.m&&b.D&&b.v){var d=b.L;d.f=c;$f(d);Di(b)}b.dispatchEvent(gi(pj,{buffering:c}))}function Di(b){if(b.m&&b.D){var c=b.m.a;b.D.a==Mf?Oh(c,"buffering"):b.a.paused?Oh(c,"paused"):b.a.ended?Oh(c,"ended"):Oh(c,"playing")}}function Ti(b,c){try{oj(b,c)}catch(e){return ri(b,e),null}var d=c.filter(function(b){return qf(b)});d=b.tb.create(d);b.l.setVariants(Array.from(d.values()));return b.l.chooseVariant()}
  function ej(b,c){var d=nj(b,c,!1),e=tf(c.textStreams,b.W,b.$a)[0]||null,f=!1;e&&(b.c.streaming.alwaysStreamText||b.Yb())&&(Zi(b,c,e,!0),f=jj(b,e));(d||f)&&Ii(b)}function nj(b,c,d){d=void 0===d?!0:d;var e=Ti(b,c.variants),f=!1;e&&(Hi(b,c,e,!0),f=kj(b,e,!0));d&&f&&Ii(b);return f}function Ii(b){var c=gi(qj);aj(b,c)}function Ri(b){var c=gi(rj);aj(b,c)}function bj(b){var c=gi(sj);aj(b,c)}function cj(b){var c=gi(tj);aj(b,c)}function Yi(b){var c=gi(uj,{tf:b.c.abr.enabled});aj(b,c)}
  function ri(b,c){if(b.j!=ji){var d=gi(vj,{detail:c});b.dispatchEvent(d);d.defaultPrevented&&(c.handled=!0)}}function ui(b,c,d){b.dispatchEvent(gi(c,{detail:{schemeIdUri:d.schemeIdUri,value:d.value,startTime:d.startTime,endTime:d.endTime,id:d.id,eventElement:d.eventElement}}))}function qi(b){if(!b.a.error)return null;var c=b.a.error.code;if(1==c)return null;var d=b.a.error.msExtendedCode;d&&(0>d&&(d+=Math.pow(2,32)),d=d.toString(16));return new I(J,3,3016,c,d,b.a.error.message)}
  function Ai(b,c){if(b.f){var d=wj,e=Si(b),f=!1,g=Object.keys(c),h=1==g.length&&"00"==g[0];if(g.length){g=r(b.b.periods);for(var k=g.next();!k.done;k=g.next()){k=r(k.value.variants);for(var l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=r(m);for(var n=m.next();!n.done;n=m.next()){var q=n.value;n=l.allowedByKeySystem;q.keyId&&(q=c[h?"00":q.keyId],l.allowedByKeySystem=!!q&&!d.includes(q));n!=l.allowedByKeySystem&&(f=!0)}}}}d=Tg(b.f);h=Vg(b.f);(d=
  vf(d,h,e.variants))&&!d.allowedByKeySystem&&nj(b,e);f&&(Ri(b),Ti(b,e.variants))}}function Bi(b,c,d){if(b.w&&b.w.onExpirationUpdated)b.w.onExpirationUpdated(c,d);c=gi(xj);b.dispatchEvent(c)}function Gi(b,c,d){0<c&&(b.U()||b.xd(c));c=b.getDuration();d<c&&(b.U()||b.va(d))}
  function oj(b,c){var d=wj,e=b.h?Bc(b.h.V):{},f=Object.keys(e);f=f.length&&"00"==f[0];for(var g=!1,h=!1,k=[],l=[],m=r(c),n=m.next();!n.done;n=m.next()){n=n.value;var q=[];n.audio&&q.push(n.audio);n.video&&q.push(n.video);q=r(q);for(var t=q.next();!t.done;t=q.next())if(t=t.value,t.keyId){var u=e[f?"00":t.keyId];u?d.includes(u)&&(l.includes(u)||l.push(u)):k.includes(t.keyId)||k.push(t.keyId)}n.allowedByApplication?n.allowedByKeySystem&&(g=!0):h=!0}if(!g)throw new I(J,4,4012,{hasAppRestrictions:h,missingKeys:k,
  restrictedKeyStatuses:l});}function aj(b,c){v(function e(){return B(e,function(e){switch(e.i){case 1:return x(e,Promise.resolve(),2);case 2:b.j!=ji&&b.dispatchEvent(c),y(e)}})})}function mj(b){var c=new Set;b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.language?c.add(bf(d.language)):c.add("und");return c}
  function lj(b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d="und";var f=[];e.language&&(d=bf(e.language));"variant"==e.type?f=e.audioRoles:f=e.roles;f&&f.length||(f=[""]);c.has(d)||c.set(d,new Set);e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,c.get(d).add(f)}var g=[];c.forEach(function(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())g.push({language:c,role:e.value})});return g}
  function gj(b){b=Si(b);return null==b?[]:b.variants.filter(function(b){return qf(b)})}function ij(b){var c=Si(b);return null==c?[]:c.textStreams.filter(function(c){return!b.Lb.has(c)})}function Si(b){var c=b.v.h(),d=null;b=r(b.b.periods);for(var e=b.next();!e.done;e=b.next())e=e.value,e.startTime<=c&&(d=e);return d}function fj(b){var c=Si(b);return zf(b.V,c).variant}
  function hj(b){var c=Si(b);if(null==c)return null;if(!zf(b.V,c).text){var d=tf(c.textStreams,b.W,b.$a);d.length&&yf(b.V,c,d[0])}return zf(b.V,c).text}function li(){return new I(J,Fb,7E3)}function fi(b,c,d,e,f,g){return e==b&&f.A==g.A&&f.uri==g.uri&&f.mimeType==g.mimeType?c:d}function xh(){return{A:null,mimeType:null,startTime:null,Qc:null,uri:null}}
  function mi(b){return new Promise(function(c,d){b.Ta=function(){return d(li())};b.$b=function(){return c()};b.onError=function(b){return d(b)};b.bc=function(){return d(li())}})}
  var uj="abrstatuschanged",qj="adaptation",pj="buffering",Ci="drmsessionupdate",th="emsg",vj="error",xj="expirationupdated",pi="loaded",ni="loading",yi="manifestparsed",hi="onstatechange",ii="onstateidle",Ei="ratechange",Pi="streaming",tj="textchanged",$i="texttrackvisibility",vi="timelineregionadded",Wi="timelineregionenter",Xi="timelineregionexit",rj="trackschanged",si="unloading",sj="variantchanged",yj={Se:uj,Te:qj,Ve:pj,We:Ci,Xe:th,Error:vj,Ye:xj,af:"largegap",bf:pi,cf:ni,df:yi,ef:hi,ff:ii,gf:Ei,
  hf:Pi,jf:tj,kf:$i,lf:vi,mf:Wi,nf:Xi,pf:rj,qf:si,rf:sj},ji=0,Th=1,Oi=2,Ui=3;T.LoadMode={DESTROYED:ji,NOT_LOADED:Th,MEDIA_SOURCE:Oi,SRC_EQUALS:Ui};T.version="v2.5.10-master-6-gfda84c03";var zj=["2","5"];Ud=new function(b){this.a=b;this.c=Vd;this.b=Wd}(new Sd(Number(zj[0]),Number(zj[1])));var wj=["output-restricted","internal-error"],ki={},Wh=null;function Aj(){this.c=this.a=this.b=0};function U(b,c){var d=this;this.b=b;this.a=c;this.c=!1;this.g=this.a.getVolume();this.f=new O;this.f.s(this.a,google.ima.AdEvent.Type.PAUSED,function(){d.c=!0});this.f.s(this.a,google.ima.AdEvent.Type.RESUMED,function(){d.c=!1})}F("shaka.ads.ClientSideAd",U);U.prototype.getDuration=function(){return this.b.getDuration()};U.prototype.getDuration=U.prototype.getDuration;U.prototype.getRemainingTime=function(){return this.a.getRemainingTime()};U.prototype.getRemainingTime=U.prototype.getRemainingTime;
  U.prototype.isPaused=function(){return this.c};U.prototype.isPaused=U.prototype.isPaused;U.prototype.isSkippable=function(){return 0<=this.b.getSkipTimeOffset()};U.prototype.isSkippable=U.prototype.isSkippable;U.prototype.getTimeUntilSkippable=function(){var b=this.b.getSkipTimeOffset();b=this.getRemainingTime()-b;return Math.max(b,0)};U.prototype.getTimeUntilSkippable=U.prototype.getTimeUntilSkippable;U.prototype.canSkipNow=function(){return this.a.getAdSkippableState()};U.prototype.canSkipNow=U.prototype.canSkipNow;
  U.prototype.skip=function(){return this.a.skip()};U.prototype.skip=U.prototype.skip;U.prototype.pause=function(){return this.a.pause()};U.prototype.pause=U.prototype.pause;U.prototype.play=function(){return this.a.resume()};U.prototype.play=U.prototype.play;U.prototype.getVolume=function(){return this.a.getVolume()};U.prototype.getVolume=U.prototype.getVolume;U.prototype.setVolume=function(b){return this.a.setVolume(b)};U.prototype.setVolume=U.prototype.setVolume;
  U.prototype.isMuted=function(){return 0==this.a.getVolume()};U.prototype.isMuted=U.prototype.isMuted;U.prototype.resize=function(b,c){this.a.resize(b,c,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};U.prototype.resize=U.prototype.resize;U.prototype.setMuted=function(b){b?(this.g=this.getVolume(),this.setVolume(0)):this.setVolume(this.g)};U.prototype.setMuted=U.prototype.setMuted;
  U.prototype.getSequenceLength=function(){var b=this.b.getAdPodInfo();return null==b?1:b.getTotalAds()};U.prototype.getSequenceLength=U.prototype.getSequenceLength;U.prototype.getPositionInSequence=function(){var b=this.b.getAdPodInfo();return null==b?1:b.getAdPosition()};U.prototype.getPositionInSequence=U.prototype.getPositionInSequence;U.prototype.release=function(){this.a=this.b=null};U.prototype.release=U.prototype.release;function Bj(b,c,d){var e=this;this.j=b;this.f=c;this.c=d;this.h=null;this.b=new O;b=new google.ima.AdDisplayContainer(this.j,this.f);b.initialize();this.g=new google.ima.AdsLoader(b);this.g.getSettings().setPlayerType("shaka-player");this.g.getSettings().setPlayerVersion("v2.5.10-master-6-gfda84c03");this.a=null;this.b.ca(this.g,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(b){Cj(e,b)});this.b.s(this.g,google.ima.AdEvent.Type.AD_ERROR,function(b){Dj(e,b)});this.f.onended=function(){e.g.contentComplete()}}
  Bj.prototype.stop=function(){this.a.stop()};function Dj(b,c){c.getError();Ej(b);b.c(new L("ad-cue-points-changed",{cuepoints:[]}))}
  function Cj(b,c){b.a=c.getAdsManager(b.f);var d=b.a.getCuePoints();if(d.length){var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next())e.push(new Fj(f.value));b.c(new L("ad-cue-points-changed",{cuepoints:e}))}b.b.s(b.a,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Dj(b,c)});b.b.s(b.a,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Gj(b,c)});b.b.s(b.a,google.ima.AdEvent.Type.STARTED,function(c){Gj(b,c)});b.b.s(b.a,google.ima.AdEvent.Type.FIRST_QUARTILE,function(){b.c(new L("ad-first-quartile"))});
  b.b.s(b.a,google.ima.AdEvent.Type.MIDPOINT,function(){b.c(new L("ad-midpoint"))});b.b.s(b.a,google.ima.AdEvent.Type.THIRD_QUARTILE,function(){b.c(new L("ad-third-quartile"))});b.b.s(b.a,google.ima.AdEvent.Type.COMPLETE,function(){b.c(new L("ad-complete"))});b.b.s(b.a,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(){Ej(b)});b.b.s(b.a,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(){Ej(b)});b.b.s(b.a,google.ima.AdEvent.Type.SKIPPED,function(){b.c(new L("ad-skipped"))});b.b.s(b.a,google.ima.AdEvent.Type.VOLUME_CHANGED,
  function(){b.c(new L("ad-volume-changed"))});b.b.s(b.a,google.ima.AdEvent.Type.VOLUME_MUTED,function(){b.c(new L("ad-muted"))});b.b.s(b.a,google.ima.AdEvent.Type.PAUSED,function(){b.h.c=!0;b.c(new L("ad-paused"))});b.b.s(b.a,google.ima.AdEvent.Type.RESUMED,function(){b.h.c=!1;b.c(new L("ad-resumed"))});b.b.s(b.a,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(){b.c(new L("ad-skip-state-changed"))});try{b.a.init(b.f.offsetWidth,b.f.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:
  google.ima.ViewMode.NORMAL),b.b.s(b.f,"loadeddata",function(){b.a.resize(b.f.offsetWidth,b.f.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),b.a.start()}catch(g){Ej(b)}}function Gj(b,c){var d=c.getAd();b.h=new U(d,b.a);b.c(new L("ad-started",{ad:b.h}));b.j.setAttribute("ad-active","true");b.f.pause()}function Ej(b){b.c(new L("ad-stopped"));b.j.removeAttribute("ad-active");b.f.play()};function V(b,c){this.c=b;this.b=null;this.a=c}F("shaka.ads.ServerSideAd",V);V.prototype.getDuration=function(){return this.b?this.b.duration:-1};V.prototype.getDuration=V.prototype.getDuration;V.prototype.getRemainingTime=function(){return this.b?this.b.duration-this.b.currentTime:-1};V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.isPaused=function(){return this.a.paused};V.prototype.isPaused=V.prototype.isPaused;V.prototype.isSkippable=function(){return this.c.isSkippable()};
  V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.getTimeUntilSkippable=function(){var b=this.c.getSkipTimeOffset();b=this.getRemainingTime()-b;return Math.max(b,0)};V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.skip=function(){this.a.currentTime+=this.getRemainingTime()};V.prototype.skip=V.prototype.skip;V.prototype.pause=function(){return this.a.pause()};
  V.prototype.pause=V.prototype.pause;V.prototype.play=function(){return this.a.play()};V.prototype.play=V.prototype.play;V.prototype.getVolume=function(){return this.a.volume};V.prototype.getVolume=V.prototype.getVolume;V.prototype.setVolume=function(b){this.a.volume=b};V.prototype.setVolume=V.prototype.setVolume;V.prototype.isMuted=function(){return this.a.muted};V.prototype.isMuted=V.prototype.isMuted;V.prototype.resize=function(){};V.prototype.resize=V.prototype.resize;
  V.prototype.setMuted=function(b){this.a.muted=b};V.prototype.setMuted=V.prototype.setMuted;V.prototype.getSequenceLength=function(){var b=this.c.getAdPodInfo();return null==b?1:b.getTotalAds()};V.prototype.getSequenceLength=V.prototype.getSequenceLength;V.prototype.getPositionInSequence=function(){var b=this.c.getAdPodInfo();return null==b?1:b.getAdPosition()};V.prototype.getPositionInSequence=V.prototype.getPositionInSequence;V.prototype.release=function(){this.a=this.b=this.c=null};
  V.prototype.release=V.prototype.release;function Hj(b,c,d){var e=this;this.m=b;this.f=c;this.g=null;this.c=d;this.w=!1;this.v=this.h=this.j=null;this.l="";this.b=new O;this.a=new google.ima.dai.api.StreamManager(this.f);this.a.setClickElement(this.m);this.b.s(this.f.textTracks,"addtrack",function(b){var c=b.track;"metadata"==c.kind&&(c.mode="hidden",c.addEventListener("cuechange",function(){for(var b=r(c.activeCues),d=b.next();!d.done;d=b.next()){d=d.value;var f={};f[d.value.key]=d.value.data;e.a.onTimedMetadata(f)}}))});this.b.s(this.a,
  google.ima.dai.api.StreamEvent.Type.LOADED,function(b){Ij(e,b)});this.b.s(this.a,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.l.length?e.g.resolve(e.l):e.g.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.g=null});this.b.s(this.a,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.b.s(this.a,google.ima.dai.api.StreamEvent.Type.STARTED,function(b){b=b.getAd();e.h=new V(b,e.f);e.v&&(e.h.b=e.v);e.c(new L("ad-started",{ad:e.h}));
  e.m.setAttribute("ad-active","true");e.f.pause()});this.b.s(this.a,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.m.removeAttribute("ad-active");var b=e.f.currentTime;e.j&&e.j>b&&(e.f.currentTime=e.j,e.j=null)});this.b.s(this.a,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(b){e.v=b.getStreamData().adProgressData;e.h&&(e.h.b=e.v)});this.b.s(this.a,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.c(new L("ad-first-quartile"))});this.b.s(this.a,google.ima.dai.api.StreamEvent.Type.MIDPOINT,
  function(){e.c(new L("ad-midpoint"))});this.b.s(this.a,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.c(new L("ad-third-quartile"))});this.b.s(this.a,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.c(new L("ad-complete"));e.c(new L("ad-stopped"));e.m.removeAttribute("ad-active");e.h=null});this.b.s(this.a,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.c(new L("ad-skipped"));e.c(new L("ad-stopped"))});this.b.s(this.a,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,
  function(b){var c=b.getStreamData();b=[];c=r(c.cuepoints);for(var d=c.next();!d.done;d=c.next())d=d.value,b.push(new Fj(d.start,d.end));e.c(new L("ad-cue-points-changed",{cuepoints:b}))})}Hj.prototype.stop=function(){this.a.reset();this.l="";this.j=null};Hj.prototype.onTimedMetadata=function(b){if("urn:google:dai:2018"==b.schemeIdUri){var c=b.schemeIdUri,d=b.eventElement?b.eventElement.getAttribute("messageData"):null;this.a.processMetadata(c,d,b.startTime)}};
  function Ij(b,c){var d=c.getStreamData().url;b.g.resolve(d);b.g=null;b.w||b.b.s(b.f,"seeked",function(){var c=b.f.currentTime;if(0!=c){b.a.streamTimeForContentTime(c);var d=b.a.previousCuePointForStreamTime(c);d&&!d.played&&(b.j=c,b.f.currentTime=d.start)}})};function W(){Wb.call(this);this.b=this.c=null;this.a=new Aj}za(W,Wb);F("shaka.ads.AdManager",W);W.prototype.initClientSide=function(b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new I(J,10,1E4);this.c=new Bj(b,c,function(b){if(b&&b.type)switch(b.type){case "ad-started":d.a.b++;break;case "ad-complete":d.a.a++;break;case "ad-skipped":d.a.c++}d.dispatchEvent(b)})};W.prototype.initClientSide=W.prototype.initClientSide;
  W.prototype.onAssetUnload=function(){this.c&&this.c.stop();this.dispatchEvent(new L("ad-stopped"));this.a=new Aj};W.prototype.onAssetUnload=W.prototype.onAssetUnload;W.prototype.requestClientSideAds=function(b){if(!this.c)throw new I(1,10,10001);this.c.g.requestAds(b)};W.prototype.requestClientSideAds=W.prototype.requestClientSideAds;
  W.prototype.initServerSide=function(b,c){var d=this;if(!window.google||!google.ima||!google.ima.dai)throw new I(J,10,10002);this.b=new Hj(b,c,function(b){if(b&&b.type)switch(b.type){case "ad-started":d.a.b++;break;case "ad-complete":d.a.a++;break;case "ad-skipped":d.a.c++}d.dispatchEvent(b)})};W.prototype.initServerSide=W.prototype.initServerSide;
  W.prototype.requestServerSideStream=function(b,c){if(!this.b)throw new I(1,10,10003);var d=this.b;var e=void 0===c?"":c;d.g?d=Promise.reject(new I(1,10,10004)):(b instanceof google.ima.dai.api.LiveStreamRequest&&(d.w=!0),d.g=new Hb,d.a.requestStream(b),d.l=e||"",d=d.g);return d};W.prototype.requestServerSideStream=W.prototype.requestServerSideStream;W.prototype.replaceServerSideAdTagParameters=function(b){if(!this.b)throw new I(1,10,10003);this.b.a.replaceAdTagParameters(b)};
  W.prototype.replaceServerSideAdTagParameters=W.prototype.replaceServerSideAdTagParameters;W.prototype.getStats=function(){var b=this.a;return{started:b.b,playedCompletely:b.a,skipped:b.c}};W.prototype.getStats=W.prototype.getStats;W.prototype.onTimedMetadata=function(b){if(this.b)this.b.onTimedMetadata(b)};W.prototype.onTimedMetadata=W.prototype.onTimedMetadata;function Fj(b,c){this.start=b;this.end=void 0===c?null:c}W.AD_STARTED="ad-started";W.AD_FIRST_QUARTILE="ad-first-quartile";
  W.AD_MIDPOINT="ad-midpoint";W.AD_THIRD_QUARTILE="ad-third-quartile";W.AD_COMPLETE="ad-complete";W.AD_STOPPED="ad-stopped";W.AD_SKIPPED="ad-skipped";W.AD_VOLUME_CHANGED="ad-volume-changed";W.AD_MUTED="ad-muted";W.AD_PAUSED="ad-paused";W.AD_RESUMED="ad-resumed";W.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";W.CUEPOINTS_CHANGED="ad-cue-points-changed";Wh=function(){return new W};function Jj(b){return JSON.stringify(b,function(b,d){if("function"!=typeof d){if(d instanceof Event||d instanceof L){var c={};for(g in d){var f=d[g];f&&"object"==typeof f?"detail"==g&&(c[g]=f):g in Event||(c[g]=f)}return c}if(d instanceof TimeRanges){c={__type__:"TimeRanges",length:d.length,start:[],end:[]};var g=r(Qd(d));for(f=g.next();!f.done;f=g.next()){f=f.value;var h=f.end;c.start.push(f.start);c.end.push(h)}}else c=d instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(d)}:"number"==
  typeof d?isNaN(d)?"NaN":isFinite(d)?d:0>d?"-Infinity":"Infinity":d;return c}})}function Kj(b){return JSON.parse(b,function(b,d){return"NaN"==d?NaN:"-Infinity"==d?-Infinity:"Infinity"==d?Infinity:d&&"object"==typeof d&&"TimeRanges"==d.__type__?Lj(d):d&&"object"==typeof d&&"Uint8Array"==d.__type__?new Uint8Array(d.entries):d})}function Lj(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}}
  var Mj="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Nj="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Oj=["loop","playbackRate"],Pj=["pause","play"],Qj={getAssetUri:2,getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,
  isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Rj={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Sj=[["getConfiguration","configure"]],Tj=[["isTextTrackVisible","setTextTrackVisibility"]],Uj="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),Vj=["attach","detach","load",
  "unload"];function Wj(b,c,d,e,f,g){var h=this;this.N=b;this.f=new G(c);this.P=d;this.l=!1;this.H=e;this.L=f;this.D=g;this.b=this.h=!1;this.F="";this.j=null;this.m=function(){return Xj(h)};this.v=function(b,c){var d=Kj(c);switch(d.type){case "event":var e=d.targetName;d=d.event;d=new L(d.type,d);h.H(e,d);break;case "update":e=d.update;for(var f in e){d=h.a[f]||{};for(var g in e[f])d[g]=e[f][g]}h.l&&(h.P(),h.l=!1);break;case "asyncComplete":if(f=d.id,d=d.error,g=h.c[f],delete h.c[f],g)if(d){f=new I(d.severity,
  d.category,d.code);for(e in d)f[e]=d[e];g.reject(f)}else g.resolve()}};this.a={video:{},player:{}};this.w=0;this.c={};this.g=null;Yj.add(this)}p=Wj.prototype;p.destroy=function(){Yj["delete"](this);Zj(this);ak&&bk(this);this.f&&(this.f.stop(),this.f=null);this.L=this.H=null;this.b=this.h=!1;this.v=this.m=this.g=this.c=this.a=this.j=null;return Promise.resolve()};p.ga=function(){return this.b};p.Fc=function(){return this.F};
  p.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable&&this.N.length){this.h=!0;this.f.fc();var b=new chrome.cast.SessionRequest(this.N);b=new chrome.cast.ApiConfig(b,function(b){for(var c=r(Yj),e=c.next();!e.done;e=c.next())ck(e.value,b)},function(b){for(var c=r(Yj),e=c.next();!e.done;e=c.next())e=e.value,dk="available"==b,e.f.fc()},"origin_scoped");chrome.cast.initialize(b,function(){},function(){});dk&&this.f.O(ek);(b=ak)&&b.status!=chrome.cast.SessionStatus.STOPPED?ck(this,
  b):ak=null}};p.Mc=function(b){this.j=b;this.b&&fk({type:"appData",appData:this.j})};p.cast=function(b){var c=this;return v(function e(){return B(e,function(e){switch(e.i){case 1:if(!c.h)throw new I(1,8,8E3);if(!dk)throw new I(1,8,8001);if(c.b)throw new I(1,8,8002);c.g=new Hb;chrome.cast.requestSession(function(e){return gk(c,b,e)},function(b){return hk(c,b)});return x(e,c.g,0)}})})};
  function ik(b){if(b.b){var c=b.D();chrome.cast.requestSession(function(d){return gk(b,c,d)},function(c){return hk(b,c)})}}p.vb=function(){this.b&&(Zj(this),ak&&(bk(this),ak.stop(function(){},function(){}),ak=null))};
  p.get=function(b,c){var d=this;if("video"==b){if(Pj.includes(c))return function(e){for(var f=[],g=0;g<arguments.length;++g)f[g]=arguments[g];return d.sd.apply(d,[b,c].concat(Oa(f)))}}else if("player"==b){if(Rj[c]&&!this.get("player","isLive")())return function(){};if(Uj.includes(c))return function(e){for(var f=[],g=0;g<arguments.length;++g)f[g]=arguments[g];return d.sd.apply(d,[b,c].concat(Oa(f)))};if(Vj.includes(c))return function(e){for(var f=[],g=0;g<arguments.length;++g)f[g]=arguments[g];return d.ye.apply(d,
  [b,c].concat(Oa(f)))};if(Qj[c])return function(){return d.a[b][c]}}return this.a[b][c]};p.set=function(b,c,d){this.a[b][c]=d;fk({type:"set",targetName:b,property:c,value:d})};function gk(b,c,d){ak=d;d.addUpdateListener(b.m);d.addMessageListener("urn:x-cast:com.google.shaka.v2",b.v);Xj(b);fk({type:"init",initState:c,appData:b.j});b.g.resolve()}
  function hk(b,c){var d=8003;switch(c.code){case "cancel":d=8004;break;case "timeout":d=8005;break;case "receiver_unavailable":d=8006}b.g.reject(new I(J,8,d,c))}p.sd=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];fk({type:"call",targetName:b,methodName:c,args:e})};p.ye=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];f=new Hb;var g=this.w.toString();this.w++;this.c[g]=f;fk({type:"asyncCall",targetName:b,methodName:c,args:e,id:g});return f};
  function ck(b,c){var d=b.D();b.g=new Hb;b.l=!0;gk(b,d,c)}function bk(b){var c=ak;c.removeUpdateListener(b.m);c.removeMessageListener("urn:x-cast:com.google.shaka.v2",b.v)}function Xj(b){var c=ak?"connected"==ak.status:!1;if(b.b&&!c){b.L();for(var d in b.a)b.a[d]={};Zj(b)}b.b=c;b.F=c?ak.receiver.friendlyName:"";b.f.fc()}function Zj(b){for(var c in b.c){var d=b.c[c];delete b.c[c];d.reject(new I(1,Fb,7E3))}}function fk(b){b=Jj(b);ak.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},bb)}
  var ek=.02,dk=!1,ak=null,Yj=new Set;window.__onGCastApiAvailable=function(b){if(b){b=r(Yj);for(var c=b.next();!c.done;c=b.next())c.value.init()}};function X(b,c,d){Wb.call(this);var e=this;this.c=b;this.b=c;this.j=this.h=this.f=this.l=this.g=null;this.v=d;this.m=new Map;this.a=new Wj(d,function(){return jk(e)},function(){return kk(e)},function(b,c){return lk(e,b,c)},function(){return mk(e)},function(){return nk(e)});ok(this)}za(X,Wb);F("shaka.cast.CastProxy",X);
  X.prototype.destroy=function(b){b&&this.a.vb();this.j&&(this.j.release(),this.j=null);b=[];this.b&&(b.push(this.b.destroy()),this.b=null);this.a&&(b.push(this.a.destroy()),this.a=null);this.l=this.g=this.c=null;return Promise.all(b)};X.prototype.destroy=X.prototype.destroy;X.prototype.ke=function(){return this.g};X.prototype.getVideo=X.prototype.ke;X.prototype.be=function(){return this.l};X.prototype.getPlayer=X.prototype.be;X.prototype.Jd=function(){return this.a.h&&dk};X.prototype.canCast=X.prototype.Jd;
  X.prototype.ga=function(){return this.a.ga()};X.prototype.isCasting=X.prototype.ga;X.prototype.Fc=function(){return this.a.Fc()};X.prototype.receiverName=X.prototype.Fc;X.prototype.cast=function(){var b=this;return v(function d(){var e;return B(d,function(d){switch(d.i){case 1:return e=nk(b),x(d,b.a.cast(e),2);case 2:return b.b?x(d,b.b.Uc(),0):d["return"]()}})})};X.prototype.cast=X.prototype.cast;X.prototype.Mc=function(b){this.a.Mc(b)};X.prototype.setAppData=X.prototype.Mc;X.prototype.Ke=function(){ik(this.a)};
  X.prototype.suggestDisconnect=X.prototype.Ke;X.prototype.vb=function(){this.a.vb()};X.prototype.forceDisconnect=X.prototype.vb;X.prototype.Ld=function(b){var c=this;return v(function e(){return B(e,function(e){switch(e.i){case 1:if(b==c.v)return e["return"]();c.v=b;c.a.vb();return x(e,c.a.destroy(),2);case 2:c.a=null,c.a=new Wj(b,function(){return jk(c)},function(){return kk(c)},function(b,e){return lk(c,b,e)},function(){return mk(c)},function(){return nk(c)}),c.a.init(),y(e)}})})};
  X.prototype.changeReceiverId=X.prototype.Ld;
  function ok(b){b.a.init();b.j=new O;for(var c=r(Mj),d=c.next();!d.done;d=c.next())b.j.s(b.c,d.value,function(c){b.a.ga()||(c=new L(c.type,c),b.f.dispatchEvent(c))});for(var e in yj)b.j.s(b.b,yj[e],function(c){b.a.ga()||b.h.dispatchEvent(c)});b.g={};c={};for(var f in b.c)c.k=f,Object.defineProperty(b.g,c.k,{configurable:!1,enumerable:!0,get:function(c){return function(){return pk(b,c.k)}}(c),set:function(c){return function(d){var e=c.k;b.a.ga()?b.a.set("video",e,d):b.c[e]=d}}(c)}),c={k:c.k};b.l={};
  qk(b,function(c){Object.defineProperty(b.l,c,{configurable:!1,enumerable:!0,get:function(){return rk(b,c)}})});sk(b);b.f=new Wb;b.f.Kb=b.g;b.h=new Wb;b.h.Kb=b.l}function sk(b){var c=new Map;qk(b,function(d,e){if(c.has(e)){var f=c.get(e);d.length<f.length?b.m.set(d,f):b.m.set(f,d)}else c.set(e,d)})}
  function qk(b,c){function d(b){return"constructor"==b||"function"!=typeof e[b]?!1:!f.has(b)}var e=b.b,f=new Set;for(g in e)d(g)&&(f.add(g),c(g,e[g]));var g=Object.getPrototypeOf(e);for(var h=Object.getPrototypeOf({});g&&g!=h;){for(var k=r(Object.getOwnPropertyNames(g)),l=k.next();!l.done;l=k.next())l=l.value,d(l)&&(f.add(l),c(l,e[l]));g=Object.getPrototypeOf(g)}}
  function nk(b){var c={video:{},player:{},playerAfterLoad:{},manifest:b.b.nc(),startTime:null};b.c.pause();for(var d=r(Oj),e=d.next();!e.done;e=d.next())e=e.value,c.video[e]=b.c[e];b.c.ended||(c.startTime=b.c.currentTime);d=r(Sj);for(e=d.next();!e.done;e=d.next()){var f=e.value;e=f[1];f=b.b[f[0]]();c.player[e]=f}d=r(Tj);for(e=d.next();!e.done;e=d.next())f=e.value,e=f[1],f=b.b[f[0]](),c.playerAfterLoad[e]=f;return c}function jk(b){var c=new L("caststatuschanged");b.dispatchEvent(c)}
  function kk(b){var c=new L(b.g.paused?"pause":"play");b.f.dispatchEvent(c)}
  function mk(b){for(var c=r(Sj),d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=b.a.get("player",e[0])();b.b[d](e)}var f=b.a.get("player","getAssetUri")();d=b.a.get("video","ended");c=Promise.resolve();var g=b.c.autoplay;e=null;d||(e=b.a.get("video","currentTime"));f&&(b.c.autoplay=!1,c=b.b.load(f,e));var h={};d=r(Oj);for(e=d.next();!e.done;e=d.next())e=e.value,h[e]=b.a.get("video",e);c.then(function(){if(b.c){for(var c=r(Oj),d=c.next();!d.done;d=c.next())d=d.value,b.c[d]=h[d];c=r(Tj);for(d=
  c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=b.a.get("player",e[0])();b.b[d](e)}b.c.autoplay=g;f&&b.c.play()}},function(c){c=new L(vj,{detail:c});b.b.dispatchEvent(c)})}
  function pk(b,c){if("addEventListener"==c)return function(c,d,g){return b.f.addEventListener(c,d,g)};if("removeEventListener"==c)return function(c,d,g){return b.f.removeEventListener(c,d,g)};if(b.a.ga()&&0==Object.keys(b.a.a.video).length){var d=b.c[c];if("function"!=typeof d)return d}return b.a.ga()?b.a.get("video",c):(d=b.c[c],"function"==typeof d&&(d=d.bind(b.c)),d)}
  function rk(b,c){b.m.has(c)&&(c=b.m.get(c));if("addEventListener"==c)return function(c,e,f){return b.h.addEventListener(c,e,f)};if("removeEventListener"==c)return function(c,e,f){return b.h.removeEventListener(c,e,f)};if("getMediaElement"==c)return function(){return b.g};if("getSharedConfiguration"==c)return b.a.get("player","getConfiguration");if("getNetworkingEngine"==c)return function(){return b.b.xb()};if("getAdManager"==c)return function(){return b.b.dd()};if(b.a.ga()){if("getManifest"==c||"drmInfo"==
  c)return function(){ab(c+"() does not work while casting!");return null};if("attach"==c||"detach"==c)return function(){ab(c+"() does not work while casting!");return Promise.resolve()}}return b.a.ga()&&0==Object.keys(b.a.a.video).length&&Qj[c]||!b.a.ga()?b.b[c].bind(b.b):b.a.get("player",c)}function lk(b,c,d){b.a.ga()&&("video"==c?b.f.dispatchEvent(d):"player"==c&&b.h.dispatchEvent(d))};function tk(b,c,d,e){Wb.call(this);var f=this;this.a=b;this.b=c;this.c=new O;this.F={video:b,player:c};this.v=d||function(){};this.H=e||function(b){return b};this.w=!1;this.h=!0;this.g=0;this.m=!1;this.l=!0;this.j=this.f=null;this.D=new G(function(){uk(f)});wk(this)}za(tk,Wb);F("shaka.cast.CastReceiver",tk);tk.prototype.isConnected=function(){return this.w};tk.prototype.isConnected=tk.prototype.isConnected;tk.prototype.ne=function(){return this.h};tk.prototype.isIdle=tk.prototype.ne;
  tk.prototype.destroy=function(){var b=this;return v(function d(){var e,f;return B(d,function(d){switch(d.i){case 1:return b.c&&(b.c.release(),b.c=null),e=[],b.b&&(e.push(b.b.destroy()),b.b=null),b.D&&(b.D.stop(),b.D=null),b.a=null,b.F=null,b.v=null,b.w=!1,b.h=!0,b.f=null,b.j=null,x(d,Promise.all(e),2);case 2:f=cast.receiver.CastReceiverManager.getInstance(),f.stop(),y(d)}})})};tk.prototype.destroy=tk.prototype.destroy;
  function wk(b){var c=cast.receiver.CastReceiverManager.getInstance();c.onSenderConnected=function(){return xk(b)};c.onSenderDisconnected=function(){return xk(b)};c.onSystemVolumeChanged=function(){var c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();c&&yk(b,{type:"update",update:{video:{volume:c.level,muted:c.muted}}},b.f);yk(b,{type:"event",targetName:"video",event:{type:"volumechange"}},b.f)};b.j=c.getCastMessageBus("urn:x-cast:com.google.cast.media");b.j.onMessage=function(c){return Ak(b,
  c)};b.f=c.getCastMessageBus("urn:x-cast:com.google.shaka.v2");b.f.onMessage=function(c){return Bk(b,c)};c.start();c=r(Mj);for(var d=c.next();!d.done;d=c.next())b.c.s(b.a,d.value,function(c){return Ck(b,"video",c)});for(var e in yj)b.c.s(b.b,yj[e],function(c){return Ck(b,"player",c)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?b.b.Nc(3840,2160):b.b.Nc(1920,1080);b.c.s(b.a,"loadeddata",function(){b.m=!0});b.c.s(b.b,"loading",function(){b.h=
  !1;Dk(b)});b.c.s(b.a,"playing",function(){b.h=!1;Dk(b)});b.c.s(b.a,"pause",function(){Dk(b)});b.c.s(b.b,"unloading",function(){b.h=!0;Dk(b)});b.c.s(b.a,"ended",function(){(new G(function(){b.a&&b.a.ended&&(b.h=!0,Dk(b))})).O(Ek)})}function xk(b){b.g=0;b.l=!0;b.w=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Dk(b)}
  function Dk(b){v(function d(){var e;return B(d,function(d){switch(d.i){case 1:return x(d,Promise.resolve(),2);case 2:if(!b.b)return d["return"]();e=new L("caststatuschanged");b.dispatchEvent(e);Fk(b)||Gk(b,0);y(d)}})})}
  function Hk(b,c,d){v(function f(){var g,h,k,l,m,n,q;return B(f,function(f){switch(f.i){case 1:for(var t in c.player)g=c.player[t],b.b[t](g);b.v(d);h=b.a.autoplay;return c.manifest?(b.a.autoplay=!1,z(f,5),x(f,b.b.load(c.manifest,c.startTime),7)):x(f,Promise.resolve(),3);case 7:Ea(f,3);break;case 5:return k=A(f),l=vj,m=new L(l,{detail:k}),b.b.dispatchEvent(m),f["return"]();case 3:if(!b.b)return f["return"]();for(var w in c.video)n=c.video[w],b.a[w]=n;for(var C in c.playerAfterLoad)q=c.playerAfterLoad[C],
  b.b[C](q);b.a.autoplay=h;c.manifest&&(b.a.play(),Gk(b,0));y(f)}})})}function Ck(b,c,d){b.b&&(uk(b),yk(b,{type:"event",targetName:c,event:d},b.f))}
  function uk(b){b.D.O(Ik);for(var c={video:{},player:{}},d=r(Nj),e=d.next();!e.done;e=d.next())e=e.value,c.video[e]=b.a[e];if(b.b.U())for(var f in Rj)0==b.g%Rj[f]&&(c.player[f]=b.b[f]());for(var g in Qj)0==b.g%Qj[g]&&(c.player[g]=b.b[g]());if(d=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())c.video.volume=d.level,c.video.muted=d.muted;b.m&&(b.g+=1);yk(b,{type:"update",update:c},b.f);Fk(b)}function Fk(b){return b.l&&(b.a.duration||b.b.U())?(Jk(b),b.l=!1,!0):!1}
  function Jk(b){var c={contentId:b.b.nc(),streamType:b.b.U()?"LIVE":"BUFFERED",duration:b.a.duration,contentType:""};Gk(b,0,c)}
  function Bk(b,c){var d=Kj(c.data);switch(d.type){case "init":b.g=0;b.m=!1;b.l=!0;Hk(b,d.initState,d.appData);uk(b);break;case "appData":b.v(d.appData);break;case "set":var e=d.targetName,f=d.property;d=d.value;if("video"==e){var g=cast.receiver.CastReceiverManager.getInstance();if("volume"==f){g.setSystemVolumeLevel(d);break}else if("muted"==f){g.setSystemVolumeMuted(d);break}}b.F[e][f]=d;break;case "call":e=b.F[d.targetName];e[d.methodName].apply(e,d.args);break;case "asyncCall":e=d.targetName;f=
  d.methodName;"player"==e&&"load"==f&&(b.g=0,b.m=!1);var h=d.id,k=c.senderId;g=b.F[e];d=g[f].apply(g,d.args);"player"==e&&"load"==f&&(d=d.then(function(){b.l=!0}));d.then(function(){return Kk(b,k,h,null)},function(c){return Kk(b,k,h,c)})}}
  function Ak(b,c){var d=Kj(c.data);switch(d.type){case "PLAY":b.a.play();Gk(b,0);break;case "PAUSE":b.a.pause();Gk(b,0);break;case "SEEK":var e=d.currentTime,f=d.resumeState;null!=e&&(b.a.currentTime=Number(e));f&&"PLAYBACK_START"==f?(b.a.play(),Gk(b,0)):f&&"PLAYBACK_PAUSE"==f&&(b.a.pause(),Gk(b,0));break;case "STOP":b.b.Uc().then(function(){b.b&&Gk(b,0)});break;case "GET_STATUS":Gk(b,Number(d.requestId));break;case "VOLUME":f=d.volume;e=f.level;f=f.muted;var g=b.a.volume,h=b.a.muted;null!=e&&(b.a.volume=
  Number(e));null!=f&&(b.a.muted=f);g==b.a.volume&&h==b.a.muted||Gk(b,0);break;case "LOAD":b.g=0;b.m=!1;b.l=!1;e=d.media;f=d.currentTime;g=b.H(e.contentId);h=d.autoplay||!0;b.v(e.customData);h&&(b.a.autoplay=!0);b.b.load(g,f).then(function(){b.b&&Jk(b)})["catch"](function(c){var e="LOAD_FAILED";c.category==Fb&&7E3==c.code&&(e="LOAD_CANCELLED");yk(b,{requestId:Number(d.requestId),type:e},b.j)});break;default:yk(b,{requestId:Number(d.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},b.j)}}
  function Kk(b,c,d,e){b.b&&yk(b,{type:"asyncComplete",id:d,error:e},b.f,c)}function yk(b,c,d,e){b.w&&(b=Jj(c),e?d.getCastChannel(e).send(b):d.broadcast(b))}function Gk(b,c,d){var e=b.a.playbackRate;var f=Lk;f=b.h?f.IDLE:b.b.tc()?f.Dd:b.a.paused?f.PAUSED:f.Fd;e={mediaSessionId:0,playbackRate:e,playerState:f,currentTime:b.a.currentTime,supportedMediaCommands:15,volume:{level:b.a.volume,muted:b.a.muted}};d&&(e.media=d);yk(b,{requestId:c,type:"MEDIA_STATUS",status:[e]},b.j)}
  var Ik=.5,Ek=5,Lk={IDLE:"IDLE",Fd:"PLAYING",Dd:"BUFFERING",PAUSED:"PAUSED"};function Mk(b){var c=this;this.a=[];this.b=[];this.data=[];(new S).I("moov",Kg).ea("pssh",function(b){if(!(1<b.version)){var d=K(b.reader.M,-12,b.size);c.data.push(d);c.a.push($c(b.reader.Va(16)));if(0<b.version){d=b.reader.G();d=r(jb(d));for(var f=d.next();!f.done;f=d.next())f=$c(b.reader.Va(16)),c.b.push(f)}}}).parse(b)}
  function Nk(b){if(!b)return b;var c=new Mk(b);if(1>=c.data.length)return b;b=[];var d={};c=r(c.data);for(var e=c.next();!e.done;d={Wb:d.Wb},e=c.next())d.Wb=e.value,b.some(function(b){return function(c){return Pb(c,b.Wb)}}(d))||b.push(d.Wb);return ad.apply(Vc,Oa(b))};function Ok(b,c){var d=Pk(b,c);return 1!=d.length?null:d[0]}function Qk(b,c,d){b=Rk(b,c,d);return 1!=b.length?null:b[0]}function Pk(b,c){return Array.from(b.childNodes).filter(function(b){return b instanceof Element&&b.tagName==c})}function Rk(b,c,d){return Array.from(b.childNodes).filter(function(b){return b instanceof Element&&b.localName==d&&b.namespaceURI==c})}function Sk(b,c,d){return b.hasAttributeNS(c,d)?b.getAttributeNS(c,d):null}
  function Tk(b){return Array.from(b.childNodes).every(function(b){return b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE})?b.textContent.trim():null}function Uk(b,c,d,e){e=void 0===e?null:e;var f=null;b=b.getAttribute(c);null!=b&&(f=d(b));return null==f?e:f}function Vk(b){if(!b)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(b)&&(b+="Z");b=Date.parse(b);return isNaN(b)?null:Math.floor(b/1E3)}
  function Wk(b){if(!b)return null;b=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(b);if(!b)return null;b=31536E3*Number(b[1]||null)+2592E3*Number(b[2]||null)+86400*Number(b[3]||null)+3600*Number(b[4]||null)+60*Number(b[5]||null)+Number(b[6]||null);return isFinite(b)?b:null}function Xk(b){var c=/([0-9]+)-([0-9]+)/.exec(b);if(!c)return null;b=Number(c[1]);if(!isFinite(b))return null;c=Number(c[2]);return isFinite(c)?{start:b,end:c}:null}
  function Yk(b){b=Number(b);return 0===b%1?b:null}function Zk(b){b=Number(b);return 0===b%1&&0<b?b:null}function $k(b){b=Number(b);return 0===b%1&&0<=b?b:null}function al(b){var c;b=(c=b.match(/^(\d+)\/(\d+)$/))?Number(c[1])/Number(c[2]):Number(b);return isNaN(b)?null:b}function bl(b,c){var d=new DOMParser,e=null,f=null;try{f=d.parseFromString(b,"text/xml")}catch(g){}f&&f.documentElement.tagName==c&&(e=f.documentElement);return e&&0<e.getElementsByTagName("parsererror").length?null:e}
  function cl(b,c){try{var d=Qc(b);return bl(d,c)}catch(e){return null}};function dl(b,c,d){var e=el(b),f=null;b=[];var g=[],h=new Set(e.map(function(b){return b.keyId}));h["delete"](null);if(1<h.size)throw new I(J,4,4010);d||(g=e.filter(function(b){return"urn:mpeg:dash:mp4protection:2011"==b.ud?(f=b.init||f,!1):!0}),g.length&&(b=fl(f,c,g),0==b.length&&(b=[be("",f)])));if(e.length&&(d||!g.length))for(b=[],c=r(gl.values()),d=c.next();!d.done;d=c.next())d=d.value,"org.w3.clearkey"!=d&&b.push(be(d,f));if(h=Array.from(h)[0]||null)for(c=r(b),d=c.next();!d.done;d=c.next())for(d=
  r(d.value.initData),e=d.next();!e.done;e=d.next())e.value.keyId=h;return{Zc:h,sf:f,drmInfos:b,cd:!0}}function hl(b,c,d,e){var f=dl(b,c,e);if(d.cd){b=1==d.drmInfos.length&&!d.drmInfos[0].keySystem;c=0==f.drmInfos.length;if(0==d.drmInfos.length||b&&!c)d.drmInfos=f.drmInfos;d.cd=!1}else if(0<f.drmInfos.length&&(d.drmInfos=d.drmInfos.filter(function(b){return f.drmInfos.some(function(c){return c.keySystem==b.keySystem})}),0==d.drmInfos.length))throw new I(J,4,4008);return f.Zc||d.Zc}
  function il(b){var c=0,d=Ub(b),e=d.getUint32(c,!0);if(e!=b.byteLength)return[];a:{b=c+6;for(c=[];b<d.byteLength-1;){e=d.getUint16(b,!0);b+=2;var f=d.getUint16(b,!0);b+=2;if(0!=(f&1)||f+b>d.byteLength){d=[];break a}var g=K(d,b,f);c.push({type:e,value:g});b+=f}d=c}return d}
  function jl(b){b=r(b.getElementsByTagName("DATA"));for(var c=b.next();!c.done;c=b.next()){c=r(c.value.childNodes);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d instanceof Element&&"LA_URL"==d.tagName)return d.textContent}return""}
  function fl(b,c,d){var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=gl.get(f.ud);if(g){var h;if(h=Qk(f.node,"urn:microsoft:playready","pro")){h=Yc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),l=h.length,m=k.length+16+l,n=new Uint8Array(m),q=Ub(n),t=0;q.setUint32(t,m);t+=4;q.setUint32(t,1886614376);t+=4;q.setUint32(t,0);t+=4;n.set(k,t);t+=k.length;q.setUint32(t,l);t+=4;n.set(h,t);h=[{initData:n,initDataType:"cenc",keyId:f.keyId}]}else h=
  null;h=be(g,f.init||b||h);if(g=kl.get(g))h.licenseServerUri=g(f);e.push(h)}else for(f=c(f.node)||[],f=r(f),g=f.next();!g.done;g=f.next())e.push(g.value)}return e}function el(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())(d=ll(d.value))&&c.push(d);return c}
  function ll(b){var c=b.getAttribute("schemeIdUri"),d=Sk(b,"urn:mpeg:cenc:2013","default_KID"),e=Rk(b,"urn:mpeg:cenc:2013","pssh").map(Tk);if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),d.includes(" ")))throw new I(J,4,4009);var f=[];try{f=e.map(function(b){return{initDataType:"cenc",initData:Yc(b),keyId:null}})}catch(g){throw new I(J,4,4007);}return{node:b,ud:c,keyId:d,init:0<f.length?f:null}}
  var gl=(new Map).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime"),kl=(new Map).set("com.widevine.alpha",function(b){return(b=Qk(b.node,"urn:microsoft","laurl"))?b.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",function(b){b=Qk(b.node,
  "urn:microsoft:playready","pro");if(!b)return"";b=Yc(b.textContent);b=il(b).filter(function(b){return 1===b.type})[0];if(!b)return"";b=wc(b.value,!0);return(b=bl(b,"WRMHEADER"))?jl(b):""});function ml(b,c,d,e,f){var g={RepresentationID:c,Number:d,Bandwidth:e,Time:f};return b.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(b,c,d,e){if("$$"==b)return"$";var f=g[c];if(null==f)return b;"RepresentationID"==c&&d&&(d=void 0);"Time"==c&&(f=Math.round(f));switch(e){case void 0:case "d":case "i":case "u":b=f.toString();break;case "o":b=f.toString(8);break;case "x":b=f.toString(16);break;case "X":b=f.toString(16).toUpperCase();break;default:b=f.toString()}d=
  window.parseInt(d,10)||1;return Array(Math.max(0,d-b.length)+1).join("0")+b})}
  function nl(b,c){var d=ol(b,c,"timescale"),e=1;d&&(e=Zk(d)||1);d=ol(b,c,"duration");(d=Zk(d||""))&&(d/=e);var f=ol(b,c,"startNumber"),g=Number(ol(b,c,"presentationTimeOffset"))||0,h=$k(f||"");if(null==f||null==h)h=1;var k=pl(b,c,"SegmentTimeline");f=null;if(k){f=e;var l=b.K.duration||Infinity,m=Pk(k,"S");k=[];var n=0;m=r(lb(m));for(var q=m.next();!q.done;q=m.next()){q=q.value;var t=q.item,u=q.next,w=Uk(t,"t",$k);q=Uk(t,"d",$k);var C=Uk(t,"r",Yk);null!=w&&(w-=g);if(!q)break;t=null!=w?w:n;w=C||0;if(0>
  w)if(u){u=Uk(u,"t",$k);if(null==u)break;else if(t>=u)break;w=Math.ceil((u-t)/q)-1}else{if(Infinity==l)break;else if(t/f>=l)break;w=Math.ceil((l*f-t)/q)-1}0<k.length&&t!=n&&(k[k.length-1].end=t/f);u=r(jb(w+1));for(w=u.next();!w.done;w=u.next())n=t+q,k.push({start:t/f,end:n/f,Pe:t}),t=n}f=k}return{timescale:e,Z:d,rb:h,Ba:g/e||0,Vc:g,R:f}}function ol(b,c,d){return[c(b.C),c(b.aa),c(b.ka)].filter(Zd).map(function(b){return b.getAttribute(d)}).reduce(function(b,c){return b||c})}
  function pl(b,c,d){return[c(b.C),c(b.aa),c(b.ka)].filter(Zd).map(function(b){return Ok(b,d)}).reduce(function(b,c){return b||c})}
  function ql(b,c,d,e,f,g){for(var h=Sk(b,"http://www.w3.org/1999/xlink","href"),k=Sk(b,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=r(Array.from(b.attributes)),m=l.next();!m.done;m=l.next())m=m.value,"http://www.w3.org/1999/xlink"==m.namespaceURI&&b.removeAttributeNS(m.namespaceURI,m.localName);if(5<=g)return Jb(new I(J,4,4028));if("onLoad"!=k)return Jb(new I(J,4,4027));var n=ae([e],[h]);return f.request(0,hc(n,c)).T(function(e){e=cl(e.data,b.tagName);if(!e)return Jb(new I(J,4,4001,h));
  for(;b.childNodes.length;)b.removeChild(b.childNodes[0]);for(;e.childNodes.length;){var k=e.childNodes[0];e.removeChild(k);b.appendChild(k)}e=r(Array.from(e.attributes));for(k=e.next();!k.done;k=e.next())b.setAttributeNode(k.value.cloneNode(!1));return rl(b,c,d,n[0],f,g+1)})}
  function rl(b,c,d,e,f,g){g=void 0===g?0:g;if(Sk(b,"http://www.w3.org/1999/xlink","href")){var h=ql(b,c,d,e,f,g);d&&(h=h.T(void 0,function(){return rl(b,c,d,e,f,g)}));return h}h=[];for(var k=r(Array.from(b.childNodes)),l=k.next();!l.done;l=k.next())l=l.value,l instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Sk(l,"http://www.w3.org/1999/xlink","href")?b.removeChild(l):"SegmentTimeline"!=l.tagName&&h.push(rl(l,c,d,e,f,g)));return Nb(h).T(function(){return b})};function sl(b,c,d,e,f,g,h){var k,l=(new S).ea("sidx",function(b){k=tl(c,e,f,g,h,d,b)});b&&l.parse(b);if(k)return k;throw new I(J,3,3004);}
  function tl(b,c,d,e,f,g,h){var k=[];h.reader.skip(4);var l=h.reader.G();if(0==l)throw new I(J,3,3005);if(0==h.version){var m=h.reader.G();var n=h.reader.G()}else m=h.reader.qb(),n=h.reader.qb();h.reader.skip(2);var q=h.reader.Db();b=b+h.size+n;q=r(jb(q));for(n=q.next();!n.done;n=q.next()){var t=h.reader.G();n=(t&2147483648)>>>31;t&=2147483647;var u=h.reader.G();h.reader.skip(4);if(1==n)throw new I(J,3,3006);k.push(new Cg(m/l+d,(m+u)/l+d,function(){return g},b,b+t-1,c,d,e,f));m+=u;b+=t}h.parser.stop();
  return k};function ul(b){this.b=Ub(b);this.a=new R(this.b,0)}ul.prototype.ra=function(){return this.a.ra()};
  function vl(b){var c=wl(b);if(7<c.length)throw new I(J,3,3002);var d=0;c=r(c);for(var e=c.next();!e.done;e=c.next())d=256*d+e.value;c=wl(b);a:{e=r(xl);for(var f=e.next();!f.done;f=e.next())if(Pb(c,new Uint8Array(f.value))){e=!0;break a}e=!1}if(e)c=b.b.byteLength-b.a.B;else{if(8==c.length&&c[1]&224)throw new I(J,3,3001);e=0;f=r(lb(c));for(var g=f.next();!g.done;g=f.next()){g=g.value;var h=g.item;e=0==g.fa?h&(1<<8-c.length)-1:256*e+h}c=e}c=b.a.B+c<=b.b.byteLength?c:b.b.byteLength-b.a.B;e=Ub(b.b,b.a.B,
  c);b.a.skip(c);return new yl(d,e)}function wl(b){var c=b.a.B,d=b.a.na();if(0==d)throw new I(J,3,3002);d=8-Math.floor(Math.log2(d));b.a.skip(d-1);return K(b.b,c,d)}var xl=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function yl(b,c){this.id=b;this.a=c}
  function zl(b){if(8<b.a.byteLength)throw new I(J,3,3002);if(8==b.a.byteLength&&b.a.getUint8(0)&224)throw new I(J,3,3001);for(var c=0,d=r(jb(b.a.byteLength)),e=d.next();!e.done;e=d.next())e=b.a.getUint8(e.value),c=256*c+e;return c};function Al(b,c,d,e,f,g,h,k,l){function m(){return f}var n=[];b=new ul(b.a);for(var q=null,t=null;b.ra();){var u=vl(b);if(187==u.id){var w=Bl(u);w&&(u=d*w.Qe,w=c+w.xe,null!=q&&n.push(new Cg(q+h,u+h,m,t,w-1,g,h,k,l)),q=u,t=w)}}null!=q&&n.push(new Cg(q+h,e+h,m,t,null,g,h,k,l));return n}
  function Bl(b){var c=new ul(b.a);b=vl(c);if(179!=b.id)throw new I(J,3,3013);b=zl(b);c=vl(c);if(183!=c.id)throw new I(J,3,3012);c=new ul(c.a);for(var d=0;c.ra();){var e=vl(c);if(241==e.id){d=zl(e);break}}return{Qe:b,xe:d}};function Cl(b,c){var d=pl(b,c,"Initialization");if(!d)return null;var e=b.C.ma,f=d.getAttribute("sourceURL");f&&(e=ae(b.C.ma,[f]));f=0;var g=null;if(d=Uk(d,"range",Xk))f=d.start,g=d.end;return new Bg(function(){return e},f,g)}
  function Dl(b,c){var d=Number(ol(b,El,"presentationTimeOffset"))||0,e=ol(b,El,"timescale"),f=1;e&&(f=Zk(e)||1);var g=d/f||0,h=Cl(b,El);Fl(b,h);var k=Yb(b);return{jb:function(){var b=pl(k,El,"RepresentationIndex"),d=k.C.ma;b&&(b=b.getAttribute("sourceURL"))&&(d=ae(k.C.ma,[b]));b=Gl(k);return Hl(k,c,h,d,b.start,b.end,g)}}}
  function Hl(b,c,d,e,f,g,h){return v(function l(){var m,n,q,t,u,w,C,E,D,H,N,ba,ka,ea,Ka;return B(l,function(l){var ca;switch(l.i){case 1:return m=b.presentationTimeline,n=!b.hb||!b.K.uc,q=b.K.start,t=b.K.duration,u=b.C.mimeType.split("/")[1],w=c,C=null,E=[w(e,f,g),"webm"==u?w(d.c(),d.b,d.a):null],w=null,x(l,Promise.all(E),2);case 2:D=l.o;H=D[0];N=D[1]||null;ba=null;ka=q-h;ea=q;Ka=t?q+t:Infinity;if("mp4"==u)var eb=sl(H,f,e,d,ka,ea,Ka);else{var va=H;eb=ka;var Rb=ea,Qa=Ka;var wb=new ul(N);if(440786851!=
  vl(wb).id)throw new I(J,3,3008);var oa=vl(wb);if(408125543!=oa.id)throw new I(J,3,3009);wb=oa.a.byteOffset;oa=new ul(oa.a);for(ca=null;oa.ra();){var Ma=vl(oa);if(357149030==Ma.id){ca=Ma;break}}if(!ca)throw new I(J,3,3010);ca=new ul(ca.a);Ma=1E6;for(oa=null;ca.ra();){var ra=vl(ca);if(2807729==ra.id)Ma=zl(ra);else if(17545==ra.id)if(4==ra.a.byteLength)oa=ra.a.getFloat32(0);else if(8==ra.a.byteLength)oa=ra.a.getFloat64(0);else throw new I(J,3,3003);}if(null==oa)throw new I(J,3,3011);ca=Ma/1E9;ca={Le:ca,
  duration:oa*ca};oa=ca.Le;ca=ca.duration;va=vl(new ul(va));if(475249515!=va.id)throw new I(J,3,3007);eb=Al(va,wb,oa,ca,e,d,eb,Rb,Qa)}ba=eb;m.nb(ba);C=new Q(ba);n&&C.ib(ea,Ka);return l["return"](C)}})})}function El(b){return b.Eb}function Gl(b){var c=pl(b,El,"RepresentationIndex");b=ol(b,El,"indexRange");b=Xk(b||"");c&&(b=Uk(c,"range",Xk,b));return b}function Fl(b,c){Il(b,c);if(!Gl(b))throw new I(J,4,4002);}
  function Il(b,c){var d=b.C.contentType,e=b.C.mimeType.split("/")[1];if("text"!=d&&"mp4"!=e&&"webm"!=e)throw new I(J,4,4006);if("webm"==e&&!c)throw new I(J,4,4005);};function Jl(b,c){var d=Cl(b,Kl),e=Ll(b);if(!e.Z&&!e.R&&1<e.lb.length)throw new I(J,4,4002);if(!e.Z&&!b.K.duration&&!e.R&&1==e.lb.length)throw new I(J,4,4002);if(e.R&&0==e.R.length)throw new I(J,4,4002);var f=null,g=null;b.ka.id&&b.C.id&&(g=b.ka.id+","+b.C.id,f=c[g]);d=Ml(b.K.start,b.K.duration,b.C.ma,e,d);f?(f.yc(d),g=b.presentationTimeline.Pa(),f.Sb(g)):(b.presentationTimeline.nb(d),f=new Q(d),g&&b.hb&&(c[g]=f));b.hb&&b.K.uc||f.ib(b.K.start,b.K.duration?b.K.start+b.K.duration:Infinity);return{jb:function(){return Promise.resolve(f)}}}
  function Kl(b){return b.Ha}function Ll(b){var c=Nl(b);b=nl(b,Kl);var d=b.rb;0==d&&(d=1);var e=0;b.Z?e=b.Z*(d-1):b.R&&0<b.R.length&&(e=b.R[0].start);return{Z:b.Z,startTime:e,rb:d,Ba:b.Ba,R:b.R,lb:c}}
  function Ml(b,c,d,e,f){var g=e.lb.length;e.R&&e.R.length!=e.lb.length&&(g=Math.min(e.R.length,e.lb.length));var h=b-e.Ba,k=c?b+c:Infinity,l=[],m=e.startTime,n={};g=r(jb(g));for(var q=g.next();!q.done;n={Cb:n.Cb},q=g.next()){q=q.value;var t=e.lb[q];n.Cb=ae(d,[t.Cb]);var u=void 0;u=null!=e.Z?m+e.Z:e.R?e.R[q].end:m+c;l.push(new Cg(b+m,b+u,function(b){return function(){return b.Cb}}(n),t.start,t.end,f,h,b,k));m=u}return l}
  function Nl(b){return[b.C.Ha,b.aa.Ha,b.ka.Ha].filter(Zd).map(function(b){return Pk(b,"SegmentURL")}).reduce(function(b,d){return 0<b.length?b:d}).map(function(c){c.getAttribute("indexRange")&&!b.ed&&(b.ed=!0);var d=c.getAttribute("media");c=Uk(c,"mediaRange",Xk,{start:0,end:null});return{Cb:d,start:c.start,end:c.end}})};function Ol(b,c,d,e,f){var g=Pl(b),h=Ql(b);Rl(h);var k=Yb(b);if(h.Ab)return Il(b,g),{jb:function(){var b=ml(h.Ab,k.C.id,null,k.bandwidth||null,null);b=ae(k.C.ma,[b]);return Hl(k,c,g,b,0,null,h.Ba)}};if(h.Z)return e||(b.presentationTimeline.zc(h.Z),b.presentationTimeline.Ac(b.K.start)),{jb:function(){return Sl(k,h,f,g)}};var l=null;e=null;b.ka.id&&b.C.id&&(e=b.ka.id+","+b.C.id,l=d[e]);var m=Tl(b,h,g),n=!b.hb||!b.K.uc,q=b.K.start,t=b.K.duration?b.K.start+b.K.duration:Infinity;l?(n&&(new Q(m)).ib(q,
  t),l.yc(m),l.Sb(b.presentationTimeline.Pa())):(b.presentationTimeline.nb(m),l=new Q(m),e&&b.hb&&(d[e]=l));n&&l.ib(q,t);return{jb:function(){return Promise.resolve(l)}}}function Ul(b){return b.Fb}function Ql(b){var c=nl(b,Ul),d=ol(b,Ul,"media");b=ol(b,Ul,"index");return{Z:c.Z,timescale:c.timescale,rb:c.rb,Ba:c.Ba,Vc:c.Vc,R:c.R,xc:d,Ab:b}}function Rl(b){var c=b.Ab?1:0;c+=b.R?1:0;c+=b.Z?1:0;if(0==c)throw new I(J,4,4002);1!=c&&(b.Ab&&(b.R=null),b.Z=null);if(!b.Ab&&!b.xc)throw new I(J,4,4002);}
  function Sl(b,c,d,e){function f(b){var d=(b-q)*n,f=d+c.Ba;d+=k;return new Cg(d,Math.min(d+n,m),function(){var c=ml(u,C,b,w,f*t);return ae(E,[c])},0,null,e,D,k,m)}function g(){var b=[Math.max(h.Pa(),k),Math.min(h.Ea(),m)].map(function(b){return b-k});return[Math.ceil(b[0]/n),Math.ceil(b[1]/n)-1].map(function(b){return b+q})}var h=b.presentationTimeline,k=b.K.start,l=b.K.duration,m=l?k+l:Infinity,n=c.Z,q=c.rb,t=c.timescale,u=c.xc,w=b.bandwidth||null,C=b.C.id,E=b.C.ma,D=k-c.Ba,H=g();b=H[1];l=[];for(d=
  Math.max(H[0],H[1]-d);d<=b;++d)l.push(f(d));var N=new Q(l);if(h.Ea()<m){var ba=b+1;N.zd(n,function(){N.Sb(h.Pa());var b=r(g());b.next();b=b.next().value;for(var c=[];ba<=b;)c.push(f(ba)),ba++;return c})}return Promise.resolve(N)}
  function Tl(b,c,d){var e=b.K.start,f=b.K.duration,g=e-c.Ba;f=f?e+f:Infinity;for(var h=[],k={},l=r(lb(c.R)),m=l.next();!m.done;k={Hc:k.Hc,Lc:k.Lc,bandwidth:k.bandwidth,Sc:k.Sc},m=l.next()){m=m.value;var n=m.item,q=n.start,t=n.Pe;n=n.end;k.Lc=m.fa+c.rb;k.Sc=t+c.Vc;k.Hc=b.C.id;k.bandwidth=b.bandwidth||null;h.push(new Cg(e+q,e+n,function(d){return function(){var e=ml(c.xc,d.Hc,d.Lc,d.bandwidth||null,d.Sc);return ae(b.C.ma,[e]).map(function(b){return b.toString()})}}(k),0,null,d,g,e,f))}return h}
  function Pl(b){var c=ol(b,Ul,"initialization");if(!c)return null;var d=b.C.id,e=b.bandwidth||null,f=b.C.ma;return new Bg(function(){var b=ml(c,d,null,e,null);return ae(f,[b])},0,null)};function Y(b,c,d){this.f=b;this.dc=c;this.h=this.g=Infinity;this.a=1;this.b=this.c=null;this.j=0;this.l=!0;this.m=0;this.v=void 0===d?!0:d}F("shaka.media.PresentationTimeline",Y);Y.prototype.getDuration=function(){return this.g};Y.prototype.getDuration=Y.prototype.getDuration;Y.prototype.Yd=function(){return this.a};Y.prototype.getMaxSegmentDuration=Y.prototype.Yd;Y.prototype.va=function(b){this.g=b};Y.prototype.setDuration=Y.prototype.va;Y.prototype.ee=function(){return this.f};
  Y.prototype.getPresentationStartTime=Y.prototype.ee;Y.prototype.wd=function(b){this.j=b};Y.prototype.setClockOffset=Y.prototype.wd;Y.prototype.Gb=function(b){this.l=b};Y.prototype.setStatic=Y.prototype.Gb;Y.prototype.Pc=function(b){this.h=b};Y.prototype.setSegmentAvailabilityDuration=Y.prototype.Pc;Y.prototype.Ie=function(b){this.dc=b};Y.prototype.setDelay=Y.prototype.Ie;Y.prototype.Sd=function(){return this.dc};Y.prototype.getDelay=Y.prototype.Sd;
  Y.prototype.nb=function(b){if(0!=b.length){var c=b[b.length-1].endTime;this.Ac(b[0].startTime);this.a=b.reduce(function(b,c){return Math.max(b,c.endTime-c.startTime)},this.a);this.b=Math.max(this.b,c);null!=this.f&&this.v&&(this.f=(Date.now()+this.j)/1E3-this.b-this.a)}};Y.prototype.notifySegments=Y.prototype.nb;Y.prototype.Ac=function(b){this.c=null==this.c?b:Math.min(this.c,b)};Y.prototype.notifyMinSegmentStartTime=Y.prototype.Ac;Y.prototype.zc=function(b){this.a=Math.max(this.a,b)};
  Y.prototype.notifyMaxSegmentDuration=Y.prototype.zc;Y.prototype.offset=function(b){null!=this.c&&(this.c+=b);null!=this.b&&(this.b+=b)};Y.prototype.offset=Y.prototype.offset;Y.prototype.U=function(){return Infinity==this.g&&!this.l};Y.prototype.isLive=Y.prototype.U;Y.prototype.Sa=function(){return Infinity!=this.g&&!this.l};Y.prototype.isInProgress=Y.prototype.Sa;Y.prototype.Pa=function(){var b=this.Ea()-this.h;return Math.max(this.m,b)};Y.prototype.getSegmentAvailabilityStart=Y.prototype.Pa;
  Y.prototype.xd=function(b){this.m=b};Y.prototype.setUserSeekStart=Y.prototype.xd;Y.prototype.Ea=function(){return this.U()||this.Sa()?Math.min(Math.max(0,(Date.now()+this.j)/1E3-this.a-this.f),this.g):this.g};Y.prototype.getSegmentAvailabilityEnd=Y.prototype.Ea;Y.prototype.yb=function(b){var c=Math.max(this.c,this.m);if(Infinity==this.h)return c;var d=this.Ea()-this.h;b=Math.min(d+b,this.ya());return Math.max(c,b)};Y.prototype.getSafeSeekRangeStart=Y.prototype.yb;Y.prototype.kb=function(){return this.yb(0)};
  Y.prototype.getSeekRangeStart=Y.prototype.kb;Y.prototype.ya=function(){var b=this.U()||this.Sa()?this.dc:0;return Math.max(0,this.Ea()-b)};Y.prototype.getSeekRangeEnd=Y.prototype.ya;Y.prototype.Bd=function(){return null==this.f||null!=this.b&&this.v?!1:!0};Y.prototype.usingPresentationStartTime=Y.prototype.Bd;function Vl(){var b=this;this.b=this.a=null;this.f=[];this.c=null;this.l=[];this.h=1;this.m={};this.v=0;this.w=new Wa(5);this.j=new G(function(){Wl(b)});this.g=new cc}F("shaka.dash.DashParser",Vl);p=Vl.prototype;p.configure=function(b){this.a=b};p.start=function(b,c){var d=this;return v(function f(){var g;return B(f,function(f){switch(f.i){case 1:return d.f=[b],d.b=c,x(f,Xl(d),2);case 2:g=f.o;d.b&&Yl(d,g);if(!d.b)throw new I(J,Fb,7001);return f["return"](d.c)}})})};
  p.stop=function(){this.a=this.b=null;this.f=[];this.c=null;this.l=[];this.m={};null!=this.j&&(this.j.stop(),this.j=null);return this.g.destroy()};p.update=function(){var b=this;return v(function d(){var e;return B(d,function(d){switch(d.i){case 1:return z(d,2),x(d,Xl(b),4);case 4:Ea(d,0);break;case 2:e=A(d);if(!b.b||!e)return d["return"]();b.b.onError(e);y(d)}})})};p.onExpirationUpdated=function(){};
  function Xl(b){return v(function d(){var e,f,g,h,k,l,m;return B(d,function(d){switch(d.i){case 1:return e=hc(b.f,b.a.retryParameters),f=b.b.networkingEngine,g=Date.now(),h=f.request(0,e),dc(b.g,h),x(d,h.promise,2);case 2:k=d.o;if(!b.b)return d["return"](0);k.uri&&!b.f.includes(k.uri)&&b.f.unshift(k.uri);return x(d,Zl(b,k.data,k.uri),3);case 3:return l=Date.now(),m=(l-g)/1E3,Xa(b.w,1,m),d["return"](m)}})})}
  function Zl(b,c,d){return v(function f(){var g,h,k,l;return B(f,function(f){switch(f.i){case 1:g=cl(c,"MPD");if(!g)throw new I(J,4,4001,d);h=b.a.dash.xlinkFailGracefully;k=rl(g,b.a.retryParameters,h,d,b.b.networkingEngine);dc(b.g,k);return x(f,k.promise,2);case 2:return l=f.o,f["return"]($l(b,l,d))}})})}
  function $l(b,c,d){return v(function f(){var g,h,k,l,m,n,q,t,u,w,C,E,D,H,N,ba,ka,ea,Ka,Qa,ca,eb,va;return B(f,function(f){switch(f.i){case 1:g=[d];h=Pk(c,"Location").map(Tk).filter(Zd);0<h.length&&(k=ae(g,h),g=b.f=k);l=Pk(c,"BaseURL").map(Tk);m=ae(g,l);n=b.a.dash.ignoreMinBufferTime;q=0;n||(q=Uk(c,"minBufferTime",Wk));b.v=Uk(c,"minimumUpdatePeriod",Wk,-1);t=Uk(c,"availabilityStartTime",Vk);u=Uk(c,"timeShiftBufferDepth",Wk);w=b.a.dash.ignoreSuggestedPresentationDelay;C=null;w||(C=Uk(c,"suggestedPresentationDelay",
  Wk));E=Uk(c,"maxSegmentDuration",Wk);D=c.getAttribute("type")||"static";b.c?H=b.c.presentationTimeline:(N=b.a.defaultPresentationDelay||1.5*q,ba=null!=C?C:N,H=new Y(t,ba,b.a.dash.autoCorrectDrift));var Rb=ka={hb:"static"!=D,presentationTimeline:H,ka:null,K:null,aa:null,C:null,bandwidth:0,ed:!1},wb=m,oa=Uk(c,"mediaPresentationDuration",Wk),Ma=[],ra=0,me=Pk(c,"Period");me=r(lb(me));for(var wa=me.next();!wa.done;wa=me.next()){var sa=wa.value;wa=sa.item;var Fc=sa.next;ra=Uk(wa,"start",Wk,ra);var dp=Uk(wa,
  "duration",Wk);sa=null;if(Fc){var zk=Uk(Fc,"start",Wk);null!=zk&&(sa=zk-ra)}else null!=oa&&(sa=oa-ra);null==sa&&(sa=dp);wa=am(b,Rb,wb,{start:ra,duration:sa,node:wa,uc:null==sa||!Fc});Ma.push(wa);Fc=Rb.ka.id;b.l.includes(Fc)||(b.l.push(Fc),b.c&&(b.b.filterNewPeriod(wa),b.c.periods.push(wa)));if(null==sa){ra=null;break}ra+=sa}null==b.c&&b.b.filterAllPeriods(Ma);ea=null!=oa?{periods:Ma,duration:oa,$c:!1}:{periods:Ma,duration:ra,$c:!0};Ka=ea.duration;Qa=ea.periods;H.Gb("static"==D);"static"!=D&&ea.$c||
  H.va(Ka||Infinity);(ca=H.U())&&!isNaN(b.a.availabilityWindowOverride)&&(u=b.a.availabilityWindowOverride);null==u&&(u=Infinity);H.Pc(u);H.zc(E||1);if(b.c){f.u(0);break}b.c={presentationTimeline:H,periods:Qa,offlineSessionIds:[],minBufferTime:q||0};if(!H.Bd()){f.u(0);break}eb=Pk(c,"UTCTiming");return x(f,bm(b,m,eb),4);case 4:va=f.o;if(!b.b)return f["return"]();H.wd(va);y(f)}})})}
  function am(b,c,d,e){c.ka=cm(e.node,null,d);c.K=e;c.ka.id||(c.ka.id="__shaka_period_"+e.start);d=Pk(e.node,"EventStream");d=r(d);for(var f=d.next();!f.done;f=d.next())dm(b,e.start,e.duration,f.value);f=Pk(e.node,"AdaptationSet").map(function(d){return em(b,c,d)}).filter(Zd);if(c.hb){d=[];for(var g=r(f),h=g.next();!h.done;h=g.next()){h=r(h.value.Ae);for(var k=h.next();!k.done;k=h.next())d.push(k.value)}if(d.length!=(new Set(d)).size)throw new I(J,4,4018);}d=f.filter(function(b){return!b.Tc});f=f.filter(function(b){return b.Tc});
  f=r(f);for(g=f.next();!g.done;g=f.next()){h=g.value;g=h.streams[0];h=h.Tc;k=r(d);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.id==h){l=r(l.streams);for(var m=l.next();!m.done;m=l.next())m.value.trickModeVideo=g}}g=fm(d,"video");h=fm(d,"audio");if(!g.length&&!h.length)throw new I(J,4,4004);f=b.a.disableAudio;if(!h.length||f)h=[null];f=b.a.disableVideo;if(!g.length||f)g=[null];f=[];h=r(h);for(k=h.next();!k.done;k=h.next())for(k=k.value,l=r(g),m=l.next();!m.done;m=l.next())gm(b,k,m.value,f);
  g=b.a.disableText?[]:fm(d,"text");d=[];g=r(g);for(h=g.next();!h.done;h=g.next())d.push.apply(d,Oa(h.value.streams));return{startTime:e.start,textStreams:d,variants:f}}function fm(b,c){return b.filter(function(b){return b.contentType==c})}
  function gm(b,c,d,e){if(c||d)if(c&&d){var f=c.drmInfos;var g=d.drmInfos;if(f.length&&g.length?0<Id(f,g).length:1){g=Id(c.drmInfos,d.drmInfos);var h=r(c.streams);for(f=h.next();!f.done;f=h.next()){var k=f.value,l=r(d.streams);for(f=l.next();!f.done;f=l.next()){var m=f.value;f=(m.bandwidth||0)+(k.bandwidth||0);f={id:b.h++,language:c.language,primary:c.wc||d.wc,audio:k,video:m,bandwidth:f,drmInfos:g,allowedByApplication:!0,allowedByKeySystem:!0};e.push(f)}}}}else for(g=c||d,h=r(g.streams),f=h.next();!f.done;f=
  h.next())k=f.value,f=k.bandwidth||0,f={id:b.h++,language:g.language||"und",primary:g.wc,audio:c?k:null,video:d?k:null,bandwidth:f,drmInfos:g.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},e.push(f)}
  function em(b,c,d){c.aa=cm(d,c.ka,null);if("image"==c.aa.contentType)return null;var e=!1,f=Pk(d,"Role"),g=f.map(function(b){return b.getAttribute("value")}).filter(Zd),h=void 0,k="text"==c.aa.contentType;k&&(h="subtitle");f=r(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=l}}m=Pk(d,"EssentialProperty");f=null;l=!1;m=r(m);for(var n=
  m.next();!n.done;n=m.next())n=n.value,"http://dashif.org/guidelines/trickmode"==n.getAttribute("schemeIdUri")?f=n.getAttribute("value"):l=!0;m=Pk(d,"Accessibility");var q=new Map;m=r(m);for(n=m.next();!n.done;n=m.next()){var t=n.value;n=t.getAttribute("schemeIdUri");t=t.getAttribute("value");if("urn:scte:dash:cc:cea-608:2015"==n||"urn:scte:dash:cc:cea-708:2015"==n)if(n=1,null!=t){t=r(t.split(";"));for(var u=t.next();!u.done;u=t.next()){var w=u.value,C=u=void 0;w.includes("=")?(w=w.split("="),u=w[0].startsWith("CC")?
  w[0]:"CC"+w[0],C=w[1].split(",")[0].split(":").pop()):(u="CC"+n,n+=2,C=w);q.set(u,bf(C))}}else q.set("CC1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"))}if(l)return null;l=Pk(d,"ContentProtection");var E=dl(l,b.a.dash.customScheme,b.a.dash.ignoreDrmInfo),D=bf(d.getAttribute("lang")||"und"),H=d.getAttribute("label");(l=Pk(d,"Label"))&&l.length&&(l=l[0],l.textContent&&(H=l.textContent));l=Pk(d,"Representation");d=l.map(function(d){return hm(b,c,E,h,D,H,e,
  g,q,d)}).filter(function(b){return!!b});if(0==d.length){if(b.a.dash.ignoreEmptyAdaptationSet||k)return null;throw new I(J,4,4003);}if(!c.aa.contentType||"application"==c.aa.contentType)for(c.aa.contentType=im(d[0].mimeType,d[0].codecs),k=r(d),m=k.next();!m.done;m=k.next())m.value.type=c.aa.contentType;k=r(d);for(m=k.next();!m.done;m=k.next())for(m=m.value,n=r(E.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,m.keyId&&t.keyIds.push(m.keyId);k=l.map(function(b){return b.getAttribute("id")}).filter(Zd);
  return{id:c.aa.id||"__fake__"+b.h++,contentType:c.aa.contentType,language:D,wc:e,streams:d,drmInfos:E.drmInfos,Tc:f,Ae:k}}
  function hm(b,c,d,e,f,g,h,k,l,m){c.C=cm(m,c.aa,null);if(!jm(c.C))return null;var n=c.K.start;c.bandwidth=Uk(m,"bandwidth",Zk)||0;var q=c.C.contentType;q="text"==q||"application"==q;try{var t=function(c,d,e){return km(b,c,d,e)};if(c.C.Eb)var u=Dl(c,t);else if(c.C.Ha)u=Jl(c,b.m);else if(c.C.Fb)u=Ol(c,t,b.m,!!b.c,b.a.dash.initialSegmentLimit);else{var w=c.C.ma,C=c.K.duration||0;u={jb:function(){return Promise.resolve(Eg(n,C,w))}}}}catch(D){if(q&&4002==D.code)return null;throw D;}q=Pk(m,"ContentProtection");
  q=hl(q,b.a.dash.customScheme,d,b.a.dash.ignoreDrmInfo);Pk(m,"SupplementalProperty").some(function(b){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==b.getAttribute("schemeIdUri")&&"JOC"==b.getAttribute("value")})&&(c.C.mimeType="audio/eac3-joc");var E={id:b.h++,originalId:c.C.id,createSegmentIndex:function(){return v(function H(){var b;return B(H,function(c){switch(c.i){case 1:if(E.segmentIndex){c.u(0);break}b=E;return x(c,u.jb(),3);case 3:b.segmentIndex=c.o,y(c)}})})},segmentIndex:null,mimeType:c.C.mimeType,
  codecs:c.C.codecs,frameRate:c.C.frameRate,pixelAspectRatio:c.C.pixelAspectRatio,bandwidth:c.bandwidth,width:c.C.width,height:c.C.height,kind:e,encrypted:0<d.drmInfos.length,keyId:q,language:f,label:g,type:c.aa.contentType,primary:h,trickModeVideo:null,emsgSchemeIdUris:c.C.emsgSchemeIdUris,roles:k,channelsCount:c.C.Bc,audioSamplingRate:c.C.audioSamplingRate,closedCaptions:l};return E}
  function Wl(b){v(function d(){var e,f;return B(d,function(d){switch(d.i){case 1:return e=0,z(d,2),x(d,Xl(b),4);case 4:e=d.o;Ea(d,3);break;case 2:f=A(d),b.b&&(f.severity=1,b.b.onError(f));case 3:if(!b.b)return d["return"]();Yl(b,e);y(d)}})})}function Yl(b,c){0>b.v||b.j.O(Math.max(3,b.v-c,Ya(b.w)))}
  function cm(b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Bc:null,audioSamplingRate:null};d=d||c.ma;var e=Pk(b,"BaseURL").map(Tk),f=b.getAttribute("contentType")||c.contentType,g=b.getAttribute("mimeType")||c.mimeType,h=b.getAttribute("codecs")||c.codecs,k=Uk(b,"frameRate",al)||c.frameRate,l=b.getAttribute("par")||c.pixelAspectRatio,m=Pk(b,"InbandEventStream"),n=c.emsgSchemeIdUris.slice();m=r(m);for(var q=m.next();!q.done;q=m.next())q=
  q.value.getAttribute("schemeIdUri"),n.includes(q)||n.push(q);m=Pk(b,"AudioChannelConfiguration");m=lm(m)||c.Bc;q=Uk(b,"audioSamplingRate",$k)||c.audioSamplingRate;f||(f=im(g,h));return{ma:ae(d,e),Eb:Ok(b,"SegmentBase")||c.Eb,Ha:Ok(b,"SegmentList")||c.Ha,Fb:Ok(b,"SegmentTemplate")||c.Fb,width:Uk(b,"width",$k)||c.width,height:Uk(b,"height",$k)||c.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:b.getAttribute("id"),Bc:m,audioSamplingRate:q}}
  function lm(b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value;if(c=d.getAttribute("schemeIdUri"))if(d=d.getAttribute("value"))switch(c){case "urn:mpeg:dash:outputChannelPositionList:2012":return d.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":c=parseInt(d,10);if(!c)continue;return c;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":if(c=
  parseInt(d,16)){for(b=0;c;)c&1&&++b,c>>=1;return b}}}return null}function jm(b){var c=b.Eb?1:0;c+=b.Ha?1:0;c+=b.Fb?1:0;if(0==c)return"text"==b.contentType||"application"==b.contentType?!0:!1;1!=c&&(b.Eb&&(b.Ha=null),b.Fb=null);return!0}
  function mm(b,c,d,e){return v(function g(){var h,k,l,m,n,q;return B(g,function(g){switch(g.i){case 1:return h=ae(c,[d]),k=hc(h,b.a.retryParameters),k.method=e,l=b.b.networkingEngine.request(4,k),dc(b.g,l),x(g,l.promise,2);case 2:m=g.o;if("HEAD"==e){if(!m.headers||!m.headers.date)return g["return"](0);n=m.headers.date}else n=Qc(m.data);q=Date.parse(n);return isNaN(q)?g["return"](0):g["return"](q-Date.now())}})})}
  function bm(b,c,d){return v(function f(){var g,h,k,l,m,n,q,t;return B(f,function(f){switch(f.i){case 1:g=d.map(function(b){return{scheme:b.getAttribute("schemeIdUri"),value:b.getAttribute("value")}}),h=b.a.dash.clockSyncUri,!g.length&&h&&g.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:h}),k=r(g),l=k.next();case 2:if(l.done){f.u(4);break}m=l.value;z(f,5);n=m.scheme;q=m.value;switch(n){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return f.u(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return f.u(8);
  case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return f.u(9);case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":return f.u(10);default:ab("Unrecognized scheme in UTCTiming element",n)}f.u(11);break;case 7:return x(f,mm(b,c,q,"HEAD"),12);case 12:return f["return"](f.o);case 8:return x(f,mm(b,c,q,"GET"),13);case 13:return f["return"](f.o);case 9:return t=Date.parse(q),f["return"](isNaN(t)?0:t-Date.now());case 10:ab("NTP UTCTiming scheme is not supported");
  f.u(11);break;case 11:Ea(f,3);break;case 5:A(f);case 3:l=k.next();f.u(2);break;case 4:return ab("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),f["return"](0)}})})}
  function dm(b,c,d,e){var f=e.getAttribute("schemeIdUri")||"",g=e.getAttribute("value")||"",h=Uk(e,"timescale",$k)||1;e=r(Pk(e,"Event"));for(var k=e.next();!k.done;k=e.next()){k=k.value;var l=Uk(k,"presentationTime",$k)||0,m=Uk(k,"duration",$k)||0;l=l/h+c;m=l+m/h;null!=d&&(l=Math.min(l,c+d),m=Math.min(m,c+d));k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k};b.b.onTimelineRegionAdded(k)}}
  function km(b,c,d,e){return v(function g(){var h,k,l,m,n;return B(g,function(g){switch(g.i){case 1:return h=nc,k=Og(c,d,e,b.a.retryParameters),l=b.b.networkingEngine,m=l.request(h,k),dc(b.g,m),x(g,m.promise,2);case 2:return n=g.o,g["return"](n.data)}})})}function im(b,c){return Ce(Cc(b,c))?"text":b.split("/")[0]}Of.mpd=function(){return new Vl};Pf["application/dash+xml"]=function(){return new Vl};Pf["video/vnd.mpeg.dash.mpd"]=function(){return new Vl};function nm(b,c,d,e){this.a=b;this.type=c;this.oa=d;this.segments=e||null}function om(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=void 0===e?null:e}om.prototype.toString=function(){function b(b){return b.name+"="+(isNaN(Number(b.value))?'"'+b.value+'"':b.value)}var c="#"+this.name,d=this.a?this.a.map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
  om.prototype.getAttribute=function(b){var c=this.a.filter(function(c){return c.name==b});return c.length?c[0]:null};function pm(b,c,d){return(b=b.getAttribute(c))?b.value:d||null}function qm(b,c){var d=b.getAttribute(c);if(!d)throw new I(J,4,4023,c);return d.value}function rm(b,c){this.oa=c;this.a=b}function sm(b,c){this.name=b;this.value=c};function tm(b,c){return b.filter(function(b){return b.name==c})}function um(b,c){return b.filter(function(b){return qm(b,"TYPE")==c})}function vm(b,c){var d=tm(b,c);return d.length?d[0]:null};function wm(b){this.b=b;this.a=0}function xm(b){ym(b,/[ \t]+/gm)}function ym(b,c){c.lastIndex=b.a;var d=c.exec(b.b);d=null==d?null:{position:d.index,length:d[0].length,Ce:d};if(b.a==b.b.length||null==d||d.position!=b.a)return null;b.a+=d.length;return d.Ce}function zm(b){return b.a==b.b.length?null:(b=ym(b,/[^ \t\n]*/gm))?b[0]:null};function Am(){this.a=0}
  function Bm(b,c,d){c=Qc(c);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var e=c.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(e[0]))throw new I(J,4,4015);c=0;for(var f=!0,g=r(e),h=g.next();!h.done;h=g.next())if(h=h.value,/^#(?!EXT)/m.test(h)||f)f=!1;else if(h=Cm(b.a++,h),--b.a,Dm.includes(h.name)){c=1;break}else"EXT-X-STREAM-INF"==h.name&&(f=!0);g=[];f=!0;h=r(lb(e));for(var k=h.next();!k.done;k=h.next()){var l=k.value;k=l.fa;var m=l.item;l=l.next;if(/^#(?!EXT)/m.test(m)||f)f=!1;else{m=Cm(b.a++,
  m);if(Em.includes(m.name)){if(1!=c)throw new I(J,4,4017);m=e.splice(k,e.length-k);e=d;f=[];h=[];k=null;m=r(m);for(l=m.next();!l.done;l=m.next())l=l.value,/^(#EXT)/.test(l)?(l=Cm(b.a++,l),Dm.includes(l.name)?g.push(l):"EXT-X-MAP"==l.name?k=l:h.push(l)):/^#(?!EXT)/m.test(l)||(l=ae([e],[l.trim()])[0],k&&h.push(k),f.push(new rm(l,h)),h=[]);return new nm(d,c,g,f)}g.push(m);"EXT-X-STREAM-INF"==m.name&&(m.a.push(new sm("URI",l)),f=!0)}}return new nm(d,c,g)}
  function Cm(b,c){var d=c.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new I(J,4,4016,c);var e=d[1],f=d[2];d=[];var g;if(f){f=new wm(f);var h;(h=ym(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=ym(f,k);)d.push(new sm(h[1],h[2]||h[3]))}return new om(b,e,d,g)}var Dm="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),Em="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Fm(){}F("shaka.net.DataUriPlugin",Fm);function Gm(b){try{var c=Hm(b);return Lb({uri:b,qd:b,data:c.data,headers:{"content-type":c.contentType}})}catch(d){return Jb(d)}}Fm.parse=Gm;
  function Hm(b){var c=b.split(":");if(2>c.length||"data"!=c[0])throw new I(J,1,1004,b);c=c.slice(1).join(":").split(",");if(2>c.length)throw new I(J,1,1004,b);var d=c[0];c=window.decodeURIComponent(c.slice(1).join(","));d=d.split(";");var e=null;1<d.length&&(e=d[1]);if("base64"==e)b=Yc(c);else{if(e)throw new I(J,1,1005,b);b=Tc(c)}return{data:b,contentType:d[0]}}ec("data",Gm);function Im(){var b=this;this.a=this.f=null;this.la=1;this.h=new Map;this.W=new Set;this.b=new Map;this.c=null;this.L="";this.F=new Am;this.V=0;this.l=new G(function(){Jm(b)});this.j=Km;this.D=null;this.N=0;this.P=Infinity;this.m=new cc;this.S=[];this.v=new Map;this.$=!1;this.g=new Map;this.w=null;this.H=new Map}F("shaka.hls.HlsParser",Im);p=Im.prototype;p.configure=function(b){this.a=b};
  p.start=function(b,c){var d=this;return v(function f(){var g,h;return B(f,function(f){switch(f.i){case 1:return d.f=c,x(f,Lm(d,hc([b],d.a.retryParameters),0),2);case 2:return g=f.o,d.L=g.uri,x(f,Mm(d,g.data),3);case 3:return h=d.V,0<h&&d.l.O(h),f["return"](d.D)}})})};p.stop=function(){this.l&&(this.l.stop(),this.l=null);var b=[];this.m&&(b.push(this.m.destroy()),this.m=null);this.a=this.f=null;this.W.clear();this.D=null;this.b.clear();this.h.clear();this.g.clear();return Promise.all(b)};
  p.update=function(){var b=this;return v(function d(){var e,f;return B(d,function(d){switch(d.i){case 1:if(b.j==Nm.La)return d["return"]();e=[];b.w=null;f=Array.from(b.b.values());if(!f.length){d.u(2);break}return x(d,Om(b,f[0]),2);case 2:for(var g=1;g<f.length;g++)e.push(Om(b,f[g]));return x(d,Promise.all(e),0)}})})};
  function Om(b,c){return v(function e(){var f,g,h,k,l,m,n,q;return B(e,function(e){switch(e.i){case 1:return f=Nm,g=c.Hd,x(e,Lm(b,hc([g],b.a.retryParameters),0),2);case 2:h=e.o;k=Bm(b.F,h.data,h.uri);if(1!=k.type)throw new I(J,4,4017);l=c.stream;return x(e,Pm(b,c.gc,k,l.mimeType,c.kd),3);case 3:m=e.o;l.segmentIndex.replace(m);n=m[m.length-1];if(q=vm(k.oa,"EXT-X-ENDLIST"))Qm(b,f.La),b.c.va(n.endTime);y(e)}})})}p.onExpirationUpdated=function(){};
  function Mm(b,c){return v(function e(){var f,g,h,k,l,m,n,q;return B(e,function(e){switch(e.i){case 1:f=Bm(b.F,c,b.L);if(0!=f.type)throw new I(J,4,4022);return x(e,Rm(b,f.oa),2);case 2:g=e.o;if(!b.f)throw new I(J,Fb,7001);if(b.$&&0==g.variants.length)throw new I(J,4,4034);b.f.filterAllPeriods([g]);k=h=Infinity;for(var t=r(b.b.values()),w=t.next();!w.done;w=t.next())l=w.value,h=Math.min(h,l.ld),"text"!=l.stream.type&&(k=Math.min(k,l.oe-l.ld));b.j!=Nm.La?(b.c=new Y(0,b.a.defaultPresentationDelay||3*
  b.N),b.c.Gb(!1)):(b.c=new Y(null,0),b.c.Gb(!0));Sm(b);if(b.j!=Nm.La)b.V=b.P,m=Nm,b.j==m.Wc&&(n=b.c.dc,isNaN(b.a.availabilityWindowOverride)||(n=b.a.availabilityWindowOverride),b.c.Pc(n));else for(b.c.va(k),b.c.offset(-h),t=r(b.b.values()),w=t.next();!w.done;w=t.next())q=w.value,q.stream.segmentIndex.offset(-h),q.stream.segmentIndex.ib(0,k);b.D={presentationTimeline:b.c,periods:[g],offlineSessionIds:[],minBufferTime:0};y(e)}})})}
  function Rm(b,c){return v(function e(){var f,g,h,k;return B(e,function(e){switch(e.i){case 1:f=tm(c,"EXT-X-MEDIA");g=tm(c,"EXT-X-STREAM-INF");for(var l=r(g),n=l.next();!n.done;n=l.next()){var q=n.value,t=pm(q,"AUDIO");n=pm(q,"VIDEO");var u=pm(q,"SUBTITLES");q=Tm(q);if(u){var w=Um("text",q);b.g.set(u,w);$b(q,w)}t&&(u=Vm("audio",q),b.g.set(t,u));n&&(t=Vm("video",q),b.g.set(n,t))}return x(e,Wm(b,f),2);case 2:l=um(f,"CLOSED-CAPTIONS");l=r(l);for(n=l.next();!n.done;n=l.next())u=n.value,n=Xm(u),t=qm(u,
  "GROUP-ID"),u=qm(u,"INSTREAM-ID"),b.v.get(t)||b.v.set(t,new Map),b.v.get(t).set(u,n);return x(e,Ym(b,g),3);case 3:return h=e.o,x(e,Zm(b,f),4);case 4:return k=e.o,e["return"]({startTime:0,variants:h,textStreams:k})}})})}
  function Zm(b,c){return v(function e(){var f,g,h,k,l,m,n,q;return B(e,function(e){switch(e.i){case 1:return f=um(c,"SUBTITLES"),g=f.map(function(c){return v(function H(){var e,f,g;return B(H,function(h){switch(h.i){case 1:if(e=b.a.disableText)return h["return"](null);z(h,2);return x(h,$m(b,c),4);case 4:return f=h.o,h["return"](f.stream);case 2:g=A(h);if(b.a.hls.ignoreTextStreamFailures)return h["return"](null);throw g;}})})}),x(e,Promise.all(g),2);case 2:h=e.o;for(var t=r(f),w=t.next();!w.done;w=
  t.next())if(k=w.value,l=qm(k,"GROUP-ID"),m=b.g.get(l))if(n=b.h.get(l)){w=r(n);for(var C=w.next();!C.done;C=w.next())q=C.value,q.stream.codecs=m}return e["return"](h.filter(function(b){return b}))}})})}
  function Wm(b,c){return v(function e(){var f;return B(e,function(e){switch(e.i){case 1:c=c.filter(function(b){var c=pm(b,"URI")||"";return"SUBTITLES"!=pm(b,"TYPE")&&""!=c});if(!c.length){e.u(2);break}return x(e,$m(b,c[0]),2);case 2:return f=c.slice(1).map(function(c){return $m(b,c)}),x(e,Promise.all(f),0)}})})}
  function Ym(b,c){return v(function e(){var f,g,h;return B(e,function(e){switch(e.i){case 1:return f=c.map(function(c){return v(function n(){var e,f,g,h,k,l,D;return B(n,function(n){switch(n.i){case 1:return e=pm(c,"FRAME-RATE"),f=Number(qm(c,"BANDWIDTH")),g=pm(c,"RESOLUTION"),h=r(g?g.split("x"):[null,null]),k=h.next().value,l=h.next().value,x(n,an(b,c,g,e),2);case 2:return(D=n.o)?n["return"](bn(b,D.audio,D.video,f,k,l,e)):n["return"]([])}})})}),x(e,Promise.all(f),2);case 2:return g=e.o,h=g.reduce(Xd,
  []),h=h.filter(function(b){return null!=b}),e["return"](h)}})})}
  function an(b,c,d,e){return v(function g(){var h,k,l,m,n,q,t,u,w,C,E,D,H,N;return B(g,function(g){switch(g.i){case 1:h=ce;k=Tm(c);l=pm(c,"AUDIO");m=pm(c,"VIDEO");q=(n=l||m)&&b.h.has(n)?b.h.get(n):[];t={audio:l?q:[],video:m?q:[]};w=!1;C=qm(c,"URI");E=t.audio.find(function(b){return b&&b.gc==C});D=Um(h.Ka,k);H=d||e||D;1!=k.length||H?!q.length&&1<k.length?(u=h.Ka,k=[k.join(",")]):t.audio.length&&E?(u=h.Ib,w=!0):u=t.video.length?h.Ib:h.Ka:u=h.Ib;if(w){g.u(2);break}return x(g,cn(b,c,k,u),3);case 3:N=g.o;
  case 2:if(N)t[N.stream.type]=[N];else if(null===N)return g["return"](null);dn(t);return g["return"](t)}})})}function Tm(b){var c=pm(b,"CODECS","avc1.42E01E,mp4a.40.2").split(/\s*,\s*/);b=new Set;var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=Gc(e)[0];b.has(f)||(d.push(e),b.add(f))}return d}function Xm(b){b=pm(b,"LANGUAGE")||"und";return bf(b)}
  function dn(b){b=r(b.audio.concat(b.video));for(var c=b.next();!c.done;c=b.next())if(c=c.value){var d=c.stream.codecs.split(",");d=d.filter(function(b){return"mp4a.40.34"!=b});c.stream.codecs=d.join(",")}}
  function bn(b,c,d,e,f,g,h){for(var k=r(d),l=k.next();!l.done;l=k.next()){l=l.value.stream;var m=g,n=h;l&&(l.width=Number(f)||void 0,l.height=Number(m)||void 0,l.frameRate=Number(n)||void 0)}f=b.a.disableAudio;if(!c.length||f)c=[null];f=b.a.disableVideo;if(!d.length||f)d=[null];f=[];c=r(c);for(g=c.next();!g.done;g=c.next())for(g=g.value,h=r(d),k=h.next();!k.done;k=h.next()){var q=k.value;k=g?g.stream:null;l=q?q.stream:null;m=g?g.drmInfos:null;n=q?q.drmInfos:null;q=(q?q.gc:"")+" - "+(g?g.gc:"");var t=
  void 0;if(k&&l)if(m.length&&n.length?0<Id(m,n).length:1)t=Id(m,n);else continue;else k?t=m:l&&(t=n);b.W.has(q)||(k={id:b.la++,language:k?k.language:"und",primary:!!k&&k.primary||!!l&&l.primary,audio:k,video:l,bandwidth:e,drmInfos:t,allowedByApplication:!0,allowedByKeySystem:!0},f.push(k),b.W.add(q))}return f}
  function $m(b,c){return v(function e(){var f,g,h,k,l,m,n,q,t,u,w;return B(e,function(e){switch(e.i){case 1:f=qm(c,"GROUP-ID");g="";var C=qm(c,"TYPE").toLowerCase();"subtitles"==C&&(C="text");h=C;"text"!=h&&f&&b.g.has(f)&&(g=b.g.get(f));k=qm(c,"URI");if(b.b.has(k))return e["return"](b.b.get(k));l=Xm(c);m=pm(c,"NAME");n=c.getAttribute("DEFAULT");q=c.getAttribute("AUTOSELECT");t=!!n||!!q;"audio"==h?(C=pm(c,"CHANNELS"))?(C=C.split("/")[0],C=parseInt(C,10)):C=null:C=null;u=C;return x(e,en(b,k,g,h,l,t,
  m,u,null),2);case 2:w=e.o;b.h.has(f)?b.h.get(f).push(w):b.h.set(f,[w]);if(null==w)return e["return"](null);if(b.b.has(k))return e["return"](b.b.get(k));b.b.set(k,w);return e["return"](w)}})})}
  function cn(b,c,d,e){return v(function g(){var h,k,l,m;return B(g,function(g){switch(g.i){case 1:h=qm(c,"URI");if(b.b.has(h))return g["return"](b.b.get(h));var n=pm(c,"CLOSED-CAPTIONS");k="video"==e&&n&&"NONE"!=n?b.v.get(n):null;l=Vm(e,d);return x(g,en(b,h,l,e,"und",!1,null,null,k),2);case 2:m=g.o;if(null==m)return g["return"](null);if(b.b.has(h))return g["return"](b.b.get(h));b.b.set(h,m);return g["return"](m)}})})}
  function en(b,c,d,e,f,g,h,k,l){return v(function n(){var q,t,u,w,C,E,D,H,N,ba,ka,ea,Ka,Qa,ca,eb,va,Rb,vk,wb,oa,Ma,ra;return B(n,function(n){switch(n.i){case 1:return q=ae([b.L],[c])[0],x(n,Lm(b,hc([q],b.a.retryParameters),0),2);case 2:t=n.o;q=t.uri;u=Bm(b.F,t.data,q);if(1!=u.type)throw new I(J,4,4017);w=[];if(u.segments)for(var wa=r(u.segments),sa=wa.next();!sa.done;sa=wa.next())C=sa.value,E=tm(C.oa,"EXT-X-KEY"),w.push.apply(w,Oa(E));D=!1;H=[];N=null;wa=r(w);for(sa=wa.next();!sa.done;sa=wa.next())if(ba=
  sa.value,ka=qm(ba,"METHOD"),"NONE"!=ka){D=!0;if("AES-128"==ka)return b.$=!0,n["return"](null);ea=qm(ba,"KEYFORMAT");if(Qa=(Ka=fn[ea])?Ka(ba):null)Qa.keyIds.length&&(N=Qa.keyIds[0]),H.push(Qa)}if(D&&!H.length)throw new I(J,4,4026);gn(b,u);return x(n,hn(b,e,d,u),3);case 3:return ca=n.o,jn.includes(ca)&&(d=""),eb=new Map,z(n,4),x(n,Pm(b,c,u,ca,eb),6);case 6:va=n.o;Ea(n,5);break;case 4:Rb=A(n);if(4035==Rb.code)return ab("Skipping unsupported HLS stream",ca,c),n["return"](null);throw Rb;case 5:return vk=
  va[0].startTime,wb=va[va.length-1].endTime,oa=new Q(va),Ma="text"==e?"subtitle":void 0,ra={id:b.la++,originalId:h,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:oa,mimeType:ca,codecs:d,kind:Ma,encrypted:D,keyId:N,language:f,label:h,type:e,primary:g,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:k,audioSamplingRate:null,closedCaptions:l},n["return"]({stream:ra,drmInfos:H,gc:c,
  Hd:q,ld:vk,oe:wb,kd:eb})}})})}function gn(b,c){var d=Nm,e=vm(c.oa,"EXT-X-PLAYLIST-TYPE"),f=vm(c.oa,"EXT-X-ENDLIST");f=e&&"VOD"==e.value||f;e=e&&"EVENT"==e.value&&!f;e=!f&&!e;f?Qm(b,d.La):(e?Qm(b,d.Wc):Qm(b,d.Ed),d=kn(c.oa,"EXT-X-TARGETDURATION"),d=Number(d.value),b.N=Math.max(d,b.N),b.P=Math.min(d,b.P))}function ln(b,c,d){var e=qm(d,"URI");e=ae([c],[e])[0];c=[e,pm(d,"BYTERANGE","")].join("-");b.H.has(c)||(d=mn(e,d),b.H.set(c,d));return b.H.get(c)}
  function mn(b,c){var d=0,e=null,f=pm(c,"BYTERANGE");f&&(d=f.split("@"),e=Number(d[0]),d=Number(d[1]),e=d+e-1);return new Bg(function(){return[b]},d,e)}function nn(b,c,d,e){var f=d.oa,g=d.a;d=kn(f,"EXTINF").value.split(",");d=e+Number(d[0]);var h=0,k=null;if(f=vm(f,"EXT-X-BYTERANGE"))h=f.value.split("@"),f=Number(h[0]),h=h[1]?Number(h[1]):c.a+1,k=h+f-1;return new Cg(e,d,function(){return[g]},h,k,b,0,0,Infinity)}
  function Sm(b){if(b.c){for(var c=r(b.S),d=c.next();!d.done;d=c.next())b.c.nb(d.value);b.S=[]}}
  function Pm(b,c,d,e,f){return v(function h(){var k,l,m,n,q,t,u,w,C,E,D,H,N,ba,ka,ea,Ka,Qa;return B(h,function(h){switch(h.i){case 1:return k=d.segments,l=[],m=k[0].a,q=(n=vm(d.oa,"EXT-X-MEDIA-SEQUENCE"))?Number(n.value):0,u=(t=vm(k[0].oa,"EXT-X-MAP"))?ln(b,d.a,t):null,w=nn(u,null,k[0],0),x(h,on(b,c,u,w,e,q),2);case 2:C=h.o;cb(m.split("/").pop());E=function(b){return lb(b)};for(var ca=r(E(k)),va=ca.next();!va.done;va=ca.next())H=D=va.value,N=H.fa,ba=H.item,ka=l[l.length-1],ea=0==N?C:ka.endTime,Ka=
  q+N,f.set(Ka,ea),u=(t=vm(ba.oa,"EXT-X-MAP"))?ln(b,d.a,t):null,Qa=nn(u,ka,ba,ea),l.push(Qa);b.S.push(l);Sm(b);return h["return"](l)}})})}
  function pn(b,c){return v(function e(){var f,g,h,k,l,m;return B(e,function(e){switch(e.i){case 1:return f=nc,g=Og(c.c(),c.b,c.b+2048-1,b.a.retryParameters),h=Og(c.c(),c.b,c.a,b.a.retryParameters),z(e,2),x(e,Lm(b,g,f),4);case 4:return k=e.o,e["return"](k);case 2:l=A(e);if(7001==l.code)throw l;ab("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive!  Your server should support Range requests and CORS preflights.",g.uris[0]);return x(e,Lm(b,h,f),5);case 5:return m=
  e.o,e["return"](m)}})})}function on(b,c,d,e,f,g){return v(function k(){var l;return B(k,function(k){switch(k.i){case 1:if(null!=b.w){k.u(2);break}l=b;return x(k,qn(b,c,d,e,f,g),3);case 3:l.w=k.o;case 2:return k["return"](b.w)}})})}
  function qn(b,c,d,e,f,g){return v(function k(){var l,m,n,q,t,u,w;return B(k,function(k){switch(k.i){case 1:if(b.D&&(l=b.b.get(c),m=l.kd.get(g),void 0!=m))return k["return"](m);f=f.toLowerCase();if(jn.includes(f))throw ab("Raw formats are not yet supported.  Skipping "+f),new I(1,4,4035);if("video/webm"==f)throw ab("WebM in HLS is not yet supported.  Skipping."),new I(1,4,4035);if("video/mp4"!=f&&"audio/mp4"!=f){k.u(2);break}n=[pn(b,e)];d&&n.push(pn(b,d));return x(k,Promise.all(n),3);case 3:return q=
  k.o,t=q[0],u=q[1]||q[0],k["return"](rn(c,t.uri,t.data,u.data));case 2:if("video/mp2t"!=f){k.u(4);break}return x(k,pn(b,e),5);case 5:return w=k.o,k["return"](sn(c,w.uri,w.data));case 4:throw new I(J,4,4030,c);}})})}
  function rn(b,c,d,e){var f=0;(new S).I("moov",Kg).I("trak",Kg).I("mdia",Kg).ea("mdhd",function(b){b.reader.skip(0==b.version?8:16);f=b.reader.G();b.parser.stop()}).parse(e,!0);if(!f)throw new I(J,4,4030,b,c);var g=0,h=!1;(new S).I("moof",Kg).I("traf",Kg).ea("tfdt",function(b){g=(0==b.version?b.reader.G():b.reader.qb())/f;h=!0;b.parser.stop()}).parse(d,!0);if(!h)throw new I(J,4,4030,b,c);return g}
  function sn(b,c,d){function e(){throw new I(J,4,4030,b,c);}d=new R(d,0);for(var f=0,g=0;;)if(f=d.B,g=d.na(),71!=g&&e(),d.Db()&16384||e(),g=(d.na()&48)>>4,0!=g&&2!=g||e(),3==g&&(g=d.na(),d.skip(g)),1!=d.G()>>8)d.seek(f+188),g=d.na(),71!=g&&(d.seek(f+192),g=d.na()),71!=g&&(d.seek(f+204),g=d.na()),71!=g&&e(),d.td(1);else return d.skip(3),f=d.na()>>6,0!=f&&1!=f||e(),0==d.na()&&e(),f=d.na(),g=d.Db(),d=d.Db(),(1073741824*((f&14)>>1)+((g&65534)<<14|(d&65534)>>1))/9E4}
  function Vm(b,c){if(1==c.length)return c[0];var d=Um(b,c);if(null!=d)return d;throw new I(J,4,4025,c);}function Um(b,c){for(var d=r(tn[b]),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=r(c),g=f.next();!g.done;g=f.next())if(g=g.value,e.test(g.trim()))return g.trim()}return"text"==b?"":null}
  function hn(b,c,d,e){return v(function g(){var h,k,l,m,n,q,t,u,w,C;return B(g,function(g){switch(g.i){case 1:h=ce;k=nc;l=e.segments[0].a;m=new nb(l);n=m.ja.split(".").pop();q=un[c];if(t=q[n])return g["return"](t);if(c==h.X)return d&&"vtt"!=d?g["return"]("application/mp4"):g["return"]("text/vtt");u=hc([l],b.a.retryParameters);u.method="HEAD";return x(g,Lm(b,u,k),2);case 2:w=g.o;C=w.headers["content-type"];if(!C)throw new I(J,4,4021,n);return g["return"](C.split(";")[0])}})})}
  function kn(b,c){var d=vm(b,c);if(!d)throw new I(J,4,4024,c);return d}function Jm(b){v(function d(){var e,f;return B(d,function(d){switch(d.i){case 1:if(!b.f)return d["return"]();z(d,2);return x(d,b.update(),4);case 4:e=b.V;b.l.O(e);Ea(d,0);break;case 2:f=A(d);if(!b.f)return d["return"]();f.severity=1;b.f.onError(f);b.l.O(.1);y(d)}})})}function Qm(b,c){b.j=c;b.c&&b.c.Gb(b.j==Nm.La);b.j!=Nm.La||b.l.stop()}
  function Lm(b,c,d){if(!b.m)throw new I(J,Fb,7001);c=b.f.networkingEngine.request(d,c);dc(b.m,c);return c.promise}
  var tn={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},jn=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],un={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",
  vtt:"text/vtt",ttml:"application/ttml+xml"}},fn={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(b){var c=qm(b,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c))return null;c=qm(b,"URI");c=Hm(c);c=K(c.data);c=be("com.widevine.alpha",[{initDataType:"cenc",initData:c}]);if(b=pm(b,"KEYID"))c.keyIds=[b.substr(2).toLowerCase()];return c}},Km="VOD",Nm={La:Km,Ed:"EVENT",Wc:"LIVE"};Of.m3u8=function(){return new Im};Pf["application/x-mpegurl"]=function(){return new Im};
  Pf["application/vnd.apple.mpegurl"]=function(){return new Im};function vn(b,c,d,e,f,g){if(200<=d&&299>=d&&202!=d)return{uri:f||e,qd:e,data:c,headers:b,fromCache:!!b["x-shaka-from-cache"]};f=null;try{f=Sc(c)}catch(h){}throw new I(401==d||403==d?J:1,1,1001,e,d,f,b,g);};function wn(){}F("shaka.net.HttpFetchPlugin",wn);function xn(b,c,d,e){var f=new yn;Ac(c.headers).forEach(function(b,c){f.append(c,b)});var g=new zn,h={Xc:!1,yd:!1};b=An(b,d,{body:c.body||void 0,headers:f,method:c.method,signal:g.signal,credentials:c.allowCrossSiteCredentials?"include":void 0},h,e);b=new Ib(b,function(){h.Xc=!0;g.abort();return Promise.resolve()});if(c=c.retryParameters.timeout){var k=new G(function(){h.yd=!0;g.abort()});k.O(c/1E3);b["finally"](function(){k.stop()})}return b}
  wn.parse=xn;
  function An(b,c,d,e,f){return v(function h(){var k,l,m,n,q,t,u,w,C,E,D,H,N,ba;return B(h,function(h){switch(h.i){case 1:return k=Bn,l=Cn,t=q=0,u=Date.now(),z(h,2),x(h,k(b,d),4);case 4:return m=h.o,w=m.clone().body.getReader(),E=(C=m.headers.get("Content-Length"))?parseInt(C,10):0,D=function(b){function c(){return v(function ca(){var d,e;return B(ca,function(h){switch(h.i){case 1:return z(h,2),x(h,w.read(),4);case 4:d=h.o;Ea(h,3);break;case 2:return A(h),h["return"]();case 3:d.done||(q+=d.value.byteLength);
  e=Date.now();if(100<e-u||d.done)f(e-u,q-t,E-q),t=q,u=e;d.done?b.close():(b.enqueue(d.value),c());y(h)}})})}c()},new l({start:D}),x(h,m.arrayBuffer(),5);case 5:n=h.o;Ea(h,3);break;case 2:H=A(h);if(e.Xc)throw new I(1,1,7001,b,c);if(e.yd)throw new I(1,1,1003,b,c);throw new I(1,1,1002,b,H,c);case 3:return N={},ba=m.headers,ba.forEach(function(b,c){N[c.trim()]=b}),h["return"](vn(N,n,m.status,b,m.url,c))}})})}
  function Dn(){if(window.ReadableStream)try{new ReadableStream({})}catch(b){return!1}else return!1;return!(!window.fetch||!window.AbortController)}wn.isSupported=Dn;var Bn=window.fetch,zn=window.AbortController,Cn=window.ReadableStream,yn=window.Headers;Dn()&&(ec("http",xn,2),ec("https",xn,2));function En(){}F("shaka.net.HttpXHRPlugin",En);
  function Fn(b,c,d,e){var f=new Gn,g=Date.now(),h=0,k=new Promise(function(k,m){f.open(c.method,b,!0);f.responseType="arraybuffer";f.timeout=c.retryParameters.timeout;f.withCredentials=c.allowCrossSiteCredentials;f.onabort=function(){m(new I(1,1,7001,b,d))};f.onload=function(c){c=c.target;var e=c.getAllResponseHeaders().trim().split("\r\n"),f={};e=r(e);for(var g=e.next();!g.done;g=e.next())g=g.value.split(": "),f[g[0].toLowerCase()]=g.slice(1).join(": ");try{var h=vn(f,c.response,c.status,b,c.responseURL,
  d);k(h)}catch(E){m(E)}};f.onerror=function(c){m(new I(1,1,1002,b,c,d))};f.ontimeout=function(){m(new I(1,1,1003,b,d))};f.onprogress=function(b){var c=Date.now();if(100<c-g||b.lengthComputable&&b.loaded==b.total)e(c-g,b.loaded-h,b.total-b.loaded),h=b.loaded,g=c};for(var l in c.headers)f.setRequestHeader(l.toLowerCase(),c.headers[l]);f.send(c.body)});return new Ib(k,function(){f.abort();return Promise.resolve()})}En.parse=Fn;var Gn=window.XMLHttpRequest;ec("http",Fn,1);ec("https",Fn,1);function Hn(){this.a=this.f=this.b=0;this.c=new Map;this.g=0}function In(b,c){b.b+=c;var d=b.g;b.g++;b.c.set(d,c);return d}Hn.prototype.close=function(b,c){if(this.c.has(b)){var d=this.c.get(b);this.c["delete"](b);this.f+=d;this.a+=c}};function Jn(b,c,d){var e=this;this.h=b;this.b=new Map;this.c=new oc(function(){var b=Array.from(e.b.values());return Promise.all(b.map(function(b){return b["catch"](function(){})}))});this.g=c;this.f=d;this.a=new Hn}Jn.prototype.destroy=function(){return this.c.destroy()};
  function Kn(b,c,d,e,f,g){pc(b.c);var h=In(b.a,e);e=b.b.get(c)||Promise.resolve();b.b.set(c,e.then(function(){return v(function l(){var c,e,q,t,u,w;return B(l,function(l){switch(l.i){case 1:return x(l,Ln(b,d),2);case 2:c=l.o;if(b.c.a)throw new I(J,9,7001);if(f){e=K(c);q=new Mk(e);for(var m in q.data)t=Number(m),u=q.data[t],w=q.a[t],b.f(u,w)}b.a.close(h,c.byteLength);m=b.a;b.g(0==m.b?0:m.f/m.b,b.a.a);return l["return"](g(c))}})})}))}
  function Mn(b){return v(function d(){return B(d,function(d){switch(d.i){case 1:return x(d,Promise.all(b.b.values()),2);case 2:return d["return"](b.a.a)}})})}function Ln(b,c){return v(function e(){var f,g,h;return B(e,function(e){switch(e.i){case 1:return f=nc,g=b.h.request(f,c),x(e,g.promise,2);case 2:return h=e.o,e["return"](h.data)}})})};function Nn(b,c){var d=this;this.c=b;this.b=b.objectStore(c);this.a=new Hb;b.onabort=function(b){b.preventDefault();d.a.reject()};b.onerror=function(b){b.preventDefault();d.a.reject()};b.oncomplete=function(){d.a.resolve()}}Nn.prototype.abort=function(){var b=this;return v(function d(){return B(d,function(d){switch(d.i){case 1:try{b.c.abort()}catch(f){}z(d,2);return x(d,b.a,4);case 4:Ea(d,0);break;case 2:A(d),y(d)}})})};
  function On(b,c){return new Promise(function(d,e){var f=b.b.openCursor();f.onerror=e;f.onsuccess=function(b){(b=b.target.result)?(c(b.key,b.value,b),b["continue"]()):d()}})}Nn.prototype.store=function(){return this.b};Nn.prototype.promise=function(){return this.a};function Pn(b){this.b=b;this.a=[]}Pn.prototype.destroy=function(){return Promise.all(this.a.map(function(b){return b.abort()}))};function Qn(b,c){return Rn(b,c,"readwrite")}function Rn(b,c,d){d=b.b.transaction([c],d);var e=new Nn(d,c);b.a.push(e);e.promise().then(function(){$b(b.a,e)},function(){$b(b.a,e)});return e};function Sn(b,c,d){this.b=new Pn(b);this.c=c;this.a=d}p=Sn.prototype;p.destroy=function(){return this.b.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return Tn(this.c)};p.removeSegments=function(b,c){return Un(this,this.c,b,c)};p.getSegments=function(b){var c=this;return v(function e(){var f;return B(e,function(e){switch(e.i){case 1:return x(e,Vn(c,c.c,b),2);case 2:return f=e.o,e["return"](f.map(function(b){return c.Yc(b)}))}})})};p.addManifests=function(){return Tn(this.a)};
  p.updateManifestExpiration=function(b,c){var d=Qn(this.b,this.a),e=d.store();e.get(b).onsuccess=function(d){if(d=d.target.result)d.expiration=c,e.put(d,b)};return d.promise()};p.removeManifests=function(b,c){return Un(this,this.a,b,c)};p.getManifests=function(b){var c=this;return v(function e(){var f;return B(e,function(e){switch(e.i){case 1:return x(e,Vn(c,c.a,b),2);case 2:return f=e.o,e["return"](f.map(function(b){return c.Qb(b)}))}})})};
  p.getAllManifests=function(){var b=this;return v(function d(){var e,f;return B(d,function(d){switch(d.i){case 1:return e=Rn(b.b,b.a,"readonly"),f=new Map,x(d,On(e,function(d,e){f.set(d,b.Qb(e))}),2);case 2:return x(d,e.promise(),3);case 3:return d["return"](f)}})})};p.Yc=function(b){return b};p.Qb=function(b){return b};function Tn(b){return Promise.reject(new I(J,9,9011,"Cannot add new value to "+b))}
  p.add=function(b,c){var d=this;return v(function f(){var g,h,k,l,m;return B(f,function(f){switch(f.i){case 1:g=Qn(d.b,b);h=g.store();k=[];for(var n=r(c),t=n.next();!t.done;t=n.next())l=t.value,m=h.add(l),m.onsuccess=function(b){k.push(b.target.result)};return x(f,g.promise(),2);case 2:return f["return"](k)}})})};
  function Un(b,c,d,e){b=Qn(b.b,c);c=b.store();var f={};d=r(d);for(var g=d.next();!g.done;f={key:f.key},g=d.next())f.key=g.value,c["delete"](f.key).onsuccess=function(b){return function(){return e(b.key)}}(f);return b.promise()}
  function Vn(b,c,d){return v(function f(){var g,h,k,l,m,n,q;return B(f,function(f){switch(f.i){case 1:g=Rn(b.b,c,"readonly");h=g.store();k={};l=[];m={};n=r(d);for(q=n.next();!q.done;m={request:m.request,key:m.key},q=n.next())m.key=q.value,m.request=h.get(m.key),m.request.onsuccess=function(b){return function(){void 0==b.request.result&&l.push(b.key);k[b.key]=b.request.result}}(m);return x(f,g.promise(),2);case 2:if(l.length)throw new I(J,9,9012,"Could not find values for "+l);return f["return"](d.map(function(b){return k[b]}))}})})}
  ;function Wn(b){this.a=new Pn(b)}Wn.prototype.destroy=function(){return this.a.destroy()};Wn.prototype.getAll=function(){var b=this;return v(function d(){var e,f;return B(d,function(d){switch(d.i){case 1:return e=Rn(b.a,"session-ids","readonly"),f=[],x(d,On(e,function(b,d){f.push(d)}),2);case 2:return x(d,e.promise(),3);case 3:return d["return"](f)}})})};Wn.prototype.add=function(b){var c=Qn(this.a,"session-ids"),d=c.store();b=r(b);for(var e=b.next();!e.done;e=b.next())d.add(e.value);return c.promise()};
  Wn.prototype.remove=function(b){var c=this;return v(function e(){var f;return B(e,function(e){switch(e.i){case 1:return f=Qn(c.a,"session-ids"),x(e,On(f,function(c,e,f){b.includes(e.sessionId)&&f["delete"]()}),2);case 2:return x(e,f.promise(),0)}})})};function Xn(){this.a=new Map}Xn.prototype.destroy=function(){for(var b=[],c=r(this.a.values()),d=c.next();!d.done;d=c.next())b.push(d.value.destroy());this.a.clear();return Promise.all(b)};Xn.prototype.init=function(){var b=this;Yn.forEach(function(c,d){var e=c();e&&b.a.set(d,e)});for(var c=[],d=r(this.a.values()),e=d.next();!e.done;e=d.next())c.push(e.value.init());return Promise.all(c)};
  function Zn(b){var c=null;b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){b.hasFixedKeySpace()||c||(c={path:{ta:e,ba:d},ba:b})})});if(c)return c;throw new I(J,9,9013,"Could not find a cell that supports add-operations");}function $n(b,c){b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){c({ta:e,ba:d},b)})})}
  function ao(b,c,d){b=b.a.get(c);if(!b)throw new I(J,9,9013,"Could not find mechanism with name "+c);c=b.getCells().get(d);if(!c)throw new I(J,9,9013,"Could not find cell with name "+d);return c}function bo(b,c){b.a.forEach(function(b){c(b.getEmeSessionCell())})}function co(b){var c=Array.from(b.a.keys());if(!c.length)throw new I(J,9,9E3,"No supported storage mechanisms found");return b.a.get(c[0]).getEmeSessionCell()}
  Xn.prototype.erase=function(){var b=this;return v(function d(){var e,f,g;return B(d,function(d){switch(d.i){case 1:return e=Array.from(b.a.values()),f=0<e.length,f||(g=Yn,g.forEach(function(b){(b=b())&&e.push(b)})),x(d,Promise.all(e.map(function(b){return b.erase()})),2);case 2:if(f)d.u(0);else return x(d,Promise.all(e.map(function(b){return b.destroy()})),0)}})})};function eo(b,c){Yn.set(b,c)}F("shaka.offline.StorageMuxer.register",eo);F("shaka.offline.StorageMuxer.unregister",function(b){Yn["delete"](b)});
  var Yn=new Map;function fo(b){Sn.apply(this,arguments)}za(fo,Sn);fo.prototype.updateManifestExpiration=function(b,c){var d=this;return v(function f(){var g,h,k;return B(f,function(f){switch(f.i){case 1:return g=Qn(d.b,d.a),h=g.store(),k=new Hb,h.get(b).onsuccess=function(d){(d=d.target.result)?(d.expiration=c,h.put(d),k.resolve()):k.reject(new I(J,9,9012,"Could not find values for "+b))},x(f,Promise.all([g.promise(),k]),0)}})})};
  fo.prototype.Qb=function(b){return{originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:null==b.expiration?Infinity:b.expiration,periods:b.periods.map(go),sessionIds:b.sessionIds,drmInfo:b.drmInfo,appMetadata:b.appMetadata}};function go(b){ho(b);for(var c=r(b.streams),d=c.next();!d.done;d=c.next());return{startTime:b.startTime,streams:b.streams.map(io)}}
  function io(b){var c=b.initSegmentUri?jo(b.initSegmentUri):null;return{id:b.id,originalId:null,primary:b.primary,presentationTimeOffset:b.presentationTimeOffset,contentType:b.contentType,mimeType:b.mimeType,codecs:b.codecs,frameRate:b.frameRate,pixelAspectRatio:void 0,kind:b.kind,language:b.language,label:b.label,width:b.width,height:b.height,initSegmentKey:c,encrypted:b.encrypted,keyId:b.keyId,segments:b.segments.map(ko),variantIds:b.variantIds}}
  function ko(b){var c=jo(b.uri);return{startTime:b.startTime,endTime:b.endTime,dataKey:c}}fo.prototype.Yc=function(b){return{data:b.data}};function jo(b){var c;if((c=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(b))||(c=/^offline:segment\/([0-9]+)$/.exec(b)))return Number(c[1]);throw new I(J,9,9004,"Could not parse uri "+b);}
  function ho(b){var c=b.streams.filter(function(b){return"audio"==b.contentType});b=b.streams.filter(function(b){return"video"==b.contentType});if(!c.every(function(b){return b.variantIds})||!b.every(function(b){return b.variantIds})){for(var d=r(c),e=d.next();!e.done;e=d.next())e.value.variantIds=[];d=r(b);for(e=d.next();!e.done;e=d.next())e.value.variantIds=[];d=0;if(b.length&&!c.length){var f=d++,g=r(b);for(e=g.next();!e.done;e=g.next())e.value.variantIds.push(f)}if(!b.length&&c.length)for(f=d++,
  g=r(c),e=g.next();!e.done;e=g.next())e.value.variantIds.push(f);if(b.length&&c.length)for(c=r(c),e=c.next();!e.done;e=c.next())for(e=e.value,f=r(b),g=f.next();!g.done;g=f.next()){g=g.value;var h=d++;e.variantIds.push(h);g.variantIds.push(h)}}};function lo(b,c,d,e){Sn.call(this,b,c,d);this.f=e}za(lo,Sn);lo.prototype.hasFixedKeySpace=function(){return this.f};lo.prototype.addSegments=function(b){return this.f?Tn(this.c):this.add(this.c,b)};lo.prototype.addManifests=function(b){return this.f?Tn(this.a):this.add(this.a,b)};lo.prototype.Qb=function(b){null==b.expiration&&(b.expiration=Infinity);return b};function mo(){this.g=this.c=this.b=this.a=this.f=null}p=mo.prototype;
  p.init=function(){var b=this,c=new Hb,d=window.indexedDB.open("shaka_offline_db",4);d.onsuccess=function(d){d=d.target.result;b.f=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new fo(d,"segment","manifest"):null;b.a=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new lo(d,"segment-v2","manifest-v2",!0):null;b.b=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new lo(d,"segment-v3","manifest-v3",!1):null;b.c=e;d=
  d.objectStoreNames.contains("session-ids")?new Wn(d):null;b.g=d;c.resolve()};d.onupgradeneeded=function(b){b=b.target.result;for(var c=r(["segment-v3","manifest-v3","session-ids"]),d=c.next();!d.done;d=c.next())d=d.value,b.objectStoreNames.contains(d)||b.createObjectStore(d,{autoIncrement:!0})};d.onerror=function(b){c.reject(new I(J,9,9001,d.error));b.preventDefault()};return c};
  p.destroy=function(){var b=this;return v(function d(){return B(d,function(d){switch(d.i){case 1:if(!b.a){d.u(2);break}return x(d,b.a.destroy(),2);case 2:if(!b.b){d.u(4);break}return x(d,b.b.destroy(),4);case 4:if(!b.c){d.u(6);break}return x(d,b.c.destroy(),6);case 6:if(!b.g){d.u(8);break}return x(d,b.g.destroy(),8);case 8:b.f&&b.f.close(),y(d)}})})};p.getCells=function(){var b=new Map;this.a&&b.set("v1",this.a);this.b&&b.set("v2",this.b);this.c&&b.set("v3",this.c);return b};p.getEmeSessionCell=function(){return this.g};
  p.erase=function(){var b=this;return v(function d(){return B(d,function(d){switch(d.i){case 1:if(!b.a){d.u(2);break}return x(d,b.a.destroy(),2);case 2:if(!b.b){d.u(4);break}return x(d,b.b.destroy(),4);case 4:if(!b.c){d.u(6);break}return x(d,b.c.destroy(),6);case 6:return b.f&&b.f.close(),x(d,no(),8);case 8:return b.f=null,b.a=null,b.b=null,b.c=null,x(d,b.init(),0)}})})};
  function no(){var b=new Hb,c=window.indexedDB.deleteDatabase("shaka_offline_db");c.onblocked=function(){};c.onsuccess=function(){b.resolve()};c.onerror=function(d){b.reject(new I(J,9,9001,c.error));d.preventDefault()};return b}eo("idb",function(){return window.indexedDB?new mo:null});function oo(b,c,d,e){this.a=b;this.g=c;this.f=d;this.c=e;this.b=["offline:",b,"/",c,"/",d,"/",e].join("")}oo.prototype.ta=function(){return this.g};oo.prototype.ba=function(){return this.f};oo.prototype.key=function(){return this.c};oo.prototype.toString=function(){return this.b};
  function po(b){b=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(b);if(null==b)return null;var c=b[1];if("manifest"!=c&&"segment"!=c)return null;var d=b[2];if(!d)return null;var e=b[3];return e&&null!=c?new oo(c,d,e,Number(b[4])):null};function qo(b,c){this.b=b;this.a=c}
  function ro(b,c){var d=new Y(null,0);d.va(c.duration);var e=[],f=lb(c.periods);f=r(f);for(var g=f.next();!g.done;g=f.next()){var h=g.value;g=h.item;h=h.next;e.push(so(b,g,h?h.startTime-g.startTime:c.duration-g.startTime,d))}f=c.drmInfo?[c.drmInfo]:[];if(c.drmInfo)for(g=r(e),h=g.next();!h.done;h=g.next()){h=r(h.value.variants);for(var k=h.next();!k.done;k=h.next())k.value.drmInfos=f}return{presentationTimeline:d,minBufferTime:2,offlineSessionIds:c.sessionIds,periods:e}}
  function so(b,c,d,e){var f=c.streams.filter(function(b){return"audio"==b.contentType}),g=c.streams.filter(function(b){return"video"==b.contentType}),h=c.startTime;f=to(b,f,g,e,h,d);g=c.streams.filter(function(b){return"text"==b.contentType}).map(function(c){return uo(b,c,e,h,d)});return{startTime:c.startTime,variants:Array.from(f.values()),textStreams:g}}
  function to(b,c,d,e,f,g){for(var h=new Set,k=r(c),l=k.next();!l.done;l=k.next()){var m=r(l.value.variantIds);for(l=m.next();!l.done;l=m.next())h.add(l.value)}k=r(d);for(l=k.next();!l.done;l=k.next())for(m=r(l.value.variantIds),l=m.next();!l.done;l=m.next())h.add(l.value);k=new Map;h=r(h);for(l=h.next();!l.done;l=h.next())l=l.value,k.set(l,{id:l,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});c=r(c);for(h=c.next();!h.done;h=c.next())for(h=
  h.value,l=uo(b,h,e,f,g),m=r(h.variantIds),h=m.next();!h.done;h=m.next())h=k.get(h.value),h.language=l.language,h.primary=h.primary||l.primary,h.audio=l;d=r(d);for(c=d.next();!c.done;c=d.next())for(h=c.value,c=uo(b,h,e,f,g),l=r(h.variantIds),h=l.next();!h.done;h=l.next())h=k.get(h.value),h.primary=h.primary||c.primary,h.video=c;return k}
  function uo(b,c,d,e,f){var g=null!=c.initSegmentKey?vo(b,c.initSegmentKey):null,h=c.presentationTimeOffset,k=c.segments.map(function(c){return wo(b,c,g,h,e,f)});d.nb(k);return{id:c.id,originalId:c.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Q(k),mimeType:c.mimeType,codecs:c.codecs,width:c.width||void 0,height:c.height||void 0,frameRate:c.frameRate||void 0,pixelAspectRatio:c.pixelAspectRatio||void 0,kind:c.kind,encrypted:c.encrypted,keyId:c.keyId,language:c.language,
  label:c.label||null,type:c.contentType,primary:c.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null}}function wo(b,c,d,e,f,g){var h=new oo("segment",b.b,b.a,c.dataKey);return new Cg(f+c.startTime,f+c.endTime,function(){return[h.toString()]},0,null,d,f-e,f,f+g)}function vo(b,c){var d=new oo("segment",b.b,b.a,c);return new Bg(function(){return[d.toString()]},0,null)};function xo(){this.a=null}p=xo.prototype;p.configure=function(){};p.start=function(b){var c=this;return v(function e(){var f,g,h,k,l,m;return B(e,function(e){switch(e.i){case 1:f=po(b);c.a=f;if(null==f||"manifest"!=f.a)throw new I(J,1,9004,b);g=new Xn;Da(e,2);return x(e,g.init(),4);case 4:return x(e,ao(g,f.ta(),f.ba()),5);case 5:return h=e.o,x(e,h.getManifests([f.key()]),6);case 6:return k=e.o,l=k[0],m=new qo(f.ta(),f.ba()),e["return"](ro(m,l));case 2:return Fa(e),x(e,g.destroy(),7);case 7:Ga(e,0)}})})};
  p.stop=function(){return Promise.resolve()};p.update=function(){};
  p.onExpirationUpdated=function(b,c){var d=this;return v(function f(){var g,h,k,l,m,n,q;return B(f,function(f){switch(f.i){case 1:return g=d.a,h=new Xn,z(f,2,3),x(f,h.init(),5);case 5:return x(f,ao(h,g.ta(),g.ba()),6);case 6:return k=f.o,x(f,k.getManifests([g.key()]),7);case 7:l=f.o;m=l[0];n=m.sessionIds.includes(b);q=void 0==m.expiration||m.expiration>c;if(!n||!q){f.u(3);break}return x(f,k.updateManifestExpiration(g.key(),c),3);case 3:return Fa(f),x(f,h.destroy(),10);case 10:Ga(f,0);break;case 2:A(f),
  f.u(3)}})})};Pf["application/x-offline-manifest"]=function(){return new xo};function yo(){}F("shaka.offline.OfflineScheme",yo);function zo(b){var c=po(b);c&&"manifest"==c.a?(b={uri:b,qd:b,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},b=Lb(b)):b=c&&"segment"==c.a?Ao(c.key(),c):Jb(new I(J,1,9004,b));return b}yo.plugin=zo;
  function Ao(b,c){var d=new Xn;return Lb(void 0).T(function(){return d.init()}).T(function(){return ao(d,c.ta(),c.ba())}).T(function(b){return b.getSegments([c.key()])}).T(function(b){return{uri:c,data:b[0].data,headers:{}}})["finally"](function(){return d.destroy()})}ec("offline",zo);function Bo(b,c,d){return v(function f(){var g,h,k,l,m,n;return B(f,function(f){switch(f.i){case 1:g=[];for(var q=[],u=r(d),w=u.next();!w.done;w=u.next()){w=w.value;for(var C=!1,E=r(q),D=E.next();!D.done;D=E.next())if(D=D.value,Co(D.info,w)){D.sessionIds.push(w.sessionId);C=!0;break}C||q.push({info:w,sessionIds:[w.sessionId]})}h=r(q);k=h.next();case 2:if(k.done){f.u(4);break}l=k.value;m=Do(b,c,l);return x(f,m,5);case 5:n=f.o;g=g.concat(n);k=h.next();f.u(2);break;case 4:return f["return"](g)}})})}
  function Do(b,c,d){return v(function f(){var g,h;return B(f,function(f){switch(f.i){case 1:return g=new bd({mb:c,onError:function(){},ac:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),z(f,2),g.configure(b),x(f,jd(g,d.info.keySystem,d.info.licenseUri,d.info.serverCertificate,d.info.audioCapabilities,d.info.videoCapabilities),4);case 4:Ea(f,3);break;case 2:return A(f),x(f,g.destroy(),5);case 5:return f["return"]([]);case 3:return z(f,6),x(f,qd(g),8);case 8:Ea(f,7);break;case 6:return A(f),
  x(f,g.destroy(),9);case 9:return f["return"]([]);case 7:return h=[],x(f,Promise.all(d.sessionIds.map(function(b){return v(function n(){return B(n,function(c){switch(c.i){case 1:return z(c,2),x(c,td(g,b),4);case 4:h.push(b);Ea(c,0);break;case 2:A(c),y(c)}})})})),10);case 10:return x(f,g.destroy(),11);case 11:return f["return"](h)}})})}
  function Co(b,c){function d(b,c){return b.robustness==c.robustness&&b.contentType==c.contentType}return b.keySystem==c.keySystem&&b.licenseUri==c.licenseUri&&bc(b.audioCapabilities,c.audioCapabilities,d)&&bc(b.videoCapabilities,c.videoCapabilities,d)};function Eo(b,c,d){var e=void 0==c.expiration?Infinity:c.expiration,f=c.presentationTimeline.getDuration();c=Fo(c.periods[0]);return{offlineUri:null,originalManifestUri:b,duration:f,size:0,expiration:e,tracks:c,appMetadata:d}}function Go(b,c){var d=so(new qo(b.ta(),b.ba()),c.periods[0],1,new Y(null,0)),e=c.appMetadata||{};d=Fo(d);return{offlineUri:b.toString(),originalManifestUri:c.originalManifestUri,duration:c.duration,size:c.size,expiration:c.expiration,tracks:d,appMetadata:e}}
  function Fo(b){var c=[],d=rf(b.variants);d=r(d);for(var e=d.next();!e.done;e=d.next())c.push(lf(e.value));b=r(b.textStreams);for(d=b.next();!d.done;d=b.next())c.push(mf(d.value));return c};function Ho(){this.a={}}function Io(b,c,d){d=d.endTime-d.startTime;return Jo(b,c)*d}function Jo(b,c){var d=b.a[c];null==d&&(d=0);return d};function Ko(b,c,d){b=r(b.periods);for(var e=b.next();!e.done;e=b.next())e=e.value,e.variants=e.variants.filter(function(b){return gf(b,c,d)})}function Lo(b){b=r(b.periods);for(var c=b.next();!c.done;c=b.next())c=c.value,c.variants=c.variants.filter(function(b){var c=!0;b.audio&&(c=c&&Le(b.audio));b.video&&(c=c&&Le(b.video));return c})}function Mo(b,c){for(var d=r(b.periods),e=d.next();!e.done;e=d.next())e=e.value,e.variants=e.variants.filter(function(b){return Hd(c,b)})}
  function No(b){for(var c=new Oo,d=!0,e=r(b.periods),f=e.next();!f.done;f=e.next())f=Po(f.value.variants),d?(Qo(c,f),d=!1):Ro(c,f);b=r(b.periods);for(f=b.next();!f.done;f=b.next())d=f.value,d.variants=d.variants.filter(function(b){return So(c,new To(b))})}
  function Uo(b,c){return v(function e(){var f,g,h,k;return B(e,function(e){switch(e.i){case 1:f=null,g=r(b.periods),h=g.next();case 2:if(h.done){e.u(0);break}k=h.value;f&&(k.variants=k.variants.filter(function(b){return So(f,new To(b))}));return x(e,c(k),5);case 5:f=Po(k.variants),h=g.next(),e.u(2)}})})}function To(b){var c=b.audio;b=b.video;this.b=c?c.mimeType:null;this.a=c?c.codecs.split(".")[0]:null;this.f=b?b.mimeType:null;this.c=b?b.codecs.split(".")[0]:null}function Oo(){this.a=[]}
  Oo.prototype.add=function(b){So(this,b)||this.a.push(b)};function Qo(b,c){for(var d=r(c.a),e=d.next();!e.done;e=d.next())b.add(e.value)}function Ro(b,c){b.a=b.a.filter(function(b){return So(c,b)})}function So(b,c){return b.a.some(function(b){return c.b==b.b&&c.a==b.a&&c.f==b.f&&c.c==b.c})}function Po(b){var c=new Oo;b=r(b);for(var d=b.next();!d.done;d=b.next())c.add(new To(d.value));return c};function Z(b){var c=this;if(b&&b.constructor!=T)throw new I(J,9,9008);this.b=this.a=null;b?(this.a=b.c,this.b=b.xb()):(this.a=Kh(),this.b=new M);this.f=!1;this.c=[];this.g=[];var d=!b;this.h=new oc(function(){return v(function f(){var b;return B(f,function(f){switch(f.i){case 1:return b=function(){},x(f,Promise.all(c.g.map(function(c){return c.then(b,b)})),2);case 2:if(!d){f.u(3);break}return x(f,c.b.destroy(),3);case 3:c.a=null,c.b=null,y(f)}})})})}F("shaka.offline.Storage",Z);
  function Vo(){if(Hc())a:{var b=r(Yn.values());for(var c=b.next();!c.done;c=b.next())if(c=c.value,c=c()){c.destroy();b=!0;break a}b=!1}else b=!1;return b}Z.support=Vo;Z.prototype.destroy=function(){return this.h.destroy()};Z.prototype.destroy=Z.prototype.destroy;
  Z.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=Ih(b,c));b.manifest&&b.manifest.dash&&"defaultPresentationDelay"in b.manifest.dash&&(Td("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),b.manifest.defaultPresentationDelay=b.manifest.dash.defaultPresentationDelay,delete b.manifest.dash.defaultPresentationDelay);return Mh(this.a,b)};Z.prototype.configure=Z.prototype.configure;
  Z.prototype.getConfiguration=function(){var b=Kh();Mh(b,this.a,Kh());return b};Z.prototype.getConfiguration=Z.prototype.getConfiguration;Z.prototype.xb=function(){return this.b};Z.prototype.getNetworkingEngine=Z.prototype.xb;Z.prototype.store=function(b,c,d){var e=this;return Wo(this,Xo(this,b,c||{},function(){return v(function g(){var c;return B(g,function(g){switch(g.i){case 1:return x(g,Qf(b,e.b,e.a.manifest.retryParameters,d||null),2);case 2:return c=g.o,g["return"]($d(c))}})})}))};
  Z.prototype.store=Z.prototype.store;Z.prototype.he=function(){return this.f};Z.prototype.getStoreInProgress=Z.prototype.he;
  function Xo(b,c,d,e){return v(function g(){var h,k,l,m,n,q,t,u,w,C;return B(g,function(g){switch(g.i){case 1:Yo();if(b.f)throw new I(J,9,9006);b.f=!0;return x(g,Zo(b,c,e),2);case 2:h=g.o;$o(b);k=!h.presentationTimeline.U()&&!h.presentationTimeline.Sa();if(!k)throw new I(J,9,9005,c);l=null;m=new Xn;q=n=null;z(g,3,4);return x(g,ap(b,h,function(b){q=q||b}),6);case 6:l=g.o;$o(b);if(q)throw q;return x(g,bp(b,h,l),7);case 7:return x(g,m.init(),8);case 8:return $o(b),x(g,Zn(m),9);case 9:return n=g.o,$o(b),
  x(g,cp(b,n.ba,l,h,c,d),10);case 10:t=g.o;$o(b);if(q)throw q;return x(g,n.ba.addManifests([t]),11);case 11:return u=g.o,$o(b),w=new oo("manifest",n.path.ta,n.path.ba,u[0]),g["return"](Go(w,t));case 4:return Fa(g),b.f=!1,b.c=[],x(g,m.destroy(),12);case 12:if(!l){g.u(13);break}return x(g,l.destroy(),13);case 13:Ga(g,0);break;case 3:C=A(g);if(!n){g.u(15);break}return x(g,n.ba.removeSegments(b.c,function(){}),15);case 15:throw q||C;}})})}
  function bp(b,c,d){return v(function f(){var g;return B(f,function(f){switch(f.i){case 1:return g={width:Infinity,height:Infinity},Ko(c,b.a.restrictions,g),Lo(c),Mo(c,d),No(c),x(f,Uo(c,function(c){return v(function m(){var d,f,g,h,k,C,E;return B(m,function(m){switch(m.i){case 1:d=[];for(var n=r(c.variants),q=n.next();!q.done;q=n.next())f=q.value,d.push(lf(f));n=r(c.textStreams);for(q=n.next();!q.done;q=n.next())g=q.value,d.push(mf(g));return x(m,b.a.offline.trackSelectionCallback(d),2);case 2:h=m.o;
  k=new Set;C=new Set;n=r(h);for(q=n.next();!q.done;q=n.next())E=q.value,"variant"==E.type&&k.add(E.id),"text"==E.type&&C.add(E.id);c.variants=c.variants.filter(function(b){return k.has(b.id)});c.textStreams=c.textStreams.filter(function(b){return C.has(b.id)});y(m)}})})}),2);case 2:ep(c),y(f)}})})}
  function cp(b,c,d,e,f,g){return v(function k(){var l,m,n,q,t,u,w,C,E,D;return B(k,function(k){switch(k.i){case 1:return l=Eo(f,e,g),m=e.periods.some(function(b){return b.variants.some(function(b){return b.drmInfos&&b.drmInfos.length})}),n=e.periods.some(function(b){return b.variants.some(function(b){return b.drmInfos.some(function(b){return b.initData&&b.initData.length})})}),q=m&&!n,t=null,q&&(u=d.a,t=fp.get(u.keySystem)),w=new Jn(b.b,function(c,d){l.size=d;b.a.offline.progressCallback(l,c)},function(c,
  e){q&&b.a.offline.usePersistentLicense&&t==e&&sd(d,"cenc",c)}),Da(k,2),E=C=gp(b,w,c,d,e,f,g),x(k,Mn(w),4);case 4:E.size=k.o;C.expiration=d.wb();D=yd(d);C.sessionIds=b.a.offline.usePersistentLicense?D:[];if(m&&b.a.offline.usePersistentLicense&&!D.length)throw new I(J,9,9007);return k["return"](C);case 2:return Fa(k),x(k,w.destroy(),5);case 5:Ga(k,0)}})})}Z.prototype.remove=function(b){return Wo(this,hp(this,b))};Z.prototype.remove=Z.prototype.remove;
  function hp(b,c){return v(function e(){var f,g,h,k,l,m;return B(e,function(e){switch(e.i){case 1:Yo();f=po(c);if(null==f||"manifest"!=f.a)throw new I(J,9,9004,c);g=f;h=new Xn;Da(e,2);return x(e,h.init(),4);case 4:return x(e,ao(h,g.ta(),g.ba()),5);case 5:return k=e.o,x(e,k.getManifests([g.key()]),6);case 6:return l=e.o,m=l[0],x(e,Promise.all([ip(b,m,h),jp(b,k,g,m)]),2);case 2:return Fa(e),x(e,h.destroy(),8);case 8:Ga(e,0)}})})}
  function kp(b,c){for(var d=[],e=r(b.periods),f=e.next();!f.done;f=e.next()){f=r(f.value.streams);for(var g=f.next();!g.done;g=f.next())g=g.value,c&&"video"==g.contentType?d.push({contentType:Cc(g.mimeType,g.codecs),robustness:b.drmInfo.videoRobustness}):c||"audio"!=g.contentType||d.push({contentType:Cc(g.mimeType,g.codecs),robustness:b.drmInfo.audioRobustness})}return d}function ip(b,c,d){return v(function f(){return B(f,function(f){switch(f.i){case 1:return x(f,lp(b.b,b.a.drm,d,c),0)}})})}
  function jp(b,c,d,e){function f(){k+=1;b.a.offline.progressCallback(l,k/h)}var g=mp(e),h=g.length+1,k=0,l=Go(d,e);return Promise.all([c.removeSegments(g,f),c.removeManifests([d.key()],f)])}Z.prototype.ze=function(){return Wo(this,np(this))};Z.prototype.removeEmeSessions=Z.prototype.ze;
  function np(b){return v(function d(){var e,f,g,h,k,l,m,n,q,t;return B(d,function(d){switch(d.i){case 1:return Yo(),e=b.b,f=b.a.drm,g=new Xn,h=!1,Da(d,2),x(d,g.init(),4);case 4:k=[],bo(g,function(b){return k.push(b)}),l=r(k),m=l.next();case 5:if(m.done){d.u(2);break}n=m.value;return x(d,n.getAll(),8);case 8:return q=d.o,x(d,Bo(f,e,q),9);case 9:return t=d.o,x(d,n.remove(t),10);case 10:t.length!=q.length&&(h=!0);m=l.next();d.u(5);break;case 2:return Fa(d),x(d,g.destroy(),11);case 11:Ga(d,3);break;case 3:return d["return"](!h)}})})}
  Z.prototype.list=function(){return Wo(this,op())};Z.prototype.list=Z.prototype.list;
  function op(){return v(function c(){var d,e,f;return B(c,function(c){switch(c.i){case 1:return Yo(),d=[],e=new Xn,Da(c,2),x(c,e.init(),4);case 4:return f=Promise.resolve(),$n(e,function(c,e){f=f.then(function(){return v(function m(){var f;return B(m,function(g){switch(g.i){case 1:return x(g,e.getAllManifests(),2);case 2:f=g.o,f.forEach(function(e,f){var g=Go(new oo("manifest",c.ta,c.ba,f),e);d.push(g)}),y(g)}})})})}),x(c,f,2);case 2:return Fa(c),x(c,e.destroy(),6);case 6:Ga(c,3);break;case 3:return c["return"](d)}})})}
  function Zo(b,c,d){return v(function f(){var g,h,k,l,m,n;return B(f,function(f){switch(f.i){case 1:return g=null,h=b.b,k={networkingEngine:h,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(b){g=b}},x(f,d(),2);case 2:return l=f.o,l.configure(b.a.manifest),$o(b),Da(f,3),x(f,l.start(c,k),5);case 5:return m=f.o,$o(b),n=pp(m),x(f,Promise.all(gb(n,function(b){return b.createSegmentIndex()})),6);case 6:$o(b);if(g)throw g;
  return f["return"](m);case 3:return Fa(f),x(f,l.stop(),7);case 7:Ga(f,0)}})})}function ap(b,c,d){return v(function f(){var g,h,k;return B(f,function(f){switch(f.i){case 1:return g=new bd({mb:b.b,onError:d,ac:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),h=Vf(c.periods),k=b.a,g.configure(k.drm),x(f,gd(g,h,k.offline.usePersistentLicense),2);case 2:return x(f,qd(g),3);case 3:return x(f,rd(g),4);case 4:return f["return"](g)}})})}
  function gp(b,c,d,e,f,g,h){var k=new Ho,l=f.periods.map(function(e){for(var g=r(e.variants),h=g.next();!h.done;h=g.next()){h=h.value;var l=h.audio,m=h.video;l&&!m&&(k.a[l.id]=l.bandwidth||h.bandwidth);!l&&m&&(k.a[m.id]=m.bandwidth||h.bandwidth);if(l&&m){var n=l.bandwidth||393216,q=m.bandwidth||h.bandwidth-n;0>=q&&(q=h.bandwidth);k.a[l.id]=n;k.a[m.id]=q}}g=r(e.textStreams);for(h=g.next();!h.done;h=g.next())k.a[h.value.id]=52;h=new Set;g=r(e.textStreams);for(l=g.next();!l.done;l=g.next())h.add(l.value);
  g=r(e.variants);for(l=g.next();!l.done;l=g.next())l=l.value,l.audio&&h.add(l.audio),l.video&&h.add(l.video);g=new Map;h=r(h);for(l=h.next();!l.done;l=h.next())l=l.value,m=qp(b,c,d,k,f,e,l),g.set(l.id,m);l=r(e.variants);for(h=l.next();!h.done;h=l.next())h=h.value,h.audio&&g.get(h.audio.id).variantIds.push(h.id),h.video&&g.get(h.video.id).variantIds.push(h.id);return{startTime:e.startTime,streams:Array.from(g.values())}}),m=b.a.offline.usePersistentLicense,n=e.a;n&&m&&(n.initData=[]);return{originalManifestUri:g,
  duration:f.presentationTimeline.getDuration(),size:0,expiration:e.wb(),periods:l,sessionIds:m?yd(e):[],drmInfo:n,appMetadata:h}}
  function qp(b,c,d,e,f,g,h){var k={id:h.id,originalId:h.originalId,primary:h.primary,presentationTimeOffset:0,contentType:h.type,mimeType:h.mimeType,codecs:h.codecs,frameRate:h.frameRate,pixelAspectRatio:h.pixelAspectRatio,kind:h.kind,language:h.language,label:h.label,width:h.width||null,height:h.height||null,initSegmentKey:null,encrypted:h.encrypted,keyId:h.keyId,segments:[],variantIds:[]};f=f.presentationTimeline.Pa();var l=h.id,m=h.segmentIndex.find(f),n=(m=null!=m?h.segmentIndex.get(m):null)?m.f:
  null;k.presentationTimeOffset=m?g.startTime-m.g:0;n&&(m=Og(n.c(),n.b,n.a,b.a.streaming.retryParameters),Kn(c,l,m,.5*Jo(e,h.id),!0,function(c){return v(function u(){var e;return B(u,function(f){switch(f.i){case 1:return x(f,d.addSegments([{data:c}]),2);case 2:e=f.o,b.c.push(e[0]),k.initSegmentKey=e[0],y(f)}})})}));rp(h,f,function(f){var m=Og(f.c(),f.b,f.a,b.a.streaming.retryParameters);Kn(c,l,m,Io(e,h.id,f),!1,function(c){return v(function C(){var e;return B(C,function(h){switch(h.i){case 1:return x(h,
  d.addSegments([{data:c}]),2);case 2:e=h.o,b.c.push(e[0]),k.segments.push({startTime:f.startTime-g.startTime,endTime:f.endTime-g.startTime,dataKey:e[0]}),y(h)}})})})});return k}function rp(b,c,d){c=b.segmentIndex.find(c);for(var e=null==c?null:b.segmentIndex.get(c);e;)d(e),e=b.segmentIndex.get(++c)}function $o(b){if(b.h.a)throw new I(J,9,7001);}function Yo(){if(!Vo())throw new I(J,9,9E3);}
  function Wo(b,c){return v(function e(){return B(e,function(e){switch(e.i){case 1:return b.g.push(c),Da(e,2),x(e,c,4);case 4:return e["return"](e.o);case 2:Fa(e),$b(b.g,c),Ga(e,0)}})})}function mp(b){var c=[];b=r(b.periods);for(var d=b.next();!d.done;d=b.next()){d=r(d.value.streams);for(var e=d.next();!e.done;e=d.next()){e=e.value;null!=e.initSegmentKey&&c.push(e.initSegmentKey);e=r(e.segments);for(var f=e.next();!f.done;f=e.next())c.push(f.value.dataKey)}}return c}
  Z.deleteAll=function(){return v(function c(){var d;return B(c,function(c){switch(c.i){case 1:return d=new Xn,Da(c,2),x(c,d.erase(),2);case 2:return Fa(c),x(c,d.destroy(),5);case 5:Ga(c,0)}})})};
  function lp(b,c,d,e){return v(function g(){var h,k,l;return B(g,function(g){switch(g.i){case 1:if(!e.drmInfo)return g["return"]();h=co(d);k=e.sessionIds.map(function(b){return{sessionId:b,keySystem:e.drmInfo.keySystem,licenseUri:e.drmInfo.licenseServerUri,serverCertificate:e.drmInfo.serverCertificate,audioCapabilities:kp(e,!1),videoCapabilities:kp(e,!0)}});return x(g,Bo(c,b,k),2);case 2:return l=g.o,x(g,h.remove(l),3);case 3:return x(g,h.add(k.filter(function(b){return!l.includes(b.sessionId)})),
  0)}})})}function pp(b){var c=new Set;b=r(b.periods);for(var d=b.next();!d.done;d=b.next()){d=d.value;for(var e=r(d.textStreams),f=e.next();!f.done;f=e.next())c.add(f.value);d=r(d.variants);for(e=d.next();!e.done;e=d.next())e=e.value,e.audio&&c.add(e.audio),e.video&&c.add(e.video)}return c}function ep(b){if(0==b.periods.length)throw new I(J,4,4014);b=r(b.periods);for(var c=b.next();!c.done;c=b.next())sp(c.value)}
  function sp(b){b.variants.map(function(b){return b.video});var c=new Set(b.variants.map(function(b){return b.audio}));b=b.textStreams;for(var d=r(c),e=d.next();!e.done;e=d.next()){e=r(c);for(var f=e.next();!f.done;f=e.next());}c=r(b);for(d=c.next();!d.done;d=c.next())for(d=r(b),e=d.next();!e.done;e=d.next());}
  var fp=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");ki.offline=Vo;F("shaka.polyfill.installAll",function(){for(var b=r(tp),c=b.next();!c.done;c=b.next()){c=c.value;try{c.Id()}catch(d){ab("Error installing polyfill!",d)}}});function up(b,c){for(var d={priority:c||0,Id:b},e=r(lb(tp)),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.fa;if(f.item.priority<d.priority){tp.splice(g,0,d);return}}tp.push(d)}F("shaka.polyfill.register",up);var tp=[];up(function(){vp()},-1);function wp(b){var c=b.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"===typeof Event)var d=new Event(c,b);else d=document.createEvent("Event"),d.initEvent(c,b.bubbles,b.cancelable);b.target.dispatchEvent(d)}
  up(function(){if(window.Document){var b=Element.prototype;b.requestFullscreen=b.requestFullscreen||b.mozRequestFullScreen||b.msRequestFullscreen||b.webkitRequestFullscreen;b=Document.prototype;b.exitFullscreen=b.exitFullscreen||b.mozCancelFullScreen||b.msExitFullscreen||b.webkitExitFullscreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,
  "fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",wp);document.addEventListener("webkitfullscreenerror",wp);document.addEventListener("mozfullscreenchange",wp);document.addEventListener("mozfullscreenerror",wp);document.addEventListener("MSFullscreenChange",wp);document.addEventListener("MSFullscreenError",wp)}});up(function(){var b=!1;if(Lc("CrKey"))b=!0;else try{window.indexedDB&&(b=!1)}catch(c){b=!0}b&&delete window.indexedDB});function xp(b,c,d){if("input"==b)switch(this.type){case "range":b="change"}HTMLInputElement.prototype.originalAddEventListener.call(this,b,c,d)}up(function(){Lc("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=xp)});up(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})});up(function(){});function yp(){var b=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];d=b.apply(this,d);d.abort=function(){};return d}}function zp(){var b=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(c,d){return b.call(this,c,d-.001)}}function Ap(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"mp2t"==c.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:b(c)}}
  function Bp(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"opus"!=Gc(c)[0]&&b(c)}}
  function Cp(){var b=MediaSource.isTypeSupported,c=/^dv(?:h[e1]|a[v1])\./;MediaSource.isTypeSupported=function(d){var e=d.split(/ *; */),f=e.shift(),g={};e=r(e);for(var h=e.next();!h.done;h=e.next()){var k=h.value.split("=");h=k[0];k=k[1].replace(/"(.*)"/,"$1");g[h]=k}e=g.codecs;if(!e)return b(d);var l=!1,m=!1;d=e.split(",").filter(function(b){c.test(b)&&(m=!0);/^(hev|hvc)1\.2/.test(b)&&(l=!0);return!0});m&&(l=!1);g.codecs=d.join(",");l&&(g.eotf="smpte2084");for(var n in g)f+="; "+n+'="'+g[n]+'"';
  return cast.__platform__.canDisplayType(f)}}up(function(){var b=Mc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Cp():b?(Ap(),12>=b?(yp(),zp()):yp()):Lc("Tizen")&&Bp())});function Dp(b,c){try{var d=new Ep(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}function Fp(b){var c=this.mediaKeys;c&&c!=b&&Gp(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?Gp(b,this):Promise.resolve()}function Hp(b){var c=new Event("encrypted");c.initDataType="cenc";c.initData=Sb(b.initData);this.dispatchEvent(c)}
  function Ep(b,c){this.keySystem=b;if(b.startsWith("com.apple.fps"))for(var d=r(c),e=d.next();!e.done;e=d.next()){var f=e.value;if("required"==f.persistentState)e=null;else{e={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label};var g=!1,h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),l=k.next();!l.done;l=k.next())if(l=l.value,l.contentType){g=!0;var m=l.contentType.split(";")[0];
  WebKitMediaKeys.isTypeSupported(this.keySystem,m)&&(e.audioCapabilities.push(l),h=!0)}if(f.videoCapabilities)for(f=r(f.videoCapabilities),l=f.next();!l.done;l=f.next())k=l.value,k.contentType&&(g=!0,l=k.contentType.split(";")[0],WebKitMediaKeys.isTypeSupported(this.keySystem,l)&&(e.videoCapabilities.push(k),h=!0));g||(h=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));e=h?e:null}if(e){this.a=e;return}}d=Error("Unsupported keySystem");d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;
  throw d;}Ep.prototype.createMediaKeys=function(){var b=new Ip(this.keySystem);return Promise.resolve(b)};Ep.prototype.getConfiguration=function(){return this.a};function Ip(b){this.b=new WebKitMediaKeys(b);this.a=new O}Ip.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new Jp(this.b,b)};Ip.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
  function Gp(b,c){b.a.Wa();if(!c)return Promise.resolve();b.a.s(c,"webkitneedkey",Hp);try{return 1<=c.readyState?c.webkitSetMediaKeys(b.b):b.a.ca(c,"loadedmetadata",function(){c.webkitSetMediaKeys(b.b)}),Promise.resolve()}catch(d){return Promise.reject(d)}}function Jp(b){Wb.call(this);this.c=null;this.g=b;this.b=this.a=null;this.f=new O;this.sessionId="";this.expiration=NaN;this.closed=new Hb;this.keyStatuses=new Kp}za(Jp,Wb);p=Jp.prototype;
  p.generateRequest=function(b,c){var d=this;this.a=new Hb;try{var e=this.g.createSession("video/mp4",K(c));this.c=e;this.sessionId=e.sessionId||"";this.f.s(this.c,"webkitkeymessage",function(b){d.a&&(d.a.resolve(),d.a=null);b=new L("message",{messageType:void 0==d.keyStatuses.a?"license-request":"license-renewal",message:Sb(b.message)});d.dispatchEvent(b)});this.f.s(e,"webkitkeyadded",function(){d.b&&(Lp(d,"usable"),d.b.resolve(),d.b=null)});this.f.s(e,"webkitkeyerror",function(){var b=Error("EME PatchedMediaKeysApple key error");
  b.errorCode=d.c.error;if(null!=d.a)d.a.reject(b),d.a=null;else if(null!=d.b)d.b.reject(b),d.b=null;else switch(d.c.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Lp(d,"output-not-allowed");break;default:Lp(d,"internal-error")}});Lp(this,"status-pending")}catch(f){this.a.reject(f)}return this.a};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};p.update=function(b){this.b=new Hb;try{this.c.update(K(b))}catch(c){this.b.reject(c)}return this.b};
  p.close=function(){try{this.c.close(),this.closed.resolve(),this.f.Wa()}catch(b){this.closed.reject(b)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Lp(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;d=new L("keystatuseschange");b.dispatchEvent(d)}function Kp(){this.size=0;this.a=void 0}p=Kp.prototype;p.forEach=function(b){this.a&&b(this.a,Kd.value())};
  p.get=function(b){if(this.has(b))return this.a};p.has=function(b){var c=Kd.value();return this.a&&Pb(b,c)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};up(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Fp,window.MediaKeys=Ip,window.MediaKeySystemAccess=Ep,navigator.requestMediaKeySystemAccess=Dp)});function Mp(b,c){try{var d=new Np(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}function Op(b){if(b.initData){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="cenc";c.initData=Nk(b.initData);this.dispatchEvent(c)}}
  function Np(b,c){this.keySystem=b;for(var d=!1,e=r(c),f=e.next();!f.done;f=e.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),l=k.next();!l.done;l=k.next())if(l=l.value,l.contentType){h=!0;var m=l.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.audioCapabilities.push(l),
  d=!0)}if(f.videoCapabilities)for(k=r(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,m=l.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.videoCapabilities.push(l),d=!0));h||(d=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==f.persistentState&&(d=!1);if(d){this.a=g;return}}d=Error("Unsupported keySystem");d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}
  Np.prototype.createMediaKeys=function(){var b=new Pp(this.keySystem);return Promise.resolve(b)};Np.prototype.getConfiguration=function(){return this.a};function Qp(b){var c=this.mediaKeys;c&&c!=b&&Rp(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?Rp(b,this):Promise.resolve()}function Pp(b){this.a=new MSMediaKeys(b);this.b=new O}
  Pp.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new Sp(this.a,b)};Pp.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
  function Rp(b,c){function d(){c.msSetMediaKeys(b.a);c.removeEventListener("loadedmetadata",d)}b.b.Wa();if(!c)return Promise.resolve();b.b.s(c,"msneedkey",Op);try{return 1<=c.readyState?c.msSetMediaKeys(b.a):c.addEventListener("loadedmetadata",d),Promise.resolve()}catch(e){return Promise.reject(e)}}function Sp(b){Wb.call(this);this.c=null;this.g=b;this.b=this.a=null;this.f=new O;this.sessionId="";this.expiration=NaN;this.closed=new Hb;this.keyStatuses=new Tp}za(Sp,Wb);p=Sp.prototype;
  p.generateRequest=function(b,c){var d=this;this.a=new Hb;try{this.c=this.g.createSession("video/mp4",K(c),null),this.f.s(this.c,"mskeymessage",function(b){d.a&&(d.a.resolve(),d.a=null);b=new L("message",{messageType:void 0==d.keyStatuses.a?"license-request":"license-renewal",message:Sb(b.message)});d.dispatchEvent(b)}),this.f.s(this.c,"mskeyadded",function(){d.a?(Up(d,"usable"),d.a.resolve(),d.a=null):d.b&&(Up(d,"usable"),d.b.resolve(),d.b=null)}),this.f.s(this.c,"mskeyerror",function(){var b=Error("EME PatchedMediaKeysMs key error");
  b.errorCode=d.c.error;if(null!=d.a)d.a.reject(b),d.a=null;else if(null!=d.b)d.b.reject(b),d.b=null;else switch(d.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Up(d,"output-not-allowed");break;default:Up(d,"internal-error")}}),Up(this,"status-pending")}catch(e){this.a.reject(e)}return this.a};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};p.update=function(b){this.b=new Hb;try{this.c.update(K(b))}catch(c){this.b.reject(c)}return this.b};
  p.close=function(){try{this.c.close(),this.closed.resolve(),this.f.Wa()}catch(b){this.closed.reject(b)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Up(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;d=new L("keystatuseschange");b.dispatchEvent(d)}function Tp(){this.size=0;this.a=void 0}p=Tp.prototype;p.forEach=function(b){this.a&&b(this.a,Kd.value())};
  p.get=function(b){if(this.has(b))return this.a};p.has=function(b){var c=Kd.value();return this.a&&Pb(b,c)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
  up(function(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Pp,window.MediaKeySystemAccess=Np,navigator.requestMediaKeySystemAccess=Mp,HTMLMediaElement.prototype.setMediaKeys=Qp)});function Vp(){return Promise.reject(Error("The key system specified is not supported."))}function Wp(b){return null==b?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function Xp(){throw new TypeError("Illegal constructor.");}Xp.prototype.createSession=function(){};Xp.prototype.setServerCertificate=function(){};function Yp(){this.keySystem="";throw new TypeError("Illegal constructor.");}Yp.prototype.getConfiguration=function(){};Yp.prototype.createMediaKeys=function(){};
  up(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Vp,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Wp,window.MediaKeys=Xp,window.MediaKeySystemAccess=Yp)},-10);function Zp(b){var c=$p;return c?c+b.charAt(0).toUpperCase()+b.slice(1):b}function aq(b,c){try{var d=new bq(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}function cq(b){var c=this.mediaKeys;c&&c!=b&&dq(c,null);delete this.mediaKeys;(this.mediaKeys=b)&&dq(b,this);return Promise.resolve()}
  function bq(b,c){this.a=this.keySystem=b;var d=!1;"org.w3.clearkey"==b&&(this.a="webkit-org.w3.clearkey",d=!1);var e=!1;var f=document.getElementsByTagName("video");f=f.length?f[0]:document.createElement("video");for(var g=r(c),h=g.next();!h.done;h=g.next()){h=h.value;var k={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:h.initDataTypes,sessionTypes:["temporary"],label:h.label},l=!1;if(h.audioCapabilities)for(var m=r(h.audioCapabilities),
  n=m.next();!n.done;n=m.next())if(n=n.value,n.contentType){l=!0;var q=n.contentType.split(";")[0];f.canPlayType(q,this.a)&&(k.audioCapabilities.push(n),e=!0)}if(h.videoCapabilities)for(m=r(h.videoCapabilities),n=m.next();!n.done;n=m.next())n=n.value,n.contentType&&(l=!0,f.canPlayType(n.contentType,this.a)&&(k.videoCapabilities.push(n),e=!0));l||(e=f.canPlayType("video/mp4",this.a)||f.canPlayType("video/webm",this.a));"required"==h.persistentState&&(d?(k.persistentState="required",k.sessionTypes=["persistent-license"]):
  e=!1);if(e){this.b=k;return}}d="Unsupported keySystem";if("org.w3.clearkey"==b||"com.widevine.alpha"==b)d="None of the requested configurations were supported.";d=Error(d);d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}bq.prototype.createMediaKeys=function(){var b=new eq(this.a);return Promise.resolve(b)};bq.prototype.getConfiguration=function(){return this.b};function eq(b){this.g=b;this.b=null;this.a=new O;this.c=[];this.f=new Map}
  function dq(b,c){b.b=c;b.a.Wa();var d=$p;c&&(b.a.s(c,d+"needkey",function(c){var d=document.createEvent("CustomEvent");d.initCustomEvent("encrypted",!1,!1,null);d.initDataType="webm";d.initData=c.initData;b.b.dispatchEvent(d)}),b.a.s(c,d+"keymessage",function(c){var d=fq(b,c.sessionId);d&&(c=new L("message",{messageType:void 0==d.keyStatuses.a?"licenserequest":"licenserenewal",message:c.message}),d.b&&(d.b.resolve(),d.b=null),d.dispatchEvent(c))}),b.a.s(c,d+"keyadded",function(c){(c=fq(b,c.sessionId))&&
  c.ready()}),b.a.s(c,d+"keyerror",function(c){var d=fq(b,c.sessionId);d&&d.handleError(c)}))}eq.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b&&"persistent-license"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");var c=this.b||document.createElement("video");c.src||(c.src="about:blank");b=new gq(c,this.g,b);this.c.push(b);return b};eq.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
  function fq(b,c){var d=b.f.get(c);return d?d:(d=b.c.shift())?(d.sessionId=c,b.f.set(c,d),d):null}function gq(b,c,d){Wb.call(this);this.f=b;this.h=!1;this.a=this.b=null;this.c=c;this.g=d;this.sessionId="";this.expiration=NaN;this.closed=new Hb;this.keyStatuses=new hq}za(gq,Wb);p=gq.prototype;p.ready=function(){iq(this,"usable");this.a&&this.a.resolve();this.a=null};
  p.handleError=function(b){var c=Error("EME v0.1b key error");c.errorCode=b.errorCode;c.errorCode.systemCode=b.systemCode;!b.sessionId&&this.b?(c.method="generateRequest",45==b.systemCode&&(c.message="Unsupported session type."),this.b.reject(c),this.b=null):b.sessionId&&this.a?(c.method="update",this.a.reject(c),this.a=null):(c=b.systemCode,b.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?iq(this,"output-restricted"):1==c?iq(this,"expired"):iq(this,"internal-error"))};
  function jq(b,c,d){if(b.h)return Promise.reject(Error("The session is already initialized."));b.h=!0;try{if("persistent-license"==b.g)if(d)var e=K(Tc("LOAD_SESSION|"+d));else{var f=Tc("PERSISTENT|");e=ad(f,c)}else e=K(c)}catch(h){return Promise.reject(h)}b.b=new Hb;var g=Zp("generateKeyRequest");try{b.f[g](b.c,e)}catch(h){if("InvalidStateError"!=h.name)return b.b=null,Promise.reject(h);(new G(function(){try{b.f[g](b.c,e)}catch(k){b.b.reject(k),b.b=null}})).O(.01)}return b.b}
  function kq(b,c,d){if(b.a)b.a.then(function(){return kq(b,c,d)})["catch"](function(){return kq(b,c,d)});else{b.a=c;if("webkit-org.w3.clearkey"==b.c){var e=Qc(d);var f=JSON.parse(e);"oct"!=f.keys[0].kty&&(b.a.reject(Error("Response is not a valid JSON Web Key Set.")),b.a=null);e=Yc(f.keys[0].k);f=Yc(f.keys[0].kid)}else e=K(d),f=null;var g=Zp("addKey");try{b.f[g](b.c,e,f,b.sessionId)}catch(h){b.a.reject(h),b.a=null}}}
  function iq(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;d=new L("keystatuseschange");b.dispatchEvent(d)}p.generateRequest=function(b,c){return jq(this,c,null)};p.load=function(b){return"persistent-license"==this.g?jq(this,null,b):Promise.reject(Error("Not a persistent session."))};p.update=function(b){var c=new Hb;kq(this,c,b);return c};
  p.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var b=Zp("cancelKeyRequest");try{this.f[b](this.c,this.sessionId)}catch(c){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};function hq(){this.size=0;this.a=void 0}p=hq.prototype;p.forEach=function(b){this.a&&b(this.a,Kd.value())};p.get=function(b){if(this.has(b))return this.a};
  p.has=function(b){var c=Kd.value();return this.a&&Pb(b,c)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var $p="";
  up(function(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)$p="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=aq;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=cq;window.MediaKeys=eq;window.MediaKeySystemAccess=bq}});function lq(b){b=b.target;if("picture-in-picture"==b.webkitPresentationMode){document.pictureInPictureElement=b;var c=new Event("enterpictureinpicture");b.dispatchEvent(c)}else document.pictureInPictureElement==b&&(document.pictureInPictureElement=null),c=new Event("leavepictureinpicture"),b.dispatchEvent(c)}
  function mq(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function nq(){var b=document.pictureInPictureElement;return b?(b.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
  function oq(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function pq(b){b?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}
  up(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;b.requestPictureInPicture&&document.exitPictureInPicture||!b.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,b.requestPictureInPicture=mq,Object.defineProperty(b,"disablePictureInPicture",{get:oq,set:pq,enumerable:!0,configurable:!0}),document.exitPictureInPicture=nq,document.addEventListener("webkitpresentationmodechanged",lq,!0))}});up(function(){if(window.HTMLMediaElement){var b=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var c=b.apply(this);c&&c["catch"](function(){});return c}}});function qq(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}up(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;!b.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in b&&(b.getVideoPlaybackQuality=qq)}});function rq(b,c,d){return new window.TextTrackCue(b,c,d)}function sq(b,c,d){return new window.TextTrackCue(b+"-"+c+"-"+d,b,c,d)}up(function(){if(!window.VTTCue&&window.TextTrackCue){var b=TextTrackCue.length;if(3==b)window.VTTCue=rq;else if(6==b)window.VTTCue=sq;else{try{var c=!!rq(1,2,"")}catch(d){c=!1}c&&(window.VTTCue=rq)}}});function tq(){}F("shaka.text.TtmlTextParser",tq);tq.prototype.parseInit=function(){};tq.prototype.parseInit=tq.prototype.parseInit;
  tq.prototype.parseMedia=function(b,c){var d=Qc(b),e=[],f=new DOMParser,g=null;if(""==d)return e;try{g=f.parseFromString(d,"text/xml")}catch(N){throw new I(J,2,2005,"Failed to parse TTML.");}if(g){if(d=g.getElementsByTagName("parsererror")[0])throw new I(J,2,2005,d.textContent);if(f=g.getElementsByTagName("tt")[0]){var h=Sk(f,"http://www.w3.org/ns/ttml#parameter","frameRate");var k=Sk(f,"http://www.w3.org/ns/ttml#parameter","subFrameRate");var l=Sk(f,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier");
  var m=Sk(f,"http://www.w3.org/ns/ttml#parameter","tickRate");var n=Sk(f,"http://www.w3.org/ns/ttml#parameter","cellResolution");g=f.getAttribute("xml:space")||"default";d=f.getAttribute("tts:extent")}else throw new I(J,2,2005,"TTML does not contain <tt> tag.");if("default"!=g&&"preserve"!=g)throw new I(J,2,2005,"Invalid xml:space value: "+g);g="default"==g;h=new uq(h,k,l,m);n=n?(n=/^(\d+) (\d+)$/.exec(n))?{columns:parseInt(n[1],10),rows:parseInt(n[2],10)}:null:null;k=vq(f.getElementsByTagName("metadata")[0]);
  l=vq(f.getElementsByTagName("styling")[0]);m=vq(f.getElementsByTagName("layout")[0]);for(var q=[],t=r(m),u=t.next();!u.done;u=t.next()){var w=u.value,C=d;u=new ke;var E=w.getAttribute("xml:id");if(E){u.id=E;E=null;C&&(E=wq.exec(C)||xq.exec(C));C=E?Number(E[1]):null;E=E?Number(E[2]):null;var D,H;if(D=yq(w,l,"extent"))D=(H=wq.exec(D))||xq.exec(D),null!=D&&(u.width=null!=C?100*Number(D[1])/C:Number(D[1]),u.height=null!=E?100*Number(D[2])/E:Number(D[2]),u.widthUnits=H||null!=C?ye:0,u.heightUnits=H||null!=
  E?ye:0);if(w=yq(w,l,"origin"))D=(H=wq.exec(w))||xq.exec(w),null!=D&&(u.viewportAnchorX=null!=E?100*Number(D[1])/E:Number(D[1]),u.viewportAnchorY=null!=C?100*Number(D[2])/C:Number(D[2]),u.viewportAnchorUnits=H||null!=C?ye:0)}else u=null;u&&q.push(u)}d=zq(f.getElementsByTagName("body")[0]);d=r(d);for(f=d.next();!f.done;f=d.next())(f=Aq(f.value,c.periodStart,h,k,l,m,q,g,!1,n))&&e.push(f)}return e};tq.prototype.parseMedia=tq.prototype.parseMedia;
  function vq(b){var c=[];if(!b)return c;for(var d=r(b.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e.nodeType==Node.ELEMENT_NODE&&"br"!==e.nodeName&&(e=vq(e),c=c.concat(e));c.length||c.push(b);return c}function zq(b){if(!b)return[];var c=[];b=r(b.childNodes);for(var d=b.next();!d.done;d=b.next())d=d.value,d instanceof Element&&(d.hasAttribute("begin")?c.push(d):c=c.concat(zq(d)));return c}
  function Bq(b,c){for(var d="",e=r(b.childNodes),f=e.next();!f.done;f=e.next())f=f.value,"br"==f.nodeName&&b.childNodes[0]!==f?d+="\n":f.childNodes&&0<f.childNodes.length?d+=Bq(f,c):c?(f=f.textContent.trim(),f=f.replace(/\s+/g," "),d+=f):d+=f.textContent;return d}
  function Aq(b,c,d,e,f,g,h,k,l,m){if(l&&"br"==b.nodeName)return b=new ie(0,0,""),b.spacer=!0,b;var n=/^[\s\n]*$/.test(b.textContent),q=b.nodeType==Node.ELEMENT_NODE&&!b.hasAttribute("begin")&&!b.hasAttribute("end");if(b.nodeType!=Node.ELEMENT_NODE||q&&n||q&&!l)return null;n=Cq(b.getAttribute("begin"),d);q=Cq(b.getAttribute("end"),d);var t=Cq(b.getAttribute("dur"),d);null==q&&null!=t&&(q=n+t);if(!l&&(null==n||null==q))throw new I(J,2,2001);n+=c;q+=c;t="";l=[];if(Array.from(b.childNodes).find(function(b){return b.nodeType===
  Node.TEXT_NODE&&/\w+/.test(b.textContent)}))t=Bq(b,k);else for(var u=r(b.childNodes),w=u.next();!w.done;w=u.next())(w=Aq(w.value,c,d,e,f,g,h,k,!0,m))&&l.push(w);c=new ie(n,q,t);c.nestedCues=l;m&&(c.cellResolution=m);if((g=Dq(b,"region",g,"")[0])&&g.getAttribute("xml:id")){var C=g.getAttribute("xml:id");c.region=h.filter(function(b){return b.id==C})[0]}e=Dq(b,"smpte:backgroundImage",e,"#")[0];Eq(c,b,g,e,f);return c}
  function Eq(b,c,d,e,f){"rtl"==Fq(c,d,f,"direction")&&(b.direction="rtl");var g=Fq(c,d,f,"writingMode");"tb"==g||"tblr"==g?b.writingMode="vertical-lr":"tbrl"==g?b.writingMode="vertical-rl":"rltb"==g||"rl"==g?b.direction="rtl":g&&(b.direction=je);(g=Fq(c,d,f,"textAlign"))?(b.positionAlign=Gq[g],b.lineAlign=Hq[g],b.textAlign=ue[g.toUpperCase()]):b.textAlign="start";if(g=Fq(c,d,f,"displayAlign"))b.displayAlign=ve[g.toUpperCase()];if(g=Fq(c,d,f,"color"))b.color=g;if(g=Fq(c,d,f,"backgroundColor"))b.backgroundColor=
  g;if(g=Fq(c,d,f,"border"))b.border=g;if(g=Fq(c,d,f,"fontFamily"))b.fontFamily=g;(g=Fq(c,d,f,"fontWeight"))&&"bold"==g&&(b.fontWeight=700);(g=Fq(c,d,f,"wrapOption"))&&"noWrap"==g&&(b.wrapLine=!1);(g=Fq(c,d,f,"lineHeight"))&&g.match(Iq)&&(b.lineHeight=g);(g=Fq(c,d,f,"fontSize"))&&(g.match(Iq)||g.match(Jq))&&(b.fontSize=g);if(g=Fq(c,d,f,"fontStyle"))b.fontStyle=xe[g.toUpperCase()];if(e){g=e.getAttribute("imagetype");var h=e.getAttribute("encoding");e=e.textContent.trim();"PNG"==g&&"Base64"==h&&e&&(b.backgroundImage=
  "data:image/png;base64,"+e)}(e=Fq(c,d,f,"letterSpacing"))&&e.match(Iq)&&(b.letterSpacing=e);(e=Fq(c,d,f,"linePadding"))&&e.match(Iq)&&(b.linePadding=e);if(e=Fq(c,d,f,"opacity"))b.opacity=e;(d=yq(d,f,"textDecoration"))&&Kq(b,d);(c=Lq(c,f,"textDecoration"))&&Kq(b,c)}
  function Kq(b,c){for(var d=r(c.split(" ")),e=d.next();!e.done;e=d.next())switch(e.value){case "underline":b.textDecoration.includes("underline")||b.textDecoration.push("underline");break;case "noUnderline":b.textDecoration.includes("underline")&&$b(b.textDecoration,"underline");break;case "lineThrough":b.textDecoration.includes("lineThrough")||b.textDecoration.push("lineThrough");break;case "noLineThrough":b.textDecoration.includes("lineThrough")&&$b(b.textDecoration,"lineThrough");break;case "overline":b.textDecoration.includes("overline")||
  b.textDecoration.push("overline");break;case "noOverline":b.textDecoration.includes("overline")&&$b(b.textDecoration,"overline")}}function Fq(b,c,d,e){return(b=Lq(b,d,e))?b:yq(c,d,e)}function yq(b,c,d){var e=vq(b);e=r(e);for(var f=e.next();!f.done;f=e.next())if(f=Sk(f.value,"http://www.w3.org/ns/ttml#styling",d))return f;return(b=Dq(b,"style",c,"")[0])?Sk(b,"http://www.w3.org/ns/ttml#styling",d):null}
  function Lq(b,c,d){var e=Sk(b,"http://www.w3.org/ns/ttml#styling",d);if(e)return e;b=Dq(b,"style",c,"");c=null;for(e=0;e<b.length;e++){var f=Sk(b[e],"http://www.w3.org/ns/ttml#styling",d);f&&(c=f);(f=Sk(b[e],"urn:ebu:tt:style",d))&&(c=f)}return c}
  function Dq(b,c,d,e){var f=[];if(!b||1>d.length)return f;var g=b;for(b=null;g&&!(b=g.getAttribute(c))&&(g=g.parentNode,g instanceof Element););if(c=b)for(c=c.split(" "),c=r(c),b=c.next();!b.done;b=c.next()){b=b.value;g=r(d);for(var h=g.next();!h.done;h=g.next())if(h=h.value,e+h.getAttribute("xml:id")==b){f.push(h);break}}return f}
  function Cq(b,c){var d=null;if(Mq.test(b)){d=Mq.exec(b);var e=Number(d[1]),f=Number(d[2]),g=Number(d[3]),h=Number(d[4]);h+=(Number(d[5])||0)/c.b;g+=h/c.frameRate;d=g+60*f+3600*e}else Nq.test(b)?d=Oq(Nq,b):Pq.test(b)?d=Oq(Pq,b):Qq.test(b)?(d=Qq.exec(b),d=Number(d[1])/c.frameRate):Rq.test(b)?(d=Rq.exec(b),d=Number(d[1])/c.a):Sq.test(b)&&(d=Oq(Sq,b));return d}
  function Oq(b,c){var d=b.exec(c);return null==d||""==d[0]?null:(Number(d[4])||0)/1E3+(Number(d[3])||0)+60*(Number(d[2])||0)+3600*(Number(d[1])||0)}function uq(b,c,d,e){this.frameRate=Number(b)||30;this.b=Number(c)||1;this.a=Number(e);0==this.a&&(this.a=b?this.frameRate*this.b:1);d&&(b=/^(\d+) (\d+)$/g.exec(d))&&(this.frameRate*=Number(b[1])/Number(b[2]))}
  var wq=/^(\d{1,2}(?:\.\d+)?|100)% (\d{1,2}(?:\.\d+)?|100)%$/,Jq=/^(\d{1,2}(?:\.\d+)?|100)%$/,Iq=/^(\d+px|\d+em|\d*\.?\d+c)$/,xq=/^(\d+)px (\d+)px$/,Mq=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Nq=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Pq=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Qq=/^(\d*(?:\.\d*)?)f$/,Rq=/^(\d*(?:\.\d*)?)t$/,Sq=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Hq={left:qe,center:"center",right:"end",start:qe,end:"end"},Gq={left:"line-left",
  center:"center",right:"line-right"};Be["application/ttml+xml"]=function(){return new tq};function Tq(){this.a=new tq}F("shaka.text.Mp4TtmlParser",Tq);Tq.prototype.parseInit=function(b){var c=!1;(new S).I("moov",Kg).I("trak",Kg).I("mdia",Kg).I("minf",Kg).I("stbl",Kg).ea("stsd",Lg).I("stpp",function(b){c=!0;b.parser.stop()}).parse(b);if(!c)throw new I(J,2,2007);};Tq.prototype.parseInit=Tq.prototype.parseInit;Tq.prototype.parseMedia=function(b,c){var d=this,e=!1,f=[];(new S).I("mdat",Mg(function(b){e=!0;f=f.concat(d.a.parseMedia(b,c))})).parse(b,!1);if(!e)throw new I(J,2,2007);return f};
  Tq.prototype.parseMedia=Tq.prototype.parseMedia;Be['application/mp4; codecs="stpp"']=function(){return new Tq};Be['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Tq};Be['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Tq};function Uq(){}F("shaka.text.VttTextParser",Uq);Uq.prototype.parseInit=function(){};Uq.prototype.parseInit=Uq.prototype.parseInit;
  Uq.prototype.parseMedia=function(b,c){var d=Qc(b);d=d.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var e=d.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(e[0]))throw new I(J,2,2E3);d=c.segmentStart;if(e[0].includes("X-TIMESTAMP-MAP")){var f=e[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),g=e[0].match(/MPEGTS:(\d+)/m);if(f&&g){d=Vq(new wm(f[1]));if(null==d)throw new I(J,2,2E3);g=Number(g[1]);for(f=c.segmentStart;95443.7176888889<=f;)f-=95443.7176888889,g+=8589934592;d=c.periodStart+g/9E4-d}}g=
  [];f=r(e[0].split("\n"));for(var h=f.next();!h.done;h=f.next())if(h=h.value,/^Region:/.test(h)){h=new wm(h);var k=new ke;zm(h);xm(h);for(var l=zm(h);l;){var m=k,n=l;(l=/^id=(.*)$/.exec(n))?m.id=l[1]:(l=/^width=(\d{1,2}|100)%$/.exec(n))?m.width=Number(l[1]):(l=/^lines=(\d+)$/.exec(n))?(m.height=Number(l[1]),m.heightUnits=2):(l=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(n))?(m.regionAnchorX=Number(l[1]),m.regionAnchorY=Number(l[2])):(l=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(n))?
  (m.viewportAnchorX=Number(l[1]),m.viewportAnchorY=Number(l[2])):/^scroll=up$/.exec(n)&&(m.scroll="up");xm(h);l=zm(h)}g.push(k)}f=[];e=r(e.slice(1));for(h=e.next();!h.done;h=e.next()){m=h.value.split("\n");l=d;if(1==m.length&&!m[0]||/^NOTE($|[ \t])/.test(m[0])||"STYLE"==m[0])h=null;else{h=null;m[0].includes("--\x3e")||(h=m[0],m.splice(0,1));k=new wm(m[0]);n=Vq(k);var q=ym(k,/[ \t]+--\x3e[ \t]+/g),t=Vq(k);if(null==n||null==q||null==t)throw new I(J,2,2001);m=new ie(n+l,t+l,m.slice(1).join("\n").trim());
  xm(k);for(l=zm(k);l;)Wq(m,l,g),xm(k),l=zm(k);null!=h&&(m.id=h);h=m}h&&f.push(h)}return f};Uq.prototype.parseMedia=Uq.prototype.parseMedia;
  function Wq(b,c,d){var e;if(e=/^align:(start|middle|center|end|left|right)$/.exec(c))c=e[1],"middle"==c?b.textAlign=ne:b.textAlign=ue[c.toUpperCase()];else if(e=/^vertical:(lr|rl)$/.exec(c))b.writingMode="lr"==e[1]?"vertical-lr":"vertical-rl";else if(e=/^size:([\d.]+)%$/.exec(c))b.size=Number(e[1]);else if(e=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(c))b.position=Number(e[1]),e[2]&&(c=e[2],b.positionAlign="line-left"==c||"start"==c?"line-left":"line-right"==c||"end"==
  c?"line-right":"center");else if(e=/^region:(.*)$/.exec(c)){if(c=Xq(d,e[1]))b.region=c}else if(d=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=1,b.line=Number(d[1]),d[2]&&(b.lineAlign=we[d[2].toUpperCase()]);else if(d=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=pe,b.line=Number(d[1]),d[2]&&(b.lineAlign=we[d[2].toUpperCase()])}function Xq(b,c){var d=b.filter(function(b){return b.id==c});return d.length?d[0]:null}
  function Vq(b){b=ym(b,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g);if(null==b)return null;var c=Number(b[2]),d=Number(b[3]);return 59<c||59<d?null:Number(b[4])/1E3+d+60*c+3600*(Number(b[1])||0)}Be["text/vtt"]=function(){return new Uq};Be['text/vtt; codecs="vtt"']=function(){return new Uq};function Yq(){this.a=null}F("shaka.text.Mp4VttParser",Yq);Yq.prototype.parseInit=function(b){var c=this,d=!1;(new S).I("moov",Kg).I("trak",Kg).I("mdia",Kg).ea("mdhd",function(b){0==b.version?(b.reader.skip(4),b.reader.skip(4),c.a=b.reader.G(),b.reader.skip(4)):(b.reader.skip(8),b.reader.skip(8),c.a=b.reader.G(),b.reader.skip(8));b.reader.skip(4)}).I("minf",Kg).I("stbl",Kg).ea("stsd",Lg).I("wvtt",function(){d=!0}).parse(b);if(!this.a)throw new I(J,2,2008);if(!d)throw new I(J,2,2008);};
  Yq.prototype.parseInit=Yq.prototype.parseInit;
  Yq.prototype.parseMedia=function(b,c){if(!this.a)throw new I(J,2,2008);var d=0,e=[],f,g=[],h=!1,k=!1,l=!1,m=null;(new S).I("moof",Kg).I("traf",Kg).ea("tfdt",function(b){h=!0;d=0==b.version?b.reader.G():b.reader.qb()}).ea("tfhd",function(b){var c=b.flags;b=b.reader;b.skip(4);c&1&&b.skip(8);c&2&&b.skip(4);m=c&8?b.G():null}).ea("trun",function(b){k=!0;var c=b.version,d=b.flags;b=b.reader;var f=b.G();d&1&&b.skip(4);d&4&&b.skip(4);var g=[];f=r(jb(f));for(var h=f.next();!h.done;h=f.next())h={duration:null,
  sampleSize:null,Rc:null},d&256&&(h.duration=b.G()),d&512&&(h.sampleSize=b.G()),d&1024&&b.skip(4),d&2048&&(h.Rc=0==c?b.G():b.rd()),g.push(h);e=g}).I("mdat",Mg(function(b){l=!0;f=b})).parse(b,!1);if(!l&&!h&&!k)throw new I(J,2,2008);for(var n=d,q=new R(f,0),t=r(e),u=t.next();!u.done;u=t.next()){u=u.value;var w=u.duration||m,C=u.Rc?d+u.Rc:n;n=C+(w||0);var E=0;do{var D=q.G();E+=D;var H=q.G(),N=null;"vttc"==Ng(H)?8<D&&(N=q.Va(D-8)):q.skip(D-8);w&&N&&(D=Zq(N,c.periodStart+C/this.a,c.periodStart+n/this.a),
  g.push(D))}while(u.sampleSize&&E<u.sampleSize)}return g.filter(Zd)};Yq.prototype.parseMedia=Yq.prototype.parseMedia;function Zq(b,c,d){var e,f,g;(new S).I("payl",Mg(function(b){e=Qc(b)})).I("iden",Mg(function(b){f=Qc(b)})).I("sttg",Mg(function(b){g=Qc(b)})).parse(b);return e?$q(e,f,g,c,d):null}function $q(b,c,d,e,f){b=new ie(e,f,b);c&&(b.id=c);if(d)for(c=new wm(d),d=zm(c);d;)Wq(b,d,[]),xm(c),d=zm(c);return b}Be['application/mp4; codecs="wvtt"']=function(){return new Yq};function ar(){}F("shaka.util.Dom",ar);ar.removeAllChildren=function(b){for(;b.firstChild;)b.removeChild(b.firstChild)};/*
   @license
   EME Encryption Scheme Polyfill
   Copyright 2019 Google LLC
   SPDX-License-Identifier: Apache-2.0
  */
  function br(){}var cr;F("EmeEncryptionSchemePolyfill",br);function dr(){cr?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(cr=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=er):console.debug("EmeEncryptionSchemePolyfill: EME not found")}br.install=dr;
  function er(b,c){var d=this;return v(function f(){var g;return B(f,function(f){switch(f.i){case 1:return console.assert(d==navigator,'bad "this" for requestMediaKeySystemAccess'),x(f,cr.call(d,b,c),2);case 2:g=f.o;if(fr(g))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=cr,f["return"](g);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=
  gr;return f["return"](gr.call(d,b,c))}})})}
  function gr(b,c){var d=this;return v(function f(){var g,h,k,l,m,n,q,t;return B(f,function(f){switch(f.i){case 1:console.assert(d==navigator,'bad "this" for requestMediaKeySystemAccess');g=hr(b);h=[];for(var u=r(c),C=u.next();!C.done;C=u.next())k=C.value,l=ir(k.videoCapabilities,g),m=ir(k.audioCapabilities,g),k.videoCapabilities&&k.videoCapabilities.length&&!l.length||k.audioCapabilities&&k.audioCapabilities.length&&!m.length||(n=Object.assign({},k),n.videoCapabilities=l,n.audioCapabilities=m,h.push(n));
  if(!h.length)throw q=Error("Unsupported keySystem or supportedConfigurations."),q.name="NotSupportedError",q.code=DOMException.NOT_SUPPORTED_ERR,q;return x(f,cr.call(d,b,h),2);case 2:return t=f.o,f["return"](new jr(t,g))}})})}function ir(b,c){return b?b.filter(function(b){return!b.encryptionScheme||b.encryptionScheme==c}):b}function kr(){}var lr;F("McEncryptionSchemePolyfill",kr);
  function mr(){navigator.mediaCapabilities?(lr=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=nr):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}kr.install=mr;
  function nr(b){var c=this;return v(function e(){var f,g;return B(e,function(e){switch(e.i){case 1:return console.assert(c==navigator.mediaCapabilities,'bad "this" for decodingInfo'),x(e,lr.call(c,b),2);case 2:f=e.o;if(!b.keySystemConfiguration)return e["return"](f);g=f.keySystemAccess;if(fr(g))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=lr,e["return"](f);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
  navigator.mediaCapabilities.decodingInfo=or;return e["return"](or.call(c,b))}})})}
  function or(b){var c=this;return v(function e(){var f,g,h,k,l,m,n;return B(e,function(e){switch(e.i){case 1:return console.assert(c==navigator.mediaCapabilities,'bad "this" for decodingInfo'),f=null,b.keySystemConfiguration&&(g=b.keySystemConfiguration,h=g.keySystem,k=g.audio&&g.audio.encryptionScheme,l=g.video&&g.video.encryptionScheme,f=hr(h),m={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:b},k&&k!=f||l&&l!=f)?e["return"](m):x(e,lr.call(c,b),2);case 2:return n=e.o,
  n.keySystemAccess&&(n.keySystemAccess=new jr(n.keySystemAccess,f)),e["return"](n)}})})}function jr(b,c){this.b=b;this.a=c;this.keySystem=b.keySystem}jr.prototype.getConfiguration=function(){var b=this.b.getConfiguration();if(b.videoCapabilities)for(var c=r(b.videoCapabilities),d=c.next();!d.done;d=c.next())d.value.encryptionScheme=this.a;if(b.audioCapabilities)for(c=r(b.audioCapabilities),d=c.next();!d.done;d=c.next())d.value.encryptionScheme=this.a;return b};jr.prototype.createMediaKeys=function(){return this.b.createMediaKeys()};
  function hr(b){if(b.startsWith("com.widevine")||b.startsWith("com.microsoft")||b.startsWith("com.adobe")||b.startsWith("org.w3"))return"cenc";if(b.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",b,"Please contribute!");return null}function fr(b){b=b.getConfiguration();var c=b.audioCapabilities&&b.audioCapabilities[0];return(b=b.videoCapabilities&&b.videoCapabilities[0]||c)&&void 0!==b.encryptionScheme?!0:!1}function pr(){}
  F("EncryptionSchemePolyfills",pr);function vp(){dr();mr()}pr.install=vp;"undefined"!==typeof module&&module.Pd&&(module.Pd=pr);}).call(exportTo,innerGlobal,innerGlobal);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define!="undefined"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
  
  //# sourceMappingURL=shaka-player.compiled.map