@inlivedev/inlive-js-sdk
Version:
InLive JavaScript SDK
25 lines • 1.6 MB
JavaScript
var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function getAugmentedNamespace(i){if(i.__esModule)return i;var m=i.default;if("function"==typeof m){var v=function a(){return this instanceof a?Reflect.construct(m,arguments,this.constructor):m.apply(this,arguments)};v.prototype=m.prototype}else v={};return Object.defineProperty(v,"__esModule",{value:!0}),Object.keys(i).forEach((function(m){var y=Object.getOwnPropertyDescriptor(i,m);Object.defineProperty(v,m,y.get?y:{enumerable:!0,get:function(){return i[m]}})})),v}var m={};
/*
@license
Shaka Player
Copyright 2016 Google LLC
SPDX-License-Identifier: Apache-2.0
*/!function(m){!function(){var v="undefined"!=typeof window?window:i,y={};for(var w in function(i,m,v){
/*
@license
Shaka Player
Copyright 2016 Google LLC
SPDX-License-Identifier: Apache-2.0
*/
var y;function aa(i){var m=0;return function(){return m<i.length?{done:!1,value:i[m++]}:{done:!0}}}var w="function"==typeof Object.defineProperties?Object.defineProperty:function(i,m,v){return i==Array.prototype||i==Object.prototype||(i[m]=v.value),i};var x=function ca(v){v=["object"==typeof globalThis&&globalThis,v,"object"==typeof i&&i,"object"==typeof self&&self,"object"==typeof m&&m];for(var y=0;y<v.length;++y){var w=v[y];if(w&&w.Math==Math)return w}throw Error("Cannot find global object")}(this);function ea(i,m){if(m)e:{var v=x;i=i.split(".");for(var y=0;y<i.length-1;y++){var _=i[y];if(!(_ in v))break e;v=v[_]}(m=m(y=v[i=i[i.length-1]]))!=y&&null!=m&&w(v,i,{configurable:!0,writable:!0,value:m})}}function fa(i){return(i={next:i})[Symbol.iterator]=function(){return this},i}function r(i){var m="undefined"!=typeof Symbol&&Symbol.iterator&&i[Symbol.iterator];return m?m.call(i):{next:aa(i)}}function ha(i){if(!(i instanceof Array)){i=r(i);for(var m,v=[];!(m=i.next()).done;)v.push(m.value);i=v}return i}ea("Symbol",(function(i){function c(i,m){this.g=i,w(this,"description",{configurable:!0,writable:!0,value:m})}if(i)return i;c.prototype.toString=function(){return this.g};var m="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",v=0;return function b(i){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(m+(i||"")+"_"+v++,i)}})),ea("Symbol.iterator",(function(i){if(i)return i;i=Symbol("Symbol.iterator");for(var m="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),v=0;v<m.length;v++){var y=x[m[v]];"function"==typeof y&&"function"!=typeof y.prototype[i]&&w(y.prototype,i,{configurable:!0,writable:!0,value:function(){return fa(aa(this))}})}return i}));var _,j="function"==typeof Object.create?Object.create:function(i){function b(){}return b.prototype=i,new b};if("function"==typeof Object.setPrototypeOf)_=Object.setPrototypeOf;else{var R;e:{var L={};try{L.__proto__={a:!0},R=L.a;break e}catch(i){}R=!1}_=R?function(i,m){if(i.__proto__=m,i.__proto__!==m)throw new TypeError(i+" is not extensible");return i}:null}var U=_;function oa(i,m){if(i.prototype=j(m.prototype),i.prototype.constructor=i,U)U(i,m);else for(var v in m)if("prototype"!=v)if(Object.defineProperties){var y=Object.getOwnPropertyDescriptor(m,v);y&&Object.defineProperty(i,v,y)}else i[v]=m[v];i.zh=m.prototype}function pa(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.u=this.i=null}function qa(i){if(i.o)throw new TypeError("Generator is already running");i.o=!0}function ra(i,m){i.i={Ee:m,Le:!0},i.g=i.m||i.j}function u(i,m,v){return i.g=v,{value:m}}function A(i){i.g=0}function D(i,m,v){i.m=m,null!=v&&(i.j=v)}function sa(i){i.m=0,i.j=2}function ta(i,m){i.g=m,i.m=0}function ua(i){i.m=0;var m=i.i.Ee;return i.i=null,m}function xa(i){i.u=[i.i],i.m=0,i.j=0}function ya(i,m){var v=i.u.splice(0)[0];(v=i.i=i.i||v)?v.Le?i.g=i.m||i.j:null!=v.A&&i.j<v.A?(i.g=v.A,i.i=null):i.g=i.j:i.g=m}function za(i){this.g=new pa,this.h=i}function Ba(i,m,v,y){try{var w=m.call(i.g.l,v);if(!(w instanceof Object))throw new TypeError("Iterator result "+w+" is not an object");if(!w.done)return i.g.o=!1,w;var x=w.value}catch(m){return i.g.l=null,ra(i.g,m),Ca(i)}return i.g.l=null,y.call(i.g,x),Ca(i)}function Ca(i){for(;i.g.g;)try{var m=i.h(i.g);if(m)return i.g.o=!1,{value:m.value,done:!1}}catch(m){i.g.h=void 0,ra(i.g,m)}if(i.g.o=!1,i.g.i){if(m=i.g.i,i.g.i=null,m.Le)throw m.Ee;return{value:m.return,done:!0}}return{value:void 0,done:!0}}function Da(i){this.next=function(m){return qa(i.g),i.g.l?m=Ba(i,i.g.l.next,m,i.g.s):(i.g.s(m),m=Ca(i)),m},this.throw=function(m){return qa(i.g),i.g.l?m=Ba(i,i.g.l.throw,m,i.g.s):(ra(i.g,m),m=Ca(i)),m},this.return=function(m){return function Aa(i,m){qa(i.g);var v=i.g.l;return v?Ba(i,"return"in v?v.return:function(i){return{value:i,done:!0}},m,i.g.return):(i.g.return(m),Ca(i))}(i,m)},this[Symbol.iterator]=function(){return this}}function G(i){return function Ea(i){function b(m){return i.next(m)}function c(m){return i.throw(m)}return new Promise((function(m,v){!function f(i){i.done?m(i.value):Promise.resolve(i.value).then(b,c).then(f,v)}(i.next())}))}(new Da(new za(i)))}function Fa(){for(var i=Number(this),m=[],v=i;v<arguments.length;v++)m[v-i]=arguments[v];return m}function Ha(i,m){return Object.prototype.hasOwnProperty.call(i,m)}function Ia(i,m,v){i instanceof String&&(i=String(i));for(var y=i.length,w=0;w<y;w++){var x=i[w];if(m.call(v,x,w,i))return{Je:w,v:x}}return{Je:-1,v:void 0}}function Ka(i,m,v){if(null==i)throw new TypeError("The 'this' value for String.prototype."+v+" must not be null or undefined");if(m instanceof RegExp)throw new TypeError("First argument to String.prototype."+v+" must not be a regular expression");return i+""}function La(i,m){i instanceof String&&(i+="");var v=0,y=!1,w={next:function(){if(!y&&v<i.length){var w=v++;return{value:m(w,i[w]),done:!1}}return y=!0,{done:!0,value:void 0}}};return w[Symbol.iterator]=function(){return w},w}pa.prototype.s=function(i){this.h=i},pa.prototype.return=function(i){this.i={return:i},this.g=this.j},pa.prototype.A=function(i){this.g=i},ea("Promise",(function(i){function b(i){this.h=0,this.i=void 0,this.g=[],this.o=!1;var m=this.j();try{i(m.resolve,m.reject)}catch(i){m.reject(i)}}function c(){this.g=null}function d(i){return i instanceof b?i:new b((function(m){m(i)}))}if(i)return i;c.prototype.h=function(i){if(null==this.g){this.g=[];var m=this;this.i((function(){m.l()}))}this.g.push(i)};var m=x.setTimeout;c.prototype.i=function(i){m(i,0)},c.prototype.l=function(){for(;this.g&&this.g.length;){var i=this.g;this.g=[];for(var m=0;m<i.length;++m){var v=i[m];i[m]=null;try{v()}catch(i){this.j(i)}}}this.g=null},c.prototype.j=function(i){this.i((function(){throw i}))},b.prototype.j=function(){function g(v){return function(y){m||(m=!0,v.call(i,y))}}var i=this,m=!1;return{resolve:g(this.F),reject:g(this.l)}},b.prototype.F=function(i){if(i===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(i instanceof b)this.H(i);else{e:switch(typeof i){case"object":var m=null!=i;break e;case"function":m=!0;break e;default:m=!1}m?this.D(i):this.m(i)}},b.prototype.D=function(i){var m=void 0;try{m=i.then}catch(i){return void this.l(i)}"function"==typeof m?this.J(m,i):this.m(i)},b.prototype.l=function(i){this.s(2,i)},b.prototype.m=function(i){this.s(1,i)},b.prototype.s=function(i,m){if(0!=this.h)throw Error("Cannot settle("+i+", "+m+"): Promise already settled in state"+this.h);this.h=i,this.i=m,2===this.h&&this.G(),this.u()},b.prototype.G=function(){var i=this;m((function(){if(i.B()){var m=x.console;void 0!==m&&m.error(i.i)}}),1)},b.prototype.B=function(){if(this.o)return!1;var i=x.CustomEvent,m=x.Event,v=x.dispatchEvent;return void 0===v||("function"==typeof i?i=new i("unhandledrejection",{cancelable:!0}):"function"==typeof m?i=new m("unhandledrejection",{cancelable:!0}):(i=x.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,i),i.promise=this,i.reason=this.i,v(i))},b.prototype.u=function(){if(null!=this.g){for(var i=0;i<this.g.length;++i)v.h(this.g[i]);this.g=null}};var v=new c;return b.prototype.H=function(i){var m=this.j();i.Lc(m.resolve,m.reject)},b.prototype.J=function(i,m){var v=this.j();try{i.call(m,v.resolve,v.reject)}catch(i){v.reject(i)}},b.prototype.then=function(i,m){function k(i,m){return"function"==typeof i?function(m){try{v(i(m))}catch(i){y(i)}}:m}var v,y,w=new b((function(i,m){v=i,y=m}));return this.Lc(k(i,v),k(m,y)),w},b.prototype.catch=function(i){return this.then(void 0,i)},b.prototype.Lc=function(i,m){function k(){switch(y.h){case 1:i(y.i);break;case 2:m(y.i);break;default:throw Error("Unexpected state: "+y.h)}}var y=this;null==this.g?v.h(k):this.g.push(k),this.o=!0},b.resolve=d,b.reject=function(i){return new b((function(m,v){v(i)}))},b.race=function(i){return new b((function(m,v){for(var y=r(i),w=y.next();!w.done;w=y.next())d(w.value).Lc(m,v)}))},b.all=function(i){var m=r(i),v=m.next();return v.done?d([]):new b((function(i,y){function n(m){return function(v){w[m]=v,0==--x&&i(w)}}var w=[],x=0;do{w.push(void 0),x++,d(v.value).Lc(n(w.length-1),y),v=m.next()}while(!v.done)}))},b})),ea("WeakMap",(function(i){function b(i){if(this.g=(v+=Math.random()+1).toString(),i){i=r(i);for(var m;!(m=i.next()).done;)m=m.value,this.set(m[0],m[1])}}function c(){}function d(i){var m=typeof i;return"object"===m&&null!==i||"function"===m}function e(i){if(!Ha(i,m)){var v=new c;w(i,m,{value:v})}}function f(i){var m=Object[i];m&&(Object[i]=function(i){return i instanceof c?i:(Object.isExtensible(i)&&e(i),m(i))})}if(function(){if(!i||!Object.seal)return!1;try{var m=Object.seal({}),v=Object.seal({}),y=new i([[m,2],[v,3]]);return 2==y.get(m)&&3==y.get(v)&&(y.delete(m),y.set(v,4),!y.has(m)&&4==y.get(v))}catch(i){return!1}}())return i;var m="$jscomp_hidden_"+Math.random();f("freeze"),f("preventExtensions"),f("seal");var v=0;return b.prototype.set=function(i,v){if(!d(i))throw Error("Invalid WeakMap key");if(e(i),!Ha(i,m))throw Error("WeakMap key fail: "+i);return i[m][this.g]=v,this},b.prototype.get=function(i){return d(i)&&Ha(i,m)?i[m][this.g]:void 0},b.prototype.has=function(i){return d(i)&&Ha(i,m)&&Ha(i[m],this.g)},b.prototype.delete=function(i){return!!(d(i)&&Ha(i,m)&&Ha(i[m],this.g))&&delete i[m][this.g]},b})),ea("Map",(function(i){function b(){var i={};return i.Qa=i.next=i.head=i}function c(i,m){var v=i.g;return fa((function(){if(v){for(;v.head!=i.g;)v=v.Qa;for(;v.next!=v.head;)return v=v.next,{done:!1,value:m(v)};v=null}return{done:!0,value:void 0}}))}function d(i,y){var w=y&&typeof y;"object"==w||"function"==w?m.has(y)?w=m.get(y):(w=""+ ++v,m.set(y,w)):w="p_"+y;var x=i.h[w];if(x&&Ha(i.h,w))for(i=0;i<x.length;i++){var _=x[i];if(y!=y&&_.key!=_.key||y===_.key)return{id:w,list:x,index:i,fa:_}}return{id:w,list:x,index:-1,fa:void 0}}function e(i){if(this.h={},this.g=b(),this.size=0,i){i=r(i);for(var m;!(m=i.next()).done;)m=m.value,this.set(m[0],m[1])}}if(function(){if(!i||"function"!=typeof i||!i.prototype.entries||"function"!=typeof Object.seal)return!1;try{var m=Object.seal({x:4}),v=new i(r([[m,"s"]]));if("s"!=v.get(m)||1!=v.size||v.get({x:4})||v.set({x:4},"t")!=v||2!=v.size)return!1;var y=v.entries(),w=y.next();return!w.done&&w.value[0]==m&&"s"==w.value[1]&&!((w=y.next()).done||4!=w.value[0].x||"t"!=w.value[1]||!y.next().done)}catch(i){return!1}}())return i;var m=new WeakMap;e.prototype.set=function(i,m){var v=d(this,i=0===i?0:i);return v.list||(v.list=this.h[v.id]=[]),v.fa?v.fa.value=m:(v.fa={next:this.g,Qa:this.g.Qa,head:this.g,key:i,value:m},v.list.push(v.fa),this.g.Qa.next=v.fa,this.g.Qa=v.fa,this.size++),this},e.prototype.delete=function(i){return!(!(i=d(this,i)).fa||!i.list)&&(i.list.splice(i.index,1),i.list.length||delete this.h[i.id],i.fa.Qa.next=i.fa.next,i.fa.next.Qa=i.fa.Qa,i.fa.head=null,this.size--,!0)},e.prototype.clear=function(){this.h={},this.g=this.g.Qa=b(),this.size=0},e.prototype.has=function(i){return!!d(this,i).fa},e.prototype.get=function(i){return(i=d(this,i).fa)&&i.value},e.prototype.entries=function(){return c(this,(function(i){return[i.key,i.value]}))},e.prototype.keys=function(){return c(this,(function(i){return i.key}))},e.prototype.values=function(){return c(this,(function(i){return i.value}))},e.prototype.forEach=function(i,m){for(var v,y=this.entries();!(v=y.next()).done;)v=v.value,i.call(m,v[1],v[0],this)},e.prototype[Symbol.iterator]=e.prototype.entries;var v=0;return e})),ea("Set",(function(i){function b(i){if(this.g=new Map,i){i=r(i);for(var m;!(m=i.next()).done;)this.add(m.value)}this.size=this.g.size}return function(){if(!i||"function"!=typeof i||!i.prototype.entries||"function"!=typeof Object.seal)return!1;try{var m=Object.seal({x:4}),v=new i(r([m]));if(!v.has(m)||1!=v.size||v.add(m)!=v||1!=v.size||v.add({x:4})!=v||2!=v.size)return!1;var y=v.entries(),w=y.next();return!w.done&&w.value[0]==m&&w.value[1]==m&&(!(w=y.next()).done&&w.value[0]!=m&&4==w.value[0].x&&w.value[1]==w.value[0]&&y.next().done)}catch(i){return!1}}()?i:(b.prototype.add=function(i){return i=0===i?0:i,this.g.set(i,i),this.size=this.g.size,this},b.prototype.delete=function(i){return i=this.g.delete(i),this.size=this.g.size,i},b.prototype.clear=function(){this.g.clear(),this.size=0},b.prototype.has=function(i){return this.g.has(i)},b.prototype.entries=function(){return this.g.entries()},b.prototype.values=function(){return this.g.values()},b.prototype.keys=b.prototype.values,b.prototype[Symbol.iterator]=b.prototype.values,b.prototype.forEach=function(i,m){var v=this;this.g.forEach((function(y){return i.call(m,y,y,v)}))},b)})),ea("Array.prototype.findIndex",(function(i){return i||function(i,m){return Ia(this,i,m).Je}})),ea("Object.is",(function(i){return i||function(i,m){return i===m?0!==i||1/i==1/m:i!=i&&m!=m}})),ea("Array.prototype.includes",(function(i){return i||function(i,m){var v=this;v instanceof String&&(v=String(v));var y=v.length;for(0>(m=m||0)&&(m=Math.max(m+y,0));m<y;m++){var w=v[m];if(w===i||Object.is(w,i))return!0}return!1}})),ea("String.prototype.includes",(function(i){return i||function(i,m){return-1!==Ka(this,i,"includes").indexOf(i,m||0)}})),ea("Array.prototype.find",(function(i){return i||function(i,m){return Ia(this,i,m).v}})),ea("String.prototype.startsWith",(function(i){return i||function(i,m){var v=Ka(this,i,"startsWith"),y=v.length,w=i.length;m=Math.max(0,Math.min(0|m,v.length));for(var x=0;x<w&&m<y;)if(v[m++]!=i[x++])return!1;return x>=w}})),ea("Array.prototype.keys",(function(i){return i||function(){return La(this,(function(i){return i}))}}));var B="function"==typeof Object.assign?Object.assign:function(i,m){for(var v=1;v<arguments.length;v++){var y=arguments[v];if(y)for(var w in y)Ha(y,w)&&(i[w]=y[w])}return i};ea("Object.assign",(function(i){return i||B})),ea("Array.from",(function(i){return i||function(i,m,v){m=null!=m?m:function(i){return i};var y=[],w="undefined"!=typeof Symbol&&Symbol.iterator&&i[Symbol.iterator];if("function"==typeof w){i=w.call(i);for(var x=0;!(w=i.next()).done;)y.push(m.call(v,w.value,x++))}else for(w=i.length,x=0;x<w;x++)y.push(m.call(v,i[x],x));return y}})),ea("Array.prototype.values",(function(i){return i||function(){return La(this,(function(i,m){return m}))}})),ea("Promise.prototype.finally",(function(i){return i||function(i){return this.then((function(m){return Promise.resolve(i()).then((function(){return m}))}),(function(m){return Promise.resolve(i()).then((function(){throw m}))}))}})),ea("Array.prototype.entries",(function(i){return i||function(){return La(this,(function(i,m){return[i,m]}))}})),ea("String.prototype.repeat",(function(i){return i||function(i){var m=Ka(this,null,"repeat");if(0>i||1342177279<i)throw new RangeError("Invalid count value");i|=0;for(var v="";i;)1&i&&(v+=m),(i>>>=1)&&(m+=m);return v}})),ea("Number.isNaN",(function(i){return i||function(i){return"number"==typeof i&&isNaN(i)}})),ea("Object.values",(function(i){return i||function(i){var m,v=[];for(m in i)Ha(i,m)&&v.push(i[m]);return v}})),ea("Math.log2",(function(i){return i||function(i){return Math.log(i)/Math.LN2}})),ea("Math.trunc",(function(i){return i||function(i){if(i=Number(i),isNaN(i)||1/0===i||-1/0===i||0===i)return i;var m=Math.floor(Math.abs(i));return 0>i?-m:m}})),ea("Object.entries",(function(i){return i||function(i){var m,v=[];for(m in i)Ha(i,m)&&v.push([m,i[m]]);return v}}));var q=this||self;function K(i,m){i=i.split(".");var v,y=q;i[0]in y||void 0===y.execScript||y.execScript("var "+i[0]);for(;i.length&&(v=i.shift());)i.length||void 0===m?y=y[v]&&y[v]!==Object.prototype[v]?y[v]:y[v]={}:y[v]=m}function Pa(i){this.g=Math.exp(Math.log(.5)/i),this.i=this.h=0}function Qa(i){return i.h/(1-Math.pow(i.g,i.i))}function Ra(){this.h=new Pa(2),this.j=new Pa(5),this.g=0,this.i=128e3,this.l=16e3}function Ta(){}function Va(){}function Wa(){}function Xa(i){var m=Fa.apply(1,arguments);z.has(i)||(z.add(i),Wa.apply(Ta,ha(m)))}function Za(){}Pa.prototype.sample=function(i,m){var v=Math.pow(this.g,i);m=m*(1-v)+v*this.h,isNaN(m)||(this.h=m,this.i+=i)},Ra.prototype.configure=function(i){this.i=i.minTotalBytes,this.l=i.minBytes,this.h.g=Math.exp(Math.log(.5)/i.fastHalfLife),this.j.g=Math.exp(Math.log(.5)/i.slowHalfLife)},Ra.prototype.sample=function(i,m){if(!(m<this.l)){var v=8e3*m/i;i/=1e3,this.g+=m,this.h.sample(i,v),this.j.sample(i,v)}},Ra.prototype.getBandwidthEstimate=function(i){return this.g<this.i?i:Math.min(Qa(this.h),Qa(this.j))};var z=new Set;if(i.console&&i.console.log.bind){var $={},J=($[1]=console.error.bind(console),$[2]=console.warn.bind(console),$[3]=console.info.bind(console),$[4]=console.log.bind(console),$[5]=console.debug.bind(console),$[6]=console.debug.bind(console),$);Wa=J[2],Va=J[1]}function eb(i){if(Q.has(i))return Q.get(i);var m=MediaSource.isTypeSupported(i);return Q.set(i,m),m}var Q=new Map;function gb(i,m){return!("number"!=typeof i||"number"!=typeof m||!isNaN(i)||!isNaN(m))||i===m}function hb(i,m){-1<(m=i.indexOf(m))&&i.splice(m,1)}function ib(i,m,v){if(v||(v=gb),i.length!=m.length)return!1;m=m.slice();for(var y={},w=(i=r(i)).next();!w.done;y={md:y.md},w=i.next()){if(y.md=w.value,w=m.findIndex(function(i){return function(m){return v(i.md,m)}}(y)),-1==w)return!1;m[w]=m[m.length-1],m.pop()}return 0==m.length}function jb(i,m,v){if(v||(v=gb),i.length!=m.length)return!1;for(var y=0;y<i.length;y++)if(!v(i[y],m[y]))return!1;return!0}function kb(i,m,v){this.startTime=i,this.direction=Ie,this.endTime=m,this.payload=v,this.region=new mb,this.position=null,this.positionAlign=re,this.size=0,this.textAlign=oe,this.writingMode=_e,this.lineInterpretation=Fe,this.line=null,this.lineHeight="",this.lineAlign=$e,this.displayAlign=Se,this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=pn,this.fontStyle=Sn,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textDecoration=[],this.wrapLine=!0,this.id="",this.nestedCues=[],this.lineBreak=this.isContainer=!1,this.cellResolution={columns:32,rows:15}}function wb(i,m){if(i.startTime!=m.startTime||i.endTime!=m.endTime||i.payload!=m.payload)return!1;for(var v in i)if("startTime"!=v&&"endTime"!=v&&"payload"!=v)if("nestedCues"==v){if(!jb(i.nestedCues,m.nestedCues,wb))return!1}else if("region"==v||"cellResolution"==v){for(var y in i[v])if(i[v][y]!=m[v][y])return!1}else if(Array.isArray(i[v])){if(!jb(i[v],m[v]))return!1}else if(i[v]!=m[v])return!1;return!0}kb.prototype.clone=function(){var i,m=new kb(0,0,"");for(i in this)m[i]=this[i],m[i]&&m[i].constructor==Array&&(m[i]=m[i].slice());return m},K("shaka.text.Cue",kb);var re="auto";kb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:re};var oe="center",ce={LEFT:"left",RIGHT:"right",CENTER:oe,START:"start",END:"end"};kb.textAlign=ce;var Se="after",Ee={BEFORE:"before",CENTER:"center",AFTER:Se};kb.displayAlign=Ee;var Ie="ltr";kb.direction={HORIZONTAL_LEFT_TO_RIGHT:Ie,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var _e="horizontal-tb";kb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_e,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Fe=0;kb.lineInterpretation={LINE_NUMBER:Fe,PERCENTAGE:1};var $e="start",_t={CENTER:"center",START:$e,END:"end"};kb.lineAlign=_t;var Lt={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};kb.defaultTextColor=Lt;var rn={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};kb.defaultTextBackgroundColor=rn;var pn=400;kb.fontWeight={NORMAL:pn,BOLD:700};var Sn="normal",In={NORMAL:Sn,ITALIC:"italic",OBLIQUE:"oblique"};function mb(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Mn,this.scroll=_n}kb.fontStyle=In,kb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},K("shaka.text.CueRegion",mb);var Mn=1;mb.units={PX:0,PERCENTAGE:Mn,LINES:2};var _n="";function Fb(){}function Gb(i,m){if(!i&&!m)return!0;if(!i||!m||i.byteLength!=m.byteLength)return!1;if(Hb(i)==Hb(m)&&(i.byteOffset||0)==(m.byteOffset||0))return!0;var v=M(i);m=M(m);for(var y=0;y<i.byteLength;y++)if(v[y]!=m[y])return!1;return!0}function Hb(i){return i instanceof ArrayBuffer?i:i.buffer}function Ib(i){return i instanceof ArrayBuffer?i:0==i.byteOffset&&i.byteLength==i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer}function M(i,m,v){return Jb(i,void 0===m?0:m,v=void 0===v?1/0:v,Uint8Array)}function Lb(i,m,v){return Jb(i,void 0===m?0:m,v=void 0===v?1/0:v,DataView)}function Jb(i,m,v,y){var w=(i.byteOffset||0)+i.byteLength;return m=Math.max(0,Math.min((i.byteOffset||0)+m,w)),new y(Hb(i),m,Math.min(m+Math.max(v,0),w)-m)}function O(i,m,v){var y=Fa.apply(3,arguments);this.severity=i,this.category=m,this.code=v,this.data=y,this.handled=!1}mb.scrollMode={NONE:_n,UP:"up"},K("shaka.util.BufferUtils",Fb),Fb.toDataView=Lb,Fb.toUint8=M,Fb.toArrayBuffer=Ib,Fb.equal=Gb,O.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},K("shaka.util.Error",O),O.Severity={RECOVERABLE:1,CRITICAL:2},O.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},O.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,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,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_SRC_EQUALS:2016,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,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,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_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,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,HLS_AES_128_INVALID_IV_LENGTH:4043,HLS_AES_128_INVALID_KEY_LENGTH:4044,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,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};
/*
@license
Copyright 2008 The Closure Library Authors
SPDX-License-Identifier: Apache-2.0
*/
var jn=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");
/*
@license
Copyright 2006 The Closure Library Authors
SPDX-License-Identifier: Apache-2.0
*/function Nb(i){var m;i instanceof Nb?(Ob(this,i.Ea),this.pb=i.pb,this.Ha=i.Ha,Pb(this,i.Kb),this.qa=i.qa,Qb(this,i.g.clone()),this.fb=i.fb):i&&(m=String(i).match(jn))?(Ob(this,m[1]||"",!0),this.pb=Rb(m[2]||""),this.Ha=Rb(m[3]||"",!0),Pb(this,m[4]),this.qa=Rb(m[5]||"",!0),Qb(this,m[6]||"",!0),this.fb=Rb(m[7]||"")):this.g=new Sb(null)}function Ob(i,m,v){i.Ea=v?Rb(m,!0):m,i.Ea&&(i.Ea=i.Ea.replace(/:$/,""))}function Pb(i,m){if(m){if(m=Number(m),isNaN(m)||0>m)throw Error("Bad port number "+m);i.Kb=m}else i.Kb=null}function Qb(i,m,v){m instanceof Sb?i.g=m:(v||(m=Tb(m,Pn)),i.g=new Sb(m))}function Rb(i,m){return i?m?decodeURI(i):decodeURIComponent(i):""}function Tb(i,m,v){return null!=i?(i=encodeURI(i).replace(m,$b),v&&(i=i.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),i):null}function $b(i){return"%"+((i=i.charCodeAt(0))>>4&15).toString(16)+(15&i).toString(16)}(y=Nb.prototype).Ea="",y.pb="",y.Ha="",y.Kb=null,y.qa="",y.fb="",y.toString=function(){var i=[],m=this.Ea;if(m&&i.push(Tb(m,On,!0),":"),m=this.Ha){i.push("//");var v=this.pb;v&&i.push(Tb(v,On,!0),"@"),i.push(encodeURIComponent(m).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(m=this.Kb)&&i.push(":",String(m))}return(m=this.qa)&&(this.Ha&&"/"!=m.charAt(0)&&i.push("/"),i.push(Tb(m,"/"==m.charAt(0)?Nn:Ln,!0))),(m=this.g.toString())&&i.push("?",m),(m=this.fb)&&i.push("#",Tb(m,Un)),i.join("")},y.resolve=function(i){var m=this.clone();"data"===m.Ea&&(m=new Nb);var v=!!i.Ea;v?Ob(m,i.Ea):v=!!i.pb,v?m.pb=i.pb:v=!!i.Ha,v?m.Ha=i.Ha:v=null!=i.Kb;var y=i.qa;if(v)Pb(m,i.Kb);else if(v=!!i.qa){if("/"!=y.charAt(0))if(this.Ha&&!this.qa)y="/"+y;else{var w=m.qa.lastIndexOf("/");-1!=w&&(y=m.qa.substr(0,w+1)+y)}if(".."==y||"."==y)y="";else if(-1!=y.indexOf("./")||-1!=y.indexOf("/.")){w=0==y.lastIndexOf("/",0),y=y.split("/");for(var x=[],_=0;_<y.length;){var j=y[_++];"."==j?w&&_==y.length&&x.push(""):".."==j?((1<x.length||1==x.length&&""!=x[0])&&x.pop(),w&&_==y.length&&x.push("")):(x.push(j),w=!0)}y=x.join("/")}}return v?m.qa=y:v=""!==i.g.toString(),v?Qb(m,i.g.clone()):v=!!i.fb,v&&(m.fb=i.fb),m},y.clone=function(){return new Nb(this)};var On=/[#\/\?@]/g,Ln=/[#\?:]/g,Nn=/[#\?]/g,Pn=/[#\?@]/g,Un=/#/g;function Sb(i){this.g=i||null}function ac(i){if(!i.la&&(i.la={},i.Oc=0,i.g))for(var m=i.g.split("&"),v=0;v<m.length;v++){var y=m[v].indexOf("="),w=null;if(0<=y){var x=m[v].substring(0,y);w=m[v].substring(y+1)}else x=m[v];x=decodeURIComponent(x.replace(/\+/g," ")),w=w||"",i.add(x,decodeURIComponent(w.replace(/\+/g," ")))}}function bc(i,m){return i.concat(m)}function cc(){}function dc(i){return null!=i}function ec(i,m){if(0==m.length)return i;var v=m.map((function(i){return new Nb(i)}));return i.map((function(i){return new Nb(i)})).map((function(i){return v.map((function(m){return i.resolve(m)}))})).reduce(bc,[]).map((function(i){return i.toString()}))}function fc(i,m){return{keySystem:i,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:m||[],keyIds:new Set}}function gc(i,m){if(1==m.length)return m[0];if(null!=(i=hc(i,m)))return i;throw new O(2,4,4025,m)}function hc(i,m){for(var v=r(Gn[i]),y=v.next();!y.done;y=v.next()){y=y.value;for(var w=r(m),x=w.next();!x.done;x=w.next())if(x=x.value,y.test(x.trim()))return x.trim()}return i==Fn?"":null}(y=Sb.prototype).la=null,y.Oc=null,y.add=function(i,m){ac(this),this.g=null;var v=this.la.hasOwnProperty(i)?this.la[i]:null;return v||(this.la[i]=v=[]),v.push(m),this.Oc++,this},y.set=function(i,m){return ac(this),this.g=null,this.la.hasOwnProperty(i)?this.la[i]=[m]:this.add(i,m),this},y.toString=function(){if(this.g)return this.g;if(!this.la)return"";var i,m=[];for(i in this.la)for(var v=encodeURIComponent(i),y=this.la[i],w=0;w<y.length;w++){var x=v;""!==y[w]&&(x+="="+encodeURIComponent(y[w])),m.push(x)}return this.g=m.join("&")},y.clone=function(){var i=new Sb;if(i.g=this.g,this.la){var m,v={};for(m in this.la)v[m]=this.la[m].concat();i.la=v,i.Oc=this.Oc}return i};var Fn="text",Vn={va:"video",Hc:"audio",X:Fn,Wb:"image",Gg:"application"},Gn={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cx]$/,/^[du]dts$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function lc(){var i,m,v=new Promise((function(v,y){i=v,m=y}));return v.resolve=i,v.reject=m,v}function mc(i){this.h=i,this.g=void 0}function nc(i){this.h=i,this.g=null}function P(i){this.h=i,this.g=null}function oc(){return!(!i.MediaSource||!MediaSource.isTypeSupported)}function pc(i){return""!=qc().canPlayType(i)}function rc(){return sc("Xbox One")}function tc(){return sc("Tizen")}function uc(){return sc("Web0S")&&sc("Chrome/38.0.2125.122 Safari/537.36")}function vc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!tc()&&!sc("PC=EOS")&&!sc("VirginMedia")&&!wc()&&!sc("AFT")}function wc(){return sc("PlayStation 4")}function xc(){if(!vc())return null;var i=navigator.userAgent.match(/Version\/(\d+)/);return i||(i=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(i[1],10):null}function sc(i){return(navigator.userAgent||"").includes(i)}function qc(){return Hn||(qn||(qn=new P((function(){Hn=null}))),(Hn=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Hn=document.createElement("video")),qn.N(1),Hn)}lc.prototype.resolve=function(){},lc.prototype.reject=function(){},mc.prototype.value=function(){return null==this.g&&(this.g=this.h()),this.g},nc.prototype.N=function(m){var v=this;this.stop();var y=!0,w=null;return this.g=function(){i.clearTimeout(w),y=!1},w=i.setTimeout((function(){y&&v.h()}),1e3*m),this},nc.prototype.stop=function(){this.g&&(this.g(),this.g=null)},P.prototype.Mb=function(){return this.stop(),this.h(),this},P.prototype.N=function(i){var m=this;return this.stop(),this.g=new nc((function(){m.h()})).N(i),this},P.prototype.Ca=function(i){var m=this;return this.stop(),this.g=new nc((function(){m.g.N(i),m.h()})).N(i),this},P.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},K("shaka.util.Timer",P),P.prototype.stop=P.prototype.stop,P.prototype.tickEvery=P.prototype.Ca,P.prototype.tickAfter=P.prototype.N,P.prototype.tickNow=P.prototype.Mb;var qn=null,Hn=null;function Ac(){}function Bc(m){if(!m)return"";if(239==(m=M(m))[0]&&187==m[1]&&191==m[2]&&(m=m.subarray(3)),i.TextDecoder&&!wc())return(m=(new TextDecoder).decode(m)).includes("�")&&Va('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),m;for(var v="",y=0;y<m.length;++y){var w=65533;if(0==(128&m[y])?w=m[y]:m.length>=y+2&&192==(224&m[y])&&128==(192&m[y+1])?(w=(31&m[y])<<6|63&m[y+1],y+=1):m.length>=y+3&&224==(240&m[y])&&128==(192&m[y+1])&&128==(192&m[y+2])?(w=(15&m[y])<<12|(63&m[y+1])<<6|63&m[y+2],y+=2):m.length>=y+4&&240==(241&m[y])&&128==(192&m[y+1])&&128==(192&m[y+2])&&128==(192&m[y+3])&&(w=(7&m[y])<<18|(63&m[y+1])<<12|(63&m[y+2])<<6|63&m[y+3],y+=3),65535>=w)v+=String.fromCharCode(w);else{var x=1023&(w-=65536);v+=String.fromCharCode(55296+(w>>10)),v+=String.fromCharCode(56320+x)}}return v}function Cc(i,m,v){if(!i)return"";if(!v&&0!=i.byteLength%2)throw new O(2,2,2004);v=Math.floor(i.byteLength/2);var y=new Uint16Array(v);i=Lb(i);for(var w=0;w<v;w++)y[w]=i.getUint16(2*w,m);return Kn.value()(y)}function Ec(i){function b(i){return m.byteLength<=i||32<=m[i]&&126>=m[i]}if(!i)return"";var m=M(i);if(239==m[0]&&187==m[1]&&191==m[2])return Bc(m);if(254==m[0]&&255==m[1])return Cc(m.subarray(2),!1);if(255==m[0]&&254==m[1])return Cc(m.subarray(2),!0);if(0==m[0]&&0==m[2])return Cc(i,!1);if(0==m[1]&&0==m[3])return Cc(i,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Bc(i);throw new O(2,2,2003)}function Fc(m){if(i.TextEncoder&&!wc()){var v=new TextEncoder;return Ib(v.encode(m))}m=encodeURIComponent(m),m=unescape(m),v=new Uint8Array(m.length);for(var y=0;y<m.length;y++)v[y]=m[y].charCodeAt(0);return Ib(v)}function Gc(i,m){for(var v=new ArrayBuffer(2*i.length),y=new DataView(v),w=0;w<i.length;++w)y.setUint16(2*w,i.charCodeAt(w),m);return v}K("shaka.util.StringUtils",Ac),Ac.resetFromCharCode=function(){Kn.g=void 0},Ac.toUTF16=Gc,Ac.toUTF8=Fc,Ac.fromBytesAutoDetect=Ec,Ac.fromUTF16=Cc,Ac.fromUTF8=Bc;var Kn=new mc((function(){function a(i){try{var m=new Uint8Array(i);return 0<String.fromCharCode.apply(null,m).length}catch(i){return!1}}for(var i={Ua:65536};0<i.Ua;(i={Ua:i.Ua}).Ua/=2)if(a(i.Ua))return function(i){return function(m){for(var v="",y=0;y<m.length;y+=i.Ua)v+=String.fromCharCode.apply(null,m.subarray(y,y+i.Ua));return v}}(i);return null}));function Hc(){}function Ic(i){return i=M(i),i=Kn.value()(i),btoa(i)}function Jc(i,m){return m=null==m||m,i=Ic(i).replace(/\+/g,"-").replace(/\//g,"_"),m?i:i.replace(/[=]*$/,"")}function Kc(m){m=i.atob(m.replace(/-/g,"+").replace(/_/g,"/"));for(var v=new Uint8Array(m.length),y=0;y<m.length;++y)v[y]=m.charCodeAt(y);return v}function Lc(m){for(var v=m.length/2,y=new Uint8Array(v),w=0;w<v;w++)y[w]=i.parseInt(m.substr(2*w,2),16);return y}function Mc(i){var m=M(i);i="";for(var v=(m=r(m)).next();!v.done;v=m.next())1==(v=(v=v.value).toString(16)).length&&(v="0"+v),i+=v;return i}function Nc(){for(var i=Fa.apply(0,arguments),m=0,v=r(i),y=v.next();!y.done;y=v.next())m+=y.value.byteLength;for(m=new Uint8Array(m),v=0,y=(i=r(i)).next();!y.done;y=i.next())y=y.value,m.set(M(y),v),v+=y.byteLength;return m}function Oc(){}K("shaka.util.Uint8ArrayUtils",Hc),Hc.concat=Nc,Hc.toHex=Mc,Hc.fromHex=Lc,Hc.fromBase64=Kc,Hc.toBase64=Jc,Hc.toStandardBase64=Ic,K("shaka.dependencies",Oc),Oc.has=function(i){return Zn.has(i)},Oc.add=function(i,m){if(!Yn[i])throw Error(i+" is not supported");Zn.set(i,(function(){return m}))};var Yn={muxjs:"muxjs"};Oc.Allowed=Yn;var Zn=new Map([["muxjs",function(){return i.muxjs}]]);function Rc(i){var m=this;this.o=i,this.m=Zn.get("muxjs")(),this.g=new this.m.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.h=null,this.l=[],this.i=[],this.j=!1,this.g.on("data",(function(i){m.i=i.captions,m.l.push(Nc(i.initSegment,i.data))})),this.g.on("done",(function(){var i={data:Nc.apply(Hc,ha(m.l)),captions:m.i};m.h.resolve(i),m.j=!1}))}function Sc(i,m){var v=Tc(i),y="audio/aac"==i.toLowerCase().split(";")[0];return!(!Zn.get("muxjs")()||!v&&!y)&&(y?eb('audio/mp4; codecs="mp4a.40.2"'):m?eb(Uc(m,i)):(m=Uc("audio",i),i=Uc("video",i),eb(m)||eb(i)))}function Tc(i){return"mp2t"==i.toLowerCase().split(";")[0].split("/")[1]}function Vc(i,m){return"audio/aac"==m.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp4a.40.2"':Tc(m)?Uc(i,m):m}function Uc(i,m){if(m=m.replace(/mp2t/i,"mp4"),"audio"==i&&(m=m.replace("video","audio")),i=/avc1\.(66|77|100)\.(\d+)/.exec(m)){var v="avc1.",y=i[1],w=Number(i[2]);v=("66"==y?v+"4200":"77"==y?v+"4d00":v+"6400")+(w>>4).toString(16),v+=(15&w).toString(16),m=m.replace(i[0],v)}return m}function Xc(){}function Yc(i,m){return m&&(i+='; codecs="'+m+'"'),i}function Zc(i,m,v){return Sc(i=Yc(i,m),v)?Vc(v,i):"audio"==v?i.replace("video","audio"):i}function $c(i){var m=ad(i);switch(i=m[0],m=m[1].toLowerCase(),!0){case"mp4a"===i&&"69"===m:case"mp4a"===i&&"6b"===m:return"mp3";case"mp4a"===i&&"66"===m:case"mp4a"===i&&"67"===m:case"mp4a"===i&&"68"===m:case"mp4a"===i&&"40.2"===m:case"mp4a"===i&&"40.02"===m:case"mp4a"===i&&"40.5"===m:case"mp4a"===i&&"40.05"===m:case"mp4a"===i&&"40.29"===m:case"mp4a"===i&&"40.42"===m:return"aac";case"mp4a"===i&&"a5"===m:return"ac-3";case"mp4a"===i&&"a6"===m:return"ec-3";case"mp4a"===i&&"b2"===m:return"dtsx";case"mp4a"===i&&"a9"===m:return"dtsc";case"avc1"===i:case"avc3"===i:return"avc";case"hvc1"===i:case"hev1"===i:return"hevc";case"dvh1"===i:case"dvhe"===i:return"dovi"}return i}function bd(i){return(i=i.split(/ *; */)).shift(),(i=i.find((function(i){return i.startsWith("codecs=")})))?i.split("=")[1].replace(/^"|"$/g,""):""}function ad(i){var m=(i=i.split("."))[0];return i.shift(),[m,i.join(".")]}function cd(i){this.j=null,this.i=i,this.u=!1,this.l=this.s=0,this.m=1/0,this.h=this.g=null,this.B="",this.o=new Map}function dd(i){return!(!Jn[i]&&"application/cea-608"!=i&&"application/cea-708"!=i)}function hd(i,m,v){if(i.B=m,m=i.o.get(m))for(var y=r(m.keys()),w=y.next();!w.done;w=y.next())(w=m.get(w.value).filter((function(i){return i.endTime<=v})))&&i.i.append(w)}function jd(i,m,v){m.startTime+=v,m.endTime+=v;for(var y=(m=r(m.nestedCues)).next();!y.done;y=m.next())jd(i,y.value,v)}function kd(i,m,v,y,w){for(var x=v+" "+y,_=new Map,j=(m=r(m)).next();!j.done;j=m.next()){var R=j.value;j=R.stream,R=R.cue,_.has(j)||_.set(j,new Map),_.get(j).has(x)||_.get(j).set(x,[]),jd(i,R,w),R.startTime>=i.l&&R.startTime<i.m&&(_.get(j).get(x).push(R),j==i.B&&i.i.append([R]))}for(x=(w=r(_.keys())).next();!x.done;x=w.next())for(x=x.value,i.o.has(x)||i.o.set(x,new Map),j=(m=r(_.get(x).keys())).next();!j.done;j=m.next())j=j.value,R=_.get(x).get(j),i.o.get(x).set(j,R);i.g=null==i.g?Math.max(v,i.l):Math.min(i.g,Math.max(v,i.l)),i.h=Math.max(i.h,Math.min(y,i.m))}Rc.prototype.destroy=function(){return this.g.dispose(),this.g=null,Promise.resolve()},K("shaka.util.MimeUtils",Xc),Xc.getFullType=Yc,(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),cd.prototype.destroy=function(){return this.i=this.j=null,this.o.clear(),Promise.resolve()},cd.prototype.remove=function(i,m){var v=this;return G((function(y){if(1==y.g)return u(y,Promise.resolve(),2);!v.i||!v.i.remove(i,m)||null==v.g||m<=v.g||i>=v.h||(i<=v.g&&m>=v.h?v.g=v.h=null:i<=v.g&&m<v.h?v.g=m:i>v.g&&m>=v.h&&(v.h=i)),A(y)}))},K("shaka.text.TextEngine",cd),cd.prototype.destroy=cd.prototype.destroy,cd.findParser=function(i){return Jn[i]},cd.unregisterParser=function(i){delete Jn[i]},cd.registerParser=function(i,m){Jn[i]=m};var Jn={};function ld(){}function md(i,m){return i=nd(i),m=nd(m),i.split("-")[0]==m.split("-")[0]}function od(i,m){return i=nd(i),m=nd(m),i=i.split("-"),m=m.split("-"),i[0]==m[0]&&1==i.length&&2==m.length}function pd(i,m){return i=nd(i),m=nd(m),i=i.split("-"),m=m.split("-"),2==i.length&&2==m.length&&i[0]==m[0]}function nd(i){var m=i.split("-");return i=m[0]||"",m=m[1]||"",i=i.toLowerCase(),i=er.get(i)||i,(m=m.toUpperCase())?i+"-"+m:i}function rd(i,m){return i=nd(i),(m=nd(m))==i?4:od(m,i)?3:pd(m,i)?2:od(i,m)?1:0}function sd(i){var m=i.indexOf("-");return i=(i=0<=m?i.substring(0,m):i).toLowerCase(),er.get(i)||i}function td(i){return i.language?nd(i.language):i.audio&&i.audio.language?nd(i.audio.language):i.video&&i.video.language?nd(i.video.language):"und"}function ud(i,m){i=nd(i);var v=new Set,y=r(m);for(m=y.next();!m.done;m=y.next())v.add(nd(m.value));for(m=(y=r(v)).next();!m.done;m=y.next())if((m=m.value)==i)return m;for(m=(y=r(v)).next();!m.done;m=y.next())if(od(m=m.value,i))return m;for(m=(y=r(v)).next();!m.done;m=y.next())if(pd(m=m.value,i))return m;for(m=(v=r(v)).next();!m.done;m=v.next())if(od(i,m=m.value))return m;return null}K("shaka.util.LanguageUtils",ld),ld.findClosestLocale=ud,ld.getLocaleForVariant=td,ld.getLocaleForText=function(i){return nd(i.language||"und")},ld.getBase=sd,ld.relatedness=rd,ld.areSiblings=function(i,m){var v=sd(i),y=sd(m);return i!=v&&m!=y&&v==y},ld.normalize=nd,ld.isSiblingOf=pd,ld.isParentOf=od,ld.areLanguageCompatible=md,ld.areLocaleCompatible=function(i,m){return(i=nd(i))==(m=nd(m))};var er=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 vd(){this.g={}}function wd(i,m,v,y,w){var x=i.variants;(m.length||v.length)&&(x=function xd(i,m,v){for(var y={},w=(m=r(m)).next();!w.done;y={xd:y.xd},w=m.next())if(y.xd=w.value,w=i.filter(function(i){return function(m){return m.video&&m.video.codecs.startsWith(i.xd)}}(y)),w.length){i=w;break}for(y={},v=r(v),m=v.next();!m.done;y={jd:y.jd},m=v.next())if(y.jd=m.value,m=i.filter(function(i){return function(m){return m.audio&&m.audio.codecs.startsWith(i.jd)}}(y)),m.length){i=m;break}return i}(x,m,v)),m=function zd(i){for(var m=new vd,v=(i=r(i)).next();!v.done;v=i.next()){var y=Cd(v=v.value);m.push(y,v)}return m}(x=yd(x,y)),m=function Ad(i){var m=0,v=new Map,y=i.size();return i.forEach((function(i,w){for(var x=(w=r(w)).next();!x.done;x=w.next()){var _=(x=x.value).video;if(_&&_.width&&_.height){_=_.width*_.height*(_.frameRate||1),v.has(_)||v.set(_,new vd);var j=v.get(_);j.push(i,x),j.size()===y&&(m=Math.max(m,_))}}})),m?v.get(m):i}(m);var _=function Bd(i,m){for(var v=(m=r(m)).next();!v.done;v=m.next())if((v=v.value)==or||v==pr){if(1==(i=Fd(i,v)).size())return i.keys()[0]}else if(v==Ar)break;return function Hd(i){var m="",v=1/0;return i.forEach((function(i,y){for(var w=0,x=0,_=(y=r(y)).next();!_.done;_=y.next())w+=_.value.bandwidth||0,++x;(w/=x)<v&&(m=i,v=w)})),m}(i)}(m,w);i.variants=i.variants.filter((function(i){return Cd(i)==_}))}function Fd(i,m){var v=0,y=new vd;return i.forEach((function(i,w){for(var x=0,_=0,j=r(w),R=j.next();!R.done;R=j.next())(R=R.value).decodingInfos.length&&(x+=R.decodingInfos[0][m]?1:0,_++);(x/=_)>v?(y.g={},y.push(i,w),v=x):x==v&&y.push(i,w)})),y}function Cd(i){var m="";i.video&&(m=$c(i.video.codecs));var v="";return i.audio&&(v=$c(i.audio.codecs)),m+"-"+v}function Jd(i,m,v){function d(i,m,v){return i>=m&&i<=v}var y=i.video;if(0!=i.disabledUntilTime){if(i.disabledUntilTime>Date.now()/1e3)return!1;i.disabledUntilTime=0}return!(y&&y.width&&y.height&&(!d(y.width,m.minWidth,Math.min(m.maxWidth,v.width))||!d(y.height,m.minHeight,Math.min(m.maxHeight,v.height))||!d(y.width*y.height,m.minPixels,m.maxPixels))||i&&i.video&&i.video.frameRate&&!d(i.video.frameRate,m.minFrameRate,m.maxFrameRate)||!d(i.bandwidth,m.minBandwidth,m.maxBandwidth))}function Kd(i,m,v){for(var y=!1,w=(i=r(i)).next();!w.done;w=i.next()){var x=(w=w.value).allowedByApplication;w.allowedByApplication=Jd(w,m,v),x!=w.allowedByApplication&&(y=!0)}return y}function Ld(i,m){return G((function(v){return 1==v.g?u(v,Md(m,0<m.offlineSessionIds.length),2):(Nd(i,m),function Od(i){i.textStreams=i.textStreams.filter((function(i){return dd(Yc(i.mimeType,i.codecs))}))}(m),u(v,function Pd(i){var m,v,y,w,x,_,j;return G((function(R){switch(R.g){case 1:m=[],v=r(i.imageStreams),y=v.next();case 2:if(y.done){R.A(4);break}if(w=y.value,x=w.mimeType,_r.has(x)){R.A(5);break}if(!(_=Rr.get(x))){_r.set(x,!1),R.A(5);break}return u(R,function Yd(i){return new Promise((function(m){var v=new Image;v.src=i,"decode"in v?v.decode().then((function(){m(!0)})).catch((function(){m(!1)})):v.onload=v.onerror=function(){m(2===v.height)}}))}(_),7);case 7:j=R.h,_r.set(x,j);case 5:_r.get(x)&&m.push(w),y=v.next(),R.A(2);break;case 4:i.imageStreams=m,A(R)}}))}(m),0))}))}function Md(i,m){return G((function(v){if(1==v.g)return u(v,Qd(i.variants,m,!1),2);i.variants=i.variants.filter((function(i){var m=i.video;if(m){var v=Rd(m.codecs);if(m.codecs.includes(",")){var y=m.codecs.split(",");v=Rd(v=gc("video",y)),y=Sd(y=gc("audio",y));var w=Zc(m.mimeType,y,"audio");if(!eb(w))return!1;v=[v,y].join()}if(!eb(y=Zc(m.mimeType,v,"video")))return!1;m.codecs=v}if(v=i.audio){if(y=Sd(v.codecs),!eb(w=Zc(v.mimeType,y,"audio")))return!1;v.codecs=y}return rc()&&m&&(m.width&&1920<m.width||m.height&&1080<m.height)&&(m.codecs.includes("avc1.")||m.codecs.includes("avc3."))?(Td(i),!1):((m=i.decodingInfos.some((function(i){return i.supported})))||Td(i),m)})),A(v)}))}function Qd(i,m,v){var y,w,x,_,j,R,L,U,B,q;return G((function(z){if(i.some((function(i){return i.decodingInfos.length})))return z.return();for(y=navigator.mediaCapabilities,w=[],x=function(i,m){var v;return G((function(w){return 1==w.g?(D(w,2),u(w,y.decodingInfo(m),4)):2!=w.g?(v=w.h,i.decodingInfos.push(v),ta(w,0)):(ua(w),JSON.stringify(m),void A(w))}))},_=r(i),j=_.next();!j.done;j=_.next())for(R=j.value,L=Ud(R,m,v),U=r(L),B=U.next();!B.done;B=U.next())q=B.value,w.push(x(R,q));return u(z,Promise.all(w),0)}))}function Ud(i,m,v){var y=i.audio,w=i.video;if(v={type:v?"file":"media-source"},w){var x=w.codecs;if(w.codecs.includes(",")){var _=w.codecs.split(",");x=Rd(x=gc("video",_)),_=gc("audio",_),_=Zc(w.mimeType,_,"audio"),v.audio={contentType:_,channels:2,bitrate:i.bandwidth||1,samplerate:1,spatialRendering:!1}}if(x=Rd(x),x=Zc(w.mimeType,x,"video"),v.video={contentType:x,width:w.width||64,height:w.height||64,bitrate:w.bandwidth||i.bandwidth||1,framerate:w.frameRate||1},w.hdr)switch(w.hdr){case"SDR":v.video.transferFunction="srgb";break;case"PQ":v.video.transferFunction="pq";break;case"HLG":v.video.transferFunction="hlg"}}if(y&&(x=Sd(y.codecs),x=Zc(y.mimeType,x,"audio"),v.audio={contentType:x,channels:y.channelsCount||2,bitrate:y.bandwidth||i.bandwidth||1,samplerate:y.audioSamplingRate||1,spatialRendering:y.spatialAudio}),!(_=(i.video?i.video.drmInfos:[]).concat(i.audio?i.audio.drmInfos:[])).length)return[v];i=[],x=new Map;for(var j=(_=r(_)).next();!j.done;j=_.next()){var R=j.value;x.get(R.keySystem)||x.set(R.keySystem,[]),x.get(R.keySystem)